(function(){var e={9662:function(e,t,i){var r=i(614),n=i(6330),a=TypeError;e.exports=function(e){if(r(e))return e;throw a(n(e)+" is not a function")}},6077:function(e,t,i){var r=i(614),n=String,a=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw a("Can't set "+n(e)+" as a prototype")}},1223:function(e,t,i){var r=i(5112),n=i(30),a=i(3070).f,o=r("unscopables"),s=Array.prototype;void 0==s[o]&&a(s,o,{configurable:!0,value:n(null)}),e.exports=function(e){s[o][e]=!0}},9670:function(e,t,i){var r=i(111),n=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw a(n(e)+" is not an object")}},3013:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:function(e,t,i){"use strict";var r,n,a,o=i(3013),s=i(9781),l=i(7854),u=i(614),c=i(111),h=i(2597),d=i(648),p=i(6330),m=i(8880),f=i(8052),g=i(3070).f,v=i(7976),y=i(9518),b=i(7674),w=i(5112),x=i(9711),A=i(9909),k=A.enforce,S=A.get,M=l.Int8Array,N=M&&M.prototype,z=l.Uint8ClampedArray,L=z&&z.prototype,C=M&&y(M),E=N&&y(N),_=Object.prototype,T=l.TypeError,B=w("toStringTag"),I=x("TYPED_ARRAY_TAG"),q="TypedArrayConstructor",D=o&&!!b&&"Opera"!==d(l.opera),O=!1,R={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},F={BigInt64Array:8,BigUint64Array:8},P=function(e){if(!c(e))return!1;var t=d(e);return"DataView"===t||h(R,t)||h(F,t)},V=function(e){var t=y(e);if(c(t)){var i=S(t);return i&&h(i,q)?i[q]:V(t)}},U=function(e){if(!c(e))return!1;var t=d(e);return h(R,t)||h(F,t)},K=function(e){if(U(e))return e;throw T("Target is not a typed array")},H=function(e){if(u(e)&&(!b||v(C,e)))return e;throw T(p(e)+" is not a typed array constructor")},G=function(e,t,i,r){if(s){if(i)for(var n in R){var a=l[n];if(a&&h(a.prototype,e))try{delete a.prototype[e]}catch(o){try{a.prototype[e]=t}catch(u){}}}E[e]&&!i||f(E,e,i?t:D&&N[e]||t,r)}},j=function(e,t,i){var r,n;if(s){if(b){if(i)for(r in R)if(n=l[r],n&&h(n,e))try{delete n[e]}catch(a){}if(C[e]&&!i)return;try{return f(C,e,i?t:D&&C[e]||t)}catch(a){}}for(r in R)n=l[r],!n||n[e]&&!i||f(n,e,t)}};for(r in R)n=l[r],a=n&&n.prototype,a?k(a)[q]=n:D=!1;for(r in F)n=l[r],a=n&&n.prototype,a&&(k(a)[q]=n);if((!D||!u(C)||C===Function.prototype)&&(C=function(){throw T("Incorrect invocation")},D))for(r in R)l[r]&&b(l[r],C);if((!D||!E||E===_)&&(E=C.prototype,D))for(r in R)l[r]&&b(l[r].prototype,E);if(D&&y(L)!==E&&b(L,E),s&&!h(E,B))for(r in O=!0,g(E,B,{get:function(){return c(this)?this[I]:void 0}}),R)l[r]&&m(l[r],I,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:O&&I,aTypedArray:K,aTypedArrayConstructor:H,exportTypedArrayMethod:G,exportTypedArrayStaticMethod:j,getTypedArrayConstructor:V,isView:P,isTypedArray:U,TypedArray:C,TypedArrayPrototype:E}},1318:function(e,t,i){var r=i(5656),n=i(1400),a=i(6244),o=function(e){return function(t,i,o){var s,l=r(t),u=a(l),c=n(o,u);if(e&&i!=i){while(u>c)if(s=l[c++],s!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===i)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},9671:function(e,t,i){var r=i(9974),n=i(8361),a=i(7908),o=i(6244),s=function(e){var t=1==e;return function(i,s,l){var u,c,h=a(i),d=n(h),p=r(s,l),m=o(d);while(m-- >0)if(u=d[m],c=p(u,m,h),c)switch(e){case 0:return u;case 1:return m}return t?-1:void 0}};e.exports={findLast:s(0),findLastIndex:s(1)}},3658:function(e,t,i){"use strict";var r=i(9781),n=i(3157),a=TypeError,o=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(n(e)&&!o(e,"length").writable)throw a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4326:function(e,t,i){var r=i(1702),n=r({}.toString),a=r("".slice);e.exports=function(e){return a(n(e),8,-1)}},648:function(e,t,i){var r=i(1694),n=i(614),a=i(4326),o=i(5112),s=o("toStringTag"),l=Object,u="Arguments"==a(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(i){}};e.exports=r?a:function(e){var t,i,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=c(t=l(e),s))?i:u?a(t):"Object"==(r=a(t))&&n(t.callee)?"Arguments":r}},9920:function(e,t,i){var r=i(2597),n=i(3887),a=i(1236),o=i(3070);e.exports=function(e,t,i){for(var s=n(t),l=o.f,u=a.f,c=0;ci)throw t("Maximum allowed index exceeded");return e}},8113:function(e,t,i){var r=i(5005);e.exports=r("navigator","userAgent")||""},7392:function(e,t,i){var r,n,a=i(7854),o=i(8113),s=a.process,l=a.Deno,u=s&&s.versions||l&&l.version,c=u&&u.v8;c&&(r=c.split("."),n=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&o&&(r=o.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/),r&&(n=+r[1]))),e.exports=n},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1060:function(e,t,i){var r=i(1702),n=Error,a=r("".replace),o=function(e){return String(n(e).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,l=s.test(o);e.exports=function(e,t){if(l&&"string"==typeof e&&!n.prepareStackTrace)while(t--)e=a(e,s,"");return e}},2914:function(e,t,i){var r=i(7293),n=i(9114);e.exports=!r((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},2109:function(e,t,i){var r=i(7854),n=i(1236).f,a=i(8880),o=i(8052),s=i(3072),l=i(9920),u=i(4705);e.exports=function(e,t){var i,c,h,d,p,m,f=e.target,g=e.global,v=e.stat;if(c=g?r:v?r[f]||s(f,{}):(r[f]||{}).prototype,c)for(h in t){if(p=t[h],e.dontCallGetSet?(m=n(c,h),d=m&&m.value):d=c[h],i=u(g?h:f+(v?".":"#")+h,e.forced),!i&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(e.sham||d&&d.sham)&&a(p,"sham",!0),o(c,h,p,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(t){return!0}}},2104:function(e,t,i){var r=i(4374),n=Function.prototype,a=n.apply,o=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},9974:function(e,t,i){var r=i(1702),n=i(9662),a=i(4374),o=r(r.bind);e.exports=function(e,t){return n(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}},4374:function(e,t,i){var r=i(7293);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},6916:function(e,t,i){var r=i(4374),n=Function.prototype.call;e.exports=r?n.bind(n):function(){return n.apply(n,arguments)}},6530:function(e,t,i){var r=i(9781),n=i(2597),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=n(a,"name"),l=s&&"something"===function(){}.name,u=s&&(!r||r&&o(a,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:u}},1702:function(e,t,i){var r=i(4374),n=Function.prototype,a=n.bind,o=n.call,s=r&&a.bind(o,o);e.exports=r?function(e){return e&&s(e)}:function(e){return e&&function(){return o.apply(e,arguments)}}},5005:function(e,t,i){var r=i(7854),n=i(614),a=function(e){return n(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e]):r[e]&&r[e][t]}},8173:function(e,t,i){var r=i(9662),n=i(8554);e.exports=function(e,t){var i=e[t];return n(i)?void 0:r(i)}},7854:function(e,t,i){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof i.g&&i.g)||function(){return this}()||Function("return this")()},2597:function(e,t,i){var r=i(1702),n=i(7908),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(n(e),t)}},3501:function(e){e.exports={}},490:function(e,t,i){var r=i(5005);e.exports=r("document","documentElement")},4664:function(e,t,i){var r=i(9781),n=i(7293),a=i(317);e.exports=!r&&!n((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},8361:function(e,t,i){var r=i(1702),n=i(7293),a=i(4326),o=Object,s=r("".split);e.exports=n((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?s(e,""):o(e)}:o},9587:function(e,t,i){var r=i(614),n=i(111),a=i(7674);e.exports=function(e,t,i){var o,s;return a&&r(o=t.constructor)&&o!==i&&n(s=o.prototype)&&s!==i.prototype&&a(e,s),e}},2788:function(e,t,i){var r=i(1702),n=i(614),a=i(5465),o=r(Function.toString);n(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},8340:function(e,t,i){var r=i(111),n=i(8880);e.exports=function(e,t){r(t)&&"cause"in t&&n(e,"cause",t.cause)}},9909:function(e,t,i){var r,n,a,o=i(4811),s=i(7854),l=i(1702),u=i(111),c=i(8880),h=i(2597),d=i(5465),p=i(6200),m=i(3501),f="Object already initialized",g=s.TypeError,v=s.WeakMap,y=function(e){return a(e)?n(e):r(e,{})},b=function(e){return function(t){var i;if(!u(t)||(i=n(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return i}};if(o||d.state){var w=d.state||(d.state=new v),x=l(w.get),A=l(w.has),k=l(w.set);r=function(e,t){if(A(w,e))throw g(f);return t.facade=e,k(w,e,t),t},n=function(e){return x(w,e)||{}},a=function(e){return A(w,e)}}else{var S=p("state");m[S]=!0,r=function(e,t){if(h(e,S))throw g(f);return t.facade=e,c(e,S,t),t},n=function(e){return h(e,S)?e[S]:{}},a=function(e){return h(e,S)}}e.exports={set:r,get:n,has:a,enforce:y,getterFor:b}},3157:function(e,t,i){var r=i(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},614:function(e){e.exports=function(e){return"function"==typeof e}},4705:function(e,t,i){var r=i(7293),n=i(614),a=/#|\.prototype\./,o=function(e,t){var i=l[s(e)];return i==c||i!=u&&(n(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,".").toLowerCase()},l=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},8554:function(e){e.exports=function(e){return null===e||void 0===e}},111:function(e,t,i){var r=i(614),n="object"==typeof document&&document.all,a="undefined"==typeof n&&void 0!==n;e.exports=a?function(e){return"object"==typeof e?null!==e:r(e)||e===n}:function(e){return"object"==typeof e?null!==e:r(e)}},1913:function(e){e.exports=!1},2190:function(e,t,i){var r=i(5005),n=i(614),a=i(7976),o=i(3307),s=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return n(t)&&a(t.prototype,s(e))}},6244:function(e,t,i){var r=i(7466);e.exports=function(e){return r(e.length)}},6339:function(e,t,i){var r=i(7293),n=i(614),a=i(2597),o=i(9781),s=i(6530).CONFIGURABLE,l=i(2788),u=i(9909),c=u.enforce,h=u.get,d=Object.defineProperty,p=o&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),f=e.exports=function(e,t,i){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||s&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),p&&i&&a(i,"arity")&&e.length!==i.arity&&d(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(n){}var r=c(e);return a(r,"source")||(r.source=m.join("string"==typeof t?t:"")),e};Function.prototype.toString=f((function(){return n(this)&&h(this).source||l(this)}),"toString")},4758:function(e){var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?i:t)(r)}},6277:function(e,t,i){var r=i(1340);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},30:function(e,t,i){var r,n=i(9670),a=i(6048),o=i(748),s=i(3501),l=i(490),u=i(317),c=i(6200),h=">",d="<",p="prototype",m="script",f=c("IE_PROTO"),g=function(){},v=function(e){return d+m+h+e+d+"/"+m+h},y=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=u("iframe"),i="java"+m+":";return t.style.display="none",l.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(v("document.F=Object")),e.close(),e.F},w=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}w="undefined"!=typeof document?document.domain&&r?y(r):b():y(r);var e=o.length;while(e--)delete w[p][o[e]];return w()};s[f]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(g[p]=n(e),i=new g,g[p]=null,i[f]=e):i=w(),void 0===t?i:a.f(i,t)}},6048:function(e,t,i){var r=i(9781),n=i(3353),a=i(3070),o=i(9670),s=i(5656),l=i(1956);t.f=r&&!n?Object.defineProperties:function(e,t){o(e);var i,r=s(t),n=l(t),u=n.length,c=0;while(u>c)a.f(e,i=n[c++],r[i]);return e}},3070:function(e,t,i){var r=i(9781),n=i(4664),a=i(3353),o=i(9670),s=i(4948),l=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable";t.f=r?a?function(e,t,i){if(o(e),t=s(t),o(i),"function"===typeof e&&"prototype"===t&&"value"in i&&p in i&&!i[p]){var r=c(e,t);r&&r[p]&&(e[t]=i.value,i={configurable:d in i?i[d]:r[d],enumerable:h in i?i[h]:r[h],writable:!1})}return u(e,t,i)}:u:function(e,t,i){if(o(e),t=s(t),o(i),n)try{return u(e,t,i)}catch(r){}if("get"in i||"set"in i)throw l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},1236:function(e,t,i){var r=i(9781),n=i(6916),a=i(5296),o=i(9114),s=i(5656),l=i(4948),u=i(2597),c=i(4664),h=Object.getOwnPropertyDescriptor;t.f=r?h:function(e,t){if(e=s(e),t=l(t),c)try{return h(e,t)}catch(i){}if(u(e,t))return o(!n(a.f,e,t),e[t])}},8006:function(e,t,i){var r=i(6324),n=i(748),a=n.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,i){var r=i(2597),n=i(614),a=i(7908),o=i(6200),s=i(8544),l=o("IE_PROTO"),u=Object,c=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=a(e);if(r(t,l))return t[l];var i=t.constructor;return n(i)&&t instanceof i?i.prototype:t instanceof u?c:null}},7976:function(e,t,i){var r=i(1702);e.exports=r({}.isPrototypeOf)},6324:function(e,t,i){var r=i(1702),n=i(2597),a=i(5656),o=i(1318).indexOf,s=i(3501),l=r([].push);e.exports=function(e,t){var i,r=a(e),u=0,c=[];for(i in r)!n(s,i)&&n(r,i)&&l(c,i);while(t.length>u)n(r,i=t[u++])&&(~o(c,i)||l(c,i));return c}},1956:function(e,t,i){var r=i(6324),n=i(748);e.exports=Object.keys||function(e){return r(e,n)}},5296:function(e,t){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!i.call({1:2},1);t.f=n?function(e){var t=r(this,e);return!!t&&t.enumerable}:i},7674:function(e,t,i){var r=i(1702),n=i(9670),a=i(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(i,[]),t=i instanceof Array}catch(o){}return function(i,r){return n(i),a(r),t?e(i,r):i.__proto__=r,i}}():void 0)},2140:function(e,t,i){var r=i(6916),n=i(614),a=i(111),o=TypeError;e.exports=function(e,t){var i,s;if("string"===t&&n(i=e.toString)&&!a(s=r(i,e)))return s;if(n(i=e.valueOf)&&!a(s=r(i,e)))return s;if("string"!==t&&n(i=e.toString)&&!a(s=r(i,e)))return s;throw o("Can't convert object to primitive value")}},3887:function(e,t,i){var r=i(5005),n=i(1702),a=i(8006),o=i(5181),s=i(9670),l=n([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=a.f(s(e)),i=o.f;return i?l(t,i(e)):t}},2626:function(e,t,i){var r=i(3070).f;e.exports=function(e,t,i){i in e||r(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})}},4488:function(e,t,i){var r=i(8554),n=TypeError;e.exports=function(e){if(r(e))throw n("Can't call method on "+e);return e}},6200:function(e,t,i){var r=i(2309),n=i(9711),a=r("keys");e.exports=function(e){return a[e]||(a[e]=n(e))}},5465:function(e,t,i){var r=i(7854),n=i(3072),a="__core-js_shared__",o=r[a]||n(a,{});e.exports=o},2309:function(e,t,i){var r=i(1913),n=i(5465);(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.25.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",source:"https://github.com/zloirock/core-js"})},6293:function(e,t,i){var r=i(7392),n=i(7293);e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},1400:function(e,t,i){var r=i(9303),n=Math.max,a=Math.min;e.exports=function(e,t){var i=r(e);return i<0?n(i+t,0):a(i,t)}},5656:function(e,t,i){var r=i(8361),n=i(4488);e.exports=function(e){return r(n(e))}},9303:function(e,t,i){var r=i(4758);e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},7466:function(e,t,i){var r=i(9303),n=Math.min;e.exports=function(e){return e>0?n(r(e),9007199254740991):0}},7908:function(e,t,i){var r=i(4488),n=Object;e.exports=function(e){return n(r(e))}},7593:function(e,t,i){var r=i(6916),n=i(111),a=i(2190),o=i(8173),s=i(2140),l=i(5112),u=TypeError,c=l("toPrimitive");e.exports=function(e,t){if(!n(e)||a(e))return e;var i,l=o(e,c);if(l){if(void 0===t&&(t="default"),i=r(l,e,t),!n(i)||a(i))return i;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},4948:function(e,t,i){var r=i(7593),n=i(2190);e.exports=function(e){var t=r(e,"string");return n(t)?t:t+""}},1694:function(e,t,i){var r=i(5112),n=r("toStringTag"),a={};a[n]="z",e.exports="[object z]"===String(a)},1340:function(e,t,i){var r=i(648),n=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return n(e)}},6330:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(i){return"Object"}}},9711:function(e,t,i){var r=i(1702),n=0,a=Math.random(),o=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++n+a,36)}},3307:function(e,t,i){var r=i(6293);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(e,t,i){var r=i(9781),n=i(7293);e.exports=r&&n((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:function(e,t,i){var r=i(7854),n=i(614),a=r.WeakMap;e.exports=n(a)&&/native code/.test(String(a))},5112:function(e,t,i){var r=i(7854),n=i(2309),a=i(2597),o=i(9711),s=i(6293),l=i(3307),u=n("wks"),c=r.Symbol,h=c&&c["for"],d=l?c:c&&c.withoutSetter||o;e.exports=function(e){if(!a(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&a(c,e)?u[e]=c[e]:u[e]=l&&h?h(t):d(t)}return u[e]}},9191:function(e,t,i){"use strict";var r=i(5005),n=i(2597),a=i(8880),o=i(7976),s=i(7674),l=i(9920),u=i(2626),c=i(9587),h=i(6277),d=i(8340),p=i(1060),m=i(2914),f=i(9781),g=i(1913);e.exports=function(e,t,i,v){var y="stackTraceLimit",b=v?2:1,w=e.split("."),x=w[w.length-1],A=r.apply(null,w);if(A){var k=A.prototype;if(!g&&n(k,"cause")&&delete k.cause,!i)return A;var S=r("Error"),M=t((function(e,t){var i=h(v?t:e,void 0),r=v?new A(e):new A;return void 0!==i&&a(r,"message",i),m&&a(r,"stack",p(r.stack,2)),this&&o(k,this)&&c(r,this,M),arguments.length>b&&d(r,arguments[b]),r}));if(M.prototype=k,"Error"!==x?s?s(M,S):l(M,S,{name:!0}):f&&y in A&&(u(M,A,y),u(M,A,"prepareStackTrace")),l(M,A),!g)try{k.name!==x&&a(k,"name",x),k.constructor=M}catch(N){}return M}}},2262:function(e,t,i){"use strict";var r=i(2109),n=i(7908),a=i(6244),o=i(9303),s=i(1223);r({target:"Array",proto:!0},{at:function(e){var t=n(this),i=a(t),r=o(e),s=r>=0?r:i+r;return s<0||s>=i?void 0:t[s]}}),s("at")},7658:function(e,t,i){"use strict";var r=i(2109),n=i(7908),a=i(6244),o=i(3658),s=i(7207),l=i(7293),u=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}();r({target:"Array",proto:!0,arity:1,forced:u||c},{push:function(e){var t=n(this),i=a(t),r=arguments.length;s(i+r);for(var l=0;l=0?r:i+r;return n<0||n>=i?void 0:u(t,n)}})},8675:function(e,t,i){"use strict";var r=i(260),n=i(6244),a=i(9303),o=r.aTypedArray,s=r.exportTypedArrayMethod;s("at",(function(e){var t=o(this),i=n(t),r=a(e),s=r>=0?r:i+r;return s<0||s>=i?void 0:t[s]}))},4590:function(e,t,i){"use strict";var r=i(260),n=i(9671).findLastIndex,a=r.aTypedArray,o=r.exportTypedArrayMethod;o("findLastIndex",(function(e){return n(a(this),e,arguments.length>1?arguments[1]:void 0)}))},3408:function(e,t,i){"use strict";var r=i(260),n=i(9671).findLast,a=r.aTypedArray,o=r.exportTypedArrayMethod;o("findLast",(function(e){return n(a(this),e,arguments.length>1?arguments[1]:void 0)}))},6692:function(e,t,i){"use strict";i.r(t);var r=i(8081),n=i.n(r),a=i(3645),o=i.n(a),s=o()(n());s.push([e.id,"#app{display:flex}#app>div{padding:16px}.left-column{width:256px}.tooltip{position:relative;display:inline-block;border-bottom:1px dotted #000}.tooltip .tooltiptext{visibility:hidden;width:120px;background-color:#000;color:#fff;text-align:center;padding:5px 0;border-radius:6px;position:absolute;z-index:1}.tooltip:hover .tooltiptext{visibility:visible}",""]),t["default"]=s},466:function(e,t,i){"use strict";i.r(t);var r=i(8081),n=i.n(r),a=i(3645),o=i.n(a),s=o()(n());s.push([e.id,".left[data-v-db9ea94c]{text-align:left;padding-right:32px}.right[data-v-db9ea94c]{text-align:right}",""]),t["default"]=s},1969:function(e,t,i){"use strict";i.r(t);var r=i(8081),n=i.n(r),a=i(3645),o=i.n(a),s=i(1667),l=i.n(s),u=new URL(i(9428),i.b),c=new URL(i(3329),i.b),h=new URL(i(3562),i.b),d=new URL(i(4424),i.b),p=new URL(i(3405),i.b),m=new URL(i(8654),i.b),f=new URL(i(1851),i.b),g=new URL(i(1775),i.b),v=new URL(i(9561),i.b),y=new URL(i(2817),i.b),b=new URL(i(5791),i.b),w=new URL(i(1674),i.b),x=new URL(i(7226),i.b),A=new URL(i(6762),i.b),k=new URL(i(984),i.b),S=new URL(i(3689),i.b),M=new URL(i(9618),i.b),N=new URL(i(333),i.b),z=new URL(i(6782),i.b),L=new URL(i(7844),i.b),C=new URL(i(8242),i.b),E=new URL(i(1802),i.b),_=new URL(i(8253),i.b),T=new URL(i(448),i.b),B=new URL(i(4191),i.b),I=new URL(i(2767),i.b),q=new URL(i(7741),i.b),D=new URL(i(7357),i.b),O=new URL(i(2165),i.b),R=new URL(i(553),i.b),F=new URL(i(982),i.b),P=new URL(i(5879),i.b),V=new URL(i(875),i.b),U=new URL(i(7564),i.b),K=new URL(i(386),i.b),H=new URL(i(968),i.b),G=new URL(i(7009),i.b),j=new URL(i(3376),i.b),Q=new URL(i(5171),i.b),W=new URL(i(9394),i.b),Z=new URL(i(1911),i.b),Y=new URL(i(1271),i.b),X=new URL(i(4286),i.b),J=new URL(i(5430),i.b),$=new URL(i(3880),i.b),ee=new URL(i(7438),i.b),te=new URL(i(2117),i.b),ie=new URL(i(411),i.b),re=new URL(i(2834),i.b),ne=new URL(i(3001),i.b),ae=new URL(i(4376),i.b),oe=new URL(i(7386),i.b),se=new URL(i(6705),i.b),le=new URL(i(6155),i.b),ue=new URL(i(5142),i.b),ce=new URL(i(9965),i.b),he=new URL(i(9735),i.b),de=new URL(i(8425),i.b),pe=new URL(i(6009),i.b),me=new URL(i(7204),i.b),fe=o()(n()),ge=l()(u),ve=l()(c),ye=l()(h),be=l()(d),we=l()(p),xe=l()(m),Ae=l()(f),ke=l()(g),Se=l()(v),Me=l()(y),Ne=l()(b),ze=l()(w),Le=l()(x),Ce=l()(A),Ee=l()(k),_e=l()(S),Te=l()(M),Be=l()(N),Ie=l()(z),qe=l()(L),De=l()(C),Oe=l()(E),Re=l()(_),Fe=l()(T),Pe=l()(B),Ve=l()(I),Ue=l()(q),Ke=l()(D),He=l()(O),Ge=l()(R),je=l()(F),Qe=l()(P),We=l()(V),Ze=l()(U),Ye=l()(K),Xe=l()(H),Je=l()(G),$e=l()(j),et=l()(Q),tt=l()(W),it=l()(Z),rt=l()(Y),nt=l()(X),at=l()(J),ot=l()($),st=l()(ee),lt=l()(te),ut=l()(ie),ct=l()(re),ht=l()(ne),dt=l()(ae),pt=l()(oe),mt=l()(se),ft=l()(le),gt=l()(ue),vt=l()(ce),yt=l()(he),bt=l()(de),wt=l()(pe),xt=l()(me);fe.push([e.id,"@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url("+ge+') format("woff2"),url('+ve+') format("woff"),url('+ye+') format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url('+be+') format("woff2"),url('+we+') format("woff"),url('+xe+') format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url('+Ae+') format("woff2"),url('+ke+') format("woff"),url('+Se+') format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url('+Me+') format("woff2"),url('+Ne+') format("woff"),url('+ze+') format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url('+Le+') format("woff2"),url('+Ce+') format("woff"),url('+Ee+') format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url('+_e+') format("woff2"),url('+Te+') format("woff"),url('+Be+') format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url('+Ie+') format("woff2"),url('+qe+') format("woff"),url('+De+') format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url('+Oe+') format("woff2"),url('+Re+') format("woff"),url('+Fe+') format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url('+Pe+') format("woff2"),url('+Ve+') format("woff"),url('+Ue+') format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url('+Ke+') format("woff2"),url('+He+') format("woff"),url('+Ge+') format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url('+je+') format("woff2"),url('+Qe+') format("woff"),url('+We+') format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url('+Ze+') format("woff2"),url('+Ye+') format("woff"),url('+Xe+') format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url('+Je+') format("woff2"),url('+$e+') format("woff"),url('+et+') format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url('+tt+') format("woff2"),url('+it+') format("woff"),url('+rt+') format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url('+nt+') format("woff2"),url('+at+') format("woff"),url('+ot+') format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url('+st+') format("woff2"),url('+lt+') format("woff"),url('+ut+') format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url('+ct+') format("woff2"),url('+ht+') format("woff"),url('+dt+') format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url('+pt+') format("woff2"),url('+mt+') format("woff"),url('+ft+') format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url('+gt+') format("woff2"),url('+vt+') format("woff"),url('+yt+') format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url('+bt+') format("woff2"),url('+wt+') format("woff"),url('+xt+') format("truetype")}.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.15.6"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}',""]),t["default"]=fe},678:function(e,t,i){"use strict";i.r(t);var r=i(8081),n=i.n(r),a=i(3645),o=i.n(a),s=i(1667),l=i.n(s),u=new URL(i(5922),i.b),c=new URL(i(5268),i.b),h=new URL(i(5697),i.b),d=new URL(i(2170),i.b),p=new URL(i(7843),i.b),m=new URL(i(1713),i.b),f=new URL(i(9455),i.b),g=new URL(i(9665),i.b),v=new URL(i(282),i.b),y=new URL(i(8865),i.b),b=new URL(i(4434),i.b),w=new URL(i(2573),i.b),x=new URL(i(8920),i.b),A=new URL(i(7902),i.b),k=new URL(i(8800),i.b),S=new URL(i(1690),i.b),M=new URL(i(3453),i.b),N=new URL(i(6326),i.b),z=new URL(i(8975),i.b),L=new URL(i(2495),i.b),C=o()(n()),E=l()(u),_=l()(c),T=l()(h),B=l()(d),I=l()(p),q=l()(m),D=l()(f),O=l()(g),R=l()(v),F=l()(y),P=l()(b),V=l()(w),U=l()(x),K=l()(A),H=l()(k),G=l()(S),j=l()(M),Q=l()(N),W=l()(z),Z=l()(L);C.push([e.id,'@font-face{font-display:"swap";font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url('+E+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url('+_+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url('+T+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url('+B+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url('+I+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url('+q+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url('+D+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url('+O+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url('+R+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url('+F+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url('+P+') format("woff2")}@font-face{font-display:"swap";font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url('+V+') format("woff2")}@font-face{font-display:"swap";font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url('+U+') format("woff2")}@font-face{font-display:"swap";font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url('+K+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url('+H+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url('+G+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url('+j+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url('+Q+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url('+W+') format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url('+Z+') format("woff2")}:root{--ML__static-fonts:true}',""]),t["default"]=C},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",r="undefined"!==typeof t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),r&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),r&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,r,n,a){"string"===typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},1667:function(e){"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:function(e){"use strict";e.exports=function(e){return e[1]}},7669:function(e,t,i){"use strict";i(1703);var r=function(e){return n(e)&&!a(e)};function n(e){return!!e&&"object"===typeof e}function a(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||l(e)}var o="function"===typeof Symbol&&Symbol.for,s=o?Symbol.for("react.element"):60103;function l(e){return e.$$typeof===s}function u(e){return Array.isArray(e)?[]:{}}function c(e,t){return!1!==t.clone&&t.isMergeableObject(e)?y(u(e),e,t):e}function h(e,t,i){return e.concat(t).map((function(e){return c(e,i)}))}function d(e,t){if(!t.customMerge)return y;var i=t.customMerge(e);return"function"===typeof i?i:y}function p(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}function m(e){return Object.keys(e).concat(p(e))}function f(e,t){try{return t in e}catch(i){return!1}}function g(e,t){return f(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function v(e,t,i){var r={};return i.isMergeableObject(e)&&m(e).forEach((function(t){r[t]=c(e[t],i)})),m(t).forEach((function(n){g(e,n)||(f(e,n)&&i.isMergeableObject(t[n])?r[n]=d(n,i)(e[n],t[n],i):r[n]=c(t[n],i))})),r}function y(e,t,i){i=i||{},i.arrayMerge=i.arrayMerge||h,i.isMergeableObject=i.isMergeableObject||r,i.cloneUnlessOtherwiseSpecified=c;var n=Array.isArray(t),a=Array.isArray(e),o=n===a;return o?n?i.arrayMerge(e,t,i):v(e,t,i):c(t,i)}y.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,i){return y(e,i,t)}),{})};var b=y;e.exports=b},290:function(e,t,i){i(7658),i(1703),function(t,r){e.exports=r(i(3026))}("undefined"!==typeof self&&self,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var a=i[e]={exports:{}};return t[e](a,a.exports,r),a.exports}!function(){r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,{a:t}),t}}(),function(){r.d=function(e,t){for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}}(),function(){r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}();var n={};return function(){r.d(n,{default:function(){return d}});var e=r(771),t=r.n(e),i=function(e,t,i){var r=i,n=0,a=e.length;while(r0&&(n.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));var l=t.findIndex((function(t){return e.startsWith(t.left)}));if(r=i(t[l].right,e,t[l].left.length),-1===r)break;var u=e.slice(0,r+t[l].right.length),c=o.test(u)?u:e.slice(t[l].left.length,r);n.push({type:"math",data:c,rawData:u,display:t[l].display}),e=e.slice(r+t[l].right.length)}return""!==e&&n.push({type:"text",data:e}),n},l=s,u=function(e,i){var r=l(e,i.delimiters);if(1===r.length&&"text"===r[0].type)return null;for(var n=document.createDocumentFragment(),a=0;a15?"…"+o.slice(r-15,r):o.slice(0,r),u=s+15":">","<":"<",'"':""","'":"'"},u=/[&><"']/g;function c(e){return String(e).replace(u,(function(e){return l[e]}))}var h=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},d=function(e){var t=h(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},p=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},m=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"},f={contains:n,deflt:a,escape:c,hyphenate:s,getBaseElem:h,isCharacterBox:d,protocolFromUrl:m},g={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(e){return"#"+e}},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(e,t){return t.push(e),t}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(e){return Math.max(0,e)},cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(e){return Math.max(0,e)},cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(e){return Math.max(0,e)},cli:"-e, --max-expand ",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function v(e){if(e.default)return e.default;var t=e.type,i=Array.isArray(t)?t[0]:t;if("string"!==typeof i)return i.enum[0];switch(i){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var y=function(){function e(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},g)if(g.hasOwnProperty(t)){var i=g[t];this[t]=void 0!==e[t]?i.processor?i.processor(e[t]):e[t]:v(i)}}var t=e.prototype;return t.reportNonstrict=function(e,t,i){var n=this.strict;if("function"===typeof n&&(n=n(e,t,i)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new r("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===n?"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,i){var r=this.strict;if("function"===typeof r)try{r=r(e,t,i)}catch(n){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=f.protocolFromUrl(e.url));var t="function"===typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),b=function(){function e(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}var t=e.prototype;return t.sup=function(){return L[C[this.id]]},t.sub=function(){return L[E[this.id]]},t.fracNum=function(){return L[_[this.id]]},t.fracDen=function(){return L[T[this.id]]},t.cramp=function(){return L[B[this.id]]},t.text=function(){return L[I[this.id]]},t.isTight=function(){return this.size>=2},e}(),w=0,x=1,A=2,k=3,S=4,M=5,N=6,z=7,L=[new b(w,0,!1),new b(x,0,!0),new b(A,1,!1),new b(k,1,!0),new b(S,2,!1),new b(M,2,!0),new b(N,3,!1),new b(z,3,!0)],C=[S,M,S,M,N,z,N,z],E=[M,M,M,M,z,z,z,z],_=[A,k,S,M,N,z,N,z],T=[k,k,M,M,z,z,z,z],B=[x,x,k,k,M,M,z,z],I=[w,x,A,k,A,k,A,k],q={DISPLAY:L[w],TEXT:L[A],SCRIPT:L[S],SCRIPTSCRIPT:L[N]},D=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function O(e){for(var t=0;t=n[0]&&e<=n[1])return i.name}return null}var R=[];function F(e){for(var t=0;t=R[t]&&e<=R[t+1])return!0;return!1}D.forEach((function(e){return e.blocks.forEach((function(e){return R.push.apply(R,e)}))}));var P=80,V=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},U=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},K=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},H=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"},G=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},j=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Q=function(e,t,i){var r=i-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+r+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"},W=function(e,t,i){t*=1e3;var r="";switch(e){case"sqrtMain":r=V(t,P);break;case"sqrtSize1":r=U(t,P);break;case"sqrtSize2":r=K(t,P);break;case"sqrtSize3":r=H(t,P);break;case"sqrtSize4":r=G(t,P);break;case"sqrtTall":r=Q(t,P,i)}return r},Z=function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}},Y={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},X=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return f.contains(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t=5?0:e>=3?1:2,!re[t]){var i=re[t]={cssEmPerMu:$.quad[t]/18};for(var r in $)$.hasOwnProperty(r)&&(i[r]=$[r][t])}return re[t]}var ae=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],oe=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],se=function(e,t){return t.size<2?e:ae[e-1][t.size-1]},le=function(){function e(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=oe[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}var t=e.prototype;return t.extend=function(t){var i={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);return new e(i)},t.havingStyle=function(e){return this.style===e?this:this.extend({style:e,size:se(this.textSize,e)})},t.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},t.havingSize=function(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:oe[e-1]})},t.havingBaseStyle=function(t){t=t||this.style.text();var i=se(e.BASESIZE,t);return this.size===i&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:i})},t.havingBaseSizing=function(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})},t.withColor=function(e){return this.extend({color:e})},t.withPhantom=function(){return this.extend({phantom:!0})},t.withFont=function(e){return this.extend({font:e})},t.withTextFontFamily=function(e){return this.extend({fontFamily:e,font:""})},t.withTextFontWeight=function(e){return this.extend({fontWeight:e,font:""})},t.withTextFontShape=function(e){return this.extend({fontShape:e,font:""})},t.sizingClasses=function(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]},t.baseSizingClasses=function(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]},t.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=ne(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();le.BASESIZE=6;var ue=le,ce={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},he={ex:!0,em:!0,mu:!0},de=function(e){return"string"!==typeof e&&(e=e.unit),e in ce||e in he||"ex"===e},pe=function(e,t){var i;if(e.unit in ce)i=ce[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new r("Invalid unit: '"+e.unit+"'");i=n.fontMetrics().quad}n!==t&&(i*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},me=function(e){return+e.toFixed(4)+"em"},fe=function(e){return e.filter((function(e){return e})).join(" ")},ge=function(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},ve=function(e){var t=document.createElement(e);for(var i in t.className=fe(this.classes),this.style)this.style.hasOwnProperty(i)&&(t.style[i]=this.style[i]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var n=0;n",t},be=function(){function e(e,t,i,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ge.call(this,e,i,r),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return f.contains(this.classes,e)},t.toNode=function(){return ve.call(this,"span")},t.toMarkup=function(){return ye.call(this,"span")},e}(),we=function(){function e(e,t,i,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ge.call(this,t,r),this.children=i||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return f.contains(this.classes,e)},t.toNode=function(){return ve.call(this,"a")},t.toMarkup=function(){return ye.call(this,"a")},e}(),xe=function(){function e(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=i}var t=e.prototype;return t.hasClass=function(e){return f.contains(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e=""+this.alt+"0&&(t=document.createElement("span"),t.style.marginRight=me(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=fe(this.classes)),this.style)this.style.hasOwnProperty(i)&&(t=t||document.createElement("span"),t.style[i]=this.style[i]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="0&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(i+=f.hyphenate(r)+":"+this.style[r]+";");i&&(e=!0,t+=' style="'+f.escape(i)+'"');var n=f.escape(this.text);return e?(t+=">",t+=n,t+="",t):n},e}(),Se=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var i in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,i)&&t.setAttribute(i,this.attributes[i]);for(var r=0;r":""},e}(),Ne=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var i in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,i)&&t.setAttribute(i,this.attributes[i]);return t},t.toMarkup=function(){var e=" but got "+String(e)+".")}var Ce={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ee={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},_e={math:{},text:{}},Te=_e;function Be(e,t,i,r,n,a){_e[e][n]={font:t,group:i,replace:r},a&&r&&(_e[e][r]=_e[e][n])}var Ie="math",qe="text",De="main",Oe="ams",Re="accent-token",Fe="bin",Pe="close",Ve="inner",Ue="mathord",Ke="op-token",He="open",Ge="punct",je="rel",Qe="spacing",We="textord";Be(Ie,De,je,"≡","\\equiv",!0),Be(Ie,De,je,"≺","\\prec",!0),Be(Ie,De,je,"≻","\\succ",!0),Be(Ie,De,je,"∼","\\sim",!0),Be(Ie,De,je,"⊥","\\perp"),Be(Ie,De,je,"⪯","\\preceq",!0),Be(Ie,De,je,"⪰","\\succeq",!0),Be(Ie,De,je,"≃","\\simeq",!0),Be(Ie,De,je,"∣","\\mid",!0),Be(Ie,De,je,"≪","\\ll",!0),Be(Ie,De,je,"≫","\\gg",!0),Be(Ie,De,je,"≍","\\asymp",!0),Be(Ie,De,je,"∥","\\parallel"),Be(Ie,De,je,"⋈","\\bowtie",!0),Be(Ie,De,je,"⌣","\\smile",!0),Be(Ie,De,je,"⊑","\\sqsubseteq",!0),Be(Ie,De,je,"⊒","\\sqsupseteq",!0),Be(Ie,De,je,"≐","\\doteq",!0),Be(Ie,De,je,"⌢","\\frown",!0),Be(Ie,De,je,"∋","\\ni",!0),Be(Ie,De,je,"∝","\\propto",!0),Be(Ie,De,je,"⊢","\\vdash",!0),Be(Ie,De,je,"⊣","\\dashv",!0),Be(Ie,De,je,"∋","\\owns"),Be(Ie,De,Ge,".","\\ldotp"),Be(Ie,De,Ge,"⋅","\\cdotp"),Be(Ie,De,We,"#","\\#"),Be(qe,De,We,"#","\\#"),Be(Ie,De,We,"&","\\&"),Be(qe,De,We,"&","\\&"),Be(Ie,De,We,"ℵ","\\aleph",!0),Be(Ie,De,We,"∀","\\forall",!0),Be(Ie,De,We,"ℏ","\\hbar",!0),Be(Ie,De,We,"∃","\\exists",!0),Be(Ie,De,We,"∇","\\nabla",!0),Be(Ie,De,We,"♭","\\flat",!0),Be(Ie,De,We,"ℓ","\\ell",!0),Be(Ie,De,We,"♮","\\natural",!0),Be(Ie,De,We,"♣","\\clubsuit",!0),Be(Ie,De,We,"℘","\\wp",!0),Be(Ie,De,We,"♯","\\sharp",!0),Be(Ie,De,We,"♢","\\diamondsuit",!0),Be(Ie,De,We,"ℜ","\\Re",!0),Be(Ie,De,We,"♡","\\heartsuit",!0),Be(Ie,De,We,"ℑ","\\Im",!0),Be(Ie,De,We,"♠","\\spadesuit",!0),Be(Ie,De,We,"§","\\S",!0),Be(qe,De,We,"§","\\S"),Be(Ie,De,We,"¶","\\P",!0),Be(qe,De,We,"¶","\\P"),Be(Ie,De,We,"†","\\dag"),Be(qe,De,We,"†","\\dag"),Be(qe,De,We,"†","\\textdagger"),Be(Ie,De,We,"‡","\\ddag"),Be(qe,De,We,"‡","\\ddag"),Be(qe,De,We,"‡","\\textdaggerdbl"),Be(Ie,De,Pe,"⎱","\\rmoustache",!0),Be(Ie,De,He,"⎰","\\lmoustache",!0),Be(Ie,De,Pe,"⟯","\\rgroup",!0),Be(Ie,De,He,"⟮","\\lgroup",!0),Be(Ie,De,Fe,"∓","\\mp",!0),Be(Ie,De,Fe,"⊖","\\ominus",!0),Be(Ie,De,Fe,"⊎","\\uplus",!0),Be(Ie,De,Fe,"⊓","\\sqcap",!0),Be(Ie,De,Fe,"∗","\\ast"),Be(Ie,De,Fe,"⊔","\\sqcup",!0),Be(Ie,De,Fe,"◯","\\bigcirc",!0),Be(Ie,De,Fe,"∙","\\bullet",!0),Be(Ie,De,Fe,"‡","\\ddagger"),Be(Ie,De,Fe,"≀","\\wr",!0),Be(Ie,De,Fe,"⨿","\\amalg"),Be(Ie,De,Fe,"&","\\And"),Be(Ie,De,je,"⟵","\\longleftarrow",!0),Be(Ie,De,je,"⇐","\\Leftarrow",!0),Be(Ie,De,je,"⟸","\\Longleftarrow",!0),Be(Ie,De,je,"⟶","\\longrightarrow",!0),Be(Ie,De,je,"⇒","\\Rightarrow",!0),Be(Ie,De,je,"⟹","\\Longrightarrow",!0),Be(Ie,De,je,"↔","\\leftrightarrow",!0),Be(Ie,De,je,"⟷","\\longleftrightarrow",!0),Be(Ie,De,je,"⇔","\\Leftrightarrow",!0),Be(Ie,De,je,"⟺","\\Longleftrightarrow",!0),Be(Ie,De,je,"↦","\\mapsto",!0),Be(Ie,De,je,"⟼","\\longmapsto",!0),Be(Ie,De,je,"↗","\\nearrow",!0),Be(Ie,De,je,"↩","\\hookleftarrow",!0),Be(Ie,De,je,"↪","\\hookrightarrow",!0),Be(Ie,De,je,"↘","\\searrow",!0),Be(Ie,De,je,"↼","\\leftharpoonup",!0),Be(Ie,De,je,"⇀","\\rightharpoonup",!0),Be(Ie,De,je,"↙","\\swarrow",!0),Be(Ie,De,je,"↽","\\leftharpoondown",!0),Be(Ie,De,je,"⇁","\\rightharpoondown",!0),Be(Ie,De,je,"↖","\\nwarrow",!0),Be(Ie,De,je,"⇌","\\rightleftharpoons",!0),Be(Ie,Oe,je,"≮","\\nless",!0),Be(Ie,Oe,je,"","\\@nleqslant"),Be(Ie,Oe,je,"","\\@nleqq"),Be(Ie,Oe,je,"⪇","\\lneq",!0),Be(Ie,Oe,je,"≨","\\lneqq",!0),Be(Ie,Oe,je,"","\\@lvertneqq"),Be(Ie,Oe,je,"⋦","\\lnsim",!0),Be(Ie,Oe,je,"⪉","\\lnapprox",!0),Be(Ie,Oe,je,"⊀","\\nprec",!0),Be(Ie,Oe,je,"⋠","\\npreceq",!0),Be(Ie,Oe,je,"⋨","\\precnsim",!0),Be(Ie,Oe,je,"⪹","\\precnapprox",!0),Be(Ie,Oe,je,"≁","\\nsim",!0),Be(Ie,Oe,je,"","\\@nshortmid"),Be(Ie,Oe,je,"∤","\\nmid",!0),Be(Ie,Oe,je,"⊬","\\nvdash",!0),Be(Ie,Oe,je,"⊭","\\nvDash",!0),Be(Ie,Oe,je,"⋪","\\ntriangleleft"),Be(Ie,Oe,je,"⋬","\\ntrianglelefteq",!0),Be(Ie,Oe,je,"⊊","\\subsetneq",!0),Be(Ie,Oe,je,"","\\@varsubsetneq"),Be(Ie,Oe,je,"⫋","\\subsetneqq",!0),Be(Ie,Oe,je,"","\\@varsubsetneqq"),Be(Ie,Oe,je,"≯","\\ngtr",!0),Be(Ie,Oe,je,"","\\@ngeqslant"),Be(Ie,Oe,je,"","\\@ngeqq"),Be(Ie,Oe,je,"⪈","\\gneq",!0),Be(Ie,Oe,je,"≩","\\gneqq",!0),Be(Ie,Oe,je,"","\\@gvertneqq"),Be(Ie,Oe,je,"⋧","\\gnsim",!0),Be(Ie,Oe,je,"⪊","\\gnapprox",!0),Be(Ie,Oe,je,"⊁","\\nsucc",!0),Be(Ie,Oe,je,"⋡","\\nsucceq",!0),Be(Ie,Oe,je,"⋩","\\succnsim",!0),Be(Ie,Oe,je,"⪺","\\succnapprox",!0),Be(Ie,Oe,je,"≆","\\ncong",!0),Be(Ie,Oe,je,"","\\@nshortparallel"),Be(Ie,Oe,je,"∦","\\nparallel",!0),Be(Ie,Oe,je,"⊯","\\nVDash",!0),Be(Ie,Oe,je,"⋫","\\ntriangleright"),Be(Ie,Oe,je,"⋭","\\ntrianglerighteq",!0),Be(Ie,Oe,je,"","\\@nsupseteqq"),Be(Ie,Oe,je,"⊋","\\supsetneq",!0),Be(Ie,Oe,je,"","\\@varsupsetneq"),Be(Ie,Oe,je,"⫌","\\supsetneqq",!0),Be(Ie,Oe,je,"","\\@varsupsetneqq"),Be(Ie,Oe,je,"⊮","\\nVdash",!0),Be(Ie,Oe,je,"⪵","\\precneqq",!0),Be(Ie,Oe,je,"⪶","\\succneqq",!0),Be(Ie,Oe,je,"","\\@nsubseteqq"),Be(Ie,Oe,Fe,"⊴","\\unlhd"),Be(Ie,Oe,Fe,"⊵","\\unrhd"),Be(Ie,Oe,je,"↚","\\nleftarrow",!0),Be(Ie,Oe,je,"↛","\\nrightarrow",!0),Be(Ie,Oe,je,"⇍","\\nLeftarrow",!0),Be(Ie,Oe,je,"⇏","\\nRightarrow",!0),Be(Ie,Oe,je,"↮","\\nleftrightarrow",!0),Be(Ie,Oe,je,"⇎","\\nLeftrightarrow",!0),Be(Ie,Oe,je,"△","\\vartriangle"),Be(Ie,Oe,We,"ℏ","\\hslash"),Be(Ie,Oe,We,"▽","\\triangledown"),Be(Ie,Oe,We,"◊","\\lozenge"),Be(Ie,Oe,We,"Ⓢ","\\circledS"),Be(Ie,Oe,We,"®","\\circledR"),Be(qe,Oe,We,"®","\\circledR"),Be(Ie,Oe,We,"∡","\\measuredangle",!0),Be(Ie,Oe,We,"∄","\\nexists"),Be(Ie,Oe,We,"℧","\\mho"),Be(Ie,Oe,We,"Ⅎ","\\Finv",!0),Be(Ie,Oe,We,"⅁","\\Game",!0),Be(Ie,Oe,We,"‵","\\backprime"),Be(Ie,Oe,We,"▲","\\blacktriangle"),Be(Ie,Oe,We,"▼","\\blacktriangledown"),Be(Ie,Oe,We,"■","\\blacksquare"),Be(Ie,Oe,We,"⧫","\\blacklozenge"),Be(Ie,Oe,We,"★","\\bigstar"),Be(Ie,Oe,We,"∢","\\sphericalangle",!0),Be(Ie,Oe,We,"∁","\\complement",!0),Be(Ie,Oe,We,"ð","\\eth",!0),Be(qe,De,We,"ð","ð"),Be(Ie,Oe,We,"╱","\\diagup"),Be(Ie,Oe,We,"╲","\\diagdown"),Be(Ie,Oe,We,"□","\\square"),Be(Ie,Oe,We,"□","\\Box"),Be(Ie,Oe,We,"◊","\\Diamond"),Be(Ie,Oe,We,"¥","\\yen",!0),Be(qe,Oe,We,"¥","\\yen",!0),Be(Ie,Oe,We,"✓","\\checkmark",!0),Be(qe,Oe,We,"✓","\\checkmark"),Be(Ie,Oe,We,"ℶ","\\beth",!0),Be(Ie,Oe,We,"ℸ","\\daleth",!0),Be(Ie,Oe,We,"ℷ","\\gimel",!0),Be(Ie,Oe,We,"ϝ","\\digamma",!0),Be(Ie,Oe,We,"ϰ","\\varkappa"),Be(Ie,Oe,He,"┌","\\@ulcorner",!0),Be(Ie,Oe,Pe,"┐","\\@urcorner",!0),Be(Ie,Oe,He,"└","\\@llcorner",!0),Be(Ie,Oe,Pe,"┘","\\@lrcorner",!0),Be(Ie,Oe,je,"≦","\\leqq",!0),Be(Ie,Oe,je,"⩽","\\leqslant",!0),Be(Ie,Oe,je,"⪕","\\eqslantless",!0),Be(Ie,Oe,je,"≲","\\lesssim",!0),Be(Ie,Oe,je,"⪅","\\lessapprox",!0),Be(Ie,Oe,je,"≊","\\approxeq",!0),Be(Ie,Oe,Fe,"⋖","\\lessdot"),Be(Ie,Oe,je,"⋘","\\lll",!0),Be(Ie,Oe,je,"≶","\\lessgtr",!0),Be(Ie,Oe,je,"⋚","\\lesseqgtr",!0),Be(Ie,Oe,je,"⪋","\\lesseqqgtr",!0),Be(Ie,Oe,je,"≑","\\doteqdot"),Be(Ie,Oe,je,"≓","\\risingdotseq",!0),Be(Ie,Oe,je,"≒","\\fallingdotseq",!0),Be(Ie,Oe,je,"∽","\\backsim",!0),Be(Ie,Oe,je,"⋍","\\backsimeq",!0),Be(Ie,Oe,je,"⫅","\\subseteqq",!0),Be(Ie,Oe,je,"⋐","\\Subset",!0),Be(Ie,Oe,je,"⊏","\\sqsubset",!0),Be(Ie,Oe,je,"≼","\\preccurlyeq",!0),Be(Ie,Oe,je,"⋞","\\curlyeqprec",!0),Be(Ie,Oe,je,"≾","\\precsim",!0),Be(Ie,Oe,je,"⪷","\\precapprox",!0),Be(Ie,Oe,je,"⊲","\\vartriangleleft"),Be(Ie,Oe,je,"⊴","\\trianglelefteq"),Be(Ie,Oe,je,"⊨","\\vDash",!0),Be(Ie,Oe,je,"⊪","\\Vvdash",!0),Be(Ie,Oe,je,"⌣","\\smallsmile"),Be(Ie,Oe,je,"⌢","\\smallfrown"),Be(Ie,Oe,je,"≏","\\bumpeq",!0),Be(Ie,Oe,je,"≎","\\Bumpeq",!0),Be(Ie,Oe,je,"≧","\\geqq",!0),Be(Ie,Oe,je,"⩾","\\geqslant",!0),Be(Ie,Oe,je,"⪖","\\eqslantgtr",!0),Be(Ie,Oe,je,"≳","\\gtrsim",!0),Be(Ie,Oe,je,"⪆","\\gtrapprox",!0),Be(Ie,Oe,Fe,"⋗","\\gtrdot"),Be(Ie,Oe,je,"⋙","\\ggg",!0),Be(Ie,Oe,je,"≷","\\gtrless",!0),Be(Ie,Oe,je,"⋛","\\gtreqless",!0),Be(Ie,Oe,je,"⪌","\\gtreqqless",!0),Be(Ie,Oe,je,"≖","\\eqcirc",!0),Be(Ie,Oe,je,"≗","\\circeq",!0),Be(Ie,Oe,je,"≜","\\triangleq",!0),Be(Ie,Oe,je,"∼","\\thicksim"),Be(Ie,Oe,je,"≈","\\thickapprox"),Be(Ie,Oe,je,"⫆","\\supseteqq",!0),Be(Ie,Oe,je,"⋑","\\Supset",!0),Be(Ie,Oe,je,"⊐","\\sqsupset",!0),Be(Ie,Oe,je,"≽","\\succcurlyeq",!0),Be(Ie,Oe,je,"⋟","\\curlyeqsucc",!0),Be(Ie,Oe,je,"≿","\\succsim",!0),Be(Ie,Oe,je,"⪸","\\succapprox",!0),Be(Ie,Oe,je,"⊳","\\vartriangleright"),Be(Ie,Oe,je,"⊵","\\trianglerighteq"),Be(Ie,Oe,je,"⊩","\\Vdash",!0),Be(Ie,Oe,je,"∣","\\shortmid"),Be(Ie,Oe,je,"∥","\\shortparallel"),Be(Ie,Oe,je,"≬","\\between",!0),Be(Ie,Oe,je,"⋔","\\pitchfork",!0),Be(Ie,Oe,je,"∝","\\varpropto"),Be(Ie,Oe,je,"◀","\\blacktriangleleft"),Be(Ie,Oe,je,"∴","\\therefore",!0),Be(Ie,Oe,je,"∍","\\backepsilon"),Be(Ie,Oe,je,"▶","\\blacktriangleright"),Be(Ie,Oe,je,"∵","\\because",!0),Be(Ie,Oe,je,"⋘","\\llless"),Be(Ie,Oe,je,"⋙","\\gggtr"),Be(Ie,Oe,Fe,"⊲","\\lhd"),Be(Ie,Oe,Fe,"⊳","\\rhd"),Be(Ie,Oe,je,"≂","\\eqsim",!0),Be(Ie,De,je,"⋈","\\Join"),Be(Ie,Oe,je,"≑","\\Doteq",!0),Be(Ie,Oe,Fe,"∔","\\dotplus",!0),Be(Ie,Oe,Fe,"∖","\\smallsetminus"),Be(Ie,Oe,Fe,"⋒","\\Cap",!0),Be(Ie,Oe,Fe,"⋓","\\Cup",!0),Be(Ie,Oe,Fe,"⩞","\\doublebarwedge",!0),Be(Ie,Oe,Fe,"⊟","\\boxminus",!0),Be(Ie,Oe,Fe,"⊞","\\boxplus",!0),Be(Ie,Oe,Fe,"⋇","\\divideontimes",!0),Be(Ie,Oe,Fe,"⋉","\\ltimes",!0),Be(Ie,Oe,Fe,"⋊","\\rtimes",!0),Be(Ie,Oe,Fe,"⋋","\\leftthreetimes",!0),Be(Ie,Oe,Fe,"⋌","\\rightthreetimes",!0),Be(Ie,Oe,Fe,"⋏","\\curlywedge",!0),Be(Ie,Oe,Fe,"⋎","\\curlyvee",!0),Be(Ie,Oe,Fe,"⊝","\\circleddash",!0),Be(Ie,Oe,Fe,"⊛","\\circledast",!0),Be(Ie,Oe,Fe,"⋅","\\centerdot"),Be(Ie,Oe,Fe,"⊺","\\intercal",!0),Be(Ie,Oe,Fe,"⋒","\\doublecap"),Be(Ie,Oe,Fe,"⋓","\\doublecup"),Be(Ie,Oe,Fe,"⊠","\\boxtimes",!0),Be(Ie,Oe,je,"⇢","\\dashrightarrow",!0),Be(Ie,Oe,je,"⇠","\\dashleftarrow",!0),Be(Ie,Oe,je,"⇇","\\leftleftarrows",!0),Be(Ie,Oe,je,"⇆","\\leftrightarrows",!0),Be(Ie,Oe,je,"⇚","\\Lleftarrow",!0),Be(Ie,Oe,je,"↞","\\twoheadleftarrow",!0),Be(Ie,Oe,je,"↢","\\leftarrowtail",!0),Be(Ie,Oe,je,"↫","\\looparrowleft",!0),Be(Ie,Oe,je,"⇋","\\leftrightharpoons",!0),Be(Ie,Oe,je,"↶","\\curvearrowleft",!0),Be(Ie,Oe,je,"↺","\\circlearrowleft",!0),Be(Ie,Oe,je,"↰","\\Lsh",!0),Be(Ie,Oe,je,"⇈","\\upuparrows",!0),Be(Ie,Oe,je,"↿","\\upharpoonleft",!0),Be(Ie,Oe,je,"⇃","\\downharpoonleft",!0),Be(Ie,De,je,"⊶","\\origof",!0),Be(Ie,De,je,"⊷","\\imageof",!0),Be(Ie,Oe,je,"⊸","\\multimap",!0),Be(Ie,Oe,je,"↭","\\leftrightsquigarrow",!0),Be(Ie,Oe,je,"⇉","\\rightrightarrows",!0),Be(Ie,Oe,je,"⇄","\\rightleftarrows",!0),Be(Ie,Oe,je,"↠","\\twoheadrightarrow",!0),Be(Ie,Oe,je,"↣","\\rightarrowtail",!0),Be(Ie,Oe,je,"↬","\\looparrowright",!0),Be(Ie,Oe,je,"↷","\\curvearrowright",!0),Be(Ie,Oe,je,"↻","\\circlearrowright",!0),Be(Ie,Oe,je,"↱","\\Rsh",!0),Be(Ie,Oe,je,"⇊","\\downdownarrows",!0),Be(Ie,Oe,je,"↾","\\upharpoonright",!0),Be(Ie,Oe,je,"⇂","\\downharpoonright",!0),Be(Ie,Oe,je,"⇝","\\rightsquigarrow",!0),Be(Ie,Oe,je,"⇝","\\leadsto"),Be(Ie,Oe,je,"⇛","\\Rrightarrow",!0),Be(Ie,Oe,je,"↾","\\restriction"),Be(Ie,De,We,"‘","`"),Be(Ie,De,We,"$","\\$"),Be(qe,De,We,"$","\\$"),Be(qe,De,We,"$","\\textdollar"),Be(Ie,De,We,"%","\\%"),Be(qe,De,We,"%","\\%"),Be(Ie,De,We,"_","\\_"),Be(qe,De,We,"_","\\_"),Be(qe,De,We,"_","\\textunderscore"),Be(Ie,De,We,"∠","\\angle",!0),Be(Ie,De,We,"∞","\\infty",!0),Be(Ie,De,We,"′","\\prime"),Be(Ie,De,We,"△","\\triangle"),Be(Ie,De,We,"Γ","\\Gamma",!0),Be(Ie,De,We,"Δ","\\Delta",!0),Be(Ie,De,We,"Θ","\\Theta",!0),Be(Ie,De,We,"Λ","\\Lambda",!0),Be(Ie,De,We,"Ξ","\\Xi",!0),Be(Ie,De,We,"Π","\\Pi",!0),Be(Ie,De,We,"Σ","\\Sigma",!0),Be(Ie,De,We,"Υ","\\Upsilon",!0),Be(Ie,De,We,"Φ","\\Phi",!0),Be(Ie,De,We,"Ψ","\\Psi",!0),Be(Ie,De,We,"Ω","\\Omega",!0),Be(Ie,De,We,"A","Α"),Be(Ie,De,We,"B","Β"),Be(Ie,De,We,"E","Ε"),Be(Ie,De,We,"Z","Ζ"),Be(Ie,De,We,"H","Η"),Be(Ie,De,We,"I","Ι"),Be(Ie,De,We,"K","Κ"),Be(Ie,De,We,"M","Μ"),Be(Ie,De,We,"N","Ν"),Be(Ie,De,We,"O","Ο"),Be(Ie,De,We,"P","Ρ"),Be(Ie,De,We,"T","Τ"),Be(Ie,De,We,"X","Χ"),Be(Ie,De,We,"¬","\\neg",!0),Be(Ie,De,We,"¬","\\lnot"),Be(Ie,De,We,"⊤","\\top"),Be(Ie,De,We,"⊥","\\bot"),Be(Ie,De,We,"∅","\\emptyset"),Be(Ie,Oe,We,"∅","\\varnothing"),Be(Ie,De,Ue,"α","\\alpha",!0),Be(Ie,De,Ue,"β","\\beta",!0),Be(Ie,De,Ue,"γ","\\gamma",!0),Be(Ie,De,Ue,"δ","\\delta",!0),Be(Ie,De,Ue,"ϵ","\\epsilon",!0),Be(Ie,De,Ue,"ζ","\\zeta",!0),Be(Ie,De,Ue,"η","\\eta",!0),Be(Ie,De,Ue,"θ","\\theta",!0),Be(Ie,De,Ue,"ι","\\iota",!0),Be(Ie,De,Ue,"κ","\\kappa",!0),Be(Ie,De,Ue,"λ","\\lambda",!0),Be(Ie,De,Ue,"μ","\\mu",!0),Be(Ie,De,Ue,"ν","\\nu",!0),Be(Ie,De,Ue,"ξ","\\xi",!0),Be(Ie,De,Ue,"ο","\\omicron",!0),Be(Ie,De,Ue,"π","\\pi",!0),Be(Ie,De,Ue,"ρ","\\rho",!0),Be(Ie,De,Ue,"σ","\\sigma",!0),Be(Ie,De,Ue,"τ","\\tau",!0),Be(Ie,De,Ue,"υ","\\upsilon",!0),Be(Ie,De,Ue,"ϕ","\\phi",!0),Be(Ie,De,Ue,"χ","\\chi",!0),Be(Ie,De,Ue,"ψ","\\psi",!0),Be(Ie,De,Ue,"ω","\\omega",!0),Be(Ie,De,Ue,"ε","\\varepsilon",!0),Be(Ie,De,Ue,"ϑ","\\vartheta",!0),Be(Ie,De,Ue,"ϖ","\\varpi",!0),Be(Ie,De,Ue,"ϱ","\\varrho",!0),Be(Ie,De,Ue,"ς","\\varsigma",!0),Be(Ie,De,Ue,"φ","\\varphi",!0),Be(Ie,De,Fe,"∗","*",!0),Be(Ie,De,Fe,"+","+"),Be(Ie,De,Fe,"−","-",!0),Be(Ie,De,Fe,"⋅","\\cdot",!0),Be(Ie,De,Fe,"∘","\\circ",!0),Be(Ie,De,Fe,"÷","\\div",!0),Be(Ie,De,Fe,"±","\\pm",!0),Be(Ie,De,Fe,"×","\\times",!0),Be(Ie,De,Fe,"∩","\\cap",!0),Be(Ie,De,Fe,"∪","\\cup",!0),Be(Ie,De,Fe,"∖","\\setminus",!0),Be(Ie,De,Fe,"∧","\\land"),Be(Ie,De,Fe,"∨","\\lor"),Be(Ie,De,Fe,"∧","\\wedge",!0),Be(Ie,De,Fe,"∨","\\vee",!0),Be(Ie,De,We,"√","\\surd"),Be(Ie,De,He,"⟨","\\langle",!0),Be(Ie,De,He,"∣","\\lvert"),Be(Ie,De,He,"∥","\\lVert"),Be(Ie,De,Pe,"?","?"),Be(Ie,De,Pe,"!","!"),Be(Ie,De,Pe,"⟩","\\rangle",!0),Be(Ie,De,Pe,"∣","\\rvert"),Be(Ie,De,Pe,"∥","\\rVert"),Be(Ie,De,je,"=","="),Be(Ie,De,je,":",":"),Be(Ie,De,je,"≈","\\approx",!0),Be(Ie,De,je,"≅","\\cong",!0),Be(Ie,De,je,"≥","\\ge"),Be(Ie,De,je,"≥","\\geq",!0),Be(Ie,De,je,"←","\\gets"),Be(Ie,De,je,">","\\gt",!0),Be(Ie,De,je,"∈","\\in",!0),Be(Ie,De,je,"","\\@not"),Be(Ie,De,je,"⊂","\\subset",!0),Be(Ie,De,je,"⊃","\\supset",!0),Be(Ie,De,je,"⊆","\\subseteq",!0),Be(Ie,De,je,"⊇","\\supseteq",!0),Be(Ie,Oe,je,"⊈","\\nsubseteq",!0),Be(Ie,Oe,je,"⊉","\\nsupseteq",!0),Be(Ie,De,je,"⊨","\\models"),Be(Ie,De,je,"←","\\leftarrow",!0),Be(Ie,De,je,"≤","\\le"),Be(Ie,De,je,"≤","\\leq",!0),Be(Ie,De,je,"<","\\lt",!0),Be(Ie,De,je,"→","\\rightarrow",!0),Be(Ie,De,je,"→","\\to"),Be(Ie,Oe,je,"≱","\\ngeq",!0),Be(Ie,Oe,je,"≰","\\nleq",!0),Be(Ie,De,Qe," ","\\ "),Be(Ie,De,Qe," ","\\space"),Be(Ie,De,Qe," ","\\nobreakspace"),Be(qe,De,Qe," ","\\ "),Be(qe,De,Qe," "," "),Be(qe,De,Qe," ","\\space"),Be(qe,De,Qe," ","\\nobreakspace"),Be(Ie,De,Qe,null,"\\nobreak"),Be(Ie,De,Qe,null,"\\allowbreak"),Be(Ie,De,Ge,",",","),Be(Ie,De,Ge,";",";"),Be(Ie,Oe,Fe,"⊼","\\barwedge",!0),Be(Ie,Oe,Fe,"⊻","\\veebar",!0),Be(Ie,De,Fe,"⊙","\\odot",!0),Be(Ie,De,Fe,"⊕","\\oplus",!0),Be(Ie,De,Fe,"⊗","\\otimes",!0),Be(Ie,De,We,"∂","\\partial",!0),Be(Ie,De,Fe,"⊘","\\oslash",!0),Be(Ie,Oe,Fe,"⊚","\\circledcirc",!0),Be(Ie,Oe,Fe,"⊡","\\boxdot",!0),Be(Ie,De,Fe,"△","\\bigtriangleup"),Be(Ie,De,Fe,"▽","\\bigtriangledown"),Be(Ie,De,Fe,"†","\\dagger"),Be(Ie,De,Fe,"⋄","\\diamond"),Be(Ie,De,Fe,"⋆","\\star"),Be(Ie,De,Fe,"◃","\\triangleleft"),Be(Ie,De,Fe,"▹","\\triangleright"),Be(Ie,De,He,"{","\\{"),Be(qe,De,We,"{","\\{"),Be(qe,De,We,"{","\\textbraceleft"),Be(Ie,De,Pe,"}","\\}"),Be(qe,De,We,"}","\\}"),Be(qe,De,We,"}","\\textbraceright"),Be(Ie,De,He,"{","\\lbrace"),Be(Ie,De,Pe,"}","\\rbrace"),Be(Ie,De,He,"[","\\lbrack",!0),Be(qe,De,We,"[","\\lbrack",!0),Be(Ie,De,Pe,"]","\\rbrack",!0),Be(qe,De,We,"]","\\rbrack",!0),Be(Ie,De,He,"(","\\lparen",!0),Be(Ie,De,Pe,")","\\rparen",!0),Be(qe,De,We,"<","\\textless",!0),Be(qe,De,We,">","\\textgreater",!0),Be(Ie,De,He,"⌊","\\lfloor",!0),Be(Ie,De,Pe,"⌋","\\rfloor",!0),Be(Ie,De,He,"⌈","\\lceil",!0),Be(Ie,De,Pe,"⌉","\\rceil",!0),Be(Ie,De,We,"\\","\\backslash"),Be(Ie,De,We,"∣","|"),Be(Ie,De,We,"∣","\\vert"),Be(qe,De,We,"|","\\textbar",!0),Be(Ie,De,We,"∥","\\|"),Be(Ie,De,We,"∥","\\Vert"),Be(qe,De,We,"∥","\\textbardbl"),Be(qe,De,We,"~","\\textasciitilde"),Be(qe,De,We,"\\","\\textbackslash"),Be(qe,De,We,"^","\\textasciicircum"),Be(Ie,De,je,"↑","\\uparrow",!0),Be(Ie,De,je,"⇑","\\Uparrow",!0),Be(Ie,De,je,"↓","\\downarrow",!0),Be(Ie,De,je,"⇓","\\Downarrow",!0),Be(Ie,De,je,"↕","\\updownarrow",!0),Be(Ie,De,je,"⇕","\\Updownarrow",!0),Be(Ie,De,Ke,"∐","\\coprod"),Be(Ie,De,Ke,"⋁","\\bigvee"),Be(Ie,De,Ke,"⋀","\\bigwedge"),Be(Ie,De,Ke,"⨄","\\biguplus"),Be(Ie,De,Ke,"⋂","\\bigcap"),Be(Ie,De,Ke,"⋃","\\bigcup"),Be(Ie,De,Ke,"∫","\\int"),Be(Ie,De,Ke,"∫","\\intop"),Be(Ie,De,Ke,"∬","\\iint"),Be(Ie,De,Ke,"∭","\\iiint"),Be(Ie,De,Ke,"∏","\\prod"),Be(Ie,De,Ke,"∑","\\sum"),Be(Ie,De,Ke,"⨂","\\bigotimes"),Be(Ie,De,Ke,"⨁","\\bigoplus"),Be(Ie,De,Ke,"⨀","\\bigodot"),Be(Ie,De,Ke,"∮","\\oint"),Be(Ie,De,Ke,"∯","\\oiint"),Be(Ie,De,Ke,"∰","\\oiiint"),Be(Ie,De,Ke,"⨆","\\bigsqcup"),Be(Ie,De,Ke,"∫","\\smallint"),Be(qe,De,Ve,"…","\\textellipsis"),Be(Ie,De,Ve,"…","\\mathellipsis"),Be(qe,De,Ve,"…","\\ldots",!0),Be(Ie,De,Ve,"…","\\ldots",!0),Be(Ie,De,Ve,"⋯","\\@cdots",!0),Be(Ie,De,Ve,"⋱","\\ddots",!0),Be(Ie,De,We,"⋮","\\varvdots"),Be(Ie,De,Re,"ˊ","\\acute"),Be(Ie,De,Re,"ˋ","\\grave"),Be(Ie,De,Re,"¨","\\ddot"),Be(Ie,De,Re,"~","\\tilde"),Be(Ie,De,Re,"ˉ","\\bar"),Be(Ie,De,Re,"˘","\\breve"),Be(Ie,De,Re,"ˇ","\\check"),Be(Ie,De,Re,"^","\\hat"),Be(Ie,De,Re,"⃗","\\vec"),Be(Ie,De,Re,"˙","\\dot"),Be(Ie,De,Re,"˚","\\mathring"),Be(Ie,De,Ue,"","\\@imath"),Be(Ie,De,Ue,"","\\@jmath"),Be(Ie,De,We,"ı","ı"),Be(Ie,De,We,"ȷ","ȷ"),Be(qe,De,We,"ı","\\i",!0),Be(qe,De,We,"ȷ","\\j",!0),Be(qe,De,We,"ß","\\ss",!0),Be(qe,De,We,"æ","\\ae",!0),Be(qe,De,We,"œ","\\oe",!0),Be(qe,De,We,"ø","\\o",!0),Be(qe,De,We,"Æ","\\AE",!0),Be(qe,De,We,"Œ","\\OE",!0),Be(qe,De,We,"Ø","\\O",!0),Be(qe,De,Re,"ˊ","\\'"),Be(qe,De,Re,"ˋ","\\`"),Be(qe,De,Re,"ˆ","\\^"),Be(qe,De,Re,"˜","\\~"),Be(qe,De,Re,"ˉ","\\="),Be(qe,De,Re,"˘","\\u"),Be(qe,De,Re,"˙","\\."),Be(qe,De,Re,"¸","\\c"),Be(qe,De,Re,"˚","\\r"),Be(qe,De,Re,"ˇ","\\v"),Be(qe,De,Re,"¨",'\\"'),Be(qe,De,Re,"˝","\\H"),Be(qe,De,Re,"◯","\\textcircled");var Ze={"--":!0,"---":!0,"``":!0,"''":!0};Be(qe,De,We,"–","--",!0),Be(qe,De,We,"–","\\textendash"),Be(qe,De,We,"—","---",!0),Be(qe,De,We,"—","\\textemdash"),Be(qe,De,We,"‘","`",!0),Be(qe,De,We,"‘","\\textquoteleft"),Be(qe,De,We,"’","'",!0),Be(qe,De,We,"’","\\textquoteright"),Be(qe,De,We,"“","``",!0),Be(qe,De,We,"“","\\textquotedblleft"),Be(qe,De,We,"”","''",!0),Be(qe,De,We,"”","\\textquotedblright"),Be(Ie,De,We,"°","\\degree",!0),Be(qe,De,We,"°","\\degree"),Be(qe,De,We,"°","\\textdegree",!0),Be(Ie,De,We,"£","\\pounds"),Be(Ie,De,We,"£","\\mathsterling",!0),Be(qe,De,We,"£","\\pounds"),Be(qe,De,We,"£","\\textsterling",!0),Be(Ie,Oe,We,"✠","\\maltese"),Be(qe,Oe,We,"✠","\\maltese");for(var Ye='0123456789/@."',Xe=0;Xet&&(t=a.height),a.depth>i&&(i=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=r},St=function(e,t,i,r){var n=new be(e,t,i,r);return kt(n),n},Mt=function(e,t,i,r){return new be(e,t,i,r)},Nt=function(e,t,i){var r=St([e],[],t);return r.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=me(r.height),r.maxFontSize=1,r},zt=function(e,t,i,r){var n=new we(e,t,i,r);return kt(n),n},Lt=function(e){var t=new X(e);return kt(t),t},Ct=function(e,t){return e instanceof X?St([],[e],t):e},Et=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],r=-t[0].shift-t[0].elem.depth,n=r,a=1;a0&&(o.push(li(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(li(s,t)),i?(a=li(ti(i,t,!0)),a.classes=["tag"],o.push(a)):r&&o.push(r);var c=Yt(["katex-html"],o);if(c.setAttribute("aria-hidden","true"),a){var h=a.children[0];h.style.height=me(c.height+c.depth),c.depth&&(h.style.verticalAlign=me(-c.depth))}return c}function ci(e){return new X(e)}var hi=function(){function e(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=fe(this.classes));for(var i=0;i0&&(e+=' class ="'+f.escape(fe(this.classes))+'"'),e+=">";for(var i=0;i",e},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),di=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return f.escape(this.toText())},t.toText=function(){return this.text},e}(),pi=function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",me(this.width)),e},t.toMarkup=function(){return this.character?""+this.character+"":''},t.toText=function(){return this.character?this.character:" "},e}(),mi={MathNode:hi,TextNode:di,SpaceNode:pi,newDocumentFragment:ci},fi=function(e,t,i){return!Te[t][e]||!Te[t][e].replace||55349===e.charCodeAt(0)||Ze.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.substr(4,2)||i.font&&"tt"===i.font.substr(4,2))||(e=Te[t][e].replace),new mi.TextNode(e)},gi=function(e){return 1===e.length?e[0]:new mi.MathNode("mrow",e)},vi=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var i=t.font;if(!i||"mathnormal"===i)return null;var r=e.mode;if("mathit"===i)return"italic";if("boldsymbol"===i)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===i)return"bold";if("mathbb"===i)return"double-struck";if("mathfrak"===i)return"fraktur";if("mathscr"===i||"mathcal"===i)return"script";if("mathsf"===i)return"sans-serif";if("mathtt"===i)return"monospace";var n=e.text;if(f.contains(["\\imath","\\jmath"],n))return null;Te[r][n]&&Te[r][n].replace&&(n=Te[r][n].replace);var a=Ot.fontMap[i].fontName;return ie(n,a,r)?Ot.fontMap[i].variant:null},yi=function(e,t,i){if(1===e.length){var r=wi(e[0],t);return i&&r instanceof hi&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var n,a=[],o=0;o0&&(p.text=p.text.slice(0,1)+"̸"+p.text.slice(1),a.pop())}}}a.push(s),n=s}return a},bi=function(e,t,i){return gi(yi(e,t,i))},wi=function(e,t){if(!e)return new mi.MathNode("mrow");if(Gt[e.type]){var i=Gt[e.type](e,t);return i}throw new r("Got group of unknown type: '"+e.type+"'")};function xi(e,t,i,r,n){var a,o=yi(e,i);a=1===o.length&&o[0]instanceof hi&&f.contains(["mrow","mtable"],o[0].type)?o[0]:new mi.MathNode("mrow",o);var s=new mi.MathNode("annotation",[new mi.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new mi.MathNode("semantics",[a,s]),u=new mi.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var c=n?"katex":"katex-mathml";return Ot.makeSpan([c],[u])}var Ai=function(e){return new ue({style:e.displayMode?q.DISPLAY:q.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ki=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=Ot.makeSpan(i,[e])}return e},Si=function(e,t,i){var r,n=Ai(i);if("mathml"===i.output)return xi(e,t,n,i.displayMode,!0);if("html"===i.output){var a=ui(e,n);r=Ot.makeSpan(["katex"],[a])}else{var o=xi(e,t,n,i.displayMode,!1),s=ui(e,n);r=Ot.makeSpan(["katex"],[o,s])}return ki(r,i)},Mi=function(e,t,i){var r=Ai(i),n=ui(e,r),a=Ot.makeSpan(["katex"],[n]);return ki(a,i)},Ni={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},zi=function(e){var t=new mi.MathNode("mo",[new mi.TextNode(Ni[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Li={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Ci=function(e){return"ordgroup"===e.type?e.body.length:1},Ei=function(e,t){function i(){var i=4e5,r=e.label.substr(1);if(f.contains(["widehat","widecheck","widetilde","utilde"],r)){var n,a,o,s=e,l=Ci(s.base);if(l>5)"widehat"===r||"widecheck"===r?(n=420,i=2364,o=.42,a=r+"4"):(n=312,i=2340,o=.34,a="tilde4");else{var u=[1,1,2,2,3,3][l];"widehat"===r||"widecheck"===r?(i=[0,1062,2364,2364,2364][u],n=[0,239,300,360,420][u],o=[0,.24,.3,.3,.36,.42][u],a=r+u):(i=[0,600,1033,2339,2340][u],n=[0,260,286,306,312][u],o=[0,.26,.286,.3,.306,.34][u],a="tilde"+u)}var c=new Me(a),h=new Se([c],{width:"100%",height:me(o),viewBox:"0 0 "+i+" "+n,preserveAspectRatio:"none"});return{span:Ot.makeSvgSpan([],[h],t),minWidth:0,height:o}}var d,p,m=[],g=Li[r],v=g[0],y=g[1],b=g[2],w=b/1e3,x=v.length;if(1===x){var A=g[3];d=["hide-tail"],p=[A]}else if(2===x)d=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");d=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k0&&(n.style.minWidth=me(a)),n},_i=function(e,t,i,r,n){var a,o=e.height+e.depth+i+r;if(/fbox|color|angl/.test(t)){if(a=Ot.makeSpan(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(a.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Ne({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Ne({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new Se(l,{width:"100%",height:me(o)});a=Ot.makeSvgSpan([],[u],n)}return a.height=o,a.style.height=me(o),a},Ti={encloseSpan:_i,mathMLnode:zi,svgSpan:Ei};function Bi(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ii(e){var t=qi(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function qi(e){return e&&("atom"===e.type||Ee.hasOwnProperty(e.type))?e:null}var Di=function(e,t){var i,r,n;e&&"supsub"===e.type?(r=Bi(e.base,"accent"),i=r.base,e.base=i,n=Le(si(e,t)),e.base=r):(r=Bi(e,"accent"),i=r.base);var a=si(i,t.havingCrampedStyle()),o=r.isShifty&&f.isCharacterBox(i),s=0;if(o){var l=f.getBaseElem(i),u=si(l,t.havingCrampedStyle());s=ze(u).skew}var c,h="\\c"===r.label,d=h?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight);if(r.isStretchy)c=Ti.svgSpan(r,t),c=Ot.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+me(2*s)+")",marginLeft:me(2*s)}:void 0}]},t);else{var p,m;"\\vec"===r.label?(p=Ot.staticSvg("vec",t),m=Ot.svgData.vec[1]):(p=Ot.makeOrd({mode:r.mode,text:r.label},t,"textord"),p=ze(p),p.italic=0,m=p.width,h&&(d+=p.depth)),c=Ot.makeSpan(["accent-body"],[p]);var g="\\textcircled"===r.label;g&&(c.classes.push("accent-full"),d=a.height);var v=s;g||(v-=m/2),c.style.left=me(v),"\\textcircled"===r.label&&(c.style.top=".2em"),c=Ot.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-d},{type:"elem",elem:c}]},t)}var y=Ot.makeSpan(["mord","accent"],[c],t);return n?(n.children[0]=y,n.height=Math.max(y.height,n.height),n.classes[0]="mord",n):y},Oi=function(e,t){var i=e.isStretchy?Ti.mathMLnode(e.label):new mi.MathNode("mo",[fi(e.label,e.mode)]),r=new mi.MathNode("mover",[wi(e.base,t),i]);return r.setAttribute("accent","true"),r},Ri=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));jt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var i=Wt(t[0]),r=!Ri.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:i}},htmlBuilder:Di,mathmlBuilder:Oi}),jt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var i=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:Di,mathmlBuilder:Oi}),jt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var i=e.parser,r=e.funcName,n=t[0];return{type:"accentUnder",mode:i.mode,label:r,base:n}},htmlBuilder:function(e,t){var i=si(e.base,t),r=Ti.svgSpan(e,t),n="\\utilde"===e.label?.12:0,a=Ot.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:i}]},t);return Ot.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:function(e,t){var i=Ti.mathMLnode(e.label),r=new mi.MathNode("munder",[wi(e.base,t),i]);return r.setAttribute("accentunder","true"),r}});var Fi=function(e){var t=new mi.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};jt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,i){var r=e.parser,n=e.funcName;return{type:"xArrow",mode:r.mode,label:n,body:t[0],below:i[0]}},htmlBuilder:function(e,t){var i,r=t.style,n=t.havingStyle(r.sup()),a=Ot.wrapFragment(si(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";a.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),i=Ot.wrapFragment(si(e.below,n,t),t),i.classes.push(o+"-arrow-pad"));var s,l=Ti.svgSpan(e,t),u=-t.fontMetrics().axisHeight+.5*l.height,c=-t.fontMetrics().axisHeight-.5*l.height-.111;if((a.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=a.depth),i){var h=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;s=Ot.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:l,shift:u},{type:"elem",elem:i,shift:h}]},t)}else s=Ot.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:l,shift:u}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Ot.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder:function(e,t){var i,r=Ti.mathMLnode(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=Fi(wi(e.body,t));if(e.below){var a=Fi(wi(e.below,t));i=new mi.MathNode("munderover",[r,a,n])}else i=new mi.MathNode("mover",[r,n])}else if(e.below){var o=Fi(wi(e.below,t));i=new mi.MathNode("munder",[r,o])}else i=Fi(),i=new mi.MathNode("mover",[r,i]);return i}});var Pi={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Vi=function(){return{type:"styling",body:[],mode:"math",style:"display"}},Ui=function(e){return"textord"===e.type&&"@"===e.text},Ki=function(e,t){return("mathord"===e.type||"atom"===e.type)&&e.text===t};function Hi(e,t,i){var r=Pi[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n=i.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},o=i.callFunction("\\Big",[a],[]),s=i.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[n,o,s]};return i.callFunction("\\\\cdparent",[l],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":var u={type:"textord",text:"\\Vert",mode:"math"};return i.callFunction("\\Big",[u],[]);default:return{type:"textord",text:" ",mode:"math"}}}function Gi(e){var t=[];e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();while(1){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new r("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n=[],a=[n],o=0;o-1);else{if(!("<>AV".indexOf(c)>-1))throw new r('Expected one of "<>AV=|." after @',s[u]);for(var d=0;d<2;d++){for(var p=!0,m=u+1;m=1114111)throw new r("\\@char with invalid code point "+o);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode(55296+(c>>10),56320+(1023&c))),{type:"textord",mode:i.mode,text:u}}});var ji=function(e,t){var i=ti(e.body,t.withColor(e.color),!1);return Ot.makeFragment(i)},Qi=function(e,t){var i=yi(e.body,t.withColor(e.color)),r=new mi.MathNode("mstyle",i);return r.setAttribute("mathcolor",e.color),r};jt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var i=e.parser,r=Bi(t[0],"color-token").color,n=t[1];return{type:"color",mode:i.mode,color:r,body:Zt(n)}},htmlBuilder:ji,mathmlBuilder:Qi}),jt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var i=e.parser,r=e.breakOnTokenText,n=Bi(t[0],"color-token").color;i.gullet.macros.set("\\current@color",n);var a=i.parseExpression(!0,r);return{type:"color",mode:i.mode,color:n,body:a}},htmlBuilder:ji,mathmlBuilder:Qi}),jt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t,i){var r=e.parser,n=i[0],a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:n&&Bi(n,"size").value}},htmlBuilder:function(e,t){var i=Ot.makeSpan(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size&&(i.style.marginTop=me(pe(e.size,t)))),i},mathmlBuilder:function(e,t){var i=new mi.MathNode("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size&&i.setAttribute("height",me(pe(e.size,t)))),i}});var Wi={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Zi=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new r("Expected a control sequence",e);return t},Yi=function(e){var t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t},Xi=function(e,t,i,r){var n=e.gullet.macros.get(i.text);null==n&&(i.noexpand=!0,n={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,n,r)};jt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,i=e.funcName;t.consumeSpaces();var n=t.fetch();if(Wi[n.text])return"\\global"!==i&&"\\\\globallong"!==i||(n.text=Wi[n.text]),Bi(t.parseFunction(),"internal");throw new r("Invalid token after macro prefix",n)}}),jt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,i=e.funcName,n=t.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new r("Expected a control sequence",n);var o,s=0,l=[[]];while("{"!==t.gullet.future().text)if(n=t.gullet.popToken(),"#"===n.text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new r('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new r('Argument number "'+n.text+'" out of order');s++,l.push([])}else{if("EOF"===n.text)throw new r("Expected a macro definition");l[s].push(n.text)}var u=t.gullet.consumeArg(),c=u.tokens;return o&&c.unshift(o),"\\edef"!==i&&"\\xdef"!==i||(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(a,{tokens:c,numArgs:s,delimiters:l},i===Wi[i]),{type:"internal",mode:t.mode}}}),jt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,i=e.funcName,r=Zi(t.gullet.popToken());t.gullet.consumeSpaces();var n=Yi(t);return Xi(t,r,n,"\\\\globallet"===i),{type:"internal",mode:t.mode}}}),jt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,i=e.funcName,r=Zi(t.gullet.popToken()),n=t.gullet.popToken(),a=t.gullet.popToken();return Xi(t,r,a,"\\\\globalfuture"===i),t.gullet.pushToken(a),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var Ji=function(e,t,i){var r=Te.math[e]&&Te.math[e].replace,n=ie(r||e,t,i);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},$i=function(e,t,i,r){var n=i.havingBaseStyle(t),a=Ot.makeSpan(r.concat(n.sizingClasses(i)),[e],i),o=n.sizeMultiplier/i.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=n.sizeMultiplier,a},er=function(e,t,i){var r=t.havingBaseStyle(i),n=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=me(n),e.height-=n,e.depth+=n},tr=function(e,t,i,r,n,a){var o=Ot.makeSymbol(e,"Main-Regular",n,r),s=$i(o,t,r,a);return i&&er(s,r,t),s},ir=function(e,t,i,r){return Ot.makeSymbol(e,"Size"+t+"-Regular",i,r)},rr=function(e,t,i,r,n,a){var o=ir(e,t,n,r),s=$i(Ot.makeSpan(["delimsizing","size"+t],[o],r),q.TEXT,r,a);return i&&er(s,r,q.TEXT),s},nr=function(e,t,i){var r;r="Size1-Regular"===t?"delim-size1":"delim-size4";var n=Ot.makeSpan(["delimsizinginner",r],[Ot.makeSpan([],[Ot.makeSymbol(e,t,i)])]);return{type:"elem",elem:n}},ar=function(e,t,i){var r=J["Size4-Regular"][e.charCodeAt(0)]?J["Size4-Regular"][e.charCodeAt(0)][4]:J["Size1-Regular"][e.charCodeAt(0)][4],n=new Me("inner",Z(e,Math.round(1e3*t))),a=new Se([n],{width:me(r),height:me(t),style:"width:"+me(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ot.makeSvgSpan([],[a],i);return o.height=t,o.style.height=me(t),o.style.width=me(r),{type:"elem",elem:o}},or=.008,sr={type:"kern",size:-1*or},lr=["|","\\lvert","\\rvert","\\vert"],ur=["\\|","\\lVert","\\rVert","\\Vert"],cr=function(e,t,i,r,n,a){var o,s,l,u;o=l=u=e,s=null;var c="Size1-Regular";"\\uparrow"===e?l=u="⏐":"\\Uparrow"===e?l=u="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",u="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",u="\\Downarrow"):f.contains(lr,e)?l="∣":f.contains(ur,e)?l="∥":"["===e||"\\lbrack"===e?(o="⎡",l="⎢",u="⎣",c="Size4-Regular"):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",u="⎦",c="Size4-Regular"):"\\lfloor"===e||"⌊"===e?(l=o="⎢",u="⎣",c="Size4-Regular"):"\\lceil"===e||"⌈"===e?(o="⎡",l=u="⎢",c="Size4-Regular"):"\\rfloor"===e||"⌋"===e?(l=o="⎥",u="⎦",c="Size4-Regular"):"\\rceil"===e||"⌉"===e?(o="⎤",l=u="⎥",c="Size4-Regular"):"("===e||"\\lparen"===e?(o="⎛",l="⎜",u="⎝",c="Size4-Regular"):")"===e||"\\rparen"===e?(o="⎞",l="⎟",u="⎠",c="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",u="⎩",l="⎪",c="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",u="⎭",l="⎪",c="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",u="⎩",l="⎪",c="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",u="⎭",l="⎪",c="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",u="⎭",l="⎪",c="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",u="⎩",l="⎪",c="Size4-Regular");var h=Ji(o,c,n),d=h.height+h.depth,p=Ji(l,c,n),m=p.height+p.depth,g=Ji(u,c,n),v=g.height+g.depth,y=0,b=1;if(null!==s){var w=Ji(s,c,n);y=w.height+w.depth,b=2}var x=d+v+y,A=Math.max(0,Math.ceil((t-x)/(b*m))),k=x+A*b*m,S=r.fontMetrics().axisHeight;i&&(S*=r.sizeMultiplier);var M=k/2-S,N=[];if(N.push(nr(u,c,n)),N.push(sr),null===s){var z=k-d-v+2*or;N.push(ar(l,z,r))}else{var L=(k-d-v-y)/2+2*or;N.push(ar(l,L,r)),N.push(sr),N.push(nr(s,c,n)),N.push(sr),N.push(ar(l,L,r))}N.push(sr),N.push(nr(o,c,n));var C=r.havingBaseStyle(q.TEXT),E=Ot.makeVList({positionType:"bottom",positionData:M,children:N},C);return $i(Ot.makeSpan(["delimsizing","mult"],[E],C),q.TEXT,r,a)},hr=80,dr=.08,pr=function(e,t,i,r,n){var a=W(e,r,i),o=new Me(e,a),s=new Se([o],{width:"400em",height:me(t),viewBox:"0 0 400000 "+i,preserveAspectRatio:"xMinYMin slice"});return Ot.makeSvgSpan(["hide-tail"],[s],n)},mr=function(e,t){var i,r,n=t.havingBaseSizing(),a=Sr("\\surd",e*n.sizeMultiplier,Ar,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,u=0,c=0;return"small"===a.type?(c=1e3+1e3*s+hr,e<1?o=1:e<1.4&&(o=.7),l=(1+s+dr)/o,u=(1+s)/o,i=pr("sqrtMain",l,c,s,t),i.style.minWidth="0.853em",r=.833/o):"large"===a.type?(c=(1e3+hr)*yr[a.size],u=(yr[a.size]+s)/o,l=(yr[a.size]+s+dr)/o,i=pr("sqrtSize"+a.size,l,c,s,t),i.style.minWidth="1.02em",r=1/o):(l=e+s+dr,u=e+s,c=Math.floor(1e3*e+s)+hr,i=pr("sqrtTall",l,c,s,t),i.style.minWidth="0.742em",r=1.056),i.height=u,i.style.height=me(l),{span:i,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},fr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],gr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],vr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],yr=[0,1.2,1.8,2.4,3],br=function(e,t,i,n,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),f.contains(fr,e)||f.contains(vr,e))return rr(e,t,!1,i,n,a);if(f.contains(gr,e))return cr(e,yr[t],!1,i,n,a);throw new r("Illegal delimiter: '"+e+"'")},wr=[{type:"small",style:q.SCRIPTSCRIPT},{type:"small",style:q.SCRIPT},{type:"small",style:q.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],xr=[{type:"small",style:q.SCRIPTSCRIPT},{type:"small",style:q.SCRIPT},{type:"small",style:q.TEXT},{type:"stack"}],Ar=[{type:"small",style:q.SCRIPTSCRIPT},{type:"small",style:q.SCRIPT},{type:"small",style:q.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],kr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Sr=function(e,t,i,r){for(var n=Math.min(2,3-r.style.size),a=n;at)return i[a]}return i[i.length-1]},Mr=function(e,t,i,r,n,a){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=f.contains(vr,e)?wr:f.contains(fr,e)?Ar:xr;var s=Sr(e,t,o,r);return"small"===s.type?tr(e,s.style,i,r,n,a):"large"===s.type?rr(e,s.size,i,r,n,a):cr(e,t,i,r,n,a)},Nr=function(e,t,i,r,n,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,l=5/r.fontMetrics().ptPerEm,u=Math.max(t-o,i+o),c=Math.max(u/500*s,2*u-l);return Mr(e,c,!0,r,n,a)},zr={sqrtImage:mr,sizedDelim:br,sizeToMaxHeight:yr,customSizedDelim:Mr,leftRightDelim:Nr},Lr={"\\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}},Cr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Er(e,t){var i=qi(e);if(i&&f.contains(Cr,i.text))return i;throw new r(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function _r(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}jt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var i=Er(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Lr[e.funcName].size,mclass:Lr[e.funcName].mclass,delim:i.text}},htmlBuilder:function(e,t){return"."===e.delim?Ot.makeSpan([e.mclass]):zr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(fi(e.delim,e.mode));var i=new mi.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true");var r=me(zr.sizeToMaxHeight[e.size]);return i.setAttribute("minsize",r),i.setAttribute("maxsize",r),i}}),jt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!==typeof i)throw new r("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Er(t[0],e).text,color:i}}}),jt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var i=Er(t[0],e),r=e.parser;++r.leftrightDepth;var n=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Bi(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:n,left:i.text,right:a.delim,rightColor:a.color}},htmlBuilder:function(e,t){_r(e);for(var i,r,n=ti(e.body,t,!0,["mopen","mclose"]),a=0,o=0,s=!1,l=0;l-1?"mpadded":"menclose",[wi(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*i+"pt"),r.setAttribute("height","+"+2*i+"pt"),r.setAttribute("lspace",i+"pt"),r.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};jt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,i){var r=e.parser,n=e.funcName,a=Bi(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:n,backgroundColor:a,body:o}},htmlBuilder:Tr,mathmlBuilder:Br}),jt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,i){var r=e.parser,n=e.funcName,a=Bi(t[0],"color-token").color,o=Bi(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:n,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:Tr,mathmlBuilder:Br}),jt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){var i=e.parser;return{type:"enclose",mode:i.mode,label:"\\fbox",body:t[0]}}}),jt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var i=e.parser,r=e.funcName,n=t[0];return{type:"enclose",mode:i.mode,label:r,body:n}},htmlBuilder:Tr,mathmlBuilder:Br}),jt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){var i=e.parser;return{type:"enclose",mode:i.mode,label:"\\angl",body:t[0]}}});var Ir={};function qr(e){for(var t=e.type,i=e.names,r=e.props,n=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l1||!h)&&g.pop(),y.length0&&(w+=.25),u.push({pos:w,isDashed:e[t]})}for(x(o[0]),i=0;i0&&(L+=b,S=s)){var G=void 0;(n>0||e.hskipBeforeAndAfter)&&(G=f.deflt(P.pregap,d),0!==G&&(C=Ot.makeSpan(["arraycolsep"],[]),C.style.width=me(G),B.push(C)));var j=[];for(i=0;i0){var Y=Ot.makeLineSpan("hline",t,c),X=Ot.makeLineSpan("hdashline",t,c),J=[{type:"elem",elem:l,shift:0}];while(u.length>0){var $=u.pop(),ee=$.pos-_;$.isDashed?J.push({type:"elem",elem:X,shift:ee}):J.push({type:"elem",elem:Y,shift:ee})}l=Ot.makeVList({positionType:"individualShift",children:J},t)}if(0===I.length)return Ot.makeSpan(["mord"],[l],t);var te=Ot.makeVList({positionType:"individualShift",children:I},t);return te=Ot.makeSpan(["tag"],[te],t),Ot.makeFragment([l,te])},jr={c:"center ",l:"left ",r:"right "},Qr=function(e,t){for(var i=[],r=new mi.MathNode("mtd",[],["mtr-glue"]),n=new mi.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var p=e.cols,m="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(h+="top ",g=1),"separator"===p[p.length-1].type&&(h+="bottom ",v-=1);for(var y=g;y0?"left ":"",h+=k[k.length-1].length>0?"right ":"";for(var S=1;S-1?"alignat":"align",o="split"===e.envName,s=Kr(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:Ur(e.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,u={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",h=0;h0&&p&&(g=1),n[m]={type:"align",align:f,pregap:g,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};qr({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var i=qi(t[0]),n=i?[t[0]]:Bi(t[0],"ordgroup").body,a=n.map((function(e){var t=Ii(e),i=t.text;if(-1!=="lcr".indexOf(i))return{type:"align",align:i};if("|"===i)return{type:"separator",separator:"|"};if(":"===i)return{type:"separator",separator:":"};throw new r("Unknown column alignment: "+i,e)})),o={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return Kr(e.parser,o,Hr(e.envName))},htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),i=a.fetch().text,-1==="lcr".indexOf(i))throw new r("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:i}]}}var o=Kr(e.parser,n,Hr(e.envName)),s=Math.max.apply(Math,[0].concat(o.body.map((function(e){return e.length}))));return o.cols=new Array(s).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t={arraystretch:.5},i=Kr(e.parser,t,"script");return i.colSeparationType="small",i},htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var i=qi(t[0]),n=i?[t[0]]:Bi(t[0],"ordgroup").body,a=n.map((function(e){var t=Ii(e),i=t.text;if(-1!=="lc".indexOf(i))return{type:"align",align:i};throw new r("Unknown column alignment: "+i,e)}));if(a.length>1)throw new r("{subarray} can contain only one column");var o={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=Kr(e.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new r("{subarray} can contain only one column");return o},htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},i=Kr(e.parser,t,Hr(e.envName));return{type:"leftright",mode:e.mode,body:[i],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Wr,htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){f.contains(["gather","gather*"],e.envName)&&Vr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ur(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Kr(e.parser,t,"display")},htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Wr,htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){Vr(e);var t={autoTag:Ur(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Kr(e.parser,t,"display")},htmlBuilder:Gr,mathmlBuilder:Qr}),qr({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return Vr(e),Gi(e.parser)},htmlBuilder:Gr,mathmlBuilder:Qr}),Or("\\nonumber","\\gdef\\@eqnsw{0}"),Or("\\notag","\\nonumber"),jt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(e,t){throw new r(e.funcName+" valid only within array environment")}});var Zr=Ir,Yr=Zr;jt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(e,t){var i=e.parser,n=e.funcName,a=t[0];if("ordgroup"!==a.type)throw new r("Invalid environment name",a);for(var o="",s=0;s=q.SCRIPT.id?i.text():q.DISPLAY:"text"===e&&i.size===q.DISPLAY.size?i=q.TEXT:"script"===e?i=q.SCRIPT:"scriptscript"===e&&(i=q.SCRIPTSCRIPT),i},on=function(e,t){var i,r=an(e.size,t.style),n=r.fracNum(),a=r.fracDen();i=t.havingStyle(n);var o=si(e.numer,i,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*h:7*h,m=t.fontMetrics().denom1):(c>0?(d=t.fontMetrics().num2,p=h):(d=t.fontMetrics().num3,p=3*h),m=t.fontMetrics().denom2),u){var w=t.fontMetrics().axisHeight;d-o.depth-(w+.5*c)0&&(t=e,t="."===t?null:t),t};jt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var i,r=e.parser,n=t[4],a=t[5],o=Wt(t[0]),s="atom"===o.type&&"open"===o.family?un(o.text):null,l=Wt(t[1]),u="atom"===l.type&&"close"===l.family?un(l.text):null,c=Bi(t[2],"size"),h=null;c.isBlank?i=!0:(h=c.value,i=h.number>0);var d="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var m=Bi(p.body[0],"textord");d=ln[Number(m.text)]}}else p=Bi(p,"textord"),d=ln[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:i,barSize:h,leftDelim:s,rightDelim:u,size:d}},htmlBuilder:on,mathmlBuilder:sn}),jt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var i=e.parser,r=(e.funcName,e.token);return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:Bi(t[0],"size").value,token:r}}}),jt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var i=e.parser,r=(e.funcName,t[0]),n=p(Bi(t[1],"infix").size),a=t[2],o=n.number>0;return{type:"genfrac",mode:i.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:on,mathmlBuilder:sn});var cn=function(e,t){var i,r,n=t.style;"supsub"===e.type?(i=e.sup?si(e.sup,t.havingStyle(n.sup()),t):si(e.sub,t.havingStyle(n.sub()),t),r=Bi(e.base,"horizBrace")):r=Bi(e,"horizBrace");var a,o=si(r.base,t.havingBaseStyle(q.DISPLAY)),s=Ti.svgSpan(r,t);if(r.isOver?(a=Ot.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t),a.children[0].children[0].children[1].classes.push("svg-align")):(a=Ot.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t),a.children[0].children[0].children[0].classes.push("svg-align")),i){var l=Ot.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t);a=r.isOver?Ot.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]},t):Ot.makeVList({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ot.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t)},hn=function(e,t){var i=Ti.mathMLnode(e.label);return new mi.MathNode(e.isOver?"mover":"munder",[wi(e.base,t),i])};jt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var i=e.parser,r=e.funcName;return{type:"horizBrace",mode:i.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:cn,mathmlBuilder:hn}),jt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var i=e.parser,r=t[1],n=Bi(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:i.mode,href:n,body:Zt(r)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var i=ti(e.body,t,!1);return Ot.makeAnchor(e.href,[],i,t)},mathmlBuilder:function(e,t){var i=bi(e.body,t);return i instanceof hi||(i=new hi("mrow",[i])),i.setAttribute("href",e.href),i}}),jt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var i=e.parser,r=Bi(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:r}))return i.formatUnsupportedCmd("\\url");for(var n=[],a=0;a0&&(r=pe(e.totalheight,t)-i);var n=0;e.width.number>0&&(n=pe(e.width,t));var a={height:me(i+r)};n>0&&(a.width=me(n)),r>0&&(a.verticalAlign=me(-r));var o=new xe(e.src,e.alt,a);return o.height=i,o.depth=r,o},mathmlBuilder:function(e,t){var i=new mi.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);var r=pe(e.height,t),n=0;if(e.totalheight.number>0&&(n=pe(e.totalheight,t)-r,i.setAttribute("valign",me(-n))),i.setAttribute("height",me(r+n)),e.width.number>0){var a=pe(e.width,t);i.setAttribute("width",me(a))}return i.setAttribute("src",e.src),i}}),jt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var i=e.parser,r=e.funcName,n=Bi(t[0],"size");if(i.settings.strict){var a="m"===r[1],o="mu"===n.value.unit;a?(o||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+n.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:n.value}},htmlBuilder:function(e,t){return Ot.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var i=pe(e.dimension,t);return new mi.SpaceNode(i)}}),jt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var i=e.parser,r=e.funcName,n=t[0];return{type:"lap",mode:i.mode,alignment:r.slice(5),body:n}},htmlBuilder:function(e,t){var i;"clap"===e.alignment?(i=Ot.makeSpan([],[si(e.body,t)]),i=Ot.makeSpan(["inner"],[i],t)):i=Ot.makeSpan(["inner"],[si(e.body,t)]);var r=Ot.makeSpan(["fix"],[]),n=Ot.makeSpan([e.alignment],[i,r],t),a=Ot.makeSpan(["strut"]);return a.style.height=me(n.height+n.depth),n.depth&&(a.style.verticalAlign=me(-n.depth)),n.children.unshift(a),n=Ot.makeSpan(["thinbox"],[n],t),Ot.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:function(e,t){var i=new mi.MathNode("mpadded",[wi(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",r+"width")}return i.setAttribute("width","0px"),i}}),jt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var i=e.funcName,r=e.parser,n=r.mode;r.switchMode("math");var a="\\("===i?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:o}}}),jt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new r("Mismatched "+e.funcName)}});var pn=function(e,t){switch(t.style.size){case q.DISPLAY.size:return e.display;case q.TEXT.size:return e.text;case q.SCRIPT.size:return e.script;case q.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};jt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){var i=e.parser;return{type:"mathchoice",mode:i.mode,display:Zt(t[0]),text:Zt(t[1]),script:Zt(t[2]),scriptscript:Zt(t[3])}},htmlBuilder:function(e,t){var i=pn(e,t),r=ti(i,t,!1);return Ot.makeFragment(r)},mathmlBuilder:function(e,t){var i=pn(e,t);return bi(i,t)}});var mn=function(e,t,i,r,n,a,o){e=Ot.makeSpan([],[e]);var s,l,u,c=i&&f.isCharacterBox(i);if(t){var h=si(t,r.havingStyle(n.sup()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(i){var d=si(i,r.havingStyle(n.sub()),r);s={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(l&&s){var p=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;u=Ot.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:me(-a)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:me(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var m=e.height-o;u=Ot.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:me(-a)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var g=e.depth+o;u=Ot.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:me(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var v=[u];if(s&&0!==a&&!c){var y=Ot.makeSpan(["mspace"],[],r);y.style.marginRight=me(a),v.unshift(y)}return Ot.makeSpan(["mop","op-limits"],v,r)},fn=["\\smallint"],gn=function(e,t){var i,r,n,a=!1;"supsub"===e.type?(i=e.sup,r=e.sub,n=Bi(e.base,"op"),a=!0):n=Bi(e,"op");var o,s=t.style,l=!1;if(s.size===q.DISPLAY.size&&n.symbol&&!f.contains(fn,n.name)&&(l=!0),n.symbol){var u=l?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.substr(1),n.name="oiint"===c?"\\iint":"\\iiint"),o=Ot.makeSymbol(n.name,u,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),c.length>0){var h=o.italic,d=Ot.staticSvg(c+"Size"+(l?"2":"1"),t);o=Ot.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:d,shift:l?.08:0}]},t),n.name="\\"+c,o.classes.unshift("mop"),o.italic=h}}else if(n.body){var p=ti(n.body,t,!0);1===p.length&&p[0]instanceof ke?(o=p[0],o.classes[0]="mop"):o=Ot.makeSpan(["mop"],p,t)}else{for(var m=[],g=1;g0){for(var s=n.body.map((function(e){var t=e.text;return"string"===typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ti(s,t.withFont("mathrm"),!0),u=0;u=0?s.setAttribute("height",me(n)):(s.setAttribute("height",me(n)),s.setAttribute("depth",me(-n))),s.setAttribute("voffset",me(n)),s}});var kn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Sn=function(e,t){var i=t.havingSize(e.size);return An(e.body,i,t)};jt({type:"sizing",names:kn,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var i=e.breakOnTokenText,r=e.funcName,n=e.parser,a=n.parseExpression(!1,i);return{type:"sizing",mode:n.mode,size:kn.indexOf(r)+1,body:a}},htmlBuilder:Sn,mathmlBuilder:function(e,t){var i=t.havingSize(e.size),r=yi(e.body,i),n=new mi.MathNode("mstyle",r);return n.setAttribute("mathsize",me(i.sizeMultiplier)),n}}),jt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,i){var r=e.parser,n=!1,a=!1,o=i[0]&&Bi(i[0],"ordgroup");if(o)for(var s="",l=0;li.height+i.depth+o&&(o=(o+d-i.height-i.depth)/2);var p=u.height-i.height-o-c;i.style.paddingLeft=me(h);var m=Ot.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+p)},{type:"elem",elem:u},{type:"kern",size:c}]},t);if(e.index){var f=t.havingStyle(q.SCRIPTSCRIPT),g=si(e.index,f,t),v=.6*(m.height-m.depth),y=Ot.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:g}]},t),b=Ot.makeSpan(["root"],[y]);return Ot.makeSpan(["mord","sqrt"],[b,m],t)}return Ot.makeSpan(["mord","sqrt"],[m],t)},mathmlBuilder:function(e,t){var i=e.body,r=e.index;return r?new mi.MathNode("mroot",[wi(i,t),wi(r,t)]):new mi.MathNode("msqrt",[wi(i,t)])}});var Mn={display:q.DISPLAY,text:q.TEXT,script:q.SCRIPT,scriptscript:q.SCRIPTSCRIPT};jt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var i=e.breakOnTokenText,r=e.funcName,n=e.parser,a=n.parseExpression(!0,i),o=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:o,body:a}},htmlBuilder:function(e,t){var i=Mn[e.style],r=t.havingStyle(i).withFont("");return An(e.body,r,t)},mathmlBuilder:function(e,t){var i=Mn[e.style],r=t.havingStyle(i),n=yi(e.body,r),a=new mi.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=o[e.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});var Nn=function(e,t){var i=e.base;if(i){if("op"===i.type){var r=i.limits&&(t.style.size===q.DISPLAY.size||i.alwaysHandleSupSub);return r?gn:null}if("operatorname"===i.type){var n=i.alwaysHandleSupSub&&(t.style.size===q.DISPLAY.size||i.limits);return n?wn:null}if("accent"===i.type)return f.isCharacterBox(i.base)?Di:null;if("horizBrace"===i.type){var a=!e.sub;return a===i.isOver?cn:null}return null}return null};Qt({type:"supsub",htmlBuilder:function(e,t){var i=Nn(e,t);if(i)return i(e,t);var r,n,a,o=e.base,s=e.sup,l=e.sub,u=si(o,t),c=t.fontMetrics(),h=0,d=0,p=o&&f.isCharacterBox(o);if(s){var m=t.havingStyle(t.style.sup());r=si(s,m,t),p||(h=u.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(l){var g=t.havingStyle(t.style.sub());n=si(l,g,t),p||(d=u.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}a=t.style===q.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var v,y=t.sizeMultiplier,b=me(.5/c.ptPerEm/y),w=null;if(n){var x=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(u instanceof ke||x)&&(w=me(-u.italic))}if(r&&n){h=Math.max(h,a,r.depth+.25*c.xHeight),d=Math.max(d,c.sub2);var A=c.defaultRuleThickness,k=4*A;if(h-r.depth-(n.height-d)0&&(h+=S,d-=S)}var M=[{type:"elem",elem:n,shift:d,marginRight:b,marginLeft:w},{type:"elem",elem:r,shift:-h,marginRight:b}];v=Ot.makeVList({positionType:"individualShift",children:M},t)}else if(n){d=Math.max(d,c.sub1,n.height-.8*c.xHeight);var N=[{type:"elem",elem:n,marginLeft:w,marginRight:b}];v=Ot.makeVList({positionType:"shift",positionData:d,children:N},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,a,r.depth+.25*c.xHeight),v=Ot.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:b}]},t)}var z=ai(u,"right")||"mord";return Ot.makeSpan([z],[u,Ot.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var i,r,n=!1;e.base&&"horizBrace"===e.base.type&&(r=!!e.sup,r===e.base.isOver&&(n=!0,i=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,o=[wi(e.base,t)];if(e.sub&&o.push(wi(e.sub,t)),e.sup&&o.push(wi(e.sup,t)),n)a=i?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;a=s&&"op"===s.type&&s.limits&&t.style===q.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===q.DISPLAY||s.limits)?"munderover":"msubsup"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===q.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===q.DISPLAY)?"munder":"msub"}else{var u=e.base;a=u&&"op"===u.type&&u.limits&&(t.style===q.DISPLAY||u.alwaysHandleSupSub)||u&&"operatorname"===u.type&&u.alwaysHandleSupSub&&(u.limits||t.style===q.DISPLAY)?"mover":"msup"}return new mi.MathNode(a,o)}}),Qt({type:"atom",htmlBuilder:function(e,t){return Ot.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var i=new mi.MathNode("mo",[fi(e.text,e.mode)]);if("bin"===e.family){var r=vi(e,t);"bold-italic"===r&&i.setAttribute("mathvariant",r)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var zn={mi:"italic",mn:"normal",mtext:"normal"};Qt({type:"mathord",htmlBuilder:function(e,t){return Ot.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var i=new mi.MathNode("mi",[fi(e.text,e.mode,t)]),r=vi(e,t)||"italic";return r!==zn[i.type]&&i.setAttribute("mathvariant",r),i}}),Qt({type:"textord",htmlBuilder:function(e,t){return Ot.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var i,r=fi(e.text,e.mode,t),n=vi(e,t)||"normal";return i="text"===e.mode?new mi.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new mi.MathNode("mn",[r]):"\\prime"===e.text?new mi.MathNode("mo",[r]):new mi.MathNode("mi",[r]),n!==zn[i.type]&&i.setAttribute("mathvariant",n),i}});var Ln={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Cn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Qt({type:"spacing",htmlBuilder:function(e,t){if(Cn.hasOwnProperty(e.text)){var i=Cn[e.text].className||"";if("text"===e.mode){var n=Ot.makeOrd(e,t,"textord");return n.classes.push(i),n}return Ot.makeSpan(["mspace",i],[Ot.mathsym(e.text,e.mode,t)],t)}if(Ln.hasOwnProperty(e.text))return Ot.makeSpan(["mspace",Ln[e.text]],[],t);throw new r('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){var i;if(!Cn.hasOwnProperty(e.text)){if(Ln.hasOwnProperty(e.text))return new mi.MathNode("mspace");throw new r('Unknown type of space "'+e.text+'"')}return i=new mi.MathNode("mtext",[new mi.TextNode(" ")]),i}});var En=function(){var e=new mi.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Qt({type:"tag",mathmlBuilder:function(e,t){var i=new mi.MathNode("mtable",[new mi.MathNode("mtr",[En(),new mi.MathNode("mtd",[bi(e.body,t)]),En(),new mi.MathNode("mtd",[bi(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var _n={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tn={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},In=function(e,t){var i=e.font;return i?_n[i]?t.withTextFontFamily(_n[i]):Tn[i]?t.withTextFontWeight(Tn[i]):t.withTextFontShape(Bn[i]):t};jt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var i=e.parser,r=e.funcName,n=t[0];return{type:"text",mode:i.mode,body:Zt(n),font:r}},htmlBuilder:function(e,t){var i=In(e,t),r=ti(e.body,i,!0);return Ot.makeSpan(["mord","text"],r,i)},mathmlBuilder:function(e,t){var i=In(e,t);return bi(e.body,i)}}),jt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var i=e.parser;return{type:"underline",mode:i.mode,body:t[0]}},htmlBuilder:function(e,t){var i=si(e.body,t),r=Ot.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,a=Ot.makeVList({positionType:"top",positionData:i.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:i}]},t);return Ot.makeSpan(["mord","underline"],[a],t)},mathmlBuilder:function(e,t){var i=new mi.MathNode("mo",[new mi.TextNode("‾")]);i.setAttribute("stretchy","true");var r=new mi.MathNode("munder",[wi(e.body,t),i]);return r.setAttribute("accentunder","true"),r}}),jt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){var i=e.parser;return{type:"vcenter",mode:i.mode,body:t[0]}},htmlBuilder:function(e,t){var i=si(e.body,t),r=t.fontMetrics().axisHeight,n=.5*(i.height-r-(i.depth+r));return Ot.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:i}]},t)},mathmlBuilder:function(e,t){return new mi.MathNode("mpadded",[wi(e.body,t)],["vcenter"])}}),jt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,i){throw new r("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var i=qn(e),r=[],n=t.havingStyle(t.style.text()),a=0;a0)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,i){if(void 0===i&&(i=!1),i){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t},e}(),Wn=Dr,Zn=Wn;Or("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Or("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Or("\\@firstoftwo",(function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}})),Or("\\@secondoftwo",(function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}})),Or("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Or("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Or("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Yn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Or("\\char",(function(e){var t,i=e.popToken(),n="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if(i=e.popToken(),"\\"===i.text[0])n=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new r("\\char` missing argument");n=i.text.charCodeAt(0)}else t=10;if(t){if(n=Yn[i.text],null==n||n>=t)throw new r("Invalid base-"+t+" digit "+i.text);var a;while(null!=(a=Yn[e.future().text])&&a":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Or("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in Jn?t=Jn[i]:("\\not"===i.substr(0,4)||i in Te.math&&f.contains(["bin","rel"],Te.math[i].group))&&(t="\\dotsb"),t}));var $n={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Or("\\dotso",(function(e){var t=e.future().text;return t in $n?"\\ldots\\,":"\\ldots"})),Or("\\dotsc",(function(e){var t=e.future().text;return t in $n&&","!==t?"\\ldots\\,":"\\ldots"})),Or("\\cdots",(function(e){var t=e.future().text;return t in $n?"\\@cdots\\,":"\\@cdots"})),Or("\\dotsb","\\cdots"),Or("\\dotsm","\\cdots"),Or("\\dotsi","\\!\\cdots"),Or("\\dotsx","\\ldots\\,"),Or("\\DOTSI","\\relax"),Or("\\DOTSB","\\relax"),Or("\\DOTSX","\\relax"),Or("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Or("\\,","\\tmspace+{3mu}{.1667em}"),Or("\\thinspace","\\,"),Or("\\>","\\mskip{4mu}"),Or("\\:","\\tmspace+{4mu}{.2222em}"),Or("\\medspace","\\:"),Or("\\;","\\tmspace+{5mu}{.2777em}"),Or("\\thickspace","\\;"),Or("\\!","\\tmspace-{3mu}{.1667em}"),Or("\\negthinspace","\\!"),Or("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Or("\\negthickspace","\\tmspace-{5mu}{.277em}"),Or("\\enspace","\\kern.5em "),Or("\\enskip","\\hskip.5em\\relax"),Or("\\quad","\\hskip1em\\relax"),Or("\\qquad","\\hskip2em\\relax"),Or("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Or("\\tag@paren","\\tag@literal{({#1})}"),Or("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new r("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Or("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Or("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Or("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Or("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Or("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Or("\\newline","\\\\\\relax"),Or("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ea=me(J["Main-Regular"]["T".charCodeAt(0)][1]-.7*J["Main-Regular"]["A".charCodeAt(0)][1]);Or("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ea+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Or("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ea+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Or("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Or("\\@hspace","\\hskip #1\\relax"),Or("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Or("\\ordinarycolon",":"),Or("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Or("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Or("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Or("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Or("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Or("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Or("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Or("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Or("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Or("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Or("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Or("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Or("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Or("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Or("∷","\\dblcolon"),Or("∹","\\eqcolon"),Or("≔","\\coloneqq"),Or("≕","\\eqqcolon"),Or("⩴","\\Coloneqq"),Or("\\ratio","\\vcentcolon"),Or("\\coloncolon","\\dblcolon"),Or("\\colonequals","\\coloneqq"),Or("\\coloncolonequals","\\Coloneqq"),Or("\\equalscolon","\\eqqcolon"),Or("\\equalscoloncolon","\\Eqqcolon"),Or("\\colonminus","\\coloneq"),Or("\\coloncolonminus","\\Coloneq"),Or("\\minuscolon","\\eqcolon"),Or("\\minuscoloncolon","\\Eqcolon"),Or("\\coloncolonapprox","\\Colonapprox"),Or("\\coloncolonsim","\\Colonsim"),Or("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Or("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Or("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Or("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Or("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Or("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Or("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Or("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Or("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Or("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Or("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Or("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Or("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Or("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Or("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Or("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Or("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Or("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Or("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Or("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Or("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Or("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Or("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Or("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Or("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Or("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Or("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Or("\\imath","\\html@mathml{\\@imath}{ı}"),Or("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Or("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Or("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Or("⟦","\\llbracket"),Or("⟧","\\rrbracket"),Or("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Or("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Or("⦃","\\lBrace"),Or("⦄","\\rBrace"),Or("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Or("⦵","\\minuso"),Or("\\darr","\\downarrow"),Or("\\dArr","\\Downarrow"),Or("\\Darr","\\Downarrow"),Or("\\lang","\\langle"),Or("\\rang","\\rangle"),Or("\\uarr","\\uparrow"),Or("\\uArr","\\Uparrow"),Or("\\Uarr","\\Uparrow"),Or("\\N","\\mathbb{N}"),Or("\\R","\\mathbb{R}"),Or("\\Z","\\mathbb{Z}"),Or("\\alef","\\aleph"),Or("\\alefsym","\\aleph"),Or("\\Alpha","\\mathrm{A}"),Or("\\Beta","\\mathrm{B}"),Or("\\bull","\\bullet"),Or("\\Chi","\\mathrm{X}"),Or("\\clubs","\\clubsuit"),Or("\\cnums","\\mathbb{C}"),Or("\\Complex","\\mathbb{C}"),Or("\\Dagger","\\ddagger"),Or("\\diamonds","\\diamondsuit"),Or("\\empty","\\emptyset"),Or("\\Epsilon","\\mathrm{E}"),Or("\\Eta","\\mathrm{H}"),Or("\\exist","\\exists"),Or("\\harr","\\leftrightarrow"),Or("\\hArr","\\Leftrightarrow"),Or("\\Harr","\\Leftrightarrow"),Or("\\hearts","\\heartsuit"),Or("\\image","\\Im"),Or("\\infin","\\infty"),Or("\\Iota","\\mathrm{I}"),Or("\\isin","\\in"),Or("\\Kappa","\\mathrm{K}"),Or("\\larr","\\leftarrow"),Or("\\lArr","\\Leftarrow"),Or("\\Larr","\\Leftarrow"),Or("\\lrarr","\\leftrightarrow"),Or("\\lrArr","\\Leftrightarrow"),Or("\\Lrarr","\\Leftrightarrow"),Or("\\Mu","\\mathrm{M}"),Or("\\natnums","\\mathbb{N}"),Or("\\Nu","\\mathrm{N}"),Or("\\Omicron","\\mathrm{O}"),Or("\\plusmn","\\pm"),Or("\\rarr","\\rightarrow"),Or("\\rArr","\\Rightarrow"),Or("\\Rarr","\\Rightarrow"),Or("\\real","\\Re"),Or("\\reals","\\mathbb{R}"),Or("\\Reals","\\mathbb{R}"),Or("\\Rho","\\mathrm{P}"),Or("\\sdot","\\cdot"),Or("\\sect","\\S"),Or("\\spades","\\spadesuit"),Or("\\sub","\\subset"),Or("\\sube","\\subseteq"),Or("\\supe","\\supseteq"),Or("\\Tau","\\mathrm{T}"),Or("\\thetasym","\\vartheta"),Or("\\weierp","\\wp"),Or("\\Zeta","\\mathrm{Z}"),Or("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Or("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Or("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Or("\\bra","\\mathinner{\\langle{#1}|}"),Or("\\ket","\\mathinner{|{#1}\\rangle}"),Or("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Or("\\Bra","\\left\\langle#1\\right|"),Or("\\Ket","\\left|#1\\right\\rangle");var ta=function(e){return function(t){var i=t.consumeArg().tokens,r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=function(t){return function(i){e&&(i.macros.set("|",o),n.length&&i.macros.set("\\|",s));var a=t;if(!t&&n.length){var l=i.future();"|"===l.text&&(i.popToken(),a=!0)}return{tokens:a?n:r,numArgs:0}}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,c=t.expandTokens([].concat(a,u,i));return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}}};Or("\\bra@ket",ta(!1)),Or("\\bra@set",ta(!0)),Or("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Or("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Or("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Or("\\angln","{\\angl n}"),Or("\\blue","\\textcolor{##6495ed}{#1}"),Or("\\orange","\\textcolor{##ffa500}{#1}"),Or("\\pink","\\textcolor{##ff00af}{#1}"),Or("\\red","\\textcolor{##df0030}{#1}"),Or("\\green","\\textcolor{##28ae7b}{#1}"),Or("\\gray","\\textcolor{gray}{#1}"),Or("\\purple","\\textcolor{##9d38bd}{#1}"),Or("\\blueA","\\textcolor{##ccfaff}{#1}"),Or("\\blueB","\\textcolor{##80f6ff}{#1}"),Or("\\blueC","\\textcolor{##63d9ea}{#1}"),Or("\\blueD","\\textcolor{##11accd}{#1}"),Or("\\blueE","\\textcolor{##0c7f99}{#1}"),Or("\\tealA","\\textcolor{##94fff5}{#1}"),Or("\\tealB","\\textcolor{##26edd5}{#1}"),Or("\\tealC","\\textcolor{##01d1c1}{#1}"),Or("\\tealD","\\textcolor{##01a995}{#1}"),Or("\\tealE","\\textcolor{##208170}{#1}"),Or("\\greenA","\\textcolor{##b6ffb0}{#1}"),Or("\\greenB","\\textcolor{##8af281}{#1}"),Or("\\greenC","\\textcolor{##74cf70}{#1}"),Or("\\greenD","\\textcolor{##1fab54}{#1}"),Or("\\greenE","\\textcolor{##0d923f}{#1}"),Or("\\goldA","\\textcolor{##ffd0a9}{#1}"),Or("\\goldB","\\textcolor{##ffbb71}{#1}"),Or("\\goldC","\\textcolor{##ff9c39}{#1}"),Or("\\goldD","\\textcolor{##e07d10}{#1}"),Or("\\goldE","\\textcolor{##a75a05}{#1}"),Or("\\redA","\\textcolor{##fca9a9}{#1}"),Or("\\redB","\\textcolor{##ff8482}{#1}"),Or("\\redC","\\textcolor{##f9685d}{#1}"),Or("\\redD","\\textcolor{##e84d39}{#1}"),Or("\\redE","\\textcolor{##bc2612}{#1}"),Or("\\maroonA","\\textcolor{##ffbde0}{#1}"),Or("\\maroonB","\\textcolor{##ff92c6}{#1}"),Or("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Or("\\maroonD","\\textcolor{##ca337c}{#1}"),Or("\\maroonE","\\textcolor{##9e034e}{#1}"),Or("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Or("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Or("\\purpleC","\\textcolor{##aa87ff}{#1}"),Or("\\purpleD","\\textcolor{##7854ab}{#1}"),Or("\\purpleE","\\textcolor{##543b78}{#1}"),Or("\\mintA","\\textcolor{##f5f9e8}{#1}"),Or("\\mintB","\\textcolor{##edf2df}{#1}"),Or("\\mintC","\\textcolor{##e0e5cc}{#1}"),Or("\\grayA","\\textcolor{##f6f7f7}{#1}"),Or("\\grayB","\\textcolor{##f0f1f2}{#1}"),Or("\\grayC","\\textcolor{##e3e5e6}{#1}"),Or("\\grayD","\\textcolor{##d6d8da}{#1}"),Or("\\grayE","\\textcolor{##babec2}{#1}"),Or("\\grayF","\\textcolor{##888d93}{#1}"),Or("\\grayG","\\textcolor{##626569}{#1}"),Or("\\grayH","\\textcolor{##3b3e40}{#1}"),Or("\\grayI","\\textcolor{##21242c}{#1}"),Or("\\kaBlue","\\textcolor{##314453}{#1}"),Or("\\kaGreen","\\textcolor{##71B307}{#1}");var ia={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ra=function(){function e(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Qn(Zn,t.macros),this.mode=i,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new jn(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,i,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var n=this.consumeArg(["]"]);r=n.tokens,i=n.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,i=a.end}return this.pushToken(new Fr("EOF",i.loc)),this.pushTokens(r),t.range(i,"")},t.consumeSpaces=function(){for(;;){var e=this.future();if(" "!==e.text)break;this.stack.pop()}},t.consumeArg=function(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var n,a=this.future(),o=0,s=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++o;else if("}"===n.text){if(--o,-1===o)throw new r("Extra }",n)}else if("EOF"===n.text)throw new r("Unexpected end of input in a macro argument, expected '"+(e&&i?e[s]:"}")+"'",n);if(e&&i)if((0===o||1===o&&"{"===e[s])&&n.text===e[s]){if(++s,s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||i);return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:n}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new r("The length of delimiters doesn't match the number of args!");for(var i=t[0],n=0;nthis.settings.maxExpand)throw new r("Too many expansions: infinite loop or need to increase maxExpand setting");var a=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var l=a[s];if("#"===l.text){if(0===s)throw new r("Incomplete placeholder at end of macro body",l);if(l=a[--s],"#"===l.text)a.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new r("Not a valid argument number",l);var u;(u=a).splice.apply(u,[s,2].concat(o[+l.text-1]))}}}}return this.pushTokens(a),a},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof Fr)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new Fr(e)]):void 0},t.expandTokens=function(e){var t=[],i=this.stack.length;this.pushTokens(e);while(this.stack.length>i){var r=this.expandOnce(!0);r instanceof Fr&&(r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var i=this.lexer.catcodes[e];if(null!=i&&13!==i)return}var r="function"===typeof t?t(this):t;if("string"===typeof r){var n=0;if(-1!==r.indexOf("#")){var a=r.replace(/##/g,"");while(-1!==a.indexOf("#"+(n+1)))++n}var o=new jn(r,this.settings),s=[],l=o.lex();while("EOF"!==l.text)s.push(l),l=o.lex();s.reverse();var u={tokens:s,numArgs:n};return u}return r},t.isDefined=function(e){return this.macros.has(e)||On.hasOwnProperty(e)||Te.math.hasOwnProperty(e)||Te.text.hasOwnProperty(e)||ia.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"===typeof t||"function"===typeof t||!t.unexpandable:On.hasOwnProperty(e)&&!On[e].primitive},e}(),na=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,aa=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),oa={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},sa={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},la=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new ra(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new r("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.subparse=function(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Fr("}")),this.gullet.pushTokens(e);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,i},t.parseExpression=function(t,i){var r=[];while(1){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==e.endOfExpression.indexOf(n.text))break;if(i&&n.text===i)break;if(t&&On[n.text]&&On[n.text].infix)break;var a=this.parseAtom(i);if(!a)break;"internal"!==a.type&&r.push(a)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)},t.handleInfixNodes=function(e){for(var t,i=-1,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=Te[this.mode][t].group,u=Rr.range(e);if(Ce.hasOwnProperty(l)){var c=l;s={type:"atom",mode:this.mode,family:c,loc:u,text:t}}else s={type:l,mode:this.mode,loc:u,text:t};a=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(F(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),a={type:"textord",mode:"text",loc:Rr.range(e),text:t}}if(this.consume(),o)for(var h=0;h0;l--){var u=Math.pow(r,l),c=s/u,h=Math.sign(c),d=h*Math.floor(Math.abs(c));s-=d*u,o[l]=d}if(0!==s)return null;for(l=0;l0){n=this.coeffs[a];break}if(n){for(a;a>i;a--)this.coeffs[a]=this.coeffs[a].subtract(new g(1)),this.coeffs[a-1]=this.coeffs[a-1].add(new g(e));r=this.coeffs[i]}}var o=r.mod(e),s=r.subtract(o).divide(e);if(!s.equals(0)){var l=i+1,u=this.coeffs[l]||new g(0);u=u.add(s),this.coeffs[l]=new g(u),this.coeffs[i]=new g(o)}}return this},add:function(e){for(var t=Math.max(this.coeffs.length,e.coeffs.length),i=0;i3)throw new Error("Cannot calculate quadratic order of "+(this.coeffs.length-1));if(0===this.coeffs.length)throw new Error("Polynomial array has no terms");var i=this.coeffs[2]||0,r=this.coeffs[1]||0,n=this.coeffs[0],a=r*r-4*i*n;return a<0&&!e||(t[0]=(-r+Math.sqrt(a))/(2*i),t[1]=(-r-Math.sqrt(a))/(2*i)),t},squareFree:function(){var e=this.clone(),t=1,i=e.clone().diff(),r=e.clone().gcd(i),n=e.divide(r)[0],a=x.fromArray([new g(1)],e.variable);while(!r.equalsNumber(1)){var o=n.gcd(r),s=n.divide(o)[0];if(!s.equalsNumber(1)&&t>1){for(var l=s.clone(),u=1;u0){var r=e.Utils.firstObject(this.factors,null,!0);return this.add(t.symfunction(e.Settings.PARENTHESIS,[r.obj]).negate()),delete this.factors[r.key],this.length--,this}if(i.group===c){var n=this;i.multiplier.equals(1)||n.add(new y(i.multiplier)),i.each((function(e){n.add(e)}))}else{this.preAdd&&(i=this.preAdd(i)),this.pFactor&&(i=t.pow(i,new y(this.pFactor)));var a=i.isConstant();if(a&&i.equals(1))return this;var o=a?i.value:i.text();o in this.factors?(this.factors[o]=t.multiply(this.factors[o],i),this.factors[o].equals(1)&&(delete this.factors[o],this.length--)):(this.factors[o]=i,this.length++)}return this},A.prototype.toSymbol=function(){for(var i=new y(1),r=Object.values(this.factors).sort((function(e,t){return e.group>t.group})),n=0,a=r.length;ne.length&&(i=t,t=e,e=i),e.some((function(e){return t.indexOf(e)>-1}))},e.Utils.subFunctions=function(t,i){i=i||{};var r=[];return t.each((function(t){if(t.group===s||t.previousGroup===s){var n=e.Utils.text(t,"hash"),a=i[n];if(a)r.push(t.altVar(a));else{var o=t.fname+h(i).length;i[n]=o,r.push(t.altVar(o))}}else t.group===c||t.group===l||t.group===u?r.push(e.Utils.subFunctions(t,i)):r.push(t.text())})),t.group===u||t.group===l?t.altVar(e.Utils.inBrackets(r.join("+"))):t.group===c?t.altVar(e.Utils.inBrackets(r.join("*"))):t.text()},e.Utils.getFunctionsSubs=function(e){var i={};for(var r in e)i[e[r]]=t.parse(r);return i};var S=e.Algebra={version:"1.4.6",proots:function(i,r){r=r||7;var n=0,o=[],s=function(e,t,i){for(var r=E(e,t,i).concat(o),a=0;aa)throw new e.exceptions.ValueLimitExceededError("This utility accepts polynomials of degree up to "+a+". ");var s=[],l={};for(l.Degree=n,A=0;A=Math.abs(n.c)?(h=2,n.e=i/n.d,n.f=n.c/n.d,n.g=o*r,n.a3=n.e*(n.g+i)+n.h*(r/n.d),n.a1=-i+n.f*r,n.a7=n.h+(n.f+o)*i):(h=1,n.e=i/n.c,n.f=n.d/n.c,n.g=n.e*o,n.a3=n.e*i+(n.g+n.h/n.c)*r,n.a1=-i*(n.d/n.c)+r,n.a7=n.g*n.d+n.h*n.f+i)),h}function d(e,t,i,r,n,a,o,s,l){var u;if(3!=i)if(u=1==i?n:r,Math.abs(a.a1)>10*e*Math.abs(u)){a.a7/=a.a1,a.a3/=a.a1,o[0]=l[0],o[1]=-l[0]*a.a7+l[1];for(c=2;c=0?e:-e,o=-o+n*(n/Math.abs(i)),a=Math.sqrt(Math.abs(o))*Math.sqrt(Math.abs(i))):(o=-e/n*(i/n)+1,a=Math.sqrt(Math.abs(o))*Math.abs(n)),o>=0?(a=n>=0?-a:a,r.lr=(-n+a)/e,r.sr=0!=r.lr?i/r.lr/e:r.sr):(r.lr=r.sr=-n/e,r.si=Math.abs(a/e),r.li=-r.si)):r.lr=-t/e:r.sr=0!=t?-i/t:r.sr}function g(e,t,i,r,n,a,o,s,l,u,f,g){var v,y,b,w,x,A,k,S,M,N,z,L,C=new Object,E=0,_=0;i.NZ=0,A=r,S=n;do{if(C.li=C.lr=C.si=C.sr=0,m(1,A,S,C),i.szr=C.sr,i.szi=C.si,i.lzr=C.lr,i.lzi=C.li,Math.abs(Math.abs(i.szr)-Math.abs(i.lzr))>.01*Math.abs(i.lzr))break;for(c(o,A,S,l,a,s),y=Math.abs(-i.szr*s.b+s.a)+Math.abs(i.szi*s.b),N=Math.sqrt(Math.abs(S)),v=2*Math.abs(a[0]),x=-i.szr*s.b,z=1;z20)break;if(E>=2&&w<=.01&&y>=b&&!_){for(w=w10)break;if(b>=2&&Math.abs(g)<=.001*Math.abs(-g+f)&&h>p){v=1,t.a=f;break}for(p=h,l[0]=c=s[0],y=1;y10*Math.abs(s[w])*e)for(g=-m/c,s[0]=o[0],y=1;y10*Math.abs(s[w])*e?-m/c:0,f+=g}return v}function y(e,t,i,r,n,a,o,s,l,u,m,f){var y,b,w,x,A,k,S,M,N,z,L,C,E,_,T,B,I,q,D,O,R,F,P,V,U,K=new Object,H=new Object,G=new Array(t),j=new Array(t),Q=1;for(f.NZ=0,x=w=.25,A=r,M=n,K.b=K.a=0,c(l,m,n,s,u,K),y=K.a,b=K.b,H.h=H.g=H.f=H.e=H.d=H.c=H.a7=H.a3=H.a1=0,P=h(e,o,y,b,H,a,m,n,G),O=0;O0)return;if(Q=U=1,x*=.25,F||!R)Q=0;else for(D=0;D0)return;if(F=1,w*=.25,0!=Q){T=-(N+N),B=N*N;continue}}for(D=0;D1);var P=Number.MIN_VALUE/a,V=Math.cos(94*_),U=Math.sin(94*_),K=Math.sqrt(.5),H=-K;F.NZ=S=0,F.szr=F.szi=F.lzr=F.lzi=0;while(0==t[E])i[S]=r[S]=0,E--,S++;L=E+1;while(E>=1){if(E<=2){E<2?(i[e.Degree-1]=-t[1]/t[0],r[e.Degree-1]=0):(R.li=R.lr=R.si=R.sr=0,m(t[0],t[1],t[2],R),i[e.Degree-2]=R.sr,r[e.Degree-2]=R.si,i[e.Degree-1]=R.lr,r[e.Degree-1]=R.li);break}for(c=0,h=Number.MAX_VALUE,G=0;Gc&&(c=p),0!=p&&p=10||d>1&&Number.MAX_VALUE/d>=c)&&(d=0==d?Number.MIN_VALUE:d,N=Math.floor(Math.log(d)/T+.5),l=Math.pow(2,N),1!=l))for(G=0;G0);s=p;do{o=u=q[0];for(G=1;G.005);n=p;for(G=1;G20){e.Degree-=E;break}}}b(l,o,u,s);var w=s.length;for(A=0;A2?k:u[A];var S=x<0?"-":"";0===k&&(k=""),0===x&&(x=""),x=1===Math.abs(x)?S+"i":x?x+"*i":"";var M=k&&x?k+"+"+x:k+x;u[A]=M.replace(/\+\-/g,"-")}return u}},roots:function(i){if(i.isConstant(!0,!0))return e.Utils.nroots(i);var r=S.proots(i).map((function(e){return t.parse(e)}));return e.Vector.fromArray(r)},froot:function(t,i,r){var n=function(i){var n=1e-12,a=r||e.Utils.build(e.Calculus.diff(t.clone())),o=t instanceof Function?t:e.Utils.build(t),s=1e4,l=!1,u=0;while(!l){var c=i-o(i)/a(i),h=Math.abs(c)-Math.abs(i),d=Math.abs(h);i=c,ds&&(i=null,l=!0),u++}return i};return n(Number(i))},quad:function(e,i,r){var n=function(e,i,r,n){return t.parse("-("+i+"+"+n+"*sqrt(("+i+")^2-4*("+e+")*("+r+")))/(2*"+e+")")};return[n(e,i,r,1),n(e,i,r,-1)]},sumProd:function(e,t){return S.quad(-t,e,-1).map((function(e){return e.invert()}))},coeffs:function(e,i,r){i=String(i),e=t.expand(e),r=r||[new y(0)],e.group===o&&e.contains(i,!0)&&t.error("Unable to get coefficients using expression "+e.toString());var n=p(e);if(1!==n.length||n[0]!==i||e.isImaginary())if(i||t.error("Polynomial contains more than one variable. Please specify which variable is to be used!"),-1===n.indexOf(i))r[0]=t.add(e,r[0]);else if(r=r||[new y(0)],e.group===c){var a=e.symbols[i];a||t.error("Expression is not a polynomial!");var s=Number(a.power);m=t.divide(e.clone(),a.clone()),(m.contains(i,!0)||s<0||!v(s))&&t.error("Expression is not a polynomial!");f=r[s];f&&(m=t.add(f,m)),r[s]=m}else e.group===u&&e.each((function(e){S.coeffs(e.clone(),i,r)}),!0);else for(var l=new x(e).coeffs.map((function(e){return new y(e)})),h=0,d=l.length;h2)return i;var l=t.multiply(t.parse(a[0]),t.parse(s[0])),u=t.parse(a[1]).negate(),h=t.parse(s[1]),d=S.quad(h,u,l).filter((function(t){if(e.Utils.isInt(t))return t}));if(1===d.length){var p=d[0],f=t.divide(a[0],t.parse(p));e.Utils.isInt(f)&&(r.add(t.parse(m("({0})*({1})+({2})",s[1],n,f))),r.add(t.parse(m("({0})*({1})+({2})",s[0],n,p))),i=new y(1))}}}return i},cubeFactor:function(e,i){if(e.isComposite()){var r=e.collectSymbols();if(2===r.length){var n=r[0].sign(),a=r[0].clone().abs(),o=r[1].sign(),s=r[1].clone().abs();if(a.isCube()&&s.isCube()){n0&&(r.preAdd=function(i){var r=t.parse(i,e.Utils.getFunctionsSubs(E));return r}),i.isLinear()||(r.pFactor=i.power.toString(),i.toLinear());var _=p(i);i.isImaginary()&&_.push(e.Settings.IMAGINARY);var T=_.length>1;if(T){var B=!0,I=!0;if(i.each((function(e){e.group!==a&&(B=!1),e.multiplier.equals(1)||(I=!1)})),B&&I)return t.pow(t.parse(i,e.Utils.getFunctionsSubs(E)),t.parse(k))}var q=new A;i=S.Factor.coeffFactor(i,q),q.each((function(e){d(k)&&e.lessThan(0)&&e.negate(),C<0&&e.invert(),r.add(e)}));var D=new A;if(i=S.Factor.powerFactor(i,D),D.each((function(e){C<0&&e.invert(),r.add(e)})),T)i=S.Factor.cubeFactor(i,r),i=S.Factor.mfactor(i,r),r.each((function(e){C<0&&e.power.negate()}));else{var O=_[0];i=S.Factor.squareFree(i,r,O);var R=new A;i=S.Factor.trialAndError(i,R,O);var F=R.toSymbol();if(F.equals(l))return F;for(var P in R.factors){var V=R.factors[P];r.add(t.pow(V,t.parse(k)))}i.equals(l)&&(i=S.Factor.quadFactor(i,r))}i=t.parse(i,e.Utils.getFunctionsSubs(E));var U=1===r.length;r.add(t.pow(i,t.parse(k)));z=r.toSymbol();return U&&i.equals(1)&&z.isLinear()&&(z=t.pow(z,t.parse(k))),z}return i}catch(K){return l}},reduce:function(e,i){if(e.group===u&&2===e.length){var r=e.collectSymbols().sort((function(e,t){return t.multiplier-e.multiplier}));if(r[0].power.equals(r[1].power)){var n=t.parse(r[0].power),a=r[0].clone().toLinear(),o=r[1].clone().toLinear();i.add(t.add(a.clone(),o.clone())),o.negate();for(var s=Number(n),l=new y(0),c=1;c<=s;c++){var h=t.pow(a.clone(),t.subtract(n.clone(),new y(c))),d=t.pow(o.clone(),t.subtract(new y(c),new y(1)));l=t.add(l,t.multiply(h,d))}return l}}return e},squareFree:function(e,t,i){if(e.isConstant()||e.group===a)return e;var r=new x(e,i),n=r.squareFree(),o=n[2];if(1!==o){var s=n[1].toSymbol();s.power=s.power.multiply(new g(o)),t.add(S.Factor.factor(s));var l=S.Factor.squareFree(n[0].toSymbol(),t);return l}return e},powerFactor:function(i,r){if(i.group!==l||i.previousGroup===o)return i;var n=h(i.symbols);if(!e.Utils.allNumeric(n))return i;var a=e.Utils.arrayMin(n),s=new y(0),u=t.parse(i.value+"^"+a);return i.each((function(e){e=t.divide(e,u.clone()),s=t.add(s,e)})),r.add(u),s},coeffFactor:function(t,i){if(t.isComposite()){var r=e.Math2.QGCD.apply(null,t.coeffs());if(r.equals(1)){var n=function(e){var t;return e.group===c?(t=0,e.each((function(e){t+=e.power}))):t=Number(e.power),t},a=t.collectSymbols(null,null,null,!0).sort((function(e,t){return e.isConstant(!0)?1:t.power-e.power})),o=a[0];(n(o)>n(a[1])||a[1].isConstant(!0))&&o.multiplier.lessThan(0)&&(i.add(new y(-1)),t.each((function(e){e.negate()}),!0))}else t.each((function(e){e.isComposite()?e.each((function(e){e.multiplier=e.multiplier.divide(r)})):e.multiplier=e.multiplier.divide(r)})),t.updateHash();i&&i.add(new y(r))}return t},trialAndError:function(t,i,r){var n=t.clone();try{var o=[];if(t.isConstant()||t.group===a)return t;for(var s=new x(t,r),l=s.coeffs[0],u=e.Math2.ifactor(l),c=S.proots(t),h=0;h1){var u=t.divide(l);if(u[1].equalsNumber(0))return i.add(l.toSymbol()),[u[0],l]}return null},o=t.coeffs[0],s=e.Math2.ifactor(o),l=t.lc(),u=e.Math2.ifactor(l),c=t.sub(r),h=e.Math2.ifactor(c),d=S.Factor.mix(h,c<0),p=Math.ceil(t.coeffs.length/2),m=l.lessThan(0),f=o.lessThan(0);u["1"]=1,s["1"]=1;while(p--)for(var g in u)for(var v in s)for(var y=0;y1)return;if(t)for(a=0;ay){o=[h,p,l];break}if(y>b){o=[c,d,i];break}}else if(o=z(l),o)break;o=z(l)}if(!o)return z(e[0],!0);for(s=0;sB[0].count?B:T,q=L(I),D=[];if(q){var O=q[1],R=function(e,t){return!e[0].sum.equals(t[0].sum)||e.length>=t.length},F=function(e,t,i){for(var r=[],n=0;ni&&n.greaterThan(a)?r-i:n.subtract(a)};O=F(T,B,O),T.sort(P),B.sort(P);var V=B[0],U=T[0],K=new k(new g(1),[],U.map);if(V.sum.greaterThan(U.sum)&&U.len()>1)for(var H=0;HY)throw new e.exceptions.InfiniteLoopError("Unable to compute!");M=T[0].divide(B[0]);D.push(M),T.shift();for(H=1;H=B.length)for(H=1;H=Number(S.degree(s,r))?(b=S.div(o.clone(),t.expand(s.clone())),w=b[0],o=b[1],c=o.groupTerms(r)):w=new y(0),1===Number(S.degree(s,r))){var L=t.divide(o,s);return n?[w,L]:t.add(w,L)}u=S.Factor.factor(s),k=S.PartFrac.createTemplate(s.clone(),u,[],r),M=k[0],x=k[1],h=k[2],v=[c.length],d=[],l=[],A=[],x.map((function(e,i){N=M[i],z=h[i];for(var n=0;n1)throw new Error("You must specify the variable for multivariate polynomials!");if(0===s.length)return new y(0);r=t.parse(s[0])}var l=i.group;i.isComposite()?(i=i.clone(),i.distributeExponent(),i.each((function(e){n.depth++,S.degree(e,r,n),n.depth--}))):i.group===c?i.each((function(e){n.depth++,S.degree(e,r,n),n.depth++})):l===o&&i.value===r.value?n.sd.push(i.power.clone()):l===a&&i.value===r.value?n.nd.push(t.parse(i.power)):n.nd.push(new y(0));var u=n.nd.length>0?e.Utils.arrayMax(n.nd):void 0;return 0===n.depth&&n.sd.length>0?(void 0!==u&&n.sd.unshift(u),t.symfunction("max",n.sd)):(e.Utils.isSymbol(u)||(u=t.parse(u)),u)},sqComplete:function(i,r,n){e.Utils.isSymbol(r)||(r=t.parse(r));var a,o,s,l,u,c,h,d,p,m,f,g=function(t){throw t=t||"Stopping",new e.exceptions.ValueLimitExceededError(t)};return i.isPoly(!0)||g("Must be a polynomial!"),p=e.Utils.inBrackets,i=i.clone(),a=e.Algebra.degree(i,r),a.equals(2)||g("Cannot complete square for degree "+a),h=e.Algebra.coeffs(i,r),o=h[2],d=h[1].sign(),s=t.divide(h[1],new y(2)),l=t.pow(s.clone(),new y(2)),n?[o,s,u]:(f=w.sqrt(o),c=t.divide(w.sqrt(l),f.clone()),u=t.subtract(h[0],t.pow(c.clone(),new y(2))),m=t.parse(p(f.clone()+"*"+r+(d<0?"-":"+")+c)),{a:m,c:u,f:t.add(t.pow(m.clone(),new y(2)),u.clone())})},Simplify:{strip:function(e){var i=t.parse(e.multiplier);e.toUnitMultiplier();var r=t.parse(e.power);return e.toLinear(),[i,r,e]},unstrip:function(e,i){var r=e[0],n=e[1];return t.multiply(r,t.pow(i,n))},complexSimp:function(e,i){var r,n,a,o,s,l,u,c,h;return l=e.realpart(),c=e.imagpart(),u=i.realpart(),h=i.imagpart(),r=t.multiply(l.clone(),u.clone()),n=t.multiply(c.clone(),h.clone()),a=t.multiply(u.clone(),c),o=t.multiply(l,h.clone()),s=t.add(t.pow(u,new y(2)),t.pow(h,new y(2))),t.divide(t.add(t.add(r,n),t.multiply(t.subtract(a,o),y.imaginary())),s)},trigSimp:function(i){if(i.containsFunction(["cos","sin","tan"])){i=i.clone();var r=S.Simplify.strip(i);i=r.pop();var n=i.clone();if(i.group===u){var a=new y(0);i.each((function(e){var i=S.Simplify.trigSimp(e.fnTransform());a=t.add(a,i)}),!0),n=t.pow(t.multiply(new y(i.multiplier),a),new y(i.power))}else if(i.group===c){var o=i.getNum(),s=i.getDenom();if("sin"===o.fname&&"cos"===s.fname&&o.args[0].equals(s.args[0])&&o.power.equals(s.power)&&(n=t.parse(e.Utils.format("({0})*({1})*tan({2})^({3})",s.multiplier,o.multiplier,o.args[0],o.power))),n.group===c){var l=new y(1);n.each((function(i){"tan"===i.fname&&(i=t.parse(e.Utils.format("({0})*sin({1})^({2})/cos({1})^({2})",i.multiplier,S.Simplify.simplify(i.args[0]),i.power))),l=t.multiply(l,i)})),n=l}}n=S.Simplify.unstrip(r,n).distributeMultiplier(),i=n}return i},fracSimp:function(e){var i=e.getDenom(),r=e.getNum();if(r.isImaginary()&&i.isImaginary()&&(e=S.Simplify.complexSimp(r,i)),e.isComposite()){e.power>1&&(e=t.expand(e));var n,a,o,s,l,u,c,h,d,p,m,f=e.collectSymbols();a=f.pop();while(f.length)o=f.pop(),s=t.parse(a.getDenom()),l=t.parse(o.getDenom()),u=a.getNum(),c=o.getNum(),m=t.multiply(s.clone(),l.clone()),d=t.multiply(u,l),p=t.multiply(c,s),h=t.add(d,p),a=t.divide(h,m);return i=t.expand(a.getDenom()),r=t.expand(a.getNum()),n=r.isImaginary()&&i.isImaginary()?S.Simplify.complexSimp(r,i):t.divide(r,i),n.equals(e)?e:S.Simplify.simplify(n)}return e},ratSimp:function(e){if(e.group===c){var i=e.getDenom(),r=e.getNum().distributeMultiplier(),n=S.Simplify.fracSimp(i),a=S.Simplify.fracSimp(r);e=t.divide(a,n)}return e},sqrtSimp:function(e,r){if(e.isSQRT()){var n,a=S.Factor.factor(e.args[0].clone()),o=t.parse(a.multiplier),s=o.sign(),l=t.sqrt(o.abs());if(v(l)){if(a.group===c){var u=new y(1);a.each((function(e){if(e.group===i){var r=t.sqrt(e.clone());v(r)?l=t.multiply(l,r):u=t.multiply(u,e)}else u=t.multiply(u,e)}));var h=t.multiply(u,t.parse(s));n=t.sqrt(h.clone()),n.isImaginary&&(n=t.sqrt(t.expand(h.clone())))}else n=t.sqrt(a.clone().toUnitMultiplier());return t.multiply(l,n)}}else e.isComposite()&&e.isLinear()?(l=new y(0),e.each((function(e){l=t.add(l,S.Simplify.sqrtSimp(e))}),!0),l=t.multiply(l,t.parse(e.multiplier))):e.group===c&&(l=t.parse(e.multiplier),e.each((function(e){var i=S.Simplify.sqrtSimp(e);l=t.multiply(l,i)}),!0),l=t.pow(l,t.parse(e.power)));return l||t.parse(e)},patternSub:function(t){var i={},r=function(e){var t=!1;return e.each((function(e){e.group===u?t=!0:e.symbols&&(t=r(e))})),t},n=function(a){a.each((function(a){if(a.symbols||a.group===s)if(r(a))n(a);else if(!i[a.value]){var o=e.Utils.getU(t);i[a.value]=o,t=t.sub(a.value,o)}}),!0)};return n(t),[t,i]},simplify:function(i){var r=S.Simplify.strip(i);if(i=r.pop(),i=S.Simplify.fracSimp(i),i.isConstant()||i.group===e.groups.S){r.push(i);var n=S.Simplify.unstrip(r,i);return n}var a=i.clone();if(a=S.Simplify.trigSimp(a),a=S.Simplify.ratSimp(a),a=S.Factor.factor(a),a.group===e.groups.CP&&a.isLinear()){var o=a.multiplier.clone();a.toUnitMultiplier();var s=new y(0);a.each((function(e){var i=S.Simplify.simplify(e);s=t.add(s,i)})),a=s,s.multiplier=s.multiplier.multiply(o)}var l=S.Simplify.unstrip(r,a);return l}},Classes:{Polynomial:x,Factors:A,MVTerm:k}};e.Expression.prototype.simplify=function(){return S.Simplify.simplify(this.symbol)},r.useAlgebraDiv=function(){var i=S.divideFn=t.divide,r=0;t.divide=function(t,n){var a;return r++,a=1===r?e.Algebra.divide(t,n):i(t,n),r=0,a}},r.useParserDiv=function(){S.divideFn&&(t.divide=S.divideFn),delete S.divideFn},r.register([{name:"factor",visible:!0,numargs:1,build:function(){return S.Factor.factor}},{name:"simplify",visible:!0,numargs:1,build:function(){return S.Simplify.simplify}},{name:"gcd",visible:!0,numargs:[1],build:function(){return S.gcd}},{name:"lcm",visible:!0,numargs:[1],build:function(){return S.lcm}},{name:"roots",visible:!0,numargs:-1,build:function(){return S.roots}},{name:"divide",visible:!0,numargs:2,build:function(){return S.divide}},{name:"div",visible:!0,numargs:2,build:function(){return S.div}},{name:"partfrac",visible:!0,numargs:[1,2],build:function(){return S.PartFrac.partfrac}},{name:"deg",visible:!0,numargs:[1,2],build:function(){return S.degree}},{name:"coeffs",visible:!0,numargs:[1,2],build:function(){var t=function(){var t=S.coeffs.apply(S,arguments);return new e.Vector(t)};return t}},{name:"line",visible:!0,numargs:[2,3],build:function(){return S.line}},{name:"sqcomp",visible:!0,numargs:[1,2],build:function(){var e=function(e,t){try{t=t||p(e)[0];var i=S.sqComplete(e.clone(),t);return i.f}catch(r){return e}};return e}}]),r.updateAPI()}()},481:function(e,t,i){if(i(1703),i(7658),i(541),"undefined"===typeof r){var r=i(5923);i(6826)}(function(){"use strict";var e=r.getCore(),t=e.PARSER,i=e.Frac,n=e.Settings,a=e.Utils.isSymbol,o=e.groups.FN,s=e.Symbol,l=e.Utils.text,u=e.Utils.inBrackets,c=e.Utils.isInt,h=e.Utils.format,d=e.Utils.even,p=e.Utils.evaluate,m=e.groups.N,f=e.groups.S,g=(o=e.groups.FN,e.groups.PL),v=e.groups.CP,y=e.groups.CB,b=e.groups.EX,w=e.groups.P,x=n.LOG,A="exp",k="abs",S="sqrt",M="sin",N="cos",z="tan",L="sec",C="csc",E="cot",_="asin",T="acos",B="atan",I="asec",q="acsc",D="acot",O="sinh",R="cosh",F="tanh",P="csch",V="sech",U="coth",K="asech",H="acsch",G="acoth";function j(e){this.message=e||""}j.prototype=new Error,s.prototype.hasIntegral=function(){return this.containsFunction("integrate")},s.prototype.fnTransform=function(){if(this.group!==o)return this;var e,i=this.args[0],r=new s(this.multiplier),n=this.clone().toUnitMultiplier();if(this.isLinear())switch(this.fname){case O:e=t.parse(h("(e^({0})-e^(-({0})))/2",i));break;case R:e=t.parse(h("(e^({0})+e^(-({0})))/2",i));break;case F:e=t.parse(h("(e^({0})-e^(-({0})))/(e^({0})+e^(-({0})))",i));break;case z:e=t.parse(h("sin({0})/cos({0})",i));break;case C:e=t.parse(h("1/sin({0})",i));break;case L:e=t.parse(h("1/cos({0})",i));break;default:e=n}else if(this.power.equals(2))switch(this.fname){case M:e=t.parse(h("1/2-cos(2*({0}))/2",i));break;case N:e=t.parse(h("1/2+cos(2*({0}))/2",i));break;case z:e=t.parse(h("sin({0})^2/cos({0})^2",i));break;case R:e=t.parse(h("1/2+cosh(2*({0}))/2",i));break;case O:e=t.parse(h("-1/2+cosh(2*({0}))/2",i));break;case F:e=t.parse(h("(1+cosh(2*({0})))/(-1+cosh(2*({0})))",i));break;case L:e=t.parse(h("(1-cos(2*({0})))/(1+cos(2*({0})))+1",i));break;default:e=n}else if(this.fname===L)e=t.parse(h("1/cos({0})^({1})",this.args[0],this.power));else if(this.fname===C)e=t.parse(h("1/sin({0})^({1})",this.args[0],this.power));else if(this.fname===z)e=this.power.lessThan(0)?t.parse(h("cos({0})^(-({1}))/sin({0})^({1})",this.args[0],this.power.negate())):t.parse(h("sin({0})^({1})/cos({0})^({1})",this.args[0],this.power));else if(this.fname===M&&this.power.lessThan(0))e=t.parse(h("csc({0})^(-({1}))",this.args[0],this.power.negate()));else if(this.fname===N&&this.power.lessThan(0))e=t.parse(h("sec({0})^(-({1}))",this.args[0],this.power.negate()));else if(this.fname===M&&this.power.equals(3))e=t.parse(h("(3*sin({0})-sin(3*({0})))/4",this.args[0]));else if(this.fname===N&&this.power.equals(3))e=t.parse(h("(cos(3*({0}))+3*cos({0}))/4",this.args[0]));else if(this.fname!==N&&this.fname!==M||!d(this.power))e=n;else{var a=this.power/2,l=t.pow(this.clone().toLinear(),t.parse(2)).fnTransform(),u=t.expand(t.pow(l,t.parse(a)));e=new s(0),u.each((function(i){var r=i.fnTransform();e=t.add(e,r)}),!0)}return t.multiply(e,r)},s.prototype.hasTrig=function(){if(this.isConstant(!0)||this.group===f)return!1;if(this.fname&&(e.Utils.in_trig(this.fname)||e.Utils.in_inverse_trig(this.fname)))return!0;if(this.symbols)for(var t in this.symbols)if(this.symbols[t].hasTrig())return!0;return!1},e.Expression.prototype.hasIntegral=function(){return this.symbol.hasIntegral()},e.Utils.toCommonDenominator=function(i){if(i.isComposite()&&i.isLinear()){var r=new s(i.multiplier),n=new s(1),a=new s(0);i.each((function(e){n=t.multiply(n,e.getDenom())}),!0),i.each((function(e){var i=e.getNum(),r=e.getDenom(),o=t.multiply(i,t.divide(n.clone(),r));a=t.add(a,o)}));var o=t.multiply(r,e.Algebra.divide(t.expand(a),t.expand(n)));return o}return i},e.Utils.in_inverse_trig=function(e){var t=[_,T,B,q,I,D];return-1!==t.indexOf(e)},e.Utils.in_trig=function(e){var t=[N,M,z,L,C,E];return-1!==t.indexOf(e)},e.Utils.in_htrig=function(e){var t=[O,R,F,H,K,G];return-1!==t.indexOf(e)},e.Matrix.jacobian=function(t,i){var r=new e.Matrix;return i||(i=e.Utils.arrayGetVariables(t)),i.forEach((function(i,n){t.forEach((function(t,a){var o=e.Calculus.diff(t.clone(),i);r.set(a,n,o)}))})),r},e.Matrix.prototype.max=function(){var e=new s(0);return this.each((function(t){var i=t.abs();i.gt(e)&&(e=i)})),e},e.Matrix.cMatrix=function(i,r){var n=new e.Matrix;return r.forEach((function(e,r){n.set(r,0,t.parse(i))})),n};var Q=e.Utils.all_functions=function(e){for(var t=0,i=e.length;t1&&(d--,r=J.diff(r,c,d)),r;function Z(e){return(e.value===O||e.contains(O,!0))&&(e.multiplier=e.multiplier.multiply(e.power),e.power=e.power.subtract(new i(1)),e.power.equals(0)&&(e=s(e.multiplier))),e}function Y(e){var r,d,p=e.group;if(p===m||p===f&&e.value!==O||p===w)e=s(0);else if(p===f)e=Z(e);else{if(p===y){var A=e.multiplier.clone();e.toUnitMultiplier();var S=t.multiply($(e),Z(e));return S.multiplier=S.multiplier.multiply(A),S}if(p===o&&e.power.equals(1))switch(e.fname){case x:d=e.clone(),e=e.args[0].clone(),e.power=e.power.negate(),e.multiplier=d.multiplier.divide(e.multiplier);break;case N:e.fname=M,e.multiplier.negate();break;case M:e.fname=N;break;case z:e.fname=L,e.power=new i(2);break;case L:e=X(e,z);break;case C:e=X(e,"-cot");break;case E:e.fname=C,e.multiplier.negate(),e.power=new i(2);break;case _:e=t.parse("(sqrt(1-("+l(e.args[0])+")^2))^(-1)");break;case T:e=t.parse("-(sqrt(1-("+l(e.args[0])+")^2))^(-1)");break;case B:e=t.parse("(1+("+l(e.args[0])+")^2)^(-1)");break;case k:A=e.multiplier.clone(),e.toUnitMultiplier(),r=e.args[0].clone(),r.toUnitMultiplier(),e=t.parse(u(l(e.args[0]))+"/abs"+u(l(r))),e.multiplier=A;break;case"parens":e=s(1);break;case"cosh":e.fname="sinh";break;case"sinh":e.fname="cosh";break;case F:e.fname=V,e.power=new i(2);break;case V:e=X(e,"-tanh");break;case P:var R=String(e.args[0]);return t.parse("-coth("+R+")*csch("+R+")");case U:R=String(e.args[0]);return t.parse("-csch("+R+")^2");case"asinh":e=t.parse("(sqrt(1+("+l(e.args[0])+")^2))^(-1)");break;case"acosh":e=t.parse("(sqrt(-1+("+l(e.args[0])+")^2))^(-1)");break;case"atanh":e=t.parse("(1-("+l(e.args[0])+")^2)^(-1)");break;case K:R=String(e.args[0]);e=t.parse("-1/(sqrt(1/("+R+")^2-1)*("+R+")^2)");break;case G:e=t.parse("-1/(("+e.args[0]+")^2-1)");break;case H:R=String(e.args[0]);e=t.parse("-1/(sqrt(1/("+R+")^2+1)*("+R+")^2)");break;case I:R=String(e.args[0]);e=t.parse("1/(sqrt(1-1/("+R+")^2)*("+R+")^2)");break;case q:R=String(e.args[0]);e=t.parse("-1/(sqrt(1-1/("+R+")^2)*("+R+")^2)");break;case D:e=t.parse("-1/(("+e.args[0]+")^2+1)");break;case"S":R=String(e.args[0]);e=t.parse("sin((pi*("+R+")^2)/2)");break;case"C":R=String(e.args[0]);e=t.parse("cos((pi*("+R+")^2)/2)");break;case"Si":R=e.args[0];e=t.parse("sin("+R+")/("+R+")");break;case"Shi":R=e.args[0];e=t.parse("sinh("+R+")/("+R+")");break;case"Ci":R=e.args[0];e=t.parse("cos("+R+")/("+R+")");break;case"Chi":R=e.args[0];e=t.parse("cosh("+R+")/("+R+")");break;case"Ei":R=e.args[0];e=t.parse("e^("+R+")/("+R+")");break;case"Li":R=e.args[0];e=t.parse("1/"+n.LOG+"("+R+")");break;case"erf":e=t.parse("(2*e^(-("+e.args[0]+")^2))/sqrt(pi)");break;case"atan2":var j=String(e.args[0]),Q=String(e.args[1]);e=t.parse("("+Q+")/(("+Q+")^2+("+j+")^2)");break;case"sign":e=new s(0);break;case"sinc":e=t.parse(h("(({0})*cos({0})-sin({0}))*({0})^(-2)",e.args[0]));break;case n.LOG10:e=t.parse("1/(("+e.args[0]+")*"+n.LOG+"(10))");break;default:e=t.symfunction("diff",[e,c])}else if(p===b||p===o&&a(e.power)){var W;W=p===b?e.value:p===o&&e.contains(O)?e.fname+u(l(e.args[0])):e.value+u(l(e.args[0])),t.multiply(t.parse(x+u(W)),e.power.clone()),r=J.diff(t.multiply(t.parse(x+u(W)),e.power.clone()),O),e=t.multiply(e,r)}else if(p!==o||e.power.equals(1)){if(p===v||p===g){var ee=e.clone(),te=new s(0);for(var ie in e.symbols)te=t.add(te,J.diff(e.symbols[ie].clone(),O));e=t.multiply(Z(ee),te)}}else r=e.clone(),r.toLinear(),r.toUnitMultiplier(),e=t.multiply(Z(e.clone()),Y(r))}return e.updateHash(),e}function X(e,i,r){return t.multiply(e,t.parse(i+u(r||l(e.args[0]))))}function $(e){for(var i=e.collectSymbols(),r=new s(0),n=i.length,a=0;a0){if(d>1){c=new s(1);for(var p=0;pe.Settings.integration_depth&&J.integration.stop("Maximum depth reached. Exiting!"),Z.contains(W,!0)){if(Y===f)w=J.integration.poly_integrate(Z,W,p);else if(Y===b)if(Z.previousGroup===o&&"sqrt"!==Z.fname&&Z.fname!==n.PARENTHESIS&&J.integration.stop(),Z.contains(W)&&Z.previousGroup!==o)if(Z.power.contains(W))J.integration.stop();else{var $=J.diff(Z.clone().toLinear(),W);$.contains(W)&&J.integration.stop(),w=J.integration.poly_integrate(Z,W,p)}else{var ee=J.diff(Z.power.clone(),W);if(ee.contains(W)){var te=ee.stripVar(W),ie=t.divide(ee.clone(),te.clone());if(ie.group===f&&ie.isLinear())return te.multiplier=te.multiplier.divide(new i(2)),t.parse(h("({2})*(sqrt(pi)*erf(sqrt(-{0})*{1}))/(2*sqrt(-{0}))",te,W,Z.multiplier));J.integration.stop()}if(Z.isE())ee.isLinear()?w=Z:ee.isE()&&ee.power.group===f&&ee.power.power.equals(1)?w=t.multiply(t.symfunction("Ei",[Z.power.clone()]),Z.power):J.integration.stop();else{var re=t.symfunction(x,[t.parse(Z.value)]);w=t.divide(Z,re)}w=t.divide(w,ee)}else if(Z.isComposite()&&Z.isLinear()){var ne=t.parse(Z.multiplier);Z.toUnitMultiplier(),w=new s(0),Z.each((function(e){w=t.add(w,J.integrate(e,W,p))})),w=t.multiply(ne,w)}else if(Y===v)if(Z.power.greaterThan(1)&&(Z=t.expand(Z)),Z.power.equals(1))w=new s(0),Z.each((function(e){w=t.add(w,J.integrate(e,W,p))}),!0);else{var ae=Number(Z.power);ne=Z.multiplier.clone();Z.toUnitMultiplier();var oe=Z.clone().toLinear(),se=J.integration.decompose_arg(oe,W),le=se[3],ue=se[2];ee=se[0],ie=se[1];if(-1===ae&&ie.group!==g&&ie.power.equals(2)){var ce=!c(le)||le>0;if(ie.group===f&&ie.power.equals(2)&&ce){var he=function(e){var i=new s(1);return e.each((function(e){i=t.multiply(i,"abs"===e.fname?e.args[0]:e)})),i},de=ee.clone(),pe=le.clone();de=t.pow(de,new s(.5)),pe=t.pow(pe,new s(.5));re=t.multiply(he(pe),he(de));var me=t.symfunction(B,[t.divide(t.multiply(ee,ie.toLinear()),re.clone())]);w=t.divide(me,re)}else if(ie.group===f&&ie.isLinear())w=t.divide(J.integration.poly_integrate(Z),ee);else if(ie.power.equals(4)){var fe,ge,ve,ye,be,we,xe=u;de=t.parse(S+xe(ee)+"*"+W+"^2"),pe=t.parse(S+xe(2)+"*"+xe(ee)+"^"+xe("1/4")+"*"+xe(le)+"^"+xe("1/4")+"*"+W),fe=t.parse(S+xe(le)),qe=t.add(t.add(de.clone(),pe.clone()),fe.clone()),at=t.add(t.subtract(de,pe),fe),ge=t.parse(S+xe(2)+"*"+xe(le)+"^"+xe("3/4")),ve=t.parse(S+xe(le)+"*"+xe(le)+"^"+xe("1/4")+"*"+W),ye=t.parse("2*"+xe(le)+"*"+S+xe(2)+"*"+xe(le)+"^"+xe("1/4")),be=t.divide(t.subtract(ge.clone(),ve.clone()),t.multiply(ye.clone(),at)),we=t.divide(t.add(ge,ve),t.multiply(ye,qe.clone())),w=t.add(J.integrate(be,W,p,m),J.integrate(we,W,p,m))}else w=J.integration.partial_fraction(Z,W,p)}else if(-.5===ae)if(ie.group===f&&ie.power.equals(2))if(ue.multiplier.lessThan(0)&&!le.multiplier.lessThan(0))if(ee.negate(),le.isConstant()&&ee.isConstant()){re=t.symfunction(S,[ee.clone()]);var Ae=t.symfunction(S,[t.multiply(ee.clone(),le)]);w=t.divide(t.symfunction(_,[t.divide(ue.toLinear(),Ae)]),re)}else{var ke=t.symfunction(S,[ee]),Se=t.multiply(ke.clone(),ie.clone().toLinear());w=t.divide(t.symfunction(B,[t.divide(Se,t.symfunction(S,[oe.clone()]))]),ke)}else J.integration.stop();else J.integration.stop();else if(.5===ae&&ie.power.equals(2)&&ee.greaterThan(0))J.integration.stop();else if(ie.isLinear()&&ie.group!==g)w=t.divide(J.integration.poly_integrate(Z),ee);else{if(ie.power.equals(2)&&ee.greaterThan(0)){var Me,Ne,ze,Le,Ce,Ee;Me=t.parse(S+u(ee)),Ne=t.parse(S+u(le)),ze=t.multiply(Me.clone(),Ne.clone()).invert(),Le=t.pow(le,new s(Z.power)),Ee=e.Utils.getU(Z),Pe=t.multiply(ze,ie.clone().toLinear()),Ce=t.parse(B+u(Pe));var _e=2*(Math.abs(Z.power)-1),Te=J.integrate(t.parse(N+u(Ee)+"^"+_e));return e.Utils.clearU(Ee),t.multiply(Te.sub(Ee,Ce),Le)}if(Z.group===y||Z.power.lessThan(0)){me=Z.clone().toLinear();var Be=e.Algebra.Factor.factor(me),Ie=Be.toString()!==me.toString();if(e.Algebra.degree(me,t.parse(W)).equals(2)&&!Ie)try{var qe,De,Oe;Oe=e.Algebra.sqComplete(me,W),Pe=e.Utils.getU(me),qe=Oe.f.sub(Oe.a,Pe),De=t.pow(qe,t.parse(Z.power)),w=J.integrate(De,Pe).sub(Pe,Oe.a)}catch(ri){J.integration.stop()}else w=J.integration.partial_fraction(Z,W,p,m)}else w=J.integration.by_parts(Z,W,p,m)}w.multiplier=w.multiplier.multiply(ne)}else if(Y===o){var Re=Z.args[0];ne=Z.multiplier.clone();Z.toUnitMultiplier();se=J.integration.decompose_arg(Re,W),ee=se[0],ie=se[1];var Fe=Z.fname;if(Fe===x||Fe===_||Fe===T||Fe===B&&ie.isLinear()){ae=Z.power.toString();if(c(ae)&&(p-=ae),Re.isComposite()){var Pe=e.Utils.getU(Z),Ve=(me=t.pow(t.parse(x+u(Pe)),new s(ae)),J.diff(Re,W)),Ue=t.multiply(me,Ve);Te=J.integrate(Ue,Pe,p,m);w=t.multiply(t.parse(ne),Te.sub(Pe,Re))}else w=t.multiply(t.parse(ne),J.integration.by_parts(Z,W,p,m))}else{if(Fe===z&&Z.power.lessThan(0)){var Ke=Z.clone();return Ke.power.negate(),Ke.fname=E,t.multiply(t.parse(ne),J.integrate(Ke,W,p))}if(!ee.contains(W,!0)&&Z.isLinear())if(Fe===k){ie=t.divide(Re.clone(),ee.clone());if(ie.group!==f||ie.power.lessThan(0))J.integration.stop();else if(e.Utils.even(ie.power))w=J.integrate(Re,W,p);else{var He=J.integrate(ie,W,p);He.power=He.power.subtract(new i(1)),w=t.multiply(t.multiply(t.symfunction(k,[ie.toLinear()]),He),ee)}}else{var Ge=Z.args[0].group,je=J.integration.decompose_arg(Re,W);switch((Ge!==v&&Ge!==f&&Ge!==y||!je[1].power.equals(1)||Re.hasFunc())&&J.integration.stop(),Fe){case N:w=t.symfunction(M,[Re]);break;case M:w=t.symfunction(N,[Re]),w.negate();break;case z:w=t.parse(h(n.LOG+"(sec({0}))",Re));break;case L:w=t.parse(h(n.LOG+"(tan({0})+sec({0}))",Re));break;case C:w=t.parse(h("-"+n.LOG+"(csc({0})+cot({0}))",Re));break;case E:w=t.parse(h(n.LOG+"(sin({0}))",Re));break;case O:w=t.symfunction(R,[Re]);break;case R:w=t.symfunction(O,[Re]);break;case F:w=t.parse(h(n.LOG+"(cosh({0}))",Re));break;case I:w=J.integration.by_parts(Z,W,p,m);break;case q:w=J.integration.by_parts(Z,W,p,m);break;case D:w=J.integration.by_parts(Z,W,p,m);break;case K:w=J.integration.by_parts(Z,W,p,m);break;case H:w=J.integration.by_parts(Z,W,p,m);break;case G:w=J.integration.by_parts(Z,W,p,m);break;case V:w=t.parse(h("atan(sinh({0}))",Re));break;case P:w=t.parse(h(n.LOG+"(tanh(({0})/2))",Re));break;case U:w=t.parse(h(n.LOG+"(sinh({0}))",Re));break;case A:w=J.integrate(t.parse(h("e^({0})",Re)),W,p);break;case"S":Re=Z.args[0].clone();var Qe=J.integration.decompose_arg(Re,W),We=Qe[1],Ze=Qe[0],Ye=Qe[3];w=t.parse(h("(cos((1/2)*pi*(({1})+({0})*({2}))^2)+pi*(({1})+({0})*({2}))*S(({1})+({0})*({2})))/(({0})*pi)",Ze,Ye,ie));break;case"C":Re=Z.args[0].clone(),Qe=J.integration.decompose_arg(Re,W),We=Qe[1],Ze=Qe[0],Ye=Qe[3];w=t.parse(h("(pi*(({1})+({0})*({2}))*C(({1})+({0})*({2}))-sin((1/2)*pi*(({1})+({0})*({2}))^2))/(({0})*pi)",Ze,Ye,We));break;case"erf":Re=Z.args[0].clone(),Qe=J.integration.decompose_arg(Re,W),We=Qe[1],Ze=Qe[0];w=t.parse(h("e^(-(({2}))^2)/(({0})*sqrt(pi))+(1/({0})+({1}))*erf(({2}))",Ze,We,Re));break;case"sign":w=t.multiply(Z.clone(),Re.clone());break;default:J.integration.stop()}w=t.divide(w,ee)}else if(ie.isLinear())if(Fe===N||Fe===M){ae=Number(Z.power);if(ae<0)Z.fname=Fe===M?C:L,Z.invert().updateHash(),w=J.integrate(Z,W,p);else{Re=Z.args[0];var Xe=Z.clone(),Je=Z.clone(),$e=new s((ae-1)/ae),et=t.multiply(ee.clone(),new s(ae)).invert();Xe.power=Xe.power.subtract(new i(1)),Je.power=Je.power.subtract(new i(2));$=t.symfunction(Fe===N?M:N,[Re.clone()]);Fe===M&&$.negate(),w=t.add(t.multiply(t.multiply(et,Xe),$),t.multiply($e,J.integrate(t.parse(Je),W,p)))}}else if(Fe===z||Fe===E){if(Z.args[0].isLinear(W)){_e=Z.power.subtract(new i(1)).toString();var tt=Z.clone().toUnitMultiplier(),it=t.parse(h((Fe===E?"-":"")+"1/({2}*{0})*{3}({1})^({0})",_e,Re,ee,Fe));tt.power=tt.power.subtract(new i(2)),tt.power.equals(0)&&(tt=t.parse(tt)),w=t.subtract(it,J.integrate(tt,W,p))}}else if(Fe===L||Fe===C){var rt=Z.power.subtract(new i(1)).toString(),nt=Z.power.subtract(new i(2)).toString(),at=Fe===L?z:E,ot=(tt=Z.clone().toUnitMultiplier(),h((Fe===C?"-":"")+"1/({0}*{1})*{4}({3})^({2})*{5}({3})",ee,rt,nt,Re,Fe,at));it=t.parse(ot);tt.power=tt.power.subtract(new i(2)),tt.power.equals(0)&&(tt=t.parse(tt)),w=t.add(it,t.multiply(new s(nt/rt),J.integrate(tt,W,p)))}else Fe!==R&&Fe!==O||!Z.power.equals(2)?J.integration.stop():w=J.integrate(Z.fnTransform(),W,p);else J.integration.stop();w.multiplier=w.multiplier.multiply(ne)}}else if(Y===g)w=J.integration.partial_fraction(Z,W,p);else if(Y===y){var st=Z.getDenom();st.group===f&&(Z=t.expand(Z));var lt=Z.stripVar(W),ut=t.divide(Z.clone(),lt.clone());if(lt.contains(W)&&(ut=t.multiply(ut,lt),lt=new s(1)),ut.group!==y){if(ut.equals(1))return J.integrate(t.expand(Z),W,p);ut.clone().toLinear().isPoly(!0)&&e.Utils.variables(ut).length>1&&(ut=e.Algebra.Factor.factor(ut)),w=J.integrate(ut,W,p)}else{var ct=ut.collectSymbols().sort((function(e,t){return e.group===t.group?Number(e.power)===Number(t.power)?ee.fname}));var yt=mt.args[0];(!yt.isLinear()||yt.group!==v&&yt.group!==y&&yt.group!==f)&&J.integration.stop();se=J.integration.decompose_arg(yt,W);ie=se[1],ee=se[0],ie.isLinear()||J.integration.stop();var bt=ft.args[0];if(yt.equals(bt))if(gt===M&&vt===N||gt===N&&vt===M)if(mt.power.lessThan(0)&&J.integration.stop(),gt===M&&mt.power.add(ft.power).equals(0))mt.fname=z,mt.updateHash(),w=J.integrate(mt,W,p);else if(d(mt.power)&&vt===N&&ft.power.lessThan(0)){_e=Number(mt.power)/2;var wt=t.parse(h("(1-cos({0})^2)^({1})",mt.args[0],_e));w=J.integrate(t.expand(t.multiply(wt,ft.clone())),W,p,m)}else if(d(mt.power)&&vt===M&&ft.power.lessThan(0)){_e=Number(mt.power)/2,wt=t.parse(h("(1-sin({0})^2)^({1})",mt.args[0],_e));w=J.integrate(t.expand(t.multiply(wt,ft.clone())),W,p,m)}else{var xt=e.Utils.even(mt.power),At=e.Utils.even(ft.power);if(w=new s(0),xt&&At){var kt=function(e){var i,r=e.power,n=r/2;return i=e.fname===N?"((1/2)+(cos(2*("+e.args[0]+"))/2))^"+n:"((1/2)-(cos(2*("+e.args[0]+"))/2))^"+n,t.parse(i)};ee=kt(mt),le=kt(ft),$=t.multiply(ee,le),Ke=t.expand($);return Ke.each((function(e){w=t.add(w,J.integrate(e,W,p))})),t.multiply(w,lt)}xt?(Pe=mt,tt=ft):(Pe=ft,tt=mt);var St=Pe.fname===N?-1:1,Mt=(_e=tt.power,(_e-1)/2),Nt=t.parse("(1-"+Pe.fname+e.Utils.inBrackets(yt)+"^2)^"+Mt),Ke=t.expand(t.multiply(new s(St),t.multiply(Pe.clone(),Nt)));Ke.each((function(e){w=t.add(w,J.integration.poly_integrate(e.clone()))}))}else if(gt===L&&vt===z&&ie.isLinear()&&ft.isLinear())w=t.parse(h("sec({0})^({1})/({1})",mt.args[0],mt.power));else if(gt===z&&vt===L&&ie.isLinear())if(mt.isLinear()&&ft.isLinear())w=t.divide(t.symfunction(L,[yt.clone()]),ee);else if(d(mt.power)){ae=Number(mt.power)/2,$=t.parse(h("(sec({0})^2-1)^({1})",mt.args[0],ae));w=J.integrate(t.expand(t.multiply($,ft)),W,p)}else J.integration.stop();else if(gt===L&&vt===N)mt.fname=N,mt.invert().updateHash(),w=J.integrate(t.multiply(mt,ft),W,p);else if(gt===M&&vt===C)ft.fname=M,ft.invert().updateHash(),w=J.integrate(t.multiply(mt,ft),W,p);else if(gt!==z||vt!==N&&vt!==M||!ft.power.lessThan(0)){$=t.multiply(mt.fnTransform(),ft.fnTransform());w=J.integrate(t.expand($),W,p)}else{var $=t.multiply(mt.fnTransform(),ft);w=J.integrate(t.expand($),W,p)}else if(gt!==M&>!==N||vt!==M&&vt!==N)J.integration.stop();else if(mt.isLinear()&&ft.isLinear())if(mt.args[0].isLinear()&&ft.args[0].isLinear()){vt===M?(ue=mt.args[0],Gt=ft.args[0]):(Gt=mt.args[0],ue=ft.args[0]),me=t.parse(h("(sin(({1})+({0}))+sin(({1})-({0})))/2",ue.toString(),Gt.toString())),w=J.integrate(me,W,p)}else{var zt=X(ct);w=J.integrate(t.expand(zt),W,p)}else{zt=new s(1);ct.map((function(e){var i=e.fnTransform();zt=t.multiply(zt,i)}));$=t.expand(zt);w=J.integrate($,W,p),w.hasIntegral()&&(w=J.integrate(X(zt.collectSymbols()),W,p))}}else if(dt===o&&pt===f){var Lt=mt.isLinear();if(mt.fname===N&&Lt&&ft.power.equals(-1))w=t.symfunction("Ci",[mt.args[0]]);else if(mt.fname===N&&ft.power.equals(-1))w=J.integrate(t.multiply(mt.fnTransform(),ft.clone()),W,p);else if(mt.fname===R&&Lt&&ft.power.equals(-1))w=t.symfunction("Chi",[mt.args[0]]);else if(mt.fname===R&&ft.power.equals(-1))w=J.integrate(t.multiply(mt.fnTransform(),ft.clone()),W,p);else if(mt.fname===M&&Lt&&ft.power.equals(-1))w=t.symfunction("Si",[mt.args[0]]);else if(mt.fname===M&&ft.power.equals(-1))w=J.integrate(t.multiply(mt.fnTransform(),ft.clone()),W,p);else if(mt.fname===O&&Lt&&ft.power.equals(-1))w=t.symfunction("Shi",[mt.args[0]]);else if(mt.fname===O&&ft.power.equals(-1))w=J.integrate(t.multiply(mt.fnTransform(),ft.clone()),W,p);else if(mt.fname===x&&ft.power.equals(-1))w=J.integration.poly_integrate(mt,W,p);else if("erf"===mt.fname){if(ft.power.equals(1)){Qe=J.integration.decompose_arg(mt.args[0],W),Ze=Qe[0],We=Qe[1],Re=mt.args[0].toString();w=t.parse(h("(e^(-(({2}))^2)*(sqrt(pi)*e^((({2}))^2)*(2*({0})^2*({1})^2-3)*erf(({2}))+2*({0})*({1})-2))/(4*sqrt(pi)*({0})^2)",Ze,We,Re))}}else w=J.integration.by_parts(Z,W,p,m)}else if(dt===b&&pt===f){ie=gt===x?J.integration.decompose_arg(mt.args[0],W)[1]:null;w=mt.isE()&&(mt.power.group===f||mt.power.group===y)&&ft.power.equals(-1)?t.symfunction("Ei",[mt.power.clone()]):gt===x&&ie.value===ft.value?J.integration.poly_integrate(mt,W,p):J.integration.by_parts(Z,W,p,m)}else if(dt===g&&pt===f){if(ft.value===mt.value&&mt.power.equals(-1)){var Ct=Math.min.apply(null,e.Utils.keys(mt.symbols)),Et=Math.min(Ct,ft.power),_t=ft.clone();_t.power=new i(Et),ft=t.divide(ft,_t.clone());$=new s(0);mt.each((function(e){$=t.add($,t.divide(e.clone(),_t.clone()))})),$.multiplier=mt.multiplier,Z=t.divide(ft,$)}else Z=t.expand(Z);w=J.integration.partial_fraction(Z,W,p)}else if(dt===v&&pt===f){me=mt.clone().toLinear();var Tt=e.Algebra.degree(me,t.parse(W)).equals(1);if(mt.power.equals(-.5)){se=J.integration.decompose_arg(mt.clone().toLinear(),W),ee=se[0].negate(),ie=se[1],le=se[3];var Bt=Number(mt.power),It=Number(ft.power);if(c(It)&&e.Utils.even(It)&&ie.power.equals(2)){var qt=t.divide(t.multiply(t.pow(le.clone(),new s(2)),t.symfunction(S,[t.divide(le.clone(),ee.clone())])),t.pow(ee.clone(),new s(2)));qt=t.multiply(qt,t.symfunction(S,[le]).invert());var Dt=t.parse("sin(u)");Dt.power=Dt.power.multiply(ft.power);Te=J.integrate(Dt,"u",p);var Ot=t.parse(_+"("+S+"("+ee+"/"+le+")*"+W+")");w=t.multiply(qt,Te.sub(new s("u"),Ot))}else if(-.5===Bt){var Rt=function(e,i){var r=t.parse(J.integrate(e,W,p,m).sub(W,h(i,W)));if(!r.hasIntegral())return r};-1===It?w=Rt(t.expand(t.expand(t.pow(t.multiply(mt.invert(),ft.invert()),new s(2)))).invert(),"sqrt(1-1/({0})^2)"):-2===It&&(w=Rt(t.sqrt(t.expand(t.divide(t.pow(Z,new s(2)).invert(),t.pow(new s(W),new s(2))).negate())).invert(),"sqrt(1-1/({0})^2)"))}}else if(mt.power.equals(-1)&&ft.isLinear()&&Tt)w=J.integration.partial_fraction(Z,W,p);else if(!mt.power.lessThan(0)&&c(mt.power)){var Ft=t.expand(mt);w=new s(0),Ft.each((function(e){e.group===g?e.each((function(e){w=t.add(w,J.integrate(t.multiply(ft.clone(),e),W,p))})):w=t.add(w,J.integrate(t.multiply(ft.clone(),e),W,p))}))}else if(mt.power.lessThan(-2))w=J.integration.by_parts(Z,W,p,m);else if(mt.power.lessThan(0)&&ft.power.greaterThan(1)){se=J.integration.decompose_arg(mt.clone().toLinear(),W),ee=se[0].negate(),ie=se[1],le=se[3],oe=mt.clone().toLinear();if(ie.group!==g&&ie.isLinear()){ae=Number(ft.power),Ve="_u_",Pe=new s(Ve);var Pt=t.expand(t.divide(t.pow(t.subtract(Pe.clone(),le.clone()),new s(ae)),Pe.clone())),Vt={};Vt[Ve]=oe;var Ut=t.parse(Pt,Vt);w=J.integrate(Ut,W,0)}else if(ft.power.greaterThan(ie.power)||ft.power.equals(ie.power)){var Kt=new e.Algebra.Classes.Factors;mt=e.Algebra.Factor.coeffFactor(mt.invert(),Kt);var Ht=e.Algebra.divide(ft,mt);Ht.group!==y?(w=new s(0),Ht.each((function(e){w=t.add(w,J.integrate(e,W,p))})),Kt.each((function(e){w=t.divide(w,e)})),w=t.expand(w)):w=J.integration.by_parts(Z,W,p,m)}else w=J.integration.partial_fraction(Z,W,p)}else if(mt.power.den.equals(2)){Qe=J.integration.decompose_arg(mt.clone().toLinear(),W),ee=Qe[3],ie=Qe[1],le=Qe[0];var Gt=Qe[2];if(ie.power.equals(2)&&le.lessThan(0)){ee.equals(1)||(lt=t.multiply(lt,t.pow(ee,new s(2))));Pe=W,qt=t.divide(t.pow(le.clone().negate(),new s(.5)),t.pow(ee,new s(.5))),Ve=t.symfunction(N,[new s(Pe)]);var jt=t.pow(t.symfunction(N,[new s(Pe)]),new s(mt.power.num)),Qt=t.pow(t.symfunction(M,[new s(Pe)]),new s(ft.power)),Wt=t.multiply(t.multiply(jt,Ve),Qt);Te=J.integrate(Wt,Pe,p);w=Te.sub(Pe,t.symfunction(_,[t.multiply(new s(W),qt)]))}else w=J.integration.partial_fraction(Z,W,p,m)}else Tt&&(w=J.integration.partial_fraction(Z,W,p))}else if(mt.isComposite()&&ft.isComposite())if(w=new s(0),mt.power.greaterThan(0)&&ft.power.greaterThan(0)){Ke=t.expand(Z);Ke.each((function(e){w=t.add(w,J.integrate(e,W,p))}),!0)}else{Bt=Number(mt.power),It=Number(ft.power);if(Bt<0&&It>0){$=mt;mt=ft,ft=$}-1===Bt&&-1===It?w=J.integration.partial_fraction(Z,W):mt.each((function(e){var i=t.multiply(e,ft.clone()),r=J.integrate(i,W,p);w=t.add(w,r)}))}else if(dt===v&&ct[0].power.greaterThan(0))mt=t.expand(mt),w=new s(0),mt.each((function(e){w=t.add(w,J.integrate(t.multiply(e,ft.clone()),W,p))}),!0);else if(dt===o&&pt===b&&e.Utils.in_htrig(mt.fname))mt=mt.fnTransform(),w=J.integrate(t.expand(t.multiply(mt,ft)),W,p);else if(dt===o&&pt===v||pt===o&&dt===v){if(pt===o&&dt===v){$=mt;mt=ft,ft=$}var Zt,Yt,Xt;if(Ve=s.unwrapSQRT(J.diff(mt.clone(),W),!0),Zt=s.unwrapSQRT(ft,!0),Ve.power.equals(Zt.power)){if(ae=new s(ft.power),Yt=Ve.clone().toLinear(),Xt=ft.clone().toLinear(),$e=e.Algebra.divide(Yt.toLinear(),Xt),$e.isConstant()){var Jt=t.pow($e,ae.negate());w=t.multiply(Jt,J.integration.poly_integrate(mt.clone()))}}else w=J.integration.by_parts(Z,W,p,m)}else{var $t=mt.clone().toLinear(),ei=ft.clone().toLinear();w=dt===b&&pt===b&&mt.power.contains(W)&&ft.power.contains(W)&&!$t.contains(W)&&!ei.contains(W)?t.parse(h("(({0})^(({2})*({4}))*({1})^(({3})*({4})))/(log(({0})^({2}))+log(({1})^({3})))",$t.toString(),ei.toString(),mt.power.multiplier.toString(),ft.power.multiplier.toString(),W)):J.integration.by_parts(Z,W,p,m)}}}else if(3===ht&&(ct[2].group===f&&ct[2].power.lessThan(2)||ct[0].group===v)){var ti=ct[0];if(ti.group===v){ti.power.greaterThan(1)&&(ti=t.expand(ti));tt=t.multiply(ct[1],ct[2]);w=new s(0),ti.each((function(e){var i=t.multiply(e,tt.clone()),r=J.integrate(i,W,p);w=t.add(w,r)}),!0)}else w=J.integration.by_parts(Z,W,p,m)}else if(Q(ct)){$=new s(1);var ii=0;for(ht=ct.length;iin.max_lim_depth)){i.clone();var u=r.clone();if(r.fname===k){var c=i.sign(),h=o.sign();if(o.isInfinity)return t.multiply(new s(c),new s(h));if(o.equals(0)){var d=t.parse(i.multiplier),m=t.parse(r.multiplier);return t.divide(t.multiply(d,J.Limit.interval("-1","1")),m)}J.Limit.diverges()}var f,g=function(t){if(e.Utils.isVector(t)){for(var i=0;in.max_lim_depth)){var c=t.parse(i.multiplier);i.toUnitMultiplier();try{var d;if(i.isConstant(!0))d=i;else{var m={};m[r]=a;try{var g=t.parse(i.sub(r,a),m);(g.isConstant(!0)||g.isInfinity)&&(d=g)}catch(X){}if(!d){var v=i.getNum(),w=i.getDenom();if(w.isConstant(!0)){if(i.group===b){var A=i.clone().toLinear(),k=(i.power.clone(),A.getNum()),S=A.getDenom(),L=e.Utils.decompose_fn(S,r,!0);if(k.group===f&&k.multiplier.isOne()&&L.ax.group===f&&L.b.isConstant(!0)&&L.a.isOne()&&L.b.isConstant(!0))d=t.parse(h("(1/e^({0}))",L.b));else{var C=J.Limit.rewriteToLog(i.clone()),E=C.power.clone(),_=C.clone().toLinear(),T=J.Limit.limit(_,r,a,l),B=J.Limit.limit(E,r,a,l);d=t.pow(T,B)}}else if(i.group===o&&1===i.args.length){var I,q=J.Limit.limit(i.args[0],r,a,l);if(e.Utils.isVector(q))return d=q.map((function(e){var n=i.clone();return n.args[0]=e,J.Limit.limit(t.symfunction(i.fname,[e]),r,a,l)})),t.multiply(c,d);if(q.isConstant(!0)){var D=t.symfunction(i.fname,[q]);try{p(D),I=!0}catch(X){I=!1}}if(I)d=D;else if(J.Limit.isConvergent(q))if(i.fname===x)switch(q.toString()){case"0":d=s.infinity().negate();break;case"Infinity":d=s.infinity();break;case"-Infinity":d=s.infinity();break}else if(i.fname!==N&&i.fname!==M||!a.isInfinity){if(i.fname===z){var O=i.args[0],R=O.getNum(),F=O.getDenom(),P=R.toUnitMultiplier();(a.isInfinity||P.equals("pi")&&F.equals(2))&&(d=divergent())}else if(i.fname===n.FACTORIAL&&q.isInfinity)return s.infinity()}else d=J.Limit.interval(-1,1)}else if(i.group===f){if(i.power>0)return t.parse(i,m);d=e.Utils.even(i.power)?s.infinity():J.Limit.diverges()}else if(i.group===y){var V,U,K=i.collectSymbols().sort((function(e,t){return e.group-t.group}));A=K.pop();V=p(J.Limit.limit(A,r,a,l));while(K.length){var H=K.pop();U=p(J.Limit.limit(H,r,a,l)),V.isInfinity||!J.Limit.isConvergent(V)&&U.equals(0)||V.equals(0)&&J.Limit.isConvergent(U)?(H.containsFunction(x)&&(H=[A,A=H][0]),H.invert(),V=V.isInfinity&&U.isInfinity?s.infinity():J.Limit.divide(A,H,r,a,l)):(V=t.multiply(V,U),A=t.multiply(A,H))}d=V}else if(i.isComposite()){var G;i.isLinear()||(i=t.expand(i)),d=new s(0);K=i.collectSymbols().sort((function(e,t){return t.group-e.group}));for(var j=[],Q=new s(0),W=0,Z=K.length;Wn.max_lim_depth)return;d=J.Limit.limit(J.diff(i,r),r,a,l)}}}}else d=J.Limit.divide(v,w,r,a,l)}}d||(d=t.symfunction("limit",[i,r,a]))}catch(X){d=t.symfunction("limit",[i,r,a])}return t.multiply(c,d)}}},Fresnel:{S:function(e){return e.isConstant(!0)?J.defint(t.parse("sin(pi*x^2/2)"),s(0),e,"x"):t.symfunction("S",arguments)},C:function(e){return e.isConstant(!0)?J.defint(t.parse("cos(pi*x^2/2)"),s(0),e,"x"):t.symfunction("C",arguments)}}};r.register([{name:"diff",visible:!0,numargs:[1,3],build:function(){return J.diff}},{name:"sum",visible:!0,numargs:4,build:function(){return J.sum}},{name:"product",visible:!0,numargs:4,build:function(){return J.product}},{name:"integrate",visible:!0,numargs:[1,2],build:function(){return J.integrate}},{name:"defint",visible:!0,numargs:[3,4],build:function(){return J.defint}},{name:"S",visible:!0,numargs:1,build:function(){return J.Fresnel.S}},{name:"C",visible:!0,numargs:1,build:function(){return J.Fresnel.C}},{name:"limit",visible:!0,numargs:[3,4],build:function(){return J.Limit.limit}}]),r.updateAPI()})()},7689:function(e,t,i){i(7658),i(541),i(1703);var r=i(5923);i(481),i(6826),function(){var e=r.getCore(),t=e.PARSER,i=e.Algebra,a=e.Calculus,o=a.integration.decompose_arg,s=e.Utils.evaluate,l=e.Utils.remove,u=e.Utils.format,c=e.Utils.build,h=e.Utils.knownVariable,d=e.Symbol,p=e.Utils.isSymbol,m=e.Utils.variables,f=e.groups.S,g=e.groups.PL,v=e.groups.CB,y=e.groups.CP,b=e.groups.FN,w=e.Settings,x=e.Utils.range,A=e.Utils.isArray;function k(t,i){if(i.isConstant()&&t.isConstant()&&!t.equals(i)||t.equals(e.Settings.IMAGINARY)&&i.isConstant(!0)||i.equals(e.Settings.IMAGINARY)&&t.isConstant(!0))throw new e.exceptions.NerdamerValueError(t.toString()+" does not equal "+i.toString());this.LHS=t,this.RHS=i}e.Settings.SOLVE_RADIUS=1e3,e.Settings.ROOTS_PER_SIDE=10,e.Settings.make_pi_conversions=!1,e.Settings.STEP_SIZE=.1,e.Settings.EPSILON=1e-13,e.Settings.MAX_NEWTON_ITERATIONS=200,e.Settings.MAX_NON_LINEAR_TRIES=12,e.Settings.NON_LINEAR_JUMP_AT=50,e.Settings.NON_LINEAR_JUMP_SIZE=100,e.Settings.NON_LINEAR_START=.01,e.Settings.NEWTON_SLICES=200,e.Settings.NEWTON_EPSILON=2*Number.EPSILON,e.Settings.SOLUTION_PROXIMITY=1e-14,e.Settings.FILTER_SOLUTIONS=!0,e.Settings.MAX_SOLVE_DEPTH=10,e.Settings.ZERO_EPSILON=1e-9,e.Settings.MAX_BISECTION_ITER=2e3,e.Settings.BI_SECTION_EPSILON=1e-12,e.Symbol.prototype.hasTrig=function(){return this.containsFunction(["cos","sin","tan","cot","csc","sec"])},e.Symbol.prototype.hasNegativeTerms=function(){if(this.isComposite())for(var e in this.symbols){var t=this.symbols[e];if(t.group===g&&t.hasNegativeTerms()||this.symbols[e].power.lessThan(0))return!0}return!1},k.prototype={toString:function(){return this.LHS.toString()+"="+this.RHS.toString()},text:function(e){return this.LHS.text(e)+"="+this.RHS.text(e)},toLHS:function(e){var i;e="undefined"===typeof e,i=e?this.removeDenom():this.clone();var r=i.LHS,n=i.RHS;r.isConstant(!0)&&!n.isConstant(!0)&&([r,n]=[n,r]);var a=t.subtract(r,n),o=e?t.expand(a):a;return o=new k(o,new d(0)).removeDenom().LHS,o},removeDenom:function(){var e=this.LHS.clone(),i=this.RHS.clone(),r=t.multiply(e.getDenom(),i.getDenom());if(e=t.expand(t.multiply(e,r.clone())),i=t.expand(t.multiply(i,r)),i.group===y&&i.group!==y){var n=e;e=i,i=n}if(e.group===v){n=new d(e.multiplier);var a=i.clone();e.each((function(e){e.power.lessThan(0)?a=t.divide(a,e):n=t.multiply(n,e)})),e=n,i=a}else if(e.group===y)for(var o in e.symbols){var s=e.symbols[o];if(s.group===v)for(var l in s.symbols){var u=s.symbols[l];if(u.power.lessThan(0))return new k(t.expand(t.multiply(u.clone().toLinear(),e)),t.expand(t.multiply(u.clone().toLinear(),i)))}}return new k(e,i)},clone:function(){return new k(this.LHS.clone(),this.RHS.clone())},sub:function(e,t){var i=this.clone();return i.LHS=i.LHS.sub(e.clone(),t.clone()),i.RHS=i.RHS.sub(e.clone(),t.clone()),i},isZero:function(){return e.Utils.evaluate(this.toLHS()).equals(0)},latex:function(e){return[this.LHS.latex(e),this.RHS.latex(e)].join("=")}},t.equals=function(e,t){return new k(e,t)},function(){var e=t.functions.simplify[0];t.functions.simplify[0]=function(t){return t instanceof k?(t.LHS=e(t.LHS),t.RHS=e(t.RHS),t):e(t)}}(),e.Expression.prototype.equals=function(t){t instanceof e.Expression&&(t=t.symbol);var i=new k(this.symbol,t);return i},e.Expression.prototype.solveFor=function(t){var i;if(this.symbol instanceof k){if(this.symbol.LHS.isConstant()&&this.symbol.RHS.equals(t))return new e.Expression(this.symbol.LHS);if(this.symbol.RHS.isConstant()&&this.symbol.LHS.equals(t))return new e.Expression(this.symbol.RHS);i=this.symbol.toLHS()}else i=this.symbol;return z(i,t).map((function(t){return new e.Expression(t)}))},e.Expression.prototype.expand=function(){if(this.symbol instanceof k){var i=this.symbol.clone();return i.RHS=t.expand(i.RHS),i.LHS=t.expand(i.LHS),new e.Expression(i)}return new e.Expression(t.expand(this.symbol))},e.Expression.prototype.variables=function(){return this.symbol instanceof k?e.Utils.arrayUnique(m(this.symbol.LHS).concat(m(this.symbol.RHS))):m(this.symbol)};var S=function(e,i){return t.equals(e,i)};e.Equation=k;var M=e.Utils.checkAll=function(e,t){for(var i=0;ia[1][2]&&([d,c]=[c,d],[a[1],a[0]]=[a[0],a[1]]),1===a[0][0]&&2===a[0][2]&&2===a[1][0]&&4===a[1][2]){var p=r[0],m=r[1],f=z(t.parse(d,h(p,z(t.parse(c),p)[0])),m).map((function(e){return e.toString()})),g=[z(t.parse(c,h(m,f[0])))[0].toString()];if(f[1]&&g.push(z(t.parse(c,h(m,f[1])))[0].toString()),w.SOLUTIONS_AS_OBJECT){o={};o[p]=g,o[m]=f}else f.unshift(m),g.unshift(p),o=[g,f]}return o},solveNonLinearSystem:function(i,r,a){if(r<0)return[];a="undefined"===typeof a?e.Settings.NON_LINEAR_START:a;var o=e.Settings.MAX_NON_LINEAR_TRIES,s=Math.floor(o/2);r="undefined"===typeof r?o:r;var l,u,h,d,p,m,f,g,v=e.Settings.NON_LINEAR_JUMP_AT,y=e.Settings.NON_LINEAR_JUMP_SIZE,b=!0,w=function(e,t){return e.map((function(e,i){return Number(t.get(i,0))}))},x=e.Utils.arrayGetVariables(i),A=e.Matrix.jacobian(i,x,(function(e){return c(e,x)}),!0),k=e.Settings.MAX_NEWTON_ITERATIONS,S=i.map((function(e){return c(e,x)})),M=A.map((function(e){return c(e,x)}),!0);d=e.Matrix.cMatrix(0,x);var z=e.Matrix.cMatrix(a,x);h=0;do{if(h>k)break;l=w(x,z),f=z.clone(),S.forEach((function(e,t){z.set(t,0,e.apply(null,l))}));var L=new e.Matrix;if(M.each((function(e,t,i){var r=e.apply(null,l);L.set(t,i,r)})),L=L.invert(),u=t.multiply(L,z).negate(),g=u.subtract(d,(function(e){return t.parse(Number(e))})),d=f.add(u,(function(e){return t.parse(Number(e))})),z=d,h>=v&&p>1){r===s&&(a=0);var C=r>s?1:-1;return n=r%Math.floor(s)+1,a+=C*n*y,N.solveNonLinearSystem(i,--r,a)}if(m=p,h++,p=g.max(),Number(p)===Number(m))break}while(Number(p)>=Number.EPSILON);return b?N.systemSolutions(z,x,!0,(function(t){return e.Utils.round(Number(t),14)})):[]},systemSolutions:function(i,r,n,a){var o=e.Settings.SOLUTIONS_AS_OBJECT?{}:[];return i.each((function(i,s){var l=(n?t.expand(i):i).valueOf();a&&(l=a.call(i,l));var u=r[s];e.Settings.SOLUTIONS_AS_OBJECT?o[u]=l:o.push([u,l])})),o},solveSystemBySubstitution:function(t){var i=m(t[0]),r=m(t[1]);return 2===t.length&&2===i.length&&e.Utils.arrayEqual(i,r)?N.solveCircle(t,i):[]},solveSystem:function(n,a){for(var s=0;s0&&(v=v.sub(u[0],f[0])),f=z(v,u[0])}while(++gt||(o!==l&&s.push(i),l=o);r=r.concat(s)};return m(d,h),m(p,u),r},bisection:function(t,i){var r=t-1,n=t+1;if(Math.sign(i(r))!==Math.sign(i(n))){var a,o,s=0;do{if(a=Math.abs(n-r),s++>e.Settings.MAX_BISECTION_ITER||isNaN(a))return;o=(r+n)/2,i(r)*i(o)>0?r=o:n=o}while(a>=w.EPSILON);var l=(r+n)/2,u=i(l);if(!isNaN(u)&&Math.abs(u)<=e.Settings.BI_SECTION_EPSILON)return e.Utils.round(l,13)}},Newton:function(t,i,r){var n,a=e.Settings.MAX_NEWTON_ITERATIONS,o=0,s=t;do{var l=i(s);if(0===s&&0===l){n=0;break}if(o++,o>a)return;n=s-l/r(s);var u=Math.abs(n-s);s=n}while(u>w.NEWTON_EPSILON);if(Math.abs(i(n))<=w.EPSILON)return n},rewrite:function(i,r,n){if(r=r||new d(0),i.isComposite()&&i.isLinear()){var a=[],o=[];i.each((function(e){e=e.clone(),"sqrt"===e.fname&&e.contains(n)?a.push(e):o.push(e)}),!0),1===a.length&&(r=t.expand(t.pow(t.subtract(r,e.Utils.arraySum(o)),new d(2))),i=t.expand(t.pow(d.unwrapSQRT(a[0]),new d(2))))}else i=d.unwrapSQRT(t.expand(i));var s=0,l=i.length;if(i.group===y&&i.contains(n)&&i.isLinear()){i.distributeMultiplier();var u=new d(0);return i.each((function(e){e.contains(n)?(s++,u=t.add(u,e.clone())):r=t.subtract(r,e.clone())})),i=u,s!==l?N.rewrite(i,r,n):[i,r]}if(i.group===v&&i.contains(n)&&i.isLinear()){if(i.multiplier.lessThan(0)&&(i.multiplier=i.multiplier.multiply(new e.Frac(-1)),r.multiplier=r.multiplier.multiply(new e.Frac(-1))),r.equals(0))return new d(0);u=new d(1);return i.each((function(e){e.contains(n)?u=t.multiply(u,e.clone()):r=t.divide(r,e.clone())})),i=u,N.rewrite(i,r,n)}if(!i.isLinear()&&i.contains(n)){var c=t.parse(i.power.clone().invert());return i=t.pow(i,c.clone()),r=t.pow(t.expand(r),c.clone()),N.rewrite(i,r,n)}if(i.group===b||i.group===f||i.group===g)return[i,r]},sqrtSolve:function(e,i){var r=new d(0),n=new d(0);if(e.isComposite()&&(e.each((function(e){"sqrt"===e.fname&&e.contains(i)?r=t.add(r,e.clone()):n=t.add(n,e.clone())})),!r.equals(0))){var a=t.expand(t.multiply(t.parse(e.multiplier),t.subtract(t.pow(n,new d(2)),t.pow(r,new d(2))))),o=z(a,i);return o=o.filter((function(t){if(t.isImaginary())return t;var r={};r[i]=t;var n=s(e,r);return n.equals(0)?t:void 0})),o}}},z=function(r,n,l,u,h){if(u=u||0,u++>w.MAX_SOLVE_DEPTH)return l;if(r instanceof k){if(r.isZero())return[new d(0)];if(r.LHS.equals(n)&&!r.RHS.contains(n))return[r.RHS];if(r.RHS.equals(n)&&!r.LHS.contains(n))return[r.LHS]}if(r instanceof e.Vector&&(r=r.elements),n=n||"x",A(r))return N.solveSystem.apply(void 0,arguments);l=l||[];var m={},x={};if(x[n]=0,p(r)&&!0===s(r.getDenom(),x).equals(0))return l;var S=function(i,r){var n=p(i);if(!(void 0===i||"number"===typeof i&&isNaN(i)))if(A(i))i.forEach((function(e){S(e)}));else if("null"!==i.valueOf()){if("function"===typeof e.Settings.PRE_ADD_SOLUTION&&(i=e.Settings.PRE_ADD_SOLUTION(i)),n||(i=t.parse(i)),e.Settings.make_pi_conversions&&r){var a=t.divide(i.clone(),new d(Math.PI)),o=a.multiplier,s=Math.abs(o.num),u=Math.abs(o.den);s<10&&u<10&&(i=t.multiply(a,new d("pi")))}var c=i.toString();m[c]||l.push(i),m[c]=!0}};if(r.group===f&&r.contains(n)){try{var L={};L[n]=0,s(h,L,"numer"),S(new d(0))}catch(fe){}return l}if(r.group===v){var C=r.getNum();if(C.group===v){var E=String(n);return C.each((function(e){e.contains(E)&&z(e,n,l,u,r)})),l}return z(C,n,l,u,h)}r.group===b&&"sqrt"===r.fname&&(r=t.pow(d.unwrapSQRT(r),new d(2)));var _=(e.Utils.isSymbol(r)?r:N.toLHS(r,!1)).getNum(),T=e.Utils.variables(_),B=T.length;if(e.Utils.isInt(_.power)&&_.power>0&&(_=t.parse(_).toLinear()),_.group===f||_.group===v&&_.contains(n))return[new d(0)];var I,q={},D=function(i){i=t.expand(i,{expand_denominator:!0,expand_functions:!0});var r=i.clone();if(i.symbols)for(var a in i.symbols){var s=i.symbols[a],l=s.getDenom();if(!l.isConstant(!0)&&i.isComposite()){var u=new d(0);return i.each((function(e){u=t.add(u,t.multiply(e,l.clone()))})),D(t.multiply(t.parse(i.multiplier),u))}var c=o(s,n),h=c[1].fname===e.Settings.SQRT,m=d.unwrapSQRT(c[1]),f=m.power.clone();if(!p(f)&&!f.equals(.5))if(f.den.gt(1)){if(h)return i=t.subtract(i,s.clone()),i=t.add(i,t.multiply(c[0].clone(),m)),D(i);var v=q[f.den];q[f.den]=v?v++:1}else{if(-1===f.sign()){var y=t.parse(n+"^"+Math.abs(f));return i.each((function(e,r){e.contains(n)&&(i.symbols[r]=t.multiply(e,y.clone()))})),q={},D(t.parse(i))}if(s.group===g){var b=e.Utils.arrayMin(e.Utils.keys(s.symbols));if(b<0){y=t.parse(n+"^"+Math.abs(b));var w=new d(0);return r.each((function(e){w=t.add(w,t.multiply(e.clone(),y.clone()))}),!0),w}}}}return i},O=function(e){var i=new d(0),r=new d(0);return e.each((function(e){e.contains(n,!0)?i=t.add(i,e.clone()):r=t.subtract(r,e.clone())})),[i,r]};if(N.inverseFunctionSolve=function(e,i,r){var a=o(i.args[0],n),s=a[1];if(s.group===f)return t.divide(t.symfunction(e,[t.divide(r,t.parse(i.multiplier))]),a[0])},_=D(_),_.equals(0))return[_];var R=e.Utils.keys(q);if(1===R.length&&(I=R[0],_.each((function(i,r){if(i.contains(n)){var a=o(i,n),s=a[1],l=s.power;l.den.gt(1)&&(s.power=l.multiply(new e.Frac(I)),_.symbols[r]=t.multiply(s,a[0]))}})),_=t.parse(_)),S(N.sqrtSolve(_,n)),1===B)if(_.isPoly(!0)){var F=new e.Algebra.Classes.Factors;if(e.Algebra.Factor.factor(_,F),F.getNumberSymbolics()>1)for(var P in F.factors)S(z(F.factors[P],n));else{var V=e.Utils.getCoeffs(_,n),U=V.length-1,K=!1;if(T[0]===n){if(M(V,(function(t){return t.group!==e.groups.N}))){var H=e.Algebra.proots(_);M(H,(function(t){return!e.Utils.isInt(t)}))&&(K=!0,H.map((function(e){S(new d(e))})))}if(!K)if(r=t.parse(r),r instanceof e.Equation&&(r=r.toLHS()),1===U)S(t.divide(V[0],V[1].negate()));else if(2===U)S(t.expand(N.quad.apply(void 0,V)));else if(3===U){l=[];var G=e.Algebra.Factor.factor(r);l=[];l.length>0?S(l):S(N.cubic.apply(void 0,V))}else i.proots(_).map(S)}}}else try{var j,Q,W,Z=_.hasTrig(),Y=N.getPoints(_,.1),X=N.getPoints(_,.05),J=N.getPoints(_,.01),$=e.Utils.arrayUnique(Y.concat(X).concat(J)).sort((function(e,t){return e-t})),ee=c(_.clone()),te=[];for(j=0;j<$.length;j++)Q=$[j],W=N.bisection(Q,ee),"undefined"!==typeof W?S(W,Z):te.push(Q);$=te;var ie=a.diff(_.clone()),re=c(ie);for(j=0;j<$.length;j++)Q=$[j],S(N.Newton(Q,ee,re),Z);l.sort()}catch(fe){console.log(fe)}else if(!_.hasFunc(n)&&_.isComposite())try{G=e.Algebra.Factor.factor(_.clone());if(G.group===v)G.each((function(e){S(z(e,n))}));else{V=e.Utils.getCoeffs(_,n);var ne=V.length;U=ne-1;switch(U){case 0:var ae=O(_),oe=ae[0],se=ae[1];if(oe.group===e.groups.EX){var le=e.Settings.LOG,ue=`${le}((${se})/(${oe.multiplier}))/${le}(${oe.value})/${oe.power.multiplier}`;S(t.parse(ue))}break;case 1:S(t.divide(V[0],V[1].negate()));break;case 2:S(N.quad.apply(void 0,V));break;case 3:S(N.cubic.apply(void 0,V));break;case 4:S(N.quartic.apply(void 0,V));break;default:S(N.csolve(_,n)),0===l.length&&S(N.divideAndConquer(_,n))}0===l.length&&S(z(G,n,l,u))}}catch(fe){}else try{var ce=N.rewrite(_,null,n);oe=ce[0],se=ce[1];if(oe.group===b)if("abs"===oe.fname)S([se.clone(),se.negate()]);else if("sin"===oe.fname)S(N.inverseFunctionSolve("asin",oe,se));else if("cos"===oe.fname)S(N.inverseFunctionSolve("acos",oe,se));else if("tan"===oe.fname)S(N.inverseFunctionSolve("atan",oe,se));else if(oe.fname===e.Settings.LOG){var he=o(oe.args[0],n);P=he[1];if(P.group===f){se=t.divide(t.subtract(t.pow(oe.args.length>1?oe.args[1]:new d("e"),t.divide(se,t.parse(oe.multiplier))),he[3]),he[0]);_=new k(P,se).toLHS();S(z(_,n))}}else S(t.subtract(oe,se));else{var de=new k(oe,se).toLHS();if(de.equals(_))throw new Error("Stopping. No stop condition exists");S(z(de,n))}}catch(ge){try{if(_.group===v)S(0);else if(_.group===y){ae=O(_),oe=ae[0],se=ae[1];if(oe.group===e.groups.EX&&oe.value===n){var pe=oe.power.clone().invert();S(t.pow(se,pe))}}}catch(ge){}}if(I&&(l=l.map((function(e){return t.pow(e,new d(I))}))),p(r)){var me={};l=l.filter((function(e){try{me[n]=e;var t=Number(s(r,me));return isNaN(t),!0}catch(fe){return!1}}))}return l};r.register([{name:"solveEquations",parent:"nerdamer",numargs:-1,visible:!0,build:function(){return z}},{name:"solve",parent:"Solve",numargs:2,visible:!0,build:function(){return e.Solve.solve}},{name:"setEquation",parent:"Solve",visible:!0,build:function(){return S}}]),r.updateAPI()}()},5923:function(e,t,i){var r,n;e=i.nmd(e),i(1703),i(7658),i(541),i(8675),i(3408),i(4590);var a=function(e){"use strict";var t="1.1.13",i=new ct,r=e.bigInt,n=e.bigDec;n.set({precision:250});var o={},s=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083],l={},u={callPeekers:!1,init_primes:1e3,exclude:[],suppress_errors:!1,PARSE2NUMBER:!1,SAFE:!1,IMAGINARY:"i",FUNCTION_MODULES:[Math],ALLOW_CHARS:["π"],USE_MULTICHARACTER_VARS:!0,POWER_OPERATOR:"^",VALIDATION_REGEX:/^[a-z_αAβBγΓδΔϵEζZηHθΘιIκKλΛμMνNξΞoOπΠρPσΣτTυϒϕΦχXψΨωΩ∞][0-9a-z_αAβBγΓδΔϵEζZηHθΘιIκKλΛμMνNξΞoOπΠρPσΣτTυϒϕΦχXψΨωΩ]*$/i,IMPLIED_MULTIPLICATION_REGEX:/([\+\-\/\*]*[0-9]+)([a-z_αAβBγΓδΔϵEζZηHθΘιIκKλΛμMνNξΞoOπΠρPσΣτTυϒϕΦχXψΨωΩ]+[\+\-\/\*]*)/gi,ALIASES:{"π":"pi","∞":"Infinity"},POSITIVE_MULTIPLIERS:!1,CACHE:{},SILENCE_WARNINGS:!1,PRECISION:21,EXPRESSION_DECP:19,DEFAULT_DECP:16,VECTOR:"vector",PARENTHESIS:"parens",SQRT:"sqrt",ABS:"abs",FACTORIAL:"factorial",DOUBLEFACTORIAL:"dfactorial",LONG_PI:"3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196",LONG_E:"2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193200305992181741359662904357290033429526059563073813232862794349076323382988075319525101901",PI:Math.PI,E:Math.E,LOG:"log",LOG10:"log10",LOG10_LATEX:"log_{10}",MAX_EXP:2e5,SCIENTIFIC_MAX_DECIMAL_PLACES:14,SCIENTIFIC_IGNORE_ZERO_EXPONENTS:!0};(function(){u.CACHE.roots={};for(var e=40,t=40,i=2;i<=e;i++)for(var n=2;n<=t;n++){var a=r(i).pow(n);u.CACHE.roots[a+"-"+n]=i}})();var c=o.N=1,h=o.P=2,d=o.S=3,p=o.EX=4,m=o.FN=5,f=o.PL=6,g=o.CB=7,v=o.CP=8,y=u.CONST_HASH="#",b=u.PARENTHESIS,w=u.SQRT,x=u.ABS,A=u.FACTORIAL,k=u.DOUBLEFACTORIAL,S=[],M={},N=[],z=[],L=function(e,t){if(!u.suppress_errors)throw t?new t(e):new Error(e)},C=function(e){var t=function(t){this.name=e,this.message=void 0!==t?t:"";var i=new Error(this.message);i.name=this.name,this.stack=i.stack};return t.prototype=Object.create(Error.prototype),t},E=function(e){return-1!==N.indexOf(e)},_=function(e){for(var t=e[0],i=1,r=e.length;i=Number.MAX_VALUE?e.toString():Number(e):(t="undefined"===typeof t?14:t,Math.round(e*Math.pow(10,t))/Math.pow(10,t))},we=function(e){var t="u",i=t,r=0,n=U(e);while(-1!==N.indexOf(i)||-1!==n.indexOf(i))i=t+r++;for(var a=0,o=N.length;a<=o;a++)if(!N[a]){N[a]=i;break}return i},xe=function(e){var t=N.indexOf(e);-1!==t&&(N[t]=void 0)},Ae=function(e,t){if(X(e))for(var i=e.length,r=0;r=0?i:-i},diff:function(e){var t=.001,i=function(i){return(e(i+t)-e(i-t))/(2*t)};return i},median:function(...e){e.sort((function(e,t){return e-t}));var t=Math.floor(e.length/2);return e.length%2?e[t]:(e[t-1]+e[t])/2},fromContinued:function(e){for(var t=e.fractions.slice(),i=1/t.pop(),r=0,n=t.length;rh){var p=rt.fromContinued(d)-e;if(p<=Number.EPSILON)break}d.fractions.push(r),s=i-r,(s<=c||l>=t-1)&&(u=!0),l++}var m=d.fractions.length-1;return 1===d.fractions[m]&&(d.fractions.pop(),d.fractions[--m]++),d},bigpow:function(e,t){e instanceof lt||(e=lt.create(e)),t instanceof lt||(t=lt.create(t));var i=new lt(0);if(t.isInteger())i.num=e.num.pow(t.toString()),i.den=e.den.pow(t.toString());else{var r=lt.create(Math.pow(e.num,t.num)),n=lt.create(Math.pow(e.den,t.num));i.num=rt.nthroot(r,t.den.toString()),i.den=rt.nthroot(n,t.den)}return i},gamma:function(e){var t=7,i=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7];if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*rt.gamma(1-e));e-=1;for(var r=i[0],n=1;n0){var r=Math.abs(e.shift());while(1){if(t%=r,0===t){t=r;break}if(r%=t,0===r)break}}return t},QGCD:function(){for(var e=[].slice.call(arguments),t=e[0],i=1;ir&&e<1e6&&De(i);for(var n=s.length,a=0;a1&&(t[e]=1),t},ifactor:function(e){var t=new r(e);if(e=String(e),"0"===e)return{0:1};e=new r(e);var i=e.sign?-1:1;e=e.abs();var n={};if(e.lt("65536"))n=rt.sfactor(e,n);else{var a=function(e){e.isPrime()?n[e]=(n[e]||0)+1:n=rt.sfactor(e,n)};try{var o=1e3,s=0;while(!e.abs().equals(1)){if(e.isPrime()){a(e);break}{function h(t){var i=new r(t),n=2,a=new r(t),l=new r(1);while(l.equals(1)){for(var u=0;u<=n&&l.equals(1);u++){if(s++>o)throw new Error("stopping");a=a.pow(2).add(1).mod(e),l=r.gcd(a.minus(i).abs(),e)}n*=2,i=a}return l.equals(e)?h(t+1):l}var l=h(2);a(l),e=e.divide(l)}}}catch(c){n={},a(t)}}if(-1===i){var u=de(se(n));n["-"+u]=n[u],delete n[u]}return n},boxfactor:function(e,t){t=t||200;var i,r,n=Math.floor(5/12*e),a=0,o=!1;while(1){if(i=Math.floor(e/n),r=e%n,0===r)break;if(o)return[e,1];n=Math.max(r,n-r),a++,o=a>t}return[i,n,a]},fib:function(e){var t=Math.sign(e);e=Math.abs(e),t=ke(e)?t:Math.abs(t);for(var i=0,r=1,n=1,a=2;a<=e;a++)n=i+r,i=r,r=n;return n*t},mod:function(e,t){return e%t},integer_part:function(e){var t=Math.sign(e);return t*Math.floor(Math.abs(e))},simpson:function(e,t,i,r){var n=function(e,t,i){var r=e(t),n=1e-12;return isNaN(r)&&(r=e(1===i?t+n:t-n)),r};r=r||1e-4;var a=Math.abs(Math.floor((i-t)/r));a%2!==0&&a++;for(var o,s,l=(i-t)/a,u=n(e,t,1),c=!1,h=t+l,d=1;d1e3*u))return c>u?(h.maxDepthCount++,v+x):Math.abs(x)0&&T("integrate-adaptive-simpson: Warning: maximum recursion depth ("+n+") reached "+o.maxDepthCount+" times"),o.nanEncountered)throw new Error("Function does not converge over interval!");return h}var s;try{s=o(e,t,i,r,n)}catch(l){return rt.simpson(e,t,i)}return be(s,12)},Ci:function(e){for(var t=20,i=.5772156649015329,r=0,n=1;n0?1:e<0?0:.5},rect:function(e){e=Math.abs(e);return.5===e?e:e>.5?0:1},sinc:function(e){return e.equals(0)?1:Math.sin(e)/e},tri:function(e){return e=Math.abs(e),e>=1?0:1-e},nthroot:function(e,t){if(e instanceof lt||(e=new lt(e.toString())),t instanceof lt||(t=new lt(t.toString())),t.equals(1))return e;var i,r,n,a=e.divide(new lt(2)),o=new lt(1e-15),s=t.clone().invert(),l=t.subtract(new lt(1));do{var u=rt.bigpow(a,l),c=s.multiply(e.divide(u).subtract(a)).toDecimal(25);if(i=lt.create(c),n)break;a=a.add(i);c=i.toDecimal();n=!!r&&r===c,r=c}while(i.abs().gte(o));return a},sqrt:function(e){var t,i,r,n;e instanceof lt||(e=new lt(e));var a=0,o=!1,s=new lt(1e-20);t=e.divide(new lt(2));var l=1e3;do{if(a>l)throw new Error("Unable to calculate square root for "+e);t=t.add(e.divide(t)).divide(new lt(2)),t=new lt(t.decimal(30)),i=e.subtract(t.multiply(t)),n=!!r&&r.equals(i),(i.clone().abs().lessThan(s)||n)&&(o=!0),r=i,a++}while(!o);return t}};function nt(e,t,i,n){var a="hash"===t,o=void 0,s=a?void 0:t,y="decimal"===s||"decimals"===s;function w(e){switch(t){case"decimals":case"decimal":return o=o||function(e){return!1},e.valueOf();case"recurring":o=o||function(e){return-1!==e.indexOf("'")};var i=e.toString(),n=/^-?\d+(?:\/\d+)?$/.exec(i);if(0===n.length)return i;var a=n[0].split("/"),s=!1,l=Number(a[0]);l<0&&(l=-l,s=!0);var c=Number(a[1]);c||(c=1);var h=Math.floor(l/c),d=10*(l-h*c);h=h.toString()+".";while(d&&d1){if(q(i)&&(-1===s.indexOf(i)&&s.push(i),r.push(i)),q(o)){r.push(o);break}t=o}i++}return r.sort((function(e,t){return e-t}))}function ot(e){this.symbol=e}function st(e){return this instanceof st?(e=String("undefined"===typeof e?0:e),e.startsWith("-")?(this.sign=-1,e=e.substr(1,e.length)):this.sign=1,st.isScientific(e)?this.fromScientific(e):this.convert(e),this):new st(e)}function lt(e){if(e instanceof lt)return e;if(void 0===e)return this;try{if(J(e))try{this.num=r(e),this.den=r(1)}catch(i){return lt.simple(e)}else{var t=e instanceof n?ht.quickConversion(e):ht.convert(e);this.num=new r(t[0]),this.den=new r(t[1])}}catch(i){return lt.simple(e)}}function ut(e){var t="Infinity"===e;return this instanceof ut?(e instanceof n&&(e=e.toString()),/^(\-?\+?\d+)\.?\d*e?\-?\+?\d*/i.test(e)||e instanceof n?(this.group=c,this.value=y,this.multiplier=new lt(e)):(this.group=d,B(e),this.value=e,this.multiplier=new lt(1),this.imaginary=e===u.IMAGINARY,this.isInfinity=t),this.power=new lt(1),this):new ut(e)}function ct(){var e=this,t={},i={names:[],actions:[]};function r(e,t){this.start=e,this.end=t}function a(){this.elements=[]}function o(e,t,i){if(this.type=t,this.value=e,void 0!==i&&(this.column=i+1),t===o.OPERATOR){var r=S[e];for(var n in r)this[n]=r[n]}else t===o.FUNCTION&&(this.precedence=o.MAX_PRECEDENCE,this.leftAssoc=!1)}r.prototype.isConstant=function(){return this.start.isConstant()&&this.end.isConstant()},r.prototype.text=function(){return nt(this.start)+":"+nt(this.end)},a.prototype.append=function(e){this.elements.push(e)},a.prototype.getItems=function(){return this.elements},a.prototype.toString=function(){return e.pretty_print(this.elements)},a.create=function(e){var t=new a;return e&&t.append(e),t},o.prototype.toString=function(){return this.value},o.prototype.toString=function(){return this.is_prefix?"`"+this.value:this.value},o.OPERATOR="OPERATOR",o.VARIABLE_OR_LITERAL="VARIABLE_OR_LITERAL",o.FUNCTION="FUNCTION",o.UNIT="UNIT",o.KEYWORD="KEYWORD",o.MAX_PRECEDENCE=999,this.classes={Collection:a,Slice:r,Token:o};var s={prec:void 0,cos:function(t,i){var r,n;return r=e.parse(Math.cos(t)*Math.cosh(i)),n=e.parse(Math.sin(t)*Math.sinh(i)),e.subtract(r,e.multiply(n,ut.imaginary()))},sin:function(t,i){var r,n;return r=e.parse(Math.sin(t)*Math.cosh(i)),n=e.parse(Math.cos(t)*Math.sinh(i)),e.subtract(r,e.multiply(n,ut.imaginary()))},tan:function(t,i){var r,n;return r=e.parse(Math.sin(2*t)/(Math.cos(2*t)+Math.cosh(2*i))),n=e.parse(Math.sinh(2*i)/(Math.cos(2*t)+Math.cosh(2*i))),e.add(r,e.multiply(n,ut.imaginary()))},sec:function(t,i){var r=this.removeDen(this.cos(t,i));return e.subtract(r[0],e.multiply(r[1],ut.imaginary()))},csc:function(t,i){var r=this.removeDen(this.sin(t,i));return e.add(r[0],e.multiply(r[1],ut.imaginary()))},cot:function(t,i){var r=this.removeDen(this.tan(t,i));return e.subtract(r[0],e.multiply(r[1],ut.imaginary()))},acos:function(t,i){var r,n,a,o,s,l;return r=this.fromArray([t,i]),l=e.pow(r.clone(),new ut(2)),n=e.expand(l),a=e.multiply(oe(e.subtract(new ut(1),n)),ut.imaginary()),o=e.expand(e.add(r.clone(),a)),s=_e(o),e.expand(e.multiply(ut.imaginary().negate(),s))},asin:function(t,i){return e.subtract(e.parse("pi/2"),this.acos(t,i))},atan:function(t,i){return t.equals(0)&&(i.equals(1)||i.equals(-1))?e.parse(`${ut.infinity()}*${u.IMAGINARY}*${i}`):(o=s.fromArray([t,i]),r=e.expand(e.multiply(ut.imaginary(),o.clone())),n=_e(e.expand(e.subtract(new ut(1),r.clone()))),a=_e(e.expand(e.add(new ut(1),r.clone()))),e.expand(e.multiply(e.divide(ut.imaginary(),new ut(2)),e.subtract(n,a))));var r,n,a,o},asec:function(e,t){var i=this.removeDen([e,t]);return i[1].negate(),this.acos.apply(this,i)},acsc:function(e,t){var i=this.removeDen([e,t]);return i[1].negate(),this.asin.apply(this,i)},acot:function(e,t){var i=this.removeDen([e,t]);return i[1].negate(),this.atan.apply(this,i)},cosh:function(t,i){var r,n;return r=e.parse(Math.cosh(t)*Math.cos(i)),n=e.parse(Math.sinh(t)*Math.sin(i)),e.add(r,e.multiply(n,ut.imaginary()))},sinh:function(t,i){var r,n;return r=e.parse(Math.sinh(t)*Math.cos(i)),n=e.parse(Math.cosh(t)*Math.sin(i)),e.add(r,e.multiply(n,ut.imaginary()))},tanh:function(t,i){var r,n;return r=e.parse(Math.sinh(2*t)/(Math.cos(2*i)+Math.cosh(2*t))),n=e.parse(Math.sin(2*i)/(Math.cos(2*i)+Math.cosh(2*t))),e.subtract(r,e.multiply(n,ut.imaginary()))},sech:function(t,i){var r=this.removeDen(this.cosh(t,i));return e.subtract(r[0],e.multiply(r[1],ut.imaginary()))},csch:function(t,i){var r=this.removeDen(this.sinh(t,i));return e.subtract(r[0],e.multiply(r[1],ut.imaginary()))},coth:function(t,i){var r=this.removeDen(this.tanh(t,i));return e.add(r[0],e.multiply(r[1],ut.imaginary()))},acosh:function(t,i){var r,n,a;return a=this.fromArray([t,i]),r=oe(e.add(a.clone(),new ut(1))),n=oe(e.subtract(a.clone(),new ut(1))),e.expand(_e(e.add(a,e.expand(e.multiply(r,n)))))},asinh:function(t,i){var r,n;return n=this.fromArray([t,i]),r=oe(e.add(new ut(1),e.expand(e.pow(n.clone(),new ut(2))))),e.expand(_e(e.add(n,r)))},atanh:function(t,i){var r,n,a;return a=this.fromArray([t,i]),r=_e(e.add(a.clone(),new ut(1))),n=_e(e.subtract(new ut(1),a)),e.expand(e.divide(e.subtract(r,n),new ut(2)))},asech:function(e,t){var i=this.removeDen([e,t]);return i[1].negate(),this.acosh.apply(this,i)},acsch:function(e,t){var i=this.removeDen([e,t]);return i[1].negate(),this.asinh.apply(this,i)},acoth:function(e,t){var i=this.removeDen([e,t]);return i[1].negate(),this.atanh.apply(this,i)},sqrt:function(t){var i,r,n,a,o;return i=t.realpart(),r=t.imagpart(),n=ut.hyp(i,r),a=e.add(i.clone(),n),o=oe(e.multiply(new ut(2),a.clone())),e.add(e.divide(a.clone(),o.clone()),e.multiply(e.divide(r,o),ut.imaginary()))},log:function(t,i){var r,a,o;return r=_e(ut.hyp(t,i)),o=u.USE_BIG?ut(n.atan2(i.multiplier.toDecimal(),t.multiplier.toDecimal())):Math.atan2(i,t),a=e.parse(o),e.add(r,e.multiply(ut.imaginary(),a))},erf(t,i){return e.symfunction("erf",[t])},removeDen:function(t){var i,r,n,a,o;return X(t)?(r=t[0],n=t[1]):(r=t.realpart(),n=t.imagpart()),i=Math.pow(r,2)+Math.pow(n,2),a=e.parse(r/i),o=e.parse(n/i),[a,o]},fromArray:function(t){return e.add(t[0],e.multiply(ut.imaginary(),t[1]))},evaluate:function(t,i){var r,n,a;if(a=t.power.sign(),t.power=t.power.abs(),t.power.greaterThan(1)&&(t=e.expand(t)),a<0){var o=this.removeDen(t);r=o[0],n=o[1]}else r=t.realpart(),n=t.imagpart();return r.isConstant("all")&&n.isConstant("all")?this[i].call(this,r,n):e.symfunction(i,[t])}},l=this.trig={cos:function(t){if(t.equals("pi")&&t.multiplier.den.equals(2))return new ut(0);if(u.PARSE2NUMBER){if(t.equals(new ut(u.PI/2)))return new ut(0);if(t.isConstant())return u.USE_BIG?new ut(n.cos(t.multiplier.toDecimal())):new ut(Math.cos(t.valueOf()));if(t.isImaginary())return s.evaluate(t,"cos")}if(t.equals(0))return new ut(1);var i,r=!1,a=qe(t.multiplier.toDecimal()),o=t.multiplier.abs();if(t.multiplier=o,t.isPi()&&t.isLinear())if(J(o))i=new ut(ke(o)?1:-1);else{Number(o.num);var l=Number(o.den);2===l?i=new ut(0):3===l?(i=e.parse("1/2"),r=!0):4===l?(i=e.parse("1/sqrt(2)"),r=!0):6===l?(i=e.parse("sqrt(3)/2"),r=!0):i=e.symfunction("cos",[t])}return!r||2!==a&&3!==a||i.negate(),i||(i=e.symfunction("cos",[t])),i},sin:function(t){if(u.PARSE2NUMBER){if(t.isConstant())return t%Math.PI===0?new ut(0):u.USE_BIG?new ut(n.sin(t.multiplier.toDecimal())):new ut(Math.sin(t.valueOf()));if(t.isImaginary())return s.evaluate(t,"sin")}if(t.equals(0))return new ut(0);var i,r=!1,a=qe(t.multiplier.toDecimal()),o=t.multiplier.sign(),l=t.multiplier.abs();if(t.multiplier=l,t.equals("pi"))i=new ut(0);else if(t.isPi()&&t.isLinear())if(J(l))i=new ut(0);else{l.num;var c=l.den;2==c?(i=new ut(1),r=!0):3==c?(i=e.parse("sqrt(3)/2"),r=!0):4==c?(i=e.parse("1/sqrt(2)"),r=!0):6==c?(i=e.parse("1/2"),r=!0):i=e.multiply(new ut(o),e.symfunction("sin",[t]))}return i||(i=e.multiply(new ut(o),e.symfunction("sin",[t]))),!r||3!==a&&4!==a||i.negate(),i},tan:function(t){if(u.PARSE2NUMBER){if(t%Math.PI===0&&t.isLinear())return new ut(0);if(t.isConstant())return u.USE_BIG?new ut(n.tan(t.multiplier.toDecimal())):new ut(Math.tan(t.valueOf()));if(t.isImaginary())return s.evaluate(t,"tan")}var i,r=!1,a=qe(t.multiplier.toDecimal()),o=t.multiplier;if(t.multiplier=o,t.isPi()&&t.isLinear())if(J(o))i=new ut(0);else{o.num;var l=o.den;if(2==l)throw new Ue("tan is undefined for "+t.toString());3==l?(i=e.parse("sqrt(3)"),r=!0):4==l?(i=new ut(1),r=!0):6==l?(i=e.parse("1/sqrt(3)"),r=!0):i=e.symfunction("tan",[t])}return i||(i=e.symfunction("tan",[t])),!r||2!==a&&4!==a||i.negate(),i},sec:function(t){if(u.PARSE2NUMBER)return t.isConstant()?u.USE_BIG?new ut(new n(1).dividedBy(n.cos(t.multiplier.toDecimal()))):new ut(rt.sec(t.valueOf())):t.isImaginary()?s.evaluate(t,"sec"):e.parse(ae("1/cos({0})",t));var i,r=!1,a=qe(t.multiplier.toDecimal()),o=t.multiplier.abs();if(t.multiplier=o,t.isPi()&&t.isLinear())if(J(o))i=new ut(ke(o)?1:-1);else{o.num;var l=o.den;if(2==l)throw new Ue("sec is undefined for "+t.toString());3==l?(i=new ut(2),r=!0):4==l?(i=e.parse("sqrt(2)"),r=!0):6==l?(i=e.parse("2/sqrt(3)"),r=!0):i=e.symfunction("sec",[t])}return!r||2!==a&&3!==a||i.negate(),i||(i=e.symfunction("sec",[t])),i},csc:function(t){if(u.PARSE2NUMBER)return t.isConstant()?u.USE_BIG?new ut(new n(1).dividedBy(n.sin(t.multiplier.toDecimal()))):new ut(rt.csc(t.valueOf())):t.isImaginary()?s.evaluate(t,"csc"):e.parse(ae("1/sin({0})",t));var i,r=!1,a=qe(t.multiplier.toDecimal()),o=t.multiplier.sign(),l=t.multiplier.abs();if(t.multiplier=l,t.isPi()&&t.isLinear()){if(J(l))throw new Ue("csc is undefined for "+t.toString());l.num;var c=l.den;2==c?(i=new ut(1),r=!0):3==c?(i=e.parse("2/sqrt(3)"),r=!0):4==c?(i=e.parse("sqrt(2)"),r=!0):6==c?(i=new ut(2),r=!0):i=e.multiply(new ut(o),e.symfunction("csc",[t]))}return i||(i=e.multiply(new ut(o),e.symfunction("csc",[t]))),!r||3!==a&&4!==a||i.negate(),i},cot:function(t){if(u.PARSE2NUMBER)return t%(Math.PI/2)===0?new ut(0):t.isConstant()?u.USE_BIG?new ut(new n(1).dividedBy(n.tan(t.multiplier.toDecimal()))):new ut(rt.cot(t.valueOf())):t.isImaginary()?s.evaluate(t,"cot"):e.parse(ae("1/tan({0})",t));var i,r=!1,a=qe(t.multiplier.toDecimal()),o=t.multiplier;if(t.multiplier=o,t.isPi()&&t.isLinear()){if(J(o))throw new Ue("cot is undefined for "+t.toString());o.num;var l=o.den;2==l?i=new ut(0):3==l?(i=e.parse("1/sqrt(3)"),r=!0):4==l?(i=new ut(1),r=!0):6==l?(i=e.parse("sqrt(3)"),r=!0):i=e.symfunction("cot",[t])}return i||(i=e.symfunction("cot",[t])),!r||2!==a&&4!==a||i.negate(),i},acos:function(t){if(u.PARSE2NUMBER){if(t.isConstant()){if(t.gt(1)||t.lt(-1)){var i=t.toString();return Ye(Ie(`pi/2-asin(${i})`))}return u.USE_BIG?new ut(n.acos(t.multiplier.toDecimal())):new ut(Math.acos(t.valueOf()))}if(t.isImaginary())return s.evaluate(t,"acos")}return e.symfunction("acos",arguments)},asin:function(t){if(u.PARSE2NUMBER){if(t.isConstant()){if(t.gt(1)||t.lt(-1)){var i=u.IMAGINARY,r=t.multiplier.toDecimal();return Ye(Ie(`${i}*log(sqrt(1-${r}^2)-${i}*${r})`))}return u.USE_BIG?new ut(n.asin(t.multiplier.toDecimal())):new ut(Math.asin(t.valueOf()))}if(t.isImaginary())return s.evaluate(t,"asin")}return e.symfunction("asin",arguments)},atan:function(t){var i;if(t.equals(0))i=new ut(0);else{if(u.PARSE2NUMBER)return t.isConstant()?u.USE_BIG?new ut(n.atan(t.multiplier.toDecimal())):new ut(Math.atan(t.valueOf())):t.isImaginary()?s.evaluate(t,"atan"):e.symfunction("atan",arguments);i=t.equals(-1)?e.parse("-pi/4"):e.symfunction("atan",arguments)}return i},asec:function(t){if(u.PARSE2NUMBER){if(t.equals(0))throw new Ke("Input is out of the domain of sec!");if(t.isConstant())return l.acos(t.invert());if(t.isImaginary())return s.evaluate(t,"asec")}return e.symfunction("asec",arguments)},acsc:function(t){if(u.PARSE2NUMBER){if(t.isConstant())return l.asin(t.invert());if(t.isImaginary())return s.evaluate(t,"acsc")}return e.symfunction("acsc",arguments)},acot:function(t){if(u.PARSE2NUMBER){if(t.isConstant())return new e.add(e.parse("pi/2"),l.atan(t).negate());if(t.isImaginary())return s.evaluate(t,"acot")}return e.symfunction("acot",arguments)},atan2:function(t,i){if(t.equals(0)&&i.equals(0))throw new Ue("atan2 is undefined for 0, 0");return u.PARSE2NUMBER&&t.isConstant()&&i.isConstant()?new ut(Math.atan2(t,i)):e.symfunction("atan2",arguments)}},y=this.trigh={cosh:function(t){if(u.PARSE2NUMBER){if(t.isConstant())return new ut(Math.cosh(t.valueOf()));if(t.isImaginary())return s.evaluate(t,"cosh")}return e.symfunction("cosh",arguments)},sinh:function(t){if(u.PARSE2NUMBER){if(t.isConstant())return new ut(Math.sinh(t.valueOf()));if(t.isImaginary())return s.evaluate(t,"sinh")}return e.symfunction("sinh",arguments)},tanh:function(t){if(u.PARSE2NUMBER){if(t.isConstant())return new ut(Math.tanh(t.valueOf()));if(t.isImaginary())return s.evaluate(t,"tanh")}return e.symfunction("tanh",arguments)},sech:function(t){return u.PARSE2NUMBER?t.isConstant()?new ut(Math.sech(t.valueOf())):t.isImaginary()?s.evaluate(t,"sech"):e.parse(ae("1/cosh({0})",t)):e.symfunction("sech",arguments)},csch:function(t){return u.PARSE2NUMBER?t.isConstant()?new ut(Math.csch(t.valueOf())):t.isImaginary()?s.evaluate(t,"csch"):e.parse(ae("1/sinh({0})",t)):e.symfunction("csch",arguments)},coth:function(t){return u.PARSE2NUMBER?t.isConstant()?new ut(Math.coth(t.valueOf())):t.isImaginary()?s.evaluate(t,"coth"):e.parse(ae("1/tanh({0})",t)):e.symfunction("coth",arguments)},acosh:function(t){var i;return i=u.PARSE2NUMBER&&t.isImaginary()?s.evaluate(t,"acosh"):u.PARSE2NUMBER?Ie(e.parse(ae(u.LOG+"(({0})+sqrt(({0})^2-1))",t.toString()))):e.symfunction("acosh",arguments),i},asinh:function(t){var i;return i=u.PARSE2NUMBER&&t.isImaginary()?s.evaluate(t,"asinh"):u.PARSE2NUMBER?Ie(e.parse(ae(u.LOG+"(({0})+sqrt(({0})^2+1))",t.toString()))):e.symfunction("asinh",arguments),i},atanh:function(t){var i;return i=u.PARSE2NUMBER&&t.isImaginary()?s.evaluate(t,"atanh"):u.PARSE2NUMBER?Ie(e.parse(ae("(1/2)*"+u.LOG+"((1+({0}))/(1-({0})))",t.toString()))):e.symfunction("atanh",arguments),i},asech:function(t){var i;return i=u.PARSE2NUMBER&&t.isImaginary()?s.evaluate(t,"asech"):u.PARSE2NUMBER?Ie(_e(e.add(t.clone().invert(),oe(e.subtract(e.pow(t,new ut(-2)),new ut(1)))))):e.symfunction("asech",arguments),i},acsch:function(t){var i;return i=u.PARSE2NUMBER&&t.isImaginary()?s.evaluate(t,"acsch"):u.PARSE2NUMBER?Ie(e.parse(ae(u.LOG+"((1+sqrt(1+({0})^2))/({0}))",t.toString()))):e.symfunction("acsch",arguments),i},acoth:function(t){var i;return i=u.PARSE2NUMBER&&t.isImaginary()?s.evaluate(t,"acoth"):u.PARSE2NUMBER?t.equals(1)?ut.infinity():Ie(e.divide(_e(e.divide(e.add(t.clone(),new ut(1)),e.subtract(t.clone(),new ut(1)))),new ut(2))):e.symfunction("acoth",arguments),i}};this.units={};var S={"\\":{precedence:8,operator:"\\",action:"slash",prefix:!0,postfix:!1,leftAssoc:!0,operation:function(e){return e}},"!!":{precedence:7,operator:"!!",action:"dfactorial",prefix:!1,postfix:!0,leftAssoc:!0,operation:function(t){return e.symfunction(u.DOUBLEFACTORIAL,[t])}},"!":{precedence:7,operator:"!",action:"factorial",prefix:!1,postfix:!0,leftAssoc:!0,operation:function(e){return U(e)}},"^":{precedence:6,operator:"^",action:"pow",prefix:!1,postfix:!1,leftAssoc:!0},"**":{precedence:6,operator:"**",action:"pow",prefix:!1,postfix:!1,leftAssoc:!0},"%":{precedence:4,operator:"%",action:"percent",prefix:!1,postfix:!0,leftAssoc:!0,overloaded:!0,overloadAction:"mod",overloadLeftAssoc:!1,operation:function(t){return e.divide(t,new ut(100))}},"*":{precedence:4,operator:"*",action:"multiply",prefix:!1,postfix:!1,leftAssoc:!1},"/":{precedence:4,operator:"/",action:"divide",prefix:!1,postfix:!1,leftAssoc:!1},"+":{precedence:3,operator:"+",action:"add",prefix:!0,postfix:!1,leftAssoc:!1,operation:function(e){return e}},plus:{precedence:3,operator:"plus",action:"add",prefix:!0,postfix:!1,leftAssoc:!1,operation:function(e){return e}},"-":{precedence:3,operator:"-",action:"subtract",prefix:!0,postfix:!1,leftAssoc:!1,operation:function(e){return e.negate()}},"=":{precedence:2,operator:"=",action:"equals",prefix:!1,postfix:!1,leftAssoc:!1},"==":{precedence:1,operator:"==",action:"eq",prefix:!1,postfix:!1,leftAssoc:!1},"<":{precedence:1,operator:"<",action:"lt",prefix:!1,postfix:!1,leftAssoc:!1},"<=":{precedence:1,operator:"<=",action:"lte",prefix:!1,postfix:!1,leftAssoc:!1},">":{precedence:1,operator:">",action:"gt",prefix:!1,postfix:!1,leftAssoc:!1},"=>":{precedence:1,operator:"=>",action:"gte",prefix:!1,postfix:!1,leftAssoc:!1},",":{precedence:0,operator:",",action:"comma",prefix:!1,postfix:!1,leftAssoc:!1},":":{precedence:0,operator:",",action:"assign",prefix:!1,postfix:!1,leftAssoc:!1,vectorFn:"slice"},":=":{precedence:0,operator:",",action:"function_assign",prefix:!1,postfix:!1,leftAssoc:!0}},N={"(":{type:"round",id:1,is_open:!0,is_close:!1},")":{type:"round",id:2,is_open:!1,is_close:!0},"[":{type:"square",id:3,is_open:!0,is_close:!1,maps_to:"vector"},"]":{type:"square",id:4,is_open:!1,is_close:!0},"{":{type:"curly",id:5,is_open:!0,is_close:!1,maps_to:"Set"},"}":{type:"curly",id:6,is_open:!1,is_close:!0}},z=this.functions={cos:[l.cos,1],sin:[l.sin,1],tan:[l.tan,1],sec:[l.sec,1],csc:[l.csc,1],cot:[l.cot,1],acos:[l.acos,1],asin:[l.asin,1],atan:[l.atan,1],arccos:[l.acos,1],arcsin:[l.asin,1],arctan:[l.atan,1],asec:[l.asec,1],acsc:[l.acsc,1],acot:[l.acot,1],atan2:[l.atan2,2],acoth:[y.acoth,1],asech:[y.asech,1],acsch:[y.acsch,1],sinh:[y.sinh,1],cosh:[y.cosh,1],tanh:[y.tanh,1],asinh:[y.asinh,1],sech:[y.sech,1],csch:[y.csch,1],coth:[y.coth,1],acosh:[y.acosh,1],atanh:[y.atanh,1],log10:[,1],exp:[te,1],radians:[ie,1],degrees:[re,1],min:[Me,-1],max:[Ae,-1],erf:[,1],floor:[,1],ceil:[,1],trunc:[,1],Si:[,1],step:[,1],rect:[,1],sinc:[$,1],tri:[,1],sign:[Ne,1],Ci:[,1],Ei:[,1],Shi:[,1],Chi:[,1],Li:[,1],fib:[,1],fact:[U,1],factorial:[U,1],continued_fraction:[K,[1,2]],dfactorial:[,1],gamma_incomplete:[,[1,2]],round:[Be,[1,2]],scientific:[ue,[1,2]],mod:[H,2],pfactor:[de,1],vector:[yt,-1],matrix:[bt,-1],Set:[wt,-1],imatrix:[Xe,-1],parens:[F,-1],sqrt:[oe,1],cbrt:[se,1],nthroot:[he,2],log:[_e,[1,2]],expand:[Ge,1],abs:[V,1],invert:[Nt,1],determinant:[xt,1],size:[At,1],transpose:[Mt,1],dot:[kt,2],cross:[St,2],vecget:[$e,2],vecset:[it,3],vectrim:[et,[1,2]],matget:[ot,3],matset:[vt,4],matgetrow:[st,2],matsetrow:[ct,3],matgetcol:[ht,2],matsetcol:[gt,3],rationalize:[ne,1],IF:[G,3],is_in:[Y,2],realpart:[pe,1],imagpart:[me,1],conjugate:[fe,1],arg:[ge,1],polarform:[ve,1],rectform:[we,1],sort:[Le,[1,2]],integer_part:[,1],union:[zt,2],contains:[Ct,2],intersection:[Lt,2],difference:[Et,2],intersects:[_t,2],is_subset:[Tt,2],print:[Bt,-1]};this.error=L;var C=function(e){for(var t=u.FUNCTION_MODULES,i=t.length,r=0;rh&&L(ae(p,"maximum",h,d))}var m=Oe(i);return s?a=s.apply(n[2],i):(s=C(t),a=u.PARSE2NUMBER&&m?De(s.apply(s,i)):e.symfunction(t,i)),a},this.operator_filter_regex=function(){var e="^\\"+Object.keys(S).filter((function(e){if(1===e.length)return e})).join("\\");return new RegExp("(["+e+"])\\s+(["+e+"])")}(),this.setOperator=function(t,i,r){var n=t.operator;if(S[n]=t,i&&(this[t.action]=i),e[n]=t.operation,t.action||t.prefix||t.postif||(t.action=n),"over"===r||"under"===r){var a=t.precedence;for(var o in S){var s=S[o],l="over"===r?s.precedence>=a:s.precedence>a;l&&s.precedence++}}},this.getOperator=function(e){return S[e]},this.aliasOperator=function(e,t){var i={},r=S[e];for(var n in r)i[n]=r[n];i.operator=t,this.setOperator(i)},this.getOperators=function(){return S},this.getBrackets=function(){return N};var E=function(e){e=String(e);for(var t=0;te.pretty_print(t))).join(", ");return"vector"===t.type?"vector<"+i+">":"("+i+")"}return t.toString()},this.peekers={pre_operator:[],post_operator:[],pre_function:[],post_function:[]},this.callPeekers=function(e){if(u.callPeekers)for(var t=this.peekers[e],i=Te(arguments).slice(1).map(ee),r=0;rh.precedence||!h.leftAssoc&&p.precedence===h.precedence))break;n.push(a.pop())}if("vector"!==i&&"set"!==i||!("vectorFn"in h)||(h.action=h.vectorFn),h.postfix){var m=e[t-1];if(!m)throw new Qe("Unexpected prefix operator '"+c.value+"'! at "+c.column);if(m.type===o.OPERATOR&&!m.postfix)throw new Qe("Unexpected prefix operator '"+m.value+"'! at "+m.column)}else do{d=e[t+1];var f=!!d&&d.type===o.OPERATOR;if(f){if(!d.prefix)throw new Qe("A prefix operator was expected at "+d.column);d.is_prefix=!0,s.push(d),t++}}while(f);h.is_prefix?s.push(h):a.push(h);while(s.length){if(!(h.leftAssoc||!h.leftAssoc&&s[s.length-1].precedence>=h.precedence))break;a.push(s.pop())}}else if(c.type===o.VARIABLE_OR_LITERAL){0===n.length&&l(s,a),n.push(c);var g=a[a.length-1];g&&g.leftAssoc||l(s,n)}else c.type===o.FUNCTION?a.push(c):c.type===o.UNIT&&n.push(c);Array.isArray(c)&&(n.push(this.toRPN(c)),c.type&&n.push(new o(c.type,o.FUNCTION,c.column)))}return l(a,n),l(s,n),n},this.parseRPN=function(t,i){try{for(var n in i=i||{},i)i[n]=e.parse(i[n],{});u.PARSE2NUMBER&&("e"in i||(i.e=new ut(u.E)),"pi"in i||(i.pi=new ut(u.PI)));for(var s=[],l=0,c=t.length;l=L)throw new We("Index out of range "+(h.column+1));var C=S.elements[z];S.getter=z,C.parent=S,s.push(C)}else S.getter=N,s.push(S),s.push(w)}else v&&(w.parent=v),s.push(w)}else{var E,_=h.value;_ in u.ALIASES?h=e.parse(u.ALIASES[h]):h.type===o.VARIABLE_OR_LITERAL?h=new ut(_):h.type===o.UNIT&&(h=new ut(_),h.isUnit=!0),_ in e.CONSTANTS?(E=h,h=new ut(e.CONSTANTS[_])):_ in i&&_!==i[_].toString()?(E=h,h=i[_].clone()):_ in M&&(E=h,h=M[_].clone()),E&&(h.subbed=E),s.push(h)}}var T=s[0];if(-1!==["undefined","string","number"].indexOf(typeof T))throw new tt("Unexpected token!");return T}catch(I){var B=[Ke];throw B.forEach((function(e){if(I instanceof e)throw new e(I.message+": "+h.column)})),new Ve(I.message+": "+h.column)}},B.prototype.toString=function(){var e=this.left?this.left.toString()+"---":"",t=this.right?"---"+this.right.toString():"";return e+"("+this.value+")"+t},B.prototype.toHTML=function(e,t){e=e||0,t="undefined"===typeof t?4:t;var i=function(e){return" ".repeat(t*e)},r="",n=this.left?i(e+1)+"
  • \n"+this.left.toHTML(e+2,t)+i(e+1)+"
  • \n":"",a=this.right?i(e+1)+"
  • \n"+this.right.toHTML(e+2,t)+i(e+1)+"
  • \n":"";r=i(e)+'
    '+this.value+"
    "+i(e)+"\n";return(n||a)&&(r+=i(e)+"
      \n"+n+a+i(e)+"
    \n"),r+="",r},this.tree=function(e){for(var t=[],i=0;in.numVal)&&(t.pop(),t.push(r))}}function Ae(){var t=[].slice.call(arguments);return _(t)?t[0]:Oe(t)?new ut(Math.max.apply(null,t)):u.SYMBOLIC_MIN_MAX&&Re(t)?xe("max",t):e.symfunction("max",t)}function Me(){var t=[].slice.call(arguments);return _(t)?t[0]:Oe(t)?new ut(Math.min.apply(null,t)):u.SYMBOLIC_MIN_MAX&&Re(t)?xe("min",t):e.symfunction("min",t)}function Ne(t){return t.isConstant(!0)?new ut(Math.sign(Ie(t))):e.symfunction("sign",arguments)}function Le(e,t){t=t?t.toString():"asc";var i=function(e){return e.group===c?e.multiplier:e.group===m?""===e.fname?i(e.args[0]):e.fname:e.group===d?e.power:e.value},r=j(e)?e.elements:e.collectSymbols();return new pt(r.sort((function(e,r){var n=i(e),a=i(r);return"desc"===t?a-n:n-a})))}function _e(t,i){if(t.equals(1))return new ut(0);var r;if(t.fname===w&&t.multiplier.equals(1))return r=e.divide(_e(t.args[0]),new ut(2)),t.power.sign()<0&&r.negate(),r;if(t.equals(0))throw new Ue(u.LOG+"(0) is undefined!");if(t.isImaginary())return s.evaluate(t,u.LOG);if(t.isConstant()&&"undefined"!==typeof i&&i.isConstant()){var n=Math.log(t),a=Math.log(i);r=new ut(n/a)}else if(t.group===p&&t.power.multiplier.lessThan(0)||"-1"===t.power.toString())t.power.negate(),r=_e(t).negate();else if("e"===t.value&&t.multiplier.equals(1)){var o=t.power;r=P(o)?o:new ut(o)}else if(t.group===m&&"exp"===t.fname){var l=t.args[0];r=t.multiplier.equals(1)?e.multiply(l,new ut(t.power)):e.symfunction(u.LOG,[t])}else if(u.PARSE2NUMBER&&Z(t)){var c;t=e.parse(t),t.multiplier.lessThan(0)&&(t.negate(),c=e.multiply(new ut(Math.PI),new ut("i"))),r=new ut(Math.log(t.multiplier.toDecimal())),c&&(r=e.add(r,c))}else{t.power.equals(1)||t.contains("e")||(l=t.group===p?t.power:new ut(t.power),t.toLinear()),r=arguments.length>1&&_(arguments)?new ut(1):e.symfunction(u.LOG,arguments),l&&(r=e.multiply(l,r))}return r}function Be(t,i){var r,n,a,o,s=i&&i.isConstant()||"undefined"===typeof i;return t.isConstant()&&s?(r=t,i&&i.lessThan(0)&&(i=V(i),n=Number(t).toExponential().toString().split("e"),r=n[0],a=n[1]),o=new ut(be(r,Number(i||0))),e.multiply(o,e.pow(new ut(10),new ut(a||0)))):e.symfunction("round",arguments)}function qe(e){var t,i=e%2;return i<0&&(i=2+i),t=i>=0&&i<=.5?1:i>.5&&i<=1?2:i>1&&i<=1.5?3:4,t}function De(e){if(!isFinite(e)){var t=Math.sign(e),i=new ut(String(Math.abs(e)));return i.multiplier=i.multiplier.multiply(new lt(t)),i}if(P(e))return e;if("number"===typeof e)try{e=lt.simple(e)}catch(n){e=new lt(e)}var r=new ut(0);return r.multiplier=e,r}function He(t){var i,r=t.group;if(r===v){var n=t.getNum(),a=t.getDenom()||new ut(1),o=Number(t.power),s=new ut(1);if(1===Math.abs(o)){a.each((function(t){t.group===g?s=e.multiply(s,He(t.getDenom())):t.power.lessThan(0)&&(s=e.multiply(s,He(t.clone().toUnitMultiplier())))}));var l,u=new ut(0);a.each((function(t){u=e.add(e.divide(t,s.clone()),u)})),s.invert(),n.isComposite()?(l=new ut(0),n.each((function(t){l=e.add(e.multiply(He(t),s.clone()),l)}))):l=e.multiply(s,n),i=e.divide(l,u)}}else r===g?(i=new ut(1),t.each((function(t){i=e.multiply(i,e.clean(t))}))):r===m&&1===t.args.length&&t.args[0].isConstant()&&(i=Ee("PARSE2NUMBER",(function(){return e.parse(t)}),!0));return i||(i=t),i}function Ge(e,t){return t=t||{expand_denominator:!0,expand_functions:!0},Ye(e,t)}function Ye(t,i){if(Array.isArray(t))return t.map((function(e){return Ye(e,i)}));if(i=i||{},t.group===m&&""===t.fname){var r=Ye(t.args[0],i),n=Ye(e.pow(r,e.parse(t.power)),i);return e.multiply(e.parse(t.multiplier),n).distributeMultiplier()}if(-1!==[c,h,d].indexOf(t.group))return t;var a=t.clone();try{var o=t.multiplier.toString(),s=Number(t.power),l=t;if(t.isComposite()&&J(t.power)&&t.power>0){var u=s-1;r=new ut(0);t.each((function(t){r=e.add(r,Ye(e.parse(t),i))}));for(var p=e.parse(r),y=0;y1&&(r=Ye(e.pow(r,e.parse(r.power)),i)),l=e.multiply(e.parse(o),r).distributeMultiplier()):l=r):(l=r,x.forEach((function(t){l=e.multiply(l,t)})),l=e.multiply(l,e.parse(o)).distributeMultiplier()),l.group===g&&(l=e.parse(l))}else l=t;return l}catch(A){return a}return a}function Xe(e){return mt.identity(e)}function $e(t,i){return i.isConstant()&&J(i)?t.elements[i]:e.symfunction("vecget",arguments)}function et(t,i){return i="undefined"===typeof i?1e-14:i,t=t.clone(),i=Number(i),t.elements.sort((function(e,t){return t.group-e.group})),t.elements=ze(t.elements,(function(t,r){var n=Number(e.subtract(Ie(t),Ie(r)).abs());return n<=i})),t}function it(t,i,r){return i.isConstant?(t.elements[i]=r,t):e.symfunction("vecset",arguments)}function ot(t,i,r){return i.isConstant()&&r.isConstant()?t.elements[i][r]:e.symfunction("matget",arguments)}function st(t,i){return i.isConstant()?new mt(t.elements[i]):e.symfunction("matgetrow",arguments)}function ct(t,i,r){if(!i.isConstant())return e.symfunction("matsetrow",arguments);if(t.elements[i].length!==r.elements.length)throw new Ze("Matrix row must match row dimensions!");var n=t.clone();return n.elements[i]=r.clone().elements,n}function ht(t,i){if(!i.isConstant())return e.symfunction("matgetcol",arguments);i=Number(i);var r=mt.fromArray([]);return t.each((function(e,t,n){n===i&&r.elements.push([e.clone()])})),r}function gt(t,i,r){if(!i.isConstant())return e.symfunction("matsetcol",arguments);if(i=Number(i),t.rows()!==r.elements.length)throw new Ze("Matrix columns must match number of columns!");return r.each((function(e,r){t.set(r-1,i,e.elements[0].clone())})),t}function vt(e,t,i,r){return e.elements[t][i]=r,e}function yt(){return new pt([].slice.call(arguments))}function bt(){return mt.fromArray(arguments)}function wt(){return ft.fromArray(arguments)}function xt(e){return Q(e)?e.determinant():e}function At(e){var t;return Q(e)?t=[new ut(e.cols()),new ut(e.rows())]:j(e)||W(e)?t=new ut(e.elements.length):L("size expects a matrix or a vector"),t}function kt(e,t){if(j(e)&&j(t))return e.dot(t);L("function dot expects 2 vectors")}function St(e,t){if(j(e)&&j(t))return e.cross(t);L("function cross expects 2 vectors")}function Mt(e){if(Q(e))return e.transpose();L("function transpose expects a matrix")}function Nt(e){if(Q(e))return e.invert();L("invert expects a matrix")}function zt(e,t){return e.union(t)}function Lt(e,t){return e.intersection(t)}function Ct(e,t){return e.contains(t)}function Et(e,t){return e.difference(t)}function _t(e,t){return new ut(Number(e.intersects(t)))}function Tt(e,t){return new ut(Number(e.is_subset(t)))}function Bt(){Te(arguments).map((function(e){console.log(e.toString())}))}function It(e){if(!P(e.power)&&e.power.absEquals(.5)){var t=e.power.sign(),i=oe(e.group===h?new ut(e.value):e.toLinear());return t<0&&i.invert(),i}return e}function qt(e){if(e.group===h){var t=e.value,i=at(t)[0];if(!i)return T("Unable to compute prime factors. This should not happen. Please review and report."),e;var r=new lt(Math.log(t)/Math.log(i)),n=r.multiply(e.power);if(n.den>e.power.den)return e;e=J(n)?ut(Math.pow(i,n)):new ut(i).setPower(n)}return e}this.toTeX=function(t,i){i=i||{};var r=!0===i.decimals?"decimals":void 0,n="string"===typeof t?this.toObject(t):t,a=[],o="undefined"===typeof i.cdot?"\\cdot":i.cdot;if(n=R(n),X(n)){for(var s,l,c=[],h=0;h0?"\\frac{d}{d "+z[0]+"}":"\\frac{d}{d x}"}else S=2===v.length?"\\frac{d}{d "+v[1]+"}":"\\frac{d^{"+v[2]+"}}{d "+this.toTeX(v[1])+"^{"+v[2]+"}}";f=S+"\\left("+y+"\\right)"}else if("sum"===g||"product"===g){var L=[[],[],[],[]],C=0;for(h=0;ht.length&&t.group===i.group&&([t,i]=[i,t])),t.multiplier.equals(0))return i;if(i.multiplier.equals(0))return t;if(t.isConstant()&&i.isConstant()&&u.PARSE2NUMBER){var l=new ut(t.multiplier.add(i.multiplier).toDecimal(u.PRECISION));return l}var y=t.group,b=i.group,x=t.power.toString(),A=i.power.toString();if(yA&&A>0)return this.add(i,t);if(y===g&&b===f&&t.value===i.value){var k=t;t=i,i=k,y=t.group,b=i.group,x=t.power.toString(),A=i.power.toString()}var S,M,N=x===A,z=t.value,C=i.value,E=t.isComposite(),_=i.isComposite();if(E&&(S=nt(t,"hash")),_&&(M=nt(i,"hash")),y===v&&b===v&&i.isLinear()&&!t.isLinear()&&S!==M)return this.add(i,t);y===f&&b===f&&(z=S,C=M);var T=y===h&&b===c,B=t.value===i.multiplier.toString(),I=z===C||S===M&&void 0!==S||T&&B;if(I&&N&&y===b)if(T&&(i=i.convert(h)),y!==f||b!==d&&b!==h)if(l=t,t.multiplier.isOne()&&i.multiplier.isOne()&&y===v&&t.isLinear()&&i.isLinear())for(var q in i.symbols){var D=i.symbols[q];l.attach(D)}else l.multiplier=l.multiplier.add(i.multiplier);else t.distributeMultiplier(),l=t.attach(i);else if(I&&y!==f)y===v&&b===f?(i.insert(t,"add"),l=i):(l=ut.shell(f).attach([t,i]),l.value=y===f?S:z);else if(E&&t.isLinear()){var O=y===b,R=y===f&&b===f;if(R&&(O=t.value===i.value),t.distributeMultiplier(),i.isComposite()&&i.isLinear()&&O){for(var q in i.distributeMultiplier(),i.symbols){D=i.symbols[q];t.attach(D)}l=t}else R&&t.value!==M||y===f&&!I?(l=ut.shell(v).attach([t,i]),l.updateHash()):l=t.attach(i)}else{if(y===m&&t.fname===w&&b!==p&&i.power.equals(.5)){var F=i.multiplier.clone();i=oe(i.toUnitMultiplier().toLinear()),i.multiplier=F}2===t.length&&2===i.length&&ke(t.power)&&ke(i.power)?l=e.add(Ye(t),Ye(i)):(l=ut.shell(v).attach([t,i]),l.updateHash())}if(l.multiplier.equals(0)&&(l=new ut(0)),1===l.length){F=l.multiplier;l=le(l.symbols),l.multiplier=l.multiplier.multiply(F)}return l}if(n&&!r){k=t;t=i,i=k,k=n,n=r,r=k}var V=Q(i);if(r&&V){var U=new mt;i.eachElement((function(i,r,n){U.set(r,n,e.add(t.clone(),i))})),i=U}else if(Q(t)&&V)i=t.add(i);else if(r&&j(i))i.each((function(r,n){n--,i.elements[n]=e.add(t.clone(),i.elements[n])}));else if(j(t)&&j(i))i.each((function(r,n){n--,i.elements[n]=e.add(t.elements[n],i.elements[n])}));else{if(j(t)&&Q(i))return e.add(i,t);if(Q(t)&&j(i)){if(i.elements.length===t.rows()){U=new mt;var K=t.cols();return i.each((function(i,r){for(var n=[],a=0;at.group&&i.group!==v)return this.multiply(i,t);if(t.group===g&&i.group===f&&t.value===i.value){b=t;t=i,i=b}var k=t.group,S=i.group,M=i.multiplier.num,N=i.multiplier.den;if(k!==m||t.fname!==w||i.isConstant()||t.args[0].value!==i.value||t.args[0].multiplier.lessThan(0))k===m&&t.fname===w&&t.multiplier.equals(1)&&t.power.equals(-1)&&i.isConstant()&&t.args[0].equals(i)&&(t=e.symfunction(w,[i.clone()]),i=new ut(1));else{var z=t.power,C=e.parse(t.multiplier);t=e.multiply(C,t.args[0].clone()),t.setPower(new lt(.5).multiply(z)),k=t.group}var E=t.value,_=i.value,T=(l=new lt(t.sign()),k===h&&S===c&&i.multiplier.equals(t.value)),B=T?new lt(1).multiply(t.multiplier).abs():t.multiplier.multiply(i.multiplier).abs();s=t.clone().toUnitMultiplier();if(i=i.clone().toUnitMultiplier(!0),k===m&&S===m){var I=t.args[0].clone(),q=i.args[0].clone();if(t.fname===w&&i.fname===w&&t.isLinear()&&i.isLinear()){var D=e.divide(I,q).invert();D.gt(1)&&J(D)&&(s=e.multiply(t.args[0].clone(),oe(D.clone())),i=new ut(1))}else if(t.fname===A&&i.fname===A&&!I.isConstant()&&!q.isConstant()&&i.power<0){var O=e.subtract(I.clone(),q.clone());if(O.isConstant())if(b=new ut(1),O<0){for(var R=0,F=Math.abs(O);R<=F;R++){var V=e.add(I.clone(),new ut(R));b=e.multiply(b,V)}s=e.multiply(e.pow(I,new ut(t.power)),e.pow(b,new ut(i.power))),i=new ut(1)}else{for(R=0,F=Math.abs(O);R<=F;R++){V=e.add(q.clone(),new ut(R));b=e.multiply(b,V)}s=e.multiply(e.pow(b,new ut(t.power)),e.pow(q,new ut(i.power))),i=new ut(1)}}}if(E===_&&k===f&&k===S&&(E=t.text("hash"),_=i.text("hash")),S===p&&i.previousGroup===f&&k===f&&(E=nt(t,"hash",p)),E!==_&&!T||k===f&&(S===d||S===h||S===m)||k===f&&S===g)if(k===g&&t.isLinear())if(S===g&&i.distributeExponent(),S===g&&i.isLinear()){for(var V in i.symbols){var U=i.symbols[V];s=s.combine(U)}s.multiplier=s.multiplier.multiply(i.multiplier)}else s.combine(i);else if(k!==c){if(k===g)s.distributeExponent(),s.combine(i);else if(!i.isOne()){var K=i.multiplier.clone();i.toUnitMultiplier(),s=ut.shell(g).combine([s,i]),s.multiplier=s.multiplier.multiply(K)}}else s=i.clone().toUnitMultiplier();else{var H=t.power,G=i.power,W=P(H),Z=P(G),Y=W||Z;if(k===f&&S!==f&&i.previousGroup!==f&&H.equals(1))s=new ut(0),t.each((function(t){s=e.add(s,e.multiply(t,i.clone()))}),!0);else{if(s.power=Y?e.add(P(H)?H:new ut(H),P(G)?G:new ut(G)):k===c?H:H.add(G),s.power.equals(0)&&(s=s.convert(c)),Y&&s.convert(p),t.imaginary&&i.imaginary){var X=ke(s.power%2);X&&(s=new ut(1),B.negate())}s.group!==p&&s.previousGroup&&(s.previousGroup=void 0),s.multiplier=s.multiplier.multiply(i.multiplier)}}if(s.group===h){var $=Math.log(s.value),ee=Math.log(M)/$,te=Math.log(N)/$,ie=B.num/M,re=B.den/N;0!==ee&&J(ee)&&J(ie)&&(s.power=s.power.add(new lt(ee)),B.num/=M),0!==te&&J(te)&&J(re)&&(s.power=s.power.subtract(new lt(te)),B.den/=N)}if(1===s.length){b=s.multiplier;s=le(s.symbols),s.multiplier=s.multiplier.multiply(b)}var ne=s.power.toString();if(ke(ne)&&s.fname===w){l*=s.sign();var ae=s.power;s=s.args[0],s=e.multiply(new ut(B),e.pow(s,new ut(ae.divide(new lt(2))))),l<0&&s.negate()}else s.multiplier=s.multiplier.multiply(B).multiply(l),s.group===v&&s.isImaginary()&&s.distributeMultiplier();return s.group===h&&J(s.power.toDecimal())&&(s=s.convert(c)),s}o&&!r&&(b=t,t=i,i=b,b=o,o=r,r=b);var se=Q(i),ue=Q(t);if(r&&se){var ce=new mt;i.eachElement((function(i,r,n){ce.set(r,n,e.multiply(t.clone(),i))})),i=ce}else if(ue&&se)i=t.multiply(i);else if(r&&j(i))i.each((function(r,n){n--,i.elements[n]=e.multiply(t.clone(),i.elements[n])}));else if(j(t)&&j(i))i.each((function(r,n){n--,i.elements[n]=e.multiply(t.elements[n],i.elements[n])}));else{if(j(t)&&Q(i))return this.multiply(i,t);if(Q(t)&&j(i)){if(i.elements.length===t.rows()){ce=new mt;var he=t.cols();return i.each((function(i,r){for(var n=[],a=0;a0&&3===re)&&z.negate()}else{var $=i.multiplier.multiply(lt.quick(1,2)),ee=Math.pow(-1,$.num);z=ke($.den)?new ut(-1).setPower($,!0):new ut(ee)}if(L<0&&!Z&&z.negate(),S&&t.group!==p){var te=ke(i.multiplier.den),ie=ke(t.power),re=z.power.toDecimal(),ne=ke(re);if(te&&ie&&!ne){if(1===re)z=e.symfunction(x,[z]);else if(J(re))z=e.multiply(e.symfunction(x,[z.clone().toLinear()]),z.clone().setPower(new lt(re-1)));else{_=z.power;z=e.symfunction(x,[z.toLinear()]).setPower(_)}u.POSITIVE_MULTIPLIERS&&z.fname===x&&(z=z.args[0])}}if(i.equals(2)&&z.group===g){var ae=new ut(1);z.each((function(t){ae=e.multiply(ae,e.pow(t,i))})),z=ae}}}if(z=It(z),Y&&X&&(z=e.multiply(z,qt(e.multiply(Y,X)))),z.fname===w){var oe=z.group===p,se=oe?z.power.multiplier.toString():z.power.toString();if(ke(se)){var le=oe?e.divide(z.power,new ut(2)):new ut(z.power.divide(new lt(2)));o=z.multiplier;z=e.pow(z.args[0],le),z.multiplier=z.multiplier.multiply(o)}}else if(!u.IGNORE_E&&z.isE()&&z.group===p&&z.power.contains("pi")&&z.power.contains(u.IMAGINARY)&&i.group===g){var ue=i.stripVar(u.IMAGINARY);z=e.add(l.cos(ue),e.multiply(ut.imaginary(),l.sin(ue)))}return z}if(j(t)&&a)t=t.map((function(t){return e.pow(t,i.clone())}));else if(Q(t)&&a){var ce=new mt;t.eachElement((function(t,r,n){ce.set(r,n,e.pow(t,i.clone()))})),t=ce}else if(r&&Q(i)){ce=new mt;i.eachElement((function(i,r,n){ce.set(r,n,e.pow(t.clone(),i))})),t=ce}return t},this.comma=function(e,t){return e instanceof a||(e=a.create(e)),e.append(t),e},this.mod=function(e,t){return H(e,t)},this.slice=function(e,t){return new r(e,t)},this.equals=function(e,t){return e.group===d||e.isLinear()||L("Cannot set equality for "+e.toString()),M[e.value]=t.clone(),t},this.percent=function(t){return e.divide(t,new ut(100))},this.assign=function(t,i){if(t instanceof a&&i instanceof a)return t.elements.map((function(t,r){return e.assign(t,i.elements[r])})),pt.fromArray(i.elements);if(t.parent){var r=t.parent;return r.elements[r.getter]=i,delete r.getter,r}if(t.group!==d)throw new Je("Cannot complete operation. Incorrect LH value for "+t);return M[t.value]=i,i},this.function_assign=function(e,t){var i=e.elements.pop();return ce(i,e.elements,t)};var Dt=function(e){return new ut(!0===e?1:0)};this.eq=function(e,t){return Dt(e.equals(t))},this.gt=function(e,t){return Dt(e.gt(t))},this.gte=function(e,t){return Dt(e.gte(t))},this.lt=function(e,t){return Dt(e.lt(t))},this.lte=function(e,t){return Dt(e.lte(t))},this.factorial=function(e){return this.symfunction(A,[e])},this.dfactorial=function(e){return this.symfunction(k,[e])}}u.FUNCTION_MODULES.push(rt),Le(rt),Math.sign=Math.sign||function(e){return e=+e,0===e||isNaN(e)?e:e>0?1:-1},Math.cosh=Math.cosh||function(e){var t=Math.exp(e);return(t+1/t)/2},Math.sech=Math.sech||function(e){return 1/Math.cosh(e)},Math.csch=Math.csch||function(e){return 1/Math.sinh(e)},Math.coth=Math.coth||function(e){return 1/Math.tanh(e)},Math.sinh=Math.sinh||function(e){var t=Math.exp(e);return(t-1/t)/2},Math.tanh=Math.tanh||function(e){if(e===1/0)return 1;if(e===-1/0)return-1;var t=Math.exp(2*e);return(t-1)/(t+1)},Math.asinh=Math.asinh||function(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))},Math.acosh=Math.acosh||function(e){return Math.log(e+Math.sqrt(e*e-1))},Math.atanh=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},Math.log10=Math.log10||function(e){return Math.log(e)*Math.LOG10E},Math.trunc=Math.trunc||function(e){return isNaN(e)?NaN:e>0?Math.floor(e):Math.ceil(e)},at(314146179365),ot.getExpression=function(e,t){"last"!==e&&e||(e=S.length),"first"===e&&(e=1);var i=e-1,r=S[i],n=r?new ot(r):r;return n},ot.prototype={text:function(e,t){return t=t||u.EXPRESSION_DECP,e=e||"decimals",this.symbol.text_?this.symbol.text_(e):nt(this.symbol,e,void 0,t)},latex:function(e){return this.symbol.latex?this.symbol.latex(e):dt.latex(this.symbol,e)},valueOf:function(){return this.symbol.valueOf()},evaluate:function(){if(j(this.symbol)&&0===this.symbol.dimensions())return this;var e,t=arguments[0],r=1;"string"===typeof t?e="%"===t.charAt(0)?ot.getExpression(t.substr(1)).text():t:t instanceof ot||P(t)?e=t.text():(e=this.symbol.text(),r--);var n=arguments[r]||{},a=new ot(Ee("PARSE2NUMBER",(function(){return i.parse(e,n)}),!0));return a},buildFunction:function(e){return gt.build(this.symbol,e)},isNumber:function(){return Z(this.symbol)},isInfinity:function(){return Math.abs(this.symbol.multiplier)===1/0},isImaginary:function(){return Ie(i.parse(this.symbol)).isImaginary()},variables:function(){return U(this.symbol)},toString:function(){try{return X(this.symbol)?"["+this.symbol.toString()+"]":this.symbol.toString()}catch(e){return""}},toDecimal:function(e){u.precision=e;var t=nt(this.symbol,"decimals");return u.precision=void 0,t},isFraction:function(){return F(this.symbol)},isPolynomial:function(){return this.symbol.isPoly()},sub:function(e,t){return new ot(this.symbol.sub(i.parse(e),i.parse(t)))},operation:function(e,t){return V(t)?t=t.symbol:P(t)||(t=i.parse(t)),new ot(i[e](this.symbol.clone(),t.clone()))},add:function(e){return this.operation("add",e)},subtract:function(e){return this.operation("subtract",e)},multiply:function(e){return this.operation("multiply",e)},divide:function(e){return this.operation("divide",e)},pow:function(e){return this.operation("pow",e)},expand:function(){return new ot(i.expand(this.symbol))},each:function(e,t){if(this.symbol.each)this.symbol.each(e,t);else if(X(this.symbol))for(t=0;t4&&n++,t.coeff=i+n}return t},copy:function(){var e=new st(0);return e.coeff=this.coeff,e.exponent=this.exponent,e.sign=this.sign,e},toString:function(e){var t;if(u.SCIENTIFIC_IGNORE_ZERO_EXPONENTS&&0===this.exponent&&this.decp0&&(i+=new Array(n+1).join(0)),i},lt.create=function(e){if(e instanceof lt)return e;e=e.toString();var t="-"===e.charAt(0);t&&(e=e.substr(1,e.length-1));var i=new lt(e);return t&&i.negate(),i},lt.isFrac=function(e){return e instanceof lt},lt.quick=function(e,t){var i=new lt;return i.num=new r(e),i.den=new r(t),i},lt.simple=function(e){for(var t=String(I(e)),i=t.split("."),r=i.join(""),n=1,a=(i[1]||"").length,o=0;o1)return!1;for(var a in this.symbols)if(!this.symbols[a].isPoly(e))return!1;return!0}return!1},stripVar:function(e,t){var r;return this.group!==f&&this.group!==d||this.value!==e?this.group===g&&this.isLinear()?(r=new ut(1),this.each((function(t){t.contains(e,!0)||(r=i.multiply(r,t.clone()))})),r.multiplier=r.multiplier.multiply(this.multiplier)):this.group!==v||this.isLinear()?this.group===v&&this.isLinear()?(r=new ut(0),this.each((function(t){if(!t.contains(e)){var n=t.clone();n.multiplier=n.multiplier.multiply(this.multiplier),r=i.add(r,n)}})),r.equals(0)&&(r=new ut(this.multiplier))):r=this.group===p&&this.power.contains(e,!0)||this.group===m&&this.contains(e)?new ut(this.multiplier):this.clone():r=new ut(this.multiplier):r=new ut(t?0:this.multiplier),r},toArray:function(e,t){t=t||{arr:[],add:function(e,t){var r=this.arr[t];this.arr[t]=r?i.add(r,e):e}};var r=this.group;if(r===d&&this.contains(e))t.add(new ut(this.multiplier),this.power);else if(r===g){var n=this.stripVar(e),a=i.divide(this.clone(),n.clone()),o=a.isConstant()?0:a.power;t.add(n,o)}else if(r===f&&this.value===e)this.each((function(i,r){t.add(i.stripVar(e),r)}));else if(r===v)this.each((function(i){i.toArray(e,t)}));else{if(this.contains(e))throw new Ge("Cannot convert to array! Exiting");t.add(this.clone(),0)}t=t.arr;for(var s=0;sm){var i=this.clone();this.symbols={},e===g?i.toUnitMultiplier():this.toUnitMultiplier(),this.group===m&&(i.args=this.args,delete this.args,delete this.fname),this.isImgSymbol&&delete this.isImgSymbol,this.toLinear(),this.symbols[i.keyForGroup(e)]=i,this.group=e,this.length=1}else if(e===p)this.group===c&&this.multiplier.equals(1)||(this.group!==p&&(this.previousGroup=this.group),this.group===c?(this.value=this.multiplier.num.toString(),this.toUnitMultiplier()):this.value=nt(this,"hash"),this.group=p);else if(e===c){var r=this.multiplier.toDecimal();this.symbols&&(this.symbols=void 0),new ut(this.group===h?r*Math.pow(this.value,this.power):r).clone(this)}else e===h&&this.group===c&&(this.value=t?this.multiplier.num.toString():Math.abs(this.multiplier.num.toString()),this.toUnitMultiplier(!t),this.group=h);return this},insert:function(e,t){if(P(e)||L("Object "+e+" is not of type Symbol!"),this.symbols){var r=this.group;if(r>m){var n=e.keyForGroup(r),a=n in this.symbols&&this.symbols[n];if("add"===t){var o=n;a?(this.symbols[o]=i.add(a,e),this.symbols[o].multiplier.equals(0)&&(delete this.symbols[o],this.length--,0===this.length&&(this.convert(c),this.multiplier=new lt(0)))):(this.symbols[n]=e,this.length++)}else e.group===h&&J(e.power)&&e.convert(c),e.group!==p?(this.multiplier=this.multiplier.multiply(e.multiplier),e.toUnitMultiplier()):(e.parens=e.multiplier.lessThan(0),this.multiplier=this.multiplier.multiply(e.multiplier.clone().abs()),e.toUnitMultiplier(!0)),a&&(e=i.multiply(Ce(this.symbols,n),e),e.isConstant()&&(this.multiplier=this.multiplier.multiply(e.multiplier),e=new ut(1)),this.length--),e.isOne(!0)?e.multiplier.lessThan(0)&&this.negate():(this.symbols[n]=e,this.length++);0===this.length&&this.convert(c),this.group!==v&&this.group!==g||this.updateHash()}}return this},attach:function(e){if(X(e)){for(var t=0;t0||t.group===p&&t.power.multiplier>0)&&(e=i.multiply(e,t.clone()))}))):e=i.parse(t.multiplier.num),e},toString:function(){return this.text()}};var ht={convert:function(e,t){var i;if(0===e)i=[0,1];else if(e<1e-6||e>1e20){var r=this.quickConversion(Number(e));if(r[1]<=1e20){var n=Math.abs(e),a=e/n;i=this.fullConversion(n.toFixed((r[1]+"").length-1)),i[0]=i[0]*a}else i=r}else i=this.fullConversion(e);return i},quickConversion:function(e){var t=function(e){"string"!==typeof e&&(e=e.toString());var t="",i=e.charAt(0);return"-"===i?(e=e.substr(1,e.length),t="-"):"+"===i&&(e=e.substr(1,e.length)),{sign:t,value:e}};function i(e){st.isScientific(e)&&(e=I(e));var i,r=t(e),n=r.value.split(".");i=1===n.length?n[0]:n[0]+n[1];var a=n[1]?n[1].length:0,o=`1${"0".repeat(a)}`;return"0"!==i&&(i=i.replace(/^0+/,"")),[r.sign+i,o]}return i(e)},fullConversion:function(e){var t=!1,i=0,r=1,n=1,a=0,o=0,s=e,l=1e-16;while(!t){o++,o>1e4&&(t=!0);var u=Math.floor(s),c=i+u*n,h=r+u*a,d=s-u;d30)&&(t=!0)}return[c,h]}},dt={parser:function(){var e=["classes","setOperator","getOperators","getBrackets","tokenize","toRPN","tree","units"],t=new ct;for(var i in t)-1===e.indexOf(i)&&delete t[i];t.setOperator({precedence:8,operator:"\\",action:"slash",prefix:!0,postfix:!1,leftAssoc:!0,operation:function(e){return e}}),t.setOperator({precedence:8,operator:"\\,",action:"slash_comma",prefix:!0,postfix:!1,leftAssoc:!0,operation:function(e){return e}});var r=t.getBrackets();return r["{"].maps_to=void 0,t}(),space:"~",dot:" \\cdot ",latex:function(e,t){if(e.clone&&(e=e.clone()),e instanceof i.classes.Collection&&(e=e.elements),X(e)){for(var r=[],n=0;n1)o[s]="\\mathrm"+this.braces(u.LOG)+"_"+this.braces(S[1])+this.brackets(S[0]);else if(M===u.LOG10)o[s]="\\mathrm"+this.braces(u.LOG)+"_"+this.braces(10)+this.brackets(S[0]);else if("sum"===M){var C=S[0],E=S[1],_=S[2],T=S[3];o[s]="\\sum\\limits_{"+this.braces(E)+"="+this.braces(_)+"}^"+this.braces(T)+" "+this.braces(C)}else if("product"===M){C=S[0],E=S[1],_=S[2],T=S[3];o[s]="\\prod\\limits_{"+this.braces(E)+"="+this.braces(_)+"}^"+this.braces(T)+" "+this.braces(C)}else if("nthroot"===M)o[s]="\\sqrt["+S[1]+"]"+this.braces(S[0]);else if("mod"===M)o[s]=S[0]+" \\bmod "+S[1];else if("realpart"===M)o[s]="\\operatorname{Re}"+this.brackets(S[0]);else if("imagpart"===M)o[s]="\\operatorname{Im}"+this.brackets(S[0]);else{var B=""!==M?"\\mathrm"+this.braces(M.replace(/_/g,"\\_")):"";e.isConversion?o[s]=B+this.brackets(S.join(""),"parens"):o[s]=B+this.brackets(S.join(","),"parens")}}else if(e.isComposite()){var I=e.collectSymbols().sort(n===v||a===v?function(e,t){return t.group-e.group}:function(e,t){var i=P(e.power)?-1:e.power,r=P(t.power)?-1:t.power;return r-i}),q=[],D=I.length;for(N=0;N1&&t.length>0)for(var r=t.length,n=0;n1)t.length>0&&(i="_"+this.braces(t.pop()+i));return t[0]+i},formatP:function(e){for(var t=0;t<2;t++){var i=e[t];i&&(e[t]="^"+this.braces(i))}return e},formatFrac:function(e,t){var i=e.num.toString(),r=e.den.toString();return t&&"1"===i&&"1"===r?"":"1"===r?i:this.frac(i,r)},frac:function(e,t){return"\\frac"+this.braces(e)+this.braces(t)},braces:function(e){return"{"+e+"}"},brackets:function(e,t){t=t||"parens";var i={parens:["(",")"],square:["[","]"],brace:["{","}"],abs:["|","|"],angle:["\\langle","\\rangle"]},r=i[t];return"\\left"+r[0]+e+"\\right"+r[1]},filterTokens:function(e){var t=[];X(e)&&(t.type=e.type);for(var i=["\\","left","right","big","Big","large","Large"],r=0,n=e.length;rthis.elements.length?null:this.elements[e-1]},set:function(e,t){P(t)||(t=new ut(t)),this.elements[e]=t},dimensions:function(){return this.elements.length},modulus:function(){return Ee("SAFE",(function(){return i.pow(this.dot(this.clone()),new ut(.5))}),void 0,this)},eql:function(e){var t=this.elements.length,r=e.elements||e;if(t!==r.length)return!1;do{if(Math.abs(i.subtract(this.elements[t-1],r[t-1]).valueOf())>PRECISION)return!1}while(--t);return!0},clone:function(){for(var e=new pt,t=this.elements.length,i=0;i1&&(l=1),new ut(Math.acos(l))}),void 0,this)},isParallelTo:function(e){var t=this.angleFrom(e).valueOf();return null===t?null:t<=PRECISION},isAntiparallelTo:function(e){var t=this.angleFrom(e).valueOf();return null===t?null:Math.abs(t-Math.PI)<=PRECISION},isPerpendicularTo:function(e){var t=this.dot(e);return null===t?null:Math.abs(t)<=PRECISION},add:function(e){return Ee("SAFE",(function(){var t=e.elements||e;return this.elements.length!==t.length?null:this.map((function(e,r){return i.add(e,t[r-1])}))}),void 0,this)},subtract:function(e){return Ee("SAFE",(function(){var t=e.elements||e;return this.elements.length!==t.length?null:this.map((function(e,r){return i.subtract(e,t[r-1])}))}),void 0,this)},multiply:function(e){return this.map((function(t){return t.clone()*e.clone()}))},x:function(e){return this.multiply(e)},dot:function(e){return Ee("SAFE",(function(){var t=e.elements||e,r=new ut(0),n=this.elements.length;if(n!==t.length)return null;do{r=i.add(r,i.multiply(this.elements[n-1],t[n-1]))}while(--n);return r}),void 0,this)},cross:function(e){var t=e.elements||e;if(3!==this.elements.length||3!==t.length)return null;var r=this.elements;return Ee("SAFE",(function(){return new pt([i.subtract(i.multiply(r[1],t[2]),i.multiply(r[2],t[1])),i.subtract(i.multiply(r[2],t[0]),i.multiply(r[0],t[2])),i.subtract(i.multiply(r[0],t[1]),i.multiply(r[1],t[0]))])}),void 0,this)},max:function(){var e,t=0,i=this.elements.length,r=i;do{e=r-i,Math.abs(this.elements[e].valueOf())>Math.abs(t.valueOf())&&(t=this.elements[e])}while(--i);return t},magnitude:function(){var e=new ut(0);return this.each((function(t){e=i.add(e,i.pow(t,new ut(2)))})),i.sqrt(e)},indexOf:function(e){var t,i=null,r=this.elements.length,n=r;do{t=n-r,null===i&&this.elements[t].valueOf()===e.valueOf()&&(i=t+1)}while(--r);return i},text:function(e){return nt(this)},toString:function(){return this.text()},latex:function(e){for(var t=[],i=0;ithis.cols()?[]:this.elements[e-1]},col:function(e){var t=this.rows(),i=[];if(e>this.cols()||!e)return i;for(var r=0;r=u&&p[e].push(s)}while(--r);for(h.elements[e]=a,t=0;t0},is_subset:function(e){for(var t=e.elements,i=0,r=t.length;i1?o[1]:o[0])+"="+i[a]+";",n[a]=o.pop()}return[n,r]},getArgsDeps:function(e,t){for(var i=e.args,r=0;r21&&this.set("USE_BIG",!0)):"USE_LN"===e&&!0===t?(u.LOG="LN",u.LOG10="log",i.functions["log"]=u.LOG_FNS.log10,i.functions["log"][0]=function(e){return e.isConstant()?new ut(Math.log10(e)):i.symfunction(u.LOG10,[e])},i.functions["LN"]=u.LOG_FNS.log,delete i.functions["log10"]):u[e]=t},bt.get=function(e){return u[e]},bt.updateAPI=function(e){var t=function(e){return function(){for(var t=[].slice.call(arguments),r=0;r\n
      \n
    • \n'+i.toHTML(3,t)+"\n
    • \n
    \n"},bt.addPeeker=function(e,t){i.peekers[e]&&i.peekers[e].push(t)},bt.removePeeker=function(e,t){Ce(i.peekers[e],t)},bt.parse=function(e){return String(e).split(";").map((function(e){return i.parse(e)}))},bt.updateAPI(),bt}({bigInt:function(){var i=function(e){"use strict";var t=1e7,r=7,n=9007199254740992,a=h(n),o=Math.log(n);function s(e,t){return"undefined"===typeof e?s[0]:"undefined"!==typeof t?10===+t?re(e):Y(e,t):re(e)}function l(e,t){this.value=e,this.sign=t,this.isSmall=!1}function u(e){this.value=e,this.sign=e<0,this.isSmall=!0}function c(e){return-n0?Math.floor(e):Math.ceil(e)}function g(e,i){var r,n,a=e.length,o=i.length,s=new Array(a),l=0,u=t;for(n=0;n=u?1:0,s[n]=r-l*u;while(n0&&s.push(l),s}function v(e,t){return e.length>=t.length?g(e,t):g(t,e)}function y(e,i){var r,n,a=e.length,o=new Array(a),s=t;for(n=0;n0)o[n++]=i%s,i=Math.floor(i/s);return o}function b(e,i){var r,n,a=e.length,o=i.length,s=new Array(a),l=0,u=t;for(r=0;r=0?r=b(e,t):(r=b(t,e),i=!i),r=d(r),"number"===typeof r?(i&&(r=-r),new u(r)):new l(r,i)}function x(e,i,r){var n,a,o=e.length,s=new Array(o),c=-i,h=t;for(n=0;n0)o[n++]=l%s,l=Math.floor(l/s);return o}function S(e,t){var i=[];while(t-- >0)i.push(0);return i.concat(e)}function M(e,t){var i=Math.max(e.length,t.length);if(i<=30)return A(e,t);i=Math.ceil(i/2);var r=e.slice(i),n=e.slice(0,i),a=t.slice(i),o=t.slice(0,i),s=M(n,o),l=M(r,a),u=M(v(n,r),v(o,a)),c=v(v(s,S(b(b(u,s),l),i)),S(l,2*i));return p(c),c}function N(e,t){return-.012*e-.012*t+15e-6*e*t>0}function z(e,i,r){return new l(e=0;n--){for(r=p-1,y[n+h]!==g&&(r=Math.floor((y[n+h]*p+y[n+h-1])/g)),a=0,o=0,l=b.length,s=0;su&&(a=(a+1)*m),r=Math.ceil(a/o);do{if(s=k(i,r),B(s,h)<=0)break;r--}while(r);c.push(r),h=b(h,s)}return c.reverse(),[d(c),d(h)]}function _(e,i){var r,n,a,o,s=e.length,l=m(s),u=t;for(a=0,r=s-1;r>=0;--r)o=a*u+e[r],n=f(o/i),a=o-n*i,l[r]=0|n;return[l,0|a]}function T(e,i){var r,n,a=re(i),o=e.value,c=a.value;if(0===c)throw new Error("Cannot divide by zero");if(e.isSmall)return a.isSmall?[new u(f(o/c)),new u(o%c)]:[s[0],e];if(a.isSmall){if(1===c)return[e,s[0]];if(-1==c)return[e.negate(),s[0]];var p=Math.abs(c);if(pt.length?1:-1;for(var i=e.length-1;i>=0;i--)if(e[i]!==t[i])return e[i]>t[i]?1:-1;return 0}function I(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function q(e,t){var r,n,a,o=e.prev(),l=o,u=0;while(l.isEven())l=l.divide(2),u++;e:for(n=0;n=0)},u.prototype.minus=u.prototype.subtract,l.prototype.negate=function(){return new l(this.value,!this.sign)},u.prototype.negate=function(){var e=this.sign,t=new u(-this.value);return t.sign=!e,t},l.prototype.abs=function(){return new l(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},l.prototype.multiply=function(e){var i,r=re(e),n=this.value,a=r.value,o=this.sign!==r.sign;if(r.isSmall){if(0===a)return s[0];if(1===a)return this;if(-1===a)return this.negate();if(i=Math.abs(a),ir?1:-1):-1},l.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=re(e),i=this.value,r=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:B(i,r)*(this.sign?-1:1)},l.prototype.compareTo=l.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=re(e),i=this.value,r=t.value;return t.isSmall?i==r?0:i>r?1:-1:i<0!==t.sign?i<0?-1:1:i<0?1:-1},u.prototype.compareTo=u.prototype.compare,l.prototype.equals=function(e){return 0===this.compare(e)},u.prototype.eq=u.prototype.equals=l.prototype.eq=l.prototype.equals,l.prototype.notEquals=function(e){return 0!==this.compare(e)},u.prototype.neq=u.prototype.notEquals=l.prototype.neq=l.prototype.notEquals,l.prototype.greater=function(e){return this.compare(e)>0},u.prototype.gt=u.prototype.greater=l.prototype.gt=l.prototype.greater,l.prototype.lesser=function(e){return this.compare(e)<0},u.prototype.lt=u.prototype.lesser=l.prototype.lt=l.prototype.lesser,l.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},u.prototype.geq=u.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals,l.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},u.prototype.leq=u.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals,l.prototype.isEven=function(){return 0===(1&this.value[0])},u.prototype.isEven=function(){return 0===(1&this.value)},l.prototype.isOdd=function(){return 1===(1&this.value[0])},u.prototype.isOdd=function(){return 1===(1&this.value)},l.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},l.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},l.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},l.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},l.prototype.isDivisibleBy=function(e){var t=re(e),i=t.value;return 0!==i&&(1===i||(2===i?this.isEven():this.mod(t).equals(s[0])))},u.prototype.isDivisibleBy=l.prototype.isDivisibleBy,l.prototype.isPrime=function(t){var r=I(this);if(r!==e)return r;var n=this.abs(),a=n.bitLength();if(a<=64)return q(n,[2,325,9375,28178,450775,9780504,1795265022]);for(var o=Math.log(2)*a,s=Math.ceil(!0===t?2*Math.pow(o,2):o),l=[],u=0;u-n?new u(e-1):new l(a,!0)};var D=[1];while(2*D[D.length-1]<=t)D.push(2*D[D.length-1]);var O=D.length,R=D[O-1];function F(e){return("number"===typeof e||"string"===typeof e)&&+Math.abs(e)<=t||e instanceof l&&e.value.length<=1}function P(e,t,r){t=re(t);var n=e.isNegative(),a=t.isNegative(),o=n?e.not():e,s=a?t.not():t,l=0,u=0,c=null,h=null,d=[];while(!o.isZero()||!s.isZero())c=T(o,R),l=c[1].toJSNumber(),n&&(l=R-1-l),h=T(s,R),u=h[1].toJSNumber(),a&&(u=R-1-u),o=c[0],s=h[0],d.push(r(l,u));for(var p=0!==r(n?1:0,a?1:0)?i(-1):i(0),m=d.length-1;m>=0;m-=1)p=p.multiply(R).add(i(d[m]));return p}l.prototype.shiftLeft=function(e){if(!F(e))throw new Error(String(e)+" is too large for shifting.");if(e=+e,e<0)return this.shiftRight(-e);var t=this;if(t.isZero())return t;while(e>=O)t=t.multiply(R),e-=O-1;return t.multiply(D[e])},u.prototype.shiftLeft=l.prototype.shiftLeft,l.prototype.shiftRight=function(e){var t;if(!F(e))throw new Error(String(e)+" is too large for shifting.");if(e=+e,e<0)return this.shiftLeft(-e);var i=this;while(e>=O){if(i.isZero()||i.isNegative()&&i.isUnit())return i;t=T(i,R),i=t[1].isNegative()?t[0].prev():t[0],e-=O-1}return t=T(i,D[e]),t[1].isNegative()?t[0].prev():t[0]},u.prototype.shiftRight=l.prototype.shiftRight,l.prototype.not=function(){return this.negate().prev()},u.prototype.not=l.prototype.not,l.prototype.and=function(e){return P(this,e,(function(e,t){return e&t}))},u.prototype.and=l.prototype.and,l.prototype.or=function(e){return P(this,e,(function(e,t){return e|t}))},u.prototype.or=l.prototype.or,l.prototype.xor=function(e){return P(this,e,(function(e,t){return e^t}))},u.prototype.xor=l.prototype.xor;var V=1<<30,U=(t&-t)*(t&-t)|V;function K(e){var i=e.value,r="number"===typeof i?i|V:i[0]+i[1]*t|U;return r&-r}function H(e,t){if(t.compareTo(e)<=0){var r=H(e,t.square(t)),n=r.p,a=r.e,o=n.multiply(t);return o.compareTo(e)<=0?{p:o,e:2*a+1}:{p:n,e:2*a}}return{p:i(1),e:0}}function G(e,t){return e=re(e),t=re(t),e.greater(t)?e:t}function j(e,t){return e=re(e),t=re(t),e.lesser(t)?e:t}function Q(e,t){if(e=re(e).abs(),t=re(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;var i,r,n=s[1];while(e.isEven()&&t.isEven())i=Math.min(K(e),K(t)),e=e.divide(i),t=t.divide(i),n=n.multiply(i);while(e.isEven())e=e.divide(K(e));do{while(t.isEven())t=t.divide(K(t));e.greater(t)&&(r=t,t=e,e=r),t=t.subtract(e)}while(!t.isZero());return n.isUnit()?e:e.multiply(n)}function W(e,t){return e=re(e).abs(),t=re(t).abs(),e.divide(Q(e,t)).multiply(t)}function Z(e,i){e=re(e),i=re(i);var r=j(e,i),n=G(e,i),a=n.subtract(r).add(1);if(a.isSmall)return r.add(Math.floor(Math.random()*a));for(var o=a.value.length-1,s=[],c=!0,h=o;h>=0;h--){var p=c?a.value[h]:t,m=f(Math.random()*p);s.unshift(m),m=r){if("1"===a&&1===r)continue;throw new Error(a+" is not a valid digit in base "+t+".")}if(a.charCodeAt(0)-87>=r)throw new Error(a+" is not a valid digit in base "+t+".")}}if(2<=t&&t<=36&&i<=o/Math.log(t)){var s=parseInt(e,t);if(isNaN(s))throw new Error(a+" is not a valid digit in base "+t+".");return new u(parseInt(e,t))}t=re(t);var l=[],c="-"===e[0];for(n=c?1:0;n"!==e[n]);l.push(re(e.slice(d+1,n)))}}return X(l,t,c)};function X(e,t,i){var r,n=s[0],a=s[1];for(r=e.length-1;r>=0;r--)n=n.add(e[r].times(a)),a=a.times(t);return i?n.negate():n}function J(e){return e<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e):"<"+e+">"}function $(e,t){if(t=i(t),t.isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e)).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(+e-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.equals(1))return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(+e)).map(Number.prototype.valueOf,1),isNegative:n};var a,o=[],s=e;while(s.isNegative()||s.compareAbs(t)>=0){a=s.divmod(t),s=a.quotient;var l=a.remainder;l.isNegative()&&(l=t.minus(l).abs(),s=s.next()),o.push(l.toJSNumber())}return o.push(s.toJSNumber()),{value:o.reverse(),isNegative:n}}function ee(e,t){var i=$(e,t);return(i.isNegative?"-":"")+i.value.map(J).join("")}function te(e){if(c(+e)){var t=+e;if(t===f(t))return new u(t);throw new Error("Invalid integer: "+e)}var i="-"===e[0];i&&(e=e.slice(1));var n=e.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var a=n[1];if("+"===a[0]&&(a=a.slice(1)),a=+a,a!==f(a)||!c(a))throw new Error("Invalid integer: "+a+" is not a valid exponent.");var o=n[0],s=o.indexOf(".");if(s>=0&&(a-=o.length-s-1,o=o.slice(0,s)+o.slice(s+1)),a<0)throw new Error("Cannot include negative exponent part for integers");o+=new Array(a+1).join("0"),e=o}var h=/^([0-9][0-9]*)$/.test(e);if(!h)throw new Error("Invalid integer: "+e);var d=[],m=e.length,g=r,v=m-g;while(m>0)d.push(+e.slice(v,m)),v-=g,v<0&&(v=0),m-=g;return p(d),new l(d,i)}function ie(e){if(c(e)){if(e!==f(e))throw new Error(e+" is not an integer.");return new u(e)}return te(e.toString())}function re(e){return"number"===typeof e?ie(e):"string"===typeof e?te(e):e}l.prototype.toArray=function(e){return $(this,e)},u.prototype.toArray=function(e){return $(this,e)},l.prototype.toString=function(t){if(t===e&&(t=10),10!==t)return ee(this,t);var i,r=this.value,n=r.length,a=String(r[--n]),o="0000000";while(--n>=0)i=String(r[n]),a+=o.slice(i.length)+i;var s=this.sign?"-":"";return s+a},u.prototype.toString=function(t){return t===e&&(t=10),10!=t?ee(this,t):String(this.value)},l.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},l.prototype.valueOf=function(){return parseInt(this.toString(),10)},l.prototype.toJSNumber=l.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf;for(var ne=0;ne<1e3;ne++)s[ne]=new u(ne),ne>0&&(s[-ne]=new u(-ne));return s.one=s[1],s.zero=s[0],s.minusOne=s[-1],s.max=G,s.min=j,s.gcd=Q,s.lcm=W,s.isInstance=function(e){return e instanceof l||e instanceof u},s.randBetween=Z,s.fromArray=function(e,t,i){return X(e.map(re),re(t||10),i)},s}();return e.hasOwnProperty("exports")&&(e.exports=i),r=[],n=function(){return i}.apply(t,r),void 0===n||(e.exports=n),i}(),bigDec:function(r){"use strict";var a,o,s,l=9e15,u=1e9,c="0123456789abcdef",h="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",d="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",p={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-l,maxE:l,crypto:!1},m=!0,f="[DecimalError] ",g=f+"Invalid argument: ",v=f+"Precision limit exceeded",y=f+"crypto unavailable",b=Math.floor,w=Math.pow,x=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,A=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,k=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,S=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,M=1e7,N=7,z=h.length-1,L=d.length-1,C={name:"[object Decimal]"};function E(e){var t,i,r,n=e.length-1,a="",o=e[0];if(n>0){for(a+=o,t=1;ti)throw Error(g+e)}function T(e,t,i,r){var n,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=N,n=0):(n=Math.ceil((t+1)/N),t%=N),a=w(10,N-t),s=e[n]%a|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),o=i<4&&99999==s||i>3&&49999==s||5e4==s||0==s):o=(i<4&&s+1==a||i>3&&s+1==a/2)&&(e[n+1]/a/100|0)==w(10,t-2)-1||(s==a/2||0==s)&&0==(e[n+1]/a/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),o=(r||i<4)&&9999==s||!r&&i>3&&4999==s):o=((r||i<4)&&s+1==a||!r&&i>3&&s+1==a/2)&&(e[n+1]/a/1e3|0)==w(10,t-3)-1,o}function B(e,t,i){for(var r,n,a=[0],o=0,s=e.length;oi-1&&(void 0===a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/i|0,a[r]%=i)}return a.reverse()}C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),q(e)},C.ceil=function(){return q(new this.constructor(this),this.e+1,2)},C.comparedTo=C.cmp=function(e){var t,i,r,n,a=this,o=a.d,s=(e=new a.constructor(e)).d,l=a.s,u=e.s;if(!o||!s)return l&&u?l!==u?l:o===s?0:!o^l<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?l:s[0]?-u:0;if(l!==u)return l;if(a.e!==e.e)return a.e>e.e^l<0?1:-1;for(t=0,i=(r=o.length)<(n=s.length)?r:n;ts[t]^l<0?1:-1;return r===n?0:r>n^l<0?1:-1},C.cosine=C.cos=function(){var e,t,i=this,r=i.constructor;return i.d?i.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(i.e,i.sd())+N,r.rounding=1,i=function(e,t){var i,r,n=t.d.length;n<32?(i=Math.ceil(n/3),r=(1/X(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,t=Y(e,1,t.times(r),new e(1));for(var a=i;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,t}(r,J(r,i)),r.precision=e,r.rounding=t,q(2==s||3==s?i.neg():i,e,t,!0)):new r(1):new r(NaN)},C.cubeRoot=C.cbrt=function(){var e,t,i,r,n,a,o,s,l,u,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for(m=!1,(a=c.s*w(c.s*c,1/3))&&Math.abs(a)!=1/0?r=new h(a.toString()):(i=E(c.d),(a=((e=c.e)-i.length+1)%3)&&(i+=1==a||-2==a?"0":"00"),a=w(i,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),(r=new h(i=a==1/0?"5e"+e:(i=a.toExponential()).slice(0,i.indexOf("e")+1)+e)).s=c.s),o=(e=h.precision)+3;;)if(u=(l=(s=r).times(s).times(s)).plus(c),r=I(u.plus(c).times(s),u.plus(l),o+2,1),E(s.d).slice(0,o)===(i=E(r.d)).slice(0,o)){if("9999"!=(i=i.slice(o-3,o+1))&&(n||"4999"!=i)){+i&&(+i.slice(1)||"5"!=i.charAt(0))||(q(r,e+1,1),t=!r.times(r).times(r).eq(c));break}if(!n&&(q(s,e+1,0),s.times(s).times(s).eq(c))){r=s;break}o+=4,n=1}return m=!0,q(r,e,h.rounding,t)},C.decimalPlaces=C.dp=function(){var e,t=this.d,i=NaN;if(t){if(i=((e=t.length-1)-b(this.e/N))*N,e=t[e])for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i},C.dividedBy=C.div=function(e){return I(this,new this.constructor(e))},C.dividedToIntegerBy=C.divToInt=function(e){var t=this.constructor;return q(I(this,new t(e),0,1,1),t.precision,t.rounding)},C.equals=C.eq=function(e){return 0===this.cmp(e)},C.floor=function(){return q(new this.constructor(this),this.e+1,3)},C.greaterThan=C.gt=function(e){return this.cmp(e)>0},C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return 1==t||0===t},C.hyperbolicCosine=C.cosh=function(){var e,t,i,r,n,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;i=o.precision,r=o.rounding,o.precision=i+Math.max(a.e,a.sd())+4,o.rounding=1,(n=a.d.length)<32?t=(1/X(4,e=Math.ceil(n/3))).toString():(e=16,t="2.3283064365386962890625e-10"),a=Y(o,1,a.times(t),new o(1),!0);for(var l,u=e,c=new o(8);u--;)l=a.times(a),a=s.minus(l.times(c.minus(l.times(c))));return q(a,o.precision=i,o.rounding=r,!0)},C.hyperbolicSine=C.sinh=function(){var e,t,i,r,n=this,a=n.constructor;if(!n.isFinite()||n.isZero())return new a(n);if(t=a.precision,i=a.rounding,a.precision=t+Math.max(n.e,n.sd())+4,a.rounding=1,(r=n.d.length)<3)n=Y(a,2,n,n,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,n=Y(a,2,n=n.times(1/X(5,e)),n,!0);for(var o,s=new a(5),l=new a(16),u=new a(20);e--;)o=n.times(n),n=n.times(s.plus(o.times(l.times(o).plus(u))))}return a.precision=t,a.rounding=i,q(n,t,i,!0)},C.hyperbolicTangent=C.tanh=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,I(i.sinh(),i.cosh(),r.precision=e,r.rounding=t)):new r(i.s)},C.inverseCosine=C.acos=function(){var e,t=this,i=t.constructor,r=t.abs().cmp(1),n=i.precision,a=i.rounding;return-1!==r?0===r?t.isNeg()?F(i,n,a):new i(0):new i(NaN):t.isZero()?F(i,n+4,a).times(.5):(i.precision=n+6,i.rounding=1,t=t.asin(),e=F(i,n+4,a).times(.5),i.precision=n,i.rounding=a,e.minus(t))},C.inverseHyperbolicCosine=C.acosh=function(){var e,t,i=this,r=i.constructor;return i.lte(1)?new r(i.eq(1)?0:NaN):i.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(i.e),i.sd())+4,r.rounding=1,m=!1,i=i.times(i).minus(1).sqrt().plus(i),m=!0,r.precision=e,r.rounding=t,i.ln()):new r(i)},C.inverseHyperbolicSine=C.asinh=function(){var e,t,i=this,r=i.constructor;return!i.isFinite()||i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,r.rounding=1,m=!1,i=i.times(i).plus(1).sqrt().plus(i),m=!0,r.precision=e,r.rounding=t,i.ln())},C.inverseHyperbolicTangent=C.atanh=function(){var e,t,i,r,n=this,a=n.constructor;return n.isFinite()?n.e>=0?new a(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=a.precision,t=a.rounding,r=n.sd(),Math.max(r,e)<2*-n.e-1?q(new a(n),e,t,!0):(a.precision=i=r-n.e,n=I(n.plus(1),new a(1).minus(n),i+e,1),a.precision=e+4,a.rounding=1,n=n.ln(),a.precision=e,a.rounding=t,n.times(.5))):new a(NaN)},C.inverseSine=C.asin=function(){var e,t,i,r,n=this,a=n.constructor;return n.isZero()?new a(n):(t=n.abs().cmp(1),i=a.precision,r=a.rounding,-1!==t?0===t?((e=F(a,i+4,r).times(.5)).s=n.s,e):new a(NaN):(a.precision=i+6,a.rounding=1,n=n.div(new a(1).minus(n.times(n)).sqrt().plus(1)).atan(),a.precision=i,a.rounding=r,n.times(2)))},C.inverseTangent=C.atan=function(){var e,t,i,r,n,a,o,s,l,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&h+4<=L)return(o=F(c,h+4,d).times(.25)).s=u.s,o}else{if(!u.s)return new c(NaN);if(h+4<=L)return(o=F(c,h+4,d).times(.5)).s=u.s,o}for(c.precision=s=h+10,c.rounding=1,e=i=Math.min(28,s/N+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(m=!1,t=Math.ceil(s/N),r=1,l=u.times(u),o=new c(u),n=u;-1!==e;)if(n=n.times(l),a=o.minus(n.div(r+=2)),n=n.times(l),void 0!==(o=a.plus(n.div(r+=2))).d[t])for(e=t;o.d[e]===a.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2},C.isNaN=function(){return!this.s},C.isNegative=C.isNeg=function(){return this.s<0},C.isPositive=C.isPos=function(){return this.s>0},C.isZero=function(){return!!this.d&&0===this.d[0]},C.lessThan=C.lt=function(e){return this.cmp(e)<0},C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1},C.logarithm=C.log=function(e){var t,i,r,n,a,o,s,l,u=this.constructor,c=u.precision,h=u.rounding;if(null==e)e=new u(10),t=!0;else{if(i=(e=new u(e)).d,e.s<0||!i||!i[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(i=this.d,this.s<0||!i||!i[0]||this.eq(1))return new u(i&&!i[0]?-1/0:1!=this.s?NaN:i?0:1/0);if(t)if(i.length>1)a=!0;else{for(n=i[0];n%10==0;)n/=10;a=1!==n}if(m=!1,o=j(this,s=c+5),r=t?R(u,s+10):j(e,s),T((l=I(o,r,s,1)).d,n=c,h))do{if(o=j(this,s+=10),r=t?R(u,s+10):j(e,s),l=I(o,r,s,1),!a){+E(l.d).slice(n+1,n+15)+1==1e14&&(l=q(l,c+1,0));break}}while(T(l.d,n+=10,h));return m=!0,q(l,c,h)},C.minus=C.sub=function(e){var t,i,r,n,a,o,s,l,u,c,h,d,p=this,f=p.constructor;if(e=new f(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new f(e.d||p.s!==e.s?p:NaN):e=new f(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(u=p.d,d=e.d,s=f.precision,l=f.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!u[0])return new f(3===l?-0:0);e=new f(p)}return m?q(e,s,l):e}if(i=b(e.e/N),c=b(p.e/N),u=u.slice(),a=c-i){for((h=a<0)?(t=u,a=-a,o=d.length):(t=d,i=c,o=u.length),a>(r=Math.max(Math.ceil(s/N),o)+2)&&(a=r,t.length=1),t.reverse(),r=a;r--;)t.push(0);t.reverse()}else{for((h=(r=u.length)<(o=d.length))&&(o=r),r=0;r0;--r)u[o++]=0;for(r=d.length;r>a;){if(u[--r](o=(a=Math.ceil(s/N))>o?a+1:o+1)&&(n=o,i.length=1),i.reverse();n--;)i.push(0);i.reverse()}for((o=u.length)-(n=c.length)<0&&(n=o,i=c,c=u,u=i),t=0;n;)t=(u[--n]=u[n]+c[n]+t)/M|0,u[n]%=M;for(t&&(u.unshift(t),++r),o=u.length;0==u[--o];)u.pop();return e.d=u,e.e=O(u,r),m?q(e,s,l):e},C.precision=C.sd=function(e){var t,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(g+e);return i.d?(t=P(i.d),e&&i.e+1>t&&(t=i.e+1)):t=NaN,t},C.round=function(){var e=this,t=e.constructor;return q(new t(e),e.e+1,t.rounding)},C.sine=C.sin=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+Math.max(i.e,i.sd())+N,r.rounding=1,i=function(e,t){var i,r=t.d.length;if(r<3)return Y(e,2,t,t);i=(i=1.4*Math.sqrt(r))>16?16:0|i,t=t.times(1/X(5,i)),t=Y(e,2,t,t);for(var n,a=new e(5),o=new e(16),s=new e(20);i--;)n=t.times(t),t=t.times(a.plus(n.times(o.times(n).minus(s))));return t}(r,J(r,i)),r.precision=e,r.rounding=t,q(s>2?i.neg():i,e,t,!0)):new r(NaN)},C.squareRoot=C.sqrt=function(){var e,t,i,r,n,a,o=this,s=o.d,l=o.e,u=o.s,c=o.constructor;if(1!==u||!s||!s[0])return new c(!u||u<0&&(!s||s[0])?NaN:s?o:1/0);for(m=!1,0==(u=Math.sqrt(+o))||u==1/0?(((t=E(s)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=b((l+1)/2)-(l<0||l%2),r=new c(t=u==1/0?"5e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new c(u.toString()),i=(l=c.precision)+3;;)if(r=(a=r).plus(I(o,a,i+2,1)).times(.5),E(a.d).slice(0,i)===(t=E(r.d)).slice(0,i)){if("9999"!=(t=t.slice(i-3,i+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(q(r,l+1,1),e=!r.times(r).eq(o));break}if(!n&&(q(a,l+1,0),a.times(a).eq(o))){r=a;break}i+=4,n=1}return m=!0,q(r,l,c.rounding,e)},C.tangent=C.tan=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(i=i.sin()).s=1,i=I(i,new r(1).minus(i.times(i)).sqrt(),e+10,0),r.precision=e,r.rounding=t,q(2==s||4==s?i.neg():i,e,t,!0)):new r(NaN)},C.times=C.mul=function(e){var t,i,r,n,a,o,s,l,u,c=this,h=c.constructor,d=c.d,p=(e=new h(e)).d;if(e.s*=c.s,!(d&&d[0]&&p&&p[0]))return new h(!e.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:d&&p?0*e.s:e.s/0);for(i=b(c.e/N)+b(e.e/N),(l=d.length)<(u=p.length)&&(a=d,d=p,p=a,o=l,l=u,u=o),a=[],r=o=l+u;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,n=l+r;n>r;)s=a[n]+p[r]*d[n-r-1]+t,a[n--]=s%M|0,t=s/M|0;a[n]=(a[n]+t)%M|0}for(;!a[--o];)a.pop();return t?++i:a.shift(),e.d=a,e.e=O(a,i),m?q(e,h.precision,h.rounding):e},C.toBinary=function(e,t){return $(this,2,e,t)},C.toDecimalPlaces=C.toDP=function(e,t){var i=this,r=i.constructor;return i=new r(i),void 0===e?i:(_(e,0,u),void 0===t?t=r.rounding:_(t,0,8),q(i,e+i.e+1,t))},C.toExponential=function(e,t){var i,r=this,n=r.constructor;return void 0===e?i=D(r,!0):(_(e,0,u),void 0===t?t=n.rounding:_(t,0,8),i=D(r=q(new n(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+i:i},C.toFixed=function(e,t){var i,r,n=this,a=n.constructor;return void 0===e?i=D(n):(_(e,0,u),void 0===t?t=a.rounding:_(t,0,8),i=D(r=q(new a(n),e+n.e+1,t),!1,e+r.e+1)),n.isNeg()&&!n.isZero()?"-"+i:i},C.toFraction=function(e){var t,i,r,n,a,o,s,l,u,c,h,d,p=this,f=p.d,v=p.constructor;if(!f)return new v(p);if(u=i=new v(1),r=l=new v(0),o=(a=(t=new v(r)).e=P(f)-p.e-1)%N,t.d[0]=w(10,o<0?N+o:o),null==e)e=a>0?t:u;else{if(!(s=new v(e)).isInt()||s.lt(u))throw Error(g+s);e=s.gt(t)?a>0?t:u:s}for(m=!1,s=new v(E(f)),c=v.precision,v.precision=a=f.length*N*2;h=I(s,t,0,1,1),1!=(n=i.plus(h.times(r))).cmp(e);)i=r,r=n,n=u,u=l.plus(h.times(n)),l=n,n=t,t=s.minus(h.times(n)),s=n;return n=I(e.minus(i),r,0,1,1),l=l.plus(n.times(u)),i=i.plus(n.times(r)),l.s=u.s=p.s,d=I(u,r,a,1).minus(p).abs().cmp(I(l,i,a,1).minus(p).abs())<1?[u,r]:[l,i],v.precision=c,m=!0,d},C.toHexadecimal=C.toHex=function(e,t){return $(this,16,e,t)},C.toNearest=function(e,t){var i=this,r=i.constructor;if(i=new r(i),null==e){if(!i.d)return i;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:_(t,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(m=!1,i=I(i,e,0,t,1).times(e),m=!0,q(i)):(e.s=i.s,i=e),i},C.toNumber=function(){return+this},C.toOctal=function(e,t){return $(this,8,e,t)},C.toPower=C.pow=function(e){var t,i,r,n,a,o,s=this,l=s.constructor,u=+(e=new l(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new l(w(+s,u));if((s=new l(s)).eq(1))return s;if(r=l.precision,a=l.rounding,e.eq(1))return q(s,r,a);if((t=b(e.e/N))>=e.d.length-1&&(i=u<0?-u:u)<=9007199254740991)return n=U(l,s,i,r),e.s<0?new l(1).div(n):q(n,r,a);if((o=s.s)<0){if(tl.maxE+1||t0?o/0:0):(m=!1,l.rounding=s.s=1,i=Math.min(12,(t+"").length),(n=G(e.times(j(s,r+i)),r)).d&&T((n=q(n,r+5,1)).d,r,a)&&(t=r+10,+E((n=q(G(e.times(j(s,t+i)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(n=q(n,r+1,0))),n.s=o,m=!0,l.rounding=a,q(n,r,a))},C.toPrecision=function(e,t){var i,r=this,n=r.constructor;return void 0===e?i=D(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(_(e,1,u),void 0===t?t=n.rounding:_(t,0,8),i=D(r=q(new n(r),e,t),e<=r.e||r.e<=n.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+i:i},C.toSignificantDigits=C.toSD=function(e,t){var i=this.constructor;return void 0===e?(e=i.precision,t=i.rounding):(_(e,1,u),void 0===t?t=i.rounding:_(t,0,8)),q(new i(this),e,t)},C.toString=function(){var e=this,t=e.constructor,i=D(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i},C.truncated=C.trunc=function(){return q(new this.constructor(this),this.e+1,1)},C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,i=D(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+i:i};var I=function(){function e(e,t,i){var r,n=0,a=e.length;for(e=e.slice();a--;)r=e[a]*t+n,e[a]=r%i|0,n=r/i|0;return n&&e.unshift(n),e}function t(e,t,i,r){var n,a;if(i!=r)a=i>r?1:-1;else for(n=a=0;nt[n]?1:-1;break}return a}function i(e,t,i,r){for(var n=0;i--;)e[i]-=n,n=e[i]1;)e.shift()}return function(r,n,a,s,l,u){var c,h,d,p,m,f,g,v,y,w,x,A,k,S,z,L,C,E,_,T,B=r.constructor,I=r.s==n.s?1:-1,D=r.d,O=n.d;if(!(D&&D[0]&&O&&O[0]))return new B(r.s&&n.s&&(D?!O||D[0]!=O[0]:O)?D&&0==D[0]||!O?0*I:I/0:NaN);for(u?(m=1,h=r.e-n.e):(u=M,m=N,h=b(r.e/m)-b(n.e/m)),_=O.length,C=D.length,w=(y=new B(I)).d=[],d=0;O[d]==(D[d]||0);d++);if(O[d]>(D[d]||0)&&h--,null==a?(S=a=B.precision,s=B.rounding):S=l?a+(r.e-n.e)+1:a,S<0)w.push(1),f=!0;else{if(S=S/m+2|0,d=0,1==_){for(p=0,O=O[0],S++;(d1&&(O=e(O,p,u),D=e(D,p,u),_=O.length,C=D.length),L=_,A=(x=D.slice(0,_)).length;A<_;)x[A++]=0;(T=O.slice()).unshift(0),E=O[0],O[1]>=u/2&&++E;do{p=0,(c=t(O,x,_,A))<0?(k=x[0],_!=A&&(k=k*u+(x[1]||0)),(p=k/E|0)>1?(p>=u&&(p=u-1),1==(c=t(g=e(O,p,u),x,v=g.length,A=x.length))&&(p--,i(g,_=10;p/=10)d++;y.e=d+h*m-1,q(y,l?a+y.e+1:a,s,f)}return y}}();function q(e,t,i,r){var n,a,o,s,l,u,c,h,d,p=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(n=1,s=h[0];s>=10;s/=10)n++;if((a=t-n)<0)a+=N,o=t,l=(c=h[d=0])/w(10,n-o-1)%10|0;else if((d=Math.ceil((a+1)/N))>=(s=h.length)){if(!r)break e;for(;s++<=d;)h.push(0);c=l=0,n=1,o=(a%=N)-N+1}else{for(c=s=h[d],n=1;s>=10;s/=10)n++;l=(o=(a%=N)-N+n)<0?0:c/w(10,n-o-1)%10|0}if(r=r||t<0||void 0!==h[d+1]||(o<0?c:c%w(10,n-o-1)),u=i<4?(l||r)&&(0==i||i==(e.s<0?3:2)):l>5||5==l&&(4==i||r||6==i&&(a>0?o>0?c/w(10,n-o):0:h[d-1])%10&1||i==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=w(10,(N-t%N)%N),e.e=-t||0):h[0]=e.e=0,e;if(0==a?(h.length=d,s=1,d--):(h.length=d+1,s=w(10,N-a),h[d]=o>0?(c/w(10,n-o)%w(10,o)|0)*s:0),u)for(;;){if(0==d){for(a=1,o=h[0];o>=10;o/=10)a++;for(o=h[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,h[0]==M&&(h[0]=1));break}if(h[d]+=s,h[d]!=M)break;h[d--]=0,s=1}for(a=h.length;0===h[--a];)h.pop()}return m&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e0?a=a.charAt(0)+"."+a.slice(1)+V(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):n<0?(a="0."+V(-n-1)+a,i&&(r=i-o)>0&&(a+=V(r))):n>=o?(a+=V(n+1-o),i&&(r=i-n-1)>0&&(a=a+"."+V(r))):((r=n+1)0&&(n+1===o&&(a+="."),a+=V(r))),a}function O(e,t){var i=e[0];for(t*=N;i>=10;i/=10)t++;return t}function R(e,t,i){if(t>z)throw m=!0,i&&(e.precision=i),Error(v);return q(new e(h),t,1,!0)}function F(e,t,i){if(t>L)throw Error(v);return q(new e(d),t,i,!0)}function P(e){var t=e.length-1,i=t*N+1;if(t=e[t]){for(;t%10==0;t/=10)i--;for(t=e[0];t>=10;t/=10)i++}return i}function V(e){for(var t="";e--;)t+="0";return t}function U(e,t,i,r){var n,a=new e(1),o=Math.ceil(r/N+4);for(m=!1;;){if(i%2&&ee((a=a.times(t)).d,o)&&(n=!0),0===(i=b(i/2))){i=a.d.length-1,n&&0===a.d[i]&&++a.d[i];break}ee((t=t.times(t)).d,o)}return m=!0,a}function K(e){return 1&e.d[e.d.length-1]}function H(e,t,i){for(var r,n=new e(t[0]),a=0;++a17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(m=!1,l=f):l=t,s=new d(.03125);e.e>-2;)e=e.times(s),h+=5;for(l+=r=Math.log(w(2,h))/Math.LN10*2+5|0,i=a=o=new d(1),d.precision=l;;){if(a=q(a.times(e),l,1),i=i.times(++c),E((s=o.plus(I(a,i,l,1))).d).slice(0,l)===E(o.d).slice(0,l)){for(n=h;n--;)o=q(o.times(o),l,1);if(null!=t)return d.precision=f,o;if(!(u<3&&T(o.d,l-r,p,u)))return q(o,d.precision=f,p,m=!0);d.precision=l+=10,i=a=s=new d(1),c=0,u++}o=s}}function j(e,t){var i,r,n,a,o,s,l,u,c,h,d,p=1,f=e,g=f.d,v=f.constructor,y=v.rounding,b=v.precision;if(f.s<0||!g||!g[0]||!f.e&&1==g[0]&&1==g.length)return new v(g&&!g[0]?-1/0:1!=f.s?NaN:g?0:f);if(null==t?(m=!1,c=b):c=t,v.precision=c+=10,r=(i=E(g)).charAt(0),!(Math.abs(a=f.e)<15e14))return u=R(v,c+2,b).times(a+""),f=j(new v(r+"."+i.slice(1)),c-10).plus(u),v.precision=b,null==t?q(f,b,y,m=!0):f;for(;r<7&&1!=r||1==r&&i.charAt(1)>3;)r=(i=E((f=f.times(e)).d)).charAt(0),p++;for(a=f.e,r>1?(f=new v("0."+i),a++):f=new v(r+"."+i.slice(1)),h=f,l=o=f=I(f.minus(1),f.plus(1),c,1),d=q(f.times(f),c,1),n=3;;){if(o=q(o.times(d),c,1),E((u=l.plus(I(o,new v(n),c,1))).d).slice(0,c)===E(l.d).slice(0,c)){if(l=l.times(2),0!==a&&(l=l.plus(R(v,c+2,b).times(a+""))),l=I(l,new v(p),c,1),null!=t)return v.precision=b,l;if(!T(l.d,c-10,y,s))return q(l,v.precision=b,y,m=!0);v.precision=c+=10,u=o=f=I(h.minus(1),h.plus(1),c,1),d=q(f.times(f),c,1),n=s=1}l=u,n+=2}}function Q(e){return String(e.s*e.s/0)}function W(e,t){var i,r,n;for((i=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(i<0&&(i=r),i+=+t.slice(r+1),t=t.substring(0,r)):i<0&&(i=t.length),r=0;48===t.charCodeAt(r);r++);for(n=t.length;48===t.charCodeAt(n-1);--n);if(t=t.slice(r,n)){if(n-=r,e.e=i=i-r-1,e.d=[],r=(i+1)%N,i<0&&(r+=N),re.constructor.maxE?(e.d=null,e.e=NaN):e.e0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),s=(o=t.indexOf("."))>=0,r=e.constructor,s&&(o=(l=(t=t.replace(".","")).length)-o,n=U(r,new r(i),o,2*o)),o=h=(c=B(t,i,M)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=O(c,h),e.d=c,m=!1,s&&(e=I(e,n,4*l)),u&&(e=e.times(Math.abs(u)<54?w(2,u):a.pow(2,u))),m=!0,e)}function Y(e,t,i,r,n){var a,o,s,l,u=e.precision,c=Math.ceil(u/N);for(m=!1,l=i.times(i),s=new e(r);;){if(o=I(s.times(l),new e(t++*t++),u,1),s=n?r.plus(o):r.minus(o),r=I(o.times(l),new e(t++*t++),u,1),void 0!==(o=s.plus(r)).d[c]){for(a=c;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=r,r=o,o=a}return m=!0,o.d.length=c+1,o}function X(e,t){for(var i=e;--t;)i*=e;return i}function J(e,t){var i,r=t.s<0,n=F(e,e.precision,1),a=n.times(.5);if((t=t.abs()).lte(a))return s=r?4:1,t;if((i=t.divToInt(n)).isZero())s=r?3:2;else{if((t=t.minus(i.times(n))).lte(a))return s=K(i)?r?2:3:r?4:1,t;s=K(i)?r?1:4:r?3:2}return t.minus(n).abs()}function $(e,t,i,r){var n,a,s,l,h,d,p,m,f,g=e.constructor,v=void 0!==i;if(v?(_(i,1,u),void 0===r?r=g.rounding:_(r,0,8)):(i=g.precision,r=g.rounding),e.isFinite()){for(v?(n=2,16==t?i=4*i-3:8==t&&(i=3*i-2)):n=t,(s=(p=D(e)).indexOf("."))>=0&&(p=p.replace(".",""),(f=new g(1)).e=p.length-s,f.d=B(D(f),10,n),f.e=f.d.length),a=h=(m=B(p,10,n)).length;0==m[--h];)m.pop();if(m[0]){if(s<0?a--:((e=new g(e)).d=m,e.e=a,m=(e=I(e,f,i,r,0,n)).d,a=e.e,d=o),s=m[i],l=n/2,d=d||void 0!==m[i+1],d=r<4?(void 0!==s||d)&&(0===r||r===(e.s<0?3:2)):s>l||s===l&&(4===r||d||6===r&&1&m[i-1]||r===(e.s<0?8:7)),m.length=i,d)for(;++m[--i]>n-1;)m[i]=0,i||(++a,m.unshift(1));for(h=m.length;!m[h-1];--h);for(s=0,p="";s1)if(16==t||8==t){for(s=16==t?4:3,--h;h%s;h++)p+="0";for(h=(m=B(p,n,t)).length;!m[h-1];--h);for(s=1,p="1.";sh)for(a-=h;a--;)p+="0";else at)return e.length=t,!0}function te(e){return new this(e).abs()}function ie(e){return new this(e).acos()}function re(e){return new this(e).acosh()}function ne(e,t){return new this(e).plus(t)}function ae(e){return new this(e).asin()}function oe(e){return new this(e).asinh()}function se(e){return new this(e).atan()}function le(e){return new this(e).atanh()}function ue(e,t){e=new this(e),t=new this(t);var i,r=this.precision,n=this.rounding,a=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(i=t.s<0?F(this,r,n):new this(0)).s=e.s:!e.d||t.isZero()?(i=F(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,i=this.atan(I(e,t,a,1)),t=F(this,a,1),this.precision=r,this.rounding=n,i=e.s<0?i.minus(t):i.plus(t)):i=this.atan(I(e,t,a,1)):(i=F(this,a,1).times(t.s>0?.25:.75)).s=e.s:i=new this(NaN),i}function ce(e){return new this(e).cbrt()}function he(e){return q(e=new this(e),e.e+1,2)}function de(e){if(!e||"object"!=typeof e)throw Error(f+"Object expected");var t,i,r,n=!0===e.defaults,a=["precision",1,u,"rounding",0,8,"toExpNeg",-l,0,"toExpPos",0,l,"maxE",0,l,"minE",-l,0,"modulo",0,9];for(t=0;t=a[t+1]&&r<=a[t+2]))throw Error(g+i+": "+r);this[i]=r}if(i="crypto",n&&(this[i]=p[i]),void 0!==(r=e[i])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(g+i+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(y);this[i]=!0}else this[i]=!1}return this}function pe(e){return new this(e).cos()}function me(e){return new this(e).cosh()}function fe(e,t){return new this(e).div(t)}function ge(e){return new this(e).exp()}function ve(e){return q(e=new this(e),e.e+1,3)}function ye(){var e,t,i=new this(0);for(m=!1,e=0;e=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:s[a++]=n%1e7;else{if(!crypto.randomBytes)throw Error(y);for(t=crypto.randomBytes(r*=4);a=214e7?crypto.randomBytes(4).copy(t,a):(s.push(n%1e7),a+=4);a=r/4}else for(;a=10;n/=10)r++;ra.maxE?(n.e=NaN,n.d=null):e.e=10;i/=10)t++;return void(m?t>a.maxE?(n.e=NaN,n.d=null):t{const i=e.__vccOpts||e;for(const[r,n]of t)i[r]=n;return i}},761:function(e,t,i){var r=i(6692);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var n=i(7037).Z;n("8f7a2bce",r,!0,{sourceMap:!1,shadowMode:!1})},5432:function(e,t,i){var r=i(466);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var n=i(7037).Z;n("016b6f9a",r,!0,{sourceMap:!1,shadowMode:!1})},2370:function(e,t,i){var r=i(1969);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var n=i(7037).Z;n("16fd5974",r,!0,{sourceMap:!1,shadowMode:!1})},3761:function(e,t,i){var r=i(678);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var n=i(7037).Z;n("134c8306",r,!0,{sourceMap:!1,shadowMode:!1})},7037:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});i(7658);function r(e,t){for(var i=[],r={},n=0;ni.parts.length&&(r.parts.length=i.parts.length)}else{var o=[];for(n=0;n!!i[e.toLowerCase()]:e=>!!i[e]}const t="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",r=e(t);function n(e){return!!e||""===e}function a(e){if(N(e)){const t={};for(let i=0;i{if(e){const i=e.split(s);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}function u(e){let t="";if(_(e))t=e;else if(N(e))for(let i=0;ih(e,t)))}const p=e=>_(e)?e:null==e?"":N(e)||B(e)&&(e.toString===q||!E(e.toString))?JSON.stringify(e,m,2):String(e),m=(e,t)=>t&&t.__v_isRef?m(e,t.value):z(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,i])=>(e[`${t} =>`]=i,e)),{})}:L(t)?{[`Set(${t.size})`]:[...t.values()]}:!B(t)||N(t)||R(t)?t:String(t),f={},g=[],v=()=>{},y=()=>!1,b=/^on[^a-z]/,w=e=>b.test(e),x=e=>e.startsWith("onUpdate:"),A=Object.assign,k=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},S=Object.prototype.hasOwnProperty,M=(e,t)=>S.call(e,t),N=Array.isArray,z=e=>"[object Map]"===D(e),L=e=>"[object Set]"===D(e),C=e=>"[object Date]"===D(e),E=e=>"function"===typeof e,_=e=>"string"===typeof e,T=e=>"symbol"===typeof e,B=e=>null!==e&&"object"===typeof e,I=e=>B(e)&&E(e.then)&&E(e.catch),q=Object.prototype.toString,D=e=>q.call(e),O=e=>D(e).slice(8,-1),R=e=>"[object Object]"===D(e),F=e=>_(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,P=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),V=e=>{const t=Object.create(null);return i=>{const r=t[i];return r||(t[i]=e(i))}},U=/-(\w)/g,K=V((e=>e.replace(U,((e,t)=>t?t.toUpperCase():"")))),H=/\B([A-Z])/g,G=V((e=>e.replace(H,"-$1").toLowerCase())),j=V((e=>e.charAt(0).toUpperCase()+e.slice(1))),Q=V((e=>e?`on${j(e)}`:"")),W=(e,t)=>!Object.is(e,t),Z=(e,t)=>{for(let i=0;i{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:i})},X=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let J;const $=()=>J||(J="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof i.g?i.g:{});i(1703),i(541);let ee;class te{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&ee&&(this.parent=ee,this.index=(ee.scopes||(ee.scopes=[])).push(this)-1)}run(e){if(this.active){const t=ee;try{return ee=this,e()}finally{ee=t}}else 0}on(){ee=this}off(){ee=this.parent}stop(e){if(this.active){let t,i;for(t=0,i=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},ne=e=>(e.w&ce)>0,ae=e=>(e.n&ce)>0,oe=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let i=0;for(let r=0;r{("length"===t||t>=r)&&s.push(e)}));else switch(void 0!==i&&s.push(o.get(i)),t){case"add":N(e)?F(i)&&s.push(o.get("length")):(s.push(o.get(pe)),z(e)&&s.push(o.get(me)));break;case"delete":N(e)||(s.push(o.get(pe)),z(e)&&s.push(o.get(me)));break;case"set":z(e)&&s.push(o.get(pe));break}if(1===s.length)s[0]&&Se(s[0]);else{const e=[];for(const t of s)t&&e.push(...t);Se(re(e))}}function Se(e,t){const i=N(e)?e:[...e];for(const r of i)r.computed&&Me(r,t);for(const r of i)r.computed||Me(r,t)}function Me(e,t){(e!==de||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const Ne=e("__proto__,__v_isRef,__isVue"),ze=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(T)),Le=Be(),Ce=Be(!1,!0),Ee=Be(!0),_e=Te();function Te(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const i=St(this);for(let t=0,n=this.length;t{e[t]=function(...e){be();const i=St(this)[t].apply(this,e);return we(),i}})),e}function Be(e=!1,t=!1){return function(i,r,n){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&n===(e?t?pt:dt:t?ht:ct).get(i))return i;const a=N(i);if(!e&&a&&M(_e,r))return Reflect.get(_e,r,n);const o=Reflect.get(i,r,n);return(T(r)?ze.has(r):Ne(r))?o:(e||xe(i,"get",r),t?o:Et(o)?a&&F(r)?o:o.value:B(o)?e?yt(o):gt(o):o)}}const Ie=De(),qe=De(!0);function De(e=!1){return function(t,i,r,n){let a=t[i];if(xt(a)&&Et(a)&&!Et(r))return!1;if(!e&&(At(r)||xt(r)||(a=St(a),r=St(r)),!N(t)&&Et(a)&&!Et(r)))return a.value=r,!0;const o=N(t)&&F(i)?Number(i)e,He=e=>Reflect.getPrototypeOf(e);function Ge(e,t,i=!1,r=!1){e=e["__v_raw"];const n=St(e),a=St(t);i||(t!==a&&xe(n,"get",t),xe(n,"get",a));const{has:o}=He(n),s=r?Ke:i?zt:Nt;return o.call(n,t)?s(e.get(t)):o.call(n,a)?s(e.get(a)):void(e!==n&&e.get(t))}function je(e,t=!1){const i=this["__v_raw"],r=St(i),n=St(e);return t||(e!==n&&xe(r,"has",e),xe(r,"has",n)),e===n?i.has(e):i.has(e)||i.has(n)}function Qe(e,t=!1){return e=e["__v_raw"],!t&&xe(St(e),"iterate",pe),Reflect.get(e,"size",e)}function We(e){e=St(e);const t=St(this),i=He(t),r=i.has.call(t,e);return r||(t.add(e),ke(t,"add",e,e)),this}function Ze(e,t){t=St(t);const i=St(this),{has:r,get:n}=He(i);let a=r.call(i,e);a||(e=St(e),a=r.call(i,e));const o=n.call(i,e);return i.set(e,t),a?W(t,o)&&ke(i,"set",e,t,o):ke(i,"add",e,t),this}function Ye(e){const t=St(this),{has:i,get:r}=He(t);let n=i.call(t,e);n||(e=St(e),n=i.call(t,e));const a=r?r.call(t,e):void 0,o=t.delete(e);return n&&ke(t,"delete",e,void 0,a),o}function Xe(){const e=St(this),t=0!==e.size,i=void 0,r=e.clear();return t&&ke(e,"clear",void 0,void 0,i),r}function Je(e,t){return function(i,r){const n=this,a=n["__v_raw"],o=St(a),s=t?Ke:e?zt:Nt;return!e&&xe(o,"iterate",pe),a.forEach(((e,t)=>i.call(r,s(e),s(t),n)))}}function $e(e,t,i){return function(...r){const n=this["__v_raw"],a=St(n),o=z(a),s="entries"===e||e===Symbol.iterator&&o,l="keys"===e&&o,u=n[e](...r),c=i?Ke:t?zt:Nt;return!t&&xe(a,"iterate",l?me:pe),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[c(e[0]),c(e[1])]:c(e),done:t}},[Symbol.iterator](){return this}}}}function et(e){return function(...t){return"delete"!==e&&this}}function tt(){const e={get(e){return Ge(this,e)},get size(){return Qe(this)},has:je,add:We,set:Ze,delete:Ye,clear:Xe,forEach:Je(!1,!1)},t={get(e){return Ge(this,e,!1,!0)},get size(){return Qe(this)},has:je,add:We,set:Ze,delete:Ye,clear:Xe,forEach:Je(!1,!0)},i={get(e){return Ge(this,e,!0)},get size(){return Qe(this,!0)},has(e){return je.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Je(!0,!1)},r={get(e){return Ge(this,e,!0,!0)},get size(){return Qe(this,!0)},has(e){return je.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Je(!0,!0)},n=["keys","values","entries",Symbol.iterator];return n.forEach((n=>{e[n]=$e(n,!1,!1),i[n]=$e(n,!0,!1),t[n]=$e(n,!1,!0),r[n]=$e(n,!0,!0)})),[e,i,t,r]}const[it,rt,nt,at]=tt();function ot(e,t){const i=t?e?at:nt:e?rt:it;return(t,r,n)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(M(i,r)&&r in t?i:t,r,n)}const st={get:ot(!1,!1)},lt={get:ot(!1,!0)},ut={get:ot(!0,!1)};const ct=new WeakMap,ht=new WeakMap,dt=new WeakMap,pt=new WeakMap;function mt(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ft(e){return e["__v_skip"]||!Object.isExtensible(e)?0:mt(O(e))}function gt(e){return xt(e)?e:bt(e,!1,Pe,st,ct)}function vt(e){return bt(e,!1,Ue,lt,ht)}function yt(e){return bt(e,!0,Ve,ut,dt)}function bt(e,t,i,r,n){if(!B(e))return e;if(e["__v_raw"]&&(!t||!e["__v_isReactive"]))return e;const a=n.get(e);if(a)return a;const o=ft(e);if(0===o)return e;const s=new Proxy(e,2===o?r:i);return n.set(e,s),s}function wt(e){return xt(e)?wt(e["__v_raw"]):!(!e||!e["__v_isReactive"])}function xt(e){return!(!e||!e["__v_isReadonly"])}function At(e){return!(!e||!e["__v_isShallow"])}function kt(e){return wt(e)||xt(e)}function St(e){const t=e&&e["__v_raw"];return t?St(t):e}function Mt(e){return Y(e,"__v_skip",!0),e}const Nt=e=>B(e)?gt(e):e,zt=e=>B(e)?yt(e):e;function Lt(e){ve&&de&&(e=St(e),Ae(e.dep||(e.dep=re())))}function Ct(e,t){e=St(e),e.dep&&Se(e.dep)}function Et(e){return!(!e||!0!==e.__v_isRef)}function _t(e){return Tt(e,!1)}function Tt(e,t){return Et(e)?e:new Bt(e,t)}class Bt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:St(e),this._value=t?e:Nt(e)}get value(){return Lt(this),this._value}set value(e){const t=this.__v_isShallow||At(e)||xt(e);e=t?e:St(e),W(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Nt(e),Ct(this,e))}}function It(e){return Et(e)?e.value:e}const qt={get:(e,t,i)=>It(Reflect.get(e,t,i)),set:(e,t,i,r)=>{const n=e[t];return Et(n)&&!Et(i)?(n.value=i,!0):Reflect.set(e,t,i,r)}};function Dt(e){return wt(e)?e:new Proxy(e,qt)}function Ot(e){const t=N(e)?new Array(e.length):{};for(const i in e)t[i]=Ft(e,i);return t}class Rt{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function Ft(e,t,i){const r=e[t];return Et(r)?r:new Rt(e,t,i)}var Pt;class Vt{constructor(e,t,i,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[Pt]=!1,this._dirty=!0,this.effect=new fe(e,(()=>{this._dirty||(this._dirty=!0,Ct(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!r,this["__v_isReadonly"]=i}get value(){const e=St(this);return Lt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function Ut(e,t,i=!1){let r,n;const a=E(e);a?(r=e,n=v):(r=e.get,n=e.set);const o=new Vt(r,n,a||!n,i);return o}Pt="__v_isReadonly";function Kt(e,t,i,r){let n;try{n=r?e(...r):e()}catch(a){Gt(a,t,i)}return n}function Ht(e,t,i,r){if(E(e)){const n=Kt(e,t,i,r);return n&&I(n)&&n.catch((e=>{Gt(e,t,i)})),n}const n=[];for(let a=0;a>>1,n=ci(Zt[r]);nYt&&Zt.splice(t,1)}function si(e){N(e)?Xt.push(...e):Jt&&Jt.includes(e,e.allowRecurse?$t+1:$t)||Xt.push(e),ai()}function li(e,t=(Qt?Yt+1:0)){for(0;tci(e)-ci(t))),$t=0;$tnull==e.id?1/0:e.id,hi=(e,t)=>{const i=ci(e)-ci(t);if(0===i){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return i};function di(e){Wt=!1,Qt=!0,Zt.sort(hi);try{for(Yt=0;Yte.trim()))),t&&(n=i.map(X))}let s;let l=r[s=Q(t)]||r[s=Q(K(t))];!l&&a&&(l=r[s=Q(G(t))]),l&&Ht(l,e,6,n);const u=r[s+"Once"];if(u){if(e.emitted){if(e.emitted[s])return}else e.emitted={};e.emitted[s]=!0,Ht(u,e,6,n)}}function mi(e,t,i=!1){const r=t.emitsCache,n=r.get(e);if(void 0!==n)return n;const a=e.emits;let o={},s=!1;if(!E(e)){const r=e=>{const i=mi(e,t,!0);i&&(s=!0,A(o,i))};!i&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return a||s?(N(a)?a.forEach((e=>o[e]=null)):A(o,a),B(e)&&r.set(e,o),o):(B(e)&&r.set(e,null),null)}function fi(e,t){return!(!e||!w(t))&&(t=t.slice(2).replace(/Once$/,""),M(e,t[0].toLowerCase()+t.slice(1))||M(e,G(t))||M(e,t))}let gi=null,vi=null;function yi(e){const t=gi;return gi=e,vi=e&&e.type.__scopeId||null,t}function bi(e,t=gi,i){if(!t)return e;if(e._n)return e;const r=(...i)=>{r._d&&Sn(-1);const n=yi(t),a=e(...i);return yi(n),r._d&&Sn(1),a};return r._n=!0,r._c=!0,r._d=!0,r}function wi(e){const{type:t,vnode:i,proxy:r,withProxy:n,props:a,propsOptions:[o],slots:s,attrs:l,emit:u,render:c,renderCache:h,data:d,setupState:p,ctx:m,inheritAttrs:f}=e;let g,v;const y=yi(e);try{if(4&i.shapeFlag){const e=n||r;g=Pn(c.call(e,e,h,a,p,d,m)),v=l}else{const e=t;0,g=Pn(e.length>1?e(a,{attrs:l,slots:s,emit:u}):e(a,null)),v=t.props?l:xi(l)}}catch(w){bn.length=0,Gt(w,e,1),g=In(vn)}let b=g;if(v&&!1!==f){const e=Object.keys(v),{shapeFlag:t}=b;e.length&&7&t&&(o&&e.some(x)&&(v=Ai(v,o)),b=On(b,v))}return i.dirs&&(b=On(b),b.dirs=b.dirs?b.dirs.concat(i.dirs):i.dirs),i.transition&&(b.transition=i.transition),g=b,yi(y),g}const xi=e=>{let t;for(const i in e)("class"===i||"style"===i||w(i))&&((t||(t={}))[i]=e[i]);return t},Ai=(e,t)=>{const i={};for(const r in e)x(r)&&r.slice(9)in t||(i[r]=e[r]);return i};function ki(e,t,i){const{props:r,children:n,component:a}=e,{props:o,children:s,patchFlag:l}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(!(i&&l>=0))return!(!n&&!s||s&&s.$stable)||r!==o&&(r?!o||Si(r,o,u):!!o);if(1024&l)return!0;if(16&l)return r?Si(r,o,u):!!o;if(8&l){const e=t.dynamicProps;for(let t=0;te.__isSuspense;function zi(e,t){t&&t.pendingBranch?N(e)?t.effects.push(...e):t.effects.push(e):si(e)}function Li(e,t){if(Wn){let i=Wn.provides;const r=Wn.parent&&Wn.parent.provides;r===i&&(i=Wn.provides=Object.create(r)),i[e]=t}else 0}function Ci(e,t,i=!1){const r=Wn||gi;if(r){const n=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(n&&e in n)return n[e];if(arguments.length>1)return i&&E(t)?t.call(r.proxy):t}else 0}const Ei={};function _i(e,t,i){return Ti(e,t,i)}function Ti(e,t,{immediate:i,deep:r,flush:n,onTrack:a,onTrigger:o}=f){const s=Wn;let l,u,c=!1,h=!1;if(Et(e)?(l=()=>e.value,c=At(e)):wt(e)?(l=()=>e,r=!0):N(e)?(h=!0,c=e.some((e=>wt(e)||At(e))),l=()=>e.map((e=>Et(e)?e.value:wt(e)?qi(e):E(e)?Kt(e,s,2):void 0))):l=E(e)?t?()=>Kt(e,s,2):()=>{if(!s||!s.isUnmounted)return u&&u(),Ht(e,s,3,[d])}:v,t&&r){const e=l;l=()=>qi(e())}let d=e=>{u=y.onStop=()=>{Kt(e,s,4)}};if(ta)return d=v,t?i&&Ht(t,s,3,[l(),h?[]:void 0,d]):l(),v;let p=h?[]:Ei;const m=()=>{if(y.active)if(t){const e=y.run();(r||c||(h?e.some(((e,t)=>W(e,p[t]))):W(e,p)))&&(u&&u(),Ht(t,s,3,[e,p===Ei?void 0:p,d]),p=e)}else y.run()};let g;m.allowRecurse=!!t,"sync"===n?g=m:"post"===n?g=()=>ln(m,s&&s.suspense):(m.pre=!0,s&&(m.id=s.uid),g=()=>ni(m));const y=new fe(l,g);return t?i?m():p=y.run():"post"===n?ln(y.run.bind(y),s&&s.suspense):y.run(),()=>{y.stop(),s&&s.scope&&k(s.scope.effects,y)}}function Bi(e,t,i){const r=this.proxy,n=_(e)?e.includes(".")?Ii(r,e):()=>r[e]:e.bind(r,r);let a;E(t)?a=t:(a=t.handler,i=t);const o=Wn;Yn(this);const s=Ti(n,a.bind(r),i);return o?Yn(o):Xn(),s}function Ii(e,t){const i=t.split(".");return()=>{let t=e;for(let e=0;e{qi(e,t)}));else if(R(e))for(const i in e)qi(e[i],t);return e}function Di(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ar((()=>{e.isMounted=!0})),lr((()=>{e.isUnmounting=!0})),e}const Oi=[Function,Array],Ri={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Oi,onEnter:Oi,onAfterEnter:Oi,onEnterCancelled:Oi,onBeforeLeave:Oi,onLeave:Oi,onAfterLeave:Oi,onLeaveCancelled:Oi,onBeforeAppear:Oi,onAppear:Oi,onAfterAppear:Oi,onAppearCancelled:Oi},setup(e,{slots:t}){const i=Zn(),r=Di();let n;return()=>{const a=t.default&&Gi(t.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){let e=!1;for(const t of a)if(t.type!==vn){0,o=t,e=!0;break}}const s=St(e),{mode:l}=s;if(r.isLeaving)return Ui(o);const u=Ki(o);if(!u)return Ui(o);const c=Vi(u,s,r,i);Hi(u,c);const h=i.subTree,d=h&&Ki(h);let p=!1;const{getTransitionKey:m}=u.type;if(m){const e=m();void 0===n?n=e:e!==n&&(n=e,p=!0)}if(d&&d.type!==vn&&(!Cn(u,d)||p)){const e=Vi(d,s,r,i);if(Hi(d,e),"out-in"===l)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,i.update()},Ui(o);"in-out"===l&&u.type!==vn&&(e.delayLeave=(e,t,i)=>{const n=Pi(r,d);n[String(d.key)]=d,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=i})}return o}}},Fi=Ri;function Pi(e,t){const{leavingVNodes:i}=e;let r=i.get(t.type);return r||(r=Object.create(null),i.set(t.type,r)),r}function Vi(e,t,i,r){const{appear:n,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:h,onLeave:d,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:f,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),w=Pi(i,e),x=(e,t)=>{e&&Ht(e,r,9,t)},A=(e,t)=>{const i=t[1];x(e,t),N(e)?e.every((e=>e.length<=1))&&i():e.length<=1&&i()},k={mode:a,persisted:o,beforeEnter(t){let r=s;if(!i.isMounted){if(!n)return;r=f||s}t._leaveCb&&t._leaveCb(!0);const a=w[b];a&&Cn(e,a)&&a.el._leaveCb&&a.el._leaveCb(),x(r,[t])},enter(e){let t=l,r=u,a=c;if(!i.isMounted){if(!n)return;t=g||l,r=v||u,a=y||c}let o=!1;const s=e._enterCb=t=>{o||(o=!0,x(t?a:r,[e]),k.delayedLeave&&k.delayedLeave(),e._enterCb=void 0)};t?A(t,[e,s]):s()},leave(t,r){const n=String(e.key);if(t._enterCb&&t._enterCb(!0),i.isUnmounting)return r();x(h,[t]);let a=!1;const o=t._leaveCb=i=>{a||(a=!0,r(),x(i?m:p,[t]),t._leaveCb=void 0,w[n]===e&&delete w[n])};w[n]=e,d?A(d,[t,o]):o()},clone(e){return Vi(e,t,i,r)}};return k}function Ui(e){if(Wi(e))return e=On(e),e.children=null,e}function Ki(e){return Wi(e)?e.children?e.children[0]:void 0:e}function Hi(e,t){6&e.shapeFlag&&e.component?Hi(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gi(e,t=!1,i){let r=[],n=0;for(let a=0;a1)for(let a=0;a!!e.type.__asyncLoader;const Wi=e=>e.type.__isKeepAlive;RegExp,RegExp;function Zi(e,t){return N(e)?e.some((e=>Zi(e,t))):_(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function Yi(e,t){Ji(e,"a",t)}function Xi(e,t){Ji(e,"da",t)}function Ji(e,t,i=Wn){const r=e.__wdc||(e.__wdc=()=>{let t=i;while(t){if(t.isDeactivated)return;t=t.parent}return e()});if(ir(t,r,i),i){let e=i.parent;while(e&&e.parent)Wi(e.parent.vnode)&&$i(r,t,i,e),e=e.parent}}function $i(e,t,i,r){const n=ir(t,e,r,!0);ur((()=>{k(r[t],n)}),i)}function er(e){let t=e.shapeFlag;256&t&&256,512&t&&512,e.shapeFlag=t}function tr(e){return 128&e.shapeFlag?e.ssContent:e}function ir(e,t,i=Wn,r=!1){if(i){const n=i[e]||(i[e]=[]),a=t.__weh||(t.__weh=(...r)=>{if(i.isUnmounted)return;be(),Yn(i);const n=Ht(t,i,e,r);return Xn(),we(),n});return r?n.unshift(a):n.push(a),a}}const rr=e=>(t,i=Wn)=>(!ta||"sp"===e)&&ir(e,t,i),nr=rr("bm"),ar=rr("m"),or=rr("bu"),sr=rr("u"),lr=rr("bum"),ur=rr("um"),cr=rr("sp"),hr=rr("rtg"),dr=rr("rtc");function pr(e,t=Wn){ir("ec",e,t)}function mr(e,t){const i=gi;if(null===i)return e;const r=la(i)||i.proxy,n=e.dirs||(e.dirs=[]);for(let a=0;at(e,i,void 0,a&&a[i])));else{const i=Object.keys(e);n=new Array(i.length);for(let r=0,o=i.length;re?Jn(e)?la(e)||e.proxy:kr(e.parent):null,Sr=A(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>kr(e.parent),$root:e=>kr(e.root),$emit:e=>e.emit,$options:e=>_r(e),$forceUpdate:e=>e.f||(e.f=()=>ni(e.update)),$nextTick:e=>e.n||(e.n=ii.bind(e.proxy)),$watch:e=>Bi.bind(e)}),Mr={get({_:e},t){const{ctx:i,setupState:r,data:n,props:a,accessCache:o,type:s,appContext:l}=e;let u;if("$"!==t[0]){const s=o[t];if(void 0!==s)switch(s){case 1:return r[t];case 2:return n[t];case 4:return i[t];case 3:return a[t]}else{if(r!==f&&M(r,t))return o[t]=1,r[t];if(n!==f&&M(n,t))return o[t]=2,n[t];if((u=e.propsOptions[0])&&M(u,t))return o[t]=3,a[t];if(i!==f&&M(i,t))return o[t]=4,i[t];Nr&&(o[t]=0)}}const c=Sr[t];let h,d;return c?("$attrs"===t&&xe(e,"get",t),c(e)):(h=s.__cssModules)&&(h=h[t])?h:i!==f&&M(i,t)?(o[t]=4,i[t]):(d=l.config.globalProperties,M(d,t)?d[t]:void 0)},set({_:e},t,i){const{data:r,setupState:n,ctx:a}=e;return n!==f&&M(n,t)?(n[t]=i,!0):r!==f&&M(r,t)?(r[t]=i,!0):!M(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(a[t]=i,!0))},has({_:{data:e,setupState:t,accessCache:i,ctx:r,appContext:n,propsOptions:a}},o){let s;return!!i[o]||e!==f&&M(e,o)||t!==f&&M(t,o)||(s=a[0])&&M(s,o)||M(r,o)||M(Sr,o)||M(n.config.globalProperties,o)},defineProperty(e,t,i){return null!=i.get?e._.accessCache[t]=0:M(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};let Nr=!0;function zr(e){const t=_r(e),i=e.proxy,r=e.ctx;Nr=!1,t.beforeCreate&&Cr(t.beforeCreate,e,"bc");const{data:n,computed:a,methods:o,watch:s,provide:l,inject:u,created:c,beforeMount:h,mounted:d,beforeUpdate:p,updated:m,activated:f,deactivated:g,beforeDestroy:y,beforeUnmount:b,destroyed:w,unmounted:x,render:A,renderTracked:k,renderTriggered:S,errorCaptured:M,serverPrefetch:z,expose:L,inheritAttrs:C,components:_,directives:T,filters:I}=t,q=null;if(u&&Lr(u,r,q,e.appContext.config.unwrapInjectedRef),o)for(const v in o){const e=o[v];E(e)&&(r[v]=e.bind(i))}if(n){0;const t=n.call(i,i);0,B(t)&&(e.data=gt(t))}if(Nr=!0,a)for(const N in a){const e=a[N],t=E(e)?e.bind(i,i):E(e.get)?e.get.bind(i,i):v;0;const n=!E(e)&&E(e.set)?e.set.bind(i):v,o=ha({get:t,set:n});Object.defineProperty(r,N,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e})}if(s)for(const v in s)Er(s[v],r,i,v);if(l){const e=E(l)?l.call(i):l;Reflect.ownKeys(e).forEach((t=>{Li(t,e[t])}))}function D(e,t){N(t)?t.forEach((t=>e(t.bind(i)))):t&&e(t.bind(i))}if(c&&Cr(c,e,"c"),D(nr,h),D(ar,d),D(or,p),D(sr,m),D(Yi,f),D(Xi,g),D(pr,M),D(dr,k),D(hr,S),D(lr,b),D(ur,x),D(cr,z),N(L))if(L.length){const t=e.exposed||(e.exposed={});L.forEach((e=>{Object.defineProperty(t,e,{get:()=>i[e],set:t=>i[e]=t})}))}else e.exposed||(e.exposed={});A&&e.render===v&&(e.render=A),null!=C&&(e.inheritAttrs=C),_&&(e.components=_),T&&(e.directives=T)}function Lr(e,t,i=v,r=!1){N(e)&&(e=Dr(e));for(const n in e){const i=e[n];let a;a=B(i)?"default"in i?Ci(i.from||n,i.default,!0):Ci(i.from||n):Ci(i),Et(a)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e}):t[n]=a}}function Cr(e,t,i){Ht(N(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,i)}function Er(e,t,i,r){const n=r.includes(".")?Ii(i,r):()=>i[r];if(_(e)){const i=t[e];E(i)&&_i(n,i)}else if(E(e))_i(n,e.bind(i));else if(B(e))if(N(e))e.forEach((e=>Er(e,t,i,r)));else{const r=E(e.handler)?e.handler.bind(i):t[e.handler];E(r)&&_i(n,r,e)}else 0}function _r(e){const t=e.type,{mixins:i,extends:r}=t,{mixins:n,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t);let l;return s?l=s:n.length||i||r?(l={},n.length&&n.forEach((e=>Tr(l,e,o,!0))),Tr(l,t,o)):l=t,B(t)&&a.set(t,l),l}function Tr(e,t,i,r=!1){const{mixins:n,extends:a}=t;a&&Tr(e,a,i,!0),n&&n.forEach((t=>Tr(e,t,i,!0)));for(const o in t)if(r&&"expose"===o);else{const r=Br[o]||i&&i[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const Br={data:Ir,props:Rr,emits:Rr,methods:Rr,computed:Rr,beforeCreate:Or,created:Or,beforeMount:Or,mounted:Or,beforeUpdate:Or,updated:Or,beforeDestroy:Or,beforeUnmount:Or,destroyed:Or,unmounted:Or,activated:Or,deactivated:Or,errorCaptured:Or,serverPrefetch:Or,components:Rr,directives:Rr,watch:Fr,provide:Ir,inject:qr};function Ir(e,t){return t?e?function(){return A(E(e)?e.call(this,this):e,E(t)?t.call(this,this):t)}:t:e}function qr(e,t){return Rr(Dr(e),Dr(t))}function Dr(e){if(N(e)){const t={};for(let i=0;i0)||16&o){let r;Ur(e,t,n,a)&&(u=!0);for(const a in s)t&&(M(t,a)||(r=G(a))!==a&&M(t,r))||(l?!i||void 0===i[a]&&void 0===i[r]||(n[a]=Kr(l,s,a,void 0,e,!0)):delete n[a]);if(a!==s)for(const e in a)t&&M(t,e)||(delete a[e],u=!0)}else if(8&o){const i=e.vnode.dynamicProps;for(let r=0;r{l=!0;const[i,r]=Hr(e,t,!0);A(o,i),r&&s.push(...r)};!i&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!l)return B(e)&&r.set(e,g),g;if(N(a))for(let c=0;c-1,r[1]=i<0||e-1||M(r,"default"))&&s.push(t)}}}}const u=[o,s];return B(e)&&r.set(e,u),u}function Gr(e){return"$"!==e[0]}function jr(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function Qr(e,t){return jr(e)===jr(t)}function Wr(e,t){return N(t)?t.findIndex((t=>Qr(t,e))):E(t)&&Qr(t,e)?0:-1}const Zr=e=>"_"===e[0]||"$stable"===e,Yr=e=>N(e)?e.map(Pn):[Pn(e)],Xr=(e,t,i)=>{if(t._n)return t;const r=bi(((...e)=>Yr(t(...e))),i);return r._c=!1,r},Jr=(e,t,i)=>{const r=e._ctx;for(const n in e){if(Zr(n))continue;const i=e[n];if(E(i))t[n]=Xr(n,i,r);else if(null!=i){0;const e=Yr(i);t[n]=()=>e}}},$r=(e,t)=>{const i=Yr(t);e.slots.default=()=>i},en=(e,t)=>{if(32&e.vnode.shapeFlag){const i=t._;i?(e.slots=St(t),Y(t,"_",i)):Jr(t,e.slots={})}else e.slots={},t&&$r(e,t);Y(e.slots,En,1)},tn=(e,t,i)=>{const{vnode:r,slots:n}=e;let a=!0,o=f;if(32&r.shapeFlag){const e=t._;e?i&&1===e?a=!1:(A(n,t),i||1!==e||delete n._):(a=!t.$stable,Jr(t,n)),o=t}else t&&($r(e,t),o={default:1});if(a)for(const s in n)Zr(s)||s in o||delete n[s]};function rn(){return{app:null,config:{isNativeTag:y,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let nn=0;function an(e,t){return function(i,r=null){E(i)||(i=Object.assign({},i)),null==r||B(r)||(r=null);const n=rn(),a=new Set;let o=!1;const s=n.app={_uid:nn++,_component:i,_props:r,_container:null,_context:n,_instance:null,version:pa,get config(){return n.config},set config(e){0},use(e,...t){return a.has(e)||(e&&E(e.install)?(a.add(e),e.install(s,...t)):E(e)&&(a.add(e),e(s,...t))),s},mixin(e){return n.mixins.includes(e)||n.mixins.push(e),s},component(e,t){return t?(n.components[e]=t,s):n.components[e]},directive(e,t){return t?(n.directives[e]=t,s):n.directives[e]},mount(a,l,u){if(!o){0;const c=In(i,r);return c.appContext=n,l&&t?t(c,a):e(c,a,u),o=!0,s._container=a,a.__vue_app__=s,la(c.component)||c.component.proxy}},unmount(){o&&(e(null,s._container),delete s._container.__vue_app__)},provide(e,t){return n.provides[e]=t,s}};return s}}function on(e,t,i,r,n=!1){if(N(e))return void e.forEach(((e,a)=>on(e,t&&(N(t)?t[a]:t),i,r,n)));if(Qi(r)&&!n)return;const a=4&r.shapeFlag?la(r.component)||r.component.proxy:r.el,o=n?null:a,{i:s,r:l}=e;const u=t&&t.r,c=s.refs===f?s.refs={}:s.refs,h=s.setupState;if(null!=u&&u!==l&&(_(u)?(c[u]=null,M(h,u)&&(h[u]=null)):Et(u)&&(u.value=null)),E(l))Kt(l,s,12,[o,c]);else{const t=_(l),r=Et(l);if(t||r){const s=()=>{if(e.f){const i=t?c[l]:l.value;n?N(i)&&k(i,a):N(i)?i.includes(a)||i.push(a):t?(c[l]=[a],M(h,l)&&(h[l]=c[l])):(l.value=[a],e.k&&(c[e.k]=l.value))}else t?(c[l]=o,M(h,l)&&(h[l]=o)):r&&(l.value=o,e.k&&(c[e.k]=o))};o?(s.id=-1,ln(s,i)):s()}else 0}}function sn(){}const ln=zi;function un(e){return cn(e)}function cn(e,t){sn();const i=$();i.__VUE__=!0;const{insert:r,remove:n,patchProp:a,createElement:o,createText:s,createComment:l,setText:u,setElementText:c,parentNode:h,nextSibling:d,setScopeId:p=v,cloneNode:m,insertStaticContent:y}=e,b=(e,t,i,r=null,n=null,a=null,o=!1,s=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Cn(e,t)&&(r=W(e),K(e,n,a,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:u,ref:c,shapeFlag:h}=t;switch(u){case gn:w(e,t,i,r);break;case vn:x(e,t,i,r);break;case yn:null==e&&A(t,i,r,o);break;case fn:T(e,t,i,r,n,a,o,s,l);break;default:1&h?M(e,t,i,r,n,a,o,s,l):6&h?B(e,t,i,r,n,a,o,s,l):(64&h||128&h)&&u.process(e,t,i,r,n,a,o,s,l,X)}null!=c&&n&&on(c,e&&e.ref,a,t||e,!t)},w=(e,t,i,n)=>{if(null==e)r(t.el=s(t.children),i,n);else{const i=t.el=e.el;t.children!==e.children&&u(i,t.children)}},x=(e,t,i,n)=>{null==e?r(t.el=l(t.children||""),i,n):t.el=e.el},A=(e,t,i,r)=>{[e.el,e.anchor]=y(e.children,t,i,r,e.el,e.anchor)},k=({el:e,anchor:t},i,n)=>{let a;while(e&&e!==t)a=d(e),r(e,i,n),e=a;r(t,i,n)},S=({el:e,anchor:t})=>{let i;while(e&&e!==t)i=d(e),n(e),e=i;n(t)},M=(e,t,i,r,n,a,o,s,l)=>{o=o||"svg"===t.type,null==e?N(t,i,r,n,a,o,s,l):C(e,t,n,a,o,s,l)},N=(e,t,i,n,s,l,u,h)=>{let d,p;const{type:f,props:g,shapeFlag:v,transition:y,patchFlag:b,dirs:w}=e;if(e.el&&void 0!==m&&-1===b)d=e.el=m(e.el);else{if(d=e.el=o(e.type,l,g&&g.is,g),8&v?c(d,e.children):16&v&&L(e.children,d,null,n,s,l&&"foreignObject"!==f,u,h),w&&fr(e,null,n,"created"),g){for(const t in g)"value"===t||P(t)||a(d,t,null,g[t],l,e.children,n,s,Q);"value"in g&&a(d,"value",null,g.value),(p=g.onVnodeBeforeMount)&&Hn(p,n,e)}z(d,e,e.scopeId,u,n)}w&&fr(e,null,n,"beforeMount");const x=(!s||s&&!s.pendingBranch)&&y&&!y.persisted;x&&y.beforeEnter(d),r(d,t,i),((p=g&&g.onVnodeMounted)||x||w)&&ln((()=>{p&&Hn(p,n,e),x&&y.enter(d),w&&fr(e,null,n,"mounted")}),s)},z=(e,t,i,r,n)=>{if(i&&p(e,i),r)for(let a=0;a{for(let u=l;u{const l=t.el=e.el;let{patchFlag:u,dynamicChildren:h,dirs:d}=t;u|=16&e.patchFlag;const p=e.props||f,m=t.props||f;let g;i&&hn(i,!1),(g=m.onVnodeBeforeUpdate)&&Hn(g,i,t,e),d&&fr(t,e,i,"beforeUpdate"),i&&hn(i,!0);const v=n&&"foreignObject"!==t.type;if(h?E(e.dynamicChildren,h,l,i,r,v,o):s||R(e,t,l,null,i,r,v,o,!1),u>0){if(16&u)_(l,t,p,m,i,r,n);else if(2&u&&p.class!==m.class&&a(l,"class",null,m.class,n),4&u&&a(l,"style",p.style,m.style,n),8&u){const o=t.dynamicProps;for(let t=0;t{g&&Hn(g,i,t,e),d&&fr(t,e,i,"updated")}),r)},E=(e,t,i,r,n,a,o)=>{for(let s=0;s{if(i!==r){for(const l in r){if(P(l))continue;const u=r[l],c=i[l];u!==c&&"value"!==l&&a(e,l,c,u,s,t.children,n,o,Q)}if(i!==f)for(const l in i)P(l)||l in r||a(e,l,i[l],null,s,t.children,n,o,Q);"value"in r&&a(e,"value",i.value,r.value)}},T=(e,t,i,n,a,o,l,u,c)=>{const h=t.el=e?e.el:s(""),d=t.anchor=e?e.anchor:s("");let{patchFlag:p,dynamicChildren:m,slotScopeIds:f}=t;f&&(u=u?u.concat(f):f),null==e?(r(h,i,n),r(d,i,n),L(t.children,i,d,a,o,l,u,c)):p>0&&64&p&&m&&e.dynamicChildren?(E(e.dynamicChildren,m,i,a,o,l,u),(null!=t.key||a&&t===a.subTree)&&dn(e,t,!0)):R(e,t,i,d,a,o,l,u,c)},B=(e,t,i,r,n,a,o,s,l)=>{t.slotScopeIds=s,null==e?512&t.shapeFlag?n.ctx.activate(t,i,r,o,l):I(t,i,r,n,a,o,l):q(e,t,l)},I=(e,t,i,r,n,a,o)=>{const s=e.component=Qn(e,r,n);if(Wi(e)&&(s.ctx.renderer=X),ia(s),s.asyncDep){if(n&&n.registerDep(s,D),!e.el){const e=s.subTree=In(vn);x(null,e,t,i)}}else D(s,e,t,i,n,a,o)},q=(e,t,i)=>{const r=t.component=e.component;if(ki(e,t,i)){if(r.asyncDep&&!r.asyncResolved)return void O(r,t,i);r.next=t,oi(r.update),r.update()}else t.el=e.el,r.vnode=t},D=(e,t,i,r,n,a,o)=>{const s=()=>{if(e.isMounted){let t,{next:i,bu:r,u:s,parent:l,vnode:u}=e,c=i;0,hn(e,!1),i?(i.el=u.el,O(e,i,o)):i=u,r&&Z(r),(t=i.props&&i.props.onVnodeBeforeUpdate)&&Hn(t,l,i,u),hn(e,!0);const d=wi(e);0;const p=e.subTree;e.subTree=d,b(p,d,h(p.el),W(p),e,n,a),i.el=d.el,null===c&&Mi(e,d.el),s&&ln(s,n),(t=i.props&&i.props.onVnodeUpdated)&&ln((()=>Hn(t,l,i,u)),n)}else{let o;const{el:s,props:l}=t,{bm:u,m:c,parent:h}=e,d=Qi(t);if(hn(e,!1),u&&Z(u),!d&&(o=l&&l.onVnodeBeforeMount)&&Hn(o,h,t),hn(e,!0),s&&ee){const i=()=>{e.subTree=wi(e),ee(s,e.subTree,e,n,null)};d?t.type.__asyncLoader().then((()=>!e.isUnmounted&&i())):i()}else{0;const o=e.subTree=wi(e);0,b(null,o,i,r,e,n,a),t.el=o.el}if(c&&ln(c,n),!d&&(o=l&&l.onVnodeMounted)){const e=t;ln((()=>Hn(o,h,e)),n)}(256&t.shapeFlag||h&&Qi(h.vnode)&&256&h.vnode.shapeFlag)&&e.a&&ln(e.a,n),e.isMounted=!0,t=i=r=null}},l=e.effect=new fe(s,(()=>ni(u)),e.scope),u=e.update=()=>l.run();u.id=e.uid,hn(e,!0),u()},O=(e,t,i)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,Vr(e,t.props,r,i),tn(e,t.children,i),be(),li(),we()},R=(e,t,i,r,n,a,o,s,l=!1)=>{const u=e&&e.children,h=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(128&p)return void V(u,d,i,r,n,a,o,s,l);if(256&p)return void F(u,d,i,r,n,a,o,s,l)}8&m?(16&h&&Q(u,n,a),d!==u&&c(i,d)):16&h?16&m?V(u,d,i,r,n,a,o,s,l):Q(u,n,a,!0):(8&h&&c(i,""),16&m&&L(d,i,r,n,a,o,s,l))},F=(e,t,i,r,n,a,o,s,l)=>{e=e||g,t=t||g;const u=e.length,c=t.length,h=Math.min(u,c);let d;for(d=0;dc?Q(e,n,a,!0,!1,h):L(t,i,r,n,a,o,s,l,h)},V=(e,t,i,r,n,a,o,s,l)=>{let u=0;const c=t.length;let h=e.length-1,d=c-1;while(u<=h&&u<=d){const r=e[u],c=t[u]=l?Vn(t[u]):Pn(t[u]);if(!Cn(r,c))break;b(r,c,i,null,n,a,o,s,l),u++}while(u<=h&&u<=d){const r=e[h],u=t[d]=l?Vn(t[d]):Pn(t[d]);if(!Cn(r,u))break;b(r,u,i,null,n,a,o,s,l),h--,d--}if(u>h){if(u<=d){const e=d+1,h=ed)while(u<=h)K(e[u],n,a,!0),u++;else{const p=u,m=u,f=new Map;for(u=m;u<=d;u++){const e=t[u]=l?Vn(t[u]):Pn(t[u]);null!=e.key&&f.set(e.key,u)}let v,y=0;const w=d-m+1;let x=!1,A=0;const k=new Array(w);for(u=0;u=w){K(r,n,a,!0);continue}let c;if(null!=r.key)c=f.get(r.key);else for(v=m;v<=d;v++)if(0===k[v-m]&&Cn(r,t[v])){c=v;break}void 0===c?K(r,n,a,!0):(k[c-m]=u+1,c>=A?A=c:x=!0,b(r,t[c],i,null,n,a,o,s,l),y++)}const S=x?pn(k):g;for(v=S.length-1,u=w-1;u>=0;u--){const e=m+u,h=t[e],d=e+1{const{el:o,type:s,transition:l,children:u,shapeFlag:c}=e;if(6&c)return void U(e.component.subTree,t,i,n);if(128&c)return void e.suspense.move(t,i,n);if(64&c)return void s.move(e,t,i,X);if(s===fn){r(o,t,i);for(let e=0;el.enter(o)),a);else{const{leave:e,delayLeave:n,afterLeave:a}=l,s=()=>r(o,t,i),u=()=>{e(o,(()=>{s(),a&&a()}))};n?n(o,s,u):u()}else r(o,t,i)},K=(e,t,i,r=!1,n=!1)=>{const{type:a,props:o,ref:s,children:l,dynamicChildren:u,shapeFlag:c,patchFlag:h,dirs:d}=e;if(null!=s&&on(s,null,i,e,!0),256&c)return void t.ctx.deactivate(e);const p=1&c&&d,m=!Qi(e);let f;if(m&&(f=o&&o.onVnodeBeforeUnmount)&&Hn(f,t,e),6&c)j(e.component,i,r);else{if(128&c)return void e.suspense.unmount(i,r);p&&fr(e,null,t,"beforeUnmount"),64&c?e.type.remove(e,t,i,n,X,r):u&&(a!==fn||h>0&&64&h)?Q(u,t,i,!1,!0):(a===fn&&384&h||!n&&16&c)&&Q(l,t,i),r&&H(e)}(m&&(f=o&&o.onVnodeUnmounted)||p)&&ln((()=>{f&&Hn(f,t,e),p&&fr(e,null,t,"unmounted")}),i)},H=e=>{const{type:t,el:i,anchor:r,transition:a}=e;if(t===fn)return void G(i,r);if(t===yn)return void S(e);const o=()=>{n(i),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(1&e.shapeFlag&&a&&!a.persisted){const{leave:t,delayLeave:r}=a,n=()=>t(i,o);r?r(e.el,o,n):n()}else o()},G=(e,t)=>{let i;while(e!==t)i=d(e),n(e),e=i;n(t)},j=(e,t,i)=>{const{bum:r,scope:n,update:a,subTree:o,um:s}=e;r&&Z(r),n.stop(),a&&(a.active=!1,K(o,e,t,i)),s&&ln(s,t),ln((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,i,r=!1,n=!1,a=0)=>{for(let o=a;o6&e.shapeFlag?W(e.component.subTree):128&e.shapeFlag?e.suspense.next():d(e.anchor||e.el),Y=(e,t,i)=>{null==e?t._vnode&&K(t._vnode,null,null,!0):b(t._vnode||null,e,t,null,null,null,i),li(),ui(),t._vnode=e},X={p:b,um:K,m:U,r:H,mt:I,mc:L,pc:R,pbc:E,n:W,o:e};let J,ee;return t&&([J,ee]=t(X)),{render:Y,hydrate:J,createApp:an(Y,J)}}function hn({effect:e,update:t},i){e.allowRecurse=t.allowRecurse=i}function dn(e,t,i=!1){const r=e.children,n=t.children;if(N(r)&&N(n))for(let a=0;a>1,e[i[s]]0&&(t[r]=i[a-1]),i[a]=r)}}a=i.length,o=i[a-1];while(a-- >0)i[a]=o,o=t[o];return i}const mn=e=>e.__isTeleport;const fn=Symbol(void 0),gn=Symbol(void 0),vn=Symbol(void 0),yn=Symbol(void 0),bn=[];let wn=null;function xn(e=!1){bn.push(wn=e?null:[])}function An(){bn.pop(),wn=bn[bn.length-1]||null}let kn=1;function Sn(e){kn+=e}function Mn(e){return e.dynamicChildren=kn>0?wn||g:null,An(),kn>0&&wn&&wn.push(e),e}function Nn(e,t,i,r,n,a){return Mn(Bn(e,t,i,r,n,a,!0))}function zn(e,t,i,r,n){return Mn(In(e,t,i,r,n,!0))}function Ln(e){return!!e&&!0===e.__v_isVNode}function Cn(e,t){return e.type===t.type&&e.key===t.key}const En="__vInternal",_n=({key:e})=>null!=e?e:null,Tn=({ref:e,ref_key:t,ref_for:i})=>null!=e?_(e)||Et(e)||E(e)?{i:gi,r:e,k:t,f:!!i}:e:null;function Bn(e,t=null,i=null,r=0,n=null,a=(e===fn?0:1),o=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&_n(t),ref:t&&Tn(t),scopeId:vi,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null};return s?(Un(l,i),128&a&&e.normalize(l)):i&&(l.shapeFlag|=_(i)?8:16),kn>0&&!o&&wn&&(l.patchFlag>0||6&a)&&32!==l.patchFlag&&wn.push(l),l}const In=qn;function qn(e,t=null,i=null,r=0,n=null,o=!1){if(e&&e!==yr||(e=vn),Ln(e)){const r=On(e,t,!0);return i&&Un(r,i),kn>0&&!o&&wn&&(6&r.shapeFlag?wn[wn.indexOf(e)]=r:wn.push(r)),r.patchFlag|=-2,r}if(ca(e)&&(e=e.__vccOpts),t){t=Dn(t);let{class:e,style:i}=t;e&&!_(e)&&(t.class=u(e)),B(i)&&(kt(i)&&!N(i)&&(i=A({},i)),t.style=a(i))}const s=_(e)?1:Ni(e)?128:mn(e)?64:B(e)?4:E(e)?2:0;return Bn(e,t,i,r,n,s,o,!0)}function Dn(e){return e?kt(e)||En in e?A({},e):e:null}function On(e,t,i=!1){const{props:r,ref:n,patchFlag:a,children:o}=e,s=t?Kn(r||{},t):r,l={__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&_n(s),ref:t&&t.ref?i&&n?N(n)?n.concat(Tn(t)):[n,Tn(t)]:Tn(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==fn?-1===a?16:16|a:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&On(e.ssContent),ssFallback:e.ssFallback&&On(e.ssFallback),el:e.el,anchor:e.anchor};return l}function Rn(e=" ",t=0){return In(gn,null,e,t)}function Fn(e="",t=!1){return t?(xn(),zn(vn,null,e)):In(vn,null,e)}function Pn(e){return null==e||"boolean"===typeof e?In(vn):N(e)?In(fn,null,e.slice()):"object"===typeof e?Vn(e):In(gn,null,String(e))}function Vn(e){return null===e.el||e.memo?e:On(e)}function Un(e,t){let i=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(N(t))i=16;else if("object"===typeof t){if(65&r){const i=t.default;return void(i&&(i._c&&(i._d=!1),Un(e,i()),i._c&&(i._d=!0)))}{i=32;const r=t._;r||En in t?3===r&&gi&&(1===gi.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=gi}}else E(t)?(t={default:t,_ctx:gi},i=32):(t=String(t),64&r?(i=16,t=[Rn(t)]):i=8);e.children=t,e.shapeFlag|=i}function Kn(...e){const t={};for(let i=0;iWn||gi,Yn=e=>{Wn=e,e.scope.on()},Xn=()=>{Wn&&Wn.scope.off(),Wn=null};function Jn(e){return 4&e.vnode.shapeFlag}let $n,ea,ta=!1;function ia(e,t=!1){ta=t;const{props:i,children:r}=e.vnode,n=Jn(e);Pr(e,i,n,t),en(e,r);const a=n?ra(e,t):void 0;return ta=!1,a}function ra(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=Mt(new Proxy(e.ctx,Mr));const{setup:r}=i;if(r){const i=e.setupContext=r.length>1?sa(e):null;Yn(e),be();const n=Kt(r,e,0,[e.props,i]);if(we(),Xn(),I(n)){if(n.then(Xn,Xn),t)return n.then((i=>{na(e,i,t)})).catch((t=>{Gt(t,e,0)}));e.asyncDep=n}else na(e,n,t)}else aa(e,t)}function na(e,t,i){E(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:B(t)&&(e.setupState=Dt(t)),aa(e,i)}function aa(e,t,i){const r=e.type;if(!e.render){if(!t&&$n&&!r.render){const t=r.template||_r(e).template;if(t){0;const{isCustomElement:i,compilerOptions:n}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=A(A({isCustomElement:i,delimiters:a},n),o);r.render=$n(t,s)}}e.render=r.render||v,ea&&ea(e)}Yn(e),be(),zr(e),we(),Xn()}function oa(e){return new Proxy(e.attrs,{get(t,i){return xe(e,"get","$attrs"),t[i]}})}function sa(e){const t=t=>{e.exposed=t||{}};let i;return{get attrs(){return i||(i=oa(e))},slots:e.slots,emit:e.emit,expose:t}}function la(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Dt(Mt(e.exposed)),{get(t,i){return i in t?t[i]:i in Sr?Sr[i](e):void 0}}))}function ua(e,t=!0){return E(e)?e.displayName||e.name:e.name||t&&e.__name}function ca(e){return E(e)&&"__vccOpts"in e}const ha=(e,t)=>Ut(e,t,ta);function da(e,t,i){const r=arguments.length;return 2===r?B(t)&&!N(t)?Ln(t)?In(e,null,[t]):In(e,t):In(e,null,t):(r>3?i=Array.prototype.slice.call(arguments,2):3===r&&Ln(i)&&(i=[i]),In(e,t,i))}Symbol("");const pa="3.2.39",ma="http://www.w3.org/2000/svg",fa="undefined"!==typeof document?document:null,ga=fa&&fa.createElement("template"),va={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,r)=>{const n=t?fa.createElementNS(ma,e):fa.createElement(e,i?{is:i}:void 0);return"select"===e&&r&&null!=r.multiple&&n.setAttribute("multiple",r.multiple),n},createText:e=>fa.createTextNode(e),createComment:e=>fa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>fa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,i,r,n,a){const o=i?i.previousSibling:t.lastChild;if(n&&(n===a||n.nextSibling)){while(1)if(t.insertBefore(n.cloneNode(!0),i),n===a||!(n=n.nextSibling))break}else{ga.innerHTML=r?`${e}`:e;const n=ga.content;if(r){const e=n.firstChild;while(e.firstChild)n.appendChild(e.firstChild);n.removeChild(e)}t.insertBefore(n,i)}return[o?o.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}};function ya(e,t,i){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}function ba(e,t,i){const r=e.style,n=_(i);if(i&&!n){for(const e in i)xa(r,e,i[e]);if(t&&!_(t))for(const e in t)null==i[e]&&xa(r,e,"")}else{const a=r.display;n?t!==i&&(r.cssText=i):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=a)}}const wa=/\s*!important$/;function xa(e,t,i){if(N(i))i.forEach((i=>xa(e,t,i)));else if(null==i&&(i=""),t.startsWith("--"))e.setProperty(t,i);else{const r=Sa(e,t);wa.test(i)?e.setProperty(G(r),i.replace(wa,""),"important"):e[r]=i}}const Aa=["Webkit","Moz","ms"],ka={};function Sa(e,t){const i=ka[t];if(i)return i;let r=K(t);if("filter"!==r&&r in e)return ka[t]=r;r=j(r);for(let n=0;n{let e=Date.now,t=!1;if("undefined"!==typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const i=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(i&&Number(i[1])<=53)}return[e,t]})();let Ea=0;const _a=Promise.resolve(),Ta=()=>{Ea=0},Ba=()=>Ea||(_a.then(Ta),Ea=La());function Ia(e,t,i,r){e.addEventListener(t,i,r)}function qa(e,t,i,r){e.removeEventListener(t,i,r)}function Da(e,t,i,r,n=null){const a=e._vei||(e._vei={}),o=a[t];if(r&&o)o.value=r;else{const[i,s]=Ra(t);if(r){const o=a[t]=Fa(r,n);Ia(e,i,o,s)}else o&&(qa(e,i,o,s),a[t]=void 0)}}const Oa=/(?:Once|Passive|Capture)$/;function Ra(e){let t;if(Oa.test(e)){let i;t={};while(i=e.match(Oa))e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}const i=":"===e[2]?e.slice(3):G(e.slice(2));return[i,t]}function Fa(e,t){const i=e=>{const r=e.timeStamp||La();(Ca||r>=i.attached-1)&&Ht(Pa(e,i.value),t,5,[e])};return i.value=e,i.attached=Ba(),i}function Pa(e,t){if(N(t)){const i=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{i.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}const Va=/^on[a-z]/,Ua=(e,t,i,r,n=!1,a,o,s,l)=>{"class"===t?ya(e,r,n):"style"===t?ba(e,i,r):w(t)?x(t)||Da(e,t,i,r,o):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):Ka(e,t,r,n))?za(e,t,r,a,o,s,l):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),Na(e,t,r,n))};function Ka(e,t,i,r){return r?"innerHTML"===t||"textContent"===t||!!(t in e&&Va.test(t)&&E(i)):"spellcheck"!==t&&"draggable"!==t&&"translate"!==t&&("form"!==t&&(("list"!==t||"INPUT"!==e.tagName)&&(("type"!==t||"TEXTAREA"!==e.tagName)&&((!Va.test(t)||!_(i))&&t in e))))}"undefined"!==typeof HTMLElement&&HTMLElement;const Ha="transition",Ga="animation",ja=(e,{slots:t})=>da(Fi,Ya(e),t);ja.displayName="Transition";const Qa={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Wa=(ja.props=A({},Fi.props,Qa),(e,t=[])=>{N(e)?e.forEach((e=>e(...t))):e&&e(...t)}),Za=e=>!!e&&(N(e)?e.some((e=>e.length>1)):e.length>1);function Ya(e){const t={};for(const A in e)A in Qa||(t[A]=e[A]);if(!1===e.css)return t;const{name:i="v",type:r,duration:n,enterFromClass:a=`${i}-enter-from`,enterActiveClass:o=`${i}-enter-active`,enterToClass:s=`${i}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:c=s,leaveFromClass:h=`${i}-leave-from`,leaveActiveClass:d=`${i}-leave-active`,leaveToClass:p=`${i}-leave-to`}=e,m=Xa(n),f=m&&m[0],g=m&&m[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:w,onLeaveCancelled:x,onBeforeAppear:k=v,onAppear:S=y,onAppearCancelled:M=b}=t,N=(e,t,i)=>{eo(e,t?c:s),eo(e,t?u:o),i&&i()},z=(e,t)=>{e._isLeaving=!1,eo(e,h),eo(e,p),eo(e,d),t&&t()},L=e=>(t,i)=>{const n=e?S:y,o=()=>N(t,e,i);Wa(n,[t,o]),to((()=>{eo(t,e?l:a),$a(t,e?c:s),Za(n)||ro(t,r,f,o)}))};return A(t,{onBeforeEnter(e){Wa(v,[e]),$a(e,a),$a(e,o)},onBeforeAppear(e){Wa(k,[e]),$a(e,l),$a(e,u)},onEnter:L(!1),onAppear:L(!0),onLeave(e,t){e._isLeaving=!0;const i=()=>z(e,t);$a(e,h),so(),$a(e,d),to((()=>{e._isLeaving&&(eo(e,h),$a(e,p),Za(w)||ro(e,r,g,i))})),Wa(w,[e,i])},onEnterCancelled(e){N(e,!1),Wa(b,[e])},onAppearCancelled(e){N(e,!0),Wa(M,[e])},onLeaveCancelled(e){z(e),Wa(x,[e])}})}function Xa(e){if(null==e)return null;if(B(e))return[Ja(e.enter),Ja(e.leave)];{const t=Ja(e);return[t,t]}}function Ja(e){const t=X(e);return t}function $a(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function eo(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:i}=e;i&&(i.delete(t),i.size||(e._vtc=void 0))}function to(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let io=0;function ro(e,t,i,r){const n=e._endId=++io,a=()=>{n===e._endId&&r()};if(i)return setTimeout(a,i);const{type:o,timeout:s,propCount:l}=no(e,t);if(!o)return r();const u=o+"end";let c=0;const h=()=>{e.removeEventListener(u,d),a()},d=t=>{t.target===e&&++c>=l&&h()};setTimeout((()=>{c(i[e]||"").split(", "),n=r(Ha+"Delay"),a=r(Ha+"Duration"),o=ao(n,a),s=r(Ga+"Delay"),l=r(Ga+"Duration"),u=ao(s,l);let c=null,h=0,d=0;t===Ha?o>0&&(c=Ha,h=o,d=a.length):t===Ga?u>0&&(c=Ga,h=u,d=l.length):(h=Math.max(o,u),c=h>0?o>u?Ha:Ga:null,d=c?c===Ha?a.length:l.length:0);const p=c===Ha&&/\b(transform|all)(,|$)/.test(i[Ha+"Property"]);return{type:c,timeout:h,propCount:d,hasTransform:p}}function ao(e,t){while(e.lengthoo(t)+oo(e[i]))))}function oo(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function so(){return document.body.offsetHeight}new WeakMap,new WeakMap;const lo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return N(t)?e=>Z(t,e):t};function uo(e){e.target.composing=!0}function co(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ho={created(e,{modifiers:{lazy:t,trim:i,number:r}},n){e._assign=lo(n);const a=r||n.props&&"number"===n.props.type;Ia(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;i&&(r=r.trim()),a&&(r=X(r)),e._assign(r)})),i&&Ia(e,"change",(()=>{e.value=e.value.trim()})),t||(Ia(e,"compositionstart",uo),Ia(e,"compositionend",co),Ia(e,"change",co))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:i,trim:r,number:n}},a){if(e._assign=lo(a),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(i)return;if(r&&e.value.trim()===t)return;if((n||"number"===e.type)&&X(e.value)===t)return}const o=null==t?"":t;e.value!==o&&(e.value=o)}},po={deep:!0,created(e,t,i){e._assign=lo(i),Ia(e,"change",(()=>{const t=e._modelValue,i=fo(e),r=e.checked,n=e._assign;if(N(t)){const e=d(t,i),a=-1!==e;if(r&&!a)n(t.concat(i));else if(!r&&a){const i=[...t];i.splice(e,1),n(i)}}else if(L(t)){const e=new Set(t);r?e.add(i):e.delete(i),n(e)}else n(go(e,r))}))},mounted:mo,beforeUpdate(e,t,i){e._assign=lo(i),mo(e,t,i)}};function mo(e,{value:t,oldValue:i},r){e._modelValue=t,N(t)?e.checked=d(t,r.props.value)>-1:L(t)?e.checked=t.has(r.props.value):t!==i&&(e.checked=h(t,go(e,!0)))}function fo(e){return"_value"in e?e._value:e.value}function go(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const vo=A({patchProp:Ua},va);let yo;function bo(){return yo||(yo=un(vo))}const wo=(...e)=>{const t=bo().createApp(...e);const{mount:i}=t;return t.mount=e=>{const r=xo(e);if(!r)return;const n=t._component;E(n)||n.render||n.template||(n.template=r.innerHTML),r.innerHTML="";const a=i(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function xo(e){if(_(e)){const t=document.querySelector(e);return t}return e}const Ao={class:"left-column"},ko=Bn("h4",null,"Settings",-1),So=Bn("label",{for:"checkbox"},"Trigonometry",-1),Mo=Bn("label",{for:"checkbox"},"Inverse Trigonometry",-1),No=Bn("label",{for:"checkbox"},"Trigonometric Identities",-1),zo=Bn("label",{for:"checkbox"},"Limits",-1),Lo=Bn("label",{for:"checkbox"},"Derivatives",-1),Co=Bn("label",{for:"checkbox"},"Graph Analysis",-1),Eo=Bn("label",{for:"checkbox"},"Geometry",-1),_o=Bn("label",{for:"checkbox"},"Physics",-1),To=Bn("label",{for:"checkbox"},"Integration Rules",-1),Bo={for:"checkbox"},Io=Bn("label",{for:"checkbox"},"Enable text input (testing)",-1);function qo(e,t,i,r,n,a){const o=vr("question-renderer");return xn(),Nn(fn,null,[Bn("div",Ao,[Bn("h3",null,"Time left: "+p(e.timeLeftFormatted),1),Bn("button",{onClick:t[0]||(t[0]=(...t)=>e.startQuiz&&e.startQuiz(...t))},p(e.isRunning?"Stop":"Start"),1),ko,Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[1]||(t[1]=t=>e.categories.trig.enabled=t)},null,512),[[po,e.categories.trig.enabled]]),So]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[2]||(t[2]=t=>e.categories.inverseTrig.enabled=t)},null,512),[[po,e.categories.inverseTrig.enabled]]),Mo]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=t=>e.categories.trigIdentities.enabled=t)},null,512),[[po,e.categories.trigIdentities.enabled]]),No]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=t=>e.categories.limits.enabled=t)},null,512),[[po,e.categories.limits.enabled]]),zo]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[5]||(t[5]=t=>e.categories.derivatives.enabled=t)},null,512),[[po,e.categories.derivatives.enabled]]),Lo]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[6]||(t[6]=t=>e.categories.graphAnalysis.enabled=t)},null,512),[[po,e.categories.graphAnalysis.enabled]]),Co]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[7]||(t[7]=t=>e.categories.geometry.enabled=t)},null,512),[[po,e.categories.geometry.enabled]]),Eo]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[8]||(t[8]=t=>e.categories.physics.enabled=t)},null,512),[[po,e.categories.physics.enabled]]),_o]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[9]||(t[9]=t=>e.categories.integrationRules.enabled=t)},null,512),[[po,e.categories.integrationRules.enabled]]),To]),Bn("div",null,[Bn("label",Bo,"Time: "+p(e.quizDuration)+" seconds ",1),mr(Bn("input",{type:"range",min:"60",max:"240",step:"5","onUpdate:modelValue":t[10]||(t[10]=t=>e.quizDuration=t)},null,512),[[ho,e.quizDuration]])]),Bn("div",null,[mr(Bn("input",{type:"checkbox","onUpdate:modelValue":t[11]||(t[11]=t=>e.isTextboxEnabled=t)},null,512),[[po,e.isTextboxEnabled]]),Io])]),Bn("div",null,[Bn("ol",null,[Bn("table",null,[(xn(!0),Nn(fn,null,Ar(e.questions,((t,i)=>(xn(),Nn("tr",{key:i},[In(o,{question:t.question,answer:t.answer,"is-answer-visible":!e.isRunning,"is-textbox-enabled":e.isTextboxEnabled,index:i},null,8,["question","answer","is-answer-visible","is-textbox-enabled","index"])])))),128))])])])],64)}function Do(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i(6826),i(481),i(7689); /** * vue-class-component v8.0.0-rc.1 * (c) 2015-present Evan You * @license MIT */ function Oo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ro(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,r=new Array(t);i-1)i[t]=a[t];else{var r=Object.getOwnPropertyDescriptor(a,t);"function"!==typeof r.value?(r.get||r.set)&&(i.computed[t]={get:r.get,set:r.set}):i.methods[t]=r.value}})),i.setup=function(t,i){var r,n=new e(t,i),a=Object.keys(n),o={},s=null;return a.forEach((function(e){void 0===n[e]||n[e]&&n[e].__s||(o[e]=_t(n[e]),rs(n,e,o))})),a.forEach((function(e){if(n[e]&&n[e].__s){var t=n[e].__s();t instanceof Promise?(s||(s=Promise.resolve(o)),s=s.then((function(){return t.then((function(t){return o[e]=Dt(t),o}))}))):o[e]=Dt(t)}})),null!==(r=s)&&void 0!==r?r:o};var o=as(e,"__d");o&&o.forEach((function(e){return e(i)}));var s=["render","ssrRender","__file","__cssModules","__scopeId","__hmrId"];return s.forEach((function(t){e[t]&&(i[t]=e[t])})),i}}]),e}();os.__h=["data","beforeCreate","created","beforeMount","mounted","beforeUnmount","unmounted","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];var ss=os;function ls(e){return function(t){return t.__o=e,t}}const us={class:"left"},cs={key:0},hs={key:1},ds=Rn("\\textrm{Ctrl + A}");function ps(e,t,i,r,n,a){const o=vr("katex-element"),s=vr("math-field");return xn(),Nn(fn,null,[Bn("td",us,[Bn("li",null,[In(o,{"display-mode":"",expression:e.question},null,8,["expression"])])]),e.isAnswerVisible?(xn(),Nn("td",cs,[In(o,{"display-mode":"",expression:e.answer},null,8,["expression"])])):Fn("",!0),e.isTextboxEnabled?(xn(),Nn("td",hs,[In(s,{class:"mathField","keypress-sound":"null","plonk-sound":"null",ref:"mathField",onInput:e.handleInput,placeholder:"test"},{default:bi((()=>[ds])),_:1},8,["onInput"])])):Fn("",!0)],64)}function ms(e){return window.MathJax&&window.MathJax.typesetPromise?(e&&!Array.isArray(e)&&(e=[e]),window.MathJax.typesetPromise(e)):Promise.reject()}const fs=ji({props:{latex:{default:""},block:{type:Boolean,default:!1}},setup(e){const t=e,i=_t(null),r=()=>{if(!i.value)return;const e=i.value;e.innerText=t.block?`$$ ${t.latex} $$`:`$ ${t.latex} $`,ms(e).catch((e=>console.warn(e)))};return _i((()=>t.latex),(()=>{r()}),{immediate:!0}),ar((()=>r())),(e,t)=>(xn(),Nn("span",{ref_key:"ContainerRef",ref:i},null,512))}});function gs(e){e.component("MathJax",fs)}"undefined"!==typeof window&&window.Vue&&gs(window.Vue);i(3761),i(2262),i(4506),i(8675),i(3408),i(4590);function vs(e){return Array.isArray(e)}function ys(){return"window"in globalThis&&"document"in globalThis}function bs(){if(!ys())throw new Error(" is an interactive component that needs to run in a browser environment\nIf you are using nextjs, see https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr")}function ws(){var e,t;return null!==(t=ys()&&(null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(any-pointer: coarse)").matches))&&void 0!==t&&t}function xs(){return ys()&&"function"===typeof navigator.vibrate}function As(){var e,t;if(!ys())return"other";const i=null!==(t=null===(e=navigator["userAgentData"])||void 0===e?void 0:e.platform)&&void 0!==t?t:navigator.platform;return/^mac/i.test(i)?5===navigator.maxTouchPoints?"ios":"macos":/^win/i.test(i)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function ks(){if(!ys())return!0;if(/firefox/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/firefox\/(\d+)/i);if(!e)return!1;const t=parseInt(e[1]);return t>=78}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/edg\/(\d+)/i);if(!e)return!1;const t=parseInt(e[1]);return t>=79}return!0}const Ss={},Ms={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",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",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},Ns={},zs={},Ls={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",N:"\\mathbb{N}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",lArr:"\\Leftarrow",Larr:"\\Leftarrow",lrarr:"\\leftrightarrow",lrArr:"\\Leftrightarrow",Lrarr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",plusmn:"\\pm",rarr:"\\rightarrow",rArr:"\\Rightarrow",Rarr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",weierp:"\\wp",Zeta:"\\mathrm{Z}"},Cs={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},Es={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"},_s={iff:"\\;⟺\\;",nicefrac:"^{#1}\\!\\!/\\!_{#2}",rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}","braket.sty":{package:Es},"amsmath.sty":{package:Cs,expand:!1},"texvc.sty":{package:Ls,expand:!1}},Ts={" ":32,"\\#":35,"\\&":38,"\\$":36,"\\%":37,"\\_":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbraceleft":123,"\\textbraceright":125,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"–":8211,"—":8212,"‘":8216,"’":8217,"“":8220,"”":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},Bs=/[\w!@*()-=+{}[\]\\';:?/.,~<>`|$%#&^" ]/,Is=ks()?new RegExp("\\p{Letter}","u"):/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,qs=ks()?new RegExp("[0-9\\p{Letter}]","u"):/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/;function Ds(e,t,i="mord",r){void 0!==t&&(Ss[e]={definitionType:"symbol",type:i,variant:r,codepoint:t},Ms[t]||(Ms[t]=e),Ts[e]||(Ts[e]=t))}function Os(e,t,i){if("string"!==typeof e)for(const[r,n,a,o]of e)Ds(r,n,null!==a&&void 0!==a?a:t,null!==o&&void 0!==o?o:i);else for(let r=0;rTs[e]===t));if(!e){const i=t.toString(16);e="^".repeat(i.length)+i}return e}return String.fromCodePoint(t)}const Ps={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},Vs=[{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:"main",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 Us(e){var t;if((e<119808||e>120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const i in Ps)if(Ps[i]===e){e=null!==(t=i.codePointAt(0))&&void 0!==t?t:0;break}for(const i of Vs)if(e>=i.start&&e=n.offset&&r{var i,r;return e.frequency===t.frequency?e.match.length===t.match.length?e.matche.match))}function Qs(e){let t="auto";const i=e.match(/:([^=]+)/);return i&&(t=i[1].trim()),t}function Ws(e){if(!e)return[];const t=[];let i=e.split("]");if(i[0].startsWith("[")){t.push({isOptional:!0,type:Qs(i[0].slice(1))});for(let e=1;e<=i.length;e++)t.push(...Ws(i[e]))}else if(i=e.split("}"),i[0].startsWith("{")){t.push({isOptional:!1,type:Qs(i[0].slice(1))});for(let e=1;e<=i.length;e++)t.push(...Ws(i[e]))}return t}function Zs(e){if(!e)return"";let t="",i=!0;for(const r of e)"string"===typeof r.value?t+=r.value:i=!1;return i?t:""}function Ys(e,t,i,r=!1){"string"===typeof e&&(e=[e]);const n=Ws(t),a={tabular:r,params:n,createAtom:i};for(const o of e)zs[o]=a}function Xs(e,t,i){Ys(e,t,i,!0)}function Js(e,t,i){var r,n;i||(i={});const a={definitionType:"function",params:Ws(t),ifMode:i.ifMode,isFunction:null!==(r=i.isFunction)&&void 0!==r&&r,applyMode:i.applyMode,infix:null!==(n=i.infix)&&void 0!==n&&n,createAtom:i.createAtom,applyStyle:i.applyStyle};if("string"===typeof e)Ns["\\"+e]=a;else for(const o of e)Ns["\\"+o]=a}let $s;function el(e){return $s||($s=il(_s)),e?il({...$s,...e}):$s}function tl(e,t){var i,r,n,a;if("string"===typeof e){let n=0;const a=e;return/(^|[^\\])#1/.test(a)&&(n=1),/(^|[^\\])#2/.test(a)&&(n=2),/(^|[^\\])#3/.test(a)&&(n=3),/(^|[^\\])#4/.test(a)&&(n=4),/(^|[^\\])#5/.test(a)&&(n=5),/(^|[^\\])#6/.test(a)&&(n=6),/(^|[^\\])#7/.test(a)&&(n=7),/(^|[^\\])#8/.test(a)&&(n=8),/(^|[^\\])#9/.test(a)&&(n=9),{expand:null===(i=null===t||void 0===t?void 0:t.expand)||void 0===i||i,captureSelection:null===(r=null===t||void 0===t?void 0:t.captureSelection)||void 0===r||r,args:n,def:a}}return{expand:null===(n=null===t||void 0===t?void 0:t.expand)||void 0===n||n,captureSelection:null===(a=null===t||void 0===t?void 0:t.captureSelection)||void 0===a||a,args:0,...e}}function il(e){if(!e)return{};const t={};for(const i of Object.keys(e)){const r=e[i];if(void 0===r||null===r)delete t[i];else if("object"===typeof r&&"package"in r)for(const e of Object.keys(r.package))t[e]=tl(r.package[e],{expand:r.expand,captureSelection:r.captureSelection});else t[i]=tl(r)}return t}const rl=[0,.69444,0,0],nl=[0,.61111,0,0],al=[.25,.75,0,0],ol=[0,.44444,0,0],sl=[0,.68611,0,0],ll=[.19444,.69444,0,0],ul=[0,.68333,0,0],cl=[0,.68889,0,0],hl=[0,.69141,0,0],dl=[0,0,0,0],pl=[0,.64444,0,0],ml=[0,.69224,0,0],fl=[.19444,.44444,0,0],gl=[.65002,1.15,0,0],vl=[0,.55556,0,0],yl=[.35001,.85,0,0],bl=[1.25003,1.75,0,0],wl=[.95003,1.45,0,0],xl=[0,.75,0,0],Al=[0,.47534,0,0],kl=[.25001,.75,0,0],Sl=[.55001,1.05,0,0],Ml=[.16667,.68889,0,0],Nl=[.08167,.58167,0,0];var zl={"AMS-Regular":{32:dl,65:cl,66:cl,67:cl,68:cl,69:cl,70:cl,71:cl,72:cl,73:cl,74:Ml,75:cl,76:cl,77:cl,78:cl,79:Ml,80:cl,81:Ml,82:cl,83:cl,84:cl,85:cl,86:cl,87:cl,88:cl,89:cl,90:cl,107:cl,160:dl,165:[0,.675,.025,0],174:[.15559,.69224,0,0],240:cl,295:cl,710:[0,.825,0,0],732:[0,.9,0,0],770:[0,.825,0,0],771:[0,.9,0,0],989:Nl,1008:[0,.43056,.04028,0],8245:[0,.54986,0,0],8463:cl,8487:cl,8498:cl,8502:cl,8503:cl,8504:cl,8513:cl,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:ml,8625:ml,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:cl,8709:Nl,8717:[0,.43056,0,0],8722:[-.03598,.46402,0,0],8724:[.08198,.69224,0,0],8726:Nl,8733:ml,8736:ml,8737:ml,8738:[.03517,.52239,0,0],8739:Nl,8740:[.25142,.74111,0,0],8741:Nl,8742:[.25142,.74111,0,0],8756:ml,8757:ml,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:Nl,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:ml,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:ml,8873:ml,8874:ml,8876:cl,8877:cl,8878:cl,8879:cl,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:Nl,8905:Nl,8906:Nl,8907:ml,8908:ml,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:ml,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:ml,9488:ml,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:ml,10016:ml,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:Nl,57351:Nl,57352:Nl,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":{32:dl,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],160:dl},"Fraktur-Regular":{32:dl,33:hl,34:hl,38:hl,39:hl,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:Al,49:Al,50:Al,51:[.18906,.47534,0,0],52:[.18906,.47534,0,0],53:[.18906,.47534,0,0],54:hl,55:[.18906,.47534,0,0],56:hl,57:[.18906,.47534,0,0],58:Al,59:[.12604,.47534,0,0],61:[-.13099,.36866,0,0],63:hl,65:hl,66:hl,67:hl,68:hl,69:hl,70:[.12604,.69141,0,0],71:hl,72:[.06302,.69141,0,0],73:hl,74:[.12604,.69141,0,0],75:hl,76:hl,77:hl,78:hl,79:hl,80:[.18906,.69141,0,0],81:[.03781,.69141,0,0],82:hl,83:hl,84:hl,85:hl,86:hl,87:hl,88:hl,89:[.18906,.69141,0,0],90:[.12604,.69141,0,0],91:[.24982,.74947,0,0],93:[.24982,.74947,0,0],94:hl,97:Al,98:hl,99:Al,100:[0,.62119,0,0],101:Al,102:[.18906,.69141,0,0],103:[.18906,.47534,0,0],104:[.18906,.69141,0,0],105:hl,106:hl,107:hl,108:hl,109:Al,110:Al,111:Al,112:[.18906,.52396,0,0],113:[.18906,.47534,0,0],114:Al,115:Al,116:[0,.62119,0,0],117:Al,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],160:dl,8216:hl,8217:hl,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:hl,58118:[0,.62119,0,0],58119:Al},"Main-Bold":{32:dl,33:rl,34:rl,35:ll,36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:rl,39:rl,40:al,41:al,42:xl,43:[.13333,.63333,0,0],44:[.19444,.15556,0,0],45:ol,46:[0,.15556,0,0],47:al,48:pl,49:pl,50:pl,51:pl,52:pl,53:pl,54:pl,55:pl,56:pl,57:pl,58:ol,59:fl,60:[.08556,.58556,0,0],61:[-.10889,.39111,0,0],62:[.08556,.58556,0,0],63:rl,64:rl,65:sl,66:sl,67:sl,68:sl,69:sl,70:sl,71:sl,72:sl,73:sl,74:sl,75:sl,76:sl,77:sl,78:sl,79:sl,80:sl,81:[.19444,.68611,0,0],82:sl,83:sl,84:sl,85:sl,86:[0,.68611,.01597,0],87:[0,.68611,.01597,0],88:sl,89:[0,.68611,.02875,0],90:sl,91:al,92:al,93:al,94:rl,95:[.31,.13444,.03194,0],97:ol,98:rl,99:ol,100:rl,101:ol,102:[0,.69444,.10903,0],103:[.19444,.44444,.01597,0],104:rl,105:rl,106:ll,107:rl,108:rl,109:ol,110:ol,111:ol,112:fl,113:fl,114:ol,115:ol,116:[0,.63492,0,0],117:ol,118:[0,.44444,.01597,0],119:[0,.44444,.01597,0],120:ol,121:[.19444,.44444,.01597,0],122:ol,123:al,124:al,125:al,126:[.35,.34444,0,0],160:dl,163:rl,168:rl,172:ol,176:rl,177:[.13333,.63333,0,0],184:[.17014,0,0,0],198:sl,215:[.13333,.63333,0,0],216:[.04861,.73472,0,0],223:rl,230:ol,247:[.13333,.63333,0,0],248:[.09722,.54167,0,0],305:ol,338:sl,339:ol,567:fl,710:rl,711:[0,.63194,0,0],713:[0,.59611,0,0],714:rl,715:rl,728:rl,729:rl,730:rl,732:rl,733:rl,915:sl,916:sl,920:sl,923:sl,926:sl,928:sl,931:sl,933:sl,934:sl,936:sl,937:sl,8211:[0,.44444,.03194,0],8212:[0,.44444,.03194,0],8216:rl,8217:rl,8220:rl,8221:rl,8224:ll,8225:ll,8242:vl,8407:[0,.72444,.15486,0],8463:rl,8465:rl,8467:rl,8472:fl,8476:rl,8501:rl,8592:[-.10889,.39111,0,0],8593:ll,8594:[-.10889,.39111,0,0],8595:ll,8596:[-.10889,.39111,0,0],8597:al,8598:ll,8599:ll,8600:ll,8601:ll,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:ll,8658:[-.10889,.39111,0,0],8659:ll,8660:[-.10889,.39111,0,0],8661:al,8704:rl,8706:[0,.69444,.06389,0],8707:rl,8709:[.05556,.75,0,0],8711:sl,8712:[.08556,.58556,0,0],8715:[.08556,.58556,0,0],8722:[.13333,.63333,0,0],8723:[.13333,.63333,0,0],8725:al,8726:al,8727:[-.02778,.47222,0,0],8728:[-.02639,.47361,0,0],8729:[-.02639,.47361,0,0],8730:[.18,.82,0,0],8733:ol,8734:ol,8736:ml,8739:al,8741:al,8743:vl,8744:vl,8745:vl,8746:vl,8747:[.19444,.69444,.12778,0],8764:[-.10889,.39111,0,0],8768:ll,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:vl,8849:[.19667,.69667,0,0],8850:[.19667,.69667,0,0],8851:vl,8852:vl,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:rl,8867:rl,8868:rl,8869:rl,8900:[-.02639,.47361,0,0],8901:[-.02639,.47361,0,0],8902:[-.02778,.47222,0,0],8968:al,8969:al,8970:al,8971:al,8994:[-.13889,.36111,0,0],8995:[-.13889,.36111,0,0],9651:ll,9657:[-.02778,.47222,0,0],9661:ll,9667:[-.02778,.47222,0,0],9711:ll,9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:xl,9838:ll,9839:ll,10216:al,10217:al,10815:sl,10927:[.19667,.69667,0,0],10928:[.19667,.69667,0,0],57376:ll},"Main-BoldItalic":{32:dl,33:[0,.69444,.11417,0],34:[0,.69444,.07939,0],35:[.19444,.69444,.06833,0],37:[.05556,.75,.12861,0],38:[0,.69444,.08528,0],39:[0,.69444,.12945,0],40:[.25,.75,.15806,0],41:[.25,.75,.03306,0],42:[0,.75,.14333,0],43:[.10333,.60333,.03306,0],44:[.19444,.14722,0,0],45:[0,.44444,.02611,0],46:[0,.14722,0,0],47:[.25,.75,.15806,0],48:[0,.64444,.13167,0],49:[0,.64444,.13167,0],50:[0,.64444,.13167,0],51:[0,.64444,.13167,0],52:[.19444,.64444,.13167,0],53:[0,.64444,.13167,0],54:[0,.64444,.13167,0],55:[.19444,.64444,.13167,0],56:[0,.64444,.13167,0],57:[0,.64444,.13167,0],58:[0,.44444,.06695,0],59:[.19444,.44444,.06695,0],61:[-.10889,.39111,.06833,0],63:[0,.69444,.11472,0],64:[0,.69444,.09208,0],65:sl,66:[0,.68611,.0992,0],67:[0,.68611,.14208,0],68:[0,.68611,.09062,0],69:[0,.68611,.11431,0],70:[0,.68611,.12903,0],71:[0,.68611,.07347,0],72:[0,.68611,.17208,0],73:[0,.68611,.15681,0],74:[0,.68611,.145,0],75:[0,.68611,.14208,0],76:sl,77:[0,.68611,.17208,0],78:[0,.68611,.17208,0],79:[0,.68611,.09062,0],80:[0,.68611,.0992,0],81:[.19444,.68611,.09062,0],82:[0,.68611,.02559,0],83:[0,.68611,.11264,0],84:[0,.68611,.12903,0],85:[0,.68611,.17208,0],86:[0,.68611,.18625,0],87:[0,.68611,.18625,0],88:[0,.68611,.15681,0],89:[0,.68611,.19803,0],90:[0,.68611,.14208,0],91:[.25,.75,.1875,0],93:[.25,.75,.09972,0],94:[0,.69444,.06709,0],95:[.31,.13444,.09811,0],97:[0,.44444,.09426,0],98:[0,.69444,.07861,0],99:[0,.44444,.05222,0],100:[0,.69444,.10861,0],101:[0,.44444,.085,0],102:[.19444,.69444,.21778,0],103:[.19444,.44444,.105,0],104:[0,.69444,.09426,0],105:[0,.69326,.11387,0],106:[.19444,.69326,.1672,0],107:[0,.69444,.11111,0],108:[0,.69444,.10861,0],109:[0,.44444,.09426,0],110:[0,.44444,.09426,0],111:[0,.44444,.07861,0],112:[.19444,.44444,.07861,0],113:[.19444,.44444,.105,0],114:[0,.44444,.11111,0],115:[0,.44444,.08167,0],116:[0,.63492,.09639,0],117:[0,.44444,.09426,0],118:[0,.44444,.11111,0],119:[0,.44444,.11111,0],120:[0,.44444,.12583,0],121:[.19444,.44444,.105,0],122:[0,.44444,.13889,0],126:[.35,.34444,.11472,0],160:dl,168:[0,.69444,.11473,0],176:rl,184:[.17014,0,0,0],198:[0,.68611,.11431,0],216:[.04861,.73472,.09062,0],223:[.19444,.69444,.09736,0],230:[0,.44444,.085,0],248:[.09722,.54167,.09458,0],305:[0,.44444,.09426,0],338:[0,.68611,.11431,0],339:[0,.44444,.085,0],567:[.19444,.44444,.04611,0],710:[0,.69444,.06709,0],711:[0,.63194,.08271,0],713:[0,.59444,.10444,0],714:[0,.69444,.08528,0],715:rl,728:[0,.69444,.10333,0],729:[0,.69444,.12945,0],730:rl,732:[0,.69444,.11472,0],733:[0,.69444,.11472,0],915:[0,.68611,.12903,0],916:sl,920:[0,.68611,.09062,0],923:sl,926:[0,.68611,.15092,0],928:[0,.68611,.17208,0],931:[0,.68611,.11431,0],933:[0,.68611,.10778,0],934:[0,.68611,.05632,0],936:[0,.68611,.10778,0],937:[0,.68611,.0992,0],8211:[0,.44444,.09811,0],8212:[0,.44444,.09811,0],8216:[0,.69444,.12945,0],8217:[0,.69444,.12945,0],8220:[0,.69444,.16772,0],8221:[0,.69444,.07939,0]},"Main-Italic":{32:dl,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:ul,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:ul,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],160:dl,168:[0,.66786,.10474,0],176:rl,184:[.17014,0,0,0],198:[0,.68333,.12028,0],216:[.04861,.73194,.09403,0],223:[.19444,.69444,.10514,0],230:[0,.43056,.07514,0],248:[.09722,.52778,.09194,0],338:[0,.68333,.12028,0],339:[0,.43056,.07514,0],710:[0,.69444,.06646,0],711:[0,.62847,.08295,0],713:[0,.56167,.10333,0],714:[0,.69444,.09694,0],715:rl,728:[0,.69444,.10806,0],729:[0,.66786,.11752,0],730:rl,732:[0,.66786,.11585,0],733:[0,.69444,.1225,0],915:[0,.68333,.13305,0],916:ul,920:[0,.68333,.09403,0],923:ul,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:cl},"Main-Regular":{32:dl,33:rl,34:rl,35:ll,36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:rl,39:rl,40:al,41:al,42:xl,43:[.08333,.58333,0,0],44:[.19444,.10556,0,0],45:[0,.43056,0,0],46:[0,.10556,0,0],47:al,48:pl,49:pl,50:pl,51:pl,52:pl,53:pl,54:pl,55:pl,56:pl,57:pl,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:rl,64:rl,65:ul,66:ul,67:ul,68:ul,69:ul,70:ul,71:ul,72:ul,73:ul,74:ul,75:ul,76:ul,77:ul,78:ul,79:ul,80:ul,81:[.19444,.68333,0,0],82:ul,83:ul,84:ul,85:ul,86:[0,.68333,.01389,0],87:[0,.68333,.01389,0],88:ul,89:[0,.68333,.025,0],90:ul,91:al,92:al,93:al,94:rl,95:[.31,.12056,.02778,0],97:[0,.43056,0,0],98:rl,99:[0,.43056,0,0],100:rl,101:[0,.43056,0,0],102:[0,.69444,.07778,0],103:[.19444,.43056,.01389,0],104:rl,105:[0,.66786,0,0],106:[.19444,.66786,0,0],107:rl,108:rl,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:al,124:al,125:al,126:[.35,.31786,0,0],160:dl,163:rl,167:ll,168:[0,.66786,0,0],172:[0,.43056,0,0],176:rl,177:[.08333,.58333,0,0],182:ll,184:[.17014,0,0,0],198:ul,215:[.08333,.58333,0,0],216:[.04861,.73194,0,0],223:rl,230:[0,.43056,0,0],247:[.08333,.58333,0,0],248:[.09722,.52778,0,0],305:[0,.43056,0,0],338:ul,339:[0,.43056,0,0],567:[.19444,.43056,0,0],710:rl,711:[0,.62847,0,0],713:[0,.56778,0,0],714:rl,715:rl,728:rl,729:[0,.66786,0,0],730:rl,732:[0,.66786,0,0],733:rl,915:ul,916:ul,920:ul,923:ul,926:ul,928:ul,931:ul,933:ul,934:ul,936:ul,937:ul,8211:[0,.43056,.02778,0],8212:[0,.43056,.02778,0],8216:rl,8217:rl,8220:rl,8221:rl,8224:ll,8225:ll,8230:[0,.12,0,0],8242:vl,8407:[0,.71444,.15382,0],8463:cl,8465:rl,8467:[0,.69444,0,.11111],8472:[.19444,.43056,0,.11111],8476:rl,8501:rl,8592:[-.13313,.36687,0,0],8593:ll,8594:[-.13313,.36687,0,0],8595:ll,8596:[-.13313,.36687,0,0],8597:al,8598:ll,8599:ll,8600:ll,8601:ll,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:ll,8658:[-.13313,.36687,0,0],8659:ll,8660:[-.13313,.36687,0,0],8661:al,8704:rl,8706:[0,.69444,.05556,.08334],8707:rl,8709:[.05556,.75,0,0],8711:ul,8712:[.0391,.5391,0,0],8715:[.0391,.5391,0,0],8722:[.08333,.58333,0,0],8723:[.08333,.58333,0,0],8725:al,8726:al,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:ml,8739:al,8741:al,8743:vl,8744:vl,8745:vl,8746:vl,8747:[.19444,.69444,.11111,0],8764:[-.13313,.36687,0,0],8768:ll,8771:[-.03625,.46375,0,0],8773:[-.022,.589,0,0],8776:[-.01688,.48312,0,0],8781:[-.03625,.46375,0,0],8784:[-.133,.67,0,0],8801:[-.03625,.46375,0,0],8804:[.13597,.63597,0,0],8805:[.13597,.63597,0,0],8810:[.0391,.5391,0,0],8811:[.0391,.5391,0,0],8826:[.0391,.5391,0,0],8827:[.0391,.5391,0,0],8834:[.0391,.5391,0,0],8835:[.0391,.5391,0,0],8838:[.13597,.63597,0,0],8839:[.13597,.63597,0,0],8846:vl,8849:[.13597,.63597,0,0],8850:[.13597,.63597,0,0],8851:vl,8852:vl,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:rl,8867:rl,8868:rl,8869:rl,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:al,8969:al,8970:al,8971:al,8994:[-.14236,.35764,0,0],8995:[-.14236,.35764,0,0],9136:[.244,.744,0,0],9137:[.244,.744,0,0],9651:ll,9657:[-.03472,.46528,0,0],9661:ll,9667:[-.03472,.46528,0,0],9711:ll,9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:xl,9838:ll,9839:ll,10216:al,10217:al,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:ul,10927:[.13597,.63597,0,0],10928:[.13597,.63597,0,0],57376:ll},"Math-BoldItalic":{32:dl,48:ol,49:ol,50:ol,51:fl,52:fl,53:fl,54:pl,55:fl,56:pl,57:fl,65:sl,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:sl,72:[0,.68611,.08229,0],73:[0,.68611,.07778,0],74:[0,.68611,.10069,0],75:[0,.68611,.06979,0],76:sl,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:ol,98:rl,99:ol,100:rl,101:ol,102:[.19444,.69444,.11042,0],103:[.19444,.44444,.03704,0],104:rl,105:[0,.69326,0,0],106:[.19444,.69326,.0622,0],107:[0,.69444,.01852,0],108:[0,.69444,.0088,0],109:ol,110:ol,111:ol,112:fl,113:[.19444,.44444,.03704,0],114:[0,.44444,.03194,0],115:ol,116:[0,.63492,0,0],117:ol,118:[0,.44444,.03704,0],119:[0,.44444,.02778,0],120:ol,121:[.19444,.44444,.03704,0],122:[0,.44444,.04213,0],160:dl,915:[0,.68611,.15972,0],916:sl,920:[0,.68611,.03194,0],923:sl,926:[0,.68611,.07458,0],928:[0,.68611,.08229,0],931:[0,.68611,.05451,0],933:[0,.68611,.15972,0],934:sl,936:[0,.68611,.11653,0],937:[0,.68611,.04835,0],945:ol,946:[.19444,.69444,.03403,0],947:[.19444,.44444,.06389,0],948:[0,.69444,.03819,0],949:ol,950:[.19444,.69444,.06215,0],951:[.19444,.44444,.03704,0],952:[0,.69444,.03194,0],953:ol,954:ol,955:rl,956:fl,957:[0,.44444,.06898,0],958:[.19444,.69444,.03021,0],959:ol,960:[0,.44444,.03704,0],961:fl,962:[.09722,.44444,.07917,0],963:[0,.44444,.03704,0],964:[0,.44444,.13472,0],965:[0,.44444,.03704,0],966:fl,967:fl,968:[.19444,.69444,.03704,0],969:[0,.44444,.03704,0],977:rl,981:ll,982:[0,.44444,.03194,0],1009:fl,1013:ol,57649:ol,57911:fl},"Math-Italic":{32:dl,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:pl,55:[.19444,.43056,0,0],56:pl,57:[.19444,.43056,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:rl,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:rl,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],160:dl,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:rl,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],57649:[0,.43056,0,.02778],57911:[.19444,.43056,0,.08334]},"SansSerif-Bold":{32:dl,33:rl,34:rl,35:ll,36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:rl,39:rl,40:al,41:al,42:xl,43:[.11667,.61667,0,0],44:[.10556,.13056,0,0],45:[0,.45833,0,0],46:[0,.13056,0,0],47:al,48:rl,49:rl,50:rl,51:rl,52:rl,53:rl,54:rl,55:rl,56:rl,57:rl,58:[0,.45833,0,0],59:[.10556,.45833,0,0],61:[-.09375,.40625,0,0],63:rl,64:rl,65:rl,66:rl,67:rl,68:rl,69:rl,70:rl,71:rl,72:rl,73:rl,74:rl,75:rl,76:rl,77:rl,78:rl,79:rl,80:rl,81:[.10556,.69444,0,0],82:rl,83:rl,84:rl,85:rl,86:[0,.69444,.01528,0],87:[0,.69444,.01528,0],88:rl,89:[0,.69444,.0275,0],90:rl,91:al,93:al,94:rl,95:[.35,.10833,.03056,0],97:[0,.45833,0,0],98:rl,99:[0,.45833,0,0],100:rl,101:[0,.45833,0,0],102:[0,.69444,.07639,0],103:[.19444,.45833,.01528,0],104:rl,105:rl,106:ll,107:rl,108:rl,109:[0,.45833,0,0],110:[0,.45833,0,0],111:[0,.45833,0,0],112:[.19444,.45833,0,0],113:[.19444,.45833,0,0],114:[0,.45833,.01528,0],115:[0,.45833,0,0],116:[0,.58929,0,0],117:[0,.45833,0,0],118:[0,.45833,.01528,0],119:[0,.45833,.01528,0],120:[0,.45833,0,0],121:[.19444,.45833,.01528,0],122:[0,.45833,0,0],126:[.35,.34444,0,0],160:dl,168:rl,176:rl,180:rl,184:[.17014,0,0,0],305:[0,.45833,0,0],567:[.19444,.45833,0,0],710:rl,711:[0,.63542,0,0],713:[0,.63778,0,0],728:rl,729:rl,730:rl,732:rl,733:rl,915:rl,916:rl,920:rl,923:rl,926:rl,928:rl,931:rl,933:rl,934:rl,936:rl,937:rl,8211:[0,.45833,.03056,0],8212:[0,.45833,.03056,0],8216:rl,8217:rl,8220:rl,8221:rl},"SansSerif-Italic":{32:dl,33:[0,.69444,.05733,0],34:[0,.69444,.00316,0],35:[.19444,.69444,.05087,0],36:[.05556,.75,.11156,0],37:[.05556,.75,.03126,0],38:[0,.69444,.03058,0],39:[0,.69444,.07816,0],40:[.25,.75,.13164,0],41:[.25,.75,.02536,0],42:[0,.75,.11775,0],43:[.08333,.58333,.02536,0],44:[.125,.08333,0,0],45:[0,.44444,.01946,0],46:[0,.08333,0,0],47:[.25,.75,.13164,0],48:[0,.65556,.11156,0],49:[0,.65556,.11156,0],50:[0,.65556,.11156,0],51:[0,.65556,.11156,0],52:[0,.65556,.11156,0],53:[0,.65556,.11156,0],54:[0,.65556,.11156,0],55:[0,.65556,.11156,0],56:[0,.65556,.11156,0],57:[0,.65556,.11156,0],58:[0,.44444,.02502,0],59:[.125,.44444,.02502,0],61:[-.13,.37,.05087,0],63:[0,.69444,.11809,0],64:[0,.69444,.07555,0],65:rl,66:[0,.69444,.08293,0],67:[0,.69444,.11983,0],68:[0,.69444,.07555,0],69:[0,.69444,.11983,0],70:[0,.69444,.13372,0],71:[0,.69444,.11983,0],72:[0,.69444,.08094,0],73:[0,.69444,.13372,0],74:[0,.69444,.08094,0],75:[0,.69444,.11983,0],76:rl,77:[0,.69444,.08094,0],78:[0,.69444,.08094,0],79:[0,.69444,.07555,0],80:[0,.69444,.08293,0],81:[.125,.69444,.07555,0],82:[0,.69444,.08293,0],83:[0,.69444,.09205,0],84:[0,.69444,.13372,0],85:[0,.69444,.08094,0],86:[0,.69444,.1615,0],87:[0,.69444,.1615,0],88:[0,.69444,.13372,0],89:[0,.69444,.17261,0],90:[0,.69444,.11983,0],91:[.25,.75,.15942,0],93:[.25,.75,.08719,0],94:[0,.69444,.0799,0],95:[.35,.09444,.08616,0],97:[0,.44444,.00981,0],98:[0,.69444,.03057,0],99:[0,.44444,.08336,0],100:[0,.69444,.09483,0],101:[0,.44444,.06778,0],102:[0,.69444,.21705,0],103:[.19444,.44444,.10836,0],104:[0,.69444,.01778,0],105:[0,.67937,.09718,0],106:[.19444,.67937,.09162,0],107:[0,.69444,.08336,0],108:[0,.69444,.09483,0],109:[0,.44444,.01778,0],110:[0,.44444,.01778,0],111:[0,.44444,.06613,0],112:[.19444,.44444,.0389,0],113:[.19444,.44444,.04169,0],114:[0,.44444,.10836,0],115:[0,.44444,.0778,0],116:[0,.57143,.07225,0],117:[0,.44444,.04169,0],118:[0,.44444,.10836,0],119:[0,.44444,.10836,0],120:[0,.44444,.09169,0],121:[.19444,.44444,.10836,0],122:[0,.44444,.08752,0],126:[.35,.32659,.08826,0],160:dl,168:[0,.67937,.06385,0],176:rl,184:[.17014,0,0,0],305:[0,.44444,.04169,0],567:[.19444,.44444,.04169,0],710:[0,.69444,.0799,0],711:[0,.63194,.08432,0],713:[0,.60889,.08776,0],714:[0,.69444,.09205,0],715:rl,728:[0,.69444,.09483,0],729:[0,.67937,.07774,0],730:rl,732:[0,.67659,.08826,0],733:[0,.69444,.09205,0],915:[0,.69444,.13372,0],916:rl,920:[0,.69444,.07555,0],923:rl,926:[0,.69444,.12816,0],928:[0,.69444,.08094,0],931:[0,.69444,.11983,0],933:[0,.69444,.09031,0],934:[0,.69444,.04603,0],936:[0,.69444,.09031,0],937:[0,.69444,.08293,0],8211:[0,.44444,.08616,0],8212:[0,.44444,.08616,0],8216:[0,.69444,.07816,0],8217:[0,.69444,.07816,0],8220:[0,.69444,.14205,0],8221:[0,.69444,.00316,0]},"SansSerif-Regular":{32:dl,33:rl,34:rl,35:ll,36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:rl,39:rl,40:al,41:al,42:xl,43:[.08333,.58333,0,0],44:[.125,.08333,0,0],45:ol,46:[0,.08333,0,0],47:al,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:ol,59:[.125,.44444,0,0],61:[-.13,.37,0,0],63:rl,64:rl,65:rl,66:rl,67:rl,68:rl,69:rl,70:rl,71:rl,72:rl,73:rl,74:rl,75:rl,76:rl,77:rl,78:rl,79:rl,80:rl,81:[.125,.69444,0,0],82:rl,83:rl,84:rl,85:rl,86:[0,.69444,.01389,0],87:[0,.69444,.01389,0],88:rl,89:[0,.69444,.025,0],90:rl,91:al,93:al,94:rl,95:[.35,.09444,.02778,0],97:ol,98:rl,99:ol,100:rl,101:ol,102:[0,.69444,.06944,0],103:[.19444,.44444,.01389,0],104:rl,105:[0,.67937,0,0],106:[.19444,.67937,0,0],107:rl,108:rl,109:ol,110:ol,111:ol,112:fl,113:fl,114:[0,.44444,.01389,0],115:ol,116:[0,.57143,0,0],117:ol,118:[0,.44444,.01389,0],119:[0,.44444,.01389,0],120:ol,121:[.19444,.44444,.01389,0],122:ol,126:[.35,.32659,0,0],160:dl,168:[0,.67937,0,0],176:rl,184:[.17014,0,0,0],305:ol,567:fl,710:rl,711:[0,.63194,0,0],713:[0,.60889,0,0],714:rl,715:rl,728:rl,729:[0,.67937,0,0],730:rl,732:[0,.67659,0,0],733:rl,915:rl,916:rl,920:rl,923:rl,926:rl,928:rl,931:rl,933:rl,934:rl,936:rl,937:rl,8211:[0,.44444,.02778,0],8212:[0,.44444,.02778,0],8216:rl,8217:rl,8220:rl,8221:rl},"Script-Regular":{32:dl,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],160:dl},"Size1-Regular":{32:dl,40:yl,41:yl,47:yl,91:yl,92:yl,93:yl,123:yl,125:yl,160:dl,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:kl,8720:kl,8721:kl,8730:yl,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:kl,8897:kl,8898:kl,8899:kl,8968:yl,8969:yl,8970:yl,8971:yl,9168:[-99e-5,.601,0,0],10216:yl,10217:yl,10752:kl,10753:kl,10754:kl,10756:kl,10758:kl},"Size2-Regular":{32:dl,40:gl,41:gl,47:gl,91:gl,92:gl,93:gl,123:gl,125:gl,160:dl,710:xl,732:xl,770:xl,771:xl,8719:Sl,8720:Sl,8721:Sl,8730:gl,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:Sl,8897:Sl,8898:Sl,8899:Sl,8968:gl,8969:gl,8970:gl,8971:gl,10216:gl,10217:gl,10752:Sl,10753:Sl,10754:Sl,10756:Sl,10758:Sl},"Size3-Regular":{32:dl,40:wl,41:wl,47:wl,91:wl,92:wl,93:wl,123:wl,125:wl,160:dl,710:xl,732:xl,770:xl,771:xl,8730:wl,8968:wl,8969:wl,8970:wl,8971:wl,10216:wl,10217:wl},"Size4-Regular":{32:dl,40:bl,41:bl,47:bl,91:bl,92:bl,93:bl,123:bl,125:bl,160:dl,710:[0,.825,0,0],732:[0,.825,0,0],770:[0,.825,0,0],771:[0,.825,0,0],8730:bl,8968:bl,8969:bl,8970:bl,8971:bl,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:gl,9129:[.90001,0,0,0],9130:[0,.3,0,0],9131:[1e-5,.9,0,0],9132:gl,9133:[.90001,0,0,0],9143:[.88502,.915,0,0],10216:bl,10217:bl,57344:[-.00499,.605,0,0],57345:[-.00499,.605,0,0],57680:[0,.12,0,0],57681:[0,.12,0,0],57682:[0,.12,0,0],57683:[0,.12,0,0]},"Typewriter-Regular":{32:dl,33:nl,34:nl,35:nl,36:[.08333,.69444,0,0],37:[.08333,.69444,0,0],38:nl,39:nl,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:nl,49:nl,50:nl,51:nl,52:nl,53:nl,54:nl,55:nl,56:nl,57:nl,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:nl,64:nl,65:nl,66:nl,67:nl,68:nl,69:nl,70:nl,71:nl,72:nl,73:nl,74:nl,75:nl,76:nl,77:nl,78:nl,79:nl,80:nl,81:[.13889,.61111,0,0],82:nl,83:nl,84:nl,85:nl,86:nl,87:nl,88:nl,89:nl,90:nl,91:[.08333,.69444,0,0],92:[.08333,.69444,0,0],93:[.08333,.69444,0,0],94:nl,95:[.09514,0,0,0],96:nl,97:[0,.43056,0,0],98:nl,99:[0,.43056,0,0],100:nl,101:[0,.43056,0,0],102:nl,103:[.22222,.43056,0,0],104:nl,105:nl,106:[.22222,.61111,0,0],107:nl,108:nl,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:nl,127:nl,160:dl,176:nl,184:[.19445,0,0,0],305:[0,.43056,0,0],567:[.22222,.43056,0,0],711:[0,.56597,0,0],713:[0,.56555,0,0],714:nl,715:nl,728:nl,730:nl,770:nl,771:nl,776:nl,915:nl,916:nl,920:nl,923:nl,926:nl,928:nl,931:nl,933:nl,934:nl,936:nl,937:nl,8216:nl,8217:nl,8242:nl,9251:[.11111,.21944,0,0]}};const Ll=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,Cl=10,El=.25,_l=1.2,Tl=.431,Bl={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[Tl,Tl,Tl],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:[El,El,El],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},Il=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],ql=5,Dl={" ":" ","​":" ","Å":"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 Ol(e,t){void 0===e&&(e=77);const i=zl[t][e];if(i)return{defaultMetrics:!1,depth:i[0],height:i[1],italic:i[2],skew:i[3]};if(11034===e)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0};const r=String.fromCodePoint(e);if(r in Dl)e=Dl[r].codePointAt(0);else if(Ll.test(r))return e=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0}}const Rl=7,Fl=6,Pl=5,Vl=4,Ul=3,Kl=2,Hl=1,Gl=0;class jl{constructor(e,t,i){this.id=e,this.sizeDelta=t,this.cramped=i;const r={"-4":2,"-3":1,0:0}[t];this.metrics=Object.keys(Bl).reduce(((e,t)=>({...e,[t]:Bl[t][r]})),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return Ql[[Gl,Hl,Gl,Hl,Kl,Ul,Kl,Ul][this.id]]}get sub(){return Ql[[Gl,Gl,Gl,Gl,Kl,Kl,Kl,Kl][this.id]]}get fracNum(){return Ql[[Gl,Hl,Gl,Hl,Kl,Ul,Vl,Pl][this.id]]}get fracDen(){return Ql[[Gl,Gl,Gl,Gl,Kl,Kl,Vl,Vl][this.id]]}get cramp(){return Ql[[Gl,Gl,Kl,Kl,Vl,Vl,Fl,Fl][this.id]]}get isTight(){return this.sizeDelta<0}}const Ql={7:new jl(Rl,0,!1),6:new jl(Fl,0,!0),5:new jl(Pl,0,!1),4:new jl(Vl,0,!0),3:new jl(Ul,-3,!1),2:new jl(Kl,-3,!0),1:new jl(Hl,-4,!1),0:new jl(Gl,-4,!0)};function Wl(e,t){var i;if(!e)return 0;const r={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:Cl,bp:1.00375,dd:1238/1157,pc:12,in:72.27,mu:10/18}[null!==(i=e.unit)&&void 0!==i?i:"pt"];if(Number.isFinite(t)){const i=10**t;return Math.round(e.dimension/Cl*r*i)/i}return e.dimension*r}function Zl(e,t){return null===e?0:Wl(e,t)/Cl}function Yl(e){return Zl(e.glue)}function Xl(e){var t;return`${e.dimension}${null!==(t=e.unit)&&void 0!==t?t:"pt"}`}Ql.displaystyle=Ql[Rl],Ql.textstyle=Ql[Pl],Ql.scriptstyle=Ql[Ul],Ql.scriptscriptstyle=Ql[Hl];class Jl{constructor(e,t,i){var r,n,a,o,s,l;console.assert(e instanceof Jl||void 0!==(null===t||void 0===t?void 0:t.fontSize)),console.assert(e instanceof Jl||void 0!==i),e instanceof Jl&&(this.parent=e),e instanceof Jl||(this.registers=null!==(r=e.registers)&&void 0!==r?r:{}),this.isPhantom=null!==(o=null!==(n=null===t||void 0===t?void 0:t.isPhantom)&&void 0!==n?n:null===(a=this.parent)||void 0===a?void 0:a.isPhantom)&&void 0!==o&&o;const u={...e};let c;if(t&&(t.letterShapeStyle&&"auto"!==t.letterShapeStyle&&(u.letterShapeStyle=t.letterShapeStyle),t.color&&"none"!==t.color&&(u.color=t.color),t.backgroundColor&&"none"!==t.backgroundColor&&(u.backgroundColor=t.backgroundColor),t.fontSize&&"auto"!==t.fontSize&&t.fontSize!==(null===(s=this.parent)||void 0===s?void 0:s._size)&&(this._size=t.fontSize)),this.letterShapeStyle=null!==(l=u.letterShapeStyle)&&void 0!==l?l:"tex",this.color=u.color,this.backgroundColor=u.backgroundColor,"string"===typeof i){if(e instanceof Jl)switch(i){case"cramp":c=e.mathstyle.cramp;break;case"superscript":c=e.mathstyle.sup;break;case"subscript":c=e.mathstyle.sub;break;case"numerator":c=e.mathstyle.fracNum;break;case"denominator":c=e.mathstyle.fracDen;break}switch(i){case"textstyle":c=Ql.textstyle;break;case"displaystyle":c=Ql.displaystyle;break;case"scriptstyle":c=Ql.scriptstyle;break;case"scriptscriptstyle":c=Ql.scriptscriptstyle;break}}this._mathstyle=c,this.atomIdsSettings=e.atomIdsSettings,this.renderPlaceholder=u.renderPlaceholder,console.assert(!(e instanceof Jl)||this.atomIdsSettings===e.atomIdsSettings)}get mathstyle(){let e=this._mathstyle,t=this.parent;while(!e)e=t._mathstyle,t=t.parent;return e}getRegister(e){var t;return(null===(t=this.registers)||void 0===t?void 0:t[e])?this.registers[e]:this.parent?this.parent.getRegister(e):void 0}getRegisterAsGlue(e){var t;if(null===(t=this.registers)||void 0===t?void 0:t[e]){const t=this.registers[e];return"object"===typeof t&&"glue"in t?t:"object"===typeof t&&"dimension"in t?{glue:{dimension:t.dimension}}:"number"===typeof t?{glue:{dimension:t}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(e)}getRegisterAsEm(e){return Zl(this.getRegisterAsDimension(e))}getRegisterAsDimension(e){var t;if(null===(t=this.registers)||void 0===t?void 0:t[e]){const t=this.registers[e];return"object"===typeof t&&"glue"in t?t.glue:"object"===typeof t&&"dimension"in t?t:"number"===typeof t?{dimension:t}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(e)}setRegister(e,t){void 0!==t?this.registers[e]=t:delete this.registers[e]}setGlobalRegister(e,t){let i=this;while(i.parent)i.setRegister(e,void 0),i=i.parent;i.setRegister(e,t)}get size(){let e=this._size,t=this.parent;while(!e)e=t._size,t=t.parent;return e}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if("number"!==typeof this.atomIdsSettings.seed)return Date.now().toString(36).slice(-2)+Math.floor(1e5*Math.random()).toString(36);const e=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,e}scale(e){return e*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===Rl||this.mathstyle.id===Fl}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get effectiveFontSize(){return Il[Math.max(1,this.size+this.mathstyle.sizeDelta)]}get computedColor(){let e=this.color,t=this.parent;return!e&&t&&(e=t.color,t=t.parent),null!==e&&void 0!==e?e:""}get computedBackgroundColor(){let e=this.backgroundColor,t=this.parent;return!e&&t&&(e=t.backgroundColor,t=t.parent),null!==e&&void 0!==e?e:""}get metrics(){return this.mathstyle.metrics}}const $l={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},eu={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},tu={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:"m 529 160\n c -179 0 -524 -115 -524 -115\n c -5 -1 -9 -5 -9 -10\n c 0 -1 1 -2 1 -3\n l 4 -22\n c 1 -5 5 -9 11 -9\n h 2\n s 338 93 512 92\n c 174 0 513 -92 513 -92\n h 2\n c 5 0 9 4 11 9\n l 5 22\n c 1 6 -2 12 -8 13\n c 0 0 -342 115 -520 115\n z\n ",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",widetilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",widetilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",widetilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",widetilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};function iu(e){if(eu[e]){const[t,i,r]=eu[e],n=``;return`${n}`}const[t,i,r,n]=$l[e];let a,o;const s=r/1e3;3===t.length?(a=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],o=["xMinYMin","xMidYMin","xMaxYMin"]):2===t.length?(a=["slice-1-of-2","slice-2-of-2"],o=["xMinYMin","xMaxYMin"]):(a=["slice-1-of-1"],o=[n]);const l=t.map(((e,t)=>``)).join("");return`${l}`}function ru(e){return $l[e]?$l[e][2]/1e3:eu[e][2]}class nu{constructor(e){nu._registry[e]=this}static createAtom(e,t,i,r){return nu._registry[e].createAtom(t,i,r)}static serialize(e,t){console.assert(e.length>0);const i=nu._registry[e[0].mode];return i.serialize(e,t)}static applyStyle(e,t,i){return nu._registry[e].applyStyle(t,i)}}function au(e){const t=[];let i=[],r="NONE";for(const n of e)"first"!==n.type&&(n.mode!==r?(i.length>0&&t.push(i),i=[n],r=n.mode):i.push(n));return i.length>0&&t.push(i),t}function ou(e,t){const i=[];let r,n=[];for(const a of e)if("first"!==a.type){let e;"variant"===t?(e=a.style.variant,a.style.variantStyle&&"up"!==a.style.variantStyle&&(e+="-"+a.style.variantStyle)):"cssClass"===t?"group"===a.type&&(e=a.customClass):e=a.style[t],e===r?n.push(a):(n.length>0&&i.push(n),n=[a],r=e)}return n.length>0&&i.push(n),i}nu._registry={};const su={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},lu={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},uu={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},cu={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},hu={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},du={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};function pu(e){var t,i,r,n,a,o;const s=e.split("!");let l,u,c,h=255,d=255,p=255,m=-1;const f=s.length>0&&s[0].startsWith("-");f&&(s[0]=s[0].slice(1));for(let g=0;g=0&&(h=(1-m)*h+m*l,d=(1-m)*d+m*u,p=(1-m)*p+m*c,m=-1),g+1=0&&(h=m*h+(1-m)*l,d=m*d+(1-m)*u,p=m*p+(1-m)*c),f&&(h=255-h,d=255-d,p=255-p),"#"+("00"+Math.round(h).toString(16)).slice(-2)+("00"+Math.round(d).toString(16)).slice(-2)+("00"+Math.round(p).toString(16)).slice(-2)}function mu(e){var t,i;return e=e.trim(),null!==(i=null!==(t=uu[e.toLowerCase()])&&void 0!==t?t:uu[hu[e]])&&void 0!==i?i:pu(e)}function fu(e){if(!e)return;if("#"!==e[0])return;let t;return e=e.slice(1),e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},4===e.length&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},8===e.length&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&void 0===t.a&&(t.a=1),t}function gu(e,t,i){return i<0&&(i+=6),i>=6&&(i-=6),i<1?(t-e)*i+e:i<3?t:i<4?(t-e)*(4-i)+e:e}function vu(e){let[t,i,r]=[e.h,e.s,e.l];t=(t+360)%360/60,r=Math.max(0,Math.min(r,1)),i=Math.max(0,Math.min(i,1));const n=r<=.5?r*(i+1):r+i-r*i,a=2*r-n;return{r:Math.round(255*gu(a,n,t+2)),g:Math.round(255*gu(a,n,t)),b:Math.round(255*gu(a,n,t-2))}}function yu(e){return e<0?0:e>255?255:Math.round(e)}function bu(e){const{r:t,g:i,b:r}=e;let n=((1<<24)+(yu(t)<<16)+(yu(i)<<8)+yu(r)).toString(16).slice(1);return n[0]===n[1]&&n[2]===n[3]&&n[4]===n[5]&&n[6]===n[7]&&(n=n[0]+n[2]+n[4]),"#"+n}function wu(e){let{r:t,g:i,b:r}=e;t/=255,i/=255,r/=255;const n=Math.min(t,i,r),a=Math.max(t,i,r),o=a-n;let s,l;a===n?s=0:t===a?s=(i-r)/o:i===a?s=2+(r-t)/o:r===a&&(s=4+(t-i)/o),s=Math.min(60*s,360),s<0&&(s+=360);const u=(n+a)/2;return l=a===n?0:u<=.5?o/(a+n):o/(2-a-n),{h:s,s:l,l:u}}function xu(e){let t=fu(e);if(!t)return e;let{h:i,s:r,l:n}=wu(t);return r+=.1,n-=.1,bu(vu({h:i,s:r,l:n}))}const Au=["","chem","mord","mbin","mop","mrel","mopen","mclose","mpunct","minner","spacing","first","latex","composition","error","placeholder","supsub","none","mathfield"];function ku(e){return Au.includes(e)}const Su={mord:{mop:3,mbin:4,mrel:5,minner:3},mop:{mord:3,mop:3,rel:5,minner:3},mbin:{mord:4,mop:4,mopen:4,minner:4},mrel:{mord:5,mop:5,mopen:5,minner:5},mclose:{mop:3,mbin:4,mrel:5,minner:3},mpunct:{mord:3,mop:3,mrel:3,mopen:3,mpunct:3,minner:3},minner:{mord:3,mop:3,mbin:4,mrel:5,mopen:3,mpunct:3,minner:3}},Mu={mord:{mop:3},mop:{mord:3,mop:3},mclose:{mop:3},minner:{mop:3}};function Nu(e,t){if("string"===typeof e)return e;if("number"===typeof e){console.assert(Number.isFinite(e));const i=Math.ceil(100*e)/100;return 0===i?"0":i.toString()+(null!==t&&void 0!==t?t:"")}return""}class zu{constructor(e,t){var i,r,n,a,o,s;if("number"===typeof e?this.value=String.fromCodePoint(e):"string"===typeof e?this.value=e:vs(e)?this.children=e.filter((e=>null!==e)):e&&e instanceof zu&&(this.children=[e]),this.type=null!==(i=null===t||void 0===t?void 0:t.type)&&void 0!==i?i:"",this.isSelected=!1,this.isTight=null!==(r=null===t||void 0===t?void 0:t.isTight)&&void 0!==r&&r,this.newList=null!==(n=null===t||void 0===t?void 0:t.newList)&&void 0!==n&&n,null===t||void 0===t?void 0:t.properties)for(const u of Object.keys(t.properties))this.setStyle(u,t.properties[u]);(null===t||void 0===t?void 0:t.attributes)&&(this.attributes=t.attributes),this.classes=null!==(a=null===t||void 0===t?void 0:t.classes)&&void 0!==a?a:"";let l=(null===t||void 0===t?void 0:t.fontFamily)||"Main-Regular";if((null===t||void 0===t?void 0:t.style)&&this.value&&(l=nu.applyStyle(null!==(o=t.mode)&&void 0!==o?o:"math",this,t.style)||"Main-Regular"),this.height=0,this.depth=0,this.skew=0,this.italic=0,this.maxFontSize=0,"latex"===this.type)this.height=.8,this.depth=.2;else if("number"===typeof e){const t=Ol(e,l);this.height=t.height,this.depth=t.depth,this.skew=t.skew,this.italic=t.italic}else if(this.value){this.height=-1/0,this.depth=-1/0,this.skew=-1/0,this.italic=-1/0;for(let e=0;e0)if(1===this.children.length){const e=this.children[0];this.height=e.height,this.depth=e.depth,this.maxFontSize=e.maxFontSize,this.skew=e.skew,this.italic=e.italic}else{let e=-1/0,t=-1/0,i=0;for(const r of this.children)r.height>e&&(e=r.height),r.depth>t&&(t=r.depth),i=Math.max(i,null!==(s=r.maxFontSize)&&void 0!==s?s:0);this.height=e,this.depth=t,this.maxFontSize=i}void 0!==(null===t||void 0===t?void 0:t.height)&&(this.height=t.height),void 0!==(null===t||void 0===t?void 0:t.depth)&&(this.depth=t.depth),void 0!==(null===t||void 0===t?void 0:t.maxFontSize)&&(this.maxFontSize=t.maxFontSize)}set atomID(e){void 0!==e&&0!==e.length&&(this.attributes||(this.attributes={}),this.attributes["data-atom-id"]=e)}selected(e){if(this.isSelected!==e&&(this.isSelected=e,this.children))for(const t of this.children)t.selected(e)}setStyle(e,t,i){if(void 0===t)return;const r=Nu(t,i);r.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[e]=r)}setTop(e){Number.isFinite(e)&&Math.abs(e)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=Nu(e,"em"),this.height-=e,this.depth+=e)}get left(){var e;return(null===(e=this.cssProperties)||void 0===e?void 0:e["margin-left"])?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(e){Number.isFinite(e)&&(0===e?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=Nu(e,"em")))}set right(e){Number.isFinite(e)&&(0===e?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=Nu(e,"em")))}set width(e){Number.isFinite(e)&&(0===e?this.cssProperties&&delete this.cssProperties.width:(this.cssProperties||(this.cssProperties={}),this.cssProperties.width=Nu(e,"em")))}wrap(e,t){const i=e.parent;if(!i)return this;e.isPhantom&&this.setStyle("opacity",0);let r=e.computedColor;r===i.computedColor&&(r=""),this.setStyle("color",r);const n=e.effectiveFontSize===i.effectiveFontSize?void 0:e.effectiveFontSize;let a,o=e.computedBackgroundColor;if(this.isSelected&&(o=xu(o)),o===i.computedBackgroundColor&&(o=""),!n&&!o&&(!t||!t.classes&&!t.type))return this;o?(a=qu(this,t),a.selected(this.isSelected),a.setStyle("background-color",o),a.setStyle("display","inline-block")):a=new zu(this,t);const s=e.scalingFactor;return 1!==s&&(a.setStyle("font-size",100*s,"%"),a.height*=s,a.depth*=s,a.italic*=s,a.skew*=s),a}wrapSelect(e){if(!this.isSelected)return this;const t=e.parent;if(!t)return this;const i=xu(e.computedBackgroundColor),r=qu(this);return r.selected(!0),r.setStyle("background-color",i),r.setStyle("display","inline-block"),r}toMarkup(){var e,t,i;let r=null!==(e=this.value)&&void 0!==e?e:"";if(this.children)for(const s of this.children)r+=s.toMarkup();const n=this.classes.split(" ");n.push(null!==(t={latex:"ML__latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])&&void 0!==t?t:""),"latex"===this.caret&&n.push("ML__latex-caret");const a=1===n.length?n[0]:n.filter(((e,t,i)=>e.length>0&&i.indexOf(e)===t)).join(" ");let o="";if(r.length>0&&"​"!==r||a.length>0||this.cssId||this.htmlData||this.htmlStyle||this.attributes||this.cssProperties||this.svgBody||this.svgOverlay){let e="";if(this.cssId&&(e+=` id=${this.cssId.replace(/ /g,"-")} `),this.htmlData){const t=this.htmlData.split(",");for(const i of t){const t=i.match(/([^=]+)=(.+$)/);if(t){const i=t[1].trim().replace(/ /g,"-");i&&(e+=` data-${i}=${t[2]} `)}else{const t=i.trim().replace(/ /g,"-");t&&(e+=` data-${t} `)}}}if(this.htmlStyle){const t=this.htmlStyle.split(";");let i="";for(const e of t){const t=e.match(/([^=]+):(.+$)/);if(t){const e=t[1].trim().replace(/ /g,"-");e&&(i+=`${e}:${t[2]};`)}}i&&(e+=` style="${i}"`)}if(this.attributes&&(e+=" "+Object.keys(this.attributes).map((e=>`${e}="${this.attributes[e]}"`)).join(" ")),a.length>0&&(e+=` class="${a}"`),this.cssProperties){const t=Object.keys(this.cssProperties).map((e=>`${e}:${this.cssProperties[e]}`)).join(";");t.length>0&&(e+=` style="${t}"`)}let t="";this.svgBody?t=iu(this.svgBody):this.svgOverlay&&(t='',t+=r,t+="",t+='${this.svgOverlay}`),o=`${r}${t}`}return"text"===this.caret?o+='':"math"===this.caret&&(o+=''),o}tryCoalesceWith(e){if(this.type!==e.type)return!1;if(!/ML__text/.test(this.classes)&&!["mord","mbin","mrel"].includes(this.type))return!1;if(this.svgBody||!this.value)return!1;if(e.svgBody||!e.value)return!1;const t=this.children&&this.children.length>0,i=e.children&&e.children.length>0;if(t||i)return!1;const r=this.cssProperties?Object.keys(this.cssProperties).length:0,n=e.cssProperties?Object.keys(e.cssProperties).length:0;if(r!==n)return!1;if(r>0)for(const s of Object.keys(this.cssProperties))if(this.cssProperties[s]!==e.cssProperties[s])return!1;const a=this.classes.trim().replace(/\s+/g," ").split(" "),o=e.classes.trim().replace(/\s+/g," ").split(" ");if(a.length!==o.length)return!1;a.sort(),o.sort();for(const[s,l]of a.entries()){if("vertical-separator"===l)return!1;if(l!==o[s])return!1}return this.value+=e.value,this.height=Math.max(this.height,e.height),this.depth=Math.max(this.depth,e.depth),this.maxFontSize=Math.max(this.maxFontSize,e.maxFontSize),this.italic=e.italic,!0}}function Lu(e){if(!e||0===e.length)return[];e[0].children=Lu(e[0].children);const t=[e[0]];for(let i=1;i{"mbin"!==t.type||e&&!/first|none|mbin|mop|mrel|mopen|mpunct/.test(e.type)||(t.type="mord"),e&&"mbin"===e.type&&/mrel|mclose|mpunct|placeholder/.test(t.type)&&(e.type="mord")}))}function _u(e,t){Bu(e,((e,i)=>{var r,n,a,o;const s=null!==(r=null===e||void 0===e?void 0:e.type)&&void 0!==r?r:"none",l=i.isTight?null!==(n=Mu[s])&&void 0!==n?n:null:null!==(a=Su[s])&&void 0!==a?a:null,u=l&&null!==(o=l[i.type])&&void 0!==o?o:0;u&&(i.left+=t*(u/18))}))}function Tu(e,t,i){t.newList&&(e=null);const r=t.type;if("first"===r)return console.assert(!0===t.newList),null;if("spacing"===r)return e;if(i(e,t),t.children){let n=null;void 0!==r&&0!==r.length||(n=e);for(const e of t.children)n=Tu(n,e,i);void 0!==r&&0!==r.length||(e=n)}return"supsub"!==r&&void 0!==r&&r.length>0&&(e=t),e}function Bu(e,t){e&&Tu(null,e,t)}function Iu(e,t=1){return Eu(e),_u(e,t),e}function qu(e,t){if(!e)return new zu(null,t);const i=new zu(null,{classes:"ML__strut"});i.setStyle("height",Math.max(0,e.height),"em");const r=[i];if(0!==e.depth){const t=new zu(null,{classes:"ML__strut--bottom"});t.setStyle("height",e.height+e.depth,"em"),t.setStyle("vertical-align",-e.depth,"em"),r.push(t)}return r.push(e),new zu(r,t)}function Du(e,t,i){return e.svgOverlay=t,e.svgStyle=i,e}function Ou(e){const t=ru(e)/2,i=new zu(null,{height:t+.166,depth:t-.166,maxFontSize:0});return i.svgBody=e,i}function Ru(e){if("individualShift"in e){const t=e.individualShift;let i=t[0];const r=[i],n=-i.shift-i.box.depth;let a=n;for(let e=1;e=55296&&r<=56319){const t=e.charCodeAt(i+1);if(t>=56320&&t<=57343){const e=r-55296,n=t-56320;r=65536+1024*e+n,i++}}t.push(r)}return t}const Ku=8205,Hu=[[Ku,1],[65038,2],[127995,5],[129456,4],[917536,96]];let Gu;const ju=[127462,127487];function Qu(e){var t;if(void 0===Gu){Gu={};for(const e of Hu)for(let t=e[0];t<=e[0]+e[1]-1;t++)Gu[t]=!0}return null!==(t=Gu[e])&&void 0!==t&&t}function Wu(e){return e>=ju[0]&&e<=ju[1]}function Zu(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;const t=[],i=Uu(e);let r=0;while(r=this.s.length}get(){return this.pos";if(this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"";const e=this.get();if("\\"===e){if(!this.end()){let e=this.match(/^[a-zA-Z\*]+/);if(e)this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/);else if(e=this.get()," "===e)return"";return"\\"+e}}else{if("{"===e)return"<{>";if("}"===e)return"<}>";if("^"===e){if("^"===this.peek()){this.get();const e=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(e)return String.fromCodePoint(Number.parseInt(e.slice(e.lastIndexOf("^")+1),16))}return e}if("#"===e){if(!this.end()){let e=!1;if(/[\d?@]/.test(this.peek())&&(e=!0,this.pos+1"):"<$>"}return e}}function Xu(e,t){var i,r,n,a;const o=[];let s=e.next();if(s)if("\\relax"===s);else if("\\noexpand"===s)s=e.next(),s&&o.push(s);else if("\\obeyspaces"===s)e.obeyspaces=!0;else if("\\space"===s||"~"===s)o.push("");else if("\\bgroup"===s)o.push("<{>");else if("\\egroup"===s)o.push("<}>");else if("\\string"===s){if(s=e.next(),s)if(s.startsWith("\\"))for(const l of s)o.push("\\"===l?"\\backslash":l);else"<{>"===s?o.push("\\{"):""===s?o.push("~"):"<}>"===s&&o.push("\\}")}else if("\\csname"===s){while(""===e.peek())e.next();let n="",a=!1,l=[];do{if(0===l.length)if(/^#[\d?@]$/.test(e.peek())){const n=e.get().slice(1);l=Ju(null!==(r=null!==(i=null===t||void 0===t?void 0:t(n))&&void 0!==i?i:null===t||void 0===t?void 0:t("?"))&&void 0!==r?r:"\\placeholder{}",t),s=l[0]}else s=e.next(),l=s?[s]:[];a=0===l.length,a||"\\endcsname"!==s||(a=!0,l.shift()),a||(a="<$>"===s||"<$$>"===s||"<{>"===s||"<}>"===s||"string"===typeof s&&s.length>1&&s.startsWith("\\")),a||(n+=l.shift())}while(!a);n&&o.push("\\"+n),o.push(...l)}else if("\\endcsname"===s);else if(s.length>1&&s.startsWith("#")){const e=s.slice(1);o.push(...Ju(null!==(a=null!==(n=null===t||void 0===t?void 0:t(e))&&void 0!==n?n:null===t||void 0===t?void 0:t("?"))&&void 0!==a?a:"\\placeholder{}",t))}else o.push(s);return o}function Ju(e,t=null){const i=[];let r="";for(const o of e.toString().split(/\r?\n/)){r&&i.push(r),r=" ";const e=o.match(/((?:\\%)|[^%])*/);null!==e&&i.push(e[0])}const n=new Yu(i.join("")),a=[];do{a.push(...Xu(n,t))}while(!n.end());return a}function $u(e){let t="";const i=[];for(const r of e)r&&(/[a-zA-Z\*]/.test(r[0])&&i.push(t),i.push(r),/\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(r)&&i.push(" "),t=/\\[a-zA-Z]+\*?$/.test(r)?" ":"");return i.join("")}function ec(e){return $u(e.map((e=>{var t;return null!==(t={"":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[e])&&void 0!==t?t:e})))}class tc extends zu{constructor(e,t,i){super(null,i),this.placeholderId=e,this.element=t,this.htmlData=`placeholder-id=${e}`,this.height=""===t.style.fontSize?1:t.clientHeight/parseInt(t.style.fontSize)*.6}toMarkup(){let e="";const t=this.classes.split(" "),i=1===t.length?t[0]:t.filter(((e,t,i)=>e.length>0&&i.indexOf(e)===t)).join(" ");if(this.cssId&&(e+=` id=${this.cssId.replace(/ /g,"-")} `),this.htmlData){const t=this.htmlData.split(",");for(const i of t){const t=i.match(/([^=]+)=(.+$)/);if(t){const i=t[1].trim().replace(/ /g,"-");i&&(e+=` data-${i}=${t[2]} `)}else{const t=i.trim().replace(/ /g,"-");t&&(e+=` data-${t} `)}}}if(this.htmlStyle){const t=this.htmlStyle.split(";");let i="";for(const e of t){const t=e.match(/([^=]+):(.+$)/);if(t){const e=t[1].trim().replace(/ /g,"-");e&&(i+=`${e}:${t[2]};`)}}i&&(e+=` style="${i}"`)}return this.attributes&&(e+=" "+Object.keys(this.attributes).map((e=>`${e}="${this.attributes[e]}"`)).join(" ")),i.length>0&&(e+=` class="${i}"`),e+=` style="display: inline-block; width:${this.element.clientWidth}px; height:${this.element.clientHeight}px; "`,``}}const ic=["above","body","below","superscript","subscript"];function rc(e){return"string"===typeof e&&ic.includes(e)}function nc(e){return void 0!==e&&Array.isArray(e)&&2===e.length}class ac{constructor(e,t,i){var r,n,a,o,s,l;this.id=void 0,this.verbatimLatex=void 0,this._isDirty=!1,this._changeCounter=0,this.subsupPlacement=void 0,this.explicitSubsupPlacement=!1,this.skipBoundary=!1,this.captureSelection=!1,this.type=e,this.context=t,"string"===typeof(null===i||void 0===i?void 0:i.value)&&(this.value=i.value),this.command=null!==(n=null!==(r=null===i||void 0===i?void 0:i.command)&&void 0!==r?r:this.value)&&void 0!==n?n:"",this.mode=null!==(a=null===i||void 0===i?void 0:i.mode)&&void 0!==a?a:"math",this.isFunction=null!==(o=null===i||void 0===i?void 0:i.isFunction)&&void 0!==o&&o,this.subsupPlacement=null===i||void 0===i?void 0:i.limits,this.style=null!==(s=null===i||void 0===i?void 0:i.style)&&void 0!==s?s:{},this.displayContainsHighlight=null!==(l=null===i||void 0===i?void 0:i.displayContainsHighlight)&&void 0!==l&&l,(null===i||void 0===i?void 0:i.serialize)&&(console.assert("string"===typeof i.command),ac.customSerializer[i.command]=i.serialize)}static createBox(e,t,i){var r,n,a;if(!t)return null;const o=sc(t);if(1===o.length){const t=o[0];return t[0].style?lc(e,t,{...i,style:{color:t[0].style.color,backgroundColor:t[0].style.backgroundColor,fontSize:t[0].style.fontSize}}):lc(e,t,i)}const s=[];let l=null===i||void 0===i?void 0:i.newList;for(const u of o){const t=new Jl(e,{color:null===(r=u[0].style)||void 0===r?void 0:r.color,backgroundColor:null===(n=u[0].style)||void 0===n?void 0:n.backgroundColor,fontSize:null===(a=u[0].style)||void 0===a?void 0:a.fontSize}),i=lc(t,u,{newList:l});i&&(l=!1,s.push(i))}return 0===s.length?null:1!==s.length||(null===i||void 0===i?void 0:i.classes)||(null===i||void 0===i?void 0:i.type)?new zu(s,{classes:null===i||void 0===i?void 0:i.classes,type:null===i||void 0===i?void 0:i.type,newList:null===i||void 0===i?void 0:i.newList}).wrap(e):s[0].wrap(e)}static serialize(e,t){return vs(e)?oc(e,t):"number"===typeof e||"boolean"===typeof e?e.toString():"string"===typeof e?e.replace(/\s/g,"~"):void 0===e?"":t.expandMacro||"string"!==typeof e.verbatimLatex?e.command&&ac.customSerializer[e.command]?ac.customSerializer[e.command](e,t):e.serialize(t):e.verbatimLatex}static commonAncestor(e,t){if(e===t)return e.parent;if(e.parent===t.parent)return e.parent;const i=new WeakSet;let{parent:r}=e;while(r)i.add(r),r=r.parent;r=t.parent;while(r){if(i.has(r))return r;r=r.parent}console.assert(Boolean(r))}static fromJson(e,t){const i=new ac(e.type,t,e);for(const r of ic)e[r]&&i.setChildren(e[r],r);return i}toJson(){const e={type:this.type};if("math"!==this.mode&&(e.mode=this.mode),this.command&&this.command!==this.value&&(e.command=this.command),void 0!==this.value&&(e.value=this.value),this.style&&Object.keys(this.style).length>0&&(e.style={...this.style}),void 0!==this.verbatimLatex&&(e.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(e.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(e.explicitSubsupPlacement=!0),this.isFunction&&(e.isFunction=!0),this.displayContainsHighlight&&(e.displayContainsHighlight=!0),this.isExtensibleSymbol&&(e.isExtensibleSymbol=!0),this.skipBoundary&&(e.skipBoundary=!0),this.captureSelection&&(e.captureSelection=!0),this._branches)for(const t of Object.keys(this._branches))this._branches[t]&&(e[t]=this._branches[t].filter((e=>"first"!==e.type)).map((e=>e.toJson())));return e}get changeCounter(){return this._changeCounter}get isDirty(){return this._isDirty}set isDirty(e){if(this._isDirty=e,e){this._changeCounter++,this.verbatimLatex=void 0,this._children=void 0;let{parent:e}=this;while(e)e._isDirty=!0,e._changeCounter++,e.verbatimLatex=void 0,e._children=void 0,e=e.parent}}serialize(e){var t;return this.body&&this.command?$u([this.command,"{",this.bodyToLatex(e),"}",this.supsubToLatex(e)]):this.body?$u([this.bodyToLatex(e),this.supsubToLatex(e)]):this.value&&"​"!==this.value?null!==(t=this.command)&&void 0!==t?t:Hs(this.mode,this.value):""}bodyToLatex(e){return oc(this.body,e)}aboveToLatex(e){return oc(this.above,e)}belowToLatex(e){return oc(this.below,e)}supsubToLatex(e){let t="";if(void 0!==this.branch("subscript")){const i=oc(this.subscript,e);0===i.length?t+="_{}":1===i.length?t+="_"+i:t+=`_{${i}}`}if(void 0!==this.branch("superscript")){const i=oc(this.superscript,e);0===i.length?t+="^{}":1===i.length?t+="′"===i?"^\\prime ":"″"===i?"^\\doubleprime ":"^"+i:t+=`^{${i}}`}return t}get treeDepth(){let e=1,t=this.parent;while(t)t=t.parent,e+=1;return e}get inCaptureSelection(){let e=!1,t=this;while(t){if(t.captureSelection){e=!0;break}t=t.parent}return e}branch(e){if(rc(e)&&this._branches)return this._branches[e]}get branches(){if(!this._branches)return[];const e=[];for(const t of ic)this._branches[t]&&e.push(t);return e}createBranch(e){return console.assert(rc(e)),rc(e)?(this._branches?this._branches[e]||(this._branches[e]=[this.makeFirstAtom(e)]):this._branches={[e]:[this.makeFirstAtom(e)]},this.isDirty=!0,this._branches[e]):[]}get row(){return nc(this.treeBranch)?this.treeBranch[0]:-1}get col(){return nc(this.treeBranch)?this.treeBranch[1]:-1}get body(){var e;return null===(e=this._branches)||void 0===e?void 0:e.body}set body(e){this.setChildren(e,"body")}get superscript(){var e;return null===(e=this._branches)||void 0===e?void 0:e.superscript}set superscript(e){this.setChildren(e,"superscript")}get subscript(){var e;return null===(e=this._branches)||void 0===e?void 0:e.subscript}set subscript(e){this.setChildren(e,"subscript")}get above(){var e;return null===(e=this._branches)||void 0===e?void 0:e.above}set above(e){this.setChildren(e,"above")}get below(){var e;return null===(e=this._branches)||void 0===e?void 0:e.below}set below(e){this.setChildren(e,"below")}get computedStyle(){var e;if(!this.parent)return{...null!==(e=this.style)&&void 0!==e?e:{}};const t=void 0!==this.style.verbatimColor,i=void 0!==this.style.verbatimBackgroundColor,r={...this.parent.computedStyle,...this.style};return delete r.variant,delete r.variantStyle,i||delete r.verbatimBackgroundColor,t||delete r.verbatimColor,r}applyStyle(e){this.isDirty=!0,this.style={...this.style,...e},"none"===this.style.fontFamily&&delete this.style.fontFamily,"auto"===this.style.fontShape&&delete this.style.fontShape,"auto"===this.style.fontSeries&&delete this.style.fontSeries,"none"===this.style.color&&(delete this.style.color,delete this.style.verbatimColor),"none"===this.style.backgroundColor&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),"auto"===this.style.fontSize&&delete this.style.fontSize;for(const t of this.children)t.applyStyle(e)}getInitialBaseElement(){var e;let t;return this.hasEmptyBranch("body")||(console.assert("first"===(null===(e=this.body)||void 0===e?void 0:e[0].type)),t=this.body[1].getInitialBaseElement()),null!==t&&void 0!==t?t:this}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){const e=this.getInitialBaseElement();return/mord/.test(e.type)}hasEmptyBranch(e){const t=this.branch(e);return!t||(console.assert(t.length>0),console.assert("first"===t[0].type),1===t.length)}setChildren(e,t){var i;if(!e)return;if(console.assert(rc(t)),!rc(t))return;console.assert("first"!==(null===(i=e[0])||void 0===i?void 0:i.type));const r=[this.makeFirstAtom(t),...e];this._branches?this._branches[t]=r:this._branches={[t]:r};for(const n of e)n.parent=this,n.treeBranch=t;this.isDirty=!0}makeFirstAtom(e){const t=new ac("first",this.context,{mode:this.mode});return t.parent=this,t.treeBranch=e,t}addChild(e,t){console.assert("first"!==e.type),this.createBranch(t).push(e),this.isDirty=!0,e.parent=this,e.treeBranch=t}addChildBefore(e,t){console.assert(void 0!==t.treeBranch);const i=this.createBranch(t.treeBranch);i.splice(i.indexOf(t),0,e),this.isDirty=!0,e.parent=this,e.treeBranch=t.treeBranch}addChildAfter(e,t){console.assert(void 0!==t.treeBranch);const i=this.createBranch(t.treeBranch);i.splice(i.indexOf(t)+1,0,e),this.isDirty=!0,e.parent=this,e.treeBranch=t.treeBranch}addChildren(e,t){for(const i of e)this.addChild(i,t)}addChildrenAfter(e,t){console.assert(0===e.length||"first"!==e[0].type),console.assert(void 0!==t.treeBranch);const i=this.createBranch(t.treeBranch);i.splice(i.indexOf(t)+1,0,...e),this.isDirty=!0;for(const r of e)r.parent=this,r.treeBranch=t.treeBranch;return e[e.length-1]}removeBranch(e){const t=this.branch(e);if(rc(e)&&(this._branches[e]=void 0),!t)return[];for(const i of t)i.parent=void 0,i.treeBranch=void 0;return console.assert("first"===t[0].type),t.shift(),this.isDirty=!0,t}removeChild(e){if(console.assert(e.parent===this),"first"===e.type)return;const t=this.branch(e.treeBranch),i=t.indexOf(e);console.assert(i>=0),t.splice(i,1),this.isDirty=!0,e.parent=void 0,e.treeBranch=void 0}get siblings(){return"root"===this.type?[]:this.parent.branch(this.treeBranch)}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:e}=this;return e[e.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return 1===this.siblings.length}get leftSibling(){console.assert(void 0!==this.parent);const e=this.parent.branch(this.treeBranch);return e[e.indexOf(this)-1]}get rightSibling(){console.assert(void 0!==this.parent);const e=this.parent.branch(this.treeBranch);return e[e.indexOf(this)+1]}get hasChildren(){return this._branches&&this.children.length>0}get firstChild(){return console.assert(this.hasChildren),this.children[0]}get lastChild(){console.assert(this.hasChildren);const{children:e}=this;return e[e.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const e=[];for(const t of ic)if(this._branches[t])for(const i of this._branches[t])e.push(...i.children),e.push(i);return this._children=e,e}render(e,t){if("first"===this.type&&!e.atomIdsSettings)return null;const i=new Jl(e,this.style);let r="";"root"===this.type&&(r+=" ML__base"),this.isSelected&&(r+=" ML__selected");let n=this.createBox(i,{classes:r,newList:!0===(null===t||void 0===t?void 0:t.newList)||"first"===this.type});return n?(this.subsupPlacement||!this.superscript&&!this.subscript||(n=this.attachSupsub(i,{base:n})),n.wrap(i)):null}attachSupsub(e,t){var i,r;const n=t.base,a=this.superscript,o=this.subscript;if(!a&&!o)return n;let s=null,l=null;const u=null!==(i=t.isCharacterBox)&&void 0!==i?i:this.isCharacterBox();let c=0;if(a){const t=new Jl(e,void 0,"superscript");s=ac.createBox(t,a,{newList:!0}),u||(c=n.height-e.metrics.supDrop*t.scalingFactor)}let h,d=0;if(o){const t=new Jl(e,void 0,"subscript");l=ac.createBox(t,o,{newList:!0}),u||(d=n.depth+e.metrics.subDrop*t.scalingFactor)}h=e.isDisplayStyle?e.metrics.sup1:e.isCramped?e.metrics.sup3:e.metrics.sup2;const p=.5/Cl/e.scalingFactor;let m=null;if(l&&s){c=Math.max(c,h,s.depth+.25*e.metrics.xHeight),d=Math.max(d,e.metrics.sub2);const t=e.metrics.defaultRuleThickness;if(c-s.depth-(l.height-d)<4*t){d=4*t-(c-s.depth)+l.height;const i=.8*e.metrics.xHeight-(c-s.depth);i>0&&(c+=i,d-=i)}const i=this.isExtensibleSymbol&&n.italic?-n.italic:0;m=new Pu({individualShift:[{box:l,shift:d,marginLeft:i},{box:s,shift:-c}]}).wrap(e)}else l&&!s?(d=Math.max(d,e.metrics.sub1,l.height-.8*Tl),m=new Pu({shift:d,children:[{box:l,marginRight:p,marginLeft:this.isCharacterBox()?-(null!==(r=n.italic)&&void 0!==r?r:0):0}]})):!l&&s&&(c=Math.max(c,h,s.depth+.25*Tl),m=new Pu({shift:-c,children:[{box:s,marginRight:p}]}),m.wrap(e));const f=new zu(m,{classes:"msubsup"+(this.isSelected?" ML__selected":"")});return this.caret&&(f.caret=this.caret),new zu([n,f],{type:t.type})}attachLimits(e,t){var i;const r=this.superscript?ac.createBox(new Jl(e,this.style,"superscript"),this.superscript,{newList:!0}):null,n=this.subscript?ac.createBox(new Jl(e,this.style,"subscript"),this.subscript,{newList:!0}):null;return r||n?Vu(e,{...t,above:r,below:n,type:null!==(i=null===t||void 0===t?void 0:t.type)&&void 0!==i?i:"mop"}):t.base.wrap(e)}bind(e,t){if(!t||e.isPhantom||"​"===this.value)return t;let i=this.parent;while(i&&!i.captureSelection)i=i.parent;return(null===i||void 0===i?void 0:i.captureSelection)||(this.id||(this.id=e.makeID()),t.atomID=this.id),t}createMathfieldBox(e,t){var i;const r="mathfield",n=null!==(i=null===t||void 0===t?void 0:t.classes)&&void 0!==i?i:"",a=new tc(t.placeholderId,t.element,{type:r,mode:this.mode,maxFontSize:e.scalingFactor,style:{variant:"normal",...this.style,letterShapeStyle:e.letterShapeStyle,fontSize:Math.max(1,e.size+e.mathstyle.sizeDelta)},classes:n,newList:null===t||void 0===t?void 0:t.newList});return e.isTight&&(a.isTight=!0),"math"===this.mode&&"main"!==this.style.variant||(a.italic=0),a.right=a.italic,this.bind(e,a),a}createBox(e,t){var i,r,n,a;const o=null!==(i=this.value)&&void 0!==i?i:this.body,s=ku(this.type)?this.type:void 0;let l=null!==(r=null===t||void 0===t?void 0:t.classes)&&void 0!==r?r:"";"text"===this.mode&&(l+=" ML__text");const u="string"===typeof o||void 0===o?new zu(null!==(n=o)&&void 0!==n?n:null,{type:s,mode:this.mode,maxFontSize:e.scalingFactor,style:{variant:"normal",...this.style,letterShapeStyle:e.letterShapeStyle,fontSize:Math.max(1,e.size+e.mathstyle.sizeDelta)},classes:l,newList:null===t||void 0===t?void 0:t.newList}):null!==(a=ac.createBox(e,o,{type:s,mode:this.mode,style:this.style,classes:l,newList:null===t||void 0===t?void 0:t.newList}))&&void 0!==a?a:new zu(null);return e.isTight&&(u.isTight=!0),"math"===this.mode&&"main"!==this.style.variant||(u.italic=0),u.right=u.italic,this.bind(e,u),this.caret&&(this.superscript||this.subscript||(u.caret=this.caret)),u}isDigit(){var e;return"mord"===this.type&&this.value?/^[\d,.]$/.test(this.value):"group"===this.type&&2===(null===(e=this.body)||void 0===e?void 0:e.length)&&("first"===this.body[0].type&&","===this.body[1].value)}asDigit(){var e;return"mord"===this.type&&this.value&&/^[\d,.]$/.test(this.value)?this.value:"group"===this.type&&2===(null===(e=this.body)||void 0===e?void 0:e.length)&&"first"===this.body[0].type&&","===this.body[1].value?".":""}}function oc(e,t){if(!e||0===e.length)return"";if("first"===e[0].type){if(1===e.length)return"";e=e.slice(1)}return 0===e.length?"":$u(ou(e,"cssClass").map((e=>$u(ou(e,"color").map((e=>$u(au(e).map((e=>nu.serialize(e,t))))))))))}function sc(e){let t;const i=[];let r=[];for(const n of e){const e=n.computedStyle;t||n.style?t&&e.color===t.color&&e.backgroundColor===t.backgroundColor&&e.fontSize===t.fontSize?r.push(n):(r.length>0&&i.push(r),r=[n],t=n.computedStyle):r.push(n)}return r.length>0&&i.push(r),i}function lc(e,t,i){var r,n,a,o;function s(e){return"text"===e.mode}if(!t||0===t.length)return null;const l=new Jl(e,null===i||void 0===i?void 0:i.style),u=!l.atomIdsSettings||!l.atomIdsSettings.groupNumbers;let c,h=[],d=null!==(r=null===i||void 0===i?void 0:i.newList)&&void 0!==r&&r;if(1===t.length){const e=t[0],i=e.render(l,{newList:d});i&&(u&&e.isSelected&&i.selected(!0),h=[i])}else{let e="",i=!0;for(const r of t){(null===(n=l.atomIdsSettings)||void 0===n?void 0:n.groupNumbers)&&e&&(i&&r.isDigit()||!i&&s(r))&&(l.atomIdsSettings.overrideID=e);const t=r.render(l,{newList:d});l.atomIdsSettings&&(l.atomIdsSettings.overrideID=void 0),t&&(d="group"===r.type&&!r["boxType"],(null===(a=l.atomIdsSettings)||void 0===a?void 0:a.groupNumbers)&&((r.isDigit()||s(r))&&(e&&i===r.isDigit()||(i=r.isDigit(),e=null!==(o=r.id)&&void 0!==o?o:"")),!e||(r.isDigit()||s(r))&&r.hasEmptyBranch("superscript")&&r.hasEmptyBranch("subscript")||(e="")),u&&r.isSelected&&t.selected(!0),h.push(t))}}return 0===h.length?null:(i||l.isTight||h.length>1?(c=new zu(h,{isTight:l.isTight,...null!==i&&void 0!==i?i:{}}),c.isSelected=h.every((e=>e.isSelected))):c=h[0],c.wrap(l).wrap(e))}ac.customSerializer={};class uc extends ac{constructor(e,t,i){var r,n,a;super("group",t,{command:null===i||void 0===i?void 0:i.command,mode:null!==(r=null===i||void 0===i?void 0:i.mode)&&void 0!==r?r:"math",serialize:null===i||void 0===i?void 0:i.serialize,style:null===i||void 0===i?void 0:i.style,displayContainsHighlight:!0}),this.body=e,this.mathstyleName=null===i||void 0===i?void 0:i.mathstyleName,this.latexOpen=null===i||void 0===i?void 0:i.latexOpen,this.latexClose=null===i||void 0===i?void 0:i.latexClose,this.cssId=null===i||void 0===i?void 0:i.cssId,this.htmlData=null===i||void 0===i?void 0:i.htmlData,this.htmlStyle=null===i||void 0===i?void 0:i.htmlStyle,this.customClass=null===i||void 0===i?void 0:i.customClass,this.boxType=null===i||void 0===i?void 0:i.boxType,this.skipBoundary=!0,this.captureSelection=null!==(n=null===i||void 0===i?void 0:i.captureSelection)&&void 0!==n&&n,this.changeMode=null!==(a=null===i||void 0===i?void 0:i.changeMode)&&void 0!==a&&a,this.displayContainsHighlight=!1,e&&1===e.length&&","===e[0].command&&(this.captureSelection=!0)}static fromJson(e,t){return new uc(e.body,t,e)}toJson(){const e={};return this.mathstyleName&&(e.mathstyleName=this.mathstyleName),this.latexOpen&&(e.latexOpen=this.latexOpen),this.latexClose&&(e.latexClose=this.latexClose),this.cssId&&(e.cssId=this.cssId),this.htmlData&&(e.htmlData=this.htmlData),this.htmlStyle&&(e.htmlStyle=this.htmlStyle),this.customClass&&(e.customClass=this.customClass),this.boxType&&(e.boxType=this.boxType),this.captureSelection&&(e.captureSelection=!0),this.changeMode&&(e.changeMode=!0),{...super.toJson(),...e}}render(e){const t=new Jl(e,this.style,this.mathstyleName),i=ac.createBox(t,this.body,{type:this.boxType,classes:this.customClass,mode:this.mode,style:{backgroundColor:this.style.backgroundColor},newList:!this.boxType});return i?(this.cssId&&(i.cssId=this.cssId),this.htmlData&&(i.htmlData=this.htmlData),this.htmlStyle&&(i.htmlStyle=this.htmlStyle),this.caret&&(i.caret=this.caret),this.bind(e,i)):null}serialize(e){let t=this.bodyToLatex(e);return"string"===typeof this.latexOpen&&(t=this.latexOpen+t+this.latexClose),this.htmlData&&(t=`\\htmlData{${this.htmlData}}{${t}}`),this.htmlStyle&&(t=`\\htmlStyle{${this.htmlStyle}}{${t}}`),this.customClass&&(t=`\\class{${this.customClass}}{${t}}`),this.cssId&&(t=`\\cssId{${this.cssId}}{${t}}`),t}}class cc extends ac{constructor(e,t,i,r){super("spacing",i,{command:e,style:t}),this.width=r}static fromJson(e,t){return new cc(e.command,e.style,t,e.width)}toJson(){const e={};return this.width&&(e.width=this.width),{...super.toJson(),...e}}render(e){var t;let i;if(this.width)i=new zu(null,{classes:"mspace"}),i.left=Yl(this.width);else{const e=null!==(t={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])&&void 0!==t?t:"mediumspace";i=new zu(null,{classes:e})}return i=this.bind(e,i),this.caret&&(i.caret=this.caret),i}serialize(e){var t;let i=null!==(t=this.command)&&void 0!==t?t:"";return"\\hspace"===this.command||"\\hspace*"===this.command?Number.isFinite(this.width)?i+=`{${this.width}em'}`:i+="{0pt}":Number.isFinite(this.width)&&(i+=` ${this.width}em`),i}}const hc={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},dc=Object.fromEntries(Object.entries(hc).map((([e,t])=>[t,e])));function pc(e){var t;return null!==(t={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"∣":8739,"∥":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[e])&&void 0!==t?t:e.codePointAt(0)}function mc(e,t,i,r){const n=new zu(pc(e),{fontFamily:"Main-Regular"}),a=n.wrap(t,r);return i&&a.setTop((1-t.scalingFactor)*El),a}function fc(e,t,i,r,n){const a=new Jl(r,null===n||void 0===n?void 0:n.style,"textstyle"),o=new zu(pc(e),{fontFamily:"Size"+t+"-Regular",classes:"ML__delim-size"+t}).wrap(a);return i&&o.setTop((1-a.scalingFactor)*El),o}function gc(e,t,i,r,n){var a;let o,s,l,u;o=l=u=pc(e),s=null;let c="Size1-Regular";"\\vert"===e||"\\lvert"===e||"\\rvert"===e||"\\mvert"===e||"\\mid"===e?l=o=u=8739:"\\Vert"===e||"\\lVert"===e||"\\rVert"===e||"\\mVert"===e||"\\|"===e?l=o=u=8741:"\\uparrow"===e?l=u=9168:"\\Uparrow"===e?l=u=8214:"\\downarrow"===e?o=l=9168:"\\Downarrow"===e?o=l=8214:"\\updownarrow"===e?(o=8593,l=9168,u=8595):"\\Updownarrow"===e?(o=8657,l=8214,u=8659):"["===e||"\\lbrack"===e?(o=9121,l=9122,u=9123,c="Size4-Regular"):"]"===e||"\\rbrack"===e?(o=9124,l=9125,u=9126,c="Size4-Regular"):"\\lfloor"===e||"⌊"===e?(l=o=9122,u=9123,c="Size4-Regular"):"\\lceil"===e||"⌈"===e?(o=9121,l=u=9122,c="Size4-Regular"):"\\rfloor"===e||"⌋"===e?(l=o=9125,u=9126,c="Size4-Regular"):"\\rceil"===e||"⌉"===e?(o=9124,l=u=9125,c="Size4-Regular"):"("===e||"\\lparen"===e?(o=9115,l=9116,u=9117,c="Size4-Regular"):")"===e||"\\rparen"===e?(o=9118,l=9119,u=9120,c="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(o=9127,s=9128,u=9129,l=9130,c="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o=9131,s=9132,u=9133,l=9130,c="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o=9127,u=9129,l=9130,c="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o=9131,u=9133,l=9130,c="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o=9127,u=9133,l=9130,c="Size4-Regular"):"\\rmoustache"===e||"⎱"===e?(o=9131,u=9129,l=9130,c="Size4-Regular"):"\\surd"===e?(o=57345,u=9143,l=57344,c="Size4-Regular"):"\\ulcorner"===e?(o=9484,l=u=32):"\\urcorner"===e?(o=9488,l=u=32):"\\llcorner"===e?(u=9492,l=o=32):"\\lrcorner"===e&&(o=9496,l=o=32);const h=Ol(o,c),d=h.height+h.depth,p=Ol(l,c),m=p.height+p.depth,f=Ol(u,c),g=f.height+f.depth;let v=0,y=1;if(null!==s){const e=Ol(s,c);v=e.height+e.depth,y=2}const b=d+g+v,w=Math.max(0,Math.ceil((t-b)/(y*m))),x=b+w*y*m;let A=El;i&&(A*=r.scalingFactor);const k=x/2-A,S=.008,M=[];M.push({box:new zu(u,{fontFamily:c})}),M.push(-S);const N=new zu(l,{fontFamily:c});if(null===s)for(let E=0;E","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),wc=[0,1.2,1.8,2.4,3];function xc(e,t,i,r){var n;return void 0===e||"."===e?Cc(i,null!==(n=r.type)&&void 0!==n?n:"minner",r.classes):("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),vc.has(e)||bc.has(e)?fc(e,t,!1,i,r):yc.has(e)?gc(e,wc[t],!1,i,r):(console.assert(!1,"Unknown delimiter '"+e+"'"),null))}const Ac=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],kc=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],Sc=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function Mc(e){return"small"===e.type?"Main-Regular":"large"===e.type?"Size"+e.size+"-Regular":(console.assert("stack"===e.type),"Size4-Regular")}function Nc(e,t,i,r){const n={"-4":0,"-3":1,0:2}[r.mathstyle.sizeDelta];for(let a=n;at)return i[a]}return i[i.length-1]}function zc(e,t,i,r,n,a){var o;if(!t||0===t.length||"."===t)return Cc(n,e,e);let s;"<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),s=bc.has(t)?Ac:vc.has(t)?Sc:kc;const l=Nc(pc(t),i,s,n),u=new Jl(n,null===a||void 0===a?void 0:a.style,l.mathstyle);return"small"===l.type?mc(t,u,r,{type:e,classes:"ML__small-delim "+(null!==(o=null===a||void 0===a?void 0:a.classes)&&void 0!==o?o:"")}):"large"===l.type?fc(t,l.size,r,u,{...a,type:e}):(console.assert("stack"===l.type),gc(t,i,r,u,{...a,type:e}))}function Lc(e,t,i,r,n,a){if("."===t)return Cc(n,e,null===a||void 0===a?void 0:a.classes);const o=El*n.scalingFactor,s=901,l=5/Cl,u=Math.max(i-o,r+o),c=Math.max(u/500*s,2*u-l);return zc(e,t,c,!0,n,a)}function Cc(e,t,i){const r=new Jl(e,void 0,"textstyle");return new zu(null,{classes:" nulldelimiter "+(null!==i&&void 0!==i?i:""),type:t}).wrap(r)}class Ec extends ac{constructor(e,t,i,r){super("leftright",i,{style:r.style,displayContainsHighlight:!0}),this.variant=e,this.body=t,this.leftDelim=r.leftDelim,this.rightDelim=r.rightDelim}static fromJson(e,t){var i;return new Ec(null!==(i=e.variant)&&void 0!==i?i:"",e.body,t,e)}toJson(){const e=super.toJson();return this.variant&&(e.variant=this.variant),this.leftDelim&&(e.leftDelim=this.leftDelim),this.rightDelim&&(e.rightDelim=this.rightDelim),e}serialize(e){var t,i;const r=this.matchingRightDelim();return"left...right"===this.variant?$u(["\\left"+(null!==(t=this.leftDelim)&&void 0!==t?t:"."),this.bodyToLatex(e),"\\right"+r]):"mleft...mright"===this.variant?$u(["\\mleft"+(null!==(i=this.leftDelim)&&void 0!==i?i:"."),this.bodyToLatex(e),"\\mright"+r]):$u([this.leftDelim&&"."!==this.leftDelim?this.leftDelim:"",this.bodyToLatex(e),r])}matchingRightDelim(){var e,t;if(this.rightDelim&&"?"!==this.rightDelim)return this.rightDelim;const i=null!==(e=this.leftDelim)&&void 0!==e?e:".";return null!==(t=hc[i])&&void 0!==t?t:i}render(e){var t,i,r;const n=new Jl(e,this.style);console.assert(void 0!==this.body);const a=new Jl(e,this.style,"textstyle"),o=null!==(t=ac.createBox(n,this.body,{newList:!0}))&&void 0!==t?t:new zu(null,{newList:!0}),s=o.height/a.scalingFactor,l=o.depth/a.scalingFactor,u=[];if(this.leftDelim&&u.push(this.bind(a,Lc("mopen",this.leftDelim,s,l,a,{classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),o){if(o.children)for(let e=0;ee.toJson()))),e}render(e){if("function"===typeof e.renderPlaceholder)return e.renderPlaceholder(e,this);let t="";return this.caret&&(t+="ML__placeholder-selected"),this.isSelected&&(t+="ML__selected"),this.createBox(e,{classes:t})}serialize(e){var t;let i=null!==(t=this.value)&&void 0!==t?t:"";i===this.context.placeholderSymbol&&(i="");const r=this.placeholderId?`[${this.placeholderId}]`:"",n=this.defaultValue?`[${ac.serialize(this.defaultValue,e)}]`:"";return`\\placeholder${r}${n}{${i}}`}}class Bc extends ac{constructor(e,t){super("error",t,{value:e,command:e,mode:"math"}),this.verbatimLatex=e}static fromJson(e,t){return new Bc(e.command,t)}toJson(){return super.toJson()}render(e){const t=this.createBox(e,{classes:"ML__error"});return this.caret&&(t.caret=this.caret),t}}class Ic extends ac{constructor(e,t,i){var r,n;super("macro",t,{command:e}),this.body=i.body,void 0===i.captureSelection?i.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=i.captureSelection,this.macroArgs=null!==(r=i.args)&&void 0!==r?r:"",this.expand=null!==(n=i.expand)&&void 0!==n&&n}static fromJson(e,t){return new Ic(e.command,t,e)}toJson(){const e=super.toJson();return this.expand&&(e.expand=!0),void 0!==this.captureSelection&&(e.captureSelection=this.captureSelection),this.macroArgs&&(e.args=this.macroArgs),e}serialize(e){return e.expandMacro&&this.expand?this.bodyToLatex(e):this.command+this.macroArgs}render(e){const t=ac.createBox(e,this.body);return t?(this.caret&&(t.caret=this.caret),this.bind(e,t)):null}}class qc extends ac{constructor(e,t,i,r){super("text",r,{command:e,mode:"text",displayContainsHighlight:!0}),this.value=t,this.verbatimLatex=t,this.applyStyle(i)}static fromJson(e,t){return new qc(e.command,e.value,e.style,t)}toJson(){return super.toJson()}render(e){const t=this.createBox(e);return this.caret&&(t.caret=this.caret),t}serialize(e){var t;return null!==(t=this.verbatimLatex)&&void 0!==t?t:Fs("text",this.value.codePointAt(0))}}function Dc(e){return!/^<({|}|\$|\$\$|space)>$/.test(e)}class Oc{constructor(e,t,i){var r,n,a,o,s,l;this.index=0,this.endCount=0,this.tokens=e,this.context=t,this.errors=[],this.args=null!==(r=i.args)&&void 0!==r?r:null,this.smartFence=null!==(n=i.smartFence)&&void 0!==n?n:t.smartFence,this._currentParsingContext={parent:void 0,mathlist:[],style:null!==(a=i.style)&&void 0!==a?a:{},parseMode:null!==(o=i.parseMode)&&void 0!==o?o:"math",mathstyle:null!==(s=i.mathstyle)&&void 0!==s?s:"displaystyle",registers:null!==(l=i.registers)&&void 0!==l?l:t.registers,tabular:!1}}get currentContext(){return this._currentParsingContext}get rootContext(){let e=this._currentParsingContext;while(e.parent)e=e.parent;return e}beginContext(e){var t,i,r;const n={parent:this.currentContext,mathlist:[],style:{...this.currentContext.style},parseMode:null!==(t=null===e||void 0===e?void 0:e.mode)&&void 0!==t?t:this.currentContext.parseMode,mathstyle:null!==(i=null===e||void 0===e?void 0:e.mathstyle)&&void 0!==i?i:this.currentContext.mathstyle,registers:null,tabular:null!==(r=null===e||void 0===e?void 0:e.tabular)&&void 0!==r&&r};this._currentParsingContext=n}endContext(){this._currentParsingContext=this._currentParsingContext.parent}onError(e){this.errors.push({before:ec(this.tokens.slice(this.index,this.index+10)),after:ec(this.tokens.slice(Math.max(0,this.index-10),this.index)),...e})}get mathlist(){return this.currentContext.mathlist}set mathlist(e){this.currentContext.mathlist=e}get parseMode(){return this.currentContext.parseMode}set parseMode(e){this.currentContext.parseMode=e}get tabularMode(){return this.currentContext.tabular}get style(){let e=this.currentContext;while(e){if(e.style)return e.style;e=e.parent}return{}}set style(e){this.currentContext.style=e}getRegister(e){var t,i,r;if(console.assert("\\"!==e[0]),e.startsWith("global "))return null!==(i=null===(t=this.rootContext.registers)||void 0===t?void 0:t[e.slice(7)])&&void 0!==i?i:0;let n=this.currentContext;while(n){if(null===(r=n.registers)||void 0===r?void 0:r[e])return n.registers[e];n=n.parent}return 0}setRegister(e,t){var i;if(e.startsWith("global ")){e=e.slice(7);let r=this.currentContext;while(r)(null===(i=r.registers)||void 0===i?void 0:i[e])&&delete r.registers[e],r=r.parent;this.rootContext.registers[e]=t}else this.currentContext.registers||(this.currentContext.registers={}),this.currentContext.registers[e]=t}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}get(){return this.endCount=0,this.index0){if(e=this.mathlist[this.mathlist.length-1],"msubsup"===e.type)return e;if(void 0!==e.subsupPlacement)return e}return e=new _c(this.context,{style:this.style}),this.mathlist.push(e),e}hasPattern(e){return e.test(this.tokens[this.index])}hasInfixCommand(){var e;const{index:t}=this;if(t"))e=!0;return e}skipUntilToken(e){let t=this.tokens[this.index];while(t&&t!==e)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){let e=!1;do{const t=this.matchWhitespace(),i=this.match("\\relax");e=!t&&!i}while(!e)}matchKeyword(e){const t=this.index;let i=this.end(),r="";while(!i){const t=this.get();Dc(t)?(r+=t,i=this.end()||r.length>=e.length):i=!0}const n=e.toUpperCase()===r.toUpperCase();return n||(this.index=t),n}scanString(){let e="";while(!this.end())if(this.match(""))e+=" ";else{const t=this.peek();if("]"===t)break;if(Dc(t))e+=this.get();else{if(!t.startsWith("\\"))break;this.onError({code:"unbalanced-braces"}),e+=this.get()}}return e}scanBalancedString(){let e="",t=this.end(),i=1;while(!t){if(this.match(""))e+=" ";else{const t=this.get();"<{>"===t?(e+="{",i+=1):"<}>"===t?(i-=1,i>0?e+="}":this.index-=1):e+="<$>"===t?"$":"<$$>"===t?"$$":t}t=0===i||this.end()}return e}matchLiteralArg(){var e;let t="";if(this.match("<{>")){let i=1;while(i>0&&!this.end()){const r=this.get();"<}>"===r?(i-=1,i>0&&(t+="}")):"<{>"===r?(i+=1,t+="{"):t+=null!==(e={"":" ","<$$>":"$$","<$>":"$"}[r])&&void 0!==e?e:r}}return t}scanNumber(e=!0){var t,i;let r=!1,n=this.peek();while(""===n||"+"===n||"-"===n)this.get(),"-"===n&&(r=!r),n=this.peek();e=Boolean(e);let a=10,o=/\d/;if(this.match("'"))a=8,o=/[0-7]/,e=!0;else if(this.match('"')||this.match("x"))a=16,o=/[\dA-F]/,e=!0;else if(this.match("`"))return n=this.get(),n?n.startsWith("\\")&&2===n.length?(r?-1:1)*(null!==(t=n.codePointAt(1))&&void 0!==t?t:0):(r?-1:1)*(null!==(i=n.codePointAt(0))&&void 0!==i?i:0):null;let s="";while(this.hasPattern(o))s+=this.get();if(!e&&(this.match(".")||this.match(","))){s+=".";while(this.hasPattern(o))s+=this.get()}const l=e?Number.parseInt(s,a):Number.parseFloat(s);return Number.isNaN(l)?null:r?-l:l}scanDimen(){var e,t,i;let r,n=this.scanNumber(!1);if(null===n){if(!(null===(e=this.peek())||void 0===e?void 0:e.startsWith("\\")))return null;n=1}return this.matchWhitespace(),this.matchKeyword("pt")?r={dimension:n,unit:"pt"}:this.matchKeyword("mm")?r={dimension:n,unit:"mm"}:this.matchKeyword("cm")?r={dimension:n,unit:"cm"}:this.matchKeyword("ex")?r={dimension:n,unit:"ex"}:this.matchKeyword("px")?r={dimension:n,unit:"px"}:this.matchKeyword("em")?r={dimension:n,unit:"em"}:this.matchKeyword("bp")?r={dimension:n,unit:"bp"}:this.matchKeyword("dd")?r={dimension:n,unit:"dd"}:this.matchKeyword("pc")?r={dimension:n,unit:"pc"}:this.matchKeyword("in")?r={dimension:n,unit:"in"}:this.matchKeyword("mu")?r={dimension:n,unit:"mu"}:(null===(t=this.peek())||void 0===t?void 0:t.startsWith("\\"))?(r=null!==(i=Vc(this.getRegister(this.get().slice(1)),this.context))&&void 0!==i?i:{dimension:0},r.dimension*=n):(this.match("\\relax")||this.onError({code:"missing-unit"}),r={dimension:n,unit:"pt"}),r}scanGlue(){const e=this.scanDimen();if(null===e)return null;const t={glue:e};return this.matchWhitespace(),this.match("\\relax")?t:(this.matchKeyword("plus")&&this.scanDimen(),this.matchWhitespace(),this.match("\\relax")||(this.matchWhitespace(),this.matchKeyword("minus")&&this.scanDimen()),t)}scanColspec(){this.matchWhitespace();const e=[];while(!this.end()&&"<}>"!==this.peek()&&"]"!==this.peek()){const t=this.get();"c"===t||"r"===t||"l"===t?e.push({align:t}):"|"===t?e.push({separator:"solid"}):":"===t?e.push({separator:"dashed"}):"@"===t&&(this.match("<{>")&&(this.beginContext({mode:"math"}),e.push({gap:this.parse((e=>"<}>"===e))}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return e}parseModeSet(){let e="";if(this.match("\\(")&&(e="\\)"),!e&&this.match("\\[")&&(e="\\]"),!e)return null;this.beginContext({mode:"math",mathstyle:"\\)"===e?"textstyle":"displaystyle"});const t=new uc(this.parse((t=>t===e)),this.context,{mathstyleName:"\\)"===e?"textstyle":"displaystyle",latexOpen:"\\]"===e?"\\[":"\\(",latexClose:e,boxType:"mord"});return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t.hasEmptyBranch("body")?null:t}parseModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const t=new uc(this.parse((t=>t===e)),this.context,{mathstyleName:"<$>"===e?"textstyle":"displaystyle",latexOpen:"<$>"===e?"$ ":"$$ ",latexClose:"<$>"===e?" $":" $$"});return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t.hasEmptyBranch("body")?null:t}parseEnvironment(){if(!this.match("\\begin"))return null;const e=this.parseArgument("string");if(!e)return null;const t=Gs(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const i=[];if(t.params)for(const s of t.params)if(s.isOptional)i.push(this.parseOptionalArgument(s.type));else{const t=this.parseArgument(s.type);t||this.onError({code:"missing-argument",arg:e}),i.push(t)}this.beginContext({tabular:t.tabular});const r=[],n=[];let a=[],o=!1;do{if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),o=!0),!o&&this.match("\\end")&&(this.parseArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),o=!0),!o)if(this.matchColumnSeparator())a.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){a.push(this.mathlist),this.mathlist=[];let e=null;this.matchWhitespace(),this.match("[")&&(e=this.scanDimen(),this.matchWhitespace(),this.match("]")),n.push(null!==e&&void 0!==e?e:{dimension:0}),r.push(a),a=[]}else this.mathlist.push(...this.parse((e=>"<}>"===e||"&"===e||"\\end"===e||"\\cr"===e||"\\\\"===e)))}while(!o);return a.push(this.mathlist),a.length>0&&r.push(a),this.endContext(),t.createAtom(this.context,e,r,n,i)}parse(e){this.beginContext(),e||(e=e=>"<}>"===e);let t="",i=null,r=[],n=null;const a=this.mathlist;this.mathlist=[];while(!this.end()&&!e(this.peek()))this.hasInfixCommand()&&!t?(t=this.get(),i=this.context.getDefinition(t,"math"),i&&(r=this.parseArguments(i)[1]),n=this.mathlist,this.mathlist=[]):this.parseToken();let o;return t?(console.assert(Boolean(i)),r.unshift(this.mathlist),this.mathlist=a,n&&r.unshift(n),o=[i.createAtom(t,r,this.style,this.context)]):(o=this.mathlist,this.mathlist=a),this.endContext(),o}parseGroup(){if(!this.match("<{>"))return null;const e=new uc(this.parse((e=>"<}>"===e)),this.context,{mode:this.parseMode,latexOpen:"{",latexClose:"}"});return this.match("<}>")||this.onError({code:"unbalanced-braces"}),e}scanSmartFence(){if(this.matchWhitespace(),!this.match("("))return null;this.beginContext();let e=1;while(!this.end()&&0!==e)this.match("(")&&(e+=1),this.match(")")&&(e-=1),0!==e&&this.parseToken();0===e&&this.match(")");const t=new Ec("",this.mathlist,this.context,{leftDelim:"(",rightDelim:0===e?")":"?"});return this.endContext(),t}scanDelim(){this.matchWhitespace();const e=this.get();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;let t=".";(e.startsWith("\\")||Dc(e))&&(t=e);const i=this.context.getDefinition(t,"math");return i?"function"===i.definitionType&&i.ifMode&&!i.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:t}),null):"symbol"!==i.definitionType||"mopen"!==i.type&&"mclose"!==i.type?/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(t)?t:(this.onError({code:"unexpected-delimiter",arg:t}),null):t:(this.onError({code:"unknown-command",arg:t}),null)}parseLeftRight(){var e;if(this.match("\\right")||this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),null;let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const i=this.scanDelim();if(!i)return null;this.beginContext();while(!this.end()&&!this.match(t))this.parseToken();const r=this.mathlist;this.endContext();const n=null!==(e=this.scanDelim())&&void 0!==e?e:".";return new Ec("\\right"===t?"left...right":"mleft...mright",r,this.context,{leftDelim:i,rightDelim:n,style:this.style})}parseSupSub(){if("math"!==this.parseMode)return!1;let e=this.peek();if("^"!==e&&"_"!==e&&"'"!==e)return!1;while("^"===e||"_"===e||"'"===e){if(this.match("'"))this.match("'")?this.lastSubsupAtom().addChild(new ac("mord",this.context,{command:"\\doubleprime",mode:"math",value:"′′"}),"superscript"):this.lastSubsupAtom().addChild(new ac("mord",this.context,{command:"\\prime",mode:"math",value:"′"}),"superscript");else if(this.match("^")||this.match("_")){const t=this.parseArgument("math");t?this.lastSubsupAtom().addChildren(t,"_"===e?"subscript":"superscript"):this.lastSubsupAtom().createBranch("_"===e?"subscript":"superscript")}e=this.peek()}return!0}parseLimits(){const e=this.match("\\limits"),t=!e&&this.match("\\nolimits"),i=!t&&!e&&this.match("\\displaylimits");if(!e&&!t&&!i)return!1;const r=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return null!==r&&"mop"===r.type&&(e?(r.subsupPlacement="over-under",r.explicitSubsupPlacement=!0,!0):t?(r.subsupPlacement="adjacent",r.explicitSubsupPlacement=!0,!0):!!i&&(r.subsupPlacement="auto",r.explicitSubsupPlacement=!0,!0))}parseArguments(e){if(!e||!e.params)return[void 0,[]];let t;const i=[];let r=e.infix?2:0;while(r"<}>"===e||"&"===e||"\\end"===e||"\\cr"===e||"\\\\"===e)));else if(n.isOptional)i.push(this.parseOptionalArgument(n.type));else if(n.type.endsWith("*"))t=n.type.slice(0,-1);else{const e=this.parseArgument(n.type);if(null!==e)i.push(e);else switch(this.onError({code:"missing-argument"}),n.type){case"number":i.push(0);break;case"dimen":i.push({dimension:0,unit:"pt"});break;case"glue":i.push({glue:{dimension:0,unit:"pt"}});break;case"string":case"balanced-string":i.push("");break;case"delim":i.push(".");break;case"colspec":i.push("llllllllll");break;case"auto":default:i.push(this.placeholder());break}}r+=1}return[t,i]}parseArgument(e){var t,i;this.skipFiller(),"auto"===e&&(e=this.parseMode);let r=null;const n="<{>"===this.peek();if(!n){if("delim"===e)return null!==(t=this.scanDelim())&&void 0!==t?t:".";if("text"===e||"math"===e){this.beginContext();const e=this.parseSimpleToken();return this.endContext(),e}}if(n&&this.get(),"text"===e||"math"===e){this.beginContext({mode:e});do{this.mathlist.push(...this.parse())}while(!this.match("<}>")&&!this.end())}else if(this.beginContext(),"string"===e?r=this.scanString():"balanced-string"===e?r=this.scanBalancedString():"number"===e?r=this.scanNumber():"colspec"===e?r=this.scanColspec():"dimen"===e?r=this.scanDimen():"glue"===e?r=this.scanGlue():"delim"===e&&(r=null!==(i=this.scanDelim())&&void 0!==i?i:"."),n&&this.skipUntilToken("<}>"),null===r)return this.endContext(),null;const a=this.mathlist;return this.endContext(),null!==r&&void 0!==r?r:a}parseOptionalArgument(e){var t,i;if(e="auto"===e?this.parseMode:e,this.matchWhitespace(),!this.match("["))return null;let r=null;while(!this.end()&&!this.match("]"))if("string"===e)r=this.scanString();else if("number"===e)r=this.scanNumber();else if("dimen"===e)r=this.scanDimen();else if("glue"===e)r=this.scanGlue();else if("colspec"===e)r=this.scanColspec();else if("bbox"===e){const e=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/),n={};for(const r of e){const e=null===(i=(t=this.context).backgroundColorMap)||void 0===i?void 0:i.call(t,r);if(e)n.backgroundcolor=e;else{const e=r.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(e)n.padding=e[0];else{const e=r.match(/^\s*border\s*:\s*(.*)/);e&&(n.border=e[1])}}}r=n}else"math"===e&&(this.beginContext({mode:"math"}),r=this.mathlist.concat(this.parse((e=>"]"===e))),this.endContext());return r}parseCommand(e){var t,i,r,n,a,o,s;if("\\placeholder"===e)return[new Tc(this.context,{mode:this.parseMode,placeholderId:this.parseOptionalArgument("string"),value:null!==(t=this.parseArgument("string"))&&void 0!==t?t:void 0,style:this.style})];let l=null;if("\\char"===e){const e=this.index;let t=Math.floor(null!==(i=this.scanNumber(!0))&&void 0!==i?i:Number.NaN);(!Number.isFinite(t)||t<0||t>1114111)&&(t=10067);const r="\\char"+ec(this.tokens.slice(e,this.index));return l=new ac("math"===this.parseMode?"mord":"text",this.context,{command:"\\char",mode:this.parseMode,value:String.fromCodePoint(t),serialize:()=>r}),l.verbatimLatex=r,[l]}if("\\hskip"===e||"\\kern"===e){const t=this.scanGlue();return t?[new cc(e,this.style,this.context,t)]:null}if(l=this.scanMacro(e),l)return[l];const u=this.context.getDefinition(e,this.parseMode);if(!u)return this.onError({code:"unknown-command",arg:e}),[new Bc(e,this.context)];const c=this.index;if("symbol"===u.definitionType){const t={...this.style};u.variant&&(t.variant=u.variant),l=new ac(null!==(r=u.type)&&void 0!==r?r:"mop",this.context,{command:e,style:t,value:String.fromCodePoint(u.codepoint),mode:this.parseMode})}else{if(u.ifMode&&!u.ifMode.includes(this.parseMode))return[];const t=this.parseMode;u.applyMode&&(this.parseMode=u.applyMode);const[i,r]=this.parseArguments(u);if(this.parseMode=t,!r)return null;if(u.applyMode&&!u.applyStyle&&!u.createAtom)return r[0];if(u.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if("function"===typeof u.createAtom)l=u.createAtom(e,r,this.style,this.context),i&&(l.body=null!==(n=this.parseArgument(i))&&void 0!==n?n:void 0);else if("function"===typeof u.applyStyle){const t=u.applyStyle(e,r,this.context),n=this.parseMode;if(u.applyMode&&(this.parseMode=u.applyMode),i){const e=this.style;this.style={...this.style,...t};const r=this.parseArgument(i);return this.style=e,this.parseMode=n,r}this.style={...this.style,...t},this.parseMode=n}else l=new ac("mop",this.context,{command:null!==(a=u.command)&&void 0!==a?a:e,style:{...this.style},value:e,mode:null!==(o=u.applyMode)&&void 0!==o?o:this.parseMode})}if(l instanceof ac&&void 0===l.verbatimLatex&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)&&(l.verbatimLatex=(null!==(s=l.command)&&void 0!==s?s:"")+ec(this.tokens.slice(c,this.index)),0===l.verbatimLatex.length&&(l.verbatimLatex=void 0),l.isFunction&&this.smartFence)){const e=this.scanSmartFence();if(e)return[l,e]}return l?[l]:null}parseLiteral(e){const t=nu.createAtom(this.parseMode,e,this.context,{...this.style});if(!t)return null;if(t.isFunction&&this.smartFence){const e=this.scanSmartFence();if(e)return[t,e]}return[t]}parseSimpleToken(){const e=this.get();return e?""===e?"text"===this.parseMode?[new qc(" "," ",this.style,this.context)]:null:e.startsWith("\\")?this.parseCommand(e):Dc(e)?this.parseLiteral(e):("<}>"===e?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null):null}scanMacro(e){var t;const i=this.context.getMacro(e);if(!i)return null;const r=this.index,n=i.args,a={"?":null===(t=this.args)||void 0===t?void 0:t.call(this,"?")};for(let o=1;o<=n;o++)a[o]=this.matchLiteralArg();return new Ic(e,this.context,{expand:i.expand,captureSelection:i.captureSelection,args:ec(this.tokens.slice(r,this.index)),body:Rc(i.def,this.context,{parseMode:this.parseMode,args:e=>a[e],mathstyle:this.currentContext.mathstyle})})}parseToken(){var e,t,i,r;let n=null!==(r=null!==(i=null!==(t=null!==(e=this.parseEnvironment())&&void 0!==e?e:this.parseModeShift())&&void 0!==t?t:this.parseModeSet())&&void 0!==i?i:this.parseGroup())&&void 0!==r?r:this.parseLeftRight();if(null===n){if(this.parseSupSub())return!0;if(this.parseLimits())return!0;n=this.parseSimpleToken()}return vs(n)?this.mathlist.push(...n):n&&this.mathlist.push(n),null!==n}}function Rc(e,t,i){var r,n,a;const o=null!==(r=null===i||void 0===i?void 0:i.args)&&void 0!==r?r:null,s=new Oc(Ju(e,o),t,{args:o,mathstyle:null!==(n=null===i||void 0===i?void 0:i.mathstyle)&&void 0!==n?n:"displaystyle",parseMode:null!==(a=null===i||void 0===i?void 0:i.parseMode)&&void 0!==a?a:"math"}),l=[];while(!s.end())l.push(...s.parse());return l}function Fc(e,t,i){var r;const n=new Oc(Ju(e,null),t,{args:null,mathstyle:"displaystyle",parseMode:null!==(r=null===i||void 0===i?void 0:i.parseMode)&&void 0!==r?r:"math"});while(!n.end())n.parse();return n.errors}function Pc(e,t,i){if("object"===typeof e&&"glue"in e)return e;if("object"===typeof e&&"dimension"in e)return{glue:e};if("number"===typeof e)return{glue:{dimension:e}};const r=new Oc(Ju(e),t,{registers:i});return r.scanGlue()}function Vc(e,t,i){if("number"===typeof e)return{dimension:e,unit:"pt"};if("object"===typeof e&&"glue"in e&&(e=e.glue),"object"===typeof e&&"dimension"in e)return e;const r=new Oc(Ju(e),t,{registers:i});return r.scanDimen()}var Uc='.ML__sr-only{clip:rect(0,0,0,0);border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ML__base,.ML__isInline{display:inline-block}.ML__base{border:0;box-sizing:content-box;cursor:text;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;position:relative;text-decoration:none;vertical-align:baseline;visibility:inherit;width:min-content}body.ML__fonts-loading .ML__base{visibility:hidden}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:.5em}.ML__small-delim{font-family:KaTeX_Main}.ML__text{font-family:var(--text-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif);white-space:pre}.ML__cmr{font-family:KaTeX_Main;font-style:normal}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.lcGreek.ML__mathbf{font-family:KaTeX_Math;font-weight:400}.ML__mathbfit{font-family:KaTeX_Math;font-style:italic;font-weight:700}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold,.ML__boldsymbol{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:ultra-condensed}.ML__series_ec{font-stretch:extra-condensed}.ML__series_c{font-stretch:condensed}.ML__series_sc{font-stretch:semi-condensed}.ML__series_sx{font-stretch:semi-expanded}.ML__series_x{font-stretch:expanded}.ML__series_ex{font-stretch:extra-expanded}.ML__series_ux{font-stretch:ultra-expanded}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:transparent}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__highlight{background:#edd1b0;color:#007cb2}.ML__center{text-align:center}.ML__label_padding{padding:0 .5em}.ML__frac-line{min-height:1px;width:100%}.ML__frac-line:after{background:currentColor;box-sizing:content-box;content:"";display:block;margin-top:-.04em;min-height:.04em;transform:translate(0)}.ML__sqrt,.ML__sqrt-sign{display:inline-block}.ML__sqrt-sign{font-family:KaTeX_Main;position:relative}.ML__sqrt-line{display:inline-block;height:.04em;width:100%}.ML__sqrt-line:before{background:currentColor;content:"";display:block;margin-top:-.04em;min-height:.04em;transform:translate(0)}.ML__sqrt-line:after{border-bottom-width:1px;content:" ";display:block;margin-top:-.1em}.ML__sqrt-index{margin-left:.27777778em;margin-right:-.55555556em}.ML__delim-size1{font-family:KaTeX_Size1}.ML__delim-size2{font-family:KaTeX_Size2}.ML__delim-size3{font-family:KaTeX_Size3}.ML__delim-size4{font-family:KaTeX_Size4}.ML__delim-mult .delim-size1>span{font-family:KaTeX_Size1}.ML__delim-mult .delim-size4>span{font-family:KaTeX_Size4}.ML__accent-body>span{font-family:KaTeX_Main;width:0}.ML__accent-vec>span{left:.24em;position:relative}.ML__mathlive{text-rendering:auto;word-wrap:normal;direction:ltr;display:inline-block;font-family:KaTeX_Main,Times New Roman,serif;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant-caps:normal;letter-spacing:normal;line-height:1.2;text-align:left;text-indent:0;text-shadow:none;-webkit-user-select:none;user-select:none;white-space:nowrap;width:min-content;word-spacing:normal}.ML__mathlive .style-wrap{position:relative}.ML__mathlive .left-right,.ML__mathlive .mfrac{display:inline-block}.ML__mathlive .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.ML__mathlive .vlist-r{display:table-row}.ML__mathlive .vlist{display:table-cell;position:relative;vertical-align:bottom}.ML__mathlive .vlist>span{display:block;height:0;position:relative}.ML__mathlive .vlist>span>span{display:inline-block}.ML__mathlive .vlist>span>.pstrut{overflow:hidden;width:0}.ML__mathlive .vlist-t2{margin-right:-2px}.ML__mathlive .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.ML__mathlive .msubsup{text-align:left}.ML__mathlive .negativethinspace{display:inline-block;height:.71em;margin-left:-.16667em}.ML__mathlive .thinspace{display:inline-block;height:.71em;width:.16667em}.ML__mathlive .mediumspace{display:inline-block;height:.71em;width:.22222em}.ML__mathlive .thickspace{display:inline-block;height:.71em;width:.27778em}.ML__mathlive .enspace{display:inline-block;height:.71em;width:.5em}.ML__mathlive .quad{display:inline-block;height:.71em;width:1em}.ML__mathlive .qquad{display:inline-block;height:.71em;width:2em}.ML__mathlive .llap,.ML__mathlive .rlap{display:inline-block;position:relative;width:0}.ML__mathlive .llap>.inner,.ML__mathlive .rlap>.inner{position:absolute}.ML__mathlive .llap>.fix,.ML__mathlive .rlap>.fix{display:inline-block}.ML__mathlive .llap>.inner{right:0}.ML__mathlive .rlap>.inner{left:0}.ML__mathlive .rule{border:0 solid;box-sizing:border-box;display:inline-block;position:relative}.ML__mathlive .overline .overline-line,.ML__mathlive .underline .underline-line{width:100%}.ML__mathlive .overline .overline-line:before,.ML__mathlive .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block}.ML__mathlive .overline .overline-line:after,.ML__mathlive .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block;margin-top:-1px;min-height:thin}.ML__mathlive .stretchy{display:block;left:0;overflow:hidden;position:absolute;width:100%}.ML__mathlive .stretchy:after,.ML__mathlive .stretchy:before{content:""}.ML__mathlive .stretchy svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.ML__mathlive .slice-1-of-2{left:0}.ML__mathlive .slice-1-of-2,.ML__mathlive .slice-2-of-2{display:inline-flex;overflow:hidden;position:absolute;width:50.2%}.ML__mathlive .slice-2-of-2{right:0}.ML__mathlive .slice-1-of-3{display:inline-flex;left:0;overflow:hidden;position:absolute;width:25.1%}.ML__mathlive .slice-2-of-3{display:inline-flex;left:25%;overflow:hidden;position:absolute;width:50%}.ML__mathlive .slice-3-of-3{display:inline-flex;overflow:hidden;position:absolute;right:0;width:25.1%}.ML__mathlive .slice-1-of-1{display:inline-flex;left:0;overflow:hidden;position:absolute;width:100%}.ML__mathlive .nulldelimiter{display:inline-block;width:.12em}.ML__mathlive .op-group{display:inline-block}.ML__mathlive .op-symbol{position:relative}.ML__mathlive .op-symbol.small-op{font-family:KaTeX_Size1}.ML__mathlive .op-symbol.large-op{font-family:KaTeX_Size2}.ML__mathlive .accent>.vlist>span{text-align:center}.ML__mathlive .mtable .vertical-separator{box-sizing:border-box;display:inline-block;min-width:1px}.ML__mathlive .mtable .arraycolsep{display:inline-block}.ML__mathlive .mtable .col-align-m>.vlist-t{text-align:center}.ML__mathlive .mtable .col-align-c>.vlist-t{text-align:center}.ML__mathlive .mtable .col-align-l>.vlist-t{text-align:left}.ML__mathlive .mtable .col-align-r>.vlist-t{text-align:right}.ML__error{background-image:radial-gradient(ellipse at center,#cc0041,transparent 70%);background-position:0 98%;background-repeat:repeat-x;background-size:3px 3px}.ML__composition{background:#fff1c2;color:#000;-webkit-text-decoration:underline var(--caret-color-computed,var(--ML__caret-color));text-decoration:underline var(--caret-color-computed,var(--ML__caret-color))}@media (prefers-color-scheme:dark){.ML__composition{background:#69571c;color:#fff}}.ML__placeholder{color:var(--placeholder-color,var(--ML__placeholder-color));font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;opacity:var(--placeholder-opacity,.4);padding-left:.4ex;padding-right:.4ex}.ML__placeholdercontainer{display:none}.ML__isReadOnly .ML__placeholdercontainer{display:block}';function Kc(e,t,i){var r,n;if(bs(),!t)return null;let a=null!==(r=null===e||void 0===e?void 0:e.getRootNode())&&void 0!==r?r:null===document||void 0===document?void 0:document.head;if(!a)return null;a===document&&(a=document.head);const o=a.querySelector(`style[data-id="${i}"]`);if(o){const e=Number.parseFloat(null!==(n=o.getAttribute("data-refcount"))&&void 0!==n?n:"0");o.dataset.refcount=Number(e+1).toString()}else{const e=document.createElement("style");e.dataset.id=i,e.dataset.refcount="1",e.append(document.createTextNode(t)),a.appendChild(e)}return{release:()=>{var e;const t=document.head.querySelector(`style[data-id="${i}"]`);if(t){const i=Number.parseFloat(null!==(e=t.getAttribute("data-refcount"))&&void 0!==e?e:"0");1===i?t.remove():t.dataset.refcount=Number(i-1).toString()}}}}function Hc(e){let t=0;for(let i=0;ie.map((e=>e.map((e=>e.toJson())))))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType};return 1!==this.arraystretch&&(e.arraystretch=this.arraystretch),this.arraycolsep&&(e.arraycolsep=this.arraycolsep),this.leftDelim&&(e.leftDelim=this.leftDelim),this.rightDelim&&(e.rightDelim=this.rightDelim),void 0!==this.jot&&(e.jot=this.jot),e}branch(e){var t;if(nc(e))return null!==(t=this.array[e[0]][e[1]])&&void 0!==t?t:void 0}get branches(){const e=super.branches;return this.array.forEach(((t,i)=>{this.array[i].forEach(((t,r)=>{this.array[i][r]&&e.push([i,r])}))})),e}createBranch(e){var t;return nc(e)?(this.isDirty=!0,null!==(t=this.branch(e))&&void 0!==t?t:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}removeBranch(e){if(rc(e))return super.removeBranch(e);const t=this.branch(e);return this.array[e[0]][e[1]]=void 0,t.forEach((e=>{e.parent=void 0,e.treeBranch=void 0})),console.assert("first"===t[0].type),t.shift(),this.isDirty=!0,t}get hasChildren(){return this.children.length>0}get children(){const e=[];for(const t of this.array)for(const i of t)if(i)for(const t of i)e.push(...t.children),e.push(t);return[...e,...super.children]}render(e){var t,i,r,n,a;const o=new Jl(e,this.style,this.mathstyleName),s=o.getRegisterAsEm("arrayrulewidth"),l=o.getRegisterAsEm("arraycolsep"),u=o.getRegisterAsEm("doublerulesep"),c=null!==(t=this.arraystretch)&&void 0!==t?t:1;let h="number"===typeof this.arraycolsep?this.arraycolsep:l;if("small"===this.colSeparationType){const t=new Jl(e,void 0,"scriptstyle").scalingFactor;h=t/e.scalingFactor*.2778}const d=c*_l,p=.7*d,m=.3*d;let f=0;const g=[];let v=0;const y=this.array.length;for(let _=0;_0&&(l+=m,a=Math.max(a,l),l=0),void 0!==this.jot&&(a+=this.jot),s.height=n,s.depth=a,f+=n,s.pos=f,f+=a+l,g.push(s)}const b=f/2+El,w=[];for(let _=0;_0&&w.push(new Pu({individualShift:e}))}const x=[];let A=!1,k=!1,S=0,M=!this.leftDelim;const{colFormat:N}=this;for(const _ of N){if("align"in _&&S>=w.length)break;if("align"in _)A?x.push(Wc(2*h)):(k||M)&&x.push(Wc(h)),x.push(new zu(w[S],{classes:"col-align-"+_.align})),S++,A=!0,k=!1,M=!1;else if("gap"in _){if("number"===typeof _.gap)x.push(Wc(_.gap));else{const t=Zc(e,g,b,_.gap);t&&x.push(t)}A=!1,k=!1,M=!1}else if("separator"in _){const e=new zu(null,{classes:"vertical-separator"});e.setStyle("height",f,"em"),e.setStyle("border-right",`${s}em ${_.separator} currentColor`),e.setStyle("vertical-align",-(f-b),"em");let t=0;k?t=u-s:A&&(t=h-s),e.left=t,x.push(e),A=!1,k=!0,M=!1}}A&&!this.rightDelim&&x.push(Wc(h));const z=new zu(x,{classes:"mtable"});if((!this.leftDelim||"."===this.leftDelim)&&(!this.rightDelim||"."===this.rightDelim))return z;const L=z.height,C=z.depth,E=this.bind(e,new zu([this.bind(e,Lc("mopen",null!==(n=this.leftDelim)&&void 0!==n?n:".",L,C,o)),z,this.bind(e,Lc("mclose",null!==(a=this.rightDelim)&&void 0!==a?a:".",L,C,o))],{type:"mord"}));return E?(this.caret&&(E.caret=this.caret),this.attachSupsub(e,{base:E})):null}serialize(e){let t="\\begin{"+this.environmentName+"}";if("array"===this.environmentName){if(t+="{",void 0!==this.colFormat)for(const e of this.colFormat)"align"in e?t+=e.align:"separator"in e&&"solid"===e.separator?t+="|":"separator"in e&&"dashed"===e.separator&&(t+=":");t+="}"}for(let i=0;i0&&(t+=" & "),t=$u([t,ac.serialize(this.array[i][r],e)]);inew Jc(e,t[0],r)});var $c={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var i,r="0",n={};n["parenthesisLevel"]=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");var a=10,o=[];while(1){i!==e?(a=10,i=e):a--;var s=$c.stateMachines[t],l=s.transitions[r]||s.transitions["*"];e:for(var u=0;u0))return o;if(h.revisit||(e=c.remainder),!h.toContinue)break e}}if(a<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var i=0;i":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return $c.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return $c.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return $c.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return $c.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return $c.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return $c.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return $c.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return $c.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return $c.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return $c.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return $c.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return $c.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),t)return{match_:t[0],remainder:e.substr(t[0].length)};var i=$c.patterns.findObserveGroups(e,"","$","$","");return i&&(t=i.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this["amount"](e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,i,r,n,a,o,s,l,u){var c=function(e,t){if("string"===typeof t)return 0!==e.indexOf(t)?null:t;var i=e.match(t);return i?i[0]:null},h=function(e,t,i){var r=0;while(t":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var i;if((e.d||"").match(/^[0-9]+$/)){var r=e.d;e.d=void 0,i=this["output"](e),e.b=r}else i=this["output"](e);return $c.actions["o="](e,t),i},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e["beginsWithBond"]){var i=[];return $c.concatArray(i,this["output"](e)),$c.concatArray(i,$c.actions["bond"](e,t,"-")),i}e.d=t},"- after o/d":function(e,t,i){var r=$c.patterns.match_("orbital",e.o||""),n=$c.patterns.match_("one lowercase greek letter $",e.o||""),a=$c.patterns.match_("one lowercase latin letter $",e.o||""),o=$c.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(r&&""===r.remainder||n||a||o);!s||e.a||e.b||e.p||e.d||e.q||r||!a||(e.o="$"+e.o+"$");var l=[];return s?($c.concatArray(l,this["output"](e)),l.push({type_:"hyphen"})):(r=$c.patterns.match_("digits",e.d||""),i&&r&&""===r.remainder?($c.concatArray(l,$c.actions["d="](e,t)),$c.concatArray(l,this["output"](e))):($c.concatArray(l,this["output"](e)),$c.concatArray(l,$c.actions["bond"](e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e["beginsWithBond"]=!0},"beginsWithBond=false":function(e){e["beginsWithBond"]=!1},"parenthesisLevel++":function(e){e["parenthesisLevel"]++},"parenthesisLevel--":function(e){e["parenthesisLevel"]--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:$c.go(t,"o")}},comma:function(e,t){var i=t.replace(/\s*$/,""),r=i!==t;return r&&0===e["parenthesisLevel"]?{type_:"comma enumeration L",p1:i}:{type_:"comma enumeration M",p1:i}},output:function(e,t,i){var r,n,a;e.r?(n="M"===e.rdt?$c.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:$c.go(e.rd),a="M"===e.rqt?$c.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:$c.go(e.rq),r={type_:"arrow",r:e.r,rd:n,rq:a}):(r=[],(e.a||e.b||e.p||e.o||e.q||e.d||i)&&(e.sb&&r.push({type_:"entitySkip"}),e.o||e.q||e.d||e.b||e.p||2===i?e.o||e.q||e.d||!e.b&&!e.p?e.o&&"kv"===e.dType&&$c.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&"kv"===e.dType&&!e.q&&(e.dType=void 0):(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):(e.o=e.a,e.a=void 0),r.push({type_:"chemfive",a:$c.go(e.a,"a"),b:$c.go(e.b,"bd"),p:$c.go(e.p,"pq"),o:$c.go(e.o,"o"),q:$c.go(e.q,"pq"),d:$c.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType})));for(var o in e)"parenthesisLevel"!==o&&"beginsWithBond"!==o&&delete e[o];return r},"oxidation-output":function(e,t){var i=["{"];return $c.concatArray(i,$c.go(t,"oxidation")),i.push("}"),i},"frac-output":function(e,t){return{type_:"frac-ce",p1:$c.go(t[0]),p2:$c.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:$c.go(t[0]),p2:$c.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:$c.go(t[0]),p2:$c.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:$c.go(t[0]),p2:$c.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:$c.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,i){return{type_:"operator",kind_:i||t}}}},a:{transitions:$c.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:$c.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:$c.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var i in e)delete e[i];return t}}}},pq:{transitions:$c.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:$c.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:$c.go(t[1],"pq")}}}},bd:{transitions:$c.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:$c.go(t[1],"bd")}}}},oxidation:{transitions:$c.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:$c.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"tex-math tight":{transitions:$c.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"9,9":{transitions:$c.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:$c.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),t[1]&&($c.concatArray(i,$c.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?$c.concatArray(i,$c.go(t[2],"pu-9,9")):i.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),"e"===t[3]||"*"===t[3].substr(0,1)?i.push({type_:"cdot"}):i.push({type_:"times"}))),t[3]&&i.push("10^{"+t[5]+"}"),i},"number^":function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),$c.concatArray(i,$c.go(t[1],"pu-9,9")),i.push("^{"+t[2]+"}"),i},operator:function(e,t,i){return{type_:"operator",kind_:i||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,i=$c.patterns.match_("{(...)}",e.d||"");i&&""===i.remainder&&(e.d=i.match_);var r=$c.patterns.match_("{(...)}",e.q||"");if(r&&""===r.remainder&&(e.q=r.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var n={d:$c.go(e.d,"pu"),q:$c.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:n.d,p2:n.q}:(t=n.d,n.d.length>1||n.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),$c.concatArray(t,n.q))}else t=$c.go(e.d,"pu-2");for(var a in e)delete e[a];return t}}},"pu-2":{transitions:$c.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var i=$c.patterns.match_("{(...)}",e.rm||"");t=i&&""===i.remainder?$c.go(i.match_,"pu"):{type_:"rm",p1:e.rm}}for(var r in e)delete e[r];return t}}},"pu-9,9":{transitions:$c.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var i=e.text_.length%3;0===i&&(i=3);for(var r=e.text_.length-3;r>0;r-=3)t.push(e.text_.substr(r,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,i)),t.reverse()}else t.push(e.text_);for(var n in e)delete e[n];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var i=e.text_.length-3,r=0;r":return"rightarrow";case"→":return"rightarrow";case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":return"rightleftharpoons";case"⇌":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};class rh extends ac{constructor(e,t,i,r){super("delim",i,{command:e,style:null===r||void 0===r?void 0:r.style}),this.value=t,this.size=null===r||void 0===r?void 0:r.size}static fromJson(e,t){return new rh(e.command,e.delim,t,e)}toJson(){return{...super.toJson(),delim:this.value,size:this.size}}render(e){const t=new zu(null);return t.delim=this.value,t}serialize(e){return 1===this.value.length?this.command+this.value:`${this.command}{${this.value}}`}}class nh extends ac{constructor(e,t,i,r){super("sizeddelim",i,{command:e,style:r.style}),this.value=t,this.delimClass=r.delimClass,this.size=r.size}static fromJson(e,t){return new nh(e.command,e.delim,t,e)}toJson(){return{...super.toJson(),delim:this.value,size:this.size,delimClass:this.delimClass}}render(e){let t=xc(this.value,this.size,e,{classes:this.delimClass});return t?(t=this.bind(e,t),this.caret&&(t.caret=this.caret),t):null}serialize(e){return 1===this.value.length?this.command+this.value:`${this.command}{${this.value}}`}}class ah extends ac{constructor(e,t,i,r,n){super("enclose",r,{command:e,style:n.style}),this.body=t,this.backgroundcolor=n.backgroundcolor,i.updiagonalarrow&&(i.updiagonalstrike=!1),i.box&&(i.left=!1,i.right=!1,i.bottom=!1,i.top=!1),this.notation=i,this.shadow=n.shadow,this.strokeWidth=n.strokeWidth,this.strokeStyle=n.strokeStyle,this.svgStrokeStyle=n.svgStrokeStyle,this.strokeColor=n.strokeColor,this.borderStyle=n.borderStyle,this.padding=n.padding,this.captureSelection=!0}static fromJson(e,t){return new ah(e.command,e.body,e.notation,t,e)}toJson(){const e={};return this.notation.downdiagonalstrike&&(e.downdiagonalstrike=!0),this.notation.updiagonalstrike&&(e.downdiagonalstrike=!0),this.notation.verticalstrike&&(e.downdiagonalstrike=!0),this.notation.horizontalstrike&&(e.downdiagonalstrike=!0),this.notation.updiagonalarrow&&(e.downdiagonalstrike=!0),this.notation.right&&(e.downdiagonalstrike=!0),this.notation.bottom&&(e.downdiagonalstrike=!0),this.notation.left&&(e.downdiagonalstrike=!0),this.notation.top&&(e.downdiagonalstrike=!0),this.notation.circle&&(e.downdiagonalstrike=!0),this.notation.roundedbox&&(e.downdiagonalstrike=!0),this.notation.madruwb&&(e.downdiagonalstrike=!0),this.notation.actuarial&&(e.downdiagonalstrike=!0),this.notation.box&&(e.downdiagonalstrike=!0),{...super.toJson(),notation:e,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding}}serialize(e){var t;let i=null!==(t=this.command)&&void 0!==t?t:"";if("\\enclose"===this.command){i+="{"+Object.keys(this.notation).join(" ")+"}";let e="",t="";this.backgroundcolor&&"transparent"!==this.backgroundcolor&&(e+=t+'mathbackground="'+this.backgroundcolor+'"',t=","),this.shadow&&"auto"!==this.shadow&&(e+=t+'shadow="'+this.shadow+'"',t=","),this.strokeWidth||"solid"!==this.strokeStyle?(e+=t+this.borderStyle,t=","):this.strokeColor&&"currentColor"!==this.strokeColor&&(e+=t+'mathcolor="'+this.strokeColor+'"',t=","),e&&(i+=`[${e}]`)}return i+=`{${this.bodyToLatex(e)}}`,i}render(e){var t;const i=new Jl(e,this.style),r=ac.createBox(i,this.body);if(!r)return null;const n=null!==(t=Zl(this.padding&&"auto"!==this.padding?Vc(this.padding,{...this.context,registers:e.registers}):i.getRegisterAsDimension("fboxsep")))&&void 0!==t?t:0,a=new zu(null,{classes:"ML__notation"});a.setStyle("position","absolute"),a.setStyle("height",r.height+r.depth+2*n,"em"),a.height=r.height+n,a.depth=r.depth+n,0!==n?a.setStyle("width",`calc(100% + ${2*n}em)`):a.setStyle("width","100%"),a.setStyle("top",-r.height+2*n,"em"),a.setStyle("left",-n,"em"),a.setStyle("z-index","-1"),a.setStyle("box-sizing","border-box"),this.backgroundcolor&&a.setStyle("background-color",this.backgroundcolor),this.notation.box&&a.setStyle("border",this.borderStyle),this.notation.actuarial&&(a.setStyle("border-top",this.borderStyle),a.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(a.setStyle("border-bottom",this.borderStyle),a.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(a.setStyle("border-radius",(r.height+r.depth)/2,"em"),a.setStyle("border",this.borderStyle)),this.notation.circle&&(a.setStyle("border-radius","50%"),a.setStyle("border",this.borderStyle)),this.notation.top&&a.setStyle("border-top",this.borderStyle),this.notation.left&&a.setStyle("border-left",this.borderStyle),this.notation.right&&a.setStyle("border-right",this.borderStyle),this.notation.bottom&&a.setStyle("border-bottom",this.borderStyle);let o="";if(this.notation.horizontalstrike&&(o+='0?3*u:7*u,h=n.denom1):(u>0?(c=n.num2,d=u):(c=n.num3,d=3*u),h=n.denom2);const p=[];this.isSelected&&p.push("ML__selected");const m=o.depth,f=l.height;let g;if(u<=0){const e=c-m-(f-h);enew sh(e,t))),this.skipBoundary=!1}static fromJson(e,t){return new lh("",t)}toJson(){return super.toJson()}render(e){const t=ac.createBox(e,this.body,{newList:!0});return t?(this.caret&&(t.caret=this.caret),this.bind(e,t)):null}serialize(e){var t,i;return null!==(i=null===(t=this.body)||void 0===t?void 0:t.map((e=>e.value)).join(""))&&void 0!==i?i:""}}class uh extends ac{constructor(e,t,i,r){super("line",i,{command:e,style:r.style}),this.skipBoundary=!0,this.body=t,this.position=r.position}static fromJson(e,t){return new uh(e.command,e.body,t,e)}toJson(){return{...super.toJson(),position:this.position}}render(e){const t=new Jl(e,this.style,"cramp"),i=ac.createBox(t,this.body);if(!i)return null;const r=t.metrics.defaultRuleThickness/t.scalingFactor,n=new zu(null,{classes:this.position+"-line"});let a;return n.height=r,n.maxFontSize=1.125*r*t.scalingFactor,a="overline"===this.position?new Pu({shift:0,children:[{box:i},3*r,{box:n},r]}):new Pu({top:i.height,children:[r,{box:n},3*r,{box:i}]}),this.caret&&(a.caret=this.caret),new zu(a,{classes:this.position,type:"mord"})}}class ch extends ac{constructor(e,t,i,r){var n,a,o,s;super(null!==(n=r.type)&&void 0!==n?n:"mop",i,{command:e,style:r.style,isFunction:null===r||void 0===r?void 0:r.isFunction}),"string"===typeof t?this.value=t:this.body=t,this.captureSelection=null!==(a=r.captureSelection)&&void 0!==a&&a,this.hasArgument=null!==(o=r.hasArgument)&&void 0!==o&&o,this.variant=null===r||void 0===r?void 0:r.variant,this.variantStyle=null===r||void 0===r?void 0:r.variantStyle,this.subsupPlacement=null===r||void 0===r?void 0:r.limits,this.isExtensibleSymbol=null!==(s=null===r||void 0===r?void 0:r.isExtensibleSymbol)&&void 0!==s&&s}static fromJson(e,t){return new ch(e.command,e.body?e.body:e.value,t,e)}toJson(){const e=super.toJson();return this.hasArgument&&(e.hasArgument=!0),this.variant&&(e.variant=this.variant),this.variantStyle&&(e.variantStyle=this.variantStyle),this.subsupPlacement&&(e.limits=this.subsupPlacement),this.isExtensibleSymbol&&(e.isExtensibleSymbol=!0),this.value&&(e.symbol=this.value),e}render(e){var t;let i,r=0,n=0;if(this.isExtensibleSymbol){const t=e.isDisplayStyle&&"\\smallint"!==this.value;if(i=new zu(this.value,{fontFamily:t?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(t?"large-op":"small-op"),type:"mop",maxFontSize:e.scalingFactor}),!i)return null;i.right=i.italic,r=(i.height-i.depth)/2-El*e.scalingFactor,n=i.italic,i.setStyle("color",this.style.color),i.setStyle("background-color",this.style.backgroundColor)}else if(this.body){if(i=ac.createBox(e,this.body,{newList:!0}),!i)return null;i.setStyle("color",this.style.color),i.setStyle("background-color",this.style.backgroundColor)}else console.assert("mop"===this.type),i=new zu(this.value,{type:"mop",mode:"math",maxFontSize:e.scalingFactor,style:{color:this.style.color,backgroundColor:this.style.backgroundColor,letterShapeStyle:e.letterShapeStyle,variant:this.variant,variantStyle:this.variantStyle}});this.isExtensibleSymbol&&i.setTop(r);let a=i;if(this.superscript||this.subscript){const o=null!==(t=this.subsupPlacement)&&void 0!==t?t:"auto";a="over-under"===o||"auto"===o&&e.isDisplayStyle?this.attachLimits(e,{base:i,baseShift:r,slant:n}):this.attachSupsub(e,{base:i})}return this.caret&&(a.caret=this.caret),new zu(this.bind(e,a),{type:"mop",classes:"op-group"+(this.isSelected?" ML__selected":"")})}serialize(e){if("​"===this.value)return this.supsubToLatex(e);const t=[];return t.push(this.command),this.hasArgument&&t.push(`{${this.bodyToLatex(e)}}`),this.explicitSubsupPlacement&&("over-under"===this.subsupPlacement&&t.push("\\limits"),"adjacent"===this.subsupPlacement&&t.push("\\nolimits"),"auto"===this.subsupPlacement&&t.push("\\displaylimits")),t.push(this.supsubToLatex(e)),$u(t)}}class hh extends ac{constructor(e,t,i,r){var n,a;super("overlap",i,{command:e,style:null===r||void 0===r?void 0:r.style}),this.skipBoundary=!0,this.body="string"===typeof t?[new ac("mord",i,{value:t})]:t,this.align=null!==(n=null===r||void 0===r?void 0:r.align)&&void 0!==n?n:"left",this.boxType=null!==(a=null===r||void 0===r?void 0:r.boxType)&&void 0!==a?a:"mord"}static fromJson(e,t){return new hh(e.command,e.body,t,e)}toJson(){const e={};return this.align&&(e.align=this.align),this.boxType&&(e.boxType=this.boxType),{...super.toJson(),...e}}render(e){const t=ac.createBox(e,this.body,{classes:"inner"});return t?(this.caret&&(t.caret=this.caret),this.bind(e,new zu([t,new zu(null,{classes:"fix"})],{classes:"left"===this.align?"llap":"rlap",type:this.boxType}))):null}}class dh extends ac{constructor(e,t,i){var r,n,a,o;super("overunder",t,{command:e,serialize:i.serialize,style:i.style}),this.skipBoundary=null===(r=i.skipBoundary)||void 0===r||r,this.subsupPlacement=i.supsubPlacement,this.body=i.body,this.svgAbove=i.svgAbove,this.svgBelow=i.svgBelow,this.svgBody=i.svgBody,this.above=i.above,this.below=i.below,this.boxType=null!==(n=i.boxType)&&void 0!==n?n:"mord",this.paddedBody=null!==(a=i.paddedBody)&&void 0!==a&&a,this.paddedLabels=null!==(o=i.paddedLabels)&&void 0!==o&&o}static fromJson(e,t){return new dh(e.command,t,e)}toJson(){const e={};return this.skipBoundary||(e.skipBoundary=!1),this.subsupPlacement&&(e.subsupPlacement=this.subsupPlacement),this.svgAbove&&(e.svgAbove=this.svgAbove),this.svgBelow&&(e.svgBelow=this.svgBelow),this.svgBody&&(e.svgBody=this.svgBody),"mord"!==this.boxType&&(e.boxType=this.boxType),this.paddedBody&&(e.paddedBody=!0),this.paddedLabels&&(e.paddedLabels=!0),{...super.toJson(),...e}}render(e){let t=this.svgBody?Ou(this.svgBody):ac.createBox(e,this.body,{newList:!0});const i=new Jl(e,this.style,"scriptstyle");let r=null;this.svgAbove?r=Ou(this.svgAbove):this.above&&(r=ac.createBox(i,this.above,{newList:!0}));let n=null;this.svgBelow?n=Ou(this.svgBelow):this.below&&(n=ac.createBox(i,this.below,{newList:!0})),this.paddedBody&&(t=new zu([Cc(e,"mopen"),t,Cc(e,"mclose")],{newList:!0}));let a=ph(e,{base:t,above:r,below:n,type:"mbin"===this.boxType||"mrel"===this.boxType?this.boxType:"mord",paddedAboveBelow:this.paddedLabels});return a?(a="over-under"===this.subsupPlacement?this.attachLimits(e,{base:a,type:a.type}):this.attachSupsub(e,{base:a}),this.caret&&(a.caret=this.caret),this.bind(e,a)):null}}function ph(e,t){if(!t.base)return null;if(!t.above&&!t.below){const e=new zu(t.base,{type:t.type});return e.setStyle("position","relative"),e}let i=0;t.above&&(i=-t.above.depth+e.metrics.bigOpSpacing2);let r=null;const n=t.base,a=0,o=["ML__center"];if(t.paddedAboveBelow&&o.push("ML__label_padding"),t.below&&t.above){const s=e.metrics.bigOpSpacing5+t.below.height+t.below.depth+n.depth+a;r=new Pu({bottom:s,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:o},{box:n,classes:["ML__center"]},i,{box:t.above,classes:o},e.metrics.bigOpSpacing5]})}else t.below?r=new Pu({top:n.height-a,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:o},{box:n,classes:["ML__center"]}]}):t.above&&(r=new Pu({bottom:n.depth+a,children:[{box:n,classes:["ML__center"]},i,{box:t.above,classes:o},e.metrics.bigOpSpacing5]}));return new zu(r,{type:t.type})}class mh extends ac{constructor(e,t,i,r){var n,a,o,s;super("phantom",i,{command:e,style:r.style}),this.captureSelection=!0,this.body=t,this.isInvisible=null!==(n=r.isInvisible)&&void 0!==n&&n,this.smashDepth=null!==(a=r.smashDepth)&&void 0!==a&&a,this.smashHeight=null!==(o=r.smashHeight)&&void 0!==o&&o,this.smashWidth=null!==(s=r.smashWidth)&&void 0!==s&&s}static fromJson(e,t){return new mh(e.command,e.body,t,e)}toJson(){const e={};return this.isInvisible&&(e.isInvisible=!0),this.smashDepth&&(e.smashDepth=!0),this.smashHeight&&(e.smashHeight=!0),this.smashWidth&&(e.smashWidth=!0),{...super.toJson(),...e}}render(e){const t=new Jl(e,{isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),ac.createBox(t,this.body,{classes:"inner"});const i=ac.createBox(this.isInvisible?t:e,this.body);if(!i)return null;if(this.smashWidth){const t=new zu(null,{classes:"fix"});return new zu([i,t],{classes:"rlap"}).wrap(e)}if(!this.smashHeight&&!this.smashDepth)return i;if(this.smashHeight&&(i.height=0),this.smashDepth&&(i.depth=0),i.children)for(const r of i.children)this.smashHeight&&(r.height=0),this.smashDepth&&(r.depth=0);return new Pu({firstBaseline:[{box:i}]},{type:"mord"}).wrap(e)}}class fh extends ac{constructor(e,t,i){var r;super("rule",t,{command:e,style:i.style}),this.shift=null!==(r=i.shift)&&void 0!==r?r:{dimension:0},this.height=i.height,this.width=i.width}static fromJson(e,t){return new fh(e.command,t,e)}toJson(){const e={height:this.height,width:this.width};return this.shift&&(e.shift=this.shift),{...super.toJson(),...e}}render(e){const t=new Jl(e,this.style,"textstyle"),i=Zl(this.shift),r=Zl(this.width),n=Zl(this.height),a=new zu(null,{classes:"rule",type:"mord"});return a.setStyle("border-right-width",r,"em"),a.setStyle("border-top-width",n,"em"),a.setStyle("border-color",this.style.color),a.setStyle("vertical-align",i,"em"),this.isSelected&&a.setStyle("opacity","50%"),a.width=r,a.height=n+i,a.depth=-i,this.bind(e,a),this.caret&&(a.caret=this.caret),a.wrap(t)}serialize(e){var t;let i=null!==(t=this.command)&&void 0!==t?t:"";return this.shift&&(i+=`[${Xl(this.shift)}]`),i+=`{${Xl(this.width)}}{${Xl(this.height)}}`,i}}class gh extends ac{constructor(e,t,i){var r;super("surd",t,{command:e,mode:null!==(r=i.mode)&&void 0!==r?r:"math",style:i.style,displayContainsHighlight:!0}),this.body=i.body,this.above=i.index}static fromJson(e,t){return new gh(e.command,t,{...e,index:e.above})}toJson(){return super.toJson()}serialize(e){let t="";return this.above&&(t+=`[${this.aboveToLatex(e)}]`),t+=`{${this.bodyToLatex(e)}}`,this.command+t}render(e){var t;const i=new Jl(e,this.style,"cramp"),r=null!==(t=ac.createBox(i,this.body,{style:this.style,newList:!0}))&&void 0!==t?t:new zu(null),n=i.scalingFactor,a=i.metrics.defaultRuleThickness/n,o=e.isDisplayStyle?Tl:a,s=new zu(null,{classes:"ML__sqrt-line",style:this.style,height:a});let l=n*(a+o/4);const u=Math.max(2*n*o,r.height+r.depth),c=u+l+a,h=new Jl(e,this.style),d=this.isSelected?" ML__selected":"",p=this.bind(h,new zu(zc("","\\surd",c,!1,h,{classes:d}),{classes:"ML__sqrt-sign"+d,style:this.style}));if(!p)return null;const m=p.height+p.depth-a;m>r.height+r.depth+l&&(l=(l+m-(r.height+r.depth))/2),p.setTop(p.height-r.height-l);const f=this.bind(e,new Pu({firstBaseline:[{box:new zu(r)},l-2*a,{box:s},a]}).wrap(e)),g=ac.createBox(new Jl(e,this.style,"scriptscriptstyle"),this.above,{style:this.style,newList:!0});if(!g){const t=new zu([p,f],{classes:this.containsCaret?"ML__contains-caret":"",type:"mord"});return this.caret&&(t.caret=this.caret),this.bind(e,t.wrap(e))}const v=new Pu({shift:-.6*(Math.max(p.height,f.height)-Math.max(p.depth,f.depth)),children:[{box:g}]}),y=new zu([new zu(v,{classes:"ML__sqrt-index"}),p,f],{type:"mord",classes:this.containsCaret?"ML__contains-caret":""});return y.height=p.height,y.depth=p.depth,this.caret&&(y.caret=this.caret),this.bind(e,y.wrap(e))}}function vh(e,t){if(vs(e))return e.map((e=>vh(e,t)));e={...e};for(const n of ic)e[n]&&(e[n]=vh(e[n],t));e.array&&(e.array=vh(e.array,t));const i=e.type;let r;"accent"===i&&(r=Gc.fromJson(e,t)),"array"===i&&(r=Qc.fromJson(e,t)),"box"===i&&(r=Yc.fromJson(e,t)),"composition"===i&&(r=Xc.fromJson(e,t)),"chem"===i&&(r=Jc.fromJson(e,t)),"delim"===i&&(r=rh.fromJson(e,t)),"enclose"===i&&(r=ah.fromJson(e,t)),"error"===i&&(r=Bc.fromJson(e,t)),"genfrac"===i&&(r=oh.fromJson(e,t)),"group"===i&&(r=uc.fromJson(e,t)),"latex"===i&&(r=sh.fromJson(e,t)),"latexgroup"===i&&(r=lh.fromJson(e,t)),"leftright"===i&&(r=Ec.fromJson(e,t)),"line"===i&&(r=uh.fromJson(e,t)),"macro"===i&&(r=Ic.fromJson(e,t)),"msubsup"===i&&(r=_c.fromJson(e,t)),"overlap"===i&&(r=hh.fromJson(e,t)),"overunder"===i&&(r=dh.fromJson(e,t)),"placeholder"===i&&(e.defaultValue&&(e.defaultValue=vh(e.defaultValue,t)),r=Tc.fromJson(e,t)),"phantom"===i&&(r=mh.fromJson(e,t)),"rule"===i&&(r=fh.fromJson(e,t)),"sizeddelim"===i&&(r=nh.fromJson(e,t)),"spacing"===i&&(r=cc.fromJson(e,t)),"surd"===i&&(r=gh.fromJson(e,t)),"text"===i&&(r=qc.fromJson(e,t)),"mop"===i&&(r=ch.fromJson(e,t)),r||(r=ac.fromJson(e,t));for(const n of ic)e[n]&&r.setChildren(e[n],n);return void 0!==e.verbatimLatex&&(r.verbatimLatex=e.verbatimLatex),e.subsupPlacement&&(r.subsupPlacement=e.subsupPlacement),e.explicitSubsupPlacement&&(r.explicitSubsupPlacement=!0),e.isFunction&&(r.isFunction=!0),e.isExtensibleSymbol&&(r.isExtensibleSymbol=!0),e.skipBoundary&&(r.skipBoundary=!0),e.captureSelection&&(r.captureSelection=!0),r}function yh(){const e=String((new Error).stack).replace(/^Error.*\n/,"").split("\n");if(0===e.length)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${(new Error).stack}").`),"";let t=e[1],i=t.match(/http.*\.ts[\?:]/);return i&&(t=e[2]),i=t.match(/(https?:.*):[0-9]+:[0-9]+/),i||(i=t.match(/at (.*(\.ts))[\?:]/),i||(i=t.match(/at (.*(\.mjs|\.js))[\?:]/))),i?i[1]:(console.error(e),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${t}").`),"")}let bh=null;function wh(e){if(null===bh)try{const e=new XMLHttpRequest;e.open("HEAD",xh,!1),e.send(null),200===e.status&&(bh=e.responseURL)}catch(t){console.error(`Invalid URL "${e}" (relative to "${xh}")`)}return bh?new URL(e,bh).href:""}const xh=(null===(th=null===(eh=null===globalThis||void 0===globalThis?void 0:globalThis.document)||void 0===eh?void 0:eh.currentScript)||void 0===th?void 0:th.src)||yh();function Ah(e,t,i={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,i)}async function kh(e){var t;if(!ys()||document.body.classList.contains("ML__fonts-loading"))return;const i=null!==(t=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))&&void 0!==t&&t;if(!i&&(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document)){const t=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],i=Array.from(document.fonts).map((e=>e.family));if(t.every((e=>i.includes(e))))return;const n=wh(null!==e&&void 0!==e?e:"./fonts");if(!n)return;document.body.classList.add("ML__fonts-loading");const a=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular",{style:"italic"}],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map((e=>Ah(e[0].replace(/-[a-zA-Z]+$/,""),n+"/"+e[0],e[1])));try{const e=await Promise.all(a.map((e=>{try{return e.load()}catch{}})));e.forEach((e=>document.fonts.add(e)))}catch(r){console.error(`The mathlive fonts could not be loaded from "${n}"`,{cause:r}),document.body.classList.add("ML__fonts-did-not-load")}document.body.classList.remove("ML__fonts-loading")}}Js("ensuremath","{:math}",{createAtom:(e,t,i,r)=>new uc(t[0],r,{mode:"math",latexOpen:"\\ensuremath{",latexClose:"}",style:i})}),Js("color","{:string}",{applyStyle:(e,t,i)=>{var r,n;const a=t[0];return{verbatimColor:t[0],color:null!==(n=null===(r=i.colorMap)||void 0===r?void 0:r.call(i,a))&&void 0!==n?n:a}}}),Js("textcolor","{:string}{content:auto*}",{applyStyle:(e,t,i)=>{var r,n;const a=t[0];return{verbatimColor:a,color:null!==(n=null===(r=i.colorMap)||void 0===r?void 0:r.call(i,a))&&void 0!==n?n:a}}}),Js("boxed","{content:math}",{createAtom:(e,t,i,r)=>new Yc(e,t[0],r,{framecolor:"black",style:i})}),Js("colorbox","{:string}{content:auto*}",{applyMode:"text",applyStyle:(e,t,i)=>{var r,n;const a=t[0];return{verbatimBackgroundColor:t[0],backgroundColor:null!==(n=null===(r=i.backgroundColorMap)||void 0===r?void 0:r.call(i,a))&&void 0!==n?n:a}}}),Js("fcolorbox","{frame-color:string}{background-color:string}{content:auto}",{applyMode:"text",createAtom:(e,t,i,r)=>{var n,a,o,s;const l=t[0],u=t[1];return new Yc(e,t[2],r,{verbatimFramecolor:l,framecolor:null!==(a=null===(n=r.colorMap)||void 0===n?void 0:n.call(r,l))&&void 0!==a?a:l,verbatimBackgroundcolor:t[1],backgroundcolor:null!==(s=null===(o=r.backgroundColorMap)||void 0===o?void 0:o.call(r,u))&&void 0!==s?s:u,style:i,serialize:(e,t)=>{var i,r;return`${e.command}{${null!==(i=e.verbatimFramecolor)&&void 0!==i?i:e.framecolor}{${null!==(r=e.verbatimBackgroundcolor)&&void 0!==r?r:e.backgroundcolor}}{${e.bodyToLatex(t)}}`}})}}),Js("bbox","[:bbox]{body:auto}",{createAtom:(e,t,i,r)=>{if(t[0]){const n=t[0];return new Yc(e,t[1],r,{padding:n.padding,border:n.border,backgroundcolor:n.backgroundcolor,style:i,serialize:(t,i)=>{var r;let n=e;if(Number.isFinite(t.padding)||void 0!==t.border||void 0!==t.backgroundcolor){const e=[];t.padding&&e.push(t.padding),t.border&&e.push(`border: ${t.border}`),(t.verbatimBackgroundcolor||t.backgroundcolor)&&e.push(null!==(r=t.verbatimBackgroundcolor)&&void 0!==r?r:t.backgroundcolor),n+=`[${e.join(",")}]`}return n+`{${t.bodyToLatex(i)}}`}})}return new Yc(e,t[1],r,{style:i})}}),Js(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:(e,t,i,r)=>new uc(t[0],r,{latexOpen:`{${e} `,latexClose:"}",style:i,mathstyleName:e.slice(1)})}),Js(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:(e,t)=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[e]})}),Js("fontseries","{:string}",{ifMode:"text",applyStyle:(e,t)=>({fontSeries:t[0]})}),Js("fontshape","{:string}",{ifMode:"text",applyStyle:(e,t)=>({fontShape:t[0]})}),Js("fontfamily","{:string}",{ifMode:"text",applyStyle:(e,t)=>({fontFamily:t[0]})}),Js("selectfont","",{ifMode:"text",applyStyle:(e,t)=>({})}),Js("bf","",{applyStyle:(e,t)=>({fontSeries:"b",fontShape:"n",fontFamily:"cmr"})}),Js(["boldsymbol","bm"],"{:math*}",{applyMode:"math",createAtom:(e,t,i,r)=>new uc(t[0],r,{latexOpen:`${e}{`,latexClose:"}",style:i,customClass:"ML__boldsymbol"})}),Js("bold","{:math*}",{applyMode:"math",applyStyle:(e,t)=>({variantStyle:"bold"})}),Js("bfseries","",{applyMode:"text",applyStyle:(e,t)=>({fontSeries:"b"})}),Js("mdseries","",{applyMode:"text",applyStyle:(e,t)=>({fontSeries:"m"})}),Js("upshape","",{applyMode:"text",applyStyle:(e,t)=>({fontShape:"n"})}),Js("slshape","",{applyMode:"text",applyStyle:(e,t)=>({fontShape:"sl"})}),Js("scshape","",{applyMode:"text",applyStyle:(e,t)=>({fontShape:"sc"})}),Js("textbf","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontSeries:"b"})}),Js("textmd","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontSeries:"m"})}),Js("textup","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontShape:"n"})}),Js("textnormal","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontShape:"n",fontSeries:"m"})}),Js("textsl","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontShape:"sl"})}),Js("textit","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontShape:"it"})}),Js("textsc","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontShape:"sc"})}),Js("textrm","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontFamily:"roman"})}),Js("textsf","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontFamily:"sans-serif"})}),Js("texttt","{:text*}",{applyMode:"text",applyStyle:(e,t)=>({fontFamily:"monospace"})}),Js("mathbf","{:math*}",{applyMode:"math",applyStyle:(e,t)=>({variant:"normal",variantStyle:"bold"})}),Js("mathit","{:math*}",{applyMode:"math",applyStyle:(e,t)=>({variant:"main",variantStyle:"italic"})}),Js("mathnormal","{:math*}",{applyMode:"math",applyStyle:(e,t)=>({variant:"normal",variantStyle:"italic"})}),Js("mathbfit","{:math*}",{applyMode:"math",applyStyle:(e,t)=>({variant:"main",variantStyle:"bolditalic"})}),Js("mathrm","{:math*}",{applyMode:"math",applyStyle:(e,t)=>({variant:"normal",variantStyle:"up"})}),Js("mathsf","{:math*}",{applyMode:"math",applyStyle:(e,t)=>({variant:"sans-serif",variantStyle:"up"})}),Js("mathtt","{:math*}",{applyMode:"math",applyStyle:(e,t)=>({variant:"monospace",variantStyle:"up"})}),Js("it","",{applyStyle:(e,t)=>({fontSeries:"m",fontShape:"it",fontFamily:"cmr",variantStyle:"italic"})}),Js("rmfamily","",{applyStyle:(e,t)=>({fontFamily:"roman"})}),Js("sffamily","",{applyStyle:(e,t)=>({fontFamily:"sans-serif"})}),Js("ttfamily","",{applyStyle:(e,t)=>({fontFamily:"monospace"})}),Js(["Bbb","mathbb"],"{:math*}",{applyStyle:(e,t)=>({variant:"double-struck",variantStyle:"up"})}),Js(["frak","mathfrak"],"{:math*}",{applyStyle:(e,t)=>({variant:"fraktur",variantStyle:"up"})}),Js("mathcal","{:math*}",{applyStyle:(e,t)=>({variant:"calligraphic",variantStyle:"up"})}),Js("mathscr","{:math*}",{applyStyle:(e,t)=>({variant:"script",variantStyle:"up"})}),Js("mbox","{:text}",{ifMode:"math",createAtom:(e,t,i,r)=>new uc(t[0],r,{changeMode:!0,style:i,mode:"text",command:e,serialize:(e,t)=>`\\mbox{${e.bodyToLatex({...t,skipModeCommand:!0})}}`})}),Js("text","{:text}",{ifMode:"math",applyMode:"text"}),Js("class","{name:string}{content:auto*}",{createAtom:(e,t,i,r)=>new uc(t[1],r,{customClass:t[0],style:i})}),Js("cssId","{id:string}{content:auto}",{createAtom:(e,t,i,r)=>new uc(t[1],r,{cssId:t[0],style:i})}),Js("htmlData","{data:string}{content:auto}",{createAtom:(e,t,i,r)=>new uc(t[1],r,{htmlData:t[0],style:i})}),Js("htmlStyle","{data:string}{content:auto}",{createAtom:(e,t,i,r)=>new uc(t[1],r,{htmlStyle:t[0],style:i})}),Js("em","{:auto*}",{createAtom:(e,t,i,r)=>new uc(t[0],r,{latexOpen:"\\em",latexClose:"",customClass:"ML__emph",style:i})}),Js("emph","{:auto}",{createAtom:(e,t,i,r)=>new uc(t[0],r,{latexOpen:"\\emph{",latexClose:"}",customClass:"ML__emph",style:i})});const Sh={"\\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}};Js(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:(e,t,i,r)=>new nh(e,t[0],r,{size:Sh[e].size,delimClass:Sh[e].mclass,style:i})}),Js(["hspace","hspace*"],"{width:glue}",{createAtom:(e,t,i,r)=>{var n;return new cc(e,i,r,null!==(n=t[0])&&void 0!==n?n:{glue:{dimension:0}})}}),Js("mathop","{:auto}",{createAtom:(e,t,i,r)=>new ch(e,t[0],r,{type:"mop",captureSelection:!0,limits:"over-under",isFunction:!0,hasArgument:!0,style:i})}),Js(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:(e,t,i,r)=>new ch(e,t[0],r,{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e],captureSelection:!0,hasArgument:!0,style:i})}),Js(["operatorname","operatorname*"],"{operator:math}",{createAtom:(e,t,i,r)=>{const n=new ch(e,t[0],r,{isFunction:!0,hasArgument:!0,limits:"\\operatorname"===e?"adjacent":"over-under",style:i});return n.captureSelection=!0,n.body&&n.body.forEach((e=>{var t;"first"!==e.type&&(e.type="mord",e.value=null!==(t={"∗":"*","−":"-"}[e.value])&&void 0!==t?t:e.value,e.isFunction=!1,e.style.variant||e.style.variantStyle||(e.style.variant="main",e.style.variantStyle="up"))})),n}});class Mh extends ac{constructor(e,t,i){let r=Number.parseInt(e);Number.isFinite(r)||(r=10067),super("mord",i,{value:String.fromCodePoint(r),style:t}),this.codepoint=r}serialize(e){return'\\unicode"'+("000000"+this.codepoint.toString(16)).toUpperCase().slice(-6)}}function Nh(e){if(1===e.length){const t=e[0];if("mbin"===t.type)return"mbin";if("mrel"===t.type)return"mrel"}return"mord"}Js("unicode","{charcode:number}",{createAtom:(e,t,i,r)=>new Mh(t[0],i,r)}),Js("rule","[raise:dimen]{width:dimen}{thickness:dimen}",{createAtom:(e,t,i,r)=>new fh(e,r,{shift:t[0],width:t[1],height:t[2],style:i})}),Js("overline","{:auto}",{createAtom:(e,t,i,r)=>new uh(e,t[0],r,{position:"overline",style:i})}),Js("underline","{:auto}",{createAtom:(e,t,i,r)=>new uh(e,t[0],r,{position:"underline",style:i})}),Js("overset","{above:auto}{base:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{above:t[0],body:t[1],skipBoundary:!1,style:i,boxType:Nh(t[1]),serialize:(e,t)=>`${e.command}{${e.aboveToLatex(t)}}{${e.bodyToLatex(t)}}`})}),Js("underset","{below:auto}{base:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{below:t[0],body:t[1],skipBoundary:!1,style:i,boxType:Nh(t[1]),serialize:(t,i)=>`${e}{${t.belowToLatex(i)}}{${t.bodyToLatex(i)}}`})}),Js("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{above:t[0],below:t[1],body:t[2],skipBoundary:!1,style:i,boxType:Nh(t[2]),serialize:(e,t)=>`${e.command}{${e.aboveToLatex(t)}}{${e.bodyToLatex(t)}}`})}),Js(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{body:t[2],above:t[1],below:t[0],skipBoundary:!1,style:i,boxType:"\\stackrel"===e?"mrel":"mbin",serialize:(e,t)=>`${e.command}{${e.aboveToLatex(t)}}{${e.bodyToLatex(t)}}`})}),Js(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:(e,t,i,r)=>new oh(e,t[0],t[1],r,{leftDelim:t[2],rightDelim:t[3],hasBarLine:!1,style:i,serialize:(e,t)=>`${e.aboveToLatex(t)} ${e.command}${e.leftDelim}${e.rightDelim}${e.belowToLatex(t)}`})}),Js("smash","[:string]{:auto}",{createAtom:(e,t,i,r)=>t[0]?new mh(e,t[1],r,{smashHeight:t[0].includes("t"),smashDepth:t[0].includes("b"),style:i}):new mh(e,t[1],r,{smashHeight:!0,smashDepth:!0,style:i})}),Js(["vphantom"],"{:auto*}",{createAtom:(e,t,i,r)=>new mh(e,t[1],r,{isInvisible:!0,smashWidth:!0,style:i})}),Js(["hphantom"],"{:auto*}",{createAtom:(e,t,i,r)=>new mh(e,t[1],r,{isInvisible:!0,smashHeight:!0,smashDepth:!0,style:i})}),Js(["phantom"],"{:auto*}",{createAtom:(e,t,i,r)=>new mh(e,t[1],r,{isInvisible:!0,style:i})}),Js("not","{:math}",{createAtom:(e,t,i,r)=>{if(t.length<1||null===t[0])return new ac("mrel",r,{command:e,style:i,value:""});const n=t[0];return new uc([new hh(e,"",r,{align:"right",style:i,boxType:"mrel"}),...n],r,{boxType:"mrel",captureSelection:!0,command:"\\not",serialize:(e,t)=>{const i=ac.serialize(n,t);return 1!==i.length||/[a-zA-Z]/.test(i)?`\\not{${i}}`:"\\not"+i}})}}),Js(["ne","neq"],"",{createAtom:(e,t,i,r)=>new uc([new hh(e,"",r,{align:"right",style:i,boxType:"mrel"}),new ac("mrel",r,{style:i,value:"="})],r,{boxType:"mrel",captureSelection:!0,serialize:()=>e,command:e})}),Js("rlap","{:auto}",{createAtom:(e,t,i,r)=>new hh(e,t[0],r,{align:"right",style:i})}),Js("llap","{:auto}",{createAtom:(e,t,i,r)=>new hh(e,t[0],r,{style:i})}),Js("mathllap","{:auto}",{createAtom:(e,t,i,r)=>new hh(e,t[0],r,{style:i})}),Js("mathrlap","{:auto}",{createAtom:(e,t,i,r)=>new hh(e,t[0],r,{align:"right",style:i})});const zh={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};Js(Object.keys(zh),"{body:auto}",{createAtom:(e,t,i,r)=>new Gc(e,t[0],r,{accentChar:zh[e.slice(1)],style:i})}),Js(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:(e,t,i,r)=>{const n=Zs(t[0]);return new Gc(e,t[0],r,{style:i,svgAccent:e.slice(1)+(n.length>5?"4":["1","1","2","2","3","3"][n.length])})}}),Js(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:(e,t,i,r)=>new Gc(e,t[0],r,{style:i,svgAccent:"overarc"})}),Js(["underarc","underparen"],"{body:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{body:t[0],style:i,svgBelow:"underarc"})}),Js("utilde","{body:auto}",{createAtom:(e,t,i,r)=>{const n=Zs(t[0]),a="widetilde"+(n.length>5?"4":["1","1","2","2","3","3"][n.length]);return new dh(e,r,{body:t[0],svgBelow:a,style:i,boxType:Nh(t[0])})}}),Js("^","{:string}",{createAtom:(e,t,i,r)=>{var n;return new ac("mord",r,{command:e,isFunction:!1,limits:"adjacent",style:i,value:t[0]&&null!==(n={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"}[t[0]])&&void 0!==n?n:"^"})}}),Js("`","{:string}",{createAtom:(e,t,i,r)=>{var n;return new ac("mord",r,{command:e,isFunction:!1,limits:"adjacent",style:i,value:t[0]&&null!==(n={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"}[t[0]])&&void 0!==n?n:"`"})}}),Js("'","{:string}",{createAtom:(e,t,i,r)=>{var n;return new ac("mord",r,{command:e,isFunction:!1,limits:"adjacent",style:i,value:t[0]&&null!==(n={a:"á",e:"é",i:"í",o:"ó",u:"ú",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú"}[t[0]])&&void 0!==n?n:"^"})}}),Js("~","{:string}",{createAtom:(e,t,i,r)=>{var n;return new ac("mord",r,{command:e,isFunction:!1,limits:"adjacent",style:i,value:t[0]&&null!==(n={n:"ñ",N:"Ñ",a:"ã",o:"õ",A:"Ã",O:"Õ"}[t[0]])&&void 0!==n?n:"´"})}}),Js("c","{:string}",{createAtom:(e,t,i,r)=>{var n;return new ac("mord",r,{command:e,isFunction:!1,limits:"adjacent",style:i,value:t[0]&&null!==(n={c:"ç",C:"Ç"}[t[0]])&&void 0!==n?n:""})}}),Js("enclose","{notation:string}[style:string]{body:auto}",{createAtom:(e,t,i,r)=>{var n;const a={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"auto",svgStrokeStyle:void 0,borderStyle:void 0,style:i};if(t[1]){const e=t[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const t of e){const e=t.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(e)a.strokeWidth=e[1],a.strokeStyle=e[2],a.strokeColor=e[3];else{const e=t.match(/\s*([a-z]*)\s*=\s*"(.*)"/);e&&("mathbackground"===e[1]?a.backgroundcolor=e[2]:"mathcolor"===e[1]?a.strokeColor=e[2]:"padding"===e[1]?a.padding=e[2]:"shadow"===e[1]&&(a.shadow=e[2]))}}"dashed"===a.strokeStyle?a.svgStrokeStyle="5,5":"dotted"===a.strokeStyle&&(a.svgStrokeStyle="1,5")}a.borderStyle=`${a.strokeWidth} ${a.strokeStyle} ${a.strokeColor}`;const o={};return(null!==(n=t[0])&&void 0!==n?n:"").split(/[, ]/).filter((e=>e.length>0)).forEach((e=>{o[e.toLowerCase()]=!0})),new ah(e,t[2],o,r,a)}}),Js("cancel","{body:auto}",{createAtom:(e,t,i,r)=>new ah(e,t[0],{updiagonalstrike:!0},r,{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:i})}),Js("bcancel","{body:auto}",{createAtom:(e,t,i,r)=>new ah(e,t[0],{downdiagonalstrike:!0},r,{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:i})}),Js("xcancel","{body:auto}",{createAtom:(e,t,i,r)=>new ah(e,t[0],{updiagonalstrike:!0,downdiagonalstrike:!0},r,{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",style:i})}),Ys("math","",((e,t,i,r)=>new Qc(e,t,i,r,{mathstyleName:"textstyle"}))),Ys("displaymath","",((e,t,i,r)=>new Qc(e,t,i,r,{mathstyleName:"textstyle"}))),Xs("array","{columns:colspec}",((e,t,i,r,n)=>new Qc(e,t,i,r,{columns:n[0],mathstyleName:"textstyle"}))),Xs(["equation","equation*","subequations"],"",((e,t,i,r)=>new Qc(e,t,i,r,{columns:[{align:"c"}]}))),Xs("multline","",((e,t,i,r)=>new Qc(e,t,i,r,{columns:[{align:"m"}]}))),Xs(["align","align*","aligned","eqnarray"],"",((e,t,i,r)=>{let n=0;for(const s of i)n=Math.max(n,s.length);const a=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let o=2;while(onew Qc(e,t,i,r,{columns:[{align:"r"},{align:"l"}]}))),Xs(["gather","gathered"],"",((e,t,i,r)=>new Qc(e,t,i,r,{columns:[{gap:.25},{align:"c"},{gap:0}],colSeparationType:"gather"}))),Xs(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",((e,t,i,r,n)=>{var a;let o=".",s=".";switch(t){case"pmatrix":case"pmatrix*":o="(",s=")";break;case"bmatrix":case"bmatrix*":o="[",s="]";break;case"Bmatrix":case"Bmatrix*":o="\\lbrace",s="\\rbrace";break;case"vmatrix":case"vmatrix*":o="\\vert",s="\\vert";break;case"Vmatrix":case"Vmatrix*":o="\\Vert",s="\\Vert";break;case"matrix":case"matrix*":o=".",s=".";break}return new Qc(e,t,i,r,{mathstyleName:"textstyle",leftDelim:o,rightDelim:s,columns:null!==(a=n[0])&&void 0!==a?a:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]})})),Xs(["smallmatrix","smallmatrix*"],"[columns:colspec]",((e,t,i,r,n)=>{var a;return new Qc(e,t,i,r,{mathstyleName:"scriptstyle",columns:null!==(a=n[0])&&void 0!==a?a:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}],colSeparationType:"small",arraystretch:.5})})),Xs(["cases","dcases"],"",((e,t,i,r)=>new Qc(e,t,i,r,{mathstyleName:"dcases"===t?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]}))),Xs("rcases","",((e,t,i,r)=>new Qc(e,t,i,r,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]}))),Ys("center","",((e,t,i,r)=>new Qc(e,t,i,r,{columns:[{align:"c"}]}))),Js(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{body:t[0],skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"mrel",style:i,svgAbove:e.slice(1)})}),Js("overbrace","{:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{body:t[0],skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"mord",style:i,svgAbove:e.slice(1)})}),Js(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{body:t[0],skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"mrel",style:i,svgBelow:e.slice(1)})}),Js(["underbrace"],"{:auto}",{createAtom:(e,t,i,r)=>new dh(e,r,{body:t[0],skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"mord",style:i,svgBelow:e.slice(1)})}),Js(["xrightarrow","xleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","xLeftrightarrow","xrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xrightleftarrows","xrightequilibrium","xleftequilibrium"],"[:auto]{:auto}",{createAtom:(e,t,i,r)=>{var n,a;return new dh(e,r,{style:i,svgBody:e.slice(1),above:0===(null===(n=t[1])||void 0===n?void 0:n.length)?void 0:t[1],below:null!==(a=t[0])&&void 0!==a?a:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"mrel",serialize:(t,i)=>e+(t.hasEmptyBranch("below")?"":`[${t.belowToLatex(i)}]`)+`{${t.aboveToLatex(i)}}`})}}),Js(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","coth","ctg","cth","cotg","csc","cosec","deg","dim","exp","hom","inf","ker","lg","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th"],"",{isFunction:!0,createAtom:(e,t,i,r)=>new ch(e,e.slice(1),r,{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up",style:i})}),Js(["liminf","limsup"],"",{createAtom:(e,t,i,r)=>new ch(e,{"\\liminf":"lim inf","\\limsup":"lim sup"}[e],r,{limits:"over-under",variant:"main",style:i})}),Js(["lim","mod"],"",{createAtom:(e,t,i,r)=>new ch(e,e.slice(1),r,{limits:"over-under",variant:"main",style:i})}),Js(["det","max","min"],"",{isFunction:!0,createAtom:(e,t,i,r)=>new ch(e,e.slice(1),r,{limits:"over-under",isFunction:!0,variant:"main",style:i})}),Js("sqrt","[index:auto]{radicand:auto}",{createAtom:(e,t,i,r)=>new gh(e,r,{body:t[1],index:t[0],style:i})}),Js(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{numerator}{denominator}",{createAtom:(e,t,i,r)=>{const n={style:i};switch(e){case"\\dfrac":case"\\frac":case"\\tfrac":n.hasBarLine=!0;break;case"\\atopfrac":n.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n.hasBarLine=!1,n.leftDelim="(",n.rightDelim=")";break}switch(e){case"\\dfrac":case"\\dbinom":n.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":n.mathstyleName="textstyle";break;case"\\cfrac":n.hasBarLine=!0,n.continuousFraction=!0;break}return new oh(e,t[0],t[1],r,n)}}),Js(["brace","brack"],"",{infix:!0,createAtom:(e,t,i,r)=>new oh(e,t[0],t[1],r,{hasBarLine:!1,leftDelim:"\\brace"===e?"\\lbrace":"\\lbrack",rightDelim:"\\brace"===e?"\\rbrace":"\\rbrack",style:i,serialize:(e,t)=>$u([e.aboveToLatex(t),e.command,e.belowToLatex(t)])})}),Js(["over","atop","choose"],"",{infix:!0,createAtom:(e,t,i,r)=>{let n,a;return"\\choose"===e&&(n="(",a=")"),new oh(e,t[0],t[1],r,{hasBarLine:"\\over"===e,leftDelim:n,rightDelim:a,style:i,serialize:(e,t)=>$u([e.aboveToLatex(t),e.command,e.belowToLatex(t)])})}}),Js("pdiff","{numerator}{denominator}",{createAtom:(e,t,i,r)=>new oh(e,t[0],t[1],r,{hasBarLine:!0,numerPrefix:"∂",denomPrefix:"∂",style:i})}),Js(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","smallint","intop"],"",{createAtom:(e,t,i,r)=>new ch(e,{coprod:"∐",bigvee:"⋁",bigwedge:"⋀",biguplus:"⨄",bigcap:"⋂",bigcup:"⋃",intop:"∫",prod:"∏",sum:"∑",bigotimes:"⨂",bigoplus:"⨁",bigodot:"⨀",bigsqcup:"⨆",smallint:"∫"}[e.slice(1)],r,{isExtensibleSymbol:!0,limits:"auto",variant:"main",style:i})});const Lh={int:"∫",iint:"∬",iiint:"∭",oint:"∮",oiint:"∯",oiiint:"∰",intclockwise:"∱",varointclockwise:"∲",ointctrclockwise:"∳",intctrclockwise:"⨑",sqcup:"⊔",sqcap:"⊓",uplus:"⊎",wr:"≀",amalg:"⨿",Cap:"⋒",Cup:"⋓",doublecap:"⋒",doublecup:"⋓"};function Ch(e,t){if(!t)return"";if("string"===typeof t)return t;if(!e||void 0===t.after)return t.value;let i=!1,r=!1,n=!1,a=!1,o=!1,s=!1,l=!1,u=!1,c=!1,h=!1,d=!1,p=!1,m=!1,f=!1,g=!1,v=e[0],y=0;while(v&&/msubsup|placeholder/.test(v.type))y+=1,v=e[y];return i=!v||"first"===v.type,v&&(f="text"===v.mode,r=!f&&"mord"===v.type&&Is.test(v.value),n=!f&&"mord"===v.type&&/\d+$/.test(v.value),a=!f&&v.isFunction,o="genfrac"===v.type,s="surd"===v.type,l="mbin"===v.type,u="mrel"===v.type,c="mop"===v.type,h="mpunct"===v.type||"minner"===v.type,d="array"===v.type,p="mopen"===v.type,m="mclose"===v.type||"leftright"===v.type,g="space"===v.type),t.after.includes("nothing")&&i||t.after.includes("letter")&&r||t.after.includes("digit")&&n||t.after.includes("function")&&a||t.after.includes("frac")&&o||t.after.includes("surd")&&s||t.after.includes("binop")&&l||t.after.includes("relop")&&u||t.after.includes("operator")&&c||t.after.includes("punct")&&h||t.after.includes("array")&&d||t.after.includes("openfence")&&p||t.after.includes("closefence")&&m||t.after.includes("text")&&f||t.after.includes("space")&&g?t.value:""}function Eh(e,t,i){return i?Ch(e,i[t]):""}Js(Object.keys(Lh),"",{createAtom:(e,t,i,r)=>new ch(e,Lh[e.slice(1)],r,{limits:"adjacent",isExtensibleSymbol:!0,style:i,variant:{"⋒":"ams","⋓":"ams"}[Lh[e.slice(1)]]})}),Js(["Re","Im"],"",{createAtom:(e,t,i,r)=>new ch(e,{"\\Re":"ℜ","\\Im":"ℑ"}[e],r,{limits:"adjacent",style:i,isFunction:!0,variant:"fraktur"})}),Js("middle","{:delim}",{createAtom:(e,t,i,r)=>new rh(e,t[0],r,{size:1,style:i})}),Os("0123456789/@.?!"),Rs(65,90),Rs(97,122),Os([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),Os([["\\sharp",9839],["\\flat",9837],["\\natural",9838],["\\#",35],["\\&",38],["\\clubsuit",9827],["\\heartsuit",9825],["\\spadesuit",9824],["\\diamondsuit",9826],["\\parallelogram",9649]]),Os([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\Q",81,"mord","double-struck"],["\\C",67,"mord","double-struck"],["\\P",80,"mord","double-struck"],["\\pounds",163],["\\euro",8364]]),Os([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel"),Os([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]),Os([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nrightarrow",8603],["\\nleftarrow",8602],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",8913],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams"),Os([["+",43],["-",8722],["−",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin"),Os([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams"),Os([["\\surd",8730],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\emptyset",8709]]),Os([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",8869],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel"),Os([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),Os([["\\wp",8472],["\\aleph",8501]]),Os([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams"),Os([["\\ ",160],["~",160],["\\space",160]],"space"),Js(["!",",",":",";","enskip","enspace","quad","qquad"],"",{createAtom:(e,t,i,r)=>new cc(e,i,r)}),Os([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),Os([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),Os([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);const _h={"&":"\\&","%":"\\%","''":"^{\\doubleprime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\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:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",infty:"\\infty","∞":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"∑":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","∆":"\\differentialD","∂":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",sin:"\\sin",sinh:"\\sinh",cos:"\\cos",cosh:"\\cosh",tan:"\\tan",tanh:"\\tanh",sec:"\\sec",csc:"\\csc",cot:"\\cot",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","≠":"\\ne","!=":"\\ne","≥":"\\ge",">=":"\\ge","≤":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","≈":"\\approx","?=":"\\questeq","÷":"\\div","¬":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{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:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{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",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:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\mod",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",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 Th(e,t){var i;let r=null!==(i=null===t||void 0===t?void 0:t.format)&&void 0!==i?i:"auto";return"auto"===r&&([r,e]=Rh(e)),"ascii-math"===r?(e=e.replace(/\u2061/gu,""),e=e.replace(/\u3016/gu,"{"),e=e.replace(/\u3017/gu,"}"),e=e.replace(/([^\\])sinx/g,"$1\\sin x"),e=e.replace(/([^\\])cosx/g,"$1\\cos x "),e=e.replace(/\u2013/g,"-"),["ascii-math",Bh(e,{inlineShortcuts:null===t||void 0===t?void 0:t.inlineShortcuts})]):["latex",e]}function Bh(e,t){var i,r,n;if(!e)return"";let a,o=!1;const s=null!==(i=t.inlineShortcuts)&&void 0!==i?i:_h;if(o||!e.startsWith("^")&&!e.startsWith("_")||(a=Ih(e.slice(1),{inlineShortcuts:s,noWrap:!0}),e=e[0]+"{"+a.match+"}",e+=Bh(a.rest,t),o=!0),!o&&(a=e.match(/^(sqrt|\u221A)(.*)/),a)){a=Ih(a[2],{inlineShortcuts:s,noWrap:!0});const i=null!==(r=a.match)&&void 0!==r?r:"\\placeholder{}";e="\\sqrt{"+i+"}",e+=Bh(a.rest,t),o=!0}if(!o&&(a=e.match(/^(\\cbrt|\u221B)(.*)/),a)){a=Ih(a[2],{inlineShortcuts:s,noWrap:!0});const i=null!==(n=a.match)&&void 0!==n?n:"\\placeholder{}";e="\\sqrt[3]{"+i+"}",e+=Bh(a.rest,t),o=!0}if(o||(a=e.match(/^abs(.*)/),a&&(a=Ih(a[1],{inlineShortcuts:s,noWrap:!0}),e="\\left|"+a.match+"\\right|",e+=Bh(a.rest,t),o=!0)),o||(a=e.match(/^["”“](.*?)["”“](.*)/),a&&(e="\\text{"+a[1]+"}",e+=Bh(a[2],t),o=!0)),o||(a=e.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),a&&(e=qh(a[1],s),e+=Bh(a[2],t),o=!0)),!o&&/^([fgh])[^a-zA-Z]/.test(e)&&(a=Ih(e.slice(1),{inlineShortcuts:s,noWrap:!0}),e="("===e[1]?e[0]+"\\left("+a.match+"\\right)":e[0]+a.match,e+=Bh(a.rest,t),o=!0),o||(a=e.match(/^([a-zA-Z]+)(.*)/),a&&(e=qh(a[1],s),e+=Bh(a[2],t),o=!0)),!o)if(a=Ih(e,{inlineShortcuts:s,noWrap:!0}),a.match&&"/"===a.rest[0]){const i=Ih(a.rest.slice(1),{inlineShortcuts:s,noWrap:!0});i.match&&(e="\\frac{"+a.match+"}{"+i.match+"}"+Bh(i.rest,t)),o=!0}else a.match&&(e=e.startsWith("(")?"\\left("+a.match+"\\right)"+Bh(a.rest,t):a.match+Bh(a.rest,t),o=!0);return o||(a=e.match(/^(\s+)(.*)$/),a&&(e=" "+Bh(a[2],t),o=!0)),e}function Ih(e,t){let i="";e=e.trim();let r=e,n=e.charAt(0),a={"(":")","{":"}","[":"]"}[n];if(a){let o=1,s=1;while(s0)e[s]===n&&o++,e[s]===a&&o--,s++;0===o?(t.noWrap&&"("===n?i=Bh(e.substring(1,s-1),t):("{"===n&&"}"===a&&(n="\\{",a="\\}"),i="\\left"+n+Bh(e.substring(1,s-1),t)+"\\right"+a),r=e.slice(Math.max(0,s))):(i=e.substring(1,s),r="")}else{let n=e.match(/^([a-zA-Z]+)/);if(n){let i=Eh(null,e,t.inlineShortcuts);if(i)return i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),{match:i,rest:e.slice(i.length)}}if(n=e.match(/^([a-zA-Z])/),n)return{match:n[1],rest:e.slice(1)};if(n=e.match(/^(-)?\d+(\.\d*)?/),n)return{match:n[0],rest:e.slice(n[0].length)};/^\\(left|right)/.test(e)||(n=e.match(/^(\\[a-zA-Z]+)/),n&&(r=e.slice(n[1].length),i=n[1]))}return{match:i,rest:r}}function qh(e,t){let i=Eh(null,e,t);return i?(i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),i+=" "):i=e,i}const Dh=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Oh(e){const t=e.trim();for(const i of Dh)if(t.startsWith(i[0])&&t.endsWith(i[1]))return[!0,t.substring(i[0].length,t.length-i[1].length)];return[!1,e]}function Rh(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=Oh(e),t?["latex",e]:e.startsWith("`")&&e.endsWith("`")?(e=e.substring(1,e.length-1),["ascii-math",e]):e.includes("\\")?["latex",e]:/\$.+\$/.test(e)?["latex",`\\text{${e}}`]:[void 0,e]}const Fh=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Space]",ifMode:"math",command:"moveAfterParent"},{key:"shift+[Space]",ifMode:"math",command:"moveBeforeParent"},{key:"[Home]",command:"moveToMathFieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathFieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathFieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathFieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",ifMode:"math",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"math",command:"moveToPreviousPlaceholder"},{key:"[Tab]",ifMode:"text",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"text",command:"moveToPreviousPlaceholder"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"[Undo]",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathFieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathFieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+w",ifMode:"math",command:["insert","\\sum_{i=#?}^{#?}"]},{key:"alt+b",command:["insert","\\int_{#?}^{#?}"]},{key:"alt+u",ifMode:"math",command:["insert","\\cup"]},{key:"alt+n",ifMode:"math",command:["insert","\\cap"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"shift+alt+p",ifMode:"math",command:["insert","\\prod_{i=#?}^{#?}"]},{key:"shift+alt+u",ifMode:"math",command:["insert","\\bigcup"]},{key:"shift+alt+n",ifMode:"math",command:["insert","\\bigcap"]},{key:"shift+alt+a",ifMode:"math",command:["insert","\\forall"]},{key:"shift+alt+e",ifMode:"math",command:["insert","\\exists"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"alt+[Equal]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["applyStyle",{mode:"text"}]},{key:"alt+[Equal]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["applyStyle",{mode:"math"}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Comma]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addColumnAfter"},{key:"cmd+[Comma]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addColumnAfter"},{key:"shift+ctrl+[Comma]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addColumnAfter"},{key:"shift+cmd+[Comma]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addColumnAfter"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit6]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\wedge"]},{key:"shift+alt+[Digit6]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\vee"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]}],Ph={"\\theta":"alt+q","\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\prod":"shift+alt+p","\\sum":"alt+w","\\int":"alt+b","\\cup":"alt+u","\\cap":"alt+n","\\bigcup":"shift+alt+u","\\bigcap":"shift+alt+n","\\forall":"shift+alt+a","\\exists":"shift+alt+e","\\infty":"alt+[Digit5]","\\wedge":"alt+[Digit5]","\\vee":"shift+alt+[Digit6]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Vh(e){const t=e.split("+"),i={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(i.shift=!0),t.includes("alt")&&(i.alt=!0),t.includes("ctrl")&&(i.ctrl=!0),t.includes("cmd")&&(i.cmd=!0),t.includes("win")&&(i.win=!0),t.includes("meta")&&(i.meta=!0),i}function Uh(e){let t="";return e.shift&&(t+="shift+"),e.alt&&(t+="alt+"),e.ctrl&&(t+="ctrl+"),e.cmd&&(t+="cmd+"),e.win&&(t+="win+"),e.meta&&(t+="meta+"),t+e.key}const Kh="apple"===jh()?{id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","ı"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","Î"],KeyE:["e","E","´","´"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","˝"],KeyH:["h","H","˙","Ó"],KeyI:["i","I","ˆ","ˆ"],KeyJ:["j","J","∆","Ô"],KeyK:["k","K","˚",""],KeyL:["l","L","¬","Ò"],KeyM:["m","M","µ","Â"],KeyN:["n","N","˜","˜"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®","‰"],KeyS:["s","S","ß","Í"],KeyT:["t","T","†","ˇ"],KeyU:["u","U","¨","¨"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","˛"],KeyY:["y","Y","¥","Á"],KeyZ:["z","Z","Ω","¸"],Digit1:["1","!","¡","⁄"],Digit2:["2","@","™","€"],Digit3:["3","#","£","‹"],Digit4:["4","$","¢","›"],Digit5:["5","%","∞","fi"],Digit6:["6","^","§","fl"],Digit7:["7","&","¶","‡"],Digit8:["8","*","•","°"],Digit9:["9","(","ª","·"],Digit0:["0",")","º","‚"],Space:[" "," "," "," "],Minus:["-","_","–","—"],Equal:["=","+","≠","±"],BracketLeft:["[","{","“","”"],BracketRight:["]","}","‘","’"],Backslash:["\\","|","«","»"],Semicolon:[";",":","…","Ú"],Quote:["'",'"',"æ","Æ"],Backquote:["`","˜","`","`"],Comma:[",","<","≤","¯"],Period:[".",">","≥","˘"],Slash:["/","?","÷","¿"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["§","±","§","±"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}}:"windows"===jh()?{id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","á","Á"],KeyB:["b","B","",""],KeyC:["c","C","©","¢"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","é","É"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","í","Í"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","ø","Ø"],KeyM:["m","M","µ",""],KeyN:["n","N","ñ","Ñ"],KeyO:["o","O","ó","Ó"],KeyP:["p","P","ö","Ö"],KeyQ:["q","Q","ä","Ä"],KeyR:["r","R","®",""],KeyS:["s","S","ß","§"],KeyT:["t","T","þ","Þ"],KeyU:["u","U","ú","Ú"],KeyV:["v","V","",""],KeyW:["w","W","å","Å"],KeyX:["x","X","",""],KeyY:["y","Y","ü","Ü"],KeyZ:["z","Z","æ","Æ"],Digit1:["1","!","¡","¹"],Digit2:["2","@","²",""],Digit3:["3","#","³",""],Digit4:["4","$","¤","£"],Digit5:["5","%","€",""],Digit6:["6","^","¼",""],Digit7:["7","&","½",""],Digit8:["8","*","¾",""],Digit9:["9","(","‘",""],Digit0:["0",")","’",""],Space:[" "," ","",""],Minus:["-","_","¥",""],Equal:["=","+","×","÷"],BracketLeft:["[","{","«",""],BracketRight:["]","}","»",""],Backslash:["\\","|","¬","¦"],Semicolon:[";",":","¶","°"],Quote:["'",'"',"´","¨"],Backquote:["`","~","",""],Comma:[",","<","ç","Ç"],Period:[".",">","",""],Slash:["/","?","¿",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}}:{id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Hh={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},Gh=[];function jh(){switch(As()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Qh(e){e.platform&&e.platform!==jh()||Gh.push(e)}function Wh(e,t){var i;const r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return r;for(const[n,a]of Object.entries(t.mapping)){if(a[0]===e)return r.key=`[${n}]`,r;if(a[1]===e)return r.shift=!0,r.key=`[${n}]`,r;if(a[2]===e)return r.alt=!0,r.key=`[${n}]`,r;if(a[3]===e)return r.shift=!0,r.alt=!0,r.key=`[${n}]`,r}return r.key=null!==(i=Hh[e])&&void 0!==i?i:"",r}function Zh(e){if(!e.code){const t=Object.entries(Xh().mapping);let i=!1,r=!1,n="";for(let a=0;a<4;a++){for(const[o,s]of t)if(s[a]===e.key){n=o,3===a?(i=!0,r=!0):2===a?i=!0:1===a&&(r=!0);break}if(n)break}return new KeyboardEvent(e.type,{...e,altKey:i,shiftKey:r,code:n})}return new KeyboardEvent(e.type,e)}function Yh(e){var t,i;if(!e)return;if("Unidentified"===e.key)return;if("Dead"===e.key)return;const r=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;for(const n of Gh)(null===(t=n.mapping[e.code])||void 0===t?void 0:t[r])===e.key?n.score+=1:(null===(i=n.mapping[e.code])||void 0===i?void 0:i[r])&&(n.score=0);Gh.sort(((e,t)=>t.score-e.score))}function Xh(){return Gh[0]}function Jh(e){if(ys()){const t=As(),i=e.startsWith("!"),r=e.endsWith(t);if(i&&!r)return!0;if(!i&&r)return!0}return"!other"!==e&&"other"===e}function $h(e,t,i){if(0===e.length)return"";const r=Uh(Vh(i));for(let n=e.length-1;n>=0;n--)if(e[n].key===r&&(!e[n].ifMode||e[n].ifMode===t))return e[n].command;return""}function ed(e){let t=e;return vs(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t}function td(e,t){let i=[];if("string"===typeof t){const e=Ph[t];vs(e)?i=e.slice():e&&i.push(e)}const r=ed(t),n=new RegExp("^"+r.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const a of e)n.test(ed(a.command))&&i.push(a.key);return i.map(id)}function id(e){var t;const i=/macos|ios|/.test(As()),r=e.split("+");let n="";for(const a of r)!i&&n&&(n+='+'),a.startsWith("[Key")?n+=a.slice(4,5):a.startsWith("Key")?n+=a.slice(3,4):a.startsWith("[Digit")?n+=a.slice(6,7):a.startsWith("Digit")?n+=a.slice(5,6):n+=null!==(t={cmd:"⌘",meta:i?"⌘":"command",shift:i?"⇧":"shift",alt:i?"⌥":"alt",ctrl:i?"⌃":"control","\n":i?"⏎":"return","[return]":i?"⏎":"return","[enter]":i?"⌤":"enter","[tab]":i?"⇥":"tab","[escape]":"esc","[backspace]":i?"⌫":"backspace","[delete]":i?"⌦":"del","[pageup]":i?"⇞":"page up","[pagedown]":i?"⇟":"page down","[home]":i?"⤒":"home","[end]":i?"⤓":"end","[space]":"space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",bracketLeft:"[",bracketRight:"]",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"⇠",up:"⇡",right:"⇢",down:"⇣","[arrowleft]":"⇠","[arrowup]":"⇡","[arrowright]":"⇢","[arrowdown]":"⇣","[digit0]":"0","[digit1]":"1","[digit2]":"2","[digit3]":"3","[digit4]":"4","[digit5]":"5","[digit6]":"6","[digit7]":"7","[digit8]":"8","[digit9]":"9"}[a.toLowerCase()])&&void 0!==t?t:a.toUpperCase();return n}function rd(e,t){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);if(void 0!==e.ifLayout&&(0===t.score||!e.ifLayout.includes(t.id)))return;const i=Vh(e.key);let r=e.ifPlatform;if(i.cmd){if(r&&"macos"!==r&&"ios"!==r)throw new Error('Unexpected "cmd" modifier with platform "'+r+'"\n"cmd" modifier can only be used with macOS or iOS platform.');r||(r="ios"===As()?"ios":"macos"),i.win=!1,i.cmd=!1,i.meta=!0}if(i.win){if(r&&"windows"!==r)throw new Error('Unexpected "win" modifier with platform "'+r+'"\n"win" modifier can only be used with Windows platform.');r="windows",i.win=!1,i.cmd=!1,i.meta=!0}if(r&&!Jh(r))return;if(/^\[.+\]$/.test(i.key))return{...e,ifPlatform:r,key:Uh(i)};const n=Wh(i.key,t);if(!n)throw new Error('Invalid keybinding key "'+e.key+'"');if(n.shift&&i.shift||n.alt&&i.alt)throw new Error(`The keybinding ${e.key} (${nd(e.command)}) is conflicting with the key combination ${Uh(n)} using the ${t.displayName} keyboard layout`);return n.shift=n.shift||i.shift,n.alt=n.alt||i.alt,n.meta=i.meta,n.ctrl=i.ctrl,{...e,ifPlatform:r,key:Uh(n)}}function nd(e){if(Array.isArray(e)){const t=[...e];return t.shift()+"("+t.map((e=>"string"===typeof e?`"${e}"`:e.toString())).join(", ")+")"}return e}function ad(e,t){const i=[],r=[];for(const a of e)try{const e=rd(a,t);if(e){const r=i.filter((t=>t.key===e.key&&t.ifMode===e.ifMode));if(r.length>0)throw new Error(`Ambiguous key binding ${a.key} (${nd(a.command)}) matches ${r[0].key} (${nd(r[0].command)}) with the ${t.displayName} keyboard layout`);i.push(e)}}catch(n){n instanceof Error&&r.push(n.message)}return[i,r]}Qh(Kh),Qh({id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","‡","Ω"],KeyB:["b","B","ß","∫"],KeyC:["c","C","©","¢"],KeyD:["d","D","∂","∆"],KeyE:["e","E","ê","Ê"],KeyF:["f","F","ƒ","·"],KeyG:["g","G","fi","fl"],KeyH:["h","H","Ì","Î"],KeyI:["i","I","î","ï"],KeyJ:["j","J","Ï","Í"],KeyK:["k","K","È","Ë"],KeyL:["l","L","¬","|"],KeyM:[",","?","∞","¿"],KeyN:["n","N","~","ı"],KeyO:["o","O","œ","Œ"],KeyP:["p","P","π","∏"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","®","‚"],KeyS:["s","S","Ò","∑"],KeyT:["t","T","†","™"],KeyU:["u","U","º","ª"],KeyV:["v","V","◊","√"],KeyW:["z","Z","Â","Å"],KeyX:["x","X","≈","⁄"],KeyY:["y","Y","Ú","Ÿ"],KeyZ:["w","W","‹","›"],Digit1:["&","1","","´"],Digit2:["é","2","ë","„"],Digit3:['"',"3","“","”"],Digit4:["'","4","‘","’"],Digit5:["(","5","{","["],Digit6:["§","6","¶","å"],Digit7:["è","7","«","»"],Digit8:["!","8","¡","Û"],Digit9:["ç","9","Ç","Á"],Digit0:["à","0","ø","Ø"],Space:[" "," "," "," "],Minus:[")","°","}","]"],Equal:["-","_","—","–"],BracketLeft:["^","¨","ô","Ô"],BracketRight:["$","*","€","¥"],Backslash:["`","£","@","#"],Semicolon:["m","M","µ","Ó"],Quote:["ù","%","Ù","‰"],Backquote:["<",">","≤","≥"],Comma:[";",".","…","•"],Period:[":","/","÷","\\"],Slash:["=","+","≠","±"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","•","Ÿ"],NumpadEqual:["=","=","=","="]}}),Qh({id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","ß",""],KeyC:["c","C","©"," "],KeyD:["d","D","∂","∆"],KeyE:["e","E","€","€"],KeyF:["f","F","ƒ","fi"],KeyG:["g","G","","fl"],KeyH:["h","H","™"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","¶","¯"],KeyK:["k","K","§","ˇ"],KeyL:["l","L"," ","˘"],KeyM:["m","M","µ","˚"],KeyN:["n","N"," ","˙"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®"," "],KeyS:["s","S","∫"," "],KeyT:["t","T","†","‡"],KeyU:["u","U"," "," "],KeyV:["v","V","√","◊"],KeyW:["w","W","æ","Æ"],KeyX:["x","X","∑","›"],KeyY:["y","Y","¥"," "],KeyZ:["z","Z","Ω","‹"],Digit1:["1","!","|","ı"],Digit2:["2",'"',"@","˝"],Digit3:["3","·","#","•"],Digit4:["4","$","¢","£"],Digit5:["5","%","∞","‰"],Digit6:["6","&","¬"," "],Digit7:["7","/","÷","⁄"],Digit8:["8","(","“","‘"],Digit9:["9",")","”","’"],Digit0:["0","=","≠","≈"],Space:[" "," "," "," "],Minus:["'","?","´","¸"],Equal:["¡","¿","‚","˛"],BracketLeft:["`","^","[","ˆ"],BracketRight:["+","*","]","±"],Backslash:["ç","Ç","}","»"],Semicolon:["ñ","Ñ","~","˜"],Quote:["´","¨","{","«"],Backquote:["<",">","≤","≥"],Comma:[",",";","„",""],Period:[".",":","…","…"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["º","ª","\\","°"]}}),Qh({id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","·","#",""],Digit4:["4","$","~",""],Digit5:["5","%","€",""],Digit6:["6","&","¬",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["¡","¿","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["ç","Ç","}",""],Semicolon:["ñ","Ñ","",""],Quote:["´","¨","{",""],Backquote:["º","ª","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),Qh({id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","æ","Æ"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:["m","M","µ","º"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["q","Q","@","Ω"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["w","W","ł","Ł"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["z","Z","«","<"],Digit1:["1","!","|","¡"],Digit2:["2",'"',"@","⅛"],Digit3:["3","·","#","£"],Digit4:["4","$","~","$"],Digit5:["5","%","½","⅜"],Digit6:["6","&","¬","⅝"],Digit7:["7","/","{","⅞"],Digit8:["8","(","[","™"],Digit9:["9",")","]","±"],Digit0:["0","=","}","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:["'","?","\\","¿"],Equal:["¡","¿","̃","~"],BracketLeft:["̀","̂","[","̊"],BracketRight:["+","*","]","̄"],Backslash:["ç","Ç","}","̆"],Semicolon:["ñ","Ñ","~","̋"],Quote:["́","̈","{","{"],Backquote:["º","ª","\\","\\"],Comma:[",",";","─","×"],Period:[".",":","·","÷"],Slash:["-","_","̣","̇"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}}),Qh({id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","Ω"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:[",","?","́","̋"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["z","Z","«","<"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["w","W","ł","Ł"],Digit1:["&","1","¹","¡"],Digit2:["é","2","~","⅛"],Digit3:['"',"3","#","£"],Digit4:["'","4","{","$"],Digit5:["(","5","[","⅜"],Digit6:["-","6","|","⅝"],Digit7:["è","7","`","⅞"],Digit8:["_","8","\\","™"],Digit9:["ç","9","^","±"],Digit0:["à","0","@","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:[")","°","]","¿"],Equal:["=","+","}","̨"],BracketLeft:["̂","̈","̈","̊"],BracketRight:["$","£","¤","̄"],Backslash:["*","µ","̀","̆"],Semicolon:["m","M","µ","º"],Quote:["ù","%","̂","̌"],Backquote:["²","~","¬","¬"],Comma:[";",".","─","×"],Period:[":","/","·","÷"],Slash:["!","§","̣","̇"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"]}}),Qh({id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["é","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["è","7","`",""],Digit8:["_","8","\\",""],Digit9:["ç","9","^",""],Digit0:["à","0","@",""],Space:[" "," ","",""],Minus:[")","°","]",""],Equal:["=","+","}",""],BracketLeft:["^","¨","",""],BracketRight:["$","£","¤",""],Backslash:["*","µ","",""],Semicolon:["m","M","",""],Quote:["ù","%","",""],Backquote:["²","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","§","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),Qh({id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","µ",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"²",""],Digit3:["3","§","³",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["ß","?","\\","ẞ"],Equal:["´","`","",""],BracketLeft:["ü","Ü","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["ö","Ö","",""],Quote:["ä","Ä","",""],Backquote:["^","°","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}}),Qh({id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","‹"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","™"],KeyE:["e","E","€","‰"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","Ì"],KeyH:["h","H","ª","Ó"],KeyI:["i","I","⁄","Û"],KeyJ:["j","J","º","ı"],KeyK:["k","K","∆","ˆ"],KeyL:["l","L","@","fl"],KeyM:["m","M","µ","˘"],KeyN:["n","N","~","›"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","«","»"],KeyR:["r","R","®","¸"],KeyS:["s","S","‚","Í"],KeyT:["t","T","†","˝"],KeyU:["u","U","¨","Á"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","Ù"],KeyY:["z","Z","Ω","ˇ"],KeyZ:["y","Y","¥","‡"],Digit1:["1","!","¡","¬"],Digit2:["2",'"',"“","”"],Digit3:["3","§","¶","#"],Digit4:["4","$","¢","£"],Digit5:["5","%","[","fi"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","˜"],Digit9:["9",")","}","·"],Digit0:["0","=","≠","¯"],Space:[" "," "," "," "],Minus:["ß","?","¿","˙"],Equal:["´","`","'","˚"],BracketLeft:["ü","Ü","•","°"],BracketRight:["+","*","±",""],Backslash:["#","'","‘","’"],Semicolon:["ö","Ö","œ","Œ"],Quote:["ä","Ä","æ","Æ"],Backquote:["<",">","≤","≥"],Comma:[",",";","∞","˛"],Period:[".",":","…","÷"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","°","„","“"],NumpadEqual:["=","=","=","="]}}),Qh({id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["x","X","≈","˛"],KeyC:["j","J","∆","Ô"],KeyD:["e","E","´","´"],KeyE:[".",">","≥","˘"],KeyF:["u","U","¨","¨"],KeyG:["i","I","ˆ","ˆ"],KeyH:["d","D","∂","Î"],KeyI:["c","C","ç","Ç"],KeyJ:["h","H","˙","Ó"],KeyK:["t","T","†","ˇ"],KeyL:["n","N","˜","˜"],KeyM:["m","M","µ","Â"],KeyN:["b","B","∫","ı"],KeyO:["r","R","®","‰"],KeyP:["l","L","¬","Ò"],KeyQ:["'",'"',"æ","Æ"],KeyR:["p","P","π","∏"],KeyS:["o","O","ø","Ø"],KeyT:["y","Y","¥","Á"],KeyU:["g","G","©","˝"],KeyV:["k","K","˚",""],KeyW:[",","<","≤","¯"],KeyX:["q","Q","œ","Œ"],KeyY:["f","F","ƒ","Ï"],KeyZ:[";",":","…","Ú"],Digit1:["1","!","¡","⁄"],Digit2:["2","@","™","€"],Digit3:["3","#","£","‹"],Digit4:["4","$","¢","›"],Digit5:["5","%","∞","fi"],Digit6:["6","^","§","fl"],Digit7:["7","&","¶","‡"],Digit8:["8","*","•","°"],Digit9:["9","(","ª","·"],Digit0:["0",")","º","‚"],Space:[" "," "," "," "],Minus:["[","{","“","”"],Equal:["]","}","‘","’"],BracketLeft:["/","?","÷","¿"],BracketRight:["=","+","≠","±"],Backslash:["\\","|","«","»"],Semicolon:["s","S","ß","Í"],Quote:["-","_","–","—"],Backquote:["`","~","`","`"],Comma:["w","W","∑","„"],Period:["v","V","√","◊"],Slash:["z","Z","Ω","¸"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["§","±","§","±"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}});const od={"\\ne":"≠","\\neq":"≠","−":"-","-":"-","\\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","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" "},sd={"\\pm":"+-","\\times":"xx","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)"};function ld(e){var t,i,r,n,a,o,s,l,u,c,h,d,p;if(!e)return"";if(vs(e)){if(0===e.length)return"";if("first"===e[0].type&&(e=e.slice(1)),0===e.length)return"";let i="";if("latex"===e[0].mode)for(const t of e)i+=ld(t);else if("text"===e[0].mode){let r=0;i='"';while("text"===(null===(t=e[r])||void 0===t?void 0:t.mode))i+=e[r].body?ld(e[r].body):e[r].value,r++;i+='"'+ld(e.slice(r))}else if("math"===e[0].mode){let t=0;while(e[t]&&"math"===e[t].mode)i+=ld(e[t]),t++;i+=ld(e.slice(t))}else console.warn("toASCIIMath: Unexpected mode");return i.trim()}if("text"===e.mode)return'"'+e.value+'"';let m="";const{command:f}=e;let g;switch(e.type){case"first":return"";case"group":case"root":m=null!==(i=od[f])&&void 0!==i?i:ld(e.body);break;case"genfrac":{const t=e;(t.leftDelim||t.rightDelim)&&(m+="."!==t.leftDelim&&t.leftDelim?t.leftDelim:"{:"),t.hasBarLine?(m+="(",m+=ld(t.above),m+=")/(",m+=ld(t.below),m+=")"):(m+="("+ld(t.above)+"),",m+="("+ld(t.below)+")"),(t.leftDelim||t.rightDelim)&&(m+="."!==t.rightDelim&&t.rightDelim?t.rightDelim:"{:")}break;case"surd":m+=e.hasEmptyBranch("above")?"sqrt("+ld(e.body)+")":"root("+ld(e.above)+")("+ld(e.body)+")";break;case"latex":m=e.value;break;case"leftright":{const t=e;m+="."!==t.leftDelim&&t.leftDelim?t.leftDelim:"{:",m+=ld(t.body),m+="."!==t.rightDelim&&t.rightDelim?t.rightDelim:":}"}break;case"sizeddelim":case"delim":break;case"overlap":break;case"overunder":break;case"mord":m=null!==(n=null!==(r=od[f])&&void 0!==r?r:f)&&void 0!==n?n:"string"===typeof e.value?e.value:"",m.startsWith("\\")&&(m+=" "),g=f?f.match(/{?\\char"([\dabcdefABCDEF]*)}?/):null,g?m=String.fromCodePoint(Number.parseInt("0x"+g[1])):m.length>0&&m.startsWith("\\")&&(m="string"===typeof e.value?e.value.charAt(0):e.command);break;case"mbin":case"mrel":case"minner":m=null!==(o=null!==(a=od[f])&&void 0!==a?a:sd[f])&&void 0!==o?o:e.value;break;case"mopen":case"mclose":m+=e.value;break;case"mpunct":m=null!==(s=sd[f])&&void 0!==s?s:f;break;case"mop":"​"!==e.value&&(m="",m+="\\operatorname"===f?ld(e.body):null!==(l=e.value)&&void 0!==l?l:f,m+=" ");break;case"array":const t=e.array,v=e.environmentName,y=null!==(u={bmatrix:["[","]"],"bmatrix*":["[","]"]}[v])&&void 0!==u?u:["(",")"],b=[];for(const e of t){const t=[];for(const i of e)t.push(y[0]+ld(i)+y[1]);b.push(t.join(","))}const w=null!==(c={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[v])&&void 0!==c?c:["(",")"];m=w[0]+b.join(",")+w[1];break;case"box":break;case"spacing":m=null!==(h=od[f])&&void 0!==h?h:" ";break;case"enclose":m="("+ld(e.body)+")";break;case"space":m=" ";break;case"msubsup":m="";break;case"macro":m=null!==(p=null!==(d=od[f])&&void 0!==d?d:sd[f])&&void 0!==p?p:ld(e.body);break}if(!e.hasEmptyBranch("subscript")){m+="_";const t=ld(e.subscript);m+=t.length>1?"("+t+")":t}if(!e.hasEmptyBranch("superscript")){m+="^";const t=ld(e.superscript);m+=t.length>1?"("+t+")":t}return m}const ud={"p@":"1pt ","z@":"0pt",maxdimen:"16383.99999pt",hfuzz:"0.1pt",vfuzz:"0.1pt",overfullrule:"5pt",hsize:"6.5in",vsize:"8.9in",parindent:"20pt",maxdepth:"4pt",splitmaxdepth:"\\maxdimen",boxmaxdepth:"\\maxdimen",delimitershortfall:"5pt",nulldelimiterspace:"1.2pt",scriptspace:"0.5pt",topskip:"10pt",splittopskip:"10pt",normalbaselineskip:"12pt",normallineskip:"1pt",normallineskiplimit:"0pt",jot:"3pt",doublerulesep:"2pt",arrayrulewidth:"0.4pt",arraycolsep:"5pt",fboxsep:"3pt",fboxrule:"0.4pt"},cd={"z@skip":"0pt plust0pt minus0pt",hideskip:"-1000pt plust 1fill","@flushglue":"0pt plust 1fill",parskip:"0pt plus 1pt",abovedisplayskip:"12pt plus 3pt minus 9pt",abovedisplayshortskip:"0pt plus 3pt",belowdisplayskip:"12pt plus 3pt minus 9pt",belowdisplayshortskip:"7pt plus 3pt minus 4pt",parfillskip:"0pt plus 1fil",thinmuskip:"3mu",medmuskip:"4mu plus 2mu minus 4mu",thickmuskip:"5mu plus 5mu",smallskipamount:"3pt plus1pt minus1pt",medskipamount:"6pt plus2pt minus2pt",bigskipamount:"12pt plus4pt minus4pt"},hd={pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:"",month:(new Date).getMonth()+1,day:(new Date).getDate(),year:(new Date).getFullYear()};let dd;function pd(e){var t,i;if(dd)return dd;dd={...hd};for(const r of Object.keys(ud))dd[r]=null!==(t=Vc(ud[r],e,dd))&&void 0!==t?t:0;for(const r of Object.keys(cd))dd[r]=null!==(i=Pc(cd[r],e,dd))&&void 0!==i?i:0;return dd}const md={en:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Symbols","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.command":"LaTeX Command Mode","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.roman":"Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.undo":"Undo","menu.insert matrix":"Insert Matrix","menu.insert vector":"Insert Vector","submenu.array.matrix delimiters":"Matrix Delimiters","menu.array.add row above":"Add Row After","menu.array.add row below":"Add Row Before","menu.array.add column after":"Add Column After","menu.array.add column before":"Add Column Before","menu.array.delete row":"Delete Row","menu.array.delete rows":"Delete Selected Rows","menu.array.delete column":"Delete Column","menu.array.delete columns":"Delete Selected Columns","submenu.array.insert separator":"Insert Separator","menu.insert table":"Insert Table","submenu.table style":"Table Style"},ar:{"keyboard.tooltip.functions":"مهام","keyboard.tooltip.symbols":"حرف او رمز","keyboard.tooltip.greek":"حروف يونانية","keyboard.tooltip.command":"حالة تلقي الأوامر اللاتك","keyboard.tooltip.numeric":"الرقمية","keyboard.tooltip.roman":"رموز الاحرف الرومانية","tooltip.copy to clipboard":"نسخ إلى الحافظة","tooltip.redo":"الإعادة","tooltip.toggle virtual keyboard":"تبديل لوحة المفاتيح الإفتراضية","tooltip.undo":"إلغاء","menu.insert matrix":"أدخل المصفوفة","menu.insert vector":"أدخل متجه","submenu.array.matrix delimiters":"محددات المصفوفة","menu.array.add row above":"أضف صفًا بعد ذلك","menu.array.add row below":"أضف الصف قبل","menu.array.add column after":"أضف العمود بعد ذلك","menu.array.add column before":"أضف العمود قبل","menu.array.delete row":"احذف صف","menu.array.delete rows":"حذف الصفوف المحددة","menu.array.delete column":"حذف العمود","menu.array.delete columns":"حذف الأعمدة المحددة","submenu.array.insert separator":"أدخل فاصل","menu.insert table":"إدراج جدول","submenu.table style":"نمط الجدول"},bg:{"keyboard.tooltip.functions":"Функции","keyboard.tooltip.symbols":"Символи","keyboard.tooltip.greek":"Гръцки букви","keyboard.tooltip.command":"Команден режим на латекс","keyboard.tooltip.numeric":"Числови","keyboard.tooltip.roman":"Римски букви","tooltip.copy to clipboard":"Копиране в клипборда","tooltip.redo":"Повторно","tooltip.toggle virtual keyboard":"Превключване на виртуална клавиатура","tooltip.undo":"Отмяна","menu.insert matrix":"Вмъкване на матрица","menu.insert vector":"Вмъкване на вектор","submenu.array.matrix delimiters":"Матрични разделители","menu.array.add row above":"Добавяне на ред след","menu.array.add row below":"Добавяне на ред преди","menu.array.add column after":"Добавяне на колона след","menu.array.add column before":"Добавяне на колона преди","menu.array.delete row":"Изтриване на реда","menu.array.delete rows":"Изтриване на избраните редове","menu.array.delete column":"Изтриване на колона","menu.array.delete columns":"Изтриване на избраните колони","submenu.array.insert separator":"Поставете разделител","menu.insert table":"Вмъкване на таблица","submenu.table style":"Табличен стил"},bs:{"keyboard.tooltip.functions":"Funkcije","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Grčka slova","keyboard.tooltip.command":"LaTeX naredbeni način","keyboard.tooltip.numeric":"Numerički","keyboard.tooltip.roman":"Rimska slova","tooltip.copy to clipboard":"Kopirati u clipboard","tooltip.redo":"Ponovi","tooltip.toggle virtual keyboard":"Uključi / isključi virtualnu tipkovnicu","tooltip.undo":"Poništi","menu.insert matrix":"Umetni matricu","menu.insert vector":"Umetni vektor","submenu.array.matrix delimiters":"Matrični razdjelnici","menu.array.add row above":"Dodaj redak nakon","menu.array.add row below":"Dodaj red prije","menu.array.add column after":"Dodaj stupac nakon","menu.array.add column before":"Dodaj stupac prije","menu.array.delete row":"Izbriši red","menu.array.delete rows":"Izbriši odabrane redove","menu.array.delete column":"Izbriši stupac","menu.array.delete columns":"Izbriši odabrane stupce","submenu.array.insert separator":"Umetni separator","menu.insert table":"Ubaci tabelu","submenu.table style":"Stil tabele"},cs:{"keyboard.tooltip.functions":"Funkce","keyboard.tooltip.symbols":"Symboly","keyboard.tooltip.greek":"Řecké dopisy","keyboard.tooltip.command":"Příkazový režim LaTeX","keyboard.tooltip.numeric":"Číselné","keyboard.tooltip.roman":"Římské dopisy","tooltip.copy to clipboard":"Zkopírovat do schránky","tooltip.redo":"Předělat","tooltip.toggle virtual keyboard":"Přepnout virtuální klávesnici","tooltip.undo":"Vrátit","menu.insert matrix":"Vložte matici","menu.insert vector":"Vložit vektor","submenu.array.matrix delimiters":"Oddělovače matic","menu.array.add row above":"Přidat řádek za","menu.array.add row below":"Přidat řádek před","menu.array.add column after":"Přidat sloupec za","menu.array.add column before":"Přidat sloupec dříve","menu.array.delete row":"Odstranit řádek","menu.array.delete rows":"Odstranit vybrané řádky","menu.array.delete column":"Odstranit sloupec","menu.array.delete columns":"Odstranit vybrané sloupce","submenu.array.insert separator":"Vložte oddělovač","menu.insert table":"Vložit tabulku","submenu.table style":"Styl tabulky"},da:{"keyboard.tooltip.functions":"Funktioner","keyboard.tooltip.symbols":"Symboler","keyboard.tooltip.greek":"Græske bogstaver","keyboard.tooltip.command":"LaTeX kommandotilstand","keyboard.tooltip.numeric":"Numerisk","keyboard.tooltip.roman":"Romerske breve","tooltip.copy to clipboard":"Kopier til udklipsholder","tooltip.redo":"Gentag igen","tooltip.toggle virtual keyboard":"Skift virtuelt tastatur","tooltip.undo":"Fortryd","menu.insert matrix":"Indsæt matrix","menu.insert vector":"Indsæt vektor","submenu.array.matrix delimiters":"Matrixafgrænsere","menu.array.add row above":"Tilføj række efter","menu.array.add row below":"Tilføj række før","menu.array.add column after":"Tilføj kolonne efter","menu.array.add column before":"Tilføj kolonne før","menu.array.delete row":"Slet række","menu.array.delete rows":"Slet valgte rækker","menu.array.delete column":"Slet kolonne","menu.array.delete columns":"Slet valgte kolonner","submenu.array.insert separator":"Indsæt separator","menu.insert table":"Indsæt tabel","submenu.table style":"Tabelstil"},de:{"keyboard.tooltip.functions":"Funktionen","keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.command":"LaTeX-Befehlsmodus","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.roman":"Römische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen","menu.insert matrix":"Matrix einfügen","menu.insert vector":"Vektor einfügen","submenu.array.matrix delimiters":"Matrixtrennzeichen","menu.array.add row above":"Zeile hinzufügen nach","menu.array.add row below":"Zeile hinzufügen vor","menu.array.add column after":"Spalte hinzufügen nach","menu.array.add column before":"Spalte hinzufügen vor","menu.array.delete row":"Zeile löschen","menu.array.delete rows":"Ausgewählte Zeilen löschen","menu.array.delete column":"Spalte löschen","menu.array.delete columns":"Ausgewählte Spalten löschen","submenu.array.insert separator":"Trennzeichen einfügen","menu.insert table":"Tabelle einfügen","submenu.table style":"Tabellenstil"},el:{"keyboard.tooltip.functions":"συναρτήσεις","keyboard.tooltip.symbols":"σύμβολα","keyboard.tooltip.greek":"ελληνικά γράμματα","keyboard.tooltip.command":"Λειτουργία εντολών LaTeX","keyboard.tooltip.numeric":"Αριθμητικός","keyboard.tooltip.roman":"Ρωμαϊκά γράμματα","tooltip.copy to clipboard":"Αντιγραφή στο πρόχειρο","tooltip.redo":"Ξανακάνω","tooltip.toggle virtual keyboard":"Εναλλαγή εικονικού πληκτρολογίου","tooltip.undo":"Ξεκάνω","menu.insert matrix":"Εισαγωγή Matrix","menu.insert vector":"Εισαγωγή διανύσματος","submenu.array.matrix delimiters":"Οριοθέτες Matrix","menu.array.add row above":"Προσθήκη σειράς μετά","menu.array.add row below":"Προσθήκη σειράς πριν","menu.array.add column after":"Προσθήκη στήλης μετά","menu.array.add column before":"Προσθήκη στήλης πριν","menu.array.delete row":"Διαγραφή σειράς","menu.array.delete rows":"Διαγραφή επιλεγμένων σειρών","menu.array.delete column":"Διαγραφή στήλης","menu.array.delete columns":"Διαγραφή επιλεγμένων στηλών","submenu.array.insert separator":"Εισαγωγή διαχωριστικού","menu.insert table":"Εισαγωγή πίνακα","submenu.table style":"Στυλ πίνακα"},es:{"keyboard.tooltip.functions":"Funciones","keyboard.tooltip.symbols":"Símbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.command":"Modo Comando LaTeX","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.roman":"Letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer","menu.insert matrix":"Añadir Matriz","menu.insert vector":"Añadir vector","submenu.array.matrix delimiters":"Delimitadores de Matriz","menu.array.add row above":"Añadir Línea Antes","menu.array.add row below":"Añadir Línea Despues","menu.array.add column after":"Añadir Columna Despues","menu.array.add column before":"Añadir Columna Antes","menu.array.delete row":"Borrar Línea","menu.array.delete rows":"Borrar Líneas Seleccionadas","menu.array.delete column":"Borrar Columna","menu.array.delete columns":"Borrar Columnas Seleccionadas","submenu.array.insert separator":"Insertar un Separador","menu.insert table":"Insertar Tabla","submenu.table style":"Estilo de Tabla"},et:{"keyboard.tooltip.functions":"Funktsioonid","keyboard.tooltip.symbols":"Sümbolid","keyboard.tooltip.greek":"Kreeka kirjad","keyboard.tooltip.command":"LaTeXi käsurežiim","keyboard.tooltip.numeric":"Numbriline","keyboard.tooltip.roman":"Rooma kirjad","tooltip.copy to clipboard":"Kopeerida lõikelauale","tooltip.redo":"Tee uuesti","tooltip.toggle virtual keyboard":"Lülitage sisse virtuaalne klaviatuur","tooltip.undo":"Võta tagasi","menu.insert matrix":"Sisesta maatriks","menu.insert vector":"Sisesta vektor","submenu.array.matrix delimiters":"Maatriksi eraldajad","menu.array.add row above":"Lisa rida pärast","menu.array.add row below":"Lisa rida enne","menu.array.add column after":"Lisa veerg pärast","menu.array.add column before":"Lisa veerg enne","menu.array.delete row":"Kustuta rida","menu.array.delete rows":"Kustuta valitud read","menu.array.delete column":"Kustuta veerg","menu.array.delete columns":"Kustuta valitud veerud","submenu.array.insert separator":"Sisestage eraldaja","menu.insert table":"Sisesta tabeli","submenu.table style":"Tabeli stiilis"},fa:{"keyboard.tooltip.functions":"توابع","keyboard.tooltip.symbols":"نمادها","keyboard.tooltip.greek":"حروف یونانی","keyboard.tooltip.command":"حالت دستور لاتک","keyboard.tooltip.numeric":"عددی","keyboard.tooltip.roman":"حروف رومی","tooltip.copy to clipboard":"کپی به کلیپبورد","tooltip.redo":"بازگشت به بعد","tooltip.toggle virtual keyboard":"نمایش/نهفتن کیبورد مجازی","tooltip.undo":"بازگشت به قبل","menu.insert matrix":"ماتریس را وارد کنید","menu.insert vector":"درج بردار","submenu.array.matrix delimiters":"مرزهای ماتریس","menu.array.add row above":"بعد از آن ردیف اضافه کنید","menu.array.add row below":"ردیف را قبل اضافه کنید","menu.array.add column after":"اضافه کردن ستون بعد","menu.array.add column before":"ستون قبل را اضافه کنید","menu.array.delete row":"ردیف را حذف کنید","menu.array.delete rows":"ردیف های انتخاب شده را حذف کنید","menu.array.delete column":"حذف ستون","menu.array.delete columns":"ستون های انتخاب شده را حذف کنید","submenu.array.insert separator":"درج جدا کننده","menu.insert table":"قرار دادن جدول","submenu.table style":"سبک میز"},fi:{"keyboard.tooltip.functions":"Toiminnot","keyboard.tooltip.symbols":"Symbolit","keyboard.tooltip.greek":"Kreikkalaiset kirjeet","keyboard.tooltip.command":"LaTeX-komentotila","keyboard.tooltip.numeric":"Numeerinen","keyboard.tooltip.roman":"Roomalaiset kirjeet","tooltip.copy to clipboard":"Kopioi leikepöydälle","tooltip.redo":"Tee uudelleen","tooltip.toggle virtual keyboard":"Vaihda virtuaalinäppäimistö","tooltip.undo":"Kumoa","menu.insert matrix":"Lisää matriisi","menu.insert vector":"Lisää vektori","submenu.array.matrix delimiters":"Matriisin erottimet","menu.array.add row above":"Lisää rivi jälkeen","menu.array.add row below":"Lisää rivi ennen","menu.array.add column after":"Lisää sarake jälkeen","menu.array.add column before":"Lisää sarake ennen","menu.array.delete row":"Poista rivi","menu.array.delete rows":"Poista valitut rivit","menu.array.delete column":"Poista sarake","menu.array.delete columns":"Poista valitut sarakkeet","submenu.array.insert separator":"Aseta erotin","menu.insert table":"Lisää taulukko","submenu.table style":"Taulukon tyyli"},fr:{"keyboard.tooltip.functions":"Fonctions","keyboard.tooltip.symbols":"Symboles","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.command":"Mode de commandes LaTeX","keyboard.tooltip.numeric":"Numérique","keyboard.tooltip.roman":"Lettres romaines","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"Rétablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler","menu.insert matrix":"Insérer une Matrice","menu.insert vector":"Insérer un Vecteur","submenu.array.matrix delimiters":"Délimiteurs de la Matrice","menu.array.add row above":"Ajouter une Ligne Avant","menu.array.add row below":"Ajouter une Ligne Après","menu.array.add column before":"Ajouter une Colonne Avant","menu.array.add column after":"Ajouter une Colonne Après","menu.array.delete row":"Enlever une Ligne","menu.array.delete rows":"Enlever les Lignes Sélectionées","menu.array.delete column":"Enlever une Colone","menu.array.delete columns":"Enlever les Colonnes Sélectionées","submenu.array.insert separator":"Insérer un Séparateur","menu.insert table":"Insérer une Table","submenu.table style":"Style de la Table"},ga:{"keyboard.tooltip.functions":"Feidhmeanna","keyboard.tooltip.symbols":"Siombailí","keyboard.tooltip.greek":"Litreacha na Gréige","keyboard.tooltip.command":"Mód Ordú LaTeX","keyboard.tooltip.numeric":"Uimhriúil","keyboard.tooltip.roman":"Litreacha Rómhánacha","tooltip.copy to clipboard":"Cóipeáil chuig an Ghearrthaisce","tooltip.redo":"Athdhéan","tooltip.toggle virtual keyboard":"Méarchláir Fíorúil a Fháil","tooltip.undo":"Cealaigh","menu.insert matrix":"Cuir isteach Maitrís","menu.insert vector":"Cuir isteach Veicteoir","submenu.array.matrix delimiters":"Delimiters Maitrís","menu.array.add row above":"Cuir Rae Tar éis","menu.array.add row below":"Cuir Rae Roimh","menu.array.add column after":"Cuir Colún Tar éis","menu.array.add column before":"Cuir Colún Roimh","menu.array.delete row":"Scrios Rae","menu.array.delete rows":"Scrios Sraitheanna Roghnaithe","menu.array.delete column":"Scrios Colún","menu.array.delete columns":"Scrios Colúin Roghnaithe","submenu.array.insert separator":"Cuir Deighilteoir isteach","menu.insert table":"Ionsáigh Tábla","submenu.table style":"Stíl Tábla"},he:{"keyboard.tooltip.functions":"פונקציות","keyboard.tooltip.symbols":"סמלים","keyboard.tooltip.greek":"אותיות יווניות","keyboard.tooltip.command":"מצב פקודה לטקס","keyboard.tooltip.numeric":"מספרי","keyboard.tooltip.roman":"מכתבים רומיים","tooltip.copy to clipboard":"העתק ללוח","tooltip.redo":"לַעֲשׂוֹת שׁוּב","tooltip.toggle virtual keyboard":"החלף את המקלדת הווירטואלית","tooltip.undo":"לבטל","menu.insert matrix":"הכנס מטריקס","menu.insert vector":"הכנס וקטור","submenu.array.matrix delimiters":"מפרידי מטריקס","menu.array.add row above":"הוסף שורה אחרי","menu.array.add row below":"הוסף שורה לפני","menu.array.add column after":"הוסף עמודה אחרי","menu.array.add column before":"הוסף עמודה לפני","menu.array.delete row":"מחק שורה","menu.array.delete rows":"מחק שורות שנבחרו","menu.array.delete column":"מחק עמודה","menu.array.delete columns":"מחק עמודות שנבחרו","submenu.array.insert separator":"הכנס מפריד","menu.insert table":"הכנס טבלה","submenu.table style":"טבלה סִגְנוֹן"},hr:{"keyboard.tooltip.functions":"Funkcije","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Grčka slova","keyboard.tooltip.command":"LaTeX naredbeni način","keyboard.tooltip.numeric":"Numerički","keyboard.tooltip.roman":"Rimska slova","tooltip.copy to clipboard":"Kopirati u međuspremnik","tooltip.redo":"Ponovi","tooltip.toggle virtual keyboard":"Uključi / isključi virtualnu tipkovnicu","tooltip.undo":"Poništi","menu.insert matrix":"Umetni matricu","menu.insert vector":"Umetni vektor","submenu.array.matrix delimiters":"Matrični razdjelnici","menu.array.add row above":"Dodaj redak nakon","menu.array.add row below":"Dodaj redak prije","menu.array.add column after":"Dodaj stupac nakon","menu.array.add column before":"Dodaj stupac prije","menu.array.delete row":"Izbriši redak","menu.array.delete rows":"Izbriši odabrane retke","menu.array.delete column":"Izbriši stupac","menu.array.delete columns":"Izbriši odabrane stupce","submenu.array.insert separator":"Umetni separator","menu.insert table":"Umetni tablicu","submenu.table style":"Stil tabele"},id:{"keyboard.tooltip.functions":"Fungsi","keyboard.tooltip.symbols":"Simbol","keyboard.tooltip.greek":"Huruf Yunani","keyboard.tooltip.command":"Mode Perintah LaTeX","keyboard.tooltip.numeric":"Numerik","keyboard.tooltip.roman":"Surat Romawi","tooltip.copy to clipboard":"Menyalin ke clipboard","tooltip.redo":"Mengulangi","tooltip.toggle virtual keyboard":"Alihkan Keyboard Virtual","tooltip.undo":"Membuka","menu.insert matrix":"Sisipkan Matriks","menu.insert vector":"Sisipkan Vektor","submenu.array.matrix delimiters":"Pembatas Matriks","menu.array.add row above":"Tambahkan Baris Setelah","menu.array.add row below":"Tambahkan Baris Sebelumnya","menu.array.add column after":"Tambahkan Kolom Setelah","menu.array.add column before":"Tambahkan Kolom Sebelumnya","menu.array.delete row":"Hapus Baris","menu.array.delete rows":"Hapus Baris yang Dipilih","menu.array.delete column":"Hapus Kolom","menu.array.delete columns":"Hapus Kolom yang Dipilih","submenu.array.insert separator":"Sisipkan Pemisah","menu.insert table":"Sisipkan Tabel","submenu.table style":"Gaya Tabel"},hi:{"keyboard.tooltip.functions":"कार्यों","keyboard.tooltip.symbols":"प्रतीक","keyboard.tooltip.greek":"ग्रीक अक्षर","keyboard.tooltip.command":"लाटेक्स कमांड मोड","keyboard.tooltip.numeric":"संख्यात्मक","keyboard.tooltip.roman":"रोमन पत्र","tooltip.copy to clipboard":"क्लिपबोर्ड पर कॉपी करें","tooltip.redo":"फिर से करें","tooltip.toggle virtual keyboard":"वर्चुअल कीबोर्ड टॉगल करें","tooltip.undo":"पूर्ववत","menu.insert matrix":"मैट्रिक्स डालें","menu.insert vector":"वेक्टर डालें","submenu.array.matrix delimiters":"मैट्रिक्स सीमांकक","menu.array.add row above":"बाद में पंक्ति जोड़ें","menu.array.add row below":"पहले पंक्ति जोड़ें","menu.array.add column after":"बाद में कॉलम जोड़ें","menu.array.add column before":"पहले कॉलम जोड़ें","menu.array.delete row":"पंक्ति को हटाएं","menu.array.delete rows":"चयनित पंक्तियों को हटाएं","menu.array.delete column":"कॉलम हटाएं","menu.array.delete columns":"चयनित कॉलम हटाएं","submenu.array.insert separator":"विभाजक डालें","menu.insert table":"टेबल इंसर्ट करें","submenu.table style":"टेबल स्टाइल"},hu:{"keyboard.tooltip.functions":"Funkciók","keyboard.tooltip.symbols":"Szimbólumok","keyboard.tooltip.greek":"Görög levelek","keyboard.tooltip.command":"LaTeX Parancs mód","keyboard.tooltip.numeric":"Numerikus","keyboard.tooltip.roman":"Római levelek","tooltip.copy to clipboard":"Másolja a vágólapra","tooltip.redo":"Újra","tooltip.toggle virtual keyboard":"Váltás a virtuális billentyűzetre","tooltip.undo":"Visszavonás","menu.insert matrix":"Helyezze be a Mátrixot","menu.insert vector":"Vektor beszúrása","submenu.array.matrix delimiters":"Mátrixhatárolók","menu.array.add row above":"Sor hozzáadása után","menu.array.add row below":"Add Add Sor előtt","menu.array.add column after":"Oszlop hozzáadása után","menu.array.add column before":"Add oszlop előtt","menu.array.delete row":"Sor törlése","menu.array.delete rows":"Kijelölt sorok törlése","menu.array.delete column":"Oszlop törlése","menu.array.delete columns":"A kijelölt oszlopok törlése","submenu.array.insert separator":"Helyezze be az elválasztót","menu.insert table":"Helyezze be a táblázatot","submenu.table style":"Táblázatos stílus"},it:{"keyboard.tooltip.functions":"Funzioni","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Lettere greche","keyboard.tooltip.command":"Modalità di comando LaTeX","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.roman":"Lettere romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.redo":"Rifare","tooltip.toggle virtual keyboard":"Attiva / disattiva la tastiera virtuale","tooltip.undo":"Disfare","menu.insert matrix":"Inserisci una Matrice","menu.insert vector":"Inserisci Vettore","submenu.array.matrix delimiters":"Delimitatori di Matrice","menu.array.add row above":"Aggiungi una Riga Prima","menu.array.add row below":"Aggiungi una Riga Dopo","menu.array.add column before":"Aggiungi una Colonna Prima","menu.array.add column after":"Aggiungi una Colonna Dopo","menu.array.delete row":"Rimuovi una Riga","menu.array.delete rows":"Rimuovi le Righe Selezionate","menu.array.delete column":"Rimuovi una Colonna","menu.array.delete columns":"Rimuovi le Colonne Selezionate","submenu.array.insert separator":"Inserisci un Separatore","menu.insert table":"Inserisci Tabella","submenu.table style":"Stile tabella"},is:{"keyboard.tooltip.functions":"Aðgerðir","keyboard.tooltip.symbols":"Tákn","keyboard.tooltip.greek":"Grísk bréf","keyboard.tooltip.command":"LaTeX stjórnunarstilling","keyboard.tooltip.numeric":"Tölulegt","keyboard.tooltip.roman":"Rómversk bréf","tooltip.copy to clipboard":"Afritaðu á klemmuspjald","tooltip.redo":"Endurtaka","tooltip.toggle virtual keyboard":"Skiptu um sýndarlyklaborð","tooltip.undo":"Afturkalla","menu.insert matrix":"Settu fylki inn","menu.insert vector":"Settu inn Vector","submenu.array.matrix delimiters":"Matrix afmörkun","menu.array.add row above":"Bæta við röð á eftir","menu.array.add row below":"Bæta við röð áður","menu.array.add column after":"Bæta við dálki á eftir","menu.array.add column before":"Bæta við dálki áður","menu.array.delete row":"Eyða röð","menu.array.delete rows":"Eyða völdum línum","menu.array.delete column":"Eyða dálki","menu.array.delete columns":"Eyða völdum dálkum","submenu.array.insert separator":"Settu skiljuna í","menu.insert table":"Settu inn töflu","submenu.table style":"Töflu stíl"},ja:{"keyboard.tooltip.functions":"関数","keyboard.tooltip.symbols":"シンボル","keyboard.tooltip.greek":"ギリシャ文字","keyboard.tooltip.command":"ラテックスコマンドモード","keyboard.tooltip.numeric":"数値","keyboard.tooltip.roman":"ローマ字","tooltip.copy to clipboard":"クリップボードにコピー","tooltip.redo":"やり直し","tooltip.toggle virtual keyboard":"仮想キーボードの切り替え","tooltip.undo":"元に戻す","menu.insert matrix":"マトリックスを挿入","menu.insert vector":"ベクトルを挿入","submenu.array.matrix delimiters":"行列区切り文字","menu.array.add row above":"後に行を追加","menu.array.add row below":"前に行を追加","menu.array.add column after":"後に列を追加","menu.array.add column before":"前に列を追加","menu.array.delete row":"行を削除","menu.array.delete rows":"選択した行を削除する","menu.array.delete column":"列を削除","menu.array.delete columns":"選択した列を削除する","submenu.array.insert separator":"セパレーターを挿入","menu.insert table":"テーブルを挿入","submenu.table style":"テーブルスタイル"},ko:{"keyboard.tooltip.functions":"기능","keyboard.tooltip.symbols":"기호","keyboard.tooltip.greek":"그리스 문자","keyboard.tooltip.command":"유액 명령 모드","keyboard.tooltip.numeric":"숫자","keyboard.tooltip.roman":"로마 문자","tooltip.copy to clipboard":"클립 보드에 복사","tooltip.redo":"다시 하다","tooltip.toggle virtual keyboard":"가상 키보드 전환","tooltip.undo":"실행 취소","menu.insert matrix":"매트릭스 삽입","menu.insert vector":"벡터 삽입","submenu.array.matrix delimiters":"행렬 구분 기호","menu.array.add row above":"뒤에 행 추가","menu.array.add row below":"앞에 행 추가","menu.array.add column after":"뒤에 열 추가","menu.array.add column before":"앞에 열 추가","menu.array.delete row":"행 삭제","menu.array.delete rows":"선택한 행 삭제","menu.array.delete column":"열 삭제","menu.array.delete columns":"선택한 열 삭제","submenu.array.insert separator":"구분자 삽입","menu.insert table":"표 삽입","submenu.table style":"테이블 스타일"},lv:{"keyboard.tooltip.functions":"Funkcijas","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Grieķu burti","keyboard.tooltip.command":"LaTeX komandu režīms","keyboard.tooltip.numeric":"Ciparu skaitlis","keyboard.tooltip.roman":"Romiešu vēstules","tooltip.copy to clipboard":"Kopēt starpliktuvē","tooltip.redo":"Pārtaisīt","tooltip.toggle virtual keyboard":"Pārslēgt virtuālo tastatūru","tooltip.undo":"Atsaukt","menu.insert matrix":"Ievietojiet matricu","menu.insert vector":"Ievietot vektoru","submenu.array.matrix delimiters":"Matricas norobežotāji","menu.array.add row above":"Pievienot rindu pēc","menu.array.add row below":"Pievienot rindu pirms","menu.array.add column after":"Pievienot kolonnu pēc","menu.array.add column before":"Pievienot kolonnu pirms","menu.array.delete row":"Dzēst rindu","menu.array.delete rows":"Dzēst atlasītās rindas","menu.array.delete column":"Dzēst kolonnu","menu.array.delete columns":"Dzēst atlasītās kolonnas","submenu.array.insert separator":"Ievietojiet atdalītāju","menu.insert table":"Ievietojiet tabulu","submenu.table style":"Galda stils"},lt:{"keyboard.tooltip.functions":"Funkcijos","keyboard.tooltip.symbols":"Simboliai","keyboard.tooltip.greek":"Graikiškos raidės","keyboard.tooltip.command":"LaTeX komandų režimas","keyboard.tooltip.numeric":"Skaitmeninis","keyboard.tooltip.roman":"Romos laiškai","tooltip.copy to clipboard":"Nukopijuoti į iškarpinę","tooltip.redo":"Perdaryti","tooltip.toggle virtual keyboard":"Perjungti virtualiąją klaviatūrą","tooltip.undo":"Atšaukti","menu.insert matrix":"Ievietojiet matricu","menu.insert vector":"Ievietot vektoru","submenu.array.matrix delimiters":"Matricas norobežotāji","menu.array.add row above":"Pievienot rindu pēc","menu.array.add row below":"Pievienot rindu pirms","menu.array.add column after":"Pievienot kolonnu pēc","menu.array.add column before":"Pievienot kolonnu pirms","menu.array.delete row":"Dzēst rindu","menu.array.delete rows":"Dzēst atlasītās rindas","menu.array.delete column":"Dzēst kolonnu","menu.array.delete columns":"Dzēst atlasītās kolonnas","submenu.array.insert separator":"Ievietojiet atdalītāju","menu.insert table":"Ievietojiet tabulu","submenu.table style":"Tabulas stili"},lu:{"keyboard.tooltip.functions":"Funktiounen","keyboard.tooltip.symbols":"Symboler","keyboard.tooltip.greek":"Griichesch Bréiwer","keyboard.tooltip.command":"LaTeX Kommando Modus","keyboard.tooltip.numeric":"Numeresch","keyboard.tooltip.roman":"Réimesch Bréiwer","tooltip.copy to clipboard":"Kopéiert op Clipboard","tooltip.redo":"Nees nei maachen","tooltip.toggle virtual keyboard":"Wiesselt Virtuell Tastatur","tooltip.undo":"Undoen","menu.insert matrix":"Matrix asetzen","menu.insert vector":"Insert Vector","submenu.array.matrix delimiters":"Matrix Ofgrenzer","menu.array.add row above":"Dobäizemaachen Rei No","menu.array.add row below":"Füügt Rei vir","menu.array.add column after":"Dobäizemaachen Kolonn No","menu.array.add column before":"Kolonn derbäi Virun","menu.array.delete row":"Rad läschen","menu.array.delete rows":"Läscht Ausgewielte Reien","menu.array.delete column":"Läscht Kolonn","menu.array.delete columns":"Läscht Ausgewielte Kolonnen","submenu.array.insert separator":"Insert Separator","menu.insert table":"Dësch anzeginn","submenu.table style":"Dësch Style"},nl:{"keyboard.tooltip.functions":"Functies","keyboard.tooltip.symbols":"Symbolen","keyboard.tooltip.greek":"Griekse letters","keyboard.tooltip.command":"LaTeX commando mode","keyboard.tooltip.numeric":"Numeriek","keyboard.tooltip.roman":"Romeinse letters","tooltip.copy to clipboard":"Kopiëren naar klembord","tooltip.redo":"Opnieuw","tooltip.toggle virtual keyboard":"Schakel naar virtueel toetsenbord","tooltip.undo":"Ongedaan maken","menu.insert matrix":"Matrix invoegen","menu.insert vector":"Vector invoegen","submenu.array.matrix delimiters":"Matrixscheidingstekens","menu.array.add row above":"Rij toevoegen na","menu.array.add row below":"Rij toevoegen eerder","menu.array.add column after":"Kolom toevoegen na","menu.array.add column before":"Kolom toevoegen voor","menu.array.delete row":"Verwijder rij","menu.array.delete rows":"Geselecteerde rijen verwijderen","menu.array.delete column":"Kolom verwijderen","menu.array.delete columns":"Geselecteerde kolommen verwijderen","submenu.array.insert separator":"Scheidingsteken invoegen","menu.insert table":"Tabel invoegen","submenu.table style":"Tabelstijl"},no:{"keyboard.tooltip.functions":"Funksjoner","keyboard.tooltip.symbols":"Symboler","keyboard.tooltip.greek":"Greske bokstaver","keyboard.tooltip.command":"LaTeX kommandomodus","keyboard.tooltip.numeric":"Numerisk","keyboard.tooltip.roman":"Romerske bokstaver","tooltip.copy to clipboard":"Kopiere til utklippstavle","tooltip.redo":"Gjøre om","tooltip.toggle virtual keyboard":"Bytt virtuelt tastatur","tooltip.undo":"Angre","menu.insert matrix":"Sett inn matrise","menu.insert vector":"Sett inn vektor","submenu.array.matrix delimiters":"Matrix avgrensere","menu.array.add row above":"Legg til rad etter","menu.array.add row below":"Legg til rad før","menu.array.add column after":"Legg til kolonne etter","menu.array.add column before":"Legg til kolonne før","menu.array.delete row":"Slett rad","menu.array.delete rows":"Slett valgte rader","menu.array.delete column":"Slett kolonne","menu.array.delete columns":"Slett valgte kolonner","submenu.array.insert separator":"Sett inn skilletegn","menu.insert table":"Sett inn tabell","submenu.table style":"Tabellstil"},mk:{"keyboard.tooltip.functions":"Функции","keyboard.tooltip.symbols":"Симболи","keyboard.tooltip.greek":"Грчки букви","keyboard.tooltip.command":"Режим на команда во латекс","keyboard.tooltip.numeric":"Нумерички","keyboard.tooltip.roman":"Римски писма","tooltip.copy to clipboard":"Копирајте во клипборд","tooltip.redo":"Повторно","tooltip.toggle virtual keyboard":"Вклучете ја виртуелната тастатура","tooltip.undo":"Врати","menu.insert matrix":"Вметнете матрица","menu.insert vector":"Вметни вектор","submenu.array.matrix delimiters":"Разграничувачи на матрица","menu.array.add row above":"Додадете ред после","menu.array.add row below":"Додади ред пред тоа","menu.array.add column after":"Додадете колона после","menu.array.add column before":"Додадете колона пред тоа","menu.array.delete row":"Избриши го редот","menu.array.delete rows":"Избришете ги избраните редови","menu.array.delete column":"Избриши ја колоната","menu.array.delete columns":"Избриши ја колоната","submenu.array.insert separator":"Вметнете сепаратор","menu.insert table":"Вметни табела","submenu.table style":"Табела стил"},pl:{"keyboard.tooltip.functions":"Funkcje","keyboard.tooltip.symbols":"Symbolika","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.command":"Tryb poleceń LaTeX","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.roman":"Litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.redo":"Przywróć","tooltip.toggle virtual keyboard":"Przełącz wirtualną klawiaturę","tooltip.undo":"Cofnij","menu.insert matrix":"Wstaw macierz","menu.insert vector":"Wstaw wektor","submenu.array.matrix delimiters":"Ograniczniki macierzy","menu.array.add row above":"Dodaj wiersz po","menu.array.add row below":"Dodaj wiersz przed","menu.array.add column after":"Dodaj kolumnę po","menu.array.add column before":"Dodaj kolumnę przed","menu.array.delete row":"Usuń wiersz","menu.array.delete rows":"Usuń wybrane wiersze","menu.array.delete column":"Usuń kolumnę","menu.array.delete columns":"Usuń wybrane kolumny","submenu.array.insert separator":"Wstaw separator","menu.insert table":"Wypełnij tabelę","submenu.table style":"Styl tabelę"},pt:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Símbolos","keyboard.tooltip.greek":"Letras gregas","keyboard.tooltip.command":"Modo de Comando LaTeX","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.roman":"Letras romanas","tooltip.copy to clipboard":"Copiar para área de transferência","tooltip.redo":"Refazer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Desfazer","menu.insert matrix":"Inserir Matriz","menu.insert vector":"Inserir vetor","submenu.array.matrix delimiters":"Delimitadores de matriz","menu.array.add row above":"Adicionar linha depois","menu.array.add row below":"Adicionar linha antes","menu.array.add column after":"Adicionar coluna depois","menu.array.add column before":"Adicionar coluna antes","menu.array.delete row":"Excluir linha","menu.array.delete rows":"Excluir linhas selecionadas","menu.array.delete column":"Apagar Coluna","menu.array.delete columns":"Excluir Colunas Selecionadas","submenu.array.insert separator":"Inserir Separador","menu.insert table":"Insira a tabela","submenu.table style":"Estilo tabela"},ro:{"keyboard.tooltip.functions":"Funcții","keyboard.tooltip.symbols":"Simboluri","keyboard.tooltip.greek":"Scrisori grecești","keyboard.tooltip.command":"Modul de comandă latex","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.roman":"Scrisori romane","tooltip.copy to clipboard":"Copiați în clipboard","tooltip.redo":"A reface","tooltip.toggle virtual keyboard":"Comutați tastatura virtuală","tooltip.undo":"Anula","menu.insert matrix":"Introduceți Matrix","menu.insert vector":"Inserați Vector","submenu.array.matrix delimiters":"Delimitatori de matrice","menu.array.add row above":"Adăugați rândul după","menu.array.add row below":"Adăugați rândul înainte","menu.array.add column after":"Adăugați o coloană după","menu.array.add column before":"Adăugați o coloană înainte","menu.array.delete row":"Ștergeți rândul","menu.array.delete rows":"Ștergeți rândurile selectate","menu.array.delete column":"Ștergeți coloana","menu.array.delete columns":"Ștergeți coloanele selectate","submenu.array.insert separator":"Introduceți separatorul","menu.insert table":"Introduceți tabelul","submenu.table style":"Table style"},ru:{"keyboard.tooltip.functions":"Функции","keyboard.tooltip.symbols":"Символы","keyboard.tooltip.greek":"Греческие буквы","keyboard.tooltip.command":"Режим командной строки Латекс","keyboard.tooltip.numeric":"числовой","keyboard.tooltip.roman":"Латинские буквы","tooltip.copy to clipboard":"Скопировать в буфер обмена","tooltip.redo":"переделывать","tooltip.toggle virtual keyboard":"Переключить виртуальную клавиатуру","tooltip.undo":"расстегивать","menu.insert matrix":"Вставить матрицу","menu.insert vector":"Вставить вектор","submenu.array.matrix delimiters":"Матричные разделители","menu.array.add row above":"Добавить строку после","menu.array.add row below":"Добавить строку перед","menu.array.add column after":"Добавить столбец после","menu.array.add column before":"Добавить столбец перед","menu.array.delete row":"Удалить строку","menu.array.delete rows":"Удалить выбранные строки","menu.array.delete column":"Удалить столбец","menu.array.delete columns":"Удалить выбранные столбцы","submenu.array.insert separator":"Вставить разделитель","menu.insert table":"Вставить таблицу","submenu.table style":"Табличный стиль"},sk:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Symboly","keyboard.tooltip.greek":"Grécke listy","keyboard.tooltip.command":"Príkazový režim LaTeX","keyboard.tooltip.numeric":"Numerické","keyboard.tooltip.roman":"Rímske listy","tooltip.copy to clipboard":"Skopírovať do schránky","tooltip.redo":"Znova","tooltip.toggle virtual keyboard":"Prepnúť virtuálnu klávesnicu","tooltip.undo":"Vrátenie späť","menu.insert matrix":"Vložte maticu","menu.insert vector":"Vložte vektor","submenu.array.matrix delimiters":"Oddeľovače matíc","menu.array.add row above":"Pridajte riadok za","menu.array.add row below":"Pridajte riadok pred","menu.array.add column after":"Pridať stĺpec za","menu.array.add column before":"Pridajte stĺpec predtým","menu.array.delete row":"Odstrániť riadok","menu.array.delete rows":"Odstrániť vybraté riadky","menu.array.delete column":"Odstrániť stĺpec","menu.array.delete columns":"Odstrániť vybraté stĺpce","submenu.array.insert separator":"Vložte oddeľovač","menu.insert table":"Vložte tabuľku","submenu.table style":"Štýl tabuľky"},sl:{"keyboard.tooltip.functions":"Funkcije","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Grška pisma","keyboard.tooltip.command":"Ukazni način LaTeX","keyboard.tooltip.numeric":"Številsko","keyboard.tooltip.roman":"Rimska pisma","tooltip.copy to clipboard":"Kopirati v odložišče","tooltip.redo":"Ponovi","tooltip.toggle virtual keyboard":"Preklop navidezne tipkovnice","tooltip.undo":"Razveljavi","menu.insert matrix":"Vstavi matrico","menu.insert vector":"Vstavi vektor","submenu.array.matrix delimiters":"Matrični ločevalniki","menu.array.add row above":"Dodaj vrstico po","menu.array.add row below":"Dodaj vrstico prej","menu.array.add column after":"Dodaj stolpec po","menu.array.add column before":"Dodaj stolpec prej","menu.array.delete row":"Izbriši vrstico","menu.array.delete rows":"Izbriši izbrane vrstice","menu.array.delete column":"Izbriši stolpec","menu.array.delete columns":"Izbriši izbrane stolpce","submenu.array.insert separator":"Vstavi ločilo","menu.insert table":"Vstavi tabelo","submenu.table style":"Tabela slog"},sq:{"keyboard.tooltip.functions":"Funksione","keyboard.tooltip.symbols":"Simbolet","keyboard.tooltip.greek":"Letrat Greke","keyboard.tooltip.command":"Modaliteti i komandës latex","keyboard.tooltip.numeric":"Numerike","keyboard.tooltip.roman":"Letrat romake","tooltip.copy to clipboard":"Kopjoni në Clipboard","tooltip.redo":"Riparo","tooltip.toggle virtual keyboard":"Aktivizo tastierën virtuale","tooltip.undo":"Zhbëj","menu.insert matrix":"Vendosni Matricën","menu.insert vector":"Vendos vektorin","submenu.array.matrix delimiters":"Përcaktuesit e matricës","menu.array.add row above":"Shto Rreshtin Pas","menu.array.add row below":"Shto Rreshtin Para","menu.array.add column after":"Shto kolonën pas","menu.array.add column before":"Shto kolonën para","menu.array.delete row":"Fshi Rreshtin","menu.array.delete rows":"Fshi rreshtat e zgjedhur","menu.array.delete column":"Fshi kolonën","menu.array.delete columns":"Fshi kolonat e zgjedhura","submenu.array.insert separator":"Vendos Ndarësin","menu.insert table":"Vendos tabelën","submenu.table style":"Stili tabelën"},sr:{"keyboard.tooltip.functions":"Функције","keyboard.tooltip.symbols":"Симболи","keyboard.tooltip.greek":"Греек Леттерс","keyboard.tooltip.command":"ЛаТеКс командни режим","keyboard.tooltip.numeric":"Нумерички","keyboard.tooltip.roman":"Римска писма","tooltip.copy to clipboard":"Копирајте у међуспремник","tooltip.redo":"Понови","tooltip.toggle virtual keyboard":"Укључи / искључи виртуелну тастатуру","tooltip.undo":"Опозови","menu.insert matrix":"Уметни матрицу","menu.insert vector":"Уметни вектор","submenu.array.matrix delimiters":"Матрик Делимитерс","menu.array.add row above":"Додај ред после","menu.array.add row below":"Додај ред пре","menu.array.add column after":"Додај колону после","menu.array.add column before":"Додај колону пре","menu.array.delete row":"Избриши ред","menu.array.delete rows":"Избриши изабране редове","menu.array.delete column":"Избриши колону","menu.array.delete columns":"Избриши изабране колоне","submenu.array.insert separator":"Уметни сепаратор","menu.insert table":"Убаци табелу","submenu.table style":"Табеларни стил"},sv:{"keyboard.tooltip.functions":"Funktioner","keyboard.tooltip.symbols":"Symboler","keyboard.tooltip.greek":"Grekiska bokstäver","keyboard.tooltip.command":"LaTeX kommandoläge","keyboard.tooltip.numeric":"Numerisk","keyboard.tooltip.roman":"Romerska bokstäver","tooltip.copy to clipboard":"Kopiera till Urklipp","tooltip.redo":"Göra om","tooltip.toggle virtual keyboard":"Växla virtuellt tangentbord","tooltip.undo":"Ångra","menu.insert matrix":"Sätt in matris","menu.insert vector":"Infoga vektor","submenu.array.matrix delimiters":"Matrisavgränsare","menu.array.add row above":"Lägg till rad efter","menu.array.add row below":"Lägg till rad före","menu.array.add column after":"Lägg till kolumn efter","menu.array.add column before":"Lägg till kolumn före","menu.array.delete row":"Radera rad","menu.array.delete rows":"Ta bort valda rader","menu.array.delete column":"Ta bort kolumn","menu.array.delete columns":"Ta bort valda kolumner","submenu.array.insert separator":"Sätt i separator","menu.insert table":"Infoga tabell","submenu.table style":"Tabellstil"},th:{"keyboard.tooltip.functions":"ฟังก์ชั่น","keyboard.tooltip.symbols":"สัญลักษณ์","keyboard.tooltip.greek":"อักษรกรีก","keyboard.tooltip.command":"โหมดคำสั่ง น้ำยาง","keyboard.tooltip.numeric":"ตัวเลข","keyboard.tooltip.roman":"อักษรโรมัน","tooltip.copy to clipboard":"คัดลอกไปที่คลิปบอร์ด","tooltip.redo":"ทำซ้ำ","tooltip.toggle virtual keyboard":"สลับแป้นพิมพ์เสมือน","tooltip.undo":"เลิกทำ","menu.insert matrix":"แทรกเมทริกซ์","menu.insert vector":"แทรกเวกเตอร์","submenu.array.matrix delimiters":"ตัวคั่นเมทริกซ์","menu.array.add row above":"เพิ่มแถวหลัง","menu.array.add row below":"เพิ่มแถวก่อน","menu.array.add column after":"เพิ่มคอลัมน์หลัง","menu.array.add column before":"เพิ่มคอลัมน์ก่อน","menu.array.delete row":"ลบแถว","menu.array.delete rows":"ลบแถวที่เลือก","menu.array.delete column":"ลบคอลัมน์","menu.array.delete columns":"ลบคอลัมน์ที่เลือก","submenu.array.insert separator":"ตัวคั่นแทรก","menu.insert table":"แทรกตาราง","submenu.table style":"สไตล์ตาราง"},tr:{"keyboard.tooltip.functions":"Fonksiyonlar","keyboard.tooltip.symbols":"Semboller","keyboard.tooltip.greek":"Yunan harfleri","keyboard.tooltip.command":"LaTeX Komut Modu","keyboard.tooltip.numeric":"Sayısal","keyboard.tooltip.roman":"Roma Harfleri","tooltip.copy to clipboard":"Panoya kopyala","tooltip.redo":"Yeniden yap","tooltip.toggle virtual keyboard":"Sanal Klavyeyi Aç/Kapat","tooltip.undo":"Geri alma","menu.insert matrix":"Matris Ekle","menu.insert vector":"Vektör Ekle","submenu.array.matrix delimiters":"Matris Sınırlayıcılar","menu.array.add row above":"Satırdan Sonra Ekle","menu.array.add row below":"Önce Satır Ekle","menu.array.add column after":"Sonra Sütun Ekle","menu.array.add column before":"Önce Sütun Ekle","menu.array.delete row":"Sırayı sil","menu.array.delete rows":"Seçili Satırları Sil","menu.array.delete column":"Sütunu Sil","menu.array.delete columns":"Seçili Sütunları Sil","submenu.array.insert separator":"Ayırıcı Ekle","menu.insert table":"Tablo Ekle","submenu.table style":"Tablo Stili"},uk:{"keyboard.tooltip.functions":"Функції","keyboard.tooltip.symbols":"Символи","keyboard.tooltip.greek":"Грецькі літери","keyboard.tooltip.command":"Командний режим латексу","keyboard.tooltip.numeric":"Числовий","keyboard.tooltip.roman":"Римські літери","tooltip.copy to clipboard":"Копіювати в буфер обміну","tooltip.redo":"Повторити","tooltip.toggle virtual keyboard":"Переключити віртуальну клавіатуру","tooltip.undo":"Скасувати","menu.insert matrix":"Вставити матрицю","menu.insert vector":"Вставити вектор","submenu.array.matrix delimiters":"Матричні роздільники","menu.array.add row above":"Додати рядок після","menu.array.add row below":"Додати рядок до","menu.array.add column after":"Додати стовпець після","menu.array.add column before":"Додати стовпець перед","menu.array.delete row":"Видалити рядок","menu.array.delete rows":"Видалити вибрані рядки","menu.array.delete column":"Видалити стовпець","menu.array.delete columns":"Видалити вибрані стовпці","submenu.array.insert separator":"Вставте роздільник","menu.insert table":"Вставити таблицю","submenu.table style":"Стиль таблиці"},vi:{"keyboard.tooltip.functions":"Chức năng","keyboard.tooltip.symbols":"Ký hiệu","keyboard.tooltip.greek":"Chữ Hy Lạp","keyboard.tooltip.command":"Chế độ lệnh LaTeX","keyboard.tooltip.numeric":"Số","keyboard.tooltip.roman":"Chữ cái La mã","tooltip.copy to clipboard":"Sao chép vào clipboard","tooltip.redo":"Làm lại","tooltip.toggle virtual keyboard":"Chuyển đổi bàn phím ảo","tooltip.undo":"Hoàn tác","menu.insert matrix":"Chèn ma trận","menu.insert vector":"Insert Vector","submenu.array.matrix delimiters":"Dấu phân cách ma trận","menu.array.add row above":"Thêm hàng sau","menu.array.add row below":"Thêm hàng trước","menu.array.add column after":"Thêm cột sau","menu.array.add column before":"Thêm cột trước","menu.array.delete row":"Xóa hàng","menu.array.delete rows":"Xóa hàng đã chọn","menu.array.delete column":"Xóa cột","menu.array.delete columns":"Xóa các cột đã chọn","submenu.array.insert separator":"Chèn dấu phân cách","menu.insert table":"Chèn bảng","submenu.table style":"Kiểu bảng"},zh_cn:{"keyboard.tooltip.functions":"职能","keyboard.tooltip.symbols":"符号","keyboard.tooltip.greek":"希腊字母","keyboard.tooltip.command":"乳胶 命令模式","keyboard.tooltip.numeric":"数字","keyboard.tooltip.roman":"罗马字母","tooltip.copy to clipboard":"复制到剪贴板","tooltip.redo":"重做","tooltip.toggle virtual keyboard":"切换虚拟键盘","tooltip.undo":"撤消","menu.insert matrix":"插入矩阵","menu.insert vector":"插入向量","submenu.array.matrix delimiters":"矩阵分隔符","menu.array.add row above":"在后面添加行","menu.array.add row below":"在前面添加行","menu.array.add column after":"在后面添加列r","menu.array.add column before":"在前面添加列","menu.array.delete row":"删除行","menu.array.delete rows":"删除选定行","menu.array.delete column":"删除列","menu.array.delete columns":"删除选定的列","submenu.array.insert separator":"插入分隔符","menu.insert table":"插入表格","submenu.table style":"表格样式"},zh_tw:{"keyboard.tooltip.functions":"職能","keyboard.tooltip.symbols":"符號","keyboard.tooltip.greek":"希臘字母","keyboard.tooltip.command":"乳膠命令模式","keyboard.tooltip.numeric":"數字","keyboard.tooltip.roman":"羅馬字母","tooltip.copy to clipboard":"複製到剪貼板","tooltip.redo":"重做","tooltip.toggle virtual keyboard":"切換虛擬鍵盤","tooltip.undo":"撤消","menu.insert matrix":"插入矩陣","menu.insert vector":"插入向量","submenu.array.matrix delimiters":"矩陣分隔符","menu.array.add row above":"在後面添加行","menu.array.add row below":"在前面添加行","menu.array.add column after":"在後面添加列","menu.array.add column before":"在前面添加列","menu.array.delete row":"刪除行","menu.array.delete rows":"刪除選定行","menu.array.delete column":"刪除列","menu.array.delete columns":"刪除選定的列","submenu.array.insert separator":"插入分隔符","menu.insert table":"插入表格","submenu.table style":"表格樣式"}},fd={strings:md,_locale:"",get locale(){return fd._locale||(fd._locale=ys()?navigator.language.slice(0,5):"en"),fd._locale},set locale(e){fd._locale=e},merge(e,t){if(e&&t){const i=fd._locale;fd.locale=e,fd.strings[e]={...fd.strings[e],...t},fd.locale=i}else if(e&&!t)for(const i of Object.keys(e))fd.merge(i,e[i])}};function gd(e){if(void 0===e)return;const t=fd.locale.slice(0,2);let i="";return fd.strings[fd.locale]&&(i=fd.strings[fd.locale][e]),!i&&fd.strings[t]&&(i=fd.strings[t][e]),i||(i=fd.strings.en[e]),i||void 0}function vd(){const e={registers:{},smartFence:!1,fractionNavigationOrder:"numerator-denominator",placeholderSymbol:"▢",letterShapeStyle:fd.locale.startsWith("fr")?"french":"tex",colorMap:pu,backgroundColorMap:mu,getDefinition:yd,getMacro(e){return bd(e,el())}};return{...e,registers:pd(e)}}function yd(e,t="math"){if(!e||0===e.length)return null;let i=null;if(e.startsWith("\\")){if(i=Ns[e],i)return i;"math"===t?i=Ss[e]:Ts[e]&&(i={definitionType:"symbol",type:"mord",codepoint:Ts[e]})}else if("math"===t){if(i=Ss[e],!i&&1===e.length){const t=Fs("math",e.codePointAt(0));return t.startsWith("\\")?{...yd(t,"math"),command:t}:null}}else Ts[e]?i={definitionType:"symbol",type:"mord",codepoint:Ts[e]}:"text"===t&&(i={definitionType:"symbol",type:"mord",codepoint:e.codePointAt(0)});return!i||"symbol"!==i.definitionType||"mord"!==i.type||102!==i.codepoint&&103!==i.codepoint&&104!==i.codepoint||(i.isFunction=!0),null!==i&&void 0!==i?i:null}function bd(e,t){if(!e.startsWith("\\"))return null;const i=e.slice(1);return t[i]}const wd={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},xd={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},Ad=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,kd=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,Sd=[/^[a-z]$/,/^[A-Z]$/,Ad,kd],Md={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]};class Nd extends nu{constructor(){super("math")}createAtom(e,t,i){var r,n,a,o,s;const l=t.getDefinition(e,"math");if(null===l)return new ac("mord",t,{mode:"math",command:e,value:e,style:i});if("symbol"===l.definitionType){const o=new ac(null!==(r=l.type)&&void 0!==r?r:"mord",t,{mode:"math",command:null!==(n=l.command)&&void 0!==n?n:e,value:String.fromCodePoint(l.codepoint),style:i});return null!==(a=l.isFunction)&&void 0!==a&&a&&(o.isFunction=!0),e.startsWith("\\")&&(o.verbatimLatex=e),o}const u=new ac("mord",t,{mode:"math",command:null!==(o=l.command)&&void 0!==o?o:e,value:e,style:i});return null!==(s=l.isFunction)&&void 0!==s&&s&&(u.isFunction=!0),e.startsWith("\\")&&(u.verbatimLatex=e),u}serialize(e,t){const{parent:i}=e[0],r=null===i||void 0===i?void 0:i.computedStyle.fontSize;return $u(ou(e,"fontSize").map((e=>{const n=Cd(e,t),a=e[0].computedStyle.fontSize;return!a||i&&r===a?n:"\\"+["","tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"][a]+" "+n})))}applyStyle(e,t){if(void 0===t.variant)return"";const i="auto"!==t.letterShapeStyle&&t.letterShapeStyle?t.letterShapeStyle:"tex";let{variant:r}=t,{variantStyle:n}=t;"normal"===r&&!n&&/[\u00A3\u0131\u0237]/.test(e.value)&&(r="main",n="italic"),"normal"!==r||n||1!==e.value.length||Sd.forEach(((t,r)=>{t.test(e.value)&&"it"===Md[i][r]&&(n="italic")})),"up"===n&&(n=void 0);const a=n?r+"-"+n:r;console.assert(void 0!==wd[a]);const[o,s]=wd[a];return xd[r]&&!xd[r].test(e.value)?(e.value=Ks(e.value,r,n),null):(Ad.test(e.value)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),o)}}function zd(e,t){var i;const{parent:r}=e[0],n=Ed(r),a=null!==(i=null===r||void 0===r?void 0:r.mode)&&void 0!==i?i:"math";return $u(ou(e,"variant").map((e=>{const i=Ed(e[0]);if(e.every((e=>{const t=e.context.getDefinition(e.command,a);return!(!t||"function"===t.definitionType||!t.variant)&&Ed(e)===i})))return $u(e.map((e=>ac.serialize(e,t))));let r="";return i&&i!==n&&(r={calligraphic:"\\mathcal{",fraktur:"\\mathfrak{","double-struck":"\\mathbb{",script:"\\mathscr{",monospace:"\\mathtt{","sans-serif":"\\mathsf{",normal:"\\mathrm{","normal-italic":"\\mathnormal{","normal-bold":"\\mathbf{","normal-bolditalic":"\\mathbfit{",ams:"","ams-italic":"\\mathit{","ams-bold":"\\mathbf{","ams-bolditalic":"\\mathbfit{",main:"","main-italic":"\\mathit{","main-bold":"\\mathbf{","main-bolditalic":"\\mathbfit{"}[i],console.assert(void 0!==r)),r?r+$u(e.map((e=>ac.serialize(e,t))))+"}":$u(e.map((e=>ac.serialize(e,t))))})))}function Ld(e,t){const{parent:i}=e[0],r=null===i||void 0===i?void 0:i.computedStyle.color;return $u(ou(e,"color").map((e=>{var n,a;const o=zd(e,t),s=e[0].computedStyle;return null!==(n=t.skipStyles)&&void 0!==n&&n||!s.color||i&&r===s.color?o:"\\textcolor{"+(null!==(a=s.verbatimColor)&&void 0!==a?a:s.color)+"}{"+o+"}"})))}function Cd(e,t){const{parent:i}=e[0],r=null===i||void 0===i?void 0:i.computedStyle.backgroundColor;return $u(ou(e,"backgroundColor").map((e=>{var n,a;let o=Ld(e,t);const s=e[0].computedStyle;return null!==(n=t.skipStyles)&&void 0!==n&&n||!o.trim()||!s.backgroundColor||i&&r===s.backgroundColor||!(e.length>0)&&e[0]instanceof Yc||(o=`\\ensuremath{${o}}`,o=`\\colorbox{${null!==(a=s.verbatimBackgroundColor)&&void 0!==a?a:s.backgroundColor}}{${o}}`),o})))}function Ed(e){if(!e)return"";const{style:t}=e;if(void 0===t.variant)return"";let i=t.variant;return t.variantStyle&&"up"!==t.variantStyle&&(i+="-"+t.variantStyle),i}function _d(e){return[$u(e.map((e=>e[0]))),e.map((e=>e[1])).some((e=>!0===e))]}function Td(e,t){return[$u(e.map((e=>ac.serialize(e,t)))),!0]}function Bd(e,t){return _d(ou(e,"fontShape").map((e=>{const[i,r]=Td(e,t),{fontShape:n}=e[0].style;return"it"===n?["\\textit{"+i+"}",!1]:"sl"===n?["\\textsl{"+i+"}",!1]:"sc"===n?["\\textsc{"+i+"}",!1]:"n"===n?["\\textup{"+i+"}",!1]:n?[`{\\fontshape{${e[0].style.fontShape}}${i}`,!1]:[i,r]})))}function Id(e,t){return _d(ou(e,"fontSeries").map((e=>{const[i,r]=Bd(e,t),{fontSeries:n}=e[0].style;return"b"===n?[`\\textbf{${i}}`,!1]:"l"===n?[`\\textlf{${i}}`,!1]:"m"===n?[`\\textmd{${i}}`,!1]:n?[`\\fontseries{${n}}${i}`,!1]:[i,r]})))}function qd(e,t){return _d(ou(e,"fontSize").map((e=>{var i,r;const[n,a]=Id(e,t),o=null!==(r=["","tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"][null!==(i=e[0].style.fontSize)&&void 0!==i?i:""])&&void 0!==r?r:"";return o?[`{\\${o} ${n}}`,a]:[n,a]})))}function Dd(e,t){return _d(ou(e,"fontFamily").map((e=>{var i,r;const[n,a]=qd(e,t),o=null!==(r={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[null!==(i=e[0].style.fontFamily)&&void 0!==i?i:""])&&void 0!==r?r:"";return o?[`\\${o}{${n}}`,!1]:e[0].style.fontFamily?[`\\fontfamily{${e[0].style.fontFamily}}${n}`,a]:[n,a]})))}function Od(e,t){return Dd(e,t)}function Rd(e,t){return _d(ou(e,"backgroundColor").map((e=>{var i,r;const[n,a]=Fd(e,t),o=e[0].computedStyle;return null!==(i=t.skipStyles)&&void 0!==i&&i||!o.backgroundColor||"none"===o.backgroundColor?[n,a]:[`\\colorbox{${null!==(r=o.verbatimBackgroundColor)&&void 0!==r?r:o.backgroundColor}}{${n}}`,!1]})))}function Fd(e,t){var i;if(!e||0===e.length)return["",!1];const r=null===(i=e[0].parent)||void 0===i?void 0:i.style.color;return _d(ou(e,"color").map((e=>{var i,n;const[a,o]=Od(e,t);return null!==(i=t.skipStyles)&&void 0!==i&&i||!e[0].style.color||"none"===e[0].style.color||r===e[0].style.color?[a,o]:[`\\textcolor{${null!==(n=e[0].style.verbatimColor)&&void 0!==n?n:e[0].style.color}}{${a}}`,!1]})))}new Nd;const Pd={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"};class Vd extends nu{constructor(){super("text")}createAtom(e,t,i){const r=t.getDefinition(e,"text");return r&&"symbol"===r.definitionType?new qc(e,String.fromCodePoint(r.codepoint),null!==i&&void 0!==i?i:{},t):null}serialize(e,t){var i;let[r,n]=Rd(e,t);return!0===(null!==(i=t.skipModeCommand)&&void 0!==i&&i)&&(n=!1),n&&(r=`\\text{${r}}`),r}applyStyle(e,t){var i,r,n,a,o,s;const{fontFamily:l}=t;if(Pd[l]?e.classes+=null!==(i=" "+Pd[l])&&void 0!==i?i:"":l&&e.setStyle("font-family",l),t.fontShape&&(e.classes+=" ",e.classes+=null!==(r={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape])&&void 0!==r?r:""),t.fontSeries){const i=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);i&&(e.classes+=" ",e.classes+=null!==(a={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"}[null!==(n=i[1])&&void 0!==n?n:""])&&void 0!==a?a:"",e.classes+=" ",e.classes+=null!==(s={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"}[null!==(o=i[2])&&void 0!==o?o:""])&&void 0!==s?s:"")}return"Main-Regular"}}new Vd;class Ud extends nu{constructor(){super("latex")}createAtom(e,t,i){return new sh(e,t)}serialize(e,t){return e.filter((e=>e instanceof sh&&!e.isSuggestion)).map((e=>e.value)).join("")}applyStyle(){return null}}function Kd(e,t="math"){const i=vd(),r=new ac("root",i);return r.body=Rc(e,i,{parseMode:t}),ld(r)}function Hd(e){return Th(e,{format:"ascii-math"})[1]}new Ud;const Gd={latexToAsciiMath:Kd,asciiMathToLatex:Hd,FUNCTIONS:Ns,MATH_SYMBOLS:Ss,TEXT_SYMBOLS:Ts,ENVIRONMENTS:zs,DEFAULT_KEYBINDINGS:Fh,getKeybindingMarkup:id},jd={"\\ne":"","\\neq":"&neq;","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"∥","\\mid":"∣","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"⟨","\\rangle":"⟩","\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉","\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"},Qd="⁡",Wd="⁢";function Zd(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function Yd(e,t){return e&&t.generateID?` extid="${e}"`:""}function Xd(e,t,i){let r=!1;t=null!==t&&void 0!==t?t:e.atoms.length;let n="",a="";const o=e.atoms[e.index];return e.index0&&(r=!0,n=a,"mi"!==e.lastType&&"mn"!==e.lastType&&"mtext"!==e.lastType&&"fence"!==e.lastType||/^(.*)<\/mo>$/.test(n)||(n=`${Wd}${n}`),a.endsWith(">f")||a.endsWith(">g")?(n+=`${Qd}`,e.lastType="applyfunction"):e.lastType=/^(.*)<\/mo>$/.test(n)?"mo":"mi",tp(a,e,i)||(e.mathML+=n)),r}function Jd(e){return e.index${e}${a}${n}`:n?o=`${e}${n}`:a&&(o=`${e}${a}`),t.mathML+=o,t.lastType="",!0}function ip(e,t,i){t=null!==t&&void 0!==t?t:e.atoms.length;const r=e.index;let n="";while(e.index0&&(e.mathML+=`${n}`,e.lastType="mtext",!0)}function rp(e,t,i){t=null!==t&&void 0!==t?t:e.atoms.length;const r=e.index;let n="",a=ep(e);a>=0&&a"+n+"",a<0&&Jd(e)&&(a=e.index,e.index+=1),tp(n,e,i)||(e.mathML+=n,e.lastType="mn"),!0)}function np(e,t,i){let r=!1;t=null!==t&&void 0!==t?t:e.atoms.length;let n="",a="";if(e.index",n+=sp(e.atoms[l],i),n+=op(e.atoms,l+1,u,i).mathML,n+=sp(e.atoms[u],i),n+="","mi"!==e.lastType&&"mn"!==e.lastType&&"mfrac"!==e.lastType&&"fence"!==e.lastType||(n=`${Wd}${n}`),e.index=u+1,tp(n,e,i)&&(r=!0,e.lastType="",n=""),a="fence")}return n.length>0&&(r=!0,e.mathML+=n,e.lastType=a),r}function ap(e,t,i){let r=!1;t=null!==t&&void 0!==t?t:e.atoms.length;let n="",a="";const o=e.atoms[e.index];if(e.index"+e,n+=op(o.subscript,0,0,i).mathML,n+=op(o.superscript,0,0,i).mathML,n+=""):o.superscript?(n+=""+e,n+=op(o.superscript,0,0,i).mathML,n+=""):(n+=""+e,n+=op(o.subscript,0,0,i).mathML,n+=""),a="mo"}else{const t=e.atoms[e.index],r="\\operatorname"===t.value,o=r?'"+lp(t.value)+"":sp(t,i);n+=o,r||/^(.*)<\/mo>$/.test(o)?a=r?"mi":"mo":(n+=`${Qd}`,a="applyfunction")}"mi"!==e.lastType&&"mn"!==e.lastType||/^(.*)<\/mo>$/.test(n)||(n=`${Wd}${n}`),e.index+=1}return tp(n,e,i)||n.length>0&&(r=!0,e.mathML+=n,e.lastType=a),r}function op(e,t,i,r){const n={atoms:[],index:null!==t&&void 0!==t?t:0,mathML:"",lastType:""};if("number"===typeof e||"boolean"===typeof e)n.mathML=e.toString();else if("string"===typeof e)n.mathML=e;else if(e instanceof ac)n.mathML=up(e,r);else if(Array.isArray(e)){n.atoms=e;let t=0;i=i||(e?e.length:0);while(n.index0&&"genfrac"===n.atoms[n.index].type&&(e=""+e),"genfrac"===n.atoms[n.index].type?n.lastType="mfrac":n.lastType="",n.index+=1,tp(e,n,r)?t+=2:e.length>0&&(n.mathML+=e,t+=1)}t>1&&(n.mathML=""+n.mathML+"")}return n}function sp(e,t){let i="";const r=lp(e.value);return r&&(i=""+r+""),i}function lp(e){if(!e)return"";if("string"===typeof e)return Zd(e);if(!Array.isArray(e)&&"string"===typeof e.body)return Zd(e.body);let t="";for(const i of e)"string"===typeof i.value&&(t+=i.value);return Zd(t)}function up(e,t){var i,r,n,a,o,s,l,u,c,h,d,p,m,f,g,v;const y={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋"},b={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"ℏ","\\cdotp":"⋅","\\ldots":"…","\\cdots":"⋯","\\ddots":"⋱","\\vdots":"⋮","\\ldotp":"."},w={cal:"script",frak:"fraktur",bb:"double-struck",scr:"script",cmtt:"monospace",cmss:"sans-serif"},x={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let A,k,S,M,N,z,L="",C="",E=null!==(r=w[null!==(i=e.fontFamily)&&void 0!==i?i:e.font])&&void 0!==r?r:"";E&&(E=` mathvariant="${E}"`);const{command:_}=e;if("text"===e.mode)L=`${e.value}`;else switch(e.type){case"first":break;case"group":case"root":L=jd[e.command]?jd[e.command]:op(e.body,0,0,t).mathML;break;case"array":if((e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(L+="",e.leftDelim&&"."!==e.leftDelim&&(L+=""+(jd[e.leftDelim]||e.leftDelim)+"")),L+="",A=0;A"+op(e.array[k][A],0,0,t).mathML+"";L+=""}L+="",(e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(e.rightDelim&&"."!==e.rightDelim&&(L+=""+(jd[e.leftDelim]||e.rightDelim)+""),L+="");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(L+=""),e.leftDelim&&"."!==e.leftDelim&&(L+=""+(jd[e.leftDelim]||e.leftDelim)+""),e.hasBarLine?(L+="",L+=op(e.above,0,0,t).mathML||" ",L+=op(e.below,0,0,t).mathML||" ",L+=""):(L+="",L+=""+op(e.above,0,0,t).mathML+"",L+=""+op(e.below,0,0,t).mathML+"",L+=""),e.rightDelim&&"."!==e.rightDelim&&(L+=""+(jd[e.rightDelim]||e.rightDelim)+""),(e.leftDelim||e.rightDelim)&&(L+="");break;case"surd":e.hasEmptyBranch("above")?(L+="",L+=op(e.body,0,0,t).mathML,L+=""):(L+="",L+=op(e.body,0,0,t).mathML,L+=op(e.above,0,0,t).mathML,L+="");break;case"leftright":L="",e.leftDelim&&"."!==e.leftDelim&&(L+=""+(null!==(n=jd[e.leftDelim])&&void 0!==n?n:e.leftDelim)+""),e.body&&(L+=op(e.body,0,0,t).mathML),e.rightDelim&&"."!==e.rightDelim&&(L+=""+(null!==(a=jd[e.rightDelim])&&void 0!==a?a:e.rightDelim)+""),L+="";break;case"sizeddelim":case"delim":L+='"+(jd[e.delim]||e.delim)+"";break;case"accent":L+='",L+=op(e.body,0,0,t).mathML,L+=""+(jd[_]||e.accent)+"",L+="";break;case"line":case"overlap":break;case"overunder":N=e.above,M=e.below,(e.svgAbove||N)&&(e.svgBelow||M)?z=e.body:N&&N.length>0?(z=e.body,(null===(s=null===(o=e.body)||void 0===o?void 0:o[0])||void 0===s?void 0:s.below)?(M=e.body[0].below,z=e.body[0].body):"first"===(null===(u=null===(l=e.body)||void 0===l?void 0:l[0])||void 0===u?void 0:u.type)&&(null===(h=null===(c=e.body)||void 0===c?void 0:c[1])||void 0===h?void 0:h.below)&&(M=e.body[1].below,z=e.body[1].body)):M&&M.length>0&&(z=e.body,(null===(p=null===(d=e.body)||void 0===d?void 0:d[0])||void 0===p?void 0:p.above)?(N=e.body[0].above,z=e.body[0].body):"first"===(null===(f=null===(m=e.body)||void 0===m?void 0:m[0])||void 0===f?void 0:f.type)&&(null===(v=null===(g=e.body)||void 0===g?void 0:g[1])||void 0===v?void 0:v.above)&&(N=e.body[1].overscript,z=e.body[1].body)),(e.svgAbove||N)&&(e.svgBelow||M)?(L+=``,L+=y[e.svgBody]||op(z,0,0,t).mathML,L+=y[e.svgBelow]||op(M,0,0,t).mathML,L+=y[e.svgAbove]||op(N,0,0,t).mathML,L+=""):e.svgAbove||N?(L+=``+(y[e.svgBody]||op(z,0,0,t).mathML),L+=y[e.svgAbove]||op(N,0,0,t).mathML,L+=""):(e.svgBelow||M)&&(L+=``+(y[e.svgBody]||op(z,0,0,t).mathML),L+=y[e.svgBelow]||op(M,0,0,t).mathML,L+="");break;case"placeholder":case"mord":{L=b[_]||_||("string"===typeof e.value?e.value:"");const i=_?_.match(/{?\\char"([\dabcdefABCDEF]*)}?/):null;i?L="&#x"+i[1]+";":L.length>0&&L.startsWith("\\")&&("string"===typeof e.value&&e.value.charCodeAt(0)>255?L="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":"string"===typeof e.value?L=e.value.charAt(0):(console.log("Did not expect this"),L=""));const r=/\d/.test(L)?"mn":"mi";L=`<${r}${E}${Yd(e.id,t)}>${Zd(L)}`;break}case"mbin":case"mrel":case"minner":L=_&&b[_]?""+b[_]+"":_&&jd[_]?""+jd[_]+"":sp(e,t);break;case"mpunct":L='"+(jd[_]||_)+"";break;case"mop":"​"!==e.body&&(L="",L+="\\operatorname"===_?e.body:_||e.body,L+="");break;case"box":L='"+op(e.body,0,0,t).mathML+"";break;case"spacing":L+='';break;case"enclose":L=''+op(e.body,0,0,t).mathML+"";break;case"space":L+=" ";break;case"msubsup":break;case"phantom":break;case"composition":break;case"rule":console.log("In conversion to MathML, unknown type : "+e.type);break;case"chem":break;case"mopen":L+=sp(e,t);break;case"mclose":L+=sp(e,t);break;case"macro":{const i=e.command+lp(e.macroArgs);i&&(L+=`${i}`)}break;case"error":console.log("In conversion to MathML, unknown type : "+e.type);break;case"latex":L+=""+e.value+"";break;default:console.log("In conversion to MathML, unknown type : "+e.type)}return L}function cp(e,t){return op(e,0,0,t).mathML}const hp={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"eye ","\\sum":"Summation ","\\prod":"Product ",a:'a',A:'capital A',"+":"plus ","-":"minus ",";":' semi-colon ',",":' comma ',"|":'Vertical bar',"(":'Open paren. ',")":' Close paren. ',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","​":"","−":"minus ",":":' such that ',"\\colon":' such that ',"\\hbar":"etch bar ","\\iff":'if, and only if, ',"\\Longleftrightarrow":'if, and only if, ',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set n',"\\C":'the set c',"\\Z":'the set z',"\\Q":'the set q',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'open paren',"\\rparen":'close paren',"\\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 dp(e){let t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t}function pp(e){let t=0;if(vs(e))for(const i of e)"first"!==i.type&&(t+=1);return 1===t}function mp(e){if(vs(e))for(const t of e)if("first"!==t.type&&t.id)return t.id.toString();return""}function fp(e){let t="";if(vs(e))for(const i of e)"first"!==i.type&&"string"===typeof i.value&&(t+=i.value);return t}function gp(e,t){return e?e.map((e=>e.value)).join(""):""}function vp(e,t,i){var r,n,a,o;function s(e){return i.textToSpeechMarkup?/[a-z]/.test(e)?` ${e}`:/[A-Z]/.test(e)?`capital ${e.toLowerCase()}`:e:/[a-z]/.test(e)?" '"+e.toUpperCase()+"'":/[A-Z]/.test(e)?" 'capital "+e.toUpperCase()+"'":e}function l(e){return""+e+""}if(!t)return"";let u="";if(vs(t)){let n=!1,a=!1;for(let o=0;o'),u+=t.value;else{t.id&&"math"===e&&(u+='');let r="",c="",h="",d=!1;switch(t.type){case"group":case"root":u+=vp("math",t.body,i);break;case"genfrac":if(r=vp("math",t.above,i),c=vp("math",t.below,i),pp(t.above)&&pp(t.below)){const e={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "},i=e[fp(t.above)+"/"+fp(t.below)];i?u=i:u+=r+" over "+c}else u+=' the fraction '+r+', over '+c+'. End fraction.';break;case"surd":if(h=vp("math",t.body,i),t.hasEmptyBranch("above"))u+=pp(t.body)?" the square root of "+h+" , ":' the square root of '+h+'. End square root';else{let e=vp("math",t.above,i);e=e.trim();const r=e.replace(//g,"");u+="3"===r?' the cube root of '+h+'. End cube root':"n"===r?' the nth root of '+h+'. End root':' the root with index: '+e+', of '+h+'. End root'}break;case"leftright":{const e=t;u+=null!==(n=e.leftDelim?hp[e.leftDelim]:void 0)&&void 0!==n?n:e.leftDelim,u+=vp("math",t.body,i),u+=null!==(a=e.rightDelim?hp[e.rightDelim]:void 0)&&void 0!==a?a:e.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"placeholder":u+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{const{command:r}=t;if("\\mathbin"===r||"\\mathrel"===r||"\\mathopen"===r||"\\mathclose"===r||"\\mathpunct"===r||"\\mathord"===r||"\\mathinner"===r){u=vp(e,t.body,i);break}let n=t.isDigit()?t.asDigit():t.value,a=t.command;if("delim"!==t.type&&"sizeddelim"!==t.type||(a=t.value,n=a),"text"===e)u+=n;else{if("mbin"===t.type&&(u+=''),n){const e=hp[n]||(a?hp[a.trim()]:"");if(e)u+=" "+e;else{const e=a?dp(a.trim()):"";u+=e||s(n)}}else u+=vp("math",t.body,i);"mbin"===t.type&&(u+='')}break}case"mop":if("​"!==t.value){const e=t.command;if("\\sum"===e)if(t.hasEmptyBranch("superscript")||t.hasEmptyBranch("subscript"))if(t.hasEmptyBranch("subscript"))u+=" the summation of";else{let e=vp("math",t.subscript,i);e=e.trim(),u+=' the summation from '+e+' of ',d=!0}else{let e=vp("math",t.superscript,i);e=e.trim();let r=vp("math",t.subscript,i);r=r.trim(),u+=' the summation from '+r+' to '+e+' of ',d=!0}else if("\\prod"===e)if(t.hasEmptyBranch("superscript")||t.hasEmptyBranch("subscript"))if(t.hasEmptyBranch("subscript"))u+=" the product of ";else{let e=vp("math",t.subscript,i);e=e.trim(),u+=' the product from '+e+' of ',d=!0}else{let e=vp("math",t.superscript,i);e=e.trim();let r=vp("math",t.subscript,i);r=r.trim(),u+=' the product from '+r+' to '+e+' of ',d=!0}else if("\\int"===e)if(t.hasEmptyBranch("superscript")||t.hasEmptyBranch("subscript"))u+=' the integral of ';else{let e=vp("math",t.superscript,i);e=e.trim();let r=vp("math",t.subscript,i);r=r.trim(),u+=' the integral from '+l(r)+' to '+l(e)+' of ',d=!0}else if("string"===typeof t.value){const e=null!==(o=hp[t.value])&&void 0!==o?o:t.command?hp[t.command]:void 0;u+=e||" "+t.value}else t.command&&("\\mathop"===t.command?u+=vp("math",t.body,i):"\\operatorname"===t.command?u+=gp(t.body):u+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command)}break;case"enclose":h=vp("math",t.body,i),u+=pp(t.body)?" crossed out "+h+" , ":" crossed out "+h+". End cross out";break}if(!d&&!t.hasEmptyBranch("superscript")){let r=vp(e,t.superscript,i);r=r.trim();const n=r.replace(/<[^>]*>/g,"");if(pp(t.superscript)){if("math"===e){const e=mp(t.superscript);e&&(u+='')}"′"===n?u+=" prime ":"2"===n?u+=" squared ":"3"===n?u+=" cubed ":Number.isNaN(Number.parseInt(n))?u+=" to the "+r+"; ":u+=' to the '+n+" power; "}else Number.isNaN(Number.parseInt(n))?u+=" raised to the "+r+"; ":u+=' raised to the '+n+" power; "}if(!d&&!t.hasEmptyBranch("subscript")){let e=vp("math",t.subscript,i);e=e.trim(),u+=pp(t.subscript)?" sub "+e:" subscript "+e+". End subscript. "}}return u}function yp(e,t){var i;const r={...t,textToSpeechRulesOptions:{...t.textToSpeechRulesOptions}};if("sre"===r.textToSpeechRules&&ys()&&"sre"in window){const t=cp(e,r);return t?(r.textToSpeechMarkup&&(r.textToSpeechRulesOptions=null!==(i=r.textToSpeechRulesOptions)&&void 0!==i?i:{},r.textToSpeechRulesOptions.markup=r.textToSpeechMarkup,"ssml"===r.textToSpeechRulesOptions.markup&&(r.textToSpeechRulesOptions.markup="ssml_step"),r.textToSpeechRulesOptions.rate=r.speechEngineRate),r.textToSpeechRulesOptions&&window.sre.System.getInstance().setupEngine(r.textToSpeechRulesOptions),window.sre.System.getInstance().toSpeech(t)):""}let n=vp("math",e,r);if("ssml"===r.textToSpeechMarkup){let e="";r.speechEngineRate&&(e=''),n=''+e+"

    "+n+"

    "+(e?"
    ":"")+""}else n="mac"===r.textToSpeechMarkup&&"macos"===As()?n.replace(//g,"").replace(//g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(//g,"[[slc $1]]").replace(/]*>/g,"").replace(/<\/say-as>/g,""):n.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return n}const bp=0,wp=200,xp=1200,Ap=2e3,kp=3e3,Sp=4e3;function Mp(e,t,i=kp,r="$0"){for(const n of t)Ss[n]&&(Ss[n].frequency=i,Ss[n].category=e,Ss[n].template=r.replace(/\$0/g,n)),Ns[n]&&(Ns[n]={...Ns[n],frequency:i,category:e,template:r.replace(/\$0/g,n)})}Mp("Trigonometry",["\\cos","\\sin","\\tan"],Sp),Mp("Trigonometry",["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\lg","\\lb","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th"],Ap),Mp("Functions",["\\ln","\\log","\\exp","\\lim"],Sp),Mp("Functions",["\\dim","\\ker","\\deg","\\det","\\mod","\\min","\\max"],kp),Mp("Functions",["\\hom"],xp),Mp("Decoration",["\\rule"],wp,"$0{2em}{1em}"),Mp("Decoration",["\\color","\\textcolor"],wp,"{$0{m0}A}{$0{m1}B}{$0{m2}C }{$0{m3}a}{$0{m4}b}{$0{m5}c}{$0{m6}8}"),Mp("Decoration",["\\overline","\\underline"],kp,"$0{\\placeholder{}}"),Mp("Decoration",["\\enclose"],xp,'\\enclose{updiagonalstrike,roundedbox}[1px solid red, mathbackground="#fbc0bd"]{x=0}'),Mp("Decoration",["\\fcolorbox"],xp,'\\fcolorbox{#cd0030}{#ffd400}{\\unicode{"2B1A}}'),Mp("Decoration",["\\colorbox"],xp,'\\colorbox{#fbc0bd}{\\unicode{"2B1A}}'),Mp("Decoration",["\\boxed","\\cancel","\\bcancel","\\xcancel"],xp,"$0{\\placeholder{}}"),Mp("Decoration",["\\bbox"],xp,'\\bbox[#ffd400, solid 2px #ffd400]{\\unicode{"2B1A}}'),Mp("Styling",["\\mathbb"],Sp,"$0{Don Knuth}"),Mp("Styling",["\\textbf","\\textup","\\textit","\\textrm","\\textsf","\\texttt","\\textnormal","\\textmd","\\textsl","\\textsc","\\mathsf","\\mathtt","\\mathrm","\\mathfrak","\\mathcal","\\mathscr","\\mathbf","\\mathmd","\\mathit","\\text","\\mbox","\\Bbb","\\bold","\\bm","\\boldsymbol"],kp,"$0{Don Knuth}"),Mp("Styling",["\\frak","\\tt","\\bf","\\it","\\rmfamily","\\sffamily","\\ttfamily","\\class","\\cssId","\\htmlData","\\htmlStyle"],xp,"{$0 Don Knuth}"),Mp("Styling",["\\bfseries","\\mdseries","\\upshape","\\slshape","\\scshape"],xp,"\\text{$0 Don Knuth}"),Mp("Styling",["\\class","\\cssId"],xp,"$0{testIdentifier}{Don Knuth}"),Mp("Styling",["\\fontseries"],xp,"\\text{$0{b}Don Knuth}"),Mp("Styling",["\\fontfamily"],xp,"\\text{$0{cmtt}Don Knuth}"),Mp("Styling",["\\fontshape"],xp,"\\text{$0{sc}Don Knuth}"),Mp("Styling",["\\selectfont"],xp,"\\text{$0}"),Mp("Styling",["\\emph"],xp,"Don$0{Knuth}"),Mp("Styling",["\\em"],xp,"Don{$0 Knuth}"),Mp("Layout",["\\mathop","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathord","\\mathinner","\\operatorname","\\operatorname*"],xp,"x=$0{arg}=0"),Mp("Layout",["\\middle"],xp,"\\left\\{x$0|x>0\\right\\}"),Mp("Layout",["\\overset","\\underset","\\stackrel","\\stackbin"],xp,"$0{arg}{x=0}"),Mp("Layout",["\\rlap","\\mathrlap"],xp,"$0{/}0"),Mp("Layout",["\\llap","\\mathllap"],xp,"o$0{/}"),Mp("Fractions",["\\frac"],Sp,"$0{\\placeholder{}}{\\placeholder{}}"),Mp("Fractions",["\\binom","\\dfrac","\\tfrac","\\dbinom","\\tbinom","\\pdiff","\\cfrac"],xp,"$0{\\placeholder{}}{\\placeholder{}}"),Mp("Fractions",["\\over","\\atop","\\choose"],xp,'\\unicode{"2B1A} $0 \\unicode{"2B1A}'),Mp("Fractions",["\\overwithdelims","\\atopwithdelims"],xp,'{\\unicode{"2B1A} $0{\\lbrace}{\\rbrace} \\unicode{"2B1A}}'),Mp("Extensible Operators",["\\sum","\\prod","\\bigcap","\\bigcup","\\int"],Sp),Mp("Extensible Operators",["\\bigoplus","\\smallint","\\iint","\\oint"],kp),Mp("Extensible Operators",["\\bigwedge","\\bigvee","\\coprod","\\bigsqcup","\\bigotimes","\\bigodot","\\biguplus","\\intop","\\sqcup","\\sqcap","\\uplus","\\wr","\\Cap","\\Cup","\\doublecap","\\doublecup","\\amalg","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"],xp),Mp("Accents",["\\vec"],Sp),Mp("Accents",["\\bar","\\ddot","\\acute","\\tilde","\\check"],kp,"$0{\\placeholder{}}"),Mp("Accents",["\\^","\\`","\\'"],xp,"$0{e}"),Mp("Accents",["\\c"],xp,"$0{c}"),Mp("Accents",["\\~"],xp,"$0{n}"),Mp("Accents",["\\mathring","\\hat","\\dot","\\breve","\\grave"],xp,"$0{\\placeholder{}}"),Mp("Extensible Symbols",["\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftharpoon","\\overrightharpoon","\\overleftrightarrow","\\overbrace","\\overlinesegment","\\overgroup","\\widehat","\\widecheck","\\widetilde"],kp,"$0{ABC}"),Mp("Extensible Symbols",["\\underrightarrow","\\underleftarrow","\\underleftrightarrow","\\underbrace","\\underlinesegment","\\undergroup","\\utilde"],kp,"$0{ABC}"),Mp("Sizing",["\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],xp,"$0{x=0}"),Mp("Sizing",["\\big","\\Big","\\bigg","\\Bigg"],xp,"$0($0)"),Mp("Sizing",["\\bigl","\\Bigl","\\biggl","\\Biggl"],xp,"$0("),Mp("Sizing",["\\bigr","\\Bigr","\\biggr","\\Biggr"],xp,"$0)"),Mp("Sizing",["\\bigm","\\Bigm","\\biggm","\\Biggm"],xp,"$0|"),Mp("Letterlike Symbols",["\\nabla","\\partial","\\N","\\R","\\Q","\\C","\\Z","\\exponentialE","\\forall","\\exists","\\nexists"],Sp),Mp("Letterlike Symbols",["\\doubleStruckCapitalP","\\P","\\ell","\\hbar","\\hslash","\\imath","\\jmath","\\imaginaryI","\\imaginaryJ","\\differentialD","\\rd","\\capitalDifferentialD","\\doubleStruckCapitalN","\\doubleStruckCapitalR","\\doubleStruckCapitalQ","\\doubleStruckCapitalC","\\doubleStruckCapitalZ","\\rD","\\differencedelta","\\mid","@","\\Re","\\Im","\\$","\\%","\\And","\\degree"],kp),Mp("Letterlike Symbols",["\\top","\\bot","\\scriptCapitalE","\\scriptCapitalH","\\scriptCapitalL","\\gothicCapitalC","\\gothicCapitalH","\\gothicCapitalI","\\gothicCapitalR","\\Bbbk","\\Finv","\\Game","\\wp","\\eth","\\mho","\\pounds","\\yen","\\euro"],xp),Mp("Crosses",["\\dagger","\\dag"],Sp),Mp("Crosses",["\\ddag","\\ddagger","\\maltese","\\textdagger","\\textdaggerdbl"],xp),Mp("Various",["\\checkmark","\\diagup","\\diagdown","\\angle","\\measuredangle","\\sphericalangle","\\prime","\\doubleprime","\\backprime","\\backdoubleprime","\\sharp","\\flat","\\natural","\\&","\\#","\\clubsuit","\\spadesuit","\\diamondsuit","\\heartsuit","\\backslash","\\infty","/","\\_","\\/","|","'"],xp),Mp("Various",["\\unicode"],xp,'$0{"2B1A}'),Mp("Arrows",["\\longrightarrow","\\rightarrow","\\Longrightarrow","\\Rightarrow"],Sp),Mp("Arrows",["\\longmapsto","\\mapsto","\\Longleftrightarrow","\\rightleftarrows","\\leftarrow","\\curvearrowleft","\\uparrow","\\downarrow","\\hookrightarrow","\\rightharpoonup","\\rightleftharpoons"],kp),Mp("Arrows",["\\Leftarrow","\\longleftrightarrow","\\longleftarrow","\\Longleftarrow","\\searrow","\\nearrow","\\swarrow","\\nwarrow","\\Uparrow","\\Downarrow","\\updownarrow","\\Updownarrow","\\hookleftarrow","\\leftharpoonup","\\leftharpoondown","\\rightharpoondown","\\leftrightarrows","\\dashrightarrow","\\dashleftarrow","\\leftleftarrows","\\Lleftarrow","\\twoheadleftarrow","\\leftarrowtail","\\looparrowleft","\\leftrightharpoons","\\circlearrowleft","\\Lsh","\\upuparrows","\\downharpoonleft","\\multimap","\\leftrightsquigarrow","\\twoheadrightarrow","\\rightarrowtail","\\looparrowright","\\curvearrowright","\\circlearrowright","\\Rsh","\\downdownarrows","\\upharpoonright","\\downharpoonright","\\rightsquigarrow","\\leadsto","\\Rrightarrow","\\restriction"],xp),Mp("Arrows",["\\upharpoonleft","\\rightrightarrows"],bp),Mp("Negated Arrows",["\\nrightarrow","\\nRightarrow","\\nleftrightarrow","\\nLeftrightarrow","\\nleftarrow","\\nLeftarrow"],xp),Mp("Extensible Symbols",["\\xrightarrow","\\xleftarrow","\\xRightarrow","\\xLeftarrow","\\xleftharpoonup","\\xleftharpoondown","\\xrightharpoonup","\\xrightharpoondown","\\xlongequal","\\xtwoheadleftarrow","\\xtwoheadrightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xrightleftharpoons","\\xleftrightharpoons","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],xp,"$0[below]{above}=0"),Mp("Negated Relations",["\\nless","\\nleqslant","\\lneq","\\lneqq","\\nleqq","\\unlhd","\\unrhd","\\lvertneqq","\\lnsim","\\lnapprox","\\nprec","\\npreceq","\\precnsim","\\precnapprox","\\nsim","\\nshortmid","\\nmid","\\nvdash","\\nvDash","\\ngtr","\\ngeqslant","\\ngeqq","\\gneq","\\gneqq","\\gvertneqq","\\gnsim","\\nsucc","\\succnsim","\\ncong","\\nshortparallel","\\nparallel","\\nVDash","\\nVdash","\\precneqq","\\succneqq","\\gnapprox","\\succnapprox","\\nsucceq"],xp),Mp("Hebrew",["\\aleph","\\beth","\\daleth","\\gimel"],xp),Mp("Fences",["\\lbrace","\\rbrace","\\vert","\\Vert","\\{","\\}","(",")","[","]"],Sp),Mp("Fences",["\\langle","\\rangle","\\lfloor","\\rfloor","\\lceil","\\rceil","\\mvert","\\|","\\mVert"],kp),Mp("Fences",["\\lvert","\\rvert","\\lVert","\\rVert","\\lbrack","\\rbrack","\\ulcorner","\\urcorner","\\llcorner","\\lrcorner","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],xp),Mp("Relations",["=","\\ne","\\neq","<",">","\\leqslant","\\geqslant","\\approx"],Sp),Mp("Relations",["\\lt","\\gt","\\le","\\ge","\\leq","\\geq","\\gg","\\cong","\\equiv","\\prec","\\preceq","\\succ","\\perp","\\parallel","\\propto","\\smile","\\frown","\\sim","\\gtrsim"],kp),Mp("Relations",["\\coloneq","\\succeq","\\approxeq","\\thickapprox","\\lessapprox","\\gtrapprox","\\precapprox","\\succapprox","\\thicksim","\\succsim","\\precsim","\\backsim","\\eqsim","\\backsimeq","\\simeq","\\lesssim","\\nleq","\\ngeq","\\smallsmile","\\smallfrown","\\bowtie","\\asymp","\\leqq","\\eqslantless","\\ll","\\lll","\\lessgtr","\\lesseqgtr","\\lesseqqgtr","\\risingdotseq","\\fallingdotseq","\\preccurlyeq","\\curlyeqprec","\\vDash","\\Vvdash","\\bumpeq","\\Bumpeq","\\geqq","\\eqslantgtr","\\ggg","\\gtrless","\\gtreqless","\\gtreqqless","\\succcurlyeq","\\curlyeqsucc","\\Vdash","\\shortmid","\\shortparallel","\\between","\\pitchfork","\\varpropto","\\backepsilon","\\llless","\\gggtr","\\lhd","\\rhd","\\Join","\\doteq","\\doteqdot","\\Doteq","\\eqcirc","\\circeq","\\lessdot","\\gtrdot","\\measeq","\\eqdef","\\questeq"],xp),Mp("Logic",["\\leftrightarrow","\\Leftrightarrow","\\to"],Sp),Mp("Logic",["\\models","\\vdash"],kp),Mp("Logic",["\\therefore","\\because","\\implies","\\gets","\\dashv","\\impliedby","\\biconditional","\\roundimplies"],xp),Mp("Operators",["+","-","*","\\cdot"],Sp),Mp("Operators",["\\sqrt"],Sp,"$0{\\placeholder{}}"),Mp("Operators",["\\pm","\\mp","\\times","\\div","\\surd"],kp),Mp("Operators",["\\ltimes","\\rtimes","\\leftthreetimes","\\rightthreetimes","\\intercal","\\dotplus","\\centerdot","\\doublebarwedge","\\divideontimes","\\divides"],xp),Mp("Logic",["\\wedge","\\vee","\\neg"],Sp),Mp("Logic",["\\lnot"],kp),Mp("Logic",["\\land","\\lor","\\barwedge","\\veebar","\\nor","\\curlywedge","\\curlyvee"],xp),Mp("Greek",["\\alpha","\\beta","\\gamma","\\delta","\\epsilon","\\varepsilon","\\zeta","\\eta","\\theta","\\vartheta","\\iota","\\kappa","\\varkappa","\\lambda","\\mu","\\nu","\\xi","\\pi","\\varpi","\\rho","\\varrho","\\sigma","\\varsigma","\\tau","\\phi","\\varphi","\\upsilon","\\chi","\\psi","\\omega","\\Gamma","\\Delta","\\Theta","\\Lambda","\\Xi","\\Pi","\\Sigma","\\Upsilon","\\Phi","\\Psi","\\Omega","\\digamma","\\omicron"],kp),Mp("Sets",["\\emptyset","\\varnothing","\\cap","\\cup","\\in","\\notin","\\subset","\\supset","\\subseteq","\\supseteq","\\sqsubseteq"],Sp),Mp("Sets",["\\setminus","\\not","\\ni","\\sqsupseteq","\\nsupseteqq","\\supsetneq","\\varsupsetneq","\\supsetneqq","\\varsupsetneqq"],kp),Mp("Sets",["\\smallsetminus","\\complement","\\owns","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\varsubsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq","\\nsubseteqq","\\subseteqq","\\Subset","\\sqsubset","\\supseteqq","\\Supset","\\sqsupset"],xp),Mp("Spacing",["\\space, \\quad","\\qquad"],kp,'\\unicode{"203A}$0\\unicode{"2039}'),Mp("Spacing",["\\!","\\,","\\:","\\;","\\enskip","\\enspace"],xp,'\\unicode{"203A}$0\\unicode{"2039}'),Mp("Spacing",["\\hspace","\\hspace*"],xp,'\\unicode{"203A}$0{1em}\\unicode{"2039}'),Mp("Punctuation",["\\colon","\\cdotp","\\ldots","\\cdots","\\ddots","\\vdots","?","!",":",'"',",",".",";"],kp),Mp("Punctuation",["\\mathellipsis","\\ldotp","\\Colon"],xp),Mp("Boxes",["\\square","\\Box"],kp),Mp("Boxes",["\\blacksquare","\\boxminus","\\boxplus","\\boxtimes","\\boxdot"],xp),Mp("Circles",["\\circ","\\bullet","\\circleddash","\\oplus","\\otimes"],kp),Mp("Circles",["\\bigcirc","\\circledast","\\ominus","\\circledcirc","\\oslash","\\circledS","\\circledR","\\odot"],xp),Mp("Triangles",["\\triangle","\\triangleq"],kp),Mp("Triangles",["\\bigtriangleup","\\vartriangle","\\triangledown","\\bigtriangledown","\\triangleleft","\\vartriangleleft","\\trianglelefteq","\\ntriangleleft","\\ntrianglelefteq","\\triangleright","\\vartriangleright","\\trianglerighteq","\\ntriangleright","\\ntrianglerighteq","\\blacktriangle","\\blacktriangledown","\\blacktriangleleft","\\blacktriangleright"],xp),Mp("Shapes",["\\ast","\\star"],kp),Mp("Shapes",["\\diamond","\\Diamond","\\lozenge","\\blacklozenge","\\bigstar"],xp);var Np='.ML__keyboard{--hue:206;--keyboard-background:rgba(209,213,217,.97);--keyboard-text:#000;--keyboard-text-active:var(--primary,hsl(var(--hue),40%,50%));--keyboard-background-border:#ddd;--keycap-background:#fff;--keycap-background-active:#e5e5e5;--keycap-background-border:#e5e6e9;--keycap-background-border-bottom:#8d8f92;--keycap-text:#000;--keycap-text-active:#fff;--keycap-secondary-text:#000;--keycap-modifier-background:#b9bdc7;--keycap-modifier-border:#c5c9d0;--keycap-modifier-border-bottom:#989da6;--keyboard-alternate-background:#fff;--keyboard-alternate-background-active:var(--primary,hsl(var(--hue),40%,50%));--keyboard-alternate-text:var(--keycap-text,#000);--keyboard-alternate-text-active:#fff;--keyboard-alternate-key-length:70px;--keyboard-alternate-key-font-size:30px;--keyboard-alternate-key-aside-font-size:12px;--keyboard-height:276px;--keycap-height:52px;--keycap-font-size:20px;--keycap-small-font-size:calc(var(--keycap-font-size)*0.8);--keycap-extra-small-font-size:calc(var(--keycap-font-size)/1.42);--keycap-tt-font-size:calc(var(--keycap-font-size)*1.5);height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--keyboard-zindex,105)}.ML__keyboard.is-visible .ML__keyboard--plate{opacity:1;transform:translateY(calc(var(--keyboard-height, 276px)*-1));transition-timing-function:cubic-bezier(.4,0,1,1);visibility:visible}.ML__keyboard.alternate-keys{align-content:center;background-color:var(--keyboard-alternate-background);border-radius:6px;bottom:auto;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22);box-sizing:content-box;display:flex;flex-direction:row;justify-content:center;max-width:286px;position:fixed;text-align:center;top:0;transform:none;transition:none;visibility:hidden;z-index:calc(var(--keyboard-zindex, 105) + 1)}@media only screen and (max-height:412px){.ML__keyboard.alternate-keys{max-width:320px}}.ML__keyboard.alternate-keys.is-visible{visibility:visible}.ML__keyboard.alternate-keys.compact{--keyboard-alternate-key-length:50px;--keyboard-alternate-key-font-size:24px;--keyboard-alternate-key-aside-font-size:10px}.ML__keyboard.alternate-keys ul{display:flex;flex-flow:row wrap-reverse;justify-content:center;list-style:none;margin:3px;padding:0}.ML__keyboard.alternate-keys ul>li{fill:currentColor;align-items:center;background:transparent;border:1px solid transparent;border-radius:5px;box-sizing:border-box;color:var(--keyboard-alternate-text);display:flex;flex-flow:column;font-size:var(--keyboard-alternate-key-font-size);height:var(--keyboard-alternate-key-length);justify-content:center;margin:0;pointer-events:all;width:var(--keyboard-alternate-key-length)}@media only screen and (max-height:412px){.ML__keyboard.alternate-keys ul>li{font-size:24px;height:50px;width:50px}}.ML__keyboard.alternate-keys ul>li.is-active,.ML__keyboard.alternate-keys ul>li.is-pressed,.ML__keyboard.alternate-keys ul>li:hover{background:var(--keyboard-alternate-background-active);color:var(--keyboard-alternate-text-active)}.ML__keyboard.alternate-keys ul>li.small{font-size:var(--keycap-small-font-size,16px)}.ML__keyboard.alternate-keys ul>li.small-button{background:#fbfbfb;height:42px;margin:2px;width:42px}.ML__keyboard.alternate-keys ul>li.small-button:hover{background:var(--keyboard-alternate-background-active)}.ML__keyboard.alternate-keys ul>li.box>div,.ML__keyboard.alternate-keys ul>li.box>span{border:1px dashed rgba(0,0,0,.24)}.ML__keyboard.alternate-keys ul>li .warning{align-items:center;background:#cd0030;border-radius:5px;color:#fff;display:flex;justify-content:center;min-height:60px;min-width:60px;padding:5px}.ML__keyboard.alternate-keys ul>li .warning.is-active,.ML__keyboard.alternate-keys ul>li .warning.is-pressed,.ML__keyboard.alternate-keys ul>li .warning:hover{background:red}.ML__keyboard.alternate-keys ul>li .warning svg.svg-glyph{height:50px;width:50px}.ML__keyboard.alternate-keys ul>li aside{font-size:var(--keyboard-alternate-key-aside-font-size);line-height:12px;opacity:.78;padding-top:2px}.ML__keyboard .ML__keyboard--plate{-webkit-backdrop-filter:grayscale(50%);backdrop-filter:grayscale(50%);background-color:var(--keyboard-background);border:1px solid var(--keyboard-background-border);bottom:calc(var(--keyboard-height, 276px)*-1);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-sizing:border-box;cursor:pointer;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:16px;font-weight:400;left:0;margin:0;opacity:0;padding-top:5px;pointer-events:all;position:absolute;text-shadow:none;touch-action:none;transform:translate(0);transition:.28s cubic-bezier(0,0,.2,1);transition-property:transform,opacity;-webkit-user-select:none;user-select:none;visibility:hidden;width:100%}.ML__keyboard .ML__keyboard--plate .tex{font-family:KaTeX_Math,KaTeX_Main,Cambria Math,Asana Math,OpenSymbol,Symbola,STIX,Times,serif!important}.ML__keyboard .ML__keyboard--plate .tex-math{font-family:KaTeX_Math,Cambria Math,Asana Math,OpenSymbol,Symbola,STIX,Times,serif!important}.ML__keyboard .ML__keyboard--plate .tt{font-family:IBM Plex Mono,Source Code Pro,Consolas,Roboto Mono,Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace!important;font-size:var(--keycap-tt-font-size,30px);font-weight:400}.ML__keyboard .ML__keyboard--plate>div.keyboard-layer{display:none;outline:none}.ML__keyboard .ML__keyboard--plate>div.keyboard-layer.is-visible{display:flex;flex-flow:column}.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar{align-self:center;display:flex;flex-flow:row;justify-content:space-between;min-width:736px}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar{min-width:556px}}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar{max-width:100vw;min-width:365px;width:365px}}.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar svg{height:20px;width:20px}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar svg{height:13px;width:17px}}.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>.left{display:flex;flex-flow:row;justify-content:flex-start;position:relative}.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>.right{display:flex;flex-flow:row;justify-content:flex-end}.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div{fill:currentColor;align-items:baseline;background:0;border:none;border-bottom:2px solid transparent;box-shadow:none;color:var(--keyboard-text);cursor:pointer;display:flex;font-size:110%;justify-content:center;margin:7px 4px 6px;min-height:0;padding:4px 10px}.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div.disabled svg,.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div.disabled.is-pressed svg,.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div.disabled:hover svg{color:var(--keyboard-text);opacity:.2}@media only screen and (max-width:414px){.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div{font-size:100%;padding:0 6px 0 0}}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div{font-size:90%;padding-left:4px;padding-right:4px}}.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div.is-active,.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div.is-pressed,.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div:active,.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div:hover{color:var(--keyboard-text-active)}.ML__keyboard .ML__keyboard--plate>div>div.keyboard-toolbar>div>div.selected{border-bottom:2px solid var(--keyboard-text-active);color:var(--keyboard-text-active);margin-bottom:8px;padding-bottom:0}.ML__keyboard .ML__keyboard--plate [data-tooltip]{position:relative}.ML__keyboard .ML__keyboard--plate [data-tooltip]:after{background:#616161;border-radius:2px;bottom:100%;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);color:#fff;content:attr(data-tooltip);display:inline-table;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:12px;font-weight:400;max-width:200px;opacity:0;padding:8px;position:absolute;text-align:center;top:inherit;transform:scale(.5);transition:all .15s cubic-bezier(.4,0,1,1) 1s;width:max-content;z-index:2}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate [data-tooltip]:after{font-size:16px;padding:8px 16px}}.ML__keyboard .ML__keyboard--plate [data-tooltip]:hover{position:relative}.ML__keyboard .ML__keyboard--plate [data-tooltip]:hover:after{opacity:1;transform:scale(1)}.ML__keyboard .ML__keyboard--plate div .rows{align-items:center;border:0;border-collapse:separate;clear:both;display:flex;flex-flow:column;margin:auto}.ML__keyboard .ML__keyboard--plate div .rows>ul{height:40px;list-style:none;margin:0 0 3px;padding:0}.ML__keyboard .ML__keyboard--plate div .rows>ul>li{fill:currentColor;-webkit-tap-highlight-color:transparent;align-items:center;background:var(--keycap-background);border:1px solid var(--keycap-background-border);border-bottom-color:var(--keycap-background-border-bottom);border-radius:5px;box-sizing:border-box;color:var(--keycap-text);display:flex;flex-flow:column;float:left;font-size:var(--keycap-font-size,20px);height:40px;justify-content:center;margin-right:2px;overflow:hidden;padding:8px 0;position:relative;text-align:center;-webkit-user-select:none;user-select:none;vertical-align:top;width:34px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li:last-child{margin-right:0}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.small{font-size:var(--keycap-small-font-size,16px)}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.tt{color:var(--keyboard-text-active)}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.bottom{justify-content:flex-end}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.left{align-items:flex-start;padding-left:4px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.right{align-items:flex-end;padding-right:4px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li svg.svg-glyph{height:20px;width:20px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li .warning{align-items:center;background:#cd0030;border-radius:100%;color:#fff;display:flex;height:25px;justify-content:center;margin-bottom:-2px;min-height:25px;min-width:25px;padding:5px;width:25px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li .warning svg.svg-glyph{height:16px;width:16px}@media only screen and (max-width:768px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li .warning{height:16px;min-height:16px;min-width:16px;width:16px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li .warning svg.svg-glyph{height:14px;width:14px}}.ML__keyboard .ML__keyboard--plate div .rows>ul>li>.w0{width:0}.ML__keyboard .ML__keyboard--plate div .rows>ul>li>.w5{width:16px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li>.w15{width:52px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li>.w20{width:70px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li>.w50{width:178px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.separator{background:transparent;border:none;pointer-events:none}@media only screen and (max-width:560px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li.if-wide{display:none}}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.tex-math{font-size:25px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.is-pressed,.ML__keyboard .ML__keyboard--plate div .rows>ul>li:hover{background:var(--keycap-background-active);color:var(--keyboard-text-active)}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action.is-active,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action:active,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.keycap.is-active,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.keycap:active{color:var(--keyboard-text-active);transform:translateY(calc(var(--keycap-height, 52px)*-.2)) scale(1.4);z-index:calc(var(--keyboard-zindex, 105) - 5)}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier.is-active,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier:active{background:var(--keyboard-text-active);color:var(--keycap-text-active)}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action.font-glyph,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier.font-glyph{font-size:18px}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action.font-glyph,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier.font-glyph{font-size:16px}}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li.fnbutton{font-size:12px}}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.bigfnbutton{font-size:var(--keycap-extra-small-font-size,14px)}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li.bigfnbutton{font-size:calc(var(--keycap-extra-small-font-size, 14px)/1.55)}}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier{background-color:var(--keycap-modifier-background);border-color:var(--keycap-modifier-border);border-bottom-color:var(--keycap-modifier-border-bottom);font-size:65%;font-weight:100}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action.selected,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier.selected{color:var(--keyboard-text-active)}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action.selected.is-active,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action.selected.is-pressed,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action.selected:active,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.action.selected:hover,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier.selected.is-active,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier.selected.is-pressed,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier.selected:active,.ML__keyboard .ML__keyboard--plate div .rows>ul>li.modifier.selected:hover{color:#fff}.ML__keyboard .ML__keyboard--plate div .rows>ul>li.keycap.w50{font-size:80%;font-weight:100;padding-top:10px}.ML__keyboard .ML__keyboard--plate div .rows>ul>li small{color:#555}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li small{font-size:9px}}.ML__keyboard .ML__keyboard--plate div .rows>ul>li aside{color:#666;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:10px;line-height:10px}@media only screen and (max-width:767px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li aside{display:none}}@media only screen and (max-width:414px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li{margin-right:2px;width:calc(10vw - 2px)}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w5{width:calc(5vw - 2px)}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w15{width:calc(15vw - 2px)}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w20{width:calc(20vw - 2px)}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w50{width:calc(50vw - 2px)}}@media only screen and (min-width:415px) and (max-width:768px){.ML__keyboard .ML__keyboard--plate div .rows>ul>li{margin-right:3px;width:37px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w5{width:17px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w15{width:57px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w20{width:77px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w50{width:197px}}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard .ML__keyboard--plate div .rows>ul{height:var(--keycap-height,52px)}.ML__keyboard .ML__keyboard--plate div .rows>ul>li{height:var(--keycap-height,52px);margin-right:4px;width:51px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w5{width:23.5px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w15{width:78.5px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w20{width:106px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w50{width:271px}}@media only screen and (min-width:1025px){.ML__keyboard .ML__keyboard--plate div .rows>ul{height:var(--keycap-height,52px)}.ML__keyboard .ML__keyboard--plate div .rows>ul>li{height:var(--keycap-height,52px);margin-right:6px;width:66px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.action,.ML__keyboard .ML__keyboard--plate div .rows>ul>.modifier{font-size:80%}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w5{width:30px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w15{width:102px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w20{width:138px}.ML__keyboard .ML__keyboard--plate div .rows>ul>.w50{width:354px}}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keyboard{--hue:206;--keyboard-background:#4e6373;--keyboard-background:#4e6073;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%)}}body[theme=dark] .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%)}div.ML__keyboard.material{--keyboard-background:rgba(209,213,217,.9);--keyboard-background-border:#ddd;--keycap-background:transparent;--keycap-background-active:#cccfd1;--keycap-background-border:transparent;--keyboard-alternate-background:#efefef;--keyboard-alternate-text:#000;font-family:Roboto,sans-serif}div.ML__keyboard.material.alternate-keys{background:var(--keyboard-alternate-background);border:1px solid transparent;border-radius:5px;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}div.ML__keyboard.material.alternate-keys ul li.is-active,div.ML__keyboard.material.alternate-keys ul li.is-pressed,div.ML__keyboard.material.alternate-keys ul li:active,div.ML__keyboard.material.alternate-keys ul li:hover{fill:currentColor;background:#5f97fc;border:1px solid transparent;color:#fff}div.ML__keyboard.material .ML__keyboard__plate .keyboard-toolbar>div>div{font-size:16px}div.ML__keyboard.material .ML__keyboard__plate .keyboard-toolbar div div:active,div.ML__keyboard.material .ML__keyboard__plate .keyboard-toolbar div div:hover,div.ML__keyboard.material .ML__keyboard__plate .keyboard-toolbar div.div.is-active,div.ML__keyboard.material .ML__keyboard__plate .keyboard-toolbar div.div.is-pressed{fill:currentColor;color:#5f97fc}div.ML__keyboard.material .ML__keyboard__plate .keyboard-toolbar>div>.selected{fill:currentColor;border-bottom:2px solid #5f97fc;color:#5f97fc;margin-bottom:8px;padding-bottom:0}div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap{fill:currentColor;background:transparent;border:1px solid transparent;border-radius:5px;color:var(--keycap-text);transition:none}div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap.tt{color:#5f97fc}div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap[data-key=" "]{background:#e0e0e0;height:20px;margin-bottom:10px;margin-top:10px}div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap[data-key=" "].is-active,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap[data-key=" "].is-pressed,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap[data-key=" "]:active,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap[data-key=" "]:hover{background:#d0d0d0;box-shadow:none;transform:none}div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]):hover{background:var(--keycap-background-active);border:1px solid transparent;box-shadow:none}div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]).is-active,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]).is-pressed,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]):active{background:var(--keyboard-alternate-background);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);color:var(--keyboard-alternate-text)}@media only screen and (max-width:767px){div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]).is-active,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]).is-pressed,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]):active{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);font-size:10px;justify-content:flex-start;margin-left:10px;margin-right:10px;padding:2px 0 0;transform:translateY(-10px) scale(2);transition:none;vertical-align:top;width:19.5px;z-index:calc(var(--ML_keyboard-zindex, 105) - 5)}}@media only screen and (max-width:414px){div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]).is-active,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]).is-pressed,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:not([data-key=" "]):active{width:16.5px}}@media only screen and (max-width:767px){div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:last-child.is-active,div.ML__keyboard.material .ML__keyboard__plate div>.rows>ul>.keycap:last-child:active{margin-left:14px;margin-right:0}}div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.action,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.modifier{fill:currentColor;background:transparent;border:0;color:#869096;font-size:16px;transition:none}div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.action.selected,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.modifier.selected{border-bottom:2px solid #5f97fc;border-radius:0;color:#5f97fc}div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.action.is-active,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.action.is-pressed,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.action:active,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.action:hover,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.modifier.is-active,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.modifier.is-pressed,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.modifier:active,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.modifier:hover{background:var(--keycap-background-active);border:0;box-shadow:none;color:var(--keycap-text)}div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.bigfnbutton,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.fnbutton{background:transparent;border:0}div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.bigfnbutton.selected,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.fnbutton.selected{fill:currentColor;border-bottom:2px solid #5f97fc;border-radius:0;color:#5f97fc}div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.bigfnbutton.is-active,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.bigfnbutton.is-pressed,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.bigfnbutton:active,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.bigfnbutton:hover,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.fnbutton.is-active,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.fnbutton.is-pressed,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.fnbutton:active,div.ML__keyboard.material .ML__keyboard__plate div div.rows ul li.fnbutton:hover{fill:currentColor;background:var(--keycap-background-active);border:0;box-shadow:none;color:#5f97fc}@media (prefers-color-scheme:dark){body:not([theme=light]) div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}';function zp(e,t,i,r){const n=t.split(" ");for(const a of n){const t=a.match(/(.*):(.*)/);if(t){const n=null!==r&&void 0!==r?r:{};"active"===t[2]?n.passive=!1:n[t[2]]=!0,e.addEventListener(t[1],i,n)}else e.addEventListener(a,i,r)}}function Lp(e,t,i,r){const n=t.split(" ");for(const a of n){const t=a.match(/(.*):(.*)/);if(t){const n=null!==r&&void 0!==r?r:{};"active"===t[2]?n.passive=!1:n[t[2]]=!0,e.removeEventListener(t[1],i,n)}else e.removeEventListener(a,i,r)}}function Cp(e){var t;bs();let i=document.getElementById(e);return i?i.dataset.refcount=Number(Number.parseInt(null!==(t=i.getAttribute("data-refcount"))&&void 0!==t?t:"0")+1).toString():(i=document.createElement("div"),i.setAttribute("aria-hidden","true"),i.dataset.refcount="1",i.id=e,document.body.append(i)),i}function Ep(e){var t;if(!e)return;const i=Number.parseInt(null!==(t=e.getAttribute("data-refcount"))&&void 0!==t?t:"0");i<=1?e.remove():e.dataset.refcount=Number(i-1).toString()}function _p(e){var t;return(null===(t=e.element)||void 0===t?void 0:t.mathfield)===e}function Tp(e){var t,i;return null!==(i=null!==(t=e.querySelector(".ML__caret"))&&void 0!==t?t:e.querySelector(".ML__text-caret"))&&void 0!==i?i:e.querySelector(".ML__latex-caret")}function Bp(e){const t=Tp(e);if(!t)return null;const i=t.getBoundingClientRect();return{x:i.right,y:i.bottom,height:i.height}}function Ip(e){var t;if(!e.parent)return"root";let i=null!==(t=e.parent.id)&&void 0!==t?t:"";return i+="string"===typeof e.treeBranch?"-"+e.treeBranch:`-${e.treeBranch[0]}/${e.treeBranch[0]}`,i}function qp(e,t){if(!t)return null;const i=e.field.getBoundingClientRect(),r=t.right-t.left,n=t.bottom-t.top,a=Math.ceil(t.left-i.left+e.field.scrollLeft),o=Math.ceil(t.top-i.top);return{left:a,right:a+r,top:o,bottom:o+n}}function Dp(e){const t=e.getBoundingClientRect(),i=parseInt(getComputedStyle(e).marginRight),r={top:t.top-1,bottom:t.bottom,left:t.left,right:t.right-1+i};if(0===e.children.length||"SVG"===e.tagName.toUpperCase())return r;for(const n of e.children)if(1===n.nodeType&&"atomId"in n.dataset&&!n.classList.contains("pstrut")){const e=Dp(n);r.left=Math.min(r.left,e.left),r.right=Math.max(r.right,e.right),r.top=Math.min(r.top,e.top),r.bottom=Math.max(r.bottom,e.bottom)}return r}function Op(e,t){var i,r;if(!t.id)return null;let n=null!==(r=null===(i=e.atomBoundsCache)||void 0===i?void 0:i.get(t.id))&&void 0!==r?r:null;if(null!==n)return n;const a=e.field.querySelector(`[data-atom-id="${t.id}"]`);return n=a?Dp(a):null,e.atomBoundsCache&&(n?e.atomBoundsCache.set(t.id,n):e.atomBoundsCache.delete(t.id)),null!==n&&void 0!==n?n:null}function Rp(e,t,i){const r=new Map;for(const n of e.model.getAtoms(t,{includeChildren:!0})){if((null===i||void 0===i?void 0:i.excludeAtomsWithBackground)&&n.style.backgroundColor)break;const t=qp(e,Op(e,n));if(t){const e=Ip(n);if(r.has(e)){const i=r.get(e);r.set(e,{left:Math.min(i.left,t.left),right:Math.max(i.right,t.right),top:Math.min(i.top,t.top),bottom:Math.max(i.bottom,t.bottom)})}else r.set(e,t)}}return[...r.values()]}function Fp(e,t){return e.model.selection.ranges.reduce(((i,r)=>i.concat(...Rp(e,r,t))),[])}function Pp(e,t){return"*"===e||("none"===t||("same-origin"===t?!window.origin||e===window.origin:"function"===typeof t&&t(e)))}function Vp(e,t,i){let r,n,a,o,s;"object"===typeof i&&("default"in i||"pressed"in i)?(i.default&&(t.dataset.command=JSON.stringify(i.default)),i.alt&&(t.dataset.commandAlt=JSON.stringify(i.alt)),i.altshift&&(t.dataset.commandAltshift=JSON.stringify(i.altshift)),i.shift&&(t.dataset.commandShift=JSON.stringify(i.shift)),i.pressed&&(t.dataset.commandPressed=JSON.stringify(i.pressed)),i.pressAndHoldStart&&(t.dataset.commandPressAndHoldStart=JSON.stringify(i.pressAndHoldStart)),i.pressAndHoldEnd&&(t.dataset.commandPressAndHoldEnd=JSON.stringify(i.pressAndHoldEnd))):t.dataset.command=JSON.stringify(i),zp(t,"mousedown touchstart:passive",(i=>{if("mousedown"!==i.type||1===i.buttons){i.stopPropagation(),"touchstart"!==i.type&&i.preventDefault(),document.body.style["-webkit-user-select"]="none",t.classList.add("is-pressed"),r=Date.now(),"touchstart"===i.type&&(a=i.changedTouches[0].identifier);const o=t.getAttribute("data-command-pressed");o&&e(JSON.parse(o));const l=t.getAttribute("data-command-press-and-hold-start");l&&(n=t,s&&clearTimeout(s),s=setTimeout((()=>{t.classList.contains("is-pressed")&&e(JSON.parse(l))}),300))}})),zp(t,"mouseleave touchcancel",(()=>{t.classList.remove("is-pressed")})),zp(t,"touchmove:passive",(e=>{for(let t=0;t{1===e.buttons&&t.classList.add("is-pressed")})),zp(t,"mouseup touchend click",(i=>{if(document.body.style["-webkit-user-select"]="",o){i.stopPropagation(),i.preventDefault();const e=o;return o=null,void e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0}))}if(t.classList.remove("is-pressed"),t.classList.add("is-active"),"click"===i.type&&0!==i.detail)return i.stopPropagation(),void i.preventDefault();setTimeout((()=>t.classList.remove("is-active")),150);let a=t.getAttribute("data-command-press-and-hold-end");const s=Date.now();(t!==n||sequal to","\\supseteq":"superset of or
    equal to","\\supset":"superset of","\\subset":"subset of","\\partial":"partial derivative","\\bigcup":"union","\\bigcap":"intersection","\\approx":"approximately equal to","\\notin":"not an element of","\\in":["element of","included in"],"\\infty":"infinity","\\land":"logical and","\\sqrt":"square root","\\prod":"product","\\sum":"summation","\\amalg":["amalgamation","coproduct","free product","disjoint union"],"\\cup":"union with","\\cap":"intersection with","\\int":"integral","\\iint":"surface integral","\\oint":"curve integral","\\iiint":"volume integral","\\iff":"if and only if","\\ln":"natural logarithm","\\boldsymbol":"bold","\\setminus":"set subtraction","\\stackrel":"relation with symbol above","\\stackbin":"operator with symbol above","\\underset":"symbol with annotation below","\\overset":"symbol with annotation above","\\hslash":["h-bar","Planck constant"],"\\gtrsim":"greater than or
    similar to","\\propto":"proportional to","\\equiv":"equivalent to","\\!":["negative thin space","(-3 mu)"],"\\ ":["space","(6 mu)"],"\\,":["thin space","(3 mu)"],"\\:":["medium space","(4 mu)"],"\\;":["thick space","(5 mu)"],"\\quad":["1 em space","(18 mu)"],"\\qquad":["2 em space","(36 mu)"],"\\enskip":["½ em space","(9 mu)"],"\\mp":"minus or plus","\\pm":"plus or minus","\\Im":"Imaginary part of","\\Re":"Real part of","\\gothicCapitalR":"Real part of","\\gothicCapitalI":"Imaginary part part of","\\differentialD":"differential d","\\aleph":["aleph","infinite cardinal",'Wikipedia '],"\\beth":["beth","beth number",'Wikipedia '],"\\gimel":["gimel","gimel function",'Wikipedia '],"\\O":"empty set","\\N":"set of
    natural numbers","\\Z":"set of
    integers","\\Q":"set of
    rational numbers","\\C":"set of
    complex numbers","\\R":"set of
    real numbers","\\P":"set of
    prime numbers","\\lesseqqgtr":"less than, equal to or
    greater than","\\gnapprox":"greater than and
    not approximately","\\lnapprox":"lesser than and
    not approximately","\\j":"dotless j","\\i":"dotless i","\\cdot":"centered dot","\\lmoustache":"left moustache","\\rmoustache":"right moustache","\\nabla":["nabla","del","differential vector operator"],"\\square":["square","d’Alembert operator",'Wikipedia '],"\\blacksquare":["black square","end of proof","tombstone","Halmos symbol"],"\\Box":"end of proof","\\colon":["such that","ratio"],"\\coloneq":["is defined by","is assigned"],"\\Colon":["is defined by","as"],"\\_":["underbar","underscore"],"\\ll":"much less than","\\gg":"much greater than","\\doteq":"approximately equal to","\\Doteq":"approximately equal to","\\doteqdot":"approximately equal to","\\cong":["isomorphism of","(for algebras, modules...)"],"\\det":["determinant of","(of a matrix)"],"\\dotplus":"Cartesian product algebra","\\otimes":["tensor product","(of algebras)","Kronecker product","(of matrices)"],"\\oplus":["direct sum","(of modules)"],"\\lb":"base-2 logarithm","\\lg":"base-10 logarithm","\\wp":["Weierstrass P",'Wikipedia '],"\\wr":["wreath product",'Wikipedia '],"\\top":["tautology","Proposition P is universally true"],"\\bot":["contradiction","Proposition P is contradictory"],"\\mid":["probability","of event A given B"],"\\mho":["Siemens","electrical conductance in SI unit",'Wikipedia '],"\\Longrightarrow":"implies","\\Longleftrightarrow":"if, and only if,","\\prec":"precedes","\\preceq":"precedes or is equal to","\\succ":"succeedes","\\succeq":"succeedes or is equal to","\\perp":["is perpendicular to","is independent of"],"\\models":["entails","double-turnstyle, models","is a semantic consequence of",'Wikipedia '],"\\vdash":["satisfies","turnstyle, assertion sign","syntactic inference",'Wikipedia '],"\\implies":["implies","logical consequence"],"\\impliedby":["implied by","logical consequence"],"\\surd":["surd","root of","checkmark"],"\\ltimes":["semi direct product",'Wikipedia '],"\\rtimes":["semi direct product",'Wikipedia '],"\\leftthreetimes":["semi direct product",'Wikipedia '],"\\rightthreetimes":["semi direct product",'Wikipedia '],"\\divideontimes":["divide on times"],"\\curlywedge":"nor","\\curlyvee":"nand","\\simeq":"is group isomorphic with","\\vartriangleleft":["is a normal subgroup of","is an ideal ring of"],"\\circ":["circle","ring","function composition"],"\\rlap":["overlap right","\\rlap{x}o"],"\\llap":["overlap left","o\\llap{/}"],"\\colorbox":["color box","\\colorbox{#fbc0bd}{...}"],"\\ast":["asterisk","reflexive closure (as a superscript)"],"\\bullet":"bullet","\\lim":"limit"};function Qp(e){var t;let i=null!==(t=jp[e])&&void 0!==t?t:"";return vs(i)&&(i=i.join("
    ")),i}function Wp(e){const t=vd(),i=new ac("root",t);i.body=Rc(e,t,{parseMode:"math"});const r=Cu(Iu(new zu(i.render(new Jl({registers:t.registers},{fontSize:ql},"displaystyle")),{classes:"ML__base"})));return qu(r,{classes:"ML__mathlive"}).toMarkup()}function Zp(e,t,i){if(!t||0===t.length)return void Jp(e);const r=t,n=Wp(t),a=Qp(r),o=td(e.keybindings,r).join("
    ");let s=i?'
    ':"";s+='',s+='
    '+n+"
    ",a&&(s+='
    '+a+"
    "),o&&(s+='
    '+o+"
    "),s+="
    ",s+=i?'
    ':"",e.popover=$p(e,s);let l=e.popover.querySelectorAll(".ML__popover__content");l&&l.length>0&&Vp((t=>e.executeCommand(t)),l[0],{default:["complete","accept-suggestion"]}),l=e.popover.querySelectorAll(".ML__popover__prev-shortcut"),l&&l.length>0&&Vp((t=>e.executeCommand(t)),l[0],"previousSuggestion"),l=e.popover.querySelectorAll(".ML__popover__next-shortcut"),l&&l.length>0&&Vp((t=>e.executeCommand(t)),l[0],"nextSuggestion"),setTimeout((()=>{const t=Bp(e.field);t&&Xp(e,t),e.popover&&(e.popover.classList.add("is-visible"),e.popoverVisible=!0)}),32)}function Yp(e,t){var i;if(e.element&&e.element.mathfield===e&&e.popover&&e.popoverVisible)if(null===t||void 0===t?void 0:t.deferred)setTimeout((()=>Yp(e)),100);else if("latex"!==(null===(i=e.model.at(e.model.position))||void 0===i?void 0:i.type))Jp(e);else{const t=Bp(e.field);t&&Xp(e,t)}}function Xp(e,t){if(bs(),!e.popover||!e.popoverVisible)return;const i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=window.innerWidth-document.documentElement.clientWidth,a=window.innerHeight-document.documentElement.clientHeight,o=e.virtualKeyboard.height;t.x+e.popover.offsetWidth/2>r-n?e.popover.style.left=r-e.popover.offsetWidth-n+"px":t.x-e.popover.offsetWidth/2<0?e.popover.style.left="0":e.popover.style.left=t.x-e.popover.offsetWidth/2+"px",t.y+e.popover.offsetHeight+5>i-a-o?(e.popover.classList.add("ML__popover--reverse-direction"),e.popover.style.top=t.y-t.height-e.popover.offsetHeight-5+"px"):(e.popover.classList.remove("ML__popover--reverse-direction"),e.popover.style.top=`${t.y+5}px`)}function Jp(e){e.suggestionIndex=0,e.popoverVisible=!1,e.popover&&(e.popover.classList.remove("is-visible"),e.popover.innerHTML="")}function $p(e,t){return e.popover?(e.popover.innerHTML=e.options.createHTML(t),e.popover):(e.popover=Cp("mathlive-popover-panel"),void 0===Kp&&(Kp=Hc(Up).toString(36)),Hp=Kc(null,Up,Kp),Gp=Kc(null,Uc,Hc(Uc).toString(36)),e.popover.innerHTML=e.options.createHTML(t),e.popover)}function em(e){Ep(e.popover),Hp&&Hp.release(),Gp&&Gp.release(),delete e.popover}function tm(e){let t=0;for(let i=0;i{_p(e)&&e.dirty&&(e.atomBoundsCache=new Map,rm(e,t),e.atomBoundsCache=void 0)})))}function rm(e,t){var i,r;if(bs(),!_p(e))return;t=null!==t&&void 0!==t?t:{},e.dirty=!1;const{model:n}=e;"mathlive"in window||(window.mathlive={}),n.root.caret="",n.root.isSelected=!1,n.root.containsCaret=!0;for(const c of n.atoms)c.caret="",c.isSelected=!1,c.containsCaret=!1;const a=!e.options.readOnly&&e.hasFocus();if(n.selectionIsCollapsed)n.at(n.position).caret=a?e.mode:"";else{const e=n.getAtoms(n.selection,{includeChildren:!0});for(const t of e)t.isSelected=!0}if(a){let e=n.at(n.position).parent;while(e)e.containsCaret=!0,e=e.parent}const o=n.root.render(new Jl({registers:e.registers,atomIdsSettings:{seed:t.forHighlighting?tm(ac.serialize(n.root,{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:null!==(i=t.forHighlighting)&&void 0!==i&&i},renderPlaceholder:e.options.readOnly?(t,i)=>{if(i.placeholderId){const r=e.getPlaceholderField(i.placeholderId);return i.createMathfieldBox(t,{placeholderId:i.placeholderId,element:r})}return i.createBox(t)}:void 0},{fontSize:ql,letterShapeStyle:e.options.letterShapeStyle},"inline-math"===e.options.defaultMode?"textstyle":"displaystyle")),s=qu(Iu(o,e.options.horizontalSpacingScale),{classes:"ML__mathlive",attributes:{translate:"no","aria-hidden":"true"}}),l=e.field,u=l.classList.contains("ML__focused");u&&!a?l.classList.remove("ML__focused"):!u&&a&&l.classList.add("ML__focused"),l.innerHTML=e.options.createHTML(s.toMarkup()),e.fieldContent=l.querySelector(".ML__mathlive"),e.accessibleNode.innerHTML=e.options.createHTML(''+cp(n.root,e.options)+""),nm(e),e.options.readOnly&&e.attachNestedMathfield(),null!==(r=t.interactive)&&void 0!==r&&r||setTimeout((()=>nm(e)),32)}function nm(e){bs();const t=e.field;if(!t)return;for(const o of t.querySelectorAll(".ML__selection, .ML__contains-highlight"))o.remove();if(!e.hasFocus())return;const i=e.model,r=parseFloat(getComputedStyle(t).width),n=t.getBoundingClientRect().width;let a=n/r;if(a=isNaN(a)?1:a,i.selectionIsCollapsed){setTimeout((()=>Yp(e)),32);let r=i.at(i.position);while(r&&(!r.containsCaret||!r.displayContainsHighlight))r=r.parent;if((null===r||void 0===r?void 0:r.containsCaret)&&r.displayContainsHighlight){const i=qp(e,Op(e,r));if(i){i.left/=a,i.right/=a,i.top/=a,i.bottom/=a;const e=document.createElement("div");e.classList.add("ML__contains-highlight"),e.style.position="absolute",e.style.left=`${i.left}px`,e.style.top=`${i.top}px`,e.style.width=`${Math.ceil(i.right-i.left)}px`,e.style.height=`${Math.ceil(i.bottom-i.top-1)}px`,t.insertBefore(e,t.childNodes[0])}}}else for(const o of am(Fp(e,{excludeAtomsWithBackground:!0}))){o.left/=a,o.right/=a,o.top/=a,o.bottom/=a;const e=document.createElement("div");e.classList.add("ML__selection"),e.style.position="absolute",e.style.left=`${o.left}px`,e.style.top=`${o.top}px`,e.style.width=`${Math.ceil(o.right-o.left)}px`,e.style.height=`${Math.ceil(o.bottom-o.top-1)}px`,t.insertBefore(e,t.childNodes[0])}}function am(e){let t=[];for(const i of e){let e=!1;for(const r of t)if(i.left===r.left&&i.right===r.right&&i.top===r.top&&i.bottom===r.bottom){e=!0;break}e||t.push(i)}e=t,t=[];for(const i of e){let r=0;for(const t of e)if(i.left>=t.left&&i.right<=t.right&&i.top>=t.top&&i.bottom<=t.bottom&&(r+=1,r>1))break;1===r&&t.push(i)}return t}function om(e,t){if(e.direction===t.direction){const i=e.ranges.length;if(t.ranges.length===i){let r=0;while(r(Dh.some((e=>t.startsWith(e[0])&&t.endsWith(e[1])))||(t=`${pm} ${t} ${mm}`),t);class gm{constructor(e){gm._registry[e]=this}static onPaste(e,t,i){var r;const n=new ClipboardEvent("paste",{clipboardData:i.clipboardData,cancelable:!0});return!!(null===(r=t.host)||void 0===r?void 0:r.dispatchEvent(n))&&gm._registry[e].onPaste(t,i)}static onCopy(e,t){if(!t.clipboardData)return;const i=e.model,r=i.selectionIsCollapsed?[0,i.lastOffset]:lm(i.selection);let n=i.getAtoms(r);if(n.every((e=>"text"===e.mode||!e.mode)))t.clipboardData.setData("text/plain",n.filter((e=>e instanceof qc)).map((e=>e.value)).join(""));else if(n.every((e=>"latex"===e.mode)))t.clipboardData.setData("text/plain",i.getAtoms(r,{includeChildren:!0}).map((e=>{var t;return null!==(t=e.value)&&void 0!==t?t:""})).join(""));else{let a;a=1===n.length&&void 0!==n[0].verbatimLatex?n[0].verbatimLatex:i.getValue(r,"latex-expanded"),t.clipboardData.setData("application/x-latex",a);try{t.clipboardData.setData("text/plain",e.options.onExport(e,a,r))}catch{}1!==n.length||"root"!==n[0].type&&"group"!==n[0].type||(n=n[0].body.filter((e=>"first"!==e.type)));try{t.clipboardData.setData("application/json+mathlive",JSON.stringify(n.map((e=>e.toJson()))))}catch{}try{const i=e.computeEngine;i.jsonSerializationOptions={metadata:["latex"]};const r=i.parse(a),n=JSON.stringify(r.json);n&&t.clipboardData.setData("application/json",n)}catch{}}t.preventDefault()}static insert(e,t,i,r={}){return gm._registry[e].insert(t,i,r)}onPaste(e,t){return!1}insert(e,t,i){return!1}}gm._registry={};class vm extends gm{constructor(){super("latex")}createAtom(e,t,i){return new sh(e,t)}onPaste(e,t){if(!t.clipboardData)return!1;let i=t.clipboardData.getData("text/x-latex");return i||(i=t.clipboardData.getData("text/plain")),!(!i||!cm(e.model,{inputType:"insertFromPaste",data:i}))&&(e.snapshot(),this.insert(e.model,i)&&(hm(e.model,{inputType:"insertFromPaste"}),im(e)),t.preventDefault(),t.stopPropagation(),!0)}insert(e,t,i){if(!cm(e,{data:t,inputType:"insertText"}))return!1;i||(i={}),i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder");const{suppressChangeNotifications:r}=e;i.suppressChangeNotifications&&(e.suppressChangeNotifications=!0);const n=e.suppressChangeNotifications;e.suppressChangeNotifications=!0,"replaceSelection"!==i.insertionMode||e.selectionIsCollapsed?"replaceAll"===i.insertionMode?(e.root.setChildren([],"body"),e.position=0):"insertBefore"===i.insertionMode?e.collapseSelection("backward"):"insertAfter"===i.insertionMode&&e.collapseSelection("forward"):e.deleteAtoms(lm(e.selection));const a=[];for(const l of t)Bs.test(l)&&a.push(new sh(l,e.mathfield));let o=e.at(e.position);if(o instanceof lh&&(o=o.lastChild),!(o.parent instanceof lh)){const t=new lh("",e.mathfield);o.parent.addChildAfter(t,o),o=t.firstChild}const s=o.parent.addChildrenAfter(a,o);return e.suppressChangeNotifications=n,"before"===i.selectionMode||("item"===i.selectionMode?e.setSelection(e.anchor,e.offsetOf(s)):s&&(e.position=e.offsetOf(s))),hm(e,{data:t,inputType:"insertText"}),e.suppressChangeNotifications=r,!0}}function ym(e){return e.atoms.find((e=>e instanceof lh))}function bm(e){var t,i;const r=e.atoms.find((e=>e instanceof lh));return r&&null!==(i=null===(t=r.body)||void 0===t?void 0:t.filter((e=>e instanceof sh)))&&void 0!==i?i:[]}function wm(e,t){var i;let r=0,n=!1;const a=Number.isFinite(null===t||void 0===t?void 0:t.before)?null!==(i=null===t||void 0===t?void 0:t.before)&&void 0!==i?i:0:e.lastOffset;while(r<=a&&!n){const t=e.at(r);n=t instanceof sh&&t.isSuggestion,n||r++}if(!n)return[void 0,void 0];let o=r,s=!1;while(o<=a&&!s){const t=e.at(o);s=!(t instanceof sh&&t.isSuggestion),s||o++}return[r-1,o-1]}function xm(e){const t=bm(e.model).filter((e=>e.isSuggestion));if(0!==t.length){e.model.position=e.model.offsetOf(t[0].leftSibling);for(const e of t)e.parent.removeChild(e)}}function Am(e,t){var i;const{model:r}=e;xm(e);for(const u of bm(r))u.isError=!1;if(!r.selectionIsCollapsed)return void Jp(e);const n=[];let a=r.at(r.position);while(a&&a instanceof sh&&/^[a-zA-Z\*]$/.test(a.value))a=a.leftSibling;if(a&&a instanceof sh&&"\\"===a.value){n.push(a),a=a.rightSibling;while(a&&a instanceof sh&&/^[a-zA-Z\*]$/.test(a.value))n.push(a),a=a.rightSibling}const o=n.map((e=>e.value)).join(""),s=o?js(e,o):[];if(0===s.length)return/^\\[a-zA-Z\*]+$/.test(o)&&n.forEach((e=>{e.isError=!0})),void Jp(e);e.suggestionIndex=null!==(i=null===t||void 0===t?void 0:t.atIndex)&&void 0!==i?i:0,e.suggestionIndex<0&&(e.suggestionIndex=s.length-1);const l=s[e.suggestionIndex%s.length];if(l!==o){const t=n[n.length-1];t.parent.addChildrenAfter([...l.slice(o.length-l.length)].map((t=>new sh(t,e,{isSuggestion:!0}))),t),im(e)}Zp(e,l,s.length>1)}function km(e){const[t,i]=wm(e,{before:e.position});if(void 0===t||void 0===i)return!1;let r=!1;return e.getAtoms([t,i]).forEach((e=>{e.isSuggestion&&(e.isSuggestion=!1,r=!0)})),r}function Sm(e,t="accept",i){var r,n;Jp(e);const a=ym(e.model);if(!a)return!1;if("accept-suggestion"===t){const t=bm(e.model).filter((e=>e.isSuggestion));if(0===t.length)return!1;for(const e of t)e.isSuggestion=!1;return e.model.position=e.model.offsetOf(t[t.length-1]),!0}const o=bm(e.model).filter((e=>!e.isSuggestion)),s=o.map((e=>e.value)).join(""),l=a.leftSibling;return a.parent.removeChild(a),e.model.position=e.model.offsetOf(l),e.mode=null!==(r=null===i||void 0===i?void 0:i.mode)&&void 0!==r?r:"math","reject"===t||(gm.insert("math",e.model,s,{selectionMode:null!==(n=null===i||void 0===i?void 0:i.selectItem)&&void 0!==n&&n?"item":"placeholder",format:"latex"}),e.snapshot(),e.model.announce("replacement")),!0}new vm;const Mm=3,Nm={};function zm(e,t){t=null!==t&&void 0!==t?t:{target:"mathfield",canUndo:!1};for(const i of Object.keys(e))console.assert(!Nm[i],"Selector already defined: ",i),Nm[i]={...t,fn:e[i]}}function Lm(e){var t;let i;return i=vs(e)?e[0]:e,i=i.replace(/-\w/g,(e=>e[1].toUpperCase())),null===(t=Nm[i])||void 0===t?void 0:t.target}function Cm(e,t){var i,r,n;if(!t)return!1;let a,o=[],s=!1,l=!1;vs(t)?(a=t[0],o=t.slice(1)):a=t,a=a.replace(/-\w/g,(e=>e[1].toUpperCase()));const u=null===(i=Nm[a])||void 0===i?void 0:i.target;if("model"===u){if(e.options.readOnly&&/^(paste|cut|insert|delete|transpose|add)/.test(a))return e.model.announce("plonk"),!1;/^(delete|transpose|add)/.test(a)&&"deleteBackward"!==a&&e.flushInlineShortcutBuffer(),/^(delete|transpose|add)/.test(a)&&"latex"!==e.mode&&(e.popUndoStack(),e.snapshot()),"latex"!==e.mode||/^(complete)/.test(a)||xm(e),Nm[a].fn(e.model,...o),"latex"!==e.mode&&/^(delete|transpose|add)/.test(a)&&e.snapshot(),"latex"===e.mode&&Am(e),l=!0,s=!0}else if("virtual-keyboard"===u)l=null!==(n=null===(r=e.virtualKeyboard)||void 0===r?void 0:r.executeCommand(t))&&void 0!==n&&n,s=!0;else{if(!Nm[a])throw new Error(`Unknown command "${a}"`);/^(undo|redo)/.test(a)&&e.flushInlineShortcutBuffer(),l=Nm[a].fn(e,...o),s=!0}return"virtual-keyboard"!==u&&(e.model.selectionIsCollapsed&&!/^(transpose|paste|complete|((moveToNextChar|moveToPreviousChar|extend).*))_$/.test(a)||(e.flushInlineShortcutBuffer(),e.style={})),l&&im(e),s}function Em(e,t){var i,r,n;e.focus(),e.options.keypressVibration&&xs()&&navigator.vibrate(Mm),t=t.replace(/-\w/g,(e=>e[1].toUpperCase())),"moveToNextPlaceholder"===t||"moveToPreviousPlaceholder"===t||"complete"===t?null===(i=e.returnKeypressSound)||void 0===i||i.play().catch(console.warn):"deleteBackward"===t||"deleteForward"===t||"deletePreviousWord"===t||"deleteNextWord"===t||"deleteToGroupStart"===t||"deleteToGroupEnd"===t||"deleteToMathFieldStart"===t||"deleteToMathFieldEnd"===t?null===(r=e.deleteKeypressSound)||void 0===r||r.play().catch(console.warn):null===(n=e.keypressSound)||void 0===n||n.play().catch(console.warn);const a=e.executeCommand(t);return e.scrollIntoView(),a}function _m(e){return Am(e,{atIndex:e.suggestionIndex+1}),!1}function Tm(e){return Am(e,{atIndex:e.suggestionIndex-1}),!1}zm({performWithFeedback:(e,t)=>Em(e,t)}),zm({complete:Sm,nextSuggestion:_m,previousSuggestion:Tm},{target:"mathfield",category:"autocomplete"});class Bm{constructor(e){var t,i;this.preventOverlayClose=null!==(t=null===e||void 0===e?void 0:e.preventOverlayClose)&&void 0!==t&&t,this.translucent=null!==(i=null===e||void 0===e?void 0:e.translucent)&&void 0!==i&&i,this.state="closed"}get element(){if(this._element)return this._element;const e=document.createElement("div");return e.setAttribute("role","presentation"),e.style.position="fixed",e.style.contain="content",e.style.top="0",e.style.left="0",e.style.right="0",e.style.bottom="0",e.style.zIndex="var(--scrim-zindex, 10099)",e.style.outline="none",this.translucent?(e.style.background="rgba(255, 255, 255, .2)",e.style["backdropFilter"]="contrast(40%)"):e.style.background="transparent",this._element=e,e}open(e){var t;if("closed"!==this.state)return;this.state="opening",this.savedActiveElement=Im();const{element:i}=this;(null!==(t=null===e||void 0===e?void 0:e.root)&&void 0!==t?t:document.body).appendChild(i),i.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const r=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const n=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${n+r}px`,(null===e||void 0===e?void 0:e.child)&&i.append(e.child),this.state="open"}close(){var e,t,i,r;if("open"!==this.state)return;this.state="closing","function"===typeof this.onClose&&this.onClose();const{element:n}=this;n.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),n.remove(),document.body.style.overflow=null!==(e=this.savedOverflow)&&void 0!==e?e:"",document.body.style.marginRight=null!==(t=this.savedMarginRight)&&void 0!==t?t:"",Im()!==this.savedActiveElement&&(null===(r=null===(i=this.savedActiveElement)||void 0===i?void 0:i.focus)||void 0===r||r.call(i)),n.innerHTML="",this.state="closed"}handleEvent(e){this.preventOverlayClose||(e.target===this._element&&"click"===e.type?(this.close(),e.preventDefault(),e.stopPropagation()):e.target!==document||"touchmove"!==e.type&&"scroll"!==e.type||(this.close(),e.preventDefault(),e.stopPropagation()))}}function Im(){var e;let t=document.activeElement;while(null===(e=null===t||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement)t=t.shadowRoot.activeElement;return t}let qm;function Dm(e,t){var i;bs();const r=Um[t],n=document.createElement("div");n.setAttribute("aria-hidden","true"),n.className="ML__keyboard alternate-keys"+(e.element.classList.contains("material")?" material":""),n.id="mathlive-alternate-keys-panel",r.length>=14?n.style.width="236px":r.length>=7?n.style.width="286px":4===r.length||2===r.length?n.style.width="146px":1===r.length?n.style.width="86px":n.style.width="146px",n.style.height="auto";let a="";for(const l of r)a+="";a="
      "+a+"
    ",n.innerHTML=e.options.createHTML(a),jm(e,[...n.querySelectorAll("li")],"performAlternateKeys"),Bm.scrim||(Bm.scrim=new Bm),Bm.scrim.open({root:e.options.virtualKeyboardContainer,child:n});const o=null===e||void 0===e?void 0:e.element.querySelector('div.keyboard-layer.is-visible div.rows ul li[data-alt-keys="'+t+'"]'),s=null===o||void 0===o?void 0:o.getBoundingClientRect();if(s){s.top-n.clientHeight<0&&(n.style.width="auto",r.length<=6?n.style.height="56px":r.length<=12?n.style.height="108px":r.length<=18?n.style.height="205px":n.classList.add("compact"));const e=(s.top-n.clientHeight+5).toString()+"px",t=Math.max(0,Math.min(window.innerWidth-n.offsetWidth,(s.left+s.right-n.offsetWidth)/2))+"px";n.style.transform="translate("+t+","+e+")",n.classList.add("is-visible")}return!1}function Om(){var e;bs();const t=document.querySelector("#mathlive-alternate-keys-panel");return t&&(t.classList.remove("is-visible"),t.innerHTML=""),null===(e=Bm.scrim)||void 0===e||e.close(),!1}class Rm{constructor(e,t){this.originalContainerBottomPadding=null,this.options=e,this.visible=!1,this._mathfield=t,this.coreStylesheet=null,this.virtualKeyboardStylesheet=null}setOptions(e){var t,i;let r="";if(this._element){const e=this._element.querySelector("div.keyboard-layer.is-visible");e&&(r=null!==(t=e.getAttribute("data-layer"))&&void 0!==t?t:""),this._element.remove(),this._element=void 0}if(this.options=e,this.visible){this.buildAndAttachElement(e.virtualKeyboardTheme);const t=this.element.querySelector(`.keyboard-layer[data-layer="${r}"]`);t&&(null===(i=this.element.querySelector(".keyboard-layer.is-visible"))||void 0===i||i.classList.remove("is-visible"),t.classList.add("is-visible")),this.element.classList.add("is-visible")}}get element(){return this._element}set element(e){var t;this._element!==e&&(null===(t=this._element)||void 0===t||t.remove(),this._element=e)}get visible(){return this._visible}set visible(e){this._visible=e}get height(){var e,t;return null!==(t=null===(e=this.element)||void 0===e?void 0:e.offsetHeight)&&void 0!==t?t:0}buildAndAttachElement(e){var t;this.element=Wm(this,null!==e&&void 0!==e?e:""),zp(this.element,"touchstart:passive mousedown",(()=>this.focusMathfield())),null===(t=this.options.virtualKeyboardContainer)||void 0===t||t.appendChild(this.element)}handleEvent(e){if(this.element)switch(e.type){case"mouseup":case"blur":case"touchend":case"touchcancel":document.body.style.userSelect="",Zm(this);break}}focusMathfield(){var e,t;null===(t=null===(e=this._mathfield)||void 0===e?void 0:e.focus)||void 0===t||t.call(e)}blurMathfield(){var e,t;null===(t=null===(e=this._mathfield)||void 0===e?void 0:e.blur)||void 0===t||t.call(e)}stateChanged(){var e,t;null===(t=null===(e=this._mathfield)||void 0===e?void 0:e.element)||void 0===t||t.dispatchEvent(new Event("virtual-keyboard-toggle",{bubbles:!0,cancelable:!1,composed:!0}))}executeCommand(e){var t,i,r;let n,a=[];return vs(e)?(n=e[0],a=e.slice(1)):n=e,n=n.replace(/-\w/g,(e=>e[1].toUpperCase())),"virtual-keyboard"===(null===(t=Nm[n])||void 0===t?void 0:t.target)?Nm[n].fn(this,...a):null!==(r=null===(i=this._mathfield)||void 0===i?void 0:i.executeCommand(e))&&void 0!==r&&r}create(){this.virtualKeyboardStylesheet||(qm||(qm=Hc(Np).toString(36)),this.virtualKeyboardStylesheet=Kc(null,Np,qm)),this.coreStylesheet||(this.coreStylesheet=Kc(null,Uc,Hc(Uc).toString(36))),kh(this.options.fontsDirectory)}enable(){ys()&&(window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("touchend",this),window.addEventListener("touchcancel",this))}disable(){ys()&&(window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("touchend",this),window.removeEventListener("touchcancel",this))}dispose(){}}const Fm={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"]},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"]},symbols:{tooltip:"keyboard.tooltip.symbols",layer:"symbols",label:"∞≠∈",classes:"tex",layers:["symbols"]},latex:{tooltip:"keyboard.tooltip.command",command:["switchMode","latex"],label:"",layers:["latex-lower","latex-upper","latex-symbols"]},style:{tooltip:"keyboard.tooltip.style",layer:"style",label:"bi𝔹"}},Pm={"\\varphi ":["Φ","\\Phi "],"\\varsigma ":["Σ","\\Sigma "],"\\epsilon ":["Ɛ",'\\char"0190'],"\\rho ":["Ρ",'\\char"3A1'],"\\tau ":["Τ",'\\char"3A4'],"\\upsilon ":["Υ","\\Upsilon "],"\\theta ":["Θ","\\Theta "],"\\iota ":["Ι",'\\char"399'],"\\omicron ":["Ο",'\\char"39F'],"\\pi ":["Π","\\Pi "],"\\alpha ":["Α",'\\char"391'],"\\sigma ":["Σ","\\Sigma "],"\\delta ":["Δ","\\Delta "],"\\phi ":["Φ","\\Phi "],"\\gamma ":["Γ","\\Gamma "],"\\eta ":["Η",'\\char"397'],"\\xi ":["Ξ","\\Xi "],"\\kappa ":["Κ",'\\char"39A'],"\\lambda ":["Λ","\\Lambda "],"\\zeta ":["Ζ",'\\char"396'],"\\chi ":["Χ",'\\char"3A7'],"\\psi ":["Ψ","\\Psi "],"\\omega ":["Ω","\\Omega "],"\\beta ":["Β",'\\char"392'],"\\nu ":["Ν",'\\char"39D'],"\\mu ":["Μ",'\\char"39C']},Vm={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",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},"\\odot","\\oslash","\\circledcirc"],"*":["\\cdot","\\ast","\\star","\\bigstar","\\ltimes","\\rtimes","\\rightthreetimes","\\leftthreetimes","\\intercal","\\prod",{latex:"\\prod_{n\\mathop=0}^{\\infty}",class:"small"}],"+":["\\pm","\\mp","\\sum",{latex:"\\sum_{n\\mathop=0}^{\\infty}",class:"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","\\lessgtr","\\nless","\\nleq","\\lesssim","\\precsim","\\prec","\\nprec","\\preccurlyeq","\\lessdot"],">":["\\geq","\\geqq","\\gneqq","\\gg","\\gtrless","\\ngtr","\\ngeq","\\gtrsim","\\succsim","\\succ","\\nsucc","\\succcurlyeq","\\gtrdot"],in:["\\owns"],"!in":["\\backepsilon"],subset:["\\subseteq","\\nsubset","\\nsubseteq"],superset:["\\supseteq","\\nsupset","\\nsupseteq"],infinity:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"],"numeric-pi":["\\prod","\\theta","\\rho","\\sin","\\cos","\\tan"],ee:["\\times 10^{#?}","\\ln","\\ln_{10}","\\log"],"^":["_{#?}"],int:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},{latex:"\\dfrac{\\rd}{\\rd x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"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{#@}"],underline:["\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"],overline:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}"],xleftarrows:["\\xlongequal{}","\\xleftrightarrow{}","\\xLeftrightarrow{}","\\xleftrightharpoons{}","\\xLeftarrow{}","\\xleftharpoonup{}","\\xleftharpoondown{}","\\xtwoheadleftarrow{}","\\xhookleftarrow{}","\\xtofrom{}","\\xleftequilibrium{}","\\xrightleftarrows{}"],xrightarrows:["\\xlongequal{}","\\xleftrightarrow{}","\\xLeftrightarrow{}","\\xleftrightharpoons{}","\\xRightarrow{}","\\xrightharpoonup{}","\\xrightharpoondown{}","\\xtwoheadrightarrow{}","\\xrightleftharpoons{}","\\xhookrightarrow{}","\\xmapsto{}","\\xrightequilibrium{}","\\xrightleftarrows{}"],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:"\\mathbb{N}",aside:"set of natural numbers"}],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],"x-var":["y","z","t","r",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"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 Um={};const Km={math:"\n
    \n
      \n
    • x
    • \n
    • n
    • \n
    • \n \n
    • \n
    • e
    • \n
    • 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 ","lower-roman":"\n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n
    • ;
    • \n
    • ,
    • \n
    •  
    • \n \n
    \n
    ","upper-roman":"\n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n
    • ;
    • \n
    • ;
    • \n
    •  
    • \n \n
    \n
    ",symbols:"\n
    \n
      \n \n
    • {
    • \n
    • }
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • o
    • \n
    • \n
    • \n\n
    \n
      \n \n
    • [
    • \n
    • ]
    • \n
    • \n
    • \n
    • \n
    • !
    • \n
    • o
    • \n
    • o
    • \n
    • \n
    • \n\n
    \n
      \n \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n\n
    • \n
    \n
      \n \n
    • ,
    • \n
    • \n
    • :
    • \n
    • \n
    • \n
    • \n
    • ±
    • \n \n
    \n
    ","lower-greek":"\n
    \n
    • φ
    • \n
    • ς
    • \n
    • ϵ
    • \n
    • ρ
    • \n
    • τ
    • \n
    • υ
    • \n
    • θ
    • \n
    • ι
    • \n
    • ο
    • \n
    • π
    • \n
    \n
    • α
    • \n
    • σ
    • \n
    • δ
    • \n
    • ϕ
    • \n
    • γ
    • \n
    • η
    • \n
    • ξ
    • \n
    • κ
    • \n
    • λ
    • \n
    \n
    • \n
    • ζ
    • \n
    • χ
    • \n
    • ψ
    • \n
    • ω
    • \n
    • β
    • \n
    • ν
    • \n
    • μ
    • \n
    • \n
    \n
      \n
    •  
    • \n
    • ,
    • \n
    • ε
    • \n
    • ϑ
    • \n
    • ϰ
    • \n
    • ϖ
    • \n
    • ϱ
    • \n \n
    \n
    ","upper-greek":"\n
    \n
    • Φ
    • \n
    • Σ
    • \n
    • Ɛ
    • \n
    • Ρ
    • \n
    • Τ
    • \n
    • Υ
    • \n
    • Θ
    • \n
    • Ι
    • \n
    • Ο
    • \n
    • Π
    \n
    • Α
    • \n
    • Σ
    • \n
    • Δ
    • \n
    • Φ
    • \n
    • Γ
    • \n
    • Η
    • \n
    • Ξ
    • \n
    • Κ
    • \n
    • Λ
    \n
    • \n
    • Ζ
    • \n
    • Χ
    • \n
    • Ψ
    • \n
    • Ω
    • \n
    • Β
    • \n
    • Ν
    • \n
    • Μ
    • \n
    \n
      \n
    •  
    • \n
    • .
    • \n
    •  
    • \n \n
    \n
    ","latex-lower":"\n
    \n
    \n
    \n
    \n
      \n
    • 01#
    • \n
    • {
    • \n
    • }
    • \n
    • ^
    • \n
    • _
    • \n
    •  
    • \n \n
    \n
    ","latex-upper":"\n
    \n
    \n
    \n
    \n
      \n
    • \n
    • [
    • \n
    • ]
    • \n
    • (
    • \n
    • )
    • \n
    •  
    • \n \n
    \n
    ","latex-symbols":"\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 Hm(e,t){e=e.replace(/(^|[^\\])#@/g,"$1#?");const i=vd(),r=new ac("root",i);r.body=Rc(e,i,{parseMode:"math",args:t});const n=Cu(Iu(new zu(r.render(new Jl({registers:i.registers},{fontSize:ql},"displaystyle")),{classes:"ML__base"})));return qu(n,{classes:"ML__mathlive"}).toMarkup()}function Gm(e,t,i){var r,n,a;let o="
    ";const s=t.replace(/\s+/g," ").split(" ");if(s.length>1){const t={...Fm,...null!==(r=e.customVirtualKeyboards)&&void 0!==r?r:{}};for(const e of s){if(!t[e]){console.error('Unknown virtual keyboard "',e,'"');break}o+="
    "+t[e].label+"
    "}}o+="
    ";const l=e.virtualKeyboardToolbar,u="default"===l?["copyToClipboard","undo","redo"]:[],c={copyToClipboard:`\n
    \n \n
    \n `,undo:`\n
    \n \n
    \n `,redo:`\n
    \n \n
    \n `};return u.length>0&&(o+=`\n
    \n ${u.map((e=>c[e])).join("")}\n
    \n `),""}function jm(e,t,i){var r,n;for(const o of t){let t;o.getAttribute("data-latex")?t=Hm(o.getAttribute("data-latex").replace(/"/g,'"'),(()=>"\\placeholder{}")):o.getAttribute("data-insert")&&""===o.innerHTML?t=Hm(o.getAttribute("data-insert").replace(/"/g,'"'),(()=>"\\placeholder{}")):o.getAttribute("data-content")&&(t=o.getAttribute("data-content").replace(/"/g,'"')),o.getAttribute("data-aside")&&(t=(null!==t&&void 0!==t?t:"")+""),void 0!==t&&(o.innerHTML=e.options.createHTML(t)),o.getAttribute("data-classes")&&o.classList.add(o.getAttribute("data-classes"));const s=null===(r=o.getAttribute("data-insert"))||void 0===r?void 0:r.replace(/"/g,'"');let l;s&&Pm[s]&&(o.dataset.shifted=Pm[s][0],o.dataset.shiftedCommand=JSON.stringify(["insertAndUnshiftKeyboardLayer",Pm[s][1]]));const u=o.getAttribute("data-command");if(u)if(/^[a-zA-Z]+$/.test(u))l=u;else try{l=JSON.parse(u)}catch(a){}else l=o.getAttribute("data-insert")?["insert",o.getAttribute("data-insert"),{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex",resetStyle:!0}]:o.getAttribute("data-latex")?["insert",o.getAttribute("data-latex"),{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex",resetStyle:!0}]:["typedText",null!==(n=o.getAttribute("data-key"))&&void 0!==n?n:o.textContent,{focus:!0,feedback:!0,simulateKeystroke:!0}];if(l){i&&(l=[i,l]);let t=l;const r=o.getAttribute("data-alt-keys");if(r){const e=Um[r];e&&(t={default:l,pressAndHoldStart:["showAlternateKeys",r],pressAndHoldEnd:"hideAlternateKeys"})}Vp((t=>e.executeCommand(t)),o,t)}}}function Qm(e,t){var i,r,n,a;const o={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~"}};let s=e.virtualKeyboardLayout;if("auto"===s){const e=Xh();e&&(s=e.virtualLayout),s&&"auto"!==s||(s=null!==(i={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[fd.locale.slice(0,2)])&&void 0!==i?i:"qwerty")}const l=null!==(r=o[s])&&void 0!==r?r:o.qwerty;let u,c=t;c=c.replace(//g,'\n
  • \'\n data-shifted-command=\'["performWithFeedback","extendToPreviousChar"]\'>\n \n
  • \n
  • \'\n data-shifted-command=\'["performWithFeedback","extendToNextChar"]\'>\n \n
  • \n
  • \n
  • ');let h=c.match(/()/);while(h){u="";const t=h[2].match(/[a-zA-Z][a-zA-Z\d-]*=(['"])(.*?)\1/g),i={};if(t)for(const e of t){const t=e.match(/([a-zA-Z][a-zA-Z\d-]*)=(['"])(.*?)\2/);t&&(i[t[1]]=t[3])}let r=l[i.name];if(r||(r=o.qwerty[i.name]),r)for(const o of r){let t=null!==(n=i.class)&&void 0!==n?n:"";t&&(t=` ${t}`),"~"===o?(u+="
  • \'\n data-shifted-command=\'"deleteAll"\'\n data-alt-keys=\'delete\' data-command=\'["performWithFeedback","deleteBackward"]\'\n >
  • '):" "===o?u+="
  • ":"^"===o?u+="
  • ':"/"===o?u+="
  • ÷
  • ":"*"===o?u+="
  • ×
  • ":"-"===o?u+="
  • ":"."===o?u+="
  • "+(null!==(a=e["decimalSeparator"])&&void 0!==a?a:".")+"
  • ":t.includes("tt")?u+=`
  • ${o}
  • `:u+="
  • "+o+"
  • "}else console.warn("Unknown roman keyboard row:",i.name);c=c.replace(new RegExp(h[1]+h[2]+h[3]),u),h=c.match(/()/)}return c}function Wm(e,t){var i,r,n,a;bs();const o='\n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n ';let s=o;e.create(),Vm["foreground-color"]=[];for(const w of Object.keys(cu))Vm["foreground-color"].push({class:"small-button",content:'',command:["applyStyle",{color:w}]});Vm["background-color"]=[];for(const w of Object.keys(uu))Vm["background-color"].push({class:"small-button",content:'',command:["applyStyle",{backgroundColor:w}]});Um={...Vm};for(const w of Object.keys(Um))Um[w]=Um[w].slice();const l="ABCDEFGHIJKLMNOPQRSTUVWXYZ",u="abcdefghijklmnopqrstuvwxyz",c="0123456789";for(let w=0;w<26;w++){const e=l[w];Um[e]||(Um[e]=[]),Um[e].unshift({latex:"\\mathbb{"+e+"}",aside:"blackboard",insert:"\\mathbb{"+e+"}"}),Um[e].unshift({latex:"\\mathbf{"+e+"}",aside:"bold",insert:"\\mathbf{"+e+"}"}),Um[e].unshift({latex:"\\mathsf{"+e+"}",aside:"sans",insert:"\\mathsf{"+e+"}"}),Um[e].unshift({latex:"\\mathtt{"+e+"}",aside:"monospace",insert:"\\mathtt{"+e+"}"}),Um[e].unshift({latex:"\\mathcal{"+e+"}",aside:"calligraphy",insert:"\\mathcal{"+e+"}"}),Um[e].unshift({latex:"\\mathfrak{"+e+"}",aside:"fraktur",insert:"\\mathfrak{"+e+"}"})}for(let w=0;w<=26;w++){const e=u[w];Um[e]||(Um[e]=[]),Um[e].unshift({latex:"\\mathsf{"+e+"}",aside:"sans",insert:"\\mathsf{"+e+"}"}),Um[e].unshift({latex:"\\mathbf{"+e+"}",aside:"bold",insert:"\\mathbf{"+e+"}"}),Um[e].unshift({latex:"\\mathtt{"+e+"}",aside:"monospace",insert:"\\mathtt{"+e+"}"}),Um[e].unshift({latex:"\\mathfrak{"+e+"}",aside:"fraktur",insert:"\\mathfrak{"+e+"}"})}for(let w=0;w<10;w++){const e=c[w];Um[e]||(Um[e]=[]),Um[e].unshift({latex:"\\mathbf{"+e+"}",aside:"bold",insert:"\\mathbf{"+e+"}"}),Um[e].unshift({latex:"\\mathsf{"+e+"}",aside:"sans",insert:"\\mathsf{"+e+"}"}),Um[e].unshift({latex:"\\mathtt{"+e+"}",aside:"monospace",insert:"\\mathtt{"+e+"}"}),Um[e].unshift({latex:"\\mathcal{"+e+"}",aside:"script",insert:"\\mathcal{"+e+"}"}),Um[e].unshift({latex:"\\mathfrak{"+e+"}",aside:"fraktur",insert:"\\mathfrak{"+e+"}"})}let h=e.options.virtualKeyboards;h||(h="all"),h=h.replace(/\ball\b/i,"numeric functions symbols roman greek");const d={...Km,...null!==(i=e.options.customVirtualKeyboardLayers)&&void 0!==i?i:{}},p={...Fm,...null!==(r=e.options.customVirtualKeyboards)&&void 0!==r?r:{}},m=h.replace(/\s+/g," ").split(" ");for(const w of m){if(!p[w]){console.error('Unknown virtual keyboard "'+w+'"');continue}let t=null!==(n=p[w].layers)&&void 0!==n?n:[];p[w].layer&&t.push(p[w].layer),t=[...new Set(t)];for(const i of t){if(!d[i]){console.error('Unknown virtual keyboard layer: "',i,'"');break}if("object"===typeof d[i]){const e=d[i];let t="";if("string"===typeof e.styles?t+=``:"object"===typeof e.styles&&(t+=``),e.backdrop&&(t+=`
    `),e.container&&(t+=`
    `),e.rows){t+="
    ";for(const i of e.rows){t+="
      ";for(const e of i){if(t+="${e.label?e.label:""}`}t+="
    "}t+="
    "}e.container&&(t+="
    "),e.backdrop&&(t+="
    "),d[i]=t}s+=`
    `,s+=Gm(e.options,h,w);const t=d[i];"string"===typeof t&&(s+=Qm(e.options,t)),s+="
    "}}const f=document.createElement("div");f.className="ML__keyboard",t?f.classList.add(t):e.options.virtualKeyboardTheme&&f.classList.add(e.options.virtualKeyboardTheme);const g=document.createElement("div");g.className="ML__keyboard--plate",g.innerHTML=e.options.createHTML(s),f.appendChild(g);const v=f.querySelectorAll(".keycap, .action, .fnbutton, .bigfnbutton");for(const w of v)w.id="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(1e5*Math.random()).toString(36);jm(e,[...v]);const y=f.querySelectorAll(".layer-switch");for(const w of y)w.classList.contains("shift")?Vp((t=>e.executeCommand(t)),w,{pressed:"shiftKeyboardLayer",default:["switchKeyboardLayer",w.getAttribute("data-layer")],pressAndHoldEnd:"unshiftKeyboardLayer"}):Vp((t=>e.executeCommand(t)),w,{default:["switchKeyboardLayer",w.getAttribute("data-layer")]});const b=f.querySelectorAll(".keyboard-layer");for(const w of b)w.addEventListener("mousedown",(e=>{e.preventDefault(),e.stopPropagation()})),w.addEventListener("touchstart",(e=>{e.preventDefault(),e.stopPropagation()}),{passive:!1});return console.assert(b.length>0,"No virtual keyboards available"),null===(a=b[0])||void 0===a||a.classList.add("is-visible"),f}function Zm(e){Om();const t=e.element.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(t)for(const i of t){const t=i.getAttribute("data-unshifted-content");t&&(i.innerHTML=e.options.createHTML(t),i.dataset.unshiftedContent="");const r=i.getAttribute("data-unshifted-command");r&&(i.dataset.command=r,i.dataset.unshiftedCommand="")}return!1}function Ym(e,t,i){var r;const n=null===(r=e.element)||void 0===r?void 0:r.querySelector(".keyboard-toolbar");if(!n)return!1;const a=n.querySelector("[data-command='\"undo\"']"),o=n.querySelector("[data-command='\"redo\"']");return o&&(i?o.classList.remove("disabled"):o.classList.add("disabled")),a&&(t?a.classList.remove("disabled"):a.classList.add("disabled")),!1}function Xm(e){return"string"===typeof e?e:Object.entries(e).map((([e,t])=>`${e}:${t} !important`)).join(";")}function Jm(e){return Object.keys(e).map((t=>`${t} {${Xm(e[t])}}`)).join("")}function $m(e,t){"lower-command"!==t&&"upper-command"!==t&&"symbols-command"!==t&&e.executeCommand("complete"),of(e),Om(),Zm(e);const i=null===e||void 0===e?void 0:e.element.querySelectorAll(".keyboard-layer");let r=!1;for(const n of i)if(n.dataset.layer===t){r=!0;break}if(r)for(const n of i)n.dataset.layer===t?n.classList.add("is-visible"):n.classList.remove("is-visible");return e.focusMathfield(),!0}function ef(e){const t=null===e||void 0===e?void 0:e.element.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(t)for(const i of t){if(i.dataset.unshiftedContent)return!1;let t=i.getAttribute("data-shifted");if(t||/^[a-z]$/.test(i.innerHTML)){i.dataset.unshiftedContent=i.innerHTML,t||(t=i.innerHTML.toUpperCase()),i.innerHTML=e.options.createHTML(t);const r=i.getAttribute("data-command");if(r){i.dataset.unshiftedCommand=r;const e=i.getAttribute("data-shifted-command");if(e)i.dataset.command=e;else{const e=JSON.parse(r);vs(e)&&(e[1]=e[1].toUpperCase()),i.dataset.command=JSON.stringify(e)}}}}return!1}function tf(e,t){return Om(),e.executeCommand(t)}function rf(e,t){return e.executeCommand(["insert",t]),Zm(e),!0}function nf(e){let t=!1;return(null===e||void 0===e?void 0:e.element)&&(t=null===e||void 0===e?void 0:e.element.classList.contains("material"),e.disable()),of(e,t?"":"material"),!1}function af(e){var t,i;e.options.virtualKeyboardLayout={qwerty:"azerty",azerty:"qwertz",qwertz:"dvorak",dvorak:"colemak",colemak:"qwerty"}[e.options.virtualKeyboardLayout];const r=null!==(i=null===(t=null===e||void 0===e?void 0:e.element.querySelector("div.keyboard-layer.is-visible"))||void 0===t?void 0:t.id)&&void 0!==i?i:"";return e&&e.disable(),of(e),r&&$m(e,r),!1}function of(e,t=""){var i,r;const n=e.options.virtualKeyboardContainer;if(!n)return!1;if(e.element?e.element.classList.add("is-visible"):e.buildAndAttachElement(t),!e.visible){(null===(i=window.mathlive)||void 0===i?void 0:i.visibleVirtualKeyboard)&&sf(null===(r=window.mathlive)||void 0===r?void 0:r.visibleVirtualKeyboard),window.mathlive||(window.mathlive={}),window.mathlive.visibleVirtualKeyboard=e;const t=n.style.paddingBottom;e.originalContainerBottomPadding=t,n.style.paddingBottom=t?`calc(${t} + var(--keyboard-height, 276px) - 1px)`:"calc(var(--keyboard-height, 276px) - 1px)"}return setTimeout((()=>{var t;null===(t=e.element)||void 0===t||t.classList.add("is-visible"),e.focusMathfield()}),1),e.visible=!0,e.stateChanged(),!1}function sf(e){var t,i,r;const n=e.options.virtualKeyboardContainer;return!!n&&(e.element&&(window.mathlive||(window.mathlive={}),window.mathlive.visibleVirtualKeyboard=void 0,e.disable(),Om(),e.visible=!1,null===(t=e.coreStylesheet)||void 0===t||t.release(),e.coreStylesheet=null,null===(i=e.virtualKeyboardStylesheet)||void 0===i||i.release(),e.virtualKeyboardStylesheet=null,null===(r=e._element)||void 0===r||r.remove(),e._element=void 0,null!==e.originalContainerBottomPadding&&(n.style.paddingBottom=e.originalContainerBottomPadding)),e.visible=!1,e.stateChanged(),!1)}function lf(e,t){return e.visible?sf(e):of(e,t),!1}zm({showAlternateKeys:Dm},{target:"virtual-keyboard"}),zm({shiftKeyboardLayer:ef},{target:"virtual-keyboard"}),zm({hideAlternateKeys:()=>Om(),performAlternateKeys:tf,switchKeyboardLayer:(e,t)=>$m(e,t),unshiftKeyboardLayer:e=>Zm(e),insertAndUnshiftKeyboardLayer:rf},{target:"virtual-keyboard"}),zm({toggleVirtualKeyboardAlt:nf,toggleVirtualKeyboardShift:af},{target:"virtual-keyboard"}),zm({toggleVirtualKeyboard:(e,t)=>lf(e,t),hideVirtualKeyboard:e=>sf(e),showVirtualKeyboard:(e,t)=>of(e,t),onUndoStateChanged:(e,t,i)=>Ym(e,t,i)},{target:"virtual-keyboard"});const uf="mathlive#remote-virtual-keyboard-message";class cf{constructor(e){var t,i,r;this.targetOrigin=null!==(i=null!==(t=e.targetOrigin)&&void 0!==t?t:window.origin)&&void 0!==i?i:"*",this.originValidator=null!==(r=e.originValidator)&&void 0!==r?r:"same-origin",this._mathfield=e.mathfield}get visible(){var e,t,i;return null!==(i=null===(t=null===(e=window.mathlive)||void 0===e?void 0:e.sharedVirtualKeyboard)||void 0===t?void 0:t.visible)&&void 0!==i&&i}set visible(e){window.mathlive.sharedVirtualKeyboard.visible=e}setOptions(e){this.sendMessage("setOptions",{options:JSON.stringify(hf(e))})}create(){}dispose(){this.disable()}enable(){this.enabled||(this.enabled=!0,window.addEventListener("message",this))}disable(){this.enabled&&(window.removeEventListener("message",this),this.enabled=!1)}executeCommand(e){var t,i,r;return"virtual-keyboard"===Lm(e)?(this._mathfield&&(this.setOptions(hf(this._mathfield.getOptions())),("showVirtualKeyboard"===e||"toggleVirtualKeyboard"===e&&!1===this.visible)&&(null===(i=(t=this._mathfield).focus)||void 0===i||i.call(t))),this.sendMessage("executeCommand",{command:e}),!1):null===(r=this._mathfield)||void 0===r?void 0:r.executeCommand(e)}focusMathfield(){}blurMathfield(){}stateChanged(){}handleEvent(e){var t,i,r,n;if("message"===e.type&&e.data&&e.data.type===uf){if(!Pp(e.origin,this.originValidator))throw new Error(`Message from unknown origin (${e.origin}) cannot be handled`);const{action:a}=e.data;if("executeCommand"===a){if("virtual-keyboard"===Lm(e.data.command)&&window===window.parent)return;this.executeCommand(e.data.command)}else"updateState"===a?(this.visible=e.data.state.visible,this.height=e.data.state.height):"focus"===a?null===(i=null===(t=this._mathfield)||void 0===t?void 0:t.focus)||void 0===i||i.call(t):"blur"===a&&(null===(n=null===(r=this._mathfield)||void 0===r?void 0:r.blur)||void 0===n||n.call(r))}}sendMessage(e,t={}){return!!window.parent&&(window.parent.postMessage({type:uf,action:e,...t},this.targetOrigin),!0)}}function hf(e){if("object"!==typeof e)return{};const t={};return e.fontsDirectory&&(t.fontsDirectory=e.fontsDirectory),e.soundsDirectory&&(t.soundsDirectory=e.soundsDirectory),e.virtualKeyboards&&(t.virtualKeyboards=e.virtualKeyboards),e.virtualKeyboardLayout&&(t.virtualKeyboardLayout=e.virtualKeyboardLayout),e.customVirtualKeyboardLayers&&(t.customVirtualKeyboardLayers=e.customVirtualKeyboardLayers),e.customVirtualKeyboards&&(t.customVirtualKeyboards=e.customVirtualKeyboards),e.virtualKeyboardTheme&&(t.virtualKeyboardTheme=e.virtualKeyboardTheme),e.keypressVibration&&(t.keypressVibration=e.keypressVibration),e.keypressSound&&(t.keypressSound=e.keypressSound),e.plonkSound&&(t.plonkSound=e.plonkSound),e.virtualKeyboardToolbar&&(t.virtualKeyboardToolbar=e.virtualKeyboardToolbar),e.targetOrigin&&(t.targetOrigin=e.targetOrigin),e.originValidator&&(t.originValidator=e.originValidator),t}function df(e,t,i){const r={...e,textToSpeechMarkup:"",textToSpeechRulesOptions:{...e.textToSpeechRulesOptions,markup:"none"}};return t+yp(i,r)}function pf(e,t,i){var r,n;i=null!==i&&void 0!==i?i:{withHighlighting:!1};const{model:a}=e;function o(e){let t=null;switch(e){case"all":t=a.root;break;case"selection":t=a.getAtoms(a.selection);break;case"left":t=a.getAtoms(a.offsetOf(a.at(a.position).leftSibling),a.position);break;case"right":t=a.getAtoms(a.position,a.offsetOf(a.at(a.position).rightSibling));break;case"group":t=a.getAtoms(a.getSiblingsRange(a.position));break;case"parent":{const{parent:e}=a.at(a.position);t=e&&"root"!==e.type?e:a.root;break}default:t=a.root}return t}function s(e){let t="";switch(e){case"all":console.log("Internal failure: speak all failed");break;case"selection":t="no selection";break;case"left":t="at start";break;case"right":t="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":t="no parent";break;default:console.log('unknown speak_ param value: "'+e+'"');break}return t}const l=o(t);if(null===l)return null===(n=(r=e.options).speakHook)||void 0===n||n.call(r,s(t),e.options),!1;const u={...e.options};(i.withHighlighting||"amazon"===u.speechEngine)&&(u.textToSpeechMarkup=ys()&&window.sre&&"sre"===u.textToSpeechRules?"ssml_step":"ssml");const c=yp(l,u);return ys()&&i.withHighlighting?(window.mathlive.readAloudMathField=e,rm(e,{forHighlighting:!0}),e.options.readAloudHook&&e.options.readAloudHook(e.field,c,e.options)):e.options.speakHook&&e.options.speakHook(c,u),!1}function mf(e,t){var i,r;if(!t&&ys()&&"mathlive"in window&&(t=window.mathlive.config),t=null!==t&&void 0!==t?t:{},t.speechEngine&&"local"!==t.speechEngine)if("amazon"===t.speechEngine)if(ys()&&"AWS"in window){const n=new window.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"mp3",VoiceId:null!==(i=t.speechEngineVoice)&&void 0!==i?i:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes(null!==(r=t.speechEngineVoice)&&void 0!==r?r:"Joanna")?"neural":"standard",Text:e,TextType:"ssml"};n.synthesizeSpeech(a,((e,t)=>{if(e)console.warn("polly.synthesizeSpeech() error:",e,e.stack);else if(null===t||void 0===t?void 0:t.AudioStream){const e=new Uint8Array(t.AudioStream),i=new Blob([e.buffer],{type:"audio/mpeg"}),r=URL.createObjectURL(i),n=new Audio(r);n.play().catch((e=>console.log(e)))}else console.log("polly.synthesizeSpeech():",t)}))}else console.warn("AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else"google"===t.speechEngine&&console.warn("The Google speech engine is not supported yet. Please come again.");else if(ys()){const t=new SpeechSynthesisUtterance(e);window.speechSynthesis.speak(t)}else console.log("Speak:",e)}function ff(e){if(e.classList.remove("ML__highlight"),e.children)for(const t of e.children)ff(t)}function gf(e,t){var i;t&&(null===(i=e.dataset)||void 0===i?void 0:i.atomId)!==t?(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach((e=>{e instanceof HTMLElement&&gf(e,t)}))):(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach((e=>{e instanceof HTMLElement&&gf(e)})))}function vf(e,t,i){var r,n;if(!ys())return;if(!i&&window.mathlive&&(i=window.mathlive.config),"amazon"!==i.speechEngine)return console.warn("Use Amazon TTS Engine for synchronized highlighting"),void(i.speakHook&&i.speakHook(t,i));if(!window.AWS)return void console.warn("AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");const a=new window.AWS.Polly({apiVersion:"2016-06-10"}),o={OutputFormat:"json",VoiceId:null!==(r=i.speechEngineVoice)&&void 0!==r?r:"Joanna",Engine:"standard",Text:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};window.mathlive=null!==(n=window.mathlive)&&void 0!==n?n:{},window.mathlive.readAloudElement=e,a.synthesizeSpeech(o,((e,i)=>{if(e)return void console.warn("polly.synthesizeSpeech() error:",e,e.stack);if(!i||!i.AudioStream)return void console.log("polly.synthesizeSpeech():",i);const r=new TextDecoder("utf-8").decode(new Uint8Array(i.AudioStream));window.mathlive.readAloudMarks=r.split("\n").map((e=>e?JSON.parse(e):{})),window.mathlive.readAloudTokens=[];for(const t of window.mathlive.readAloudMarks)t.value&&window.mathlive.readAloudTokens.push(t.value);window.mathlive.readAloudCurrentMark="",o.OutputFormat="mp3",o.SpeechMarkTypes=[],a.synthesizeSpeech(o,((e,i)=>{if(e)return void console.warn("polly.synthesizeSpeech(",t,") error:",e,e.stack);if(!i||!i.AudioStream)return;const r=new Uint8Array(i.AudioStream),n=new Blob([r.buffer],{type:"audio/mpeg"}),a=URL.createObjectURL(n);window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.pause():(window.mathlive.readAloudAudio=new Audio,window.mathlive.readAloudAudio.addEventListener("ended",(()=>{const e=window.mathlive.readAloudMathField;window.mathlive.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),e?(rm(e),window.mathlive.readAloudElement=null,window.mathlive.readAloudMathField=null,window.mathlive.readAloudTokens=[],window.mathlive.readAloudMarks=[],window.mathlive.readAloudCurrentMark=""):ff(window.mathlive.readAloudElement)})),window.mathlive.readAloudAudio.addEventListener("timeupdate",(()=>{let e="";const t=1e3*window.mathlive.readAloudAudio.currentTime+100;for(const i of window.mathlive.readAloudMarks)i.timepf(e,t,i)},{target:"mathfield",category:"speech"});const yf=.5;function bf(e,t){if(null===t||void 0===t||"none"===t||"null"===t)return null;if(t instanceof HTMLAudioElement)return t.load(),t;if("string"===typeof t){if(t=t.trim(),0===t.length)return null;const i=new Audio;return i.src=wh((void 0===e||0===e.length?"./sounds":e)+"/"+t),i.volume=yf,i.load(),i}return null}function wf(e){e instanceof HTMLAudioElement&&(e.pause(),e.removeAttribute("src"),e.load())}function xf(e,t){var i,r,n,a,o;const s=null!==(r=null!==(i=t.soundsDirectory)&&void 0!==i?i:e.soundsDirectory)&&void 0!==r?r:"./sounds",l=Af(e,Object.keys(e));for(const u of Object.keys(t))switch(u){case"scriptDepth":if(vs(t.scriptDepth))l.scriptDepth=[t.scriptDepth[0],t.scriptDepth[1]];else{if("number"!==typeof t.scriptDepth)throw new TypeError("Unexpected value for scriptDepth");l.scriptDepth=[t.scriptDepth,t.scriptDepth]}break;case"locale":"auto"===t.locale?l.locale=ys()?navigator.language.slice(0,5):"en":l.locale=t.locale,fd.locale=l.locale;break;case"strings":fd.merge(t.strings),l.strings=fd.strings;break;case"virtualKeyboardLayout":l.virtualKeyboardLayout=t.virtualKeyboardLayout;break;case"virtualKeyboardMode":const e=t.virtualKeyboardMode.toLowerCase();l.virtualKeyboardMode="auto"===e?ws()?"onfocus":"off":e;break;case"customVirtualKeyboardLayers":l.customVirtualKeyboardLayers={...l.customVirtualKeyboardLayers,...t.customVirtualKeyboardLayers};break;case"customVirtualKeyboards":l.customVirtualKeyboards={...l.customVirtualKeyboards,...t.customVirtualKeyboards};break;case"letterShapeStyle":"auto"===t.letterShapeStyle?fd.locale.startsWith("fr")?l.letterShapeStyle="french":l.letterShapeStyle="tex":l.letterShapeStyle=t.letterShapeStyle;break;case"plonkSound":l.plonkSound instanceof HTMLAudioElement&&wf(l.plonkSound),l.plonkSound=bf(s,t.plonkSound);break;case"keypressSound":if("object"===typeof l.keypressSound&&null!==l.keypressSound&&"default"in l.keypressSound&&(wf(l.keypressSound.default),wf(l.keypressSound.delete),wf(l.keypressSound.return),wf(l.keypressSound.spacebar)),null===t.keypressSound)l.keypressSound={default:null,delete:null,return:null,spacebar:null};else if("string"===typeof t.keypressSound){const e=bf(s,t.keypressSound);l.keypressSound={delete:e,return:e,spacebar:e,default:e}}else t.keypressSound instanceof HTMLAudioElement?l.keypressSound={delete:t.keypressSound,return:t.keypressSound,spacebar:t.keypressSound,default:t.keypressSound}:"object"===typeof t.keypressSound&&"default"in t.keypressSound&&(l.keypressSound={...t.keypressSound},l.keypressSound.default=bf(s,l.keypressSound.default),l.keypressSound.delete=null!==(n=bf(s,l.keypressSound.delete))&&void 0!==n?n:t.keypressSound.default,l.keypressSound.return=null!==(a=bf(s,l.keypressSound.return))&&void 0!==a?a:t.keypressSound.default,l.keypressSound.spacebar=null!==(o=bf(s,l.keypressSound.spacebar))&&void 0!==o?o:t.keypressSound.default);break;case"virtualKeyboardContainer":l.virtualKeyboardContainer=t.virtualKeyboardContainer;break;case"macros":l.macros=il(t.macros);break;default:vs(t[u])?l[u]=[...t[u]]:"object"===typeof t[u]?l[u]={...t[u]}:l[u]=t[u]}return l}function Af(e,t){let i;i="string"===typeof t?[t]:void 0===t?Object.keys(e):t;const r={};for(const n of i)vs(e[n])?r[n]=[...e[n]]:e[n]instanceof HTMLElement?r[n]=e[n]:null===e[n]?r[n]=null:"object"===typeof e[n]?r[n]={...e[n]}:r[n]=e[n];return"string"===typeof t?r[t]:r}const kf='';function Sf(){var e,t,i;return{readOnly:!1,createHTML:e=>e,fontsDirectory:"./fonts",soundsDirectory:"./sounds",defaultMode:"math",macros:el(),registers:{},colorMap:pu,backgroundColorMap:mu,horizontalSpacingScale:1,letterShapeStyle:fd.locale.startsWith("fr")?"french":"tex",smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,mathModeSpace:"",decimalSeparator:".",fractionNavigationOrder:"numerator-denominator",placeholderSymbol:"▢",locale:fd.locale,strings:fd.strings,keybindings:Fh,inlineShortcuts:_h,inlineShortcutTimeout:0,virtualKeyboardToggleGlyph:kf,virtualKeyboardMode:"auto",virtualKeyboards:"all",virtualKeyboardLayout:"auto",customVirtualKeyboardLayers:{},customVirtualKeyboards:{},virtualKeyboardTheme:ys()&&/android|cros/i.test(navigator.userAgent)?"material":"apple",keypressVibration:!0,keypressSound:null,plonkSound:null,virtualKeyboardToolbar:"default",virtualKeyboardContainer:null!==(t=null===(e=globalThis.document)||void 0===e?void 0:e.body)&&void 0!==t?t:null,useSharedVirtualKeyboard:!1,sharedVirtualKeyboardTargetOrigin:null===(i=globalThis.window)||void 0===i?void 0:i.origin,originValidator:"same-origin",textToSpeechRules:"mathlive",textToSpeechMarkup:"",textToSpeechRulesOptions:{},speechEngine:"local",speechEngineVoice:"Joanna",speechEngineRate:"100%",speakHook:mf,readAloudHook:vf,onInlineShortcut:()=>"",onExport:fm,value:""}}function Mf(e){return"inline-math"===e.defaultMode?"math":e.defaultMode}function Nf(e){return!("kind"in e)||"symbol"===e.kind}function zf(e){return"kind"in e&&"matchfix"===e.kind}function Lf(e){return"kind"in e&&"infix"===e.kind}function Cf(e){return"kind"in e&&"prefix"===e.kind}function Ef(e){return"kind"in e&&"postfix"===e.kind}function _f(e){return"kind"in e&&"environment"===e.kind}var Tf,Bf="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},If={exports:{}};Tf=If,function(e){var t,i,r,n,a=9e15,o=1e9,s="0123456789abcdef",l="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",u="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",c={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-a,maxE:a,crypto:!1},h=!0,d="[DecimalError] ",p=d+"Invalid argument: ",m=d+"Precision limit exceeded",f=d+"crypto unavailable",g="[object Decimal]",v=Math.floor,y=Math.pow,b=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,w=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,x=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,A=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,k=1e7,S=l.length-1,M=u.length-1,N={toStringTag:g};function z(e){var t,i,r,n=e.length-1,a="",o=e[0];if(n>0){for(a+=o,t=1;ti)throw Error(p+e)}function C(e,t,i,r){var n,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=7,n=0):(n=Math.ceil((t+1)/7),t%=7),a=y(10,7-t),s=e[n]%a|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),o=i<4&&99999==s||i>3&&49999==s||5e4==s||0==s):o=(i<4&&s+1==a||i>3&&s+1==a/2)&&(e[n+1]/a/100|0)==y(10,t-2)-1||(s==a/2||0==s)&&0==(e[n+1]/a/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),o=(r||i<4)&&9999==s||!r&&i>3&&4999==s):o=((r||i<4)&&s+1==a||!r&&i>3&&s+1==a/2)&&(e[n+1]/a/1e3|0)==y(10,t-3)-1,o}function E(e,t,i){for(var r,n,a=[0],o=0,l=e.length;oi-1&&(void 0===a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/i|0,a[r]%=i)}return a.reverse()}N.absoluteValue=N.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),T(e)},N.ceil=function(){return T(new this.constructor(this),this.e+1,2)},N.clampedTo=N.clamp=function(e,t){var i=this,r=i.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(p+t);return i.cmp(e)<0?e:i.cmp(t)>0?t:new r(i)},N.comparedTo=N.cmp=function(e){var t,i,r,n,a=this,o=a.d,s=(e=new a.constructor(e)).d,l=a.s,u=e.s;if(!o||!s)return l&&u?l!==u?l:o===s?0:!o^l<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?l:s[0]?-u:0;if(l!==u)return l;if(a.e!==e.e)return a.e>e.e^l<0?1:-1;for(t=0,i=(r=o.length)<(n=s.length)?r:n;ts[t]^l<0?1:-1;return r===n?0:r>n^l<0?1:-1},N.cosine=N.cos=function(){var e,t,i=this,r=i.constructor;return i.d?i.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(e,t){var i,r,n;if(t.isZero())return t;(r=t.d.length)<32?n=""+1/W(4,i=Math.ceil(r/3)):(i=16,n="2.3283064365386962890625e-10"),e.precision+=i,t=Q(e,1,t.times(n),new e(1));for(var a=i;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,t}(r,Z(r,i)),r.precision=e,r.rounding=t,T(2==n||3==n?i.neg():i,e,t,!0)):new r(1):new r(NaN)},N.cubeRoot=N.cbrt=function(){var e,t,i,r,n,a,o,s,l,u,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(h=!1,(a=c.s*y(c.s*c,1/3))&&Math.abs(a)!=1/0?r=new d(a.toString()):(i=z(c.d),(a=((e=c.e)-i.length+1)%3)&&(i+=1==a||-2==a?"0":"00"),a=y(i,1/3),e=v((e+1)/3)-(e%3==(e<0?-1:2)),(r=new d(i=a==1/0?"5e"+e:(i=a.toExponential()).slice(0,i.indexOf("e")+1)+e)).s=c.s),o=(e=d.precision)+3;;)if(u=(l=(s=r).times(s).times(s)).plus(c),r=_(u.plus(c).times(s),u.plus(l),o+2,1),z(s.d).slice(0,o)===(i=z(r.d)).slice(0,o)){if("9999"!=(i=i.slice(o-3,o+1))&&(n||"4999"!=i)){+i&&(+i.slice(1)||"5"!=i.charAt(0))||(T(r,e+1,1),t=!r.times(r).times(r).eq(c));break}if(!n&&(T(s,e+1,0),s.times(s).times(s).eq(c))){r=s;break}o+=4,n=1}return h=!0,T(r,e,d.rounding,t)},N.decimalPlaces=N.dp=function(){var e,t=this.d,i=NaN;if(t){if(i=7*((e=t.length-1)-v(this.e/7)),e=t[e])for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i},N.dividedBy=N.div=function(e){return _(this,new this.constructor(e))},N.dividedToIntegerBy=N.divToInt=function(e){var t=this.constructor;return T(_(this,new t(e),0,1,1),t.precision,t.rounding)},N.equals=N.eq=function(e){return 0===this.cmp(e)},N.floor=function(){return T(new this.constructor(this),this.e+1,3)},N.greaterThan=N.gt=function(e){return this.cmp(e)>0},N.greaterThanOrEqualTo=N.gte=function(e){var t=this.cmp(e);return 1==t||0===t},N.hyperbolicCosine=N.cosh=function(){var e,t,i,r,n,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;i=o.precision,r=o.rounding,o.precision=i+Math.max(a.e,a.sd())+4,o.rounding=1,(n=a.d.length)<32?t=""+1/W(4,e=Math.ceil(n/3)):(e=16,t="2.3283064365386962890625e-10"),a=Q(o,1,a.times(t),new o(1),!0);for(var l,u=e,c=new o(8);u--;)l=a.times(a),a=s.minus(l.times(c.minus(l.times(c))));return T(a,o.precision=i,o.rounding=r,!0)},N.hyperbolicSine=N.sinh=function(){var e,t,i,r,n=this,a=n.constructor;if(!n.isFinite()||n.isZero())return new a(n);if(t=a.precision,i=a.rounding,a.precision=t+Math.max(n.e,n.sd())+4,a.rounding=1,(r=n.d.length)<3)n=Q(a,2,n,n,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,n=Q(a,2,n=n.times(1/W(5,e)),n,!0);for(var o,s=new a(5),l=new a(16),u=new a(20);e--;)o=n.times(n),n=n.times(s.plus(o.times(l.times(o).plus(u))))}return a.precision=t,a.rounding=i,T(n,t,i,!0)},N.hyperbolicTangent=N.tanh=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,_(i.sinh(),i.cosh(),r.precision=e,r.rounding=t)):new r(i.s)},N.inverseCosine=N.acos=function(){var e,t=this,i=t.constructor,r=t.abs().cmp(1),n=i.precision,a=i.rounding;return-1!==r?0===r?t.isNeg()?D(i,n,a):new i(0):new i(NaN):t.isZero()?D(i,n+4,a).times(.5):(i.precision=n+6,i.rounding=1,t=t.asin(),e=D(i,n+4,a).times(.5),i.precision=n,i.rounding=a,e.minus(t))},N.inverseHyperbolicCosine=N.acosh=function(){var e,t,i=this,r=i.constructor;return i.lte(1)?new r(i.eq(1)?0:NaN):i.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(i.e),i.sd())+4,r.rounding=1,h=!1,i=i.times(i).minus(1).sqrt().plus(i),h=!0,r.precision=e,r.rounding=t,i.ln()):new r(i)},N.inverseHyperbolicSine=N.asinh=function(){var e,t,i=this,r=i.constructor;return!i.isFinite()||i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,r.rounding=1,h=!1,i=i.times(i).plus(1).sqrt().plus(i),h=!0,r.precision=e,r.rounding=t,i.ln())},N.inverseHyperbolicTangent=N.atanh=function(){var e,t,i,r,n=this,a=n.constructor;return n.isFinite()?n.e>=0?new a(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=a.precision,t=a.rounding,r=n.sd(),Math.max(r,e)<2*-n.e-1?T(new a(n),e,t,!0):(a.precision=i=r-n.e,n=_(n.plus(1),new a(1).minus(n),i+e,1),a.precision=e+4,a.rounding=1,n=n.ln(),a.precision=e,a.rounding=t,n.times(.5))):new a(NaN)},N.inverseSine=N.asin=function(){var e,t,i,r,n=this,a=n.constructor;return n.isZero()?new a(n):(t=n.abs().cmp(1),i=a.precision,r=a.rounding,-1!==t?0===t?((e=D(a,i+4,r).times(.5)).s=n.s,e):new a(NaN):(a.precision=i+6,a.rounding=1,n=n.div(new a(1).minus(n.times(n)).sqrt().plus(1)).atan(),a.precision=i,a.rounding=r,n.times(2)))},N.inverseTangent=N.atan=function(){var e,t,i,r,n,a,o,s,l,u=this,c=u.constructor,d=c.precision,p=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&d+4<=M)return(o=D(c,d+4,p).times(.25)).s=u.s,o}else{if(!u.s)return new c(NaN);if(d+4<=M)return(o=D(c,d+4,p).times(.5)).s=u.s,o}for(c.precision=s=d+10,c.rounding=1,e=i=Math.min(28,s/7+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(h=!1,t=Math.ceil(s/7),r=1,l=u.times(u),o=new c(u),n=u;-1!==e;)if(n=n.times(l),a=o.minus(n.div(r+=2)),n=n.times(l),void 0!==(o=a.plus(n.div(r+=2))).d[t])for(e=t;o.d[e]===a.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2},N.isNaN=function(){return!this.s},N.isNegative=N.isNeg=function(){return this.s<0},N.isPositive=N.isPos=function(){return this.s>0},N.isZero=function(){return!!this.d&&0===this.d[0]},N.lessThan=N.lt=function(e){return this.cmp(e)<0},N.lessThanOrEqualTo=N.lte=function(e){return this.cmp(e)<1},N.logarithm=N.log=function(e){var t,i,r,n,a,o,s,l,u=this,c=u.constructor,d=c.precision,p=c.rounding;if(null==e)e=new c(10),t=!0;else{if(i=(e=new c(e)).d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(i=u.d,u.s<0||!i||!i[0]||u.eq(1))return new c(i&&!i[0]?-1/0:1!=u.s?NaN:i?0:1/0);if(t)if(i.length>1)a=!0;else{for(n=i[0];n%10==0;)n/=10;a=1!==n}if(h=!1,o=K(u,s=d+5),r=t?q(c,s+10):K(e,s),C((l=_(o,r,s,1)).d,n=d,p))do{if(o=K(u,s+=10),r=t?q(c,s+10):K(e,s),l=_(o,r,s,1),!a){+z(l.d).slice(n+1,n+15)+1==1e14&&(l=T(l,d+1,0));break}}while(C(l.d,n+=10,p));return h=!0,T(l,d,p)},N.minus=N.sub=function(e){var t,i,r,n,a,o,s,l,u,c,d,p,m=this,f=m.constructor;if(e=new f(e),!m.d||!e.d)return m.s&&e.s?m.d?e.s=-e.s:e=new f(e.d||m.s!==e.s?m:NaN):e=new f(NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(u=m.d,p=e.d,s=f.precision,l=f.rounding,!u[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!u[0])return new f(3===l?-0:0);e=new f(m)}return h?T(e,s,l):e}if(i=v(e.e/7),c=v(m.e/7),u=u.slice(),a=c-i){for((d=a<0)?(t=u,a=-a,o=p.length):(t=p,i=c,o=u.length),a>(r=Math.max(Math.ceil(s/7),o)+2)&&(a=r,t.length=1),t.reverse(),r=a;r--;)t.push(0);t.reverse()}else{for((d=(r=u.length)<(o=p.length))&&(o=r),r=0;r0;--r)u[o++]=0;for(r=p.length;r>a;){if(u[--r](o=(a=Math.ceil(s/7))>o?a+1:o+1)&&(n=o,i.length=1),i.reverse();n--;)i.push(0);i.reverse()}for((o=u.length)-(n=c.length)<0&&(n=o,i=c,c=u,u=i),t=0;n;)t=(u[--n]=u[n]+c[n]+t)/k|0,u[n]%=k;for(t&&(u.unshift(t),++r),o=u.length;0==u[--o];)u.pop();return e.d=u,e.e=I(u,r),h?T(e,s,l):e},N.precision=N.sd=function(e){var t,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(p+e);return i.d?(t=O(i.d),e&&i.e+1>t&&(t=i.e+1)):t=NaN,t},N.round=function(){var e=this,t=e.constructor;return T(new t(e),e.e+1,t.rounding)},N.sine=N.sin=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(e,t){var i,r=t.d.length;if(r<3)return t.isZero()?t:Q(e,2,t,t);i=(i=1.4*Math.sqrt(r))>16?16:0|i,t=Q(e,2,t=t.times(1/W(5,i)),t);for(var n,a=new e(5),o=new e(16),s=new e(20);i--;)n=t.times(t),t=t.times(a.plus(n.times(o.times(n).minus(s))));return t}(r,Z(r,i)),r.precision=e,r.rounding=t,T(n>2?i.neg():i,e,t,!0)):new r(NaN)},N.squareRoot=N.sqrt=function(){var e,t,i,r,n,a,o=this,s=o.d,l=o.e,u=o.s,c=o.constructor;if(1!==u||!s||!s[0])return new c(!u||u<0&&(!s||s[0])?NaN:s?o:1/0);for(h=!1,0==(u=Math.sqrt(+o))||u==1/0?(((t=z(s)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=v((l+1)/2)-(l<0||l%2),r=new c(t=u==1/0?"5e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new c(u.toString()),i=(l=c.precision)+3;;)if(r=(a=r).plus(_(o,a,i+2,1)).times(.5),z(a.d).slice(0,i)===(t=z(r.d)).slice(0,i)){if("9999"!=(t=t.slice(i-3,i+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(T(r,l+1,1),e=!r.times(r).eq(o));break}if(!n&&(T(a,l+1,0),a.times(a).eq(o))){r=a;break}i+=4,n=1}return h=!0,T(r,l,c.rounding,e)},N.tangent=N.tan=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(i=i.sin()).s=1,i=_(i,new r(1).minus(i.times(i)).sqrt(),e+10,0),r.precision=e,r.rounding=t,T(2==n||4==n?i.neg():i,e,t,!0)):new r(NaN)},N.times=N.mul=function(e){var t,i,r,n,a,o,s,l,u,c=this,d=c.constructor,p=c.d,m=(e=new d(e)).d;if(e.s*=c.s,!(p&&p[0]&&m&&m[0]))return new d(!e.s||p&&!p[0]&&!m||m&&!m[0]&&!p?NaN:p&&m?0*e.s:e.s/0);for(i=v(c.e/7)+v(e.e/7),(l=p.length)<(u=m.length)&&(a=p,p=m,m=a,o=l,l=u,u=o),a=[],r=o=l+u;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,n=l+r;n>r;)s=a[n]+m[r]*p[n-r-1]+t,a[n--]=s%k|0,t=s/k|0;a[n]=(a[n]+t)%k|0}for(;!a[--o];)a.pop();return t?++i:a.shift(),e.d=a,e.e=I(a,i),h?T(e,d.precision,d.rounding):e},N.toBinary=function(e,t){return Y(this,2,e,t)},N.toDecimalPlaces=N.toDP=function(e,t){var i=this,r=i.constructor;return i=new r(i),void 0===e?i:(L(e,0,o),void 0===t?t=r.rounding:L(t,0,8),T(i,e+i.e+1,t))},N.toExponential=function(e,t){var i,r=this,n=r.constructor;return void 0===e?i=B(r,!0):(L(e,0,o),void 0===t?t=n.rounding:L(t,0,8),i=B(r=T(new n(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+i:i},N.toFixed=function(e,t){var i,r,n=this,a=n.constructor;return void 0===e?i=B(n):(L(e,0,o),void 0===t?t=a.rounding:L(t,0,8),i=B(r=T(new a(n),e+n.e+1,t),!1,e+r.e+1)),n.isNeg()&&!n.isZero()?"-"+i:i},N.toFraction=function(e){var t,i,r,n,a,o,s,l,u,c,d,m,f=this,g=f.d,v=f.constructor;if(!g)return new v(f);if(u=i=new v(1),r=l=new v(0),o=(a=(t=new v(r)).e=O(g)-f.e-1)%7,t.d[0]=y(10,o<0?7+o:o),null==e)e=a>0?t:u;else{if(!(s=new v(e)).isInt()||s.lt(u))throw Error(p+s);e=s.gt(t)?a>0?t:u:s}for(h=!1,s=new v(z(g)),c=v.precision,v.precision=a=7*g.length*2;d=_(s,t,0,1,1),1!=(n=i.plus(d.times(r))).cmp(e);)i=r,r=n,n=u,u=l.plus(d.times(n)),l=n,n=t,t=s.minus(d.times(n)),s=n;return n=_(e.minus(i),r,0,1,1),l=l.plus(n.times(u)),i=i.plus(n.times(r)),l.s=u.s=f.s,m=_(u,r,a,1).minus(f).abs().cmp(_(l,i,a,1).minus(f).abs())<1?[u,r]:[l,i],v.precision=c,h=!0,m},N.toHexadecimal=N.toHex=function(e,t){return Y(this,16,e,t)},N.toNearest=function(e,t){var i=this,r=i.constructor;if(i=new r(i),null==e){if(!i.d)return i;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:L(t,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(h=!1,i=_(i,e,0,t,1).times(e),h=!0,T(i)):(e.s=i.s,i=e),i},N.toNumber=function(){return+this},N.toOctal=function(e,t){return Y(this,8,e,t)},N.toPower=N.pow=function(e){var t,i,r,n,a,o,s=this,l=s.constructor,u=+(e=new l(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new l(y(+s,u));if((s=new l(s)).eq(1))return s;if(r=l.precision,a=l.rounding,e.eq(1))return T(s,r,a);if((t=v(e.e/7))>=e.d.length-1&&(i=u<0?-u:u)<=9007199254740991)return n=F(l,s,i,r),e.s<0?new l(1).div(n):T(n,r,a);if((o=s.s)<0){if(tl.maxE+1||t0?o/0:0):(h=!1,l.rounding=s.s=1,i=Math.min(12,(t+"").length),(n=U(e.times(K(s,r+i)),r)).d&&C((n=T(n,r+5,1)).d,r,a)&&(t=r+10,+z((n=T(U(e.times(K(s,t+i)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(n=T(n,r+1,0))),n.s=o,h=!0,l.rounding=a,T(n,r,a))},N.toPrecision=function(e,t){var i,r=this,n=r.constructor;return void 0===e?i=B(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(L(e,1,o),void 0===t?t=n.rounding:L(t,0,8),i=B(r=T(new n(r),e,t),e<=r.e||r.e<=n.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+i:i},N.toSignificantDigits=N.toSD=function(e,t){var i=this.constructor;return void 0===e?(e=i.precision,t=i.rounding):(L(e,1,o),void 0===t?t=i.rounding:L(t,0,8)),T(new i(this),e,t)},N.toString=function(){var e=this,t=e.constructor,i=B(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i},N.truncated=N.trunc=function(){return T(new this.constructor(this),this.e+1,1)},N.valueOf=N.toJSON=function(){var e=this,t=e.constructor,i=B(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+i:i};var _=function(){function e(e,t,i){var r,n=0,a=e.length;for(e=e.slice();a--;)r=e[a]*t+n,e[a]=r%i|0,n=r/i|0;return n&&e.unshift(n),e}function t(e,t,i,r){var n,a;if(i!=r)a=i>r?1:-1;else for(n=a=0;nt[n]?1:-1;break}return a}function r(e,t,i,r){for(var n=0;i--;)e[i]-=n,n=e[i]1;)e.shift()}return function(n,a,o,s,l,u){var c,h,d,p,m,f,g,y,b,w,x,A,S,M,N,z,L,C,E,_,B=n.constructor,I=n.s==a.s?1:-1,q=n.d,D=a.d;if(!(q&&q[0]&&D&&D[0]))return new B(n.s&&a.s&&(q?!D||q[0]!=D[0]:D)?q&&0==q[0]||!D?0*I:I/0:NaN);for(u?(m=1,h=n.e-a.e):(u=k,m=7,h=v(n.e/m)-v(a.e/m)),E=D.length,L=q.length,w=(b=new B(I)).d=[],d=0;D[d]==(q[d]||0);d++);if(D[d]>(q[d]||0)&&h--,null==o?(M=o=B.precision,s=B.rounding):M=l?o+(n.e-a.e)+1:o,M<0)w.push(1),f=!0;else{if(M=M/m+2|0,d=0,1==E){for(p=0,D=D[0],M++;(d1&&(D=e(D,p,u),q=e(q,p,u),E=D.length,L=q.length),z=E,A=(x=q.slice(0,E)).length;A=u/2&&++C;do{p=0,(c=t(D,x,E,A))<0?(S=x[0],E!=A&&(S=S*u+(x[1]||0)),(p=S/C|0)>1?(p>=u&&(p=u-1),1==(c=t(g=e(D,p,u),x,y=g.length,A=x.length))&&(p--,r(g,E=10;p/=10)d++;b.e=d+h*m-1,T(b,l?o+b.e+1:o,s,f)}return b}}();function T(e,t,i,r){var n,a,o,s,l,u,c,d,p,m=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(n=1,s=d[0];s>=10;s/=10)n++;if((a=t-n)<0)a+=7,o=t,l=(c=d[p=0])/y(10,n-o-1)%10|0;else if((p=Math.ceil((a+1)/7))>=(s=d.length)){if(!r)break e;for(;s++<=p;)d.push(0);c=l=0,n=1,o=(a%=7)-7+1}else{for(c=s=d[p],n=1;s>=10;s/=10)n++;l=(o=(a%=7)-7+n)<0?0:c/y(10,n-o-1)%10|0}if(r=r||t<0||void 0!==d[p+1]||(o<0?c:c%y(10,n-o-1)),u=i<4?(l||r)&&(0==i||i==(e.s<0?3:2)):l>5||5==l&&(4==i||r||6==i&&(a>0?o>0?c/y(10,n-o):0:d[p-1])%10&1||i==(e.s<0?8:7)),t<1||!d[0])return d.length=0,u?(t-=e.e+1,d[0]=y(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==a?(d.length=p,s=1,p--):(d.length=p+1,s=y(10,7-a),d[p]=o>0?(c/y(10,n-o)%y(10,o)|0)*s:0),u)for(;;){if(0==p){for(a=1,o=d[0];o>=10;o/=10)a++;for(o=d[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,d[0]==k&&(d[0]=1));break}if(d[p]+=s,d[p]!=k)break;d[p--]=0,s=1}for(a=d.length;0===d[--a];)d.pop()}return h&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e0?a=a.charAt(0)+"."+a.slice(1)+R(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):n<0?(a="0."+R(-n-1)+a,i&&(r=i-o)>0&&(a+=R(r))):n>=o?(a+=R(n+1-o),i&&(r=i-n-1)>0&&(a=a+"."+R(r))):((r=n+1)0&&(n+1===o&&(a+="."),a+=R(r))),a}function I(e,t){var i=e[0];for(t*=7;i>=10;i/=10)t++;return t}function q(e,t,i){if(t>S)throw h=!0,i&&(e.precision=i),Error(m);return T(new e(l),t,1,!0)}function D(e,t,i){if(t>M)throw Error(m);return T(new e(u),t,i,!0)}function O(e){var t=e.length-1,i=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)i--;for(t=e[0];t>=10;t/=10)i++}return i}function R(e){for(var t="";e--;)t+="0";return t}function F(e,t,i,r){var n,a=new e(1),o=Math.ceil(r/7+4);for(h=!1;;){if(i%2&&X((a=a.times(t)).d,o)&&(n=!0),0===(i=v(i/2))){i=a.d.length-1,n&&0===a.d[i]&&++a.d[i];break}X((t=t.times(t)).d,o)}return h=!0,a}function P(e){return 1&e.d[e.d.length-1]}function V(e,t,i){for(var r,n=new e(t[0]),a=0;++a17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(h=!1,l=f):l=t,s=new p(.03125);e.e>-2;)e=e.times(s),d+=5;for(l+=r=Math.log(y(2,d))/Math.LN10*2+5|0,i=a=o=new p(1),p.precision=l;;){if(a=T(a.times(e),l,1),i=i.times(++c),z((s=o.plus(_(a,i,l,1))).d).slice(0,l)===z(o.d).slice(0,l)){for(n=d;n--;)o=T(o.times(o),l,1);if(null!=t)return p.precision=f,o;if(!(u<3&&C(o.d,l-r,m,u)))return T(o,p.precision=f,m,h=!0);p.precision=l+=10,i=a=s=new p(1),c=0,u++}o=s}}function K(e,t){var i,r,n,a,o,s,l,u,c,d,p,m=1,f=e,g=f.d,v=f.constructor,y=v.rounding,b=v.precision;if(f.s<0||!g||!g[0]||!f.e&&1==g[0]&&1==g.length)return new v(g&&!g[0]?-1/0:1!=f.s?NaN:g?0:f);if(null==t?(h=!1,c=b):c=t,v.precision=c+=10,r=(i=z(g)).charAt(0),!(Math.abs(a=f.e)<15e14))return u=q(v,c+2,b).times(a+""),f=K(new v(r+"."+i.slice(1)),c-10).plus(u),v.precision=b,null==t?T(f,b,y,h=!0):f;for(;r<7&&1!=r||1==r&&i.charAt(1)>3;)r=(i=z((f=f.times(e)).d)).charAt(0),m++;for(a=f.e,r>1?(f=new v("0."+i),a++):f=new v(r+"."+i.slice(1)),d=f,l=o=f=_(f.minus(1),f.plus(1),c,1),p=T(f.times(f),c,1),n=3;;){if(o=T(o.times(p),c,1),z((u=l.plus(_(o,new v(n),c,1))).d).slice(0,c)===z(l.d).slice(0,c)){if(l=l.times(2),0!==a&&(l=l.plus(q(v,c+2,b).times(a+""))),l=_(l,new v(m),c,1),null!=t)return v.precision=b,l;if(!C(l.d,c-10,y,s))return T(l,v.precision=b,y,h=!0);v.precision=c+=10,u=o=f=_(d.minus(1),d.plus(1),c,1),p=T(f.times(f),c,1),n=s=1}l=u,n+=2}}function H(e){return e.s*e.s/0+""}function G(e,t){var i,r,n;for((i=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(i<0&&(i=r),i+=+t.slice(r+1),t=t.substring(0,r)):i<0&&(i=t.length),r=0;48===t.charCodeAt(r);r++);for(n=t.length;48===t.charCodeAt(n-1);--n);if(t=t.slice(r,n)){if(n-=r,e.e=i=i-r-1,e.d=[],r=(i+1)%7,i<0&&(r+=7),re.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(i=i.replace(/(\d)_(?=\d)/g,"$1"),A.test(i))return G(e,i)}else if("Infinity"===i||"NaN"===i)return+i||(e.s=NaN),e.e=NaN,e.d=null,e;if(w.test(i))r=16,i=i.toLowerCase();else if(b.test(i))r=2;else{if(!x.test(i))throw Error(p+i);r=8}for((o=i.search(/p/i))>0?(u=+i.slice(o+1),i=i.substring(2,o)):i=i.slice(2),s=(o=i.indexOf("."))>=0,n=e.constructor,s&&(o=(l=(i=i.replace(".","")).length)-o,a=F(n,new n(r),o,2*o)),o=d=(c=E(i,r,k)).length-1;0===c[o];--o)c.pop();return o<0?new n(0*e.s):(e.e=I(c,d),e.d=c,h=!1,s&&(e=_(e,a,4*l)),u&&(e=e.times(Math.abs(u)<54?y(2,u):t.pow(2,u))),h=!0,e)}function Q(e,t,i,r,n){var a,o,s,l,u=e.precision,c=Math.ceil(u/7);for(h=!1,l=i.times(i),s=new e(r);;){if(o=_(s.times(l),new e(t++*t++),u,1),s=n?r.plus(o):r.minus(o),r=_(o.times(l),new e(t++*t++),u,1),void 0!==(o=s.plus(r)).d[c]){for(a=c;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=r,r=o,o=a}return h=!0,o.d.length=c+1,o}function W(e,t){for(var i=e;--t;)i*=e;return i}function Z(e,t){var i,r=t.s<0,a=D(e,e.precision,1),o=a.times(.5);if((t=t.abs()).lte(o))return n=r?4:1,t;if((i=t.divToInt(a)).isZero())n=r?3:2;else{if((t=t.minus(i.times(a))).lte(o))return n=P(i)?r?2:3:r?4:1,t;n=P(i)?r?1:4:r?3:2}return t.minus(a).abs()}function Y(e,t,r,n){var a,l,u,c,h,d,p,m,f,g=e.constructor,v=void 0!==r;if(v?(L(r,1,o),void 0===n?n=g.rounding:L(n,0,8)):(r=g.precision,n=g.rounding),e.isFinite()){for(v?(a=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):a=t,(u=(p=B(e)).indexOf("."))>=0&&(p=p.replace(".",""),(f=new g(1)).e=p.length-u,f.d=E(B(f),10,a),f.e=f.d.length),l=h=(m=E(p,10,a)).length;0==m[--h];)m.pop();if(m[0]){if(u<0?l--:((e=new g(e)).d=m,e.e=l,m=(e=_(e,f,r,n,0,a)).d,l=e.e,d=i),u=m[r],c=a/2,d=d||void 0!==m[r+1],d=n<4?(void 0!==u||d)&&(0===n||n===(e.s<0?3:2)):u>c||u===c&&(4===n||d||6===n&&1&m[r-1]||n===(e.s<0?8:7)),m.length=r,d)for(;++m[--r]>a-1;)m[r]=0,r||(++l,m.unshift(1));for(h=m.length;!m[h-1];--h);for(u=0,p="";u1)if(16==t||8==t){for(u=16==t?4:3,--h;h%u;h++)p+="0";for(h=(m=E(p,a,t)).length;!m[h-1];--h);for(u=1,p="1.";uh)for(l-=h;l--;)p+="0";else lt)return e.length=t,!0}function J(e){return new this(e).abs()}function $(e){return new this(e).acos()}function ee(e){return new this(e).acosh()}function te(e,t){return new this(e).plus(t)}function ie(e){return new this(e).asin()}function re(e){return new this(e).asinh()}function ne(e){return new this(e).atan()}function ae(e){return new this(e).atanh()}function oe(e,t){e=new this(e),t=new this(t);var i,r=this.precision,n=this.rounding,a=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(i=t.s<0?D(this,r,n):new this(0)).s=e.s:!e.d||t.isZero()?(i=D(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,i=this.atan(_(e,t,a,1)),t=D(this,a,1),this.precision=r,this.rounding=n,i=e.s<0?i.minus(t):i.plus(t)):i=this.atan(_(e,t,a,1)):(i=D(this,a,1).times(t.s>0?.25:.75)).s=e.s:i=new this(NaN),i}function se(e){return new this(e).cbrt()}function le(e){return T(e=new this(e),e.e+1,2)}function ue(e,t,i){return new this(e).clamp(t,i)}function ce(e){if(!e||"object"!=typeof e)throw Error(d+"Object expected");var t,i,r,n=!0===e.defaults,s=["precision",1,o,"rounding",0,8,"toExpNeg",-a,0,"toExpPos",0,a,"maxE",0,a,"minE",-a,0,"modulo",0,9];for(t=0;t=s[t+1]&&r<=s[t+2]))throw Error(p+i+": "+r);this[i]=r}if(i="crypto",n&&(this[i]=c[i]),void 0!==(r=e[i])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(p+i+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(f);this[i]=!0}else this[i]=!1}return this}function he(e){return new this(e).cos()}function de(e){return new this(e).cosh()}function pe(e,t){return new this(e).div(t)}function me(e){return new this(e).exp()}function fe(e){return T(e=new this(e),e.e+1,3)}function ge(){var e,t,i=new this(0);for(h=!1,e=0;e=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:l[a++]=n%1e7;else{if(!crypto.randomBytes)throw Error(f);for(t=crypto.randomBytes(r*=4);a=214e7?crypto.randomBytes(4).copy(t,a):(l.push(n%1e7),a+=4);a=r/4}else for(;a=10;n/=10)r++;r<7&&(i-=7-r)}return s.e=i,s.d=l,s}function Le(e){return T(e=new this(e),e.e+1,this.rounding)}function Ce(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Ee(e){return new this(e).sin()}function _e(e){return new this(e).sinh()}function Te(e){return new this(e).sqrt()}function Be(e,t){return new this(e).sub(t)}function Ie(){var e=0,t=arguments,i=new this(t[e]);for(h=!1;i.s&&++ea.maxE?(n.e=NaN,n.d=null):e.e=10;i/=10)t++;return void(h?t>a.maxE?(n.e=NaN,n.d=null):t=127995&&e<=128e3||e>=129456&&e<=129460||e>=917536&&e<=917632}function Rf(e){return e>=127462&&e<=127487}!function(e,t){!function(t){var i=function(e){return.5*(Math.exp(e)+Math.exp(-e))},r=function(e){return.5*(Math.exp(e)-Math.exp(-e))},n=function(){throw SyntaxError("Invalid Param")};function a(e,t){var i=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(i):i<3e3&&r<3e3?.5*Math.log(e*e+t*t):.5*Math.log((e/=2)*e+(t/=2)*t)+Math.LN2}function o(e,t){if(!(this instanceof o))return new o(e,t);var i=function(e,t){var i={re:0,im:0};if(null==e)i.re=i.im=0;else if(void 0!==t)i.re=e,i.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)i.re=e.re,i.im=e.im;else if("abs"in e&&"arg"in e){if(!Number.isFinite(e.abs)&&Number.isFinite(e.arg))return o.INFINITY;i.re=e.abs*Math.cos(e.arg),i.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!Number.isFinite(e.r)&&Number.isFinite(e.phi))return o.INFINITY;i.re=e.r*Math.cos(e.phi),i.im=e.r*Math.sin(e.phi)}else 2===e.length?(i.re=e[0],i.im=e[1]):n();break;case"string":i.im=i.re=0;var r=e.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),a=1,s=0;null===r&&n();for(var l=0;l0&&n();break;case"number":i.im=0,i.re=e;break;default:n()}return isNaN(i.re)||i.im,i}(e,t);this.re=i.re,this.im=i.im}o.prototype={re:0,im:0,sign:function(){var e=this.abs();return new o(this.re/e,this.im/e)},add:function(e,t){var i=new o(e,t);return this.isInfinite()&&i.isInfinite()?o.NAN:this.isInfinite()||i.isInfinite()?o.INFINITY:new o(this.re+i.re,this.im+i.im)},sub:function(e,t){var i=new o(e,t);return this.isInfinite()&&i.isInfinite()?o.NAN:this.isInfinite()||i.isInfinite()?o.INFINITY:new o(this.re-i.re,this.im-i.im)},mul:function(e,t){var i=new o(e,t);return this.isInfinite()&&i.isZero()||this.isZero()&&i.isInfinite()?o.NAN:this.isInfinite()||i.isInfinite()?o.INFINITY:0===i.im&&0===this.im?new o(this.re*i.re,0):new o(this.re*i.re-this.im*i.im,this.re*i.im+this.im*i.re)},div:function(e,t){var i=new o(e,t);if(this.isZero()&&i.isZero()||this.isInfinite()&&i.isInfinite())return o.NAN;if(this.isInfinite()||i.isZero())return o.INFINITY;if(this.isZero()||i.isInfinite())return o.ZERO;e=this.re,t=this.im;var r,n,a=i.re,s=i.im;return 0===s?new o(e/a,t/a):Math.abs(a)0)return new o(Math.pow(e,i.re),0);if(0===e)switch((i.re%4+4)%4){case 0:return new o(Math.pow(t,i.re),0);case 1:return new o(0,Math.pow(t,i.re));case 2:return new o(-Math.pow(t,i.re),0);case 3:return new o(0,-Math.pow(t,i.re))}}if(0===e&&0===t&&i.re>0&&i.im>=0)return o.ZERO;var r=Math.atan2(t,e),n=a(e,t);return e=Math.exp(i.re*n-i.im*r),t=i.im*n+i.re*r,new o(e*Math.cos(t),e*Math.sin(t))},sqrt:function(){var e,t,i=this.re,r=this.im,n=this.abs();if(i>=0){if(0===r)return new o(Math.sqrt(i),0);e=.5*Math.sqrt(2*(n+i))}else e=Math.abs(r)/Math.sqrt(2*(n-i));return t=i<=0?.5*Math.sqrt(2*(n-i)):Math.abs(r)/Math.sqrt(2*(n+i)),new o(e,r<0?-t:t)},exp:function(){var e=Math.exp(this.re);return this.im,new o(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){var e=this.re,t=this.im;return new o(Math.expm1(e)*Math.cos(t)+function(e){var t=Math.PI/4;if(-t>e||e>t)return Math.cos(e)-1;var i=e*e;return i*(i*(i*(i*(i*(i*(i*(i/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-.5)}(t),Math.exp(e)*Math.sin(t))},log:function(){var e=this.re,t=this.im;return new o(a(e,t),Math.atan2(t,e))},abs:function(){return e=this.re,t=this.im,i=Math.abs(e),r=Math.abs(t),i<3e3&&r<3e3?Math.sqrt(i*i+r*r):(i1&&0===t,r=1-e,n=1+e,s=r*r+t*t,l=0!==s?new o((n*r-t*t)/s,(t*r+n*t)/s):new o(-1!==e?e/0:0,0!==t?t/0:0),u=l.re;return l.re=a(l.re,l.im)/2,l.im=Math.atan2(l.im,u)/2,i&&(l.im=-l.im),l},acoth:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new o(0,Math.PI/2);var i=e*e+t*t;return 0!==i?new o(e/i,-t/i).atanh():new o(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){var e=this.re,t=this.im;if(0===t)return new o(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);var i=e*e+t*t;return 0!==i?new o(e/i,-t/i).asinh():new o(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){var e=this.re,t=this.im;if(this.isZero())return o.INFINITY;var i=e*e+t*t;return 0!==i?new o(e/i,-t/i).acosh():new o(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return o.INFINITY;if(this.isInfinite())return o.ZERO;var e=this.re,t=this.im,i=e*e+t*t;return new o(e/i,-t/i)},conjugate:function(){return new o(this.re,-this.im)},neg:function(){return new o(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new o(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new o(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new o(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){var i=new o(e,t);return Math.abs(i.re-this.re)<=o.EPSILON&&Math.abs(i.im-this.im)<=o.EPSILON},clone:function(){return new o(this.re,this.im)},toString:function(){var e=this.re,t=this.im,i="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)=55296&&r<=56319){const t=e.charCodeAt(i+1);t>=56320&&t<=57343&&(r=65536+1024*(r-55296)+(t-56320),i++)}t.push(r)}return t}(e);let r=0;for(;r=this.s.length}get(){return this.pos";if(this.obeyspaces&&this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]/))return"";const e=this.get();if("\\"===e){if(!this.end()){let e=this.match(/^[a-zA-Z*]+/);if(e)this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]*/);else if(e=this.get()," "===e)return"";return"\\"+e}}else{if("{"===e)return"<{>";if("}"===e)return"<}>";if("^"===e){if("^"===this.peek()){this.get();const e=this.match(/^(\^(\^(\^(\^[0-9a-f])?[0-9a-f])?[0-9a-f])?[0-9a-f])?[0-9a-f][0-9a-f]/);if(e)return String.fromCodePoint(parseInt(e.slice(e.lastIndexOf("^")+1),16))}return e}if("#"===e){if(!this.end()){let e=!1;if(/[0-9?]/.test(this.peek())&&(e=!0,this.pos+1"):"<$>"}return e}}function Pf(e,t){var i,r,n,a;let o=[],s=e.next();if(s)if("\\relax"===s);else if("\\noexpand"===s)s=e.next(),s&&o.push(s);else if("\\obeyspaces"===s)e.obeyspaces=!0;else if("\\space"===s||"~"===s)o.push("");else if("\\bgroup"===s)o.push("<{>");else if("\\egroup"===s)o.push("<}>");else if("\\string"===s)s=e.next(),s&&("\\"===s[0]?Array.from(s).forEach((e=>o.push("\\"===e?"\\backslash":e))):"<{>"===s?o.push("\\{"):""===s?o.push("~"):"<}>"===s&&o.push("\\}"));else if("\\csname"===s){for(;""===e.peek();)e.next();let n="",a=!1,l=[];do{0===l.length&&(/^#[0-9?]$/.test(e.peek())?(l=Vf(null!==(r=null!==(i=null===t||void 0===t?void 0:t[e.get().slice(1)])&&void 0!==i?i:null===t||void 0===t?void 0:t["?"])&&void 0!==r?r:"\\placeholder{}",t),s=l[0]):(s=e.next(),l=s?[s]:[])),a=0===l.length,a||"\\endcsname"!==s||(a=!0,l.shift()),a||(a="<$>"===s||"<$$>"===s||"<{>"===s||"<}>"===s||!!s&&s.length>1&&"\\"===s[0]),a||(n+=l.shift())}while(!a);n&&o.push("\\"+n),o=o.concat(l)}else if("\\endcsname"===s);else if(s.length>1&&"#"===s[0]){const e=s.slice(1);o=o.concat(Vf(null!==(a=null!==(n=null===t||void 0===t?void 0:t[e])&&void 0!==n?n:null===t||void 0===t?void 0:t["?"])&&void 0!==a?a:"\\placeholder{}",t))}else o.push(s);return o}function Vf(e,t){const i=e.toString().split(/\r?\n/);let r="",n="";for(const s of i){r+=n,n=" ";const e=s.match(/((?:\\%)|[^%])*/);null!==e&&(r+=e[0])}const a=new Ff(r),o=[];do{o.push(...Pf(a,t))}while(!a.end());return o}function Uf(e){let t="",i="";for(const r of e)r&&(/[a-zA-Z*]/.test(r[0])&&(i+=t),t=/\\[a-zA-Z]+\*?$/.test(r)?" ":"",i+=r);return i}function Kf(e){let t=[];if(Array.isArray(e))for(const i of e)Array.isArray(i)?t=[...t,...i]:t.push(i);else t=[e];return Uf(t.map((e=>{var t;return null!==(t={"":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[e])&&void 0!==t?t:e})))}function Hf(e){return null!==e&&"object"==typeof e&&"num"in e}function Gf(e){return null!==e&&"object"==typeof e&&"sym"in e}function jf(e){return null!==e&&"object"==typeof e&&"fn"in e}function Qf(e){return null===e?null:"object"==typeof e&&"str"in e?e.str:"string"!=typeof e||e.length<2||"'"!==e[0]||"'"!==e[e.length-1]?null:e.substring(1,e.length-1)}function Wf(e){return null===e?null:Array.isArray(e)?e[0]:jf(e)?e.fn[0]:null}function Zf(e){const t=Wf(e);return"string"==typeof t?t:""}function Yf(e,t){var i,r;return null===e?null:Array.isArray(e)?null!==(i=e[t])&&void 0!==i?i:null:jf(e)&&null!==(r=e.fn[t])&&void 0!==r?r:null}function Xf(e){return Array.isArray(e)?Math.max(0,e.length-1):jf(e)?Math.max(0,e.fn.length-1):0}function Jf(e){if(null===e)return null;const t=Gf(e)?e.sym:e;return"string"!=typeof t||t.length>=2&&"'"===t[0]&&"'"===t[t.length-1]?null:t}function $f(e){if(null===e)return null;const t=Gf(e)?e.sym:e;return"string"!=typeof t||t.length<2||"'"!==t[0]||"'"!==t[t.length-1]?null:t.slice(1,-1)}function eg(e){var t;const i=Wf(e);if("KeyValuePair"===i||"Tuple"===i||"Pair"===i){const i=$f(Yf(e,1));return i?[i,null!==(t=Yf(e,2))&&void 0!==t?t:"Nothing"]:null}return null}function tg(e){if(null===e)return null;if("object"==typeof e&&"dict"in e)return e.dict;const t=eg(e);if(t)return{[t[0]]:t[1]};const i=Wf(e);if("List"===i||"Dictionary"===i){const t={};for(let i=1;i2?"solidus":"radical"}function ug(e,t){return t>3?"inline-solidus":"quotient"}function cg(e,t,i,r){return null===i?"\\sqrt{}":(r=null!==r&&void 0!==r?r:2,"solidus"===t?e.wrapShort(i)+"^{1\\/"+e.serialize(r)+"}":"quotient"===t?e.wrapShort(i)+"^{\\frac{1}{"+e.serialize(r)+"}}":2===ig(r)?"\\sqrt{"+e.serialize(i)+"}":"\\sqrt["+e.serialize(r)+"]{"+e.serialize(i)+"}")}function hg(e,t){var i,r;if(null===t)return"";const n=null!==(i=Yf(t,1))&&void 0!==i?i:"Missing",a=null!==(r=Yf(t,2))&&void 0!==r?r:"Missing";if(1===Xf(t))return e.serialize(n);const o=ug(0,e.level);if("inline-solidus"===o||"nice-solidus"===o){const t=e.wrapShort(n),i=e.wrapShort(a);return"inline-solidus"===o?`${t}\\/${i}`:`^{${t}}\\!\\!/\\!_{${i}}`}return"reciprocal"===o?e.wrap(n)+e.wrap(a)+"^{-1}":"factor"===o?"\\frac{1}{"+e.serialize(a)+"}"+e.wrap(n):`\\frac{${e.serialize(n)}}{${e.serialize(a)}}`}function dg(e,t){var i,r,n;const a=Wf(t),o=null!==(i=Yf(t,1))&&void 0!==i?i:"Missing",s=null!==(r=Yf(t,2))&&void 0!==r?r:"Missing";if("Sqrt"===a)return cg(e,lg(0,e.level),o,2);if("Root"===a)return cg(e,lg(0,e.level),o,s);const l=null!==(n=ig(s))&&void 0!==n?n:1;if(-1===l)return e.serialize(["Divide","1",o]);if(l<0)return e.serialize(["Divide","1",["Power",o,-l]]);if("Divide"===Wf(s)||"Rational"===Wf(s)){if(1===ig(Yf(s,1)))return cg(e,lg(0,e.level),o,Yf(s,2))}else if("Power"===Wf(s)&&-1===ig(Yf(s,2)))return cg(e,lg(0,e.level),o,Yf(s,1));return e.wrapShort(o)+"^{"+e.serialize(s)+"}"}const pg=[{name:"CatalanConstant",serialize:"G"},{name:"GoldenRatio",serialize:"\\varphi"},{name:"EulerGamma",serialize:"\\gamma"},{name:"Degrees",serialize:"\\frac{\\pi}{180}"},{trigger:["\\infty"],parse:{num:"+Infinity"}},{name:"ComplexInfinity",trigger:["\\tilde","\\infty"],serialize:"\\tilde\\infty"},{trigger:["\\tilde","<{>","\\infty","<}>"],parse:"ComplexInfinity"},{name:"Pi",trigger:["\\pi"]},{trigger:["π"],parse:"Pi"},{name:"ExponentialE",trigger:["e"],serialize:"e"},{trigger:["\\mathrm","<{>","e","<}>"],parse:"ExponentialE"},{trigger:["\\exponentialE"],parse:"ExponentialE"},{name:"ImaginaryUnit",trigger:["\\imaginaryI"]},{trigger:["i"],parse:"ImaginaryUnit"},{trigger:["\\mathrm","<{>","i","<}>"],parse:"ImaginaryUnit"},{name:"Add",trigger:["+"],kind:"infix",associativity:"both",precedence:275,parse:(e,t,i)=>{if(275275{const i=ig(Yf(t,1)),r=ig(Yf(t,2));if(0===r)return e.serialize(Yf(t,1));const n=1===r?"\\imaginaryI":-1===r?"-\\imaginaryI":Uf([e.serialize(Yf(t,2)),"\\imaginaryI"]);return 0===i?n:Uf(null!==r&&r<0?[e.serialize(Yf(t,1)),n]:[e.serialize(Yf(t,1)),"+",n])}},{name:"Divide",trigger:["\\frac"],requiredLatexArg:2,precedence:660,parse:function(e){var t,i,r,n;const a=null!==(t=e.matchRequiredLatexArgument())&&void 0!==t?t:"Missing",o=null!==(i=e.matchRequiredLatexArgument())&&void 0!==i?i:"Missing";if("PartialDerivative"===Wf(a)&&("PartialDerivative"===Wf(o)||"Multiply"===Wf(o)&&"PartialDerivative"===Wf(Yf(o,1)))){const t=null!==(r=Yf(a,3))&&void 0!==r?r:"Missing";let i=Yf(a,1);null!==i&&"Missing"!==i||(i=null!==(n=e.matchExpression())&&void 0!==n?n:"Missing");let s=[];if("Multiply"===Wf(o)){for(const e of ng(o))if("PartialDerivative"===Wf(e)){const t=Yf(e,2);t&&s.push(t)}}else{const e=Yf(o,2);e&&s.push(e)}return s.length>1&&(s=["List",...s]),["PartialDerivative",i,...s,"Missing"===t?1:t]}return["Divide",a,o]},serialize:hg},{trigger:["\\/"],kind:"infix",associativity:"non",precedence:660,parse:"Divide"},{trigger:["/"],kind:"infix",associativity:"non",precedence:660,parse:"Divide"},{trigger:["\\div"],kind:"infix",associativity:"non",precedence:660,parse:"Divide"},{name:"Exp",serialize:(e,t)=>{var i;return Uf(["\\exponentialE^{",e.serialize(null!==(i=Yf(t,1))&&void 0!==i?i:"Missing"),"}"])}},{name:"Factorial",trigger:["!"],kind:"postfix",precedence:810},{name:"Factorial2",trigger:["!","!"],kind:"postfix",precedence:810},{trigger:"\\operatorname{floor}",parse:e=>{const t=e.matchArguments("enclosure");return null===t?null:["Floor",...t]}},{name:"Gcd",trigger:"\\operatorname{gcd}",parse:e=>{const t=e.matchArguments("enclosure");return null===t?null:["Gcd",...t]},serialize:(e,t)=>Uf(["\\operatorname{gcd}","\\left(",e.serialize(t),"\\right)"])},{name:"Half",serialize:"\\frac12"},{name:"Lcm",trigger:"\\operatorname{lcm}"},{name:"MinusPlus",trigger:["\\mp"],kind:"infix",associativity:"both",precedence:270},{name:"Multiply",trigger:["\\times"],kind:"infix",associativity:"both",precedence:390,serialize:function e(t,i){var r,n;if(null===i)return"";t.level-=1;let a="";const[o,s]=function(e){var t,i,r,n,a;if("Multiply"!==Wf(e))return[[],[]];const o=[],s=[],l=ng(e);for(const u of l)if("Power"===Wf(u))if("Negate"===Wf(Yf(u,2))){const e=null!==(t=Yf(u,1))&&void 0!==t?t:"Missing",r=null!==(i=Yf(Yf(u,2),1))&&void 0!==i?i:"Missing";s.push(["Power",e,r])}else{const e=null!==(r=ig(Yf(u,2)))&&void 0!==r?r:NaN;-1===e?s.push(null!==(n=Yf(u,1))&&void 0!==n?n:"Missing"):e<0?s.push(["Power",null!==(a=Yf(u,1))&&void 0!==a?a:"Missing",-e]):o.push(u)}else o.push(u);return[o,s]}(i);if(s.length>0&&(a=1===s.length&&1===s[0]?0===o.length?"1":1===o.length?t.serialize(o[0]):e(t,["Multiply",...o]):t.serialize(["Divide",1===o.length?o[0]:["Multiply",...o],1===s.length?s[0]:["Multiply",...s]])),a)return t.level+=1,a;let l=!1,u=null;const c=Xf(i)+1;let h=!1;for(let d=1;d{if(391{if(391{if(276e.wrapShort(Yf(t,1))+"^2"},{name:"Sign",trigger:"\\operatorname{sgn}"},{name:"Sqrt",trigger:["\\sqrt"],optionalLatexArg:1,requiredLatexArg:1,parse:function(e){const t=e.matchOptionalLatexArgument(),i=e.matchRequiredLatexArgument();return null===i?null!==t?["Root","Missing",t]:["Sqrt","Missing"]:null!==t?["Root",i,t]:["Sqrt",i]},serialize:dg},{name:"Subtract",trigger:["-"],kind:"infix",associativity:"both",precedence:275,parse:(e,t,i)=>{if(276ng(i).map((e=>t.serialize(e))).join(e)}function fg(e,t){if(null===t)return"";const i=Wf(t);if("LatexString"===i)return bg(e,t);if("LatexTokens"===i)return yg(e,t);const r=Qf(t);if(null!==r)return`\\text{${r}}`;const n=ig(t);return null!==n?n.toString():`\\text{${JSON.stringify(t)}}`}const gg=[{name:"Missing",trigger:["\\placeholder"],requiredLatexArg:1,serialize:e=>{var t;return null!==(t=e.options.missingSymbol)&&void 0!==t?t:"\\placeholder{}"}},{name:"BaseForm",serialize:(e,t)=>{var i,r;const n=null!==(i=ig(Yf(t,2)))&&void 0!==i?i:NaN;if(isFinite(n)&&n>=2&&n<=36){const e=null!==(r=ig(Yf(t,1)))&&void 0!==r?r:NaN;if(isFinite(e)){let t=Number(e).toString(n),i=0;if(2===n||10===n?i=4:16===n?i=2:n>16&&(i=4),i>0){const e=t;t="";for(let r=0;r0&&r%i==0&&(t="\\, "+t),t=e[e.length-r-1]+t}return`(\\text{${t}}_{${n}}`}}return"\\operatorname{BaseForm}("+e.serialize(Yf(t,1))+", "+e.serialize(Yf(t,2))+")"}},{name:"Delimiter",serialize:(e,t)=>{var i,r,n,a,o,s;const l=Xf(t);if(0===l)return"";if(1===l)return`\\left( ${e.serialize(Yf(t,1))} \\right)`;let u="",c="\\left(",h="\\left)";2===l?u=null!==(i=fg(e,Yf(t,2)))&&void 0!==i?i:"":3===l?(c=null!==(r=fg(e,Yf(t,2)))&&void 0!==r?r:"",h=null!==(n=fg(e,Yf(t,3)))&&void 0!==n?n:""):(c=null!==(a=fg(e,Yf(t,2)))&&void 0!==a?a:"",u=null!==(o=fg(e,Yf(t,3)))&&void 0!==o?o:"",h=null!==(s=fg(e,Yf(t,4)))&&void 0!==s?s:"");const d=Yf(t,1);return u&&"Sequence"===Wf(d)?`${c} ${mg(u)(e,d)} ${h}`:`${c} ${e.serialize(d)} ${h}`}},{name:"Error",serialize:(e,t)=>{const i=Yf(t,1),r="Nothing"===Jf(i)?"":e.serialize(i);if(Xf(t)>=3){const e=Yf(t,3);if(e&&"LatexForm"===Wf(e)){const t=wg(Qf(Yf(e,1)));if(t)return`${null!==r&&void 0!==r?r:""}\\texttt{\\textcolor{red}{${t}}}`}}return null!==r&&void 0!==r?r:""}},{name:"FromLatex",serialize:(e,t)=>`\\texttt{${wg(Qf(Yf(t,1)))}}`},{name:"LatexForm",serialize:bg},{name:"LatexTokens",serialize:yg},{kind:"matchfix",openDelimiter:"(",closeDelimiter:")",parse:(e,t)=>null===t?null:"Sequence"===Wf(t)?0===Xf(t)?["Delimiter","Nothing"]:["Delimiter",...ng(t)]:["Delimiter",t]},{name:"Sequence",trigger:[","],kind:"infix",precedence:20,parse:(e,t,i)=>{if(t.minPrec>=20)return null;"Missing"===i&&(i="Nothing");const r=["Sequence",i];let n=!1;for(;!n;){for(n=!0,e.skipSpace();e.match(",");)r.push("Nothing"),e.skipSpace();if(e.atTerminator(t))r.push("Nothing");else{const i=e.matchExpression({...t,minPrec:20});r.push(null!==i&&void 0!==i?i:"Nothing"),n=null===i}n||(e.skipSpace(),n=!e.match(","))}return r},serialize:mg()},{trigger:[";"],kind:"infix",precedence:19,parse:(e,t,i)=>{var r,n;if(t.minPrec>=19)return null;"Missing"===i&&(i="Nothing");const a=["Sequence",...null!==(r=sg(i))&&void 0!==r?r:["Sequence",i]];for(;;){for(e.skipSpace();e.match(",");)a.push("Nothing"),e.skipSpace();if(e.atEnd){a.push("Nothing");break}const i=e.matchExpression({...t,minPrec:19});if(null===i){a.push("Nothing");break}if(a.push(...null!==(n=sg(i))&&void 0!==n?n:["Sequence",i]),e.skipSpace(),!e.match(","))break}return a}},{name:"String",trigger:["\\text"],parse:e=>vg(e),serialize:(e,t)=>{const i=ng(t);return null===i||0===i.length?"\\text{}":Uf(["\\text{",i.map((t=>e.serialize(t))).join(""),"}"])}},{name:"Subscript",trigger:["_"],kind:"infix",serialize:(e,t)=>2===Xf(t)?e.serialize(Yf(t,1))+"_{"+e.serialize(Yf(t,2))+"}":"_{"+e.serialize(Yf(t,1))+"}"},{name:"Superplus",trigger:["^","+"],kind:"postfix"},{name:"Subplus",trigger:["_","+"],kind:"postfix"},{name:"Superminus",trigger:["^","-"],kind:"postfix"},{name:"Subminus",trigger:["_","-"],kind:"postfix"},{trigger:["^","*"],kind:"postfix",parse:(e,t)=>["Superstar",t]},{name:"Superstar",trigger:["^","\\star"],kind:"postfix"},{trigger:["_","*"],kind:"postfix",parse:(e,t)=>["Substar",t]},{name:"Substar",trigger:["_","\\star"],kind:"postfix"},{name:"Superdagger",trigger:["^","\\dagger"],kind:"postfix"},{trigger:["^","\\dag"],kind:"postfix",parse:(e,t)=>["Superdagger",t]},{name:"Prime",trigger:["^","\\prime"],kind:"postfix"},{trigger:["^","\\doubleprime"],kind:"postfix",parse:(e,t)=>["Prime",null!==t&&void 0!==t?t:"Nothing",2]},{name:"Derivative",serialize:(e,t)=>{var i;const r=null!==(i=ig(Yf(t,1)))&&void 0!==i?i:NaN;if(!isFinite(r))return"";const n=e.serialize(Yf(t,2));return 1===r?n+"^{\\prime}":2===r?n+"^{\\doubleprime}":n+"^{("+Number(r).toString()+")}"}},{name:"Piecewise",trigger:"cases",kind:"environment",parse:e=>{var t;return["Piecewise",null!==(t=e.matchTabular("cases"))&&void 0!==t?t:"Nothing"]},serialize:(e,t)=>{if("List"!==Wf(Yf(t,1)))return"";const i=ng(Yf(t,1));let r="",n="";for(const a of i){r+=n;const t=Yf(a,1);if(null!==t){r+=e.serialize(t);const i=Yf(a,2);null!==i&&(r+="&"+e.serialize(i))}n="\\\\"}return"\\begin{cases}"+r+"\\end{cases}"}}];function vg(e,t){var i,r,n;if(!e.match("<{>"))return"Nothing";const a=[];let o="",s=null;for(;!e.atEnd&&!e.match("<}>");)if("<{>"===e.peek)a.push(vg(e));else if(e.match("\\textbf")&&e.match("<{>"))a.push(vg(e,{"font-weight":"bold"}));else if(e.match("\\color")&&e.match("<{>")){const t=e.matchColor();t&&e.match("<}>")&&(null!==s&&o?a.push(["Style",o,{dict:s}]):o&&a.push(["String",o]),o="",s={color:t})}else if(e.match(""))o+=" ";else if(e.match("<$>")){const t=e.index,r=null!==(i=e.matchExpression())&&void 0!==i?i:"Nothing";e.skipSpace(),e.match("<$>")?a.push(r):(o+="$",e.index=t)}else if(e.match("<$$>")){const t=e.index,i=null!==(r=e.matchExpression())&&void 0!==r?r:"Nothing";e.skipSpace(),e.match("<$$>")?a.push(i):(o+="$$",e.index=t)}else o+=null!==(n=e.matchChar())&&void 0!==n?n:"";return null!==s&&o?a.push(["Style",o,{dict:s}]):o&&a.push(["String",o]),t?["Style",["String",...a],{dict:t}]:["String",...a]}function yg(e,t){return null===t?"":Uf(ag(t,(t=>{const i=Qf(t);return null===i?e.serialize(t):"<{>"===i?"{":"<}>"===i?"}":"<$>"===i?"$":"<$$>"===i?"$$":""===i?" ":i})))}function bg(e,t){return null===t?"":Uf(ag(t,(t=>{var i;return null!==(i=Qf(t))&&void 0!==i?i:e.serialize(t)})))}function wg(e){return null===e?"":e.replace(/[{}\[\]\\:\-\$%]/g,(e=>{var t;return null!==(t={"{":"\\lbrace ","}":"\\rbrace ","[":"\\lbrack ","]":"\\rbrack ",":":"\\colon ","\\":"\\backslash "}[e])&&void 0!==t?t:"\\"+e}))}const xg=[{name:"Overscript",trigger:["\\overset"],kind:"infix",precedence:700},{name:"Underscript",trigger:["\\underset"],kind:"infix",precedence:700},{name:"Increment",trigger:["+","+"],kind:"postfix",precedence:880},{name:"Decrement",trigger:["-","-"],kind:"postfix",precedence:880},{name:"PreIncrement",trigger:["+","+"],kind:"prefix",precedence:880},{name:"PreDecrement",trigger:["-","-"],kind:"prefix",precedence:880},{name:"Ring",trigger:["\\circ"],kind:"infix",precedence:265},{name:"Transpose",trigger:["^","T"],kind:"infix"},{name:"ConjugateTranspose",trigger:["^","H"],kind:"infix"},{name:"StringJoin",trigger:["\\lt","\\gt"],kind:"infix",precedence:780},{name:"Starstar",trigger:["\\star","\\star"],kind:"infix",precedence:780},{name:"PartialDerivative",trigger:["\\partial"],kind:"prefix",parse:e=>{var t,i;let r=!1,n="Nothing",a="Nothing";for(;!r;)e.skipSpace(),e.match("_")?a=e.matchRequiredLatexArgument():e.match("^")?n=e.matchRequiredLatexArgument():r=!0;const o=sg(a);if(o&&(a=["List",...o]),!a||!n)return null;let s=null!==(t=e.matchRequiredLatexArgument())&&void 0!==t?t:"Nothing";return"Nothing"!==s&&(s=[s,...null!==(i=e.matchArguments("enclosure"))&&void 0!==i?i:"Nothing"]),["PartialDerivative",s,a,n]},serialize:(e,t)=>{let i="\\partial";const r=Yf(t,1),n=Yf(t,2),a=Yf(t,3);return null!==n&&"Nothing"!==n&&("List"===Wf(n)?i+="_{"+e.serialize(["Sequence",...ng(n)])+"}":i+="_{"+e.serialize(n)+"}"),null!==a&&"Nothing"!==a&&(i+="^{"+e.serialize(a)+"}"),null!==r&&"Nothing"!==r&&(i+=e.serialize(r)),i},precedence:740},{name:"OverBar",trigger:["\\overline"],requiredLatexArg:1},{name:"UnderBar",trigger:["\\underline"],requiredLatexArg:1},{name:"OverVector",trigger:["\\vec"],requiredLatexArg:1},{name:"OverTilde",trigger:["\\tilde"],requiredLatexArg:1},{name:"OverHat",trigger:["\\hat"],requiredLatexArg:1},{name:"OverRightArrow",trigger:["\\overrightarrow"],requiredLatexArg:1},{name:"OverLeftArrow",trigger:["\\overleftarrow"],requiredLatexArg:1},{name:"OverRightDoubleArrow",trigger:["\\Overrightarrow"],requiredLatexArg:1},{name:"OverLeftHarpoon",trigger:["\\overleftharpoon"],requiredLatexArg:1},{name:"OverRightHarpoon",trigger:["\\overrightharpoon"],requiredLatexArg:1},{name:"OverLeftRightArrow",trigger:["\\overleftrightarrow"],requiredLatexArg:1},{name:"OverBrace",trigger:["\\overbrace"],requiredLatexArg:1},{name:"OverLineSegment",trigger:["\\overlinesegment"],requiredLatexArg:1},{name:"OverGroup",trigger:["\\overgroup"],requiredLatexArg:1},{trigger:["\\displaystyle"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'display'","'block'"]]}},{trigger:["\\textstyle"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'display'","'inline'"]]}},{trigger:["\\scriptstyle"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'display'","'script'"]]}},{trigger:["\\scriptscriptstyle"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'display'","'scriptscript'"]]}},{trigger:["\\tiny"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",1]]}},{trigger:["\\scriptsize"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",2]]}},{trigger:["\\footnotesize"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",3]]}},{trigger:["\\small"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",4]]}},{trigger:["\\normalsize"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",5]]}},{trigger:["\\large"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",6]]}},{trigger:["\\Large"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",7]]}},{trigger:["\\LARGE"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",8]]}},{trigger:["\\huge"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",9]]}},{trigger:["\\Huge"],parse:e=>{const t=e.matchArguments("group");return null===t?null:["Style",...t,["KeyValuePair","'size'",10]]}},{name:"Style",serialize:(e,t)=>{let i=e.serialize(Yf(t,1));const r=tg(Yf(t,2));if(null===r)return i;"block"===$f(r.display)?i=Uf(["{\\displaystyle",i,"}"]):"inline"===$f(r.display)?i=Uf(["{\\textstyle",i,"}"]):"script"===$f(r.display)?i=Uf(["{\\scriptstyle",i,"}"]):"scriptscript"===$f(r.display)&&(i=Uf(["{\\scriptscriptstyle",i,"}"]));const n=ig(r.size);return null!==n&&n>=1&&n<=10&&(i=Uf(["{",{1:"\\tiny",2:"\\scriptsize",3:"\\footnotesize",4:"\\small",5:"\\normalsize",6:"\\large",7:"\\Large",8:"\\LARGE",9:"\\huge",10:"\\Huge"}[n],i,"}"])),i}},{trigger:["\\!"],parse:()=>["HorizontalSpacing","Nothing",-3]},{trigger:["\\ "],parse:()=>["HorizontalSpacing","Nothing",6]},{trigger:["\\:"],parse:()=>["HorizontalSpacing","Nothing",4]},{trigger:["\\enskip"],parse:()=>["HorizontalSpacing","Nothing",9]},{trigger:["\\quad"],parse:()=>["HorizontalSpacing","Nothing",18]},{trigger:["\\qquad"],parse:()=>["HorizontalSpacing","Nothing",36]},{trigger:["\\,"],parse:()=>["HorizontalSpacing","Nothing",3]},{trigger:["\\;"],parse:()=>["HorizontalSpacing","Nothing",5]},{trigger:["\\enspace"],parse:()=>["HorizontalSpacing","Nothing",9]},{name:"HorizontalSpacing",serialize:(e,t)=>{var i;if("Nothing"===Jf(Yf(t,1))){const e=ig(Yf(t,2));return null===e?"":null!==(i={"-3":"\\!",6:"\\ ",3:"\\,",4:"\\:",5:"\\;",9:"\\enspace",18:"\\quad",36:"\\qquad"}[e])&&void 0!==i?i:""}return""}}];function Ag(e){return t=>{var i,r;let n=!1,a=0;if(t.skipSpace(),t.match("^")){if(t.skipSpace(),t.match("<{>")){t.skipSpace(),t.match("-")&&t.match("1")&&(n=!0);do{t.match("\\doubleprime")&&(a+=2),t.match("\\prime")&&(a+=1),t.match("'")&&(a+=1)}while(!t.match("<}>")&&!t.atEnd)}let e=!1;for(;!e;)t.skipSpace(),t.match("\\doubleprime")?a+=2:t.match("\\prime")||t.match("'")?a+=1:e=!0}let o=null!==(r=null!==(i={"\\arcsin":"Arcsin","\\arccos":"Arccos","\\arctan":"Arctan","\\arctg":"Arctan","\\arcctg":"Arctan","\\arcsec":"Arcsec","\\arccsc":" Arccsc","\\arsinh":"Arsinh","\\arcosh":"Arcosh","\\artanh":"Artanh","\\arcsech":"Arcsech","\\arccsch":"Arcsch","\\ch":"Cosh","\\cos":"Cos","\\cosec":"Csc","\\cosh":"Csch","\\cot":"Cot","\\cotg":"Cot","\\coth":"Coth","\\csc":"Csc","\\ctg":"Cot","\\cth":"Coth","\\sec":"Sec","\\sin":"Sin","\\sinh":"Sinh","\\sh":"Sinh","\\tan":"Tan","\\tanh":"Tanh","\\tg":"Tan","\\th":"Tanh"}[null!==e&&void 0!==e?e:""])&&void 0!==i?i:e)&&void 0!==r?r:"";n&&(o=["InverseFunction",o]),a>=1&&(o=["Derivative",a,o]);const s=t.matchArguments("implicit");return null===s?[o,"Nothing"]:[o,...s]}}const kg=[{name:"Arcsin",trigger:["\\arcsin"],parse:Ag("Arcsin")},{name:"Arccos",trigger:["\\arccos"],parse:Ag("Arccos")},{name:"Arctan",trigger:["\\arctan"],parse:Ag("Arctan")},{trigger:["\\arctg"],parse:Ag("Arctan")},{name:"Arccot",trigger:["\\arcctg"],parse:Ag("Arccot")},{name:"Arcsec",trigger:["\\arcsec"],parse:Ag("Arcsec")},{name:"Arccsc",trigger:["\\arccsc"],parse:Ag("Arccsc")},{name:"Arsinh",trigger:["\\arsinh"],parse:Ag("Arsinh")},{name:"Arcosh",trigger:["\\arcosh"],parse:Ag("Arcosh")},{name:"Artanh",trigger:["\\artanh"],parse:Ag("Artanh")},{name:"Arsech",trigger:["\\arsech"],parse:Ag("Arsech")},{name:"Arcsch",trigger:["\\arcsch"],parse:Ag("Arcsch")},{trigger:["\\ch"],parse:Ag("Cosh")},{name:"Cosec",trigger:["\\cosec"],parse:Ag("Cosec")},{name:"Cosh",trigger:["\\cosh"],parse:Ag("Cosh")},{name:"Cot",trigger:["\\cot"],parse:Ag("Cot")},{trigger:["\\cotg"],parse:Ag("Cot")},{name:"Coth",trigger:["\\coth"],parse:Ag("Coth")},{name:"Csc",trigger:["\\csc"],parse:Ag("Csc")},{trigger:["\\ctg"],parse:Ag("Cot")},{trigger:["\\cth"],parse:Ag("Cotanh")},{name:"Sec",trigger:["\\sec"],parse:Ag("Sec")},{name:"Sinh",trigger:["\\sinh"],parse:Ag("Sinh")},{trigger:["\\sh"],parse:Ag("Sinh")},{name:"Tan",trigger:["\\tan"],parse:Ag("Tan")},{trigger:["\\tg"],parse:Ag("Tan")},{name:"Tanh",trigger:["\\tanh"],parse:Ag("Tanh")},{trigger:["\\th"],parse:Ag("Tanh")},{name:"Cos",trigger:["\\cos"],parse:Ag("Cos")},{name:"Sin",trigger:["\\sin"],parse:Ag("Sin")}],Sg=[{name:"AlgebraicNumber",trigger:"\\bar\\Q"},{name:"ComplexNumber",trigger:["\\C"]},{trigger:"\\mathbb{C}",parse:"ComplexNumber"},{name:"ImaginaryNumber",trigger:["\\imaginaryI\\R"]},{name:"ExtendedComplexNumber",trigger:["\\bar\\C"]},{name:"EmptySet",trigger:["\\emptyset"]},{trigger:["\\varnothing"],parse:"EmptySet"},{name:"Integer",trigger:["\\Z"]},{trigger:"\\mathbb{Z}",parse:"Integer"},{name:"RationalNumber",trigger:["\\Q"]},{name:"RealNumber",trigger:["\\R"]},{name:"ExtendedRealNumber",trigger:["\\bar\\R"]},{name:"TranscendentalNumber",trigger:"\\R-\\bar\\Q"},{trigger:"\\R\\backslash\\bar\\Q",parse:"TranscendentalNumber"},{name:"NegativeNumber",trigger:"\\R^-"},{trigger:"\\R^{-}",parse:"NegativeNumber"},{trigger:"\\R_-",parse:"NegativeNumber"},{trigger:"\\R_{-}",parse:"NegativeNumber"},{trigger:"\\R^{\\lt}",parse:"NegativeNumber"},{name:"PositiveNumber",trigger:"\\R^+"},{trigger:"\\R^{+}",parse:"PositiveNumber"},{trigger:"\\R_+",parse:"PositiveNumber"},{trigger:"\\R_{+}",parse:"PositiveNumber"},{trigger:"\\R^{\\gt}",parse:"PositiveNumber"},{name:"NonPositiveNumber",trigger:"\\R^{0-}"},{trigger:"\\R^{-0}",parse:"NonPositiveNumber"},{trigger:"\\R^{\\leq}",parse:"NonPositiveNumber"},{name:"NegativeInteger",trigger:"\\Z^-"},{trigger:"\\Z^-",parse:"NegativeInteger"},{trigger:"\\Z^{-}",parse:"NegativeInteger"},{trigger:"\\Z_-",parse:"NegativeInteger"},{trigger:"\\Z_{-}",parse:"NegativeInteger"},{trigger:"\\Z^{\\lt}",parse:"NegativeInteger"},{name:"PositiveInteger",trigger:"\\Z^+"},{trigger:"\\Z^{+}",parse:"PositiveInteger"},{trigger:"\\Z_+",parse:"PositiveInteger"},{trigger:"\\Z_{+}",parse:"PositiveInteger"},{trigger:"\\Z^{\\gt}",parse:"PositiveInteger"},{trigger:"\\Z^{\\gt0}",parse:"PositiveInteger"},{trigger:"\\N^+",parse:"PositiveInteger"},{trigger:"\\N^{+}",parse:"PositiveInteger"},{trigger:"\\N^*",parse:"PositiveInteger"},{trigger:"\\N^{*}",parse:"PositiveInteger"},{trigger:"\\N^\\star",parse:"PositiveInteger"},{trigger:"\\N^{\\star}",parse:"PositiveInteger"},{trigger:"\\N_1",parse:"PositiveInteger"},{trigger:"\\N_{1}",parse:"PositiveInteger"},{name:"NonNegativeInteger",trigger:["\\N"]},{trigger:"\\Z^{+0}",parse:"NonNegativeInteger"},{trigger:"\\Z^{\\geq}",parse:"NonNegativeInteger"},{trigger:"\\Z^{\\geq0}",parse:"NonNegativeInteger"},{trigger:"\\Z^{0+}",parse:"NonNegativeInteger"},{trigger:"\\mathbb{N}",parse:"NonNegativeInteger"},{trigger:"\\N_0",parse:"NonNegativeInteger"},{trigger:"\\N_{0}",parse:"NonNegativeInteger"},{name:"CartesianProduct",trigger:["\\times"],kind:"infix",associativity:"right",precedence:390,parse:(e,t,i)=>{if(390{const r=e.matchExpression(t);return null===r?null:["Element",r,i]}},{name:"Element",trigger:["\\in"],kind:"infix",precedence:240},{name:"NotElement",trigger:["\\notin"],kind:"infix",precedence:240},{name:"NotSubset",trigger:["\\nsubset"],kind:"infix",associativity:"right",precedence:240},{name:"NotSuperset",trigger:["\\nsupset"],kind:"infix",associativity:"right",precedence:240},{name:"NotSubsetNotEqual",trigger:["\\nsubseteq"],kind:"infix",associativity:"right",precedence:240},{name:"NotSupersetNotEqual",trigger:["\\nsupseteq"],kind:"infix",associativity:"right",precedence:240},{name:"SquareSubset",trigger:["\\sqsubset"],kind:"infix",associativity:"right",precedence:265},{name:"SquareSubsetEqual",trigger:["\\sqsubseteq"],kind:"infix",associativity:"right",precedence:265},{name:"SquareSuperset",trigger:["\\sqsupset"],kind:"infix",associativity:"right",precedence:265},{name:"SquareSupersetEqual",trigger:["\\sqsupseteq"],kind:"infix",associativity:"right",precedence:265},{name:"Subset",trigger:["\\subset"],kind:"infix",associativity:"right",precedence:240},{trigger:["\\subsetneq"],kind:"infix",associativity:"right",precedence:240,parse:"Subset"},{trigger:["\\varsubsetneqq"],kind:"infix",associativity:"right",precedence:240,parse:"Subset"},{name:"SubsetEqual",trigger:["\\subseteq"],kind:"infix",precedence:240},{name:"Superset",trigger:["\\supset"],kind:"infix",associativity:"right",precedence:240},{trigger:["\\supsetneq"],kind:"infix",associativity:"right",precedence:240,parse:"Superset"},{trigger:["\\varsupsetneq"],kind:"infix",associativity:"right",precedence:240,parse:"Superset"},{name:"SupersetEqual",trigger:["\\supseteq"],kind:"infix",associativity:"right",precedence:240}];function Mg(e,t){if(null===t)return"";const i=Wf(t);return null===i?"":"Set"===i?0===Xf(t)?"\\emptyset":2===Xf(t)&&"Condition"===Wf(Yf(t,2))?Uf(["\\left\\lbrace",e.serialize(Yf(t,1)),"\\middle\\mid",e.serialize(Yf(t,2)),"\\right\\rbrace"]):Uf(["\\left\\lbrace",...ng(t).map((t=>e.serialize(t)+" ,")),"\\right\\rbrace"]):(e.numericSetStyle(t,e.level),"")}const Ng=[["Alpha","\\alpha",945],["Beta","\\beta",946],["Delta","\\delta",948],["Epsilon","\\epsilon",949],["EpsilonSymbol","\\varepsilon",1013],["Zeta","\\zeta",950],["Eta","\\eta",951],["Theta","\\theta",952],["ThetaSymbol","\\vartheta",977],["Iota","\\iota",953],["Kappa","\\kappa",954],["KappaSymbol","\\varkappa",1008],["Lambda","\\lambda",955],["Mu","\\mu",956],["Nu","\\nu",957],["Xi","\\xi",958],["Omicron","\\omicron",959],["PiSymbol","\\varpi",982],["Rho","\\rho",961],["RhoSymbol","\\varrho",1009],["Sigma","\\sigma",963],["FinalSigma","\\varsigma",962],["Tau","\\tau",964],["Phi","\\phi",981],["PhiLetter","\\varphi",966],["Upsilon","\\upsilon",965],["Chi","\\chi",967],["Psi","\\psi",968],["Omega","\\omega",969],["CapitalAlpha","\\Alpha",913],["CapitalBeta","\\Beta",914],["CapitalGamma","\\Gamma",915],["CapitalDelta","\\Delta",916],["CapitalEpsilon","\\Epsilon",917],["CapitalZeta","\\Zeta",918],["CapitalEta","\\Eta",919],["CapitalTheta","\\Theta",920],["CapitaIota","\\Iota",921],["CapitalKappa","\\Kappa",922],["CapitalLambda","\\Lambda",923],["CapitalMu","\\Mu",924],["CapitalNu","\\Nu",925],["CapitalXi","\\Xi",926],["CapitalOmicron","\\Omicron",927],["CapitalPi","\\Pi",928],["CapitalRho","\\Rho",929],["CapitalSigma","\\Sigma",931],["CapitalTau","\\Tau",932],["CapitalPhi","\\Phi",934],["CapitalUpsilon","\\Upsilon",933],["CapitalChi","\\Chi",935],["CapitalPsi","\\Psi",936],["CapitalOmega","\\Omega",937],["Digamma","\\digamma",989],["Alef","\\aleph",8501],["Bet","\\beth",8502],["Gimel","\\gimel",8503],["Dalet","\\daleth",8504],["TurnedCapitalF","\\Finv",8498],["TurnedCapitalG","\\Game",8513],["Weierstrass","\\wp",8472],["Eth","\\eth",240],["InvertedOhm","\\mho",8487],["BlackClubSuit","\\clubsuit",9827],["WhiteHeartSuit","\\heartsuit",9825],["BlackSpadeSuit","\\spadesuit",9824],["WhiteDiamondSuit","\\diamondsuit",9826],["Sharp","\\sharp",9839],["Flat","\\flat",9837],["Natural","\\natural",9838]],zg=[...Ng.map((([e,t,i])=>({name:e,trigger:[t],parse:e}))),...Ng.map((([e,t,i])=>({trigger:[String.fromCodePoint(i)],parse:e})))],Lg={"(":"(",")":")","[":"\\lbrack","]":"\\rbrack","{":"\\lbrace","}":"\\rbrace","<":"\\langle",">":"\\rangle","|":"\\vert","||":"\\Vert","\\lceil":"\\lceil","\\lfloor":"\\lfloor","\\rceil":"\\rceil","\\rfloor":"\\rfloor"};function Cg(e){return Array.isArray(e)?e.length:1}function Eg(e,t){var i,r,n,a,o,s,l,u,c;if(!function(e,t){var i,r;const n=null!==(r=null!==(i=e.name)&&void 0!==i?i:e.trigger)&&void 0!==r?r:e.openDelimiter;if(void 0!==e.serialize&&!e.name)return t({severity:"warning",message:["invalid-dictionary-entry",n,"Unexpected serialize property without a name property"]}),!1;if(zf(e)){if(e.trigger)return t({severity:"warning",message:["invalid-dictionary-entry",n,`Unexpected 'trigger' "${e.trigger}". 'matchfix' operators use a 'openDelimiter' and 'closeDelimiter' instead of a trigger. `]}),!1;if(!e.openDelimiter||!e.closeDelimiter)return t({severity:"warning",message:["invalid-dictionary-entry",n,"Expected `openDelimiter` and a `closeDelimiter` for matchfix operator"]}),!1;if(typeof e.openDelimiter!=typeof e.closeDelimiter)return t({severity:"warning",message:["invalid-dictionary-entry",n,"Expected `openDelimiter` and `closeDelimiter` to both be strings or array of LatexToken"]}),!1}if(Lf(e)||Ef(e)||Cf(e)){if(Array.isArray(e.trigger)&&("_"===e.trigger[0]||"^"===e.trigger[0])||"string"==typeof e.trigger&&(e.trigger.startsWith("^")||e.trigger.startsWith("_"))){if(void 0!==e.precedence||void 0!==e.associativity)return t({severity:"warning",message:["invalid-dictionary-entry",n,'Unexpected "precedence" or "associativity" for superscript/subscript operator']}),!1}else if(void 0===e.precedence)return t({severity:"warning",message:["invalid-dictionary-entry",n,`Expected a "precedence" for ${e.kind} operator`]}),!1}else if(void 0!==e.associativity)return t({severity:"warning",message:["invalid-dictionary-entry",n,'Unexpected "associativity" operator']}),!1;return Nf(e)||void 0===e.optionalLatexArg&&void 0===e.requiredLatexArg?zf(e)||e.trigger||e.name?void 0!==e.parse||void 0!==e.name||(t({severity:"warning",message:["invalid-dictionary-entry",n,"Expected a 'parse' or 'name'"]}),!1):(t({severity:"warning",message:["invalid-dictionary-entry",n,"Expected at least a 'trigger' or a 'name'"]}),!1):(t({severity:"warning",message:["invalid-dictionary-entry",n,'Unexpected "optionalLatexArg" or "requiredLatexArg" for non-symbol']}),!1)}(e,t))return[null,null];const h={name:e.name,kind:"kind"in e?e.kind:"symbol"};if("matchfix"===h.kind&&zf(e)){if(h.openDelimiter=e.openDelimiter,h.closeDelimiter=e.closeDelimiter,"function"==typeof e.serialize)h.serialize=e.serialize;else{const e="string"==typeof h.openDelimiter?Lg[h.openDelimiter]:Kf(h.openDelimiter),t="string"==typeof h.closeDelimiter?Lg[h.closeDelimiter]:Kf(h.closeDelimiter);h.serialize=(i,r)=>Uf([e,i.serialize(r),t])}if("function"==typeof e.parse)h.parse=e.parse;else{const t=null!==(i=e.parse)&&void 0!==i?i:e.name;h.parse=(e,i)=>[t,i]}return[null,h]}if("environment"===h.kind&&_f(e)){const t=e.trigger;return h.serialize=(e,i)=>`\\begin{${t}${e.serialize(Yf(i,1))}\\end{${t}`,h.parse=null!==(r=e.parse)&&void 0!==r?r:()=>null,[t,h]}const d="string"==typeof e.trigger?Vf(e.trigger,[]):e.trigger,p=d?Kf(d):"";if(e.trigger,"symbol"===h.kind&&Nf(e)&&(h.precedence=null!==(n=e.precedence)&&void 0!==n?n:1e4,h.optionalLatexArg=null!==(a=e.optionalLatexArg)&&void 0!==a?a:0,h.requiredLatexArg=null!==(o=e.requiredLatexArg)&&void 0!==o?o:0),"infix"!==h.kind&&"prefix"!==h.kind&&"postfix"!==h.kind||!(Lf(e)||Cf(e)||Ef(e))||(!d||"^"!==d[0]&&"_"!==d[0]?h.precedence=null!==(s=e.precedence)&&void 0!==s?s:1e4:h.precedence=720),"infix"===h.kind&&Lf(e))if(h.associativity=null!==(l=e.associativity)&&void 0!==l?l:"non","function"==typeof e.parse)h.parse=e.parse;else if(!d||"^"!==d[0]&&"_"!==d[0]){const t=null!==(u=e.parse)&&void 0!==u?u:e.name,i=h.precedence,r=h.associativity;h.parse=(e,n,a)=>{if(i{var n,a;return[t,null!==(n=Yf(r,1))&&void 0!==n?n:"Missing",null!==(a=Yf(r,2))&&void 0!==a?a:"Missing"]}}else if("function"==typeof e.parse)h.parse=e.parse;else if(void 0!==e.parse)h.parse=()=>e.parse;else if(void 0===e.parse&&void 0!==e.name)if("postfix"===h.kind)h.parse=(t,i)=>i?[e.name,i]:null;else if("prefix"===h.kind){const t=h.precedence,i=e.name;h.parse=(e,r)=>{if(t","T","r","u","e","<}>"],serialize:"\\mathrm{True}"},{name:"False",trigger:["\\mathrm","<{>","F","a","l","s","e","<}>"],serialize:"\\mathrm{False}"},{name:"Maybe",trigger:["\\mathrm","<{>","M","a","y","b","e","<}>"],serialize:"\\mathrm{Maybe}"}],relop:[{trigger:["!","<"],kind:"infix",associativity:"right",precedence:246,parse:"NotLess"},{name:"NotLess",trigger:["\\nless"],kind:"infix",associativity:"right",precedence:246},{trigger:["<"],kind:"infix",associativity:"right",precedence:245,parse:"Less"},{name:"Less",trigger:["\\lt"],kind:"infix",associativity:"right",precedence:245},{trigger:["<","="],kind:"infix",associativity:"right",precedence:241,parse:"LessEqual"},{name:"LessEqual",trigger:["\\le"],kind:"infix",associativity:"right",precedence:241},{trigger:["\\leq"],kind:"infix",associativity:"right",precedence:241,parse:"Equal"},{trigger:["\\leqslant"],kind:"infix",associativity:"right",precedence:265,parse:"LessEqual"},{name:"LessNotEqual",trigger:["\\lneqq"],kind:"infix",associativity:"right",precedence:260},{name:"NotLessNotEqual",trigger:["\\nleqq"],kind:"infix",associativity:"right",precedence:260},{name:"LessOverEqual",trigger:["\\leqq"],kind:"infix",associativity:"right",precedence:265},{name:"GreaterOverEqual",trigger:["\\geqq"],kind:"infix",associativity:"right",precedence:265,parse:"GreaterEqual"},{name:"Equal",trigger:["="],kind:"infix",associativity:"right",precedence:260},{trigger:["*","="],kind:"infix",associativity:"right",precedence:260,parse:"StarEqual"},{name:"StarEqual",trigger:["\\star","="],kind:"infix",associativity:"right",precedence:260},{name:"PlusEqual",trigger:["+","="],kind:"infix",associativity:"right",precedence:260},{name:"MinusEqual",trigger:["-","="],kind:"infix",associativity:"right",precedence:260},{name:"SlashEqual",trigger:["/","="],kind:"infix",associativity:"right",precedence:260},{name:"EqualEqual",trigger:["=","="],kind:"infix",associativity:"right",precedence:260},{name:"EqualEqualEqual",trigger:["=","=","="],kind:"infix",associativity:"right",precedence:265},{name:"TildeFullEqual",trigger:["\\cong"],kind:"infix",associativity:"right",precedence:260},{name:"NotTildeFullEqual",trigger:["\\ncong"],kind:"infix",associativity:"right",precedence:260},{trigger:[":","="],kind:"infix",associativity:"right",precedence:260,parse:"Assign"},{name:"Assign",trigger:["\\coloneq"],kind:"infix",associativity:"right",precedence:260},{name:"Approx",trigger:["\\approx"],kind:"infix",associativity:"right",precedence:247},{name:"NotApprox",trigger:["\\approx"],kind:"infix",associativity:"right",precedence:247},{name:"ApproxEqual",trigger:["\\approxeq"],kind:"infix",associativity:"right",precedence:260},{name:"NotApproxEqual",trigger:["!","\\approxeq"],kind:"infix",associativity:"right",precedence:250},{name:"NotEqual",trigger:["\\ne"],kind:"infix",associativity:"right",precedence:255},{name:"Unequal",trigger:["!","="],kind:"infix",associativity:"right",precedence:260},{name:"GreaterEqual",trigger:["\\ge"],kind:"infix",associativity:"right",precedence:242},{trigger:["\\geq"],kind:"infix",associativity:"right",precedence:242,parse:"GreaterEqual"},{trigger:[">","="],kind:"infix",associativity:"right",precedence:243,parse:"GreaterEqual"},{trigger:["\\geqslant"],kind:"infix",associativity:"right",precedence:265,parse:"GreaterEqual"},{name:"GreaterNotEqual",trigger:["\\gneqq"],kind:"infix",associativity:"right",precedence:260},{name:"NotGreaterNotEqual",trigger:["\\ngeqq"],kind:"infix",associativity:"right",precedence:260},{trigger:[">"],kind:"infix",associativity:"right",precedence:245,parse:"Greater"},{name:"Greater",trigger:["\\gt"],kind:"infix",associativity:"right",precedence:245},{name:"NotGreater",trigger:["\\ngtr"],kind:"infix",associativity:"right",precedence:244},{trigger:["!",">"],kind:"infix",associativity:"right",precedence:244,parse:"NotGreater"},{name:"RingEqual",trigger:["\\circeq"],kind:"infix",associativity:"right",precedence:260},{name:"TriangleEqual",trigger:["\\triangleq"],kind:"infix",associativity:"right",precedence:260},{name:"DotEqual",trigger:["\\doteq"],kind:"infix",associativity:"right",precedence:265},{name:"DotEqualDot",trigger:["\\doteqdot"],kind:"infix",associativity:"right",precedence:265},{name:"FallingDotEqual",trigger:["\\fallingdotseq"],kind:"infix",associativity:"right",precedence:265},{name:"RisingDotEqual",trigger:["\\fallingdotseq"],kind:"infix",associativity:"right",precedence:265},{name:"QuestionEqual",trigger:["\\questeq"],kind:"infix",associativity:"right",precedence:260},{name:"Equivalent",trigger:["\\equiv"],kind:"infix",associativity:"right",precedence:260},{trigger:["\\iff"],kind:"infix",parse:"Equivalent",associativity:"right",precedence:260},{name:"MuchLess",trigger:["\\ll"],kind:"infix",associativity:"right",precedence:260},{name:"MuchGreater",trigger:["\\gg"],kind:"infix",associativity:"right",precedence:260},{name:"Precedes",trigger:["\\prec"],kind:"infix",associativity:"right",precedence:260},{name:"Succeeds",trigger:["\\succ"],kind:"infix",associativity:"right",precedence:260},{name:"PrecedesEqual",trigger:["\\preccurlyeq"],kind:"infix",associativity:"right",precedence:260},{name:"SucceedsEqual",trigger:["\\curlyeqprec"],kind:"infix",associativity:"right",precedence:260},{name:"NotPrecedes",trigger:["\\nprec"],kind:"infix",associativity:"right",precedence:260},{name:"NotSucceeds",trigger:["\\nsucc"],kind:"infix",associativity:"right",precedence:260},{name:"Between",trigger:["\\between"],kind:"infix",associativity:"right",precedence:265}],other:xg,physics:[{name:"mu-0",trigger:"\\mu_0"}],sets:Sg,symbols:zg,trigonometry:kg},Tg={"(":["\\lparen","("],")":["\\rparen",")"],"[":["\\lbrack"],"]":["\\rbrack"],"<":["<","\\langle"],">":[">","\\rangle"],"{":["\\{","\\lbrace"],"}":["\\}","\\rbrace"],":":[":","\\colon"],"|":["|","\\|","\\lvert","\\rvert"],"||":["||","\\Vert","\\lVert","\\rVert"],"\\lfloor":["\\lfloor"],"\\rfloor":["\\rfloor"],"\\lceil":["\\lceil"],"\\rceil":["\\rceil"],"\\ulcorner":["\\ulcorner"],"\\urcorner":["\\urcorner"],"\\llcorner":["\\llcorner"],"\\lrcorner":["\\lrcorner"],"\\lgroup":["\\lgroup"],"\\rgroup":["\\rgroup"],"\\lmoustache":["\\lmoustache"],"\\rmoustache":["\\rmoustache"]},Bg={":":[":","\\colon"],"|":["|","\\|","\\mid","\\mvert"]},Ig={"\\left":"\\right","\\bigl":"\\bigr","\\Bigl":"\\Bigr","\\biggl":"\\biggr","\\Biggl":"\\Biggr","\\big":"\\big","\\Big":"\\Big","\\bigg":"\\bigg","\\Bigg":"\\Bigg"},qg=["\\middle","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],Dg={"(":")","[":"]","\\{":"\\}","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},Og={precision:6,positiveInfinity:"\\infty",negativeInfinity:"-\\infty",notANumber:"\\operatorname{NaN}",decimalMarker:".",groupSeparator:"\\,",exponentProduct:"\\cdot",beginExponentMarker:"10^{",endExponentMarker:"}",notation:"auto",truncationMarker:"\\ldots",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}",imaginaryNumber:"\\imaginaryI",avoidExponentsInRange:[-7,20]},Rg={applyInvisibleOperator:"auto",skipSpace:!0,parseArgumentsOfUnknownLatexCommands:!0,parseNumbers:!0,parseUnknownSymbol:e=>/^[fg]$/.test(e)?"function":/^[a-zA-Z]+$/.test(e)?"symbol":"unknown",preserveLatex:!0};class Fg{constructor(e,t,i,r,n){this.index=0,this._lastPeek="",this._peekCounter=0,this.options={...Og,...Rg,...t},this.engine=r,this._tokens=e,this.onError=n,this._dictionary=i}updateOptions(e){for(const[t,i]of Object.entries(e))this.options[t]=i}clone(e,t){return new Fg(this._tokens.slice(e,t),this.options,this._dictionary,this.engine,this.onError)}get atEnd(){return this.index>=this._tokens.length}get peek(){if(this._tokens[this.index]===this._lastPeek?this._peekCounter+=1:this._peekCounter=0,this._peekCounter>=1024)throw Error(`Infinite loop detected while parsing "${this.latex(0)}" at ${this._lastPeek} (index ${this.index})`);return this._lastPeek=this._tokens[this.index],this._tokens[this.index]}atTerminator(e){const t=this.index;return!!this.atEnd||!!e&&(!(!e.condition||!e.condition(this))||!!(e.tokens&&e.tokens.length>0&&this.matchAll(e.tokens))&&(this.index=t,!0))}latex(e,t){return Kf(this._tokens.slice(e,t))}latexAhead(e){return Kf(this._tokens.slice(this.index,this.index+e))}latexBefore(){return this.latex(0,this.index)}latexAfter(){return this.latex(this.index)}lookAhead(){let e=Math.min(this._dictionary.lookahead,this._tokens.length-this.index);const t=[];for(;e>0;)t[e]=this.latexAhead(e--);return t}peekDefinitions(e){let t;t="operator"===e?this.lookAhead().map(((e,t)=>{var i,r,n,a,o;return null!==(a=null!==(r=null===(i=this._dictionary.infix[t])||void 0===i?void 0:i.get(e))&&void 0!==r?r:null===(n=this._dictionary.postfix[t])||void 0===n?void 0:n.get(e))&&void 0!==a?a:null===(o=this._dictionary.prefix[t])||void 0===o?void 0:o.get(e)})):this.lookAhead().map(((t,i)=>{var r;return null===(r=this._dictionary[e][i])||void 0===r?void 0:r.get(t)}));const i=[];for(let r=t.length;r>0;r--)if(void 0!==t[r])for(const e of t[r])i.push([e,r]);return 0===i.length?null:i}next(){return this._tokens[this.index++]}skipSpace(){if(!this.atEnd&&"<{>"===this.peek&&"<}>"===this._tokens[this.index+1])return this.index+=2,this.skipSpace(),!0;let e=!1;if(!this.options.skipSpace)return!1;for(;this.match("");)e=!0;return e&&this.skipSpace(),e}matchChar(){var e;const t=this.index;let i=0;for(;this.match("^");)i+=1;if(i>=2){let e="",t=0;for(;t!=i;){const i=this.matchAny(["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]);if(!i)break;e+=i,t+=1}if(e.length===i)return String.fromCodePoint(Number.parseInt(e,16))}else{if(this.match("\\char")){let t=Math.floor(null!==(e=this.matchLatexNumber())&&void 0!==e?e:NaN);return(!Number.isFinite(t)||t<0||t>1114111)&&(t=10067),String.fromCodePoint(t)}if(this.match("\\unicode"))if("<{>"===this.peek){const e=this.matchLatexNumber();if(this.match("<}>")&&null!==e&&e>=0&&e<=1114111)return String.fromCodePoint(e)}else{const e=this.matchLatexNumber();if(null!==e&&e>=0&&e<=1114111)return String.fromCodePoint(e)}}return this.index=t,this.next()}matchColor(e=!1){let t="";for(;!this.atEnd&&"}"!==this.peek;)t+=this.next();return t}matchLatexDimension(){return null}match(e){return this._tokens[this.index]===e&&(this.index++,!0)}matchAll(e){"string"==typeof e&&(e=[e]);let t=!0,i=0;do{t=this._tokens[this.index+i]===e[i++]}while(t&&i")){this.skipSpace();const e=this.matchSignedInteger();if(this.skipSpace(),this.match("<}>")&&e)return"e"+e}}return this.index=e,""}matchNumber(){var e,t;if(!this.options.parseNumbers)return"";const i=this.index;this.skipSpace(),this.match("+");let r=!1;if(this.match(this.options.decimalMarker)){const e=this.index;if(!this.matchAny(["0","1","2","3","4","5","6","7","8","9"]))return this.index=i,"";this.index=e,r=!0}let n=this.matchDecimalDigits();return n?(!r&&this.match(null!==(e=this.options.decimalMarker)&&void 0!==e?e:"")&&(n+="."+(null!==(t=this.matchDecimalDigits())&&void 0!==t?t:"0")),(r?"0.":"")+n+this.matchExponent()):(this.index=i,"")}matchLatexNumber(e=!0){var t,i;let r=!1,n=this.peek;for(;""===n||"+"===n||"-"===n;)"-"===n&&(r=!r),this.next(),n=this.peek;let a=10,o=["0","1","2","3","4","5","6","7","8","9"];if(this.match("'"))a=8,o=["0","1","2","3","4","5","6","7"],e=!0;else if(this.match('"')||this.match("x"))a=16,o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"],e=!0;else if(this.match("`"))return n=this.next(),n?n.startsWith("\\")&&2===n.length?(r?-1:1)*(null!==(t=n.codePointAt(1))&&void 0!==t?t:0):(r?-1:1)*(null!==(i=n.codePointAt(0))&&void 0!==i?i:0):null;let s="";for(;o.includes(this.peek);)s+=this.next();if(!e&&this.match("."))for(s+=".";o.includes(this.peek);)s+=this.next();const l=e?Number.parseInt(s,a):Number.parseFloat(s);return Number.isNaN(l)?null:r?-l:l}matchPrefixOperator(e){e||(e={minPrec:0}),e.minPrec||(e={...e,minPrec:0});const t=this.peekDefinitions("prefix");if(null===t)return null;const i=this.index;for(const[r,n]of t){this.index=i+n;const t=r.parse(this,e);if(t)return t}return this.index=i,null}matchInfixOperator(e,t){t||(t={minPrec:0}),t.minPrec||(t={...t,minPrec:0});const i=this.peekDefinitions("infix");if(null===i)return null;const r=this.index;for(const[n,a]of i)if(n.precedence>=t.minPrec){this.index=r+a;const i=n.parse(this,t,e);if(i)return i}return this.index=r,null}matchArguments(e){if(!e)return null;const t=this.index,i=this.matchEnclosure();if("enclosure"===e&&"Delimiter"===Wf(i))return ng(i);if("group"===e){const e=this.matchExpression({tokens:["<}>"]});return null===e?[]:[e]}if("implicit"===e){if("Delimiter"===Wf(i))return ng(i);if(null!==i)return[i];const e=this.matchPrimary();return null!==e?[e]:null}return this.index=t,null}matchOpenDelimiter(e,t){var i;const r=this.index,n=Ig[this.peek];n&&this.next();const a=null!==(i=Tg[e])&&void 0!==i?i:[e],o=n?[n]:[];return a.includes("||")&&this.matchAll(["|","|"])?(o.push("|"),o.push("|"),o):a.includes(this.peek)?(Dg[e]===t?o.push(Dg[this.peek]):o.push(t),this.next(),o):(this.index=r,null)}matchMiddleDelimiter(e){var t;const i=null!==(t=Bg[e])&&void 0!==t?t:[e];if(qg.includes(this.peek)){const e=this.index;return this.next(),i.includes(this.peek)?(this.next(),!0):(this.index=e,!1)}return!!i.include(this.peek)&&(this.next(),!0)}matchEnclosure(){const e=this._dictionary.matchfix;if(0===e.length)return null;const t=this.index;for(const i of e){if(this.index=t,Array.isArray(i.openDelimiter)){if(!this.matchAll(i.openDelimiter))continue;const e=this.matchExpression({tokens:i.closeDelimiter,minPrec:0});if(this.skipSpace(),!this.matchAll(i.closeDelimiter))continue;if("function"==typeof i.parse){const t=i.parse(this,null!==e&&void 0!==e?e:"Nothing");if(null===t)continue;return t}return[i.name,null!==e&&void 0!==e?e:"Nothing"]}const e=this.matchOpenDelimiter(i.openDelimiter,i.closeDelimiter);if(null===e)continue;const r=this.matchExpression({minPrec:0,tokens:e});if(r&&this.matchAll(e)){if("function"==typeof i.parse){const e=i.parse(this,null!==r&&void 0!==r?r:"Nothing");if(null===e)continue;return e}return[i.name,r]}}return this.index=t,null}matchSymbol(){var e,t;const i=this.index,r=this.peekDefinitions("symbol");if(r)for(const[o,s]of r){let e=null;if(this.index=i+s,"function"!=typeof o.parse){if(0===o.optionalLatexArg&&0===o.requiredLatexArg)return o.name;{const e=[];let t=o.optionalLatexArg;for(;0!==t;){const i=this.matchOptionalLatexArgument();if(null===i)break;e.push(i),t-=1}t=o.requiredLatexArg;const i=[];for(;0!==t;){const e=this.matchRequiredLatexArgument();if(null===e)break;i.push(e),t-=1}return i.length===o.requiredLatexArg?[o.name,...i,...e]:o.name}}if(e=o.parse(this),e)return e}this.index=i;let n="";(this.matchAll(["\\operatorname","<{>"])||this.matchAll(["\\mathit","<{>"])||this.matchAll(["\\mathrm","<{>"]))&&(n=this.matchString({tokens:["<}>"]}),n&&this.match("<}>")||(this.index=i)),n||(n=this.next());const a=null===(t=(e=this.options).parseUnknownSymbol)||void 0===t?void 0:t.call(e,n,this);if("symbol"===a)return n;if("function"===a){const e=this.matchEnclosure();return null===e?n:"Delimiter"!==Wf(e)?null:[n,...ng(e)]}return this.index=i,this.matchUnknownLatexCommand()}matchOptionalLatexArgument(){const e=this.index;if(this.skipSpace(),this.match("[")){const e=this.matchExpression();if(this.skipSpace(),this.match("]"))return e}return this.index=e,null}matchRequiredLatexArgument(){const e=this.index;if(this.skipSpace(),this.match("<{>")){const t=this.matchExpression({tokens:["<}>"]});return this.skipSpace(),this.match("<}>")?t:(this.index=e,null)}return/^[0-9]$/.test(this.peek)?parseInt(this.next()):/^[^\\#]$/.test(this.peek)?this.next():this.matchSymbol()||(this.index=e,null)}matchSupsub(e){var t,i,r;if(null===e)return null;const n=this.index;this.skipSpace();const a=[],o=[];for(;"_"===this.peek||"^"===this.peek;){if(this.match("_")){let e=this.matchRequiredLatexArgument();!e&&this.match("<{>")&&(e=this.matchString({tokens:["<}>"]}),e&&this.match("<}>")),o.push(null!==e&&void 0!==e?e:"Missing")}else this.match("^")&&a.push(null!==(t=this.matchRequiredLatexArgument())&&void 0!==t?t:"Missing");this.skipSpace()}if(0===a.length&&0===o.length)return this.index=n,e;let s=e;if(o.length>0){const e=null===(i=this._dictionary.infix[1])||void 0===i?void 0:i.get("_");if(e){const t=["Subscript",s,1===o.length?o[0]:["Sequence",...o]];for(const i of e)if(s="function"==typeof i.parse?i.parse(this,{minPrec:0},t):t,s)break}}if(a.length>0){const e=null===(r=this._dictionary.infix[1])||void 0===r?void 0:r.get("^");if(e){const t=["Superscript",s,1===a.length?a[0]:["Sequence",...a]];for(const i of e)if(s="function"==typeof i.parse?i.parse(this,{minPrec:0},t):t,s)break}}return null===s&&(this.index=n),s}matchPostfix(e){if(null===e)return null;const t=this.peekDefinitions("postfix");if(null===t)return null;const i=this.index;for(const[r,n]of t){this.index=i+n;const t=r.parse(this,e);if(null!==t)return t}return this.index=i,null}matchString(e){e.minPrec||(e={...e,minPrec:0});let t="",i=this.atEnd;for(;!i;){const r=this.peek;""===r?t+=" ":"\\"===r[0]?(this.onError([{severity:"warning",message:"unexpected-command"}]),t+=this.next()):/^<(\$|\$\$)>$/.test(r)?i=!0:t+=this.next(),i=i||this.atTerminator(e)}return t}matchEnvironmentName(e,t){if(!this.match(e))return!1;const i=this.index;if(this.match("<{>")){const e=this.matchString({tokens:["<}>"]});if(this.match("<}>")&&e===t)return!0}return this.index=i,!1}matchTabular(e){const t=["List"],i={minPrec:0,tokens:["\\end","<{>",...e.split(""),"<}>"]};let r=["List"],n=null;for(;!this.atTerminator(i);)this.skipSpace(),this.match("&")?(r.push(null!==n&&void 0!==n?n:"Nothing"),n=null):this.match("\\\\")||this.match("\\cr")?(this.skipSpace(),this.matchOptionalLatexArgument(),null!==n&&r.push(n),t.push(r),r=["List"],n=null):n=this.matchExpression({...i,condition:e=>{const t=e.peek;return"&"===t||"\\\\"===t||"\\cr"===t}});return null!==n&&r.push(n),r.length>1&&t.push(r),t}matchEnvironment(){if(!this.match("\\begin"))return null;const e=this.index;if(this.match("<{>")){const t=this.matchString({tokens:["<}>"]});if(this.match("<}>")){const i=this._dictionary.environment.get(t),r=i?i.parse(this,[],[]):this.matchTabular(t);if(this.skipSpace(),this.matchAll(["\\end","<{>",...t.split(""),"<}>"]),null!==r)return this.decorate(r,e)}}return this.index=e,null}applyInvisibleOperator(e,t){if(null===t||this.atTerminator(e))return null;if(null===this.options.applyInvisibleOperator)return null;const i=this.index,r=this.matchExpression({...e,minPrec:390});if(null===r)return this.index=i,null;if("function"==typeof this.options.applyInvisibleOperator)return this.options.applyInvisibleOperator(this,t,r);const n=this.engine.box(r),a=Jf(t);if(a&&this.engine&&this.engine.getFunctionDefinition(a)){let e=[];return e="Delimiter"===n.head?"Sequence"===n.op1.head?[...n.op1.ops]:[n.op1]:[n],[a,...e.map((e=>e.json))]}const o=this.engine.box(t);if(o.isLiteral&&o.isInteger&&n.isLiteral){const[e,i]=n.rationalValue;if(null!==e&&null!==i)return["Add",t,r]}return(o.isMissing||"Nothing"===o.symbol||o.isNumber)&&(n.isMissing||"Nothing"===n.symbol||n.isNumber)?og("Multiply",t,r):(this.index=i,null)}matchUnknownLatexCommand(){const e=this.peek;if(!e||"\\"!==e[0])return null;this.next();const t=[];if("\\operatorname"===e){if(this.match("<{>")){for(;!this.atEnd&&"<}>"!==this.peek;)t.push(this.next());this.match("<}>")}else t.push(this.next());return 0===t.length?["Error","Missing",{str:"syntax-error"},["LatexForm",{str:e}]]:["Error","Missing",{str:"unknown-command"},["LatexForm",{str:`${e}{${Kf(t)}}`}]]}for(;this.match("[");){t.push("[");let e=0;for(;!this.atEnd&&0===e&&"]"!==this.peek;)"["===this.peek&&(e+=1),"]"===this.peek&&(e-=1),t.push(this.next());this.match("]")&&t.push("]")}for(;this.match("<{>");){t.push("<{>");let e=0;for(;!this.atEnd&&0===e&&"<}>"!==this.peek;)"<{>"===this.peek&&(e+=1),"<}>"===this.peek&&(e-=1),t.push(this.next());this.match("<}>")&&t.push("<}>")}return["Error","Missing",{str:"unknown-command"},["LatexForm",{str:`${e}${Kf(t)}`}]]}matchPrimary(){let e=null;const t=this.index;if(this.match("<{>")?(e=this.matchExpression({tokens:["<}>"]}),this.match("<}>")):this.match("<}>"),null===e){const t=this.matchNumber();t&&(e={num:t})}if(null===e&&(e=this.matchEnclosure()),null===e&&(e=this.matchEnvironment()),null===e&&(e=this.matchSymbol()),null!==e){e=this.decorate(e,t);let i=null,r=this.index;do{if(i=this.matchPostfix(e),e=null!==i&&void 0!==i?i:e,this.index===r&&null!==i)break;r=this.index}while(null!==i)}return null!==e&&(e=this.matchSupsub(e)),this.decorate(e,t)}matchExpression(e){const t=this.index;e||(e={minPrec:0}),void 0===e.minPrec&&(e.minPrec=0),this.skipSpace();let i=this.matchPrefixOperator({...e,minPrec:0});if(null===i&&(i=this.matchPrimary()),i){let t=!1;for(;!this.atTerminator(e)&&!t;){this.skipSpace();let r=this.matchInfixOperator(i,e);null===r&&null===this.peekDefinitions("operator")&&(r=this.applyInvisibleOperator(e,i)),null!==r?i=r:t=!0}}return this.decorate(i,t)}decorate(e,t){if(null===e)return null;if(!this.options.preserveLatex)return e;const i=this.latex(t,this.index);return Array.isArray(e)?e={latex:i,fn:e}:"number"==typeof e?e={latex:i,num:Number(e).toString()}:"string"==typeof e?e={latex:i,sym:e}:"object"==typeof e&&null!==e&&(e.latex=i),e}}function Pg(e,t){const i=e.length,r=e;e=e.slice(0,-1);for(let a=0;a1&&(i+n.repeat(o+1)).startsWith(e))return"0"===n?i.replace(/(\d{3})/g,"$1"+t.groupSeparator):i.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n+t.endRepeatingDigits}}const n=i>t.precision-1;return e=r,n&&(e=e.substring(0,t.precision-1)),t.groupSeparator&&(e=e.replace(/(\d{3})/g,"$1"+t.groupSeparator)).endsWith(t.groupSeparator)&&(e=e.slice(0,-t.groupSeparator.length)),n?e+t.truncationMarker:e}function Vg(e,t){var i;return e?t.beginExponentMarker?t.beginExponentMarker+e+(null!==(i=t.endExponentMarker)&&void 0!==i?i:""):"10^{"+e+"}":""}class Ug{constructor(e,t,i){this.level=-1,this.options=e,e.invisibleMultiply&&(/#1/.test(e.invisibleMultiply)&&/#2/.test(e.invisibleMultiply)||i([{severity:"warning",message:["expected-argument","invisibleMultiply"]}])),this.onError=i,this.dictionary=t}updateOptions(e){for(const t of Object.keys(this.options))t in e&&(this.options[t]=e[t])}wrap(e,t){if(null===e)return"";if(void 0===t)return"("+this.serialize(e)+")";if("number"==typeof e||Hf(e)||"string"==typeof e||Gf(e))return this.serialize(e);const i=Wf(e);if("string"==typeof i&&"Delimiter"!==i){const r=this.dictionary.name.get(i);if(r&&("symbol"===r.kind||"prefix"===r.kind||"infix"===r.kind||"postfix"===r.kind)&&r.precedence0&&"\\"===r[0]){let e=r;for(const t of n)e+="{"+this.serialize(t)+"}";return e}return"string"==typeof r?`${Gg(r,"upright.")}(${n.map((e=>this.serialize(e))).join(", ")})`:`\\operatorname{Apply}(${this.serialize(r)}, ${this.serialize(["List",...n])})`}if(t.requiredLatexArg>0){let e="",i="",r=0;for(;rthis.serialize(e)))):t.serialize+this.serialize(["Delimiter",...n])}serializeDictionary(e){return`\\left[\\begin{array}{lll}${Object.keys(e).map((t=>`\\textbf{${t}} & \\rightarrow & ${this.serialize(e[t])}`)).join("\\\\")}\\end{array}\\right]`}serialize(e){if(null==e)return"";this.level+=1;try{const t=(()=>{const t=function(e,t){var i,r,n;if(null===e)return"";let a;if("number"==typeof e)a=e;else{if("object"!=typeof e||!("num"in e))return"";a=e.num}if(a===1/0||"Infinity"===a||"+Infinity"===a)return t.positiveInfinity;if(a===-1/0||"-Infinity"===a)return t.negativeInfinity;if("NaN"===a||"number"==typeof a&&Number.isNaN(a))return t.notANumber;if("number"==typeof a)return"engineering"===t.notation?function(e,t){if(0===e)return"0";const i=Math.abs(e);let r=Math.round(Math.log10(i));r-=r%3,i>Math.pow(10,t.avoidExponentsInRange[0])&&i=0){const e=a.match(/(\d*)\.(\d*)([e|E]([-+]?[0-9]*))?/);if(!e)return"";const i=e[1],n=e[2];if(s=null!==(r=e[4])&&void 0!==r?r:"","0"===i){let e=0;for(;"0"===n[e]&&e=t.precision)i="0",o="";else{i=a[e];const r=Pg(a.substring(e+1),t);r&&(i+=t.decimalMarker+r)}"0"!==i&&(!(a.length-1>t.precision)||t.endRepeatingDigits&&i.endsWith(t.endRepeatingDigits)||!t.truncationMarker||i.endsWith(t.truncationMarker)||(i+=t.truncationMarker),e>4&&(i+=t.exponentProduct+Vg(""+(1-e),t))),a=i}else{a=i.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);const e=Pg(n,t);e&&(a+=t.decimalMarker+e)}}else if(a.length>t.precision){const e=a.length;if(e>t.avoidExponentsInRange[1]){let i=a[0];const r=Pg(a.substring(1),t);r&&(i+=t.decimalMarker+r,t.truncationMarker&&!i.endsWith(t.truncationMarker)&&t.endRepeatingDigits&&!i.endsWith(t.endRepeatingDigits)&&(i+=t.truncationMarker)),"1"!==i?i+=t.exponentProduct:i="",a=i+Vg(""+(e-1),t)}}else{const e=a.match(/([0-9]*)\.?([0-9]*)([e|E]([-+]?[0-9]+))?/);e&&(a=e[1],e[2]&&(a+=t.decimalMarker+e[2]),s=null!==(n=e[4])&&void 0!==n?n:""),a=a.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator)}const l=Vg(s,t);return"1"===a&&l?o+l:(l&&(a=a+t.exponentProduct+l),o+a)}(e,this.options);if(t)return t;const i=Qf(e);if(null!==i)return`\\text{${i}}`;const r=Jf(e);if(null!==r){const t=this.dictionary.name.get(r);if("symbol"===(null===t||void 0===t?void 0:t.kind))return this.serializeSymbol(e,t)}const n=tg(e);if(null!==n)return this.serializeDictionary(n);const a=Zf(e);if(a){if("\\"===a[0]){const t=ng(e);return 0===t.length?a:a+"{"+t.map((e=>this.serialize(e))).filter((e=>!!e)).join("}{")+"}"}const t=this.dictionary.name.get(a);if(t)return"function"==typeof t.serialize?t.serialize(this,e):"infix"===t.kind||"postfix"===t.kind||"prefix"===t.kind?function(e,t,i){let r="";const n=Xf(t),a=Zf(t);if("postfix"===i.kind)return 1!==n&&e.onError([{severity:"warning",message:["postfix-operator-requires-one-operand",e.serializeSymbol(a)]}]),Kg(i.serialize,[e.wrap(Yf(t,1),i.precedence)]);if("prefix"===i.kind)return 1!==n&&e.onError([{severity:"warning",message:["prefix-operator-requires-one-operand",e.serializeSymbol(a)]}]),Kg(i.serialize,[e.wrap(Yf(t,1),i.precedence+1)]);if("infix"===i.kind){r=e.wrap(Yf(t,1),i.precedence);for(let a=2;a0){const i=e.substring(0,t),r=e.substring(t+1);return r?r.startsWith('"')&&r.endsWith('"')?`${jg(i)}_\\mathrm{${jg(r.substring(1,-1))}}`:`${jg(i)}_{${jg(r)}}`:Gg(i)+"\\_"}const i=e.match(/([^0-9]+?)([0-9]+)$/);return i?0===i[1].length?e:`${jg(i[1])}_{${i[2]}}`:Hg.includes(e)?"\\"+e:e=e.replace(/[{}\[\]\\:\-\$%]/g,(e=>{var t;return null!==(t={"{":"\\lbrace ","}":"\\rbrace ","[":"\\lbrack ","]":"\\rbrack ",":":"\\colon ","\\":"\\backslash ","-":'\\unicode{"2013}'}[e])&&void 0!==t?t:"\\"+e}))}const Qg={invisibleMultiply:"",invisiblePlus:"",multiply:"\\times",missingSymbol:"\\placeholder{}",applyFunctionStyle:function(e,t){return"paren"},groupStyle:function(e,t){return"paren"},rootStyle:lg,fractionStyle:ug,logicStyle:function(e,t){return"boolean"},powerStyle:function(e,t){return"solidus"},numericSetStyle:function(e,t){return"compact"}};class Wg{constructor(e){var t,i;this.onError=null!==(t=e.onError)&&void 0!==t?t:e=>{if("undefined"!=typeof window)for(const t of e);},this.computeEngine=e.computeEngine;const r={...e};delete r.dictionary,delete r.onError,this.options={...Og,...Qg,...Rg,...r},this.dictionary=function(e,t){var i,r;const n={lookahead:1,name:new Map,symbol:[],infix:[],prefix:[],postfix:[],environment:new Map,matchfix:[]};for(const a of e){const[e,o]=Eg(a,t);if(null!==o)if(void 0!==o.name&&(n.name.has(o.name)&&t({severity:"warning",message:["invalid-dictionary-entry",o.name,"Duplicate definition"]}),n.name.set(o.name,o)),"matchfix"===o.kind)n.matchfix.push(o);else if("environment"===o.kind){const e=Kf(null!==(i=a.trigger)&&void 0!==i?i:"");n.environment.has(e)&&t({severity:"warning",message:["invalid-dictionary-entry",e,"Duplicate environment definition"]}),n.environment.set(e,o)}else if(e){const t=Kf(null!==(r=a.trigger)&&void 0!==r?r:""),i=Cg(e);if(n.lookahead=Math.max(n.lookahead,i),"symbol"===o.kind){void 0===n.symbol[i]&&(n.symbol[i]=new Map);const e=n.symbol[i];e.has(t)?e.get(t).push(o):e.set(t,[o])}else if("prefix"===o.kind){void 0===n.prefix[i]&&(n.prefix[i]=new Map);const e=n.prefix[i];e.has(t)?e.get(t).push(o):e.set(t,[o])}else if("infix"===o.kind){void 0===n.infix[i]&&(n.infix[i]=new Map);const e=n.infix[i];e.has(t)?e.get(t).push(o):e.set(t,[o])}else if("postfix"===o.kind){void 0===n.postfix[i]&&(n.postfix[i]=new Map);const e=n.postfix[i];e.has(t)?e.get(t).push(o):e.set(t,[o])}}}return n}(null!==(i=e.dictionary)&&void 0!==i?i:Wg.getDictionary(),(e=>this.onError([e])))}updateOptions(e){for(const t of Object.keys(this.options))t in e&&(this.options[t]=e[t]);this.serializer.updateOptions(e)}static getDictionary(e="all"){if("all"===e){let e=[];for(const t of Object.keys(_g))_g[t]&&(e=[...e,..._g[t]]);return e}return _g[e]?[..._g[e]]:[]}parse(e){const t=new Fg(Vf(e,[]),this.options,this.dictionary,this.computeEngine,this.onError);let i=t.matchExpression();if(!t.atEnd){const e=[];for(;!t.atEnd;)e.push(t.next());i=["Error",null!==i&&void 0!==i?i:"Nothing",{str:"syntax-error"},["LatexForm",{str:Kf(e)}]]}return i||(i="Nothing"),this.options.preserveLatex&&(Array.isArray(i)?i={latex:e,fn:i}:"number"==typeof i?i={latex:e,num:Number(i).toString()}:"string"==typeof i?i={latex:e,sym:i}:"object"==typeof i&&null!==i&&(i.latex=e)),null!==i&&void 0!==i?i:"Nothing"}serialize(e){return this.serializer.serialize(e)}get serializer(){return this._serializer||(this._serializer=new Ug(this.options,this.dictionary,this.onError)),this._serializer}}const Zg=Math.log10(Math.pow(2,53)),Yg=new Set([2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999,5003,5009,5011,5021,5023,5039,5051,5059,5077,5081,5087,5099,5101,5107,5113,5119,5147,5153,5167,5171,5179,5189,5197,5209,5227,5231,5233,5237,5261,5273,5279,5281,5297,5303,5309,5323,5333,5347,5351,5381,5387,5393,5399,5407,5413,5417,5419,5431,5437,5441,5443,5449,5471,5477,5479,5483,5501,5503,5507,5519,5521,5527,5531,5557,5563,5569,5573,5581,5591,5623,5639,5641,5647,5651,5653,5657,5659,5669,5683,5689,5693,5701,5711,5717,5737,5741,5743,5749,5779,5783,5791,5801,5807,5813,5821,5827,5839,5843,5849,5851,5857,5861,5867,5869,5879,5881,5897,5903,5923,5927,5939,5953,5981,5987,6007,6011,6029,6037,6043,6047,6053,6067,6073,6079,6089,6091,6101,6113,6121,6131,6133,6143,6151,6163,6173,6197,6199,6203,6211,6217,6221,6229,6247,6257,6263,6269,6271,6277,6287,6299,6301,6311,6317,6323,6329,6337,6343,6353,6359,6361,6367,6373,6379,6389,6397,6421,6427,6449,6451,6469,6473,6481,6491,6521,6529,6547,6551,6553,6563,6569,6571,6577,6581,6599,6607,6619,6637,6653,6659,6661,6673,6679,6689,6691,6701,6703,6709,6719,6733,6737,6761,6763,6779,6781,6791,6793,6803,6823,6827,6829,6833,6841,6857,6863,6869,6871,6883,6899,6907,6911,6917,6947,6949,6959,6961,6967,6971,6977,6983,6991,6997,7001,7013,7019,7027,7039,7043,7057,7069,7079,7103,7109,7121,7127,7129,7151,7159,7177,7187,7193,7207,7211,7213,7219,7229,7237,7243,7247,7253,7283,7297,7307,7309,7321,7331,7333,7349,7351,7369,7393,7411,7417,7433,7451,7457,7459,7477,7481,7487,7489,7499,7507,7517,7523,7529,7537,7541,7547,7549,7559,7561,7573,7577,7583,7589,7591,7603,7607,7621,7639,7643,7649,7669,7673,7681,7687,7691,7699,7703,7717,7723,7727,7741,7753,7757,7759,7789,7793,7817,7823,7829,7841,7853,7867,7873,7877,7879,7883,7901,7907,7919]);function Xg(e,t){const i=function(e){if(e<=3)return{[e]:1};const t={};let i=!1;for(;!i;){if(e%2==0){t[2]?t[2]+=1:t[2]=1,e/=2;continue}if(e%3==0){t[3]?t[3]+=1:t[3]=1,e/=3;continue}if(1===e)return t;const r=Math.sqrt(e);i=!0;for(let n=6;n<=r+6;n+=6){if(e%(n-1)==0){t[n-1]?t[n-1]+=1:t[n-1]=1,e/=n-1,i=!1;break}if(e%(n+1)==0){t[n+1]?t[n+1]+=1:t[n+1]=1,e/=n+1,i=!1;break}}}return t[e]=1,t}(e);let r=1,n=1;for(const a of Object.keys(i)){const e=parseFloat(a);r*=Math.pow(e,Math.floor(i[a]/t)),n*=Math.pow(e,i[a]%t)}return[r,n]}function Jg(e,t){if(0===e)return t;if(0===t)return e;if(e===t)return e;if(!Number.isInteger(e)||!Number.isInteger(t))return NaN;for(;0!==t;)[e,t]=[t,e%t];return e<0?-e:e}function $g([e,t]){if(1===e||1===t)return[e,t];t<0&&([e,t]=[-e,-t]);const i=Jg(e,t);return i<=1?[e,t]:[e/i,t/i]}const ev=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],tv=[.999999999999997,57.15623566586292,-59.59796035547549,14.13609797474174,-.4919138160976202,3399464998481188e-20,4652362892704857e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.0002174396181152126,-.0001643181065367639,8441822398385274e-20,-261908384015814e-19,3689918265953162e-21];function iv(e){if(e<0)return NaN;let t=tv[0];for(let r=14;r>0;--r)t+=tv[r]/(e+r);const i=e+4.7421875+.5;return.9189385332046727+(e+.5)*Math.log(i)-i+Math.log(t)-Math.log(e)}function rv(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*rv(1-e));if(e>100)return Math.exp(iv(e));e-=1;let t=ev[0];for(let r=1;r<9;r++)t+=ev[r]/(e+r);const i=e+7+.5;return 2.5066282746310002*Math.pow(i,e+.5)*Math.exp(-i)*t}function nv(e,t=10){let i=0;for(let r=0;r=t)return[i,e.substring(r)];i=i*t+n}}return[i,""]}class av{constructor(e,t){this.engine=e,(null===t||void 0===t?void 0:t.latex)&&(this._latex=t.latex),(null===t||void 0===t?void 0:t.wikidata)&&(this._wikidata=t.wikidata)}toJSON(){return JSON.stringify(this.json)}toString(){return this.latex}valueOf(){var e,t,i;const[r,n]=this.rationalValue;return null!==r&&null!==n?[r,n]:null!==(i=null!==(t=null!==(e=this.asFloat)&&void 0!==e?e:this.string)&&void 0!==t?t:this.symbol)&&void 0!==i?i:this.toString()}is(e){return null!=e&&this.isSame(this.engine.box(e))}has(e){return!1}get description(){return[]}get url(){return""}_purge(){}get isPure(){return!1}get isLiteral(){return!1}get latex(){var e;return null!==(e=this._latex)&&void 0!==e?e:this.engine.serialize(this)}set latex(e){this._latex=e}get wikidata(){var e;return null!==(e=this._wikidata)&&void 0!==e?e:""}set wikidata(e){this._wikidata=e}get complexity(){return 1}get ops(){return null}get nops(){return 0}get op1(){return this.engine.symbol("Missing")}get op2(){return this.engine.symbol("Missing")}get op3(){return this.engine.symbol("Missing")}get symbolDefinition(){}get functionDefinition(){}_repairDefinition(){}get keys(){return null}get keysCount(){return 0}getKey(e){}hasKey(e){return!1}get machineValue(){var e,t;return null!==(t=null===(e=this.numericValue)||void 0===e?void 0:e.machineValue)&&void 0!==t?t:null}get rationalValue(){var e,t;return null!==(t=null===(e=this.numericValue)||void 0===e?void 0:e.rationalValue)&&void 0!==t?t:[null,null]}get decimalValue(){var e,t;return null!==(t=null===(e=this.numericValue)||void 0===e?void 0:e.decimalValue)&&void 0!==t?t:null}get complexValue(){var e,t;return null!==(t=null===(e=this.numericValue)||void 0===e?void 0:e.complexValue)&&void 0!==t?t:null}get asFloat(){var e,t;return null!==(t=null===(e=this.numericValue)||void 0===e?void 0:e.asFloat)&&void 0!==t?t:null}get asSmallInteger(){var e,t;return null!==(t=null===(e=this.numericValue)||void 0===e?void 0:e.asSmallInteger)&&void 0!==t?t:null}get asRational(){var e,t;return null!==(t=null===(e=this.numericValue)||void 0===e?void 0:e.asRational)&&void 0!==t?t:[null,null]}get sgn(){var e,t;return null!==(t=null===(e=this.numericValue)||void 0===e?void 0:e.sgn)&&void 0!==t?t:null}get symbol(){return null}get isMissing(){return!1}get value(){return this}set value(e){throw Error(`Can't change the value of \\(${this.latex}\\)`)}get numericValue(){}isSubdomainOf(e){}get domain(){return this.engine.domain("Nothing")}set domain(e){throw Error(`Can't change the domain of \\(${this.latex}\\)`)}get valueDomain(){return this.domain}get string(){return null}isLess(e){}isLessEqual(e){}isGreater(e){}isGreaterEqual(e){}get isZero(){}get isNotZero(){}get isPositive(){}get isNonNegative(){}get isNegative(){}get isNonPositive(){}get isInfinity(){}get isNaN(){}get isFinite(){}get isNumber(){}get isInteger(){}get isRational(){}get isAlgebraic(){return!1}get isReal(){}get isExtendedReal(){}get isComplex(){}get isImaginary(){}get isExtendedComplex(){}get isOne(){}get isNegativeOne(){}get isEven(){}get isOdd(){}get isPrime(){}get isComposite(){}get canonical(){return this}apply(e,t){return this}evaluate(e){return this.simplify(e)}simplify(e){return this}N(e){return this}replace(e){return null}subs(e){return this}solve(e){return null}}function ov(e,t){if(!t.isInteger()||t.isNegative())return e.DECIMAL_NAN;if(t.lessThan(10))return e.decimal([1,1,2,6,24,120,720,5040,40320,362880,3628800][t.toNumber()]);if(t.gt(Number.MAX_SAFE_INTEGER)){let i=e.DECIMAL_ONE,r=e.DECIMAL_TWO;for(;r.lessThan(t);)i=i.mul(r),r=r.add(1);return i}if(t.modulo(2).eq(1))return t.times(ov(e,t.minus(1)));let i=t.toNumber(),r=t,n=t;for(;i>2;)i-=2,r=r.add(i),n=n.mul(r);return n}function sv(e,t){if(t.isNegative())return e.DECIMAL_NAN;const i=e.cache("gamma-p-ln",(()=>["0.99999999999999709182","57.156235665862923517","-59.597960355475491248","14.136097974741747174","-0.49191381609762019978","0.33994649984811888699e-4","0.46523628927048575665e-4","-0.98374475304879564677e-4","0.15808870322491248884e-3","-0.21026444172410488319e-3","0.2174396181152126432e-3","-0.16431810653676389022e-3","0.84418223983852743293e-4","-0.2619083840158140867e-4","0.36899182659531622704e-5"].map((t=>e.decimal(t)))));let r=i[0];for(let o=i.length-1;o>0;--o)r=r.add(i[o].div(t.add(o)));const n=e.cache("gamma-g-ln",(()=>e.decimal(607).div(128))),a=t.add(n).add(e.DECIMAL_HALF);return e.DECIMAL_NEGATIVE_ONE.acos().mul(e.DECIMAL_TWO).log().mul(e.DECIMAL_HALF).add(a.log().mul(t.add(e.DECIMAL_HALF)).minus(a).add(r.log()).minus(t.log()))}function lv(e,t){if(t.lessThan(e.DECIMAL_HALF)){const i=e.DECIMAL_NEGATIVE_ONE.acos();return i.div(i.mul(t).sin().mul(lv(e,e.DECIMAL_ONE.sub(t))))}if(t.greaterThan(100))return sv(e,t).exp();t=t.sub(1);const i=e.cache("lanczos-7-c",(()=>["0.99999999999980993227684700473478","676.520368121885098567009190444019","-1259.13921672240287047156078755283","771.3234287776530788486528258894","-176.61502916214059906584551354","12.507343278686904814458936853","-0.13857109526572011689554707","9.984369578019570859563e-6","1.50563273514931155834e-7"].map(e.decimal)));let r=i[0];for(let a=1;a<9;a++)r=r.add(i[a].div(t.add(a)));const n=t.add(7).add(e.DECIMAL_HALF);return e.DECIMAL_NEGATIVE_ONE.acos().times(e.DECIMAL_TWO).sqrt().mul(r.mul(n.neg().exp()).mul(n.pow(t.add(e.DECIMAL_HALF))))}function uv(e){return e.e<308&&e.e>-306}function cv(e,t){var i;const r=[];for(const n of e)n.ops&&n.head===t?r.push(...null!==(i=cv(n.ops,t))&&void 0!==i?i:n.ops):r.push(n);return r.length===e.length?null:r}function hv(e){if("Power"===e.head&&e.op2.isLiteral){const t=e.op2.asSmallInteger;return null!==t&&t>0?t:1}if("Multiply"===e.head){let t=1;for(const i of e.ops){const e=hv(i);e>1&&(t+=e)}return t}return 1}function dv(e){if("Power"===e.head&&e.op2.isLiteral){const t=e.op2.asSmallInteger;return null!==t&&t>0?t:1}if("Multiply"===e.head){let t=1;for(const i of e.ops)t=Math.max(t,hv(i));return t}return 1}function pv(e){return e.symbol?e.symbol:e.ops?e.ops.map((e=>pv(e))).filter((e=>e.length>0)).join('"'):""}function mv(e){return"string"==typeof e&&e.startsWith("$")&&e.endsWith("$")}function fv(e){return"string"==typeof e&&e.startsWith("$")&&e.endsWith("$")?e.slice(1,-1):null}function gv(e){var t;if("ImaginaryUnit"===e.symbol)return 1;const i=e.complexValue;if(i&&0===i.re)return i.im;if("Negate"===e.head)return-gv(e.op1);let r=0;if("Multiply"===e.head&&2===e.nops){let i;"ImaginaryUnit"===e.op1.symbol?i=e.op2:"ImaginaryUnit"===e.op2.symbol&&(i=e.op1),i&&i.isLiteral&&(r=null!==(t=i.asFloat)&&void 0!==t?t:0)}return r}function vv(e){var t;if(e.symbol)return(null===(t=e.symbolDefinition)||void 0===t?void 0:t.constant)?[]:[e.symbol];if(!e.ops&&!e.keys)return[];const i=[];if(e.ops)for(const r of e.ops)i.push(...vv(r));if(e.keys)for(const r of e.keys)i.push(...vv(e.getKey(r)));return i}function yv(e){return"decimal"===e.numericMode||"auto"===e.numericMode&&e.precision>Math.floor(Zg)}function bv(e){return"auto"===e.numericMode||"complex"===e.numericMode}function wv(e){let t=0;for(let i=0;it.symbol?1:-1:t.isLiteral&&t.isNumber?1:-1;if(e.ops){if(t.ops){const o=null!==(r=null===(i=e.functionDefinition)||void 0===i?void 0:i.complexity)&&void 0!==r?r:1e5,s=null!==(a=null===(n=t.functionDefinition)||void 0===n?void 0:n.complexity)&&void 0!==a?a:1e5;return o===s?"string"==typeof e.head&&"string"==typeof t.head?e.head===t.head?Av(e)-Av(t):e.headt.string?1:0:t.keys?-1:1;if(e.keys&&t.keys){if(e.keysCount!==t.keysCount)return t.keysCount-e.keysCount;let i=0,r=0;for(const e of t.keys)i+=t.getKey(e).complexity;for(const t of e.keys)r+=e.getKey(t).complexity;return r-i}return e.complexity-t.complexity}function Av(e){return null!==e.keys?1+e.keysCount:e.ops?("string"==typeof e.head?1:Av(e.head))+[...e.ops].reduce(((e,t)=>e+Av(t)),0):1}function kv(e){var t;const i=e.engine;let r=1,n=1;if("Multiply"===e.head){const t=[];for(const i of e.ops)if(i.isLiteral){const[e,a]=i.asRational;null!==e&&null!==a?(r*=e,n*=a):t.push(i)}else t.push(i);return[r,n]=$g([r,n]),r===n?[[1,1],e]:0===t.length?[[r,n],i.ONE]:1===t.length?[[r,n],t[0]]:[[r,n],i.mul(t)]}if("Divide"===e.head){let[[t,r],n]=kv(e.op1);const[[a,o],s]=kv(e.op2),[l,u]=$g([t*o,a*r]);return n.isOne&&s.isOne?[[l,u],i.ONE]:s.isOne?[[l,u],n]:[[l,u],i.fn("Divide",[n,s]).canonical]}if("Power"===e.head){if(!e.op2.isLiteral)return[[1,1],e];let[[t,r],n]=kv(e.op1);if(1===t&&1===r)return[[1,1],e];const a=e.op2,o=a.asSmallInteger;if(null!==o){if(-1===o)return[[r,t],i.inverse(n)];if(Math.log10(Math.abs(t))*Math.abs(o)<15&&Math.log10(Math.abs(r))*Math.abs(o)<15)return o>0?[[Math.pow(t,o),Math.pow(r,o)],i.power(n,a)]:[[Math.pow(r,-o),Math.pow(t,-o)],i.power(n,a)]}const[s,l]=a.rationalValue;if(null!==s&&null!==l&&t>0&&1===Math.abs(s)){const[o,u]=Xg(t,l),[c,h]=Xg(r,l);return 1===o&&1===c?[[1,1],e]:[1===s?[o,c]:[c,o],i.power(i.mul([i.number([u,h]),n]),a)]}return[[1,1],e]}if("Negate"===e.head){const[t,i]=kv(e.op1);return[[-t[0],t[1]],i]}if(e.isLiteral){if(e.decimalValue){if(e.decimalValue.isInteger()&&uv(e.decimalValue))return[[e.decimalValue.toNumber(),1],i.ONE];if(null===(t=e.decimalValue)||void 0===t?void 0:t.isNegative())return[[-1,1],i.number(e.decimalValue.neg())]}if(null!==e.machineValue){if(Number.isInteger(e.machineValue))return[[e.machineValue,1],i.ONE];if(e.machineValue<0)return[[-1,1],i.number(-e.machineValue)]}const[r,n]=e.rationalValue;if(null!==r&&null!==n)return[[r,n],i.ONE];if(null!==e.complexValue){const t=e.complexValue;if(t.re<0)return[[-1,1],i.number(i.complex(-t.re,-t.im))]}}return[[1,1],e]}function Sv(e){var t;if("Negate"===e.head)return[-1,e.op1];const i=e.engine;if(null!==e.machineValue&&e.machineValue<0)return[-1,i.number(-e.machineValue)];if(null===(t=e.decimalValue)||void 0===t?void 0:t.isNegative())return[-1,i.number(e.decimalValue.neg())];if(null!==e.complexValue){const t=e.complexValue;if(t.re<0)return[-1,i.number(i.complex(-t.re,-t.im))]}const[r,n]=e.rationalValue;return null!==r&&null!==n&&r<0?[-1,i.number([-r,n])]:[1,e]}class Mv{constructor(e,t){if(this._terms=[],this._literal=[1,1],this._hasInfinity=!1,this._hasZero=!1,this.engine=e,t)for(const i of t)this.addTerm(i)}get isEmpty(){return!1===this._hasInfinity&&!1===this._hasZero&&this._literal[0]===this._literal[1]&&0===this._terms.length}addTerm(e){if("Nothing"===e.symbol)return;if(e.isLiteral){if(e.isOne)return;if(e.isZero)return void(this._hasZero=!0);if(e.isNegativeOne)return void(this._literal[0]*=-1);if(e.isInfinity)return this._hasInfinity=!0,void(e.isNegative&&(this._literal[0]*=-1))}let[t,i]=kv(e);if(this._literal=[this._literal[0]*t[0],this._literal[1]*t[1]],i.isLiteral&&i.isOne)return;let r=[1,1];if("Power"===i.head&&i.op2.isLiteral){const[e,t]=i.op2.asRational;null!==e&&null!==t&&(r=[e,t],i=i.op1)}let n=!1;if(1===r[1]||i.isNonNegative)for(const a of this._terms)if(a.term.isSame(i)){const[e,t]=a.exponent,[i,o]=r;a.exponent=[e*o+t*i,t*o],n=!0;break}n||this._terms.push({exponent:r,term:i})}groupedByDegrees(e){const t=this.engine,i=[],r=[];this._hasInfinity&&r.push(t.POSITIVE_INFINITY),this._literal=$g(this._literal),1===this._literal[0]&&1===this._literal[1]||((null===e||void 0===e?void 0:e.splitRational)?(1!==this._literal[0]&&r.push(t.number(this._literal[0]).canonical),1!==this._literal[1]&&i.push({exponent:[-1,1],terms:[t.number(this._literal[1]).canonical]})):r.push(t.number(this._literal).canonical)),r.length>0&&i.push({exponent:[1,1],terms:r});for(const n of this._terms){if(0===n.exponent[0])continue;let e=!1;for(const t of i)if(n.exponent[0]===t.exponent[0]&&n.exponent[1]===t.exponent[1]){t.terms.push(n.term),e=!0;break}e||i.push({exponent:$g(n.exponent),terms:[n.term]})}return i}terms(){return Lv(this.engine,this.groupedByDegrees())}asNumeratorDenominator(){var e,t;const i=this.groupedByDegrees(),r=[],n=[];for(const c of i)c.exponent[0]>=0?r.push(c):n.push({exponent:[-c.exponent[0],c.exponent[1]],terms:c.terms});const a=this.engine;let o=Lv(a,r);o=null!==(e=cv(o,"Multiply"))&&void 0!==e?e:o;let s=a.ONE;1===o.length?s=o[0]:o.length>0&&(s=a._fn("Multiply",o));let l=Lv(a,n);l=null!==(t=cv(l,"Multiply"))&&void 0!==t?t:l;let u=a.ONE;return 1===l.length?u=l[0]:l.length>0&&(u=a._fn("Multiply",l)),[s,u]}asExpression(){var e;const t=this.engine;if(this._hasInfinity){if(this._hasZero)return t.NAN;if(0===this._terms.length)return this._literal[0]>0?t.POSITIVE_INFINITY:t.NEGATIVE_INFINITY}if(this._hasZero)return t.ZERO;if(0===this._terms.length)return t.number(this._literal).canonical;let i=Lv(t,this.groupedByDegrees({splitRational:!1}));return this._hasInfinity&&i.push(t.POSITIVE_INFINITY),i=null!==(e=cv(i,"Multiply"))&&void 0!==e?e:i,0===i.length?t.ONE:1===i.length?i[0]:this.engine._fn("Multiply",i)}asRationalExpression(){const[e,t]=this.asNumeratorDenominator();return t.isOne?e:t.isNegativeOne?this.engine.negate(e):this.engine._fn("Divide",[e,t])}}function Nv(e){const[t,i]=e;return t===i?0:t>0&&Number.isInteger(t/i)?1:t>0?2:Number.isInteger(t/i)?3:4}function zv(e,t){const i=Nv(e.exponent),r=Nv(t.exponent);return i!==r?i-r:e.exponent[0]/e.exponent[1]-t.exponent[0]/t.exponent[1]}function Lv(e,t){var i;const r=(t=t.sort(zv)).map((t=>{var i;const r=null!==(i=cv(t.terms,"Multiply"))&&void 0!==i?i:t.terms,n=r.length<=1?r[0]:e._fn("Multiply",r.sort(xv));return t.exponent[0]===t.exponent[1]?n:e.power(n,t.exponent)}));return null!==(i=cv(r,"Multiply"))&&void 0!==i?i:r}function Cv(e,t,i,r){var n,a,o,s,l,u,c;const h=e.jsonSerializationOptions.exclude;if(("Rational"===t||"Divide"===t)&&(null===(n=i[0])||void 0===n?void 0:n.isLiteral)&&(null===(a=i[1])||void 0===a?void 0:a.isLiteral)&&1===(null===(o=i[0])||void 0===o?void 0:o.asSmallInteger)&&2===(null===(s=i[1])||void 0===s?void 0:s.asSmallInteger)&&!h.includes("Half"))return Ev(e,"Half",{...r,wikidata:"Q39373172"});if("Negate"===t&&i[0].isLiteral){if(null!==i[0].machineValue)return _v(e,-i[0].machineValue);if(null!==i[0].decimalValue)return _v(e,i[0].decimalValue.neg());if(null!==i[0].complexValue)return _v(e,i[0].complexValue.neg());const[t,r]=i[0].rationalValue;if(null!==t&&null!==r)return _v(e,[-t,r])}if("Rational"===t&&h.includes(t)&&i.length>1)return Cv(e,"Divide",i,r);if("Complex"===t&&h.includes(t))return Cv(e,"Add",[i[0],e._fn("Multiply",[i[1],e.symbol("ImaginaryUnit")])],r);if("Sqrt"===t&&h.includes(t))return Cv(e,"Power",[i[0],h.includes("Half")?e.number([1,2]):e.HALF],r);if("Root"===t&&h.includes(t)&&i[1].isLiteral){const t=i[1].asSmallInteger;if(2===t)return Cv(e,"Sqrt",[i[0]]);if(null!==t)return t<0?Cv(e,"Divide",[e.ONE,e._fn("Power",[i[0],e.number([1,-t])])],r):Cv(e,"Power",[i[0],e.number([1,-t])],r)}if("Square"===t&&h.includes(t))return Cv(e,"Power",[i[0],e.TWO],r);if("Exp"===t&&h.includes(t))return Cv(e,"Power",[e.symbol("ExponentialE"),i[0]],r);if("Subtract"===t&&h.includes(t))return Cv(e,"Add",[i[0],e._fn("Negate",[i[1]])],r);if("Add"===t&&2===i.length&&!h.includes("Subtract")){if(i[1].isLiteral){const t=i[1].asSmallInteger;if(null!==t&&t<0)return Cv(e,"Subtract",[i[0],e.number(-t)],r)}if("Negate"===i[1].head)return Cv(e,"Subtract",[i[0],i[1].op1],r)}if("Tuple"===t){if(1===i.length&&!h.includes("Single"))return Cv(e,"Single",i,r);if(2===i.length&&!h.includes("Pair"))return Cv(e,"Pair",i,r);if(3===i.length&&!h.includes("Triple"))return Cv(e,"Triple",i,r)}const d=["string"==typeof t?t:t.json,...i.map((e=>e.json))],p={...null!==r&&void 0!==r?r:{}};return e.jsonSerializationOptions.metadata.includes("latex")?p.latex=null!==(l=p.latex)&&void 0!==l?l:e.serialize({fn:d}):p.latex="",e.jsonSerializationOptions.metadata.includes("wikidata")?(null===r||void 0===r?void 0:r.wikidata)||"string"!=typeof t||(p.wikidata=null!==(c=null===(u=e.getFunctionDefinition(t,i))||void 0===u?void 0:u.wikidata)&&void 0!==c?c:""):p.wikidata="",p.latex||p.wikidata||!e.jsonSerializationOptions.shorthands.includes("function")?p.latex&&p.wikidata?{fn:d,latex:p.latex,wikidata:p.wikidata}:p.latex?{fn:d,latex:p.latex}:p.wikidata?{fn:d,wikidata:p.wikidata}:{fn:d}:d}function Ev(e,t,i){var r,n,a;return"Half"===t&&e.jsonSerializationOptions.exclude.includes("Half")?_v(e,[1,2],i):(i={...i},e.jsonSerializationOptions.metadata.includes("latex")?(i.latex=null!==(r=i.latex)&&void 0!==r?r:e.serialize({sym:t}),i.latex===t&&(i.latex=""),i.latex=i.latex):i.latex="",e.jsonSerializationOptions.metadata.includes("wikidata")?i.wikidata||(i.wikidata=null!==(a=null===(n=e.getSymbolDefinition(t))||void 0===n?void 0:n.wikidata)&&void 0!==a?a:""):i.wikidata="",i.latex||i.wikidata||!e.jsonSerializationOptions.shorthands.includes("symbol")?i.latex&&i.wikidata?{sym:t,latex:i.latex,wikidata:i.wikidata}:i.latex?{sym:t,latex:i.latex}:i.wikidata?{sym:t,wikidata:i.wikidata}:{sym:t}:t)}function _v(e,t,i){var r,n,a;i={...i},e.jsonSerializationOptions.metadata.includes("latex")||(i.latex="");const o=!i.latex&&!e.jsonSerializationOptions.metadata.includes("latex")&&e.jsonSerializationOptions.shorthands.includes("number");let s="";if(t instanceof qf){if(t.isNaN()?s="NaN":t.isFinite()||(s=t.isPositive()?"+Infinity":"-Infinity"),!s){if(o&&uv(t)&&t.precision()<15)return t.toNumber();s=t.isInteger()&&t.e0&&(s="+Infinity"),!Number.isFinite(t)&&t<0&&(s="-Infinity"),!s){if(o)return t;s=Tv(e,t.toString())}return e.jsonSerializationOptions.metadata.includes("latex")&&(i.latex=null!==(a=i.latex)&&void 0!==a?a:e.serialize({num:s})),i.latex?{num:s,latex:i.latex}:{num:s}}function Tv(e,t){var i;if(!e.jsonSerializationOptions.repeatingDecimal)return t;let[r,n,a,o]=null!==(i=t.match(/^(.*)\.([0-9]+)([e|E][-+]?[0-9]+)?$/))&&void 0!==i?i:[];if(!a)return t;const s=a[a.length-1];a=a.slice(0,-1);let l="";for(let u=0;u1&&(l+i.repeat(r+1)).startsWith(a))return"0"===i?"0"===s?n+"."+l+(null!==o&&void 0!==o?o:""):t:n+"."+l+"("+i+")"+(null!==o&&void 0!==o?o:"")}}return t}class Bv extends av{constructor(e,t,i){super(e,i),this._value=new Map,this._isCanonical=!1;for(const r of Object.keys(t))this._value.set(r,e.box(t[r]));e._register(this)}_purge(){for(const[e,t]of this._value)t._purge()}get hash(){let e=wv("Dictionary");for(const[t,i]of this._value)e^=wv(t)^i.hash;return e}get complexity(){return 97}get head(){return"Dictionary"}get isPure(){return!1}getKey(e){return this._value.get(e)}hasKey(e){return this._value.has(e)}get keys(){return this._value.keys()}get keysCount(){return this._value.size}has(e){for(const[t,i]of this._value)if(i.has(e))return!0;return!1}get domain(){const e=["Dictionary"];for(const[t,i]of this._value)e.push(["Tuple",t,i.domain]);return this.engine.domain(e)}get json(){if(this.engine.jsonSerializationOptions.shorthands.includes("dictionary")){const e={};for(const t of this._value.keys())e[t]=this._value.get(t).json;return{dict:e}}const e=[];for(const t of this._value.keys())e.push(this.engine._fn("KeyValuePair",[this.engine.string(t),this._value.get(t)]));return Cv(this.engine,"Dictionary",e,{latex:this._latex})}isSame(e){if(this===e)return!0;if(!(e instanceof Bv))return!1;if(this._value.size!==e._value.size)return!1;for(const[t,i]of this._value){const r=e.getKey(t);if(!r||!i.isSame(r))return!1}return!0}match(e,t){if(!(e instanceof Bv))return null;if(this._value.size!==e._value.size)return null;let i={};for(const[r,n]of this._value){const t=e.getKey(r);if(!t)return null;const a=n.match(t);if(null===a)return null;i={...i,...a}}return i}isEqual(e){if(this===e)return!0;if(!(e instanceof Bv))return!1;if(!e.keys||this._value.size!==e._value.size)return!1;for(const[t,i]of this._value){const r=e.getKey(t);if(!r||!i.isEqual(r))return!1}return!0}apply(e,t){const i={};for(const r of this.keys)i[r]=this.engine.box(e(this.getKey(r)));return t?this.engine.fn(t,[{dict:i}]):new Bv(this.engine,i)}evaluate(e){return this.apply((t=>{var i;return null!==(i=t.evaluate(e))&&void 0!==i?i:t}))}get isCanonical(){return this._isCanonical}set isCanonical(e){this._isCanonical=e}get canonical(){if(this.isCanonical)return this;const e=this.apply((e=>e.canonical));return e.isCanonical=!0,e}simplify(e){var t;return null===(t=null===e||void 0===e?void 0:e.recursive)||void 0===t||t?this.apply((t=>{var i;return null!==(i=t.simplify(e))&&void 0!==i?i:t})):this}N(e){return this.apply((t=>t.N(e)))}replace(e,t){let i=0;const r={};for(const n of this.keys){const a=this.getKey(n),o=a.replace(e,t);null!==o&&(i+=1),r[n]=null!==o&&void 0!==o?o:a}return 0===i?null:new Bv(this.engine,r)}subs(e){const t={};for(const i of this.keys)t[i]=this.getKey(i).subs(e);return new Bv(this.engine,t)}}function Iv(e,t){var i;const r=new Set;for(const[n,a,o]of t){let t=e.pattern(n);const s={};for(const i of vv(t))s[i]=e.symbol("_"+i);let l;t=t.subs(s);const u=fv(null===o||void 0===o?void 0:o.condition);if(u){const t=e.parse(u).subs(s);l=e=>{var i;return"True"===(null===(i=t.subs(e).value)||void 0===i?void 0:i.symbol)}}else l=null===o||void 0===o?void 0:o.condition;const c=mv(a)?e.parse(a):e.box(a);c&&r.add([t,c.subs(s),null!==(i=null===o||void 0===o?void 0:o.priority)&&void 0!==i?i:0,l])}return r}function qv([e,t,i,r],n,a){const o=e.match(n,a);return null===o?null:"function"!=typeof r||r(o)?t.subs(o):null}function Dv(e,t,i){var r,n;const a=null!==(r=null===i||void 0===i?void 0:i.iterationLimit)&&void 0!==r?r:1;let o=0;const s=null!==(n=null===i||void 0===i?void 0:i.once)&&void 0!==n&&n;let l=!1,u=!1;try{for(;!l&&oe.isPure))),this._isPure=t,t}get isLiteral(){return!1}get ops(){return this._ops}get nops(){return this._ops.length}get op1(){var e;return null!==(e=this._ops[0])&&void 0!==e?e:this.engine.symbol("Missing")}get op2(){var e;return null!==(e=this._ops[1])&&void 0!==e?e:this.engine.symbol("Missing")}get op3(){var e;return null!==(e=this._ops[2])&&void 0!==e?e:this.engine.symbol("Missing")}get functionDefinition(){return this._def}_repairDefinition(){if("string"==typeof this._head){if("_"===this._head[0])return;this._def=this.engine.getFunctionDefinition(this._head,this._ops),this._def&&(this._head=this._def.name)}}get domain(){var e;if(null===(e=this._def)||void 0===e?void 0:e.domain)return"function"==typeof this._def.domain?this.engine.domain(this._def.domain(this.engine,this._ops)):this.engine.domain(this._def.domain);const t=[this.head];for(const i of this._ops)t.push(i.domain);return t.push(this.engine.domain("Anything")),this.engine.domain(t)}get valueDomain(){var e;return null!==(e=this.domain.codomain)&&void 0!==e?e:this.engine.domain("Nothing")}isLess(e){if(e.isZero){const e=this.sgn;if(null===e)return!1;if(void 0!==e)return e<0}}isLessEqual(e){if(e.isZero){const e=this.sgn;if(null===e)return!1;if(void 0!==e)return e<=0}}isGreater(e){if(e.isZero){const e=this.sgn;if(null===e)return!1;if(void 0!==e)return e>0}}isGreaterEqual(e){if(e.isZero){const e=this.sgn;if(null===e)return!1;if(void 0!==e)return e>=0}}get isZero(){const e=this.sgn;return null!==e&&("number"==typeof e?0===e:void 0)}get isNotZero(){const e=this.sgn;return null!==e&&("number"==typeof e?0!==e:void 0)}get isOne(){}get isNegativeOne(){}get isPositive(){const e=this.sgn;return null!==e&&("number"==typeof e?0!==e:void 0)}get isNonPositive(){const e=this.sgn;return null!==e&&("number"==typeof e?e<=0:void 0)}get isNegative(){const e=this.sgn;return null!==e&&("number"==typeof e?e<0:void 0)}get isNonNegative(){const e=this.sgn;return null!==e&&("number"==typeof e?e>=0:void 0)}get isNumber(){return this.valueDomain.isSubdomainOf("Number")}get isInteger(){return this.valueDomain.isSubdomainOf("Integer")}get isRational(){return this.valueDomain.isSubdomainOf("RationalNumber")}get isAlgebraic(){return this.valueDomain.isSubdomainOf("AlgebraicNumber")}get isReal(){return this.valueDomain.isSubdomainOf("RealNumber")}get isExtendedReal(){return this.valueDomain.isSubdomainOf("ExtendedRealNumber")}get isComplex(){return this.valueDomain.isSubdomainOf("ComplexNumber")}get isImaginary(){return this.valueDomain.isSubdomainOf("ImaginaryNumber")}get json(){return this._isCanonical?function(e,t,i,r){var n,a;const o=e.jsonSerializationOptions.exclude;if("Add"===t&&2===i.length&&!o.includes("Subtract")){const t=i[0].asSmallInteger;if(null!==t&&t<0)return Cv(e,"Subtract",[i[1],e.number(-t)],r);if("Negate"===i[0].head)return Cv(e,"Subtract",[i[1],i[0].op1],r)}if("Divide"===t&&e.jsonSerializationOptions.exclude.includes("Divide"))return Cv(e,"Multiply",[i[0],e._fn("Power",[i[1],e.NEGATIVE_ONE])],r);if("Multiply"===t&&!e.jsonSerializationOptions.exclude.includes("Divide")){const t=new Mv(e,i).asRationalExpression();if("Divide"===t.head)return Cv(e,t.head,t.ops,r)}if("Power"===t){if(!o.includes("Exp")&&"ExponentialE"===(null===(n=i[0])||void 0===n?void 0:n.symbol))return Cv(e,"Exp",[i[1]],r);if(null===(a=i[1])||void 0===a?void 0:a.isLiteral){const t=i[1].asSmallInteger;if(!o.includes("Square")&&2===t)return Cv(e,"Square",[i[0]],r);if(!e.jsonSerializationOptions.exclude.includes("Divide")){if(-1===t)return Cv(e,"Divide",[e.ONE,i[0]],r);if(null!==t&&t<0)return Cv(e,"Divide",[e.ONE,e.power(i[0],-t)],r)}const[n,a]=i[1].rationalValue;if(1===n){if(!o.includes("Sqrt")&&2===a)return Cv(e,"Sqrt",[i[0]],r);if(!o.includes("Root"))return Cv(e,"Root",[i[0],e.number(a)],r)}if(-1===n){if(!o.includes("Sqrt")&&2===a)return Cv(e,"Divide",[e.ONE,e._fn("Sqrt",[i[0]])],r);if(!o.includes("Root"))return Cv(e,"Divide",[e.ONE,e._fn("Root",[i[0],e.number(a)])],r)}}}return Cv(e,t,i,r)}(this.engine,this._head,this._ops,{latex:this._latex,wikidata:this._wikidata}):Cv(this.engine,this._head,this._ops,{latex:this._latex,wikidata:this._wikidata})}has(e){if("string"==typeof this._head)if("string"==typeof e){if(this._head===e)return!0}else if(e.includes(this._head))return!0;for(const t of this._ops)if(t.has(e))return!0;return!1}isSame(e){if(this===e)return!0;if(!(e instanceof Fv))return!1;if(this.nops!==e.nops)return!1;if("string"==typeof this.head){if(this.head!==e.head)return!1}else{if("string"==typeof e.head)return!1;if(!e.head||!this.head.isSame(e.head))return!1}const t=this._ops,i=e._ops;for(let r=0;r0?-1:1}if("Multiply"===l){const e=this._ops.reduce(((e,t)=>{var i;return e*(null!==(i=t.sgn)&&void 0!==i?i:NaN)}),1);return isNaN(e)?null:e>0?1:e<0?-1:0}if("Add"===l){let e=0,t=0,i=0;const r=this._ops.length;for(const n of this._ops){const r=n.sgn;if(null==r)break;0===r&&(i+=1),r>0&&(e+=1),r<0&&(t+=1)}return i===r?0:e===r?1:t===r?-1:null}if("Divide"===l){const e=null===(t=this._ops[0])||void 0===t?void 0:t.sgn,r=null===(i=this._ops[1])||void 0===i?void 0:i.sgn;return null===e||null===r||void 0===e||void 0===r?null:0===e?0:e>0&&r>0||e<0&&r<0?1:-1}return"Square"===l?(null===(r=this._ops[0])||void 0===r?void 0:r.isImaginary)?-1:(null===(n=this._ops[0])||void 0===n?void 0:n.isZero)?0:1:"Abs"===l?(null===(a=this._ops[0])||void 0===a?void 0:a.isZero)?0:1:"Sqrt"===l?(null===(o=this._ops[0])||void 0===o?void 0:o.isZero)?0:(null===(s=this._ops[0])||void 0===s?void 0:s.isImaginary)?null:1:null}*map(e){let t=0;for(;te.canonical)),(null===(n=this._def)||void 0===n?void 0:n.associative)&&(s=null!==(a=cv(s,this._def.name))&&void 0!==a?a:s),null===(o=this._def)||void 0===o?void 0:o.canonical)return this._def.canonical(this.engine,s);if(!this._def)return this.engine._fn(this._head,s);if(1===s.length&&s[0].head===this._head)if(this._def.idempotent)s=s[0].ops;else if(this._def.involution)return s[0].op1;return s.length>1&&!0===this._def.commutative&&(s=s.sort(xv)),this.engine._fn(this._head,s)}apply(e,t){const i=null!==t&&void 0!==t?t:this.head;let r=!1;const n=[];for(const a of this._ops){const t=e(a);a!==t&&(r=!0),n.push(this.engine.box(t))}return r||this.head!==i?this.engine.fn(i,n):this}simplify(e){var t,i,r,n;if(!this.isCanonical)return this.canonical.simplify(e);const a=this._def;let o,s=this._ops;if(a?(a.associative&&(s=null!==(t=cv(s,a.name))&&void 0!==t?t:s),s=Vv(s,a.hold,(t=>t.simplify(e))),a.associative&&(s=null!==(i=cv(s,a.name))&&void 0!==i?i:s)):s=Vv(this._ops,"none",(t=>t.simplify(e))),"string"!=typeof this._head)return Pv(this._head,s).simplify(e);a&&(a.simplify?o=a.simplify(this.engine,s):a.inert&&(o=null!==(r=s[0])&&void 0!==r?r:this.engine.symbol("Missing"))),o||(o=this.engine.fn(this._head,s).canonical);const l=null!==(n=null===e||void 0===e?void 0:e.rules)&&void 0!==n?n:this.engine.cache("standard-simplification-rules",(()=>Iv(this.engine,Ov)),(e=>{for(const[t,i,r,n]of e)t._purge(),i._purge();return e}));let u=0,c=!1;do{const e=o.replace(l);null!==e?(o=Rv(e,o),o===e&&(c=!0)):c=!0,u+=1}while(!c&&ut.evaluate(e))),a.associative&&(o=null!==(i=cv(o,a.name))&&void 0!==i?i:o)):o=Vv(this._ops,"none",(t=>t.evaluate(e))),"string"!=typeof this._head?Pv(this._head,o).evaluate(e):a?void 0===a.evaluate?a.inert?null!==(r=o[0])&&void 0!==r?r:this.engine.symbol("Missing"):this.engine.fn(this._head,o).canonical:"function"!=typeof a.evaluate?Pv(a.evaluate,o).canonical:null!==(n=a.evaluate(this.engine,o))&&void 0!==n?n:this.engine.fn(this._head,o).canonical:this.engine.fn(this._head,o).canonical}N(e){var t,i,r,n;if(!this.isCanonical)return this.canonical.N(e);const a=this._def;let o;if(a?(o=Vv(a.associative&&null!==(t=cv(this._ops,a.name))&&void 0!==t?t:this._ops,a.hold,(t=>t.N(e))),a.associative&&(o=null!==(i=cv(o,a.name))&&void 0!==i?i:o)):o=Vv(this._ops,"none",(t=>t.N(e))),"string"!=typeof this._head)return Pv(this._head,o).N(e);if(!a)return this.engine.fn(this._head,o).canonical;const s=null!==(n=null===(r=a.N)||void 0===r?void 0:r.call(a,this.engine,o))&&void 0!==n?n:this.engine.fn(this._head,o).evaluate();if(s.isLiteral){if(!bv(this.engine)&&s.complexValue)return this.engine.NAN;if(!yv(this.engine)&&s.decimalValue)return this.engine.number(s.decimalValue.toNumber())}return s}solve(e){return null}replace(e,t){return Dv(this,e,t)}subs(e){return this.engine.fn(this._head,this._ops.map((t=>t.subs(e)))).canonical}}function Pv(e,t){const i={__:e.engine.tuple(t),"_#":e.engine.number(t.length)};let r=1;for(const n of t)i["_"+r++]=n;return i._=i._1,e.subs(i)}function Vv(e,t,i){if(0===e.length)return[];const r=[];for(let n=0;n0?"PositiveInteger":e<0?"NegativeInteger":"Integer":e>0?"PositiveNumber":e<0?"NegativeNumber":"RealNumber":"ExtendedRealNumber";if(e instanceof If.exports.Decimal)return e.isNaN()?"Number":e.isFinite()?e.isZero()?"NonNegativeInteger":e.isInteger()?e.gt(0)?"PositiveInteger":e.lt(0)?"NegativeInteger":"Integer":e.gt(0)?"PositiveNumber":e.lt(0)?"NegativeNumber":"RealNumber":"ExtendedRealNumber";if(e instanceof Df.exports.Complex){const t=e;return 0===t.im?Kv(t.re):0===t.re&&0!==t.im?"ImaginaryNumber":"ComplexNumber"}if(Array.isArray(e)){const[t,i]=$g(e);if(!Number.isNaN(t)&&!Number.isNaN(i))return 1!==i?"RationalNumber":Kv(t)}return"Number"}function Hv(e){if(!Number.isInteger(e)||!Number.isFinite(e)||Number.isNaN(e)||e<=1)return!1;if(e<=7919)return Yg.has(e);for(const t of Yg)if(e%t==0)return!1;return e>=0x3ffffffffffe5?!!function(e,t){let i=0,r=e-1;for(;r%2==0;)r/=2,++i;e:do{let t=Math.pow(2+Math.floor(Math.random()*(e-3)),r)%e;if(1!==t&&t!==e-1){for(let r=i-1;r--;){if(t=t*t%e,1===t)return!1;if(t===e-1)continue e}return!1}}while(--t);return!0}(e,30)&&void 0:e===function(e){if(1===e)return 1;if(e%2==0)return 2;if(e%3==0)return 3;if(e%5==0)return 5;const t=Math.floor(Math.sqrt(e));let i=7;for(;i<=t;){if(e%i==0)return i;if(e%(i+4)==0)return i+4;if(e%(i+6)==0)return i+6;if(e%(i+10)==0)return i+10;if(e%(i+12)==0)return i+12;if(e%(i+16)==0)return i+16;if(e%(i+22)==0)return i+22;if(e%(i+24)==0)return i+24;i+=30}return e}(e)}class Gv extends av{constructor(e,t,i){if(super(e,i),this._isCanonical=!0,t instanceof Df.exports.Complex)Number.isNaN(t.re)||Number.isNaN(t.im)?this._value=NaN:0===e.chop(t.im)?this._value=t.re:this._value=bv(e)?t:NaN;else if(Array.isArray(t)){let[e,i]=t;i<0&&([e,i]=[-e,-i]),1===i?this._value=e:0===e?this._value=0===i?NaN:e:(this._value=[e,i],this._isCanonical=1===Jg(e,i))}else t instanceof If.exports.Decimal?this._value=yv(e)?t:t.toNumber():"number"==typeof t?this._value=t:yv(e)?this._value=e.decimal(t):"string"==typeof t&&(this._value=Number.parseFloat(t));"number"==typeof this._value?Number.isInteger(this._value)?this._head="Integer":this._head="Number":this._value instanceof Df.exports.Complex?this._head="ComplexNumber":Array.isArray(this._value)?this._head="RationalNumber":this._value instanceof If.exports.Decimal?this._value.isInteger()?this._head="Integer":this._head="RealNumber":this._head="Number",e._register(this)}get hash(){if(void 0!==this._hash)return this._hash;let e=0;return e="number"==typeof this._value?wv(this._value.toString()):this._value instanceof Df.exports.Complex?wv(this._value.re.toString()+" +i "+this._value.im.toString()):this._value instanceof If.exports.Decimal?wv(this._value.toString()):wv(this._value[0].toString()+" / "+this._value[1].toString()),this._hash=e,e}get head(){return this._head}get isPure(){return!0}get isLiteral(){return!0}get isCanonical(){return this._isCanonical}set isCanonical(e){this._isCanonical=e}get numericValue(){if(!Array.isArray(this._value))return this;const[e,t]=this._value,i=this.engine;return yv(i)?new Gv(i,i.decimal(e).div(t)):new Gv(i,e/t)}get machineValue(){return"number"==typeof this._value?this._value:null}get decimalValue(){return this._value instanceof If.exports.Decimal?this._value:null}get complexValue(){return this._value instanceof Df.exports.Complex?this._value:null}get rationalValue(){return Array.isArray(this._value)?this._value:[null,null]}get asFloat(){if("number"==typeof this._value)return this._value;if(this._value instanceof If.exports.Decimal){if(this._value.isNaN())return NaN;if(!this._value.isFinite())return this._value.isPositive()?1/0:-1/0;if(uv(this._value))return this._value.toNumber()}return Array.isArray(this._value)?this._value[0]/this._value[1]:null}get asSmallInteger(){if("number"==typeof this._value)return Number.isInteger(this._value)&&this._value>=-1e6&&this._value<=1e6?this._value:null;if(this._value instanceof If.exports.Decimal)return this._value.isInteger()&&this._value.gte(-1e6)&&this._value.lte(1e6)?this._value.toNumber():null;if(Array.isArray(this._value)){const e=this._value[0]/this._value[1];return Number.isInteger(e)&&e>=-1e6&&e<=1e6?e:null}return 0===this.engine.chop(this._value.im)&&Number.isInteger(this._value.re)&&this._value.re>=-1e6&&this._value.re<=1e6?this._value.re:null}get asRational(){const[e,t]=this.rationalValue;if(null!==e&&null!==t)return[e,t];const i=this.asSmallInteger;return null!==i?[i,1]:[null,null]}get domain(){return void 0===this._domain&&(this._domain=this.engine.domain(Kv(this._value))),this._domain}get json(){return _v(this.engine,this._value,{latex:this._latex})}get sgn(){if(this.isZero)return 0;if(this._value instanceof Df.exports.Complex)return null;if("number"==typeof this._value)return this._value<0?-1:this._value>0?1:null;if(this._value instanceof If.exports.Decimal)return this._value.isNegative()?-1:this._value.isPositive()?1:null;if(Array.isArray(this._value)){const[e,t]=this._value;return 0===e&&0!==t?0:e<0?-1:e>0?1:null}return null}isSame(e){if(this===e)return!0;if(!(e instanceof Gv))return!1;if(Array.isArray(this._value)){if(!Array.isArray(e._value))return!1;const[t,i]=e._value;return this._value[0]===t&&this._value[1]===i}return this._value instanceof If.exports.Decimal?e._value instanceof If.exports.Decimal&&this._value.eq(e._value):this._value instanceof Df.exports.Complex?e._value instanceof Df.exports.Complex&&this._value.equals(e._value):"number"==typeof this._value&&"number"==typeof e._value&&this._value===e._value}isEqual(e){var t,i;if(this===e)return!0;const r=e.numericValue;if(void 0===r)return!1;if(!(r instanceof Gv))return!1;if(Array.isArray(this._value)){const e=r.asFloat;return null!==e&&0===this.engine.chop(this._value[0]/this._value[1]-e)}if(this._value instanceof If.exports.Decimal)return 0===this.engine.chop(this._value.sub(null!==(i=null!==(t=r.decimalValue)&&void 0!==t?t:r.asFloat)&&void 0!==i?i:NaN));if(this._value instanceof Df.exports.Complex){if(r instanceof Df.exports.Complex)return 0===this.engine.chop(r.re-this._value.re)&&0===this.engine.chop(r.im-this._value.im);if(0!==this._value.im)return!1}const n=this.asFloat,a=r.asFloat;return null!==n&&null!==a&&0===this.engine.chop(a-n)}match(e,t){var i;return this.isEqualWithTolerance(e,null!==(i=null===t||void 0===t?void 0:t.numericTolerance)&&void 0!==i?i:0)?{}:null}isEqualWithTolerance(e,t){var i,r;if(this===e)return!0;if(!(e instanceof Gv))return!1;if(Array.isArray(this._value)){const i=e.asFloat;return null!==i&&Math.abs(this._value[0]/this._value[1]-i)<=t}if(this._value instanceof If.exports.Decimal)return this._value.sub(null!==(r=null!==(i=e.decimalValue)&&void 0!==i?i:e.asFloat)&&void 0!==r?r:NaN).abs().lte(t);if(this._value instanceof Df.exports.Complex){if(e._value instanceof Df.exports.Complex)return Math.abs(e._value.re-this._value.re)<=t&&Math.abs(e._value.im-this._value.im)<=t;if(0!==this._value.im)return!1}const n=this.asFloat,a=e.asFloat;return null!==n&&null!==a&&Math.abs(a-n)<=t}isLess(e){if(e=e.N(),!this.isImaginary&&!e.isImaginary){if("number"==typeof this._value){const t=e.machineValue;if(null!==t)return this._value0}get isNonNegative(){const e=this.sgn;if(null!=e)return e>=0}get isNegative(){const e=this.sgn;if(null!=e)return e<0}get isNonPositive(){const e=this.sgn;if(null!=e)return e<=0}get isZero(){return!Array.isArray(this._value)&&0===this.engine.chop(this._value)}get isNotZero(){return!!Array.isArray(this._value)||0!==this.engine.chop(this._value)}get isOne(){if("number"==typeof this._value)return 1===this._value;if(this._value instanceof If.exports.Decimal)return this._value.equals(this.engine.DECIMAL_ONE);if(Array.isArray(this._value)){const[e,t]=this._value;return 0!==t&&e===t}return this._value.equals(1)}get isNegativeOne(){if("number"==typeof this._value)return-1===this._value;if(this._value instanceof If.exports.Decimal)return this._value.equals(this.engine.DECIMAL_NEGATIVE_ONE);if(Array.isArray(this._value)){const[e,t]=this._value;return e<0&&0!==t&&-e===t}return this._value.equals(-1)}get isOdd(){return!(!this.isOne&&!this.isNegativeOne)||!this.isZero&&!!this.isInteger&&("number"==typeof this._value?this._value%2!=0:this._value instanceof If.exports.Decimal?!this._value.mod(2).isZero():void 0)}get isEven(){return!this.isOne&&!this.isNegativeOne&&(!!this.isZero||!!this.isInteger&&("number"==typeof this._value?this._value%2==0:this._value instanceof If.exports.Decimal?this._value.mod(2).isZero():void 0))}get isPrime(){return!(!this.isInteger||!this.isFinite||this.isNonPositive||this.isOne||this.isZero)&&("number"==typeof this._value?Hv(this._value):void 0)}get isComposite(){return!(!this.isInteger||!this.isFinite||this.isNonPositive||this.isOne||this.isZero)&&("number"==typeof this._value?!Hv(this._value):void 0)}get isInfinity(){return"number"==typeof this._value?!Number.isFinite(this._value)&&!Number.isNaN(this._value):(this._value instanceof If.exports.Decimal||this._value instanceof Df.exports.Complex)&&!this._value.isFinite()&&!this._value.isNaN()}get isNaN(){return"number"==typeof this._value?Number.isNaN(this._value):(this._value instanceof If.exports.Decimal&&this._value.isNaN(),this._value instanceof Df.exports.Complex&&this._value.isNaN(),!1)}get isFinite(){return!this.isInfinity&&!isNaN}get isNumber(){return!0}get isInteger(){return"number"==typeof this._value?Number.isInteger(this._value):this._value instanceof If.exports.Decimal&&this._value.isInteger()}get isRational(){return!!Array.isArray(this._value)||this.isInteger}get isAlgebraic(){if(this.isRational)return!0}get isReal(){return!(!this.isFinite||this._value instanceof Df.exports.Complex&&0!==this.engine.chop(this._value.im))}get isExtendedReal(){return this.isInfinity||this.isReal}get isComplex(){return!this.isNaN}get isImaginary(){return this._value instanceof Df.exports.Complex&&0!==this._value.im}get isExtendedComplex(){return this.isInfinity||!this.isNaN}get canonical(){if(this._isCanonical)return this;if(Array.isArray(this._value)){const[e,t]=$g(this._value);return Number.isNaN(e)||Number.isNaN(t)?this.engine.NAN:1===t?this.engine.number(e):0===t?0!==e&&Number.isFinite(e)?e<0?this.engine.NEGATIVE_INFINITY:this.engine.POSITIVE_INFINITY:this.engine.NAN:0===e?this.engine.ZERO:this.engine.number([e,t])}return this}simplify(e){return this.canonical}N(e){if(Array.isArray(this._value)){const e=this.engine,[t,i]=this._value;return yv(e)?e.number(e.decimal(t).div(i)):e.number(t/i)}return this}}class jv extends av{constructor(e,t,i){super(e,i),this._string=t.normalize(),e._register(this)}get hash(){return wv("String"+this._string)}get json(){return e=this.engine,t=t=this._string,e.jsonSerializationOptions.shorthands.includes("string")?`'${t}'`:{str:t};var e,t}get head(){return"String"}get isPure(){return!0}get isLiteral(){return!0}get isCanonical(){return!0}set isCanonical(e){}get domain(){return this.engine.domain("String")}get complexity(){return 19}get string(){return this._string}isEqual(e){return e.string===this._string}isSame(e){return e.string===this._string}match(e,t){return e instanceof jv&&this._string===e._string?{}:null}}function Qv(e,t){if(null==t)return e.symbol("Nothing");if(t instanceof av)return t;if(Array.isArray(t)){if("number"!=typeof t[0])return new Fv(e,"string"==typeof t[0]?t[0]:Qv(e,t[0]),t.slice(1).map((t=>Qv(e,t))));const[i,r]=t;return"number"==typeof r&&Number.isInteger(i)&&Number.isInteger(r)?e.number(t):e.fn("Divide",t)}if("number"==typeof t||t instanceof Df.exports.Complex||t instanceof If.exports.Decimal)return e.number(t);if("string"==typeof t)return t.startsWith("'")&&t.endsWith("'")?new jv(e,t.slice(1,-1)):e.symbol(t);if("object"==typeof t){const i={latex:t.latex,wikidata:t.wikidata};if("dict"in t)return new Bv(e,t.dict,i);if("fn"in t)return"string"==typeof t.fn[0]?function(e,t,i,r){var n,a,o;if("Hold"===t)return new Fv(e,"Hold",[Zv(e,null!==(n=i[0])&&void 0!==n?n:"Missing")],r);if("String"===t)return 0===i.length?new jv(e,"",r):new jv(e,i.map((e=>{var t;return null!==(t=Yv(e))&&void 0!==t?t:""})).join(""),r);if("Symbol"===t&&i.length>0)return e.symbol(i.map((e=>{var t;return null!==(t=Yv(e))&&void 0!==t?t:""})).join(""),r);if(("Divide"===t||"Rational"===t)&&2===i.length){const t=ig(i[0]),r=ig(i[1]);if(null!==t&&null!==r&&Number.isInteger(t)&&Number.isInteger(r))return e.number([t,r])}if("Number"===t&&1===i.length)return Qv(e,i[0]);if("Complex"===t){if(1===i.length){const t=Qv(e,i[0]),n=t.asFloat;return null!==n&&0!==n?new Gv(e,e.complex(0,n),r):e.mul([t,e.I])}if(2===i.length){const t=Qv(e,i[0]),n=Qv(e,i[1]),a=t.asFloat,o=n.asFloat;return null!==o&&null!==a?0===o&&0===a?e.ZERO:null!==o&&0!==o?new Gv(e,e.complex(a,o),r):t:e.add([t,e.mul([n,e.I])],r)}}if("Negate"===t&&i.length>0&&"number"==typeof i[0])return e.number(-i[0],r);if("Single"===t||"Pair"===t||"Triple"===t)return e.fn("Tuple",i,r);if("Dictionary"===t){const t={};for(const r of i){const i=e.box(r),n=i.head;if("KeyValuePair"===n||"Pair"===n||"Tuple"===n){const e=i.op1;if(!e.isMissing){const r=i.op2;let n=null!==(a=e.symbol)&&void 0!==a?a:e.string;if(!n&&e.isLiteral){const t=null!==(o=e.machineValue)&&void 0!==o?o:e.asSmallInteger;t&&Number.isFinite(t)&&Number.isInteger(t)&&(n=t.toString())}n&&(t[n]=r)}}}return new Bv(e,t,r)}return new Fv(e,t,i.map((t=>Qv(e,t))),r)}(e,t.fn[0],t.fn.slice(1),i):e.fn(Qv(e,t.fn[0]),t.fn.slice(1).map((t=>Qv(e,t))),i);if("str"in t)return new jv(e,t.str,i);if("sym"in t)return e.symbol(t.sym,i);if("num"in t)return e.number(t,i)}return e.symbol("Undefined")}function Wv(e,t,i){var r;if(t instanceof Gv)return t;if(Array.isArray(t)){if(2!==t.length)throw Error("Array argument to boxNumber() should be two integers");const[r,n]=t;if("number"!=typeof r||"number"!=typeof n)throw Error("Array argument to boxNumber() should be two integers");if(!Number.isInteger(r)||!Number.isInteger(n))throw Error("Array argument to boxNumber() should be two integers");if(n===r)return 0===n?e.NAN:e.ONE;if(1===n)t=r;else{if(-1!==n)return 1===r&&2===n?e.HALF:new Gv(e,[r,n],i);t=-r}}if(t instanceof Df.exports.Complex){if(t.isNaN())return e.NAN;if(t.isZero())return e.ZERO;if(t.isInfinite())return e.COMPLEX_INFINITY;if(0!==t.im)return bv(e)?new Gv(e,t,i):e.NAN;t=t.re}if(t instanceof If.exports.Decimal)return t.isNaN()?e.NAN:t.equals(e.DECIMAL_NEGATIVE_ONE)?e.NEGATIVE_ONE:t.isZero()?e.ZERO:t.equals(e.DECIMAL_ONE)?e.ONE:t.equals(e.DECIMAL_TWO)?e.TWO:!t.isFinite()&&t.isPositive()?e.POSITIVE_INFINITY:!t.isFinite()&&t.isNegative()?e.NEGATIVE_INFINITY:new Gv(e,yv(e)?t:t.toNumber(),i);if("object"==typeof t&&"num"in t)if("number"==typeof t.num)t=t.num;else if("string"==typeof t.num){let n=t.num.toLowerCase();if(/[0-9][nd]$/.test(n)&&(n=n.slice(0,-1)),n=n.replace(/[\u0009-\u000d\u0020\u00a0]/g,""),/\([0-9]+\)$/.test(n)){const[t,i,a]=null!==(r=n.match(/(.+)\(([0-9]+)\)$/))&&void 0!==r?r:[];n=i+a.repeat(Math.ceil(e.precision/a.length))}return"nan"===n?e.NAN:"infinity"===n||"+infinity"===n?e.POSITIVE_INFINITY:"-infinity"===n?e.NEGATIVE_INFINITY:"0"===n?e.ZERO:"1"===n?e.ONE:"-1"===n?e.NEGATIVE_ONE:"2"===n?e.TWO:new Gv(e,n,i)}if("number"==typeof t){if(Number.isNaN(t))return e.NAN;if(!Number.isFinite(t)&&t>0&&e.POSITIVE_INFINITY,!Number.isFinite(t)&&t<0&&e.NEGATIVE_INFINITY,-1===t)return e.NEGATIVE_ONE;if(0===t)return e.ZERO;if(1===t)return e.ONE;if(2===t)return e.TWO}return"number"==typeof t?new Gv(e,t,i):null}function Zv(e,t){if("object"==typeof t&&t instanceof av)return t;if("string"==typeof t)return Qv(e,t);if(Array.isArray(t)){const i=t.map((t=>Zv(e,t)));return new Fv(e,i[0],i.slice(1))}if("object"==typeof t){if("dict"in t)return new Bv(e,t.dict);if("fn"in t)return Zv(e,t.fn);if("str"in t)return new jv(e,t.str);if("sym"in t)return Qv(e,t.sym);if("num"in t)return Qv(e,t.num)}return Qv(e,t)}function Yv(e){var t,i;if("string"==typeof e)return e;if(e instanceof av)return null!==(i=null!==(t=e.string)&&void 0!==t?t:e.symbol)&&void 0!==i?i:e.toString();if("object"==typeof e){if("str"in e)return e.str;if("fn"in e&&"String"===e.fn[0]&&"string"==typeof e.fn[1])return e.fn[1]}return Array.isArray(e)&&"String"===e[0]&&"string"==typeof e[1]?e[1]:null}function Xv(e,t){if(!e.isLiteral)return null;let i;null!==e.machineValue&&(i=-e.machineValue),e.decimalValue&&(i=e.decimalValue.neg()),e.complexValue&&(i=e.complexValue.neg());const[r,n]=e.rationalValue;return null!==r&&null!==n&&(i=[-r,n]),void 0!==i?e.engine.number(i,t):null}function Jv(e,t){var i;if("Negate"===e.head)return e.op1;if(e.isLiteral)return Xv(e,t);if("Add"===e.head){let r=e.ops.map((e=>Jv(e)));return r=null!==(i=cv(r,"Add"))&&void 0!==i?i:r,e.engine.add(r,t)}return e.engine._fn("Negate",[e],t)}function $v(e){var t;if("Negate"===e.head)return e.op1;if(e.isLiteral)return Xv(e);const i=e.engine;if("Add"===e.head){let r=e.ops.map((e=>$v(e)));return r=null!==(t=cv(r,"Add"))&&void 0!==t?t:r,i.add(r)}return"Multiply"===e.head?function(e,t){let i=[],r=!1;for(const n of t)r||"Negate"!==n.head?i.push(n):(r=!0,i.push(n.op1));if(r)return e.mul(i);i=[];for(const n of t)!r&&n.isLiteral&&n.isInteger?(r=!0,i.push($v(n))):i.push(n);if(r)return e.mul(i);i=[];for(const n of t)!r&&n.isLiteral&&n.isNumber?(r=!0,i.push($v(n))):i.push(n);return r?e.mul(i):e._fn("Negate",[e._fn("Multiply",t)])}(i,e.ops):"Divide"===e.head?i.divide($v(e.op1),e.op2):i._fn("Negate",[e])}function ey(e,t,i="simplify"){return $v(t)}class ty{constructor(e,t){if(this._literal=[0,1],this._imaginary=0,this._posInfinityCount=0,this._negInfinityCount=0,this._terms=[],this.engine=e,t)for(const i of t)this.addTerm(i)}get isEmpty(){return 0===this._terms.length&&0===this._literal[0]&&0===this._imaginary&&0===this._negInfinityCount&&0===this._posInfinityCount}addTerm(e,t){if("Nothing"===e.symbol)return;if(void 0===t&&(t=[1,1]),e.isLiteral){if(e.isInfinity)return void(e.isPositive?this._posInfinityCount+=1:this._negInfinityCount+=1);const[i,r]=e.asRational;if(null!==i&&null!==r)return void(this._literal=[t[0]*(this._literal[0]*r+i*this._literal[1]),t[1]*r*this._literal[1]]);if(e.complexValue){let i=e.complexValue.re,r=e.complexValue.im;if(Number.isInteger(i)&&Math.abs(i)<=1e6&&(this._literal[0]+=this._literal[1]*i*t[0]/t[1],i=0),Number.isInteger(r)&&Math.abs(r)<=1e6&&(this._imaginary+=r*t[0]/t[1],r=0),0===i&&0===r)return;e=this.engine.number(this.engine.complex(i,r)).canonical}}let i;if([i,e]=kv(e),0===i[0])return;if(i=[i[0]*t[0],i[1]*t[1]],"Add"===e.head){for(const t of e.ops)this.addTerm(t,i);return}let r=!1;if(!e.isLiteral)if(this._terms.length>500){const t=e.hash;for(let n=0;n0&&this._negInfinityCount>0)return[t.NAN];if(this._posInfinityCount>0)return[t.POSITIVE_INFINITY];if(this._negInfinityCount>0)return[t.NEGATIVE_INFINITY];if(0===this._terms.length)return 0===this._literal[0]&&0===this._imaginary?[]:0===this._imaginary?[t.number(this._literal).canonical]:0===this._literal[0]?[t.number(t.complex(0,this._imaginary)).canonical]:[t.number(this._literal).canonical,t.number(t.complex(0,this._imaginary)).canonical];const i=[];for(const{coef:[r,n],term:a}of this._terms)0!==r&&(r===n?i.push(a):r===-n?i.push(t.negate(a)):1===n?i.push(t.mul([t.number(r).canonical,a])):1===r?i.push(t.divide(a,t.number(n).canonical)):0!==r&&i.push(t.mul([t.number([r,n]).canonical,a])));return 0!==this._literal[0]&&i.push(t.number(this._literal).canonical),0!==this._imaginary&&i.push(t.number(t.complex(0,this._imaginary)).canonical),null!==(e=cv(i,"Add"))&&void 0!==e?e:i}asExpression(){const e=this.engine,t=this.terms();return 0===t.length?e.ZERO:1===t.length?t[0]:e._fn("Add",t.sort(((e,t)=>{const i=pv(e),r=pv(t);if(ir)return 1;const n=hv(e),a=hv(t);if(n!==a)return a-n;const o=dv(e),s=dv(t);return o!==s?o-s:xv(e,t)})))}}function iy(e,t){var i,r,n,a;if((t=null!==(i=cv(t,"Add"))&&void 0!==i?i:t).length<=1)return null!==(r=t[0])&&void 0!==r?r:e.symbol("Nothing");if(2===t.length){let i=0,r=0;if(t[0].isLiteral&&(r=t[0].machineValue,r=null===r&&t[0].decimalValue&&null!==(n=t[0].asFloat)&&void 0!==n?n:0),0!==r?i=gv(t[1]):(i=gv(t[0]),0!==i&&(r=t[1].machineValue,r=null===r&&t[1].decimalValue&&null!==(a=t[1].asFloat)&&void 0!==a?a:0)),0!==i)return e.number(e.complex(r,i));if(t[0].isLiteral&&t[1].isLiteral){if(t[0].isZero)return t[1];if(t[1].isZero)return t[0];const[i,r]=t[0].asRational,[n,a]=t[1].asRational;if(null!==i&&null!==r&&null!==n&&null!==a)return e.number([i*a+n*r,r*a])}}return new ty(e,t).asExpression()}function ry(e,t,i){const r=new ty(e);for(const n of t){if(n.isImaginary&&n.isInfinity)return e.symbol("ComplexInfinity");if(n.isNaN||n.isMissing||"Undefined"===n.symbol)return e.NAN;r.addTerm(n)}return r.asExpression()}function ny(e,t,i,r){if("ComplexInfinity"===i.symbol)return e.NAN;if(i.isLiteral){if(i.isZero)return e.ONE;if(t.isLiteral){if(t.isOne)return e.ONE;if(t.isZero){if(i.isPositive)return e.ZERO;if(i.isNegative)return e.COMPLEX_INFINITY}if(i.isOne)return t;if(i.isNegativeOne){if(t.isOne)return e.ONE;if(t.isNegativeOne)return e.NEGATIVE_ONE;if(t.isInfinity)return e.ZERO;const[i,n]=t.rationalValue;if(null!==i&&null!==n)return e.number([n,i],r);const a=t.asFloat;return null!==a&&Number.isInteger(a)?e.number([1,a],r):e._fn("Power",[t,e.NEGATIVE_ONE],r)}const n=i.asFloat;if(.5===n||-.5===n){const i=t.asSmallInteger;if(null!==i&&i>0){const[t,r]=Xg(i,2);if(1===r&&1===t)return e.ONE;if(1!==t)return 1===r?e.number(n>=0?t:[1,t]):e.mul([e.number(t),e.power(e.number(r),e.HALF)])}return n>0?e._fn("Power",[t,e.HALF],r):e._fn("Power",[t,e.number([-1,2])],r)}if(t.isInfinity){if(i.complexValue){const t=i.complexValue.re;if(0===t)return e.NAN;if(t<0)return e.ZERO;if(t>0)return e.COMPLEX_INFINITY}if(t.isNegative){if(i.isInfinity)return e.NAN}else if(t.isPositive){if(i.isNegativeOne)return e.ZERO;if(i.isInfinity)return i.isNegative?e.ZERO:e.POSITIVE_INFINITY}}if(i.isInfinity&&(t.isOne||t.isNegativeOne))return e.NAN;const[a,o]=t.asRational;if(null!==a&&null!==o){const t=i.asSmallInteger;if(null!==t)return-1===t?e.number([o,a]):t>0?e.number([Math.pow(a,t),Math.pow(o,t)]):e.number([Math.pow(o,-t),Math.pow(a,-t)])}}}if("Power"===t.head&&t.op1.isReal){const r=i.asSmallInteger;if(null!==r){const i=t.op2.asSmallInteger;if(null!==i)return e._fn("Power",[t.op1,e.number(r*i)])}if(t.op1.isNonNegative){const[r,n]=i.asRational;if(null!==r&&null!==n){const[i,a]=t.op2.asRational;if(null!==i&&null!==a)return e._fn("Power",[t.op1,e.number([r*i,n*a])])}}}return"Multiply"===t.head&&null!==i.asSmallInteger?e._fn("Multiply",t.ops.map((t=>e.power(t,i)))):null}function ay(e,t){if(t.machineValue)return e.number(Math.pow(t.machineValue,2));if(t.decimalValue)return e.number(t.decimalValue.pow(2));if(t.complexValue)return e.number(t.complexValue.pow(2));const[i,r]=t.rationalValue;if(null!==i&&null!==r)return e.number([Math.pow(r,2),Math.pow(i,2)]);if("Multiply"===t.head)return e._fn("Multiply",t.ops.map((t=>ay(e,t))));if("Power"===t.head){const i=t.op2.asSmallInteger;return null!==i?e._fn("Power",[t.op1,e.number(2*i)]):e._fn("Power",[t.op1,e.mul([e.TWO,t.op2])])}return e._fn("Power",[t,e.TWO])}function oy(e,t,i,r){var n,a,o,s,l,u;if("N"===r&&t.isLiteral&&i.isLiteral)return t.complexValue?e.number(t.complexValue.pow(null!==(a=null!==(n=i.complexValue)&&void 0!==n?n:i.asFloat)&&void 0!==a?a:NaN)):i.complexValue&&t.asFloat?e.number(e.complex(t.asFloat).pow(i.complexValue)):t.decimalValue?e.number(t.decimalValue.pow(null!==(o=i.decimalValue)&&void 0!==o?o:i.asFloat)):t.asFloat&&(i.decimalValue||yv(e))?e.number(e.decimal(t.asFloat).pow(null!==(s=i.decimalValue)&&void 0!==s?s:i.asFloat)):e.number(Math.pow(null!==(l=t.asFloat)&&void 0!==l?l:NaN,null!==(u=i.asFloat)&&void 0!==u?u:NaN));if(null!==t.asSmallInteger){const[r,n]=i.rationalValue;if(!(1!==r&&-1!==r||2!==n&&3!==n)){const[a,o]=Xg(t.asSmallInteger,n);if(1===o&&1===a)return e.ONE;if(1===a)return;return 1===o?e.number(r>=0?a:[1,a]):e.mul([e.number(a),e.power(e.number(o),i)])}}}function sy(e,t){var i;return 0===(t=null!==(i=cv(t,"Multiply"))&&void 0!==i?i:t).length?e.symbol("Nothing"):1===t.length?t[0]:2===t.length?uy(t[0],t[1]):new Mv(e,t).asExpression()}function ly(e,t,i){const r=new Mv(e);for(const n of t){if(n.isNaN||n.isMissing||"Undefined"===n.symbol)return e.NAN;r.addTerm(n)}return r.asExpression()}function uy(e,t,i){const r=e.engine;if(e.isLiteral&&t.isLiteral&&e.isInteger&&t.isInteger){if(e.decimalValue&&t.decimalValue)return r.number(e.decimalValue.mul(t.decimalValue));if(e.machineValue&&t.machineValue)return r.number(e.machineValue*t.machineValue)}if("Nothing"===e.symbol)return t;if("Nothing"===t.symbol)return e;if(e.isLiteral&&e.isOne)return t;if(t.isLiteral&&t.isOne)return e;if(e.isLiteral&&e.isNegativeOne)return Jv(t);if(t.isLiteral&&t.isNegativeOne)return Jv(e);if(e.isMissing||t.isMissing)return r._fn("Multiply",[e,t]);let n=1,a=e,o=t;a.isLiteral&&null!==a.asRational||(o=t,a=e),"Negate"===o.head&&(o=o.op1,n=-n);const[s,l]=a.asRational;if(a.isLiteral&&null!==s&&null!==l){if(s===l)return o;if(0===s)return r.ZERO;if("Add"===o.head)return n<0&&(a=Jv(a)),r.add(o.ops.map((e=>uy(a,e))),i);if(o.isLiteral){const[e,t]=o.asRational;if(null!==e&&null!==t)return r.number($g([n*s*e,t*l]),i)}return n<0?r._fn("Multiply",[Jv(a),o],i):r._fn("Multiply",[a,o],i)}if(a.hash===o.hash&&a.isSame(o))return ay(r,a);const u=new Mv(r,[a,o]);return n>0?u.asExpression():Jv(u.asExpression(),i)}function cy(e,t,i){if(t.isLiteral&&i.isLiteral){if(t.isOne)return e.inverse(i);if(t.isNegativeOne)return Jv(e.inverse(i));if(i.isOne)return t;if(i.isNegativeOne)return Jv(t);const[r,n]=[t.asSmallInteger,i.asSmallInteger];if(null!==r&&null!==n&&0!==n)return e.number($g([r,n]))}if("Divide"===t.head&&"Divide"===i.head)return e.divide(e.mul([t.op1,i.op2]),e.mul([t.op2,i.op1]));if("Divide"===t.head)return e.divide(e.mul([t.op1,i]),t.op2);if("Divide"===i.head)return e.divide(e.mul([t,i.op2]),i.op1);let[r,n]=Sv(t),[a,o]=Sv(i);return n=n.canonical,o=o.canonical,o.isLiteral&&o.isOne?r*a<0?Jv(n):n:(o=e.inverse(o),n.isOne?o:n.isNegativeOne?Jv(o):r*a>0?e.mul([n,o]):e.negate(e.mul([n,o])))}const hy=[{functions:[{name:"Abs",domain:["Function","ExtendedRealNumber","ExtendedRealNumber"],range:[0,1/0],wikidata:"Q3317982",threadable:!0,idempotent:!0,complexity:1200,simplify:(e,t)=>dy(e,t[0],"simplify"),evaluate:(e,t)=>dy(e,t[0],"evaluate"),N:(e,t)=>dy(e,t[0],"N")},{name:"Add",wikidata:"Q32043",associative:!0,commutative:!0,threadable:!0,idempotent:!0,domain:"NumericFunction",complexity:1300,canonical:(e,t)=>iy(e,t),simplify:(e,t)=>ry(e,t),evaluate:(e,t)=>ry(e,t),N:(e,t)=>function(e,t){for(const l of t){if(l.isImaginary&&l.isInfinity)return e.symbol("ComplexInfinity");if(l.isNaN||l.isMissing||"Undefined"===l.symbol)return e.NAN}let[i,r]=[0,1],n=0,a=e.DECIMAL_ZERO,o=Df.exports.Complex.ZERO;const s=new ty(e);for(const l of t)if("Nothing"!==l.symbol&&!l.isZero){const[t,u]=l.rationalValue;null!==t&&null!==u?[i,r]=[i*u+r*t,r*u]:null!==l.decimalValue?a=a.add(l.decimalValue):null!==l.machineValue?yv(e)?a=a.add(l.machineValue):n+=l.machineValue:null!==l.complexValue?o=o.add(l.complexValue):s.addTerm(l)}if(!bv(e)&&0!==o.im)return e.NAN;if(yv(e)||0!==e.chop(a)){let t=a;if(0!==i&&(t=t.mul(r).add(i).div(r)),0!==n&&(t=t.add(n)),0!==o.re&&(t=t.add(o.re)),0!==o.im)if(uv(t)){const i=e.number(e.complex(t.toNumber(),o.im));if(s.isEmpty)return i;s.addTerm(i)}else s.addTerm(e.number(e.complex(0,o.im))),s.addTerm(e.number(t));else{if(s.isEmpty)return e.number(t);s.addTerm(e.number(t))}}else{const t=n+o.re+i/r,a=e.number(0===o.im?t:e.complex(t,o.im));if(s.isEmpty)return a;s.addTerm(a)}return s.asExpression()}(e,t)},{name:"Ceil",description:"Rounds a number up to the next largest integer",complexity:1250,domain:"NumericFunction",evaluate:(e,t)=>{const i=t[0];return i.decimalValue?e.number(i.decimalValue.ceil()):i.complexValue?e.number(i.complexValue.ceil(0)):null!==i.asFloat?e.number(Math.ceil(i.asFloat)):void 0}},{name:"Chop",associative:!0,threadable:!0,idempotent:!0,complexity:1200,domain:"NumericFunction",N:(e,t)=>{const i=t[0];return i.decimalValue?e.number(e.chop(i.decimalValue)):i.complexValue?e.number(e.chop(i.complexValue)):null!==i.asFloat?e.number(e.chop(i.asFloat)):void 0}},{name:"Complex",wikidata:"Q11567",domain:"NumericFunction",complexity:500},{name:"Divide",wikidata:"Q1226939",domain:"NumericFunction",complexity:2500,canonical:(e,t)=>t[0]&&t[1]?cy(e,t[0],t[1]):e.symbol("Missing")},{name:"Exp",domain:"NumericFunction",wikidata:"Q168698",threadable:!0,complexity:3500,canonical:(e,t)=>t[0]?e.power(e.symbol("ExponentialE"),t[0]):e.symbol("Missing")},{name:"Erf",description:"Complementary Error Function",domain:"NumericFunction",complexity:7500},{name:"Erfc",description:"Complementary Error Function",domain:"NumericFunction",complexity:7500},{name:"Factorial",description:"The factorial function",wikidata:"Q120976",complexity:9e3,domain:"NumericFunction",evaluate:(e,t)=>{const i=t[0].asSmallInteger;return null!==i&&i>=0?yv(e)?e.number(ov(e,e.decimal(i))):e.number(function(e){if(!Number.isInteger(e)||e<0)return NaN;let t=1;for(let i=2;i<=e;i++)t*=i;return t}(i)):t[0].complexValue?e.number(t[0].complexValue.add(1)):null!==t[0].asFloat?e.number(rv(1+t[0].asFloat)):void 0}},{name:"Floor",wikidata:"Q56860783",domain:["Function","ExtendedRealNumber","ExtendedRealNumber"],complexity:1250,evaluate:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.floor()):t[0].complexValue?e.number(t[0].complexValue.floor(0)):null!==t[0].asFloat?e.number(Math.floor(t[0].asFloat)):void 0},{name:"Gamma",wikidata:"Q190573",domain:["Function","Number","Number"],complexity:8e3,N:(e,t)=>t[0].decimalValue?e.number(lv(e,t[0].decimalValue)):t[0].complexValue?e.number(t[0].complexValue):null!==t[0].asFloat?e.number(rv(t[0].asFloat)):void 0},{name:"LogGamma",domain:["Function","Number","Number"],complexity:8e3,N:(e,t)=>t[0].decimalValue?e.number(sv(e,t[0].decimalValue)):t[0].complexValue?e.number(t[0].complexValue):null!==t[0].asFloat?e.number(iv(t[0].asFloat)):void 0},{name:"Ln",description:"Natural Logarithm",domain:["Function","Number","Number"],wikidata:"Q204037",complexity:4e3,N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.log()):t[0].complexValue?e.number(t[0].complexValue.log()):null!==t[0].asFloat?e.number(Math.log(t[0].asFloat)):void 0},{name:"Log",description:"Log(b, z) = Logarithm of base b",wikidata:"Q11197",domain:["Function","Number","Number","Number"],complexity:4100,N:(e,t)=>{var i,r,n,a,o;const s=t[0],l=t[1];return s.decimalValue?e.number(s.decimalValue.log().div(null!==(r=null!==(i=l.decimalValue)&&void 0!==i?i:l.asFloat)&&void 0!==r?r:NaN)):s.complexValue?e.number(s.complexValue.log().div(null!==(a=null!==(n=l.complexValue)&&void 0!==n?n:l.asFloat)&&void 0!==a?a:NaN)):null!==s.asFloat?e.number(Math.log(s.asFloat)/Math.log(null!==(o=l.asFloat)&&void 0!==o?o:NaN)):void 0}},{name:"Lb",description:"Base-2 Logarithm",domain:["Function","Number","Number"],wikidata:"Q581168",complexity:4100,N:(e,t)=>{const i=t[0];return i.decimalValue?e.number(i.decimalValue.log().div(e.DECIMAL_TWO)):i.complexValue?e.number(i.complexValue.log().div(e.complex(2))):null!==i.asFloat?e.number(Math.log2(i.asFloat)):void 0}},{name:"Lg",description:"Base-10 Logarithm",domain:["Function","Number","Number"],wikidata:"Q966582",complexity:4100,N:(e,t)=>{const i=t[0];return i.decimalValue?e.number(i.decimalValue.log().div(e.decimal(10))):i.complexValue?e.number(i.complexValue.log().div(e.complex(10))):null!==i.asFloat?e.number(Math.log10(i.asFloat)):void 0}},{name:"Multiply",domain:"NumericFunction",wikidata:"Q40276",associative:!0,commutative:!0,idempotent:!0,complexity:2100,canonical:(e,t)=>sy(e,t),simplify:(e,t)=>ly(e,t),evaluate:(e,t)=>ly(e,t),N:(e,t)=>function(e,t){for(const l of t)if(l.isNaN||l.isMissing||"Undefined"===l.symbol)return e.NAN;let[i,r]=[1,1],n=1,a=e.DECIMAL_ONE,o=Df.exports.Complex.ONE;const s=new Mv(e);for(const l of t)if("Nothing"!==l.symbol&&!l.isOne){const[t,u]=l.rationalValue;null!==t&&null!==u?[i,r]=[i*t,r*u]:null!==l.decimalValue?a=a.mul(l.decimalValue):null!==l.machineValue?yv(e)?a=a.mul(l.machineValue):n*=l.machineValue:null!==l.complexValue?o=o.mul(l.complexValue):s.addTerm(l)}if(!bv(e)&&0!==o.im)return e.NAN;if(yv(e)||!a.eq(e.DECIMAL_ONE)){const t=a.mul(i).div(r).mul(n);if(1!==o.re||0!==o.im)if(uv(t)){const i=e.number(e.complex(o.mul(t.toNumber())));if(s.isEmpty)return i;s.addTerm(i)}else{if(s.isEmpty)return e._fn("Multiply",[e.number(o),e.number(t)]);s.addTerm(e.number(o)),s.addTerm(e.number(t))}else{if(s.isEmpty)return e.number(t);s.addTerm(e.number(t))}}else{const t=n*i/r;let a;if(a=1!==o.re||0!==o.im?e.number(o.mul(t)):e.number(t),s.isEmpty)return a;s.addTerm(a)}return s.asExpression()}(e,t)},{name:"Negate",description:"Additive Inverse",wikidata:"Q715358",domain:["Function","Number","Number"],complexity:2e3,canonical:(e,t)=>t[0]?Jv(t[0]):e.box("Missing"),simplify:(e,t)=>ey(0,t[0],"simplify"),evaluate:(e,t)=>ey(0,t[0],"evaluate"),N:(e,t)=>ey(0,t[0],"N"),sgn:(e,t)=>{var i;const r=null!==(i=t[0])&&void 0!==i?i:e.symbol("Missing");return r.isZero?0:r.isPositive?-1:r.isNegative?1:void 0}},{name:"Power",domain:["Function","Number","Number","Number"],wikidata:"Q33456",commutative:!1,complexity:3500,canonical:(e,t)=>{var i,r,n;const a=null!==(i=t[0])&&void 0!==i?i:e.symbol("Missing"),o=null!==(r=t[1])&&void 0!==r?r:e.symbol("Missing");return null!==(n=ny(e,a,o))&&void 0!==n?n:e._fn("Power",t)},simplify:(e,t)=>oy(e,t[0],t[1],"simplify"),evaluate:(e,t)=>oy(e,t[0],t[1],"evaluate"),N:(e,t)=>oy(e,t[0],t[1],"N")},{name:"Rational",domain:["Function","Number",["Optional","Number"],"RationalNumber"],complexity:2400,canonical:(e,t)=>2===t.length?cy(e,t[0],t[1]):e._fn("Rational",t),simplify:(e,t)=>{if(2===t.length)return null!==t[0].asSmallInteger&&null!==t[1].asSmallInteger?e.number([t[0].asSmallInteger,t[1].asSmallInteger]):void 0},evaluate:(e,t)=>{if(2===t.length)return null!==t[0].asSmallInteger&&null!==t[1].asSmallInteger?e.number([t[0].asSmallInteger,t[1].asSmallInteger]):void 0;const i=t[0].asFloat;if(null===i)return t[0];const r=function(e){if(!Number.isFinite(e))return e;if(0==e%1)return e;let t=Math.floor(e),i=1,r=0,n=t,a=1;for(;e-t>1e-15*a*a;){t=Math.floor(e=1/(e-t));const o=i;i=n;const s=r;r=a,n=o+t*i,a=s+t*r}return[n,a]}(i);return"number"==typeof r?e.number(r):e.number([r[0],r[1]])},N:(e,t)=>{if(2===t.length){if(null===t[0].asSmallInteger||null===t[1].asSmallInteger)return;return e.number(t[0].asSmallInteger/t[1].asSmallInteger)}}},{name:"Root",domain:["Function","Number","RationalNumber","Number"],complexity:3200,canonical:(e,t)=>{var i,r,n;const a=null!==(i=t[0])&&void 0!==i?i:e.symbol("Missing"),o=null!==(r=t[1])&&void 0!==r?r:e.symbol("Missing"),s=e.inverse(o);return null!==(n=ny(e,a,s))&&void 0!==n?n:e._fn("Power",[a,s])},N:(e,t)=>{var i,r,n;const a=t[0],o=t[1];if(a.decimalValue)return e.number(a.decimalValue.pow(e.DECIMAL_ONE.div(null!==(i=o.asFloat)&&void 0!==i?i:NaN)));if(a.complexValue){const t=o.complexValue?Df.exports.Complex.ONE.div(o.complexValue):e.complex(1/(null!==(r=o.asFloat)&&void 0!==r?r:NaN));return e.number(a.complexValue.pow(t))}return null!==a.asFloat?e.number(Math.pow(a.asFloat,null!==(n=o.asFloat)&&void 0!==n?n:NaN)):void 0}},{name:"Round",domain:["Function","Number","Number"],complexity:1250,N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.round()):t[0].complexValue?e.number(t[0].complexValue.round(0)):null!==t[0].asFloat?e.number(Math.round(t[0].asFloat)):void 0},{name:"Sign",domain:["Function","Number","Integer"],range:[-1,1],complexity:1200,simplify:(e,t)=>{const i=t[0].sgn;return 0===i?e.ZERO:1===i?e.ONE:-1===i?e.NEGATIVE_ONE:void 0},evaluate:(e,t)=>{const i=t[0].sgn;return 0===i?e.ZERO:1===i?e.ONE:-1===i?e.NEGATIVE_ONE:void 0},N:(e,t)=>{const i=t[0].sgn;return 0===i?e.ZERO:1===i?e.ONE:-1===i?e.NEGATIVE_ONE:void 0}},{name:"SignGamma",description:"The sign of the gamma function: -1 or +1",domain:["Function","Number","Integer"],complexity:7900,range:[-1,1]},{name:"Sqrt",description:"Square Root",domain:["Function","Number","Number"],wikidata:"Q134237",complexity:3e3,canonical:(e,t)=>{var i;return t[0]?null!==(i=ny(e,t[0],e.HALF))&&void 0!==i?i:e._fn("Power",[t[0],e.HALF]):e._fn("Power",[e.symbol("Missing"),e.HALF])},simplify:(e,t)=>py(e,t[0],"simplify"),evaluate:(e,t)=>py(e,t[0],"evaluate"),N:(e,t)=>py(e,t[0],"N")},{name:"Square",domain:["Function","Number","Number"],wikidata:"Q3075175",complexity:3100,canonical:(e,t)=>{var i;return t[0]?null!==(i=ny(e,t[0],e.TWO))&&void 0!==i?i:e._fn("Power",[t[0],e.TWO]):e._fn("Power",[e.symbol("Missing"),e.TWO])},N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.mul(t[0].decimalValue)):t[0].complexValue?e.number(t[0].complexValue.mul(t[0].complexValue)):null!==t[0].asFloat?e.number(t[0].asFloat*t[0].asFloat):void 0},{name:"Subscript",domain:["Function","Anything","Anything","Anything"],hold:"last",canonical:(e,t)=>{var i,r,n,a;const o=null!==(i=t[0])&&void 0!==i?i:e.symbol("Missing"),s=null!==(r=t[1])&&void 0!==r?r:e.symbol("Missing");if(o.string&&s.isLiteral&&null!==s.asSmallInteger){const t=s.asSmallInteger;if(t>1&&t<=36){const[i,r]=nv(o.string,t);return r?e._fn("Error",[e.number(i),e.string("unexpected-digits"),e._fn("LatexForm",[e.string(r)])]):e.number(i)}}if(o.symbol){if(null===(n=o.symbolDefinition)||void 0===n?void 0:n.at)return e._fn("At",[o,s]);let t=null!==(a=s.string)&&void 0!==a?a:s.symbol;if(t||null!==s.asSmallInteger&&(t=s.asSmallInteger.toString()),t)return e.symbol(o.symbol+"_"+t)}return e._fn("Subscript",t)}},{name:"Subtract",domain:["Function","Number","Number","Number"],wikidata:"Q40754",complexity:1350,canonical:(e,t)=>0===t.length?e.symbol("Nothing"):1===t.length?Jv(t[0]):iy(e,[t[0],Jv(t[1])]),N:(e,t)=>{var i,r,n,a,o,s;const l=t[0],u=t[1];return l.complexValue||u.complexValue?e.number(e.complex(null!==(i=l.complexValue)&&void 0!==i?i:l.asFloat).sub(null!==(r=u.complexValue)&&void 0!==r?r:u.asFloat)):l.decimalValue||u.decimalValue?e.number(e.decimal(null!==(a=null!==(n=l.decimalValue)&&void 0!==n?n:l.asFloat)&&void 0!==a?a:NaN).sub(null!==(s=null!==(o=u.decimalValue)&&void 0!==o?o:u.asFloat)&&void 0!==s?s:NaN)):null!==l.asFloat&&null!==u.asFloat?e.number(l.asFloat-u.asFloat):void 0}}]},{symbols:[{name:"MachineEpsilon",domain:"RealNumber",constant:!0,real:!0,value:{num:Number.EPSILON.toString()}},{name:"Half",constant:!0,hold:!1,value:["Rational",1,2]},{name:"ImaginaryUnit",domain:"ImaginaryNumber",constant:!0,hold:!0,wikidata:"Q193796",imaginary:!0,value:["Complex",0,1]},{name:"ExponentialE",domain:"TranscendentalNumber",algebraic:!1,wikidata:"Q82435",constant:!0,hold:!0,real:!0,value:e=>yv(e)?e.DECIMAL_ONE.exp():Math.exp(1)},{name:"GoldenRatio",domain:"AlgebraicNumber",wikidata:"Q41690",constant:!0,algebraic:!0,hold:!1,value:["Divide",["Add",1,["Sqrt",5]],2]},{name:"CatalanConstant",domain:"RealNumber",algebraic:void 0,wikidata:"Q855282",constant:!0,value:{num:"0.91596559417721901505460351493238411077414937428167\n 21342664981196217630197762547694793565129261151062\n 48574422619196199579035898803325859059431594737481\n 15840699533202877331946051903872747816408786590902\n 47064841521630002287276409423882599577415088163974\n 70252482011560707644883807873370489900864775113225\n 99713434074854075532307685653357680958352602193823\n 23950800720680355761048235733942319149829836189977\n 06903640418086217941101917532743149978233976105512\n 24779530324875371878665828082360570225594194818097\n 53509711315712615804242723636439850017382875977976\n 53068370092980873887495610893659771940968726844441\n 66804621624339864838916280448281506273022742073884\n 31172218272190472255870531908685735423498539498309\n 91911596738846450861515249962423704374517773723517\n 75440708538464401321748392999947572446199754961975\n 87064007474870701490937678873045869979860644874974\n 64387206238513712392736304998503539223928787979063\n 36440323547845358519277777872709060830319943013323\n 16712476158709792455479119092126201854803963934243\n "}},{name:"EulerGamma",domain:"RealNumber",algebraic:void 0,wikidata:"Q273023",constant:!0,value:{num:"0.57721566490153286060651209008240243104215933593992359880576723488486772677766\n 467093694706329174674951463144724980708248096050401448654283622417399764492353\n 625350033374293733773767394279259525824709491600873520394816567085323315177661\n 152862119950150798479374508570574002992135478614669402960432542151905877553526\n 733139925401296742051375413954911168510280798423487758720503843109399736137255\n 306088933126760017247953783675927135157722610273492913940798430103417771778088\n 154957066107501016191663340152278935867965497252036212879226555953669628176388\n 792726801324310104765059637039473949576389065729679296010090151251959509222435\n 014093498712282479497471956469763185066761290638110518241974448678363808617494\n 551698927923018773910729457815543160050021828440960537724342032854783670151773\n 943987003023703395183286900015581939880427074115422278197165230110735658339673"}}]},{functions:[{name:"PreIncrement",domain:["Function","Number","Number"]},{name:"PreDecrement",domain:["Function","Number","Number"]}]}];function dy(e,t,i){if("simplify"!==i||t.isLiteral){if(null!==t.machineValue)return e.number(Math.abs(t.machineValue));if(t.decimalValue)return e.number(t.decimalValue.abs());if(t.complexValue)return e.number(t.complexValue.abs());const[r,n]=t.rationalValue;if(null===r||null===n)return;return e.number("N"===i?Math.abs(r/n):[Math.abs(r),n])}if(!t.isMissing)return t.isNonNegative?t:t.isNegative?e.negate(t):void 0}function py(e,t,i){if(t.isOne)return e.ONE;if(t.isZero)return e.ZERO;if("N"===i)return t.complexValue?e.number(t.complexValue.sqrt()):t.isNonNegative?t.decimalValue?e.number(t.decimalValue.sqrt()):null!==t.asFloat?e.number(Math.sqrt(t.asFloat)):void 0:bv(e)?e.number(e.complex(t.asFloat).sqrt()):e.NAN;if(null!==t.asSmallInteger){const[i,r]=Xg(t.asSmallInteger,2);if(1===r)return e.number(i);if(1!==i)return this._fn("Multiply",[i,e._fn("Sqrt",[e.box(r).canonical])])}}const my=[{symbols:[{name:"Missing",domain:"Anything"},{name:"Nothing",domain:"Nothing"}]},{functions:[{name:"KeyValuePair",domain:["Function","String","Anything",["Tuple","String","Anything"]],description:"A key/value pair",complexity:8200,canonical:(e,t)=>e.tuple(t)},{name:"Single",domain:["Function","Anything",["Tuple","Anything"]],description:"A tuple with a single element",complexity:8200,canonical:(e,t)=>e.tuple(t)},{name:"Pair",domain:["Function","Anything","Anything",["Tuple","Anything","Anything"]],description:"A tuple of two elements",complexity:8200,canonical:(e,t)=>e.tuple(t)},{name:"Triple",domain:["Function","Anything","Anything","Anything",["Tuple","Anything","Anything","Anything"]],description:"A tuple of three elements",complexity:8200,canonical:(e,t)=>e.tuple(t)},{name:"Tuple",domain:["Function",["Some","Anything"],["Tuple",["Some","Anything"]]],description:"A fixed number of heterogeneous elements",complexity:8200}]},{functions:[{name:"BaseForm",domain:["Function","Anything",["Optional","Integer"],"String"],description:"`BaseForm(expr, base=10)`",complexity:9e3,inert:!0},{name:"Delimiter",domain:(e,t)=>{if(!t[0])return"Nothing";const i=t[0].domain.domainExpression;return["Function",i,["Optional","String"],i]},complexity:9e3,inert:!0,canonical:(e,t)=>!t[0]||t[0].isMissing?e.symbol("Nothing"):t[0]},{name:"Error",domain:(e,t)=>{if(!t[0])return"Nothing";const i=t[0].domain.domainExpression;return["Function",i,["Optional","String"],["Optional","Expression"],i]},complexity:500,inert:!0,hold:"all",evaluate:(e,t)=>t[0].evaluate()},{name:"Style",domain:(e,t)=>{if(!t[0])return"Nothing";const i=t[0].domain.domainExpression;return["Function",i,["Optional",["Head","Dictionary"]],i]},complexity:9e3,inert:!0}]},{functions:[{name:"Apply",domain:"Function"},{name:"About",domain:"Function"},{name:"Block",domain:"Function"},{name:"Domain",domain:"Function"},{name:"Evaluate",domain:"Function",hold:"all",evaluate:(e,t)=>t[0].evaluate()},{name:"FromDigits",description:"`FromDigits(s, base=10)` return an integer representation of the string `s` in base `base`.",evaluate:(e,t)=>{const i=t[0];if(i.isMissing)return;if(!i.string)return e.error(e._fn("FromDigits",t),"Expected first argument as a string",["LatexForm",i.latex]);const r=t[1];if(r.isMissing&&e.number(Number.parseInt(i.string,10)),null===r.machineValue)return["Error",e._fn("FromDigits",t),{str:"Expected `base` as an integer between 2 and 36"},["LatexForm",r.latex]];const n=r.machineValue;if(n<2||n>36)return["Error",e._fn("FromDigits",t),{str:"Expected `base` as an integer between 2 and 36"},["LatexForm",r.latex]];const[a,o]=nv(i.string,n);return o?["Error",a,{str:"unexpected-digits"},["LatexForm",o]]:e.number(a)}},{name:"Head",domain:"Function",evaluate:(e,t)=>{const i=t[0];return"string"==typeof i.head?e.symbol(i.head):i.head}},{name:"Html",domain:["Function","Expression","String"],evaluate:(e,t)=>(t.length,e.string(""))},{name:"IntegerString",domain:["Function","Integer",["Optional","Integer"],"String"],description:"`IntegerString(n, base=10)` return a string representation of the integer `n` in base `base`.",evaluate:(e,t)=>{var i,r,n,a;const o=t[0];if(o.isMissing)return;const s=null!==(n=null!==(i=o.machineValue)&&void 0!==i?i:null===(r=o.decimalValue)||void 0===r?void 0:r.toNumber())&&void 0!==n?n:NaN;if(Number.isNaN(s)||!Number.isInteger(s))return void e.signal(e._fn("IntegerString",t),`Expected first argument as an integer. Got \\(${o.latex}$\\)`);const l=t[1];if(l.isMissing)return o.machineValue?e.string(Math.abs(o.machineValue).toString()):o.decimalValue?e.string(o.decimalValue.abs().toString()):e.string(Math.abs(Math.round(null!==(a=o.asFloat)&&void 0!==a?a:NaN)).toString());if(null===l.asSmallInteger)return void e.signal(e._fn("IntegerString",t),`Expected \`base\` as an integer between 2 and 36. Got \\(${l.latex}$\\)`);const u=l.asSmallInteger;if(!(u<2||u>36))return e.string(Math.abs(s).toString(u));e.signal(e._fn("IntegerString",t),"Expected `base` as an integer between 2 and 36. Got "+u)}},{name:"Lambda",domain:"Function",wikidata:"Q567612",hold:"all"},{name:"Latex",domain:"Function",evaluate:(e,t)=>0===t.length?e._fn("LatexString",[]):e._fn("LatexString",[e.string(Uf(t.map((e=>e.latex))))])},{name:"LatexString",domain:"Function",evaluate:(e,t)=>0===t.length?e._fn("LatexString",[]):e._fn("LatexString",[e.string(Uf(t.map((t=>e.serialize(t)))))])},{name:"LatexTokens",domain:"Function",evaluate:(e,t)=>0===t.length?e._fn("LatexString",[]):e._fn("LatexString",[e.string(Uf(t.map((t=>e.serialize(t)))))])},{name:"Parse",domain:"Function",evaluate:(e,t)=>{if(0===t.length)return e.symbol("Nothing");const i=Uf(t.map((t=>e.serialize(t))));return e.parse(i)}},{name:"String",domain:["Function",["Some","Anything"],"String"],threadable:!0,evaluate:(e,t)=>0===t.length?e.string(""):e.string(t.map((e=>{var t;return null!==(t=e.string)&&void 0!==t?t:`\\(${e.latex}$\\)`})).join(""))},{name:"Symbol",complexity:500,description:"Construct a new symbol with a name formed by concatenating the arguments",domain:["Function",["Some","Anything"],"Symbol"],threadable:!0,evaluate:(e,t)=>{if(0===t.length)return e.symbol("Nothing");const i=t.map((e=>{const t=e.symbol;if(null!==t)return t;const r=i.string;if(null!==r)return r;const n=i.smallIntegerValue;return null!==n?n.toString():""})).join("");return i.length>0?e.symbol(i):e.symbol("Nothing")}},{name:"SymbolName",domain:["Function","Anything","String"],evaluate:(e,t)=>t[0].symbol?e.string(t[0].symbol):e.symbol("Nothing")},{name:"Tail",domain:["Function","Expression",["List","Expression]"]],evaluate:(e,t)=>{var i;return e._fn("List",null!==(i=t[0].ops)&&void 0!==i?i:[])}},{name:"Timing",description:"`Timing(expr)` evaluates `expr` and return a `Pair` of the number of second elapsed for the evaluation, and the value of the evaluation",domain:["Function","Expression",["Tuple","Expression","Number"]],evaluate:(e,t)=>{var i;if(!t[1]||t[1].isMissing){const i=globalThis.performance.now(),r=t[0].evaluate(),n=1e3*(globalThis.performance.now()-i);return e.pair(e.number(n),r)}let r,n=Math.max(3,Math.round(null!==(i=t[1].asSmallInteger)&&void 0!==i?i:3)),a=[];for(;n>0;){const e=globalThis.performance.now();r=t[0].evaluate(),a.push(1e3*(globalThis.performance.now()-e)),n-=1}const o=Math.max(...a),s=Math.min(...a);a=a.filter((e=>e>s&&ee+t),0);return 0===l?e.pair(e.number(o),r):e.pair(e.number(l/a.length),r)}}]}],fy={symbols:[{name:"True",wikidata:"Q16751793",domain:"Boolean",constant:!0},{name:"False",wikidata:"Q5432619",domain:"Boolean",constant:!0},{name:"Maybe",wikidata:"Q781546",domain:"MaybeBoolean",constant:!0}],functions:[{name:"And",wikidata:"Q191081",domain:"LogicOperator",threadable:!0,associative:!0,commutative:!0,idempotent:!0,complexity:1e4,simplify:gy,evaluate:gy},{name:"Or",wikidata:"Q1651704",domain:"LogicOperator",threadable:!0,associative:!0,commutative:!0,idempotent:!0,complexity:1e4,simplify:vy,evaluate:vy},{name:"Not",wikidata:"Q190558",domain:"LogicOperator",involution:!0,complexity:10100,simplify:yy,evaluate:yy},{name:"Equivalent",wikidata:"Q220433",domain:"LogicOperator",complexity:10200,simplify:by,evaluate:by},{name:"Implies",wikidata:"Q7881229",domain:"LogicOperator",complexity:10200,simplify:wy,evaluate:wy},{name:"Exists",domain:"MaybeBoolean"}]};function gy(e,t){if(0===t.length)return e.symbol("True");const i=[];for(const r of t){if("False"===r.symbol)return e.symbol("False");if("True"!==r.symbol){let t=!1;for(const n of i)if(n.isSame(r))t=!0;else if("Not"===r.head&&r.op1.isSame(n)||"Not"===n.head&&n.op1.isSame(r))return e.symbol("False");t||i.push(r)}}return 0===i.length?e.symbol("True"):1===i.length?i[0]:e._fn("And",i)}function vy(e,t){if(0===t.length)return e.symbol("True");const i=[];for(const r of t){if("True"===r.symbol)return e.symbol("True");if("False"!==r.symbol){let t=!1;for(const n of i)if(n.isSame(r))t=!0;else if("Not"===r.head&&r.op1.isSame(n)||"Not"===n.head&&n.op1.isSame(r))return e.symbol("True");t||i.push(r)}}return 0===i.length?e.symbol("True"):1===i.length?i[0]:e._fn("Or",i)}function yy(e,t){const i=t[0].symbol;return"True"===i?e.symbol("False"):"False"===i?e.symbol("True"):"Maybe"===i?e.symbol("Maybe"):void 0}function by(e,t){const i=t[0].symbol,r=t[1].symbol;return"True"===i&&"True"===r||"False"===i&&"False"===r?e.symbol("True"):"True"===i&&"False"===r||"False"===i&&"True"===r?e.symbol("False"):"Maybe"===i||"Maybe"===r?e.symbol("Maybe"):void 0}function wy(e,t){const i=t[0].symbol,r=t[1].symbol;return"True"===i&&"True"===r||"False"===i&&"False"===r||"False"===i&&"True"===r?e.symbol("True"):"True"===i&&"False"===r?e.symbol("False"):"Maybe"===i||"Maybe"===r?e.symbol("Maybe"):void 0}const xy=[{symbols:[{name:"Degrees",domain:"RealNumber",constant:!0,value:["Divide","Pi",180]},{name:"Pi",domain:"TranscendentalNumber",algebraic:!1,constant:!0,hold:!0,wikidata:"Q167",value:e=>yv(e)?e.DECIMAL_PI:Math.PI}],functions:[{name:"Hypot",evaluate:["Sqrt",["Square","_1"],["Square","_2"]],domain:["Function","Number","Number","Number"]},{name:"Sin",domain:["Function","Number","Number"],complexity:5e3,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Sin",t[0]))&&void 0!==i?i:bv(e)?e.box(["Divide",["Subtract",["Exp",["Multiply","ImaginaryUnit",t[0]]],["Exp",["Multiply","ImaginaryUnit",["Negate",t[0]]]]],["Complex",0,2]]).canonical:void 0},evaluate:(e,t)=>{var i;return null!==(i=Ly(e,"Sin",t[0]))&&void 0!==i?i:bv(e)?e.box(["Divide",["Subtract",["Exp",["Multiply","ImaginaryUnit",t[0]]],["Exp",["Multiply","ImaginaryUnit",["Negate",t[0]]]]],["Complex",0,2]]).canonical:void 0},N:(e,t)=>t[0].decimalValue?e.number(e.chop(t[0].decimalValue.sin())):t[0].complexValue?e.number(t[0].complexValue.sin()):null!==t[0].asFloat?e.number(Math.sin(t[0].asFloat)):void 0}]},{functions:[{name:"Arctan",wikidata:"Q2257242",domain:["Function","Number","ExtendedRealNumber"],complexity:5200,simplify:(e,t)=>Ly(e,"Arctan",t[0]),N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.atan()):t[0].complexValue?e.number(t[0].complexValue.atan()):null!==t[0].asFloat?e.number(Math.atan(t[0].asFloat)):void 0},{name:"Arctan2",wikidata:"Q776598",domain:["Function","Number","Number","Number"],complexity:5200,N:(e,t)=>t[0].decimalValue&&t[1].decimalValue?e.number(If.exports.Decimal.atan2(t[0].decimalValue,t[1].decimalValue)):null!==t[0].asFloat&&null!==t[1].asFloat?e.number(Math.atan2(t[0].asFloat,t[1].asFloat)):void 0},{name:"Cos",domain:["Function","Number","Number"],complexity:5050,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Cos",t[0]))&&void 0!==i?i:e.box(["Sin",["Add",t[0],["Multiply","Half","Pi"]]]).canonical},evaluate:["Sin",["Add","_1",["Multiply","Half","Pi"]]],N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.cos()):t[0].complexValue?e.number(t[0].complexValue.cos()):null!==t[0].asFloat?e.number(Math.cos(t[0].asFloat)):void 0},{name:"Tan",domain:["Function","Number","Number"],complexity:5100,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Tan",t[0]))&&void 0!==i?i:e.box(["Divide",["Sin",t[0]],["Cos",t[0]]]).canonical},evaluate:["Divide",["Sin","_1"],["Cos","_1"]],N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.tan()):t[0].complexValue?e.number(t[0].complexValue.tan()):null!==t[0].asFloat?e.number(Math.tan(t[0].asFloat)):void 0}]},{functions:[{name:"Arcosh",domain:["Function","Number","Number"],complexity:6200,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Arcoshh",t[0]))&&void 0!==i?i:e.box(["Ln",["Add",t[0],["Sqrt",["Subtract",["Square",t[0]],1]]]]).canonical},evaluate:["Ln",["Add","_1",["Sqrt",["Subtract",["Square","_1"],1]]]],N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.acosh()):t[0].complexValue?e.number(t[0].complexValue.acosh()):null!==t[0].asFloat?e.number(Math.acosh(t[0].asFloat)):void 0},{name:"Arcsin",domain:["Function","Number","Number"],complexity:5500,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Arcsin",t[0]))&&void 0!==i?i:e.box(["Multiply",2,["Arctan2",t[0],["Add",1,["Sqrt",["Subtract",1,["Square",t[0]]]]]]]).canonical},evaluate:["Multiply",2,["Arctan2","_1",["Add",1,["Sqrt",["Subtract",1,["Square","_1"]]]]]],N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.asin()):t[0].complexValue?e.number(t[0].complexValue.asin()):null!==t[0].asFloat?e.number(Math.asin(t[0].asFloat)):void 0},{name:"Arsinh",domain:["Function","Number","Number"],complexity:6100,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Arsinh",t[0]))&&void 0!==i?i:e.box(["Ln",["Add",t[0],["Sqrt",["Add",["Square",t[0]],1]]]]).canonical},evaluate:["Ln",["Add","_1",["Sqrt",["Add",["Square","_1"],1]]]],N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.asinh()):t[0].complexValue?e.number(t[0].complexValue.asinh()):null!==t[0].asFloat?e.number(Math.asinh(t[0].asFloat)):void 0},{name:"Artanh",domain:["Function","Number","Number"],complexity:6300,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Artanh",t[0]))&&void 0!==i?i:e.box(["Multiply","Half",["Ln",["Divide",["Add",1,t[0]],["Subtract",1,t[0]]]]]).canonical},evaluate:["Multiply","Half",["Ln",["Divide",["Add",1,"_1"],["Subtract",1,"_1"]]]],N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.atanh()):t[0].complexValue?e.number(t[0].complexValue.atanh()):null!==t[0].asFloat?e.number(Math.atanh(t[0].asFloat)):void 0},{name:"Cosh",domain:["Function","Number","Number"],complexity:6050,simplify:(e,t)=>Ly(e,"Cosh",t[0]),evaluate:["Multiply","Half",["Add",["Exp","_1"],["Exp",["Negate","_1"]]]],N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.cosh()):t[0].complexValue?e.number(t[0].complexValue.cosh()):null!==t[0].asFloat?e.number(Math.cosh(t[0].asFloat)):void 0},{name:"Cot",domain:["Function","Number","Number"],complexity:5600,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Cot",t[0]))&&void 0!==i?i:e.box(["Divide",["Cos",t[0]],["Sin",t[0]]]).canonical},evaluate:["Divide",["Cos","_1"],["Sin","_1"]],N:(e,t)=>t[0].decimalValue?e.number(e.DECIMAL_ONE.div(t[0].decimalValue.tan())):t[0].complexValue?e.number(t[0].complexValue.tan().inverse()):null!==t[0].asFloat?e.number(1/Math.tan(t[0].asFloat)):void 0},{name:"Csc",description:"Cosecant",domain:["Function","Number","Number"],complexity:5600,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Csc",t[0]))&&void 0!==i?i:e.box(["Divide",1,["Sin",t[0]]]).canonical},evaluate:["Divide",1,["Sin","_1"]],N:(e,t)=>t[0].decimalValue?e.number(e.DECIMAL_ONE.div(t[0].decimalValue.sin())):t[0].complexValue?e.number(t[0].complexValue.sin().inverse()):null!==t[0].asFloat?e.number(1/Math.sin(t[0].asFloat)):void 0},{name:"Haversine",wikidata:"Q2528380",domain:["Function","ExtendedRealNumber","RealNumber"],evaluate:["Divide",["Subtract",1,["Cos","_1"]],2]},{name:"InverseHaversine",domain:["Function","ExtendedRealNumber","RealNumber"],evaluate:["Multiply",2,["Arcsin",["Sqrt","_1"]]]},{name:"Sec",description:"Secant, inverse of cosine",domain:["Function","Number","Number"],complexity:5500,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Sec",t[0]))&&void 0!==i?i:e.box(["Divide",1,["Cos",t[0]]]).canonical},evaluate:["Divide",1,["Cos","_1"]],N:(e,t)=>t[0].decimalValue?e.number(e.DECIMAL_ONE.div(t[0].decimalValue.cos())):t[0].complexValue?e.number(t[0].complexValue.cos().inverse()):null!==t[0].asFloat?e.number(1/Math.cos(t[0].asFloat)):void 0},{name:"Sinh",domain:["Function","Number","Number"],complexity:6e3,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Sinh",t[0]))&&void 0!==i?i:e.box(["Multiply","Half",["Subtract",["Exp",t[0]],["Exp",["Negate",t[0]]]]]).canonical},evaluate:["Multiply","Half",["Subtract",["Exp","_1"],["Exp",["Negate","_1"]]]]}]},{functions:[{name:"Csch",domain:["Function","Number","ExtendedRealNumber"],complexity:6200,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Csch",t[0]))&&void 0!==i?i:e.box(["Divide",1,["Sinh",t[0]]]).canonical},evaluate:["Divide",1,["Sinh","_1"]],N:(e,t)=>t[0].decimalValue?e.number(e.DECIMAL_ONE.div(t[0].decimalValue.sinh())):t[0].complexValue?e.number(t[0].complexValue.sinh().inverse()):null!==t[0].asFloat?e.number(1/Math.sinh(t[0].asFloat)):void 0},{name:"Sech",domain:["Function","Number","Number"],complexity:6200,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Sech",t[0]))&&void 0!==i?i:e.box(["Divide",1,["Cosh",t[0]]]).canonical},evaluate:["Divide",1,["Cosh","_1"]],N:(e,t)=>t[0].decimalValue?e.number(e.DECIMAL_ONE.div(t[0].decimalValue.cosh())):t[0].complexValue?e.number(t[0].complexValue.cosh().inverse()):null!==t[0].asFloat?e.number(1/Math.cosh(t[0].asFloat)):void 0},{name:"Tanh",domain:["Function","Number","Number"],complexity:6200,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Tanh",t[0]))&&void 0!==i?i:e.box(["Divide",["Sinh",t[0]],["Cosh",t[0]]]).canonical},evaluate:["Divide",["Sinh","_1"],["Cosh","_1"]],N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.tanh()):t[0].complexValue?e.number(t[0].complexValue.tanh()):null!==t[0].asFloat?e.number(Math.tanh(t[0].asFloat)):void 0}]},{functions:[{name:"Arccos",domain:["Function","Number","ExtendedRealNumber"],complexity:5550,evaluate:["Subtract",["Divide","Pi",2],["Arcsin","_1"]],simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Arccos",t[0]))&&void 0!==i?i:e.box(["Subtract",["Divide","Pi",2],["Arcsin",t[0]]]).canonical},N:(e,t)=>t[0].decimalValue?e.number(t[0].decimalValue.acos()):t[0].complexValue?e.number(t[0].complexValue.acos()):null!==t[0].asFloat?e.number(Math.acos(t[0].asFloat)):void 0},{name:"Coth",domain:["Function","Number","Number"],complexity:6300,simplify:(e,t)=>{var i;return null!==(i=Ly(e,"Coth",t[0]))&&void 0!==i?i:e.box(["Divide",1,["Tanh",t[0]]]).canonical},evaluate:["Divide",1,["Tanh","_1"]],N:(e,t)=>t[0].decimalValue?e.number(e.DECIMAL_ONE.div(t[0].decimalValue.tanh())):t[0].complexValue?e.number(t[0].complexValue.tanh().inverse()):null!==t[0].asFloat?e.number(1/Math.tanh(t[0].asFloat)):void 0},{name:"InverseFunction",domain:"Function",simplify:(e,t)=>Cy(e,t[0]),evaluate:(e,t)=>Cy(e,t[0])}]}],Ay=["Sqrt",2],ky=["Sqrt",3],Sy=["Sqrt",5],My=["Sqrt",6],Ny=[[[0,1],{Sin:0,Cos:1,Tan:0,Cot:NaN,Sec:1,Csc:NaN}],[[1,12],{Sin:["Divide",["Subtract",My,Ay],4],Cos:["Divide",["Add",My,Ay],4],Tan:["Subtract",2,ky],Cot:["Add",2,ky],Sec:["Subtract",My,Ay],Csc:["Add",My,Ay]}],[[1,10],{Sin:["Divide",["Subtract",Sy,1],4],Cos:["Divide",["Sqrt",["Add",10,["Multiply",2,Sy]]],4],Tan:["Divide",["Sqrt",["Subtract",25,["Multiply",10,Sy]]],4],Cot:["Sqrt",["Add",5,["Multiply",2,Sy]]],Sec:["Divide",["Sqrt",["Subtract",50,["Multiply",10,Sy]]],5],Csc:["Add",1,Sy]}],[[1,8],{Sin:"$\\frac\\sqrt{2-\\sqrt2}{2}$",Cos:"$\\frac {\\sqrt {2+{\\sqrt {2}}}}{2}$",Tan:"$\\sqrt{2} - 1$",Cot:"$\\sqrt{2} + 1$",Sec:"$\\sqrt{ 4 - 2\\sqrt{2}$",Csc:"$\\sqrt{ 4 + 2\\sqrt{2}$"}],[[1,6],{Sin:"$\\frac{1}{2}$",Cos:"$\\frac{\\sqrt{3}}{2}$",Tan:"$\\frac{\\sqrt{3}}{3}$",Cot:"$\\frac{2\\sqrt{3}}{3}$",Sec:"$\\sqrt{3}$",Csc:2}],[[1,5],{Sin:"$\\frac{\\sqrt{10- 2\\sqrt{5}}} {4}$",Cos:"$\\frac{1+ \\sqrt{5}} {4}$",Tan:"$\\sqrt{5-2\\sqrt5}$",Cot:"$\\frac{\\sqrt{25+10\\sqrt5}} {5}$",Sec:"$\\sqrt{5} - 1$",Csc:"$\\frac{\\sqrt{50+10\\sqrt{5}}} {5}$"}],[[1,4],{Sin:["Divide",Ay,2],Cos:["Divide",Ay,2],Tan:1,Cot:1,Sec:Ay,Csc:Ay}],[[3,10],{Sin:"$\\frac{1+ \\sqrt{5}} {4}$",Cos:"$\\frac{\\sqrt{10- 2\\sqrt{5}}} {4}$",Tan:"$\\frac{\\sqrt{25+10\\sqrt5}} {5}$",Cot:"$\\sqrt{5-2\\sqrt5}$",Sec:"$$",Csc:"$\\frac{\\sqrt{50+10\\sqrt{5}}} {5}$"}],[[1,3],{Sin:["Divide",ky,2],Cos:"Half",Tan:ky,Cot:["Divide",ky,3],Sec:2,Csc:["Divide",["Multiply",2,ky],3]}],[[3,8],{Sin:"$\\frac{ \\sqrt{2 + \\sqrt{2}} } {2}$",Cos:"$\\frac{ \\sqrt{2 - \\sqrt{2}} } {2}$",Tan:"$\\sqrt{2} + 1$",Cot:"$\\sqrt{2} - 1$",Sec:"$\\sqrt{ 4 + 2 \\sqrt{2} }$",Csc:"$\\sqrt{ 4 - 2 \\sqrt{2} }$"}],[[2,5],{Sin:"$\\frac{\\sqrt{10+ 2\\sqrt{5}}} {4}$",Cos:"$\\frac{\\sqrt{5}-1} {4}$",Tan:"$\\sqrt{5+2\\sqrt{5}}$",Cot:"$\\frac{\\sqrt{25-10\\sqrt{5}}} {5}$",Sec:"$1 + \\sqrt{5}$",Csc:"$\\frac{\\sqrt{50-10\\sqrt{5}}} {5}$"}],[[5,12],{Sin:"$\\frac{\\sqrt{6} + \\sqrt{2}} {4}$",Cos:"$\\frac{ \\sqrt{6} - \\sqrt{2}} {4}$",Tan:"$2+\\sqrt{3}$",Cot:"$2-\\sqrt{3}$",Sec:"$\\sqrt{6}+\\sqrt{2}$",Csc:"$\\sqrt{6} - \\sqrt{2}$"}],[[1,2],{Sin:1,Cos:0,Tan:NaN,Cot:0,Sec:NaN,Csc:1}]],zy={Sin:[[1,"Sin"],[1,"Cos"],[-1,"Sin"],[-1,"Cos"]],Cos:[[1,"Cos"],[-1,"Sin"],[-1,"Cos"],[1,"Sin"]],Sec:[[1,"Sec"],[-1,"Csc"],[-1,"Sec"],[1,"Csc"]],Csc:[[1,"Csc"],[1,"Sec"],[-1,"Csc"],[-1,"Sec"]],Tan:[[1,"Tan"],[-1,"Cot"],[1,"Tan"],[-1,"Cot"]],Cot:[[1,"Cot"],[-1,"Tan"],[1,"Cot"],[-1,"Tan"]]};function Ly(e,t,i){var r;if(!i||i.isMissing)return;const n=e.cache("constructible-trigonometric-values",(()=>{var t;const i=[];for(const[r,n]of Ny){const a={};for(const i of Object.keys(n))a[i]=(null!==(t=e.parse(fv(n[i])))&&void 0!==t?t:e.box(n[i])).canonical;i.push([r,a])}return i}),(e=>{for(const[t,i]of e)for(const e of Object.values(i))e._purge();return e}));if(!(i=null!==(r=i.numericValue)&&void 0!==r?r:i).isLiteral)return;let a=i.asFloat;if(null===a)return;a%=2*Math.PI;const o="Cos"!==t&&"Sec"!==t?Math.sign(a):1;a=Math.abs(a);const s=Math.floor(2*a/Math.PI);let l;a%=Math.PI/2,[l,t]=zy[t][s],l*=o;for(const[[u,c],h]of n)if(0===e.chop(a-Math.PI*u/c))return l<0?Jv(h[t]):h[t]}function Cy(e,t){const i=t.op1.head;if("string"!=typeof i)return t;const r={Sin:"Arcsin",Cos:"Arccos",Tan:"Arctan",Sec:"Arcsec",Csc:" Arccsc",Sinh:"Arsinh",Cosh:"Arcosh",Tanh:"Artanh",Sech:"Arcsech",Csch:"Arcsch",Arcosh:"Cosh",Arcos:"Cos",Arccsc:"Csc",Arcsch:"Csch",Arcsec:"Sec",Arcsin:"Sin",Arsinh:"Sinh",Arctan:"Tan",Artanh:"Tanh"}[i];return r?e._fn(r,[t.op1.op1]):t}function Ey(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>void 0!==t)))}function _y(e){const t={...e};return e.zero||e.one||e.negativeOne?(t.number=!0,t.integer=!0,t.rational=!0,t.algebraic=!0,t.real=!0,t.extendedReal=!0,t.complex=!0,t.extendedComplex=!0,t.imaginary=!1,t.positive=!1,t.nonPositive=!0,t.negative=!1,t.nonNegative=!0,t.zero=e.zero,t.notZero=!e.zero,t.one=e.one,t.negativeOne=e.negativeOne,t.negativeOne=!1,t.infinity=!1,t.NaN=!1,t.finite=!0,t.even=e.one,t.odd=!e.one,t.prime=!1,t.composite=!1,t):(!0===t.notZero&&(t.imaginary||(t.real=!0),t.zero=!1),(t.positive||t.nonNegative)&&(t.negativeOne=!1),t.positive?(t.nonPositive=!1,t.negative=!1,t.nonNegative=!0):t.nonPositive?(t.positive=!1,t.negative=t.notZero,t.nonNegative=!t.zero):t.negative?(t.positive=!1,t.nonPositive=t.notZero,t.nonNegative=!1):t.nonNegative&&(t.positive=t.notZero,t.nonPositive=!t.zero,t.negative=!1),(t.positive||t.negative||t.nonPositive||t.nonNegative)&&(t.number=!0,t.finite?t.real=!0:t.finite||(t.complex=!0),t.imaginary=!1),t.infinity&&(t.finite=!1,t.NaN=!1),t.finite&&(t.number=!0,t.complex=!0,t.infinity=!1,t.NaN=!1),e.even&&(t.odd=!1),e.odd&&(t.even=!1),t.integer&&(t.rational=!0),t.rational&&(t.algebraic=!0),t.algebraic&&(t.real=!0),t.extendedReal&&(t.real=!0),t.real&&(t.complex=!0),t.imaginary&&(t.complex=!0),t.extendedComplex&&(t.complex=!0),t.complex&&(t.number=!0),t.real&&t.infinity&&(t.extendedReal=!0),t.complex&&t.infinity&&(t.extendedComplex=!0),(t.even||t.infinity||t.NaN||t.negative||t.imaginary||!1===t.integer)&&(t.prime=!1),t.number&&t.prime&&(t.composite=!1),t)}function Ty(e){if(!e)return{};const t=e.domainExpression,i={};return e.isSubdomainOf("Number")?(i.number=!0,"Integer"===t&&(i.integer=!0),"RationalNumber"===t&&(i.rational=!0),"AlgebraicNumber"===t&&(i.algebraic=!0),"TranscendentalNumber"===t&&(i.algebraic=!1,i.real=!0),"ExtendedRealNumber"===t&&(i.extendedReal=!0),"RealNumber"===t&&(i.real=!0),"ImaginaryNumber"===t&&(i.imaginary=!0),"ExtendedComplexNumber"===t&&(i.extendedComplex=!0),"ComplexNumber"===t&&(i.complex=!0)):(i.number=!1,i.integer=!1,i.rational=!1,i.algebraic=!1,i.real=!1,i.extendedReal=!1,i.complex=!1,i.extendedComplex=!1,i.imaginary=!1,i.positive=!1,i.nonPositive=!1,i.negative=!1,i.nonNegative=!1,i.zero=!1,i.notZero=!1,i.one=!1,i.negativeOne=!1,i.infinity=!1,i.NaN=!1,i.odd=!1,i.even=!1,i.prime=!1,i.composite=!1),Ey(_y(i))}function By(e){return Ey({number:(e=e.canonical).isNumber,integer:e.isInteger,rational:e.isRational,algebraic:e.isAlgebraic,real:e.isReal,extendedReal:e.isExtendedReal,complex:e.isComplex,extendedComplex:e.isExtendedComplex,imaginary:e.isImaginary,positive:e.isPositive,nonPositive:e.isNonPositive,negative:e.isNegative,nonNegative:e.isNonNegative,zero:e.isZero,notZero:e.isNotZero,one:e.isOne,negativeOne:e.isNegativeOne,infinity:e.isInfinity,NaN:e.isNaN,finite:e.isFinite,even:e.isEven,odd:e.isOdd,prime:e.isPrime,composite:e.isComposite})}class Iy{constructor(e,t){var i,r;this._engine=e,this._def=t,this.scope=e.context,this.name=t.name,this.constant=null!==(i=t.constant)&&void 0!==i&&i,this.hold=null===(r=t.hold)||void 0===r||r,this._purge()}_purge(){var e,t,i,r;this._value=null===(e=this._value)||void 0===e?void 0:e._purge();const n=this._def,a=this._engine,o=Ey({description:n.description,wikidata:n.wikidata,number:n.number,integer:n.integer,rational:n.rational,algebraic:n.algebraic,real:n.real,extendedReal:n.extendedReal,complex:n.complex,zero:n.zero,notZero:n.notZero,one:n.one,negativeOne:n.negativeOne,infinity:n.infinity,NaN:n.NaN,finite:n.finite,even:n.even,odd:n.odd,prime:n.prime,composite:n.composite});if("value"in n&&"number"==typeof n.value){const e=a.number(n.value);let t;const i=n.domain?a.domain(n.domain):void 0;return t=i&&e.valueDomain.isSubdomainOf(i)?i:e.valueDomain,this._value=e,this._domain=t,this.setProps(By(e)),this.setProps(Ty(t)),void this.setProps(o)}let s,l;if(mv(n.value)?s=a.parse(n.value):"function"==typeof n.value?s=a.box(null!==(t=n.value(a))&&void 0!==t?t:"Undefined"):n.value&&(s=a.box(n.value)),!s&&!1===n.hold)throw Error(`Symbol definition "${n.name}": Expected a value "hold=false" `);s=null===s||void 0===s?void 0:s.canonical;const u=n.domain?a.domain(n.domain):void 0;if(l=!u||s&&!s.valueDomain.isSubdomainOf(u)?null!==(r=null!==(i=null===s||void 0===s?void 0:s.valueDomain)&&void 0!==i?i:a.defaultDomain)&&void 0!==r?r:a.domain("Anything"):u,!s)return this._value=void 0,this._domain=l,this.setProps(Ty(l)),void this.setProps(o);this._value=s,this._domain=l,this.setProps(By(s)),this.setProps(Ty(l)),this.setProps(o)}get value(){return this._value}set value(e){if(this.constant)throw Error(`The value of the constant "${this.name}" cannot be changed`);"number"==typeof e&&(e=this._engine.box(e)),this._value=e,e&&this.setProps(By(e))}get domain(){return this._domain}set domain(e){var t;if(!e)return void(this._domain=void 0);e=this._engine.domain(e);const i=null===(t=this.value)||void 0===t?void 0:t.valueDomain;i&&!i.isSubdomainOf(e)&&(e=i),this._domain=e,this.setProps(Ty(e))}updateFlags(e){this.setProps(_y(e))}setProps(e){e.wikidata&&(this.wikidata=e.wikidata),e.description&&(this.description=e.description),void 0!==e.number&&(this._number=e.number),void 0!==e.integer&&(this._integer=e.integer),void 0!==e.rational&&(this._rational=e.rational),void 0!==e.algebraic&&(this._algebraic=e.algebraic),void 0!==e.real&&(this._real=e.real),void 0!==e.extendedReal&&(this._extendedReal=e.extendedReal),void 0!==e.complex&&(this._complex=e.complex),void 0!==e.extendedComplex&&(this._extendedComplex=e.extendedComplex),void 0!==e.imaginary&&(this._imaginary=e.imaginary),void 0!==e.positive&&(this._positive=e.positive),void 0!==e.nonPositive&&(this._nonPositive=e.nonPositive),void 0!==e.negative&&(this._negative=e.negative),void 0!==e.nonNegative&&(this._nonNegative=e.nonNegative),void 0!==e.zero&&(this._zero=e.zero),void 0!==e.notZero&&(this._notZero=e.notZero),void 0!==e.one&&(this._one=e.one),void 0!==e.negativeOne&&(this._negativeOne=e.negativeOne),void 0!==e.infinity&&(this._infinity=e.infinity),void 0!==e.finite&&(this._finite=e.finite),void 0!==e.NaN&&(this._NaN=e.NaN),void 0!==e.even&&(this._even=e.even),void 0!==e.odd&&(this._odd=e.odd),void 0!==e.prime&&(this._prime=e.prime),void 0!==e.composite&&(this._composite=e.composite)}get number(){return this._number}set number(e){this.updateFlags({number:e})}get integer(){return this._integer}set integer(e){this.updateFlags({integer:e})}get rational(){return this._rational}set rational(e){this.updateFlags({rational:e})}get algebraic(){return this._algebraic}set algebraic(e){this.updateFlags({algebraic:e})}get real(){return this._real}set real(e){this.updateFlags({real:e})}get extendedReal(){return this._extendedReal}set extendedReal(e){this.updateFlags({extendedReal:e})}get complex(){return this._complex}set complex(e){this.updateFlags({complex:e})}get extendedComplex(){return this._extendedComplex}set extendedComplex(e){this.updateFlags({extendedComplex:e})}get imaginary(){return this._imaginary}set imaginary(e){this.updateFlags({imaginary:e})}get positive(){return this._positive}set positive(e){this.updateFlags({positive:e})}get nonPositive(){return this._nonPositive}set nonPositive(e){this.updateFlags({nonPositive:e})}get negative(){return this._negative}set negative(e){this.updateFlags({negative:e})}get nonNegative(){return this._nonNegative}set nonNegative(e){this.updateFlags({nonNegative:e})}get zero(){return this._zero}set zero(e){this.updateFlags({zero:e})}get notZero(){return this._notZero}set notZero(e){this.updateFlags({notZero:e})}get one(){return this._one}set one(e){this.updateFlags({one:e})}get negativeOne(){return this._negativeOne}set negativeOne(e){this.updateFlags({negativeOne:e})}get infinity(){return this._infinity}set infinity(e){this.updateFlags({infinity:e})}get finite(){return this._finite}set finite(e){this.updateFlags({finite:e})}get NaN(){return this._NaN}set NaN(e){this.updateFlags({NaN:e})}get even(){return this._even}set even(e){this.updateFlags({even:e})}get odd(){return this._odd}set odd(e){this.updateFlags({odd:e})}get prime(){var e;if(void 0===this._prime&&(null===(e=this._value)||void 0===e?void 0:e.isNumber))if(!this._value.isInteger||this._value.isNonPositive)this._prime=!1,this._composite=!1;else{const e=this._value.asFloat;null!==e?(this._prime=Hv(e),this._composite=!this._prime):(this._prime=void 0,this._composite=void 0)}return this._prime}set prime(e){this.updateFlags({prime:e})}get composite(){if(void 0===this._composite){const e=this.prime;this._composite=void 0===e?void 0:!e}return this._composite}set composite(e){this.updateFlags({composite:e})}}class qy{constructor(e,t){var i,r,n,a,o,s,l,u,c,h;const d=t.domain?"function"==typeof t.domain?t.domain:e.domain(t.domain):e.domain("Function"),p=null!==(i=t.hold)&&void 0!==i?i:"none",m=null!==(r=t.idempotent)&&void 0!==r&&r,f=null!==(n=t.involution)&&void 0!==n&&n;if(m&&f)throw Error(`Function Definition "${t.name}": the 'idempotent' and 'involution' flags are mutually exclusive in function `);this.name=t.name,this.description=t.description,this.wikidata=t.wikidata,this.scope=e.context,this.threadable=null!==(a=t.threadable)&&void 0!==a&&a,this.associative=null!==(o=t.associative)&&void 0!==o&&o,this.commutative=null!==(s=t.commutative)&&void 0!==s&&s,this.idempotent=m,this.involution=f,this.inert=null!==(l=t.inert)&&void 0!==l&&l,this.pure=null===(u=t.pure)||void 0===u||u,this.complexity=null!==(c=t.complexity)&&void 0!==c?c:1e5,this.hold=p,this.sequenceHold=null!==(h=t.sequenceHold)&&void 0!==h&&h,this.range=t.range,this.domain=d,this.canonical=t.canonical,this.simplify=t.simplify,this.evaluate=t.evaluate?"function"==typeof t.evaluate?t.evaluate:e.box(t.evaluate).canonical:void 0,this.N=t.N,this.evalDimension=t.evalDimension,this.sgn=t.sgn,this.compile=t.compile}_purge(){}}function Dy(e,t){return new qy(e,t)}function Oy(e,t){const i=e.engine;return"Negate"===e.head&&"Negate"===t.head?Oy(e.op1,t.op1):"Negate"===e.head?Jv(Oy(e.op1,t)):"Negate"===t.head?Jv(Oy(e,t.op1)):"Add"===e.head?i.add(e.ops.map((e=>Oy(e,t)))):"Add"===t.head?i.add(t.ops.map((t=>Oy(e,t)))):i.mul([e,t])}function Ry(e,t){if(1===t)return e;const i=Oy(e,e);return 2===t?i:t%2==0?Ry(i,t/2):Oy(Ry(i,Math.round(t/2)-1),e)}function Fy(e="all"){if("all"===e)return Fy(["domains","core","collections","algebra","arithmetic","calculus","combinatorics","dimensions","linear-algebra","logic","numeric","other","physics","polynomials","relop","statistics","trigonometry","units"]);const t=[];for(const i of e){const e=Py[i];e&&Array.isArray(e)?t.push(...e):e&&t.push(e)}return t}const Py={arithmetic:hy,core:my,collections:[{symbols:[{name:"EmptySet",domain:"Set",constant:!0,wikidata:"Q226183"}],functions:[{name:"Element",domain:"Predicate",complexity:11200},{name:"NotElement",domain:"Predicate",complexity:11200,canonical:(e,t)=>e.fn("Not",[e.fn("Element",t)])},{name:"Subset",domain:"Predicate",complexity:11200},{name:"NotSubset",domain:"Predicate",complexity:11200,canonical:(e,t)=>e.fn("Not",[e.fn("Subset",t)])},{name:"Superset",domain:"Predicate",complexity:11200},{name:"SupersetEqual",domain:"Predicate",complexity:11200},{name:"NotSuperset",domain:"Predicate",complexity:11200,canonical:(e,t)=>e.fn("Not",[e.fn("Superset",t)])},{name:"NotSupersetEqual",domain:"Predicate",complexity:11200,canonical:(e,t)=>e.fn("Not",[e.fn("SupersetEqual",t)])},{name:"SubsetEqual",domain:"Predicate",complexity:11200},{name:"NotSubsetNotEqual",domain:"Predicate",complexity:11200,canonical:(e,t)=>e.fn("Not",[e.fn("SubsetEqual",t)])},{name:"CartesianProduct",domain:["Function",["Some","Set"],"Set"],wikidata:"Q173740"},{name:"Complement",domain:["Function","Set","Set"],wikidata:"Q242767"},{name:"Intersection",domain:["Function",["Some","Set"],"Set"],wikidata:"Q185837",threadable:!0,associative:!0,commutative:!0,involution:!0,evaluate:function(e,t){return e.symbol("EmptySet")}},{name:"Union",domain:["Function",["Some","Set"],"Set"],wikidata:"Q185359",threadable:!0,associative:!0,commutative:!0,involution:!0,evaluate:function(e,t){return e.symbol("False")}},{name:"Set",domain:["Function",["Some","Anything"],"Set"]},{name:"SetMinus",domain:["Function","Set","Expresison","Set"],wikidata:"Q18192442",evaluate:function(e,t){return e.symbol("EmptySet")}},{name:"SymmetricDifference",domain:["Function",["Some","Set"],"Set"],wikidata:"Q1147242"}]},{functions:[{name:"Sequence"}]}],logic:fy,relop:{functions:[{name:"Equal",domain:"RelationalOperator",commutative:!0,complexity:11e3,evaluate:(e,t)=>{if(t.length<2)return e.symbol("True");let i;for(const r of t)if(i){if(!1===i.isEqual(r))return e.symbol("False")}else i=r;return e.symbol("True")}},{name:"NotEqual",wikidata:"Q28113351",commutative:!0,complexity:11e3,domain:"RelationalOperator",evaluate:(e,t)=>{if(t.length<2)return e.symbol("False");let i;for(const r of t)if(i){if(!0===i.isEqual(r))return e.symbol("False")}else i=r;return e.symbol("True")}},{name:"Less",complexity:11e3,domain:"RelationalOperator",evaluate:(e,t)=>{if(t.length<2)return e.symbol("True");let i;for(const r of t){if(!r.isNumber)return;if(i){const t=e.fn("Subtract",[r,i]).N().sgn;if(null==t)return;if(t<=0)return e.symbol("False");i=r}else i=r}return e.symbol("True")}},{name:"NotLess",complexity:11e3,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("Less",t)])},{name:"Greater",complexity:11e3,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Less",t.reverse()),evaluate:(e,t)=>{if(t.length<2)return e.symbol("True");let i;for(const r of t){if(!r.isNumber)return;if(i){const t=e.fn("Subtract",[r,i]).N().sgn;if(null==t)return;if(t>=0)return e.symbol("False");i=r}else i=r}return e.symbol("True")}},{name:"NotGreater",complexity:11e3,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("Greater",t)])},{name:"LessEqual",complexity:11e3,domain:"RelationalOperator",evaluate:(e,t)=>{if(t.length<2)return e.symbol("True");let i;for(const r of t){if(!r.isNumber)return;if(i){const t=e.fn("Subtract",[r,i]).N().sgn;if(null==t)return;if(t<0)return e.symbol("False");i=r}else i=r}return e.symbol("True")}},{name:"NotLessNotEqual",complexity:11e3,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("LessEqual",t)])},{name:"GreaterEqual",complexity:11e3,domain:"RelationalOperator",canonical:(e,t)=>e._fn("LessEqual",t.reverse()),evaluate:(e,t)=>{if(t.length<2)return e.symbol("True");let i;for(const r of t){if(!r.isNumber)return;if(i){const t=e.fn("Subtract",[r,i]).N().sgn;if(null==t)return;if(t>0)return e.symbol("False");i=r}else i=r}return e.symbol("True")}},{name:"NotGreaterNotEqual",complexity:11e3,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("GreaterEqual",t)])},{name:"TildeFullEqual",description:"Indicate isomorphism, congruence and homotopic equivalence",domain:"RelationalOperator"},{name:"NotTildeFullEqual",complexity:11100,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("TildeFullEqual",t)])},{name:"TildeEqual",description:"Approximately or asymptotically equal",domain:"RelationalOperator",complexity:11e3},{name:"NotTildeEqual",complexity:11100,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("TildeEqual",t)])},{name:"Approx",complexity:11100,domain:"RelationalOperator"},{name:"NotApprox",complexity:11100,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("Approx",t)])},{name:"ApproxEqual",complexity:11100,domain:"RelationalOperator"},{name:"NotApproxEqual",complexity:11100,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("ApproxEqual",t)])},{name:"ApproxNotEqual",domain:"RelationalOperator",complexity:11100},{name:"NotApproxNotEqual",complexity:11100,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("ApproxNotEqual",t)])},{name:"Precedes",complexity:11100,domain:"RelationalOperator"},{name:"NotPrecedes",complexity:11100,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("Precedes",t)])},{name:"Succeeds",domain:"RelationalOperator"},{name:"NotSucceeds",complexity:11100,domain:"RelationalOperator",canonical:(e,t)=>e._fn("Not",[e._fn("Succeeds",t)])}]},polynomials:[{functions:[{name:"Expand",description:"Expand out products and positive integer powers",evaluate:(e,t)=>t[0]?function(e){if("Multiply"===(e=e.simplify()).head)return 2===e.nops?Oy(e.op1,e.op2):e.ops.reduce(((e,t)=>Oy(e,t)),e.engine.ONE);if("Power"===e.head){const t=e.op1.head;if("Multiply"===t)return e.engine.mul(e.op1.ops.map((t=>e.engine.power(t,e.op2))));if("Negate"===t){const t=e.op2.asSmallInteger;if(null!==t&&t>0)return t%2==0?e.engine.power(e.op1.op1,e.op2):e.engine.negate(e.engine.power(e.op1.op1,e.op2))}if("Add"===t){const t=e.op2.asSmallInteger;if(null!==t)return t>0?Ry(e.op1,t):e.engine.inverse(Ry(e.op1,-t))}}return e}(t[0]):e.symbol("Nothing")}]}],physics:{symbols:[{name:"Mu-0",description:"Vaccum permeability",constant:!0,wikidata:"Q1515261",domain:"RealNumber",value:125663706212e-17}]},trigonometry:xy};function Vy(e,t){if("object"!=typeof t||!("name"in t)||!t.name)throw Error("Missing name for definition "+JSON.stringify(t));if(!/[A-Za-z][A-Za-z0-9-]*/.test(t.name)&&1!==t.name.length)throw Error("Invalid definition name "+t.name)}function Uy(e,t){if(void 0===t)return;if(Array.isArray(t)){for(const i of t)Uy(e,i);return}e.context.dictionary||(e.context.dictionary={symbols:new Map,functions:new Map,symbolWikidata:new Map,functionWikidata:new Map});const i=e.context.dictionary;if(t.symbols)for(const r of t.symbols){Vy(0,r);const t=new Iy(e,r);if(r.wikidata){if(i.symbolWikidata.has(r.wikidata))throw Error(`Duplicate symbol with wikidata ${r.wikidata}, ${r.name} and ${i.symbolWikidata.get(r.wikidata).name}`);i.symbolWikidata.set(r.wikidata,t)}if(i.symbols.has(r.name))throw Error(`Duplicate symbol definition ${r.name}:\n${JSON.stringify(i.symbols.get(r.name))}\n${JSON.stringify(r)}`);i.symbols.set(r.name,t)}if(t.functions)for(const r of t.functions){Vy(0,r);const t=Dy(e,r);if(i.functions.has(r.name)?i.functions.set(r.name,[...i.functions.get(r.name),t]):i.functions.set(r.name,[t]),r.wikidata){if(i.functionWikidata.has(r.wikidata))throw Error(`Duplicate function with wikidata ${r.wikidata}, ${r.name} and ${i.functionWikidata.get(r.wikidata).name}`);i.functionWikidata.set(r.wikidata,t)}}}function Ky(e){return Number.isInteger(e)?Math.floor(Math.log2(Math.abs(e))/Math.log2(10))+(e>0?1:2):2}const Hy=function e(t){var i,r;if(t.symbol)return 1;if(t.isLiteral){if(t.isZero)return 1;if(t.isInteger&&null!==t.asFloat)return Ky(t.asFloat);const[e,i]=t.rationalValue;if(null!==e&&null!==i)return Ky(e)+Ky(i)+1;if(t.complexValue){const e=t.complexValue;return Ky(e.re)+Ky(e.im)+1}if(t.isNumber)return 2}const n=t.head;return("string"==typeof n?1:e(n))+(null!==(r=null===(i=t.ops)||void 0===i?void 0:i.reduce(((t,i)=>t+e(i)),0))&&void 0!==r?r:0)};class Gy{constructor(e){this._items=e?e instanceof Gy?new Map(e._items):new Map(e):new Map}has(e){for(const t of this._items.keys())if(t.isSame(e))return!0;return!1}get(e){for(const[t,i]of this._items)if(t.isSame(e))return i}clear(){this._items.clear()}set(e,t){for(const i of this._items.keys())if(i.isSame(e))return void this._items.set(i,t);this._items.set(e,t)}delete(e){this._items.delete(e)}[Symbol.iterator](){return this._items.entries()}entries(){return this._items.entries()}}class jy extends av{constructor(e,t,i){super(e,i),this._pattern=mv(t)?e.parse(t):e.box(t),this._pattern.isCanonical&&(this._canonicalPattern=this._pattern)}get hash(){return wv("Pattern")^this._pattern.hash}_purge(){var e;this._pattern._purge(),null===(e=this._canonicalPattern)||void 0===e||e._purge()}get json(){return Cv(this.engine,"Pattern",[this._pattern])}get head(){return"Pattern"}get valueDomain(){return this.engine.domain("Pattern")}get isCanonical(){return!0}set isCanonical(e){}isSame(e){return this===e||e instanceof jy&&this._pattern.isSame(e._pattern)}isEqual(e){return e instanceof jy&&this._pattern.isEqual(e._pattern)}match(e,t){var i,r;let n=this._pattern;return(null===t||void 0===t?void 0:t.exact)||(this._canonicalPattern||(this._canonicalPattern=this._pattern.canonical),n=this._canonicalPattern),function(e,t,i){var r;return Wy(e,t,{},{numericTolerance:null!==(r=null===i||void 0===i?void 0:i.numericTolerance)&&void 0!==r?r:1e-10})||null}(e,n,{recursive:null!==(i=null===t||void 0===t?void 0:t.recursive)&&void 0!==i&&i,numericTolerance:null!==(r=null===t||void 0===t?void 0:t.numericTolerance)&&void 0!==r?r:0})}test(e,t){return null!==this.match(e,t)}count(e,t){let i=0;for(const r of e)null!==this.match(r,t)&&(i+=1);return i}subs(e){return new jy(this.engine,this._pattern.subs(e).canonical)}}function Qy(e,t,i){const r=function(e){const t=e.match(/^__?_?([a-zA-Z0-9]+)/);return null===t?"":t[1]}(e);return""===r?i:i[r]?t.isSame(i[r])?i:null:(i[r]=t,i)}function Wy(e,t,i,r){const n=e.engine;if(t instanceof Gv)return e instanceof Gv?0===r.numericTolerance?t.isSame(e)?i:null:t.isEqualWithTolerance(e,r.numericTolerance)?i:null:null;const a=t.string;if(null!==a)return e.string===a?i:null;const o=t.symbol;if(null!==o)return o.startsWith("_")?Qy(o,e,i):o===e.symbol?i:null;if(t.nops!==e.nops)return null;const s=t.keys;if(null!==s){const t=e.keys;if(null===t)return null;for(const e of s){const n=Wy(t[e],s[e],i,r);if(null===n)return null;i=n}return i}if(t.ops){const a=t.head;if("string"==typeof a&&a.startsWith("_"))return Qy(a,n.box(e.head),i);{const t=Wy(n.box(e.head),n.pattern(a),i,r);if(null===t)return null;i=t}const o=e.ops;let s={...i},l=0;const u=t.ops.map((e=>n.pattern(e)));for(;l0}}isGreaterEqual(e){if(null!==e.symbol&&e.symbol===this._name)return!0;if(e.isZero){const e=this.sgn;if(null===e)return!1;if(void 0!==e)return e>=0}return this.isGreater(e)||this.isEqual(e)}get isZero(){var e,t,i,r;return null!==(t=null===(e=this._def)||void 0===e?void 0:e.zero)&&void 0!==t?t:null===(r=null===(i=this._def)||void 0===i?void 0:i.value)||void 0===r?void 0:r.isZero}get isNotZero(){var e;const t=null===(e=this._def)||void 0===e?void 0:e.notZero;if("boolean"==typeof t)return t;const i=this.sgn;return"number"==typeof i?0!==i:void 0}get isOne(){var e;return null===(e=this._def)||void 0===e?void 0:e.one}get isNegativeOne(){var e;return null===(e=this._def)||void 0===e?void 0:e.negativeOne}get isOdd(){var e;return null===(e=this._def)||void 0===e?void 0:e.odd}get isEven(){var e;return null===(e=this._def)||void 0===e?void 0:e.even}get isPrime(){var e;return null===(e=this._def)||void 0===e?void 0:e.prime}get isComposite(){var e;return null===(e=this._def)||void 0===e?void 0:e.composite}get isInfinity(){var e;return null===(e=this._def)||void 0===e?void 0:e.infinity}get isNaN(){var e;return null===(e=this._def)||void 0===e?void 0:e.NaN}get isPositive(){var e;return null===(e=this._def)||void 0===e?void 0:e.positive}get isNonPositive(){var e;return null===(e=this._def)||void 0===e?void 0:e.nonPositive}get isNegative(){var e;return null===(e=this._def)||void 0===e?void 0:e.negative}get isNonNegative(){var e;return null===(e=this._def)||void 0===e?void 0:e.nonNegative}get isNumber(){var e;return null===(e=this._def)||void 0===e?void 0:e.number}get isInteger(){var e;return null===(e=this._def)||void 0===e?void 0:e.integer}get isRational(){var e;return null===(e=this._def)||void 0===e?void 0:e.rational}get isAlgebraic(){var e;return null===(e=this._def)||void 0===e?void 0:e.rational}get isReal(){var e;return null===(e=this._def)||void 0===e?void 0:e.real}get isExtendedReal(){var e;return null===(e=this._def)||void 0===e?void 0:e.extendedReal}get isComplex(){var e;return null===(e=this._def)||void 0===e?void 0:e.complex}get isImaginary(){var e;return null===(e=this._def)||void 0===e?void 0:e.imaginary}get canonical(){var e,t,i,r,n,a;return!1===(null===(e=this._def)||void 0===e?void 0:e.hold)&&null!==(a=null!==(r=null===(i=null===(t=this._def)||void 0===t?void 0:t.value)||void 0===i?void 0:i.value)&&void 0!==r?r:null===(n=this._def)||void 0===n?void 0:n.value)&&void 0!==a?a:this}simplify(e){var t,i;const r=(null===e||void 0===e?void 0:e.rules)&&null!==(t=this.replace(e.rules))&&void 0!==t?t:this;if(!1===(null===(i=r.symbolDefinition)||void 0===i?void 0:i.hold)){const t=r.value;if(t)return t.simplify(e)}return r}evaluate(e){var t,i,r,n;return!0===(null===(t=this.symbolDefinition)||void 0===t?void 0:t.hold)?this:null!==(n=null===(r=null===(i=this._def)||void 0===i?void 0:i.value)||void 0===r?void 0:r.evaluate(e))&&void 0!==n?n:this}N(e){var t,i,r,n;const a=null===(t=this._def)||void 0===t?void 0:t.value;return null!==(n=null!==(r=null!==(i=null===a||void 0===a?void 0:a.N(e))&&void 0!==i?i:null===a||void 0===a?void 0:a.evaluate(e))&&void 0!==r?r:a)&&void 0!==n?n:this}replace(e,t){return Dv(this,e,t)}subs(e){var t;return null!==(t=e[this._name])&&void 0!==t?t:this}}class Yy extends av{constructor(e,t,i){super(e,i),this._value=t}get domainExpression(){return this._value}get hash(){return void 0===this._hash&&(this._hash=eb(this._value)),this._hash}get isCanonical(){return!0}isEqual(e){return!1}isSame(e){return!1}isSubdomainOf(e){return function(e,t){const i=t instanceof Yy?t._value:t,r=e instanceof Yy?e._value:e;if("string"==typeof r&&"string"==typeof i){const e=Jy(r,i);if("boolean"==typeof e)return e}return!0}(this,e)}isMemberOf(e){return!1}get json(){return"string"==typeof this._value?Ev(this.engine,this._value,{wikidata:this._wikidata}):["Domain",this._value]}match(e,t){return e instanceof Yy&&this.isSame(e)?{}:null}get head(){return"Domain"}get domain(){return this.engine.domain("Domain")}get codomain(){return"string"==typeof this._value||"Function"!==this._value[0]?null:this.engine.domain(this._value[this._value.length-1])}is(e){return this.isSame(e)}get isNothing(){return"Nothing"===this._value}get isFunction(){return"string"!=typeof this._value&&"Function"===this._value[0]}get isPredicate(){if("string"==typeof this._value)return!1;if("Function"!==this._value[0])return!1;const e=this._value[this._value.length];return e instanceof Yy&&e.isBoolean}get isNumericFunction(){if("string"==typeof this._value)return!1;if("Function"!==this._value[0])return!1;for(const e of this._value)if(!Jy(e,"Number"))return!1;return!0}get isBoolean(){return $y(this._value)}get isRealFunction(){if("string"==typeof this._value)return!1;if("Function"!==this._value[0])return!1;for(const e of this._value)if(!Jy(e,"ExtendedRealNumber"))return!1;return!0}get isNumeric(){return this.isSubdomainOf("Number")}get isLogicOperator(){return!("string"==typeof this._value||"Function"!==this._value[0]||this._value.length<2||this._value.length>3||!$y(this._value[this._value.length-1])||!$y(this._value[1])||3===this._value.length&&!$y(this._value[2]))}get isRelationalOperator(){return"string"!=typeof this._value&&"Function"===this._value[0]&&3===this._value.length&&!!$y(this._value[this._value.length-1])}}function Xy(e,t,i){if(t instanceof Yy)return t;let r;if(!r&&"string"==typeof t){const n={Function:["Function",["Optional",["Some","Anything"]],"Anything"],NumericFunction:["Function",["Optional",["Some","Number"]],"Number"],RealFunction:["Function",["Optional",["Some","ExtendedRealNumber"]],"ExtendedRealNumber"],TrigonometricFunction:["Function","Number","Number"],HyperbolicFunction:["Function","Number","Number"],LogicOperator:["Function","MaybeBoolean",["Optional","MaybeBoolean"],"MaybeBoolean"],Predicate:["Function",["Optional",["Some","Anything"]],"MaybeBoolean"],RelationalOperator:["Function","Anything","Anything","MaybeBoolean"]}[t];n&&(r=new Yy(e,n,i))}return r||(r=new Yy(e,t,i)),r}function Jy(e,t){var i,r;return"string"==typeof e&&(null!==(r=null===(i={Number:["Number","ExtendedComplexNumber","ExtendedRealNumber","ComplexNumber","ImaginaryNumber","RealNumber","TranscendentalNumber","AlgebraicNumber","RationalNumber","Integer","NegativeInteger","NegativeNumber","NonNegativeNumber","NonNegativeInteger","NonPositiveNumber","NonPositiveInteger","PositiveInteger","PositiveNumber"],ExtendedComplexNumber:["Number","ExtendedRealNumber","ComplexNumber","ImaginaryNumber","RealNumber","TranscendentalNumber","AlgebraicNumber","RationalNumber","Integer","NegativeInteger","NegativeNumber","NonNegativeNumber","NonNegativeInteger","NonPositiveNumber","NonPositiveInteger","PositiveInteger","PositiveNumber"],ExtendedRealNumber:["ExtendedRealNumber","RealNumber","TranscendentalNumber","AlgebraicNumber","RationalNumber","Integer","NegativeInteger","NegativeNumber","NonNegativeNumber","NonNegativeInteger","NonPositiveNumber","NonPositiveInteger","PositiveInteger","PositiveNumber"],ComplexNumber:["ComplexNumber","ImaginaryNumber"],ImaginaryNumber:["ImaginaryNumber"],RealNumber:["RealNumber","TranscendentalNumber","AlgebraicNumber","RationalNumber","Integer","NegativeInteger","NegativeNumber","NonNegativeNumber","NonNegativeInteger","NonPositiveNumber","NonPositiveInteger","PositiveInteger","PositiveNumber"],TranscendentalNumber:["TranscendentalNumber"],AlgebraicNumber:["AlgebraicNumber","RationalNumber","Integer","NegativeInteger","NonNegativeInteger","NonPositiveInteger","PositiveInteger"],RationalNumber:["RationalNumber","Integer","NegativeInteger","NonNegativeInteger","NonPositiveInteger","PositiveInteger"],Integer:["Integer","NegativeInteger","NonNegativeInteger","NonPositiveInteger","PositiveInteger"],NegativeNumber:["NegativeNumber","NegativeInteger"],NonNegativeNumber:["NonNegativeNumber","PositiveNumber","NonNegativeInteger","PositiveInteger"],NonPositiveNumber:["NonPositiveNumber","NegativeNumber","NegativeInteger"],PositiveNumber:["PositiveNumber","PositiveInteger"],NegativeInteger:["NegativeInteger"],PositiveInteger:["PositiveInteger"],NonNegativeInteger:["NonNegativeInteger","PositiveInteger"],NonPositiveInteger:["NegativeInteger"]}[t])||void 0===i?void 0:i.includes(e))&&void 0!==r?r:void 0)}function $y(e){return"string"==typeof e&&["Boolean","MaybeBoolean","True","False","Maybe"].includes(e)}function eb(e){if("string"==typeof e)return wv("domain:"+e);let t="";for(const i of e)t+=""+eb(i);return wv(t)}class tb{constructor(e){var t,i,r,n,a;this._cache={},this._commonSymbols={True:null,False:null,Maybe:null,All:null,Missing:null,Nothing:null,None:null,Undefined:null,Pi:null,ImaginaryUnit:null},this._commonNumbers={0:null,1:null,2:null,3:null,4:null,5:null,6:null,7:null,8:null,9:null,10:null},this._commonDomains={Anything:null,Nothing:null,Boolean:null,MaybeBoolean:null,String:null,Domain:null,Symbol:null,Integer:null,RationalNumber:null,AlgebraicNumber:null,RealNumber:null,ExtendedRealNumber:null,ImaginaryNumber:null,ComplexNumber:null,ExtendedComplexNumber:null,Number:null,PositiveInteger:null,TranscendentalNumber:null,PositiveNumber:null,Function:null,NumericFunction:null,RealFunction:null,TrigonometricFunction:null,HyperbolicFunction:null,LogicOperator:null,Predicate:null,RelationalOperator:null,Expression:null,BooleanExpression:null,NumericExpression:null},this._latexDictionary=null===e||void 0===e?void 0:e.latexDictionary,this._jsonSerializationOptions={exclude:[],shorthands:["function","symbol","string","dictionary","number"],metadata:[],repeatingDecimal:!0},this._stats={highwaterMark:0,symbols:new Set,expressions:new Set},this._defaultDomain=null,this._numericMode=null!==(t=null===e||void 0===e?void 0:e.numericMode)&&void 0!==t?t:"auto",this._precision=Math.max(null!==(i=null===e||void 0===e?void 0:e.numericPrecision)&&void 0!==i?i:100,Math.floor(Zg)),this._decimal=If.exports.Decimal.clone({precision:this._precision}),this.decimal=e=>new this._decimal(e),this.complex=(e,t)=>new Df.exports.Complex(e,t),this.tolerance=null!==(r=null===e||void 0===e?void 0:e.tolerance)&&void 0!==r?r:1e-10,this.ZERO=new Gv(this,0),this.ONE=new Gv(this,1),this.TWO=new Gv(this,2),this.HALF=new Gv(this,[1,2]),this.NEGATIVE_ONE=new Gv(this,-1),this.I=new Gv(this,Df.exports.Complex.I),this.NAN=new Gv(this,NaN),this.POSITIVE_INFINITY=new Gv(this,1/0),this.NEGATIVE_INFINITY=new Gv(this,-1/0),this.COMPLEX_INFINITY=new Gv(this,Df.exports.Complex.INFINITY),this.purge();const o=null!==(n=null===e||void 0===e?void 0:e.dictionaries)&&void 0!==n?n:tb.getDictionaries();this.pushScope({dictionary:o,scope:{warn:e=>{for(const t of e)t.message},timeLimit:2,memoryLimit:1,recursionLimit:1024}}),null===(null===e||void 0===e?void 0:e.assumptions)?this.pushScope():this.pushScope({assumptions:null===e||void 0===e?void 0:e.assumptions});for(const s of Object.keys(this._commonDomains))this._commonDomains[s]&&!this._commonDomains[s].symbolDefinition&&this._commonDomains[s]._repairDefinition();for(const s of Object.keys(this._commonSymbols))this._commonSymbols[s]&&!this._commonSymbols[s].symbolDefinition&&this._commonSymbols[s]._repairDefinition();this._defaultDomain=null===(null===e||void 0===e?void 0:e.defaultDomain)?null:this.domain(null!==(a=null===e||void 0===e?void 0:e.defaultDomain)&&void 0!==a?a:"ExtendedRealNumber")}static getDictionaries(e="all"){return Fy(e)}purge(){var e,t;this.DECIMAL_NEGATIVE_ONE=this.decimal(-1),this.DECIMAL_NAN=this.decimal(NaN),this.DECIMAL_ZERO=this.decimal(0),this.DECIMAL_ONE=this.decimal(1),this.DECIMAL_TWO=this.decimal(2),this.DECIMAL_HALF=this.DECIMAL_ONE.div(this.DECIMAL_TWO),this.DECIMAL_PI=this.DECIMAL_NEGATIVE_ONE.acos();const i=this._stats.symbols.values(),r=this._stats.expressions.values();this._stats.symbols=new Set,this._stats.expressions=new Set;for(const a of i)a._purge();for(const a of r)a._purge();for(const a of Object.values(this._commonDomains))null===a||void 0===a||a._purge();for(const a of Object.values(this._commonSymbols))null===a||void 0===a||a._purge();let n=this.context;for(;n;){if(null===(e=n.dictionary)||void 0===e?void 0:e.functions)for(const[e,t]of n.dictionary.functions)for(const i of t)i._purge();if(null===(t=n.dictionary)||void 0===t?void 0:t.symbols)for(const[e,t]of n.dictionary.symbols)t._purge();n=n.parentScope}for(const a of Object.keys(this._cache))this._cache[a].value&&(this._cache[a].purge?this._cache[a].value=this._cache[a].purge(this._cache[a].value):delete this._cache[a])}_register(e){this._stats.highwaterMark+=1}_unregister(e){}get stats(){const e=this._stats.expressions;return this._stats.expressions=null,this._stats.expressions=e,{...this._stats}}get precision(){return this._precision}set precision(e){const t=this._precision;"machine"===e&&(e=Math.floor(Zg)),e!==t&&(this._latexSyntax&&this.latexSyntax.updateOptions({precision:e,avoidExponentsInRange:[-6,e]}),this._precision=Math.max(e,Math.floor(Zg)),this._decimal=this._decimal.config({precision:this._precision}),this.purge())}get numericMode(){return this._numericMode}set numericMode(e){e!==this._numericMode&&(this._numericMode=e,"complex"!==e&&"machine"!==e||(this._precision=Math.floor(Zg)),this._latexSyntax&&this.latexSyntax.options.precision>this._precision&&this.latexSyntax.updateOptions({precision:this._precision}),this.purge())}get timeLimit(){let e=this.context;for(;e;){if(void 0!==e.timeLimit)return e.timeLimit;e=e.parentScope}return 2}get iterationLimit(){let e=this.context;for(;e;){if(void 0!==e.iterationLimit)return e.iterationLimit;e=e.parentScope}return 1024}get recursionLimit(){let e=this.context;for(;e;){if(void 0!==e.recursionLimit)return e.recursionLimit;e=e.parentScope}return 1024}get defaultDomain(){return this._defaultDomain}set defaultDomain(e){this._defaultDomain=null===e?null:this.domain(e)}get tolerance(){return this._tolerance}set tolerance(e){this._tolerance="number"==typeof e&&Number.isFinite(e)?Math.max(e,0):1e-10,this._decimalTolerance=this.decimal(this._tolerance)}chop(e){return"number"==typeof e&&Math.abs(e)<=this._tolerance||e instanceof If.exports.Decimal&&e.abs().lte(this._decimalTolerance)||e instanceof Df.exports.Complex&&Math.abs(e.re)<=this._tolerance&&Math.abs(e.im)<=this._tolerance?0:e}get latexSyntax(){return this._latexSyntax||(this._latexSyntax=new Wg({computeEngine:this,dictionary:this._latexDictionary,precision:this.precision,avoidExponentsInRange:[-6,this.precision],onError:e=>{throw Error(e[0].message.toString())}})),this._latexSyntax}static getLatexDictionary(e="all"){return Wg.getDictionary(e)}set costFunction(e){"function"!=typeof e&&(this._cost=Hy),this._cost=e}get costFunction(){var e;return null!==(e=this._cost)&&void 0!==e?e:Hy}getSymbolDefinition(e,t){var i,r,n;let a,o=this.context;if(t)for(;o&&!a;)a=null===(i=o.dictionary)||void 0===i?void 0:i.symbolWikidata.get(t),o=o.parentScope;for(;o&&!a;)t&&(a=null===(r=o.dictionary)||void 0===r?void 0:r.symbolWikidata.get(t)),a||(a=null===(n=o.dictionary)||void 0===n?void 0:n.symbols.get(e)),o=o.parentScope;return a}getFunctionDefinition(e,t){var i,r;if(!t){let t=this.context;for(;t;){const r=null===(i=t.dictionary)||void 0===i?void 0:i.functions.get(e);if(r)return r[0];t=t.parentScope}return}const n=this.domain(["Function",...null===t||void 0===t?void 0:t.map((e=>e.domain.json))]);let a=this.context;for(;a;){const i=null===(r=a.dictionary)||void 0===r?void 0:r.functions.get(e);if(i)for(const e of i)if(e.domain)if("function"==typeof e.domain){const i=this.domain(e.domain(this,t));if(i&&n.isSubdomainOf(i))return e}else if(n.isSubdomainOf(e.domain))return e;a=a.parentScope}}defineSymbol(e){const t=new Iy(this,e);return this.context.dictionary||(this.context.dictionary={symbols:new Map,functions:new Map,symbolWikidata:new Map,functionWikidata:new Map}),e.name&&this.context.dictionary.symbols.set(e.name,t),e.wikidata&&this.context.dictionary.symbolWikidata.set(e.wikidata,t),t}pushScope(e){var t;if(this.context={...null===e||void 0===e?void 0:e.scope,parentScope:this.context,assumptions:this.context?new Gy(this.context.assumptions):new Gy},Uy(this,null===e||void 0===e?void 0:e.dictionary),void 0!==(null===e||void 0===e?void 0:e.assumptions))for(const i of e.assumptions)this.assume(null!==(t=this.parse(fv(i)))&&void 0!==t?t:i)}popScope(){var e;const t=null===(e=this.context)||void 0===e?void 0:e.parentScope;if(this.context.warnings){const e=[...this.context.warnings];this.context.warnings=[],this.context.warn&&this.context.warn(e)}t&&this.context.warnings&&this.context.warnings.length>0&&(t.warnings?t.warnings=[...t.warnings,...this.context.warnings]:t.warnings=[...this.context.warnings]),this.context=t}get assumptions(){return this.context.assumptions||(this.context.assumptions=new Gy),this.context.assumptions}shouldContinueExecution(){return void 0===this.deadline||this.deadline>=Date.now()}checkContinueExecution(){if(!this.shouldContinueExecution())throw Error("timeout")}assert(e,t,i,r){e||this.signal(t,i,r)}signal(e,t,i){"object"==typeof e&&"message"in e?i=e.message:e.latex,void 0===i||"string"==typeof i||Array.isArray(i)&&i.map((e=>e.toString())).join(", ")}cache(e,t,i){var r;if(void 0===this._cache[e])try{this._cache[e]={build:t,purge:i,value:t()}}catch(e){}return null===(r=this._cache[e])||void 0===r?void 0:r.value}box(e){return Qv(this,e)}fn(e,t,i){var r,n,a,o,s,l,u,c,h;if("Hold"===e)return this._fn("Hold",t,i);if(t=t.map((e=>e.canonical)),"String"===e)return this.string(t.map((e=>{var t;return null!==(t=e.string)&&void 0!==t?t:e.latex})).join(""),i);if("Symbol"===e)return this.symbol(t.map((e=>{var t;return null!==(t=e.string)&&void 0!==t?t:e.latex})).join(""),i);if(("Divide"===e||"Rational"===e)&&2===t.length){const e=t[0].asSmallInteger,i=t[1].asSmallInteger;if(null!==e&&null!==i&&Number.isInteger(e)&&Number.isInteger(i))return this.number([e,i])}if("Number"===e){if(1===t.length){const e=t[0],i=null!==(n=null!==(r=e.decimalValue)&&void 0!==r?r:e.complexValue)&&void 0!==n?n:e.machineValue;if(null!==i)return this.number(i);const[a,o]=e.rationalValue;if(null!==a&&null!==o)return this.number([a,o])}return this.NAN}if("Complex"===e){if(1===t.length){const e=t[0].asFloat;return null!==e?this.number(this.complex(0,e)):this.mul([t[0],this.I])}if(2===t.length){const e=t[0].asFloat,r=t[1].asFloat;return null!==e&&null!==r&&this.number(this.complex(e,r)),0===r?t[0]:this.add([t[0],this.mul([t[1],this.I])],i)}}if("Negate"===e&&1===t.length)return Jv(null!==(a=t[0])&&void 0!==a?a:this.symbol("Missing"),i);if("Single"===e||"Pair"===e||"Triple"===e||"KeyValuePair"===e)return this.tuple(t,i);if("Dictionary"===e){const e={};for(const i of t)if("Tuple"===i.head){const t=i.op1;if(!t.isMissing){i.op2;let r=null!==(o=t.symbol)&&void 0!==o?o:t.string;if(!r&&t.isLiteral){const e=null!==(s=t.machineValue)&&void 0!==s?s:t.asSmallInteger;e&&Number.isFinite(e)&&Number.isInteger(e)&&(r=e.toString())}r&&e[r]}}return new Bv(this,e,i)}return"Add"===e?this.add(t,i):"Multiply"===e?this.mul(t,i):"Divide"===e?this.divide(null!==(l=t[0])&&void 0!==l?l:this.symbol("Missing"),null!==(u=t[1])&&void 0!==u?u:this.symbol("Missing"),i):"Power"===e?this.power(null!==(c=t[0])&&void 0!==c?c:this.symbol("Missing"),null!==(h=t[1])&&void 0!==h?h:this.symbol("Missing"),i):new Fv(this,e,t,i).canonical}_fn(e,t,i){const r=new Fv(this,e,t,i);return r.isCanonical=!0,r}error(e,t,i){return this._fn("Error",[e,this.string(t),this.box(i)])}add(e,t){const i=iy(this,e);return(null===t||void 0===t?void 0:t.latex)&&(i.latex=t.latex),(null===t||void 0===t?void 0:t.wikidata)&&(i.wikidata=t.wikidata),i}mul(e,t){const i=sy(this,e);return(null===t||void 0===t?void 0:t.latex)&&(i.latex=t.latex),(null===t||void 0===t?void 0:t.wikidata)&&(i.wikidata=t.wikidata),i}power(e,t,i){var r;let n=null;if("number"==typeof t?n=t:Array.isArray(t)&&1===t[1]&&(n=t[0]),1===n)return e;if(-1===n&&e.isLiteral){const[t,i]=e.rationalValue;if(null!==t&&null!==i)return this.number([i,t]);const r=e.asSmallInteger;if(null!==r)return this.number([1,r])}return("number"==typeof t||Array.isArray(t))&&(t=this.number(t)),null!==(r=ny(this,e,t,i))&&void 0!==r?r:this._fn("Power",[e,t],i)}inverse(e,t){var i;let r=this.NEGATIVE_ONE;if("Power"===e.head){if(e.op2.isNegativeOne)return e.op1;r=Jv(e.op2),e=e.op1}return null!==(i=ny(this,e,r,t))&&void 0!==i?i:this._fn("Power",[e,r],t)}negate(e,t){return Jv(e,t)}divide(e,t,i){const r=cy(this,e,t);return(null===i||void 0===i?void 0:i.latex)&&(r.latex=i.latex),(null===i||void 0===i?void 0:i.wikidata)&&(r.wikidata=i.wikidata),r}pair(e,t,i){return this._fn("Tuple",[e,t],i)}tuple(e,t){return this._fn("Tuple",e,t)}string(e,t){return new jv(this,e,t)}symbol(e,t){if("Infinity"===e)return this.POSITIVE_INFINITY;if("+Infinity"===e)return this.POSITIVE_INFINITY;if("-Infinity"===e)return this.NEGATIVE_INFINITY;if("Half"===e)return this.HALF;let i=this._commonSymbols[e];return i?(null===t||void 0===t?void 0:t.wikidata)&&i.wikidata&&i.wikidata!==t.wikidata?new Zy(this,e,t):i:null===i?(i=new Zy(this,e),this._commonSymbols[e]=i,i):new Zy(this,e,t)}domain(e,t){return e instanceof Yy?e:(e instanceof av&&e.symbol&&(e=e.symbol),"string"==typeof e&&(null===this._commonDomains[e]&&(this._commonDomains[e]=Xy(this,e,t)),this._commonDomains[e]&&this._commonDomains[e]),e instanceof av?Xy(this,"Anything"):Xy(this,e,t))}number(e,t){var i,r;if(Array.isArray(e)&&1===e[1]&&(e=e[0]),"number"==typeof e){if(-1===e)return this.NEGATIVE_ONE;if(null===this._commonNumbers[e]&&(this._commonNumbers[e]=null!==(i=Wv(this,e))&&void 0!==i?i:null),this._commonNumbers[e])return this._commonNumbers[e]}return null!==(r=Wv(this,e,t))&&void 0!==r?r:this.NAN}rules(e){return Iv(this,e)}pattern(e){return new jy(this,e)}parse(e){var t;return null===e?null:this.box(this.latexSyntax.parse(null!==(t=fv(e))&&void 0!==t?t:e))}serialize(e){return"object"==typeof e&&"json"in e?this.latexSyntax.serialize(e.json):this.latexSyntax.serialize(e)}get latexOptions(){return{...this.latexSyntax.options,...this.latexSyntax.serializer.options}}set latexOptions(e){this.latexSyntax.updateOptions(e)}get jsonSerializationOptions(){return this._jsonSerializationOptions}set jsonSerializationOptions(e){e.exclude&&(this._jsonSerializationOptions.exclude=[...e.exclude]),e.shorthands&&("all"===e.shorthands||e.shorthands.includes("all")?this._jsonSerializationOptions.shorthands=["function","symbol","string","dictionary","number"]:this._jsonSerializationOptions.shorthands=[...e.shorthands]),e.metadata&&("all"===e.metadata||e.metadata.includes("all")?this._jsonSerializationOptions.metadata=["latex","wikidata"]:this._jsonSerializationOptions.metadata=[...e.metadata])}ask(e){const t=this.pattern(e),i=[];for(const[r,n]of this.assumptions){const e=t.match(r,{numericTolerance:this._tolerance});null!==e&&!0===n&&i.push(e)}return i}assume(e,t){try{const i=fv(e);let r=i?this.parse(i):this.box(e);return t&&(r=this.box(["Element",e,this.domain(t)])),"not-a-predicate"}catch{return"internal-error"}}forget(e){var t;if(void 0!==e){if(Array.isArray(e))for(const i of e)this.forget(i);else if("string"==typeof e){null===(t=this.context.dictionary)||void 0===t||t.symbols.delete(e);for(const[t,i]of this.assumptions)vv(t).includes(e)&&this.assumptions.delete(t)}}else this.assumptions.clear()}}var ib='@keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}.ML__caret:after{animation:ML__caret-blink 1.05s step-end infinite forwards;border:none;border-radius:2px;border-right:2px solid var(--caret-color,var(--ML__caret-color));content:"";left:-1px;margin-right:-2px;position:relative}.ML__text-caret:after{animation:ML__caret-blink 1.05s step-end infinite forwards;border:none;border-radius:1px;border-right:1px solid var(--caret-color,var(--ML__caret-color));content:"";left:0;margin-right:-1px;position:relative}.ML__latex-caret:after{animation:ML__caret-blink 1.05s step-end infinite forwards;border:none;color:var(--caret-color,var(--ML__caret-color));content:"_";margin-right:calc(-1ex - 2px);position:relative}.ML__container{--ML__selection-background-color:hsl(var(--hue,212),97%,85%);--ML__text-highlight-background-color:hsla(var(--hue,212),40%,50%,0.1);--ML__contains-highlight-background-color:hsl(var(--hue,212),40%,95%);--ML__selection-color:currentColor;--ML__caret-color:hsl(var(--hue,212),40%,49%);--ML__smart-fence-color:currentColor;--ML__latex-color:var(--primary,hsl(var(--hue,212),40%,50%));--ML__placeholder-color:hsl(var(--hue,212),40%,49%);align-items:flex-end;display:flex;flex-flow:row;isolation:isolate;justify-content:space-between;min-height:39px;touch-action:none;width:100%}@media (prefers-color-scheme:dark){.ML__container{--ML__selection-background-color:hsl(var(--hue,212),25%,45%);--ML__text-highlight-background-color:hsla(var(--hue,212),40%,50%,0.2);--ML__contains-highlight-background-color:hsl(var(--hue,212),5%,34%);--ML__caret-color:hsl(var(--hue,212),60%,69%);--ML__latex-color:var(--primary,hsl(var(--hue,212),40%,50%));--ML__placeholder-color:hsl(var(--hue,212),60%,69%)}}.ML__content{align-items:center;align-self:center;display:flex;overflow:hidden;padding:2px 0 2px 1px;position:relative;width:100%}.ML__virtual-keyboard-toggle{box-sizing:border-box;display:none}.ML__virtual-keyboard-toggle>span{align-items:center;align-self:center;display:flex}.ML__virtual-keyboard-toggle.is-visible{fill:currentColor;align-items:center;align-self:center;background:transparent;border:1px solid transparent;border-radius:8px;color:var(--primary,hsl(var(--hue,212),40%,50%));cursor:pointer;display:flex;flex-direction:column;flex-shrink:0;height:34px;justify-content:center;margin-right:4px;padding:0;transition:background .2s cubic-bezier(.64,.09,.08,1);width:34px}.ML__virtual-keyboard-toggle.is-visible:hover{fill:currentColor;background:hsla(0,0%,70%,.5);border-radius:8px;color:#333}.ML__textarea__textarea{clip:rect(0 0 0 0);border:none;display:inline-block;font-family:KaTeX_Main;font-size:1em;height:1px;outline:none;position:absolute;resize:none;transform:scale(0);width:1px}.ML__focused .ML__text{background:var(--highlight-text,var(--ML__text-highlight-background-color))}.ML__smart-fence__close{color:var(--smart-fence-color,var(--ML__smart-fence-color));opacity:var(--smart-fence-opacity,.5)}.ML__focused .ML__selection{background:var(--selection-background-color-focused,var(--selection-background-color,var(--ML__selection-background-color)))!important}.ML__focused .ML__selected,.ML__focused .ML__selected .ML__contains-caret,.ML__focused .ML__selected .ML__placeholder,.ML__focused .ML__selected .ML__smart-fence__close{color:var(--selection-color-focused,var(--selection-color,var(--ML__selection-color)))!important}.ML__selection{background:var(--selection-background-color,var(--ML__selection-background-color))!important;box-sizing:border-box}.ML__selected,.ML__selected .ML__contains-caret,.ML__selected .ML__placeholder,.ML__selected .ML__smart-fence__close{color:var(--selection-color,var(--ML__selection-color));opacity:1}.ML__contains-caret .ML__sqrt-line,.ML__contains-caret .ML__sqrt-sign,.ML__contains-caret.ML__close,.ML__contains-caret.ML__open,.ML__contains-caret>.ML__close,.ML__contains-caret>.ML__open{color:var(--caret-color,var(--ML__caret-color))}.ML__contains-highlight{background:var(--contains-highlight-backround-color,var(--ML__contains-highlight));box-sizing:border-box}.ML__latex{color:var(--latex-color,var(--ML__latex-color));font-family:IBM Plex Mono,Source Code Pro,Consolas,Roboto Mono,Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace;font-weight:400}.ML__suggestion{opacity:.5}.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover{fill:currentColor;background:hsl(var(--hue,212),25%,35%);color:#fafafa}.ML__virtual-keyboard-toggle:focus{border:2px solid var(--primary,hsl(var(--hue,212),40%,50%));border-radius:8px;outline:none}.ML__virtual-keyboard-toggle.is-active,.ML__virtual-keyboard-toggle.is-active:hover,.ML__virtual-keyboard-toggle.is-pressed{fill:currentColor;background:hsl(var(--hue,212),25%,35%);color:#fafafa}[data-ML__tooltip]{position:relative}[data-ML__tooltip][data-placement=top]:after{bottom:100%;top:inherit}[data-ML__tooltip]:after{background:#616161;border-radius:2px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);color:#fff;content:attr(data-ML__tooltip);display:none;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:12px;font-weight:400;max-width:200px;opacity:0;padding:8px;position:absolute;right:110%;text-align:center;transform:scale(.5);transition:all .15s cubic-bezier(.4,0,1,1);width:max-content;z-index:2}@media only screen and (max-width:767px){[data-ML__tooltip]:after{font-size:16px;padding:8px 16px}}:not(.tracking) [data-ML__tooltip]:hover{position:relative}:not(.tracking) [data-ML__tooltip]:hover:after{display:inline-table;opacity:1;transform:scale(1);visibility:visible}[data-ML__tooltip][data-delay]:after{transition-delay:0s}[data-ML__tooltip][data-delay]:hover:after{transition-delay:1s}';function rb(e){return"number"===typeof e&&!Number.isNaN(e)}function nb(e){return Array.isArray(e)&&2===e.length}function ab(e){return void 0!==e&&null!==e&&"object"===typeof e&&"ranges"in e&&Array.isArray(e.ranges)}function ob(e){let t;if("body"===e.treeBranch)t={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator"}[e.type];else if("genfrac"===e.parent.type){if("above"===e.treeBranch)return"numerator";if("below"===e.treeBranch)return"denominator"}else"surd"===e.parent.type?"above"===e.treeBranch&&(t="index"):"superscript"===e.treeBranch?t="superscript":"subscript"===e.treeBranch&&(t="subscript");return t||console.log("unknown relationship"),null!==t&&void 0!==t?t:"parent"}function sb(e,t,i,r){var n;let a="";"plonk"===t?(null===(n=e.plonkSound)||void 0===n||n.play().catch((e=>console.warn(e))),e.flushInlineShortcutBuffer()):"delete"===t?a=df(e.options,"deleted: ",r):"focus"===t||t.includes("move")?a=lb(e.model,i)+(e.model.selectionIsCollapsed?"":"selected: ")+ub(e.model,e.options):"replacement"===t?a=df(e.options,"",e.model.at(e.model.position)):"line"===t?(a=df(e.options,"",e.model.root),e.keyboardDelegate.setAriaLabel("after: "+a)):a=r?df(e.options,t+" ",r):t;const o=e.ariaLiveText.textContent.includes(" ")?"   ":"   ";e.ariaLiveText.textContent=a+o}function lb(e,t){if(Number.isNaN(t))return"";const i=e.at(t);if(!i)return"";if(i.treeDepth<=e.at(e.position).treeDepth)return"";let r="",n=i.parent;const a=e.at(e.position).parent;while(n!==e.root&&n!==a)r+=`out of ${ob(n)};`,n=n.parent;return r}function ub(e,t){if(!e.selectionIsCollapsed)return df(t,"",e.getAtoms(e.selection));let i="";const r=e.at(e.position),n=ob(r);return r.isFirstSibling&&(i=(n?"start of "+n:"unknown")+": "),r.isLastSibling?r.isFirstSibling||(i+=n?"end of "+n:"unknown"):i+=df(t,"",r),i}class cb{constructor(e,t,i){this.options=e,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.mathfield=i,this.suppressChangeNotifications=!1,this.root=new ac("root",i,{mode:e.mode}),this.root.body=[],this.setListeners(t)}get atoms(){return this.root.children}get selection(){return this._selection}set selection(e){this.setSelection(e)}setSelection(e,t){return this.deferNotifications({selection:!0},(()=>{const i=this.normalizeSelection(e,t);if(void 0===i)throw new TypeError("Invalid selection");if(1===i.ranges.length&&i.ranges[0][0]===i.ranges[0][1]){const e=i.ranges[0][0];console.assert(e>=0&&e<=this.lastOffset),this._position=e,this._anchor=e,this._selection=i}else{const e=lm(i);"backward"===i.direction?[this._position,this._anchor]=e:[this._anchor,this._position]=e;const t=this.at(e[0]+1),r=this.at(e[1]),n=ac.commonAncestor(t,r);"array"===(null===n||void 0===n?void 0:n.type)&&t.parent===n&&r.parent,this._selection={ranges:[e],direction:i.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)}}))}getState(){return{content:this.root.toJson(),selection:this.selection}}setState(e,t){var i;const r=this.suppressChangeNotifications;this.suppressChangeNotifications=null===(i=null===t||void 0===t?void 0:t.suppressChangeNotifications)||void 0===i||i;let n={};"undo"===(null===t||void 0===t?void 0:t.type)&&(n={inputType:"historyUndo"}),"redo"===(null===t||void 0===t?void 0:t.type)&&(n={inputType:"historyRedo"}),cm(this,n)&&(this.root=vh(e.content,this.mathfield),this.selection=e.selection,hm(this,n)),this.suppressChangeNotifications=r}get position(){return this._position}set position(e){this.setSelection(e,e)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return 1===Math.abs(this._anchor-this._position)&&"placeholder"===this.at(Math.max(this._anchor,this._position)).type}collapseSelection(e="forward"){return this._anchor!==this._position&&(this.position="backward"===e?Math.min(this._anchor,this._position):Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(e){return this.atoms[e]}offsetOf(e){return this.atoms.indexOf(e)}getSiblingsRange(e){const t=this.at(e),{parent:i}=t;if(!i)return[0,this.lastOffset];const r=t.parent.branch(t.treeBranch);return[this.offsetOf(r[0]),this.offsetOf(r[r.length-1])]}getBranchRange(e,t){const i=this.at(e).branch(t);return[this.offsetOf(i[0]),this.offsetOf(i[i.length-1])]}getAtoms(e,t,i){var r,n;let a,o,s=null!==i&&void 0!==i?i:{};if(ab(e)){if(s=null!==(r=t)&&void 0!==r?r:{},e.ranges.length>1)return e.ranges.reduce(((e,t)=>[...e,...this.getAtoms(t,s)]),[]);e=e.ranges[0]}if(rb(e)){if(a=e,!rb(t))return[];o=t}else[a,o]=e,s=null!==(n=t)&&void 0!==n?n:{};if(!Number.isFinite(a))return[];void 0===s.includeChildren&&(s.includeChildren=!1),a<0&&(a=this.lastOffset-a+1),o<0&&(o=this.lastOffset-o+1);const l=Math.min(a,o)+1,u=Math.max(a,o);if(1===l&&u===this.lastOffset)return[this.root];let c=[];for(let h=l;h<=u;h++){const e=this.atoms[h];hb(this,e,l,u)&&c.push(e)}return s.includeChildren||(c=c.filter((e=>{let t=!1,{parent:i}=e;while(i&&!t)t=hb(this,i,l,u),i=i.parent;return!t}))),c}getAllAtoms(e){const t=[],i=this.lastOffset;for(let r=e;r<=i;r++)t.push(this.atoms[r]);for(let r=0;rac.serialize(this.getAtoms(t),e))))}return r.map((e=>this.getAtoms(e).map((e=>this.atomToString(e,n))).join(""))).join("")}extendSelection(e){let t=this._anchor;if("forward"===e){let e=this._position;do{let t=this.at(e+1);if(null===t||void 0===t?void 0:t.inCaptureSelection){while(!t.captureSelection)t=t.parent;e=this.offsetOf(null===t||void 0===t?void 0:t.lastChild)+1}else e+=1}while(e<=this.lastOffset&&this.at(e).isFirstSibling);return e===t-1&&"first"===this.at(t).type&&(e=t),this.extendSelectionTo(t,e)}let i=this._position-1;if(i<0)return!1;while(i>=0&&this.at(i).isLastSibling){let e=this.at(i);if(null===e||void 0===e?void 0:e.inCaptureSelection){while(!e.captureSelection)e=e.parent;i=this.offsetOf(e.firstChild)-1}else i-=1}return i<0&&(i=0),i===t+1&&"first"===this.at(i).type&&(t=i),this.extendSelectionTo(t,i)}extendSelectionTo(e,t){return this.deferNotifications({selection:!0},(()=>{const i=this.normalizeRange([e,t]);let[r,n]=i,{parent:a}=this.at(n);if(a&&("genfrac"===a.type||"msubsup"===a.type))while(a!==this.root&&db(this,a,[r,n]))n=this.offsetOf(a),a=a.parent;a=this.at(r).parent;while(a!==this.root&&db(this,a,[r,n]))r=this.offsetOf(a.leftSibling),a=a.parent;if(a=this.at(n).parent,"genfrac"===(null===a||void 0===a?void 0:a.type))while(a!==this.root&&db(this,a,[r,n]))n=this.offsetOf(a),console.assert(n>=0),a=a.parent;this._position=this.normalizeOffset(t),this._selection={ranges:[[r,n]],direction:"none"}}))}setListeners(e){this.listeners=e}announce(e,t,i=[]){var r,n;const a=null===(n=null===(r=this.mathfield.host)||void 0===r?void 0:r.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:t,atoms:i},cancelable:!0,bubbles:!0,composed:!0})))||void 0===n||n;a||sb(this.mathfield,e,t,i)}deferNotifications(e,t){const i=this._selection,r=this._anchor,n=this._position,a=this.suppressChangeNotifications;this.suppressChangeNotifications=!0;const o=this.root.changeCounter;t();const s=this.root.changeCounter!==o,l=r!==this._anchor||n!==this._position||"different"===om(this._selection,i);return this.suppressChangeNotifications=a,e.content&&s&&hm(this,{data:e.data,inputType:e.type}),e.selection&&l&&um(this),s||l}normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e}normalizeRange(e){let[t,i]=e;return t=this.normalizeOffset(t),i=this.normalizeOffset(i),tthis.normalizeRange(e))),direction:null!==(i=e.direction)&&void 0!==i?i:"none"});return console.assert(void 0!==r),r}}function hb(e,t,i,r){const n=e.offsetOf(t);if(nr)return!1;if(!t.hasChildren)return!0;const a=e.offsetOf(t.firstChild);if(a>=i&&a<=r){const n=e.offsetOf(t.lastChild);if(n>=i&&n<=r)return!0}return!1}function db(e,t,i){if(!(null===t||void 0===t?void 0:t.hasChildren))return!1;const[r,n]=i,a=e.offsetOf(t.firstChild),o=e.offsetOf(t.lastChild);return a>=r&&a<=n&&o>=a&&o<=n}function pb(e){return!!cm(e,{inputType:"insertText"})&&(hm(e,{inputType:"insertText"}),!0)}function mb(e){return!!cm(e,{inputType:"insertText"})&&(hm(e,{inputType:"insertText"}),!0)}function fb(e){return!!cm(e,{inputType:"insertText"})&&(hm(e,{inputType:"insertText"}),!0)}function gb(e){return!!cm(e,{inputType:"insertText"})&&(hm(e,{inputType:"insertText"}),!0)}function vb(e,t,i,r){var n,a,o,s,l,u;const c=i.parent;if(i instanceof Ec){const n=!r&&"forward"===t||"body"===r&&"backward"===t;let a=n?e.offsetOf(i.firstChild):e.offsetOf(i.lastChild);return n?"?"!==i.rightDelim&&"."!==i.rightDelim?(i.leftDelim=".",i.isDirty=!0):(c.addChildrenAfter(i.removeBranch("body"),i),c.removeChild(i),a--):"?"!==i.leftDelim&&"."!==i.leftDelim?(i.rightDelim=".",i.isDirty=!0):(c.addChildrenAfter(i.removeBranch("body"),i),c.removeChild(i),a--),e.position=a,!0}if("surd"===i.type){if("forward"===t&&!r||"backward"===t&&"body"===r){const t=i.leftSibling;i.hasChildren&&c.addChildrenAfter(i.removeBranch("body"),i),c.removeChild(i),e.position=e.offsetOf(t)}else"forward"===t&&"body"===r?e.position=e.offsetOf(i):r||"backward"!==t?"above"===r&&(i.hasEmptyBranch("above")&&i.removeBranch("above"),e.position="backward"===t?e.offsetOf(i.leftSibling):e.offsetOf(i.body[0])):i.hasChildren?e.position=e.offsetOf(i.lastChild):(e.position=Math.max(0,e.offsetOf(i)-1),c.removeChild(i));return!0}if("box"===i.type||"enclose"===i.type){const n=r&&"backward"===t||!r&&"forward"===t?i.leftSibling:i.lastChild;return c.addChildrenAfter(i.removeBranch("body"),i),c.removeChild(i),e.position=e.offsetOf(n),!0}if("genfrac"===i.type||"overunder"===i.type){if(!r)return("overunder"!==i.type||!i.hasEmptyBranch("body"))&&(("genfrac"!==i.type||!i.hasEmptyBranch("below")||!i.hasEmptyBranch("above"))&&(e.position=e.offsetOf("forward"===t?i.firstChild:i.lastChild),!0));const n="numerator-denominator"===i.context.fractionNavigationOrder?"above":"below",a="above"===n?"below":"above";if("forward"===t&&r===n||"backward"===t&&r===a){const t=i.removeBranch(n),r=i.removeBranch(a);return c.addChildrenAfter([...t,...r],i),c.removeChild(i),e.position=e.offsetOf(t.length>0?t[t.length-1]:r[0]),!0}return"backward"===t?(e.position=e.offsetOf(i.leftSibling),!0):(e.position=e.offsetOf(i),!0)}if(i.isExtensibleSymbol||"msubsup"===i.type){if(!r&&"forward"===t)return!1;if(!r){if(i.subscript||i.superscript){const r="forward"===t?null!==(a=null===(n=i.superscript)||void 0===n?void 0:n[0])&&void 0!==a?a:null===(o=i.subscript)||void 0===o?void 0:o[0]:null!==(l=null===(s=i.subscript)||void 0===s?void 0:s[0].lastSibling)&&void 0!==l?l:null===(u=i.superscript)||void 0===u?void 0:u[0].lastSibling;return r&&(e.position=e.offsetOf(r)),!0}return!1}if(r&&i.hasEmptyBranch(r)&&i.removeBranch(r),!i.hasChildren){const r="forward"===t?e.offsetOf(i):Math.max(0,e.offsetOf(i)-1);return i.parent.removeChild(i),e.position=r,!0}if("superscript"===r)if("backward"===t){const t=e.offsetOf(i.firstChild)-1;console.assert(t>=0),e.position=t}else i.subscript?e.position=e.offsetOf(i.subscript[0]):e.position=e.offsetOf(i);else"subscript"===r&&("backward"===t&&i.superscript?e.position=e.offsetOf(i.superscript[0].lastSibling):e.position="backward"===t?e.offsetOf(i.firstChild)-1:e.offsetOf(i));return!0}return!1}function yb(e){return!!cm(e,{inputType:"deleteContentBackward"})&&(e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},(()=>{let t=e.at(e.position);if(!t||!vb(e,"backward",t)){if(null===t||void 0===t?void 0:t.isFirstSibling){if(vb(e,"backward",t.parent,t.treeBranch))return;t=null}t?(e.position=e.offsetOf(t.leftSibling),t.parent.removeChild(t),e.announce("delete",void 0,[t])):e.announce("plonk")}})):wb(e,lm(e.selection),"deleteContentBackward"))}function bb(e){return!!cm(e,{inputType:"deleteContentForward"})&&(e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},(()=>{var t,i;let r=e.at(e.position).rightSibling;if(r&&vb(e,"forward",r))return;if(r){if(e.at(e.position).isLastSibling&&vb(e,"forward",r.parent,r.treeBranch))return}else{if(r=e.at(e.position),r.isLastSibling&&vb(e,"forward",r.parent,r.treeBranch))return;r=null}if(e.position===e.lastOffset||!r)return void e.announce("plonk");r.parent.removeChild(r);let n=null===(t=e.at(e.position))||void 0===t?void 0:t.rightSibling;while("msubsup"===(null===n||void 0===n?void 0:n.type))n.parent.removeChild(n),n=null===(i=e.at(e.position))||void 0===i?void 0:i.rightSibling;e.announce("delete",void 0,[r])})):wb(e,lm(e.selection),"deleteContentForward"))}function wb(e,t,i){const r=e.getAtoms(t);if(r.length>0&&r[0].parent){let i=r[0].parent.firstChild;"first"===i.type&&(i=i.rightSibling);const n=r[r.length-1].parent.lastChild;let a=r[0];"first"===a.type&&(a=a.rightSibling);const o=r[r.length-1];if(a===i&&o===n){const i=r[0].parent;"root"!==i.type&&(t=[e.offsetOf(i.leftSibling),e.offsetOf(i.rightSibling)])}}return e.deferNotifications({content:!0,selection:!0,type:i},(()=>e.deleteAtoms(t)))}function xb(e,t){const i=e.at(e.position);if("composition"===i.type)i.value=t;else{const{caret:r}=i;i.caret="";const n=new Xc(t,e.mathfield,{mode:i.mode});n.caret=r,i.parent.addChildAfter(n,i),e.position+=1}}function Ab(e){const t=e.at(e.position);"composition"===t.type&&(t.parent.removeChild(t),e.position-=1)}function kb(e,t){const i=e.at(t);let r;if(i){r=i.mode;let e=i.parent;while(!r&&e)e&&(r=e.mode),e=e.parent}return r}function Sb(e,t){e&&t&&(vs(e)?e.forEach((e=>Sb(e,t))):"object"===typeof e&&(e.style.color||e.style.backgroundColor||e.style.fontFamily||e.style.fontShape||e.style.fontSeries||e.style.fontSize||e.style.variant||e.style.variantStyle||(e.applyStyle(t),Sb(e.body,t),Sb(e.above,t),Sb(e.below,t),Sb(e.subscript,t),Sb(e.superscript,t))))}function Mb(e,t,i,r){function n(e,t){for(const i of a)if(i.style[e]!==t)return!1;return!0}if(t=e.normalizeRange(t),t[0]===t[1])return!1;const a=e.getAtoms(t,{includeChildren:!0});"toggle"===r.operation&&(i.color&&n("color",i.color)&&(i.color="none",i.verbatimColor=void 0),i.backgroundColor&&n("backgroundColor",i.backgroundColor)&&(i.backgroundColor="none",i.verbatimBackgroundColor=void 0),i.fontFamily&&n("fontFamily",i.fontFamily)&&(i.fontFamily="none"),i.fontSeries&&n("fontSeries",i.fontSeries)&&(i.fontSeries="auto"),i.fontShape&&n("fontShape",i.fontShape)&&(i.fontShape="auto"),i.fontSize&&n("fontSize",i.fontSize)&&(i.fontSize=ql));for(const o of a)o.applyStyle(i);return!0}function Nb(e,t,i){if("text"!==e.at(t).mode)return t;const r="backward"===i?-1:1;let n;if(qs.test(e.at(t).value)){let i,a=t;do{i="text"===e.at(a).mode&&qs.test(e.at(a).value),a+=r}while(e.at(a)&&i);n=e.at(a)?a-2*r:a-r}else if(/\s/.test(e.at(t).value)){let i=t;while(e.at(i)&&"text"===e.at(i).mode&&/\s/.test(e.at(i).value))i+=r;if(e.at(i)){let t=!0;do{t="text"===e.at(i).mode&&!/\s/.test(e.at(i).value),i+=r}while(e.at(i)&&t);n=e.at(i)?i-2*r:i-r}else n=i-r}else{let i=t;while(e.at(i)&&"text"===e.at(i).mode&&!/\s/.test(e.at(i).value))i+=r;n=e.at(i)?i:i-r;let a=!0;while(e.at(i)&&a)a="text"===e.at(i).mode&&/\s/.test(e.at(i).value),a&&(n=i),i+=r;n=e.at(i)?i-2*r:i-r}return n-(r>0?0:1)}function zb(e,t,i){var r,n,a,o,s,l,u;const c=e.position;null!==(r=null===i||void 0===i?void 0:i.extend)&&void 0!==r&&r||e.collapseSelection(t);let h=e.at(e.position);if("forward"===t&&("msubsup"===h.type?(h=h.rightSibling,h||(h=e.at(e.position+1))):h=e.at(e.position+1)),!h)return e.announce("plonk"),!1;let d=e.offsetOf(h);if(h instanceof qc)d=Nb(e,d,t);else if(h instanceof sh)if(h.isSuggestion){console.assert("forward"===t);while(h&&h instanceof sh)h.isSuggestion=!1,d=e.offsetOf(h),h=h.rightSibling}else if("forward"===t){if(h=h.rightSibling,!h||!(h instanceof sh))return e.announce("plonk"),!1;while(h&&h instanceof sh&&/[a-zA-Z\*]/.test(h.value))d=e.offsetOf(h),h=h.rightSibling}else{if(h=h.leftSibling,!h||!(h instanceof sh))return e.announce("plonk"),!1;while(h&&h instanceof sh&&/[a-zA-Z\*]/.test(h.value))d=e.offsetOf(h),h=h.leftSibling}else if("forward"===t&&"mopen"===h.type){let t=0;do{"mopen"===h.type?t+=1:"mclose"===h.type&&(t-=1),h=h.rightSibling}while(!h.isLastSibling&&0!==t);d=e.offsetOf(h.leftSibling)}else if("backward"===t&&"mclose"===h.type){let t=0;do{"mopen"===h.type?t+=1:"mclose"===h.type&&(t-=1),h=h.leftSibling}while(!h.isFirstSibling&&0!==t);d=e.offsetOf(h)}else if("backward"===t)if("first"===h.type)while(d>0&&"first"===h.type)d-=1,h=e.at(d);else{const t=h.type;"msubsup"===h.type&&(d=e.offsetOf(e.at(d).leftSibling)),d-=1;let i=null===(n=e.at(d))||void 0===n?void 0:n.type;while(d>=0&&i===t)"msubsup"===(null===(a=e.at(d))||void 0===a?void 0:a.type)?d=e.offsetOf(e.at(d).leftSibling):d-=1,i=e.at(d).type}else{const{type:t}=h;let i=null===(o=e.at(d))||void 0===o?void 0:o.type;const{lastOffset:r}=e;while(d<=r&&(i===t||"msubsup"===i)){while("msubsup"===(null===(s=e.at(d).rightSibling)||void 0===s?void 0:s.type))d=e.offsetOf(e.at(d).rightSibling);d+=1,i=null===(l=e.at(d))||void 0===l?void 0:l.type}d-=1}if(null!==(u=null===i||void 0===i?void 0:i.extend)&&void 0!==u&&u){if(!e.setSelection(e.anchor,d))return e.announce("plonk"),!1}else{if(d===e.position)return e.announce("plonk"),!1;e.position=d}return e.announce("move",c),!0}function Lb(e,t,i){var r,n,a,o;if(i=null!==i&&void 0!==i?i:{extend:!1},"forward"!==t){const[t,i]=wm(e);void 0!==t&&void 0!==i&&e.deleteAtoms([t,i])}if("upward"===t)return Eb(e,i);if("downward"===t)return _b(e,i);const s=e.position;if(i.extend)return e.extendSelection(t);if(e.selectionIsPlaceholder)return e.collapseSelection(t),Lb(e,t);if(!e.collapseSelection(t)){let s=e.position+("forward"===t?1:-1),l=e.at(s);if(s>=0&&s<=e.lastOffset)if("forward"===t)if(l.inCaptureSelection){while(!l.captureSelection)l=l.parent;s=e.offsetOf(l)}else if(!l.isFirstSibling&&l.isLastSibling&&(null===(r=l.parent)||void 0===r?void 0:r.skipBoundary)){if(s+1!==e.lastOffset)return e.position=s,Lb(e,"forward",i);s+=1}else l instanceof sh&&l.isSuggestion&&(l.isSuggestion=!1);else if("backward"===t)if(null===(n=l.parent)||void 0===n?void 0:n.inCaptureSelection){while(!l.captureSelection)l=l.parent;s=Math.max(0,e.offsetOf(l.leftSibling))}else l.skipBoundary&&(s=Math.max(0,e.position-2));if(s<0||s>e.lastOffset){let i=!0;return e.suppressChangeNotifications||(i=null===(o=null===(a=e.mathfield.host)||void 0===a?void 0:a.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))||void 0===o||o),i&&e.announce("plonk"),i}Cb(e,s)}return e.announce("move",s),!0}function Cb(e,t){var i,r,n;"placeholder"===(null===(i=e.at(t))||void 0===i?void 0:i.type)?e.setSelection(t-1,t):"placeholder"===(null===(n=null===(r=e.at(t))||void 0===r?void 0:r.rightSibling)||void 0===n?void 0:n.type)?e.setSelection(t,t+1):e.position=t}function Eb(e,t){var i,r,n,a;const o=null!==(i=null===t||void 0===t?void 0:t.extend)&&void 0!==i&&i;o||e.collapseSelection("backward");let s=e.at(e.position);while(s&&"below"!==s.treeBranch&&!(Array.isArray(s.treeBranch)&&s.parent instanceof Qc))s=s.parent;if(Array.isArray(null===s||void 0===s?void 0:s.treeBranch)&&s.parent instanceof Qc){const t=s.parent,i=t.array[s.treeBranch[0]][s.treeBranch[1]].indexOf(s),r=Math.max(0,s.treeBranch[0]-1),n=t.array[r][s.treeBranch[1]],a=Math.min(n.length-1,i),l=e.offsetOf(n[a]);if(o){const[t,i]=e.selection.ranges[0];let r;r=l=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;let i=e.at(e.position);return void 0===i.subsupPlacement&&("msubsup"!==(null===(t=i.rightSibling)||void 0===t?void 0:t.type)&&i.parent.addChildAfter(new _c(e.mathfield,{style:i.computedStyle}),i),i=i.rightSibling),i.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(i.superscript[0]))),!0}function Db(e){var t;if(e.collapseSelection(),Ib(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;let i=e.at(e.position);return void 0===i.subsupPlacement&&("msubsup"!==(null===(t=e.at(e.position+1))||void 0===t?void 0:t.type)&&i.parent.addChildAfter(new _c(e.mathfield,{style:e.at(e.position).computedStyle}),i),i=e.at(e.position+1)),i.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(i.subscript[0]))),!0}function Ob(){function e(e){const i=[],n=[],a=[...e.querySelectorAll('input, select, textarea, a[href], button,\n [tabindex], audio[controls], video[controls],\n [contenteditable]:not([contenteditable="false"]), details>summary')].filter(t);return a.forEach(((e,t)=>{const a=r(e);0===a?i.push(e):n.push({documentOrder:t,tabIndex:a,node:e})})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(i)}function t(e){return!(!i(e)||n(e)||r(e)<0)}function i(e){return!(e.disabled||"hidden"===e.type&&"INPUT"===e.tagName.toUpperCase()||s(e))}function r(e){var t;const i=Number.parseInt(null!==(t=e.getAttribute("tabindex"))&&void 0!==t?t:"NaN",10);return Number.isNaN(i)?"true"===e.contentEditable?0:"AUDIO"!==e.nodeName&&"VIDEO"!==e.nodeName||null!==e.getAttribute("tabindex")?e.tabIndex:0:i}function n(e){return"INPUT"===e.tagName.toUpperCase()&&"radio"===e.type&&!o(e)}function a(e,t){for(const i of e)if(i.checked&&i.form===t)return i;return null}function o(e){var t;if(!e.name)return!0;const i=null!==(t=e.form)&&void 0!==t?t:e.ownerDocument,r=i.querySelectorAll('input[type="radio"][name="'+e.name+'"]'),n=a(r,e.form);return!n||n===e}function s(e){if(!ys()||e===document.activeElement||e.contains(document.activeElement))return!1;if("hidden"===getComputedStyle(e).visibility)return!0;const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;while(e){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}return ys()?e(document.body):[]}function Rb(e,t,i=!0){var r,n;const a="forward"===t?1:-1;"placeholder"===e.at(e.anchor).type&&Lb(e,t);const o=e.getAllAtoms(Math.max(e.position+a,0));"backward"===t&&o.reverse();const s=o.filter((e=>"placeholder"===e.type||e.treeDepth>2&&e.isFirstSibling&&e.isLastSibling));if(0===s.length){const o=!i||!(null===(n=null===(r=e.mathfield.host)||void 0===r?void 0:r.dispatchEvent(new CustomEvent("focus-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))||void 0===n||n);if(o)return e.announce("plonk"),!1;const s=Ob();if(!document.activeElement||1===s.length)return e.announce("plonk"),!1;let u=s.indexOf(document.activeElement)+a;return!!(document.activeElement instanceof Ow&&l(document.activeElement,t,a))||(u<0&&(u=s.length-1),u>=s.length&&(u=0),!!(s[u]instanceof Ow&&l(s[u],t,a))||(s[u].focus(),0!==u||(e.announce("plonk"),!1)))}function l(e,t,i){var r,n,a;const o=[...null!==(n=null===(r=e.shadowRoot)||void 0===r?void 0:r.querySelectorAll("math-field"))&&void 0!==n?n:[]];if(o.length){const r=null===(a=e.shadowRoot)||void 0===a?void 0:a.activeElement,n=o.indexOf(r);let s=n+i;if(n<0&&"backward"===t&&(s=o.length-1),s>=0&&s0){const i=e.at(t);"text"===i.mode&&qs.test(i.value)?t-=1:r=!0}r=!1;while(!r&&i<=e.lastOffset){const t=e.at(i);"text"===t.mode&&qs.test(t.value)?i+=1:r=!0}if(r&&(i-=1),t>=i)return e.setSelection(i-1,i),!0;e.setSelection(t,i)}else{const s=e.at(e.position);if(s.isDigit()){let r=Math.min(e.anchor,e.position),n=Math.max(e.anchor,e.position);while(null===(t=e.at(r))||void 0===t?void 0:t.isDigit())r-=1;while(null===(i=e.at(n))||void 0===i?void 0:i.isDigit())n+=1;e.setSelection(r,n-1)}else if(s.style.variant||s.style.variantStyle){let t=Math.min(e.anchor,e.position),i=Math.max(e.anchor,e.position),l=null===(r=e.at(t))||void 0===r?void 0:r.style;while(l&&l.variant===s.style.variant&&l.variantStyle===s.style.variantStyle)t-=1,l=null===(n=e.at(t))||void 0===n?void 0:n.style;l=null===(a=e.at(i))||void 0===a?void 0:a.style;while(l&&l.variant===s.style.variant&&l.variantStyle===s.style.variantStyle)i+=1,l=null===(o=e.at(i))||void 0===o?void 0:o.style;e.setSelection(t,i-1)}else e.setSelection(e.offsetOf(s.firstSibling),e.offsetOf(s.lastSibling))}return!0}zm({addRowAfter:pb,addColumnAfter:fb,addRowBefore:mb,addColumnBefore:gb},{target:"model",category:"array-edit"}),zm({deleteAll:e=>cm(e,{inputType:"deleteContent"})&&wb(e,[0,-1],"deleteContent"),deleteForward:e=>bb(e),deleteBackward:e=>yb(e),deleteNextWord:e=>cm(e,{inputType:"deleteWordForward"})&&wb(e,[e.anchor,Nb(e,e.position,"forward")],"deleteWordForward"),deletePreviousWord:e=>cm(e,{inputType:"deleteWordBackward"})&&wb(e,[e.anchor,Nb(e,e.position,"backward")],"deleteWordBackward"),deleteToGroupStart:e=>cm(e,{inputType:"deleteSoftLineBackward"})&&wb(e,[e.anchor,e.offsetOf(e.at(e.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:e=>cm(e,{inputType:"deleteSoftLineForward"})&&wb(e,[e.anchor,e.offsetOf(e.at(e.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:e=>cm(e,{inputType:"deleteHardLineBackward"})&&wb(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>cm(e,{inputType:"deleteHardLineForward"})&&wb(e,[e.anchor,-1],"deleteHardLineForward")},{target:"model",category:"delete"}),zm({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},i=e.at(e.position),{parent:r}=i;if(!r)return e.announce("plonk"),!1;const n=i.treeBranch;let a;return"string"===typeof n&&(a=t[n]),a?(r.branch(a)||r.createBranch(a),e.setSelection(e.getBranchRange(e.offsetOf(r),a))):i.subsupPlacement?Db(e):qb(e)},moveBeforeParent:e=>{const{parent:t}=e.at(e.position);return t?(e.position=e.offsetOf(t),!0):(e.announce("plonk"),!1)},moveAfterParent:e=>Tb(e),moveToNextPlaceholder:e=>Rb(e,"forward"),moveToPreviousPlaceholder:e=>Rb(e,"backward"),moveToNextChar:e=>Lb(e,"forward"),moveToPreviousChar:e=>Lb(e,"backward"),moveUp:e=>Lb(e,"upward"),moveDown:e=>Lb(e,"downward"),moveToNextWord:e=>zb(e,"forward"),moveToPreviousWord:e=>zb(e,"backward"),moveToGroupStart:e=>{const t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,!0)},moveToGroupEnd:e=>{const t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,!0)},moveToMathFieldStart:e=>0===e.position?(e.announce("plonk"),!1):(e.position=0,!0),moveToMathFieldEnd:e=>e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,!0),moveToSuperscript:e=>qb(e),moveToSubscript:e=>Db(e)},{target:"model",category:"selection-anchor"}),zm({selectGroup:e=>{const t=Fb(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>{const t=e.extendSelection("forward");return t||e.announce("plonk"),t},extendSelectionBackward:e=>{const t=e.extendSelection("backward");return t||e.announce("plonk"),t},extendToNextWord:e=>zb(e,"forward",{extend:!0}),extendToPreviousWord:e=>zb(e,"backward",{extend:!0}),extendSelectionUpward:e=>Lb(e,"upward",{extend:!0}),extendSelectionDownward:e=>Lb(e,"downward",{extend:!0}),extendToNextBoundary:e=>zb(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>zb(e,"backward",{extend:!0}),extendToGroupStart:e=>{const t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).firstSibling));return t||e.announce("plonk"),t},extendToGroupEnd:e=>{const t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).lastSibling));return t||e.announce("plonk"),t},extendToMathFieldStart:e=>{const t=e.setSelection(e.anchor,0);return t||e.announce("plonk"),t},extendToMathFieldEnd:e=>{const t=e.setSelection(e.anchor,e.lastOffset);return t||e.announce("plonk"),t}},{target:"model",category:"selection-extend"});const Pb=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Vb(e){return!e.ctrlKey&&!e.metaKey&&("Dead"!==e.key&&(""===e.code||Pb.has(e.code)))}function Ub(e){e=Zh(e);const t=[];return e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),0===t.length?"["+e.code+"]":(t.push("["+e.code+"]"),t.join("+"))}function Kb(e,t,i){let r,n=null,a=null,o=!1,s=!1,l=!1;function u(e){clearTimeout(r),r=setTimeout((()=>{clearTimeout(r),e()}))}function c(){if(e.selectionStart!==e.selectionEnd)return;const t=e.value;e.value="",t.length>0&&i.typedText(t)}const h=e;return h.addEventListener("keydown",(t=>{o||"Process"===t.key||"CapsLock"===t.code||/(Control|Meta|Alt|Shift)(Left|Right)/.test(t.code)?n=null:(n=t,a=null,i.keystroke(Ub(t),t)?"textarea"!==e.tagName.toLowerCase()&&(i.typedText(t.key),t.preventDefault()):(n=null,e.value=""))}),!0),h.addEventListener("keypress",(e=>{o||(n&&a&&i.keystroke(Ub(n),n),a=e,u(c))}),!0),h.addEventListener("keyup",(()=>{o||n&&!a&&c()}),!0),h.addEventListener("paste",(t=>{e.focus(),e.value="",i.paste(t)||t.preventDefault(),t.stopImmediatePropagation()}),!0),h.addEventListener("cut",(e=>i.cut(e)),!0),h.addEventListener("copy",(e=>i.copy(e)),!0),h.addEventListener("blur",(r=>{var o,u,c;if((null===(u=null===(o=r["relatedTarget"])||void 0===o?void 0:o["_mathfield"])||void 0===u?void 0:u["element"])===t)return e.focus(),r.preventDefault(),void r.stopPropagation();const h=null===(c=Bm.scrim)||void 0===c?void 0:c.state;return"open"===h||"opening"===h||r.relatedTarget===r.target.getRootNode().host?(r.preventDefault(),void r.stopPropagation()):void(l||s||(l=!0,n=null,a=null,i.blur&&i.blur(),l=!1,r.stopPropagation()))}),!0),h.addEventListener("focus",(t=>{l||s||(s=!0,i.focus&&i.focus(),Hb()===e&&"function"===typeof e.select&&e.select(),s=!1,t.stopPropagation())}),!0),h.addEventListener("compositionstart",(t=>{o=!0,e.value="",i.compositionStart&&i.compositionStart(t.data)}),!0),h.addEventListener("compositionupdate",(e=>{o&&i.compositionUpdate&&i.compositionUpdate(e.data)}),!0),h.addEventListener("compositionend",(t=>{e.value="",o&&(o=!1,i.compositionEnd&&i.compositionEnd(t.data))}),!0),h.addEventListener("beforeinput",(e=>{e.stopImmediatePropagation()})),h.addEventListener("input",(e=>{if(!o&&"insertCompositionText"!==e.inputType){if("insertFromPaste"===e.inputType)return e.preventDefault(),void e.stopPropagation();u(c),e.preventDefault(),e.stopPropagation()}})),{cancelComposition:()=>{const t=i.blur,r=i.focus;i.blur=null,i.focus=null,e.blur(),e.focus(),i.blur=t,i.focus=r},blur:()=>{"function"===typeof e.blur&&e.blur()},focus:()=>{"function"===typeof e.focus&&e.focus()},hasFocus:()=>Hb()===e,setValue:t=>{t?(e.value=t,Hb()===e&&"function"===typeof e.select&&e.select()):(e.value="",e.setAttribute("aria-label",""))},setAriaLabel:t=>{e.setAttribute("aria-label","after: "+t)},moveTo:(t,i)=>{e.style.top=`${i}px`,e.style.left=`${t}px`}}}function Hb(){var e;if(!ys())return null;let t=document.activeElement;while(null===(e=null===t||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement)t=t.shadowRoot.activeElement;return t}function Gb(e){var t;if(!e)return"";let i;return"Unidentified"===e.key&&e.target&&(i=e.target.value),i=null!==(t=null!==i&&void 0!==i?i:e.key)&&void 0!==t?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(i)&&(i=""),i}class jb{constructor(e){this.recording=!1,this.canCoalesce=!1,this.model=e,this.reset()}get maximumDepth(){return 1e3}reset(){this.stack=[],this.index=-1}startRecording(){this.recording=!0}canUndo(){return this.index>0}canRedo(){return this.index!==this.stack.length-1}undo(){return!!this.canUndo()&&(this.model.setState(this.stack[this.index-1],{suppressChangeNotifications:!1,type:"undo"}),this.index-=1,this.canCoalesce=!1,!0)}redo(){return!!this.canRedo()&&(this.index+=1,this.model.setState(this.stack[this.index],{suppressChangeNotifications:!1,type:"redo"}),this.canCoalesce=!1,!0)}pop(){this.canUndo()&&(this.index-=1,this.stack.pop())}snapshot(){return!!this.recording&&(this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index++,this.stack.length>this.maximumDepth&&this.stack.shift(),this.canCoalesce=!1,!0)}snapshotAndCoalesce(){if(!this.recording)return!1;this.canCoalesce&&this.pop();const e=this.snapshot();return this.canCoalesce=!0,e}}function Qb(e,t,i){"function"===typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0);let r=e.position,n=!1,a="";while(!n){const o=e.at(r);n=0===t||void 0===o||"math"!==o.mode||!(/mord|textord|mpunct/.test(o.type)||"mop"===o.type&&/[a-zA-Z]+/.test(o.value))||!o.hasEmptyBranch("superscript")||!o.hasEmptyBranch("subscript")||"function"===typeof i&&!i(o),n||(o.mode="text",o.command=o.value,o.verbatimLatex=void 0,a+=o.value),r-=1,t-=1}hm(e,{data:a,inputType:"insertText"})}function Wb(e,t,i){"function"===typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0);let r=e.position,n=!1;const a=[];while(!n){const o=e.at(r);n=0===t||!o||o.isFirstSibling||"text"!==o.mode||" "===o.value||i&&!i(o),n||(a.push(o.serialize({defaultMode:"math"})),o.mode="math"),r-=1,t-=1}Zb(e),hm(e,{data:$u(a),inputType:"insertText"})}function Zb(e){var t;let i=e.position-1;while(i>=0&&"math"===(null===(t=e.at(i))||void 0===t?void 0:t.mode))i-=1;if(!(i<0)&&"text"===e.at(i).mode&&" "===e.at(i).value&&"math"===e.at(i-1).mode){e.at(i-1).parent.removeChild(e.at(i-1));const t=e.suppressChangeNotifications;e.suppressChangeNotifications=!0,e.position-=1,e.suppressChangeNotifications=t,hm(e,{inputType:"deleteContent"})}}function Yb(e){let t="",i=e.position,r=!1;while(!r){const n=e.at(i);r=!(n&&("text"===n.mode||"math"===n.mode&&/mord|textord|mpunct/.test(n.type))),r||(t=n.value+t),i-=1}return t}function Xb(e,t,i){if(e.smartModeSuppressed)return!1;const{model:r}=e;if(!r.at(r.position).isLastSibling)return!1;if(!i||!Vb(i))return!1;const n=Gb(i);if(!r.selectionIsCollapsed)return!("text"!==e.mode||!/[/_^]/.test(n));const a=Yb(r)+n;if("text"===e.mode){if("Esc"===t||/[/\\]/.test(n))return!0;if(/[\^_]/.test(n))return/(^|\s)[a-zA-Z][^_]$/.test(a)&&Wb(r,1),!0;const e={")":"(","}":"{","]":"["}[n],{parent:i}=r.at(r.position);if(e&&i instanceof Ec&&i.leftDelim===e)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(a))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(n))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(a))return Wb(r,1),!1;if(/\D\.[^\d\s]$/.test(a)){Wb(r,1);const e=r.at(r.position);return e.value="⋅",e.style.variant="normal",e.command="\\cdot",e.verbatimLatex=void 0,hm(r,{data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(a))return Wb(r,1),!0;if(/\.\d$/.test(a))return Wb(r,1),!0;if(/\([\d+\-.]$/.test(a))return Wb(r,1),!0;if(/\([a-z][,;]$/.test(a))return Wb(r,2),!0;if(/[\d+\-=><*|]$/.test(n))return Zb(r),!0}else{if("[Space]"===t)return Qb(r,void 0,(e=>/[a-z][:,;.]$/.test(e.value))),!0;if(/[a-zA-Z]{3,}$/.test(a)&&!/(dxd|abc|xyz|uvw)$/.test(a))return Qb(r,void 0,(e=>/[a-zA-Z]/.test(e.value))),!0;if(/(^|\W)(if)$/i.test(a))return Qb(r,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(a)&&!/(αβγ)$/.test(a))return Qb(r,void 0,(e=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(e.value))),!0;if("?"===n)return!0;if("."===n&&!/[\d-+]\.$/.test(a))return!0}return!1}var Jb="#mathlive-keystroke-caption-panel{--keystroke:#fff;--on-keystroke:#555;--keystroke-border:#f7f7f7;background:var(--secondary,hsl(var(--hue,212),19%,26%));border-color:var(--secondary-border,#e8e8e8);border-radius:6px;box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);display:flex;flex-direction:row-reverse;justify-content:center;padding:16px;position:absolute;text-align:center;visibility:hidden;z-index:1}@media (prefers-color-scheme:dark){body:not([theme=light]) #mathlive-keystroke-caption-panel{--keystroke:hsl(var(--hue,212),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue,212),50%,25%)}}body[theme=dark] #mathlive-keystroke-caption-panel{--keystroke:hsl(var(--hue,212),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue,212),50%,25%)}#mathlive-keystroke-caption-panel>span{fill:currentColor;background-color:var(--keystroke);border:2px solid var(--keystroke-border);border-radius:6px;color:var(--on-keystroke);font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1em;margin:0 8px 0 0;min-width:14px;padding:4px}";let $b,ew=null,tw=null;function iw(e,t){if(e.options.readOnly||!e.keystrokeCaptionVisible)return;const i=nw(e),r=e.element.getBoundingClientRect();i.style.left=`${r.left}px`,i.style.top=r.top-64+"px",i.innerHTML=e.options.createHTML(""+(id(t)||t)+""+i.innerHTML),i.style.visibility="visible",setTimeout((()=>{i.childNodes.length>0&&i.childNodes[i.childNodes.length-1].remove(),0===i.childNodes.length&&(i.style.visibility="hidden")}),3e3)}function rw(e){return e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible?(e.keystrokeCaption=nw(e),e.keystrokeCaption.innerHTML=""):e.keystrokeCaption&&(e.keystrokeCaption.style.visibility="hidden"),!1}function nw(e){return e.keystrokeCaption||(e.keystrokeCaption=Cp("mathlive-keystroke-caption-panel"),void 0===$b&&($b=Hc(Jb).toString(36)),ew=Kc(null,Jb,$b),tw=Kc(null,Uc,Hc(Uc).toString(36))),e.keystrokeCaption}function aw(e){Ep(e.keystrokeCaption),ew&&ew.release(),tw&&tw.release(),delete e.keystrokeCaption}class ow extends gm{constructor(){super("math")}onPaste(e,t){if(!t.clipboardData)return!1;if(!cm(e.model,{dataTransfer:t.clipboardData,inputType:"insertFromPaste"}))return!1;let i="",r="auto",n=t.clipboardData.getData("application/json+mathlive");if(n)try{const i=JSON.parse(n);if(i&&Array.isArray(i)){e.snapshot();const r=vh(i,e),{model:n}=e;n.selectionIsCollapsed||n.deleteAtoms(lm(n.selection));const a=n.at(n.position);return a.parent.addChildrenAfter(r,a),n.position=n.offsetOf(r[r.length-1]),hm(n,{inputType:"insertFromPaste"}),im(e),t.preventDefault(),t.stopPropagation(),!0}}catch{}if(n=t.clipboardData.getData("application/json"),n)try{const t=JSON.parse(n);if("object"===typeof t&&"latex"in t&&t.latex&&(i=t.latex),!i){const r=e.computeEngine.box(t);r.has("Error")||(i=r.latex)}i||(r="latex")}catch{}if(i||(i=t.clipboardData.getData("application/x-latex"),i&&(r="latex")),i||(i=t.clipboardData.getData("text/plain")),i){let n;return e.snapshot(),[n,i]=Oh(i),"auto"===r&&n&&(r="latex"),this.insert(e.model,i,{format:r})&&im(e),t.preventDefault(),t.stopPropagation(),!0}return!1}insert(e,t,i){const r="string"===typeof t?t:e.mathfield.computeEngine.box(t).latex;if(!cm(e,{data:r,inputType:"insertText"}))return!1;if(i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto"),e.mathfield.smartFence){if(e.selectionIsCollapsed&&"string"===typeof t&&pw(e,t,i.style))return!0}else if("replaceAll"!==i.insertionMode){const{parent:i}=e.at(e.position);if(i instanceof Ec&&"?"===i.rightDelim&&e.at(e.position).isLastSibling&&"string"===typeof t&&/^[)}\]|]$/.test(t))return i.isDirty=!0,i.rightDelim=t,e.position+=1,um(e),hm(e,{data:r,inputType:"insertText"}),!0}const{suppressChangeNotifications:n}=e;i.suppressChangeNotifications&&(e.suppressChangeNotifications=!0);const a=e.suppressChangeNotifications;e.suppressChangeNotifications=!0;const o={};if(o[0]="replaceAll"===i.insertionMode?"":e.getValue(e.selection,"latex-unstyled"),o["?"]="\\placeholder{}",o["@"]=o["?"],"replaceSelection"!==i.insertionMode||e.selectionIsCollapsed?"replaceAll"===i.insertionMode?(e.root.setChildren([],"body"),e.position=0):"insertBefore"===i.insertionMode?e.collapseSelection("backward"):"insertAfter"===i.insertionMode&&e.collapseSelection("forward"):e.deleteAtoms(lm(e.selection)),e.at(e.position).isLastSibling||"placeholder"!==e.at(e.position+1).type?"placeholder"===e.at(e.position).type&&e.deleteAtoms([e.position-1,e.position]):e.deleteAtoms([e.position,e.position+1]),o[0])o["@"]=o[0];else if("string"===typeof t&&/(^|[^\\])#@/.test(t)){const t=hw(e);t>=0&&(o["@"]=e.getValue(t,e.position,"latex-unstyled"),e.deleteAtoms([t,e.position]))}o[0]||(o[0]=o["?"]);let s=!1;const l=e=>(s=!0,o[e]),[u,c]=sw(e,t,l,i);if(!c)return!1;const h=cw(c),d=h.filter((t=>t.placeholderId&&!e.mathfield.placeholders.has(t.placeholderId))),p=h.map((e=>e.placeholderId));[...e.mathfield.placeholders.keys()].filter((e=>!p.includes(e))).forEach((t=>{var i;e.mathfield.placeholders.has(t)&&(null===(i=e.mathfield.placeholders.get(t))||void 0===i||i.field.remove(),e.mathfield.placeholders.delete(t))})),d.forEach((t=>{var i,r;console.assert(!!t.placeholderId&&!e.mathfield.placeholders.has(t.placeholderId));const n=new Ow({virtualKeyboardMode:"onfocus",readOnly:!1,fontsDirectory:e.mathfield.options.fontsDirectory}),a=null===(i=e.mathfield.element)||void 0===i?void 0:i.querySelector(".ML__placeholdercontainer");n.value=(null===(r=t.defaultValue)||void 0===r?void 0:r.length)?ac.serialize(t.defaultValue,{defaultMode:"text"}):"",n.classList.add("nested-mathfield"),n.style.display="inline-block",n.style.zIndex="1001",n.style.position="absolute",n.style.minWidth="30px";const o=document.createElement("style");o.textContent=".nested-mathfield { border: 1px solid black; }\n .ML__container{ min-height:auto !important; }\n ",n.appendChild(o),n.addEventListener("input",(()=>{dm(e,t.placeholderId),setTimeout((()=>im(e.mathfield)))})),null===a||void 0===a||a.appendChild(n),e.mathfield.placeholders.set(t.placeholderId,{atom:t,field:n})}));const{parent:m}=e.at(e.position);if("latex"!==u&&e.options.removeExtraneousParentheses&&m instanceof Ec&&"("===m.leftDelim&&m.hasEmptyBranch("body")&&1===c.length&&"genfrac"===c[0].type){const e=m.parent,t=m.treeBranch;e.removeChild(m),e.setChildren(c,t)}const f=m.hasEmptyBranch("body"),g=e.at(e.position);g.parent.addChildrenAfter(c,g),"latex"===u&&"string"===typeof t&&"root"===m.type&&f&&!s&&(m.verbatimLatex=t),e.suppressChangeNotifications=a;const v=c[c.length-1];if("placeholder"===i.selectionMode){const t=c.reduce(((e,t)=>[...e,...t.children.filter((e=>"placeholder"===e.type))]),[]);if(t.length>0){const i=e.offsetOf(t[0]);e.setSelection(i-1,i),e.announce("move")}else v&&(e.position=e.offsetOf(v))}else"before"===i.selectionMode||("after"===i.selectionMode?v&&(e.position=e.offsetOf(v)):"item"===i.selectionMode&&e.setSelection(e.anchor,e.offsetOf(v)));return hm(e,{data:r,inputType:"insertText"}),e.suppressChangeNotifications=n,!0}}function sw(e,t,i,r){var n;let a,o=[];return"string"!==typeof t||"math-json"===r.format?([a,t]=["latex",e.mathfield.computeEngine.box(t).latex],o=Rc(t,e.mathfield,{parseMode:"math"})):"string"===typeof t&&"ascii-math"===r.format?([a,t]=Th(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),o=Rc(t,e.mathfield,{parseMode:"math"}),"latex"!==a&&e.options.removeExtraneousParentheses&&uw(o)):("auto"===r.format||(null===(n=r.format)||void 0===n?void 0:n.startsWith("latex")))&&("auto"===r.format&&([a,t]=Th(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),"latex"===r.format&&([,t]=Oh(t)),o=Rc(t,e.mathfield,{parseMode:"math",args:i}),"latex"!==r.format&&e.options.removeExtraneousParentheses&&uw(o)),Sb(o,r.style),[null!==a&&void 0!==a?a:"latex",o]}function lw(e){if(!e)return null;if(console.assert("first"===e[0].type),e.length>1)return null;const t=e[0];return t instanceof Ec&&"("===t.leftDelim&&")"===t.rightDelim?t.removeBranch("body"):null}function uw(e){if(e){for(let t=0;e[t];t++){const i=e[t];if(i instanceof Ec&&"("===i.leftDelim){let r=0,n=0,a=0;for(let e=0;i.body[e];e++)"genfrac"===i.body[e].type&&(r++,n=e),a++;0===a&&1===r&&(e[t]=i.body[n])}}for(const t of e){for(const e of t.branches)if(!t.hasEmptyBranch(e)){uw(t.branch(e));const i=lw(t.branch(e));i&&t.setChildren(i,e)}if(t instanceof Qc)for(const e of t.cells)uw(e)}}}function cw(e){if(!e)return[];const t=[];for(const i of e){for(const e of i.branches)if(!i.hasEmptyBranch(e)){const r=cw(i.branch(e));t.push(...r)}i instanceof Tc&&t.push(i)}return t}function hw(e){let t=e.at(e.position);if("text"===t.mode){while(!t.isFirstSibling&&"text"===t.mode)t=t.leftSibling;return e.offsetOf(t)}const i=t,r=[];while(!t.isFirstSibling&&(dw(t)||r.length>0))"mclose"===t.type&&r.unshift(t.value),"mopen"===t.type&&r.length>0&&t.value===dc[r[0]]&&r.shift(),t=t.leftSibling;return i===t?-1:e.offsetOf(t)}function dw(e){return!!/^(mord|surd|msubsup|leftright|mop|mclose)$/.test(e.type)&&(!e.isExtensibleSymbol&&!e.isFunction)}function pw(e,t,i){console.assert(e.selectionIsCollapsed);const r=e.at(e.position),{parent:n}=r;let a=n instanceof Ec?n.leftDelim+n.rightDelim:"";if("\\lbrace\\rbrace"===a&&(a="{}"),"\\{\\}"===a&&(a="{}"),"\\lparen\\rparen"===a&&(a="()"),"{}"===a&&/\||\\vert|\\Vert|\\mvert|\\mid/.test(t))return gm.insert("math",e,"\\,\\middle"+t+"\\, ",{format:"latex",style:i}),!0;"{"!==t&&"\\{"!==t||(t="\\lbrace"),"}"!==t&&"\\}"!==t||(t="\\rbrace"),"["===t&&(t="\\lbrack"),"]"===t&&(t="\\rbrack");const o=hc[t];if(o){const a=n;if("leftright"===a.type&&a.firstChild===r&&("?"===a.leftDelim||"."===a.leftDelim))return a.leftDelim=t,a.isDirty=!0,!0;if(!(n instanceof Ec&&"|"===n.leftDelim)){if(gm.insert("math",e,`\\left${t}\\right?`,{format:"latex",style:i}),"first"!==r.lastSibling.type){const t=e.offsetOf(r.lastSibling),i=e.extractAtoms([e.position,t]);e.at(e.position).body=i,e.position-=1}return!0}}let s="";if(Object.keys(hc).forEach((e=>{t===hc[e]&&(s=e)})),s){if(n instanceof Ec&&r.isLastSibling)return n.isDirty=!0,n.rightDelim=t,e.position+=1,hm(e,{data:t,inputType:"insertText"}),!0;const a=e.offsetOf(r.firstSibling);let o;for(o=e.position;o>=a;o--){const t=e.at(o);if(t instanceof Ec&&"?"===t.rightDelim)break}const s=e.at(o);if(o>=a&&s instanceof Ec)return s.rightDelim=t,s.addChildren(e.extractAtoms([o,e.position]),r.treeBranch),e.position=o,hm(e,{data:t,inputType:"insertText"}),!0;if(n instanceof Ec&&"?"===n.rightDelim)return n.isDirty=!0,n.rightDelim=t,n.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(r.lastSibling)]),n.treeBranch),e.position=e.offsetOf(n),hm(e,{data:t,inputType:"insertText"}),!0;const l=n.parent;return!!(l instanceof Ec&&"?"===l.rightDelim&&e.at(e.position).isLastSibling)&&(e.position=e.offsetOf(l),pw(e,t,i))}return!1}function mw(e,t,i){var r,n,a,o;const{model:s}=e;Yh(i);const l=Xh();if(e.keyboardLayout!==l.id&&(e.keyboardLayout=l.id,e._keybindings=void 0),clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,iw(e,t),i.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;let u,c,h="";if("math"===e.mode&&!i.ctrlKey&&!i.metaKey)if("[Backspace]"===t)e.inlineShortcutBuffer.pop(),e.flushInlineShortcutBuffer({defer:!0});else if(Vb(i)){const t=Gb(i),a=(null!==(n=null===(r=e.inlineShortcutBuffer[e.inlineShortcutBuffer.length-1])||void 0===r?void 0:r.keystrokes)&&void 0!==n?n:"")+t;e.inlineShortcutBuffer.push({state:s.getState(),keystrokes:a,leftSiblings:gw(e)});let o=0,l="";while(!u&&o(gm.insert(e.mode,s,u,{format:"latex",style:t}),Zb(e.model),u.endsWith(" ")&&(e.mode="text",gm.insert("text",s," ",{style:t})),!0))),e.snapshot(),e.dirty=!0,s.announce("replacement")}return e.scrollIntoView(),i.preventDefault&&i.preventDefault(),!1}function fw(e,t,i){var r;const{model:n}=e;if(e.options.readOnly)return void n.announce("plonk");if(i=null!==i&&void 0!==i?i:{},i.focus&&e.focus(),i.feedback&&(e.options.keypressVibration&&xs()&&navigator.vibrate(Mm),null===(r=e.keypressSound)||void 0===r||r.play().catch(console.warn)),"string"===typeof i.mode&&e.mode!==i.mode&&e.switchMode(i.mode),i.simulateKeystroke){const i=t.charAt(0),r=new KeyboardEvent("keypress",{key:i});if(!mw(e,i,r))return}const a=n.at(n.position),o={...a.computedStyle,...e.style};n.selectionIsCollapsed||(n.deleteAtoms(lm(n.selection)),e.snapshot());const s=Zu(t);if("latex"===e.mode)n.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},(()=>{xm(e);for(const e of s)gm.insert("latex",n,e);Am(e)}));else if("text"===e.mode)for(const l of s)gm.insert("text",n,l,{style:o});else if("math"===e.mode)for(const l of s){let t={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[l];" "===l&&e.options.mathModeSpace&&(t=["insert",e.options.mathModeSpace]),t?e.executeCommand(t):/\d/.test(l)&&e.options.smartSuperscript&&"superscript"===a.treeBranch&&a.hasNoSiblings?(gm.insert("math",n,l,{style:o}),Tb(n)):("mord"===a.type&&/[a-zA-Z]/.test(a.value)&&/[a-zA-Z]/.test(l)&&(a.style.variant&&(o.variant=a.style.variant),a.style.variantStyle&&(o.variantStyle=a.style.variantStyle)),gm.insert("math",n,l,{style:o}))}e.snapshotAndCoalesce(),e.dirty=!0,e.scrollIntoView()}function gw(e){const t=e.model,i=[];let r=t.at(Math.min(t.position,t.anchor));while("first"!==r.type)i.push(r),r=r.leftSibling;return i}function vw(e,t){e.flushInlineShortcutBuffer();const i=yw(e,t),{model:r}=e;return r.selectionIsCollapsed?(e.style.fontSeries&&i.fontSeries===e.style.fontSeries&&(i.fontSeries="auto"),i.fontShape&&i.fontShape===e.style.fontShape&&(i.fontShape="auto"),i.color&&i.color===e.style.color&&(i.color="none"),i.backgroundColor&&i.backgroundColor===e.style.backgroundColor&&(i.backgroundColor="none"),i.fontSize&&i.fontSize===e.style.fontSize&&(i.fontSize="auto"),e.style={...e.style,...i}):e.model.deferNotifications({content:!0,type:"insertText"},(()=>{r.selection.ranges.forEach((e=>Mb(r,e,i,{operation:"toggle"}))),e.snapshot()})),!0}function yw(e,t){var i,r,n,a,o,s;const l={};"string"===typeof t.color&&(l.verbatimColor=t.color,l.color=null!==(i=e.colorMap(t.color))&&void 0!==i?i:"none"),"string"===typeof t.backgroundColor&&(l.verbatimBackgroundColor=t.backgroundColor,l.backgroundColor=null!==(r=e.backgroundColorMap(t.backgroundColor))&&void 0!==r?r:"none"),"string"===typeof t.fontFamily&&(l.fontFamily=t.fontFamily),"string"===typeof t.series&&(l.fontSeries=t.series),"string"===typeof t.fontSeries&&(l.fontSeries=t.fontSeries.toLowerCase()),l.fontSeries&&(l.fontSeries=null!==(n={bold:"b",medium:"m",normal:"m"}[l.fontSeries])&&void 0!==n?n:l.fontSeries),"string"===typeof t.shape&&(l.fontShape=t.shape),"string"===typeof t.fontShape&&(l.fontShape=t.fontShape.toLowerCase()),l.fontShape&&(l.fontShape=null!==(a={italic:"it",up:"n",upright:"n",normal:"n"}[l.fontShape])&&void 0!==a?a:l.fontShape);const u=null!==(o=t.size)&&void 0!==o?o:t.fontSize;return"number"===typeof u?l.fontSize=Math.max(1,Math.min(10,u)):"string"===typeof u&&(l.fontSize=null!==(s={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[u.toLowerCase()])&&void 0!==s?s:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[u]),l}new ow,zm({undo:e=>(Sm(e,"accept"),e.undo(),!0),redo:e=>(Sm(e,"accept"),e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},enterLatexMode:e=>(e.switchMode("latex"),!0),toggleKeystrokeCaption:rw,switchMode:(e,t,i,r)=>(e.switchMode(t,i,r),!0),insert:(e,t,i)=>e.insert(t,i),typedText:(e,t,i)=>(fw(e,t,i),!0),insertDecimalSeparator:e=>{if("math"===e.mode&&","===e.options.decimalSeparator){const t=e.model,i=t.at(Math.max(t.position,t.anchor));if(i.isDigit())return e.snapshot(),e.insert("{,}",{format:"latex"}),!0}return e.insert("."),!0},commit:e=>{var t;return null===(t=e.host)||void 0===t||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),!0}}),zm({copyToClipboard:e=>(e.focus(),e.model.selectionIsCollapsed&&e.select(),document.execCommand("copy"),!1),cutToClipboard:e=>(e.focus(),document.execCommand("cut"),!0),pasteFromClipboard:e=>(e.focus(),document.execCommand("paste"),!0)},{target:"mathfield",category:"clipboard"}),zm({applyStyle:vw},{target:"mathfield"});let bw,ww,xw=null,Aw=0;function kw(e){return ys()&&"TouchEvent"in globalThis&&e instanceof TouchEvent}function Sw(e){return ys()&&"PointerEvent"in globalThis&&e instanceof PointerEvent}function Mw(e,t){var i;e.atomBoundsCache=new Map;const r=e;let n,a=!1,o="none";if(Sw(t)&&t.buttons>1)return;let s=!1,l=!1;const u=kw(t)?t.touches[0].clientX:t.clientX,c=kw(t)?t.touches[0].clientY:t.clientY,h=Date.now(),d=r.field,p=setInterval((()=>{s?d.scroll({top:0,left:d.scrollLeft-16}):l&&d.scroll({top:0,left:d.scrollLeft+16})}),32);function m(t){ys()&&("PointerEvent"in window?(Lp(d,"pointermove",f),Lp(d,"pointerup pointercancel",m),t instanceof PointerEvent&&d.releasePointerCapture(t.pointerId)):(Lp(d,"touchmove",f),Lp(d,"touchcancel touchend",m),Lp(window,"mousemove",f),Lp(window,"mouseup blur",m)),a=!1,clearInterval(p),e.element.classList.remove("tracking"),t&&t.preventDefault())}function f(t){if(!r.hasFocus())return void m(null);const i=kw(t)?t.touches[0].clientX:t.clientX,a=kw(t)?t.touches[0].clientY:t.clientY,o=kw(t)||"touch"===t.pointerType?20:5;if(Date.now()p.right,s=i=0&&g>=0&&(r.model.extendSelectionTo(f,g),im(e)),t.preventDefault(),t.stopPropagation()}xw&&Math.abs(xw.x-u)<5&&Math.abs(xw.y-c)<5&&Date.now()=g.left&&u<=g.right&&c>=g.top&&c<=g.bottom){if(e.hasFocus()||(o="all",e.focus({scrollIntoView:!1})),e.flushInlineShortcutBuffer(),e.smartModeSuppressed=!1,n=Cw(e,u,c,{bias:0}),n>=0){if(e.element.classList.add("tracking"),t.shiftKey){const t=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,n),o=km(e.model)||t?"all":"selection"}else"placeholder"===e.model.at(n).type?(e.model.setSelection(n-1,n),o="selection"):"placeholder"===(null===(i=e.model.at(n).rightSibling)||void 0===i?void 0:i.type)?(e.model.setSelection(n,n+1),o="selection"):(e.model.position=n,o=km(e.model)?"all":"selection");e.style={},3===t.detail||Aw>2?(m(t),3!==t.detail&&3!==Aw||(e.model.selection={ranges:[[0,e.model.lastOffset]]},o="all")):a||(a=!0,ys()&&"PointerEvent"in window?(zp(d,"pointermove",f),zp(d,"pointerup pointercancel",m),t instanceof PointerEvent&&d.setPointerCapture(t.pointerId)):(zp(window,"blur",m),kw(t)&&t.touches?(zp(t.target,"touchmove",f),zp(t.target,"touchcancel touchend",m)):(zp(window,"mousemove",f),zp(window,"mouseup",m))),2!==t.detail&&2!==Aw||(Fb(e.model),o="all"))}}else xw=null;"none"!==o&&(e.model.selectionIsCollapsed&&(o="all"),im(e)),t.preventDefault()}function Nw(e,t,i){if(e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom)return 0;const r=e-(i.left+i.right)/2,n=t-(i.top+i.bottom)/2;return r*r+n*n}function zw(e,t,i,r,n){if(!i.id)return[1/0,null];if(t.has(i.id))return t.get(i.id);const a=Op(e,i);if(!a)return[1/0,null];let o=["group"===i.type||"root"===i.type?1/0:Nw(r,n,a),i];if(!i.captureSelection&&r>=a.left&&r<=a.right&&i.hasChildren){for(const a of i.children){const i=zw(e,t,a,r,n);i[0]<=o[0]&&(o=i)}o[1]||(o=[Nw(r,n,a),i])}return t.set(i.id,o),o}function Lw(e,t,i){const[,r]=zw(e,new Map,e.model.root,t,i);return r}function Cw(e,t,i,r){var n;const a=e.fieldContent.getBoundingClientRect();if(t>a.right||i>a.bottom+8)return e.model.lastOffset;if(t':o+=``,o+="",o+='',o+=`
    `,o+=null!==(n=this.options.virtualKeyboardToggleGlyph)&&void 0!==n?n:kf,o+="
    ",o+="
    ",o+="
    ",o+='
    ',this.element.innerHTML=this.options.createHTML(o),!this.element.children)return void console.error("%cMathlive: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include 'runtimeCompiler: true' in your Vue configuration. Theremay a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherith;font-family:system-ui;font-size:inherit;font-weight:inherit");let s=0;const l=this.element.children[s++].firstElementChild;this.field=this.element.children[s].children[0],s++,this.virtualKeyboardToggle=this.element.querySelector(".ML__virtual-keyboard-toggle"),this.ariaLiveText=this.element.children[s].children[0],this.accessibleNode=this.element.children[s++].children[1],this.keystrokeCaptionVisible=!1,this.popoverVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.mode=Mf(this.options),this.smartModeSuppressed=!1,this.style={},this.options.readOnly||"manual"!==this.options.virtualKeyboardMode?this.virtualKeyboardToggle.classList.remove("is-visible"):this.virtualKeyboardToggle.classList.add("is-visible"),this.options.readOnly?this.element.classList.add("ML__isReadOnly"):this.element.classList.remove("ML__isReadOnly"),"inline-math"===this.options.defaultMode?this.element.classList.add("ML__isInline"):this.element.classList.remove("ML__isInline"),this.element.querySelector(".ML__content").addEventListener("click",(e=>e.stopImmediatePropagation()),{capture:!1}),this.field.addEventListener("wheel",this,{passive:!1}),Vp((e=>this.executeCommand(e)),this.virtualKeyboardToggle,{default:"toggleVirtualKeyboard",alt:"toggleVirtualKeyboardAlt",shift:"toggleVirtualKeyboardShift"}),this.blurred=!0,zp(this.element,"focus",this),zp(this.element,"blur",this),this.keyboardDelegate=Kb(l,this.element,{typedText:e=>fw(this,e),cut:e=>{this.options.readOnly?this.model.announce("plonk"):cm(this.model,{inputType:"deleteByCut"})&&(this.snapshot(),gm.onCopy(this,e),setTimeout((()=>{wb(this.model,lm(this.model.selection),"deleteByCut"),im(this)}),0))},copy:e=>gm.onCopy(this,e),paste:e=>{let t=!0;return this.options.readOnly&&(t=!1),t&&(t=gm.onPaste(this.model.at(this.model.position).mode,this,e)),t||this.model.announce("plonk"),t},keystroke:(e,t)=>mw(this,e,t),focus:()=>this.onFocus(),blur:()=>this.onBlur(),compositionStart:e=>this.onCompositionStart(e),compositionUpdate:e=>this.onCompositionUpdate(e),compositionEnd:e=>this.onCompositionEnd(e)}),ys()&&"PointerEvent"in window?zp(this.field,"pointerdown",this):zp(this.field,"touchstart:active mousedown",this),zp(window,"resize",this),window.addEventListener("blur",(()=>{_p(this)&&this.hasFocus()&&window.addEventListener("focus",(e=>{e.target===window&&_p(this)&&this.focus()}),{once:!0})}),{capture:!0}),this.model=new cb({mode:Mf(this.options),macros:this.options.macros,removeExtraneousParentheses:this.options.removeExtraneousParentheses},{onSelectionDidChange:e=>this._onSelectionDidChange()},this),this.undoManager=new jb(this.model),a&&gm.insert("math",this.model,a,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",suppressChangeNotifications:!0}),this.undoManager.startRecording(),this.undoManager.snapshot(),this.model.setListeners({onSelectionDidChange:e=>this._onSelectionDidChange()}),im(this),ys()&&document.fonts.ready.then((()=>rm(this)))}get colorMap(){return e=>{var t;let i;return"function"===typeof(null===(t=this.options)||void 0===t?void 0:t.colorMap)&&(i=this.options.colorMap(e)),i||(i=pu(e)),i}}get backgroundColorMap(){return e=>{var t;let i;return"function"===typeof(null===(t=this.options)||void 0===t?void 0:t.backgroundColorMap)&&(i=this.options.backgroundColorMap(e)),i||"function"!==typeof this.options.colorMap||(i=this.options.colorMap(e)),i||(i=mu(e)),i}}get fractionNavigationOrder(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.fractionNavigationOrder)&&void 0!==t?t:"numerator-denominator"}get placeholderSymbol(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.placeholderSymbol)&&void 0!==t?t:"▢"}get smartFence(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.smartFence)&&void 0!==t&&t}get letterShapeStyle(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.letterShapeStyle)&&void 0!==t?t:"tex"}get registers(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.registers)&&void 0!==t?t:{}}getDefinition(e,t="math"){return yd(e,t)}getMacro(e){return bd(e,this.options.macros)}get virtualKeyboard(){var e;if(!this.options.readOnly)return this._virtualKeyboard||((null===(e=window.mathlive)||void 0===e?void 0:e.sharedVirtualKeyboard)||this.options.useSharedVirtualKeyboard?this._virtualKeyboard=new cf({targetOrigin:this.options.sharedVirtualKeyboardTargetOrigin,originValidator:this.options.originValidator,mathfield:this}):this._virtualKeyboard=new Rm(this.options,this)),this._virtualKeyboard}get computeEngine(){return this._computeEngine||(this._computeEngine=new tb,","===this.options.decimalSeparator&&(this._computeEngine.latexOptions.decimalMarker="{,}")),this._computeEngine}get virtualKeyboardState(){var e;return(null===(e=this.virtualKeyboard)||void 0===e?void 0:e.visible)?"visible":"hidden"}set virtualKeyboardState(e){this.virtualKeyboard&&("hidden"===e?this.virtualKeyboard.executeCommand("hideVirtualKeyboard"):"visible"===e&&this.virtualKeyboard.executeCommand("showVirtualKeyboard"))}get keybindings(){var e,t;if(this._keybindings)return this._keybindings;const[i,r]=ad(this.options.keybindings,null!==(e=Xh())&&void 0!==e?e:Kh);return(null===(t=Xh())||void 0===t?void 0:t.score)>0&&(this._keybindings=i,r.length>0&&console.error("invalid keybindings for current keyboard layout",r)),i}setOptions(e){var t,i;if(this.options=xf(this.options,e),this._computeEngine&&"decimalSeparator"in e&&(this._computeEngine.latexOptions.decimalMarker=","===this.options.decimalSeparator?"{,}":"."),this.model.setListeners({onSelectionDidChange:e=>this._onSelectionDidChange()}),this.model.options.macros=this.options.macros,this._keybindings=void 0,this.plonkSound=this.options.plonkSound,!this.options.keypressSound||"string"===typeof this.options.keypressSound||this.options.keypressSound instanceof HTMLAudioElement||(this.keypressSound=this.options.keypressSound.default,this.spacebarKeypressSound=this.options.keypressSound.spacebar,this.returnKeypressSound=this.options.keypressSound.return,this.deleteKeypressSound=this.options.keypressSound.delete),this.options.readOnly?(this.onBlur(),this.element.classList.add("ML__isReadOnly")):this.element.classList.remove("ML__isReadOnly"),"inline-math"===this.options.defaultMode?this.element.classList.add("ML__isInline"):this.element.classList.remove("ML__isInline"),null===(t=this.virtualKeyboard)||void 0===t||t.setOptions(this.options),this.options.readOnly||"manual"!==this.options.virtualKeyboardMode?this.virtualKeyboardToggle.classList.remove("is-visible"):this.virtualKeyboardToggle.classList.add("is-visible"),"virtualKeyboardToggleGlyph"in e){const e=null===(i=this.element)||void 0===i?void 0:i.querySelector(".ML__virtual-keyboard-toggle");e&&(e.innerHTML=this.options.createHTML(this.options.virtualKeyboardToggleGlyph))}const r=ac.serialize(this.model.root,{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in e||this.model.getValue()!==r)&&gm.insert("math",this.model,r,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",suppressChangeNotifications:!0}),im(this)}getOptions(e){return Af(this.options,e)}getOption(e){return Af(this.options,e)}handleEvent(e){if(_p(this))switch(e.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"touchstart":case"mousedown":Mw(this,e);break;case"pointerdown":Mw(this,e);break;case"resize":this.resizeTimer&&cancelAnimationFrame(this.resizeTimer),this.resizeTimer=requestAnimationFrame((()=>_p(this)&&this.onResize()));break;case"wheel":this.onWheel(e);break;default:console.warn("Unexpected event type",e.type)}}dispose(){if(!_p(this))return;const e=this.element;delete this.element,delete e.mathfield,e.innerHTML=this.model.getValue(),Lp(e,"pointerdown",this),Lp(e,"touchstart:active mousedown",this),Lp(e,"focus",this),Lp(e,"blur",this),Lp(window,"resize",this),window.removeEventListener("blur",this,{capture:!0}),delete this.accessibleNode,delete this.ariaLiveText,delete this.field,delete this.fieldContent,this.virtualKeyboardToggle.remove(),delete this.virtualKeyboardToggle,this._virtualKeyboard&&(this._virtualKeyboard.dispose(),delete this._virtualKeyboard),em(this),aw(this),this.stylesheets.forEach((e=>null===e||void 0===e?void 0:e.release()))}flushInlineShortcutBuffer(e){if(null!==e&&void 0!==e||(e={defer:!1}),!e.defer)return this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),void(this.inlineShortcutBufferFlushTimer=0);this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout((()=>this.flushInlineShortcutBuffer()),this.options.inlineShortcutTimeout))}executeCommand(e){var t,i;return"virtual-keyboard"===Lm(e)?null!==(i=null===(t=this.virtualKeyboard)||void 0===t?void 0:t.executeCommand(e))&&void 0!==i&&i:Cm(this,e)}get errors(){return Fc(this.model.getValue(),this)}getValue(e,t,i){return this.model.getValue(e,t,i)}setValue(e,t){var i;t=null!==t&&void 0!==t?t:{mode:"math"},void 0===t.insertionMode&&(t.insertionMode="replaceAll"),void 0!==t.format&&"auto"!==t.format||(t.format="latex");let r="math";void 0!==t.mode&&"auto"!==t.mode||(r=null!==(i=kb(this.model,this.model.position))&&void 0!==i?i:"math"),gm.insert(r,this.model,e,t)&&(this.undoManager.snapshot(),im(this))}get expression(){const e=this.computeEngine;return e.box(e.parse(this.model.getValue()))}scrollIntoView(){var e;if(!this.element)return;null===(e=this.host)||void 0===e||e.scrollIntoView({block:"nearest",inline:"nearest"}),this.dirty&&rm(this,{interactive:!0});const t=this.field.getBoundingClientRect();let i=null;if(this.model.selectionIsCollapsed)i=Bp(this.field);else{const e=Fp(this);if(e.length>0){let r=-1/0,n=-1/0;for(const t of e)t.right>r&&(r=t.right),t.tope.bottom&&(r=t-e.bottom+this.host.scrollTop+i.height),this.host.scroll({top:r,left:0})}if(i){const e=i.x-window.scrollX;let r=this.field.scrollLeft;et.right&&(r=e-t.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:r})}}insert(e,t){var i;if("string"===typeof e&&e.length>0){if(this.flushInlineShortcutBuffer(),t=null!==t&&void 0!==t?t:{mode:"math"},t.focus&&this.focus(),t.feedback&&(this.options.keypressVibration&&xs()&&navigator.vibrate(Mm),null===(i=this.keypressSound)||void 0===i||i.play().catch(console.warn)),t.scrollIntoView&&this.scrollIntoView(),"\\\\"===e)pb(this.model);else if("&"===e)fb(this.model);else{const i=this.style;gm.insert(this.mode,this.model,e,{style:this.model.at(this.model.position).computedStyle,...t}),t.resetStyle&&(this.style=i)}return this.undoManager.snapshot(),im(this),!0}return!1}switchMode(e,t="",i=""){if(this.mode===e||this.options.readOnly)return;const r=this.mode,{model:n}=this;n.deferNotifications({content:Boolean(i)||Boolean(t),selection:!0,type:"insertText"},(()=>{var a,o;let s=!1;if(this.flushInlineShortcutBuffer(),this.smartModeSuppressed=/text|math/.test(this.mode)&&/text|math/.test(e),t&&"latex"!==e){const i=Rc(t,this,{parseMode:e});n.collapseSelection("forward");const r=n.at(n.position);n.position=n.offsetOf(r.parent.addChildrenAfter(i,r)),s=!0}if(this.mode=e,"latex"===e){let e,i=n.selectionIsCollapsed;Sm(this,"accept"),(null===(a=this.virtualKeyboard)||void 0===a?void 0:a.visible)&&this.executeCommand(["switchKeyboardLayer","latex-lower"]);let r=n.at(n.position);if(i)e="\\";else{const a=lm(n.selection);e=this.model.getValue(a,"latex");const o=this.model.extractAtoms(a);1===o.length&&o[0]instanceof Tc&&(e=t,i=!0),r=n.at(a[0])}const o=new lh(e,this);r.parent.addChildAfter(o,r),i?n.position=n.offsetOf(o.lastChild):n.setSelection(n.offsetOf(o.firstChild),n.offsetOf(o.lastChild))}else bm(n).forEach((e=>{e.isError=!1}));if(i){const e=Rc(i,this,{parseMode:r});n.collapseSelection("forward");const t=n.at(n.position);n.position=n.offsetOf(t.parent.addChildrenAfter(e,t)),s=!0}return null===(o=this.host)||void 0===o||o.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0})),im(this),s})),this.mode=e}hasFocus(){return ys()&&this.keyboardDelegate.hasFocus()}focus(e){var t;this.keyboardDelegate.focus(),this.model.announce("line"),(null===(t=null===e||void 0===e?void 0:e.scrollIntoView)||void 0===t||t)&&this.scrollIntoView()}blur(){this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]}}applyStyle(e,t={}){var i,r;const n={operation:"set",suppressChangeNotifications:!1};nb(t)?n.range=t:(n.range=t.range,n.suppressChangeNotifications=null!==(i=t.suppressChangeNotifications)&&void 0!==i&&i);const a=yw(this,e),o=null!==(r=n.operation)&&void 0!==r?r:"set";this.model.deferNotifications({content:!n.suppressChangeNotifications,type:"insertText"},(()=>{void 0===n.range?this.model.selection.ranges.forEach((e=>Mb(this.model,e,a,{operation:o}))):Mb(this.model,n.range,a,{operation:o})})),im(this)}getCaretPoint(){const e=Bp(this.field);return e?{x:e.x,y:e.y}:null}setCaretPoint(e,t){const i=Cw(this,e,t,{bias:0});if(i<0)return!1;const r=this.model.position;return this.model.position=i,this.model.announce("move",r),im(this),!0}getPlaceholderField(e){var t;return null===(t=this.placeholders.get(e))||void 0===t?void 0:t.field}attachNestedMathfield(){let e=!1;this.placeholders.forEach((t=>{var i,r,n,a,o,s,l,u;const c=null===(i=this.field)||void 0===i?void 0:i.querySelector(`[data-placeholder-id=${t.atom.placeholderId}]`);if(c){const i=c.getBoundingClientRect(),h=null===(r=this.field)||void 0===r?void 0:r.getBoundingClientRect(),d=.6*parseInt(window.getComputedStyle(c).fontSize);(!t.field.style.fontSize||Math.abs(d-parseFloat(t.field.style.fontSize))>=.2)&&(e=!0,t.field.style.fontSize=`${d}px`);const p=(null!==(n=null===i||void 0===i?void 0:i.top)&&void 0!==n?n:0)-(null!==(a=null===h||void 0===h?void 0:h.top)&&void 0!==a?a:0)+(null!==(o=this.element.offsetTop)&&void 0!==o?o:0),m=(null!==(s=null===i||void 0===i?void 0:i.left)&&void 0!==s?s:0)-(null!==(l=null===h||void 0===h?void 0:h.left)&&void 0!==l?l:0)+(null!==(u=this.element.offsetLeft)&&void 0!==u?u:0);(!t.field.style.left||Math.abs(m-parseFloat(t.field.style.left))>=1)&&(e=!0,t.field.style.left=`${m}px`),(!t.field.style.top||Math.abs(p-parseFloat(t.field.style.top))>=1)&&(e=!0,t.field.style.top=`${p}px`)}})),e&&im(this)}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(){var e,t;this.undoManager.snapshot()&&(null===(e=this.virtualKeyboard)||void 0===e||e.executeCommand(["onUndoStateChanged",this.canUndo(),this.canRedo()]),null===(t=this.host)||void 0===t||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}snapshotAndCoalesce(){var e,t;this.undoManager.snapshotAndCoalesce()&&(null===(e=this.virtualKeyboard)||void 0===e||e.executeCommand(["onUndoStateChanged",this.canUndo(),this.canRedo()]),null===(t=this.host)||void 0===t||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}undo(){var e,t;this.undoManager.undo()&&(null===(e=this.virtualKeyboard)||void 0===e||e.executeCommand(["onUndoStateChanged",this.canUndo(),this.canRedo()]),null===(t=this.host)||void 0===t||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var e,t;this.undoManager.redo()&&(null===(e=this.virtualKeyboard)||void 0===e||e.executeCommand(["onUndoStateChanged",this.canUndo(),this.canRedo()]),null===(t=this.host)||void 0===t||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}_onSelectionDidChange(){var e,t,i;this.keyboardDelegate.setValue(this.model.getValue(this.model.selection,"latex-expanded"));const r=this.model.getAtoms(this.model.selection);if(1===r.length&&"placeholder"===r[0].type){const t=r[0];this.model.mathfield.placeholders.has(t.placeholderId)&&(null===(e=this.model.mathfield.placeholders.get(t.placeholderId))||void 0===e||e.field.focus())}{const e=this.model.at(this.model.position),i=null!==(t=e.mode)&&void 0!==t?t:Mf(this.options);this.mode!==i&&("latex"===this.mode?(Sm(this,"accept",{mode:i}),this.model.position=this.model.offsetOf(e)):this.switchMode(i))}null===(i=this.host)||void 0===i||i.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0}))}onFocus(){var e,t,i;!this.focusBlurInProgress&&this.blurred&&(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),null===(e=this.virtualKeyboard)||void 0===e||e.setOptions(this.options),null===(t=this.virtualKeyboard)||void 0===t||t.enable(),"onfocus"===this.options.virtualKeyboardMode&&this.executeCommand("showVirtualKeyboard"),Yp(this),rm(this,{interactive:!0}),null===(i=this.host)||void 0===i||i.dispatchEvent(new Event("focus",{bubbles:!1,composed:!0})),this.valueOnFocus=this.model.getValue(),this.focusBlurInProgress=!1)}onBlur(){var e,t,i;this.focusBlurInProgress||this.blurred||(this.focusBlurInProgress=!0,this.blurred=!0,this.ariaLiveText.textContent="",Sm(this,"accept"),this.model.getValue()!==this.valueOnFocus&&this.executeCommand("commit"),!(null===(e=window.mathlive)||void 0===e?void 0:e.sharedVirtualKeyboard)&&/onfocus|manual/.test(this.options.virtualKeyboardMode)&&this.executeCommand("hideVirtualKeyboard"),null===(t=this.virtualKeyboard)||void 0===t||t.disable(),null===(i=this.host)||void 0===i||i.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),im(this),this.focusBlurInProgress=!1)}onCompositionStart(e){this.model.deleteAtoms(lm(this.model.selection)),requestAnimationFrame((()=>{rm(this);const e=Bp(this.field);e&&this.keyboardDelegate.moveTo(e.x,e.y)}))}onCompositionUpdate(e){xb(this.model,e),im(this)}onCompositionEnd(e){Ab(this.model),fw(this,e,{simulateKeystroke:!0})}onResize(){Yp(this)}onWheel(e){const t=5*e.deltaX;if(!Number.isFinite(t)||0===t)return;const i=this.field;t<0&&0===i.scrollLeft||t>0&&i.offsetWidth+i.scrollLeft>=i.scrollWidth||(i.scrollBy({top:0,left:t}),e.preventDefault(),e.stopPropagation())}}var Bw,Iw;const qw=document.createElement("template");qw.innerHTML='\n
    ';const Dw=new WeakMap;class Ow extends HTMLElement{constructor(e){bs(),super(),this.attachShadow({mode:"open"}),this.shadowRoot.append(qw.content.cloneNode(!0));const t=this.shadowRoot.querySelector("slot:not([name])");this._slotValue=t.assignedNodes().map((e=>3===e.nodeType?e.textContent:"")).join("").trim(),e&&this.setOptions(e),this.shadowRoot.host.addEventListener("pointerdown",(e=>this.onPointerDown()),!0),this.shadowRoot.host.addEventListener("focus",(()=>{var e;return null===(e=this._mathfield)||void 0===e?void 0:e.focus()}),!0),this.shadowRoot.host.addEventListener("blur",(()=>{var e;return null===(e=this._mathfield)||void 0===e?void 0:e.blur()}),!0)}static get optionsAttributes(){return{"default-mode":"string","fonts-directory":"string","sounds-directory":"string","horizontal-spacing-scale":"string","math-mode-space":"string","inline-shortcut-timeout":"string","keypress-vibration":"on/off","keypress-sound":"string","plonk-sound":"string","letter-shape-style":"string",locale:"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","speech-engine":"string","speech-engine-rate":"string","speech-engine-voice":"string","text-to-speech-markup":"string","text-to-speech-rules":"string","virtual-keyboard-layout":"string","virtual-keyboard-mode":"string","virtual-keyboard-theme":"string","virtual-keyboards":"string","use-shared-virtual-keyboard":"boolean","shared-virtual-keyboard-target-origin":"string"}}static get observedAttributes(){return[...Object.keys(Ow.optionsAttributes),"disabled","readonly","read-only"]}onPointerDown(){window.addEventListener("pointerup",(e=>{e.target===this&&this.dispatchEvent(new MouseEvent("click",{altKey:e.altKey,button:e.button,buttons:e.buttons,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,metaKey:e.metaKey,movementX:e.movementX,movementY:e.movementY,relatedTarget:e.relatedTarget,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey}))}),{once:!0})}getPlaceholderField(e){var t;return null===(t=this._mathfield)||void 0===t?void 0:t.getPlaceholderField(e)}addEventListener(e,t,i){return super.addEventListener(e,t,i)}removeEventListener(e,t,i){super.removeEventListener(e,t,i)}get mode(){var e,t;return null!==(t=null===(e=this._mathfield)||void 0===e?void 0:e.mode)&&void 0!==t?t:"math"}set mode(e){this._mathfield&&(this._mathfield.mode=e)}get computeEngine(){if(this._mathfield)return this._mathfield.computeEngine}get expression(){if(this._mathfield)return this._mathfield.expression}get errors(){var e,t;return null!==(t=null===(e=this._mathfield)||void 0===e?void 0:e.errors)&&void 0!==t?t:[]}getOptions(e){return this._mathfield?Af(this._mathfield.options,e):Dw.has(this)?Af(xf(Sf(),Dw.get(this).options),e):null}getOption(e){return this.getOptions([e])[e]}setOptions(e){if(this._mathfield)this._mathfield.setOptions(e),this._mathfield.placeholders.forEach((t=>{t.field.setOptions({...e,virtualKeyboardMode:"onfocus",readOnly:!1})}));else if(Dw.has(this)){const t={...Dw.get(this).options,...e};Dw.set(this,{...Dw.get(this),selection:{ranges:t.readOnly?[[0,0]]:[[0,-1]]},options:t})}else Dw.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:e});Fw(this)}executeCommand(e){var t,i;return null!==(i=null===(t=this._mathfield)||void 0===t?void 0:t.executeCommand(e))&&void 0!==i&&i}getValue(e,t,i){var r,n;if(this._mathfield)return this._mathfield.model.getValue(e,t,i);if(Dw.has(this)){let a,o,s;if(ab(e)?([a,o]=e.ranges[0],s=t):nb(e)?([a,o]=e,s=t):rb(e)&&rb(t)?(a=e,o=t,s=i):(a=0,o=-1,s=e),(void 0===s||"latex"===s)&&0===a&&-1===o)return null!==(n=null!==(r=Dw.get(this).value)&&void 0!==r?r:this.textContent)&&void 0!==n?n:""}return""}setValue(e,t){if(this._mathfield&&void 0!==e)return void this._mathfield.setValue(e,t);if(Dw.has(this)){const t=Dw.get(this).options;return void Dw.set(this,{value:e,selection:{ranges:t.readOnly?[[0,0]]:[[0,-1]],direction:"forward"},options:t})}const i=Pw(this);Dw.set(this,{value:e,selection:{ranges:i.readOnly?[[0,0]]:[[0,-1]],direction:"forward"},options:i})}hasFocus(){var e,t;return null!==(t=null===(e=this._mathfield)||void 0===e?void 0:e.hasFocus())&&void 0!==t&&t}get virtualKeyboardState(){var e,t;return null!==(t=null===(e=this._mathfield)||void 0===e?void 0:e.virtualKeyboardState)&&void 0!==t?t:"hidden"}set virtualKeyboardState(e){this._mathfield&&(this._mathfield.virtualKeyboardState=e)}focus(){super.focus()}blur(){var e;null===(e=this._mathfield)||void 0===e||e.blur(),super.blur()}select(){var e;null===(e=this._mathfield)||void 0===e||e.select()}insert(e,t){var i,r;return null!==(r=null===(i=this._mathfield)||void 0===i?void 0:i.insert(e,t))&&void 0!==r&&r}applyStyle(e,t){var i;return null===(i=this._mathfield)||void 0===i?void 0:i.applyStyle(e,t)}get caretPoint(){var e,t;return null!==(t=null===(e=this._mathfield)||void 0===e?void 0:e.getCaretPoint())&&void 0!==t?t:null}set caretPoint(e){var t;e&&(null===(t=this._mathfield)||void 0===t||t.setCaretPoint(e.x,e.y))}setCaretPoint(e,t){var i,r;return null!==(r=null===(i=this._mathfield)||void 0===i?void 0:i.setCaretPoint(e,t))&&void 0!==r&&r}connectedCallback(){var e,t;this.hasAttribute("role")||this.setAttribute("role","textbox"),this.setAttribute("dir","ltr"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("contenteditable","true"),this.setAttribute("aria-multiline","false"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const i=this.shadowRoot.querySelector("slot:not([name])");try{this._style=i.assignedElements().filter((e=>"style"===e.tagName.toLowerCase())).map((e=>e.textContent)).join("")}catch(n){console.log(n)}if(this._style){const e=document.createElement("style");e.textContent=this._style,this.shadowRoot.appendChild(e)}try{const e=i.assignedElements().filter((e=>"script"===e.tagName.toLowerCase()&&"application/json"===e.type)).map((e=>e.textContent)).join("");e&&this.setOptions(JSON.parse(e))}catch(n){console.log(n)}let r="";if(r=this.hasAttribute("value")?null!==(e=this.getAttribute("value"))&&void 0!==e?e:"":null!==(t=null===i||void 0===i?void 0:i.assignedNodes().map((e=>3===e.nodeType?e.textContent:"")).join("").trim())&&void 0!==t?t:"",this._mathfield=new Tw(this.shadowRoot.querySelector(":host > div"),{eventSink:this,...Dw.has(this)?Dw.get(this).options:Pw(this),value:r}),!Dw.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const e of Object.keys(Ow.optionsAttributes))this.upgradeProperty(Rw(e))}this._mathfield&&this._mathfield.model?(Dw.has(this)&&this._mathfield.model.deferNotifications({content:!1,selection:!1},(()=>{const e=Dw.get(this).value;void 0!==e&&this._mathfield.setValue(e),this._mathfield.model.selection=Dw.get(this).selection,Dw.delete(this)})),i.addEventListener("slotchange",(e=>{if(e.target!==i)return;const t=i.assignedNodes().map((e=>3===e.nodeType?e.textContent:"")).join("").trim();t!==this._slotValue&&(this._mathfield?this._mathfield.setValue(t):this.value=t)})),this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))):this._mathfield=null}disconnectedCallback(){if(this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})),!this._mathfield)return;const e=Af(this._mathfield.options,Object.keys(Ow.optionsAttributes).map((e=>Rw(e))));Dw.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,options:e}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(e){if(this.hasOwnProperty(e)){const t=this[e];delete this[e],"readonly"!==e&&"read-only"!==e||(e="readOnly"),this[e]=t}}attributeChangedCallback(e,t,i){if(t===i)return;const r=null!==i;switch(e){case"disabled":this.disabled=r;break;case"read-only":case"readonly":this.readOnly=r;break}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(e){const t=Boolean(e);t?(this.setAttribute("readonly",""),this.setAttribute("disabled","")):(this.removeAttribute("readonly"),this.removeAttribute("read-only"),this.removeAttribute("disabled")),this.setAttribute("aria-disabled",t?"true":"false"),this.setOptions({readOnly:t})}get disabled(){return this.hasAttribute("disabled")}set disabled(e){const t=Boolean(e);t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this.setAttribute("aria-disabled",t?"true":"false"),this.setOptions({readOnly:t})}get value(){return this.getValue()}set value(e){this.setValue(e)}get defaultMode(){return this.getOption("defaultMode")}set defaultMode(e){this.setOptions({defaultMode:e})}get fontsDirectory(){return this.getOption("fontsDirectory")}set fontsDirectory(e){this.setOptions({fontsDirectory:e})}get mathModeSpace(){return this.getOption("fontsDirectory")}set mathModeSpace(e){this.setOptions({mathModeSpace:e})}get inlineShortcutTimeout(){return this.getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(e){this.setOptions({inlineShortcutTimeout:e})}get keypressVibration(){return this.getOption("keypressVibration")}set keypressVibration(e){this.setOptions({keypressVibration:e})}get keypressSound(){return this.getOption("keypressSound")}set keypressSound(e){this.setOptions({keypressSound:e})}get plonkSound(){var e;return null!==(e=this.getOption("plonkSound"))&&void 0!==e?e:null}set plonkSound(e){this.setOptions({plonkSound:e})}get letterShapeStyle(){return this.getOption("letterShapeStyle")}set letterShapeStyle(e){this.setOptions({letterShapeStyle:e})}get locale(){return this.getOption("locale")}set locale(e){this.setOptions({locale:e})}get readOnly(){return this.getOption("readOnly")}set readOnly(e){this.setOptions({readOnly:e})}get removeExtraneousParentheses(){return this.getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(e){this.setOptions({removeExtraneousParentheses:e})}get smartFence(){return this.getOption("smartFence")}set smartFence(e){this.setOptions({smartFence:e})}get smartMode(){return this.getOption("smartMode")}set smartMode(e){this.setOptions({smartMode:e})}get smartSuperscript(){return this.getOption("smartSuperscript")}set smartSuperscript(e){this.setOptions({smartSuperscript:e})}get speechEngine(){return this.getOption("speechEngine")}set speechEngine(e){this.setOptions({speechEngine:e})}get speechEngineRate(){return this.getOption("speechEngineRate")}set speechEngineRate(e){this.setOptions({speechEngineRate:e})}get speechEngineVoice(){return this.getOption("speechEngineVoice")}set speechEngineVoice(e){this.setOptions({speechEngineVoice:e})}get textToSpeechMarkup(){return this.getOption("textToSpeechMarkup")}set textToSpeechMarkup(e){this.setOptions({textToSpeechMarkup:e})}get textToSpeechRules(){return this.getOption("textToSpeechRules")}set textToSpeechRule(e){this.setOptions({textToSpeechRules:e})}get virtualKeyboardLayout(){return this.getOption("virtualKeyboardLayout")}set virtualKeyboardLayout(e){this.setOptions({virtualKeyboardLayout:e})}get virtualKeyboardMode(){return this.getOption("virtualKeyboardMode")}set virtualKeyboardMode(e){this.setOptions({virtualKeyboardMode:e})}get virtualKeyboardTheme(){return this.getOption("virtualKeyboardTheme")}set virtualKeyboardTheme(e){this.setOptions({virtualKeyboardTheme:e})}get virtualKeyboards(){return this.getOption("virtualKeyboards")}set virtualKeyboards(e){this.setOptions({virtualKeyboards:e})}get useSharedVirtualKeyboard(){return this.getOption("useSharedVirtualKeyboard")}set useSharedVirtualKeyboard(e){this.setOptions({useSharedVirtualKeyboard:e})}get sharedVirtualKeyboardTargetOrigin(){return this.getOption("sharedVirtualKeyboardTargetOrigin")}set sharedVirtualKeyboardTargetOrigin(e){this.setOptions({sharedVirtualKeyboardTargetOrigin:e})}get selection(){return this._mathfield?this._mathfield.model.selection:Dw.has(this)?Dw.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(e){"number"===typeof e&&(e={ranges:[[e,e]]}),this._mathfield?this._mathfield.model.selection=e:Dw.has(this)?Dw.set(this,{...Dw.get(this),selection:e}):Dw.set(this,{value:void 0,selection:e,options:Pw(this)})}get selectionIsCollapsed(){const e=this.selection;return 1===e.ranges.length&&e.ranges[0][0]===e.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Dw.has(this)?Dw.get(this).selection.ranges[0][0]:0}set position(e){this._mathfield&&(this._mathfield.model.position=e),Dw.has(this)?Dw.set(this,{...Dw.get(this),selection:{ranges:[[e,e]]}}):Dw.set(this,{value:void 0,selection:{ranges:[[e,e]]},options:Pw(this)})}getOffsetDepth(e){var t,i;return this._mathfield&&null!==(i=(null===(t=this._mathfield.model.at(e))||void 0===t?void 0:t.treeDepth)-2)&&void 0!==i?i:0}get lastOffset(){var e,t;return null!==(t=null===(e=this._mathfield)||void 0===e?void 0:e.model.lastOffset)&&void 0!==t?t:-1}}function Rw(e){return e.toLowerCase().replace(/[^a-zA-Z\d]+(.)/g,((e,t)=>t.toUpperCase()))}function Fw(e){const t=Sf(),i=e.getOptions();Object.keys(Ow.optionsAttributes).forEach((r=>{const n=Rw(r);"on/off"===Ow.optionsAttributes[r]?t[n]!==i[n]?e.setAttribute(r,i[n]?"on":"off"):e.removeAttribute(r):t[n]!==i[n]&&("boolean"===Ow.optionsAttributes[r]?i[n]?e.setAttribute(r,""):e.removeAttribute(r):"string"!==typeof i[n]&&"number"!==typeof i[n]||e.setAttribute(r,i[n].toString()))}))}function Pw(e){const t={},i=Ow.optionsAttributes;return Object.keys(i).forEach((r=>{if(e.hasAttribute(r)){const n=e.getAttribute(r);"boolean"===i[r]?t[Rw(r)]=!0:"on/off"===i[r]?t[Rw(r)]="on"===n||"off"!==n&&void 0:"number"===i[r]?t[Rw(r)]=Number.parseFloat(null!==n&&void 0!==n?n:"0"):t[Rw(r)]=n}else"boolean"===i[r]&&(t[Rw(r)]=!1)})),t}ys()&&!(null===(Bw=window.customElements)||void 0===Bw?void 0:Bw.get("math-field"))&&(window.MathfieldElement=Ow,window.mathlive={version:"0.79.0"},null===(Iw=window.customElements)||void 0===Iw||Iw.define("math-field",Ow));Gd.FUNCTIONS,Gd.MATH_SYMBOLS,Gd.TEXT_SYMBOLS,Gd.ENVIRONMENTS,Gd.DEFAULT_KEYBINDINGS,Gd.getKeybindingMarkup;var Vw=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let Uw=class extends ss{constructor(...e){super(...e),Do(this,"isAnswerVisible",void 0),Do(this,"question",void 0),Do(this,"answer",void 0),Do(this,"textInput","")}handleInput(){let e=this.$refs["mathField"].getValue("latex");console.log(e)}get mathField(){return this.$refs["mathField"]}get mathFieldTeX(){return this.mathField.getValue("latex")}};Uw=Vw([ls({props:{isAnswerVisible:Boolean,isTextboxEnabled:Boolean,question:String,answer:String,index:Number},components:{MathJax:fs}})],Uw);var Kw=Uw,Hw=(i(5432),i(89));const Gw=(0,Hw.Z)(Kw,[["render",ps],["__scopeId","data-v-db9ea94c"]]);var jw=Gw;class Qw{constructor(e,t){Do(this,"question",""),Do(this,"answer",""),this.question=e,this.answer=t}}var Ww=i(5923),Zw=i.n(Ww);function Yw(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Xw(e){return e[Yw(0,e.length-1)]}const Jw={random:Yw,pickFromArray:Xw},$w=["sin","cos","tan","csc","sec","cot"],ex={sin:["0","\\frac{\\pi}{6}","\\frac{\\pi}{4}","\\frac{\\pi}{3}","\\frac{\\pi}{2}","-\\frac{\\pi}{6}","-\\frac{\\pi}{4}","-\\frac{\\pi}{3}","-\\frac{\\pi}{2}"],csc:["\\frac{\\pi}{6}","\\frac{\\pi}{4}","\\frac{\\pi}{3}","\\frac{\\pi}{2}","-\\frac{\\pi}{6}","-\\frac{\\pi}{4}","-\\frac{\\pi}{3}","-\\frac{\\pi}{2}"],cos:["0","\\frac{\\pi}{6}","\\frac{\\pi}{4}","\\frac{\\pi}{3}","\\frac{\\pi}{2}","\\frac{2\\pi}{3}","\\frac{3\\pi}{4}","\\frac{5\\pi}{6}","\\pi"],sec:["0","\\frac{\\pi}{6}","\\frac{\\pi}{4}","\\frac{\\pi}{3}","\\frac{\\pi}{2}","\\frac{2\\pi}{3}","\\frac{3\\pi}{4}","\\frac{5\\pi}{6}","\\pi"],tan:["\\frac{\\pi}{6}","\\frac{\\pi}{4}","\\frac{\\pi}{3}","-\\frac{\\pi}{6}","-\\frac{\\pi}{4}","-\\frac{\\pi}{3}"],cot:["\\frac{\\pi}{6}","\\frac{\\pi}{4}","\\frac{\\pi}{3}","\\frac{\\pi}{2}","\\frac{2\\pi}{3}","\\frac{3\\pi}{4}","\\frac{5\\pi}{6}","\\pi"]},tx=[{limit:"\\lim_{x \\to 0}",fn:"\\frac{\\sin(a x)}{b x}",answer:"\\frac{a}{b}",constants:["a","b"],isTeX:!0},{limit:"\\lim_{x \\to 0}",fn:"\\frac{\\sin(c x)}{x}",answer:"c",constants:["c"],isTeX:!0},{limit:"\\lim_{x \\to c}",fn:"abs(x - c)/(x - c)",answer:"DNE",constants:["c"],isTeX:!1},{limit:"\\lim_{x \\to \\infty}",fn:"sin(x)",answer:"DNE",constants:["c"],isTeX:!1}],ix={"\\sin(x)":"\\cos(x)","\\cos(x)":"-\\sin(x)","\\tan(x)":"\\sec^2(x)","\\cot(x)":"-\\csc^2(x)","\\sec(x)":"\\sec(x)\\tan(x)","\\csc(x)":"-\\csc(x)\\cot(x)","\\sin^{-1}(x)":"\\frac{1}{\\sqrt{1 - x^2}}","\\cos^{-1}(x)":"-\\frac{1}{\\sqrt{1 - x^2}}","\\tan^{-1}(x)":"\\frac{1}{x^2 + 1}","\\cot^{-1}(x)":"-\\frac{1}{x^2 + 1}","\\sec^{-1}(x)":"\\frac{1}{|x|\\sqrt{x^2 - 1}}","\\csc^{-1}(x)":"-\\frac{1}{|x|\\sqrt{x^2 - 1}}","\\ln(x)":"\\frac{1}{x}","\\log_n(x)":"\\frac{1}{\\ln n \\cdot x}","e^x":"e^x","n^x":"\\ln n \\cdot n^x","x^n":"nx^{n - 1}","f(g(x))":"f'(g(x)) g'(x)","f(x) g(x)":"f'(x)g(x) + g'(x)f(x)","\\frac{f(x)}{g(x)}":"\\frac{f'(x)g(x) - g'(x)f(x)}{g(x)^2}"},rx={"\\textrm{If } f'(x) > 0, f(x) \\textrm{ is}":"\\textrm{increasing}","\\textrm{If } f'(x) < 0, f(x) \\textrm{ is}":"\\textrm{decreasing}","\\textrm{If } f''(x) > 0, f(x) \\textrm{ is}":"\\textrm{concave up}","\\textrm{If } f''(x) < 0, f(x) \\textrm{ is}":"\\textrm{concave down}","\\textrm{If } f'(x) \\cdot f''(x) < 0, f(x) \\textrm{is}":"\\textrm{slowing down}"},nx={"A_\\textrm{circle}":"\\pi r^2","C_\\textrm{circle}":"2\\pi r","V_\\textrm{cylinder}":"\\pi r^2 h","SA_\\textrm{cylinder}":"2\\pi r h + 2\\pi r^2","V_\\textrm{sphere}":"\\frac{4}{3} \\pi r^3","SA_\\textrm{sphere}":"4 \\pi r^2","A_\\textrm{trapezoid}":"\\frac{b_1 + b_2}{2} \\cdot h"},ax={"\\frac{d}{dt} s(t)":"v(t)","\\frac{d}{dt} v(t)":"a(t)","\\frac{d^2}{dt^2} s(t)":"a(t)","\\int v(t) dt":"s(t)","\\int a(t) dt":"v(t)","\\int \\int a(t) dt^2":"s(t)"},ox={"\\sin^2(x) + \\cos^2(x)":"1","\\sec^2(x)":"\\tan^2(x) + 1","\\csc^2(x)":"\\cot^2(x) + 1","\\tan^2(x) + 1":"\\sec^2(x)","\\cot^2(x) + 1":"\\csc^2(x)","\\sin(a + b)":"\\sin a \\cos b + \\cos a \\sin b","\\sin(a - b)":"\\sin a \\cos b - \\cos a \\sin b","\\cos(a + b)":"\\cos a \\cos b - \\sin a \\sin b","\\cos(a - b)":"\\cos a \\cos b + \\sin a \\sin b","\\sin(2x)":"2\\sin x \\cos x","\\cos^2(x) - \\sin^2(x)":"\\cos(2x)","2\\cos^2(x) - 1":"\\cos(2x)","1 - 2\\sin^2(x)":"\\cos(2x)","\\tan(2x)":"\\frac{2 \\tan x}{1 - \\tan^2 x}"},sx={"\\int x^n dx":"\\frac{x^{n + 1}}{n + 1}","\\int (f(x) + g(x))dx":"\\int f(x)dx + \\int g(x)dx","\\int_a^b f(x)dx + \\int_b^c f(x)dx":"\\int_a^c f(x)dx","F(b) - F(a)":"\\int_a^b f(x)dx","\\frac{d}{dx} \\int_a^x f(t)dt":"f(x)","\\textrm{Average value of } f(x)":"\\frac{1}{b - a} \\int_a^b f(x)dx","F(x) + C":"\\int f(x)dx","\\int x^{-1} dx":"\\ln|x| + C"};function lx(){let e=Jw.pickFromArray([4,6]),t=Jw.random(0,2*e),i=`\\frac{${t} \\pi}{${e}}`,r=Zw().convertFromLaTeX(i);return console.log(i),console.log(r),r}function ux(){let e=lx(),t=e.toTeX().replace("\\cdot",""),i=Jw.pickFromArray($w);t=`\\${i}(${t})`;let r="\\textrm{undefined}";try{r="sec"==i&&"0"==e.text()?"1":Zw().convertFromLaTeX(t).toTeX()}catch(_a){if(_a instanceof Error&&_a.message.startsWith("tan is undefined for"))return new Qw(t,"\\textrm{undefined}")}return new Qw(t,r)}function cx(){let e,t=Jw.pickFromArray($w),i=Jw.pickFromArray(ex[t]),r=`\\${t}(${i})`;return e="0"==i&&"sec"==t?Zw()("1"):Zw().convertFromLaTeX(r),new Qw(`\\${t}^{-1}(${e.toTeX()})`,i)}function hx(){let e=Jw.pickFromArray(Object.keys(ox)),t=ox[e];return new Qw(e,t)}function dx(){let e=Jw.pickFromArray(tx),t=e.limit,i=e.isTeX?Zw().convertFromLaTeX(e.fn):Zw()(e.fn),r=e.isTeX?Zw().convertFromLaTeX(e.answer):Zw()(e.answer);return e.constants.forEach((n=>{let a=Jw.random(1,9).toString();console.log(`Substituting ${n} for ${a}`),t=e.limit.replaceAll(n,a),i=i.sub(n,a).evaluate(),r=r.sub(n,a)})),new Qw(`${t} ${i.toTeX()}`,r.toTeX())}function px(){let e=Jw.pickFromArray(Object.keys(ix));return new Qw(`\\frac{d}{dx} ${e}`,ix[e])}function mx(){let e=Jw.pickFromArray(Object.keys(rx));return new Qw(e,rx[e])}function fx(){let e=Jw.pickFromArray(Object.keys(nx));return new Qw(e,nx[e])}function gx(){let e=Jw.pickFromArray(Object.keys(ax));return new Qw(e,ax[e])}function vx(){let e=Jw.pickFromArray(Object.keys(sx));return new Qw(e,sx[e])}function yx(e){let t=Object.keys(e).filter((t=>e[t].enabled)).map((t=>e[t].fn));return Jw.pickFromArray(t)()}const bx={pickRandomTrigQuestion:ux,pickRandomInverseTrigQuestion:cx,pickRandomTrigIdentity:hx,pickRandomLimit:dx,pickRandomDerivative:px,pickRandomGraphAnalysis:mx,pickRandomGeometry:fx,pickRandomPhysics:gx,pickRandomIntegrationRule:vx};var wx=bx,xx=function(e,t,i,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(t,i,o):n(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};let Ax=class extends ss{constructor(...e){super(...e),Do(this,"interval",NaN),Do(this,"timeLeft",0),Do(this,"questions",[]),Do(this,"isTextboxEnabled",!1),Do(this,"categories",{trig:{enabled:!0,fn:wx.pickRandomTrigQuestion},inverseTrig:{enabled:!0,fn:wx.pickRandomInverseTrigQuestion},trigIdentities:{enabled:!0,fn:wx.pickRandomTrigIdentity},limits:{enabled:!0,fn:wx.pickRandomLimit},derivatives:{enabled:!0,fn:wx.pickRandomDerivative},graphAnalysis:{enabled:!0,fn:wx.pickRandomGraphAnalysis},physics:{enabled:!0,fn:wx.pickRandomPhysics},geometry:{enabled:!0,fn:wx.pickRandomGeometry},integrationRules:{enabled:!0,fn:wx.pickRandomIntegrationRule}}),Do(this,"quizDuration",120)}get isRunning(){return!Number.isNaN(this.interval)}get timeLeftFormatted(){let e=String(Math.floor(this.timeLeft/60)).padStart(2,"0"),t=String(this.timeLeft%60).padStart(2,"0");return e+":"+t}mounted(){for(let e=0;e<10;e++)this.questions.push(new Qw(`\\textrm{Question } ${e+1}`,""))}stopQuiz(){clearInterval(this.interval),this.interval=NaN,console.log("Finished!!")}pickQuestions(){this.questions.splice(0,this.questions.length);for(let e=0;e<10;e++)this.questions.push(yx(this.categories))}startQuiz(){this.isRunning?this.stopQuiz():(this.timeLeft=this.quizDuration,this.pickQuestions(),this.interval=setInterval((()=>{--this.timeLeft<=0&&this.stopQuiz()}),1e3))}};Ax=xx([ls({components:{QuestionRenderer:jw}})],Ax);var kx=Ax;i(761);const Sx=(0,Hw.Z)(kx,[["render",qo]]);var Mx=Sx;class Nx{constructor(e,t,i){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=i}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Nx(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class zx{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new zx(t,Nx.range(this,e))}}class Lx{constructor(e,t){this.position=void 0;var i,r="KaTeX parse error: "+e,n=t&&t.loc;if(n&&n.start<=n.end){var a=n.lexer.input;i=n.start;var o=n.end;i===a.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ";var s,l,u=a.slice(i,o).replace(/[^]/g,"$&̲");s=i>15?"…"+a.slice(i-15,i):a.slice(0,i),l=o+15":">","<":"<",'"':""","'":"'"},Ix=/[&><"']/g;function qx(e){return String(e).replace(Ix,(e=>Bx[e]))}var Dx=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},Ox=function(e){var t=Dx(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},Rx=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Fx=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"},Px={contains:Cx,deflt:Ex,escape:qx,hyphenate:Tx,getBaseElem:Dx,isCharacterBox:Ox,protocolFromUrl:Fx},Vx={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Ux(e){if(e.default)return e.default;var t=e.type,i=Array.isArray(t)?t[0]:t;if("string"!==typeof i)return i.enum[0];switch(i){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Kx{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Vx)if(Vx.hasOwnProperty(t)){var i=Vx[t];this[t]=void 0!==e[t]?i.processor?i.processor(e[t]):e[t]:Ux(i)}}reportNonstrict(e,t,i){var r=this.strict;if("function"===typeof r&&(r=r(e,t,i)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new Lx("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===r?"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,i){var r=this.strict;if("function"===typeof r)try{r=r(e,t,i)}catch(n){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){e.url&&!e.protocol&&(e.protocol=Px.protocolFromUrl(e.url));var t="function"===typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class Hx{constructor(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}sup(){return $x[eA[this.id]]}sub(){return $x[tA[this.id]]}fracNum(){return $x[iA[this.id]]}fracDen(){return $x[rA[this.id]]}cramp(){return $x[nA[this.id]]}text(){return $x[aA[this.id]]}isTight(){return this.size>=2}}var Gx=0,jx=1,Qx=2,Wx=3,Zx=4,Yx=5,Xx=6,Jx=7,$x=[new Hx(Gx,0,!1),new Hx(jx,0,!0),new Hx(Qx,1,!1),new Hx(Wx,1,!0),new Hx(Zx,2,!1),new Hx(Yx,2,!0),new Hx(Xx,3,!1),new Hx(Jx,3,!0)],eA=[Zx,Yx,Zx,Yx,Xx,Jx,Xx,Jx],tA=[Yx,Yx,Yx,Yx,Jx,Jx,Jx,Jx],iA=[Qx,Wx,Zx,Yx,Xx,Jx,Xx,Jx],rA=[Wx,Wx,Yx,Yx,Jx,Jx,Jx,Jx],nA=[jx,jx,Wx,Wx,Yx,Yx,Jx,Jx],aA=[Gx,jx,Qx,Wx,Qx,Wx,Qx,Wx],oA={DISPLAY:$x[Gx],TEXT:$x[Qx],SCRIPT:$x[Zx],SCRIPTSCRIPT:$x[Xx]},sA=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function lA(e){for(var t=0;t=n[0]&&e<=n[1])return i.name}return null}var uA=[];function cA(e){for(var t=0;t=uA[t]&&e<=uA[t+1])return!0;return!1}sA.forEach((e=>e.blocks.forEach((e=>uA.push(...e)))));var hA=80,dA=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},pA=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},mA=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},fA=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"},gA=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},vA=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},yA=function(e,t,i){var r=i-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+r+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"},bA=function(e,t,i){t*=1e3;var r="";switch(e){case"sqrtMain":r=dA(t,hA);break;case"sqrtSize1":r=pA(t,hA);break;case"sqrtSize2":r=mA(t,hA);break;case"sqrtSize3":r=fA(t,hA);break;case"sqrtSize4":r=gA(t,hA);break;case"sqrtTall":r=yA(t,hA,i)}return r},wA=function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}},xA={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class AA{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Px.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText();return this.children.map(e).join("")}}var kA={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},SA={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],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},MA={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"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 NA(e,t){kA[e]=t}function zA(e,t,i){if(!kA[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),n=kA[t][r];if(!n&&e[0]in MA&&(r=MA[e[0]].charCodeAt(0),n=kA[t][r]),n||"text"!==i||cA(r)&&(n=kA[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var LA={};function CA(e){var t;if(t=e>=5?0:e>=3?1:2,!LA[t]){var i=LA[t]={cssEmPerMu:SA.quad[t]/18};for(var r in SA)SA.hasOwnProperty(r)&&(i[r]=SA[r][t])}return LA[t]}var EA=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],_A=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],TA=function(e,t){return t.size<2?e:EA[e-1][t.size-1]};class BA{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||BA.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=_A[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return new BA(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:TA(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:_A[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=TA(BA.BASESIZE,e);return this.size===t&&this.textSize===BA.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==BA.BASESIZE?["sizing","reset-size"+this.size,"size"+BA.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=CA(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}BA.BASESIZE=6;var IA={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},qA={ex:!0,em:!0,mu:!0},DA=function(e){return"string"!==typeof e&&(e=e.unit),e in IA||e in qA||"ex"===e},OA=function(e,t){var i;if(e.unit in IA)i=IA[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Lx("Invalid unit: '"+e.unit+"'");i=r.fontMetrics().quad}r!==t&&(i*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},RA=function(e){return+e.toFixed(4)+"em"},FA=function(e){return e.filter((e=>e)).join(" ")},PA=function(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},VA=function(e){var t=document.createElement(e);for(var i in t.className=FA(this.classes),this.style)this.style.hasOwnProperty(i)&&(t.style[i]=this.style[i]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var n=0;n",t};class KA{constructor(e,t,i,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,PA.call(this,e,i,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Px.contains(this.classes,e)}toNode(){return VA.call(this,"span")}toMarkup(){return UA.call(this,"span")}}class HA{constructor(e,t,i,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,PA.call(this,t,r),this.children=i||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Px.contains(this.classes,e)}toNode(){return VA.call(this,"a")}toMarkup(){return UA.call(this,"a")}}class GA{constructor(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=i}hasClass(e){return Px.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=""+this.alt+"0&&(t=document.createElement("span"),t.style.marginRight=RA(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=FA(this.classes)),this.style)this.style.hasOwnProperty(i)&&(t=t||document.createElement("span"),t.style[i]=this.style[i]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(i+=Px.hyphenate(r)+":"+this.style[r]+";");i&&(e=!0,t+=' style="'+Px.escape(i)+'"');var n=Px.escape(this.text);return e?(t+=">",t+=n,t+="",t):n}}class WA{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var i in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,i)&&t.setAttribute(i,this.attributes[i]);for(var r=0;r":""}}class YA{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var i in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,i)&&t.setAttribute(i,this.attributes[i]);return t}toMarkup(){var e=" but got "+String(e)+".")}var $A={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ek={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},tk={math:{},text:{}};function ik(e,t,i,r,n,a){tk[e][n]={font:t,group:i,replace:r},a&&r&&(tk[e][r]=tk[e][n])}var rk="math",nk="text",ak="main",ok="ams",sk="accent-token",lk="bin",uk="close",ck="inner",hk="mathord",dk="op-token",pk="open",mk="punct",fk="rel",gk="spacing",vk="textord";ik(rk,ak,fk,"≡","\\equiv",!0),ik(rk,ak,fk,"≺","\\prec",!0),ik(rk,ak,fk,"≻","\\succ",!0),ik(rk,ak,fk,"∼","\\sim",!0),ik(rk,ak,fk,"⊥","\\perp"),ik(rk,ak,fk,"⪯","\\preceq",!0),ik(rk,ak,fk,"⪰","\\succeq",!0),ik(rk,ak,fk,"≃","\\simeq",!0),ik(rk,ak,fk,"∣","\\mid",!0),ik(rk,ak,fk,"≪","\\ll",!0),ik(rk,ak,fk,"≫","\\gg",!0),ik(rk,ak,fk,"≍","\\asymp",!0),ik(rk,ak,fk,"∥","\\parallel"),ik(rk,ak,fk,"⋈","\\bowtie",!0),ik(rk,ak,fk,"⌣","\\smile",!0),ik(rk,ak,fk,"⊑","\\sqsubseteq",!0),ik(rk,ak,fk,"⊒","\\sqsupseteq",!0),ik(rk,ak,fk,"≐","\\doteq",!0),ik(rk,ak,fk,"⌢","\\frown",!0),ik(rk,ak,fk,"∋","\\ni",!0),ik(rk,ak,fk,"∝","\\propto",!0),ik(rk,ak,fk,"⊢","\\vdash",!0),ik(rk,ak,fk,"⊣","\\dashv",!0),ik(rk,ak,fk,"∋","\\owns"),ik(rk,ak,mk,".","\\ldotp"),ik(rk,ak,mk,"⋅","\\cdotp"),ik(rk,ak,vk,"#","\\#"),ik(nk,ak,vk,"#","\\#"),ik(rk,ak,vk,"&","\\&"),ik(nk,ak,vk,"&","\\&"),ik(rk,ak,vk,"ℵ","\\aleph",!0),ik(rk,ak,vk,"∀","\\forall",!0),ik(rk,ak,vk,"ℏ","\\hbar",!0),ik(rk,ak,vk,"∃","\\exists",!0),ik(rk,ak,vk,"∇","\\nabla",!0),ik(rk,ak,vk,"♭","\\flat",!0),ik(rk,ak,vk,"ℓ","\\ell",!0),ik(rk,ak,vk,"♮","\\natural",!0),ik(rk,ak,vk,"♣","\\clubsuit",!0),ik(rk,ak,vk,"℘","\\wp",!0),ik(rk,ak,vk,"♯","\\sharp",!0),ik(rk,ak,vk,"♢","\\diamondsuit",!0),ik(rk,ak,vk,"ℜ","\\Re",!0),ik(rk,ak,vk,"♡","\\heartsuit",!0),ik(rk,ak,vk,"ℑ","\\Im",!0),ik(rk,ak,vk,"♠","\\spadesuit",!0),ik(rk,ak,vk,"§","\\S",!0),ik(nk,ak,vk,"§","\\S"),ik(rk,ak,vk,"¶","\\P",!0),ik(nk,ak,vk,"¶","\\P"),ik(rk,ak,vk,"†","\\dag"),ik(nk,ak,vk,"†","\\dag"),ik(nk,ak,vk,"†","\\textdagger"),ik(rk,ak,vk,"‡","\\ddag"),ik(nk,ak,vk,"‡","\\ddag"),ik(nk,ak,vk,"‡","\\textdaggerdbl"),ik(rk,ak,uk,"⎱","\\rmoustache",!0),ik(rk,ak,pk,"⎰","\\lmoustache",!0),ik(rk,ak,uk,"⟯","\\rgroup",!0),ik(rk,ak,pk,"⟮","\\lgroup",!0),ik(rk,ak,lk,"∓","\\mp",!0),ik(rk,ak,lk,"⊖","\\ominus",!0),ik(rk,ak,lk,"⊎","\\uplus",!0),ik(rk,ak,lk,"⊓","\\sqcap",!0),ik(rk,ak,lk,"∗","\\ast"),ik(rk,ak,lk,"⊔","\\sqcup",!0),ik(rk,ak,lk,"◯","\\bigcirc",!0),ik(rk,ak,lk,"∙","\\bullet",!0),ik(rk,ak,lk,"‡","\\ddagger"),ik(rk,ak,lk,"≀","\\wr",!0),ik(rk,ak,lk,"⨿","\\amalg"),ik(rk,ak,lk,"&","\\And"),ik(rk,ak,fk,"⟵","\\longleftarrow",!0),ik(rk,ak,fk,"⇐","\\Leftarrow",!0),ik(rk,ak,fk,"⟸","\\Longleftarrow",!0),ik(rk,ak,fk,"⟶","\\longrightarrow",!0),ik(rk,ak,fk,"⇒","\\Rightarrow",!0),ik(rk,ak,fk,"⟹","\\Longrightarrow",!0),ik(rk,ak,fk,"↔","\\leftrightarrow",!0),ik(rk,ak,fk,"⟷","\\longleftrightarrow",!0),ik(rk,ak,fk,"⇔","\\Leftrightarrow",!0),ik(rk,ak,fk,"⟺","\\Longleftrightarrow",!0),ik(rk,ak,fk,"↦","\\mapsto",!0),ik(rk,ak,fk,"⟼","\\longmapsto",!0),ik(rk,ak,fk,"↗","\\nearrow",!0),ik(rk,ak,fk,"↩","\\hookleftarrow",!0),ik(rk,ak,fk,"↪","\\hookrightarrow",!0),ik(rk,ak,fk,"↘","\\searrow",!0),ik(rk,ak,fk,"↼","\\leftharpoonup",!0),ik(rk,ak,fk,"⇀","\\rightharpoonup",!0),ik(rk,ak,fk,"↙","\\swarrow",!0),ik(rk,ak,fk,"↽","\\leftharpoondown",!0),ik(rk,ak,fk,"⇁","\\rightharpoondown",!0),ik(rk,ak,fk,"↖","\\nwarrow",!0),ik(rk,ak,fk,"⇌","\\rightleftharpoons",!0),ik(rk,ok,fk,"≮","\\nless",!0),ik(rk,ok,fk,"","\\@nleqslant"),ik(rk,ok,fk,"","\\@nleqq"),ik(rk,ok,fk,"⪇","\\lneq",!0),ik(rk,ok,fk,"≨","\\lneqq",!0),ik(rk,ok,fk,"","\\@lvertneqq"),ik(rk,ok,fk,"⋦","\\lnsim",!0),ik(rk,ok,fk,"⪉","\\lnapprox",!0),ik(rk,ok,fk,"⊀","\\nprec",!0),ik(rk,ok,fk,"⋠","\\npreceq",!0),ik(rk,ok,fk,"⋨","\\precnsim",!0),ik(rk,ok,fk,"⪹","\\precnapprox",!0),ik(rk,ok,fk,"≁","\\nsim",!0),ik(rk,ok,fk,"","\\@nshortmid"),ik(rk,ok,fk,"∤","\\nmid",!0),ik(rk,ok,fk,"⊬","\\nvdash",!0),ik(rk,ok,fk,"⊭","\\nvDash",!0),ik(rk,ok,fk,"⋪","\\ntriangleleft"),ik(rk,ok,fk,"⋬","\\ntrianglelefteq",!0),ik(rk,ok,fk,"⊊","\\subsetneq",!0),ik(rk,ok,fk,"","\\@varsubsetneq"),ik(rk,ok,fk,"⫋","\\subsetneqq",!0),ik(rk,ok,fk,"","\\@varsubsetneqq"),ik(rk,ok,fk,"≯","\\ngtr",!0),ik(rk,ok,fk,"","\\@ngeqslant"),ik(rk,ok,fk,"","\\@ngeqq"),ik(rk,ok,fk,"⪈","\\gneq",!0),ik(rk,ok,fk,"≩","\\gneqq",!0),ik(rk,ok,fk,"","\\@gvertneqq"),ik(rk,ok,fk,"⋧","\\gnsim",!0),ik(rk,ok,fk,"⪊","\\gnapprox",!0),ik(rk,ok,fk,"⊁","\\nsucc",!0),ik(rk,ok,fk,"⋡","\\nsucceq",!0),ik(rk,ok,fk,"⋩","\\succnsim",!0),ik(rk,ok,fk,"⪺","\\succnapprox",!0),ik(rk,ok,fk,"≆","\\ncong",!0),ik(rk,ok,fk,"","\\@nshortparallel"),ik(rk,ok,fk,"∦","\\nparallel",!0),ik(rk,ok,fk,"⊯","\\nVDash",!0),ik(rk,ok,fk,"⋫","\\ntriangleright"),ik(rk,ok,fk,"⋭","\\ntrianglerighteq",!0),ik(rk,ok,fk,"","\\@nsupseteqq"),ik(rk,ok,fk,"⊋","\\supsetneq",!0),ik(rk,ok,fk,"","\\@varsupsetneq"),ik(rk,ok,fk,"⫌","\\supsetneqq",!0),ik(rk,ok,fk,"","\\@varsupsetneqq"),ik(rk,ok,fk,"⊮","\\nVdash",!0),ik(rk,ok,fk,"⪵","\\precneqq",!0),ik(rk,ok,fk,"⪶","\\succneqq",!0),ik(rk,ok,fk,"","\\@nsubseteqq"),ik(rk,ok,lk,"⊴","\\unlhd"),ik(rk,ok,lk,"⊵","\\unrhd"),ik(rk,ok,fk,"↚","\\nleftarrow",!0),ik(rk,ok,fk,"↛","\\nrightarrow",!0),ik(rk,ok,fk,"⇍","\\nLeftarrow",!0),ik(rk,ok,fk,"⇏","\\nRightarrow",!0),ik(rk,ok,fk,"↮","\\nleftrightarrow",!0),ik(rk,ok,fk,"⇎","\\nLeftrightarrow",!0),ik(rk,ok,fk,"△","\\vartriangle"),ik(rk,ok,vk,"ℏ","\\hslash"),ik(rk,ok,vk,"▽","\\triangledown"),ik(rk,ok,vk,"◊","\\lozenge"),ik(rk,ok,vk,"Ⓢ","\\circledS"),ik(rk,ok,vk,"®","\\circledR"),ik(nk,ok,vk,"®","\\circledR"),ik(rk,ok,vk,"∡","\\measuredangle",!0),ik(rk,ok,vk,"∄","\\nexists"),ik(rk,ok,vk,"℧","\\mho"),ik(rk,ok,vk,"Ⅎ","\\Finv",!0),ik(rk,ok,vk,"⅁","\\Game",!0),ik(rk,ok,vk,"‵","\\backprime"),ik(rk,ok,vk,"▲","\\blacktriangle"),ik(rk,ok,vk,"▼","\\blacktriangledown"),ik(rk,ok,vk,"■","\\blacksquare"),ik(rk,ok,vk,"⧫","\\blacklozenge"),ik(rk,ok,vk,"★","\\bigstar"),ik(rk,ok,vk,"∢","\\sphericalangle",!0),ik(rk,ok,vk,"∁","\\complement",!0),ik(rk,ok,vk,"ð","\\eth",!0),ik(nk,ak,vk,"ð","ð"),ik(rk,ok,vk,"╱","\\diagup"),ik(rk,ok,vk,"╲","\\diagdown"),ik(rk,ok,vk,"□","\\square"),ik(rk,ok,vk,"□","\\Box"),ik(rk,ok,vk,"◊","\\Diamond"),ik(rk,ok,vk,"¥","\\yen",!0),ik(nk,ok,vk,"¥","\\yen",!0),ik(rk,ok,vk,"✓","\\checkmark",!0),ik(nk,ok,vk,"✓","\\checkmark"),ik(rk,ok,vk,"ℶ","\\beth",!0),ik(rk,ok,vk,"ℸ","\\daleth",!0),ik(rk,ok,vk,"ℷ","\\gimel",!0),ik(rk,ok,vk,"ϝ","\\digamma",!0),ik(rk,ok,vk,"ϰ","\\varkappa"),ik(rk,ok,pk,"┌","\\@ulcorner",!0),ik(rk,ok,uk,"┐","\\@urcorner",!0),ik(rk,ok,pk,"└","\\@llcorner",!0),ik(rk,ok,uk,"┘","\\@lrcorner",!0),ik(rk,ok,fk,"≦","\\leqq",!0),ik(rk,ok,fk,"⩽","\\leqslant",!0),ik(rk,ok,fk,"⪕","\\eqslantless",!0),ik(rk,ok,fk,"≲","\\lesssim",!0),ik(rk,ok,fk,"⪅","\\lessapprox",!0),ik(rk,ok,fk,"≊","\\approxeq",!0),ik(rk,ok,lk,"⋖","\\lessdot"),ik(rk,ok,fk,"⋘","\\lll",!0),ik(rk,ok,fk,"≶","\\lessgtr",!0),ik(rk,ok,fk,"⋚","\\lesseqgtr",!0),ik(rk,ok,fk,"⪋","\\lesseqqgtr",!0),ik(rk,ok,fk,"≑","\\doteqdot"),ik(rk,ok,fk,"≓","\\risingdotseq",!0),ik(rk,ok,fk,"≒","\\fallingdotseq",!0),ik(rk,ok,fk,"∽","\\backsim",!0),ik(rk,ok,fk,"⋍","\\backsimeq",!0),ik(rk,ok,fk,"⫅","\\subseteqq",!0),ik(rk,ok,fk,"⋐","\\Subset",!0),ik(rk,ok,fk,"⊏","\\sqsubset",!0),ik(rk,ok,fk,"≼","\\preccurlyeq",!0),ik(rk,ok,fk,"⋞","\\curlyeqprec",!0),ik(rk,ok,fk,"≾","\\precsim",!0),ik(rk,ok,fk,"⪷","\\precapprox",!0),ik(rk,ok,fk,"⊲","\\vartriangleleft"),ik(rk,ok,fk,"⊴","\\trianglelefteq"),ik(rk,ok,fk,"⊨","\\vDash",!0),ik(rk,ok,fk,"⊪","\\Vvdash",!0),ik(rk,ok,fk,"⌣","\\smallsmile"),ik(rk,ok,fk,"⌢","\\smallfrown"),ik(rk,ok,fk,"≏","\\bumpeq",!0),ik(rk,ok,fk,"≎","\\Bumpeq",!0),ik(rk,ok,fk,"≧","\\geqq",!0),ik(rk,ok,fk,"⩾","\\geqslant",!0),ik(rk,ok,fk,"⪖","\\eqslantgtr",!0),ik(rk,ok,fk,"≳","\\gtrsim",!0),ik(rk,ok,fk,"⪆","\\gtrapprox",!0),ik(rk,ok,lk,"⋗","\\gtrdot"),ik(rk,ok,fk,"⋙","\\ggg",!0),ik(rk,ok,fk,"≷","\\gtrless",!0),ik(rk,ok,fk,"⋛","\\gtreqless",!0),ik(rk,ok,fk,"⪌","\\gtreqqless",!0),ik(rk,ok,fk,"≖","\\eqcirc",!0),ik(rk,ok,fk,"≗","\\circeq",!0),ik(rk,ok,fk,"≜","\\triangleq",!0),ik(rk,ok,fk,"∼","\\thicksim"),ik(rk,ok,fk,"≈","\\thickapprox"),ik(rk,ok,fk,"⫆","\\supseteqq",!0),ik(rk,ok,fk,"⋑","\\Supset",!0),ik(rk,ok,fk,"⊐","\\sqsupset",!0),ik(rk,ok,fk,"≽","\\succcurlyeq",!0),ik(rk,ok,fk,"⋟","\\curlyeqsucc",!0),ik(rk,ok,fk,"≿","\\succsim",!0),ik(rk,ok,fk,"⪸","\\succapprox",!0),ik(rk,ok,fk,"⊳","\\vartriangleright"),ik(rk,ok,fk,"⊵","\\trianglerighteq"),ik(rk,ok,fk,"⊩","\\Vdash",!0),ik(rk,ok,fk,"∣","\\shortmid"),ik(rk,ok,fk,"∥","\\shortparallel"),ik(rk,ok,fk,"≬","\\between",!0),ik(rk,ok,fk,"⋔","\\pitchfork",!0),ik(rk,ok,fk,"∝","\\varpropto"),ik(rk,ok,fk,"◀","\\blacktriangleleft"),ik(rk,ok,fk,"∴","\\therefore",!0),ik(rk,ok,fk,"∍","\\backepsilon"),ik(rk,ok,fk,"▶","\\blacktriangleright"),ik(rk,ok,fk,"∵","\\because",!0),ik(rk,ok,fk,"⋘","\\llless"),ik(rk,ok,fk,"⋙","\\gggtr"),ik(rk,ok,lk,"⊲","\\lhd"),ik(rk,ok,lk,"⊳","\\rhd"),ik(rk,ok,fk,"≂","\\eqsim",!0),ik(rk,ak,fk,"⋈","\\Join"),ik(rk,ok,fk,"≑","\\Doteq",!0),ik(rk,ok,lk,"∔","\\dotplus",!0),ik(rk,ok,lk,"∖","\\smallsetminus"),ik(rk,ok,lk,"⋒","\\Cap",!0),ik(rk,ok,lk,"⋓","\\Cup",!0),ik(rk,ok,lk,"⩞","\\doublebarwedge",!0),ik(rk,ok,lk,"⊟","\\boxminus",!0),ik(rk,ok,lk,"⊞","\\boxplus",!0),ik(rk,ok,lk,"⋇","\\divideontimes",!0),ik(rk,ok,lk,"⋉","\\ltimes",!0),ik(rk,ok,lk,"⋊","\\rtimes",!0),ik(rk,ok,lk,"⋋","\\leftthreetimes",!0),ik(rk,ok,lk,"⋌","\\rightthreetimes",!0),ik(rk,ok,lk,"⋏","\\curlywedge",!0),ik(rk,ok,lk,"⋎","\\curlyvee",!0),ik(rk,ok,lk,"⊝","\\circleddash",!0),ik(rk,ok,lk,"⊛","\\circledast",!0),ik(rk,ok,lk,"⋅","\\centerdot"),ik(rk,ok,lk,"⊺","\\intercal",!0),ik(rk,ok,lk,"⋒","\\doublecap"),ik(rk,ok,lk,"⋓","\\doublecup"),ik(rk,ok,lk,"⊠","\\boxtimes",!0),ik(rk,ok,fk,"⇢","\\dashrightarrow",!0),ik(rk,ok,fk,"⇠","\\dashleftarrow",!0),ik(rk,ok,fk,"⇇","\\leftleftarrows",!0),ik(rk,ok,fk,"⇆","\\leftrightarrows",!0),ik(rk,ok,fk,"⇚","\\Lleftarrow",!0),ik(rk,ok,fk,"↞","\\twoheadleftarrow",!0),ik(rk,ok,fk,"↢","\\leftarrowtail",!0),ik(rk,ok,fk,"↫","\\looparrowleft",!0),ik(rk,ok,fk,"⇋","\\leftrightharpoons",!0),ik(rk,ok,fk,"↶","\\curvearrowleft",!0),ik(rk,ok,fk,"↺","\\circlearrowleft",!0),ik(rk,ok,fk,"↰","\\Lsh",!0),ik(rk,ok,fk,"⇈","\\upuparrows",!0),ik(rk,ok,fk,"↿","\\upharpoonleft",!0),ik(rk,ok,fk,"⇃","\\downharpoonleft",!0),ik(rk,ak,fk,"⊶","\\origof",!0),ik(rk,ak,fk,"⊷","\\imageof",!0),ik(rk,ok,fk,"⊸","\\multimap",!0),ik(rk,ok,fk,"↭","\\leftrightsquigarrow",!0),ik(rk,ok,fk,"⇉","\\rightrightarrows",!0),ik(rk,ok,fk,"⇄","\\rightleftarrows",!0),ik(rk,ok,fk,"↠","\\twoheadrightarrow",!0),ik(rk,ok,fk,"↣","\\rightarrowtail",!0),ik(rk,ok,fk,"↬","\\looparrowright",!0),ik(rk,ok,fk,"↷","\\curvearrowright",!0),ik(rk,ok,fk,"↻","\\circlearrowright",!0),ik(rk,ok,fk,"↱","\\Rsh",!0),ik(rk,ok,fk,"⇊","\\downdownarrows",!0),ik(rk,ok,fk,"↾","\\upharpoonright",!0),ik(rk,ok,fk,"⇂","\\downharpoonright",!0),ik(rk,ok,fk,"⇝","\\rightsquigarrow",!0),ik(rk,ok,fk,"⇝","\\leadsto"),ik(rk,ok,fk,"⇛","\\Rrightarrow",!0),ik(rk,ok,fk,"↾","\\restriction"),ik(rk,ak,vk,"‘","`"),ik(rk,ak,vk,"$","\\$"),ik(nk,ak,vk,"$","\\$"),ik(nk,ak,vk,"$","\\textdollar"),ik(rk,ak,vk,"%","\\%"),ik(nk,ak,vk,"%","\\%"),ik(rk,ak,vk,"_","\\_"),ik(nk,ak,vk,"_","\\_"),ik(nk,ak,vk,"_","\\textunderscore"),ik(rk,ak,vk,"∠","\\angle",!0),ik(rk,ak,vk,"∞","\\infty",!0),ik(rk,ak,vk,"′","\\prime"),ik(rk,ak,vk,"△","\\triangle"),ik(rk,ak,vk,"Γ","\\Gamma",!0),ik(rk,ak,vk,"Δ","\\Delta",!0),ik(rk,ak,vk,"Θ","\\Theta",!0),ik(rk,ak,vk,"Λ","\\Lambda",!0),ik(rk,ak,vk,"Ξ","\\Xi",!0),ik(rk,ak,vk,"Π","\\Pi",!0),ik(rk,ak,vk,"Σ","\\Sigma",!0),ik(rk,ak,vk,"Υ","\\Upsilon",!0),ik(rk,ak,vk,"Φ","\\Phi",!0),ik(rk,ak,vk,"Ψ","\\Psi",!0),ik(rk,ak,vk,"Ω","\\Omega",!0),ik(rk,ak,vk,"A","Α"),ik(rk,ak,vk,"B","Β"),ik(rk,ak,vk,"E","Ε"),ik(rk,ak,vk,"Z","Ζ"),ik(rk,ak,vk,"H","Η"),ik(rk,ak,vk,"I","Ι"),ik(rk,ak,vk,"K","Κ"),ik(rk,ak,vk,"M","Μ"),ik(rk,ak,vk,"N","Ν"),ik(rk,ak,vk,"O","Ο"),ik(rk,ak,vk,"P","Ρ"),ik(rk,ak,vk,"T","Τ"),ik(rk,ak,vk,"X","Χ"),ik(rk,ak,vk,"¬","\\neg",!0),ik(rk,ak,vk,"¬","\\lnot"),ik(rk,ak,vk,"⊤","\\top"),ik(rk,ak,vk,"⊥","\\bot"),ik(rk,ak,vk,"∅","\\emptyset"),ik(rk,ok,vk,"∅","\\varnothing"),ik(rk,ak,hk,"α","\\alpha",!0),ik(rk,ak,hk,"β","\\beta",!0),ik(rk,ak,hk,"γ","\\gamma",!0),ik(rk,ak,hk,"δ","\\delta",!0),ik(rk,ak,hk,"ϵ","\\epsilon",!0),ik(rk,ak,hk,"ζ","\\zeta",!0),ik(rk,ak,hk,"η","\\eta",!0),ik(rk,ak,hk,"θ","\\theta",!0),ik(rk,ak,hk,"ι","\\iota",!0),ik(rk,ak,hk,"κ","\\kappa",!0),ik(rk,ak,hk,"λ","\\lambda",!0),ik(rk,ak,hk,"μ","\\mu",!0),ik(rk,ak,hk,"ν","\\nu",!0),ik(rk,ak,hk,"ξ","\\xi",!0),ik(rk,ak,hk,"ο","\\omicron",!0),ik(rk,ak,hk,"π","\\pi",!0),ik(rk,ak,hk,"ρ","\\rho",!0),ik(rk,ak,hk,"σ","\\sigma",!0),ik(rk,ak,hk,"τ","\\tau",!0),ik(rk,ak,hk,"υ","\\upsilon",!0),ik(rk,ak,hk,"ϕ","\\phi",!0),ik(rk,ak,hk,"χ","\\chi",!0),ik(rk,ak,hk,"ψ","\\psi",!0),ik(rk,ak,hk,"ω","\\omega",!0),ik(rk,ak,hk,"ε","\\varepsilon",!0),ik(rk,ak,hk,"ϑ","\\vartheta",!0),ik(rk,ak,hk,"ϖ","\\varpi",!0),ik(rk,ak,hk,"ϱ","\\varrho",!0),ik(rk,ak,hk,"ς","\\varsigma",!0),ik(rk,ak,hk,"φ","\\varphi",!0),ik(rk,ak,lk,"∗","*",!0),ik(rk,ak,lk,"+","+"),ik(rk,ak,lk,"−","-",!0),ik(rk,ak,lk,"⋅","\\cdot",!0),ik(rk,ak,lk,"∘","\\circ",!0),ik(rk,ak,lk,"÷","\\div",!0),ik(rk,ak,lk,"±","\\pm",!0),ik(rk,ak,lk,"×","\\times",!0),ik(rk,ak,lk,"∩","\\cap",!0),ik(rk,ak,lk,"∪","\\cup",!0),ik(rk,ak,lk,"∖","\\setminus",!0),ik(rk,ak,lk,"∧","\\land"),ik(rk,ak,lk,"∨","\\lor"),ik(rk,ak,lk,"∧","\\wedge",!0),ik(rk,ak,lk,"∨","\\vee",!0),ik(rk,ak,vk,"√","\\surd"),ik(rk,ak,pk,"⟨","\\langle",!0),ik(rk,ak,pk,"∣","\\lvert"),ik(rk,ak,pk,"∥","\\lVert"),ik(rk,ak,uk,"?","?"),ik(rk,ak,uk,"!","!"),ik(rk,ak,uk,"⟩","\\rangle",!0),ik(rk,ak,uk,"∣","\\rvert"),ik(rk,ak,uk,"∥","\\rVert"),ik(rk,ak,fk,"=","="),ik(rk,ak,fk,":",":"),ik(rk,ak,fk,"≈","\\approx",!0),ik(rk,ak,fk,"≅","\\cong",!0),ik(rk,ak,fk,"≥","\\ge"),ik(rk,ak,fk,"≥","\\geq",!0),ik(rk,ak,fk,"←","\\gets"),ik(rk,ak,fk,">","\\gt",!0),ik(rk,ak,fk,"∈","\\in",!0),ik(rk,ak,fk,"","\\@not"),ik(rk,ak,fk,"⊂","\\subset",!0),ik(rk,ak,fk,"⊃","\\supset",!0),ik(rk,ak,fk,"⊆","\\subseteq",!0),ik(rk,ak,fk,"⊇","\\supseteq",!0),ik(rk,ok,fk,"⊈","\\nsubseteq",!0),ik(rk,ok,fk,"⊉","\\nsupseteq",!0),ik(rk,ak,fk,"⊨","\\models"),ik(rk,ak,fk,"←","\\leftarrow",!0),ik(rk,ak,fk,"≤","\\le"),ik(rk,ak,fk,"≤","\\leq",!0),ik(rk,ak,fk,"<","\\lt",!0),ik(rk,ak,fk,"→","\\rightarrow",!0),ik(rk,ak,fk,"→","\\to"),ik(rk,ok,fk,"≱","\\ngeq",!0),ik(rk,ok,fk,"≰","\\nleq",!0),ik(rk,ak,gk," ","\\ "),ik(rk,ak,gk," ","\\space"),ik(rk,ak,gk," ","\\nobreakspace"),ik(nk,ak,gk," ","\\ "),ik(nk,ak,gk," "," "),ik(nk,ak,gk," ","\\space"),ik(nk,ak,gk," ","\\nobreakspace"),ik(rk,ak,gk,null,"\\nobreak"),ik(rk,ak,gk,null,"\\allowbreak"),ik(rk,ak,mk,",",","),ik(rk,ak,mk,";",";"),ik(rk,ok,lk,"⊼","\\barwedge",!0),ik(rk,ok,lk,"⊻","\\veebar",!0),ik(rk,ak,lk,"⊙","\\odot",!0),ik(rk,ak,lk,"⊕","\\oplus",!0),ik(rk,ak,lk,"⊗","\\otimes",!0),ik(rk,ak,vk,"∂","\\partial",!0),ik(rk,ak,lk,"⊘","\\oslash",!0),ik(rk,ok,lk,"⊚","\\circledcirc",!0),ik(rk,ok,lk,"⊡","\\boxdot",!0),ik(rk,ak,lk,"△","\\bigtriangleup"),ik(rk,ak,lk,"▽","\\bigtriangledown"),ik(rk,ak,lk,"†","\\dagger"),ik(rk,ak,lk,"⋄","\\diamond"),ik(rk,ak,lk,"⋆","\\star"),ik(rk,ak,lk,"◃","\\triangleleft"),ik(rk,ak,lk,"▹","\\triangleright"),ik(rk,ak,pk,"{","\\{"),ik(nk,ak,vk,"{","\\{"),ik(nk,ak,vk,"{","\\textbraceleft"),ik(rk,ak,uk,"}","\\}"),ik(nk,ak,vk,"}","\\}"),ik(nk,ak,vk,"}","\\textbraceright"),ik(rk,ak,pk,"{","\\lbrace"),ik(rk,ak,uk,"}","\\rbrace"),ik(rk,ak,pk,"[","\\lbrack",!0),ik(nk,ak,vk,"[","\\lbrack",!0),ik(rk,ak,uk,"]","\\rbrack",!0),ik(nk,ak,vk,"]","\\rbrack",!0),ik(rk,ak,pk,"(","\\lparen",!0),ik(rk,ak,uk,")","\\rparen",!0),ik(nk,ak,vk,"<","\\textless",!0),ik(nk,ak,vk,">","\\textgreater",!0),ik(rk,ak,pk,"⌊","\\lfloor",!0),ik(rk,ak,uk,"⌋","\\rfloor",!0),ik(rk,ak,pk,"⌈","\\lceil",!0),ik(rk,ak,uk,"⌉","\\rceil",!0),ik(rk,ak,vk,"\\","\\backslash"),ik(rk,ak,vk,"∣","|"),ik(rk,ak,vk,"∣","\\vert"),ik(nk,ak,vk,"|","\\textbar",!0),ik(rk,ak,vk,"∥","\\|"),ik(rk,ak,vk,"∥","\\Vert"),ik(nk,ak,vk,"∥","\\textbardbl"),ik(nk,ak,vk,"~","\\textasciitilde"),ik(nk,ak,vk,"\\","\\textbackslash"),ik(nk,ak,vk,"^","\\textasciicircum"),ik(rk,ak,fk,"↑","\\uparrow",!0),ik(rk,ak,fk,"⇑","\\Uparrow",!0),ik(rk,ak,fk,"↓","\\downarrow",!0),ik(rk,ak,fk,"⇓","\\Downarrow",!0),ik(rk,ak,fk,"↕","\\updownarrow",!0),ik(rk,ak,fk,"⇕","\\Updownarrow",!0),ik(rk,ak,dk,"∐","\\coprod"),ik(rk,ak,dk,"⋁","\\bigvee"),ik(rk,ak,dk,"⋀","\\bigwedge"),ik(rk,ak,dk,"⨄","\\biguplus"),ik(rk,ak,dk,"⋂","\\bigcap"),ik(rk,ak,dk,"⋃","\\bigcup"),ik(rk,ak,dk,"∫","\\int"),ik(rk,ak,dk,"∫","\\intop"),ik(rk,ak,dk,"∬","\\iint"),ik(rk,ak,dk,"∭","\\iiint"),ik(rk,ak,dk,"∏","\\prod"),ik(rk,ak,dk,"∑","\\sum"),ik(rk,ak,dk,"⨂","\\bigotimes"),ik(rk,ak,dk,"⨁","\\bigoplus"),ik(rk,ak,dk,"⨀","\\bigodot"),ik(rk,ak,dk,"∮","\\oint"),ik(rk,ak,dk,"∯","\\oiint"),ik(rk,ak,dk,"∰","\\oiiint"),ik(rk,ak,dk,"⨆","\\bigsqcup"),ik(rk,ak,dk,"∫","\\smallint"),ik(nk,ak,ck,"…","\\textellipsis"),ik(rk,ak,ck,"…","\\mathellipsis"),ik(nk,ak,ck,"…","\\ldots",!0),ik(rk,ak,ck,"…","\\ldots",!0),ik(rk,ak,ck,"⋯","\\@cdots",!0),ik(rk,ak,ck,"⋱","\\ddots",!0),ik(rk,ak,vk,"⋮","\\varvdots"),ik(rk,ak,sk,"ˊ","\\acute"),ik(rk,ak,sk,"ˋ","\\grave"),ik(rk,ak,sk,"¨","\\ddot"),ik(rk,ak,sk,"~","\\tilde"),ik(rk,ak,sk,"ˉ","\\bar"),ik(rk,ak,sk,"˘","\\breve"),ik(rk,ak,sk,"ˇ","\\check"),ik(rk,ak,sk,"^","\\hat"),ik(rk,ak,sk,"⃗","\\vec"),ik(rk,ak,sk,"˙","\\dot"),ik(rk,ak,sk,"˚","\\mathring"),ik(rk,ak,hk,"","\\@imath"),ik(rk,ak,hk,"","\\@jmath"),ik(rk,ak,vk,"ı","ı"),ik(rk,ak,vk,"ȷ","ȷ"),ik(nk,ak,vk,"ı","\\i",!0),ik(nk,ak,vk,"ȷ","\\j",!0),ik(nk,ak,vk,"ß","\\ss",!0),ik(nk,ak,vk,"æ","\\ae",!0),ik(nk,ak,vk,"œ","\\oe",!0),ik(nk,ak,vk,"ø","\\o",!0),ik(nk,ak,vk,"Æ","\\AE",!0),ik(nk,ak,vk,"Œ","\\OE",!0),ik(nk,ak,vk,"Ø","\\O",!0),ik(nk,ak,sk,"ˊ","\\'"),ik(nk,ak,sk,"ˋ","\\`"),ik(nk,ak,sk,"ˆ","\\^"),ik(nk,ak,sk,"˜","\\~"),ik(nk,ak,sk,"ˉ","\\="),ik(nk,ak,sk,"˘","\\u"),ik(nk,ak,sk,"˙","\\."),ik(nk,ak,sk,"¸","\\c"),ik(nk,ak,sk,"˚","\\r"),ik(nk,ak,sk,"ˇ","\\v"),ik(nk,ak,sk,"¨",'\\"'),ik(nk,ak,sk,"˝","\\H"),ik(nk,ak,sk,"◯","\\textcircled");var yk={"--":!0,"---":!0,"``":!0,"''":!0};ik(nk,ak,vk,"–","--",!0),ik(nk,ak,vk,"–","\\textendash"),ik(nk,ak,vk,"—","---",!0),ik(nk,ak,vk,"—","\\textemdash"),ik(nk,ak,vk,"‘","`",!0),ik(nk,ak,vk,"‘","\\textquoteleft"),ik(nk,ak,vk,"’","'",!0),ik(nk,ak,vk,"’","\\textquoteright"),ik(nk,ak,vk,"“","``",!0),ik(nk,ak,vk,"“","\\textquotedblleft"),ik(nk,ak,vk,"”","''",!0),ik(nk,ak,vk,"”","\\textquotedblright"),ik(rk,ak,vk,"°","\\degree",!0),ik(nk,ak,vk,"°","\\degree"),ik(nk,ak,vk,"°","\\textdegree",!0),ik(rk,ak,vk,"£","\\pounds"),ik(rk,ak,vk,"£","\\mathsterling",!0),ik(nk,ak,vk,"£","\\pounds"),ik(nk,ak,vk,"£","\\textsterling",!0),ik(rk,ok,vk,"✠","\\maltese"),ik(nk,ok,vk,"✠","\\maltese");for(var bk='0123456789/@."',wk=0;wk{if(FA(e.classes)!==FA(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var i=e.classes[0];if("mbin"===i||"mord"===i)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},Gk=e=>{for(var t=0;tt&&(t=a.height),a.depth>i&&(i=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=r},Qk=function(e,t,i,r){var n=new KA(e,t,i,r);return jk(n),n},Wk=(e,t,i,r)=>new KA(e,t,i,r),Zk=function(e,t,i){var r=Qk([e],[],t);return r.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=RA(r.height),r.maxFontSize=1,r},Yk=function(e,t,i,r){var n=new HA(e,t,i,r);return jk(n),n},Xk=function(e){var t=new AA(e);return jk(t),t},Jk=function(e,t){return e instanceof AA?Qk([],[e],t):e},$k=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],r=-t[0].shift-t[0].elem.depth,n=r,a=1;a{var i=Qk(["mspace"],[],t),r=OA(e,t);return i.style.marginRight=RA(r),i},iS=function(e,t,i){var r,n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return r="textbf"===t&&"textit"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular",n+"-"+r},rS={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},nS={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},aS=function(e,t){var[i,r,n]=nS[e],a=new ZA(i),o=new WA([a],{width:RA(r),height:RA(n),style:"width:"+RA(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=Wk(["overlay"],[o],t);return s.height=n,s.style.height=RA(n),s.style.width=RA(r),s},oS={fontMap:rS,makeSymbol:Pk,mathsym:Vk,makeSpan:Qk,makeSvgSpan:Wk,makeLineSpan:Zk,makeAnchor:Yk,makeFragment:Xk,wrapFragment:Jk,makeVList:eS,makeOrd:Kk,makeGlue:tS,staticSvg:aS,svgData:nS,tryCombineChars:Gk},sS={number:3,unit:"mu"},lS={number:4,unit:"mu"},uS={number:5,unit:"mu"},cS={mord:{mop:sS,mbin:lS,mrel:uS,minner:sS},mop:{mord:sS,mop:sS,mrel:uS,minner:sS},mbin:{mord:lS,mop:lS,mopen:lS,minner:lS},mrel:{mord:uS,mop:uS,mopen:uS,minner:uS},mopen:{},mclose:{mop:sS,mbin:lS,mrel:uS,minner:sS},mpunct:{mord:sS,mop:sS,mrel:uS,mopen:sS,mclose:sS,mpunct:sS,minner:sS},minner:{mord:sS,mop:sS,mbin:lS,mrel:uS,mopen:sS,mpunct:sS,minner:sS}},hS={mord:{mop:sS},mop:{mord:sS,mop:sS},mbin:{},mrel:{},mopen:{},mclose:{mop:sS},mpunct:{},minner:{mop:sS}},dS={},pS={},mS={};function fS(e){for(var{type:t,names:i,props:r,handler:n,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},l=0;l{var i=t.classes[0],r=e.classes[0];"mbin"===i&&Px.contains(xS,r)?t.classes[0]="mord":"mbin"===r&&Px.contains(wS,i)&&(e.classes[0]="mord")}),{node:c},h,d),MS(n,((e,t)=>{var i=LS(t),r=LS(e),n=i&&r?e.hasClass("mtight")?hS[i][r]:cS[i][r]:null;if(n)return oS.makeGlue(n,l)}),{node:c},h,d),n},MS=function e(t,i,r,n,a){n&&t.push(n);for(var o=0;oi=>{t.splice(e+1,0,i),o++})(o)}}n&&t.pop()},NS=function(e){return e instanceof AA||e instanceof HA||e instanceof KA&&e.hasClass("enclosing")?e:null},zS=function e(t,i){var r=NS(t);if(r){var n=r.children;if(n.length){if("right"===i)return e(n[n.length-1],"right");if("left"===i)return e(n[0],"left")}}return t},LS=function(e,t){return e?(t&&(e=zS(e,t)),kS[e.classes[0]]||null):null},CS=function(e,t){var i=["nulldelimiter"].concat(e.baseSizingClasses());return bS(t.concat(i))},ES=function(e,t,i){if(!e)return bS();if(pS[e.type]){var r=pS[e.type](e,t);if(i&&t.size!==i.size){r=bS(t.sizingClasses(i),[r],t);var n=t.sizeMultiplier/i.sizeMultiplier;r.height*=n,r.depth*=n}return r}throw new Lx("Got group of unknown type: '"+e.type+"'")};function _S(e,t){var i=bS(["base"],e,t),r=bS(["strut"]);return r.style.height=RA(i.height+i.depth),i.depth&&(r.style.verticalAlign=RA(-i.depth)),i.children.unshift(r),i}function TS(e,t){var i=null;1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body);var r,n=SS(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(r=n.pop());for(var a,o=[],s=[],l=0;l0&&(o.push(_S(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(_S(s,t)),i?(a=_S(SS(i,t,!0)),a.classes=["tag"],o.push(a)):r&&o.push(r);var c=bS(["katex-html"],o);if(c.setAttribute("aria-hidden","true"),a){var h=a.children[0];h.style.height=RA(c.height+c.depth),c.depth&&(h.style.verticalAlign=RA(-c.depth))}return c}function BS(e){return new AA(e)}class IS{constructor(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=FA(this.classes));for(var i=0;i0&&(e+=' class ="'+Px.escape(FA(this.classes))+'"'),e+=">";for(var i=0;i",e}toText(){return this.children.map((e=>e.toText())).join("")}}class qS{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Px.escape(this.toText())}toText(){return this.text}}class DS{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",RA(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var OS={MathNode:IS,TextNode:qS,SpaceNode:DS,newDocumentFragment:BS},RS=function(e,t,i){return!tk[t][e]||!tk[t][e].replace||55349===e.charCodeAt(0)||yk.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.substr(4,2)||i.font&&"tt"===i.font.substr(4,2))||(e=tk[t][e].replace),new OS.TextNode(e)},FS=function(e){return 1===e.length?e[0]:new OS.MathNode("mrow",e)},PS=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var i=t.font;if(!i||"mathnormal"===i)return null;var r=e.mode;if("mathit"===i)return"italic";if("boldsymbol"===i)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===i)return"bold";if("mathbb"===i)return"double-struck";if("mathfrak"===i)return"fraktur";if("mathscr"===i||"mathcal"===i)return"script";if("mathsf"===i)return"sans-serif";if("mathtt"===i)return"monospace";var n=e.text;if(Px.contains(["\\imath","\\jmath"],n))return null;tk[r][n]&&tk[r][n].replace&&(n=tk[r][n].replace);var a=oS.fontMap[i].fontName;return zA(n,a,r)?oS.fontMap[i].variant:null},VS=function(e,t,i){if(1===e.length){var r=KS(e[0],t);return i&&r instanceof IS&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var n,a=[],o=0;o0&&(c.text=c.text.slice(0,1)+"̸"+c.text.slice(1),a.pop())}}}a.push(s),n=s}return a},US=function(e,t,i){return FS(VS(e,t,i))},KS=function(e,t){if(!e)return new OS.MathNode("mrow");if(mS[e.type]){var i=mS[e.type](e,t);return i}throw new Lx("Got group of unknown type: '"+e.type+"'")};function HS(e,t,i,r,n){var a,o=VS(e,i);a=1===o.length&&o[0]instanceof IS&&Px.contains(["mrow","mtable"],o[0].type)?o[0]:new OS.MathNode("mrow",o);var s=new OS.MathNode("annotation",[new OS.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new OS.MathNode("semantics",[a,s]),u=new OS.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var c=n?"katex":"katex-mathml";return oS.makeSpan([c],[u])}var GS=function(e){return new BA({style:e.displayMode?oA.DISPLAY:oA.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},jS=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=oS.makeSpan(i,[e])}return e},QS=function(e,t,i){var r,n=GS(i);if("mathml"===i.output)return HS(e,t,n,i.displayMode,!0);if("html"===i.output){var a=TS(e,n);r=oS.makeSpan(["katex"],[a])}else{var o=HS(e,t,n,i.displayMode,!1),s=TS(e,n);r=oS.makeSpan(["katex"],[o,s])}return jS(r,i)},WS=function(e,t,i){var r=GS(i),n=TS(e,r),a=oS.makeSpan(["katex"],[n]);return jS(a,i)},ZS={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},YS=function(e){var t=new OS.MathNode("mo",[new OS.TextNode(ZS[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},XS={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},JS=function(e){return"ordgroup"===e.type?e.body.length:1},$S=function(e,t){function i(){var i=4e5,r=e.label.substr(1);if(Px.contains(["widehat","widecheck","widetilde","utilde"],r)){var n,a,o,s=e,l=JS(s.base);if(l>5)"widehat"===r||"widecheck"===r?(n=420,i=2364,o=.42,a=r+"4"):(n=312,i=2340,o=.34,a="tilde4");else{var u=[1,1,2,2,3,3][l];"widehat"===r||"widecheck"===r?(i=[0,1062,2364,2364,2364][u],n=[0,239,300,360,420][u],o=[0,.24,.3,.3,.36,.42][u],a=r+u):(i=[0,600,1033,2339,2340][u],n=[0,260,286,306,312][u],o=[0,.26,.286,.3,.306,.34][u],a="tilde"+u)}var c=new ZA(a),h=new WA([c],{width:"100%",height:RA(o),viewBox:"0 0 "+i+" "+n,preserveAspectRatio:"none"});return{span:oS.makeSvgSpan([],[h],t),minWidth:0,height:o}}var d,p,m=[],f=XS[r],[g,v,y]=f,b=y/1e3,w=g.length;if(1===w){var x=f[3];d=["hide-tail"],p=[x]}else if(2===w)d=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");d=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var A=0;A0&&(r.style.minWidth=RA(n)),r},eM=function(e,t,i,r,n){var a,o=e.height+e.depth+i+r;if(/fbox|color|angl/.test(t)){if(a=oS.makeSpan(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(a.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new YA({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new YA({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new WA(l,{width:"100%",height:RA(o)});a=oS.makeSvgSpan([],[u],n)}return a.height=o,a.style.height=RA(o),a},tM={encloseSpan:eM,mathMLnode:YS,svgSpan:$S};function iM(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function rM(e){var t=nM(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function nM(e){return e&&("atom"===e.type||ek.hasOwnProperty(e.type))?e:null}var aM=(e,t)=>{var i,r,n;e&&"supsub"===e.type?(r=iM(e.base,"accent"),i=r.base,e.base=i,n=JA(ES(e,t)),e.base=r):(r=iM(e,"accent"),i=r.base);var a=ES(i,t.havingCrampedStyle()),o=r.isShifty&&Px.isCharacterBox(i),s=0;if(o){var l=Px.getBaseElem(i),u=ES(l,t.havingCrampedStyle());s=XA(u).skew}var c,h="\\c"===r.label,d=h?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight);if(r.isStretchy)c=tM.svgSpan(r,t),c=oS.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+RA(2*s)+")",marginLeft:RA(2*s)}:void 0}]},t);else{var p,m;"\\vec"===r.label?(p=oS.staticSvg("vec",t),m=oS.svgData.vec[1]):(p=oS.makeOrd({mode:r.mode,text:r.label},t,"textord"),p=XA(p),p.italic=0,m=p.width,h&&(d+=p.depth)),c=oS.makeSpan(["accent-body"],[p]);var f="\\textcircled"===r.label;f&&(c.classes.push("accent-full"),d=a.height);var g=s;f||(g-=m/2),c.style.left=RA(g),"\\textcircled"===r.label&&(c.style.top=".2em"),c=oS.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-d},{type:"elem",elem:c}]},t)}var v=oS.makeSpan(["mord","accent"],[c],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},oM=(e,t)=>{var i=e.isStretchy?tM.mathMLnode(e.label):new OS.MathNode("mo",[RS(e.label,e.mode)]),r=new OS.MathNode("mover",[KS(e.base,t),i]);return r.setAttribute("accent","true"),r},sM=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));fS({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var i=vS(t[0]),r=!sM.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:i}},htmlBuilder:aM,mathmlBuilder:oM}),fS({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var i=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:aM,mathmlBuilder:oM}),fS({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0];return{type:"accentUnder",mode:i.mode,label:r,base:n}},htmlBuilder:(e,t)=>{var i=ES(e.base,t),r=tM.svgSpan(e,t),n="\\utilde"===e.label?.12:0,a=oS.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:i}]},t);return oS.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var i=tM.mathMLnode(e.label),r=new OS.MathNode("munder",[KS(e.base,t),i]);return r.setAttribute("accentunder","true"),r}});var lM=e=>{var t=new OS.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};fS({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:r,funcName:n}=e;return{type:"xArrow",mode:r.mode,label:n,body:t[0],below:i[0]}},htmlBuilder(e,t){var i,r=t.style,n=t.havingStyle(r.sup()),a=oS.wrapFragment(ES(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";a.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),i=oS.wrapFragment(ES(e.below,n,t),t),i.classes.push(o+"-arrow-pad"));var s,l=tM.svgSpan(e,t),u=-t.fontMetrics().axisHeight+.5*l.height,c=-t.fontMetrics().axisHeight-.5*l.height-.111;if((a.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=a.depth),i){var h=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;s=oS.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:l,shift:u},{type:"elem",elem:i,shift:h}]},t)}else s=oS.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:l,shift:u}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),oS.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var i,r=tM.mathMLnode(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=lM(KS(e.body,t));if(e.below){var a=lM(KS(e.below,t));i=new OS.MathNode("munderover",[r,a,n])}else i=new OS.MathNode("mover",[r,n])}else if(e.below){var o=lM(KS(e.below,t));i=new OS.MathNode("munder",[r,o])}else i=lM(),i=new OS.MathNode("mover",[r,i]);return i}});var uM={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},cM=()=>({type:"styling",body:[],mode:"math",style:"display"}),hM=e=>"textord"===e.type&&"@"===e.text,dM=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function pM(e,t,i){var r=uM[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n=i.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},o=i.callFunction("\\Big",[a],[]),s=i.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[n,o,s]};return i.callFunction("\\\\cdparent",[l],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":var u={type:"textord",text:"\\Vert",mode:"math"};return i.callFunction("\\Big",[u],[]);default:return{type:"textord",text:" ",mode:"math"}}}function mM(e){var t=[];e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();while(1){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new Lx("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r=[],n=[r],a=0;a-1);else{if(!("<>AV".indexOf(u)>-1))throw new Lx('Expected one of "<>AV=|." after @',o[l]);for(var h=0;h<2;h++){for(var d=!0,p=l+1;p=1114111)throw new Lx("\\@char with invalid code point "+a);return u<=65535?l=String.fromCharCode(u):(u-=65536,l=String.fromCharCode(55296+(u>>10),56320+(1023&u))),{type:"textord",mode:i.mode,text:l}}});var fM=(e,t)=>{var i=SS(e.body,t.withColor(e.color),!1);return oS.makeFragment(i)},gM=(e,t)=>{var i=VS(e.body,t.withColor(e.color)),r=new OS.MathNode("mstyle",i);return r.setAttribute("mathcolor",e.color),r};fS({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:i}=e,r=iM(t[0],"color-token").color,n=t[1];return{type:"color",mode:i.mode,color:r,body:yS(n)}},htmlBuilder:fM,mathmlBuilder:gM}),fS({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:i,breakOnTokenText:r}=e,n=iM(t[0],"color-token").color;i.gullet.macros.set("\\current@color",n);var a=i.parseExpression(!0,r);return{type:"color",mode:i.mode,color:n,body:a}},htmlBuilder:fM,mathmlBuilder:gM}),fS({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler(e,t,i){var{parser:r}=e,n=i[0],a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:n&&iM(n,"size").value}},htmlBuilder(e,t){var i=oS.makeSpan(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size&&(i.style.marginTop=RA(OA(e.size,t)))),i},mathmlBuilder(e,t){var i=new OS.MathNode("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size&&i.setAttribute("height",RA(OA(e.size,t)))),i}});var vM={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},yM=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Lx("Expected a control sequence",e);return t},bM=e=>{var t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t},wM=(e,t,i,r)=>{var n=e.gullet.macros.get(i.text);null==n&&(i.noexpand=!0,n={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,n,r)};fS({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:i}=e;t.consumeSpaces();var r=t.fetch();if(vM[r.text])return"\\global"!==i&&"\\\\globallong"!==i||(r.text=vM[r.text]),iM(t.parseFunction(),"internal");throw new Lx("Invalid token after macro prefix",r)}}),fS({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=t.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Lx("Expected a control sequence",r);var a,o=0,s=[[]];while("{"!==t.gullet.future().text)if(r=t.gullet.popToken(),"#"===r.text){if("{"===t.gullet.future().text){a=t.gullet.future(),s[o].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Lx('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==o+1)throw new Lx('Argument number "'+r.text+'" out of order');o++,s.push([])}else{if("EOF"===r.text)throw new Lx("Expected a macro definition");s[o].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return a&&l.unshift(a),"\\edef"!==i&&"\\xdef"!==i||(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(n,{tokens:l,numArgs:o,delimiters:s},i===vM[i]),{type:"internal",mode:t.mode}}}),fS({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=yM(t.gullet.popToken());t.gullet.consumeSpaces();var n=bM(t);return wM(t,r,n,"\\\\globallet"===i),{type:"internal",mode:t.mode}}}),fS({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=yM(t.gullet.popToken()),n=t.gullet.popToken(),a=t.gullet.popToken();return wM(t,r,a,"\\\\globalfuture"===i),t.gullet.pushToken(a),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var xM=function(e,t,i){var r=tk.math[e]&&tk.math[e].replace,n=zA(r||e,t,i);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},AM=function(e,t,i,r){var n=i.havingBaseStyle(t),a=oS.makeSpan(r.concat(n.sizingClasses(i)),[e],i),o=n.sizeMultiplier/i.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=n.sizeMultiplier,a},kM=function(e,t,i){var r=t.havingBaseStyle(i),n=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=RA(n),e.height-=n,e.depth+=n},SM=function(e,t,i,r,n,a){var o=oS.makeSymbol(e,"Main-Regular",n,r),s=AM(o,t,r,a);return i&&kM(s,r,t),s},MM=function(e,t,i,r){return oS.makeSymbol(e,"Size"+t+"-Regular",i,r)},NM=function(e,t,i,r,n,a){var o=MM(e,t,n,r),s=AM(oS.makeSpan(["delimsizing","size"+t],[o],r),oA.TEXT,r,a);return i&&kM(s,r,oA.TEXT),s},zM=function(e,t,i){var r;r="Size1-Regular"===t?"delim-size1":"delim-size4";var n=oS.makeSpan(["delimsizinginner",r],[oS.makeSpan([],[oS.makeSymbol(e,t,i)])]);return{type:"elem",elem:n}},LM=function(e,t,i){var r=kA["Size4-Regular"][e.charCodeAt(0)]?kA["Size4-Regular"][e.charCodeAt(0)][4]:kA["Size1-Regular"][e.charCodeAt(0)][4],n=new ZA("inner",wA(e,Math.round(1e3*t))),a=new WA([n],{width:RA(r),height:RA(t),style:"width:"+RA(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=oS.makeSvgSpan([],[a],i);return o.height=t,o.style.height=RA(t),o.style.width=RA(r),{type:"elem",elem:o}},CM=.008,EM={type:"kern",size:-1*CM},_M=["|","\\lvert","\\rvert","\\vert"],TM=["\\|","\\lVert","\\rVert","\\Vert"],BM=function(e,t,i,r,n,a){var o,s,l,u;o=l=u=e,s=null;var c="Size1-Regular";"\\uparrow"===e?l=u="⏐":"\\Uparrow"===e?l=u="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",u="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",u="\\Downarrow"):Px.contains(_M,e)?l="∣":Px.contains(TM,e)?l="∥":"["===e||"\\lbrack"===e?(o="⎡",l="⎢",u="⎣",c="Size4-Regular"):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",u="⎦",c="Size4-Regular"):"\\lfloor"===e||"⌊"===e?(l=o="⎢",u="⎣",c="Size4-Regular"):"\\lceil"===e||"⌈"===e?(o="⎡",l=u="⎢",c="Size4-Regular"):"\\rfloor"===e||"⌋"===e?(l=o="⎥",u="⎦",c="Size4-Regular"):"\\rceil"===e||"⌉"===e?(o="⎤",l=u="⎥",c="Size4-Regular"):"("===e||"\\lparen"===e?(o="⎛",l="⎜",u="⎝",c="Size4-Regular"):")"===e||"\\rparen"===e?(o="⎞",l="⎟",u="⎠",c="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",u="⎩",l="⎪",c="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",u="⎭",l="⎪",c="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",u="⎩",l="⎪",c="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",u="⎭",l="⎪",c="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",u="⎭",l="⎪",c="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",u="⎩",l="⎪",c="Size4-Regular");var h=xM(o,c,n),d=h.height+h.depth,p=xM(l,c,n),m=p.height+p.depth,f=xM(u,c,n),g=f.height+f.depth,v=0,y=1;if(null!==s){var b=xM(s,c,n);v=b.height+b.depth,y=2}var w=d+g+v,x=Math.max(0,Math.ceil((t-w)/(y*m))),A=w+x*y*m,k=r.fontMetrics().axisHeight;i&&(k*=r.sizeMultiplier);var S=A/2-k,M=[];if(M.push(zM(u,c,n)),M.push(EM),null===s){var N=A-d-g+2*CM;M.push(LM(l,N,r))}else{var z=(A-d-g-v)/2+2*CM;M.push(LM(l,z,r)),M.push(EM),M.push(zM(s,c,n)),M.push(EM),M.push(LM(l,z,r))}M.push(EM),M.push(zM(o,c,n));var L=r.havingBaseStyle(oA.TEXT),C=oS.makeVList({positionType:"bottom",positionData:S,children:M},L);return AM(oS.makeSpan(["delimsizing","mult"],[C],L),oA.TEXT,r,a)},IM=80,qM=.08,DM=function(e,t,i,r,n){var a=bA(e,r,i),o=new ZA(e,a),s=new WA([o],{width:"400em",height:RA(t),viewBox:"0 0 400000 "+i,preserveAspectRatio:"xMinYMin slice"});return oS.makeSvgSpan(["hide-tail"],[s],n)},OM=function(e,t){var i,r,n=t.havingBaseSizing(),a=QM("\\surd",e*n.sizeMultiplier,GM,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,u=0,c=0;return"small"===a.type?(c=1e3+1e3*s+IM,e<1?o=1:e<1.4&&(o=.7),l=(1+s+qM)/o,u=(1+s)/o,i=DM("sqrtMain",l,c,s,t),i.style.minWidth="0.853em",r=.833/o):"large"===a.type?(c=(1e3+IM)*VM[a.size],u=(VM[a.size]+s)/o,l=(VM[a.size]+s+qM)/o,i=DM("sqrtSize"+a.size,l,c,s,t),i.style.minWidth="1.02em",r=1/o):(l=e+s+qM,u=e+s,c=Math.floor(1e3*e+s)+IM,i=DM("sqrtTall",l,c,s,t),i.style.minWidth="0.742em",r=1.056),i.height=u,i.style.height=RA(l),{span:i,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},RM=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],FM=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],PM=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],VM=[0,1.2,1.8,2.4,3],UM=function(e,t,i,r,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Px.contains(RM,e)||Px.contains(PM,e))return NM(e,t,!1,i,r,n);if(Px.contains(FM,e))return BM(e,VM[t],!1,i,r,n);throw new Lx("Illegal delimiter: '"+e+"'")},KM=[{type:"small",style:oA.SCRIPTSCRIPT},{type:"small",style:oA.SCRIPT},{type:"small",style:oA.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],HM=[{type:"small",style:oA.SCRIPTSCRIPT},{type:"small",style:oA.SCRIPT},{type:"small",style:oA.TEXT},{type:"stack"}],GM=[{type:"small",style:oA.SCRIPTSCRIPT},{type:"small",style:oA.SCRIPT},{type:"small",style:oA.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],jM=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},QM=function(e,t,i,r){for(var n=Math.min(2,3-r.style.size),a=n;at)return i[a]}return i[i.length-1]},WM=function(e,t,i,r,n,a){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=Px.contains(PM,e)?KM:Px.contains(RM,e)?GM:HM;var s=QM(e,t,o,r);return"small"===s.type?SM(e,s.style,i,r,n,a):"large"===s.type?NM(e,s.size,i,r,n,a):BM(e,t,i,r,n,a)},ZM=function(e,t,i,r,n,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,l=5/r.fontMetrics().ptPerEm,u=Math.max(t-o,i+o),c=Math.max(u/500*s,2*u-l);return WM(e,c,!0,r,n,a)},YM={sqrtImage:OM,sizedDelim:UM,sizeToMaxHeight:VM,customSizedDelim:WM,leftRightDelim:ZM},XM={"\\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}},JM=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function $M(e,t){var i=nM(e);if(i&&Px.contains(JM,i.text))return i;throw new Lx(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function eN(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}fS({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var i=$M(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:XM[e.funcName].size,mclass:XM[e.funcName].mclass,delim:i.text}},htmlBuilder:(e,t)=>"."===e.delim?oS.makeSpan([e.mclass]):YM.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(RS(e.delim,e.mode));var i=new OS.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true");var r=RA(YM.sizeToMaxHeight[e.size]);return i.setAttribute("minsize",r),i.setAttribute("maxsize",r),i}}),fS({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!==typeof i)throw new Lx("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:$M(t[0],e).text,color:i}}}),fS({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=$M(t[0],e),r=e.parser;++r.leftrightDepth;var n=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=iM(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:n,left:i.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{eN(e);for(var i,r,n=SS(e.body,t,!0,["mopen","mclose"]),a=0,o=0,s=!1,l=0;l{eN(e);var i=VS(e.body,t);if("."!==e.left){var r=new OS.MathNode("mo",[RS(e.left,e.mode)]);r.setAttribute("fence","true"),i.unshift(r)}if("."!==e.right){var n=new OS.MathNode("mo",[RS(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),i.push(n)}return FS(i)}}),fS({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=$M(t[0],e);if(!e.parser.leftrightDepth)throw new Lx("\\middle without preceding \\left",i);return{type:"middle",mode:e.parser.mode,delim:i.text}},htmlBuilder:(e,t)=>{var i;if("."===e.delim)i=CS(t,[]);else{i=YM.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};i.isMiddle=r}return i},mathmlBuilder:(e,t)=>{var i="\\vert"===e.delim||"|"===e.delim?RS("|","text"):RS(e.delim,e.mode),r=new OS.MathNode("mo",[i]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var tN=(e,t)=>{var i,r,n=oS.wrapFragment(ES(e.body,t),t),a=e.label.substr(1),o=t.sizeMultiplier,s=0,l=Px.isCharacterBox(e.body);if("sout"===a)i=oS.makeSpan(["stretchy","sout"]),i.height=t.fontMetrics().defaultRuleThickness/o,s=-.5*t.fontMetrics().xHeight;else if("phase"===a){var u=OA({number:.6,unit:"pt"},t),c=OA({number:.35,unit:"ex"},t),h=t.havingBaseSizing();o/=h.sizeMultiplier;var d=n.height+n.depth+u+c;n.style.paddingLeft=RA(d/2+u);var p=Math.floor(1e3*d*o),m=vA(p),f=new WA([new ZA("phase",m)],{width:"400em",height:RA(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=oS.makeSvgSpan(["hide-tail"],[f],t),i.style.height=RA(d),s=n.depth+u+c}else{/cancel/.test(a)?l||n.classes.push("cancel-pad"):"angl"===a?n.classes.push("anglpad"):n.classes.push("boxpad");var g=0,v=0,y=0;/box/.test(a)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),g=t.fontMetrics().fboxsep+("colorbox"===a?0:y),v=g):"angl"===a?(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),g=4*y,v=Math.max(0,.25-n.depth)):(g=l?.2:0,v=g),i=tM.encloseSpan(n,a,g,v,t),/fbox|boxed|fcolorbox/.test(a)?(i.style.borderStyle="solid",i.style.borderWidth=RA(y)):"angl"===a&&.049!==y&&(i.style.borderTopWidth=RA(y),i.style.borderRightWidth=RA(y)),s=n.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}if(e.backgroundColor)r=oS.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:s},{type:"elem",elem:n,shift:0}]},t);else{var b=/cancel|phase/.test(a)?["svg-align"]:[];r=oS.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:s,wrapperClasses:b}]},t)}return/cancel/.test(a)&&(r.height=n.height,r.depth=n.depth),/cancel/.test(a)&&!l?oS.makeSpan(["mord","cancel-lap"],[r],t):oS.makeSpan(["mord"],[r],t)},iN=(e,t)=>{var i=0,r=new OS.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[KS(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*i+"pt"),r.setAttribute("height","+"+2*i+"pt"),r.setAttribute("lspace",i+"pt"),r.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};fS({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,i){var{parser:r,funcName:n}=e,a=iM(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:n,backgroundColor:a,body:o}},htmlBuilder:tN,mathmlBuilder:iN}),fS({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,i){var{parser:r,funcName:n}=e,a=iM(t[0],"color-token").color,o=iM(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:n,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:tN,mathmlBuilder:iN}),fS({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\fbox",body:t[0]}}}),fS({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:r}=e,n=t[0];return{type:"enclose",mode:i.mode,label:r,body:n}},htmlBuilder:tN,mathmlBuilder:iN}),fS({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\angl",body:t[0]}}});var rN={};function nN(e){for(var{type:t,names:i,props:r,handler:n,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l{var t=e.parser.settings;if(!t.displayMode)throw new Lx("{"+e.envName+"} can be used only in display mode.")};function uN(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function cN(e,t,i){var{hskipBeforeAndAfter:r,addJot:n,cols:a,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:u,emptySingleRow:c,maxNumCols:h,leqno:d}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)o=1;else if(o=parseFloat(p),!o||o<0)throw new Lx("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var m=[],f=[m],g=[],v=[],y=null!=l?[]:void 0;function b(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new zx("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}b(),v.push(sN(e));while(1){var x=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},i&&(x={type:"styling",mode:e.mode,style:i,body:[x]}),m.push(x);var A=e.fetch().text;if("&"===A){if(h&&m.length===h){if(u||s)throw new Lx("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===A){w(),1===m.length&&"styling"===x.type&&0===x.body[0].body.length&&(f.length>1||!c)&&f.pop(),v.length0&&(y+=.25),l.push({pos:y,isDashed:e[t]})}for(b(a[0]),i=0;i0&&(N+=v,Ae)))for(i=0;i=o)){var U=void 0;(r>0||e.hskipBeforeAndAfter)&&(U=Px.deflt(O.pregap,h),0!==U&&(z=oS.makeSpan(["arraycolsep"],[]),z.style.width=RA(U),_.push(z)));var K=[];for(i=0;i0){var Q=oS.makeLineSpan("hline",t,u),W=oS.makeLineSpan("hdashline",t,u),Z=[{type:"elem",elem:s,shift:0}];while(l.length>0){var Y=l.pop(),X=Y.pos-C;Y.isDashed?Z.push({type:"elem",elem:W,shift:X}):Z.push({type:"elem",elem:Q,shift:X})}s=oS.makeVList({positionType:"individualShift",children:Z},t)}if(0===T.length)return oS.makeSpan(["mord"],[s],t);var J=oS.makeVList({positionType:"individualShift",children:T},t);return J=oS.makeSpan(["tag"],[J],t),oS.makeFragment([s,J])},pN={c:"center ",l:"left ",r:"right "},mN=function(e,t){for(var i=[],r=new OS.MathNode("mtd",[],["mtr-glue"]),n=new OS.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var p=e.cols,m="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(h+="top ",g=1),"separator"===p[p.length-1].type&&(h+="bottom ",v-=1);for(var y=g;y0?"left ":"",h+=k[k.length-1].length>0?"right ":"";for(var S=1;S-1?"alignat":"align",a="split"===e.envName,o=cN(e.parser,{cols:r,addJot:!0,autoTag:a?void 0:uN(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var u="",c=0;c0&&d&&(f=1),r[p]={type:"align",align:m,pregap:f,postgap:0}}return o.colSeparationType=d?"align":"alignat",o};nN({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var i=nM(t[0]),r=i?[t[0]]:iM(t[0],"ordgroup").body,n=r.map((function(e){var t=rM(e),i=t.text;if(-1!=="lcr".indexOf(i))return{type:"align",align:i};if("|"===i)return{type:"separator",separator:"|"};if(":"===i)return{type:"separator",separator:":"};throw new Lx("Unknown column alignment: "+i,e)})),a={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return cN(e.parser,a,hN(e.envName))},htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),i=n.fetch().text,-1==="lcr".indexOf(i))throw new Lx("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),r.cols=[{type:"align",align:i}]}}var a=cN(e.parser,r,hN(e.envName)),o=Math.max(0,...a.body.map((e=>e.length)));return a.cols=new Array(o).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},i=cN(e.parser,t,"script");return i.colSeparationType="small",i},htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var i=nM(t[0]),r=i?[t[0]]:iM(t[0],"ordgroup").body,n=r.map((function(e){var t=rM(e),i=t.text;if(-1!=="lc".indexOf(i))return{type:"align",align:i};throw new Lx("Unknown column alignment: "+i,e)}));if(n.length>1)throw new Lx("{subarray} can contain only one column");var a={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=cN(e.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new Lx("{subarray} can contain only one column");return a},htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},i=cN(e.parser,t,hN(e.envName));return{type:"leftright",mode:e.mode,body:[i],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:fN,htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Px.contains(["gather","gather*"],e.envName)&&lN(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:uN(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return cN(e.parser,t,"display")},htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:fN,htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){lN(e);var t={autoTag:uN(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return cN(e.parser,t,"display")},htmlBuilder:dN,mathmlBuilder:mN}),nN({type:"array",names:["CD"],props:{numArgs:0},handler(e){return lN(e),mM(e.parser)},htmlBuilder:dN,mathmlBuilder:mN}),oN("\\nonumber","\\gdef\\@eqnsw{0}"),oN("\\notag","\\nonumber"),fS({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Lx(e.funcName+" valid only within array environment")}});var gN=rN;fS({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:i,funcName:r}=e,n=t[0];if("ordgroup"!==n.type)throw new Lx("Invalid environment name",n);for(var a="",o=0;o{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};fS({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:i}=e;return{type:"mclass",mode:i.mode,mclass:wN(t[0]),body:yS(t[1]),isCharacterBox:Px.isCharacterBox(t[1])}}}),fS({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var i,{parser:r,funcName:n}=e,a=t[1],o=t[0];i="\\stackrel"!==n?wN(a):"mrel";var s={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:yS(a)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:r.mode,mclass:i,body:[l],isCharacterBox:Px.isCharacterBox(l)}},htmlBuilder:yN,mathmlBuilder:bN});var xN=(e,t)=>{var i=e.font,r=t.withFont(i);return ES(e.body,r)},AN=(e,t)=>{var i=e.font,r=t.withFont(i);return KS(e.body,r)},kN={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};fS({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=vS(t[0]),a=r;return a in kN&&(a=kN[a]),{type:"font",mode:i.mode,font:a.slice(1),body:n}},htmlBuilder:xN,mathmlBuilder:AN}),fS({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:i}=e,r=t[0],n=Px.isCharacterBox(r);return{type:"mclass",mode:i.mode,mclass:wN(r),body:[{type:"font",mode:i.mode,font:"boldsymbol",body:r}],isCharacterBox:n}}}),fS({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:r,breakOnTokenText:n}=e,{mode:a}=i,o=i.parseExpression(!0,n),s="math"+r.slice(1);return{type:"font",mode:a,font:s,body:{type:"ordgroup",mode:i.mode,body:o}}},htmlBuilder:xN,mathmlBuilder:AN});var SN=(e,t)=>{var i=t;return"display"===e?i=i.id>=oA.SCRIPT.id?i.text():oA.DISPLAY:"text"===e&&i.size===oA.DISPLAY.size?i=oA.TEXT:"script"===e?i=oA.SCRIPT:"scriptscript"===e&&(i=oA.SCRIPTSCRIPT),i},MN=(e,t)=>{var i,r=SN(e.size,t.style),n=r.fracNum(),a=r.fracDen();i=t.havingStyle(n);var o=ES(e.numer,i,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*h:7*h,m=t.fontMetrics().denom1):(c>0?(d=t.fontMetrics().num2,p=h):(d=t.fontMetrics().num3,p=3*h),m=t.fontMetrics().denom2),u){var w=t.fontMetrics().axisHeight;d-o.depth-(w+.5*c){var i=new OS.MathNode("mfrac",[KS(e.numer,t),KS(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=OA(e.barSize,t);i.setAttribute("linethickness",RA(r))}}else i.setAttribute("linethickness","0px");var n=SN(e.size,t.style);if(n.size!==t.style.size){i=new OS.MathNode("mstyle",[i]);var a=n.size===oA.DISPLAY.size?"true":"false";i.setAttribute("displaystyle",a),i.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new OS.MathNode("mo",[new OS.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(i),null!=e.rightDelim){var l=new OS.MathNode("mo",[new OS.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return FS(o)}return i};fS({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var i,{parser:r,funcName:n}=e,a=t[0],o=t[1],s=null,l=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,s="(",l=")";break;case"\\\\bracefrac":i=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:a,denom:o,hasBarLine:i,leftDelim:s,rightDelim:l,size:u,barSize:null}},htmlBuilder:MN,mathmlBuilder:NN}),fS({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0],a=t[1];return{type:"genfrac",mode:i.mode,continued:!0,numer:n,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),fS({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:i,funcName:r,token:n}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:t,token:n}}});var zN=["display","text","script","scriptscript"],LN=function(e){var t=null;return e.length>0&&(t=e,t="."===t?null:t),t};fS({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var i,{parser:r}=e,n=t[4],a=t[5],o=vS(t[0]),s="atom"===o.type&&"open"===o.family?LN(o.text):null,l=vS(t[1]),u="atom"===l.type&&"close"===l.family?LN(l.text):null,c=iM(t[2],"size"),h=null;c.isBlank?i=!0:(h=c.value,i=h.number>0);var d="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var m=iM(p.body[0],"textord");d=zN[Number(m.text)]}}else p=iM(p,"textord"),d=zN[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:i,barSize:h,leftDelim:s,rightDelim:u,size:d}},htmlBuilder:MN,mathmlBuilder:NN}),fS({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:i,funcName:r,token:n}=e;return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:iM(t[0],"size").value,token:n}}}),fS({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0],a=Rx(iM(t[1],"infix").size),o=t[2],s=a.number>0;return{type:"genfrac",mode:i.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:MN,mathmlBuilder:NN});var CN=(e,t)=>{var i,r,n=t.style;"supsub"===e.type?(i=e.sup?ES(e.sup,t.havingStyle(n.sup()),t):ES(e.sub,t.havingStyle(n.sub()),t),r=iM(e.base,"horizBrace")):r=iM(e,"horizBrace");var a,o=ES(r.base,t.havingBaseStyle(oA.DISPLAY)),s=tM.svgSpan(r,t);if(r.isOver?(a=oS.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t),a.children[0].children[0].children[1].classes.push("svg-align")):(a=oS.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t),a.children[0].children[0].children[0].classes.push("svg-align")),i){var l=oS.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t);a=r.isOver?oS.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]},t):oS.makeVList({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return oS.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t)},EN=(e,t)=>{var i=tM.mathMLnode(e.label);return new OS.MathNode(e.isOver?"mover":"munder",[KS(e.base,t),i])};fS({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:r}=e;return{type:"horizBrace",mode:i.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:CN,mathmlBuilder:EN}),fS({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[1],n=iM(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:i.mode,href:n,body:yS(r)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var i=SS(e.body,t,!1);return oS.makeAnchor(e.href,[],i,t)},mathmlBuilder:(e,t)=>{var i=US(e.body,t);return i instanceof IS||(i=new IS("mrow",[i])),i.setAttribute("href",e.href),i}}),fS({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=iM(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:r}))return i.formatUnsupportedCmd("\\url");for(var n=[],a=0;a{var i,{parser:r,funcName:n,token:a}=e,o=iM(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(n){case"\\htmlClass":l.class=o,i={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,i={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,i={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var u=o.split(","),c=0;c{var i=SS(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var n=oS.makeSpan(r,i,t);for(var a in e.attributes)"class"!==a&&e.attributes.hasOwnProperty(a)&&n.setAttribute(a,e.attributes[a]);return n},mathmlBuilder:(e,t)=>US(e.body,t)}),fS({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"htmlmathml",mode:i.mode,html:yS(t[0]),mathml:yS(t[1])}},htmlBuilder:(e,t)=>{var i=SS(e.html,t,!1);return oS.makeFragment(i)},mathmlBuilder:(e,t)=>US(e.mathml,t)});var _N=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Lx("Invalid size: '"+e+"' in \\includegraphics");var i={number:+(t[1]+t[2]),unit:t[3]};if(!DA(i))throw new Lx("Invalid unit: '"+i.unit+"' in \\includegraphics.");return i};fS({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,i)=>{var{parser:r}=e,n={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(i[0])for(var l=iM(i[0],"raw").string,u=l.split(","),c=0;c{var i=OA(e.height,t),r=0;e.totalheight.number>0&&(r=OA(e.totalheight,t)-i);var n=0;e.width.number>0&&(n=OA(e.width,t));var a={height:RA(i+r)};n>0&&(a.width=RA(n)),r>0&&(a.verticalAlign=RA(-r));var o=new GA(e.src,e.alt,a);return o.height=i,o.depth=r,o},mathmlBuilder:(e,t)=>{var i=new OS.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);var r=OA(e.height,t),n=0;if(e.totalheight.number>0&&(n=OA(e.totalheight,t)-r,i.setAttribute("valign",RA(-n))),i.setAttribute("height",RA(r+n)),e.width.number>0){var a=OA(e.width,t);i.setAttribute("width",RA(a))}return i.setAttribute("src",e.src),i}}),fS({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:r}=e,n=iM(t[0],"size");if(i.settings.strict){var a="m"===r[1],o="mu"===n.value.unit;a?(o||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+n.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:n.value}},htmlBuilder(e,t){return oS.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var i=OA(e.dimension,t);return new OS.SpaceNode(i)}}),fS({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0];return{type:"lap",mode:i.mode,alignment:r.slice(5),body:n}},htmlBuilder:(e,t)=>{var i;"clap"===e.alignment?(i=oS.makeSpan([],[ES(e.body,t)]),i=oS.makeSpan(["inner"],[i],t)):i=oS.makeSpan(["inner"],[ES(e.body,t)]);var r=oS.makeSpan(["fix"],[]),n=oS.makeSpan([e.alignment],[i,r],t),a=oS.makeSpan(["strut"]);return a.style.height=RA(n.height+n.depth),n.depth&&(a.style.verticalAlign=RA(-n.depth)),n.children.unshift(a),n=oS.makeSpan(["thinbox"],[n],t),oS.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var i=new OS.MathNode("mpadded",[KS(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",r+"width")}return i.setAttribute("width","0px"),i}}),fS({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:i,parser:r}=e,n=r.mode;r.switchMode("math");var a="\\("===i?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:o}}}),fS({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Lx("Mismatched "+e.funcName)}});var TN=(e,t)=>{switch(t.style.size){case oA.DISPLAY.size:return e.display;case oA.TEXT.size:return e.text;case oA.SCRIPT.size:return e.script;case oA.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};fS({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"mathchoice",mode:i.mode,display:yS(t[0]),text:yS(t[1]),script:yS(t[2]),scriptscript:yS(t[3])}},htmlBuilder:(e,t)=>{var i=TN(e,t),r=SS(i,t,!1);return oS.makeFragment(r)},mathmlBuilder:(e,t)=>{var i=TN(e,t);return US(i,t)}});var BN=(e,t,i,r,n,a,o)=>{e=oS.makeSpan([],[e]);var s,l,u,c=i&&Px.isCharacterBox(i);if(t){var h=ES(t,r.havingStyle(n.sup()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(i){var d=ES(i,r.havingStyle(n.sub()),r);s={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(l&&s){var p=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;u=oS.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:RA(-a)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:RA(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var m=e.height-o;u=oS.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:RA(-a)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var f=e.depth+o;u=oS.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:RA(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var g=[u];if(s&&0!==a&&!c){var v=oS.makeSpan(["mspace"],[],r);v.style.marginRight=RA(a),g.unshift(v)}return oS.makeSpan(["mop","op-limits"],g,r)},IN=["\\smallint"],qN=(e,t)=>{var i,r,n,a=!1;"supsub"===e.type?(i=e.sup,r=e.sub,n=iM(e.base,"op"),a=!0):n=iM(e,"op");var o,s=t.style,l=!1;if(s.size===oA.DISPLAY.size&&n.symbol&&!Px.contains(IN,n.name)&&(l=!0),n.symbol){var u=l?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.substr(1),n.name="oiint"===c?"\\iint":"\\iiint"),o=oS.makeSymbol(n.name,u,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),c.length>0){var h=o.italic,d=oS.staticSvg(c+"Size"+(l?"2":"1"),t);o=oS.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:d,shift:l?.08:0}]},t),n.name="\\"+c,o.classes.unshift("mop"),o.italic=h}}else if(n.body){var p=SS(n.body,t,!0);1===p.length&&p[0]instanceof QA?(o=p[0],o.classes[0]="mop"):o=oS.makeSpan(["mop"],p,t)}else{for(var m=[],f=1;f{var i;if(e.symbol)i=new IS("mo",[RS(e.name,e.mode)]),Px.contains(IN,e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new IS("mo",VS(e.body,t));else{i=new IS("mi",[new qS(e.name.slice(1))]);var r=new IS("mo",[RS("⁡","text")]);i=e.parentIsSupSub?new IS("mrow",[i,r]):BS([i,r])}return i},ON={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};fS({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=r;return 1===n.length&&(n=ON[n]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:qN,mathmlBuilder:DN}),fS({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:yS(r)}},htmlBuilder:qN,mathmlBuilder:DN});var RN={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};fS({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:qN,mathmlBuilder:DN}),fS({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:qN,mathmlBuilder:DN}),fS({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e,r=i;return 1===r.length&&(r=RN[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:qN,mathmlBuilder:DN});var FN=(e,t)=>{var i,r,n,a,o=!1;if("supsub"===e.type?(i=e.sup,r=e.sub,n=iM(e.base,"operatorname"),o=!0):n=iM(e,"operatorname"),n.body.length>0){for(var s=n.body.map((e=>{var t=e.text;return"string"===typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=SS(s,t.withFont("mathrm"),!0),u=0;u{for(var i=VS(e.body,t.withFont("mathrm")),r=!0,n=0;ne.toText())).join("");i=[new OS.TextNode(s)]}var l=new OS.MathNode("mi",i);l.setAttribute("mathvariant","normal");var u=new OS.MathNode("mo",[RS("⁡","text")]);return e.parentIsSupSub?new OS.MathNode("mrow",[l,u]):OS.newDocumentFragment([l,u])};function VN(e,t,i){for(var r=SS(e,t,!1),n=t.sizeMultiplier/i.sizeMultiplier,a=0;a{var{parser:i,funcName:r}=e,n=t[0];return{type:"operatorname",mode:i.mode,body:yS(n),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:FN,mathmlBuilder:PN}),oN("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),gS({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?oS.makeFragment(SS(e.body,t,!1)):oS.makeSpan(["mord"],SS(e.body,t,!0),t)},mathmlBuilder(e,t){return US(e.body,t,!0)}}),fS({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:i}=e,r=t[0];return{type:"overline",mode:i.mode,body:r}},htmlBuilder(e,t){var i=ES(e.body,t.havingCrampedStyle()),r=oS.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,a=oS.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},t);return oS.makeSpan(["mord","overline"],[a],t)},mathmlBuilder(e,t){var i=new OS.MathNode("mo",[new OS.TextNode("‾")]);i.setAttribute("stretchy","true");var r=new OS.MathNode("mover",[KS(e.body,t),i]);return r.setAttribute("accent","true"),r}}),fS({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"phantom",mode:i.mode,body:yS(r)}},htmlBuilder:(e,t)=>{var i=SS(e.body,t.withPhantom(),!1);return oS.makeFragment(i)},mathmlBuilder:(e,t)=>{var i=VS(e.body,t);return new OS.MathNode("mphantom",i)}}),fS({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"hphantom",mode:i.mode,body:r}},htmlBuilder:(e,t)=>{var i=oS.makeSpan([],[ES(e.body,t.withPhantom())]);if(i.height=0,i.depth=0,i.children)for(var r=0;r{var i=VS(yS(e.body),t),r=new OS.MathNode("mphantom",i),n=new OS.MathNode("mpadded",[r]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),fS({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"vphantom",mode:i.mode,body:r}},htmlBuilder:(e,t)=>{var i=oS.makeSpan(["inner"],[ES(e.body,t.withPhantom())]),r=oS.makeSpan(["fix"],[]);return oS.makeSpan(["mord","rlap"],[i,r],t)},mathmlBuilder:(e,t)=>{var i=VS(yS(e.body),t),r=new OS.MathNode("mphantom",i),n=new OS.MathNode("mpadded",[r]);return n.setAttribute("width","0px"),n}}),fS({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e,r=iM(t[0],"size").value,n=t[1];return{type:"raisebox",mode:i.mode,dy:r,body:n}},htmlBuilder(e,t){var i=ES(e.body,t),r=OA(e.dy,t);return oS.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:i}]},t)},mathmlBuilder(e,t){var i=new OS.MathNode("mpadded",[KS(e.body,t)]),r=e.dy.number+e.dy.unit;return i.setAttribute("voffset",r),i}}),fS({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),fS({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,i){var{parser:r}=e,n=i[0],a=iM(t[0],"size"),o=iM(t[1],"size");return{type:"rule",mode:r.mode,shift:n&&iM(n,"size").value,width:a.value,height:o.value}},htmlBuilder(e,t){var i=oS.makeSpan(["mord","rule"],[],t),r=OA(e.width,t),n=OA(e.height,t),a=e.shift?OA(e.shift,t):0;return i.style.borderRightWidth=RA(r),i.style.borderTopWidth=RA(n),i.style.bottom=RA(a),i.width=r,i.height=n+a,i.depth=-a,i.maxFontSize=1.125*n*t.sizeMultiplier,i},mathmlBuilder(e,t){var i=OA(e.width,t),r=OA(e.height,t),n=e.shift?OA(e.shift,t):0,a=t.color&&t.getColor()||"black",o=new OS.MathNode("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",RA(i)),o.setAttribute("height",RA(r));var s=new OS.MathNode("mpadded",[o]);return n>=0?s.setAttribute("height",RA(n)):(s.setAttribute("height",RA(n)),s.setAttribute("depth",RA(-n))),s.setAttribute("voffset",RA(n)),s}});var UN=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],KN=(e,t)=>{var i=t.havingSize(e.size);return VN(e.body,i,t)};fS({type:"sizing",names:UN,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:i,funcName:r,parser:n}=e,a=n.parseExpression(!1,i);return{type:"sizing",mode:n.mode,size:UN.indexOf(r)+1,body:a}},htmlBuilder:KN,mathmlBuilder:(e,t)=>{var i=t.havingSize(e.size),r=VS(e.body,i),n=new OS.MathNode("mstyle",r);return n.setAttribute("mathsize",RA(i.sizeMultiplier)),n}}),fS({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,i)=>{var{parser:r}=e,n=!1,a=!1,o=i[0]&&iM(i[0],"ordgroup");if(o)for(var s="",l=0;l{var i=oS.makeSpan([],[ES(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0,i.children))for(var r=0;r{var i=new OS.MathNode("mpadded",[KS(e.body,t)]);return e.smashHeight&&i.setAttribute("height","0px"),e.smashDepth&&i.setAttribute("depth","0px"),i}}),fS({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:r}=e,n=i[0],a=t[0];return{type:"sqrt",mode:r.mode,body:a,index:n}},htmlBuilder(e,t){var i=ES(e.body,t.havingCrampedStyle());0===i.height&&(i.height=t.fontMetrics().xHeight),i=oS.wrapFragment(i,t);var r=t.fontMetrics(),n=r.defaultRuleThickness,a=n;t.style.idi.height+i.depth+o&&(o=(o+h-i.height-i.depth)/2);var d=l.height-i.height-o-u;i.style.paddingLeft=RA(c);var p=oS.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]},t);if(e.index){var m=t.havingStyle(oA.SCRIPTSCRIPT),f=ES(e.index,m,t),g=.6*(p.height-p.depth),v=oS.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),y=oS.makeSpan(["root"],[v]);return oS.makeSpan(["mord","sqrt"],[y,p],t)}return oS.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:i,index:r}=e;return r?new OS.MathNode("mroot",[KS(i,t),KS(r,t)]):new OS.MathNode("msqrt",[KS(i,t)])}});var HN={display:oA.DISPLAY,text:oA.TEXT,script:oA.SCRIPT,scriptscript:oA.SCRIPTSCRIPT};fS({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:i,funcName:r,parser:n}=e,a=n.parseExpression(!0,i),o=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:o,body:a}},htmlBuilder(e,t){var i=HN[e.style],r=t.havingStyle(i).withFont("");return VN(e.body,r,t)},mathmlBuilder(e,t){var i=HN[e.style],r=t.havingStyle(i),n=VS(e.body,r),a=new OS.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=o[e.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});var GN=function(e,t){var i=e.base;if(i){if("op"===i.type){var r=i.limits&&(t.style.size===oA.DISPLAY.size||i.alwaysHandleSupSub);return r?qN:null}if("operatorname"===i.type){var n=i.alwaysHandleSupSub&&(t.style.size===oA.DISPLAY.size||i.limits);return n?FN:null}if("accent"===i.type)return Px.isCharacterBox(i.base)?aM:null;if("horizBrace"===i.type){var a=!e.sub;return a===i.isOver?CN:null}return null}return null};gS({type:"supsub",htmlBuilder(e,t){var i=GN(e,t);if(i)return i(e,t);var r,n,a,{base:o,sup:s,sub:l}=e,u=ES(o,t),c=t.fontMetrics(),h=0,d=0,p=o&&Px.isCharacterBox(o);if(s){var m=t.havingStyle(t.style.sup());r=ES(s,m,t),p||(h=u.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=ES(l,f,t),p||(d=u.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}a=t.style===oA.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var g,v=t.sizeMultiplier,y=RA(.5/c.ptPerEm/v),b=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(u instanceof QA||w)&&(b=RA(-u.italic))}if(r&&n){h=Math.max(h,a,r.depth+.25*c.xHeight),d=Math.max(d,c.sub2);var x=c.defaultRuleThickness,A=4*x;if(h-r.depth-(n.height-d)0&&(h+=k,d-=k)}var S=[{type:"elem",elem:n,shift:d,marginRight:y,marginLeft:b},{type:"elem",elem:r,shift:-h,marginRight:y}];g=oS.makeVList({positionType:"individualShift",children:S},t)}else if(n){d=Math.max(d,c.sub1,n.height-.8*c.xHeight);var M=[{type:"elem",elem:n,marginLeft:b,marginRight:y}];g=oS.makeVList({positionType:"shift",positionData:d,children:M},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,a,r.depth+.25*c.xHeight),g=oS.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:y}]},t)}var N=LS(u,"right")||"mord";return oS.makeSpan([N],[u,oS.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var i,r,n=!1;e.base&&"horizBrace"===e.base.type&&(r=!!e.sup,r===e.base.isOver&&(n=!0,i=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,o=[KS(e.base,t)];if(e.sub&&o.push(KS(e.sub,t)),e.sup&&o.push(KS(e.sup,t)),n)a=i?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;a=s&&"op"===s.type&&s.limits&&t.style===oA.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===oA.DISPLAY||s.limits)?"munderover":"msubsup"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===oA.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===oA.DISPLAY)?"munder":"msub"}else{var u=e.base;a=u&&"op"===u.type&&u.limits&&(t.style===oA.DISPLAY||u.alwaysHandleSupSub)||u&&"operatorname"===u.type&&u.alwaysHandleSupSub&&(u.limits||t.style===oA.DISPLAY)?"mover":"msup"}return new OS.MathNode(a,o)}}),gS({type:"atom",htmlBuilder(e,t){return oS.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var i=new OS.MathNode("mo",[RS(e.text,e.mode)]);if("bin"===e.family){var r=PS(e,t);"bold-italic"===r&&i.setAttribute("mathvariant",r)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var jN={mi:"italic",mn:"normal",mtext:"normal"};gS({type:"mathord",htmlBuilder(e,t){return oS.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var i=new OS.MathNode("mi",[RS(e.text,e.mode,t)]),r=PS(e,t)||"italic";return r!==jN[i.type]&&i.setAttribute("mathvariant",r),i}}),gS({type:"textord",htmlBuilder(e,t){return oS.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var i,r=RS(e.text,e.mode,t),n=PS(e,t)||"normal";return i="text"===e.mode?new OS.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new OS.MathNode("mn",[r]):"\\prime"===e.text?new OS.MathNode("mo",[r]):new OS.MathNode("mi",[r]),n!==jN[i.type]&&i.setAttribute("mathvariant",n),i}});var QN={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},WN={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};gS({type:"spacing",htmlBuilder(e,t){if(WN.hasOwnProperty(e.text)){var i=WN[e.text].className||"";if("text"===e.mode){var r=oS.makeOrd(e,t,"textord");return r.classes.push(i),r}return oS.makeSpan(["mspace",i],[oS.mathsym(e.text,e.mode,t)],t)}if(QN.hasOwnProperty(e.text))return oS.makeSpan(["mspace",QN[e.text]],[],t);throw new Lx('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){var i;if(!WN.hasOwnProperty(e.text)){if(QN.hasOwnProperty(e.text))return new OS.MathNode("mspace");throw new Lx('Unknown type of space "'+e.text+'"')}return i=new OS.MathNode("mtext",[new OS.TextNode(" ")]),i}});var ZN=()=>{var e=new OS.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};gS({type:"tag",mathmlBuilder(e,t){var i=new OS.MathNode("mtable",[new OS.MathNode("mtr",[ZN(),new OS.MathNode("mtd",[US(e.body,t)]),ZN(),new OS.MathNode("mtd",[US(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var YN={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},XN={"\\textbf":"textbf","\\textmd":"textmd"},JN={"\\textit":"textit","\\textup":"textup"},$N=(e,t)=>{var i=e.font;return i?YN[i]?t.withTextFontFamily(YN[i]):XN[i]?t.withTextFontWeight(XN[i]):t.withTextFontShape(JN[i]):t};fS({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:r}=e,n=t[0];return{type:"text",mode:i.mode,body:yS(n),font:r}},htmlBuilder(e,t){var i=$N(e,t),r=SS(e.body,i,!0);return oS.makeSpan(["mord","text"],r,i)},mathmlBuilder(e,t){var i=$N(e,t);return US(e.body,i)}}),fS({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"underline",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=ES(e.body,t),r=oS.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,a=oS.makeVList({positionType:"top",positionData:i.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:i}]},t);return oS.makeSpan(["mord","underline"],[a],t)},mathmlBuilder(e,t){var i=new OS.MathNode("mo",[new OS.TextNode("‾")]);i.setAttribute("stretchy","true");var r=new OS.MathNode("munder",[KS(e.body,t),i]);return r.setAttribute("accentunder","true"),r}}),fS({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"vcenter",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=ES(e.body,t),r=t.fontMetrics().axisHeight,n=.5*(i.height-r-(i.depth+r));return oS.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:i}]},t)},mathmlBuilder(e,t){return new OS.MathNode("mpadded",[KS(e.body,t)],["vcenter"])}}),fS({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,i){throw new Lx("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var i=ez(e),r=[],n=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),tz=dS,iz="[ \r\n\t]",rz="\\\\[a-zA-Z@]+",nz="\\\\[^\ud800-\udfff]",az="("+rz+")"+iz+"*",oz="\\\\(\n|[ \r\t]+\n?)[ \r\t]*",sz="[̀-ͯ]",lz=new RegExp(sz+"+$"),uz="("+iz+"+)|"+oz+"|([!-\\[\\]-‧‪-퟿豈-￿]"+sz+"*|[\ud800-\udbff][\udc00-\udfff]"+sz+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+az+"|"+nz+")";class cz{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(uz,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new zx("EOF",new Nx(this,t,t));var i=this.tokenRegex.exec(e);if(null===i||i.index!==t)throw new Lx("Unexpected character: '"+e[t]+"'",new zx(e[t],new Nx(this,t,t+1)));var r=i[6]||i[3]||(i[2]?"\\ ":" ");if(14===this.catcodes[r]){var n=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===n?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=n+1,this.lex()}return new zx(r,new Nx(this,t,this.tokenRegex.lastIndex))}}class hz{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new Lx("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){while(this.undefStack.length>0)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,i){if(void 0===i&&(i=!1),i){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var dz=aN;oN("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),oN("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),oN("\\@firstoftwo",(function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}})),oN("\\@secondoftwo",(function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}})),oN("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),oN("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),oN("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var pz={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};oN("\\char",(function(e){var t,i=e.popToken(),r="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if(i=e.popToken(),"\\"===i.text[0])r=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new Lx("\\char` missing argument");r=i.text.charCodeAt(0)}else t=10;if(t){if(r=pz[i.text],null==r||r>=t)throw new Lx("Invalid base-"+t+" digit "+i.text);var n;while(null!=(n=pz[e.future().text])&&n{var r=e.consumeArg().tokens;if(1!==r.length)throw new Lx("\\newcommand's first argument must be a macro name");var n=r[0].text,a=e.isDefined(n);if(a&&!t)throw new Lx("\\newcommand{"+n+"} attempting to redefine "+n+"; use \\renewcommand");if(!a&&!i)throw new Lx("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var o=0;if(r=e.consumeArg().tokens,1===r.length&&"["===r[0].text){var s="",l=e.expandNextToken();while("]"!==l.text&&"EOF"!==l.text)s+=l.text,l=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new Lx("Invalid number of arguments: "+s);o=parseInt(s),r=e.consumeArg().tokens}return e.macros.set(n,{tokens:r,numArgs:o}),""};oN("\\newcommand",(e=>mz(e,!1,!0))),oN("\\renewcommand",(e=>mz(e,!0,!1))),oN("\\providecommand",(e=>mz(e,!0,!0))),oN("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),oN("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),oN("\\show",(e=>{var t=e.popToken(),i=t.text;return console.log(t,e.macros.get(i),tz[i],tk.math[i],tk.text[i]),""})),oN("\\bgroup","{"),oN("\\egroup","}"),oN("~","\\nobreakspace"),oN("\\lq","`"),oN("\\rq","'"),oN("\\aa","\\r a"),oN("\\AA","\\r A"),oN("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),oN("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),oN("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),oN("ℬ","\\mathscr{B}"),oN("ℰ","\\mathscr{E}"),oN("ℱ","\\mathscr{F}"),oN("ℋ","\\mathscr{H}"),oN("ℐ","\\mathscr{I}"),oN("ℒ","\\mathscr{L}"),oN("ℳ","\\mathscr{M}"),oN("ℛ","\\mathscr{R}"),oN("ℭ","\\mathfrak{C}"),oN("ℌ","\\mathfrak{H}"),oN("ℨ","\\mathfrak{Z}"),oN("\\Bbbk","\\Bbb{k}"),oN("·","\\cdotp"),oN("\\llap","\\mathllap{\\textrm{#1}}"),oN("\\rlap","\\mathrlap{\\textrm{#1}}"),oN("\\clap","\\mathclap{\\textrm{#1}}"),oN("\\mathstrut","\\vphantom{(}"),oN("\\underbar","\\underline{\\text{#1}}"),oN("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),oN("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),oN("\\ne","\\neq"),oN("≠","\\neq"),oN("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),oN("∉","\\notin"),oN("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),oN("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),oN("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),oN("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),oN("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),oN("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),oN("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),oN("⟂","\\perp"),oN("‼","\\mathclose{!\\mkern-0.8mu!}"),oN("∌","\\notni"),oN("⌜","\\ulcorner"),oN("⌝","\\urcorner"),oN("⌞","\\llcorner"),oN("⌟","\\lrcorner"),oN("©","\\copyright"),oN("®","\\textregistered"),oN("️","\\textregistered"),oN("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),oN("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),oN("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),oN("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),oN("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),oN("⋮","\\vdots"),oN("\\varGamma","\\mathit{\\Gamma}"),oN("\\varDelta","\\mathit{\\Delta}"),oN("\\varTheta","\\mathit{\\Theta}"),oN("\\varLambda","\\mathit{\\Lambda}"),oN("\\varXi","\\mathit{\\Xi}"),oN("\\varPi","\\mathit{\\Pi}"),oN("\\varSigma","\\mathit{\\Sigma}"),oN("\\varUpsilon","\\mathit{\\Upsilon}"),oN("\\varPhi","\\mathit{\\Phi}"),oN("\\varPsi","\\mathit{\\Psi}"),oN("\\varOmega","\\mathit{\\Omega}"),oN("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),oN("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),oN("\\boxed","\\fbox{$\\displaystyle{#1}$}"),oN("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),oN("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),oN("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var fz={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};oN("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in fz?t=fz[i]:("\\not"===i.substr(0,4)||i in tk.math&&Px.contains(["bin","rel"],tk.math[i].group))&&(t="\\dotsb"),t}));var gz={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};oN("\\dotso",(function(e){var t=e.future().text;return t in gz?"\\ldots\\,":"\\ldots"})),oN("\\dotsc",(function(e){var t=e.future().text;return t in gz&&","!==t?"\\ldots\\,":"\\ldots"})),oN("\\cdots",(function(e){var t=e.future().text;return t in gz?"\\@cdots\\,":"\\@cdots"})),oN("\\dotsb","\\cdots"),oN("\\dotsm","\\cdots"),oN("\\dotsi","\\!\\cdots"),oN("\\dotsx","\\ldots\\,"),oN("\\DOTSI","\\relax"),oN("\\DOTSB","\\relax"),oN("\\DOTSX","\\relax"),oN("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),oN("\\,","\\tmspace+{3mu}{.1667em}"),oN("\\thinspace","\\,"),oN("\\>","\\mskip{4mu}"),oN("\\:","\\tmspace+{4mu}{.2222em}"),oN("\\medspace","\\:"),oN("\\;","\\tmspace+{5mu}{.2777em}"),oN("\\thickspace","\\;"),oN("\\!","\\tmspace-{3mu}{.1667em}"),oN("\\negthinspace","\\!"),oN("\\negmedspace","\\tmspace-{4mu}{.2222em}"),oN("\\negthickspace","\\tmspace-{5mu}{.277em}"),oN("\\enspace","\\kern.5em "),oN("\\enskip","\\hskip.5em\\relax"),oN("\\quad","\\hskip1em\\relax"),oN("\\qquad","\\hskip2em\\relax"),oN("\\tag","\\@ifstar\\tag@literal\\tag@paren"),oN("\\tag@paren","\\tag@literal{({#1})}"),oN("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new Lx("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),oN("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),oN("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),oN("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),oN("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),oN("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),oN("\\newline","\\\\\\relax"),oN("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var vz=RA(kA["Main-Regular"]["T".charCodeAt(0)][1]-.7*kA["Main-Regular"]["A".charCodeAt(0)][1]);oN("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+vz+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),oN("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+vz+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),oN("\\hspace","\\@ifstar\\@hspacer\\@hspace"),oN("\\@hspace","\\hskip #1\\relax"),oN("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),oN("\\ordinarycolon",":"),oN("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),oN("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),oN("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),oN("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),oN("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),oN("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),oN("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),oN("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),oN("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),oN("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),oN("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),oN("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),oN("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),oN("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),oN("∷","\\dblcolon"),oN("∹","\\eqcolon"),oN("≔","\\coloneqq"),oN("≕","\\eqqcolon"),oN("⩴","\\Coloneqq"),oN("\\ratio","\\vcentcolon"),oN("\\coloncolon","\\dblcolon"),oN("\\colonequals","\\coloneqq"),oN("\\coloncolonequals","\\Coloneqq"),oN("\\equalscolon","\\eqqcolon"),oN("\\equalscoloncolon","\\Eqqcolon"),oN("\\colonminus","\\coloneq"),oN("\\coloncolonminus","\\Coloneq"),oN("\\minuscolon","\\eqcolon"),oN("\\minuscoloncolon","\\Eqcolon"),oN("\\coloncolonapprox","\\Colonapprox"),oN("\\coloncolonsim","\\Colonsim"),oN("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),oN("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),oN("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),oN("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),oN("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),oN("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),oN("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),oN("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),oN("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),oN("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),oN("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),oN("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),oN("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),oN("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),oN("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),oN("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),oN("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),oN("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),oN("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),oN("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),oN("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),oN("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),oN("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),oN("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),oN("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),oN("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),oN("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),oN("\\imath","\\html@mathml{\\@imath}{ı}"),oN("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),oN("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),oN("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),oN("⟦","\\llbracket"),oN("⟧","\\rrbracket"),oN("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),oN("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),oN("⦃","\\lBrace"),oN("⦄","\\rBrace"),oN("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),oN("⦵","\\minuso"),oN("\\darr","\\downarrow"),oN("\\dArr","\\Downarrow"),oN("\\Darr","\\Downarrow"),oN("\\lang","\\langle"),oN("\\rang","\\rangle"),oN("\\uarr","\\uparrow"),oN("\\uArr","\\Uparrow"),oN("\\Uarr","\\Uparrow"),oN("\\N","\\mathbb{N}"),oN("\\R","\\mathbb{R}"),oN("\\Z","\\mathbb{Z}"),oN("\\alef","\\aleph"),oN("\\alefsym","\\aleph"),oN("\\Alpha","\\mathrm{A}"),oN("\\Beta","\\mathrm{B}"),oN("\\bull","\\bullet"),oN("\\Chi","\\mathrm{X}"),oN("\\clubs","\\clubsuit"),oN("\\cnums","\\mathbb{C}"),oN("\\Complex","\\mathbb{C}"),oN("\\Dagger","\\ddagger"),oN("\\diamonds","\\diamondsuit"),oN("\\empty","\\emptyset"),oN("\\Epsilon","\\mathrm{E}"),oN("\\Eta","\\mathrm{H}"),oN("\\exist","\\exists"),oN("\\harr","\\leftrightarrow"),oN("\\hArr","\\Leftrightarrow"),oN("\\Harr","\\Leftrightarrow"),oN("\\hearts","\\heartsuit"),oN("\\image","\\Im"),oN("\\infin","\\infty"),oN("\\Iota","\\mathrm{I}"),oN("\\isin","\\in"),oN("\\Kappa","\\mathrm{K}"),oN("\\larr","\\leftarrow"),oN("\\lArr","\\Leftarrow"),oN("\\Larr","\\Leftarrow"),oN("\\lrarr","\\leftrightarrow"),oN("\\lrArr","\\Leftrightarrow"),oN("\\Lrarr","\\Leftrightarrow"),oN("\\Mu","\\mathrm{M}"),oN("\\natnums","\\mathbb{N}"),oN("\\Nu","\\mathrm{N}"),oN("\\Omicron","\\mathrm{O}"),oN("\\plusmn","\\pm"),oN("\\rarr","\\rightarrow"),oN("\\rArr","\\Rightarrow"),oN("\\Rarr","\\Rightarrow"),oN("\\real","\\Re"),oN("\\reals","\\mathbb{R}"),oN("\\Reals","\\mathbb{R}"),oN("\\Rho","\\mathrm{P}"),oN("\\sdot","\\cdot"),oN("\\sect","\\S"),oN("\\spades","\\spadesuit"),oN("\\sub","\\subset"),oN("\\sube","\\subseteq"),oN("\\supe","\\supseteq"),oN("\\Tau","\\mathrm{T}"),oN("\\thetasym","\\vartheta"),oN("\\weierp","\\wp"),oN("\\Zeta","\\mathrm{Z}"),oN("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),oN("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),oN("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),oN("\\bra","\\mathinner{\\langle{#1}|}"),oN("\\ket","\\mathinner{|{#1}\\rangle}"),oN("\\braket","\\mathinner{\\langle{#1}\\rangle}"),oN("\\Bra","\\left\\langle#1\\right|"),oN("\\Ket","\\left|#1\\right\\rangle");var yz=e=>t=>{var i=t.consumeArg().tokens,r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>i=>{e&&(i.macros.set("|",o),n.length&&i.macros.set("\\|",s));var a=t;if(!t&&n.length){var l=i.future();"|"===l.text&&(i.popToken(),a=!0)}return{tokens:a?n:r,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,c=t.expandTokens([...a,...u,...i]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};oN("\\bra@ket",yz(!1)),oN("\\bra@set",yz(!0)),oN("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),oN("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),oN("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),oN("\\angln","{\\angl n}"),oN("\\blue","\\textcolor{##6495ed}{#1}"),oN("\\orange","\\textcolor{##ffa500}{#1}"),oN("\\pink","\\textcolor{##ff00af}{#1}"),oN("\\red","\\textcolor{##df0030}{#1}"),oN("\\green","\\textcolor{##28ae7b}{#1}"),oN("\\gray","\\textcolor{gray}{#1}"),oN("\\purple","\\textcolor{##9d38bd}{#1}"),oN("\\blueA","\\textcolor{##ccfaff}{#1}"),oN("\\blueB","\\textcolor{##80f6ff}{#1}"),oN("\\blueC","\\textcolor{##63d9ea}{#1}"),oN("\\blueD","\\textcolor{##11accd}{#1}"),oN("\\blueE","\\textcolor{##0c7f99}{#1}"),oN("\\tealA","\\textcolor{##94fff5}{#1}"),oN("\\tealB","\\textcolor{##26edd5}{#1}"),oN("\\tealC","\\textcolor{##01d1c1}{#1}"),oN("\\tealD","\\textcolor{##01a995}{#1}"),oN("\\tealE","\\textcolor{##208170}{#1}"),oN("\\greenA","\\textcolor{##b6ffb0}{#1}"),oN("\\greenB","\\textcolor{##8af281}{#1}"),oN("\\greenC","\\textcolor{##74cf70}{#1}"),oN("\\greenD","\\textcolor{##1fab54}{#1}"),oN("\\greenE","\\textcolor{##0d923f}{#1}"),oN("\\goldA","\\textcolor{##ffd0a9}{#1}"),oN("\\goldB","\\textcolor{##ffbb71}{#1}"),oN("\\goldC","\\textcolor{##ff9c39}{#1}"),oN("\\goldD","\\textcolor{##e07d10}{#1}"),oN("\\goldE","\\textcolor{##a75a05}{#1}"),oN("\\redA","\\textcolor{##fca9a9}{#1}"),oN("\\redB","\\textcolor{##ff8482}{#1}"),oN("\\redC","\\textcolor{##f9685d}{#1}"),oN("\\redD","\\textcolor{##e84d39}{#1}"),oN("\\redE","\\textcolor{##bc2612}{#1}"),oN("\\maroonA","\\textcolor{##ffbde0}{#1}"),oN("\\maroonB","\\textcolor{##ff92c6}{#1}"),oN("\\maroonC","\\textcolor{##ed5fa6}{#1}"),oN("\\maroonD","\\textcolor{##ca337c}{#1}"),oN("\\maroonE","\\textcolor{##9e034e}{#1}"),oN("\\purpleA","\\textcolor{##ddd7ff}{#1}"),oN("\\purpleB","\\textcolor{##c6b9fc}{#1}"),oN("\\purpleC","\\textcolor{##aa87ff}{#1}"),oN("\\purpleD","\\textcolor{##7854ab}{#1}"),oN("\\purpleE","\\textcolor{##543b78}{#1}"),oN("\\mintA","\\textcolor{##f5f9e8}{#1}"),oN("\\mintB","\\textcolor{##edf2df}{#1}"),oN("\\mintC","\\textcolor{##e0e5cc}{#1}"),oN("\\grayA","\\textcolor{##f6f7f7}{#1}"),oN("\\grayB","\\textcolor{##f0f1f2}{#1}"),oN("\\grayC","\\textcolor{##e3e5e6}{#1}"),oN("\\grayD","\\textcolor{##d6d8da}{#1}"),oN("\\grayE","\\textcolor{##babec2}{#1}"),oN("\\grayF","\\textcolor{##888d93}{#1}"),oN("\\grayG","\\textcolor{##626569}{#1}"),oN("\\grayH","\\textcolor{##3b3e40}{#1}"),oN("\\grayI","\\textcolor{##21242c}{#1}"),oN("\\kaBlue","\\textcolor{##314453}{#1}"),oN("\\kaGreen","\\textcolor{##71B307}{#1}");var bz={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class wz{constructor(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new hz(dz,t.macros),this.mode=i,this.stack=[]}feed(e){this.lexer=new cz(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,i,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:i}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:i}=this.consumeArg());return this.pushToken(new zx("EOF",i.loc)),this.pushTokens(r),t.range(i,"")}consumeSpaces(){for(;;){var e=this.future();if(" "!==e.text)break;this.stack.pop()}}consumeArg(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var r,n=this.future(),a=0,o=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++a;else if("}"===r.text){if(--a,-1===a)throw new Lx("Extra }",r)}else if("EOF"===r.text)throw new Lx("Unexpected end of input in a macro argument, expected '"+(e&&i?e[o]:"}")+"'",r);if(e&&i)if((0===a||1===a&&"{"===e[o])&&r.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(0!==a||i);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Lx("The length of delimiters doesn't match the number of args!");for(var i=t[0],r=0;rthis.settings.maxExpand)throw new Lx("Too many expansions: infinite loop or need to increase maxExpand setting");var n=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){n=n.slice();for(var o=n.length-1;o>=0;--o){var s=n[o];if("#"===s.text){if(0===o)throw new Lx("Incomplete placeholder at end of macro body",s);if(s=n[--o],"#"===s.text)n.splice(o+1,1);else{if(!/^[1-9]$/.test(s.text))throw new Lx("Not a valid argument number",s);n.splice(o,2,...a[+s.text-1])}}}}return this.pushTokens(n),n}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e=this.expandOnce();if(e instanceof zx)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new zx(e)]):void 0}expandTokens(e){var t=[],i=this.stack.length;this.pushTokens(e);while(this.stack.length>i){var r=this.expandOnce(!0);r instanceof zx&&(r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(this.stack.pop()))}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var i=this.lexer.catcodes[e];if(null!=i&&13!==i)return}var r="function"===typeof t?t(this):t;if("string"===typeof r){var n=0;if(-1!==r.indexOf("#")){var a=r.replace(/##/g,"");while(-1!==a.indexOf("#"+(n+1)))++n}var o=new cz(r,this.settings),s=[],l=o.lex();while("EOF"!==l.text)s.push(l),l=o.lex();s.reverse();var u={tokens:s,numArgs:n};return u}return r}isDefined(e){return this.macros.has(e)||tz.hasOwnProperty(e)||tk.math.hasOwnProperty(e)||tk.text.hasOwnProperty(e)||bz.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"===typeof t||"function"===typeof t||!t.unexpandable:tz.hasOwnProperty(e)&&!tz[e].primitive}}var xz=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Az=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),kz={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Sz={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class Mz{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new wz(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Lx("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new zx("}")),this.gullet.pushTokens(e);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,i}parseExpression(e,t){var i=[];while(1){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==Mz.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&tz[r.text]&&tz[r.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&i.push(n)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(e){for(var t,i=-1,r=0;r=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var o,s=tk[this.mode][t].group,l=Nx.range(e);if($A.hasOwnProperty(s)){var u=s;o={type:"atom",mode:this.mode,family:u,loc:l,text:t}}else o={type:s,mode:this.mode,loc:l,text:t};n=o}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(cA(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),n={type:"textord",mode:"text",loc:Nx.range(e),text:t}}if(this.consume(),a)for(var c=0;c