|
|
!(function(){var po=Math.pow;var rs=(xr,xt,x)=>new Promise((k,U)=>{var xe=J=>{try{H(x.next(J))}catch(pe){U(pe)}},ge=J=>{try{H(x.throw(J))}catch(pe){U(pe)}},H=J=>J.done?k(J.value):Promise.resolve(J.value).then(xe,ge);H((x=x.apply(xr,xt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[1581],{84105:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var k=x(60499),U=x(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},ge=xe,H=x(7657),J=function(Ge,je){return U.createElement(H.Z,(0,k.Z)({},Ge,{ref:je,icon:ge}))},pe=U.forwardRef(J),S=pe},18785:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var k=x(60499),U=x(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},ge=xe,H=x(7657),J=function(Ge,je){return U.createElement(H.Z,(0,k.Z)({},Ge,{ref:je,icon:ge}))},pe=U.forwardRef(J),S=pe},33853:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var k=x(60499),U=x(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ge=xe,H=x(7657),J=function(Ge,je){return U.createElement(H.Z,(0,k.Z)({},Ge,{ref:je,icon:ge}))},pe=U.forwardRef(J),S=pe},62772:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var k=x(60499),U=x(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},ge=xe,H=x(7657),J=function(Ge,je){return U.createElement(H.Z,(0,k.Z)({},Ge,{ref:je,icon:ge}))},pe=U.forwardRef(J),S=pe},38819:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var k=x(60499),U=x(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},ge=xe,H=x(7657),J=function(Ge,je){return U.createElement(H.Z,(0,k.Z)({},Ge,{ref:je,icon:ge}))},pe=U.forwardRef(J),S=pe},87395:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return S}});var k=x(60499),U=x(59301),xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},ge=xe,H=x(7657),J=function(Ge,je){return U.createElement(H.Z,(0,k.Z)({},Ge,{ref:je,icon:ge}))},pe=U.forwardRef(J),S=pe},18760:function(xr,xt){"use strict";xt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},96938:function(xr,xt,x){"use strict";x.d(xt,{t:function(){return A}});var k=x(59301),U=x(3113),xe={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},ge=x(92310),H=x.n(ge),J=Object.defineProperty,pe=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,Ge=(R,Ke,mt)=>Ke in R?J(R,Ke,{enumerable:!0,configurable:!0,writable:!0,value:mt}):R[Ke]=mt,je=(R,Ke)=>{for(var mt in Ke||(Ke={}))S.call(Ke,mt)&&Ge(R,mt,Ke[mt]);if(pe)for(var mt of pe(Ke))_.call(Ke,mt)&&Ge(R,mt,Ke[mt]);return R};const A=({cancelText:R="\u53D6\u6D88",okText:Ke="\u786E\u5B9A",loading:mt=!1,hasOkBtn:gt=!0,hasCancelBtn:Qe=!0,okButtonProps:$e={},onCancel:Nt=()=>{},onOk:Ce=()=>{},className:Se=""})=>k.createElement("div",{className:H()(xe.buttonFixed,Se)},k.createElement("div",{className:xe.buttonWrap},Qe&&k.createElement(U.ZP,{size:"middle",className:`${xe.button} mr20`,onClick:Nt},R),gt&&k.createElement(U.ZP,je({size:"middle",type:"primary",className:`${xe.button} mr20`,loading:mt,onClick:Ce},$e),Ke)))},54965:function(xr,xt,x){"use strict";var k=x(59301),U=x(18760),xe=x(48136),ge=x(3315),H=x(43418),J=x(59301);const pe=(0,k.forwardRef)(({callback:S,width:_,onChange:Ge,disabled:je,readOnly:A,type:R="",value:Ke="",style:mt={}},gt)=>{const Qe=(0,k.useRef)(),$e=(0,k.useRef)(),[Nt,Ce]=(0,k.useState)(0),[Se,O]=(0,k.useState)(0),[z,Y]=(0,k.useState)(!1),te=()=>{var dt=document.createElement("div");dt.innerHTML=Qe.current.getValue();var ve=dt.innerText;return S&&S(ve),ve};(0,k.useImperativeHandle)(gt,()=>({getData:te}));const Ve=dt=>{dt.preventDefault();const ve=dt.clientX-Nt,ye=dt.clientY-Se;document.body.onmousemove=tt=>{let Z=tt.clientX-ve,Ne=tt.clientY-ye;const Ye=document.getElementsByClassName("markdown-popup-form")[0],F=window.innerWidth-Ye.offsetWidth,we=window.innerHeight-Ye.offsetHeight;Z=Math.max(0,Math.min(Z,F)),Ne=Math.max(0,Math.min(Ne,we)),fe(tt.clientX,tt.clientY,ve,ye)&&(Ce(Z),O(Ne))},document.body.onmouseup=function(){document.body.onmousemove=null}},fe=(dt,ve,ye,tt)=>{const Z=document.body.clientHeight,Ne=document.body.clientWidth;return dt<20&&ye>dt||dt>Ne-20&&ye<dt||ve<20&&tt>ve||ve>Z-20&&tt<ve?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,k.useEffect)(()=>{z&&setTimeout(()=>{const dt=document.getElementsByClassName("markdown-popup-form")[0],ve=window.innerWidth/2-dt.offsetWidth/2,ye=window.innerHeight/2-dt.offsetHeight/2;Ce(ve),O(ye)},0)},[z]);const ut=()=>{je||A||Y(!0)};return J.createElement("div",{style:mt},J.createElement("div",{style:{width:_||"100%",position:"relative"},className:`${U.Z.mathFillWrap} ${je||A?"cursorDefault":""}`,onClick:()=>ut()},J.createElement("math-field",{disabled:je,locale:"zh_cn",class:`${U.Z.mathField} ${R}`,readOnly:A,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:Qe,style:{width:"100%",fontSize:Ke?18:14},value:Ke||""})),J.createElement(H.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:Nt,top:Se},title:J.createElement("div",{style:{cursor:"move"},onMouseDown:Ve},"\u8F93\u5165\u516C\u5F0F"),open:z,onOk:()=>{const dt=$e.current.getData();Qe.current.setValue(dt),Ge(dt),Y(!1)},onCancel:()=>{Y(!1)},destroyOnClose:!0,className:"markdown-popup-form"},J.createElement(ge.Z,{value:Ke,ref:$e,onChange:Ge,showSaveButton:!1})))});xt.Z=pe},3315:function(xr,xt,x){"use strict";var k=x(59301),U=x(95237),xe=x(43604),ge=x(99313),H=x(3113),J=x(39655),pe=x(18760),S=x(48136),_=x(59301);const Ge=(0,k.forwardRef)(({callback:je,showSaveButton:A,value:R=""},Ke)=>{const mt=(0,k.useRef)(),gt=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Qe=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],$e=Se=>{mt.current.setValue(mt.current.getValue()+" "+Se.value+" ")},Nt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:_.createElement(U.Z,{className:pe.Z.lists,gutter:[10,10]},gt.map((Se,O)=>_.createElement(xe.Z,{flex:"110px",className:pe.Z.item},_.createElement("div",null,_.createElement(J.Z,{value:`$$${Se.value}$$`}),Se.name),_.createElement("div",{className:pe.Z.children},Se.children.map((z,Y)=>_.createElement("div",{key:Y},_.createElement("h1",null,z.name),_.createElement(U.Z,{gutter:[10,10]},z.data.map((te,Ve)=>_.createElement(xe.Z,{key:Ve,onClick:()=>$e(te),className:pe.Z.diamond},_.createElement(J.Z,{value:"`$$"+te.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:_.createElement(U.Z,{className:pe.Z.lists,gutter:[10,10]},Qe.map((Se,O)=>_.createElement(xe.Z,{flex:"110px",className:pe.Z.item},_.createElement("div",null,_.createElement(J.Z,{value:"`$$"+Se.value+"$$`"}),Se.name),_.createElement("div",{className:pe.Z.children},Se.children.map((z,Y)=>_.createElement("div",{key:Y},z.name&&_.createElement("h1",null,z.name),_.createElement(U.Z,{gutter:[10,10]},z.data.map((te,Ve)=>_.createElement(xe.Z,{key:Ve,onClick:()=>$e(te),className:pe.Z.diamond},_.createElement(J.Z,{value:"`$$"+te.value+"$$`"}))))))))))}],Ce=()=>{var Se=document.createElement("div");Se.innerHTML=mt.current.getValue();var O=Se.innerText;return je&&je(O),O};return(0,k.useImperativeHandle)(Ke,()=>({getData:Ce})),_.createElement("div",{className:pe.Z.mathWrap},_.createElement(ge.default,{defaultActiveKey:"1",items:Nt}),_.createElement("math-field",{locale:"zh_cn",className:pe.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:mt,style:{width:800,marginTop:30,fontSize:18}},R||""),A&&_.createElement("div",{className:pe.Z.button},_.createElement(H.ZP,{size:"large",onClick:Ce,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});xt.Z=Ge},88542:function(xr,xt,x){"use strict";x.r(xt),x.d(xt,{default:function(){return Ye},formatTypeNameToDefaultScore:function(){return Z}});var k=x(59301),U=x(91482),xe=x(43418),ge=x(5871),H=x(66104),J=x(43141),pe=x(5112),S=x(39655),_={flexRow:"flexRow____Sm4b",flexColumn:"flexColumn___mQNZs",action:"action___QUVEn",setScore:"setScore___yZ0Yb",delete:"delete___e4taL",content:"content___jR4Y6",titleWrap:"titleWrap___zsXYY",titleNumber:"titleNumber___p60vi",score:"score___DbCHw",titleHtml:"titleHtml___FALbj",answerWrap:"answerWrap___uPjYq",answer:"answer___pfiPk",answerText:"answerText___K3TNr"},Ge=x(24334),je=x(54965),A=x(59301);const R=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"],Ke=[{type:"single",name:"\u5355\u9009\u9898"},{type:"multiple",name:"\u591A\u9009\u9898"},{type:"judgement",name:"\u5224\u65AD\u9898"},{type:"completion",name:"\u586B\u7A7A\u9898"},{type:"subjective",name:"\u7B80\u7B54\u9898"}];var gt=({index:F,typeName:we,type:me,data:G={},inMouseId:Fe,isshow:Ae,onSetScore:Le=()=>{},onDelete:ce=()=>{},onMouseEnter:ot=()=>{},showAnswer:ft=!1})=>{var Ot;const[Kt,_t]=(0,k.useState)(!1),er=()=>{var re;return A.createElement("div",{className:_.answerWrap},(re=G==null?void 0:G.choices)==null?void 0:re.map((ie,Xe)=>A.createElement("div",{className:`${_.flexRow} mt15`,key:Xe},A.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},R[Xe]),A.createElement("div",{className:`${_.answer} ml5`},A.createElement(S.Z,{value:ie==null?void 0:ie.choice_text})))),ft&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",G==null?void 0:G.standard_answer_show))},Ft=()=>{var re;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:`${_.flexRow} mt15`},(re=G==null?void 0:G.choices)==null?void 0:re.map((ie,Xe)=>A.createElement(pe.ZP,{disabled:!0,key:Xe},ie==null?void 0:ie.choice_text))),ft&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",G==null?void 0:G.standard_answer_show))},rr=()=>{var re;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:`${_.flexRow} mt15`},A.createElement(S.Z,{value:(re=G==null?void 0:G.program_attr)==null?void 0:re.description})),ft&&A.createElement("div",{className:"mt15"},A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",!(G!=null&&G.answer_text)&&"\u6682\u65E0"),A.createElement(S.Z,{value:(G==null?void 0:G.answer_text)||""})))},Lt=()=>{var re;return A.createElement("div",{className:_.answerWrap},ft&&A.createElement("div",{className:`${_.flexColumn} mt15`},(re=G==null?void 0:G.standard_answer)==null?void 0:re.map((ie,Xe)=>A.createElement("div",null,(ie==null?void 0:ie.model)===1?A.createElement(S.Z,{key:Xe,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${ie.position}\uFF09\uFF1A${ie.answer_text.join("\u3001")}`,className:_.answerText}):A.createElement("span",{style:{display:"inline-flex",alignItems:"center",marginBottom:5}},"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A ",ie.position,"\uFF09\uFF1A",A.createElement(je.Z,{disabled:!0,width:"180px",value:ie.answer_text.join("\u3001")}))))))},oe=()=>{var re;return A.createElement("div",{className:_.answerWrap},ft&&A.createElement("div",{className:"mt15"},A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),A.createElement(S.Z,{value:(re=G==null?void 0:G.answer_texts)==null?void 0:re[0],className:_.answerText})))},V=()=>{var re,ie;return A.createElement("div",{className:_.answerWrap,style:{marginTop:10}},A.createElement(S.Z,{showProgramFill:!0,disabledFill:!0,value:Ge.Base64.decode((re=G==null?void 0:G.program_attr)==null?void 0:re.code)}),ft&&A.createElement("div",{className:`${_.flexColumn} mt15`},(ie=G==null?void 0:G.standard_answer)==null?void 0:ie.map((Xe,et)=>A.createElement(S.Z,{key:et,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${Xe.position}\uFF09\uFF1A${Xe.answer_text}`}))))},K=()=>{var re;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:"mt10"},"\u9636\u6BB5\u6210\u7EE9"),(re=G==null?void 0:G.shixun)==null?void 0:re.map((ie,Xe)=>{var et,it;return A.createElement("div",null,A.createElement("div",{className:"mt10 font14",key:Xe},"\u7B2C",Xe+1,"\u5173 ",ie==null?void 0:ie.challenge_name," \uFF08",ie.challenge_score,"\u5206\uFF09"),ft&&A.createElement("div",null,A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",((et=ie.challenge_answers)==null?void 0:et.length)===0?"\u6682\u65E0":""),(it=ie.challenge_answers)==null?void 0:it.map((Et,Bt)=>A.createElement("div",{className:"mt15"},A.createElement("div",null,"\u7EA7\u522B",Bt+1,"\uFF1A",Et.name),A.createElement(S.Z,{value:(Et==null?void 0:Et.contents)||"",className:_.answerText})))))}))},ue=()=>{var re;return A.createElement("div",{className:_.answerWrap,style:{display:Kt&&"none"}},(re=G==null?void 0:G.sub_questions)==null?void 0:re.map((ie,Xe)=>{var et,it,Et,Bt,W;const Mt=`<span style="margin-right: 10px">${F+1}.${Xe+1}</span><span>\uFF08${(et=Ke.find(vt=>vt.type==ie.item_type))==null?void 0:et.name}\uFF09</span><span class="c-grey-999">\uFF08${ie.score}\u5206\uFF09</span>`;return A.createElement(k.Fragment,{key:ie==null?void 0:ie.id},A.createElement("div",{className:_.titleWrap,style:{marginTop:16}},A.createElement(S.Z,{className:_.titleHtml,value:Mt+ie.name})),(ie.item_type=="single"||ie.item_type=="multiple")&&A.createElement(A.Fragment,null,(it=ie==null?void 0:ie.choices)==null?void 0:it.map((vt,N)=>A.createElement("div",{className:`${_.flexRow} mt15`,key:N},A.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},R[N]),A.createElement("div",{className:`${_.answer} ml5`},A.createElement(S.Z,{value:vt==null?void 0:vt.choice_text})))),ft&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",ie==null?void 0:ie.standard_answer_show)),ie.item_type=="judgement"&&A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:`${_.flexRow} mt15`},(Et=ie==null?void 0:ie.choices)==null?void 0:Et.map((vt,N)=>A.createElement(pe.ZP,{disabled:!0,key:N},vt==null?void 0:vt.choice_text))),ft&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",ie==null?void 0:ie.standard_answer_show)),ie.item_type=="completion"&&A.createElement("div",{className:_.answerWrap},ft&&A.createElement("div",{className:`${_.flexColumn} mt15`},(Bt=ie==null?void 0:ie.standard_answer)==null?void 0:Bt.map((vt,N)=>A.createElement("div",null,(vt==null?void 0:vt.model)===1?A.createElement(S.Z,{key:N,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${vt.position}\uFF09\uFF1A${vt.answer_text.join("\u3001")}`,className:_.answerText}):A.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A$",vt.position,"\uFF09\uFF1A",A.createElement(je.Z,{value:vt.answer_text.join("\u3001")})))))),ie.item_type=="subjective"&&A.createElement("div",{className:_.answerWrap},ft&&A.createElement("div",{className:"mt15"},A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),A.createElement(S.Z,{value:(W=ie==null?void 0:ie.answer_texts)==null?void 0:W[0],className:_.answerText}))))}))},he=()=>{const re={SINGLE:er,MULTIPLE:er,JUDGMENT:Ft,PROGRAM:rr,COMPLETION:Lt,SUBJECTIVE:oe,PRACTICAL:K,COMBINATION:ue,BPROGRAM:V};return re[me]?re[me]():null},ze=(re,ie)=>{var Xe;return`<span style="margin-right: -10px">${ie+1}\u3001</span><span class="c-grey-999">\uFF08${(re==null?void 0:re.item_type)==="combination"?`\u5171${(Xe=re==null?void 0:re.sub_questions)==null?void 0:Xe.length}\u5C0F\u9898\uFF0C`:""}${re.score}\u5206\uFF09</span> `};return A.createElement("div",{onMouseEnter:()=>ot(G.id)},Fe===G.id&&A.createElement("div",{className:_.action},A.createElement("div",{className:_.setScore,onClick:()=>Le(G.id,we,G==null?void 0:G.shixun,G.score,G)},"\u8BBE\u7F6E\u5F97\u5206"),A.createElement("div",{className:_.delete,onClick:()=>ce(G.id)},"\u5220\u9664")),A.createElement("div",{className:_.content},A.createElement("div",{className:_.titleWrap,style:{justifyContent:"space-between"}},(G==null?void 0:G.item_type)==="bprogram"?A.createElement(S.Z,{className:_.titleHtml,value:ze(G,F)+((Ot=G==null?void 0:G.program_attr)==null?void 0:Ot.description)}):A.createElement(S.Z,{className:_.titleHtml,value:ze(G,F)+((G==null?void 0:G.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(G.name||(G==null?void 0:G.shixun_name))}),(G==null?void 0:G.item_type)==="combination"&&!Ae&&A.createElement("span",{onClick:re=>{_t(!Kt)},style:{textAlign:"end",flexShrink:0,cursor:"pointer"}},Kt?"\u5C55\u5F00":"\u6536\u8D77")),he()))},Qe={bg:"bg___uBTSf",wrap:"wrap___u47s7",flexRow:"flexRow___QK3mq",flexColumn:"flexColumn___IEH4c",flexJustifyBetween:"flexJustifyBetween___VROqY",relative:"relative___iGg_n",questionNumber:"questionNumber___CYWUo",score:"score___pHhZR",selectTopicButton:"selectTopicButton___aNhaw",line:"line___zzL1y",dragTip:"dragTip___eJpug",typeActive:"typeActive___cHbxQ",mouseTypeActive:"mouseTypeActive___THFkb",typeName:"typeName___PsYTO",typeNumber:"typeNumber___IW6t9",typeAction:"typeAction___gdIEg",setScore:"setScore___ftbgZ",delete:"delete___d1fFi",modal:"modal___COzbG",modalColumn:"modalColumn___Z8nDu",shixunModal:"shixunModal___xxSWV",shixunScore:"shixunScore___zrpkw"},$e=x(96938),Nt=x(78267),Ce=x.n(Nt),Se=x(36141),O=Object.defineProperty,z=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,ut=(F,we,me)=>we in F?O(F,we,{enumerable:!0,configurable:!0,writable:!0,value:me}):F[we]=me,dt=(F,we)=>{for(var me in we||(we={}))Ve.call(we,me)&&ut(F,me,we[me]);if(te)for(var me of te(we))fe.call(we,me)&&ut(F,me,we[me]);return F},ve=(F,we)=>z(F,Y(we)),ye=(F,we)=>{var me={};for(var G in F)Ve.call(F,G)&&we.indexOf(G)<0&&(me[G]=F[G]);if(F!=null&&te)for(var G of te(F))we.indexOf(G)<0&&fe.call(F,G)&&(me[G]=F[G]);return me},tt=(F,we,me)=>new Promise((G,Fe)=>{var Ae=ot=>{try{ce(me.next(ot))}catch(ft){Fe(ft)}},Le=ot=>{try{ce(me.throw(ot))}catch(ft){Fe(ft)}},ce=ot=>ot.done?G(ot.value):Promise.resolve(ot.value).then(Ae,Le);ce((me=me.apply(F,we)).next())});const Z=F=>({\u5355\u9009\u9898:2,\u591A\u9009\u9898:5,\u586B\u7A7A\u9898:2,\u5224\u65AD\u9898:2,\u7B80\u7B54\u9898:10,\u7F16\u7A0B\u9898:10,\u5B9E\u8BAD\u9898:5,\u7EC4\u5408\u9898:10})[F]||0,Ne=F=>{var we=F,{problemsetPreview:me,user:G,globalSetting:Fe,loading:Ae,dispatch:Le}=we,ce=ye(we,["problemsetPreview","user","globalSetting","loading","dispatch"]),ot,ft,Ot,Kt;const[_t,er]=(0,k.useState)(),[Ft,rr]=(0,k.useState)(),Lt=(0,k.useRef)();console.log(me,"problemsetPreview"),(0,k.useEffect)(()=>(Le({type:"globalSetting/footerToggle",payload:!1}),()=>{Le({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,k.useEffect)(()=>{oe()},[]);const oe=()=>{Le({type:"problemsetPreview/getPaperData"})},V=(re,ie,Xe=[],et,it)=>{var Et;const Bt=Ce().cloneDeep(it),W=Ce().cloneDeep(Xe).map(Mt=>ve(dt({},Mt),{challenge_score:Mt.challenge_score||5}));if(Lt.current=et||Z(ie),ie==="\u5B9E\u8BAD\u9898")return xe.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:k.createElement("div",{className:Qe.shixunModal},k.createElement("div",null,"\u5173\u5361\uFF1A"),W==null?void 0:W.map((Mt,vt)=>k.createElement("div",{className:Qe.shixunScore},vt+1,"\u3001",Mt.challenge_name,k.createElement("div",{style:{minWidth:"130px"}},k.createElement(ge.Z,{defaultValue:Mt.challenge_score,min:1,onChange:N=>{Mt.challenge_score=N}}),k.createElement("span",{className:"ml5"},"\u5206/\u9898"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>tt(void 0,null,function*(){yield(0,Se.Cc)({id:re,challenge_scores:W.map(Mt=>({challenge_id:Mt.challenge_id,score:Mt.challenge_score}))}),Lt.current=null,oe()})});if(ie==="\u7EC4\u5408\u9898")return xe.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:k.createElement("div",{className:Qe.shixunModal,style:{maxHeight:200,overflow:"auto"}},(Et=Bt==null?void 0:Bt.sub_questions)==null?void 0:Et.map((Mt,vt)=>k.createElement("div",{className:Qe.shixunScore},"\u7B2C",vt+1,"\u5C0F\u9898",k.createElement("div",{style:{minWidth:"130px"}},k.createElement(ge.Z,{defaultValue:Mt.score,min:1,onChange:N=>{Mt.score=N}}),k.createElement("span",{className:"ml5"},"\u5206"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>tt(void 0,null,function*(){var Mt;yield(0,Se.Vl)({id:re,subs:(Mt=Bt==null?void 0:Bt.sub_questions)==null?void 0:Mt.map(vt=>({basket_id:vt.basket_id,score:vt.score}))}),Lt.current=null,oe()})});xe.default.confirm({centered:!0,title:"\u8BBE\u7F6E\u5206\u6570",content:k.createElement("div",{className:""},k.createElement("span",null,"\u672C\u9898\u5206\u503C\uFF1A"),k.createElement(ge.Z,{min:1,defaultValue:Lt.current,onChange:Mt=>{Lt.current=Mt}}),k.createElement("span",{className:"ml5"},"\u5206/\u9898"),k.createElement("br",null),ie==="\u586B\u7A7A\u9898"&&k.createElement("div",{style:{color:"rgb(255, 0, 0)"}},"\u6BCF\u7A7A\u5206\u503C\u6309\u6BCF\u9898\u5206\u503C\u53D6\u5E73\u5747\u5206\u8BA1\u7B97")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>tt(void 0,null,function*(){yield Le({type:"problemsetPreview/setScore",payload:{id:re,score:Lt.current}}),Lt.current=null,oe()})})},K=re=>{xe.default.confirm({centered:!0,title:"\u63D0\u793A",content:k.createElement("div",{className:Qe.modal},"\u786E\u8BA4\u5220\u9664\u8BE5\u8BD5\u9898\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>tt(void 0,null,function*(){yield Le({type:"problemsetPreview/handleDelete",payload:{id:re}}),oe()})})},ue=(re,ie)=>{Lt.current=Z(ie),xe.default.confirm({centered:!0,title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u6570",content:k.createElement("div",{className:""},k.createElement("span",null,ie==="\u7EC4\u5408\u9898"?"\u7EC4\u5408\u9898\u4E2D\u7684\u6BCF\u5C0F\u9898":ie,"\uFF1A"),k.createElement(ge.Z,{min:1,defaultValue:Lt.current,onChange:Xe=>{Lt.current=Xe}}),k.createElement("span",{className:"ml5"},"\u5206/\u9898"),k.createElement("br",null),ie==="\u586B\u7A7A\u9898"&&k.createElement("div",{style:{color:"rgb(255, 0, 0)"}},"\u6BCF\u7A7A\u5206\u503C\u6309\u6BCF\u9898\u5206\u503C\u53D6\u5E73\u5747\u5206\u8BA1\u7B97")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>tt(void 0,null,function*(){yield Le({type:"problemsetPreview/batchSetScore",payload:{item_type:re,score:Lt.current}}),Lt.current=null,oe()})})},he=re=>{xe.default.confirm({centered:!0,title:"\u63D0\u793A",content:k.createElement("div",{className:Qe.modalColumn},k.createElement("p",null,"\u5220\u9664\u5927\u9898\uFF0C\u5C06\u5220\u9664\u8BE5\u5927\u9898\u4E0B\u6240\u6709\u5C0F\u9898"),k.createElement("p",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u5927\u9898\uFF1F")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>tt(void 0,null,function*(){yield Le({type:"problemsetPreview/batchDelete",payload:{item_type:re}}),oe()})})},ze=(re,ie)=>tt(void 0,null,function*(){if(!re.destination||!re.source)return;const Xe=ie.questions[re.source.index].id,et=re.destination.index+1;(yield Le({type:"problemsetPreview/adjustPosition",payload:{id:Xe,position:et}})).status!==-1&&oe()});return k.createElement("section",{className:Qe.bg},k.createElement(H.Z,{className:"mt30",separator:">"},k.createElement(H.Z.Item,null,"\u8BD5\u9898\u5E93"),k.createElement(H.Z.Item,{href:"/problemset"},"\u4EBA\u5DE5\u7EC4\u5377"),k.createElement(H.Z.Item,null,"\u8BD5\u5377\u9884\u89C8")),k.createElement("div",{className:Qe.wrap},k.createElement("div",{className:"pt20 pb20"},k.createElement("div",{className:`${Qe.flexRow} ${Qe.flexJustifyBetween}`},k.createElement("div",null,k.createElement("span",{className:Qe.questionNumber},"\u9898\u6570\uFF1A",(ot=me.paperData)==null?void 0:ot.all_questions_count),k.createElement("span",{className:Qe.score},"\u603B\u5206\uFF1A",(ft=me.paperData)==null?void 0:ft.all_score)),k.createElement("div",{className:Qe.selectTopicButton,onClick:()=>U.history.push("/problemset/preview_select")},"\u7EE7\u7EED\u9009\u9898")),k.createElement("div",{className:Qe.line}),k.createElement("div",{className:Qe.dragTip},"\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"),(Kt=(Ot=me.paperData)==null?void 0:Ot.questionList)==null?void 0:Kt.map((re,ie)=>{const Xe=re.type===Ft;return console.log(re,"paperItem"),k.createElement("div",{className:`${Qe.relative} mt20 mb20`,key:ie},k.createElement("div",{className:`${Qe.typeActive} ${Xe?Qe.mouseTypeActive:""}`,onMouseEnter:()=>{rr(re.type),er(null)}},k.createElement("span",{className:`${Qe.typeName} ${Xe?"ml20":""}`},re.number,"\u3001",re.name),k.createElement("span",{className:Qe.typeNumber},"\uFF08\u5171",re.questions_count,"\u9898\uFF0C",(re==null?void 0:re.type)==="COMBINATION"?`\u5305\u542B${re==null?void 0:re.sub_questions_count}\u5C0F\u9898\uFF0C`:"","\u5171",re.questions_score,"\u5206\uFF09")),Xe&&k.createElement("div",{className:`${Qe.typeAction} ${Qe.flexRow}`},re.type!=="PRACTICAL"&&k.createElement("div",{className:Qe.setScore,onClick:()=>ue(re.type,re.name)},"\u6279\u91CF\u8BBE\u7F6E\u5F97\u5206"),k.createElement("div",{className:Qe.delete,onClick:()=>he(re.type)},"\u5220\u9664")),k.createElement(J.Z5,{onDragEnd:et=>ze(et,re)},k.createElement(J.bK,{droppableId:ie.toString()},(et,it)=>{var Et;return k.createElement("div",ve(dt({className:"mt20",ref:et.innerRef},et.droppableProps),{onScroll:()=>{}}),(Et=re.questions)==null?void 0:Et.map((Bt,W)=>k.createElement(J._l,{draggableId:Bt.id.toString(),index:W,key:Bt.id},Mt=>k.createElement("div",dt(dt({ref:Mt.innerRef},Mt.draggableProps),Mt.dragHandleProps),k.createElement(gt,{index:W,typeName:re.name,type:re.type,data:Bt,inMouseId:_t,onSetScore:V,onDelete:K,onMouseEnter:vt=>{er(vt),rr(null)}})))))})))}))),k.createElement($e.t,{okText:"\u4FDD\u5B58\u8BD5\u5377",onCancel:()=>U.history.replace("/problemset"),onOk:()=>U.history.push("/problemset/preview_new")}))};var Ye=(0,U.connect)(({problemsetPreview:F,user:we,loading:me,globalSetting:G})=>({problemsetPreview:F,user:we,globalSetting:G,loading:me.effects}))(Ne)},19080:function(xr,xt,x){"use strict";x.d(xt,{F:function(){return H},Z:function(){return ge}});var k=x(92310),U=x.n(k);const xe=null;function ge(J,pe,S){return U()({[`${J}-status-success`]:pe==="success",[`${J}-status-warning`]:pe==="warning",[`${J}-status-error`]:pe==="error",[`${J}-status-validating`]:pe==="validating",[`${J}-has-feedback`]:S})}const H=(J,pe)=>pe||J},66104:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return tt}});var k=x(92310),U=x.n(k),xe=x(11592),ge=x(26112),H=x(59301),J=x(92343),pe=x(36355),S=x(84105),_=x(91857);const Ge=Z=>{let{children:Ne}=Z;const{getPrefixCls:Ye}=H.useContext(pe.E_),F=Ye("breadcrumb");return H.createElement("li",{className:`${F}-separator`,"aria-hidden":"true"},Ne===""?Ne:Ne||"/")};Ge.__ANT_BREADCRUMB_SEPARATOR=!0;var je=Ge,A=function(Z,Ne){var Ye={};for(var F in Z)Object.prototype.hasOwnProperty.call(Z,F)&&Ne.indexOf(F)<0&&(Ye[F]=Z[F]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,F=Object.getOwnPropertySymbols(Z);we<F.length;we++)Ne.indexOf(F[we])<0&&Object.prototype.propertyIsEnumerable.call(Z,F[we])&&(Ye[F[we]]=Z[F[we]]);return Ye};function R(Z,Ne){if(Z.title===void 0||Z.title===null)return null;const Ye=Object.keys(Ne).join("|");return typeof Z.title=="object"?Z.title:String(Z.title).replace(new RegExp(`:(${Ye})`,"g"),(F,we)=>Ne[we]||F)}function Ke(Z,Ne,Ye,F){if(Ye==null)return null;const{className:we,onClick:me}=Ne,G=A(Ne,["className","onClick"]),Fe=Object.assign(Object.assign({},(0,ge.Z)(G,{data:!0,aria:!0})),{onClick:me});return F!==void 0?H.createElement("a",Object.assign({},Fe,{className:U()(`${Z}-link`,we),href:F}),Ye):H.createElement("span",Object.assign({},Fe,{className:U()(`${Z}-link`,we)}),Ye)}function mt(Z,Ne){return(F,we,me,G,Fe)=>{if(Ne)return Ne(F,we,me,G);const Ae=R(F,we);return Ke(Z,F,Ae,Fe)}}var gt=function(Z,Ne){var Ye={};for(var F in Z)Object.prototype.hasOwnProperty.call(Z,F)&&Ne.indexOf(F)<0&&(Ye[F]=Z[F]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,F=Object.getOwnPropertySymbols(Z);we<F.length;we++)Ne.indexOf(F[we])<0&&Object.prototype.propertyIsEnumerable.call(Z,F[we])&&(Ye[F[we]]=Z[F[we]]);return Ye};const Qe=Z=>{const{prefixCls:Ne,separator:Ye="/",children:F,menu:we,overlay:me,dropdownProps:G,href:Fe}=Z,Le=(ce=>{if(we||me){const ot=Object.assign({},G);if(we){const ft=we||{},{items:Ot}=ft,Kt=gt(ft,["items"]);ot.menu=Object.assign(Object.assign({},Kt),{items:Ot==null?void 0:Ot.map((_t,er)=>{var{key:Ft,title:rr,label:Lt,path:oe}=_t,V=gt(_t,["key","title","label","path"]);let K=Lt!=null?Lt:rr;return oe&&(K=H.createElement("a",{href:`${Fe}${oe}`},K)),Object.assign(Object.assign({},V),{key:Ft!=null?Ft:er,label:K})})})}else me&&(ot.overlay=me);return H.createElement(_.Z,Object.assign({placement:"bottom"},ot),H.createElement("span",{className:`${Ne}-overlay-link`},ce,H.createElement(S.Z,null)))}return ce})(F);return Le!=null?H.createElement(H.Fragment,null,H.createElement("li",null,Le),Ye&&H.createElement(je,null,Ye)):null},$e=Z=>{const{prefixCls:Ne,children:Ye,href:F}=Z,we=gt(Z,["prefixCls","children","href"]),{getPrefixCls:me}=H.useContext(pe.E_),G=me("breadcrumb",Ne);return H.createElement(Qe,Object.assign({},we,{prefixCls:G}),Ke(G,we,Ye,F))};$e.__ANT_BREADCRUMB_ITEM=!0;var Nt=$e,Ce=x(17313),Se=x(83116),O=x(37613);const z=Z=>{const{componentCls:Ne,iconCls:Ye}=Z;return{[Ne]:Object.assign(Object.assign({},(0,Ce.Wf)(Z)),{color:Z.itemColor,fontSize:Z.fontSize,[Ye]:{fontSize:Z.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:Z.linkColor,transition:`color ${Z.motionDurationMid}`,padding:`0 ${Z.paddingXXS}px`,borderRadius:Z.borderRadiusSM,height:Z.lineHeight*Z.fontSize,display:"inline-block",marginInline:-Z.marginXXS,"&:hover":{color:Z.linkHoverColor,backgroundColor:Z.colorBgTextHover}},(0,Ce.Qy)(Z)),"li:last-child":{color:Z.lastItemColor},[`${Ne}-separator`]:{marginInline:Z.separatorMargin,color:Z.separatorColor},[`${Ne}-link`]:{[`
|
|
|
> ${Ye} + span,
|
|
|
> ${Ye} + a
|
|
|
`]:{marginInlineStart:Z.marginXXS}},[`${Ne}-overlay-link`]:{borderRadius:Z.borderRadiusSM,height:Z.lineHeight*Z.fontSize,display:"inline-block",padding:`0 ${Z.paddingXXS}px`,marginInline:-Z.marginXXS,[`> ${Ye}`]:{marginInlineStart:Z.marginXXS,fontSize:Z.fontSizeIcon},"&:hover":{color:Z.linkHoverColor,backgroundColor:Z.colorBgTextHover,a:{color:Z.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${Z.componentCls}-rtl`]:{direction:"rtl"}})}};var Y=(0,Se.Z)("Breadcrumb",Z=>{const Ne=(0,O.TS)(Z,{});return[z(Ne)]},Z=>({itemColor:Z.colorTextDescription,lastItemColor:Z.colorText,iconFontSize:Z.fontSize,linkColor:Z.colorTextDescription,linkHoverColor:Z.colorText,separatorColor:Z.colorTextDescription,separatorMargin:Z.marginXS})),te=function(Z,Ne){var Ye={};for(var F in Z)Object.prototype.hasOwnProperty.call(Z,F)&&Ne.indexOf(F)<0&&(Ye[F]=Z[F]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,F=Object.getOwnPropertySymbols(Z);we<F.length;we++)Ne.indexOf(F[we])<0&&Object.prototype.propertyIsEnumerable.call(Z,F[we])&&(Ye[F[we]]=Z[F[we]]);return Ye};function Ve(Z){const{breadcrumbName:Ne,children:Ye}=Z,F=te(Z,["breadcrumbName","children"]),we=Object.assign({title:Ne},F);return Ye&&(we.menu={items:Ye.map(me=>{var{breadcrumbName:G}=me,Fe=te(me,["breadcrumbName"]);return Object.assign(Object.assign({},Fe),{title:G})})}),we}function fe(Z,Ne){return(0,H.useMemo)(()=>Z||(Ne?Ne.map(Ve):null),[Z,Ne])}var ut=function(Z,Ne){var Ye={};for(var F in Z)Object.prototype.hasOwnProperty.call(Z,F)&&Ne.indexOf(F)<0&&(Ye[F]=Z[F]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,F=Object.getOwnPropertySymbols(Z);we<F.length;we++)Ne.indexOf(F[we])<0&&Object.prototype.propertyIsEnumerable.call(Z,F[we])&&(Ye[F[we]]=Z[F[we]]);return Ye};const dt=(Z,Ne)=>{if(Ne===void 0)return Ne;let Ye=(Ne||"").replace(/^\//,"");return Object.keys(Z).forEach(F=>{Ye=Ye.replace(`:${F}`,Z[F])}),Ye},ve=Z=>{const{prefixCls:Ne,separator:Ye="/",style:F,className:we,rootClassName:me,routes:G,items:Fe,children:Ae,itemRender:Le,params:ce={}}=Z,ot=ut(Z,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:ft,direction:Ot,breadcrumb:Kt}=H.useContext(pe.E_);let _t;const er=ft("breadcrumb",Ne),[Ft,rr]=Y(er),Lt=fe(Fe,G),oe=mt(er,Le);if(Lt&&Lt.length>0){const ue=[],he=Fe||G;_t=Lt.map((ze,re)=>{const{path:ie,key:Xe,type:et,menu:it,overlay:Et,onClick:Bt,className:W,separator:Mt,dropdownProps:vt}=ze,N=dt(ce,ie);N!==void 0&&ue.push(N);const q=Xe!=null?Xe:re;if(et==="separator")return H.createElement(je,{key:q},Mt);const de={},at=re===Lt.length-1;it?de.menu=it:Et&&(de.overlay=Et);let{href:Oe}=ze;return ue.length&&N!==void 0&&(Oe=`#/${ue.join("/")}`),H.createElement(Qe,Object.assign({key:q},de,(0,ge.Z)(ze,{data:!0,aria:!0}),{className:W,dropdownProps:vt,href:Oe,separator:at?"":Ye,onClick:Bt,prefixCls:er}),oe(ze,ce,he,ue,Oe))})}else if(Ae){const ue=(0,xe.Z)(Ae).length;_t=(0,xe.Z)(Ae).map((he,ze)=>{if(!he)return he;const re=ze===ue-1;return(0,J.Tm)(he,{separator:re?"":Ye,key:ze})})}const V=U()(er,Kt==null?void 0:Kt.className,{[`${er}-rtl`]:Ot==="rtl"},we,me,rr),K=Object.assign(Object.assign({},Kt==null?void 0:Kt.style),F);return Ft(H.createElement("nav",Object.assign({className:V,style:K},ot),H.createElement("ol",null,_t)))};ve.Item=Nt,ve.Separator=je;var ye=ve,tt=ye},91857:function(xr,xt,x){"use strict";var k=x(59301),U=x(38819),xe=x(92310),ge=x.n(xe),H=x(31561),J=x(70425),pe=x(18929),S=x(2738),_=x(79676),Ge=x(53487),je=x(92343),A=x(36355),R=x(20834),Ke=x(40875),mt=x(88088),gt=x(47211);const Qe=null,$e=O=>{const{menu:z,arrow:Y,prefixCls:te,children:Ve,trigger:fe,disabled:ut,dropdownRender:dt,getPopupContainer:ve,overlayClassName:ye,rootClassName:tt,open:Z,onOpenChange:Ne,visible:Ye,onVisibleChange:F,mouseEnterDelay:we=.15,mouseLeaveDelay:me=.1,autoAdjustOverflow:G=!0,placement:Fe="",overlay:Ae,transitionName:Le}=O,{getPopupContainer:ce,getPrefixCls:ot,direction:ft}=k.useContext(A.E_),Ot=k.useMemo(()=>{const it=ot();return Le!==void 0?Le:Fe.includes("top")?`${it}-slide-down`:`${it}-slide-up`},[ot,Fe,Le]),Kt=k.useMemo(()=>Fe?Fe.includes("Center")?Fe.slice(0,Fe.indexOf("Center")):Fe:ft==="rtl"?"bottomRight":"bottomLeft",[Fe,ft]),_t=ot("dropdown",te),[er,Ft]=(0,gt.Z)(_t),[,rr]=(0,mt.Z)(),Lt=k.Children.only(Ve),oe=(0,je.Tm)(Lt,{className:ge()(`${_t}-trigger`,{[`${_t}-rtl`]:ft==="rtl"},Lt.props.className),disabled:ut}),V=ut?[]:fe;let K;V&&V.includes("contextMenu")&&(K=!0);const[ue,he]=(0,pe.Z)(!1,{value:Z!=null?Z:Ye}),ze=(0,J.useEvent)(it=>{Ne==null||Ne(it),F==null||F(it),he(it)}),re=ge()(ye,tt,Ft,{[`${_t}-rtl`]:ft==="rtl"}),ie=(0,_.Z)({arrowPointAtCenter:typeof Y=="object"&&Y.pointAtCenter,autoAdjustOverflow:G,offset:rr.marginXXS,arrowWidth:Y?rr.sizePopupArrow:0,borderRadius:rr.borderRadius}),Xe=k.useCallback(()=>{he(!1)},[]),et=()=>{let it;return z!=null&&z.items?it=k.createElement(R.default,Object.assign({},z)):typeof Ae=="function"?it=Ae():it=Ae,dt&&(it=dt(it)),it=k.Children.only(typeof it=="string"?k.createElement("span",null,it):it),k.createElement(Ke.J,{prefixCls:`${_t}-menu`,expandIcon:k.createElement("span",{className:`${_t}-menu-submenu-arrow`},k.createElement(U.Z,{className:`${_t}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Xe,validator:Et=>{let{mode:Bt}=Et}},it)};return er(k.createElement(H.Z,Object.assign({alignPoint:K},(0,S.Z)(O,["rootClassName"]),{mouseEnterDelay:we,mouseLeaveDelay:me,visible:ue,builtinPlacements:ie,arrow:!!Y,overlayClassName:re,prefixCls:_t,getPopupContainer:ve||ce,transitionName:Ot,trigger:V,overlay:et,placement:Kt,onVisibleChange:ze}),oe))};function Nt(O){return Object.assign(Object.assign({},O),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const Ce=(0,Ge.Z)($e,"dropdown",O=>O,Nt),Se=O=>k.createElement(Ce,Object.assign({},O),k.createElement("span",null));$e._InternalPanelDoNotUseOrYouWillBeFired=Se,xt.Z=$e},47211:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return je}});var k=x(17313),U=x(13826),xe=x(92899),ge=x(29878),H=x(19447),J=x(83116),pe=x(37613),_=A=>{const{componentCls:R,menuCls:Ke,colorError:mt,colorTextLightSolid:gt}=A,Qe=`${Ke}-item`;return{[`${R}, ${R}-menu-submenu`]:{[`${Ke} ${Qe}`]:{[`&${Qe}-danger:not(${Qe}-disabled)`]:{color:mt,"&:hover":{color:gt,backgroundColor:mt}}}}}};const Ge=A=>{const{componentCls:R,menuCls:Ke,zIndexPopup:mt,dropdownArrowDistance:gt,sizePopupArrow:Qe,antCls:$e,iconCls:Nt,motionDurationMid:Ce,dropdownPaddingVertical:Se,fontSize:O,dropdownEdgeChildPadding:z,colorTextDisabled:Y,fontSizeIcon:te,controlPaddingHorizontal:Ve,colorBgElevated:fe}=A;return[{[R]:Object.assign(Object.assign({},(0,k.Wf)(A)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:mt,display:"block","&::before":{position:"absolute",insetBlock:-gt+Qe/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${$e}-btn`]:{[`& > ${Nt}-down, & > ${$e}-btn-icon > ${Nt}-down`]:{fontSize:te}},[`${R}-wrap`]:{position:"relative",[`${$e}-btn > ${Nt}-down`]:{fontSize:te},[`${Nt}-down::before`]:{transition:`transform ${Ce}`}},[`${R}-wrap-open`]:{[`${Nt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${$e}-slide-down-enter${$e}-slide-down-enter-active${R}-placement-bottomLeft,
|
|
|
&${$e}-slide-down-appear${$e}-slide-down-appear-active${R}-placement-bottomLeft,
|
|
|
&${$e}-slide-down-enter${$e}-slide-down-enter-active${R}-placement-bottom,
|
|
|
&${$e}-slide-down-appear${$e}-slide-down-appear-active${R}-placement-bottom,
|
|
|
&${$e}-slide-down-enter${$e}-slide-down-enter-active${R}-placement-bottomRight,
|
|
|
&${$e}-slide-down-appear${$e}-slide-down-appear-active${R}-placement-bottomRight`]:{animationName:U.fJ},[`&${$e}-slide-up-enter${$e}-slide-up-enter-active${R}-placement-topLeft,
|
|
|
&${$e}-slide-up-appear${$e}-slide-up-appear-active${R}-placement-topLeft,
|
|
|
&${$e}-slide-up-enter${$e}-slide-up-enter-active${R}-placement-top,
|
|
|
&${$e}-slide-up-appear${$e}-slide-up-appear-active${R}-placement-top,
|
|
|
&${$e}-slide-up-enter${$e}-slide-up-enter-active${R}-placement-topRight,
|
|
|
&${$e}-slide-up-appear${$e}-slide-up-appear-active${R}-placement-topRight`]:{animationName:U.Qt},[`&${$e}-slide-down-leave${$e}-slide-down-leave-active${R}-placement-bottomLeft,
|
|
|
&${$e}-slide-down-leave${$e}-slide-down-leave-active${R}-placement-bottom,
|
|
|
&${$e}-slide-down-leave${$e}-slide-down-leave-active${R}-placement-bottomRight`]:{animationName:U.Uw},[`&${$e}-slide-up-leave${$e}-slide-up-leave-active${R}-placement-topLeft,
|
|
|
&${$e}-slide-up-leave${$e}-slide-up-leave-active${R}-placement-top,
|
|
|
&${$e}-slide-up-leave${$e}-slide-up-leave-active${R}-placement-topRight`]:{animationName:U.ly}})},(0,H.ZP)(A,{colorBg:fe,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${R} ${Ke}`]:{position:"relative",margin:0},[`${Ke}-submenu-popup`]:{position:"absolute",zIndex:mt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${R}, ${R}-menu-submenu`]:{[Ke]:Object.assign(Object.assign({padding:z,listStyleType:"none",backgroundColor:fe,backgroundClip:"padding-box",borderRadius:A.borderRadiusLG,outline:"none",boxShadow:A.boxShadowSecondary},(0,k.Qy)(A)),{[`${Ke}-item-group-title`]:{padding:`${Se}px ${Ve}px`,color:A.colorTextDescription,transition:`all ${Ce}`},[`${Ke}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ke}-item-icon`]:{minWidth:O,marginInlineEnd:A.marginXS,fontSize:A.fontSizeSM},[`${Ke}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Ce}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ke}-item, ${Ke}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Se}px ${Ve}px`,color:A.colorText,fontWeight:"normal",fontSize:O,lineHeight:A.lineHeight,cursor:"pointer",transition:`all ${Ce}`,borderRadius:A.borderRadiusSM,"&:hover, &-active":{backgroundColor:A.controlItemBgHover}},(0,k.Qy)(A)),{"&-selected":{color:A.colorPrimary,backgroundColor:A.controlItemBgActive,"&:hover, &-active":{backgroundColor:A.controlItemBgActiveHover}},"&-disabled":{color:Y,cursor:"not-allowed","&:hover":{color:Y,backgroundColor:fe,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${A.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:A.colorSplit},[`${R}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:A.paddingXS,[`${R}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:A.colorTextDescription,fontSize:te,fontStyle:"normal"}}}),[`${Ke}-item-group-list`]:{margin:`0 ${A.marginXS}px`,padding:0,listStyle:"none"},[`${Ke}-submenu-title`]:{paddingInlineEnd:Ve+A.fontSizeSM},[`${Ke}-submenu-vertical`]:{position:"relative"},[`${Ke}-submenu${Ke}-submenu-disabled ${R}-menu-submenu-title`]:{[`&, ${R}-menu-submenu-arrow-icon`]:{color:Y,backgroundColor:fe,cursor:"not-allowed"}},[`${Ke}-submenu-selected ${R}-menu-submenu-title`]:{color:A.colorPrimary}})}},[(0,U.oN)(A,"slide-up"),(0,U.oN)(A,"slide-down"),(0,xe.Fm)(A,"move-up"),(0,xe.Fm)(A,"move-down"),(0,ge._y)(A,"zoom-big")]]};var je=(0,J.Z)("Dropdown",(A,R)=>{let{rootPrefixCls:Ke}=R;const{marginXXS:mt,sizePopupArrow:gt,controlHeight:Qe,fontSize:$e,lineHeight:Nt,paddingXXS:Ce,componentCls:Se,borderRadiusLG:O}=A,z=(Qe-$e*Nt)/2,{dropdownArrowOffset:Y}=(0,H.fS)({contentRadius:O}),te=(0,pe.TS)(A,{menuCls:`${Se}-menu`,rootPrefixCls:Ke,dropdownArrowDistance:gt/2+mt,dropdownArrowOffset:Y,dropdownPaddingVertical:z,dropdownEdgeChildPadding:Ce});return[Ge(te),_(te)]},A=>({zIndexPopup:A.zIndexPopupBase+50}))},5871:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return vt}});var k=x(84105),U=x(87395),xe=x(92310),ge=x.n(xe),H=x(60499),J=x(18642),pe=x(43749),S=x(72190),_=x(42244),Ge=x(38705),je=x(17212);function A(){return typeof BigInt=="function"}function R(N){return!N&&N!==0&&!Number.isNaN(N)||!String(N).trim()}function Ke(N){var q=N.trim(),de=q.startsWith("-");de&&(q=q.slice(1)),q=q.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),q.startsWith(".")&&(q="0".concat(q));var at=q||"0",Oe=at.split("."),Ee=Oe[0]||"0",or=Oe[1]||"0";Ee==="0"&&or==="0"&&(de=!1);var Ht=de?"-":"";return{negative:de,negativeStr:Ht,trimStr:at,integerStr:Ee,decimalStr:or,fullStr:"".concat(Ht).concat(at)}}function mt(N){var q=String(N);return!Number.isNaN(Number(q))&&q.includes("e")}function gt(N){var q=String(N);if(mt(N)){var de=Number(q.slice(q.indexOf("e-")+2)),at=q.match(/\.(\d+)/);return at!=null&&at[1]&&(de+=at[1].length),de}return q.includes(".")&&$e(q)?q.length-q.indexOf(".")-1:0}function Qe(N){var q=String(N);if(mt(N)){if(N>Number.MAX_SAFE_INTEGER)return String(A()?BigInt(N).toString():Number.MAX_SAFE_INTEGER);if(N<Number.MIN_SAFE_INTEGER)return String(A()?BigInt(N).toString():Number.MIN_SAFE_INTEGER);q=N.toFixed(gt(q))}return Ke(q).fullStr}function $e(N){return typeof N=="number"?!Number.isNaN(N):N?/^\s*-?\d+(\.\d+)?\s*$/.test(N)||/^\s*-?\d+\.\s*$/.test(N)||/^\s*-?\.\d+\s*$/.test(N):!1}var Nt=function(){function N(q){if((0,Ge.Z)(this,N),(0,J.Z)(this,"origin",""),(0,J.Z)(this,"negative",void 0),(0,J.Z)(this,"integer",void 0),(0,J.Z)(this,"decimal",void 0),(0,J.Z)(this,"decimalLen",void 0),(0,J.Z)(this,"empty",void 0),(0,J.Z)(this,"nan",void 0),R(q)){this.empty=!0;return}if(this.origin=String(q),q==="-"||Number.isNaN(q)){this.nan=!0;return}var de=q;if(mt(de)&&(de=Number(de)),de=typeof de=="string"?de:Qe(de),$e(de)){var at=Ke(de);this.negative=at.negative;var Oe=at.trimStr.split(".");this.integer=BigInt(Oe[0]);var Ee=Oe[1]||"0";this.decimal=BigInt(Ee),this.decimalLen=Ee.length}else this.nan=!0}return(0,je.Z)(N,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(de){var at="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(de,"0"));return BigInt(at)}},{key:"negate",value:function(){var de=new N(this.toString());return de.negative=!de.negative,de}},{key:"cal",value:function(de,at,Oe){var Ee=Math.max(this.getDecimalStr().length,de.getDecimalStr().length),or=this.alignDecimal(Ee),Ht=de.alignDecimal(Ee),Wt=at(or,Ht).toString(),Gt=Oe(Ee),nr=Ke(Wt),Ct=nr.negativeStr,wr=nr.trimStr,hr="".concat(Ct).concat(wr.padStart(Gt+1,"0"));return new N("".concat(hr.slice(0,-Gt),".").concat(hr.slice(-Gt)))}},{key:"add",value:function(de){if(this.isInvalidate())return new N(de);var at=new N(de);return at.isInvalidate()?this:this.cal(at,function(Oe,Ee){return Oe+Ee},function(Oe){return Oe})}},{key:"multi",value:function(de){var at=new N(de);return this.isInvalidate()||at.isInvalidate()?new N(NaN):this.cal(at,function(Oe,Ee){return Oe*Ee},function(Oe){return Oe*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(de){return this.toString()===(de==null?void 0:de.toString())}},{key:"lessEquals",value:function(de){return this.add(de.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return de?this.isInvalidate()?"":Ke("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),N}(),Ce=function(){function N(q){if((0,Ge.Z)(this,N),(0,J.Z)(this,"origin",""),(0,J.Z)(this,"number",void 0),(0,J.Z)(this,"empty",void 0),R(q)){this.empty=!0;return}this.origin=String(q),this.number=Number(q)}return(0,je.Z)(N,[{key:"negate",value:function(){return new N(-this.toNumber())}},{key:"add",value:function(de){if(this.isInvalidate())return new N(de);var at=Number(de);if(Number.isNaN(at))return this;var Oe=this.number+at;if(Oe>Number.MAX_SAFE_INTEGER)return new N(Number.MAX_SAFE_INTEGER);if(Oe<Number.MIN_SAFE_INTEGER)return new N(Number.MIN_SAFE_INTEGER);var Ee=Math.max(gt(this.number),gt(at));return new N(Oe.toFixed(Ee))}},{key:"multi",value:function(de){var at=Number(de);if(this.isInvalidate()||Number.isNaN(at))return new N(NaN);var Oe=this.number*at;if(Oe>Number.MAX_SAFE_INTEGER)return new N(Number.MAX_SAFE_INTEGER);if(Oe<Number.MIN_SAFE_INTEGER)return new N(Number.MIN_SAFE_INTEGER);var Ee=Math.max(gt(this.number),gt(at));return new N(Oe.toFixed(Ee))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(de){return this.toNumber()===(de==null?void 0:de.toNumber())}},{key:"lessEquals",value:function(de){return this.add(de.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return de?this.isInvalidate()?"":Qe(this.number):this.origin}}]),N}();function Se(N){return A()?new Nt(N):new Ce(N)}function O(N,q,de){var at=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(N==="")return"";var Oe=Ke(N),Ee=Oe.negativeStr,or=Oe.integerStr,Ht=Oe.decimalStr,Wt="".concat(q).concat(Ht),Gt="".concat(Ee).concat(or);if(de>=0){var nr=Number(Ht[de]);if(nr>=5&&!at){var Ct=Se(N).add("".concat(Ee,"0.").concat("0".repeat(de)).concat(10-nr));return O(Ct.toString(),q,de,at)}return de===0?Gt:"".concat(Gt).concat(q).concat(Ht.padEnd(de,"0").slice(0,de))}return Wt===".0"?Gt:"".concat(Gt).concat(Wt)}var z=Se,Y=x(93681),te=x(34280),Ve=x(8654),fe=x(59301),ut=x(48736);function dt(N,q){var de=(0,fe.useRef)(null);function at(){try{var Ee=N.selectionStart,or=N.selectionEnd,Ht=N.value,Wt=Ht.substring(0,Ee),Gt=Ht.substring(or);de.current={start:Ee,end:or,value:Ht,beforeTxt:Wt,afterTxt:Gt}}catch(nr){}}function Oe(){if(N&&de.current&&q)try{var Ee=N.value,or=de.current,Ht=or.beforeTxt,Wt=or.afterTxt,Gt=or.start,nr=Ee.length;if(Ee.endsWith(Wt))nr=Ee.length-de.current.afterTxt.length;else if(Ee.startsWith(Ht))nr=Ht.length;else{var Ct=Ht[Gt-1],wr=Ee.indexOf(Ct,Gt-1);wr!==-1&&(nr=wr+1)}N.setSelectionRange(nr,nr)}catch(hr){(0,ut.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(hr.message))}}return[at,Oe]}var ve=x(49658),ye=function(){var q=(0,fe.useState)(!1),de=(0,S.Z)(q,2),at=de[0],Oe=de[1];return(0,te.Z)(function(){Oe((0,ve.Z)())},[]),at},tt=ye,Z=x(16089),Ne=200,Ye=600;function F(N){var q=N.prefixCls,de=N.upNode,at=N.downNode,Oe=N.upDisabled,Ee=N.downDisabled,or=N.onStep,Ht=fe.useRef(),Wt=fe.useRef([]),Gt=fe.useRef();Gt.current=or;var nr=function(){clearTimeout(Ht.current)},Ct=function(sn,qr){sn.preventDefault(),nr(),Gt.current(qr);function un(){Gt.current(qr),Ht.current=setTimeout(un,Ne)}Ht.current=setTimeout(un,Ye)};fe.useEffect(function(){return function(){nr(),Wt.current.forEach(function(Zt){return Z.Z.cancel(Zt)})}},[]);var wr=tt();if(wr)return null;var hr="".concat(q,"-handler"),Ur=ge()(hr,"".concat(hr,"-up"),(0,J.Z)({},"".concat(hr,"-up-disabled"),Oe)),Er=ge()(hr,"".concat(hr,"-down"),(0,J.Z)({},"".concat(hr,"-down-disabled"),Ee)),cr=function(){return Wt.current.push((0,Z.Z)(nr))},nn={unselectable:"on",role:"button",onMouseUp:cr,onMouseLeave:cr};return fe.createElement("div",{className:"".concat(hr,"-wrap")},fe.createElement("span",(0,H.Z)({},nn,{onMouseDown:function(sn){Ct(sn,!0)},"aria-label":"Increase Value","aria-disabled":Oe,className:Ur}),de||fe.createElement("span",{unselectable:"on",className:"".concat(q,"-handler-up-inner")})),fe.createElement("span",(0,H.Z)({},nn,{onMouseDown:function(sn){Ct(sn,!1)},"aria-label":"Decrease Value","aria-disabled":Ee,className:Er}),at||fe.createElement("span",{unselectable:"on",className:"".concat(q,"-handler-down-inner")})))}function we(N){var q=typeof N=="number"?Qe(N):Ke(N).fullStr,de=q.includes(".");return de?Ke(q.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:N+"0"}var me=x(5643),G=function(){var N=(0,fe.useRef)(0),q=function(){Z.Z.cancel(N.current)};return(0,fe.useEffect)(function(){return q},[]),function(de){q(),N.current=(0,Z.Z)(function(){de()})}},Fe=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Ae=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Le=function(q,de){return q||de.isEmpty()?de.toString():de.toNumber()},ce=function(q){var de=z(q);return de.isInvalidate()?null:de},ot=fe.forwardRef(function(N,q){var de,at=N.prefixCls,Oe=at===void 0?"rc-input-number":at,Ee=N.className,or=N.style,Ht=N.min,Wt=N.max,Gt=N.step,nr=Gt===void 0?1:Gt,Ct=N.defaultValue,wr=N.value,hr=N.disabled,Ur=N.readOnly,Er=N.upHandler,cr=N.downHandler,nn=N.keyboard,Zt=N.controls,sn=Zt===void 0?!0:Zt,qr=N.classNames,un=N.stringMode,Jr=N.parser,Sr=N.formatter,Gr=N.precision,Nr=N.decimalSeparator,Bn=N.onChange,$n=N.onInput,wn=N.onPressEnter,Xn=N.onStep,C=(0,_.Z)(N,Fe),L="".concat(Oe,"-input"),Ie=fe.useRef(null),Pe=fe.useState(!1),Re=(0,S.Z)(Pe,2),He=Re[0],bt=Re[1],st=fe.useRef(!1),St=fe.useRef(!1),qt=fe.useRef(!1),jt=fe.useState(function(){return z(wr!=null?wr:Ct)}),$t=(0,S.Z)(jt,2),Tt=$t[0],Xt=$t[1];function Me(At){wr===void 0&&Xt(At)}var Fr=fe.useCallback(function(At,ht){if(!ht)return Gr>=0?Gr:Math.max(gt(At),gt(nr))},[Gr,nr]),Ir=fe.useCallback(function(At){var ht=String(At);if(Jr)return Jr(ht);var ar=ht;return Nr&&(ar=ar.replace(Nr,".")),ar.replace(/[^\w.-]+/g,"")},[Jr,Nr]),fr=fe.useRef(""),Wr=fe.useCallback(function(At,ht){if(Sr)return Sr(At,{userTyping:ht,input:String(fr.current)});var ar=typeof At=="number"?Qe(At):At;if(!ht){var zt=Fr(ar,ht);if($e(ar)&&(Nr||zt>=0)){var yr=Nr||".";ar=O(ar,yr,zt)}}return ar},[Sr,Fr,Nr]),pr=fe.useState(function(){var At=Ct!=null?Ct:wr;return Tt.isInvalidate()&&["string","number"].includes((0,pe.Z)(At))?Number.isNaN(At)?"":At:Wr(Tt.toString(),!1)}),Vr=(0,S.Z)(pr,2),le=Vr[0],X=Vr[1];fr.current=le;function be(At,ht){X(Wr(At.isInvalidate()?At.toString(!1):At.toString(!ht),ht))}var ke=fe.useMemo(function(){return ce(Wt)},[Wt,Gr]),j=fe.useMemo(function(){return ce(Ht)},[Ht,Gr]),ne=fe.useMemo(function(){return!ke||!Tt||Tt.isInvalidate()?!1:ke.lessEquals(Tt)},[ke,Tt]),ae=fe.useMemo(function(){return!j||!Tt||Tt.isInvalidate()?!1:Tt.lessEquals(j)},[j,Tt]),Be=dt(Ie.current,He),lt=(0,S.Z)(Be,2),ct=lt[0],Vt=lt[1],sr=function(ht){return ke&&!ht.lessEquals(ke)?ke:j&&!j.lessEquals(ht)?j:null},mr=function(ht){return!sr(ht)},gr=function(ht,ar){var zt=ht,yr=mr(zt)||zt.isEmpty();if(!zt.isEmpty()&&!ar&&(zt=sr(zt)||zt,yr=!0),!Ur&&!hr&&yr){var dn=zt.toString(),ur=Fr(dn,ar);return ur>=0&&(zt=z(O(dn,".",ur)),mr(zt)||(zt=z(O(dn,".",ur,!0)))),zt.equals(Tt)||(Me(zt),Bn==null||Bn(zt.isEmpty()?null:Le(un,zt)),wr===void 0&&be(zt,ar)),zt}return Tt},tr=G(),Lr=function At(ht){if(ct(),fr.current=ht,X(ht),!St.current){var ar=Ir(ht),zt=z(ar);zt.isNaN()||gr(zt,!0)}$n==null||$n(ht),tr(function(){var yr=ht;Jr||(yr=ht.replace(/。/g,".")),yr!==ht&&At(yr)})},$r=function(){St.current=!0},Jt=function(){St.current=!1,Lr(Ie.current.value)},Yt=function(ht){Lr(ht.target.value)},ir=function(ht){var ar;if(!(ht&&ne||!ht&&ae)){st.current=!1;var zt=z(qt.current?we(nr):nr);ht||(zt=zt.negate());var yr=(Tt||z(0)).add(zt.toString()),dn=gr(yr,!1);Xn==null||Xn(Le(un,dn),{offset:qt.current?we(nr):nr,type:ht?"up":"down"}),(ar=Ie.current)===null||ar===void 0||ar.focus()}},Ut=function(ht){var ar=z(Ir(le)),zt=ar;ar.isNaN()?zt=gr(Tt,ht):zt=gr(ar,ht),wr!==void 0?be(Tt,!1):zt.isNaN()||be(zt,!1)},Qt=function(){st.current=!0},dr=function(ht){var ar=ht.key,zt=ht.shiftKey;st.current=!0,qt.current=zt,ar==="Enter"&&(St.current||(st.current=!1),Ut(!1),wn==null||wn(ht)),nn!==!1&&!St.current&&["Up","ArrowUp","Down","ArrowDown"].includes(ar)&&(ir(ar==="Up"||ar==="ArrowUp"),ht.preventDefault())},Br=function(){st.current=!1,qt.current=!1},kr=function(){Ut(!1),bt(!1),st.current=!1};return(0,te.o)(function(){Tt.isInvalidate()||be(Tt,!1)},[Gr]),(0,te.o)(function(){var At=z(wr);Xt(At);var ht=z(Ir(le));(!At.equals(ht)||!st.current||Sr)&&be(At,st.current)},[wr]),(0,te.o)(function(){Sr&&Vt()},[le]),fe.createElement("div",{className:ge()(Oe,qr==null?void 0:qr.input,Ee,(de={},(0,J.Z)(de,"".concat(Oe,"-focused"),He),(0,J.Z)(de,"".concat(Oe,"-disabled"),hr),(0,J.Z)(de,"".concat(Oe,"-readonly"),Ur),(0,J.Z)(de,"".concat(Oe,"-not-a-number"),Tt.isNaN()),(0,J.Z)(de,"".concat(Oe,"-out-of-range"),!Tt.isInvalidate()&&!mr(Tt)),de)),style:or,onFocus:function(){bt(!0)},onBlur:kr,onKeyDown:dr,onKeyUp:Br,onCompositionStart:$r,onCompositionEnd:Jt,onBeforeInput:Qt},sn&&fe.createElement(F,{prefixCls:Oe,upNode:Er,downNode:cr,upDisabled:ne,downDisabled:ae,onStep:ir}),fe.createElement("div",{className:"".concat(L,"-wrap")},fe.createElement("input",(0,H.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ht,"aria-valuemax":Wt,"aria-valuenow":Tt.isInvalidate()?null:Tt.toString(),step:nr},C,{ref:(0,Ve.sQ)(Ie,q),className:L,value:le,onChange:Yt,disabled:hr,readOnly:Ur}))))}),ft=fe.forwardRef(function(N,q){var de=N.disabled,at=N.style,Oe=N.prefixCls,Ee=N.value,or=N.prefix,Ht=N.suffix,Wt=N.addonBefore,Gt=N.addonAfter,nr=N.classes,Ct=N.className,wr=N.classNames,hr=(0,_.Z)(N,Ae),Ur=fe.useRef(null),Er=function(nn){Ur.current&&(0,me.nH)(Ur.current,nn)};return fe.createElement(Y.BaseInput,{inputElement:fe.createElement(ot,(0,H.Z)({prefixCls:Oe,disabled:de,classNames:wr,ref:(0,Ve.sQ)(Ur,q)},hr)),className:Ct,triggerFocus:Er,prefixCls:Oe,value:Ee,disabled:de,style:at,prefix:or,suffix:Ht,addonAfter:Gt,addonBefore:Wt,classes:nr,classNames:wr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});ft.displayName="InputNumber";var Ot=ft,Kt=Ot,_t=x(19080),er=x(36355),Ft=x(92736),rr=x(1684),Lt=x(19716),oe=x(32441),V=x(33234),K=x(9937),ue=x(17313),he=x(74207),ze=x(83116),re=x(37613);const ie=(N,q)=>{let{componentCls:de,borderRadiusSM:at,borderRadiusLG:Oe}=N;const Ee=q==="lg"?Oe:at;return{[`&-${q}`]:{[`${de}-handler-wrap`]:{borderStartEndRadius:Ee,borderEndEndRadius:Ee},[`${de}-handler-up`]:{borderStartEndRadius:Ee},[`${de}-handler-down`]:{borderEndEndRadius:Ee}}}},Xe=N=>{const{componentCls:q,lineWidth:de,lineType:at,colorBorder:Oe,borderRadius:Ee,fontSizeLG:or,controlHeightLG:Ht,controlHeightSM:Wt,colorError:Gt,paddingInlineSM:nr,colorTextDescription:Ct,motionDurationMid:wr,handleHoverColor:hr,paddingInline:Ur,paddingBlock:Er,handleBg:cr,handleActiveBg:nn,colorTextDisabled:Zt,borderRadiusSM:sn,borderRadiusLG:qr,controlWidth:un,handleVisible:Jr,handleBorderColor:Sr}=N;return[{[q]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ue.Wf)(N)),(0,K.ik)(N)),(0,K.bi)(N,q)),{display:"inline-block",width:un,margin:0,padding:0,border:`${de}px ${at} ${Oe}`,borderRadius:Ee,"&-rtl":{direction:"rtl",[`${q}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:or,borderRadius:qr,[`input${q}-input`]:{height:Ht-2*de}},"&-sm":{padding:0,borderRadius:sn,[`input${q}-input`]:{height:Wt-2*de,padding:`0 ${nr}px`}},"&:hover":Object.assign({},(0,K.pU)(N)),"&-focused":Object.assign({},(0,K.M1)(N)),"&-out-of-range":{[`${q}-input-wrap`]:{input:{color:Gt}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,ue.Wf)(N)),(0,K.s7)(N)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${q}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${q}-group-addon`]:{borderRadius:qr,fontSize:N.fontSizeLG}},"&-sm":{[`${q}-group-addon`]:{borderRadius:sn}},[`${q}-wrapper-disabled > ${q}-group-addon`]:Object.assign({},(0,K.Xy)(N))}}),[`&-disabled ${q}-input`]:{cursor:"not-allowed"},[q]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,ue.Wf)(N)),{width:"100%",padding:`${Er}px ${Ur}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Ee,outline:0,transition:`all ${wr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,K.nz)(N.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[q]:Object.assign(Object.assign(Object.assign({[`&:hover ${q}-handler-wrap, &-focused ${q}-handler-wrap`]:{opacity:1},[`${q}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:N.handleWidth,height:"100%",background:cr,borderStartStartRadius:0,borderStartEndRadius:Ee,borderEndEndRadius:Ee,borderEndStartRadius:0,opacity:Jr===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${wr} linear ${wr}`,[`${q}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${q}-handler-up-inner,
|
|
|
${q}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:N.handleFontSize}}},[`${q}-handler`]:{height:"50%",overflow:"hidden",color:Ct,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${de}px ${at} ${Sr}`,transition:`all ${wr} linear`,"&:active":{background:nn},"&:hover":{height:"60%",[`
|
|
|
${q}-handler-up-inner,
|
|
|
${q}-handler-down-inner
|
|
|
`]:{color:hr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,ue.Ro)()),{color:Ct,transition:`all ${wr} linear`,userSelect:"none"})},[`${q}-handler-up`]:{borderStartEndRadius:Ee},[`${q}-handler-down`]:{borderBlockStart:`${de}px ${at} ${Sr}`,borderEndEndRadius:Ee}},ie(N,"lg")),ie(N,"sm")),{"&-disabled, &-readonly":{[`${q}-handler-wrap`]:{display:"none"},[`${q}-input`]:{color:"inherit"}},[`
|
|
|
${q}-handler-up-disabled,
|
|
|
${q}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${q}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${q}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Zt}})},{[`${q}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${q}-handler-down`]:{borderBlockStartWidth:0}}}]},et=N=>{const{componentCls:q,paddingBlock:de,paddingInline:at,inputAffixPadding:Oe,controlWidth:Ee,borderRadiusLG:or,borderRadiusSM:Ht}=N;return{[`${q}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,K.ik)(N)),(0,K.bi)(N,`${q}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:Ee,padding:0,paddingInlineStart:at,"&-lg":{borderRadius:or},"&-sm":{borderRadius:Ht},[`&:not(${q}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,K.pU)(N)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${q}-disabled`]:{background:"transparent"},[`> div${q}`]:{width:"100%",border:"none",outline:"none",[`&${q}-focused`]:{boxShadow:"none !important"}},[`input${q}-input`]:{padding:`${de}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${q}-handler-wrap`]:{zIndex:2},[q]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Oe},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:at,marginInlineStart:Oe}}})}};var it=(0,ze.Z)("InputNumber",N=>{const q=(0,re.TS)(N,(0,K.e5)(N));return[Xe(q),et(q),(0,he.c)(q)]},N=>Object.assign(Object.assign({},(0,K.TM)(N)),{controlWidth:90,handleWidth:N.controlHeightSM-N.lineWidth*2,handleFontSize:N.fontSize/2,handleVisible:"auto",handleActiveBg:N.colorFillAlter,handleBg:N.colorBgContainer,handleHoverColor:N.colorPrimary,handleBorderColor:N.colorBorder})),Et=function(N,q){var de={};for(var at in N)Object.prototype.hasOwnProperty.call(N,at)&&q.indexOf(at)<0&&(de[at]=N[at]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,at=Object.getOwnPropertySymbols(N);Oe<at.length;Oe++)q.indexOf(at[Oe])<0&&Object.prototype.propertyIsEnumerable.call(N,at[Oe])&&(de[at[Oe]]=N[at[Oe]]);return de};const Bt=fe.forwardRef((N,q)=>{const{getPrefixCls:de,direction:at}=fe.useContext(er.E_),Oe=fe.useRef(null);fe.useImperativeHandle(q,()=>Oe.current);const{className:Ee,rootClassName:or,size:Ht,disabled:Wt,prefixCls:Gt,addonBefore:nr,addonAfter:Ct,prefix:wr,bordered:hr=!0,readOnly:Ur,status:Er,controls:cr}=N,nn=Et(N,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Zt=de("input-number",Gt),[sn,qr]=it(Zt),{compactSize:un,compactItemClassnames:Jr}=(0,V.ri)(Zt,at);let Sr=fe.createElement(U.Z,{className:`${Zt}-handler-up-inner`}),Gr=fe.createElement(k.Z,{className:`${Zt}-handler-down-inner`});const Nr=typeof cr=="boolean"?cr:void 0;typeof cr=="object"&&(Sr=typeof cr.upIcon=="undefined"?Sr:fe.createElement("span",{className:`${Zt}-handler-up-inner`},cr.upIcon),Gr=typeof cr.downIcon=="undefined"?Gr:fe.createElement("span",{className:`${Zt}-handler-down-inner`},cr.downIcon));const{hasFeedback:Bn,status:$n,isFormItemInput:wn,feedbackIcon:Xn}=fe.useContext(oe.aM),C=(0,_t.F)($n,Er),L=(0,Lt.Z)(st=>{var St;return(St=Ht!=null?Ht:un)!==null&&St!==void 0?St:st}),Ie=fe.useContext(rr.Z),Pe=Wt!=null?Wt:Ie,Re=ge()({[`${Zt}-lg`]:L==="large",[`${Zt}-sm`]:L==="small",[`${Zt}-rtl`]:at==="rtl",[`${Zt}-borderless`]:!hr,[`${Zt}-in-form-item`]:wn},(0,_t.Z)(Zt,C),Jr,qr),He=`${Zt}-group`,bt=fe.createElement(Kt,Object.assign({ref:Oe,disabled:Pe,className:ge()(Ee,or),upHandler:Sr,downHandler:Gr,prefixCls:Zt,readOnly:Ur,controls:Nr,prefix:wr,suffix:Bn&&Xn,addonAfter:Ct&&fe.createElement(V.BR,null,fe.createElement(oe.Ux,{override:!0,status:!0},Ct)),addonBefore:nr&&fe.createElement(V.BR,null,fe.createElement(oe.Ux,{override:!0,status:!0},nr)),classNames:{input:Re},classes:{affixWrapper:ge()((0,_t.Z)(`${Zt}-affix-wrapper`,C,Bn),{[`${Zt}-affix-wrapper-sm`]:L==="small",[`${Zt}-affix-wrapper-lg`]:L==="large",[`${Zt}-affix-wrapper-rtl`]:at==="rtl",[`${Zt}-affix-wrapper-borderless`]:!hr},qr),wrapper:ge()({[`${He}-rtl`]:at==="rtl",[`${Zt}-wrapper-disabled`]:Pe},qr),group:ge()({[`${Zt}-group-wrapper-sm`]:L==="small",[`${Zt}-group-wrapper-lg`]:L==="large",[`${Zt}-group-wrapper-rtl`]:at==="rtl"},(0,_t.Z)(`${Zt}-group-wrapper`,C,Bn),qr)}},nn));return sn(bt)}),W=Bt,Mt=N=>fe.createElement(Ft.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},fe.createElement(Bt,Object.assign({},N)));W._InternalPanelDoNotUseOrYouWillBeFired=Mt;var vt=W},9937:function(xr,xt,x){"use strict";x.d(xt,{M1:function(){return pe},TM:function(){return Se},Xy:function(){return S},bi:function(){return je},e5:function(){return Ce},ik:function(){return A},nz:function(){return H},pU:function(){return J},s7:function(){return R},x0:function(){return Ge}});var k=x(17313),U=x(74207),xe=x(37613),ge=x(83116);const H=O=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:O,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),J=O=>({borderColor:O.hoverBorderColor}),pe=O=>({borderColor:O.activeBorderColor,boxShadow:O.activeShadow,outline:0}),S=O=>({color:O.colorTextDisabled,backgroundColor:O.colorBgContainerDisabled,borderColor:O.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},J((0,xe.TS)(O,{hoverBorderColor:O.colorBorder})))}),_=O=>{const{paddingBlockLG:z,fontSizeLG:Y,lineHeightLG:te,borderRadiusLG:Ve,paddingInlineLG:fe}=O;return{padding:`${z}px ${fe}px`,fontSize:Y,lineHeight:te,borderRadius:Ve}},Ge=O=>({padding:`${O.paddingBlockSM}px ${O.paddingInlineSM}px`,borderRadius:O.borderRadiusSM}),je=(O,z)=>{const{componentCls:Y,colorError:te,colorWarning:Ve,errorActiveShadow:fe,warningActiveShadow:ut,colorErrorBorderHover:dt,colorWarningBorderHover:ve}=O;return{[`&-status-error:not(${z}-disabled):not(${z}-borderless)${z}`]:{borderColor:te,"&:hover":{borderColor:dt},"&:focus, &-focused":Object.assign({},pe((0,xe.TS)(O,{activeBorderColor:te,activeShadow:fe}))),[`${Y}-prefix, ${Y}-suffix`]:{color:te}},[`&-status-warning:not(${z}-disabled):not(${z}-borderless)${z}`]:{borderColor:Ve,"&:hover":{borderColor:ve},"&:focus, &-focused":Object.assign({},pe((0,xe.TS)(O,{activeBorderColor:Ve,activeShadow:ut}))),[`${Y}-prefix, ${Y}-suffix`]:{color:Ve}}}},A=O=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${O.paddingBlock}px ${O.paddingInline}px`,color:O.colorText,fontSize:O.fontSize,lineHeight:O.lineHeight,backgroundColor:O.colorBgContainer,backgroundImage:"none",borderWidth:O.lineWidth,borderStyle:O.lineType,borderColor:O.colorBorder,borderRadius:O.borderRadius,transition:`all ${O.motionDurationMid}`},H(O.colorTextPlaceholder)),{"&:hover":Object.assign({},J(O)),"&:focus, &-focused":Object.assign({},pe(O)),"&-disabled, &[disabled]":Object.assign({},S(O)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:O.controlHeight,lineHeight:O.lineHeight,verticalAlign:"bottom",transition:`all ${O.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},_(O)),"&-sm":Object.assign({},Ge(O)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),R=O=>{const{componentCls:z,antCls:Y}=O;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:O.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${z}, &-lg > ${z}-group-addon`]:Object.assign({},_(O)),[`&-sm ${z}, &-sm > ${z}-group-addon`]:Object.assign({},Ge(O)),[`&-lg ${Y}-select-single ${Y}-select-selector`]:{height:O.controlHeightLG},[`&-sm ${Y}-select-single ${Y}-select-selector`]:{height:O.controlHeightSM},[`> ${z}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${z}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${O.paddingInline}px`,color:O.colorText,fontWeight:"normal",fontSize:O.fontSize,textAlign:"center",backgroundColor:O.colorFillAlter,border:`${O.lineWidth}px ${O.lineType} ${O.colorBorder}`,borderRadius:O.borderRadius,transition:`all ${O.motionDurationSlow}`,lineHeight:1,[`${Y}-select`]:{margin:`-${O.paddingBlock+1}px -${O.paddingInline}px`,[`&${Y}-select-single:not(${Y}-select-customize-input)`]:{[`${Y}-select-selector`]:{backgroundColor:"inherit",border:`${O.lineWidth}px ${O.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Y}-select-selector`]:{color:O.colorPrimary}}},[`${Y}-cascader-picker`]:{margin:`-9px -${O.paddingInline}px`,backgroundColor:"transparent",[`${Y}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${z}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${z}-search-with-button &`]:{zIndex:0}}},[`> ${z}:first-child, ${z}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Y}-select ${Y}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${z}-affix-wrapper`]:{[`&:not(:first-child) ${z}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${z}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${z}:last-child, ${z}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Y}-select ${Y}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${z}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${z}-search &`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius}},[`&:not(:first-child), ${z}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${z}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,k.dF)()),{[`${z}-group-addon, ${z}-group-wrap, > ${z}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:O.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${z}-affix-wrapper,
|
|
|
& > ${z}-number-affix-wrapper,
|
|
|
& > ${Y}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-O.lineWidth,borderInlineEndWidth:O.lineWidth},[`${z}`]:{float:"none"},[`& > ${Y}-select > ${Y}-select-selector,
|
|
|
& > ${Y}-select-auto-complete ${z},
|
|
|
& > ${Y}-cascader-picker ${z},
|
|
|
& > ${z}-group-wrapper ${z}`]:{borderInlineEndWidth:O.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Y}-select-focused`]:{zIndex:1},[`& > ${Y}-select > ${Y}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${Y}-select:first-child > ${Y}-select-selector,
|
|
|
& > ${Y}-select-auto-complete:first-child ${z},
|
|
|
& > ${Y}-cascader-picker:first-child ${z}`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius},[`& > *:last-child,
|
|
|
& > ${Y}-select:last-child > ${Y}-select-selector,
|
|
|
& > ${Y}-cascader-picker:last-child ${z},
|
|
|
& > ${Y}-cascader-picker-focused:last-child ${z}`]:{borderInlineEndWidth:O.lineWidth,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius},[`& > ${Y}-select-auto-complete ${z}`]:{verticalAlign:"top"},[`${z}-group-wrapper + ${z}-group-wrapper`]:{marginInlineStart:-O.lineWidth,[`${z}-affix-wrapper`]:{borderRadius:0}},[`${z}-group-wrapper:not(:last-child)`]:{[`&${z}-search > ${z}-group`]:{[`& > ${z}-group-addon > ${z}-search-button`]:{borderRadius:0},[`& > ${z}`]:{borderStartStartRadius:O.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:O.borderRadius}}}})}},Ke=O=>{const{componentCls:z,controlHeightSM:Y,lineWidth:te}=O,fe=(Y-te*2-16)/2;return{[z]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,k.Wf)(O)),A(O)),je(O,z)),{'&[type="color"]':{height:O.controlHeight,[`&${z}-lg`]:{height:O.controlHeightLG},[`&${z}-sm`]:{height:Y,paddingTop:fe,paddingBottom:fe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},mt=O=>{const{componentCls:z}=O;return{[`${z}-clear-icon`]:{margin:0,color:O.colorTextQuaternary,fontSize:O.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${O.motionDurationSlow}`,"&:hover":{color:O.colorTextTertiary},"&:active":{color:O.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${O.inputAffixPadding}px`}}}},gt=O=>{const{componentCls:z,inputAffixPadding:Y,colorTextDescription:te,motionDurationSlow:Ve,colorIcon:fe,colorIconHover:ut,iconCls:dt}=O;return{[`${z}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A(O)),{display:"inline-flex",[`&:not(${z}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},J(O)),{zIndex:1,[`${z}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${z}[disabled]`]:{background:"transparent"}},[`> input${z}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${z}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:O.paddingXS}},"&-show-count-suffix":{color:te},"&-show-count-has-suffix":{marginInlineEnd:O.paddingXXS},"&-prefix":{marginInlineEnd:Y},"&-suffix":{marginInlineStart:Y}}}),mt(O)),{[`${dt}${z}-password-icon`]:{color:fe,cursor:"pointer",transition:`all ${Ve}`,"&:hover":{color:ut}}}),je(O,`${z}-affix-wrapper`))}},Qe=O=>{const{componentCls:z,colorError:Y,colorWarning:te,borderRadiusLG:Ve,borderRadiusSM:fe}=O;return{[`${z}-group`]:Object.assign(Object.assign(Object.assign({},(0,k.Wf)(O)),R(O)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${z}-group-addon`]:{borderRadius:Ve,fontSize:O.fontSizeLG}},"&-sm":{[`${z}-group-addon`]:{borderRadius:fe}},"&-status-error":{[`${z}-group-addon`]:{color:Y,borderColor:Y}},"&-status-warning":{[`${z}-group-addon`]:{color:te,borderColor:te}},"&-disabled":{[`${z}-group-addon`]:Object.assign({},S(O))},[`&:not(${z}-compact-first-item):not(${z}-compact-last-item)${z}-compact-item`]:{[`${z}, ${z}-group-addon`]:{borderRadius:0}},[`&:not(${z}-compact-last-item)${z}-compact-first-item`]:{[`${z}, ${z}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${z}-compact-first-item)${z}-compact-last-item`]:{[`${z}, ${z}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},$e=O=>{const{componentCls:z,antCls:Y}=O,te=`${z}-search`;return{[te]:{[`${z}`]:{"&:hover, &:focus":{borderColor:O.colorPrimaryHover,[`+ ${z}-group-addon ${te}-button:not(${Y}-btn-primary)`]:{borderInlineStartColor:O.colorPrimaryHover}}},[`${z}-affix-wrapper`]:{borderRadius:0},[`${z}-lg`]:{lineHeight:O.lineHeightLG-2e-4},[`> ${z}-group`]:{[`> ${z}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${te}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${te}-button:not(${Y}-btn-primary)`]:{color:O.colorTextDescription,"&:hover":{color:O.colorPrimaryHover},"&:active":{color:O.colorPrimaryActive},[`&${Y}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${te}-button`]:{height:O.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${te}-button`]:{height:O.controlHeightLG},[`&-small ${te}-button`]:{height:O.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${z}-compact-item`]:{[`&:not(${z}-compact-last-item)`]:{[`${z}-group-addon`]:{[`${z}-search-button`]:{marginInlineEnd:-O.lineWidth,borderRadius:0}}},[`&:not(${z}-compact-first-item)`]:{[`${z},${z}-affix-wrapper`]:{borderRadius:0}},[`> ${z}-group-addon ${z}-search-button,
|
|
|
> ${z},
|
|
|
${z}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${z}-affix-wrapper-focused`]:{zIndex:2}}}}},Nt=O=>{const{componentCls:z,paddingLG:Y}=O,te=`${z}-textarea`;return{[te]:{position:"relative","&-show-count":{[`> ${z}`]:{height:"100%"},[`${z}-data-count`]:{position:"absolute",bottom:-O.fontSize*O.lineHeight,insetInlineEnd:0,color:O.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${z}`]:{paddingInlineEnd:Y}},[`&-affix-wrapper${te}-has-feedback`]:{[`${z}`]:{paddingInlineEnd:Y}},[`&-affix-wrapper${z}-affix-wrapper`]:{padding:0,[`> textarea${z}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${z}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${z}-clear-icon`]:{position:"absolute",insetInlineEnd:O.paddingXS,insetBlockStart:O.paddingXS},[`${te}-suffix`]:{position:"absolute",top:0,insetInlineEnd:O.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Ce(O){return(0,xe.TS)(O,{inputAffixPadding:O.paddingXXS})}const Se=O=>{const{controlHeight:z,fontSize:Y,lineHeight:te,lineWidth:Ve,controlHeightSM:fe,controlHeightLG:ut,fontSizeLG:dt,lineHeightLG:ve,paddingSM:ye,controlPaddingHorizontalSM:tt,controlPaddingHorizontal:Z,colorFillAlter:Ne,colorPrimaryHover:Ye,controlOutlineWidth:F,controlOutline:we,colorErrorOutline:me,colorWarningOutline:G}=O;return{paddingBlock:Math.max(Math.round((z-Y*te)/2*10)/10-Ve,3),paddingBlockSM:Math.max(Math.round((fe-Y*te)/2*10)/10-Ve,0),paddingBlockLG:Math.ceil((ut-dt*ve)/2*10)/10-Ve,paddingInline:ye-Ve,paddingInlineSM:tt-Ve,paddingInlineLG:Z-Ve,addonBg:Ne,activeBorderColor:Ye,hoverBorderColor:Ye,activeShadow:`0 0 0 ${F}px ${we}`,errorActiveShadow:`0 0 0 ${F}px ${me}`,warningActiveShadow:`0 0 0 ${F}px ${G}`}};xt.ZP=(0,ge.Z)("Input",O=>{const z=(0,xe.TS)(O,Ce(O));return[Ke(z),Nt(z),gt(z),Qe(z),$e(z),(0,U.c)(z)]},Se)},45818:function(xr,xt,x){"use strict";x.d(xt,{D:function(){return Ce},Z:function(){return z}});var k=x(60499),U=x(59301),xe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},ge=xe,H=x(7657),J=function(te,Ve){return U.createElement(H.Z,(0,k.Z)({},te,{ref:Ve,icon:ge}))},pe=U.forwardRef(J),S=pe,_=x(33853),Ge=x(38819),je=x(92310),A=x.n(je),R=x(2738),mt=Y=>!isNaN(parseFloat(Y))&&isFinite(Y),gt=x(36355),Qe=x(84966),$e=function(Y,te){var Ve={};for(var fe in Y)Object.prototype.hasOwnProperty.call(Y,fe)&&te.indexOf(fe)<0&&(Ve[fe]=Y[fe]);if(Y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,fe=Object.getOwnPropertySymbols(Y);ut<fe.length;ut++)te.indexOf(fe[ut])<0&&Object.prototype.propertyIsEnumerable.call(Y,fe[ut])&&(Ve[fe[ut]]=Y[fe[ut]]);return Ve};const Nt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Ce=U.createContext({}),Se=(()=>{let Y=0;return function(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Y+=1,`${te}${Y}`}})();var z=U.forwardRef((Y,te)=>{const{prefixCls:Ve,className:fe,trigger:ut,children:dt,defaultCollapsed:ve=!1,theme:ye="dark",style:tt={},collapsible:Z=!1,reverseArrow:Ne=!1,width:Ye=200,collapsedWidth:F=80,zeroWidthTriggerStyle:we,breakpoint:me,onCollapse:G,onBreakpoint:Fe}=Y,Ae=$e(Y,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Le}=(0,U.useContext)(Qe.Gs),[ce,ot]=(0,U.useState)("collapsed"in Y?Y.collapsed:ve),[ft,Ot]=(0,U.useState)(!1);(0,U.useEffect)(()=>{"collapsed"in Y&&ot(Y.collapsed)},[Y.collapsed]);const Kt=(oe,V)=>{"collapsed"in Y||ot(oe),G==null||G(oe,V)},_t=(0,U.useRef)();_t.current=oe=>{Ot(oe.matches),Fe==null||Fe(oe.matches),ce!==oe.matches&&Kt(oe.matches,"responsive")},(0,U.useEffect)(()=>{function oe(K){return _t.current(K)}let V;if(typeof window!="undefined"){const{matchMedia:K}=window;if(K&&me&&me in Nt){V=K(`(max-width: ${Nt[me]})`);try{V.addEventListener("change",oe)}catch(ue){V.addListener(oe)}oe(V)}}return()=>{try{V==null||V.removeEventListener("change",oe)}catch(K){V==null||V.removeListener(oe)}}},[me]),(0,U.useEffect)(()=>{const oe=Se("ant-sider-");return Le.addSider(oe),()=>Le.removeSider(oe)},[]);const er=()=>{Kt(!ce,"clickTrigger")},{getPrefixCls:Ft}=(0,U.useContext)(gt.E_),rr=()=>{const oe=Ft("layout-sider",Ve),V=(0,R.Z)(Ae,["collapsed"]),K=ce?F:Ye,ue=mt(K)?`${K}px`:String(K),he=parseFloat(String(F||0))===0?U.createElement("span",{onClick:er,className:A()(`${oe}-zero-width-trigger`,`${oe}-zero-width-trigger-${Ne?"right":"left"}`),style:we},ut||U.createElement(S,null)):null,ie={expanded:Ne?U.createElement(Ge.Z,null):U.createElement(_.Z,null),collapsed:Ne?U.createElement(_.Z,null):U.createElement(Ge.Z,null)}[ce?"collapsed":"expanded"],Xe=ut!==null?he||U.createElement("div",{className:`${oe}-trigger`,onClick:er,style:{width:ue}},ut||ie):null,et=Object.assign(Object.assign({},tt),{flex:`0 0 ${ue}`,maxWidth:ue,minWidth:ue,width:ue}),it=A()(oe,`${oe}-${ye}`,{[`${oe}-collapsed`]:!!ce,[`${oe}-has-trigger`]:Z&&ut!==null&&!he,[`${oe}-below`]:!!ft,[`${oe}-zero-width`]:parseFloat(ue)===0},fe);return U.createElement("aside",Object.assign({className:it},V,{style:et,ref:te}),U.createElement("div",{className:`${oe}-children`},dt),Z||ft&&he?Xe:null)},Lt=U.useMemo(()=>({siderCollapsed:ce}),[ce]);return U.createElement(Ce.Provider,{value:Lt},rr())})},84966:function(xr,xt,x){"use strict";x.d(xt,{VY:function(){return Ce},$_:function(){return Nt},h4:function(){return $e},Gs:function(){return R},ZP:function(){return Se}});var k=x(77654),U=x(92310),xe=x.n(U),ge=x(2738),H=x(59301),J=x(36355),pe=x(83116),_=O=>{const{componentCls:z,bodyBg:Y,lightSiderBg:te,lightTriggerBg:Ve,lightTriggerColor:fe}=O;return{[`${z}-sider-light`]:{background:te,[`${z}-sider-trigger`]:{color:fe,background:Ve},[`${z}-sider-zero-width-trigger`]:{color:fe,background:Ve,border:`1px solid ${Y}`,borderInlineStart:0}}}};const Ge=O=>{const{antCls:z,componentCls:Y,colorText:te,triggerColor:Ve,footerBg:fe,triggerBg:ut,headerHeight:dt,headerPadding:ve,headerColor:ye,footerPadding:tt,triggerHeight:Z,zeroTriggerHeight:Ne,zeroTriggerWidth:Ye,motionDurationMid:F,motionDurationSlow:we,fontSize:me,borderRadius:G,bodyBg:Fe,headerBg:Ae,siderBg:Le}=O;return{[Y]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Fe,"&, *":{boxSizing:"border-box"},[`&${Y}-has-sider`]:{flexDirection:"row",[`> ${Y}, > ${Y}-content`]:{width:0}},[`${Y}-header, &${Y}-footer`]:{flex:"0 0 auto"},[`${Y}-sider`]:{position:"relative",minWidth:0,background:Le,transition:`all ${F}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${z}-menu${z}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Z},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Z,color:Ve,lineHeight:`${Z}px`,textAlign:"center",background:ut,cursor:"pointer",transition:`all ${F}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:dt,insetInlineEnd:-Ye,zIndex:1,width:Ye,height:Ne,color:Ve,fontSize:O.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Le,borderStartStartRadius:0,borderStartEndRadius:G,borderEndEndRadius:G,borderEndStartRadius:0,cursor:"pointer",transition:`background ${we} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${we}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Ye,borderStartStartRadius:G,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:G}}}}},_(O)),{"&-rtl":{direction:"rtl"}}),[`${Y}-header`]:{height:dt,padding:ve,color:ye,lineHeight:`${dt}px`,background:Ae,[`${z}-menu`]:{lineHeight:"inherit"}},[`${Y}-footer`]:{padding:tt,color:te,fontSize:me,background:fe},[`${Y}-content`]:{flex:"auto",minHeight:0}}};var je=(0,pe.Z)("Layout",O=>[Ge(O)],O=>{const{colorBgLayout:z,controlHeight:Y,controlHeightLG:te,colorText:Ve,controlHeightSM:fe,marginXXS:ut,colorTextLightSolid:dt,colorBgContainer:ve}=O,ye=te*1.25;return{colorBgHeader:"#001529",colorBgBody:z,colorBgTrigger:"#002140",bodyBg:z,headerBg:"#001529",headerHeight:Y*2,headerPadding:`0 ${ye}px`,headerColor:Ve,footerPadding:`${fe}px ${ye}px`,footerBg:z,siderBg:"#001529",triggerHeight:te+ut*2,triggerBg:"#002140",triggerColor:dt,zeroTriggerWidth:te,zeroTriggerHeight:te,lightSiderBg:ve,lightTriggerBg:ve,lightTriggerColor:Ve}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),A=function(O,z){var Y={};for(var te in O)Object.prototype.hasOwnProperty.call(O,te)&&z.indexOf(te)<0&&(Y[te]=O[te]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,te=Object.getOwnPropertySymbols(O);Ve<te.length;Ve++)z.indexOf(te[Ve])<0&&Object.prototype.propertyIsEnumerable.call(O,te[Ve])&&(Y[te[Ve]]=O[te[Ve]]);return Y};const R=H.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ke(O){let{suffixCls:z,tagName:Y,displayName:te}=O;return Ve=>H.forwardRef((ut,dt)=>H.createElement(Ve,Object.assign({ref:dt,suffixCls:z,tagName:Y},ut)))}const mt=H.forwardRef((O,z)=>{const{prefixCls:Y,suffixCls:te,className:Ve,tagName:fe}=O,ut=A(O,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:dt}=H.useContext(J.E_),ve=dt("layout",Y),[ye,tt]=je(ve),Z=te?`${ve}-${te}`:ve;return ye(H.createElement(fe,Object.assign({className:xe()(Y||Z,Ve,tt),ref:z},ut)))}),gt=H.forwardRef((O,z)=>{const{direction:Y}=H.useContext(J.E_),[te,Ve]=H.useState([]),{prefixCls:fe,className:ut,rootClassName:dt,children:ve,hasSider:ye,tagName:tt,style:Z}=O,Ne=A(O,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Ye=(0,ge.Z)(Ne,["suffixCls"]),{getPrefixCls:F,layout:we}=H.useContext(J.E_),me=F("layout",fe),[G,Fe]=je(me),Ae=xe()(me,{[`${me}-has-sider`]:typeof ye=="boolean"?ye:te.length>0,[`${me}-rtl`]:Y==="rtl"},we==null?void 0:we.className,ut,dt,Fe),Le=H.useMemo(()=>({siderHook:{addSider:ce=>{Ve(ot=>[].concat((0,k.Z)(ot),[ce]))},removeSider:ce=>{Ve(ot=>ot.filter(ft=>ft!==ce))}}}),[]);return G(H.createElement(R.Provider,{value:Le},H.createElement(tt,Object.assign({ref:z,className:Ae,style:Object.assign(Object.assign({},we==null?void 0:we.style),Z)},Ye),ve)))}),Qe=Ke({tagName:"div",displayName:"Layout"})(gt),$e=Ke({suffixCls:"header",tagName:"header",displayName:"Header"})(mt),Nt=Ke({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(mt),Ce=Ke({suffixCls:"content",tagName:"main",displayName:"Content"})(mt);var Se=Qe},40875:function(xr,xt,x){"use strict";x.d(xt,{J:function(){return J}});var k=x(59301),U=x(33234),xe=x(70425),ge=function(pe,S){var _={};for(var Ge in pe)Object.prototype.hasOwnProperty.call(pe,Ge)&&S.indexOf(Ge)<0&&(_[Ge]=pe[Ge]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ge=Object.getOwnPropertySymbols(pe);je<Ge.length;je++)S.indexOf(Ge[je])<0&&Object.prototype.propertyIsEnumerable.call(pe,Ge[je])&&(_[Ge[je]]=pe[Ge[je]]);return _};const H=k.createContext(null),J=k.forwardRef((pe,S)=>{const{children:_}=pe,Ge=ge(pe,["children"]),je=k.useContext(H),A=k.useMemo(()=>Object.assign(Object.assign({},je),Ge),[je,Ge.prefixCls,Ge.mode,Ge.selectable]);return k.createElement(H.Provider,{value:A},k.createElement(U.BR,null,(0,xe.supportNodeRef)(_)?k.cloneElement(_,{ref:S}):_))});xt.Z=H},20834:function(xr,xt,x){"use strict";x.d(xt,{default:function(){return Lt}});var k=x(15285),U=x(59301),xe=x(45818),ge=x(92310),H=x.n(ge),J=x(36355),pe=function(oe,V){var K={};for(var ue in oe)Object.prototype.hasOwnProperty.call(oe,ue)&&V.indexOf(ue)<0&&(K[ue]=oe[ue]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ue=Object.getOwnPropertySymbols(oe);he<ue.length;he++)V.indexOf(ue[he])<0&&Object.prototype.propertyIsEnumerable.call(oe,ue[he])&&(K[ue[he]]=oe[ue[he]]);return K},_=oe=>{const{prefixCls:V,className:K,dashed:ue}=oe,he=pe(oe,["prefixCls","className","dashed"]),{getPrefixCls:ze}=U.useContext(J.E_),re=ze("menu",V),ie=H()({[`${re}-item-divider-dashed`]:!!ue},K);return U.createElement(k.iz,Object.assign({className:ie},he))},Ge=x(11592),je=x(2738),A=x(6848),R=x(92343),mt=(0,U.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Qe=oe=>{var V;const{className:K,children:ue,icon:he,title:ze,danger:re}=oe,{prefixCls:ie,firstLevel:Xe,direction:et,disableMenuItemTitleTooltip:it,inlineCollapsed:Et}=U.useContext(mt),Bt=de=>{const at=U.createElement("span",{className:`${ie}-title-content`},ue);return(!he||(0,R.l$)(ue)&&ue.type==="span")&&ue&&de&&Xe&&typeof ue=="string"?U.createElement("div",{className:`${ie}-inline-collapsed-noicon`},ue.charAt(0)):at},{siderCollapsed:W}=U.useContext(xe.D);let Mt=ze;typeof ze=="undefined"?Mt=Xe?ue:"":ze===!1&&(Mt="");const vt={title:Mt};!W&&!Et&&(vt.title=null,vt.open=!1);const N=(0,Ge.Z)(ue).length;let q=U.createElement(k.ck,Object.assign({},(0,je.Z)(oe,["title","icon","danger"]),{className:H()({[`${ie}-item-danger`]:re,[`${ie}-item-only-child`]:(he?N+1:N)===1},K),title:typeof ze=="string"?ze:void 0}),(0,R.Tm)(he,{className:H()((0,R.l$)(he)?(V=he.props)===null||V===void 0?void 0:V.className:"",`${ie}-item-icon`)}),Bt(Et));return it||(q=U.createElement(A.Z,Object.assign({},vt,{placement:et==="rtl"?"left":"right",overlayClassName:`${ie}-inline-collapsed-tooltip`}),q)),q},Nt=oe=>{var V;const{popupClassName:K,icon:ue,title:he,theme:ze}=oe,re=U.useContext(mt),{prefixCls:ie,inlineCollapsed:Xe,theme:et}=re,it=(0,k.Xl)();let Et;if(!ue)Et=Xe&&!it.length&&he&&typeof he=="string"?U.createElement("div",{className:`${ie}-inline-collapsed-noicon`},he.charAt(0)):U.createElement("span",{className:`${ie}-title-content`},he);else{const W=(0,R.l$)(he)&&he.type==="span";Et=U.createElement(U.Fragment,null,(0,R.Tm)(ue,{className:H()((0,R.l$)(ue)?(V=ue.props)===null||V===void 0?void 0:V.className:"",`${ie}-item-icon`)}),W?he:U.createElement("span",{className:`${ie}-title-content`},he))}const Bt=U.useMemo(()=>Object.assign(Object.assign({},re),{firstLevel:!1}),[re]);return U.createElement(mt.Provider,{value:Bt},U.createElement(k.Wd,Object.assign({},(0,je.Z)(oe,["icon"]),{title:Et,popupClassName:H()(ie,K,`${ie}-${ze||et}`)})))},Ce=x(18785),Se=x(70425),O=x(62892),z=x(40875),Y=function(oe,V){var K={};for(var ue in oe)Object.prototype.hasOwnProperty.call(oe,ue)&&V.indexOf(ue)<0&&(K[ue]=oe[ue]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ue=Object.getOwnPropertySymbols(oe);he<ue.length;he++)V.indexOf(ue[he])<0&&Object.prototype.propertyIsEnumerable.call(oe,ue[he])&&(K[ue[he]]=oe[ue[he]]);return K};function te(oe){return(oe||[]).map((V,K)=>{if(V&&typeof V=="object"){const ue=V,{label:he,children:ze,key:re,type:ie}=ue,Xe=Y(ue,["label","children","key","type"]),et=re!=null?re:`tmp-${K}`;return ze||ie==="group"?ie==="group"?U.createElement(k.BW,Object.assign({key:et},Xe,{title:he}),te(ze)):U.createElement(Nt,Object.assign({key:et},Xe,{title:he}),te(ze)):ie==="divider"?U.createElement(_,Object.assign({key:et},Xe)):U.createElement(Qe,Object.assign({key:et},Xe),he)}return null}).filter(V=>V)}function Ve(oe){return U.useMemo(()=>oe&&te(oe),[oe])}var fe=x(64993),ut=x(17313),dt=x(8378),ve=x(13826),ye=x(29878),tt=x(83116),Z=x(37613),Ye=oe=>{const{componentCls:V,motionDurationSlow:K,horizontalLineHeight:ue,colorSplit:he,lineWidth:ze,lineType:re,itemPaddingInline:ie}=oe;return{[`${V}-horizontal`]:{lineHeight:ue,border:0,borderBottom:`${ze}px ${re} ${he}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${V}-item, ${V}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:ie},[`> ${V}-item:hover,
|
|
|
> ${V}-item-active,
|
|
|
> ${V}-submenu ${V}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${V}-item, ${V}-submenu-title`]:{transition:[`border-color ${K}`,`background ${K}`].join(",")},[`${V}-submenu-arrow`]:{display:"none"}}}},we=oe=>{let{componentCls:V,menuArrowOffset:K}=oe;return{[`${V}-rtl`]:{direction:"rtl"},[`${V}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${V}-rtl${V}-vertical,
|
|
|
${V}-submenu-rtl ${V}-vertical`]:{[`${V}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${K})`},"&::after":{transform:`rotate(45deg) translateY(${K})`}}}}};const me=oe=>Object.assign({},(0,ut.oN)(oe));var Fe=(oe,V)=>{const{componentCls:K,itemColor:ue,itemSelectedColor:he,groupTitleColor:ze,itemBg:re,subMenuItemBg:ie,itemSelectedBg:Xe,activeBarHeight:et,activeBarWidth:it,activeBarBorderWidth:Et,motionDurationSlow:Bt,motionEaseInOut:W,motionEaseOut:Mt,itemPaddingInline:vt,motionDurationMid:N,itemHoverColor:q,lineType:de,colorSplit:at,itemDisabledColor:Oe,dangerItemColor:Ee,dangerItemHoverColor:or,dangerItemSelectedColor:Ht,dangerItemActiveBg:Wt,dangerItemSelectedBg:Gt,itemHoverBg:nr,itemActiveBg:Ct,menuSubMenuBg:wr,horizontalItemSelectedColor:hr,horizontalItemSelectedBg:Ur,horizontalItemBorderRadius:Er,horizontalItemHoverBg:cr,popupBg:nn}=oe;return{[`${K}-${V}, ${K}-${V} > ${K}`]:{color:ue,background:re,[`&${K}-root:focus-visible`]:Object.assign({},me(oe)),[`${K}-item-group-title`]:{color:ze},[`${K}-submenu-selected`]:{[`> ${K}-submenu-title`]:{color:he}},[`${K}-item-disabled, ${K}-submenu-disabled`]:{color:`${Oe} !important`},[`${K}-item:not(${K}-item-selected):not(${K}-submenu-selected)`]:{[`&:hover, > ${K}-submenu-title:hover`]:{color:q}},[`&:not(${K}-horizontal)`]:{[`${K}-item:not(${K}-item-selected)`]:{"&:hover":{backgroundColor:nr},"&:active":{backgroundColor:Ct}},[`${K}-submenu-title`]:{"&:hover":{backgroundColor:nr},"&:active":{backgroundColor:Ct}}},[`${K}-item-danger`]:{color:Ee,[`&${K}-item:hover`]:{[`&:not(${K}-item-selected):not(${K}-submenu-selected)`]:{color:or}},[`&${K}-item:active`]:{background:Wt}},[`${K}-item a`]:{"&, &:hover":{color:"inherit"}},[`${K}-item-selected`]:{color:he,[`&${K}-item-danger`]:{color:Ht},"a, a:hover":{color:"inherit"}},[`& ${K}-item-selected`]:{backgroundColor:Xe,[`&${K}-item-danger`]:{backgroundColor:Gt}},[`${K}-item, ${K}-submenu-title`]:{[`&:not(${K}-item-disabled):focus-visible`]:Object.assign({},me(oe))},[`&${K}-submenu > ${K}`]:{backgroundColor:wr},[`&${K}-popup > ${K}`]:{backgroundColor:nn},[`&${K}-horizontal`]:Object.assign(Object.assign({},V==="dark"?{borderBottom:0}:{}),{[`> ${K}-item, > ${K}-submenu`]:{top:Et,marginTop:-Et,marginBottom:0,borderRadius:Er,"&::after":{position:"absolute",insetInline:vt,bottom:0,borderBottom:`${et}px solid transparent`,transition:`border-color ${Bt} ${W}`,content:'""'},"&:hover, &-active, &-open":{background:cr,"&::after":{borderBottomWidth:et,borderBottomColor:hr}},"&-selected":{color:hr,backgroundColor:Ur,"&:hover":{backgroundColor:Ur},"&::after":{borderBottomWidth:et,borderBottomColor:hr}}}}),[`&${K}-root`]:{[`&${K}-inline, &${K}-vertical`]:{borderInlineEnd:`${Et}px ${de} ${at}`}},[`&${K}-inline`]:{[`${K}-sub${K}-inline`]:{background:ie},[`${K}-item, ${K}-submenu-title`]:Et&&it?{width:`calc(100% + ${Et}px)`}:{},[`${K}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${it}px solid ${he}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${N} ${Mt}`,`opacity ${N} ${Mt}`].join(","),content:'""'},[`&${K}-item-danger`]:{"&::after":{borderInlineEndColor:Ht}}},[`${K}-selected, ${K}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${N} ${W}`,`opacity ${N} ${W}`].join(",")}}}}}};const Ae=oe=>{const{componentCls:V,itemHeight:K,itemMarginInline:ue,padding:he,menuArrowSize:ze,marginXS:re,itemMarginBlock:ie}=oe,Xe=he+ze+re;return{[`${V}-item`]:{position:"relative",overflow:"hidden"},[`${V}-item, ${V}-submenu-title`]:{height:K,lineHeight:`${K}px`,paddingInline:he,overflow:"hidden",textOverflow:"ellipsis",marginInline:ue,marginBlock:ie,width:`calc(100% - ${ue*2}px)`},[`> ${V}-item,
|
|
|
> ${V}-submenu > ${V}-submenu-title`]:{height:K,lineHeight:`${K}px`},[`${V}-item-group-list ${V}-submenu-title,
|
|
|
${V}-submenu-title`]:{paddingInlineEnd:Xe}}};var ce=oe=>{const{componentCls:V,iconCls:K,itemHeight:ue,colorTextLightSolid:he,dropdownWidth:ze,controlHeightLG:re,motionDurationMid:ie,motionEaseOut:Xe,paddingXL:et,itemMarginInline:it,fontSizeLG:Et,motionDurationSlow:Bt,paddingXS:W,boxShadowSecondary:Mt,collapsedWidth:vt,collapsedIconSize:N}=oe,q={height:ue,lineHeight:`${ue}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[V]:{"&-inline, &-vertical":Object.assign({[`&${V}-root`]:{boxShadow:"none"}},Ae(oe))},[`${V}-submenu-popup`]:{[`${V}-vertical`]:Object.assign(Object.assign({},Ae(oe)),{boxShadow:Mt})}},{[`${V}-submenu-popup ${V}-vertical${V}-sub`]:{minWidth:ze,maxHeight:`calc(100vh - ${re*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${V}-inline`]:{width:"100%",[`&${V}-root`]:{[`${V}-item, ${V}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Bt}`,`background ${Bt}`,`padding ${ie} ${Xe}`].join(","),[`> ${V}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${V}-sub${V}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${V}-submenu > ${V}-submenu-title`]:q,[`& ${V}-item-group-title`]:{paddingInlineStart:et}},[`${V}-item`]:q}},{[`${V}-inline-collapsed`]:{width:vt,[`&${V}-root`]:{[`${V}-item, ${V}-submenu ${V}-submenu-title`]:{[`> ${V}-inline-collapsed-noicon`]:{fontSize:Et,textAlign:"center"}}},[`> ${V}-item,
|
|
|
> ${V}-item-group > ${V}-item-group-list > ${V}-item,
|
|
|
> ${V}-item-group > ${V}-item-group-list > ${V}-submenu > ${V}-submenu-title,
|
|
|
> ${V}-submenu > ${V}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Et/2}px - ${it}px)`,textOverflow:"clip",[`
|
|
|
${V}-submenu-arrow,
|
|
|
${V}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${V}-item-icon, ${K}`]:{margin:0,fontSize:N,lineHeight:`${ue}px`,"+ span":{display:"inline-block",opacity:0}}},[`${V}-item-icon, ${K}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${V}-item-icon, ${K}`]:{display:"none"},"a, a:hover":{color:he}},[`${V}-item-group-title`]:Object.assign(Object.assign({},ut.vS),{paddingInline:W})}}]};const ot=oe=>{const{componentCls:V,motionDurationSlow:K,motionDurationMid:ue,motionEaseInOut:he,motionEaseOut:ze,iconCls:re,iconSize:ie,iconMarginInlineEnd:Xe}=oe;return{[`${V}-item, ${V}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${K}`,`background ${K}`,`padding ${K} ${he}`].join(","),[`${V}-item-icon, ${re}`]:{minWidth:ie,fontSize:ie,transition:[`font-size ${ue} ${ze}`,`margin ${K} ${he}`,`color ${K}`].join(","),"+ span":{marginInlineStart:Xe,opacity:1,transition:[`opacity ${K} ${he}`,`margin ${K}`,`color ${K}`].join(",")}},[`${V}-item-icon`]:Object.assign({},(0,ut.Ro)()),[`&${V}-item-only-child`]:{[`> ${re}, > ${V}-item-icon`]:{marginInlineEnd:0}}},[`${V}-item-disabled, ${V}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${V}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ft=oe=>{const{componentCls:V,motionDurationSlow:K,motionEaseInOut:ue,borderRadius:he,menuArrowSize:ze,menuArrowOffset:re}=oe;return{[`${V}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:oe.margin,width:ze,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${K} ${ue}, opacity ${K}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:ze*.6,height:ze*.15,backgroundColor:"currentcolor",borderRadius:he,transition:[`background ${K} ${ue}`,`transform ${K} ${ue}`,`top ${K} ${ue}`,`color ${K} ${ue}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${re})`},"&::after":{transform:`rotate(-45deg) translateY(${re})`}}}}},Ot=oe=>{const{antCls:V,componentCls:K,fontSize:ue,motionDurationSlow:he,motionDurationMid:ze,motionEaseInOut:re,paddingXS:ie,padding:Xe,colorSplit:et,lineWidth:it,zIndexPopup:Et,borderRadiusLG:Bt,subMenuItemBorderRadius:W,menuArrowSize:Mt,menuArrowOffset:vt,lineType:N,menuPanelMaskInset:q,groupTitleLineHeight:de,groupTitleFontSize:at}=oe;return[{"":{[`${K}`]:Object.assign(Object.assign({},(0,ut.dF)()),{"&-hidden":{display:"none"}})},[`${K}-submenu-hidden`]:{display:"none"}},{[K]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ut.Wf)(oe)),(0,ut.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:ue,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${he} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${K}-item`]:{flex:"none"}},[`${K}-item, ${K}-submenu, ${K}-submenu-title`]:{borderRadius:oe.itemBorderRadius},[`${K}-item-group-title`]:{padding:`${ie}px ${Xe}px`,fontSize:at,lineHeight:de,transition:`all ${he}`},[`&-horizontal ${K}-submenu`]:{transition:[`border-color ${he} ${re}`,`background ${he} ${re}`].join(",")},[`${K}-submenu, ${K}-submenu-inline`]:{transition:[`border-color ${he} ${re}`,`background ${he} ${re}`,`padding ${ze} ${re}`].join(",")},[`${K}-submenu ${K}-sub`]:{cursor:"initial",transition:[`background ${he} ${re}`,`padding ${he} ${re}`].join(",")},[`${K}-title-content`]:{transition:`color ${he}`},[`${K}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${K}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:et,borderStyle:N,borderWidth:0,borderTopWidth:it,marginBlock:it,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ot(oe)),{[`${K}-item-group`]:{[`${K}-item-group-list`]:{margin:0,padding:0,[`${K}-item, ${K}-submenu-title`]:{paddingInline:`${ue*2}px ${Xe}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Et,borderRadius:Bt,boxShadow:"none",transformOrigin:"0 0",[`&${K}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${q}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:q},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:oe.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:oe.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:oe.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:oe.paddingXS},[`> ${K}`]:Object.assign(Object.assign(Object.assign({borderRadius:Bt},ot(oe)),ft(oe)),{[`${K}-item, ${K}-submenu > ${K}-submenu-title`]:{borderRadius:W},[`${K}-submenu-title::after`]:{transition:`transform ${he} ${re}`}})}}),ft(oe)),{[`&-inline-collapsed ${K}-submenu-arrow,
|
|
|
&-inline ${K}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${vt})`},"&::after":{transform:`rotate(45deg) translateX(-${vt})`}},[`${K}-submenu-open${K}-submenu-inline > ${K}-submenu-title > ${K}-submenu-arrow`]:{transform:`translateY(-${Mt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${vt})`},"&::before":{transform:`rotate(45deg) translateX(${vt})`}}})},{[`${V}-layout-header`]:{[K]:{lineHeight:"inherit"}}}]};var Kt=(oe,V)=>(0,tt.Z)("Menu",ue=>{if(V===!1)return[];const{colorBgElevated:he,colorPrimary:ze,colorTextLightSolid:re,controlHeightLG:ie,fontSize:Xe,darkItemColor:et,darkDangerItemColor:it,darkItemBg:Et,darkSubMenuItemBg:Bt,darkItemSelectedColor:W,darkItemSelectedBg:Mt,darkDangerItemSelectedBg:vt,darkItemHoverBg:N,darkGroupTitleColor:q,darkItemHoverColor:de,darkItemDisabledColor:at,darkDangerItemHoverColor:Oe,darkDangerItemSelectedColor:Ee,darkDangerItemActiveBg:or}=ue,Ht=Xe/7*5,Wt=(0,Z.TS)(ue,{menuArrowSize:Ht,menuHorizontalHeight:ie*1.15,menuArrowOffset:`${Ht*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:he}),Gt=(0,Z.TS)(Wt,{itemColor:et,itemHoverColor:de,groupTitleColor:q,itemSelectedColor:W,itemBg:Et,popupBg:Et,subMenuItemBg:Bt,itemActiveBg:"transparent",itemSelectedBg:Mt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:N,itemDisabledColor:at,dangerItemColor:it,dangerItemHoverColor:Oe,dangerItemSelectedColor:Ee,dangerItemActiveBg:or,dangerItemSelectedBg:vt,menuSubMenuBg:Bt,horizontalItemSelectedColor:re,horizontalItemSelectedBg:ze});return[Ot(Wt),Ye(Wt),ce(Wt),Fe(Wt,"light"),Fe(Gt,"dark"),we(Wt),(0,dt.Z)(Wt),(0,ve.oN)(Wt,"slide-up"),(0,ve.oN)(Wt,"slide-down"),(0,ye._y)(Wt,"zoom-big")]},ue=>{const{colorPrimary:he,colorError:ze,colorTextDisabled:re,colorErrorBg:ie,colorText:Xe,colorTextDescription:et,colorBgContainer:it,colorFillAlter:Et,colorFillContent:Bt,lineWidth:W,lineWidthBold:Mt,controlItemBgActive:vt,colorBgTextHover:N,controlHeightLG:q,lineHeight:de,colorBgElevated:at,marginXXS:Oe,padding:Ee,fontSize:or,controlHeightSM:Ht,fontSizeLG:Wt,colorTextLightSolid:Gt,colorErrorHover:nr}=ue,Ct=new fe.C(Gt).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:ue.zIndexPopupBase+50,radiusItem:ue.borderRadiusLG,itemBorderRadius:ue.borderRadiusLG,radiusSubMenuItem:ue.borderRadiusSM,subMenuItemBorderRadius:ue.borderRadiusSM,colorItemText:Xe,itemColor:Xe,colorItemTextHover:Xe,itemHoverColor:Xe,colorItemTextHoverHorizontal:he,horizontalItemHoverColor:he,colorGroupTitle:et,groupTitleColor:et,colorItemTextSelected:he,itemSelectedColor:he,colorItemTextSelectedHorizontal:he,horizontalItemSelectedColor:he,colorItemBg:it,itemBg:it,colorItemBgHover:N,itemHoverBg:N,colorItemBgActive:Bt,itemActiveBg:vt,colorSubItemBg:Et,subMenuItemBg:Et,colorItemBgSelected:vt,itemSelectedBg:vt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Mt,activeBarHeight:Mt,colorActiveBarBorderSize:W,activeBarBorderWidth:W,colorItemTextDisabled:re,itemDisabledColor:re,colorDangerItemText:ze,dangerItemColor:ze,colorDangerItemTextHover:ze,dangerItemHoverColor:ze,colorDangerItemTextSelected:ze,dangerItemSelectedColor:ze,colorDangerItemBgActive:ie,dangerItemActiveBg:ie,colorDangerItemBgSelected:ie,dangerItemSelectedBg:ie,itemMarginInline:ue.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:q,groupTitleLineHeight:de,collapsedWidth:q*2,popupBg:at,itemMarginBlock:Oe,itemPaddingInline:Ee,horizontalLineHeight:`${q*1.15}px`,iconSize:or,iconMarginInlineEnd:Ht-or,collapsedIconSize:Wt,groupTitleFontSize:or,darkItemDisabledColor:new fe.C(Gt).setAlpha(.25).toRgbString(),darkItemColor:Ct,darkDangerItemColor:ze,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Gt,darkItemSelectedBg:he,darkDangerItemSelectedBg:ze,darkItemHoverBg:"transparent",darkGroupTitleColor:Ct,darkItemHoverColor:Gt,darkDangerItemHoverColor:nr,darkDangerItemSelectedColor:Gt,darkDangerItemActiveBg:ze}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(oe),_t=function(oe,V){var K={};for(var ue in oe)Object.prototype.hasOwnProperty.call(oe,ue)&&V.indexOf(ue)<0&&(K[ue]=oe[ue]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ue=Object.getOwnPropertySymbols(oe);he<ue.length;he++)V.indexOf(ue[he])<0&&Object.prototype.propertyIsEnumerable.call(oe,ue[he])&&(K[ue[he]]=oe[ue[he]]);return K},Ft=(0,U.forwardRef)((oe,V)=>{var K,ue;const he=U.useContext(z.Z),ze=he||{},{getPrefixCls:re,getPopupContainer:ie,direction:Xe,menu:et}=U.useContext(J.E_),it=re(),{prefixCls:Et,className:Bt,style:W,theme:Mt="light",expandIcon:vt,_internalDisableMenuItemTitleTooltip:N,inlineCollapsed:q,siderCollapsed:de,items:at,children:Oe,rootClassName:Ee,mode:or,selectable:Ht,onClick:Wt,overflowedIndicatorPopupClassName:Gt}=oe,nr=_t(oe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Ct=(0,je.Z)(nr,["collapsedWidth"]),wr=Ve(at)||Oe;(K=ze.validator)===null||K===void 0||K.call(ze,{mode:or});const hr=(0,Se.useEvent)(function(){var Gr;Wt==null||Wt.apply(void 0,arguments),(Gr=ze.onClick)===null||Gr===void 0||Gr.call(ze)}),Ur=ze.mode||or,Er=Ht!=null?Ht:ze.selectable,cr=U.useMemo(()=>de!==void 0?de:q,[q,de]),nn={horizontal:{motionName:`${it}-slide-up`},inline:(0,O.Z)(it),other:{motionName:`${it}-zoom-big`}},Zt=re("menu",Et||ze.prefixCls),[sn,qr]=Kt(Zt,!he),un=H()(`${Zt}-${Mt}`,et==null?void 0:et.className,Bt);let Jr;if(typeof vt=="function")Jr=vt;else if(vt===null||vt===!1)Jr=null;else if(ze.expandIcon===null||ze.expandIcon===!1)Jr=null;else{const Gr=vt!=null?vt:ze.expandIcon;Jr=(0,R.Tm)(Gr,{className:H()(`${Zt}-submenu-expand-icon`,(0,R.l$)(Gr)?(ue=Gr.props)===null||ue===void 0?void 0:ue.className:"")})}const Sr=U.useMemo(()=>({prefixCls:Zt,inlineCollapsed:cr||!1,direction:Xe,firstLevel:!0,theme:Mt,mode:Ur,disableMenuItemTitleTooltip:N}),[Zt,cr,Xe,N,Mt]);return sn(U.createElement(z.Z.Provider,{value:null},U.createElement(mt.Provider,{value:Sr},U.createElement(k.ZP,Object.assign({getPopupContainer:ie,overflowedIndicator:U.createElement(Ce.Z,null),overflowedIndicatorPopupClassName:H()(Zt,`${Zt}-${Mt}`,Gt),mode:Ur,selectable:Er,onClick:hr},Ct,{inlineCollapsed:cr,style:Object.assign(Object.assign({},et==null?void 0:et.style),W),className:un,prefixCls:Zt,direction:Xe,defaultMotions:nn,expandIcon:Jr,ref:V,rootClassName:H()(Ee,qr)}),wr))))});const rr=(0,U.forwardRef)((oe,V)=>{const K=(0,U.useRef)(null),ue=U.useContext(xe.D);return(0,U.useImperativeHandle)(V,()=>({menu:K.current,focus:he=>{var ze;(ze=K.current)===null||ze===void 0||ze.focus(he)}})),U.createElement(Ft,Object.assign({ref:K},oe,ue))});rr.Item=Qe,rr.SubMenu=Nt,rr.Divider=_,rr.ItemGroup=k.BW;var Lt=rr},5112:function(xr,xt,x){"use strict";x.d(xt,{ZP:function(){return we}});var k=x(92310),U=x.n(k),xe=x(18929),ge=x(26112),H=x(59301),J=x(36355),pe=x(19716);const S=H.createContext(null),_=S.Provider;var Ge=S;const je=H.createContext(null),A=je.Provider;var R=x(5630),Ke=x(8654),mt=x(1684),gt=x(32441),Qe=x(17313),$e=x(83116),Nt=x(37613);const Ce=me=>{const{componentCls:G,antCls:Fe}=me,Ae=`${G}-group`;return{[Ae]:Object.assign(Object.assign({},(0,Qe.Wf)(me)),{display:"inline-block",fontSize:0,[`&${Ae}-rtl`]:{direction:"rtl"},[`${Fe}-badge ${Fe}-badge-count`]:{zIndex:1},[`> ${Fe}-badge:not(:first-child) > ${Fe}-button-wrapper`]:{borderInlineStart:"none"}})}},Se=me=>{const{componentCls:G,wrapperMarginInlineEnd:Fe,colorPrimary:Ae,radioSize:Le,motionDurationSlow:ce,motionDurationMid:ot,motionEaseInOutCirc:ft,colorBgContainer:Ot,colorBorder:Kt,lineWidth:_t,dotSize:er,colorBgContainerDisabled:Ft,colorTextDisabled:rr,paddingXS:Lt,dotColorDisabled:oe,lineType:V,radioDotDisabledSize:K,wireframe:ue,colorWhite:he}=me,ze=`${G}-inner`;return{[`${G}-wrapper`]:Object.assign(Object.assign({},(0,Qe.Wf)(me)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Fe,cursor:"pointer",[`&${G}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:me.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${G}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${_t}px ${V} ${Ae}`,borderRadius:"50%",visibility:"hidden",content:'""'},[G]:Object.assign(Object.assign({},(0,Qe.Wf)(me)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${G}-wrapper:hover &,
|
|
|
&:hover ${ze}`]:{borderColor:Ae},[`${G}-input:focus-visible + ${ze}`]:Object.assign({},(0,Qe.oN)(me)),[`${G}:hover::after, ${G}-wrapper:hover &::after`]:{visibility:"visible"},[`${G}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Le,height:Le,marginBlockStart:Le/-2,marginInlineStart:Le/-2,backgroundColor:ue?Ae:he,borderBlockStart:0,borderInlineStart:0,borderRadius:Le,transform:"scale(0)",opacity:0,transition:`all ${ce} ${ft}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Le,height:Le,backgroundColor:Ot,borderColor:Kt,borderStyle:"solid",borderWidth:_t,borderRadius:"50%",transition:`all ${ot}`},[`${G}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${G}-checked`]:{[ze]:{borderColor:Ae,backgroundColor:ue?Ot:Ae,"&::after":{transform:`scale(${er/Le})`,opacity:1,transition:`all ${ce} ${ft}`}}},[`${G}-disabled`]:{cursor:"not-allowed",[ze]:{backgroundColor:Ft,borderColor:Kt,cursor:"not-allowed","&::after":{backgroundColor:oe}},[`${G}-input`]:{cursor:"not-allowed"},[`${G}-disabled + span`]:{color:rr,cursor:"not-allowed"},[`&${G}-checked`]:{[ze]:{"&::after":{transform:`scale(${K/Le})`}}}},[`span${G} + *`]:{paddingInlineStart:Lt,paddingInlineEnd:Lt}})}},O=me=>{const{buttonColor:G,controlHeight:Fe,componentCls:Ae,lineWidth:Le,lineType:ce,colorBorder:ot,motionDurationSlow:ft,motionDurationMid:Ot,buttonPaddingInline:Kt,fontSize:_t,buttonBg:er,fontSizeLG:Ft,controlHeightLG:rr,controlHeightSM:Lt,paddingXS:oe,borderRadius:V,borderRadiusSM:K,borderRadiusLG:ue,buttonCheckedBg:he,buttonSolidCheckedColor:ze,colorTextDisabled:re,colorBgContainerDisabled:ie,buttonCheckedBgDisabled:Xe,buttonCheckedColorDisabled:et,colorPrimary:it,colorPrimaryHover:Et,colorPrimaryActive:Bt,buttonSolidCheckedBg:W,buttonSolidCheckedHoverBg:Mt,buttonSolidCheckedActiveBg:vt}=me;return{[`${Ae}-button-wrapper`]:{position:"relative",display:"inline-block",height:Fe,margin:0,paddingInline:Kt,paddingBlock:0,color:G,fontSize:_t,lineHeight:`${Fe-Le*2}px`,background:er,border:`${Le}px ${ce} ${ot}`,borderBlockStartWidth:Le+.02,borderInlineStartWidth:0,borderInlineEndWidth:Le,cursor:"pointer",transition:[`color ${Ot}`,`background ${Ot}`,`box-shadow ${Ot}`].join(","),a:{color:G},[`> ${Ae}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Le,insetInlineStart:-Le,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Le,paddingInline:0,backgroundColor:ot,transition:`background-color ${ft}`,content:'""'}},"&:first-child":{borderInlineStart:`${Le}px ${ce} ${ot}`,borderStartStartRadius:V,borderEndStartRadius:V},"&:last-child":{borderStartEndRadius:V,borderEndEndRadius:V},"&:first-child:last-child":{borderRadius:V},[`${Ae}-group-large &`]:{height:rr,fontSize:Ft,lineHeight:`${rr-Le*2}px`,"&:first-child":{borderStartStartRadius:ue,borderEndStartRadius:ue},"&:last-child":{borderStartEndRadius:ue,borderEndEndRadius:ue}},[`${Ae}-group-small &`]:{height:Lt,paddingInline:oe-Le,paddingBlock:0,lineHeight:`${Lt-Le*2}px`,"&:first-child":{borderStartStartRadius:K,borderEndStartRadius:K},"&:last-child":{borderStartEndRadius:K,borderEndEndRadius:K}},"&:hover":{position:"relative",color:it},"&:has(:focus-visible)":Object.assign({},(0,Qe.oN)(me)),[`${Ae}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Ae}-button-wrapper-disabled)`]:{zIndex:1,color:it,background:he,borderColor:it,"&::before":{backgroundColor:it},"&:first-child":{borderColor:it},"&:hover":{color:Et,borderColor:Et,"&::before":{backgroundColor:Et}},"&:active":{color:Bt,borderColor:Bt,"&::before":{backgroundColor:Bt}}},[`${Ae}-group-solid &-checked:not(${Ae}-button-wrapper-disabled)`]:{color:ze,background:W,borderColor:W,"&:hover":{color:ze,background:Mt,borderColor:Mt},"&:active":{color:ze,background:vt,borderColor:vt}},"&-disabled":{color:re,backgroundColor:ie,borderColor:ot,cursor:"not-allowed","&:first-child, &:hover":{color:re,backgroundColor:ie,borderColor:ot}},[`&-disabled${Ae}-button-wrapper-checked`]:{color:et,backgroundColor:Xe,borderColor:ot,boxShadow:"none"}}}},z=me=>me-4*2;var Y=(0,$e.Z)("Radio",me=>{const{controlOutline:G,controlOutlineWidth:Fe,radioSize:Ae}=me,Le=`0 0 0 ${Fe}px ${G}`,ce=Le,ot=z(Ae),ft=(0,Nt.TS)(me,{radioDotDisabledSize:ot,radioFocusShadow:Le,radioButtonFocusShadow:ce});return[Ce(ft),Se(ft),O(ft)]},me=>{const{wireframe:G,padding:Fe,marginXS:Ae,lineWidth:Le,fontSizeLG:ce,colorText:ot,colorBgContainer:ft,colorTextDisabled:Ot,controlItemBgActiveDisabled:Kt,colorTextLightSolid:_t,colorPrimary:er,colorPrimaryHover:Ft,colorPrimaryActive:rr}=me,Lt=4,oe=ce,V=G?z(oe):oe-(Lt+Le)*2;return{radioSize:oe,dotSize:V,dotColorDisabled:Ot,buttonSolidCheckedColor:_t,buttonSolidCheckedBg:er,buttonSolidCheckedHoverBg:Ft,buttonSolidCheckedActiveBg:rr,buttonBg:ft,buttonCheckedBg:ft,buttonColor:ot,buttonCheckedBgDisabled:Kt,buttonCheckedColorDisabled:Ot,buttonPaddingInline:Fe-Le,wrapperMarginInlineEnd:Ae}}),te=x(14088),Ve=x(4572),fe=function(me,G){var Fe={};for(var Ae in me)Object.prototype.hasOwnProperty.call(me,Ae)&&G.indexOf(Ae)<0&&(Fe[Ae]=me[Ae]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,Ae=Object.getOwnPropertySymbols(me);Le<Ae.length;Le++)G.indexOf(Ae[Le])<0&&Object.prototype.propertyIsEnumerable.call(me,Ae[Le])&&(Fe[Ae[Le]]=me[Ae[Le]]);return Fe};const ut=(me,G)=>{var Fe,Ae;const Le=H.useContext(Ge),ce=H.useContext(je),{getPrefixCls:ot,direction:ft,radio:Ot}=H.useContext(J.E_),Kt=H.useRef(null),_t=(0,Ke.sQ)(G,Kt),{isFormItemInput:er}=H.useContext(gt.aM),Ft=Bt=>{var W,Mt;(W=me.onChange)===null||W===void 0||W.call(me,Bt),(Mt=Le==null?void 0:Le.onChange)===null||Mt===void 0||Mt.call(Le,Bt)},{prefixCls:rr,className:Lt,rootClassName:oe,children:V,style:K}=me,ue=fe(me,["prefixCls","className","rootClassName","children","style"]),he=ot("radio",rr),ze=((Le==null?void 0:Le.optionType)||ce)==="button",re=ze?`${he}-button`:he,[ie,Xe]=Y(he),et=Object.assign({},ue),it=H.useContext(mt.Z);Le&&(et.name=Le.name,et.onChange=Ft,et.checked=me.value===Le.value,et.disabled=(Fe=et.disabled)!==null&&Fe!==void 0?Fe:Le.disabled),et.disabled=(Ae=et.disabled)!==null&&Ae!==void 0?Ae:it;const Et=U()(`${re}-wrapper`,{[`${re}-wrapper-checked`]:et.checked,[`${re}-wrapper-disabled`]:et.disabled,[`${re}-wrapper-rtl`]:ft==="rtl",[`${re}-wrapper-in-form-item`]:er},Ot==null?void 0:Ot.className,Lt,oe,Xe);return ie(H.createElement(te.Z,{component:"Radio",disabled:et.disabled},H.createElement("label",{className:Et,style:Object.assign(Object.assign({},Ot==null?void 0:Ot.style),K),onMouseEnter:me.onMouseEnter,onMouseLeave:me.onMouseLeave},H.createElement(R.Z,Object.assign({},et,{className:U()(et.className,!ze&&Ve.A),type:"radio",prefixCls:re,ref:_t})),V!==void 0?H.createElement("span",null,V):null)))};var ve=H.forwardRef(ut);const ye=H.forwardRef((me,G)=>{const{getPrefixCls:Fe,direction:Ae}=H.useContext(J.E_),[Le,ce]=(0,xe.Z)(me.defaultValue,{value:me.value}),ot=W=>{const Mt=Le,vt=W.target.value;"value"in me||ce(vt);const{onChange:N}=me;N&&vt!==Mt&&N(W)},{prefixCls:ft,className:Ot,rootClassName:Kt,options:_t,buttonStyle:er="outline",disabled:Ft,children:rr,size:Lt,style:oe,id:V,onMouseEnter:K,onMouseLeave:ue,onFocus:he,onBlur:ze}=me,re=Fe("radio",ft),ie=`${re}-group`,[Xe,et]=Y(re);let it=rr;_t&&_t.length>0&&(it=_t.map(W=>typeof W=="string"||typeof W=="number"?H.createElement(ve,{key:W.toString(),prefixCls:re,disabled:Ft,value:W,checked:Le===W},W):H.createElement(ve,{key:`radio-group-value-options-${W.value}`,prefixCls:re,disabled:W.disabled||Ft,value:W.value,checked:Le===W.value,title:W.title,style:W.style},W.label)));const Et=(0,pe.Z)(Lt),Bt=U()(ie,`${ie}-${er}`,{[`${ie}-${Et}`]:Et,[`${ie}-rtl`]:Ae==="rtl"},Ot,Kt,et);return Xe(H.createElement("div",Object.assign({},(0,ge.Z)(me,{aria:!0,data:!0}),{className:Bt,style:oe,onMouseEnter:K,onMouseLeave:ue,onFocus:he,onBlur:ze,id:V,ref:G}),H.createElement(_,{value:{onChange:ot,value:Le,disabled:me.disabled,name:me.name,optionType:me.optionType}},it)))});var tt=H.memo(ye),Z=function(me,G){var Fe={};for(var Ae in me)Object.prototype.hasOwnProperty.call(me,Ae)&&G.indexOf(Ae)<0&&(Fe[Ae]=me[Ae]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,Ae=Object.getOwnPropertySymbols(me);Le<Ae.length;Le++)G.indexOf(Ae[Le])<0&&Object.prototype.propertyIsEnumerable.call(me,Ae[Le])&&(Fe[Ae[Le]]=me[Ae[Le]]);return Fe};const Ne=(me,G)=>{const{getPrefixCls:Fe}=H.useContext(J.E_),{prefixCls:Ae}=me,Le=Z(me,["prefixCls"]),ce=Fe("radio",Ae);return H.createElement(A,{value:"button"},H.createElement(ve,Object.assign({prefixCls:ce},Le,{type:"radio",ref:G})))};var Ye=H.forwardRef(Ne);const F=ve;F.Button=Ye,F.Group=tt,F.__ANT_RADIO=!0;var we=F},8378:function(xr,xt){"use strict";const x=k=>({[k.componentCls]:{[`${k.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${k.motionDurationMid} ${k.motionEaseInOut},
|
|
|
opacity ${k.motionDurationMid} ${k.motionEaseInOut} !important`}},[`${k.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${k.motionDurationMid} ${k.motionEaseInOut},
|
|
|
opacity ${k.motionDurationMid} ${k.motionEaseInOut} !important`}}});xt.Z=x},92899:function(xr,xt,x){"use strict";x.d(xt,{Fm:function(){return A}});var k=x(36237),U=x(95406);const xe=new k.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ge=new k.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),H=new k.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),J=new k.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),pe=new k.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),S=new k.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),_=new k.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ge=new k.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),je={"move-up":{inKeyframes:_,outKeyframes:Ge},"move-down":{inKeyframes:xe,outKeyframes:ge},"move-left":{inKeyframes:H,outKeyframes:J},"move-right":{inKeyframes:pe,outKeyframes:S}},A=(R,Ke)=>{const{antCls:mt}=R,gt=`${mt}-${Ke}`,{inKeyframes:Qe,outKeyframes:$e}=je[Ke];return[(0,U.R)(gt,Qe,$e,R.motionDurationMid),{[`
|
|
|
${gt}-enter,
|
|
|
${gt}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:R.motionEaseOutCirc},[`${gt}-leave`]:{animationTimingFunction:R.motionEaseInOutCirc}}]}},13826:function(xr,xt,x){"use strict";x.d(xt,{Qt:function(){return H},Uw:function(){return ge},fJ:function(){return xe},ly:function(){return J},oN:function(){return A}});var k=x(36237),U=x(95406);const xe=new k.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ge=new k.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),H=new k.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),J=new k.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),pe=new k.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),S=new k.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),_=new k.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Ge=new k.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),je={"slide-up":{inKeyframes:xe,outKeyframes:ge},"slide-down":{inKeyframes:H,outKeyframes:J},"slide-left":{inKeyframes:pe,outKeyframes:S},"slide-right":{inKeyframes:_,outKeyframes:Ge}},A=(R,Ke)=>{const{antCls:mt}=R,gt=`${mt}-${Ke}`,{inKeyframes:Qe,outKeyframes:$e}=je[Ke];return[(0,U.R)(gt,Qe,$e,R.motionDurationMid),{[`
|
|
|
${gt}-enter,
|
|
|
${gt}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:R.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${gt}-leave`]:{animationTimingFunction:R.motionEaseInQuint}}]}},99313:function(xr,xt,x){"use strict";x.d(xt,{default:function(){return Xn}});var k=x(99267),U=x(18785),xe=x(62772),ge=x(92310),H=x.n(ge),J=x(60499),pe=x(18642),S=x(85899),_=x(72190),Ge=x(43749),je=x(42244),A=x(59301),R=x(49658),Ke=x(18929),mt=x(77900),gt=(0,A.createContext)(null),Qe=A.forwardRef(function(C,L){var Ie=C.prefixCls,Pe=C.className,Re=C.style,He=C.id,bt=C.active,st=C.tabKey,St=C.children;return A.createElement("div",{id:He&&"".concat(He,"-panel-").concat(st),role:"tabpanel",tabIndex:bt?0:-1,"aria-labelledby":He&&"".concat(He,"-tab-").concat(st),"aria-hidden":!bt,style:Re,className:H()(Ie,bt&&"".concat(Ie,"-active"),Pe),ref:L},St)}),$e=Qe,Nt=["key","forceRender","style","className"];function Ce(C){var L=C.id,Ie=C.activeKey,Pe=C.animated,Re=C.tabPosition,He=C.destroyInactiveTabPane,bt=A.useContext(gt),st=bt.prefixCls,St=bt.tabs,qt=Pe.tabPane,jt="".concat(st,"-tabpane");return A.createElement("div",{className:H()("".concat(st,"-content-holder"))},A.createElement("div",{className:H()("".concat(st,"-content"),"".concat(st,"-content-").concat(Re),(0,pe.Z)({},"".concat(st,"-content-animated"),qt))},St.map(function($t){var Tt=$t.key,Xt=$t.forceRender,Me=$t.style,Fr=$t.className,Ir=(0,je.Z)($t,Nt),fr=Tt===Ie;return A.createElement(mt.default,(0,J.Z)({key:Tt,visible:fr,forceRender:Xt,removeOnLeave:!!He,leavedClassName:"".concat(jt,"-hidden")},Pe.tabPaneMotion),function(Wr,pr){var Vr=Wr.style,le=Wr.className;return A.createElement($e,(0,J.Z)({},Ir,{prefixCls:jt,id:L,tabKey:Tt,animated:qt,active:fr,style:(0,S.Z)((0,S.Z)({},Me),Vr),className:H()(Fr,le),ref:pr}))})})))}var Se=x(77654),O=x(29301),z=x(6089),Y=x(8654),te={width:0,height:0,left:0,top:0};function Ve(C,L,Ie){return(0,A.useMemo)(function(){for(var Pe,Re=new Map,He=L.get((Pe=C[0])===null||Pe===void 0?void 0:Pe.key)||te,bt=He.left+He.width,st=0;st<C.length;st+=1){var St=C[st].key,qt=L.get(St);if(!qt){var jt;qt=L.get((jt=C[st-1])===null||jt===void 0?void 0:jt.key)||te}var $t=Re.get(St)||(0,S.Z)({},qt);$t.right=bt-$t.left-$t.width,Re.set(St,$t)}return Re},[C.map(function(Pe){return Pe.key}).join("_"),L,Ie])}function fe(C,L){var Ie=A.useRef(C),Pe=A.useState({}),Re=(0,_.Z)(Pe,2),He=Re[1];function bt(st){var St=typeof st=="function"?st(Ie.current):st;St!==Ie.current&&L(St,Ie.current),Ie.current=St,He({})}return[Ie.current,bt]}var ut=.1,dt=.01,ve=20,ye=Math.pow(.995,ve);function tt(C,L){var Ie=(0,A.useState)(),Pe=(0,_.Z)(Ie,2),Re=Pe[0],He=Pe[1],bt=(0,A.useState)(0),st=(0,_.Z)(bt,2),St=st[0],qt=st[1],jt=(0,A.useState)(0),$t=(0,_.Z)(jt,2),Tt=$t[0],Xt=$t[1],Me=(0,A.useState)(),Fr=(0,_.Z)(Me,2),Ir=Fr[0],fr=Fr[1],Wr=(0,A.useRef)();function pr(j){var ne=j.touches[0],ae=ne.screenX,Be=ne.screenY;He({x:ae,y:Be}),window.clearInterval(Wr.current)}function Vr(j){if(Re){j.preventDefault();var ne=j.touches[0],ae=ne.screenX,Be=ne.screenY;He({x:ae,y:Be});var lt=ae-Re.x,ct=Be-Re.y;L(lt,ct);var Vt=Date.now();qt(Vt),Xt(Vt-St),fr({x:lt,y:ct})}}function le(){if(Re&&(He(null),fr(null),Ir)){var j=Ir.x/Tt,ne=Ir.y/Tt,ae=Math.abs(j),Be=Math.abs(ne);if(Math.max(ae,Be)<ut)return;var lt=j,ct=ne;Wr.current=window.setInterval(function(){if(Math.abs(lt)<dt&&Math.abs(ct)<dt){window.clearInterval(Wr.current);return}lt*=ye,ct*=ye,L(lt*ve,ct*ve)},ve)}}var X=(0,A.useRef)();function be(j){var ne=j.deltaX,ae=j.deltaY,Be=0,lt=Math.abs(ne),ct=Math.abs(ae);lt===ct?Be=X.current==="x"?ne:ae:lt>ct?(Be=ne,X.current="x"):(Be=ae,X.current="y"),L(-Be,-Be)&&j.preventDefault()}var ke=(0,A.useRef)(null);ke.current={onTouchStart:pr,onTouchMove:Vr,onTouchEnd:le,onWheel:be},A.useEffect(function(){function j(lt){ke.current.onTouchStart(lt)}function ne(lt){ke.current.onTouchMove(lt)}function ae(lt){ke.current.onTouchEnd(lt)}function Be(lt){ke.current.onWheel(lt)}return document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ae,{passive:!1}),C.current.addEventListener("touchstart",j,{passive:!1}),C.current.addEventListener("wheel",Be),function(){document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ae)}},[])}var Z=x(34280);function Ne(C){var L=(0,A.useState)(0),Ie=(0,_.Z)(L,2),Pe=Ie[0],Re=Ie[1],He=(0,A.useRef)(0),bt=(0,A.useRef)();return bt.current=C,(0,Z.o)(function(){var st;(st=bt.current)===null||st===void 0||st.call(bt)},[Pe]),function(){He.current===Pe&&(He.current+=1,Re(He.current))}}function Ye(C){var L=(0,A.useRef)([]),Ie=(0,A.useState)({}),Pe=(0,_.Z)(Ie,2),Re=Pe[1],He=(0,A.useRef)(typeof C=="function"?C():C),bt=Ne(function(){var St=He.current;L.current.forEach(function(qt){St=qt(St)}),L.current=[],He.current=St,Re({})});function st(St){L.current.push(St),bt()}return[He.current,st]}var F={width:0,height:0,left:0,top:0,right:0};function we(C,L,Ie,Pe,Re,He,bt){var st=bt.tabs,St=bt.tabPosition,qt=bt.rtl,jt,$t,Tt;return["top","bottom"].includes(St)?(jt="width",$t=qt?"right":"left",Tt=Math.abs(Ie)):(jt="height",$t="top",Tt=-Ie),(0,A.useMemo)(function(){if(!st.length)return[0,0];for(var Xt=st.length,Me=Xt,Fr=0;Fr<Xt;Fr+=1){var Ir=C.get(st[Fr].key)||F;if(Ir[$t]+Ir[jt]>Tt+L){Me=Fr-1;break}}for(var fr=0,Wr=Xt-1;Wr>=0;Wr-=1){var pr=C.get(st[Wr].key)||F;if(pr[$t]<Tt){fr=Wr+1;break}}return fr>=Me?[0,0]:[fr,Me]},[C,L,Pe,Re,He,Tt,St,st.map(function(Xt){return Xt.key}).join("_"),qt])}function me(C){var L;return C instanceof Map?(L={},C.forEach(function(Ie,Pe){L[Pe]=Ie})):L=C,JSON.stringify(L)}var G="TABS_DQ";function Fe(C){return String(C).replace(/"/g,G)}function Ae(C,L,Ie,Pe){return!(!Ie||Pe||C===!1||C===void 0&&(L===!1||L===null))}function Le(C,L){var Ie=C.prefixCls,Pe=C.editable,Re=C.locale,He=C.style;return!Pe||Pe.showAdd===!1?null:A.createElement("button",{ref:L,type:"button",className:"".concat(Ie,"-nav-add"),style:He,"aria-label":(Re==null?void 0:Re.addAriaLabel)||"Add tab",onClick:function(st){Pe.onEdit("add",{event:st})}},Pe.addIcon||"+")}var ce=A.forwardRef(Le),ot=A.forwardRef(function(C,L){var Ie=C.position,Pe=C.prefixCls,Re=C.extra;if(!Re)return null;var He,bt={};return(0,Ge.Z)(Re)==="object"&&!A.isValidElement(Re)?bt=Re:bt.right=Re,Ie==="right"&&(He=bt.right),Ie==="left"&&(He=bt.left),He?A.createElement("div",{className:"".concat(Pe,"-extra-content"),ref:L},He):null}),ft=ot,Ot=x(31561),Kt=x(15285),_t=x(10228);function er(C,L){var Ie=C.prefixCls,Pe=C.id,Re=C.tabs,He=C.locale,bt=C.mobile,st=C.moreIcon,St=st===void 0?"More":st,qt=C.moreTransitionName,jt=C.style,$t=C.className,Tt=C.editable,Xt=C.tabBarGutter,Me=C.rtl,Fr=C.removeAriaLabel,Ir=C.onTabClick,fr=C.getPopupContainer,Wr=C.popupClassName,pr=(0,A.useState)(!1),Vr=(0,_.Z)(pr,2),le=Vr[0],X=Vr[1],be=(0,A.useState)(null),ke=(0,_.Z)(be,2),j=ke[0],ne=ke[1],ae="".concat(Pe,"-more-popup"),Be="".concat(Ie,"-dropdown"),lt=j!==null?"".concat(ae,"-").concat(j):null,ct=He==null?void 0:He.dropdownAriaLabel;function Vt(Jt,Yt){Jt.preventDefault(),Jt.stopPropagation(),Tt.onEdit("remove",{key:Yt,event:Jt})}var sr=A.createElement(Kt.ZP,{onClick:function(Yt){var ir=Yt.key,Ut=Yt.domEvent;Ir(ir,Ut),X(!1)},prefixCls:"".concat(Be,"-menu"),id:ae,tabIndex:-1,role:"listbox","aria-activedescendant":lt,selectedKeys:[j],"aria-label":ct!==void 0?ct:"expanded dropdown"},Re.map(function(Jt){var Yt=Jt.closable,ir=Jt.disabled,Ut=Jt.closeIcon,Qt=Jt.key,dr=Jt.label,Br=Ae(Yt,Ut,Tt,ir);return A.createElement(Kt.sN,{key:Qt,id:"".concat(ae,"-").concat(Qt),role:"option","aria-controls":Pe&&"".concat(Pe,"-panel-").concat(Qt),disabled:ir},A.createElement("span",null,dr),Br&&A.createElement("button",{type:"button","aria-label":Fr||"remove",tabIndex:0,className:"".concat(Be,"-menu-item-remove"),onClick:function(At){At.stopPropagation(),Vt(At,Qt)}},Ut||Tt.removeIcon||"\xD7"))}));function mr(Jt){for(var Yt=Re.filter(function(Br){return!Br.disabled}),ir=Yt.findIndex(function(Br){return Br.key===j})||0,Ut=Yt.length,Qt=0;Qt<Ut;Qt+=1){ir=(ir+Jt+Ut)%Ut;var dr=Yt[ir];if(!dr.disabled){ne(dr.key);return}}}function gr(Jt){var Yt=Jt.which;if(!le){[_t.Z.DOWN,_t.Z.SPACE,_t.Z.ENTER].includes(Yt)&&(X(!0),Jt.preventDefault());return}switch(Yt){case _t.Z.UP:mr(-1),Jt.preventDefault();break;case _t.Z.DOWN:mr(1),Jt.preventDefault();break;case _t.Z.ESC:X(!1);break;case _t.Z.SPACE:case _t.Z.ENTER:j!==null&&Ir(j,Jt);break}}(0,A.useEffect)(function(){var Jt=document.getElementById(lt);Jt&&Jt.scrollIntoView&&Jt.scrollIntoView(!1)},[j]),(0,A.useEffect)(function(){le||ne(null)},[le]);var tr=(0,pe.Z)({},Me?"marginRight":"marginLeft",Xt);Re.length||(tr.visibility="hidden",tr.order=1);var Lr=H()((0,pe.Z)({},"".concat(Be,"-rtl"),Me)),$r=bt?null:A.createElement(Ot.Z,{prefixCls:Be,overlay:sr,trigger:["hover"],visible:Re.length?le:!1,transitionName:qt,onVisibleChange:X,overlayClassName:H()(Lr,Wr),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:fr},A.createElement("button",{type:"button",className:"".concat(Ie,"-nav-more"),style:tr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":ae,id:"".concat(Pe,"-more"),"aria-expanded":le,onKeyDown:gr},St));return A.createElement("div",{className:H()("".concat(Ie,"-nav-operations"),$t),style:jt,ref:L},$r,A.createElement(ce,{prefixCls:Ie,locale:He,editable:Tt}))}var Ft=A.memo(A.forwardRef(er),function(C,L){return L.tabMoving});function rr(C){var L,Ie=C.prefixCls,Pe=C.id,Re=C.active,He=C.tab,bt=He.key,st=He.label,St=He.disabled,qt=He.closeIcon,jt=C.closable,$t=C.renderWrapper,Tt=C.removeAriaLabel,Xt=C.editable,Me=C.onClick,Fr=C.onFocus,Ir=C.style,fr="".concat(Ie,"-tab"),Wr=Ae(jt,qt,Xt,St);function pr(X){St||Me(X)}function Vr(X){X.preventDefault(),X.stopPropagation(),Xt.onEdit("remove",{key:bt,event:X})}var le=A.createElement("div",{key:bt,"data-node-key":Fe(bt),className:H()(fr,(L={},(0,pe.Z)(L,"".concat(fr,"-with-remove"),Wr),(0,pe.Z)(L,"".concat(fr,"-active"),Re),(0,pe.Z)(L,"".concat(fr,"-disabled"),St),L)),style:Ir,onClick:pr},A.createElement("div",{role:"tab","aria-selected":Re,id:Pe&&"".concat(Pe,"-tab-").concat(bt),className:"".concat(fr,"-btn"),"aria-controls":Pe&&"".concat(Pe,"-panel-").concat(bt),"aria-disabled":St,tabIndex:St?null:0,onClick:function(be){be.stopPropagation(),pr(be)},onKeyDown:function(be){[_t.Z.SPACE,_t.Z.ENTER].includes(be.which)&&(be.preventDefault(),pr(be))},onFocus:Fr},st),Wr&&A.createElement("button",{type:"button","aria-label":Tt||"remove",tabIndex:0,className:"".concat(fr,"-remove"),onClick:function(be){be.stopPropagation(),Vr(be)}},qt||Xt.removeIcon||"\xD7"));return $t?$t(le):le}var Lt=rr,oe=x(16089),V=function(L){var Ie=L.activeTabOffset,Pe=L.horizontal,Re=L.rtl,He=L.indicatorSize,bt=(0,A.useState)(),st=(0,_.Z)(bt,2),St=st[0],qt=st[1],jt=(0,A.useRef)(),$t=function(Me){return typeof He=="function"?He(Me):typeof He=="number"?He:Me};function Tt(){oe.Z.cancel(jt.current)}return(0,A.useEffect)(function(){var Xt={};return Ie&&(Pe?(Re?(Xt.right=Ie.right+Ie.width/2,Xt.transform="translateX(50%)"):(Xt.left=Ie.left+Ie.width/2,Xt.transform="translateX(-50%)"),Xt.width=$t(Ie.width)):(Xt.top=Ie.top+Ie.height/2,Xt.transform="translateY(-50%)",Xt.height=$t(Ie.height))),Tt(),jt.current=(0,oe.Z)(function(){qt(Xt)}),Tt},[Ie,Pe,Re,He]),{style:St}},K=V,ue=function(L){var Ie=L.current||{},Pe=Ie.offsetWidth,Re=Pe===void 0?0:Pe,He=Ie.offsetHeight,bt=He===void 0?0:He;return[Re,bt]},he=function(L,Ie){return L[Ie?0:1]};function ze(C,L){var Ie,Pe=A.useContext(gt),Re=Pe.prefixCls,He=Pe.tabs,bt=C.className,st=C.style,St=C.id,qt=C.animated,jt=C.activeKey,$t=C.rtl,Tt=C.extra,Xt=C.editable,Me=C.locale,Fr=C.tabPosition,Ir=C.tabBarGutter,fr=C.children,Wr=C.onTabClick,pr=C.onTabScroll,Vr=C.indicatorSize,le=(0,A.useRef)(),X=(0,A.useRef)(),be=(0,A.useRef)(),ke=(0,A.useRef)(),j=(0,A.useRef)(),ne=(0,A.useRef)(),ae=(0,A.useRef)(),Be=Fr==="top"||Fr==="bottom",lt=fe(0,function(zr,Mr){Be&&pr&&pr({direction:zr>Mr?"left":"right"})}),ct=(0,_.Z)(lt,2),Vt=ct[0],sr=ct[1],mr=fe(0,function(zr,Mr){!Be&&pr&&pr({direction:zr>Mr?"top":"bottom"})}),gr=(0,_.Z)(mr,2),tr=gr[0],Lr=gr[1],$r=(0,A.useState)([0,0]),Jt=(0,_.Z)($r,2),Yt=Jt[0],ir=Jt[1],Ut=(0,A.useState)([0,0]),Qt=(0,_.Z)(Ut,2),dr=Qt[0],Br=Qt[1],kr=(0,A.useState)([0,0]),At=(0,_.Z)(kr,2),ht=At[0],ar=At[1],zt=(0,A.useState)([0,0]),yr=(0,_.Z)(zt,2),dn=yr[0],ur=yr[1],rn=Ye(new Map),Tr=(0,_.Z)(rn,2),Tn=Tr[0],ri=Tr[1],mn=Ve(He,Tn,dr[0]),Jn=he(Yt,Be),En=he(dr,Be),ni=he(ht,Be),gn=he(dn,Be),mi=Jn<En+ni,Pr=mi?Jn-gn:Jn-ni,Pn="".concat(Re,"-nav-operations-hidden"),Sn=0,zn=0;Be&&$t?(Sn=0,zn=Math.max(0,En-Pr)):(Sn=Math.min(0,Pr-En),zn=0);function gi(zr){return zr<Sn?Sn:zr>zn?zn:zr}var _n=(0,A.useRef)(),ci=(0,A.useState)(),Yn=(0,_.Z)(ci,2),Pi=Yn[0],Kn=Yn[1];function vi(){Kn(Date.now())}function Zi(){window.clearTimeout(_n.current)}tt(ke,function(zr,Mr){function hn(Dn,ii){Dn(function(On){var Na=gi(On+ii);return Na})}return mi?(Be?hn(sr,zr):hn(Lr,Mr),Zi(),vi(),!0):!1}),(0,A.useEffect)(function(){return Zi(),Pi&&(_n.current=window.setTimeout(function(){Kn(0)},100)),Zi},[Pi]);var _i=we(mn,Pr,Be?Vt:tr,En,ni,gn,(0,S.Z)((0,S.Z)({},C),{},{tabs:He})),Mi=(0,_.Z)(_i,2),ji=Mi[0],Ri=Mi[1],ui=(0,z.Z)(function(){var zr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jt,Mr=mn.get(zr)||{width:0,height:0,left:0,right:0,top:0};if(Be){var hn=Vt;$t?Mr.right<Vt?hn=Mr.right:Mr.right+Mr.width>Vt+Pr&&(hn=Mr.right+Mr.width-Pr):Mr.left<-Vt?hn=-Mr.left:Mr.left+Mr.width>-Vt+Pr&&(hn=-(Mr.left+Mr.width-Pr)),Lr(0),sr(gi(hn))}else{var Dn=tr;Mr.top<-tr?Dn=-Mr.top:Mr.top+Mr.height>-tr+Pr&&(Dn=-(Mr.top+Mr.height-Pr)),sr(0),Lr(gi(Dn))}}),fn={};Fr==="top"||Fr==="bottom"?fn[$t?"marginRight":"marginLeft"]=Ir:fn.marginTop=Ir;var xa=He.map(function(zr,Mr){var hn=zr.key;return A.createElement(Lt,{id:St,prefixCls:Re,key:hn,tab:zr,style:Mr===0?void 0:fn,closable:zr.closable,editable:Xt,active:hn===jt,renderWrapper:fr,removeAriaLabel:Me==null?void 0:Me.removeAriaLabel,onClick:function(ii){Wr(hn,ii)},onFocus:function(){ui(hn),vi(),ke.current&&($t||(ke.current.scrollLeft=0),ke.current.scrollTop=0)}})}),Ci=function(){return ri(function(){var Mr=new Map;return He.forEach(function(hn){var Dn,ii=hn.key,On=(Dn=j.current)===null||Dn===void 0?void 0:Dn.querySelector('[data-node-key="'.concat(Fe(ii),'"]'));On&&Mr.set(ii,{width:On.offsetWidth,height:On.offsetHeight,left:On.offsetLeft,top:On.offsetTop})}),Mr})};(0,A.useEffect)(function(){Ci()},[He.map(function(zr){return zr.key}).join("_")]);var Oi=Ne(function(){var zr=ue(le),Mr=ue(X),hn=ue(be);ir([zr[0]-Mr[0]-hn[0],zr[1]-Mr[1]-hn[1]]);var Dn=ue(ae);ar(Dn);var ii=ue(ne);ur(ii);var On=ue(j);Br([On[0]-Dn[0],On[1]-Dn[1]]),Ci()}),bi=He.slice(0,ji),Ui=He.slice(Ri+1),Ei=[].concat((0,Se.Z)(bi),(0,Se.Z)(Ui)),Gi=mn.get(jt),Ni=K({activeTabOffset:Gi,horizontal:Be,rtl:$t,indicatorSize:Vr}),Fi=Ni.style;(0,A.useEffect)(function(){ui()},[jt,Sn,zn,me(Gi),me(mn),Be]),(0,A.useEffect)(function(){Oi()},[$t]);var kn=!!Ei.length,di="".concat(Re,"-nav-wrap"),fi,Rn,Hn,zi;return Be?$t?(Rn=Vt>0,fi=Vt!==zn):(fi=Vt<0,Rn=Vt!==Sn):(Hn=tr<0,zi=tr!==Sn),A.createElement(O.Z,{onResize:Oi},A.createElement("div",{ref:(0,Y.x1)(L,le),role:"tablist",className:H()("".concat(Re,"-nav"),bt),style:st,onKeyDown:function(){vi()}},A.createElement(ft,{ref:X,position:"left",extra:Tt,prefixCls:Re}),A.createElement(O.Z,{onResize:Oi},A.createElement("div",{className:H()(di,(Ie={},(0,pe.Z)(Ie,"".concat(di,"-ping-left"),fi),(0,pe.Z)(Ie,"".concat(di,"-ping-right"),Rn),(0,pe.Z)(Ie,"".concat(di,"-ping-top"),Hn),(0,pe.Z)(Ie,"".concat(di,"-ping-bottom"),zi),Ie)),ref:ke},A.createElement(O.Z,{onResize:Oi},A.createElement("div",{ref:j,className:"".concat(Re,"-nav-list"),style:{transform:"translate(".concat(Vt,"px, ").concat(tr,"px)"),transition:Pi?"none":void 0}},xa,A.createElement(ce,{ref:ae,prefixCls:Re,locale:Me,editable:Xt,style:(0,S.Z)((0,S.Z)({},xa.length===0?void 0:fn),{},{visibility:kn?"hidden":null})}),A.createElement("div",{className:H()("".concat(Re,"-ink-bar"),(0,pe.Z)({},"".concat(Re,"-ink-bar-animated"),qt.inkBar)),style:Fi}))))),A.createElement(Ft,(0,J.Z)({},C,{removeAriaLabel:Me==null?void 0:Me.removeAriaLabel,ref:ne,prefixCls:Re,tabs:Ei,className:!kn&&Pn,tabMoving:!!Pi})),A.createElement(ft,{ref:be,position:"right",extra:Tt,prefixCls:Re})))}var re=A.forwardRef(ze),ie=["renderTabBar"],Xe=["label","key"];function et(C){var L=C.renderTabBar,Ie=(0,je.Z)(C,ie),Pe=A.useContext(gt),Re=Pe.tabs;if(L){var He=(0,S.Z)((0,S.Z)({},Ie),{},{panes:Re.map(function(bt){var st=bt.label,St=bt.key,qt=(0,je.Z)(bt,Xe);return A.createElement($e,(0,J.Z)({tab:st,key:St,tabKey:St},qt))})});return L(He,re)}return A.createElement(re,Ie)}var it=x(48736);function Et(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},L;return C===!1?L={inkBar:!1,tabPane:!1}:C===!0?L={inkBar:!0,tabPane:!1}:L=(0,S.Z)({inkBar:!0},(0,Ge.Z)(C)==="object"?C:{}),L.tabPaneMotion&&L.tabPane===void 0&&(L.tabPane=!0),!L.tabPaneMotion&&L.tabPane&&(L.tabPane=!1),L}var Bt=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],W=0;function Mt(C,L){var Ie,Pe=C.id,Re=C.prefixCls,He=Re===void 0?"rc-tabs":Re,bt=C.className,st=C.items,St=C.direction,qt=C.activeKey,jt=C.defaultActiveKey,$t=C.editable,Tt=C.animated,Xt=C.tabPosition,Me=Xt===void 0?"top":Xt,Fr=C.tabBarGutter,Ir=C.tabBarStyle,fr=C.tabBarExtraContent,Wr=C.locale,pr=C.moreIcon,Vr=C.moreTransitionName,le=C.destroyInactiveTabPane,X=C.renderTabBar,be=C.onChange,ke=C.onTabClick,j=C.onTabScroll,ne=C.getPopupContainer,ae=C.popupClassName,Be=C.indicatorSize,lt=(0,je.Z)(C,Bt),ct=A.useMemo(function(){return(st||[]).filter(function(ur){return ur&&(0,Ge.Z)(ur)==="object"&&"key"in ur})},[st]),Vt=St==="rtl",sr=Et(Tt),mr=(0,A.useState)(!1),gr=(0,_.Z)(mr,2),tr=gr[0],Lr=gr[1];(0,A.useEffect)(function(){Lr((0,R.Z)())},[]);var $r=(0,Ke.Z)(function(){var ur;return(ur=ct[0])===null||ur===void 0?void 0:ur.key},{value:qt,defaultValue:jt}),Jt=(0,_.Z)($r,2),Yt=Jt[0],ir=Jt[1],Ut=(0,A.useState)(function(){return ct.findIndex(function(ur){return ur.key===Yt})}),Qt=(0,_.Z)(Ut,2),dr=Qt[0],Br=Qt[1];(0,A.useEffect)(function(){var ur=ct.findIndex(function(Tr){return Tr.key===Yt});if(ur===-1){var rn;ur=Math.max(0,Math.min(dr,ct.length-1)),ir((rn=ct[ur])===null||rn===void 0?void 0:rn.key)}Br(ur)},[ct.map(function(ur){return ur.key}).join("_"),Yt,dr]);var kr=(0,Ke.Z)(null,{value:Pe}),At=(0,_.Z)(kr,2),ht=At[0],ar=At[1];(0,A.useEffect)(function(){Pe||(ar("rc-tabs-".concat(W)),W+=1)},[]);function zt(ur,rn){ke==null||ke(ur,rn);var Tr=ur!==Yt;ir(ur),Tr&&(be==null||be(ur))}var yr={id:ht,activeKey:Yt,animated:sr,tabPosition:Me,rtl:Vt,mobile:tr},dn=(0,S.Z)((0,S.Z)({},yr),{},{editable:$t,locale:Wr,moreIcon:pr,moreTransitionName:Vr,tabBarGutter:Fr,onTabClick:zt,onTabScroll:j,extra:fr,style:Ir,panes:null,getPopupContainer:ne,popupClassName:ae,indicatorSize:Be});return A.createElement(gt.Provider,{value:{tabs:ct,prefixCls:He}},A.createElement("div",(0,J.Z)({ref:L,id:Pe,className:H()(He,"".concat(He,"-").concat(Me),(Ie={},(0,pe.Z)(Ie,"".concat(He,"-mobile"),tr),(0,pe.Z)(Ie,"".concat(He,"-editable"),$t),(0,pe.Z)(Ie,"".concat(He,"-rtl"),Vt),Ie),bt)},lt),A.createElement(et,(0,J.Z)({},dn,{renderTabBar:X})),A.createElement(Ce,(0,J.Z)({destroyInactiveTabPane:le},yr,{animated:sr}))))}var vt=A.forwardRef(Mt),N=vt,q=N,de=x(36355),at=x(19716),Ee=()=>null,or=x(62892);const Ht={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Wt(C){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Ie;return L===!1?Ie={inkBar:!1,tabPane:!1}:L===!0?Ie={inkBar:!0,tabPane:!0}:Ie=Object.assign({inkBar:!0},typeof L=="object"?L:{}),Ie.tabPane&&(Ie.tabPaneMotion=Object.assign(Object.assign({},Ht),{motionName:(0,or.m)(C,"switch")})),Ie}var Gt=x(11592),nr=function(C,L){var Ie={};for(var Pe in C)Object.prototype.hasOwnProperty.call(C,Pe)&&L.indexOf(Pe)<0&&(Ie[Pe]=C[Pe]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,Pe=Object.getOwnPropertySymbols(C);Re<Pe.length;Re++)L.indexOf(Pe[Re])<0&&Object.prototype.propertyIsEnumerable.call(C,Pe[Re])&&(Ie[Pe[Re]]=C[Pe[Re]]);return Ie};function Ct(C){return C.filter(L=>L)}function wr(C,L){if(C)return C;const Ie=(0,Gt.Z)(L).map(Pe=>{if(A.isValidElement(Pe)){const{key:Re,props:He}=Pe,bt=He||{},{tab:st}=bt,St=nr(bt,["tab"]);return Object.assign(Object.assign({key:String(Re)},St),{label:st})}return null});return Ct(Ie)}var hr=x(17313),Ur=x(83116),Er=x(37613),cr=x(13826),Zt=C=>{const{componentCls:L,motionDurationSlow:Ie}=C;return[{[L]:{[`${L}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Ie}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Ie}`}}}}},[(0,cr.oN)(C,"slide-up"),(0,cr.oN)(C,"slide-down")]]};const sn=C=>{const{componentCls:L,tabsCardPadding:Ie,cardBg:Pe,cardGutter:Re,colorBorderSecondary:He,itemSelectedColor:bt}=C;return{[`${L}-card`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab`]:{margin:0,padding:Ie,background:Pe,border:`${C.lineWidth}px ${C.lineType} ${He}`,transition:`all ${C.motionDurationSlow} ${C.motionEaseInOut}`},[`${L}-tab-active`]:{color:bt,background:C.colorBgContainer},[`${L}-ink-bar`]:{visibility:"hidden"}},[`&${L}-top, &${L}-bottom`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab + ${L}-tab`]:{marginLeft:{_skip_check_:!0,value:`${Re}px`}}}},[`&${L}-top`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab`]:{borderRadius:`${C.borderRadiusLG}px ${C.borderRadiusLG}px 0 0`},[`${L}-tab-active`]:{borderBottomColor:C.colorBgContainer}}},[`&${L}-bottom`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab`]:{borderRadius:`0 0 ${C.borderRadiusLG}px ${C.borderRadiusLG}px`},[`${L}-tab-active`]:{borderTopColor:C.colorBgContainer}}},[`&${L}-left, &${L}-right`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab + ${L}-tab`]:{marginTop:`${Re}px`}}},[`&${L}-left`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab`]:{borderRadius:{_skip_check_:!0,value:`${C.borderRadiusLG}px 0 0 ${C.borderRadiusLG}px`}},[`${L}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:C.colorBgContainer}}}},[`&${L}-right`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${C.borderRadiusLG}px ${C.borderRadiusLG}px 0`}},[`${L}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:C.colorBgContainer}}}}}}},qr=C=>{const{componentCls:L,itemHoverColor:Ie,dropdownEdgeChildVerticalPadding:Pe}=C;return{[`${L}-dropdown`]:Object.assign(Object.assign({},(0,hr.Wf)(C)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:C.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${L}-dropdown-menu`]:{maxHeight:C.tabsDropdownHeight,margin:0,padding:`${Pe}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:C.colorBgContainer,backgroundClip:"padding-box",borderRadius:C.borderRadiusLG,outline:"none",boxShadow:C.boxShadowSecondary,"&-item":Object.assign(Object.assign({},hr.vS),{display:"flex",alignItems:"center",minWidth:C.tabsDropdownWidth,margin:0,padding:`${C.paddingXXS}px ${C.paddingSM}px`,color:C.colorText,fontWeight:"normal",fontSize:C.fontSize,lineHeight:C.lineHeight,cursor:"pointer",transition:`all ${C.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:C.marginSM},color:C.colorTextDescription,fontSize:C.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Ie}},"&:hover":{background:C.controlItemBgHover},"&-disabled":{"&, &:hover":{color:C.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},un=C=>{const{componentCls:L,margin:Ie,colorBorderSecondary:Pe,horizontalMargin:Re,verticalItemPadding:He,verticalItemMargin:bt}=C;return{[`${L}-top, ${L}-bottom`]:{flexDirection:"column",[`> ${L}-nav, > div > ${L}-nav`]:{margin:Re,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${C.lineWidth}px ${C.lineType} ${Pe}`,content:"''"},[`${L}-ink-bar`]:{height:C.lineWidthBold,"&-animated":{transition:`width ${C.motionDurationSlow}, left ${C.motionDurationSlow},
|
|
|
right ${C.motionDurationSlow}`}},[`${L}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:C.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:C.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:C.boxShadowTabsOverflowRight},[`&${L}-nav-wrap-ping-left::before`]:{opacity:1},[`&${L}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${L}-top`]:{[`> ${L}-nav,
|
|
|
> div > ${L}-nav`]:{"&::before":{bottom:0},[`${L}-ink-bar`]:{bottom:0}}},[`${L}-bottom`]:{[`> ${L}-nav, > div > ${L}-nav`]:{order:1,marginTop:`${Ie}px`,marginBottom:0,"&::before":{top:0},[`${L}-ink-bar`]:{top:0}},[`> ${L}-content-holder, > div > ${L}-content-holder`]:{order:0}},[`${L}-left, ${L}-right`]:{[`> ${L}-nav, > div > ${L}-nav`]:{flexDirection:"column",minWidth:C.controlHeight*1.25,[`${L}-tab`]:{padding:He,textAlign:"center"},[`${L}-tab + ${L}-tab`]:{margin:bt},[`${L}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:C.controlHeight},"&::before":{top:0,boxShadow:C.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:C.boxShadowTabsOverflowBottom},[`&${L}-nav-wrap-ping-top::before`]:{opacity:1},[`&${L}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${L}-ink-bar`]:{width:C.lineWidthBold,"&-animated":{transition:`height ${C.motionDurationSlow}, top ${C.motionDurationSlow}`}},[`${L}-nav-list, ${L}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${L}-left`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${L}-content-holder, > div > ${L}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${C.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`},[`> ${L}-content > ${L}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:C.paddingLG}}}},[`${L}-right`]:{[`> ${L}-nav, > div > ${L}-nav`]:{order:1,[`${L}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${L}-content-holder, > div > ${L}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-C.lineWidth},borderRight:{_skip_check_:!0,value:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`},[`> ${L}-content > ${L}-tabpane`]:{paddingRight:{_skip_check_:!0,value:C.paddingLG}}}}}},Jr=C=>{const{componentCls:L,cardPaddingSM:Ie,cardPaddingLG:Pe,horizontalItemPaddingSM:Re,horizontalItemPaddingLG:He}=C;return{[L]:{"&-small":{[`> ${L}-nav`]:{[`${L}-tab`]:{padding:Re,fontSize:C.titleFontSizeSM}}},"&-large":{[`> ${L}-nav`]:{[`${L}-tab`]:{padding:He,fontSize:C.titleFontSizeLG}}}},[`${L}-card`]:{[`&${L}-small`]:{[`> ${L}-nav`]:{[`${L}-tab`]:{padding:Ie}},[`&${L}-bottom`]:{[`> ${L}-nav ${L}-tab`]:{borderRadius:`0 0 ${C.borderRadius}px ${C.borderRadius}px`}},[`&${L}-top`]:{[`> ${L}-nav ${L}-tab`]:{borderRadius:`${C.borderRadius}px ${C.borderRadius}px 0 0`}},[`&${L}-right`]:{[`> ${L}-nav ${L}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${C.borderRadius}px ${C.borderRadius}px 0`}}},[`&${L}-left`]:{[`> ${L}-nav ${L}-tab`]:{borderRadius:{_skip_check_:!0,value:`${C.borderRadius}px 0 0 ${C.borderRadius}px`}}}},[`&${L}-large`]:{[`> ${L}-nav`]:{[`${L}-tab`]:{padding:Pe}}}}}},Sr=C=>{const{componentCls:L,itemActiveColor:Ie,itemHoverColor:Pe,iconCls:Re,tabsHorizontalItemMargin:He,horizontalItemPadding:bt,itemSelectedColor:st,itemColor:St}=C,qt=`${L}-tab`;return{[qt]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:bt,fontSize:C.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:St,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Ie}},(0,hr.Qy)(C)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-C.marginXXS},marginLeft:{_skip_check_:!0,value:C.marginXS},color:C.colorTextDescription,fontSize:C.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${C.motionDurationSlow}`,"&:hover":{color:C.colorTextHeading}},"&:hover":{color:Pe},[`&${qt}-active ${qt}-btn`]:{color:st,textShadow:C.tabsActiveTextShadow},[`&${qt}-disabled`]:{color:C.colorTextDisabled,cursor:"not-allowed"},[`&${qt}-disabled ${qt}-btn, &${qt}-disabled ${L}-remove`]:{"&:focus, &:active":{color:C.colorTextDisabled}},[`& ${qt}-remove ${Re}`]:{margin:0},[Re]:{marginRight:{_skip_check_:!0,value:C.marginSM}}},[`${qt} + ${qt}`]:{margin:{_skip_check_:!0,value:He}}}},Gr=C=>{const{componentCls:L,tabsHorizontalItemMarginRTL:Ie,iconCls:Pe,cardGutter:Re}=C;return{[`${L}-rtl`]:{direction:"rtl",[`${L}-nav`]:{[`${L}-tab`]:{margin:{_skip_check_:!0,value:Ie},[`${L}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Pe]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${C.marginSM}px`}},[`${L}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${C.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${C.marginXXS}px`},[Pe]:{margin:0}}}},[`&${L}-left`]:{[`> ${L}-nav`]:{order:1},[`> ${L}-content-holder`]:{order:0}},[`&${L}-right`]:{[`> ${L}-nav`]:{order:0},[`> ${L}-content-holder`]:{order:1}},[`&${L}-card${L}-top, &${L}-card${L}-bottom`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab + ${L}-tab`]:{marginRight:{_skip_check_:!0,value:Re},marginLeft:{_skip_check_:!0,value:0}}}}},[`${L}-dropdown-rtl`]:{direction:"rtl"},[`${L}-menu-item`]:{[`${L}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Nr=C=>{const{componentCls:L,tabsCardPadding:Ie,cardHeight:Pe,cardGutter:Re,itemHoverColor:He,itemActiveColor:bt,colorBorderSecondary:st}=C;return{[L]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,hr.Wf)(C)),{display:"flex",[`> ${L}-nav, > div > ${L}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${L}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${C.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${L}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${C.motionDurationSlow}`},[`${L}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${L}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${L}-nav-more`]:{position:"relative",padding:Ie,background:"transparent",border:0,color:C.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:C.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${L}-nav-add`]:Object.assign({minWidth:Pe,marginLeft:{_skip_check_:!0,value:Re},padding:`0 ${C.paddingXS}px`,background:"transparent",border:`${C.lineWidth}px ${C.lineType} ${st}`,borderRadius:`${C.borderRadiusLG}px ${C.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:C.colorText,transition:`all ${C.motionDurationSlow} ${C.motionEaseInOut}`,"&:hover":{color:He},"&:active, &:focus:not(:focus-visible)":{color:bt}},(0,hr.Qy)(C))},[`${L}-extra-content`]:{flex:"none"},[`${L}-ink-bar`]:{position:"absolute",background:C.inkBarColor,pointerEvents:"none"}}),Sr(C)),{[`${L}-content`]:{position:"relative",width:"100%"},[`${L}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${L}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${L}-centered`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-nav-wrap`]:{[`&:not([class*='${L}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Bn=(0,Ur.Z)("Tabs",C=>{const L=(0,Er.TS)(C,{tabsCardPadding:C.cardPadding||`${(C.cardHeight-Math.round(C.fontSize*C.lineHeight))/2-C.lineWidth}px ${C.padding}px`,dropdownEdgeChildVerticalPadding:C.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${C.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${C.horizontalItemGutter}px`});return[Jr(L),Gr(L),un(L),qr(L),sn(L),Nr(L),Zt(L)]},C=>{const L=C.controlHeightLG;return{zIndexPopup:C.zIndexPopupBase+50,cardBg:C.colorFillAlter,cardHeight:L,cardPadding:"",cardPaddingSM:`${C.paddingXXS*1.5}px ${C.padding}px`,cardPaddingLG:`${C.paddingXS}px ${C.padding}px ${C.paddingXXS*1.5}px`,titleFontSize:C.fontSize,titleFontSizeLG:C.fontSizeLG,titleFontSizeSM:C.fontSize,inkBarColor:C.colorPrimary,horizontalMargin:`0 0 ${C.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${C.paddingSM}px 0`,horizontalItemPaddingSM:`${C.paddingXS}px 0`,horizontalItemPaddingLG:`${C.padding}px 0`,verticalItemPadding:`${C.paddingXS}px ${C.paddingLG}px`,verticalItemMargin:`${C.margin}px 0 0 0`,itemColor:C.colorText,itemSelectedColor:C.colorPrimary,itemHoverColor:C.colorPrimaryHover,itemActiveColor:C.colorPrimaryActive,cardGutter:C.marginXXS/2}}),$n=function(C,L){var Ie={};for(var Pe in C)Object.prototype.hasOwnProperty.call(C,Pe)&&L.indexOf(Pe)<0&&(Ie[Pe]=C[Pe]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,Pe=Object.getOwnPropertySymbols(C);Re<Pe.length;Re++)L.indexOf(Pe[Re])<0&&Object.prototype.propertyIsEnumerable.call(C,Pe[Re])&&(Ie[Pe[Re]]=C[Pe[Re]]);return Ie};const wn=C=>{const{type:L,className:Ie,rootClassName:Pe,size:Re,onEdit:He,hideAdd:bt,centered:st,addIcon:St,popupClassName:qt,children:jt,items:$t,animated:Tt,style:Xt,indicatorSize:Me}=C,Fr=$n(C,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:Ir,moreIcon:fr=A.createElement(U.Z,null)}=Fr,{direction:Wr,tabs:pr,getPrefixCls:Vr,getPopupContainer:le}=A.useContext(de.E_),X=Vr("tabs",Ir),[be,ke]=Bn(X);let j;L==="editable-card"&&(j={onEdit:(Vt,sr)=>{let{key:mr,event:gr}=sr;He==null||He(Vt==="add"?gr:mr,Vt)},removeIcon:A.createElement(k.Z,null),addIcon:St||A.createElement(xe.Z,null),showAdd:bt!==!0});const ne=Vr(),ae=wr($t,jt),Be=Wt(X,Tt),lt=(0,at.Z)(Re),ct=Object.assign(Object.assign({},pr==null?void 0:pr.style),Xt);return be(A.createElement(q,Object.assign({direction:Wr,getPopupContainer:le,moreTransitionName:`${ne}-slide-up`},Fr,{items:ae,className:H()({[`${X}-${lt}`]:lt,[`${X}-card`]:["card","editable-card"].includes(L),[`${X}-editable-card`]:L==="editable-card",[`${X}-centered`]:st},pr==null?void 0:pr.className,Ie,Pe,ke),popupClassName:H()(qt,ke),style:ct,editable:j,moreIcon:fr,prefixCls:X,animated:Be,indicatorSize:Me!=null?Me:pr==null?void 0:pr.indicatorSize})))};wn.TabPane=Ee;var Xn=wn},24334:function(xr,xt,x){var k,U;(function(xe,ge){xr.exports=ge(xe)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof x.g!="undefined"?x.g:this,function(xe){"use strict";xe=xe||{};var ge=xe.Base64,H="2.6.4",J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pe=function(ye){for(var tt={},Z=0,Ne=ye.length;Z<Ne;Z++)tt[ye.charAt(Z)]=Z;return tt}(J),S=String.fromCharCode,_=function(ye){if(ye.length<2){var tt=ye.charCodeAt(0);return tt<128?ye:tt<2048?S(192|tt>>>6)+S(128|tt&63):S(224|tt>>>12&15)+S(128|tt>>>6&63)+S(128|tt&63)}else{var tt=65536+(ye.charCodeAt(0)-55296)*1024+(ye.charCodeAt(1)-56320);return S(240|tt>>>18&7)+S(128|tt>>>12&63)+S(128|tt>>>6&63)+S(128|tt&63)}},Ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,je=function(ye){return ye.replace(Ge,_)},A=function(ye){var tt=[0,2,1][ye.length%3],Z=ye.charCodeAt(0)<<16|(ye.length>1?ye.charCodeAt(1):0)<<8|(ye.length>2?ye.charCodeAt(2):0),Ne=[J.charAt(Z>>>18),J.charAt(Z>>>12&63),tt>=2?"=":J.charAt(Z>>>6&63),tt>=1?"=":J.charAt(Z&63)];return Ne.join("")},R=xe.btoa&&typeof xe.btoa=="function"?function(ye){return xe.btoa(ye)}:function(ye){if(ye.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ye.replace(/[\s\S]{1,3}/g,A)},Ke=function(ye){return R(je(String(ye)))},mt=function(ye){return ye.replace(/[+\/]/g,function(tt){return tt=="+"?"-":"_"}).replace(/=/g,"")},gt=function(ye,tt){return tt?mt(Ke(ye)):Ke(ye)},Qe=function(ye){return gt(ye,!0)},$e;xe.Uint8Array&&($e=function(ye,tt){for(var Z="",Ne=0,Ye=ye.length;Ne<Ye;Ne+=3){var F=ye[Ne],we=ye[Ne+1],me=ye[Ne+2],G=F<<16|we<<8|me;Z+=J.charAt(G>>>18)+J.charAt(G>>>12&63)+(typeof we!="undefined"?J.charAt(G>>>6&63):"=")+(typeof me!="undefined"?J.charAt(G&63):"=")}return tt?mt(Z):Z});var Nt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ce=function(ye){switch(ye.length){case 4:var tt=(7&ye.charCodeAt(0))<<18|(63&ye.charCodeAt(1))<<12|(63&ye.charCodeAt(2))<<6|63&ye.charCodeAt(3),Z=tt-65536;return S((Z>>>10)+55296)+S((Z&1023)+56320);case 3:return S((15&ye.charCodeAt(0))<<12|(63&ye.charCodeAt(1))<<6|63&ye.charCodeAt(2));default:return S((31&ye.charCodeAt(0))<<6|63&ye.charCodeAt(1))}},Se=function(ye){return ye.replace(Nt,Ce)},O=function(ye){var tt=ye.length,Z=tt%4,Ne=(tt>0?pe[ye.charAt(0)]<<18:0)|(tt>1?pe[ye.charAt(1)]<<12:0)|(tt>2?pe[ye.charAt(2)]<<6:0)|(tt>3?pe[ye.charAt(3)]:0),Ye=[S(Ne>>>16),S(Ne>>>8&255),S(Ne&255)];return Ye.length-=[0,0,2,1][Z],Ye.join("")},z=xe.atob&&typeof xe.atob=="function"?function(ye){return xe.atob(ye)}:function(ye){return ye.replace(/\S{1,4}/g,O)},Y=function(ye){return z(String(ye).replace(/[^A-Za-z0-9\+\/]/g,""))},te=function(ye){return Se(z(ye))},Ve=function(ye){return String(ye).replace(/[-_]/g,function(tt){return tt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},fe=function(ye){return te(Ve(ye))},ut;xe.Uint8Array&&(ut=function(ye){return Uint8Array.from(Y(Ve(ye)),function(tt){return tt.charCodeAt(0)})});var dt=function(){var ye=xe.Base64;return xe.Base64=ge,ye};if(xe.Base64={VERSION:H,atob:Y,btoa:R,fromBase64:fe,toBase64:gt,utob:je,encode:gt,encodeURI:Qe,btou:Se,decode:fe,noConflict:dt,fromUint8Array:$e,toUint8Array:ut},typeof Object.defineProperty=="function"){var ve=function(ye){return{value:ye,enumerable:!1,writable:!0,configurable:!0}};xe.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ve(function(){return fe(this)})),Object.defineProperty(String.prototype,"toBase64",ve(function(ye){return gt(this,ye)})),Object.defineProperty(String.prototype,"toBase64URI",ve(function(){return gt(this,!0)}))}}return xe.Meteor&&(Base64=xe.Base64),xr.exports?xr.exports.Base64=xe.Base64:(k=[],U=function(){return xe.Base64}.apply(xt,k),U!==void 0&&(xr.exports=U)),{Base64:xe.Base64}})},5630:function(xr,xt,x){"use strict";var k=x(60499),U=x(85899),xe=x(18642),ge=x(72190),H=x(42244),J=x(92310),pe=x.n(J),S=x(18929),_=x(59301),Ge=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],je=(0,_.forwardRef)(function(A,R){var Ke,mt=A.prefixCls,gt=mt===void 0?"rc-checkbox":mt,Qe=A.className,$e=A.style,Nt=A.checked,Ce=A.disabled,Se=A.defaultChecked,O=Se===void 0?!1:Se,z=A.type,Y=z===void 0?"checkbox":z,te=A.title,Ve=A.onChange,fe=(0,H.Z)(A,Ge),ut=(0,_.useRef)(null),dt=(0,S.Z)(O,{value:Nt}),ve=(0,ge.Z)(dt,2),ye=ve[0],tt=ve[1];(0,_.useImperativeHandle)(R,function(){return{focus:function(){var F;(F=ut.current)===null||F===void 0||F.focus()},blur:function(){var F;(F=ut.current)===null||F===void 0||F.blur()},input:ut.current}});var Z=pe()(gt,Qe,(Ke={},(0,xe.Z)(Ke,"".concat(gt,"-checked"),ye),(0,xe.Z)(Ke,"".concat(gt,"-disabled"),Ce),Ke)),Ne=function(F){Ce||("checked"in A||tt(F.target.checked),Ve==null||Ve({target:(0,U.Z)((0,U.Z)({},A),{},{type:Y,checked:F.target.checked}),stopPropagation:function(){F.stopPropagation()},preventDefault:function(){F.preventDefault()},nativeEvent:F.nativeEvent}))};return _.createElement("span",{className:Z,title:te,style:$e},_.createElement("input",(0,k.Z)({},fe,{className:"".concat(gt,"-input"),ref:ut,onChange:Ne,disabled:Ce,checked:!!ye,type:Y})),_.createElement("span",{className:"".concat(gt,"-inner")}))});xt.Z=je},31561:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return Y}});var k=x(60499),U=x(18642),xe=x(72190),ge=x(42244),H=x(35593),J=x(92310),pe=x.n(J),S=x(8654),_=x(59301),Ge=x(10228),je=x(16089),A=Ge.Z.ESC,R=Ge.Z.TAB;function Ke(te){var Ve=te.visible,fe=te.triggerRef,ut=te.onVisibleChange,dt=te.autoFocus,ve=te.overlayRef,ye=_.useRef(!1),tt=function(){if(Ve){var F,we;(F=fe.current)===null||F===void 0||(we=F.focus)===null||we===void 0||we.call(F),ut==null||ut(!1)}},Z=function(){var F;return(F=ve.current)!==null&&F!==void 0&&F.focus?(ve.current.focus(),ye.current=!0,!0):!1},Ne=function(F){switch(F.keyCode){case A:tt();break;case R:{var we=!1;ye.current||(we=Z()),we?F.preventDefault():tt();break}}};_.useEffect(function(){return Ve?(window.addEventListener("keydown",Ne),dt&&(0,je.Z)(Z,3),function(){window.removeEventListener("keydown",Ne),ye.current=!1}):function(){ye.current=!1}},[Ve])}var mt=(0,_.forwardRef)(function(te,Ve){var fe=te.overlay,ut=te.arrow,dt=te.prefixCls,ve=(0,_.useMemo)(function(){var tt;return typeof fe=="function"?tt=fe():tt=fe,tt},[fe]),ye=(0,S.sQ)(Ve,ve==null?void 0:ve.ref);return _.createElement(_.Fragment,null,ut&&_.createElement("div",{className:"".concat(dt,"-arrow")}),_.cloneElement(ve,{ref:(0,S.Yr)(ve)?ye:void 0}))}),gt=mt,Qe={adjustX:1,adjustY:1},$e=[0,0],Nt={topLeft:{points:["bl","tl"],overflow:Qe,offset:[0,-4],targetOffset:$e},top:{points:["bc","tc"],overflow:Qe,offset:[0,-4],targetOffset:$e},topRight:{points:["br","tr"],overflow:Qe,offset:[0,-4],targetOffset:$e},bottomLeft:{points:["tl","bl"],overflow:Qe,offset:[0,4],targetOffset:$e},bottom:{points:["tc","bc"],overflow:Qe,offset:[0,4],targetOffset:$e},bottomRight:{points:["tr","br"],overflow:Qe,offset:[0,4],targetOffset:$e}},Ce=Nt,Se=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function O(te,Ve){var fe,ut=te.arrow,dt=ut===void 0?!1:ut,ve=te.prefixCls,ye=ve===void 0?"rc-dropdown":ve,tt=te.transitionName,Z=te.animation,Ne=te.align,Ye=te.placement,F=Ye===void 0?"bottomLeft":Ye,we=te.placements,me=we===void 0?Ce:we,G=te.getPopupContainer,Fe=te.showAction,Ae=te.hideAction,Le=te.overlayClassName,ce=te.overlayStyle,ot=te.visible,ft=te.trigger,Ot=ft===void 0?["hover"]:ft,Kt=te.autoFocus,_t=te.overlay,er=te.children,Ft=te.onVisibleChange,rr=(0,ge.Z)(te,Se),Lt=_.useState(),oe=(0,xe.Z)(Lt,2),V=oe[0],K=oe[1],ue="visible"in te?ot:V,he=_.useRef(null),ze=_.useRef(null),re=_.useRef(null);_.useImperativeHandle(Ve,function(){return he.current});var ie=function(N){K(N),Ft==null||Ft(N)};Ke({visible:ue,triggerRef:re,onVisibleChange:ie,autoFocus:Kt,overlayRef:ze});var Xe=function(N){var q=te.onOverlayClick;K(!1),q&&q(N)},et=function(){return _.createElement(gt,{ref:ze,overlay:_t,prefixCls:ye,arrow:dt})},it=function(){return typeof _t=="function"?et:et()},Et=function(){var N=te.minOverlayWidthMatchTrigger,q=te.alignPoint;return"minOverlayWidthMatchTrigger"in te?N:!q},Bt=function(){var N=te.openClassName;return N!==void 0?N:"".concat(ye,"-open")},W=_.cloneElement(er,{className:pe()((fe=er.props)===null||fe===void 0?void 0:fe.className,ue&&Bt()),ref:(0,S.Yr)(er)?(0,S.sQ)(re,er.ref):void 0}),Mt=Ae;return!Mt&&Ot.indexOf("contextMenu")!==-1&&(Mt=["click"]),_.createElement(H.Z,(0,k.Z)({builtinPlacements:me},rr,{prefixCls:ye,ref:he,popupClassName:pe()(Le,(0,U.Z)({},"".concat(ye,"-show-arrow"),dt)),popupStyle:ce,action:Ot,showAction:Fe,hideAction:Mt,popupPlacement:F,popupAlign:Ne,popupTransitionName:tt,popupAnimation:Z,popupVisible:ue,stretch:Et()?"minWidth":"",popup:it(),onPopupVisibleChange:ie,onPopupClick:Xe,getPopupContainer:G}),W)}var z=_.forwardRef(O),Y=z},93681:function(xr,xt,x){"use strict";x.r(xt),x.d(xt,{BaseInput:function(){return Ge},default:function(){return Nt}});var k=x(60499),U=x(85899),xe=x(18642),ge=x(43749),H=x(92310),J=x.n(H),pe=x(59301),S=x(5643),_=function(Se){var O,z,Y=Se.inputElement,te=Se.prefixCls,Ve=Se.prefix,fe=Se.suffix,ut=Se.addonBefore,dt=Se.addonAfter,ve=Se.className,ye=Se.style,tt=Se.disabled,Z=Se.readOnly,Ne=Se.focused,Ye=Se.triggerFocus,F=Se.allowClear,we=Se.value,me=Se.handleReset,G=Se.hidden,Fe=Se.classes,Ae=Se.classNames,Le=Se.dataAttrs,ce=Se.styles,ot=Se.components,ft=(ot==null?void 0:ot.affixWrapper)||"span",Ot=(ot==null?void 0:ot.groupWrapper)||"span",Kt=(ot==null?void 0:ot.wrapper)||"span",_t=(ot==null?void 0:ot.groupAddon)||"span",er=(0,pe.useRef)(null),Ft=function(et){var it;(it=er.current)!==null&&it!==void 0&&it.contains(et.target)&&(Ye==null||Ye())},rr=function(){var et;if(!F)return null;var it=!tt&&!Z&&we,Et="".concat(te,"-clear-icon"),Bt=(0,ge.Z)(F)==="object"&&F!==null&&F!==void 0&&F.clearIcon?F.clearIcon:"\u2716";return pe.createElement("span",{onClick:me,onMouseDown:function(Mt){return Mt.preventDefault()},className:J()(Et,(et={},(0,xe.Z)(et,"".concat(Et,"-hidden"),!it),(0,xe.Z)(et,"".concat(Et,"-has-suffix"),!!fe),et)),role:"button",tabIndex:-1},Bt)},Lt=(0,pe.cloneElement)(Y,{value:we,hidden:G,className:J()((O=Y.props)===null||O===void 0?void 0:O.className,!(0,S.X3)(Se)&&!(0,S.He)(Se)&&ve)||null,style:(0,U.Z)((0,U.Z)({},(z=Y.props)===null||z===void 0?void 0:z.style),!(0,S.X3)(Se)&&!(0,S.He)(Se)?ye:{})});if((0,S.X3)(Se)){var oe,V="".concat(te,"-affix-wrapper"),K=J()(V,(oe={},(0,xe.Z)(oe,"".concat(V,"-disabled"),tt),(0,xe.Z)(oe,"".concat(V,"-focused"),Ne),(0,xe.Z)(oe,"".concat(V,"-readonly"),Z),(0,xe.Z)(oe,"".concat(V,"-input-with-clear-btn"),fe&&F&&we),oe),!(0,S.He)(Se)&&ve,Fe==null?void 0:Fe.affixWrapper,Ae==null?void 0:Ae.affixWrapper),ue=(fe||F)&&pe.createElement("span",{className:J()("".concat(te,"-suffix"),Ae==null?void 0:Ae.suffix),style:ce==null?void 0:ce.suffix},rr(),fe);Lt=pe.createElement(ft,(0,k.Z)({className:K,style:(0,U.Z)((0,U.Z)({},(0,S.He)(Se)?void 0:ye),ce==null?void 0:ce.affixWrapper),hidden:!(0,S.He)(Se)&&G,onClick:Ft},Le==null?void 0:Le.affixWrapper,{ref:er}),Ve&&pe.createElement("span",{className:J()("".concat(te,"-prefix"),Ae==null?void 0:Ae.prefix),style:ce==null?void 0:ce.prefix},Ve),(0,pe.cloneElement)(Y,{value:we,hidden:null}),ue)}if((0,S.He)(Se)){var he="".concat(te,"-group"),ze="".concat(he,"-addon"),re=J()("".concat(te,"-wrapper"),he,Fe==null?void 0:Fe.wrapper),ie=J()("".concat(te,"-group-wrapper"),ve,Fe==null?void 0:Fe.group);return pe.createElement(Ot,{className:ie,style:ye,hidden:G},pe.createElement(Kt,{className:re},ut&&pe.createElement(_t,{className:ze},ut),(0,pe.cloneElement)(Lt,{hidden:null}),dt&&pe.createElement(_t,{className:ze},dt)))}return Lt},Ge=_,je=x(77654),A=x(72190),R=x(42244),Ke=x(18929),mt=x(2738),gt=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],Qe=(0,pe.forwardRef)(function(Ce,Se){var O=Ce.autoComplete,z=Ce.onChange,Y=Ce.onFocus,te=Ce.onBlur,Ve=Ce.onPressEnter,fe=Ce.onKeyDown,ut=Ce.prefixCls,dt=ut===void 0?"rc-input":ut,ve=Ce.disabled,ye=Ce.htmlSize,tt=Ce.className,Z=Ce.maxLength,Ne=Ce.suffix,Ye=Ce.showCount,F=Ce.type,we=F===void 0?"text":F,me=Ce.classes,G=Ce.classNames,Fe=Ce.styles,Ae=(0,R.Z)(Ce,gt),Le=(0,Ke.Z)(Ce.defaultValue,{value:Ce.value}),ce=(0,A.Z)(Le,2),ot=ce[0],ft=ce[1],Ot=(0,pe.useState)(!1),Kt=(0,A.Z)(Ot,2),_t=Kt[0],er=Kt[1],Ft=(0,pe.useRef)(null),rr=function(ie){Ft.current&&(0,S.nH)(Ft.current,ie)};(0,pe.useImperativeHandle)(Se,function(){return{focus:rr,blur:function(){var ie;(ie=Ft.current)===null||ie===void 0||ie.blur()},setSelectionRange:function(ie,Xe,et){var it;(it=Ft.current)===null||it===void 0||it.setSelectionRange(ie,Xe,et)},select:function(){var ie;(ie=Ft.current)===null||ie===void 0||ie.select()},input:Ft.current}}),(0,pe.useEffect)(function(){er(function(re){return re&&ve?!1:re})},[ve]);var Lt=function(ie){Ce.value===void 0&&ft(ie.target.value),Ft.current&&(0,S.rJ)(Ft.current,ie,z)},oe=function(ie){Ve&&ie.key==="Enter"&&Ve(ie),fe==null||fe(ie)},V=function(ie){er(!0),Y==null||Y(ie)},K=function(ie){er(!1),te==null||te(ie)},ue=function(ie){ft(""),rr(),Ft.current&&(0,S.rJ)(Ft.current,ie,z)},he=function(){var ie=(0,mt.Z)(Ce,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return pe.createElement("input",(0,k.Z)({autoComplete:O},ie,{onChange:Lt,onFocus:V,onBlur:K,onKeyDown:oe,className:J()(dt,(0,xe.Z)({},"".concat(dt,"-disabled"),ve),G==null?void 0:G.input),style:Fe==null?void 0:Fe.input,ref:Ft,size:ye,type:we}))},ze=function(){var ie=Number(Z)>0;if(Ne||Ye){var Xe=(0,S.D7)(ot),et=(0,je.Z)(Xe).length,it=(0,ge.Z)(Ye)==="object"?Ye.formatter({value:Xe,count:et,maxLength:Z}):"".concat(et).concat(ie?" / ".concat(Z):"");return pe.createElement(pe.Fragment,null,!!Ye&&pe.createElement("span",{className:J()("".concat(dt,"-show-count-suffix"),(0,xe.Z)({},"".concat(dt,"-show-count-has-suffix"),!!Ne),G==null?void 0:G.count),style:(0,U.Z)({},Fe==null?void 0:Fe.count)},it),Ne)}return null};return pe.createElement(Ge,(0,k.Z)({},Ae,{prefixCls:dt,className:tt,inputElement:he(),handleReset:ue,value:(0,S.D7)(ot),focused:_t,triggerFocus:rr,suffix:ze(),disabled:ve,classes:me,classNames:G,styles:Fe}))}),$e=Qe,Nt=$e},5643:function(xr,xt,x){"use strict";x.d(xt,{D7:function(){return H},He:function(){return k},X3:function(){return U},nH:function(){return ge},rJ:function(){return xe}});function k(J){return!!(J.addonBefore||J.addonAfter)}function U(J){return!!(J.prefix||J.suffix||J.allowClear)}function xe(J,pe,S,_){if(S){var Ge=pe;if(pe.type==="click"){var je=J.cloneNode(!0);Ge=Object.create(pe,{target:{value:je},currentTarget:{value:je}}),je.value="",S(Ge);return}if(_!==void 0){Ge=Object.create(pe,{target:{value:J},currentTarget:{value:J}}),J.value=_,S(Ge);return}S(Ge)}}function ge(J,pe){if(J){J.focus(pe);var S=pe||{},_=S.cursor;if(_){var Ge=J.value.length;switch(_){case"start":J.setSelectionRange(0,0);break;case"end":J.setSelectionRange(Ge,Ge);break;default:J.setSelectionRange(0,Ge)}}}}function H(J){return typeof J=="undefined"||J===null?"":String(J)}},15285:function(xr,xt,x){"use strict";x.d(xt,{iz:function(){return $t},ck:function(){return Er},BW:function(){return jt},sN:function(){return Er},Wd:function(){return He},ZP:function(){return Vr},Xl:function(){return fe}});var k=x(60499),U=x(18642),xe=x(85899),ge=x(77654),H=x(72190),J=x(42244),pe=x(92310),S=x.n(pe),_=x(83836),Ge=x(18929),je=x(13697),A=x(48736),R=x(59301),Ke=x(4676),mt=R.createContext(null);function gt(le,X){return le===void 0?null:"".concat(le,"-").concat(X)}function Qe(le){var X=R.useContext(mt);return gt(X,le)}var $e=x(80547),Nt=["children","locked"],Ce=R.createContext(null);function Se(le,X){var be=(0,xe.Z)({},le);return Object.keys(X).forEach(function(ke){var j=X[ke];j!==void 0&&(be[ke]=j)}),be}function O(le){var X=le.children,be=le.locked,ke=(0,J.Z)(le,Nt),j=R.useContext(Ce),ne=(0,$e.Z)(function(){return Se(j,ke)},[j,ke],function(ae,Be){return!be&&(ae[0]!==Be[0]||!(0,je.Z)(ae[1],Be[1],!0))});return R.createElement(Ce.Provider,{value:ne},X)}var z=[],Y=R.createContext(null);function te(){return R.useContext(Y)}var Ve=R.createContext(z);function fe(le){var X=R.useContext(Ve);return R.useMemo(function(){return le!==void 0?[].concat((0,ge.Z)(X),[le]):X},[X,le])}var ut=R.createContext(null),dt=R.createContext({}),ve=dt,ye=x(29194);function tt(le){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,ye.Z)(le)){var be=le.nodeName.toLowerCase(),ke=["input","select","textarea","button"].includes(be)||le.isContentEditable||be==="a"&&!!le.getAttribute("href"),j=le.getAttribute("tabindex"),ne=Number(j),ae=null;return j&&!Number.isNaN(ne)?ae=ne:ke&&ae===null&&(ae=0),ke&&le.disabled&&(ae=null),ae!==null&&(ae>=0||X&&ae<0)}return!1}function Z(le){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=(0,ge.Z)(le.querySelectorAll("*")).filter(function(ke){return tt(ke,X)});return tt(le,X)&&be.unshift(le),be}var Ne=null;function Ye(){Ne=document.activeElement}function F(){Ne=null}function we(){if(Ne)try{Ne.focus()}catch(le){}}function me(le,X){if(X.keyCode===9){var be=Z(le),ke=be[X.shiftKey?0:be.length-1],j=ke===document.activeElement||le===document.activeElement;if(j){var ne=be[X.shiftKey?be.length-1:0];ne.focus(),X.preventDefault()}}}var G=x(10228),Fe=x(16089),Ae=G.Z.LEFT,Le=G.Z.RIGHT,ce=G.Z.UP,ot=G.Z.DOWN,ft=G.Z.ENTER,Ot=G.Z.ESC,Kt=G.Z.HOME,_t=G.Z.END,er=[ce,ot,Ae,Le];function Ft(le,X,be,ke){var j,ne,ae,Be,lt="prev",ct="next",Vt="children",sr="parent";if(le==="inline"&&ke===ft)return{inlineTrigger:!0};var mr=(j={},(0,U.Z)(j,ce,lt),(0,U.Z)(j,ot,ct),j),gr=(ne={},(0,U.Z)(ne,Ae,be?ct:lt),(0,U.Z)(ne,Le,be?lt:ct),(0,U.Z)(ne,ot,Vt),(0,U.Z)(ne,ft,Vt),ne),tr=(ae={},(0,U.Z)(ae,ce,lt),(0,U.Z)(ae,ot,ct),(0,U.Z)(ae,ft,Vt),(0,U.Z)(ae,Ot,sr),(0,U.Z)(ae,Ae,be?Vt:sr),(0,U.Z)(ae,Le,be?sr:Vt),ae),Lr={inline:mr,horizontal:gr,vertical:tr,inlineSub:mr,horizontalSub:tr,verticalSub:tr},$r=(Be=Lr["".concat(le).concat(X?"":"Sub")])===null||Be===void 0?void 0:Be[ke];switch($r){case lt:return{offset:-1,sibling:!0};case ct:return{offset:1,sibling:!0};case sr:return{offset:-1,sibling:!1};case Vt:return{offset:1,sibling:!1};default:return null}}function rr(le){for(var X=le;X;){if(X.getAttribute("data-menu-list"))return X;X=X.parentElement}return null}function Lt(le,X){for(var be=le||document.activeElement;be;){if(X.has(be))return be;be=be.parentElement}return null}function oe(le,X){var be=Z(le,!0);return be.filter(function(ke){return X.has(ke)})}function V(le,X,be){var ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!le)return null;var j=oe(le,X),ne=j.length,ae=j.findIndex(function(Be){return be===Be});return ke<0?ae===-1?ae=ne-1:ae-=1:ke>0&&(ae+=1),ae=(ae+ne)%ne,j[ae]}var K=function(X,be){var ke=new Set,j=new Map,ne=new Map;return X.forEach(function(ae){var Be=document.querySelector("[data-menu-id='".concat(gt(be,ae),"']"));Be&&(ke.add(Be),ne.set(Be,ae),j.set(ae,Be))}),{elements:ke,key2element:j,element2key:ne}};function ue(le,X,be,ke,j,ne,ae,Be,lt,ct){var Vt=R.useRef(),sr=R.useRef();sr.current=X;var mr=function(){Fe.Z.cancel(Vt.current)};return R.useEffect(function(){return function(){mr()}},[]),function(gr){var tr=gr.which;if([].concat(er,[ft,Ot,Kt,_t]).includes(tr)){var Lr=ne(),$r=K(Lr,ke),Jt=$r,Yt=Jt.elements,ir=Jt.key2element,Ut=Jt.element2key,Qt=ir.get(X),dr=Lt(Qt,Yt),Br=Ut.get(dr),kr=Ft(le,ae(Br,!0).length===1,be,tr);if(!kr&&tr!==Kt&&tr!==_t)return;(er.includes(tr)||[Kt,_t].includes(tr))&&gr.preventDefault();var At=function(Tr){if(Tr){var Tn=Tr,ri=Tr.querySelector("a");ri!=null&&ri.getAttribute("href")&&(Tn=ri);var mn=Ut.get(Tr);Be(mn),mr(),Vt.current=(0,Fe.Z)(function(){sr.current===mn&&Tn.focus()})}};if([Kt,_t].includes(tr)||kr.sibling||!dr){var ht;!dr||le==="inline"?ht=j.current:ht=rr(dr);var ar,zt=oe(ht,Yt);tr===Kt?ar=zt[0]:tr===_t?ar=zt[zt.length-1]:ar=V(ht,Yt,dr,kr.offset),At(ar)}else if(kr.inlineTrigger)lt(Br);else if(kr.offset>0)lt(Br,!0),mr(),Vt.current=(0,Fe.Z)(function(){$r=K(Lr,ke);var rn=dr.getAttribute("aria-controls"),Tr=document.getElementById(rn),Tn=V(Tr,$r.elements);At(Tn)},5);else if(kr.offset<0){var yr=ae(Br,!0),dn=yr[yr.length-2],ur=ir.get(dn);lt(dn,!1),At(ur)}}ct==null||ct(gr)}}function he(le){Promise.resolve().then(le)}var ze="__RC_UTIL_PATH_SPLIT__",re=function(X){return X.join(ze)},ie=function(X){return X.split(ze)},Xe="rc-menu-more";function et(){var le=R.useState({}),X=(0,H.Z)(le,2),be=X[1],ke=(0,R.useRef)(new Map),j=(0,R.useRef)(new Map),ne=R.useState([]),ae=(0,H.Z)(ne,2),Be=ae[0],lt=ae[1],ct=(0,R.useRef)(0),Vt=(0,R.useRef)(!1),sr=function(){Vt.current||be({})},mr=(0,R.useCallback)(function(ir,Ut){var Qt=re(Ut);j.current.set(Qt,ir),ke.current.set(ir,Qt),ct.current+=1;var dr=ct.current;he(function(){dr===ct.current&&sr()})},[]),gr=(0,R.useCallback)(function(ir,Ut){var Qt=re(Ut);j.current.delete(Qt),ke.current.delete(ir)},[]),tr=(0,R.useCallback)(function(ir){lt(ir)},[]),Lr=(0,R.useCallback)(function(ir,Ut){var Qt=ke.current.get(ir)||"",dr=ie(Qt);return Ut&&Be.includes(dr[0])&&dr.unshift(Xe),dr},[Be]),$r=(0,R.useCallback)(function(ir,Ut){return ir.some(function(Qt){var dr=Lr(Qt,!0);return dr.includes(Ut)})},[Lr]),Jt=function(){var Ut=(0,ge.Z)(ke.current.keys());return Be.length&&Ut.push(Xe),Ut},Yt=(0,R.useCallback)(function(ir){var Ut="".concat(ke.current.get(ir)).concat(ze),Qt=new Set;return(0,ge.Z)(j.current.keys()).forEach(function(dr){dr.startsWith(Ut)&&Qt.add(j.current.get(dr))}),Qt},[]);return R.useEffect(function(){return function(){Vt.current=!0}},[]),{registerPath:mr,unregisterPath:gr,refreshOverflowKeys:tr,isSubPathKey:$r,getKeyPath:Lr,getKeys:Jt,getSubPathKeys:Yt}}function it(le){var X=R.useRef(le);X.current=le;var be=R.useCallback(function(){for(var ke,j=arguments.length,ne=new Array(j),ae=0;ae<j;ae++)ne[ae]=arguments[ae];return(ke=X.current)===null||ke===void 0?void 0:ke.call.apply(ke,[X].concat(ne))},[]);return le?be:void 0}var Et=Math.random().toFixed(5).toString().slice(2),Bt=0;function W(le){var X=(0,Ge.Z)(le,{value:le}),be=(0,H.Z)(X,2),ke=be[0],j=be[1];return R.useEffect(function(){Bt+=1;var ne="".concat(Et,"-").concat(Bt);j("rc-menu-uuid-".concat(ne))},[]),ke}var Mt=x(38705),vt=x(17212),N=x(39153),q=x(55401),de=x(2738),at=x(8654);function Oe(le,X,be,ke){var j=R.useContext(Ce),ne=j.activeKey,ae=j.onActive,Be=j.onInactive,lt={active:ne===le};return X||(lt.onMouseEnter=function(ct){be==null||be({key:le,domEvent:ct}),ae(le)},lt.onMouseLeave=function(ct){ke==null||ke({key:le,domEvent:ct}),Be(le)}),lt}function Ee(le){var X=R.useContext(Ce),be=X.mode,ke=X.rtl,j=X.inlineIndent;if(be!=="inline")return null;var ne=le;return ke?{paddingRight:ne*j}:{paddingLeft:ne*j}}function or(le){var X=le.icon,be=le.props,ke=le.children,j;return X===null||X===!1?null:(typeof X=="function"?j=R.createElement(X,(0,xe.Z)({},be)):typeof X!="boolean"&&(j=X),j||ke||null)}var Ht=["item"];function Wt(le){var X=le.item,be=(0,J.Z)(le,Ht);return Object.defineProperty(be,"item",{get:function(){return(0,A.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),X}}),be}var Gt=["title","attribute","elementRef"],nr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Ct=["active"],wr=function(le){(0,N.Z)(be,le);var X=(0,q.Z)(be);function be(){return(0,Mt.Z)(this,be),X.apply(this,arguments)}return(0,vt.Z)(be,[{key:"render",value:function(){var j=this.props,ne=j.title,ae=j.attribute,Be=j.elementRef,lt=(0,J.Z)(j,Gt),ct=(0,de.Z)(lt,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,A.ZP)(!ae,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),R.createElement(_.Z.Item,(0,k.Z)({},ae,{title:typeof ne=="string"?ne:void 0},ct,{ref:Be}))}}]),be}(R.Component),hr=R.forwardRef(function(le,X){var be,ke=le.style,j=le.className,ne=le.eventKey,ae=le.warnKey,Be=le.disabled,lt=le.itemIcon,ct=le.children,Vt=le.role,sr=le.onMouseEnter,mr=le.onMouseLeave,gr=le.onClick,tr=le.onKeyDown,Lr=le.onFocus,$r=(0,J.Z)(le,nr),Jt=Qe(ne),Yt=R.useContext(Ce),ir=Yt.prefixCls,Ut=Yt.onItemClick,Qt=Yt.disabled,dr=Yt.overflowDisabled,Br=Yt.itemIcon,kr=Yt.selectedKeys,At=Yt.onActive,ht=R.useContext(ve),ar=ht._internalRenderMenuItem,zt="".concat(ir,"-item"),yr=R.useRef(),dn=R.useRef(),ur=Qt||Be,rn=(0,at.x1)(X,dn),Tr=fe(ne),Tn=function(_n){return{key:ne,keyPath:(0,ge.Z)(Tr).reverse(),item:yr.current,domEvent:_n}},ri=lt||Br,mn=Oe(ne,ur,sr,mr),Jn=mn.active,En=(0,J.Z)(mn,Ct),ni=kr.includes(ne),gn=Ee(Tr.length),mi=function(_n){if(!ur){var ci=Tn(_n);gr==null||gr(Wt(ci)),Ut(ci)}},Pr=function(_n){if(tr==null||tr(_n),_n.which===G.Z.ENTER){var ci=Tn(_n);gr==null||gr(Wt(ci)),Ut(ci)}},Pn=function(_n){At(ne),Lr==null||Lr(_n)},Sn={};le.role==="option"&&(Sn["aria-selected"]=ni);var zn=R.createElement(wr,(0,k.Z)({ref:yr,elementRef:rn,role:Vt===null?"none":Vt||"menuitem",tabIndex:Be?null:-1,"data-menu-id":dr&&Jt?null:Jt},$r,En,Sn,{component:"li","aria-disabled":Be,style:(0,xe.Z)((0,xe.Z)({},gn),ke),className:S()(zt,(be={},(0,U.Z)(be,"".concat(zt,"-active"),Jn),(0,U.Z)(be,"".concat(zt,"-selected"),ni),(0,U.Z)(be,"".concat(zt,"-disabled"),ur),be),j),onClick:mi,onKeyDown:Pr,onFocus:Pn}),ct,R.createElement(or,{props:(0,xe.Z)((0,xe.Z)({},le),{},{isSelected:ni}),icon:ri}));return ar&&(zn=ar(zn,le,{selected:ni})),zn});function Ur(le,X){var be=le.eventKey,ke=te(),j=fe(be);return R.useEffect(function(){if(ke)return ke.registerPath(be,j),function(){ke.unregisterPath(be,j)}},[j]),ke?null:R.createElement(hr,(0,k.Z)({},le,{ref:X}))}var Er=R.forwardRef(Ur),cr=["className","children"],nn=function(X,be){var ke=X.className,j=X.children,ne=(0,J.Z)(X,cr),ae=R.useContext(Ce),Be=ae.prefixCls,lt=ae.mode,ct=ae.rtl;return R.createElement("ul",(0,k.Z)({className:S()(Be,ct&&"".concat(Be,"-rtl"),"".concat(Be,"-sub"),"".concat(Be,"-").concat(lt==="inline"?"inline":"vertical"),ke),role:"menu"},ne,{"data-menu-list":!0,ref:be}),j)},Zt=R.forwardRef(nn);Zt.displayName="SubMenuList";var sn=Zt,qr=x(11592);function un(le,X){return(0,qr.Z)(le).map(function(be,ke){if(R.isValidElement(be)){var j,ne,ae=be.key,Be=(j=(ne=be.props)===null||ne===void 0?void 0:ne.eventKey)!==null&&j!==void 0?j:ae,lt=Be==null;lt&&(Be="tmp_key-".concat([].concat((0,ge.Z)(X),[ke]).join("-")));var ct={key:Be,eventKey:Be};return R.cloneElement(be,ct)}return be})}var Jr=x(35593),Sr={adjustX:1,adjustY:1},Gr={topLeft:{points:["bl","tl"],overflow:Sr},topRight:{points:["br","tr"],overflow:Sr},bottomLeft:{points:["tl","bl"],overflow:Sr},bottomRight:{points:["tr","br"],overflow:Sr},leftTop:{points:["tr","tl"],overflow:Sr},leftBottom:{points:["br","bl"],overflow:Sr},rightTop:{points:["tl","tr"],overflow:Sr},rightBottom:{points:["bl","br"],overflow:Sr}},Nr={topLeft:{points:["bl","tl"],overflow:Sr},topRight:{points:["br","tr"],overflow:Sr},bottomLeft:{points:["tl","bl"],overflow:Sr},bottomRight:{points:["tr","br"],overflow:Sr},rightTop:{points:["tr","tl"],overflow:Sr},rightBottom:{points:["br","bl"],overflow:Sr},leftTop:{points:["tl","tr"],overflow:Sr},leftBottom:{points:["bl","br"],overflow:Sr}},Bn=null;function $n(le,X,be){if(X)return X;if(be)return be[le]||be.other}var wn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Xn(le){var X=le.prefixCls,be=le.visible,ke=le.children,j=le.popup,ne=le.popupStyle,ae=le.popupClassName,Be=le.popupOffset,lt=le.disabled,ct=le.mode,Vt=le.onVisibleChange,sr=R.useContext(Ce),mr=sr.getPopupContainer,gr=sr.rtl,tr=sr.subMenuOpenDelay,Lr=sr.subMenuCloseDelay,$r=sr.builtinPlacements,Jt=sr.triggerSubMenuAction,Yt=sr.forceSubMenuRender,ir=sr.rootClassName,Ut=sr.motion,Qt=sr.defaultMotions,dr=R.useState(!1),Br=(0,H.Z)(dr,2),kr=Br[0],At=Br[1],ht=gr?(0,xe.Z)((0,xe.Z)({},Nr),$r):(0,xe.Z)((0,xe.Z)({},Gr),$r),ar=wn[ct],zt=$n(ct,Ut,Qt),yr=R.useRef(zt);ct!=="inline"&&(yr.current=zt);var dn=(0,xe.Z)((0,xe.Z)({},yr.current),{},{leavedClassName:"".concat(X,"-hidden"),removeOnLeave:!1,motionAppear:!0}),ur=R.useRef();return R.useEffect(function(){return ur.current=(0,Fe.Z)(function(){At(be)}),function(){Fe.Z.cancel(ur.current)}},[be]),R.createElement(Jr.Z,{prefixCls:X,popupClassName:S()("".concat(X,"-popup"),(0,U.Z)({},"".concat(X,"-rtl"),gr),ae,ir),stretch:ct==="horizontal"?"minWidth":null,getPopupContainer:mr,builtinPlacements:ht,popupPlacement:ar,popupVisible:kr,popup:j,popupStyle:ne,popupAlign:Be&&{offset:Be},action:lt?[]:[Jt],mouseEnterDelay:tr,mouseLeaveDelay:Lr,onPopupVisibleChange:Vt,forceRender:Yt,popupMotion:dn,fresh:!0},ke)}var C=x(77900);function L(le){var X=le.id,be=le.open,ke=le.keyPath,j=le.children,ne="inline",ae=R.useContext(Ce),Be=ae.prefixCls,lt=ae.forceSubMenuRender,ct=ae.motion,Vt=ae.defaultMotions,sr=ae.mode,mr=R.useRef(!1);mr.current=sr===ne;var gr=R.useState(!mr.current),tr=(0,H.Z)(gr,2),Lr=tr[0],$r=tr[1],Jt=mr.current?be:!1;R.useEffect(function(){mr.current&&$r(!1)},[sr]);var Yt=(0,xe.Z)({},$n(ne,ct,Vt));ke.length>1&&(Yt.motionAppear=!1);var ir=Yt.onVisibleChanged;return Yt.onVisibleChanged=function(Ut){return!mr.current&&!Ut&&$r(!0),ir==null?void 0:ir(Ut)},Lr?null:R.createElement(O,{mode:ne,locked:!mr.current},R.createElement(C.default,(0,k.Z)({visible:Jt},Yt,{forceRender:lt,removeOnLeave:!1,leavedClassName:"".concat(Be,"-hidden")}),function(Ut){var Qt=Ut.className,dr=Ut.style;return R.createElement(sn,{id:X,className:Qt,style:dr},j)}))}var Ie=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Pe=["active"],Re=function(X){var be,ke=X.style,j=X.className,ne=X.title,ae=X.eventKey,Be=X.warnKey,lt=X.disabled,ct=X.internalPopupClose,Vt=X.children,sr=X.itemIcon,mr=X.expandIcon,gr=X.popupClassName,tr=X.popupOffset,Lr=X.popupStyle,$r=X.onClick,Jt=X.onMouseEnter,Yt=X.onMouseLeave,ir=X.onTitleClick,Ut=X.onTitleMouseEnter,Qt=X.onTitleMouseLeave,dr=(0,J.Z)(X,Ie),Br=Qe(ae),kr=R.useContext(Ce),At=kr.prefixCls,ht=kr.mode,ar=kr.openKeys,zt=kr.disabled,yr=kr.overflowDisabled,dn=kr.activeKey,ur=kr.selectedKeys,rn=kr.itemIcon,Tr=kr.expandIcon,Tn=kr.onItemClick,ri=kr.onOpenChange,mn=kr.onActive,Jn=R.useContext(ve),En=Jn._internalRenderSubMenuItem,ni=R.useContext(ut),gn=ni.isSubPathKey,mi=fe(),Pr="".concat(At,"-submenu"),Pn=zt||lt,Sn=R.useRef(),zn=R.useRef(),gi=sr!=null?sr:rn,_n=mr!=null?mr:Tr,ci=ar.includes(ae),Yn=!yr&&ci,Pi=gn(ur,ae),Kn=Oe(ae,Pn,Ut,Qt),vi=Kn.active,Zi=(0,J.Z)(Kn,Pe),_i=R.useState(!1),Mi=(0,H.Z)(_i,2),ji=Mi[0],Ri=Mi[1],ui=function(Hn){Pn||Ri(Hn)},fn=function(Hn){ui(!0),Jt==null||Jt({key:ae,domEvent:Hn})},xa=function(Hn){ui(!1),Yt==null||Yt({key:ae,domEvent:Hn})},Ci=R.useMemo(function(){return vi||(ht!=="inline"?ji||gn([dn],ae):!1)},[ht,vi,dn,ji,ae,gn]),Oi=Ee(mi.length),bi=function(Hn){Pn||(ir==null||ir({key:ae,domEvent:Hn}),ht==="inline"&&ri(ae,!ci))},Ui=it(function(Rn){$r==null||$r(Wt(Rn)),Tn(Rn)}),Ei=function(Hn){ht!=="inline"&&ri(ae,Hn)},Gi=function(){mn(ae)},Ni=Br&&"".concat(Br,"-popup"),Fi=R.createElement("div",(0,k.Z)({role:"menuitem",style:Oi,className:"".concat(Pr,"-title"),tabIndex:Pn?null:-1,ref:Sn,title:typeof ne=="string"?ne:null,"data-menu-id":yr&&Br?null:Br,"aria-expanded":Yn,"aria-haspopup":!0,"aria-controls":Ni,"aria-disabled":Pn,onClick:bi,onFocus:Gi},Zi),ne,R.createElement(or,{icon:ht!=="horizontal"?_n:void 0,props:(0,xe.Z)((0,xe.Z)({},X),{},{isOpen:Yn,isSubMenu:!0})},R.createElement("i",{className:"".concat(Pr,"-arrow")}))),kn=R.useRef(ht);if(ht!=="inline"&&mi.length>1?kn.current="vertical":kn.current=ht,!yr){var di=kn.current;Fi=R.createElement(Xn,{mode:di,prefixCls:Pr,visible:!ct&&Yn&&ht!=="inline",popupClassName:gr,popupOffset:tr,popupStyle:Lr,popup:R.createElement(O,{mode:di==="horizontal"?"vertical":di},R.createElement(sn,{id:Ni,ref:zn},Vt)),disabled:Pn,onVisibleChange:Ei},Fi)}var fi=R.createElement(_.Z.Item,(0,k.Z)({role:"none"},dr,{component:"li",style:ke,className:S()(Pr,"".concat(Pr,"-").concat(ht),j,(be={},(0,U.Z)(be,"".concat(Pr,"-open"),Yn),(0,U.Z)(be,"".concat(Pr,"-active"),Ci),(0,U.Z)(be,"".concat(Pr,"-selected"),Pi),(0,U.Z)(be,"".concat(Pr,"-disabled"),Pn),be)),onMouseEnter:fn,onMouseLeave:xa}),Fi,!yr&&R.createElement(L,{id:Ni,open:Yn,keyPath:mi},Vt));return En&&(fi=En(fi,X,{selected:Pi,active:Ci,open:Yn,disabled:Pn})),R.createElement(O,{onItemClick:Ui,mode:ht==="horizontal"?"vertical":ht,itemIcon:gi,expandIcon:_n},fi)};function He(le){var X=le.eventKey,be=le.children,ke=fe(X),j=un(be,ke),ne=te();R.useEffect(function(){if(ne)return ne.registerPath(X,ke),function(){ne.unregisterPath(X,ke)}},[ke]);var ae;return ne?ae=j:ae=R.createElement(Re,le,j),R.createElement(Ve.Provider,{value:ke},ae)}var bt=x(43749),st=["className","title","eventKey","children"],St=["children"],qt=function(X){var be=X.className,ke=X.title,j=X.eventKey,ne=X.children,ae=(0,J.Z)(X,st),Be=R.useContext(Ce),lt=Be.prefixCls,ct="".concat(lt,"-item-group");return R.createElement("li",(0,k.Z)({role:"presentation"},ae,{onClick:function(sr){return sr.stopPropagation()},className:S()(ct,be)}),R.createElement("div",{role:"presentation",className:"".concat(ct,"-title"),title:typeof ke=="string"?ke:void 0},ke),R.createElement("ul",{role:"group",className:"".concat(ct,"-list")},ne))};function jt(le){var X=le.children,be=(0,J.Z)(le,St),ke=fe(be.eventKey),j=un(X,ke),ne=te();return ne?j:R.createElement(qt,(0,de.Z)(be,["warnKey"]),j)}function $t(le){var X=le.className,be=le.style,ke=R.useContext(Ce),j=ke.prefixCls,ne=te();return ne?null:R.createElement("li",{role:"separator",className:S()("".concat(j,"-item-divider"),X),style:be})}var Tt=["label","children","key","type"];function Xt(le){return(le||[]).map(function(X,be){if(X&&(0,bt.Z)(X)==="object"){var ke=X,j=ke.label,ne=ke.children,ae=ke.key,Be=ke.type,lt=(0,J.Z)(ke,Tt),ct=ae!=null?ae:"tmp-".concat(be);return ne||Be==="group"?Be==="group"?R.createElement(jt,(0,k.Z)({key:ct},lt,{title:j}),Xt(ne)):R.createElement(He,(0,k.Z)({key:ct},lt,{title:j}),Xt(ne)):Be==="divider"?R.createElement($t,(0,k.Z)({key:ct},lt)):R.createElement(Er,(0,k.Z)({key:ct},lt),j)}return null}).filter(function(X){return X})}function Me(le,X,be){var ke=le;return X&&(ke=Xt(X)),un(ke,be)}var Fr=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],Ir=[],fr=R.forwardRef(function(le,X){var be,ke,j=le,ne=j.prefixCls,ae=ne===void 0?"rc-menu":ne,Be=j.rootClassName,lt=j.style,ct=j.className,Vt=j.tabIndex,sr=Vt===void 0?0:Vt,mr=j.items,gr=j.children,tr=j.direction,Lr=j.id,$r=j.mode,Jt=$r===void 0?"vertical":$r,Yt=j.inlineCollapsed,ir=j.disabled,Ut=j.disabledOverflow,Qt=j.subMenuOpenDelay,dr=Qt===void 0?.1:Qt,Br=j.subMenuCloseDelay,kr=Br===void 0?.1:Br,At=j.forceSubMenuRender,ht=j.defaultOpenKeys,ar=j.openKeys,zt=j.activeKey,yr=j.defaultActiveFirst,dn=j.selectable,ur=dn===void 0?!0:dn,rn=j.multiple,Tr=rn===void 0?!1:rn,Tn=j.defaultSelectedKeys,ri=j.selectedKeys,mn=j.onSelect,Jn=j.onDeselect,En=j.inlineIndent,ni=En===void 0?24:En,gn=j.motion,mi=j.defaultMotions,Pr=j.triggerSubMenuAction,Pn=Pr===void 0?"hover":Pr,Sn=j.builtinPlacements,zn=j.itemIcon,gi=j.expandIcon,_n=j.overflowedIndicator,ci=_n===void 0?"...":_n,Yn=j.overflowedIndicatorPopupClassName,Pi=j.getPopupContainer,Kn=j.onClick,vi=j.onOpenChange,Zi=j.onKeyDown,_i=j.openAnimation,Mi=j.openTransitionName,ji=j._internalRenderMenuItem,Ri=j._internalRenderSubMenuItem,ui=(0,J.Z)(j,Fr),fn=R.useMemo(function(){return Me(gr,mr,Ir)},[gr,mr]),xa=R.useState(!1),Ci=(0,H.Z)(xa,2),Oi=Ci[0],bi=Ci[1],Ui=R.useRef(),Ei=W(Lr),Gi=tr==="rtl",Ni=(0,Ge.Z)(ht,{value:ar,postState:function(Zr){return Zr||Ir}}),Fi=(0,H.Z)(Ni,2),kn=Fi[0],di=Fi[1],fi=function(Zr){var Yr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ai(){di(Zr),vi==null||vi(Zr)}Yr?(0,Ke.flushSync)(ai):ai()},Rn=R.useState(kn),Hn=(0,H.Z)(Rn,2),zi=Hn[0],zr=Hn[1],Mr=R.useRef(!1),hn=R.useMemo(function(){return(Jt==="inline"||Jt==="vertical")&&Yt?["vertical",Yt]:[Jt,!1]},[Jt,Yt]),Dn=(0,H.Z)(hn,2),ii=Dn[0],On=Dn[1],Na=ii==="inline",Ws=R.useState(ii),Nn=(0,H.Z)(Ws,2),qi=Nn[0],ns=Nn[1],Xi=R.useState(On),wa=(0,H.Z)(Xi,2),Wn=wa[0],Sa=wa[1];R.useEffect(function(){ns(ii),Sa(On),Mr.current&&(Na?di(zi):fi(Ir))},[ii,On]);var aa=R.useState(0),_a=(0,H.Z)(aa,2),mo=_a[0],go=_a[1],ki=mo>=fn.length-1||qi!=="horizontal"||Ut;R.useEffect(function(){Na&&zr(kn)},[kn]),R.useEffect(function(){return Mr.current=!0,function(){Mr.current=!1}},[]);var vn=et(),bn=vn.registerPath,Ma=vn.unregisterPath,Ji=vn.refreshOverflowKeys,Ca=vn.isSubPathKey,Vs=vn.getKeyPath,is=vn.getKeys,yi=vn.getSubPathKeys,as=R.useMemo(function(){return{registerPath:bn,unregisterPath:Ma}},[bn,Ma]),Zs=R.useMemo(function(){return{isSubPathKey:Ca}},[Ca]);R.useEffect(function(){Ji(ki?Ir:fn.slice(mo+1).map(function(Or){return Or.key}))},[mo,ki]);var os=(0,Ge.Z)(zt||yr&&((be=fn[0])===null||be===void 0?void 0:be.key),{value:zt}),ss=(0,H.Z)(os,2),Fa=ss[0],vo=ss[1],bo=it(function(Or){vo(Or)}),ls=it(function(){vo(void 0)});(0,R.useImperativeHandle)(X,function(){return{list:Ui.current,focus:function(Zr){var Yr,ai=is(),Vn=K(ai,Ei),Aa=Vn.elements,oa=Vn.key2element,Fo=Vn.element2key,zo=oe(Ui.current,Aa),fs=Fa!=null?Fa:zo[0]?Fo.get(zo[0]):(Yr=fn.find(function(Gs){return!Gs.props.disabled}))===null||Yr===void 0?void 0:Yr.key,sa=oa.get(fs);if(fs&&sa){var La;sa==null||(La=sa.focus)===null||La===void 0||La.call(sa,Zr)}}}});var Ea=(0,Ge.Z)(Tn||[],{value:ri,postState:function(Zr){return Array.isArray(Zr)?Zr:Zr==null?Ir:[Zr]}}),cs=(0,H.Z)(Ea,2),za=cs[0],ka=cs[1],js=function(Zr){if(ur){var Yr=Zr.key,ai=za.includes(Yr),Vn;Tr?ai?Vn=za.filter(function(oa){return oa!==Yr}):Vn=[].concat((0,ge.Z)(za),[Yr]):Vn=[Yr],ka(Vn);var Aa=(0,xe.Z)((0,xe.Z)({},Zr),{},{selectedKeys:Vn});ai?Jn==null||Jn(Aa):mn==null||mn(Aa)}!Tr&&kn.length&&qi!=="inline"&&fi(Ir)},us=it(function(Or){Kn==null||Kn(Wt(Or)),js(Or)}),yo=it(function(Or,Zr){var Yr=kn.filter(function(Vn){return Vn!==Or});if(Zr)Yr.push(Or);else if(qi!=="inline"){var ai=yi(Or);Yr=Yr.filter(function(Vn){return!ai.has(Vn)})}(0,je.Z)(kn,Yr,!0)||fi(Yr,!0)}),ds=function(Zr,Yr){var ai=Yr!=null?Yr:!kn.includes(Zr);yo(Zr,ai)},Da=ue(qi,Fa,Gi,Ei,Ui,is,Vs,vo,ds,Zi);R.useEffect(function(){bi(!0)},[]);var xo=R.useMemo(function(){return{_internalRenderMenuItem:ji,_internalRenderSubMenuItem:Ri}},[ji,Ri]),Us=qi!=="horizontal"||Ut?fn:fn.map(function(Or,Zr){return R.createElement(O,{key:Or.key,overflowDisabled:Zr>mo},Or)}),Ka=R.createElement(_.Z,(0,k.Z)({id:Lr,ref:Ui,prefixCls:"".concat(ae,"-overflow"),component:"ul",itemComponent:Er,className:S()(ae,"".concat(ae,"-root"),"".concat(ae,"-").concat(qi),ct,(ke={},(0,U.Z)(ke,"".concat(ae,"-inline-collapsed"),Wn),(0,U.Z)(ke,"".concat(ae,"-rtl"),Gi),ke),Be),dir:tr,style:lt,role:"menu",tabIndex:sr,data:Us,renderRawItem:function(Zr){return Zr},renderRawRest:function(Zr){var Yr=Zr.length,ai=Yr?fn.slice(-Yr):null;return R.createElement(He,{eventKey:Xe,title:ci,disabled:ki,internalPopupClose:Yr===0,popupClassName:Yn},ai)},maxCount:qi!=="horizontal"||Ut?_.Z.INVALIDATE:_.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Zr){go(Zr)},onKeyDown:Da},ui));return R.createElement(ve.Provider,{value:xo},R.createElement(mt.Provider,{value:Ei},R.createElement(O,{prefixCls:ae,rootClassName:Be,mode:qi,openKeys:kn,rtl:Gi,disabled:ir,motion:Oi?gn:null,defaultMotions:Oi?mi:null,activeKey:Fa,onActive:bo,onInactive:ls,selectedKeys:za,inlineIndent:ni,subMenuOpenDelay:dr,subMenuCloseDelay:kr,forceSubMenuRender:At,builtinPlacements:Sn,triggerSubMenuAction:Pn,getPopupContainer:Pi,itemIcon:zn,expandIcon:gi,onItemClick:us,onOpenChange:yo},R.createElement(ut.Provider,{value:Zs},Ka),R.createElement("div",{style:{display:"none"},"aria-hidden":!0},R.createElement(Y.Provider,{value:as},fn)))))}),Wr=fr,pr=Wr;pr.Item=Er,pr.SubMenu=He,pr.ItemGroup=jt,pr.Divider=$t;var Vr=pr},83836:function(xr,xt,x){"use strict";x.d(xt,{Z:function(){return Ye}});var k=x(60499),U=x(85899),xe=x(72190),ge=x(42244),H=x(59301),J=x(92310),pe=x.n(J),S=x(29301),_=x(34280),Ge=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],je=void 0;function A(F,we){var me=F.prefixCls,G=F.invalidate,Fe=F.item,Ae=F.renderItem,Le=F.responsive,ce=F.responsiveDisabled,ot=F.registerSize,ft=F.itemKey,Ot=F.className,Kt=F.style,_t=F.children,er=F.display,Ft=F.order,rr=F.component,Lt=rr===void 0?"div":rr,oe=(0,ge.Z)(F,Ge),V=Le&&!er;function K(ie){ot(ft,ie)}H.useEffect(function(){return function(){K(null)}},[]);var ue=Ae&&Fe!==je?Ae(Fe,{index:Ft}):_t,he;G||(he={opacity:V?0:1,height:V?0:je,overflowY:V?"hidden":je,order:Le?Ft:je,pointerEvents:V?"none":je,position:V?"absolute":je});var ze={};V&&(ze["aria-hidden"]=!0);var re=H.createElement(Lt,(0,k.Z)({className:pe()(!G&&me,Ot),style:(0,U.Z)((0,U.Z)({},he),Kt)},ze,oe,{ref:we}),ue);return Le&&(re=H.createElement(S.Z,{onResize:function(Xe){var et=Xe.offsetWidth;K(et)},disabled:ce},re)),re}var R=H.forwardRef(A);R.displayName="Item";var Ke=R,mt=x(6089),gt=x(4676),Qe=x(16089);function $e(F){if(typeof MessageChannel=="undefined")(0,Qe.Z)(F);else{var we=new MessageChannel;we.port1.onmessage=function(){return F()},we.port2.postMessage(void 0)}}function Nt(){var F=H.useRef(null),we=function(G){F.current||(F.current=[],$e(function(){(0,gt.unstable_batchedUpdates)(function(){F.current.forEach(function(Fe){Fe()}),F.current=null})})),F.current.push(G)};return we}function Ce(F,we){var me=H.useState(we),G=(0,xe.Z)(me,2),Fe=G[0],Ae=G[1],Le=(0,mt.Z)(function(ce){F(function(){Ae(ce)})});return[Fe,Le]}var Se=H.createContext(null),O=["component"],z=["className"],Y=["className"],te=function(we,me){var G=H.useContext(Se);if(!G){var Fe=we.component,Ae=Fe===void 0?"div":Fe,Le=(0,ge.Z)(we,O);return H.createElement(Ae,(0,k.Z)({},Le,{ref:me}))}var ce=G.className,ot=(0,ge.Z)(G,z),ft=we.className,Ot=(0,ge.Z)(we,Y);return H.createElement(Se.Provider,{value:null},H.createElement(Ke,(0,k.Z)({ref:me,className:pe()(ce,ft)},ot,Ot)))},Ve=H.forwardRef(te);Ve.displayName="RawItem";var fe=Ve,ut=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],dt="responsive",ve="invalidate";function ye(F){return"+ ".concat(F.length," ...")}function tt(F,we){var me=F.prefixCls,G=me===void 0?"rc-overflow":me,Fe=F.data,Ae=Fe===void 0?[]:Fe,Le=F.renderItem,ce=F.renderRawItem,ot=F.itemKey,ft=F.itemWidth,Ot=ft===void 0?10:ft,Kt=F.ssr,_t=F.style,er=F.className,Ft=F.maxCount,rr=F.renderRest,Lt=F.renderRawRest,oe=F.prefix,V=F.suffix,K=F.component,ue=K===void 0?"div":K,he=F.itemComponent,ze=F.onVisibleChange,re=(0,ge.Z)(F,ut),ie=Kt==="full",Xe=Nt(),et=Ce(Xe,null),it=(0,xe.Z)(et,2),Et=it[0],Bt=it[1],W=Et||0,Mt=Ce(Xe,new Map),vt=(0,xe.Z)(Mt,2),N=vt[0],q=vt[1],de=Ce(Xe,0),at=(0,xe.Z)(de,2),Oe=at[0],Ee=at[1],or=Ce(Xe,0),Ht=(0,xe.Z)(or,2),Wt=Ht[0],Gt=Ht[1],nr=Ce(Xe,0),Ct=(0,xe.Z)(nr,2),wr=Ct[0],hr=Ct[1],Ur=Ce(Xe,0),Er=(0,xe.Z)(Ur,2),cr=Er[0],nn=Er[1],Zt=(0,H.useState)(null),sn=(0,xe.Z)(Zt,2),qr=sn[0],un=sn[1],Jr=(0,H.useState)(null),Sr=(0,xe.Z)(Jr,2),Gr=Sr[0],Nr=Sr[1],Bn=H.useMemo(function(){return Gr===null&&ie?Number.MAX_SAFE_INTEGER:Gr||0},[Gr,Et]),$n=(0,H.useState)(!1),wn=(0,xe.Z)($n,2),Xn=wn[0],C=wn[1],L="".concat(G,"-item"),Ie=Math.max(Oe,Wt),Pe=Ft===dt,Re=Ae.length&&Pe,He=Ft===ve,bt=Re||typeof Ft=="number"&&Ae.length>Ft,st=(0,H.useMemo)(function(){var ne=Ae;return Re?Et===null&&ie?ne=Ae:ne=Ae.slice(0,Math.min(Ae.length,W/Ot)):typeof Ft=="number"&&(ne=Ae.slice(0,Ft)),ne},[Ae,Ot,Et,Ft,Re]),St=(0,H.useMemo)(function(){return Re?Ae.slice(Bn+1):Ae.slice(st.length)},[Ae,st,Re,Bn]),qt=(0,H.useCallback)(function(ne,ae){var Be;return typeof ot=="function"?ot(ne):(Be=ot&&(ne==null?void 0:ne[ot]))!==null&&Be!==void 0?Be:ae},[ot]),jt=(0,H.useCallback)(Le||function(ne){return ne},[Le]);function $t(ne,ae,Be){Gr===ne&&(ae===void 0||ae===qr)||(Nr(ne),Be||(C(ne<Ae.length-1),ze==null||ze(ne)),ae!==void 0&&un(ae))}function Tt(ne,ae){Bt(ae.clientWidth)}function Xt(ne,ae){q(function(Be){var lt=new Map(Be);return ae===null?lt.delete(ne):lt.set(ne,ae),lt})}function Me(ne,ae){Gt(ae),Ee(Wt)}function Fr(ne,ae){hr(ae)}function Ir(ne,ae){nn(ae)}function fr(ne){return N.get(qt(st[ne],ne))}(0,_.Z)(function(){if(W&&typeof Ie=="number"&&st){var ne=wr+cr,ae=st.length,Be=ae-1;if(!ae){$t(0,null);return}for(var lt=0;lt<ae;lt+=1){var ct=fr(lt);if(ie&&(ct=ct||0),ct===void 0){$t(lt-1,void 0,!0);break}if(ne+=ct,Be===0&&ne<=W||lt===Be-1&&ne+fr(Be)<=W){$t(Be,null);break}else if(ne+Ie>W){$t(lt-1,ne-ct-cr+Wt);break}}V&&fr(0)+cr>W&&un(null)}},[W,N,Wt,wr,cr,qt,st]);var Wr=Xn&&!!St.length,pr={};qr!==null&&Re&&(pr={position:"absolute",left:qr,top:0});var Vr={prefixCls:L,responsive:Re,component:he,invalidate:He},le=ce?function(ne,ae){var Be=qt(ne,ae);return H.createElement(Se.Provider,{key:Be,value:(0,U.Z)((0,U.Z)({},Vr),{},{order:ae,item:ne,itemKey:Be,registerSize:Xt,display:ae<=Bn})},ce(ne,ae))}:function(ne,ae){var Be=qt(ne,ae);return H.createElement(Ke,(0,k.Z)({},Vr,{order:ae,key:Be,item:ne,renderItem:jt,itemKey:Be,registerSize:Xt,display:ae<=Bn}))},X={order:Wr?Bn:Number.MAX_SAFE_INTEGER,className:"".concat(L,"-rest"),registerSize:Me,display:Wr},be=rr||ye,ke=Lt?H.createElement(Se.Provider,{value:(0,U.Z)((0,U.Z)({},Vr),X)},Lt(St)):H.createElement(Ke,(0,k.Z)({},Vr,X),typeof be=="function"?be(St):be),j=H.createElement(ue,(0,k.Z)({className:pe()(!He&&G,er),style:_t,ref:we},re),oe&&H.createElement(Ke,(0,k.Z)({},Vr,{responsive:Pe,responsiveDisabled:!Re,order:-1,className:"".concat(L,"-prefix"),registerSize:Fr,display:!0}),oe),st.map(le),bt?ke:null,V&&H.createElement(Ke,(0,k.Z)({},Vr,{responsive:Pe,responsiveDisabled:!Re,order:Bn,className:"".concat(L,"-suffix"),registerSize:Ir,display:!0,style:pr}),V));return Pe?H.createElement(S.Z,{onResize:Tt,disabled:!Re},j):j}var Z=H.forwardRef(tt);Z.displayName="Overflow",Z.Item=fe,Z.RESPONSIVE=dt,Z.INVALIDATE=ve;var Ne=Z,Ye=Ne},43141:function(xr,xt,x){"use strict";x.d(xt,{Z5:function(){return L0},_l:function(){return jr},bK:function(){return ln}});var k=x(59301),U=x(29658);function xe(o,l){o.prototype=Object.create(l.prototype),o.prototype.constructor=o,(0,U.Z)(o,l)}var ge=x(60499),H=x(59781),J=k.createContext(null),pe=null;function S(o){o()}var _=S,Ge=function(l){return _=l},je=function(){return _};function A(){var o=je(),l=null,c=null;return{clear:function(){l=null,c=null},notify:function(){o(function(){for(var m=l;m;)m.callback(),m=m.next})},get:function(){for(var m=[],g=l;g;)m.push(g),g=g.next;return m},subscribe:function(m){var g=!0,v=c={callback:m,next:null,prev:c};return v.prev?v.prev.next=v:l=v,function(){!g||l===null||(g=!1,v.next?v.next.prev=v.prev:c=v.prev,v.prev?v.prev.next=v.next:l=v.next)}}}}var R={notify:function(){},get:function(){return[]}};function Ke(o,l){var c,f=R;function m(E){return D(),f.subscribe(E)}function g(){f.notify()}function v(){w.onStateChange&&w.onStateChange()}function b(){return!!c}function D(){c||(c=l?l.addNestedSub(v):o.subscribe(v),f=A())}function T(){c&&(c(),c=void 0,f.clear(),f=R)}var w={addNestedSub:m,notifyNestedSubs:g,handleChangeWrapper:v,isSubscribed:b,trySubscribe:D,tryUnsubscribe:T,getListeners:function(){return f}};return w}var mt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?k.useLayoutEffect:k.useEffect;function gt(o){var l=o.store,c=o.context,f=o.children,m=(0,k.useMemo)(function(){var b=Ke(l);return{store:l,subscription:b}},[l]),g=(0,k.useMemo)(function(){return l.getState()},[l]);mt(function(){var b=m.subscription;return b.onStateChange=b.notifyNestedSubs,b.trySubscribe(),g!==l.getState()&&b.notifyNestedSubs(),function(){b.tryUnsubscribe(),b.onStateChange=null}},[m,g]);var v=c||J;return k.createElement(v.Provider,{value:m},f)}var Qe=gt,$e=x(69010),Nt=x(94266),Ce=x.n(Nt),Se=x(53410),O=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],z=["reactReduxForwardedRef"],Y=[],te=[null,null],Ve=function(l){try{return JSON.stringify(l)}catch(c){return String(l)}};function fe(o,l){var c=o[1];return[l.payload,c+1]}function ut(o,l,c){mt(function(){return o.apply(void 0,l)},c)}function dt(o,l,c,f,m,g,v){o.current=f,l.current=m,c.current=!1,g.current&&(g.current=null,v())}function ve(o,l,c,f,m,g,v,b,D,T){if(o){var w=!1,E=null,B=function(){if(!w){var We=l.getState(),qe,rt;try{qe=f(We,m.current)}catch(pt){rt=pt,E=pt}rt||(E=null),qe===g.current?v.current||D():(g.current=qe,b.current=qe,v.current=!0,T({type:"STORE_UPDATED",payload:{error:rt}}))}};c.onStateChange=B,c.trySubscribe(),B();var P=function(){if(w=!0,c.tryUnsubscribe(),c.onStateChange=null,E)throw E};return P}}var ye=function(){return[null,0]};function tt(o,l){l===void 0&&(l={});var c=l,f=c.getDisplayName,m=f===void 0?function(Pt){return"ConnectAdvanced("+Pt+")"}:f,g=c.methodName,v=g===void 0?"connectAdvanced":g,b=c.renderCountProp,D=b===void 0?void 0:b,T=c.shouldHandleStateChanges,w=T===void 0?!0:T,E=c.storeKey,B=E===void 0?"store":E,P=c.withRef,Q=P===void 0?!1:P,We=c.forwardRef,qe=We===void 0?!1:We,rt=c.context,pt=rt===void 0?J:rt,kt=(0,$e.Z)(c,O);if(0)var It;var lr=pt;return function(vr){var pn=vr.displayName||vr.name||"Component",br=m(pn),Kr=(0,ge.Z)({},kt,{getDisplayName:m,methodName:v,renderCountProp:D,shouldHandleStateChanges:w,storeKey:B,displayName:br,wrappedComponentName:pn,WrappedComponent:vr}),jn=kt.pure;function Ln(ei){return o(ei.dispatch,Kr)}var xi=jn?k.useMemo:function(ei){return ei()};function Wi(ei){var to=(0,k.useMemo)(function(){var As=ei.reactReduxForwardedRef,Ls=(0,$e.Z)(ei,z);return[ei.context,As,Ls]},[ei]),ma=to[0],Pa=to[1],Qi=to[2],ga=(0,k.useMemo)(function(){return ma&&ma.Consumer&&(0,Se.isContextConsumer)(k.createElement(ma.Consumer,null))?ma:lr},[ma,lr]),li=(0,k.useContext)(ga),wi=!!ei.store&&!!ei.store.getState&&!!ei.store.dispatch,Bl=!!li&&!!li.store,ea=wi?ei.store:li.store,To=(0,k.useMemo)(function(){return Ln(ea)},[ea]),ks=(0,k.useMemo)(function(){if(!w)return te;var As=Ke(ea,wi?null:li.subscription),Ls=As.notifyNestedSubs.bind(As);return[As,Ls]},[ea,wi,li]),Jo=ks[0],Il=ks[1],$l=(0,k.useMemo)(function(){return wi?li:(0,ge.Z)({},li,{subscription:Jo})},[wi,li,Jo]),Dd=(0,k.useReducer)(fe,Y,ye),J0=Dd[0],Ds=J0[0],Y0=Dd[1];if(Ds&&Ds.error)throw Ds.error;var Ad=(0,k.useRef)(),Nc=(0,k.useRef)(Qi),Tl=(0,k.useRef)(),Ld=(0,k.useRef)(!1),Pl=xi(function(){return Tl.current&&Qi===Nc.current?Tl.current:To(ea.getState(),Qi)},[ea,Ds,Qi]);ut(dt,[Nc,Ad,Ld,Qi,Pl,Tl,Il]),ut(ve,[w,ea,Jo,To,Nc,Ad,Ld,Tl,Il,Y0],[ea,Jo,To]);var Fc=(0,k.useMemo)(function(){return k.createElement(vr,(0,ge.Z)({},Pl,{ref:Pa}))},[Pa,vr,Pl]),Q0=(0,k.useMemo)(function(){return w?k.createElement(ga.Provider,{value:$l},Fc):Fc},[ga,Fc,$l]);return Q0}var Bi=jn?k.memo(Wi):Wi;if(Bi.WrappedComponent=vr,Bi.displayName=Wi.displayName=br,qe){var Ii=k.forwardRef(function(to,ma){return k.createElement(Bi,(0,ge.Z)({},to,{reactReduxForwardedRef:ma}))});return Ii.displayName=br,Ii.WrappedComponent=vr,Ce()(Ii,vr)}return Ce()(Bi,vr)}}function Z(o,l){return o===l?o!==0||l!==0||1/o===1/l:o!==o&&l!==l}function Ne(o,l){if(Z(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var c=Object.keys(o),f=Object.keys(l);if(c.length!==f.length)return!1;for(var m=0;m<c.length;m++)if(!Object.prototype.hasOwnProperty.call(l,c[m])||!Z(o[c[m]],l[c[m]]))return!1;return!0}function Ye(o,l){var c={},f=function(v){var b=o[v];typeof b=="function"&&(c[v]=function(){return l(b.apply(void 0,arguments))})};for(var m in o)f(m);return c}function F(o){return function(c,f){var m=o(c,f);function g(){return m}return g.dependsOnOwnProps=!1,g}}function we(o){return o.dependsOnOwnProps!==null&&o.dependsOnOwnProps!==void 0?!!o.dependsOnOwnProps:o.length!==1}function me(o,l){return function(f,m){var g=m.displayName,v=function(D,T){return v.dependsOnOwnProps?v.mapToProps(D,T):v.mapToProps(D)};return v.dependsOnOwnProps=!0,v.mapToProps=function(D,T){v.mapToProps=o,v.dependsOnOwnProps=we(o);var w=v(D,T);return typeof w=="function"&&(v.mapToProps=w,v.dependsOnOwnProps=we(w),w=v(D,T)),w},v}}function G(o){return typeof o=="function"?me(o,"mapDispatchToProps"):void 0}function Fe(o){return o?void 0:F(function(l){return{dispatch:l}})}function Ae(o){return o&&typeof o=="object"?F(function(l){return Ye(o,l)}):void 0}var Le=[G,Fe,Ae];function ce(o){return typeof o=="function"?me(o,"mapStateToProps"):void 0}function ot(o){return o?void 0:F(function(){return{}})}var ft=[ce,ot];function Ot(o,l,c){return(0,ge.Z)({},c,o,l)}function Kt(o){return function(c,f){var m=f.displayName,g=f.pure,v=f.areMergedPropsEqual,b=!1,D;return function(w,E,B){var P=o(w,E,B);return b?(!g||!v(P,D))&&(D=P):(b=!0,D=P),D}}}function _t(o){return typeof o=="function"?Kt(o):void 0}function er(o){return o?void 0:function(){return Ot}}var Ft=[_t,er],rr=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Lt(o,l,c,f){return function(g,v){return c(o(g,v),l(f,v),v)}}function oe(o,l,c,f,m){var g=m.areStatesEqual,v=m.areOwnPropsEqual,b=m.areStatePropsEqual,D=!1,T,w,E,B,P;function Q(kt,It){return T=kt,w=It,E=o(T,w),B=l(f,w),P=c(E,B,w),D=!0,P}function We(){return E=o(T,w),l.dependsOnOwnProps&&(B=l(f,w)),P=c(E,B,w),P}function qe(){return o.dependsOnOwnProps&&(E=o(T,w)),l.dependsOnOwnProps&&(B=l(f,w)),P=c(E,B,w),P}function rt(){var kt=o(T,w),It=!b(kt,E);return E=kt,It&&(P=c(E,B,w)),P}function pt(kt,It){var lr=!v(It,w),Pt=!g(kt,T,It,w);return T=kt,w=It,lr&&Pt?We():lr?qe():Pt?rt():P}return function(It,lr){return D?pt(It,lr):Q(It,lr)}}function V(o,l){var c=l.initMapStateToProps,f=l.initMapDispatchToProps,m=l.initMergeProps,g=(0,$e.Z)(l,rr),v=c(o,g),b=f(o,g),D=m(o,g),T=g.pure?oe:Lt;return T(v,b,D,o,g)}var K=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ue(o,l,c){for(var f=l.length-1;f>=0;f--){var m=l[f](o);if(m)return m}return function(g,v){throw new Error("Invalid value of type "+typeof o+" for "+c+" argument when connecting component "+v.wrappedComponentName+".")}}function he(o,l){return o===l}function ze(o){var l=o===void 0?{}:o,c=l.connectHOC,f=c===void 0?tt:c,m=l.mapStateToPropsFactories,g=m===void 0?ft:m,v=l.mapDispatchToPropsFactories,b=v===void 0?Le:v,D=l.mergePropsFactories,T=D===void 0?Ft:D,w=l.selectorFactory,E=w===void 0?V:w;return function(P,Q,We,qe){qe===void 0&&(qe={});var rt=qe,pt=rt.pure,kt=pt===void 0?!0:pt,It=rt.areStatesEqual,lr=It===void 0?he:It,Pt=rt.areOwnPropsEqual,vr=Pt===void 0?Ne:Pt,pn=rt.areStatePropsEqual,br=pn===void 0?Ne:pn,Kr=rt.areMergedPropsEqual,jn=Kr===void 0?Ne:Kr,Ln=(0,$e.Z)(rt,K),xi=ue(P,g,"mapStateToProps"),Wi=ue(Q,b,"mapDispatchToProps"),Bi=ue(We,T,"mergeProps");return f(E,(0,ge.Z)({methodName:"connect",getDisplayName:function(ei){return"Connect("+ei+")"},shouldHandleStateChanges:!!P,initMapStateToProps:xi,initMapDispatchToProps:Wi,initMergeProps:Bi,pure:kt,areStatesEqual:lr,areOwnPropsEqual:vr,areStatePropsEqual:br,areMergedPropsEqual:jn},Ln))}}var re=ze();function ie(){var o=useContext(ReactReduxContext);return o}function Xe(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultReduxContext:function(){return useContext(o)};return function(){var f=l(),m=f.store;return m}}var et=null;function it(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultStore:createStoreHook(o);return function(){var f=l();return f.dispatch}}var Et=null,Bt=function(l,c){return l===c};function W(o,l,c,f){var m=useReducer(function(Q){return Q+1},0),g=m[1],v=useMemo(function(){return createSubscription(c,f)},[c,f]),b=useRef(),D=useRef(),T=useRef(),w=useRef(),E=c.getState(),B;try{if(o!==D.current||E!==T.current||b.current){var P=o(E);w.current===void 0||!l(P,w.current)?B=P:B=w.current}else B=w.current}catch(Q){throw b.current&&(Q.message+=`
|
|
|
The error may be correlated with this previous error:
|
|
|
`+b.current.stack+`
|
|
|
|
|
|
`),Q}return useIsomorphicLayoutEffect(function(){D.current=o,T.current=E,w.current=B,b.current=void 0}),useIsomorphicLayoutEffect(function(){function Q(){try{var We=c.getState();if(We===T.current)return;var qe=D.current(We);if(l(qe,w.current))return;w.current=qe,T.current=We}catch(rt){b.current=rt}g()}return v.onStateChange=Q,v.trySubscribe(),Q(),function(){return v.tryUnsubscribe()}},[c,v]),B}function Mt(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultReduxContext:function(){return useContext(o)};return function(f,m){m===void 0&&(m=Bt);var g=l(),v=g.store,b=g.subscription,D=W(f,m,v,b);return useDebugValue(D),D}}var vt=null,N=x(4676);Ge(N.unstable_batchedUpdates);function q(o,l){if(o.length!==l.length)return!1;for(var c=0;c<o.length;c++)if(o[c]!==l[c])return!1;return!0}function de(o,l){var c=(0,k.useState)(function(){return{inputs:l,result:o()}})[0],f=(0,k.useRef)(!0),m=(0,k.useRef)(c),g=f.current||!!(l&&m.current.inputs&&q(l,m.current.inputs)),v=g?m.current:{inputs:l,result:o()};return(0,k.useEffect)(function(){f.current=!1,m.current=v},[v]),v.result}function at(o,l){return de(function(){return o},l)}var Oe=de,Ee=at,or=!0,Ht="Invariant failed";function Wt(o,l){if(!o){if(or)throw new Error(Ht);var c=typeof l=="function"?l():l,f=c?"".concat(Ht,": ").concat(c):Ht;throw new Error(f)}}var Gt=function(l){var c=l.top,f=l.right,m=l.bottom,g=l.left,v=f-g,b=m-c,D={top:c,right:f,bottom:m,left:g,width:v,height:b,x:g,y:c,center:{x:(f+g)/2,y:(m+c)/2}};return D},nr=function(l,c){return{top:l.top-c.top,left:l.left-c.left,bottom:l.bottom+c.bottom,right:l.right+c.right}},Ct=function(l,c){return{top:l.top+c.top,left:l.left+c.left,bottom:l.bottom-c.bottom,right:l.right-c.right}},wr=function(l,c){return{top:l.top+c.y,left:l.left+c.x,bottom:l.bottom+c.y,right:l.right+c.x}},hr={top:0,right:0,bottom:0,left:0},Ur=function(l){var c=l.borderBox,f=l.margin,m=f===void 0?hr:f,g=l.border,v=g===void 0?hr:g,b=l.padding,D=b===void 0?hr:b,T=Gt(nr(c,m)),w=Gt(Ct(c,v)),E=Gt(Ct(w,D));return{marginBox:T,borderBox:Gt(c),paddingBox:w,contentBox:E,margin:m,border:v,padding:D}},Er=function(l){var c=l.slice(0,-2),f=l.slice(-2);if(f!=="px")return 0;var m=Number(c);return isNaN(m)&&Wt(!1),m},cr=function(){return{x:window.pageXOffset,y:window.pageYOffset}},nn=function(l,c){var f=l.borderBox,m=l.border,g=l.margin,v=l.padding,b=wr(f,c);return Ur({borderBox:b,border:m,margin:g,padding:v})},Zt=function(l,c){return c===void 0&&(c=cr()),nn(l,c)},sn=function(l,c){var f={top:Er(c.marginTop),right:Er(c.marginRight),bottom:Er(c.marginBottom),left:Er(c.marginLeft)},m={top:Er(c.paddingTop),right:Er(c.paddingRight),bottom:Er(c.paddingBottom),left:Er(c.paddingLeft)},g={top:Er(c.borderTopWidth),right:Er(c.borderRightWidth),bottom:Er(c.borderBottomWidth),left:Er(c.borderLeftWidth)};return Ur({borderBox:l,margin:f,padding:m,border:g})},qr=function(l){var c=l.getBoundingClientRect(),f=window.getComputedStyle(l);return sn(c,f)},un=Number.isNaN||function(l){return typeof l=="number"&&l!==l};function Jr(o,l){return!!(o===l||un(o)&&un(l))}function Sr(o,l){if(o.length!==l.length)return!1;for(var c=0;c<o.length;c++)if(!Jr(o[c],l[c]))return!1;return!0}function Gr(o,l){l===void 0&&(l=Sr);var c,f=[],m,g=!1;function v(){for(var b=[],D=0;D<arguments.length;D++)b[D]=arguments[D];return g&&c===this&&l(b,f)||(m=o.apply(this,b),g=!0,c=this,f=b),m}return v}var Nr=Gr,Bn=function(l){var c=[],f=null,m=function(){for(var v=arguments.length,b=new Array(v),D=0;D<v;D++)b[D]=arguments[D];c=b,!f&&(f=requestAnimationFrame(function(){f=null,l.apply(void 0,c)}))};return m.cancel=function(){f&&(cancelAnimationFrame(f),f=null)},m},$n=Bn,wn=!0,Xn=/[ \t]{2,}/g,C=/^[ \t]*/gm,L=function(l){return l.replace(Xn," ").replace(C,"").trim()},Ie=function(l){return L(`
|
|
|
%creact-beautiful-dnd
|
|
|
|
|
|
%c`+L(l)+`
|
|
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
|
`)},Pe=function(l){return[Ie(l),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},Re="__react-beautiful-dnd-disable-dev-warnings";function He(o,l){var c;wn||typeof window!="undefined"&&window[Re]||(c=console)[o].apply(c,Pe(l))}var bt=He.bind(null,"warn"),st=He.bind(null,"error");function St(){}function qt(o,l){return(0,ge.Z)({},o,{},l)}function jt(o,l,c){var f=l.map(function(m){var g=qt(c,m.options);return o.addEventListener(m.eventName,m.fn,g),function(){o.removeEventListener(m.eventName,m.fn,g)}});return function(){f.forEach(function(g){g()})}}var $t=!0,Tt="Invariant failed";function Xt(o){this.message=o}Xt.prototype.toString=function(){return this.message};function Me(o,l){if(!o)throw $t?new Xt(Tt):new Xt(Tt+": "+(l||""))}var Fr=function(o){xe(l,o);function l(){for(var f,m=arguments.length,g=new Array(m),v=0;v<m;v++)g[v]=arguments[v];return f=o.call.apply(o,[this].concat(g))||this,f.callbacks=null,f.unbind=St,f.onWindowError=function(b){var D=f.getCallbacks();D.isDragging()&&D.tryAbort();var T=b.error;T instanceof Xt&&b.preventDefault()},f.getCallbacks=function(){if(!f.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return f.callbacks},f.setCallbacks=function(b){f.callbacks=b},f}var c=l.prototype;return c.componentDidMount=function(){this.unbind=jt(window,[{eventName:"error",fn:this.onWindowError}])},c.componentWillUnmount=function(){this.unbind()},c.componentDidCatch=function(m){if(m instanceof Xt){this.setState({});return}throw m},c.render=function(){return this.props.children(this.setCallbacks)},l}(k.Component),Ir=`
|
|
|
Press space bar to start a drag.
|
|
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
|
`,fr=function(l){return l+1},Wr=function(l){return`
|
|
|
You have lifted an item in position `+fr(l.source.index)+`
|
|
|
`},pr=function(l,c){var f=l.droppableId===c.droppableId,m=fr(l.index),g=fr(c.index);return f?`
|
|
|
You have moved the item from position `+m+`
|
|
|
to position `+g+`
|
|
|
`:`
|
|
|
You have moved the item from position `+m+`
|
|
|
in list `+l.droppableId+`
|
|
|
to list `+c.droppableId+`
|
|
|
in position `+g+`
|
|
|
`},Vr=function(l,c,f){var m=c.droppableId===f.droppableId;return m?`
|
|
|
The item `+l+`
|
|
|
has been combined with `+f.draggableId:`
|
|
|
The item `+l+`
|
|
|
in list `+c.droppableId+`
|
|
|
has been combined with `+f.draggableId+`
|
|
|
in list `+f.droppableId+`
|
|
|
`},le=function(l){var c=l.destination;if(c)return pr(l.source,c);var f=l.combine;return f?Vr(l.draggableId,l.source,f):"You are over an area that cannot be dropped on"},X=function(l){return`
|
|
|
The item has returned to its starting position
|
|
|
of `+fr(l.index)+`
|
|
|
`},be=function(l){if(l.reason==="CANCEL")return`
|
|
|
Movement cancelled.
|
|
|
`+X(l.source)+`
|
|
|
`;var c=l.destination,f=l.combine;return c?`
|
|
|
You have dropped the item.
|
|
|
`+pr(l.source,c)+`
|
|
|
`:f?`
|
|
|
You have dropped the item.
|
|
|
`+Vr(l.draggableId,l.source,f)+`
|
|
|
`:`
|
|
|
The item has been dropped while not over a drop area.
|
|
|
`+X(l.source)+`
|
|
|
`},ke={dragHandleUsageInstructions:Ir,onDragStart:Wr,onDragUpdate:le,onDragEnd:be},j={x:0,y:0},ne=function(l,c){return{x:l.x+c.x,y:l.y+c.y}},ae=function(l,c){return{x:l.x-c.x,y:l.y-c.y}},Be=function(l,c){return l.x===c.x&&l.y===c.y},lt=function(l){return{x:l.x!==0?-l.x:0,y:l.y!==0?-l.y:0}},ct=function(l,c,f){var m;return f===void 0&&(f=0),m={},m[l]=c,m[l==="x"?"y":"x"]=f,m},Vt=function(l,c){return Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2))},sr=function(l,c){return Math.min.apply(Math,c.map(function(f){return Vt(l,f)}))},mr=function(l){return function(c){return{x:l(c.x),y:l(c.y)}}},gr=function(o,l){var c=Gt({top:Math.max(l.top,o.top),right:Math.min(l.right,o.right),bottom:Math.min(l.bottom,o.bottom),left:Math.max(l.left,o.left)});return c.width<=0||c.height<=0?null:c},tr=function(l,c){return{top:l.top+c.y,left:l.left+c.x,bottom:l.bottom+c.y,right:l.right+c.x}},Lr=function(l){return[{x:l.left,y:l.top},{x:l.right,y:l.top},{x:l.left,y:l.bottom},{x:l.right,y:l.bottom}]},$r={top:0,right:0,bottom:0,left:0},Jt=function(l,c){return c?tr(l,c.scroll.diff.displacement):l},Yt=function(l,c,f){if(f&&f.increasedBy){var m;return(0,ge.Z)({},l,(m={},m[c.end]=l[c.end]+f.increasedBy[c.line],m))}return l},ir=function(l,c){return c&&c.shouldClipSubject?gr(c.pageMarginBox,l):Gt(l)},Ut=function(o){var l=o.page,c=o.withPlaceholder,f=o.axis,m=o.frame,g=Jt(l.marginBox,m),v=Yt(g,f,c),b=ir(v,m);return{page:l,withPlaceholder:c,active:b}},Qt=function(o,l){o.frame||Me(!1);var c=o.frame,f=ae(l,c.scroll.initial),m=lt(f),g=(0,ge.Z)({},c,{scroll:{initial:c.scroll.initial,current:l,diff:{value:f,displacement:m},max:c.scroll.max}}),v=Ut({page:o.subject.page,withPlaceholder:o.subject.withPlaceholder,axis:o.axis,frame:g}),b=(0,ge.Z)({},o,{frame:g,subject:v});return b};function dr(o){return Number.isInteger?Number.isInteger(o):typeof o=="number"&&isFinite(o)&&Math.floor(o)===o}function Br(o){return Object.values?Object.values(o):Object.keys(o).map(function(l){return o[l]})}function kr(o,l){if(o.findIndex)return o.findIndex(l);for(var c=0;c<o.length;c++)if(l(o[c]))return c;return-1}function At(o,l){if(o.find)return o.find(l);var c=kr(o,l);if(c!==-1)return o[c]}function ht(o){return Array.prototype.slice.call(o)}var ar=Nr(function(o){return o.reduce(function(l,c){return l[c.descriptor.id]=c,l},{})}),zt=Nr(function(o){return o.reduce(function(l,c){return l[c.descriptor.id]=c,l},{})}),yr=Nr(function(o){return Br(o)}),dn=Nr(function(o){return Br(o)}),ur=Nr(function(o,l){var c=dn(l).filter(function(f){return o===f.descriptor.droppableId}).sort(function(f,m){return f.descriptor.index-m.descriptor.index});return c});function rn(o){return o.at&&o.at.type==="REORDER"?o.at.destination:null}function Tr(o){return o.at&&o.at.type==="COMBINE"?o.at.combine:null}var Tn=Nr(function(o,l){return l.filter(function(c){return c.descriptor.id!==o.descriptor.id})}),ri=function(o){var l=o.isMovingForward,c=o.draggable,f=o.destination,m=o.insideDestination,g=o.previousImpact;if(!f.isCombineEnabled)return null;var v=rn(g);if(!v)return null;function b(We){var qe={type:"COMBINE",combine:{draggableId:We,droppableId:f.descriptor.id}};return(0,ge.Z)({},g,{at:qe})}var D=g.displaced.all,T=D.length?D[0]:null;if(l)return T?b(T):null;var w=Tn(c,m);if(!T){if(!w.length)return null;var E=w[w.length-1];return b(E.descriptor.id)}var B=kr(w,function(We){return We.descriptor.id===T});B===-1&&Me(!1);var P=B-1;if(P<0)return null;var Q=w[P];return b(Q.descriptor.id)},mn=function(o,l){return o.descriptor.droppableId===l.descriptor.id},Jn={point:j,value:0},En={invisible:{},visible:{},all:[]},ni={displaced:En,displacedBy:Jn,at:null},gn=function(o,l){return function(c){return o<=c&&c<=l}},mi=function(o){var l=gn(o.top,o.bottom),c=gn(o.left,o.right);return function(f){var m=l(f.top)&&l(f.bottom)&&c(f.left)&&c(f.right);if(m)return!0;var g=l(f.top)||l(f.bottom),v=c(f.left)||c(f.right),b=g&&v;if(b)return!0;var D=f.top<o.top&&f.bottom>o.bottom,T=f.left<o.left&&f.right>o.right,w=D&&T;if(w)return!0;var E=D&&v||T&&g;return E}},Pr=function(o){var l=gn(o.top,o.bottom),c=gn(o.left,o.right);return function(f){var m=l(f.top)&&l(f.bottom)&&c(f.left)&&c(f.right);return m}},Pn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Sn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},zn=function(o){return function(l){var c=gn(l.top,l.bottom),f=gn(l.left,l.right);return function(m){return o===Pn?c(m.top)&&c(m.bottom):f(m.left)&&f(m.right)}}},gi=function(l,c){var f=c.frame?c.frame.scroll.diff.displacement:j;return tr(l,f)},_n=function(l,c,f){return c.subject.active?f(c.subject.active)(l):!1},ci=function(l,c,f){return f(c)(l)},Yn=function(l){var c=l.target,f=l.destination,m=l.viewport,g=l.withDroppableDisplacement,v=l.isVisibleThroughFrameFn,b=g?gi(c,f):c;return _n(b,f,v)&&ci(b,m,v)},Pi=function(l){return Yn((0,ge.Z)({},l,{isVisibleThroughFrameFn:mi}))},Kn=function(l){return Yn((0,ge.Z)({},l,{isVisibleThroughFrameFn:Pr}))},vi=function(l){return Yn((0,ge.Z)({},l,{isVisibleThroughFrameFn:zn(l.destination.axis)}))},Zi=function(l,c,f){if(typeof f=="boolean")return f;if(!c)return!0;var m=c.invisible,g=c.visible;if(m[l])return!1;var v=g[l];return v?v.shouldAnimate:!0};function _i(o,l){var c=o.page.marginBox,f={top:l.point.y,right:0,bottom:0,left:l.point.x};return Gt(nr(c,f))}function Mi(o){var l=o.afterDragging,c=o.destination,f=o.displacedBy,m=o.viewport,g=o.forceShouldAnimate,v=o.last;return l.reduce(function(D,T){var w=_i(T,f),E=T.descriptor.id;D.all.push(E);var B=Pi({target:w,destination:c,viewport:m,withDroppableDisplacement:!0});if(!B)return D.invisible[T.descriptor.id]=!0,D;var P=Zi(E,v,g),Q={draggableId:E,shouldAnimate:P};return D.visible[E]=Q,D},{all:[],visible:{},invisible:{}})}function ji(o,l){if(!o.length)return 0;var c=o[o.length-1].descriptor.index;return l.inHomeList?c:c+1}function Ri(o){var l=o.insideDestination,c=o.inHomeList,f=o.displacedBy,m=o.destination,g=ji(l,{inHomeList:c});return{displaced:En,displacedBy:f,at:{type:"REORDER",destination:{droppableId:m.descriptor.id,index:g}}}}function ui(o){var l=o.draggable,c=o.insideDestination,f=o.destination,m=o.viewport,g=o.displacedBy,v=o.last,b=o.index,D=o.forceShouldAnimate,T=mn(l,f);if(b==null)return Ri({insideDestination:c,inHomeList:T,displacedBy:g,destination:f});var w=At(c,function(We){return We.descriptor.index===b});if(!w)return Ri({insideDestination:c,inHomeList:T,displacedBy:g,destination:f});var E=Tn(l,c),B=c.indexOf(w),P=E.slice(B),Q=Mi({afterDragging:P,destination:f,displacedBy:g,last:v,viewport:m.frame,forceShouldAnimate:D});return{displaced:Q,displacedBy:g,at:{type:"REORDER",destination:{droppableId:f.descriptor.id,index:b}}}}function fn(o,l){return!!l.effected[o]}var xa=function(o){var l=o.isMovingForward,c=o.destination,f=o.draggables,m=o.combine,g=o.afterCritical;if(!c.isCombineEnabled)return null;var v=m.draggableId,b=f[v],D=b.descriptor.index,T=fn(v,g);return T?l?D:D-1:l?D+1:D},Ci=function(o){var l=o.isMovingForward,c=o.isInHomeList,f=o.insideDestination,m=o.location;if(!f.length)return null;var g=m.index,v=l?g+1:g-1,b=f[0].descriptor.index,D=f[f.length-1].descriptor.index,T=c?D:D+1;return v<b||v>T?null:v},Oi=function(o){var l=o.isMovingForward,c=o.isInHomeList,f=o.draggable,m=o.draggables,g=o.destination,v=o.insideDestination,b=o.previousImpact,D=o.viewport,T=o.afterCritical,w=b.at;if(w||Me(!1),w.type==="REORDER"){var E=Ci({isMovingForward:l,isInHomeList:c,location:w.destination,insideDestination:v});return E==null?null:ui({draggable:f,insideDestination:v,destination:g,viewport:D,last:b.displaced,displacedBy:b.displacedBy,index:E})}var B=xa({isMovingForward:l,destination:g,displaced:b.displaced,draggables:m,combine:w.combine,afterCritical:T});return B==null?null:ui({draggable:f,insideDestination:v,destination:g,viewport:D,last:b.displaced,displacedBy:b.displacedBy,index:B})},bi=function(o){var l=o.displaced,c=o.afterCritical,f=o.combineWith,m=o.displacedBy,g=!!(l.visible[f]||l.invisible[f]);return fn(f,c)?g?j:lt(m.point):g?m.point:j},Ui=function(o){var l=o.afterCritical,c=o.impact,f=o.draggables,m=Tr(c);m||Me(!1);var g=m.draggableId,v=f[g].page.borderBox.center,b=bi({displaced:c.displaced,afterCritical:l,combineWith:g,displacedBy:c.displacedBy});return ne(v,b)},Ei=function(l,c){return c.margin[l.start]+c.borderBox[l.size]/2},Gi=function(l,c){return c.margin[l.end]+c.borderBox[l.size]/2},Ni=function(l,c,f){return c[l.crossAxisStart]+f.margin[l.crossAxisStart]+f.borderBox[l.crossAxisSize]/2},Fi=function(l){var c=l.axis,f=l.moveRelativeTo,m=l.isMoving;return ct(c.line,f.marginBox[c.end]+Ei(c,m),Ni(c,f.marginBox,m))},kn=function(l){var c=l.axis,f=l.moveRelativeTo,m=l.isMoving;return ct(c.line,f.marginBox[c.start]-Gi(c,m),Ni(c,f.marginBox,m))},di=function(l){var c=l.axis,f=l.moveInto,m=l.isMoving;return ct(c.line,f.contentBox[c.start]+Ei(c,m),Ni(c,f.contentBox,m))},fi=function(o){var l=o.impact,c=o.draggable,f=o.draggables,m=o.droppable,g=o.afterCritical,v=ur(m.descriptor.id,f),b=c.page,D=m.axis;if(!v.length)return di({axis:D,moveInto:m.page,isMoving:b});var T=l.displaced,w=l.displacedBy,E=T.all[0];if(E){var B=f[E];if(fn(E,g))return kn({axis:D,moveRelativeTo:B.page,isMoving:b});var P=nn(B.page,w.point);return kn({axis:D,moveRelativeTo:P,isMoving:b})}var Q=v[v.length-1];if(Q.descriptor.id===c.descriptor.id)return b.borderBox.center;if(fn(Q.descriptor.id,g)){var We=nn(Q.page,lt(g.displacedBy.point));return Fi({axis:D,moveRelativeTo:We,isMoving:b})}return Fi({axis:D,moveRelativeTo:Q.page,isMoving:b})},Rn=function(o,l){var c=o.frame;return c?ne(l,c.scroll.diff.displacement):l},Hn=function(l){var c=l.impact,f=l.draggable,m=l.droppable,g=l.draggables,v=l.afterCritical,b=f.page.borderBox.center,D=c.at;return!m||!D?b:D.type==="REORDER"?fi({impact:c,draggable:f,draggables:g,droppable:m,afterCritical:v}):Ui({impact:c,draggables:g,afterCritical:v})},zi=function(o){var l=Hn(o),c=o.droppable,f=c?Rn(c,l):l;return f},zr=function(o,l){var c=ae(l,o.scroll.initial),f=lt(c),m=Gt({top:l.y,bottom:l.y+o.frame.height,left:l.x,right:l.x+o.frame.width}),g={frame:m,scroll:{initial:o.scroll.initial,max:o.scroll.max,current:l,diff:{value:c,displacement:f}}};return g};function Mr(o,l){return o.map(function(c){return l[c]})}function hn(o,l){for(var c=0;c<l.length;c++){var f=l[c].visible[o];if(f)return f}return null}var Dn=function(o){var l=o.impact,c=o.viewport,f=o.destination,m=o.draggables,g=o.maxScrollChange,v=zr(c,ne(c.scroll.current,g)),b=f.frame?Qt(f,ne(f.frame.scroll.current,g)):f,D=l.displaced,T=Mi({afterDragging:Mr(D.all,m),destination:f,displacedBy:l.displacedBy,viewport:v.frame,last:D,forceShouldAnimate:!1}),w=Mi({afterDragging:Mr(D.all,m),destination:b,displacedBy:l.displacedBy,viewport:c.frame,last:D,forceShouldAnimate:!1}),E={},B={},P=[D,T,w];D.all.forEach(function(We){var qe=hn(We,P);if(qe){B[We]=qe;return}E[We]=!0});var Q=(0,ge.Z)({},l,{displaced:{all:D.all,invisible:E,visible:B}});return Q},ii=function(o,l){return ne(o.scroll.diff.displacement,l)},On=function(o){var l=o.pageBorderBoxCenter,c=o.draggable,f=o.viewport,m=ii(f,l),g=ae(m,c.page.borderBox.center);return ne(c.client.borderBox.center,g)},Na=function(o){var l=o.draggable,c=o.destination,f=o.newPageBorderBoxCenter,m=o.viewport,g=o.withDroppableDisplacement,v=o.onlyOnMainAxis,b=v===void 0?!1:v,D=ae(f,l.page.borderBox.center),T=tr(l.page.borderBox,D),w={target:T,destination:c,withDroppableDisplacement:g,viewport:m};return b?vi(w):Kn(w)},Ws=function(o){var l=o.isMovingForward,c=o.draggable,f=o.destination,m=o.draggables,g=o.previousImpact,v=o.viewport,b=o.previousPageBorderBoxCenter,D=o.previousClientSelection,T=o.afterCritical;if(!f.isEnabled)return null;var w=ur(f.descriptor.id,m),E=mn(c,f),B=ri({isMovingForward:l,draggable:c,destination:f,insideDestination:w,previousImpact:g})||Oi({isMovingForward:l,isInHomeList:E,draggable:c,draggables:m,destination:f,insideDestination:w,previousImpact:g,viewport:v,afterCritical:T});if(!B)return null;var P=zi({impact:B,draggable:c,droppable:f,draggables:m,afterCritical:T}),Q=Na({draggable:c,destination:f,newPageBorderBoxCenter:P,viewport:v.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(Q){var We=On({pageBorderBoxCenter:P,draggable:c,viewport:v});return{clientSelection:We,impact:B,scrollJumpRequest:null}}var qe=ae(P,b),rt=Dn({impact:B,viewport:v,destination:f,draggables:m,maxScrollChange:qe});return{clientSelection:D,impact:rt,scrollJumpRequest:qe}},Nn=function(l){var c=l.subject.active;return c||Me(!1),c},qi=function(o){var l=o.isMovingForward,c=o.pageBorderBoxCenter,f=o.source,m=o.droppables,g=o.viewport,v=f.subject.active;if(!v)return null;var b=f.axis,D=gn(v[b.start],v[b.end]),T=yr(m).filter(function(E){return E!==f}).filter(function(E){return E.isEnabled}).filter(function(E){return!!E.subject.active}).filter(function(E){return mi(g.frame)(Nn(E))}).filter(function(E){var B=Nn(E);return l?v[b.crossAxisEnd]<B[b.crossAxisEnd]:B[b.crossAxisStart]<v[b.crossAxisStart]}).filter(function(E){var B=Nn(E),P=gn(B[b.start],B[b.end]);return D(B[b.start])||D(B[b.end])||P(v[b.start])||P(v[b.end])}).sort(function(E,B){var P=Nn(E)[b.crossAxisStart],Q=Nn(B)[b.crossAxisStart];return l?P-Q:Q-P}).filter(function(E,B,P){return Nn(E)[b.crossAxisStart]===Nn(P[0])[b.crossAxisStart]});if(!T.length)return null;if(T.length===1)return T[0];var w=T.filter(function(E){var B=gn(Nn(E)[b.start],Nn(E)[b.end]);return B(c[b.line])});return w.length===1?w[0]:w.length>1?w.sort(function(E,B){return Nn(E)[b.start]-Nn(B)[b.start]})[0]:T.sort(function(E,B){var P=sr(c,Lr(Nn(E))),Q=sr(c,Lr(Nn(B)));return P!==Q?P-Q:Nn(E)[b.start]-Nn(B)[b.start]})[0]},ns=function(l,c){var f=l.page.borderBox.center;return fn(l.descriptor.id,c)?ae(f,c.displacedBy.point):f},Xi=function(l,c){var f=l.page.borderBox;return fn(l.descriptor.id,c)?tr(f,lt(c.displacedBy.point)):f},wa=function(o){var l=o.pageBorderBoxCenter,c=o.viewport,f=o.destination,m=o.insideDestination,g=o.afterCritical,v=m.filter(function(b){return Kn({target:Xi(b,g),destination:f,viewport:c.frame,withDroppableDisplacement:!0})}).sort(function(b,D){var T=Vt(l,Rn(f,ns(b,g))),w=Vt(l,Rn(f,ns(D,g)));return T<w?-1:w<T?1:b.descriptor.index-D.descriptor.index});return v[0]||null},Wn=Nr(function(l,c){var f=c[l.line];return{value:f,point:ct(l.line,f)}}),Sa=function(l,c,f){var m=l.axis;if(l.descriptor.mode==="virtual")return ct(m.line,c[m.line]);var g=l.subject.page.contentBox[m.size],v=ur(l.descriptor.id,f),b=v.reduce(function(w,E){return w+E.client.marginBox[m.size]},0),D=b+c[m.line],T=D-g;return T<=0?null:ct(m.line,T)},aa=function(l,c){return(0,ge.Z)({},l,{scroll:(0,ge.Z)({},l.scroll,{max:c})})},_a=function(l,c,f){var m=l.frame;mn(c,l)&&Me(!1),l.subject.withPlaceholder&&Me(!1);var g=Wn(l.axis,c.displaceBy).point,v=Sa(l,g,f),b={placeholderSize:g,increasedBy:v,oldFrameMaxScroll:l.frame?l.frame.scroll.max:null};if(!m){var D=Ut({page:l.subject.page,withPlaceholder:b,axis:l.axis,frame:l.frame});return(0,ge.Z)({},l,{subject:D})}var T=v?ne(m.scroll.max,v):m.scroll.max,w=aa(m,T),E=Ut({page:l.subject.page,withPlaceholder:b,axis:l.axis,frame:w});return(0,ge.Z)({},l,{subject:E,frame:w})},mo=function(l){var c=l.subject.withPlaceholder;c||Me(!1);var f=l.frame;if(!f){var m=Ut({page:l.subject.page,axis:l.axis,frame:null,withPlaceholder:null});return(0,ge.Z)({},l,{subject:m})}var g=c.oldFrameMaxScroll;g||Me(!1);var v=aa(f,g),b=Ut({page:l.subject.page,axis:l.axis,frame:v,withPlaceholder:null});return(0,ge.Z)({},l,{subject:b,frame:v})},go=function(o){var l=o.previousPageBorderBoxCenter,c=o.moveRelativeTo,f=o.insideDestination,m=o.draggable,g=o.draggables,v=o.destination,b=o.viewport,D=o.afterCritical;if(!c){if(f.length)return null;var T={displaced:En,displacedBy:Jn,at:{type:"REORDER",destination:{droppableId:v.descriptor.id,index:0}}},w=zi({impact:T,draggable:m,droppable:v,draggables:g,afterCritical:D}),E=mn(m,v)?v:_a(v,m,g),B=Na({draggable:m,destination:E,newPageBorderBoxCenter:w,viewport:b.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return B?T:null}var P=l[v.axis.line]<=c.page.borderBox.center[v.axis.line],Q=function(){var qe=c.descriptor.index;return c.descriptor.id===m.descriptor.id||P?qe:qe+1}(),We=Wn(v.axis,m.displaceBy);return ui({draggable:m,insideDestination:f,destination:v,viewport:b,displacedBy:We,last:En,index:Q})},ki=function(o){var l=o.isMovingForward,c=o.previousPageBorderBoxCenter,f=o.draggable,m=o.isOver,g=o.draggables,v=o.droppables,b=o.viewport,D=o.afterCritical,T=qi({isMovingForward:l,pageBorderBoxCenter:c,source:m,droppables:v,viewport:b});if(!T)return null;var w=ur(T.descriptor.id,g),E=wa({pageBorderBoxCenter:c,viewport:b,destination:T,insideDestination:w,afterCritical:D}),B=go({previousPageBorderBoxCenter:c,destination:T,draggable:f,draggables:g,moveRelativeTo:E,insideDestination:w,viewport:b,afterCritical:D});if(!B)return null;var P=zi({impact:B,draggable:f,droppable:T,draggables:g,afterCritical:D}),Q=On({pageBorderBoxCenter:P,draggable:f,viewport:b});return{clientSelection:Q,impact:B,scrollJumpRequest:null}},vn=function(o){var l=o.at;return l?l.type==="REORDER"?l.destination.droppableId:l.combine.droppableId:null},bn=function(l,c){var f=vn(l);return f?c[f]:null},Ma=function(o){var l=o.state,c=o.type,f=bn(l.impact,l.dimensions.droppables),m=!!f,g=l.dimensions.droppables[l.critical.droppable.id],v=f||g,b=v.axis.direction,D=b==="vertical"&&(c==="MOVE_UP"||c==="MOVE_DOWN")||b==="horizontal"&&(c==="MOVE_LEFT"||c==="MOVE_RIGHT");if(D&&!m)return null;var T=c==="MOVE_DOWN"||c==="MOVE_RIGHT",w=l.dimensions.draggables[l.critical.draggable.id],E=l.current.page.borderBoxCenter,B=l.dimensions,P=B.draggables,Q=B.droppables;return D?Ws({isMovingForward:T,previousPageBorderBoxCenter:E,draggable:w,destination:v,draggables:P,viewport:l.viewport,previousClientSelection:l.current.client.selection,previousImpact:l.impact,afterCritical:l.afterCritical}):ki({isMovingForward:T,previousPageBorderBoxCenter:E,draggable:w,isOver:v,draggables:P,droppables:Q,viewport:l.viewport,afterCritical:l.afterCritical})};function Ji(o){return o.phase==="DRAGGING"||o.phase==="COLLECTING"}function Ca(o){var l=gn(o.top,o.bottom),c=gn(o.left,o.right);return function(m){return l(m.y)&&c(m.x)}}function Vs(o,l){return o.left<l.right&&o.right>l.left&&o.top<l.bottom&&o.bottom>l.top}function is(o){var l=o.pageBorderBox,c=o.draggable,f=o.candidates,m=c.page.borderBox.center,g=f.map(function(v){var b=v.axis,D=ct(v.axis.line,l.center[b.line],v.page.borderBox.center[b.crossAxisLine]);return{id:v.descriptor.id,distance:Vt(m,D)}}).sort(function(v,b){return b.distance-v.distance});return g[0]?g[0].id:null}function yi(o){var l=o.pageBorderBox,c=o.draggable,f=o.droppables,m=yr(f).filter(function(g){if(!g.isEnabled)return!1;var v=g.subject.active;if(!v||!Vs(l,v))return!1;if(Ca(v)(l.center))return!0;var b=g.axis,D=v.center[b.crossAxisLine],T=l[b.crossAxisStart],w=l[b.crossAxisEnd],E=gn(v[b.crossAxisStart],v[b.crossAxisEnd]),B=E(T),P=E(w);return!B&&!P?!0:B?T<D:w>D});return m.length?m.length===1?m[0].descriptor.id:is({pageBorderBox:l,draggable:c,candidates:m}):null}var as=function(l,c){return Gt(tr(l,c))},Zs=function(o,l){var c=o.frame;return c?as(l,c.scroll.diff.value):l};function os(o){var l=o.displaced,c=o.id;return!!(l.visible[c]||l.invisible[c])}function ss(o){var l=o.draggable,c=o.closest,f=o.inHomeList;return c?f&&c.descriptor.index>l.descriptor.index?c.descriptor.index-1:c.descriptor.index:null}var Fa=function(o){var l=o.pageBorderBoxWithDroppableScroll,c=o.draggable,f=o.destination,m=o.insideDestination,g=o.last,v=o.viewport,b=o.afterCritical,D=f.axis,T=Wn(f.axis,c.displaceBy),w=T.value,E=l[D.start],B=l[D.end],P=Tn(c,m),Q=At(P,function(qe){var rt=qe.descriptor.id,pt=qe.page.borderBox.center[D.line],kt=fn(rt,b),It=os({displaced:g,id:rt});return kt?It?B<=pt:E<pt-w:It?B<=pt+w:E<pt}),We=ss({draggable:c,closest:Q,inHomeList:mn(c,f)});return ui({draggable:c,insideDestination:m,destination:f,viewport:v,last:g,displacedBy:T,index:We})},vo=4,bo=function(o){var l=o.draggable,c=o.pageBorderBoxWithDroppableScroll,f=o.previousImpact,m=o.destination,g=o.insideDestination,v=o.afterCritical;if(!m.isCombineEnabled)return null;var b=m.axis,D=Wn(m.axis,l.displaceBy),T=D.value,w=c[b.start],E=c[b.end],B=Tn(l,g),P=At(B,function(We){var qe=We.descriptor.id,rt=We.page.borderBox,pt=rt[b.size],kt=pt/vo,It=fn(qe,v),lr=os({displaced:f.displaced,id:qe});return It?lr?E>rt[b.start]+kt&&E<rt[b.end]-kt:w>rt[b.start]-T+kt&&w<rt[b.end]-T-kt:lr?E>rt[b.start]+T+kt&&E<rt[b.end]+T-kt:w>rt[b.start]+kt&&w<rt[b.end]-kt});if(!P)return null;var Q={displacedBy:D,displaced:f.displaced,at:{type:"COMBINE",combine:{draggableId:P.descriptor.id,droppableId:m.descriptor.id}}};return Q},ls=function(o){var l=o.pageOffset,c=o.draggable,f=o.draggables,m=o.droppables,g=o.previousImpact,v=o.viewport,b=o.afterCritical,D=as(c.page.borderBox,l),T=yi({pageBorderBox:D,draggable:c,droppables:m});if(!T)return ni;var w=m[T],E=ur(w.descriptor.id,f),B=Zs(w,D);return bo({pageBorderBoxWithDroppableScroll:B,draggable:c,previousImpact:g,destination:w,insideDestination:E,afterCritical:b})||Fa({pageBorderBoxWithDroppableScroll:B,draggable:c,destination:w,insideDestination:E,last:g.displaced,viewport:v,afterCritical:b})},Ea=function(o,l){var c;return(0,ge.Z)({},o,(c={},c[l.descriptor.id]=l,c))},cs=function(l){var c=l.previousImpact,f=l.impact,m=l.droppables,g=vn(c),v=vn(f);if(!g||g===v)return m;var b=m[g];if(!b.subject.withPlaceholder)return m;var D=mo(b);return Ea(m,D)},za=function(o){var l=o.draggable,c=o.draggables,f=o.droppables,m=o.previousImpact,g=o.impact,v=cs({previousImpact:m,impact:g,droppables:f}),b=vn(g);if(!b)return v;var D=f[b];if(mn(l,D)||D.subject.withPlaceholder)return v;var T=_a(D,l,c);return Ea(v,T)},ka=function(o){var l=o.state,c=o.clientSelection,f=o.dimensions,m=o.viewport,g=o.impact,v=o.scrollJumpRequest,b=m||l.viewport,D=f||l.dimensions,T=c||l.current.client.selection,w=ae(T,l.initial.client.selection),E={offset:w,selection:T,borderBoxCenter:ne(l.initial.client.borderBoxCenter,w)},B={selection:ne(E.selection,b.scroll.current),borderBoxCenter:ne(E.borderBoxCenter,b.scroll.current),offset:ne(E.offset,b.scroll.diff.value)},P={client:E,page:B};if(l.phase==="COLLECTING")return(0,ge.Z)({phase:"COLLECTING"},l,{dimensions:D,viewport:b,current:P});var Q=D.draggables[l.critical.draggable.id],We=g||ls({pageOffset:B.offset,draggable:Q,draggables:D.draggables,droppables:D.droppables,previousImpact:l.impact,viewport:b,afterCritical:l.afterCritical}),qe=za({draggable:Q,impact:We,previousImpact:l.impact,draggables:D.draggables,droppables:D.droppables}),rt=(0,ge.Z)({},l,{current:P,dimensions:{draggables:D.draggables,droppables:qe},impact:We,viewport:b,scrollJumpRequest:v||null,forceShouldAnimate:v?!1:null});return rt};function js(o,l){return o.map(function(c){return l[c]})}var us=function(o){var l=o.impact,c=o.viewport,f=o.draggables,m=o.destination,g=o.forceShouldAnimate,v=l.displaced,b=js(v.all,f),D=Mi({afterDragging:b,destination:m,displacedBy:l.displacedBy,viewport:c.frame,forceShouldAnimate:g,last:v});return(0,ge.Z)({},l,{displaced:D})},yo=function(o){var l=o.impact,c=o.draggable,f=o.droppable,m=o.draggables,g=o.viewport,v=o.afterCritical,b=zi({impact:l,draggable:c,draggables:m,droppable:f,afterCritical:v});return On({pageBorderBoxCenter:b,draggable:c,viewport:g})},ds=function(o){var l=o.state,c=o.dimensions,f=o.viewport;l.movementMode!=="SNAP"&&Me(!1);var m=l.impact,g=f||l.viewport,v=c||l.dimensions,b=v.draggables,D=v.droppables,T=b[l.critical.draggable.id],w=vn(m);w||Me(!1);var E=D[w],B=us({impact:m,viewport:g,destination:E,draggables:b}),P=yo({impact:B,draggable:T,droppable:E,draggables:b,viewport:g,afterCritical:l.afterCritical});return ka({impact:B,clientSelection:P,state:l,dimensions:v,viewport:g})},Da=function(o){return{index:o.index,droppableId:o.droppableId}},xo=function(o){var l=o.draggable,c=o.home,f=o.draggables,m=o.viewport,g=Wn(c.axis,l.displaceBy),v=ur(c.descriptor.id,f),b=v.indexOf(l);b===-1&&Me(!1);var D=v.slice(b+1),T=D.reduce(function(P,Q){return P[Q.descriptor.id]=!0,P},{}),w={inVirtualList:c.descriptor.mode==="virtual",displacedBy:g,effected:T},E=Mi({afterDragging:D,destination:c,displacedBy:g,last:null,viewport:m.frame,forceShouldAnimate:!1}),B={displaced:E,displacedBy:g,at:{type:"REORDER",destination:Da(l.descriptor)}};return{impact:B,afterCritical:w}},Us=function(o,l){return{draggables:o.draggables,droppables:Ea(o.droppables,l)}},Ka=function(l){},Or=function(l){},Zr=function(o){var l=o.draggable,c=o.offset,f=o.initialWindowScroll,m=nn(l.client,c),g=Zt(m,f),v=(0,ge.Z)({},l,{placeholder:(0,ge.Z)({},l.placeholder,{client:m}),client:m,page:g});return v},Yr=function(o){var l=o.frame;return l||Me(!1),l},ai=function(o){var l=o.additions,c=o.updatedDroppables,f=o.viewport,m=f.scroll.diff.value;return l.map(function(g){var v=g.descriptor.droppableId,b=c[v],D=Yr(b),T=D.scroll.diff.value,w=ne(m,T),E=Zr({draggable:g,offset:w,initialWindowScroll:f.scroll.initial});return E})},Vn=function(o){var l=o.state,c=o.published;Ka();var f=c.modified.map(function(kt){var It=l.dimensions.droppables[kt.droppableId],lr=Qt(It,kt.scroll);return lr}),m=(0,ge.Z)({},l.dimensions.droppables,{},ar(f)),g=zt(ai({additions:c.additions,updatedDroppables:m,viewport:l.viewport})),v=(0,ge.Z)({},l.dimensions.draggables,{},g);c.removals.forEach(function(kt){delete v[kt]});var b={droppables:m,draggables:v},D=vn(l.impact),T=D?b.droppables[D]:null,w=b.draggables[l.critical.draggable.id],E=b.droppables[l.critical.droppable.id],B=xo({draggable:w,home:E,draggables:v,viewport:l.viewport}),P=B.impact,Q=B.afterCritical,We=T&&T.isCombineEnabled?l.impact:P,qe=ls({pageOffset:l.current.page.offset,draggable:b.draggables[l.critical.draggable.id],draggables:b.draggables,droppables:b.droppables,previousImpact:We,viewport:l.viewport,afterCritical:Q});Or();var rt=(0,ge.Z)({phase:"DRAGGING"},l,{phase:"DRAGGING",impact:qe,onLiftImpact:P,dimensions:b,afterCritical:Q,forceShouldAnimate:!1});if(l.phase==="COLLECTING")return rt;var pt=(0,ge.Z)({phase:"DROP_PENDING"},rt,{phase:"DROP_PENDING",reason:l.reason,isWaiting:!1});return pt},Aa=function(l){return l.movementMode==="SNAP"},oa=function(l,c,f){var m=Us(l.dimensions,c);return!Aa(l)||f?ka({state:l,dimensions:m}):ds({state:l,dimensions:m})};function Fo(o){return o.isDragging&&o.movementMode==="SNAP"?(0,ge.Z)({phase:"DRAGGING"},o,{scrollJumpRequest:null}):o}var zo={phase:"IDLE",completed:null,shouldFlush:!1},fs=function(o,l){if(o===void 0&&(o=zo),l.type==="FLUSH")return(0,ge.Z)({},zo,{shouldFlush:!0});if(l.type==="INITIAL_PUBLISH"){o.phase!=="IDLE"&&Me(!1);var c=l.payload,f=c.critical,m=c.clientSelection,g=c.viewport,v=c.dimensions,b=c.movementMode,D=v.draggables[f.draggable.id],T=v.droppables[f.droppable.id],w={selection:m,borderBoxCenter:D.client.borderBox.center,offset:j},E={client:w,page:{selection:ne(w.selection,g.scroll.initial),borderBoxCenter:ne(w.selection,g.scroll.initial),offset:ne(w.selection,g.scroll.diff.value)}},B=yr(v.droppables).every(function($l){return!$l.isFixedOnPage}),P=xo({draggable:D,home:T,draggables:v.draggables,viewport:g}),Q=P.impact,We=P.afterCritical,qe={phase:"DRAGGING",isDragging:!0,critical:f,movementMode:b,dimensions:v,initial:E,current:E,isWindowScrollAllowed:B,impact:Q,afterCritical:We,onLiftImpact:Q,viewport:g,scrollJumpRequest:null,forceShouldAnimate:null};return qe}if(l.type==="COLLECTION_STARTING"){if(o.phase==="COLLECTING"||o.phase==="DROP_PENDING")return o;o.phase!=="DRAGGING"&&Me(!1);var rt=(0,ge.Z)({phase:"COLLECTING"},o,{phase:"COLLECTING"});return rt}if(l.type==="PUBLISH_WHILE_DRAGGING")return o.phase==="COLLECTING"||o.phase==="DROP_PENDING"||Me(!1),Vn({state:o,published:l.payload});if(l.type==="MOVE"){if(o.phase==="DROP_PENDING")return o;Ji(o)||Me(!1);var pt=l.payload.client;return Be(pt,o.current.client.selection)?o:ka({state:o,clientSelection:pt,impact:Aa(o)?o.impact:null})}if(l.type==="UPDATE_DROPPABLE_SCROLL"){if(o.phase==="DROP_PENDING"||o.phase==="COLLECTING")return Fo(o);Ji(o)||Me(!1);var kt=l.payload,It=kt.id,lr=kt.newScroll,Pt=o.dimensions.droppables[It];if(!Pt)return o;var vr=Qt(Pt,lr);return oa(o,vr,!1)}if(l.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(o.phase==="DROP_PENDING")return o;Ji(o)||Me(!1);var pn=l.payload,br=pn.id,Kr=pn.isEnabled,jn=o.dimensions.droppables[br];jn||Me(!1),jn.isEnabled===Kr&&Me(!1);var Ln=(0,ge.Z)({},jn,{isEnabled:Kr});return oa(o,Ln,!0)}if(l.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(o.phase==="DROP_PENDING")return o;Ji(o)||Me(!1);var xi=l.payload,Wi=xi.id,Bi=xi.isCombineEnabled,Ii=o.dimensions.droppables[Wi];Ii||Me(!1),Ii.isCombineEnabled===Bi&&Me(!1);var ei=(0,ge.Z)({},Ii,{isCombineEnabled:Bi});return oa(o,ei,!0)}if(l.type==="MOVE_BY_WINDOW_SCROLL"){if(o.phase==="DROP_PENDING"||o.phase==="DROP_ANIMATING")return o;Ji(o)||Me(!1),o.isWindowScrollAllowed||Me(!1);var to=l.payload.newScroll;if(Be(o.viewport.scroll.current,to))return Fo(o);var ma=zr(o.viewport,to);return Aa(o)?ds({state:o,viewport:ma}):ka({state:o,viewport:ma})}if(l.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Ji(o))return o;var Pa=l.payload.maxScroll;if(Be(Pa,o.viewport.scroll.max))return o;var Qi=(0,ge.Z)({},o.viewport,{scroll:(0,ge.Z)({},o.viewport.scroll,{max:Pa})});return(0,ge.Z)({phase:"DRAGGING"},o,{viewport:Qi})}if(l.type==="MOVE_UP"||l.type==="MOVE_DOWN"||l.type==="MOVE_LEFT"||l.type==="MOVE_RIGHT"){if(o.phase==="COLLECTING"||o.phase==="DROP_PENDING")return o;o.phase!=="DRAGGING"&&Me(!1);var ga=Ma({state:o,type:l.type});return ga?ka({state:o,impact:ga.impact,clientSelection:ga.clientSelection,scrollJumpRequest:ga.scrollJumpRequest}):o}if(l.type==="DROP_PENDING"){var li=l.payload.reason;o.phase!=="COLLECTING"&&Me(!1);var wi=(0,ge.Z)({phase:"DROP_PENDING"},o,{phase:"DROP_PENDING",isWaiting:!0,reason:li});return wi}if(l.type==="DROP_ANIMATE"){var Bl=l.payload,ea=Bl.completed,To=Bl.dropDuration,ks=Bl.newHomeClientOffset;o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||Me(!1);var Jo={phase:"DROP_ANIMATING",completed:ea,dropDuration:To,newHomeClientOffset:ks,dimensions:o.dimensions};return Jo}if(l.type==="DROP_COMPLETE"){var Il=l.payload.completed;return{phase:"IDLE",completed:Il,shouldFlush:!1}}return o},sa=function(l){return{type:"BEFORE_INITIAL_CAPTURE",payload:l}},La=function(l){return{type:"LIFT",payload:l}},Gs=function(l){return{type:"INITIAL_PUBLISH",payload:l}},ou=function(l){return{type:"PUBLISH_WHILE_DRAGGING",payload:l}},su=function(){return{type:"COLLECTION_STARTING",payload:null}},lu=function(l){return{type:"UPDATE_DROPPABLE_SCROLL",payload:l}},cu=function(l){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:l}},uu=function(l){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:l}},ec=function(l){return{type:"MOVE",payload:l}},hs=function(l){return{type:"MOVE_BY_WINDOW_SCROLL",payload:l}},du=function(l){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:l}},fu=function(){return{type:"MOVE_UP",payload:null}},hu=function(){return{type:"MOVE_DOWN",payload:null}},pu=function(){return{type:"MOVE_RIGHT",payload:null}},mu=function(){return{type:"MOVE_LEFT",payload:null}},Fn=function(){return{type:"FLUSH",payload:null}},Ba=function(l){return{type:"DROP_ANIMATE",payload:l}},la=function(l){return{type:"DROP_COMPLETE",payload:l}},tc=function(l){return{type:"DROP",payload:l}},rc=function(l){return{type:"DROP_PENDING",payload:l}},nc=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function u0(o){if(!(o.length<=1)){for(var l=o.map(function(b){return b.descriptor.index}),c={},f=1;f<l.length;f++){var m=l[f],g=l[f-1];m!==g+1&&(c[m]=!0)}if(Object.keys(c).length)var v=l.map(function(b){var D=!!c[b];return D?"[\u{1F525}"+b+"]":""+b}).join(", ")}}function ic(o,l){if(0)var c}var gu=function(o){return function(l){var c=l.getState,f=l.dispatch;return function(m){return function(g){if(g.type!=="LIFT"){m(g);return}var v=g.payload,b=v.id,D=v.clientSelection,T=v.movementMode,w=c();w.phase==="DROP_ANIMATING"&&f(la({completed:w.completed})),c().phase!=="IDLE"&&Me(!1),f(Fn()),f(sa({draggableId:b,movementMode:T}));var E={shouldPublishImmediately:T==="SNAP"},B={draggableId:b,scrollOptions:E},P=o.startPublishing(B),Q=P.critical,We=P.dimensions,qe=P.viewport;ic(Q,We),f(Gs({critical:Q,dimensions:We,clientSelection:D,movementMode:T,viewport:qe}))}}}},vu=function(o){return function(){return function(l){return function(c){c.type==="INITIAL_PUBLISH"&&o.dragging(),c.type==="DROP_ANIMATE"&&o.dropping(c.payload.completed.result.reason),(c.type==="FLUSH"||c.type==="DROP_COMPLETE")&&o.resting(),l(c)}}}},qs={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Ha={opacity:{drop:0,combining:.7},scale:{drop:.75}},Xs={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Wa=Xs.outOfTheWay+"s "+qs.outOfTheWay,wo={fluid:"opacity "+Wa,snap:"transform "+Wa+", opacity "+Wa,drop:function(l){var c=l+"s "+qs.drop;return"transform "+c+", opacity "+c},outOfTheWay:"transform "+Wa,placeholder:"height "+Wa+", width "+Wa+", margin "+Wa},Js=function(l){return Be(l,j)?null:"translate("+l.x+"px, "+l.y+"px)"},Ki={moveTo:Js,drop:function(l,c){var f=Js(l);return f?c?f+" scale("+Ha.scale.drop+")":f:null}},ps=Xs.minDropTime,Ys=Xs.maxDropTime,bu=Ys-ps,ac=1500,yu=.6,xu=function(o){var l=o.current,c=o.destination,f=o.reason,m=Vt(l,c);if(m<=0)return ps;if(m>=ac)return Ys;var g=m/ac,v=ps+bu*g,b=f==="CANCEL"?v*yu:v;return Number(b.toFixed(2))},oc=function(o){var l=o.impact,c=o.draggable,f=o.dimensions,m=o.viewport,g=o.afterCritical,v=f.draggables,b=f.droppables,D=vn(l),T=D?b[D]:null,w=b[c.descriptor.droppableId],E=yo({impact:l,draggable:c,draggables:v,afterCritical:g,droppable:T||w,viewport:m}),B=ae(E,c.client.borderBox.center);return B},wu=function(o){var l=o.draggables,c=o.reason,f=o.lastImpact,m=o.home,g=o.viewport,v=o.onLiftImpact;if(!f.at||c!=="DROP"){var b=us({draggables:l,impact:v,destination:m,viewport:g,forceShouldAnimate:!0});return{impact:b,didDropInsideDroppable:!1}}if(f.at.type==="REORDER")return{impact:f,didDropInsideDroppable:!0};var D=(0,ge.Z)({},f,{displaced:En});return{impact:D,didDropInsideDroppable:!0}},Su=function(o){var l=o.getState,c=o.dispatch;return function(f){return function(m){if(m.type!=="DROP"){f(m);return}var g=l(),v=m.payload.reason;if(g.phase==="COLLECTING"){c(rc({reason:v}));return}if(g.phase!=="IDLE"){var b=g.phase==="DROP_PENDING"&&g.isWaiting;b&&Me(!1),g.phase==="DRAGGING"||g.phase==="DROP_PENDING"||Me(!1);var D=g.critical,T=g.dimensions,w=T.draggables[g.critical.draggable.id],E=wu({reason:v,lastImpact:g.impact,afterCritical:g.afterCritical,onLiftImpact:g.onLiftImpact,home:g.dimensions.droppables[g.critical.droppable.id],viewport:g.viewport,draggables:g.dimensions.draggables}),B=E.impact,P=E.didDropInsideDroppable,Q=P?rn(B):null,We=P?Tr(B):null,qe={index:D.draggable.index,droppableId:D.droppable.id},rt={draggableId:w.descriptor.id,type:w.descriptor.type,source:qe,reason:v,mode:g.movementMode,destination:Q,combine:We},pt=oc({impact:B,draggable:w,dimensions:T,viewport:g.viewport,afterCritical:g.afterCritical}),kt={critical:g.critical,afterCritical:g.afterCritical,result:rt,impact:B},It=!Be(g.current.client.offset,pt)||!!rt.combine;if(!It){c(la({completed:kt}));return}var lr=xu({current:g.current.client.offset,destination:pt,reason:v}),Pt={newHomeClientOffset:pt,dropDuration:lr,completed:kt};c(Ba(Pt))}}}},sc=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function _u(o){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(c){c.target!==window&&c.target!==window.document||o()}}}function Mu(o){var l=o.onWindowScroll;function c(){l(sc())}var f=$n(c),m=_u(f),g=St;function v(){return g!==St}function b(){v()&&Me(!1),g=jt(window,[m])}function D(){v()||Me(!1),f.cancel(),g(),g=St}return{start:b,stop:D,isActive:v}}var Cu=function(l){return l.type==="DROP_COMPLETE"||l.type==="DROP_ANIMATE"||l.type==="FLUSH"},ca=function(o){var l=Mu({onWindowScroll:function(f){o.dispatch(hs({newScroll:f}))}});return function(c){return function(f){!l.isActive()&&f.type==="INITIAL_PUBLISH"&&l.start(),l.isActive()&&Cu(f)&&l.stop(),c(f)}}},lc=function(o){var l=!1,c=!1,f=setTimeout(function(){c=!0}),m=function(v){l||c||(l=!0,o(v),clearTimeout(f))};return m.wasCalled=function(){return l},m},Ia=function(){var o=[],l=function(g){var v=kr(o,function(T){return T.timerId===g});v===-1&&Me(!1);var b=o.splice(v,1),D=b[0];D.callback()},c=function(g){var v=setTimeout(function(){return l(v)}),b={timerId:v,callback:g};o.push(b)},f=function(){if(o.length){var g=[].concat(o);o.length=0,g.forEach(function(v){clearTimeout(v.timerId),v.callback()})}};return{add:c,flush:f}},Eu=function(l,c){return l==null&&c==null?!0:l==null||c==null?!1:l.droppableId===c.droppableId&&l.index===c.index},cc=function(l,c){return l==null&&c==null?!0:l==null||c==null?!1:l.draggableId===c.draggableId&&l.droppableId===c.droppableId},uc=function(l,c){if(l===c)return!0;var f=l.draggable.id===c.draggable.id&&l.draggable.droppableId===c.draggable.droppableId&&l.draggable.type===c.draggable.type&&l.draggable.index===c.draggable.index,m=l.droppable.id===c.droppable.id&&l.droppable.type===c.droppable.type;return f&&m},Ko=function(l,c){Ka(),c(),Or()},Ho=function(l,c){return{draggableId:l.draggable.id,type:l.droppable.type,source:{droppableId:l.droppable.id,index:l.draggable.index},mode:c}},Qs=function(l,c,f,m){if(!l){f(m(c));return}var g=lc(f),v={announce:g};l(c,v),g.wasCalled()||f(m(c))},ku=function(o,l){var c=Ia(),f=null,m=function(B,P){f&&Me(!1),Ko("onBeforeCapture",function(){var Q=o().onBeforeCapture;if(Q){var We={draggableId:B,mode:P};Q(We)}})},g=function(B,P){f&&Me(!1),Ko("onBeforeDragStart",function(){var Q=o().onBeforeDragStart;Q&&Q(Ho(B,P))})},v=function(B,P){f&&Me(!1);var Q=Ho(B,P);f={mode:P,lastCritical:B,lastLocation:Q.source,lastCombine:null},c.add(function(){Ko("onDragStart",function(){return Qs(o().onDragStart,Q,l,ke.onDragStart)})})},b=function(B,P){var Q=rn(P),We=Tr(P);f||Me(!1);var qe=!uc(B,f.lastCritical);qe&&(f.lastCritical=B);var rt=!Eu(f.lastLocation,Q);rt&&(f.lastLocation=Q);var pt=!cc(f.lastCombine,We);if(pt&&(f.lastCombine=We),!(!qe&&!rt&&!pt)){var kt=(0,ge.Z)({},Ho(B,f.mode),{combine:We,destination:Q});c.add(function(){Ko("onDragUpdate",function(){return Qs(o().onDragUpdate,kt,l,ke.onDragUpdate)})})}},D=function(){f||Me(!1),c.flush()},T=function(B){f||Me(!1),f=null,Ko("onDragEnd",function(){return Qs(o().onDragEnd,B,l,ke.onDragEnd)})},w=function(){if(f){var B=(0,ge.Z)({},Ho(f.lastCritical,f.mode),{combine:null,destination:null,reason:"CANCEL"});T(B)}};return{beforeCapture:m,beforeStart:g,start:v,update:b,flush:D,drop:T,abort:w}},Du=function(o,l){var c=ku(o,l);return function(f){return function(m){return function(g){if(g.type==="BEFORE_INITIAL_CAPTURE"){c.beforeCapture(g.payload.draggableId,g.payload.movementMode);return}if(g.type==="INITIAL_PUBLISH"){var v=g.payload.critical;c.beforeStart(v,g.payload.movementMode),m(g),c.start(v,g.payload.movementMode);return}if(g.type==="DROP_COMPLETE"){var b=g.payload.completed.result;c.flush(),m(g),c.drop(b);return}if(m(g),g.type==="FLUSH"){c.abort();return}var D=f.getState();D.phase==="DRAGGING"&&c.update(D.critical,D.impact)}}}},Au=function(o){return function(l){return function(c){if(c.type!=="DROP_ANIMATION_FINISHED"){l(c);return}var f=o.getState();f.phase!=="DROP_ANIMATING"&&Me(!1),o.dispatch(la({completed:f.completed}))}}},Lu=function(o){var l=null,c=null;function f(){c&&(cancelAnimationFrame(c),c=null),l&&(l(),l=null)}return function(m){return function(g){if((g.type==="FLUSH"||g.type==="DROP_COMPLETE"||g.type==="DROP_ANIMATION_FINISHED")&&f(),m(g),g.type==="DROP_ANIMATE"){var v={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var D=o.getState();D.phase==="DROP_ANIMATING"&&o.dispatch(nc())}};c=requestAnimationFrame(function(){c=null,l=jt(window,[v])})}}}},Bu=function(o){return function(){return function(l){return function(c){(c.type==="DROP_COMPLETE"||c.type==="FLUSH"||c.type==="DROP_ANIMATE")&&o.stopPublishing(),l(c)}}}},Iu=function(o){var l=!1;return function(){return function(c){return function(f){if(f.type==="INITIAL_PUBLISH"){l=!0,o.tryRecordFocus(f.payload.critical.draggable.id),c(f),o.tryRestoreFocusRecorded();return}if(c(f),!!l){if(f.type==="FLUSH"){l=!1,o.tryRestoreFocusRecorded();return}if(f.type==="DROP_COMPLETE"){l=!1;var m=f.payload.completed.result;m.combine&&o.tryShiftRecord(m.draggableId,m.combine.draggableId),o.tryRestoreFocusRecorded()}}}}}},$u=function(l){return l.type==="DROP_COMPLETE"||l.type==="DROP_ANIMATE"||l.type==="FLUSH"},Tu=function(o){return function(l){return function(c){return function(f){if($u(f)){o.stop(),c(f);return}if(f.type==="INITIAL_PUBLISH"){c(f);var m=l.getState();m.phase!=="DRAGGING"&&Me(!1),o.start(m);return}c(f),o.scroll(l.getState())}}}},el=function(o){return function(l){return function(c){if(l(c),c.type==="PUBLISH_WHILE_DRAGGING"){var f=o.getState();f.phase==="DROP_PENDING"&&(f.isWaiting||o.dispatch(tc({reason:f.reason})))}}}},Pu=H.qC,Ru=function(o){var l=o.dimensionMarshal,c=o.focusMarshal,f=o.styleMarshal,m=o.getResponders,g=o.announce,v=o.autoScroller;return(0,H.MT)(fs,Pu((0,H.md)(vu(f),Bu(l),gu(l),Su,Au,Lu,el,Tu(v),ca,Iu(c),Du(m,g))))},tl=function(){return{additions:{},removals:{},modified:{}}};function Ou(o){var l=o.registry,c=o.callbacks,f=tl(),m=null,g=function(){m||(c.collectionStarting(),m=requestAnimationFrame(function(){m=null,Ka();var w=f,E=w.additions,B=w.removals,P=w.modified,Q=Object.keys(E).map(function(rt){return l.draggable.getById(rt).getDimension(j)}).sort(function(rt,pt){return rt.descriptor.index-pt.descriptor.index}),We=Object.keys(P).map(function(rt){var pt=l.droppable.getById(rt),kt=pt.callbacks.getScrollWhileDragging();return{droppableId:rt,scroll:kt}}),qe={additions:Q,removals:Object.keys(B),modified:We};f=tl(),Or(),c.publish(qe)}))},v=function(w){var E=w.descriptor.id;f.additions[E]=w,f.modified[w.descriptor.droppableId]=!0,f.removals[E]&&delete f.removals[E],g()},b=function(w){var E=w.descriptor;f.removals[E.id]=!0,f.modified[E.droppableId]=!0,f.additions[E.id]&&delete f.additions[E.id],g()},D=function(){m&&(cancelAnimationFrame(m),m=null,f=tl())};return{add:v,remove:b,stop:D}}var dc=function(o){var l=o.scrollHeight,c=o.scrollWidth,f=o.height,m=o.width,g=ae({x:c,y:l},{x:m,y:f}),v={x:Math.max(0,g.x),y:Math.max(0,g.y)};return v},So=function(){var o=document.documentElement;return o||Me(!1),o},_o=function(){var o=So(),l=dc({scrollHeight:o.scrollHeight,scrollWidth:o.scrollWidth,width:o.clientWidth,height:o.clientHeight});return l},fc=function(){var o=sc(),l=_o(),c=o.y,f=o.x,m=So(),g=m.clientWidth,v=m.clientHeight,b=f+g,D=c+v,T=Gt({top:c,left:f,right:b,bottom:D}),w={frame:T,scroll:{initial:o,current:o,max:l,diff:{value:j,displacement:j}}};return w},Nu=function(o){var l=o.critical,c=o.scrollOptions,f=o.registry;Ka();var m=fc(),g=m.scroll.current,v=l.droppable,b=f.droppable.getAllByType(v.type).map(function(E){return E.callbacks.getDimensionAndWatchScroll(g,c)}),D=f.draggable.getAllByType(l.draggable.type).map(function(E){return E.getDimension(g)}),T={draggables:zt(D),droppables:ar(b)};Or();var w={dimensions:T,critical:l,viewport:m};return w};function hc(o,l,c){if(c.descriptor.id===l.id||c.descriptor.type!==l.type)return!1;var f=o.droppable.getById(c.descriptor.droppableId);return f.descriptor.mode==="virtual"}var Fu=function(o,l){var c=null,f=Ou({callbacks:{publish:l.publishWhileDragging,collectionStarting:l.collectionStarting},registry:o}),m=function(P,Q){o.droppable.exists(P)||Me(!1),c&&l.updateDroppableIsEnabled({id:P,isEnabled:Q})},g=function(P,Q){c&&(o.droppable.exists(P)||Me(!1),l.updateDroppableIsCombineEnabled({id:P,isCombineEnabled:Q}))},v=function(P,Q){c&&(o.droppable.exists(P)||Me(!1),l.updateDroppableScroll({id:P,newScroll:Q}))},b=function(P,Q){c&&o.droppable.getById(P).callbacks.scroll(Q)},D=function(){if(c){f.stop();var P=c.critical.droppable;o.droppable.getAllByType(P.type).forEach(function(Q){return Q.callbacks.dragStopped()}),c.unsubscribe(),c=null}},T=function(P){c||Me(!1);var Q=c.critical.draggable;P.type==="ADDITION"&&hc(o,Q,P.value)&&f.add(P.value),P.type==="REMOVAL"&&hc(o,Q,P.value)&&f.remove(P.value)},w=function(P){c&&Me(!1);var Q=o.draggable.getById(P.draggableId),We=o.droppable.getById(Q.descriptor.droppableId),qe={draggable:Q.descriptor,droppable:We.descriptor},rt=o.subscribe(T);return c={critical:qe,unsubscribe:rt},Nu({critical:qe,registry:o,scrollOptions:P.scrollOptions})},E={updateDroppableIsEnabled:m,updateDroppableIsCombineEnabled:g,scrollDroppable:b,updateDroppableScroll:v,startPublishing:w,stopPublishing:D};return E},pc=function(o,l){return o.phase==="IDLE"?!0:o.phase!=="DROP_ANIMATING"||o.completed.result.draggableId===l?!1:o.completed.result.reason==="DROP"},rl=function(o){window.scrollBy(o.x,o.y)},zu=Nr(function(o){return yr(o).filter(function(l){return!(!l.isEnabled||!l.frame)})}),Ku=function(l,c){var f=At(zu(c),function(m){return m.frame||Me(!1),Ca(m.frame.pageMarginBox)(l)});return f},Hu=function(o){var l=o.center,c=o.destination,f=o.droppables;if(c){var m=f[c];return m.frame?m:null}var g=Ku(l,f);return g},Di={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(l){return Math.pow(l,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},nl=function(o,l){var c=o[l.size]*Di.startFromPercentage,f=o[l.size]*Di.maxScrollAtPercentage,m={startScrollingFrom:c,maxScrollValueAt:f};return m},mc=function(o){var l=o.startOfRange,c=o.endOfRange,f=o.current,m=c-l;if(m===0)return 0;var g=f-l,v=g/m;return v},ms=1,Wu=function(o,l){if(o>l.startScrollingFrom)return 0;if(o<=l.maxScrollValueAt)return Di.maxPixelScroll;if(o===l.startScrollingFrom)return ms;var c=mc({startOfRange:l.maxScrollValueAt,endOfRange:l.startScrollingFrom,current:o}),f=1-c,m=Di.maxPixelScroll*Di.ease(f);return Math.ceil(m)},gc=Di.durationDampening.accelerateAt,vc=Di.durationDampening.stopDampeningAt,il=function(o,l){var c=l,f=vc,m=Date.now(),g=m-c;if(g>=vc)return o;if(g<gc)return ms;var v=mc({startOfRange:gc,endOfRange:f,current:g}),b=o*Di.ease(v);return Math.ceil(b)},gs=function(o){var l=o.distanceToEdge,c=o.thresholds,f=o.dragStartTime,m=o.shouldUseTimeDampening,g=Wu(l,c);return g===0?0:m?Math.max(il(g,f),ms):g},vs=function(o){var l=o.container,c=o.distanceToEdges,f=o.dragStartTime,m=o.axis,g=o.shouldUseTimeDampening,v=nl(l,m),b=c[m.end]<c[m.start];return b?gs({distanceToEdge:c[m.end],thresholds:v,dragStartTime:f,shouldUseTimeDampening:g}):-1*gs({distanceToEdge:c[m.start],thresholds:v,dragStartTime:f,shouldUseTimeDampening:g})},Vu=function(o){var l=o.container,c=o.subject,f=o.proposedScroll,m=c.height>l.height,g=c.width>l.width;return!g&&!m?f:g&&m?null:{x:g?0:f.x,y:m?0:f.y}},Zu=mr(function(o){return o===0?0:o}),bc=function(o){var l=o.dragStartTime,c=o.container,f=o.subject,m=o.center,g=o.shouldUseTimeDampening,v={top:m.y-c.top,right:c.right-m.x,bottom:c.bottom-m.y,left:m.x-c.left},b=vs({container:c,distanceToEdges:v,dragStartTime:l,axis:Pn,shouldUseTimeDampening:g}),D=vs({container:c,distanceToEdges:v,dragStartTime:l,axis:Sn,shouldUseTimeDampening:g}),T=Zu({x:D,y:b});if(Be(T,j))return null;var w=Vu({container:c,subject:f,proposedScroll:T});return w?Be(w,j)?null:w:null},al=mr(function(o){return o===0?0:o>0?1:-1}),Wo=function(){var o=function(c,f){return c<0?c:c>f?c-f:0};return function(l){var c=l.current,f=l.max,m=l.change,g=ne(c,m),v={x:o(g.x,f.x),y:o(g.y,f.y)};return Be(v,j)?null:v}}(),bs=function(l){var c=l.max,f=l.current,m=l.change,g={x:Math.max(f.x,c.x),y:Math.max(f.y,c.y)},v=al(m),b=Wo({max:g,current:f,change:v});return!b||v.x!==0&&b.x===0||v.y!==0&&b.y===0},Vo=function(l,c){return bs({current:l.scroll.current,max:l.scroll.max,change:c})},ju=function(l,c){if(!Vo(l,c))return null;var f=l.scroll.max,m=l.scroll.current;return Wo({current:m,max:f,change:c})},ys=function(l,c){var f=l.frame;return f?bs({current:f.scroll.current,max:f.scroll.max,change:c}):!1},ol=function(l,c){var f=l.frame;return!f||!ys(l,c)?null:Wo({current:f.scroll.current,max:f.scroll.max,change:c})},Uu=function(o){var l=o.viewport,c=o.subject,f=o.center,m=o.dragStartTime,g=o.shouldUseTimeDampening,v=bc({dragStartTime:m,container:l.frame,subject:c,center:f,shouldUseTimeDampening:g});return v&&Vo(l,v)?v:null},Gu=function(o){var l=o.droppable,c=o.subject,f=o.center,m=o.dragStartTime,g=o.shouldUseTimeDampening,v=l.frame;if(!v)return null;var b=bc({dragStartTime:m,container:v.pageMarginBox,subject:c,center:f,shouldUseTimeDampening:g});return b&&ys(l,b)?b:null},yc=function(o){var l=o.state,c=o.dragStartTime,f=o.shouldUseTimeDampening,m=o.scrollWindow,g=o.scrollDroppable,v=l.current.page.borderBoxCenter,b=l.dimensions.draggables[l.critical.draggable.id],D=b.page.marginBox;if(l.isWindowScrollAllowed){var T=l.viewport,w=Uu({dragStartTime:c,viewport:T,subject:D,center:v,shouldUseTimeDampening:f});if(w){m(w);return}}var E=Hu({center:v,destination:vn(l.impact),droppables:l.dimensions.droppables});if(E){var B=Gu({dragStartTime:c,droppable:E,subject:D,center:v,shouldUseTimeDampening:f});B&&g(E.descriptor.id,B)}},qu=function(o){var l=o.scrollWindow,c=o.scrollDroppable,f=$n(l),m=$n(c),g=null,v=function(w){g||Me(!1);var E=g,B=E.shouldUseTimeDampening,P=E.dragStartTime;yc({state:w,scrollWindow:f,scrollDroppable:m,dragStartTime:P,shouldUseTimeDampening:B})},b=function(w){Ka(),g&&Me(!1);var E=Date.now(),B=!1,P=function(){B=!0};yc({state:w,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:P,scrollDroppable:P}),g={dragStartTime:E,shouldUseTimeDampening:B},Or(),B&&v(w)},D=function(){g&&(f.cancel(),m.cancel(),g=null)};return{start:b,stop:D,scroll:v}},sl=function(o){var l=o.move,c=o.scrollDroppable,f=o.scrollWindow,m=function(T,w){var E=ne(T.current.client.selection,w);l({client:E})},g=function(T,w){if(!ys(T,w))return w;var E=ol(T,w);if(!E)return c(T.descriptor.id,w),null;var B=ae(w,E);c(T.descriptor.id,B);var P=ae(w,B);return P},v=function(T,w,E){if(!T||!Vo(w,E))return E;var B=ju(w,E);if(!B)return f(E),null;var P=ae(E,B);f(P);var Q=ae(E,P);return Q},b=function(T){var w=T.scrollJumpRequest;if(w){var E=vn(T.impact);E||Me(!1);var B=g(T.dimensions.droppables[E],w);if(B){var P=T.viewport,Q=v(T.isWindowScrollAllowed,P,B);Q&&m(T,Q)}}};return b},wt=function(o){var l=o.scrollDroppable,c=o.scrollWindow,f=o.move,m=qu({scrollWindow:c,scrollDroppable:l}),g=sl({move:f,scrollWindow:c,scrollDroppable:l}),v=function(T){if(T.phase==="DRAGGING"){if(T.movementMode==="FLUID"){m.scroll(T);return}T.scrollJumpRequest&&g(T)}},b={scroll:v,start:m.start,stop:m.stop};return b},oi="data-rbd",Mo=function(){var o=oi+"-drag-handle";return{base:o,draggableId:o+"-draggable-id",contextId:o+"-context-id"}}(),ll=function(){var o=oi+"-draggable";return{base:o,contextId:o+"-context-id",id:o+"-id"}}(),hi=function(){var o=oi+"-droppable";return{base:o,contextId:o+"-context-id",id:o+"-id"}}(),Zo={contextId:oi+"-scroll-container-context-id"},Xu=function(l){return function(c){return"["+c+'="'+l+'"]'}},xs=function(l,c){return l.map(function(f){var m=f.styles[c];return m?f.selector+" { "+m+" }":""}).join(" ")},d0="pointer-events: none;",jo=function(o){var l=Xu(o),c=function(){var b=`
|
|
|
cursor: -webkit-grab;
|
|
|
cursor: grab;
|
|
|
`;return{selector:l(Mo.contextId),styles:{always:`
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
touch-action: manipulation;
|
|
|
`,resting:b,dragging:d0,dropAnimating:b}}}(),f=function(){var b=`
|
|
|
transition: `+wo.outOfTheWay+`;
|
|
|
`;return{selector:l(ll.contextId),styles:{dragging:b,dropAnimating:b,userCancel:b}}}(),m={selector:l(hi.contextId),styles:{always:"overflow-anchor: none;"}},g={selector:"body",styles:{dragging:`
|
|
|
cursor: grabbing;
|
|
|
cursor: -webkit-grabbing;
|
|
|
user-select: none;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
overflow-anchor: none;
|
|
|
`}},v=[f,c,m,g];return{always:xs(v,"always"),resting:xs(v,"resting"),dragging:xs(v,"dragging"),dropAnimating:xs(v,"dropAnimating"),userCancel:xs(v,"userCancel")}},yn=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?k.useLayoutEffect:k.useEffect,xc=function(){var l=document.querySelector("head");return l||Me(!1),l},$a=function(l){var c=document.createElement("style");return l&&c.setAttribute("nonce",l),c.type="text/css",c};function Ju(o,l){var c=Oe(function(){return jo(o)},[o]),f=(0,k.useRef)(null),m=(0,k.useRef)(null),g=Ee(Nr(function(E){var B=m.current;B||Me(!1),B.textContent=E}),[]),v=Ee(function(E){var B=f.current;B||Me(!1),B.textContent=E},[]);yn(function(){!f.current&&!m.current||Me(!1);var E=$a(l),B=$a(l);return f.current=E,m.current=B,E.setAttribute(oi+"-always",o),B.setAttribute(oi+"-dynamic",o),xc().appendChild(E),xc().appendChild(B),v(c.always),g(c.resting),function(){var P=function(We){var qe=We.current;qe||Me(!1),xc().removeChild(qe),We.current=null};P(f),P(m)}},[l,v,g,c.always,c.resting,o]);var b=Ee(function(){return g(c.dragging)},[g,c.dragging]),D=Ee(function(E){if(E==="DROP"){g(c.dropAnimating);return}g(c.userCancel)},[g,c.dropAnimating,c.userCancel]),T=Ee(function(){m.current&&g(c.resting)},[g,c.resting]),w=Oe(function(){return{dragging:b,dropping:D,resting:T}},[b,D,T]);return w}var cl=function(o){return o&&o.ownerDocument?o.ownerDocument.defaultView:window};function Co(o){return o instanceof cl(o).HTMLElement}function wc(o,l){var c="["+Mo.contextId+'="'+o+'"]',f=ht(document.querySelectorAll(c));if(!f.length)return null;var m=At(f,function(g){return g.getAttribute(Mo.draggableId)===l});return!m||!Co(m)?null:m}function Uo(o){var l=(0,k.useRef)({}),c=(0,k.useRef)(null),f=(0,k.useRef)(null),m=(0,k.useRef)(!1),g=Ee(function(B,P){var Q={id:B,focus:P};return l.current[B]=Q,function(){var qe=l.current,rt=qe[B];rt!==Q&&delete qe[B]}},[]),v=Ee(function(B){var P=wc(o,B);P&&P!==document.activeElement&&P.focus()},[o]),b=Ee(function(B,P){c.current===B&&(c.current=P)},[]),D=Ee(function(){f.current||m.current&&(f.current=requestAnimationFrame(function(){f.current=null;var B=c.current;B&&v(B)}))},[v]),T=Ee(function(B){c.current=null;var P=document.activeElement;P&&P.getAttribute(Mo.draggableId)===B&&(c.current=B)},[]);yn(function(){return m.current=!0,function(){m.current=!1;var B=f.current;B&&cancelAnimationFrame(B)}},[]);var w=Oe(function(){return{register:g,tryRecordFocus:T,tryRestoreFocusRecorded:D,tryShiftRecord:b}},[g,T,D,b]);return w}function Sc(){var o={draggables:{},droppables:{}},l=[];function c(E){return l.push(E),function(){var P=l.indexOf(E);P!==-1&&l.splice(P,1)}}function f(E){l.length&&l.forEach(function(B){return B(E)})}function m(E){return o.draggables[E]||null}function g(E){var B=m(E);return B||Me(!1),B}var v={register:function(B){o.draggables[B.descriptor.id]=B,f({type:"ADDITION",value:B})},update:function(B,P){var Q=o.draggables[P.descriptor.id];Q&&Q.uniqueId===B.uniqueId&&(delete o.draggables[P.descriptor.id],o.draggables[B.descriptor.id]=B)},unregister:function(B){var P=B.descriptor.id,Q=m(P);Q&&B.uniqueId===Q.uniqueId&&(delete o.draggables[P],f({type:"REMOVAL",value:B}))},getById:g,findById:m,exists:function(B){return!!m(B)},getAllByType:function(B){return Br(o.draggables).filter(function(P){return P.descriptor.type===B})}};function b(E){return o.droppables[E]||null}function D(E){var B=b(E);return B||Me(!1),B}var T={register:function(B){o.droppables[B.descriptor.id]=B},unregister:function(B){var P=b(B.descriptor.id);P&&B.uniqueId===P.uniqueId&&delete o.droppables[B.descriptor.id]},getById:D,findById:b,exists:function(B){return!!b(B)},getAllByType:function(B){return Br(o.droppables).filter(function(P){return P.descriptor.type===B})}};function w(){o.draggables={},o.droppables={},l.length=0}return{draggable:v,droppable:T,subscribe:c,clean:w}}function _c(){var o=Oe(Sc,[]);return(0,k.useEffect)(function(){return function(){requestAnimationFrame(o.clean)}},[o]),o}var ul=k.createContext(null),ws=function(){var o=document.body;return o||Me(!1),o},f0={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},h0=function(l){return"rbd-announcement-"+l};function dl(o){var l=Oe(function(){return h0(o)},[o]),c=(0,k.useRef)(null);(0,k.useEffect)(function(){var g=document.createElement("div");return c.current=g,g.id=l,g.setAttribute("aria-live","assertive"),g.setAttribute("aria-atomic","true"),(0,ge.Z)(g.style,f0),ws().appendChild(g),function(){setTimeout(function(){var D=ws();D.contains(g)&&D.removeChild(g),g===c.current&&(c.current=null)})}},[l]);var f=Ee(function(m){var g=c.current;if(g){g.textContent=m;return}},[]);return f}var Yu=0,fl={separator:"::"};function Qu(){Yu=0}function hl(o,l){return l===void 0&&(l=fl),Oe(function(){return""+o+l.separator+Yu++},[l.separator,o])}function p0(o){var l=o.contextId,c=o.uniqueId;return"rbd-hidden-text-"+l+"-"+c}function ed(o){var l=o.contextId,c=o.text,f=hl("hidden-text",{separator:"-"}),m=Oe(function(){return p0({contextId:l,uniqueId:f})},[f,l]);return(0,k.useEffect)(function(){var v=document.createElement("div");return v.id=m,v.textContent=c,v.style.display="none",ws().appendChild(v),function(){var D=ws();D.contains(v)&&D.removeChild(v)}},[m,c]),m}var pl=k.createContext(null),m0={react:"^16.8.5","react-dom":"^16.8.5"},ml=/(\d+)\.(\d+)\.(\d+)/,Cr=function(l){var c=ml.exec(l);c==null&&Me(!1);var f=Number(c[1]),m=Number(c[2]),g=Number(c[3]);return{major:f,minor:m,patch:g,raw:l}},an=function(l,c){return c.major>l.major?!0:c.major<l.major?!1:c.minor>l.minor?!0:c.minor<l.minor?!1:c.patch>=l.patch},Eo=function(o,l){var c=Cr(o),f=Cr(l);an(c,f)},g0=`
|
|
|
We expect a html5 doctype: <!doctype html>
|
|
|
This is to ensure consistent browser layout and measurement
|
|
|
|
|
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
|
`,Ai=function(o){var l=o.doctype;l&&(l.name.toLowerCase(),l.publicId)};function v0(o){}function Hi(o,l){}function td(){Hi(function(){Eo(m0.react,k.version),Ai(document)},[])}function Mc(o){var l=(0,k.useRef)(o);return(0,k.useEffect)(function(){l.current=o}),l}function b0(){var o=null;function l(){return!!o}function c(v){return v===o}function f(v){o&&Me(!1);var b={abandon:v};return o=b,b}function m(){o||Me(!1),o=null}function g(){o&&(o.abandon(),m())}return{isClaimed:l,isActive:c,claim:f,release:m,tryAbandon:g}}var Cc=9,Ss=13,ko=27,Ue=32,Ec=33,gl=34,vl=35,bl=36,y0=37,x0=38,w0=39,An=40,yl,kc=(yl={},yl[Ss]=!0,yl[Cc]=!0,yl),_s=function(o){kc[o.keyCode]&&o.preventDefault()},Do=function(){var o="visibilitychange";if(typeof document=="undefined")return o;var l=[o,"ms"+o,"webkit"+o,"moz"+o,"o"+o],c=At(l,function(f){return"on"+f in document});return c||o}(),Va=0,Ao=5;function Li(o,l){return Math.abs(l.x-o.x)>=Ao||Math.abs(l.y-o.y)>=Ao}var Za={type:"IDLE"};function si(o){var l=o.cancel,c=o.completed,f=o.getPhase,m=o.setPhase;return[{eventName:"mousemove",fn:function(v){var b=v.button,D=v.clientX,T=v.clientY;if(b===Va){var w={x:D,y:T},E=f();if(E.type==="DRAGGING"){v.preventDefault(),E.actions.move(w);return}E.type!=="PENDING"&&Me(!1);var B=E.point;if(Li(B,w)){v.preventDefault();var P=E.actions.fluidLift(w);m({type:"DRAGGING",actions:P})}}}},{eventName:"mouseup",fn:function(v){var b=f();if(b.type!=="DRAGGING"){l();return}v.preventDefault(),b.actions.drop({shouldBlockNextClick:!0}),c()}},{eventName:"mousedown",fn:function(v){f().type==="DRAGGING"&&v.preventDefault(),l()}},{eventName:"keydown",fn:function(v){var b=f();if(b.type==="PENDING"){l();return}if(v.keyCode===ko){v.preventDefault(),l();return}_s(v)}},{eventName:"resize",fn:l},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){f().type==="PENDING"&&l()}},{eventName:"webkitmouseforcedown",fn:function(v){var b=f();if(b.type==="IDLE"&&Me(!1),b.actions.shouldRespectForcePress()){l();return}v.preventDefault()}},{eventName:Do,fn:l}]}function ja(o){var l=(0,k.useRef)(Za),c=(0,k.useRef)(St),f=Oe(function(){return{eventName:"mousedown",fn:function(E){if(!E.defaultPrevented&&E.button===Va&&!(E.ctrlKey||E.metaKey||E.shiftKey||E.altKey)){var B=o.findClosestDraggableId(E);if(B){var P=o.tryGetLock(B,v,{sourceEvent:E});if(P){E.preventDefault();var Q={x:E.clientX,y:E.clientY};c.current(),T(P,Q)}}}}}},[o]),m=Oe(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(E){if(!E.defaultPrevented){var B=o.findClosestDraggableId(E);if(B){var P=o.findOptionsForDraggable(B);P&&(P.shouldRespectForcePress||o.canGetLock(B)&&E.preventDefault())}}}}},[o]),g=Ee(function(){var E={passive:!1,capture:!0};c.current=jt(window,[m,f],E)},[m,f]),v=Ee(function(){var w=l.current;w.type!=="IDLE"&&(l.current=Za,c.current(),g())},[g]),b=Ee(function(){var w=l.current;v(),w.type==="DRAGGING"&&w.actions.cancel({shouldBlockNextClick:!0}),w.type==="PENDING"&&w.actions.abort()},[v]),D=Ee(function(){var E={capture:!0,passive:!1},B=si({cancel:b,completed:v,getPhase:function(){return l.current},setPhase:function(Q){l.current=Q}});c.current=jt(window,B,E)},[b,v]),T=Ee(function(E,B){l.current.type!=="IDLE"&&Me(!1),l.current={type:"PENDING",point:B,actions:E},D()},[D]);yn(function(){return g(),function(){c.current()}},[g])}var ua;function da(){}var rd=(ua={},ua[gl]=!0,ua[Ec]=!0,ua[bl]=!0,ua[vl]=!0,ua);function nd(o,l){function c(){l(),o.cancel()}function f(){l(),o.drop()}return[{eventName:"keydown",fn:function(g){if(g.keyCode===ko){g.preventDefault(),c();return}if(g.keyCode===Ue){g.preventDefault(),f();return}if(g.keyCode===An){g.preventDefault(),o.moveDown();return}if(g.keyCode===x0){g.preventDefault(),o.moveUp();return}if(g.keyCode===w0){g.preventDefault(),o.moveRight();return}if(g.keyCode===y0){g.preventDefault(),o.moveLeft();return}if(rd[g.keyCode]){g.preventDefault();return}_s(g)}},{eventName:"mousedown",fn:c},{eventName:"mouseup",fn:c},{eventName:"click",fn:c},{eventName:"touchstart",fn:c},{eventName:"resize",fn:c},{eventName:"wheel",fn:c,options:{passive:!0}},{eventName:Do,fn:c}]}function Dc(o){var l=(0,k.useRef)(da),c=Oe(function(){return{eventName:"keydown",fn:function(g){if(g.defaultPrevented||g.keyCode!==Ue)return;var v=o.findClosestDraggableId(g);if(!v)return;var b=o.tryGetLock(v,w,{sourceEvent:g});if(!b)return;g.preventDefault();var D=!0,T=b.snapLift();l.current();function w(){D||Me(!1),D=!1,l.current(),f()}l.current=jt(window,nd(T,w),{capture:!0,passive:!1})}}},[o]),f=Ee(function(){var g={passive:!1,capture:!0};l.current=jt(window,[c],g)},[c]);yn(function(){return f(),function(){l.current()}},[f])}var Ac={type:"IDLE"},Zn=120,fa=.15;function S0(o){var l=o.cancel,c=o.getPhase;return[{eventName:"orientationchange",fn:l},{eventName:"resize",fn:l},{eventName:"contextmenu",fn:function(m){m.preventDefault()}},{eventName:"keydown",fn:function(m){if(c().type!=="DRAGGING"){l();return}m.keyCode===ko&&m.preventDefault(),l()}},{eventName:Do,fn:l}]}function id(o){var l=o.cancel,c=o.completed,f=o.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(g){var v=f();if(v.type!=="DRAGGING"){l();return}v.hasMoved=!0;var b=g.touches[0],D=b.clientX,T=b.clientY,w={x:D,y:T};g.preventDefault(),v.actions.move(w)}},{eventName:"touchend",fn:function(g){var v=f();if(v.type!=="DRAGGING"){l();return}g.preventDefault(),v.actions.drop({shouldBlockNextClick:!0}),c()}},{eventName:"touchcancel",fn:function(g){if(f().type!=="DRAGGING"){l();return}g.preventDefault(),l()}},{eventName:"touchforcechange",fn:function(g){var v=f();v.type==="IDLE"&&Me(!1);var b=g.touches[0];if(b){var D=b.force>=fa;if(D){var T=v.actions.shouldRespectForcePress();if(v.type==="PENDING"){T&&l();return}if(T){if(v.hasMoved){g.preventDefault();return}l();return}g.preventDefault()}}}},{eventName:Do,fn:l}]}function Lc(o){var l=(0,k.useRef)(Ac),c=(0,k.useRef)(St),f=Ee(function(){return l.current},[]),m=Ee(function(P){l.current=P},[]),g=Oe(function(){return{eventName:"touchstart",fn:function(P){if(!P.defaultPrevented){var Q=o.findClosestDraggableId(P);if(Q){var We=o.tryGetLock(Q,b,{sourceEvent:P});if(We){var qe=P.touches[0],rt=qe.clientX,pt=qe.clientY,kt={x:rt,y:pt};c.current(),E(We,kt)}}}}}},[o]),v=Ee(function(){var P={capture:!0,passive:!1};c.current=jt(window,[g],P)},[g]),b=Ee(function(){var B=l.current;B.type!=="IDLE"&&(B.type==="PENDING"&&clearTimeout(B.longPressTimerId),m(Ac),c.current(),v())},[v,m]),D=Ee(function(){var B=l.current;b(),B.type==="DRAGGING"&&B.actions.cancel({shouldBlockNextClick:!0}),B.type==="PENDING"&&B.actions.abort()},[b]),T=Ee(function(){var P={capture:!0,passive:!1},Q={cancel:D,completed:b,getPhase:f},We=jt(window,id(Q),P),qe=jt(window,S0(Q),P);c.current=function(){We(),qe()}},[D,f,b]),w=Ee(function(){var P=f();P.type!=="PENDING"&&Me(!1);var Q=P.actions.fluidLift(P.point);m({type:"DRAGGING",actions:Q,hasMoved:!1})},[f,m]),E=Ee(function(P,Q){f().type!=="IDLE"&&Me(!1);var We=setTimeout(w,Zn);m({type:"PENDING",point:Q,actions:P,longPressTimerId:We}),T()},[T,f,m,w]);yn(function(){return v(),function(){c.current();var Q=f();Q.type==="PENDING"&&(clearTimeout(Q.longPressTimerId),m(Ac))}},[f,v,m]),yn(function(){var P=jt(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return P},[])}function Dr(o){}var Go={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Ua(o,l){if(l==null)return!1;var c=!!Go[l.tagName.toLowerCase()];if(c)return!0;var f=l.getAttribute("contenteditable");return f==="true"||f===""?!0:l===o?!1:Ua(o,l.parentElement)}function xl(o,l){var c=l.target;return Co(c)?Ua(o,c):!1}var _e=function(o){return Gt(o.getBoundingClientRect()).center};function _0(o){return o instanceof cl(o).Element}var M0=function(){var o="matches";if(typeof document=="undefined")return o;var l=[o,"msMatchesSelector","webkitMatchesSelector"],c=At(l,function(f){return f in Element.prototype});return c||o}();function wl(o,l){return o==null?null:o[M0](l)?o:wl(o.parentElement,l)}function C0(o,l){return o.closest?o.closest(l):wl(o,l)}function Ms(o){return"["+Mo.contextId+'="'+o+'"]'}function E0(o,l){var c=l.target;if(!_0(c))return null;var f=Ms(o),m=C0(c,f);return!m||!Co(m)?null:m}function k0(o,l){var c=E0(o,l);return c?c.getAttribute(Mo.draggableId):null}function Qn(o,l){var c="["+ll.contextId+'="'+o+'"]',f=ht(document.querySelectorAll(c)),m=At(f,function(g){return g.getAttribute(ll.id)===l});return!m||!Co(m)?null:m}function Ga(o){o.preventDefault()}function Lo(o){var l=o.expected,c=o.phase,f=o.isLockActive,m=o.shouldWarn;return!(!f()||l!==c)}function Cs(o){var l=o.lockAPI,c=o.store,f=o.registry,m=o.draggableId;if(l.isClaimed())return!1;var g=f.draggable.findById(m);return!(!g||!g.options.isEnabled||!pc(c.getState(),m))}function D0(o){var l=o.lockAPI,c=o.contextId,f=o.store,m=o.registry,g=o.draggableId,v=o.forceSensorStop,b=o.sourceEvent,D=Cs({lockAPI:l,store:f,registry:m,draggableId:g});if(!D)return null;var T=m.draggable.getById(g),w=Qn(c,T.descriptor.id);if(!w||b&&!T.options.canDragInteractiveElements&&xl(w,b))return null;var E=l.claim(v||St),B="PRE_DRAG";function P(){return T.options.shouldRespectForcePress}function Q(){return l.isActive(E)}function We(Pt,vr){Lo({expected:Pt,phase:B,isLockActive:Q,shouldWarn:!0})&&f.dispatch(vr())}var qe=We.bind(null,"DRAGGING");function rt(Pt){function vr(){l.release(),B="COMPLETED"}B!=="PRE_DRAG"&&(vr(),B!=="PRE_DRAG"&&Me(!1)),f.dispatch(La(Pt.liftActionArgs)),B="DRAGGING";function pn(br,Kr){if(Kr===void 0&&(Kr={shouldBlockNextClick:!1}),Pt.cleanup(),Kr.shouldBlockNextClick){var jn=jt(window,[{eventName:"click",fn:Ga,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(jn)}vr(),f.dispatch(tc({reason:br}))}return(0,ge.Z)({isActive:function(){return Lo({expected:"DRAGGING",phase:B,isLockActive:Q,shouldWarn:!1})},shouldRespectForcePress:P,drop:function(Kr){return pn("DROP",Kr)},cancel:function(Kr){return pn("CANCEL",Kr)}},Pt.actions)}function pt(Pt){var vr=$n(function(br){qe(function(){return ec({client:br})})}),pn=rt({liftActionArgs:{id:g,clientSelection:Pt,movementMode:"FLUID"},cleanup:function(){return vr.cancel()},actions:{move:vr}});return(0,ge.Z)({},pn,{move:vr})}function kt(){var Pt={moveUp:function(){return qe(fu)},moveRight:function(){return qe(pu)},moveDown:function(){return qe(hu)},moveLeft:function(){return qe(mu)}};return rt({liftActionArgs:{id:g,clientSelection:_e(w),movementMode:"SNAP"},cleanup:St,actions:Pt})}function It(){var Pt=Lo({expected:"PRE_DRAG",phase:B,isLockActive:Q,shouldWarn:!0});Pt&&l.release()}var lr={isActive:function(){return Lo({expected:"PRE_DRAG",phase:B,isLockActive:Q,shouldWarn:!1})},shouldRespectForcePress:P,fluidLift:pt,snapLift:kt,abort:It};return lr}var A0=[ja,Dc,Lc];function Bc(o){var l=o.contextId,c=o.store,f=o.registry,m=o.customSensors,g=o.enableDefaultSensors,v=[].concat(g?A0:[],m||[]),b=(0,k.useState)(function(){return b0()})[0],D=Ee(function(pt,kt){pt.isDragging&&!kt.isDragging&&b.tryAbandon()},[b]);yn(function(){var pt=c.getState(),kt=c.subscribe(function(){var It=c.getState();D(pt,It),pt=It});return kt},[b,c,D]),yn(function(){return b.tryAbandon},[b.tryAbandon]);var T=Ee(function(rt){return Cs({lockAPI:b,registry:f,store:c,draggableId:rt})},[b,f,c]),w=Ee(function(rt,pt,kt){return D0({lockAPI:b,registry:f,contextId:l,store:c,draggableId:rt,forceSensorStop:pt,sourceEvent:kt&&kt.sourceEvent?kt.sourceEvent:null})},[l,b,f,c]),E=Ee(function(rt){return k0(l,rt)},[l]),B=Ee(function(rt){var pt=f.draggable.findById(rt);return pt?pt.options:null},[f.draggable]),P=Ee(function(){b.isClaimed()&&(b.tryAbandon(),c.getState().phase!=="IDLE"&&c.dispatch(Fn()))},[b,c]),Q=Ee(b.isClaimed,[b]),We=Oe(function(){return{canGetLock:T,tryGetLock:w,findClosestDraggableId:E,findOptionsForDraggable:B,tryReleaseLock:P,isLockClaimed:Q}},[T,w,E,B,P,Q]);Dr(v);for(var qe=0;qe<v.length;qe++)v[qe](We)}var ad=function(l){return{onBeforeCapture:l.onBeforeCapture,onBeforeDragStart:l.onBeforeDragStart,onDragStart:l.onDragStart,onDragEnd:l.onDragEnd,onDragUpdate:l.onDragUpdate}};function qa(o){return o.current||Me(!1),o.current}function pi(o){var l=o.contextId,c=o.setCallbacks,f=o.sensors,m=o.nonce,g=o.dragHandleUsageInstructions,v=(0,k.useRef)(null);td();var b=Mc(o),D=Ee(function(){return ad(b.current)},[b]),T=dl(l),w=ed({contextId:l,text:g}),E=Ju(l,m),B=Ee(function(br){qa(v).dispatch(br)},[]),P=Oe(function(){return(0,H.DE)({publishWhileDragging:ou,updateDroppableScroll:lu,updateDroppableIsEnabled:cu,updateDroppableIsCombineEnabled:uu,collectionStarting:su},B)},[B]),Q=_c(),We=Oe(function(){return Fu(Q,P)},[Q,P]),qe=Oe(function(){return wt((0,ge.Z)({scrollWindow:rl,scrollDroppable:We.scrollDroppable},(0,H.DE)({move:ec},B)))},[We.scrollDroppable,B]),rt=Uo(l),pt=Oe(function(){return Ru({announce:T,autoScroller:qe,dimensionMarshal:We,focusMarshal:rt,getResponders:D,styleMarshal:E})},[T,qe,We,rt,D,E]);v.current=pt;var kt=Ee(function(){var br=qa(v),Kr=br.getState();Kr.phase!=="IDLE"&&br.dispatch(Fn())},[]),It=Ee(function(){var br=qa(v).getState();return br.isDragging||br.phase==="DROP_ANIMATING"},[]),lr=Oe(function(){return{isDragging:It,tryAbort:kt}},[It,kt]);c(lr);var Pt=Ee(function(br){return pc(qa(v).getState(),br)},[]),vr=Ee(function(){return Ji(qa(v).getState())},[]),pn=Oe(function(){return{marshal:We,focus:rt,contextId:l,canLift:Pt,isMovementAllowed:vr,dragHandleUsageInstructionsId:w,registry:Q}},[l,We,w,rt,Pt,vr,Q]);return Bc({contextId:l,store:pt,registry:Q,customSensors:f,enableDefaultSensors:o.enableDefaultSensors!==!1}),(0,k.useEffect)(function(){return kt},[kt]),k.createElement(pl.Provider,{value:pn},k.createElement(Qe,{context:ul,store:pt},o.children))}var Xa=0;function od(){Xa=0}function sd(){return Oe(function(){return""+Xa++},[])}function ld(){od(),Qu()}function L0(o){var l=sd(),c=o.dragHandleUsageInstructions||ke.dragHandleUsageInstructions;return k.createElement(Fr,null,function(f){return k.createElement(pi,{nonce:o.nonce,contextId:l,setCallbacks:f,dragHandleUsageInstructions:c,enableDefaultSensors:o.enableDefaultSensors,sensors:o.sensors,onBeforeCapture:o.onBeforeCapture,onBeforeDragStart:o.onBeforeDragStart,onDragStart:o.onDragStart,onDragUpdate:o.onDragUpdate,onDragEnd:o.onDragEnd},o.children)})}var Ic=function(l){return function(c){return l===c}},B0=Ic("scroll"),I0=Ic("auto"),cd=Ic("visible"),Qr=function(l,c){return c(l.overflowX)||c(l.overflowY)},$0=function(l,c){return c(l.overflowX)&&c(l.overflowY)},ud=function(l){var c=window.getComputedStyle(l),f={overflowX:c.overflowX,overflowY:c.overflowY};return Qr(f,B0)||Qr(f,I0)},Bo=function(){return!1;var l,c,f,m},dd=function o(l){return l==null?null:l===document.body?Bo()?l:null:l===document.documentElement?null:ud(l)?l:o(l.parentElement)},Sl=function(o){if(o)var l=dd(o.parentElement)},$c=function(o){return{x:o.scrollLeft,y:o.scrollTop}},fd=function o(l){if(!l)return!1;var c=window.getComputedStyle(l);return c.position==="fixed"?!0:o(l.parentElement)},hd=function(o){var l=dd(o),c=fd(o);return{closestScrollable:l,isFixedOnPage:c}},Es=function(o){var l=o.descriptor,c=o.isEnabled,f=o.isCombineEnabled,m=o.isFixedOnPage,g=o.direction,v=o.client,b=o.page,D=o.closest,T=function(){if(!D)return null;var P=D.scrollSize,Q=D.client,We=dc({scrollHeight:P.scrollHeight,scrollWidth:P.scrollWidth,height:Q.paddingBox.height,width:Q.paddingBox.width});return{pageMarginBox:D.page.marginBox,frameClient:Q,scrollSize:P,shouldClipSubject:D.shouldClipSubject,scroll:{initial:D.scroll,current:D.scroll,max:We,diff:{value:j,displacement:j}}}}(),w=g==="vertical"?Pn:Sn,E=Ut({page:b,withPlaceholder:null,axis:w,frame:T}),B={descriptor:l,isCombineEnabled:f,isFixedOnPage:m,axis:w,isEnabled:c,client:v,page:b,frame:T,subject:E};return B},T0=function(l,c){var f=qr(l);if(!c||l!==c)return f;var m=f.paddingBox.top-c.scrollTop,g=f.paddingBox.left-c.scrollLeft,v=m+c.scrollHeight,b=g+c.scrollWidth,D={top:m,right:b,bottom:v,left:g},T=nr(D,f.border),w=Ur({borderBox:T,margin:f.margin,border:f.border,padding:f.padding});return w},pd=function(o){var l=o.ref,c=o.descriptor,f=o.env,m=o.windowScroll,g=o.direction,v=o.isDropDisabled,b=o.isCombineEnabled,D=o.shouldClipSubject,T=f.closestScrollable,w=T0(l,T),E=Zt(w,m),B=function(){if(!T)return null;var Q=qr(T),We={scrollHeight:T.scrollHeight,scrollWidth:T.scrollWidth};return{client:Q,page:Zt(Q,m),scroll:$c(T),scrollSize:We,shouldClipSubject:D}}(),P=Es({descriptor:c,isEnabled:!v,isCombineEnabled:b,isFixedOnPage:f.isFixedOnPage,direction:g,client:w,page:E,closest:B});return P},Tc={passive:!1},md={passive:!0},gd=function(o){return o.shouldPublishImmediately?Tc:md};function _l(o){var l=(0,k.useContext)(o);return l||Me(!1),l}var Ml=function(l){return l&&l.env.closestScrollable||null};function P0(o){var l=(0,k.useRef)(null),c=_l(pl),f=hl("droppable"),m=c.registry,g=c.marshal,v=Mc(o),b=Oe(function(){return{id:o.droppableId,type:o.type,mode:o.mode}},[o.droppableId,o.mode,o.type]),D=(0,k.useRef)(b),T=Oe(function(){return Nr(function(It,lr){l.current||Me(!1);var Pt={x:It,y:lr};g.updateDroppableScroll(b.id,Pt)})},[b.id,g]),w=Ee(function(){var It=l.current;return!It||!It.env.closestScrollable?j:$c(It.env.closestScrollable)},[]),E=Ee(function(){var It=w();T(It.x,It.y)},[w,T]),B=Oe(function(){return $n(E)},[E]),P=Ee(function(){var It=l.current,lr=Ml(It);It&&lr||Me(!1);var Pt=It.scrollOptions;if(Pt.shouldPublishImmediately){E();return}B()},[B,E]),Q=Ee(function(It,lr){l.current&&Me(!1);var Pt=v.current,vr=Pt.getDroppableRef();vr||Me(!1);var pn=hd(vr),br={ref:vr,descriptor:b,env:pn,scrollOptions:lr};l.current=br;var Kr=pd({ref:vr,descriptor:b,env:pn,windowScroll:It,direction:Pt.direction,isDropDisabled:Pt.isDropDisabled,isCombineEnabled:Pt.isCombineEnabled,shouldClipSubject:!Pt.ignoreContainerClipping}),jn=pn.closestScrollable;return jn&&(jn.setAttribute(Zo.contextId,c.contextId),jn.addEventListener("scroll",P,gd(br.scrollOptions))),Kr},[c.contextId,b,P,v]),We=Ee(function(){var It=l.current,lr=Ml(It);return It&&lr||Me(!1),$c(lr)},[]),qe=Ee(function(){var It=l.current;It||Me(!1);var lr=Ml(It);l.current=null,lr&&(B.cancel(),lr.removeAttribute(Zo.contextId),lr.removeEventListener("scroll",P,gd(It.scrollOptions)))},[P,B]),rt=Ee(function(It){var lr=l.current;lr||Me(!1);var Pt=Ml(lr);Pt||Me(!1),Pt.scrollTop+=It.y,Pt.scrollLeft+=It.x},[]),pt=Oe(function(){return{getDimensionAndWatchScroll:Q,getScrollWhileDragging:We,dragStopped:qe,scroll:rt}},[qe,Q,We,rt]),kt=Oe(function(){return{uniqueId:f,descriptor:b,callbacks:pt}},[pt,b,f]);yn(function(){return D.current=kt.descriptor,m.droppable.register(kt),function(){l.current&&qe(),m.droppable.unregister(kt)}},[pt,b,qe,kt,g,m.droppable]),yn(function(){l.current&&g.updateDroppableIsEnabled(D.current.id,!o.isDropDisabled)},[o.isDropDisabled,g]),yn(function(){l.current&&g.updateDroppableIsCombineEnabled(D.current.id,o.isCombineEnabled)},[o.isCombineEnabled,g])}function Pc(){}var vd={width:0,height:0,margin:$r},R0=function(l){var c=l.isAnimatingOpenOnMount,f=l.placeholder,m=l.animate;return c||m==="close"?vd:{height:f.client.borderBox.height,width:f.client.borderBox.width,margin:f.client.margin}},O0=function(l){var c=l.isAnimatingOpenOnMount,f=l.placeholder,m=l.animate,g=R0({isAnimatingOpenOnMount:c,placeholder:f,animate:m});return{display:f.display,boxSizing:"border-box",width:g.width,height:g.height,marginTop:g.margin.top,marginRight:g.margin.right,marginBottom:g.margin.bottom,marginLeft:g.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:m!=="none"?wo.placeholder:null}};function Ja(o){var l=(0,k.useRef)(null),c=Ee(function(){l.current&&(clearTimeout(l.current),l.current=null)},[]),f=o.animate,m=o.onTransitionEnd,g=o.onClose,v=o.contextId,b=(0,k.useState)(o.animate==="open"),D=b[0],T=b[1];(0,k.useEffect)(function(){return D?f!=="open"?(c(),T(!1),Pc):l.current?Pc:(l.current=setTimeout(function(){l.current=null,T(!1)}),c):Pc},[f,D,c]);var w=Ee(function(B){B.propertyName==="height"&&(m(),f==="close"&&g())},[f,g,m]),E=O0({isAnimatingOpenOnMount:D,animate:o.animate,placeholder:o.placeholder});return k.createElement(o.placeholder.tagName,{style:E,"data-rbd-placeholder-context-id":v,onTransitionEnd:w,ref:o.innerRef})}var Io=k.memo(Ja),Ya=k.createContext(null);function ha(o){o&&Co(o)||Me(!1)}function Yi(o){return typeof o=="boolean"}function pa(o,l){l.forEach(function(c){return c(o)})}var Cl=[function(l){var c=l.props;c.droppableId||Me(!1),typeof c.droppableId!="string"&&Me(!1)},function(l){var c=l.props;Yi(c.isDropDisabled)||Me(!1),Yi(c.isCombineEnabled)||Me(!1),Yi(c.ignoreContainerClipping)||Me(!1)},function(l){var c=l.getDroppableRef;ha(c())}],El=[function(l){var c=l.props,f=l.getPlaceholderRef;if(c.placeholder)var m=f()}],kl=[function(l){var c=l.props;c.renderClone||Me(!1)},function(l){var c=l.getPlaceholderRef;c()&&Me(!1)}];function Dl(o){Hi(function(){pa(o,Cl),o.props.mode==="standard"&&pa(o,El),o.props.mode==="virtual"&&pa(o,kl)})}var N0=function(o){xe(l,o);function l(){for(var f,m=arguments.length,g=new Array(m),v=0;v<m;v++)g[v]=arguments[v];return f=o.call.apply(o,[this].concat(g))||this,f.state={isVisible:!!f.props.on,data:f.props.on,animate:f.props.shouldAnimate&&f.props.on?"open":"none"},f.onClose=function(){f.state.animate==="close"&&f.setState({isVisible:!1})},f}l.getDerivedStateFromProps=function(m,g){return m.shouldAnimate?m.on?{isVisible:!0,data:m.on,animate:"open"}:g.isVisible?{isVisible:!0,data:g.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!m.on,data:m.on,animate:"none"}};var c=l.prototype;return c.render=function(){if(!this.state.isVisible)return null;var m={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(m)},l}(k.PureComponent),Rc={dragging:5e3,dropAnimating:4500},bd=function(l,c){return c?wo.drop(c.duration):l?wo.snap:wo.fluid},yd=function(l,c){return l?c?Ha.opacity.drop:Ha.opacity.combining:null},F0=function(l){return l.forceShouldAnimate!=null?l.forceShouldAnimate:l.mode==="SNAP"};function xd(o){var l=o.dimension,c=l.client,f=o.offset,m=o.combineWith,g=o.dropping,v=!!m,b=F0(o),D=!!g,T=D?Ki.drop(f,v):Ki.moveTo(f),w={position:"fixed",top:c.marginBox.top,left:c.marginBox.left,boxSizing:"border-box",width:c.borderBox.width,height:c.borderBox.height,transition:bd(b,g),transform:T,opacity:yd(v,D),zIndex:D?Rc.dropAnimating:Rc.dragging,pointerEvents:"none"};return w}function z0(o){return{transform:Ki.moveTo(o.offset),transition:o.shouldAnimateDisplacement?null:"none"}}function K0(o){return o.type==="DRAGGING"?xd(o):z0(o)}function H0(o,l,c){c===void 0&&(c=j);var f=window.getComputedStyle(l),m=l.getBoundingClientRect(),g=sn(m,f),v=Zt(g,c),b={client:g,tagName:l.tagName.toLowerCase(),display:f.display},D={x:g.marginBox.width,y:g.marginBox.height},T={descriptor:o,placeholder:b,displaceBy:D,client:g,page:v};return T}function W0(o){var l=hl("draggable"),c=o.descriptor,f=o.registry,m=o.getDraggableRef,g=o.canDragInteractiveElements,v=o.shouldRespectForcePress,b=o.isEnabled,D=Oe(function(){return{canDragInteractiveElements:g,shouldRespectForcePress:v,isEnabled:b}},[g,b,v]),T=Ee(function(P){var Q=m();return Q||Me(!1),H0(c,Q,P)},[c,m]),w=Oe(function(){return{uniqueId:l,descriptor:c,options:D,getDimension:T}},[c,T,D,l]),E=(0,k.useRef)(w),B=(0,k.useRef)(!0);yn(function(){return f.draggable.register(E.current),function(){return f.draggable.unregister(E.current)}},[f.draggable]),yn(function(){if(B.current){B.current=!1;return}var P=E.current;E.current=w,f.draggable.update(w,P)},[w,f.draggable])}function V0(o,l,c){Hi(function(){function f(g){return"Draggable[id: "+g+"]: "}var m=o.draggableId;m||Me(!1),typeof m!="string"&&Me(!1),dr(o.index)||Me(!1),o.mapped.type!=="DRAGGING"&&(ha(c()),o.isEnabled&&(wc(l,m)||Me(!1)))})}function Z0(o){}function j0(o){o.preventDefault()}function Al(o){var l=(0,k.useRef)(null),c=Ee(function(br){l.current=br},[]),f=Ee(function(){return l.current},[]),m=_l(pl),g=m.contextId,v=m.dragHandleUsageInstructionsId,b=m.registry,D=_l(Ya),T=D.type,w=D.droppableId,E=Oe(function(){return{id:o.draggableId,index:o.index,type:T,droppableId:w}},[o.draggableId,o.index,T,w]),B=o.children,P=o.draggableId,Q=o.isEnabled,We=o.shouldRespectForcePress,qe=o.canDragInteractiveElements,rt=o.isClone,pt=o.mapped,kt=o.dropAnimationFinished;if(V0(o,g,f),Z0(rt),!rt){var It=Oe(function(){return{descriptor:E,registry:b,getDraggableRef:f,canDragInteractiveElements:qe,shouldRespectForcePress:We,isEnabled:Q}},[E,b,f,qe,We,Q]);W0(It)}var lr=Oe(function(){return Q?{tabIndex:0,role:"button","aria-describedby":v,"data-rbd-drag-handle-draggable-id":P,"data-rbd-drag-handle-context-id":g,draggable:!1,onDragStart:j0}:null},[g,v,P,Q]),Pt=Ee(function(br){pt.type==="DRAGGING"&&pt.dropping&&br.propertyName==="transform"&&kt()},[kt,pt]),vr=Oe(function(){var br=K0(pt),Kr=pt.type==="DRAGGING"&&pt.dropping?Pt:null,jn={innerRef:c,draggableProps:{"data-rbd-draggable-context-id":g,"data-rbd-draggable-id":P,style:br,onTransitionEnd:Kr},dragHandleProps:lr};return jn},[g,lr,P,pt,Pt,c]),pn=Oe(function(){return{draggableId:E.id,type:E.type,source:{index:E.index,droppableId:E.droppableId}}},[E.droppableId,E.id,E.index,E.type]);return B(vr,pt.snapshot,pn)}var qo=function(o,l){return o===l},Qa=function(o){var l=o.combine,c=o.destination;return c?c.droppableId:l?l.droppableId:null},Ta=function(l){return l.combine?l.combine.draggableId:null},wd=function(l){return l.at&&l.at.type==="COMBINE"?l.at.combine.draggableId:null};function Sd(){var o=Nr(function(m,g){return{x:m,y:g}}),l=Nr(function(m,g,v,b,D){return{isDragging:!0,isClone:g,isDropAnimating:!!D,dropAnimation:D,mode:m,draggingOver:v,combineWith:b,combineTargetFor:null}}),c=Nr(function(m,g,v,b,D,T,w){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:D,combineWith:T,mode:g,offset:m,dimension:v,forceShouldAnimate:w,snapshot:l(g,b,D,T,null)}}}),f=function(g,v){if(g.isDragging){if(g.critical.draggable.id!==v.draggableId)return null;var b=g.current.client.offset,D=g.dimensions.draggables[v.draggableId],T=vn(g.impact),w=wd(g.impact),E=g.forceShouldAnimate;return c(o(b.x,b.y),g.movementMode,D,v.isClone,T,w,E)}if(g.phase==="DROP_ANIMATING"){var B=g.completed;if(B.result.draggableId!==v.draggableId)return null;var P=v.isClone,Q=g.dimensions.draggables[v.draggableId],We=B.result,qe=We.mode,rt=Qa(We),pt=Ta(We),kt=g.dropDuration,It={duration:kt,curve:qs.drop,moveTo:g.newHomeClientOffset,opacity:pt?Ha.opacity.drop:null,scale:pt?Ha.scale.drop:null};return{mapped:{type:"DRAGGING",offset:g.newHomeClientOffset,dimension:Q,dropping:It,draggingOver:rt,combineWith:pt,mode:qe,forceShouldAnimate:null,snapshot:l(qe,P,rt,pt,It)}}}return null};return f}function Oc(o){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:o,combineWith:null}}var U0={mapped:{type:"SECONDARY",offset:j,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Oc(null)}};function G0(){var o=Nr(function(v,b){return{x:v,y:b}}),l=Nr(Oc),c=Nr(function(v,b,D){return b===void 0&&(b=null),{mapped:{type:"SECONDARY",offset:v,combineTargetFor:b,shouldAnimateDisplacement:D,snapshot:l(b)}}}),f=function(b){return b?c(j,b,!0):null},m=function(b,D,T,w){var E=T.displaced.visible[b],B=!!(w.inVirtualList&&w.effected[b]),P=Tr(T),Q=P&&P.draggableId===b?D:null;if(!E){if(!B)return f(Q);if(T.displaced.invisible[b])return null;var We=lt(w.displacedBy.point),qe=o(We.x,We.y);return c(qe,Q,!0)}if(B)return f(Q);var rt=T.displacedBy.point,pt=o(rt.x,rt.y);return c(pt,Q,E.shouldAnimate)},g=function(b,D){if(b.isDragging)return b.critical.draggable.id===D.draggableId?null:m(D.draggableId,b.critical.draggable.id,b.impact,b.afterCritical);if(b.phase==="DROP_ANIMATING"){var T=b.completed;return T.result.draggableId===D.draggableId?null:m(D.draggableId,T.result.draggableId,T.impact,T.afterCritical)}return null};return g}var _d=function(){var l=Sd(),c=G0(),f=function(g,v){return l(g,v)||c(g,v)||U0};return f},q0={dropAnimationFinished:nc},X0=re(_d,q0,null,{context:ul,pure:!0,areStatePropsEqual:qo})(Al);function Md(o){var l=_l(Ya),c=l.isUsingCloneFor;return c===o.draggableId&&!o.isClone?null:k.createElement(X0,o)}function jr(o){var l=typeof o.isDragDisabled=="boolean"?!o.isDragDisabled:!0,c=!!o.disableInteractiveElementBlocking,f=!!o.shouldRespectForcePress;return k.createElement(Md,(0,ge.Z)({},o,{isClone:!1,isEnabled:l,canDragInteractiveElements:c,shouldRespectForcePress:f}))}function Ll(o){var l=(0,k.useContext)(pl);l||Me(!1);var c=l.contextId,f=l.isMovementAllowed,m=(0,k.useRef)(null),g=(0,k.useRef)(null),v=o.children,b=o.droppableId,D=o.type,T=o.mode,w=o.direction,E=o.ignoreContainerClipping,B=o.isDropDisabled,P=o.isCombineEnabled,Q=o.snapshot,We=o.useClone,qe=o.updateViewportMaxScroll,rt=o.getContainerForClone,pt=Ee(function(){return m.current},[]),kt=Ee(function(Ln){m.current=Ln},[]),It=Ee(function(){return g.current},[]),lr=Ee(function(Ln){g.current=Ln},[]);Dl({props:o,getDroppableRef:pt,getPlaceholderRef:It});var Pt=Ee(function(){f()&&qe({maxScroll:_o()})},[f,qe]);P0({droppableId:b,type:D,mode:T,direction:w,isDropDisabled:B,isCombineEnabled:P,ignoreContainerClipping:E,getDroppableRef:pt});var vr=k.createElement(N0,{on:o.placeholder,shouldAnimate:o.shouldAnimatePlaceholder},function(Ln){var xi=Ln.onClose,Wi=Ln.data,Bi=Ln.animate;return k.createElement(Io,{placeholder:Wi,onClose:xi,innerRef:lr,animate:Bi,contextId:c,onTransitionEnd:Pt})}),pn=Oe(function(){return{innerRef:kt,placeholder:vr,droppableProps:{"data-rbd-droppable-id":b,"data-rbd-droppable-context-id":c}}},[c,b,vr,kt]),br=We?We.dragging.draggableId:null,Kr=Oe(function(){return{droppableId:b,type:D,isUsingCloneFor:br}},[b,br,D]);function jn(){if(!We)return null;var Ln=We.dragging,xi=We.render,Wi=k.createElement(Md,{draggableId:Ln.draggableId,index:Ln.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(Bi,Ii){return xi(Bi,Ii,Ln)});return N.createPortal(Wi,rt())}return k.createElement(Ya.Provider,{value:Kr},v(pn,Q),jn())}var Xo=function(l,c){return l===c.droppable.type},Cd=function(l,c){return c.draggables[l.draggable.id]},eo=function(){var l={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},c=(0,ge.Z)({},l,{shouldAnimatePlaceholder:!1}),f=Nr(function(v){return{draggableId:v.id,type:v.type,source:{index:v.index,droppableId:v.droppableId}}}),m=Nr(function(v,b,D,T,w,E){var B=w.descriptor.id,P=w.descriptor.droppableId===v;if(P){var Q=E?{render:E,dragging:f(w.descriptor)}:null,We={isDraggingOver:D,draggingOverWith:D?B:null,draggingFromThisWith:B,isUsingPlaceholder:!0};return{placeholder:w.placeholder,shouldAnimatePlaceholder:!1,snapshot:We,useClone:Q}}if(!b)return c;if(!T)return l;var qe={isDraggingOver:D,draggingOverWith:B,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:w.placeholder,shouldAnimatePlaceholder:!0,snapshot:qe,useClone:null}}),g=function(b,D){var T=D.droppableId,w=D.type,E=!D.isDropDisabled,B=D.renderClone;if(b.isDragging){var P=b.critical;if(!Xo(w,P))return c;var Q=Cd(P,b.dimensions),We=vn(b.impact)===T;return m(T,E,We,We,Q,B)}if(b.phase==="DROP_ANIMATING"){var qe=b.completed;if(!Xo(w,qe.critical))return c;var rt=Cd(qe.critical,b.dimensions);return m(T,E,Qa(qe.result)===T,vn(qe.impact)===T,rt,B)}if(b.phase==="IDLE"&&b.completed&&!b.shouldFlush){var pt=b.completed;if(!Xo(w,pt.critical))return c;var kt=vn(pt.impact)===T,It=!!(pt.impact.at&&pt.impact.at.type==="COMBINE"),lr=pt.critical.droppable.id===T;return kt?It?l:c:lr?l:c}return c};return g},Ed={updateViewportMaxScroll:du};function $o(){return document.body||Me(!1),document.body}var kd={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:$o},ln=re(eo,Ed,null,{context:ul,pure:!0,areStatePropsEqual:qo})(Ll);ln.defaultProps=kd},38486:function(xr,xt){"use strict";var x;var k=60103,U=60106,xe=60107,ge=60108,H=60114,J=60109,pe=60110,S=60112,_=60113,Ge=60120,je=60115,A=60116,R=60121,Ke=60122,mt=60117,gt=60129,Qe=60131;if(typeof Symbol=="function"&&Symbol.for){var $e=Symbol.for;k=$e("react.element"),U=$e("react.portal"),xe=$e("react.fragment"),ge=$e("react.strict_mode"),H=$e("react.profiler"),J=$e("react.provider"),pe=$e("react.context"),S=$e("react.forward_ref"),_=$e("react.suspense"),Ge=$e("react.suspense_list"),je=$e("react.memo"),A=$e("react.lazy"),R=$e("react.block"),Ke=$e("react.server.block"),mt=$e("react.fundamental"),gt=$e("react.debug_trace_mode"),Qe=$e("react.legacy_hidden")}function Nt(ve){if(typeof ve=="object"&&ve!==null){var ye=ve.$$typeof;switch(ye){case k:switch(ve=ve.type,ve){case xe:case H:case ge:case _:case Ge:return ve;default:switch(ve=ve&&ve.$$typeof,ve){case pe:case S:case A:case je:case J:return ve;default:return ye}}case U:return ye}}}var Ce=J,Se=k,O=S,z=xe,Y=A,te=je,Ve=U,fe=H,ut=ge,dt=_;x=pe,x=Ce,x=Se,x=O,x=z,x=Y,x=te,x=Ve,x=fe,x=ut,x=dt,x=function(){return!1},x=function(){return!1},xt.isContextConsumer=function(ve){return Nt(ve)===pe},x=function(ve){return Nt(ve)===J},x=function(ve){return typeof ve=="object"&&ve!==null&&ve.$$typeof===k},x=function(ve){return Nt(ve)===S},x=function(ve){return Nt(ve)===xe},x=function(ve){return Nt(ve)===A},x=function(ve){return Nt(ve)===je},x=function(ve){return Nt(ve)===U},x=function(ve){return Nt(ve)===H},x=function(ve){return Nt(ve)===ge},x=function(ve){return Nt(ve)===_},x=function(ve){return typeof ve=="string"||typeof ve=="function"||ve===xe||ve===H||ve===gt||ve===ge||ve===_||ve===Ge||ve===Qe||typeof ve=="object"&&ve!==null&&(ve.$$typeof===A||ve.$$typeof===je||ve.$$typeof===J||ve.$$typeof===pe||ve.$$typeof===S||ve.$$typeof===mt||ve.$$typeof===R||ve[0]===Ke)},x=Nt},53410:function(xr,xt,x){"use strict";xr.exports=x(38486)},48136:function(xr,xt,x){"use strict";var k=Object.defineProperty,U=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,pe=(e,t,r)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))H.call(t,r)&&pe(e,r,t[r]);if(ge)for(var r of ge(t))J.call(t,r)&&pe(e,r,t[r]);return e},_=(e,t)=>U(e,xe(t)),Ge=e=>typeof e=="symbol"?e:e+"",je=(e,t)=>{var r={};for(var n in e)H.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ge)for(var n of ge(e))t.indexOf(n)<0&&J.call(e,n)&&(r[n]=e[n]);return r};function A(e){return Array.isArray(e)}var R={en:{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.cut to clipboard":"\u526A\u5207\u5230\u526A\u8D34\u677F","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.paste from clipboard":"\u7C98\u8D34","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"}};function Ke(){return"window"in globalThis&&"document"in globalThis}function mt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function gt(){return typeof navigator.vibrate=="function"}function Qe(){var e,t;if(!Ke())return"other";const r=(t=(e=navigator.userAgentData)==null?void 0:e.platform)!=null?t:navigator.platform;return/^mac/i.test(r)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(r)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function $e(){if(!Ke())return!0;if(/firefox/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/firefox\/(\d+)/i);return e?parseInt(e[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/edg\/(\d+)/i);return e?parseInt(e[1])>=79:!1}return!0}function Nt(){return HTMLElement.prototype.hasOwnProperty("popover")}var Ce={strings:R,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Ce._locale||(Ce._locale=Ke()?navigator.language.slice(0,5):"en-US"),Ce._locale},set locale(e){Ce._locale=e,Ce._numberFormatter=void 0,Ce.dirty=!0},get numberFormatter(){return Ce._numberFormatter||(Ce._numberFormatter=new Intl.NumberFormat(Ce.locale)),Ce._numberFormatter},merge(e,t){if(typeof e=="string"&&t)Ce.strings[e]=S(S({},Ce.strings[e]),t),Ce.dirty=!0;else for(const r of Object.keys(e))Ce.merge(r,e[r])},get dirty(){return Ce._dirty},set dirty(e){Ce._dirty||Ce._dirty===e||(Ce._dirty=!0,setTimeout(()=>{Ce._dirty=!1,this._subscribers.forEach(t=>t==null?void 0:t())},0))},subscribe(e){return Ce._subscribers.push(e),Ce._subscribers.length-1},unsubscribe(e){e<0||e>=Ce._subscribers.length||(Ce._subscribers[e]=void 0)},update(e){let t=e.querySelectorAll("[data-l10n-tooltip]");for(const r of t){const n=r.getAttribute("data-l10n-tooltip");if(n){const i=Se(n);i&&r.setAttribute("data-tooltip",i)}}t=e.querySelectorAll("[data-l10n-arial-label]");for(const r of t){const n=r.getAttribute("data-l10n-arial-label");if(n){const i=Se(n);i&&r.setAttribute("aria-label",i)}}}};function Se(e,...t){if(e===void 0)return;let r="";const n=Ce.locale;Ce.strings[n]&&(r=Ce.strings[n][e]);const i=n.slice(0,2);if(!r&&Ce.strings[i]&&(r=Ce.strings[i][e]),r||(r=Ce.strings.en[e]),!r)return;const a=/(%@|%([0-9]+)\$@)/g;let s=a.exec(r),u=0;for(;s;){if(t[u++]){const h=s[2]?parseInt(s[2],10)-1:u-1;let p=t[h];typeof p=="number"&&(p=Ce.numberFormatter.format(p)),r=r.replace(s[1],p)}s=a.exec(r)}return r=r.replace(/%%/g,"%"),r}var O={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},z={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Y={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},te={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},Ve={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"},fe={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 ut(e){var t,r,n,i,a,s;const u=e.split("!");let d,h,p,y=255,M=255,I=255,$=-1;const se=u.length>0&&u[0].startsWith("-");se&&(u[0]=u[0].slice(1));for(let Ze=0;Ze<u.length;Ze++){d=y,h=M,p=I;const ee=(t=u[Ze].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:t[1],De=ee==null?void 0:ee.toLowerCase(),Je=ee&&(s=(a=(i=(n=(r=te[De])!=null?r:te[Ve[ee]])!=null?n:z[ee])!=null?i:fe[ee])!=null?a:O[ee])!=null?s:u[Ze].trim();let Te=Je.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(Te!=null&&Te[1]&&Te[2]&&Te[3])y=Math.max(0,Math.min(255,Number.parseInt(Te[1],16))),M=Math.max(0,Math.min(255,Number.parseInt(Te[2],16))),I=Math.max(0,Math.min(255,Number.parseInt(Te[3],16)));else if(Te=Je.match(/^#([\da-f]{3})$/i),Te!=null&&Te[1]){const yt=Number.parseInt(Te[1][0],16),Rt=Number.parseInt(Te[1][1],16),Dt=Number.parseInt(Te[1][2],16);y=Math.max(0,Math.min(255,yt*16+yt)),M=Math.max(0,Math.min(255,Rt*16+Rt)),I=Math.max(0,Math.min(255,Dt*16+Dt))}else if(Te=Je.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),Te!=null&&Te[1]&&Te[2]&&Te[3])y=Math.max(0,Math.min(255,Number.parseInt(Te[1]))),M=Math.max(0,Math.min(255,Number.parseInt(Te[2]))),I=Math.max(0,Math.min(255,Number.parseInt(Te[3])));else return;$>=0&&(y=(1-$)*y+$*d,M=(1-$)*M+$*h,I=(1-$)*I+$*p,$=-1),Ze+1<u.length&&($=Math.max(0,Math.min(100,Number.parseInt(u[++Ze])))/100)}return $>=0&&(y=$*y+(1-$)*d,M=$*M+(1-$)*h,I=$*I+(1-$)*p),se&&(y=255-y,M=255-M,I=255-I),"#"+("00"+Math.round(y).toString(16)).slice(-2)+("00"+Math.round(M).toString(16)).slice(-2)+("00"+Math.round(I).toString(16)).slice(-2)}function dt(e){var t,r;return e=e.trim(),(r=(t=Y[e.toLowerCase()])!=null?t:Y[Ve[e]])!=null?r:ut(e)}function ve(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return 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)},e.length===4&&(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)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&t.a===void 0&&(t.a=1),t}function ye(e,t,r){return r<0&&(r+=6),r>=6&&(r-=6),r<1?(t-e)*r+e:r<3?t:r<4?(t-e)*(4-r)+e:e}function tt(e){let[t,r,n]=[e.h,e.s,e.l];t=(t+360)%360/60,n=Math.max(0,Math.min(n,1)),r=Math.max(0,Math.min(r,1));const i=n<=.5?n*(r+1):n+r-n*r,a=n*2-i;return{r:Math.round(255*ye(a,i,t+2)),g:Math.round(255*ye(a,i,t)),b:Math.round(255*ye(a,i,t-2))}}function Z(e){return e<0?0:e>255?255:Math.round(e)}function Ne(e){const{r:t,g:r,b:n}=e;let i=((1<<24)+(Z(t)<<16)+(Z(r)<<8)+Z(n)).toString(16).slice(1);return i[0]===i[1]&&i[2]===i[3]&&i[4]===i[5]&&i[6]===i[7]&&(i=i[0]+i[2]+i[4]),"#"+i}function Ye(e){let{r:t,g:r,b:n}=e;t=t/255,r=r/255,n=n/255;const i=Math.min(t,r,n),a=Math.max(t,r,n),s=a-i;let u,d;a===i?u=0:t===a?u=(r-n)/s:r===a?u=2+(n-t)/s:n===a&&(u=4+(t-r)/s),u=Math.min(u*60,360),u<0&&(u+=360);const h=(i+a)/2;return a===i?d=0:h<=.5?d=s/(a+i):d=s/(2-a-i),{h:u,s:d,l:h}}function F(e){let t=ve(e);if(!t)return e;let{h:r,s:n,l:i}=Ye(t);return n+=.1,i-=.1,Ne(tt({h:r,s:n,l:i}))}var we={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"},me={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},G=[{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 Fe(e,t,r){if(!/[A-Za-z\d]/.test(e)||(r==="up"&&(r=void 0),!t&&!r))return e;const n=e.codePointAt(0);if(n===void 0)return e;for(const i of G)if((!t||i.variant===t)&&(!r||i.style===r)&&n>=i.offset&&n<i.offset+i.len){const a=i.start+n-i.offset;return String.fromCodePoint(me[a]||a)}return e}function Ae(e){var t;if((e<119808||e>120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const r in me)if(me[r]===e){e=(t=r.codePointAt(0))!=null?t:0;break}for(const r of G)if(e>=r.start&&e<r.start+r.len)return{char:String.fromCodePoint(e-r.start+r.offset),variant:r.variant,style:r.style};return{char:String.fromCodePoint(e)}}function Le(e){var t;let r="";for(const n of e){if("{}<>[]$&#^_%:'\u02DC".includes(n)){r+=n;continue}const i=(t=n.codePointAt(0))!=null?t:0;let a=we[i];if(a)a.startsWith("\\")?r+=a+" ":r+=a;else{const{char:s,variant:u,style:d}=Ae(i);switch(a=s,u){case"double-struck":a=`\\mathbb{${a}}`;break;case"fraktur":a=`\\mathfrak{${a}}`;break;case"script":a=`\\mathscr{${a}}`;break;case"sans-serif":a=`\\mathsf{${a}}`;break;case"monospace":a=`\\mathtt{${a}}`;break;case"calligraphic":a=`\\mathcal{${a}}`;break}switch(d){case"bold":a=`\\mathbf{${a}}`;break;case"italic":a=`\\mathit{${a}}`;break;case"bolditalic":a=`\\mathbfit{${a}}`;break}r+=a}}return r}function ce(e){return e?Array.isArray(e)?e:typeof e=="object"&&"group"in e?e.group:[]:[]}var ot={},ft=S({},we),Ot={},Kt={},_t={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}"},er={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,captureSelection:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},Ft={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},rr={iff:{primitive:!0,captureSelection:!0,def:"\\;\u27FA\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},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}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2237\\char"3D}}',coloneq:'{\\mathop{\\char"3A\\char"2212}}',Coloneq:'{\\mathop{\\char"2237\\char"2212}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2239}}',Eqcolon:'{\\mathop{\\char"2212\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`\u220C}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:Ft},"amsmath.sty":{package:er,primitive:!0},"texvc.sty":{package:_t,primitive:!1}},Lt={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},oe=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,V,K;$e()?(V=new RegExp("\\p{Letter}","u"),K=new RegExp("[0-9\\p{Letter}]","u")):(V=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,K=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function ue(e,t,r="mord",n){t!==void 0&&(ot[e]={definitionType:"symbol",type:r,variant:n,codepoint:t},ft[t]||(ft[t]=e))}function he(e,t,r){if(typeof e=="string"){for(let n=0;n<e.length;n++){const i=e.charAt(n);ue(i,i.codePointAt(0))}return}for(const[n,i,a,s]of e)ue(n,i,a!=null?a:t,s!=null?s:r)}function ze(e,t){for(let r=e;r<=t;r++)ue(String.fromCodePoint(r),r)}function re(e){var t;return(t=Kt[e])!=null?t:null}function ie(e,t){var r,n;if(t.length===0||t==="\\"||!t.startsWith("\\"))return[];const i=[];for(const s in Ot)s.startsWith(t)&&!Ot[s].infix&&i.push({match:s,frequency:(r=Ot[s].frequency)!=null?r:0});for(const s in ot)s.startsWith(t)&&i.push({match:s,frequency:(n=ot[s].frequency)!=null?n:0});const a=t.substring(1);for(const s of Object.keys(e.options.macros))s.startsWith(a)&&i.push({match:"\\"+s,frequency:0});return i.sort((s,u)=>{var d,h;return s.frequency===u.frequency?s.match.length===u.match.length?s.match<u.match?-1:1:s.match.length-u.match.length:((d=u.frequency)!=null?d:0)-((h=s.frequency)!=null?h:0)}),i.map(s=>s.match)}function Xe(e){let t="auto";const r=e.match(/:([^=]+)/);return r&&(t=r[1].trim()),t}function et(e){if(!e)return[];const t=[];let r=e.split("]");if(r[0].startsWith("[")){t.push({isOptional:!0,type:Xe(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...et(r[n]))}else if(r=e.split("}"),r[0].startsWith("{")){t.push({isOptional:!1,type:Xe(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...et(r[n]))}return t}function it(e){if(!e)return"";let t="",r=!0;for(const n of e)typeof n.value=="string"?t+=n.value:r=!1;return r?t:""}function Et(e,t){typeof e=="string"&&(e=[e]);const r={tabular:!1,params:[],createAtom:t};for(const n of e)Kt[n]=r}function Bt(e,t,r){typeof e=="string"&&(e=[e]);const i={tabular:!0,params:et(t),createAtom:r};for(const a of e)Kt[a]=i}function W(e,t,r){var n,i;r||(r={});const a={definitionType:"function",params:et(t),ifMode:r.ifMode,isFunction:(n=r.isFunction)!=null?n:!1,applyMode:r.applyMode,infix:(i=r.infix)!=null?i:!1,parse:r.parse,createAtom:r.createAtom,applyStyle:r.applyStyle,serialize:r.serialize,render:r.render};if(typeof e=="string")Ot["\\"+e]=a;else for(const s of e)Ot["\\"+s]=a}var Mt;function vt(e){return Mt||(Mt=q(rr)),e?q(S(S({},Mt),e)):Mt}function N(e,t){var r,n,i,a;if(typeof e=="string"){let s=0;const u=e;return/(^|[^\\])#1/.test(u)&&(s=1),/(^|[^\\])#2/.test(u)&&(s=2),/(^|[^\\])#3/.test(u)&&(s=3),/(^|[^\\])#4/.test(u)&&(s=4),/(^|[^\\])#5/.test(u)&&(s=5),/(^|[^\\])#6/.test(u)&&(s=6),/(^|[^\\])#7/.test(u)&&(s=7),/(^|[^\\])#8/.test(u)&&(s=8),/(^|[^\\])#9/.test(u)&&(s=9),{expand:(r=t==null?void 0:t.expand)!=null?r:!0,captureSelection:(n=t==null?void 0:t.captureSelection)!=null?n:!0,args:s,def:u}}return S({expand:(i=t==null?void 0:t.expand)!=null?i:!0,captureSelection:(a=t==null?void 0:t.captureSelection)!=null?a:!0,args:0},e)}function q(e){if(!e)return{};const t={};for(const r of Object.keys(e)){const n=e[r];if(n==null)delete t[r];else if(typeof n=="object"&&"package"in n)for(const i of Object.keys(n.package))t[i]=N(n.package[i],{expand:!n.primitive,captureSelection:n.captureSelection});else t[r]=N(n)}return t}function de(e,t="math"){if(!e||e.length===0)return null;let r=null;if(e.startsWith("\\")){if(r=Ot[e],r)return!r.ifMode||r.ifMode===t?r:null;t==="math"?r=ot[e]:Lt[e]&&(r={definitionType:"symbol",type:"mord",codepoint:Lt[e]})}else if(t==="math"){if(r=ot[e],!r&&e.length===1){const n=Oe("math",e.codePointAt(0));return n.startsWith("\\")?_(S({},de(n,"math")),{command:n}):null}}else Lt[e]?r={definitionType:"symbol",type:"mord",codepoint:Lt[e]}:t==="text"&&(r={definitionType:"symbol",type:"mord",codepoint:e.codePointAt(0)});return r!=null?r:null}function at(e,t){if(!e.startsWith("\\"))return null;const r=e.slice(1);return t[r]}function Oe(e,t){if(t===void 0)return"";if(e==="math"&&ft[t])return ft[t];if(e==="text"){const r=Object.keys(Lt).find(n=>Lt[n]===t);return r||String.fromCodePoint(t)}return String.fromCodePoint(t)}var Ee=[0,.68889,0,0,.72222],or=[0,.68889,0,0,.66667],Ht=[0,.68889,0,0,.77778],Wt=[0,.68889,0,0,.61111],Gt=[.16667,.68889,0,0,.77778],nr=[0,.68889,0,0,.55556],Ct=[0,0,0,0,.25],wr=[0,.825,0,0,2.33334],hr=[0,.9,0,0,2.33334],Ur=[0,.68889,0,0,.54028],Er=[-.03598,.46402,0,0,.5],cr=[-.13313,.36687,0,0,1],nn=[.01354,.52239,0,0,1],Zt=[.01354,.52239,0,0,1.11111],sn=[0,.54986,0,0,1],qr=[0,.69224,0,0,.5],un=[0,.43056,0,0,1],Jr=[.08198,.58198,0,0,.77778],Sr=[.19444,.69224,0,0,.41667],Gr=[.1808,.675,0,0,1],Nr=[.19444,.69224,0,0,.83334],Bn=[.13667,.63667,0,0,1],$n=[-.064,.437,0,0,1.334],wn=[.08167,.58167,0,0,.77778],Xn=[0,.69224,0,0,.72222],C=[0,.69224,0,0,.66667],L=[-.13313,.36687,0,0,.77778],Ie=[.06062,.54986,0,0,.77778],Pe=[0,.69224,0,0,.77778],Re=[.25583,.75583,0,0,.77778],He=[.25142,.75726,0,0,.77778],bt=[.20576,.70576,0,0,.77778],st=[.30274,.79383,0,0,.77778],St=[.22958,.72958,0,0,.77778],qt=[.1808,.675,0,0,.77778],jt=[.13667,.63667,0,0,.77778],$t=[.13597,.63597,0,0,.77778],Tt=[.03517,.54986,0,0,.77778],Xt=[0,.675,0,0,.77778],Me=[.19444,.69224,0,0,.61111],Fr=[0,.54986,0,0,.76042],Ir=[0,.54986,0,0,.66667],fr=[.0391,.5391,0,0,.77778],Wr=[.03517,.54986,0,0,1.33334],pr=[.38569,.88569,0,0,.77778],Vr=[.23222,.74111,0,0,.77778],le=[.19444,.69224,0,0,.77778],X=[0,.37788,0,0,.5],be=[0,.54986,0,0,.72222],ke=[0,.69224,0,0,.83334],j=[.11111,.69224,0,0,.66667],ne=[.26167,.75726,0,0,.77778],ae=[.48256,.98256,0,0,.77778],Be=[.28481,.79383,0,0,.77778],lt=[.08167,.58167,0,0,.22222],ct=[.08167,.58167,0,0,.38889],Vt=[0,.43056,.04028,0,.66667],sr=[.41951,.91951,0,0,.77778],mr=[.24982,.74947,0,0,.38865],gr=[.08319,.58283,0,0,.75623],tr=[0,.10803,0,0,.27764],Lr=[0,.47534,0,0,.50181],$r=[.18906,.47534,0,0,.50181],Jt=[0,.69141,0,0,.50181],Yt=[.24982,.74947,0,0,.27764],ir=[0,.69141,0,0,.21471],Ut=[.25,.75,0,0,.44722],Qt=[0,.64444,0,0,.575],dr=[.08556,.58556,0,0,.89444],Br=[0,.69444,0,0,.89444],kr=[0,.68611,0,0,.9],At=[0,.68611,0,0,.86944],ht=[.25,.75,0,0,.575],ar=[.25,.75,0,0,.31944],zt=[0,.69444,0,0,.63889],yr=[0,.69444,0,0,.31944],dn=[0,.44444,0,0,.63889],ur=[0,.44444,0,0,.51111],rn=[0,.69444,0,0,.575],Tr=[.13333,.63333,0,0,.89444],Tn=[0,.44444,0,0,.31944],ri=[0,.69444,0,0,.86944],mn=[0,.68611,0,0,.69166],Jn=[0,.68611,0,0,.83055],En=[0,.68611,0,0,.89444],ni=[0,.69444,0,0,.60278],gn=[.19444,.69444,0,0,.51111],mi=[0,.69444,0,0,.83055],Pr=[-.10889,.39111,0,0,1.14999],Pn=[.19444,.69444,0,0,.575],Sn=[.19444,.69444,0,0,1.14999],zn=[.19444,.69444,0,0,.70277],gi=[.05556,.75,0,0,.575],_n=[0,.68611,0,0,.95833],ci=[.08556,.58556,0,0,.76666],Yn=[-.02639,.47361,0,0,.575],Pi=[0,.44444,0,0,.89444],Kn=[0,.55556,0,0,.76666],vi=[-.10889,.39111,0,0,.89444],Zi=[.00222,.50222,0,0,.89444],_i=[.19667,.69667,0,0,.89444],Mi=[.08556,.58556,0,0,1.14999],ji=[0,.69444,0,0,.70277],Ri=[-.02778,.47222,0,0,.575],ui=[.25,.75,0,0,.51111],fn=[-.13889,.36111,0,0,1.14999],xa=[.19444,.69444,0,0,1.02222],Ci=[.12963,.69444,0,0,.89444],Oi=[.19444,.69444,0,0,.44722],bi=[0,.64444,.13167,0,.59111],Ui=[.19444,.64444,.13167,0,.59111],Ei=[0,.68611,.17208,0,.8961],Gi=[.19444,.44444,.105,0,.53222],Ni=[0,.44444,.085,0,.82666],Fi=[0,.69444,.06709,0,.59111],kn=[0,.69444,.12945,0,.35555],di=[0,.69444,0,0,.94888],fi=[0,.69444,.11472,0,.59111],Rn=[0,.68611,.10778,0,.88555],Hn=[0,.69444,.07939,0,.62055],zi=[0,.69444,.12417,0,.30667],zr=[0,.64444,.13556,0,.51111],Mr=[.19444,.64444,.13556,0,.51111],hn=[0,.68333,.16389,0,.74333],Dn=[.19444,.43056,.08847,0,.46],ii=[0,.43056,.07514,0,.71555],On=[0,.69444,.06646,0,.51111],Na=[0,.69444,0,0,.83129],Ws=[0,.69444,.1225,0,.51111],Nn=[0,.68333,.09403,0,.76666],qi=[0,.68333,.11111,0,.76666],ns=[0,.69444,.06961,0,.51444],Xi=[0,.69444,0,0,.27778],wa=[.25,.75,0,0,.38889],Wn=[0,.64444,0,0,.5],Sa=[0,.69444,0,0,.77778],aa=[0,.68333,0,0,.75],_a=[0,.68333,0,0,.77778],mo=[0,.68333,0,0,.68056],go=[0,.68333,0,0,.72222],ki=[.25,.75,0,0,.5],vn=[.25,.75,0,0,.27778],bn=[0,.69444,0,0,.5],Ma=[0,.69444,0,0,.55556],Ji=[0,.43056,0,0,.44445],Ca=[0,.43056,0,0,.5],Vs=[.19444,.43056,0,0,.55556],is=[0,.43056,0,0,.55556],yi=[.08333,.58333,0,0,.77778],as=[0,.43056,0,0,.27778],Zs=[0,.66786,0,0,.27778],os=[0,.69444,0,0,.75],ss=[0,.66786,0,0,.5],Fa=[0,.68333,0,0,.625],vo=[.19444,.69444,0,0,.44445],bo=[0,.69444,0,0,.72222],ls=[.19444,.69444,0,0,.5],Ea=[.19444,.69444,0,0,1],cs=[.011,.511,0,0,1.126],za=[.19444,.69444,0,0,.61111],ka=[.05556,.75,0,0,.5],js=[0,.68333,0,0,.83334],us=[.0391,.5391,0,0,.66667],yo=[-.05555,.44445,0,0,.5],ds=[0,.43056,0,0,.77778],Da=[0,.55556,0,0,.66667],xo=[-.03625,.46375,0,0,.77778],Us=[-.01688,.48312,0,0,.77778],Ka=[.0391,.5391,0,0,1],Or=[0,.69444,0,0,.61111],Zr=[-.03472,.46528,0,0,.5],Yr=[.25,.75,0,0,.44445],ai=[-.14236,.35764,0,0,1],Vn=[.244,.744,0,0,.412],Aa=[.19444,.69444,0,0,.88889],oa=[.12963,.69444,0,0,.77778],Fo=[.19444,.69444,0,0,.38889],zo=[.011,.511,0,0,1.638],fs=[.19444,.69444,0,0,0],sa=[0,.44444,0,0,.575],La=[.19444,.44444,0,0,.575],Gs=[0,.68611,0,0,.75555],ou=[0,.69444,0,0,.66759],su=[0,.68611,0,0,.80555],lu=[0,.68611,.08229,0,.98229],cu=[0,.68611,0,0,.76666],uu=[0,.44444,0,0,.58472],ec=[.19444,.44444,0,0,.6118],hs=[.19444,.43056,0,0,.5],du=[0,.68333,.02778,.08334,.76278],fu=[0,.68333,.08125,.05556,.83125],hu=[0,.43056,0,.05556,.48472],pu=[.19444,.43056,0,.08334,.51702],mu=[.25,.75,0,0,.42778],Fn=[0,.69444,0,0,.55],Ba=[0,.69444,0,0,.73334],la=[0,.69444,0,0,.79445],tc=[0,.69444,0,0,.51945],rc=[0,.69444,0,0,.70278],nc=[0,.69444,0,0,.76389],u0=[.25,.75,0,0,.34306],ic=[0,.69444,0,0,.56111],gu=[0,.69444,0,0,.25556],vu=[.19444,.45833,0,0,.56111],qs=[0,.45833,0,0,.56111],Ha=[0,.69444,0,0,.30556],Xs=[0,.69444,0,0,.58056],Wa=[0,.69444,0,0,.67223],wo=[0,.69444,0,0,.85556],Js=[0,.69444,0,0,.55834],Ki=[0,.65556,.11156,0,.5],ps=[0,.69444,.08094,0,.70834],Ys=[.17014,0,0,0,.44445],bu=[0,.69444,.0799,0,.5],ac=[0,.69444,0,0,.73752],yu=[0,.69444,.09205,0,.5],xu=[0,.69444,.09031,0,.77778],oc=[0,.69444,.07816,0,.27778],wu=[0,.69444,.00316,0,.5],Su=[.19444,.69444,0,0,.83334],sc=[.05556,.75,0,0,.83334],_u=[0,.75,0,0,.5],Mu=[.125,.08333,0,0,.27778],Cu=[0,.08333,0,0,.27778],ca=[0,.65556,0,0,.5],lc=[0,.69444,0,0,.47222],Ia=[0,.69444,0,0,.66667],Eu=[0,.69444,0,0,.59722],cc=[0,.69444,0,0,.54167],uc=[0,.69444,0,0,.70834],Ko=[.25,.75,0,0,.28889],Ho=[0,.69444,0,0,.51667],Qs=[0,.44444,0,0,.44445],ku=[.19444,.44444,0,0,.51667],Du=[0,.44444,0,0,.38333],Au=[0,.44444,0,0,.51667],Lu=[0,.69444,0,0,.83334],Bu=[.35001,.85,0,0,.45834],Iu=[.35001,.85,0,0,.57778],$u=[.35001,.85,0,0,.41667],Tu=[.35001,.85,0,0,.58334],el=[0,.72222,0,0,.55556],Pu=[1e-5,.6,0,0,.66667],Ru=[1e-5,.6,0,0,.77778],tl=[.25001,.75,0,0,.94445],Ou=[.306,.805,.19445,0,.47222],dc=[.30612,.805,.19445,0,.47222],So=[.25001,.75,0,0,.83334],_o=[.35001,.85,0,0,.47222],fc=[.25001,.75,0,0,1.11111],Nu=[.65002,1.15,0,0,.59722],hc=[.65002,1.15,0,0,.81111],Fu=[.65002,1.15,0,0,.47222],pc=[.65002,1.15,0,0,.66667],rl=[0,.75,0,0,1],zu=[.55001,1.05,0,0,1.27778],Ku=[.862,1.36,.44445,0,.55556],Hu=[.86225,1.36,.44445,0,.55556],Di=[.55001,1.05,0,0,1.11111],nl=[.65002,1.15,0,0,.52778],mc=[.65002,1.15,0,0,.61111],ms=[.55001,1.05,0,0,1.51112],Wu=[.95003,1.45,0,0,.73611],gc=[.95003,1.45,0,0,1.04445],vc=[.95003,1.45,0,0,.52778],il=[.95003,1.45,0,0,.75],gs=[0,.75,0,0,1.44445],vs=[.95003,1.45,0,0,.58334],Vu=[1.25003,1.75,0,0,.79167],Zu=[1.25003,1.75,0,0,1.27778],bc=[1.25003,1.75,0,0,.58334],al=[1.25003,1.75,0,0,.80556],Wo=[0,.825,0,0,1.8889],bs=[1.25003,1.75,0,0,.63889],Vo=[.64502,1.155,0,0,.875],ju=[1e-5,.6,0,0,.875],ys=[-99e-5,.601,0,0,.66667],ol=[.64502,1.155,0,0,.66667],Uu=[1e-5,.9,0,0,.88889],Gu=[.65002,1.15,0,0,.88889],yc=[.90001,0,0,0,.88889],qu=[-.00499,.605,0,0,1.05556],sl=[0,.12,0,0,.45],wt=[0,.61111,0,0,.525],oi=[.08333,.69444,0,0,.525],Mo=[-.08056,.53055,0,0,.525],ll=[-.05556,.55556,0,0,.525],hi=[0,.43056,0,0,.525],Zo=[.22222,.43056,0,0,.525],Xu=[0,0,0,0,.525],xs={"AMS-Regular":{32:Ct,65:Ee,66:or,67:Ee,68:Ee,69:or,70:Wt,71:Ht,72:Ht,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Ht,76:or,77:[0,.68889,0,0,.94445],78:Ee,79:Gt,80:Wt,81:Gt,82:Ee,83:nr,84:or,85:Ee,86:Ee,87:[0,.68889,0,0,1],88:Ee,89:Ee,90:or,107:nr,160:Ct,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:nr,295:Ur,710:wr,732:hr,770:wr,771:hr,989:wn,1008:Vt,8245:[0,.54986,0,0,.275],8463:Ur,8487:Ee,8498:nr,8502:or,8503:[0,.68889,0,0,.44445],8504:or,8513:[0,.68889,0,0,.63889],8592:Er,8594:Er,8602:cr,8603:cr,8606:nn,8608:nn,8610:Zt,8611:Zt,8619:sn,8620:sn,8621:[-.13313,.37788,0,0,1.38889],8622:cr,8624:qr,8625:qr,8630:un,8631:un,8634:Jr,8635:Jr,8638:Sr,8639:Sr,8642:Sr,8643:Sr,8644:Gr,8646:Gr,8647:Gr,8648:Nr,8649:Gr,8650:Nr,8651:nn,8652:nn,8653:cr,8654:cr,8655:cr,8666:Bn,8667:Bn,8669:[-.13313,.37788,0,0,1],8672:$n,8674:$n,8705:[0,.825,0,0,.5],8708:nr,8709:wn,8717:[0,.43056,0,0,.42917],8722:Er,8724:[.08198,.69224,0,0,.77778],8726:wn,8733:Pe,8736:Xn,8737:Xn,8738:[.03517,.52239,0,0,.72222],8739:lt,8740:[.25142,.74111,0,0,.27778],8741:ct,8742:[.25142,.74111,0,0,.5],8756:C,8757:C,8764:L,8765:[-.13313,.37788,0,0,.77778],8769:L,8770:xo,8774:st,8776:Us,8778:wn,8782:Ie,8783:Ie,8785:Jr,8786:Jr,8787:Jr,8790:Pe,8791:St,8796:[.08198,.91667,0,0,.77778],8806:Re,8807:Re,8808:He,8809:He,8812:[.25583,.75583,0,0,.5],8814:bt,8815:bt,8816:st,8817:st,8818:St,8819:St,8822:qt,8823:qt,8828:jt,8829:jt,8830:St,8831:St,8832:bt,8833:bt,8840:st,8841:st,8842:$t,8843:$t,8847:Tt,8848:Tt,8858:Jr,8859:Jr,8861:Jr,8862:Xt,8863:Xt,8864:Xt,8865:Xt,8872:[0,.69224,0,0,.61111],8873:Xn,8874:[0,.69224,0,0,.88889],8876:Wt,8877:Wt,8878:Ee,8879:Ee,8882:Tt,8883:Tt,8884:jt,8885:jt,8888:[0,.54986,0,0,1.11111],8890:Vs,8891:Me,8892:Me,8901:[0,.54986,0,0,.27778],8903:wn,8905:wn,8906:wn,8907:Pe,8908:Pe,8909:[-.03598,.46402,0,0,.77778],8910:Fr,8911:Fr,8912:Tt,8913:Tt,8914:Ir,8915:Ir,8916:C,8918:fr,8919:fr,8920:Wr,8921:Wr,8922:pr,8923:pr,8926:jt,8927:jt,8928:st,8929:st,8934:Vr,8935:Vr,8936:Vr,8937:Vr,8938:bt,8939:bt,8940:st,8941:st,8994:le,8995:le,9416:[.15559,.69224,0,0,.90222],9484:qr,9488:qr,9492:X,9496:X,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Xt,9633:Xt,9650:be,9651:be,9654:Tt,9660:be,9661:be,9664:Tt,9674:j,9733:[.19444,.69224,0,0,.94445],10003:ke,10016:ke,10731:j,10846:[.19444,.75583,0,0,.61111],10877:jt,10878:jt,10885:Re,10886:Re,10887:$t,10888:$t,10889:ne,10890:ne,10891:ae,10892:ae,10901:jt,10902:jt,10933:He,10934:He,10935:ne,10936:ne,10937:ne,10938:ne,10949:Re,10950:Re,10955:Be,10956:Be,57350:lt,57351:ct,57352:wn,57353:Vt,57356:He,57357:He,57358:sr,57359:st,57360:st,57361:sr,57366:He,57367:He,57368:He,57369:He,57370:$t,57371:$t},"Caligraphic-Regular":{32:Ct,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:Ct},"Fraktur-Regular":{32:Ct,33:[0,.69141,0,0,.29574],34:ir,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:mr,41:mr,42:[0,.62119,0,0,.27764],43:gr,44:tr,45:gr,46:tr,47:[.24982,.74947,0,0,.50181],48:Lr,49:Lr,50:Lr,51:$r,52:$r,53:$r,54:Jt,55:$r,56:Jt,57:$r,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:Yt,93:Yt,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:Ct,8216:ir,8217:ir,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:Ct,33:[0,.69444,0,0,.35],34:ni,35:[.19444,.69444,0,0,.95833],36:gi,37:[.05556,.75,0,0,.95833],38:Br,39:yr,40:Ut,41:Ut,42:[0,.75,0,0,.575],43:Tr,44:[.19444,.15556,0,0,.31944],45:Du,46:[0,.15556,0,0,.31944],47:ht,48:Qt,49:Qt,50:Qt,51:Qt,52:Qt,53:Qt,54:Qt,55:Qt,56:Qt,57:Qt,58:Tn,59:[.19444,.44444,0,0,.31944],60:dr,61:vi,62:dr,63:[0,.69444,0,0,.54305],64:Br,65:At,66:[0,.68611,0,0,.81805],67:Jn,68:[0,.68611,0,0,.88194],69:Gs,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:kr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:mn,77:[0,.68611,0,0,1.09166],78:kr,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:At,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:ar,92:ht,93:ar,94:rn,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:zt,99:ur,100:zt,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:zt,105:yr,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:yr,109:[0,.44444,0,0,.95833],110:dn,111:sa,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:dn,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:ur,123:ht,124:ar,125:ht,126:[.35,.34444,0,0,.575],160:Ct,163:[0,.69444,0,0,.86853],168:rn,172:[0,.44444,0,0,.76666],176:ri,177:Tr,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Tr,216:[.04861,.73472,0,0,.89444],223:Eu,230:[0,.44444,0,0,.83055],247:Tr,248:[.09722,.54167,0,0,.575],305:Tn,338:[0,.68611,0,0,1.16944],339:Pi,567:[.19444,.44444,0,0,.35139],710:rn,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:rn,715:rn,728:rn,729:yr,730:ri,732:rn,733:rn,915:mn,916:_n,920:En,923:su,926:cu,928:kr,931:Jn,933:En,934:Jn,936:En,937:Jn,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:yr,8217:yr,8220:ni,8221:ni,8224:gn,8225:gn,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:ou,8465:mi,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:mi,8501:ji,8592:Pr,8593:Pn,8594:Pr,8595:Pn,8596:Pr,8597:ht,8598:Sn,8599:Sn,8600:Sn,8601:Sn,8636:Pr,8637:Pr,8640:Pr,8641:Pr,8656:Pr,8657:zn,8658:Pr,8659:zn,8660:Pr,8661:[.25,.75,0,0,.70277],8704:zt,8706:[0,.69444,.06389,0,.62847],8707:zt,8709:gi,8711:_n,8712:ci,8715:ci,8722:Tr,8723:Tr,8725:ht,8726:ht,8727:Ri,8728:Yn,8729:Yn,8730:[.18,.82,0,0,.95833],8733:Pi,8734:[0,.44444,0,0,1.14999],8736:Xn,8739:ar,8741:ht,8743:Kn,8744:Kn,8745:Kn,8746:Kn,8747:[.19444,.69444,.12778,0,.56875],8764:vi,8768:[.19444,.69444,0,0,.31944],8771:Zi,8776:[.02444,.52444,0,0,.89444],8781:Zi,8801:Zi,8804:_i,8805:_i,8810:Mi,8811:Mi,8826:dr,8827:dr,8834:dr,8835:dr,8838:_i,8839:_i,8846:Kn,8849:_i,8850:_i,8851:Kn,8852:Kn,8853:Tr,8854:Tr,8855:Tr,8856:Tr,8857:Tr,8866:ji,8867:ji,8868:Br,8869:Br,8900:Yn,8901:[-.02639,.47361,0,0,.31944],8902:Ri,8968:ui,8969:ui,8970:ui,8971:ui,8994:fn,8995:fn,9651:xa,9657:Ri,9661:xa,9667:Ri,9711:Sn,9824:Ci,9825:Ci,9826:Ci,9827:Ci,9837:[0,.75,0,0,.44722],9838:Oi,9839:Oi,10216:Ut,10217:Ut,10815:kr,10927:_i,10928:_i,57376:fs},"Main-BoldItalic":{32:Ct,33:[0,.69444,.11417,0,.38611],34:Hn,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:kn,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:bi,49:bi,50:bi,51:bi,52:Ui,53:bi,54:bi,55:Ui,56:bi,57:bi,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:fi,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:Ei,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:Ei,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:Fi,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:Gi,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:Gi,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:Ct,168:[0,.69444,.11473,0,.59111],176:di,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:Ni,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Ni,567:[.19444,.44444,.04611,0,.385],710:Fi,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:kn,730:di,732:fi,733:fi,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:Ei,931:[0,.68611,.11431,0,.82666],933:Rn,934:[0,.68611,.05632,0,.82666],936:Rn,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:kn,8217:kn,8220:[0,.69444,.16772,0,.62055],8221:Hn},"Main-Italic":{32:Ct,33:zi,34:ns,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:zi,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:zr,49:zr,50:zr,51:zr,52:Mr,53:zr,54:zr,55:Mr,56:zr,57:zr,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Ws,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:hn,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:hn,79:Nn,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:hn,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:On,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:Dn,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:Dn,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:Ct,168:[0,.66786,.10474,0,.51111],176:Na,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:ii,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:ii,710:On,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:Na,732:[0,.66786,.11585,0,.51111],733:Ws,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Nn,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:hn,931:[0,.68333,.12028,0,.71555],933:qi,934:[0,.68333,.05986,0,.71555],936:qi,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:zi,8217:zi,8220:[0,.69444,.1685,0,.51444],8221:ns,8463:Ur},"Main-Regular":{32:Ct,33:Xi,34:bn,35:Su,36:ka,37:sc,38:Sa,39:Xi,40:wa,41:wa,42:_u,43:yi,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:ki,48:Wn,49:Wn,50:Wn,51:Wn,52:Wn,53:Wn,54:Wn,55:Wn,56:Wn,57:Wn,58:as,59:[.19444,.43056,0,0,.27778],60:fr,61:L,62:fr,63:lc,64:Sa,65:aa,66:[0,.68333,0,0,.70834],67:go,68:[0,.68333,0,0,.76389],69:mo,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:aa,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:_a,76:Fa,77:[0,.68333,0,0,.91667],78:aa,79:_a,80:mo,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:go,85:aa,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:aa,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:vn,92:ki,93:vn,94:bn,95:[.31,.12056,.02778,0,.5],97:Ca,98:Ma,99:Ji,100:Ma,101:Ji,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Ma,105:Zs,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Xi,109:[0,.43056,0,0,.83334],110:is,111:Ca,112:Vs,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:is,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:Ji,123:ki,124:vn,125:ki,126:[.35,.31786,0,0,.5],160:Ct,163:[0,.69444,0,0,.76909],167:vo,168:ss,172:[0,.43056,0,0,.66667],176:os,177:yi,182:za,184:Ys,198:[0,.68333,0,0,.90278],215:yi,216:[.04861,.73194,0,0,.77778],223:bn,230:[0,.43056,0,0,.72222],247:yi,248:[.09722,.52778,0,0,.5],305:as,338:[0,.68333,0,0,1.01389],339:ds,567:[.19444,.43056,0,0,.30556],710:bn,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:bn,715:bn,728:bn,729:Zs,730:os,732:ss,733:bn,915:Fa,916:js,920:_a,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:aa,931:go,933:_a,934:go,936:_a,937:go,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Xi,8217:Xi,8220:bn,8221:bn,8224:vo,8225:vo,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Ur,8465:bo,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:bo,8501:Or,8592:cr,8593:ls,8594:cr,8595:ls,8596:cr,8597:ki,8598:Ea,8599:Ea,8600:Ea,8601:Ea,8614:[.011,.511,0,0,1],8617:cs,8618:cs,8636:cr,8637:cr,8640:cr,8641:cr,8652:[.011,.671,0,0,1],8656:cr,8657:za,8658:cr,8659:za,8660:cr,8661:[.25,.75,0,0,.61111],8704:Ma,8706:[0,.69444,.05556,.08334,.5309],8707:Ma,8709:ka,8711:js,8712:us,8715:us,8722:yi,8723:yi,8725:ki,8726:ki,8727:Zr,8728:yo,8729:yo,8730:[.2,.8,0,0,.83334],8733:ds,8734:un,8736:Xn,8739:vn,8741:ki,8743:Da,8744:Da,8745:Da,8746:Da,8747:[.19444,.69444,.11111,0,.41667],8764:L,8768:[.19444,.69444,0,0,.27778],8771:xo,8773:[-.022,.589,0,0,1],8776:Us,8781:xo,8784:[-.133,.67,0,0,.778],8801:xo,8804:$t,8805:$t,8810:Ka,8811:Ka,8826:fr,8827:fr,8834:fr,8835:fr,8838:$t,8839:$t,8846:Da,8849:$t,8850:$t,8851:Da,8852:Da,8853:yi,8854:yi,8855:yi,8856:yi,8857:yi,8866:Or,8867:Or,8868:Sa,8869:Sa,8872:[.249,.75,0,0,.867],8900:yo,8901:[-.05555,.44445,0,0,.27778],8902:Zr,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:Yr,8969:Yr,8970:Yr,8971:Yr,8994:ai,8995:ai,9136:Vn,9137:Vn,9651:Aa,9657:Zr,9661:Aa,9667:Zr,9711:Ea,9824:oa,9825:oa,9826:oa,9827:oa,9837:[0,.75,0,0,.38889],9838:Fo,9839:Fo,10216:wa,10217:wa,10222:Vn,10223:Vn,10229:[.011,.511,0,0,1.609],10230:zo,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:zo,10815:aa,10927:$t,10928:$t,57376:fs},"Math-BoldItalic":{32:Ct,48:sa,49:sa,50:sa,51:La,52:La,53:La,54:Qt,55:La,56:Qt,57:La,65:At,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:lu,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:Gs,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:ou,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:uu,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:Ct,915:[0,.68611,.15972,0,.65694],916:_n,920:[0,.68611,.03194,0,.86722],923:su,926:[0,.68611,.07458,0,.84125],928:lu,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:cu,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:uu,960:[0,.44444,.03704,0,.68241],961:ec,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:ec,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Ct,48:Ca,49:Ca,50:Ca,51:hs,52:hs,53:hs,54:Wn,55:hs,56:Wn,57:hs,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:fu,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:du,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:hu,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:Ct,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:du,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:fu,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:hu,960:[0,.43056,.03588,0,.57003],961:pu,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:pu,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Ct,33:[0,.69444,0,0,.36667],34:Js,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:Ha,40:mu,41:mu,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:Fn,49:Fn,50:Fn,51:Fn,52:Fn,53:Fn,54:Fn,55:Fn,56:Fn,57:Fn,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:tc,64:Ba,65:Ba,66:Ba,67:rc,68:la,69:[0,.69444,0,0,.64167],70:Or,71:Ba,72:la,73:[0,.69444,0,0,.33056],74:tc,75:nc,76:Xs,77:[0,.69444,0,0,.97778],78:la,79:la,80:rc,81:[.10556,.69444,0,0,.79445],82:rc,83:Or,84:Ba,85:nc,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Ba,89:[0,.69444,.0275,0,.73334],90:Wa,91:u0,93:u0,94:Fn,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:ic,99:[0,.45833,0,0,.48889],100:ic,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:ic,105:gu,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:gu,109:[0,.45833,0,0,.86667],110:qs,111:[0,.45833,0,0,.55],112:vu,113:vu,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:qs,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:Ct,168:Fn,176:Ba,180:Fn,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:Fn,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:Fn,729:Ha,730:Ba,732:Fn,733:Fn,915:Xs,916:[0,.69444,0,0,.91667],920:wo,923:Wa,926:Ba,928:la,931:la,933:wo,934:la,936:wo,937:la,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ha,8217:Ha,8220:Js,8221:Js},"SansSerif-Italic":{32:Ct,33:[0,.69444,.05733,0,.31945],34:wu,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:oc,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:Mu,45:[0,.44444,.01946,0,.33333],46:Cu,47:[.25,.75,.13164,0,.5],48:Ki,49:Ki,50:Ki,51:Ki,52:Ki,53:Ki,54:Ki,55:Ki,56:Ki,57:Ki,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:Ia,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:ps,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:cc,77:[0,.69444,.08094,0,.875],78:ps,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:bu,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:Ct,168:[0,.67937,.06385,0,.5],176:ac,184:Ys,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:bu,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:yu,715:bn,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:ac,732:[0,.67659,.08826,0,.5],733:yu,915:[0,.69444,.13372,0,.54167],916:Lu,920:[0,.69444,.07555,0,.77778],923:Or,926:[0,.69444,.12816,0,.66667],928:ps,931:[0,.69444,.11983,0,.72222],933:xu,934:[0,.69444,.04603,0,.72222],936:xu,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:oc,8217:oc,8220:[0,.69444,.14205,0,.5],8221:wu},"SansSerif-Regular":{32:Ct,33:[0,.69444,0,0,.31945],34:bn,35:Su,36:ka,37:sc,38:[0,.69444,0,0,.75834],39:Xi,40:wa,41:wa,42:_u,43:yi,44:Mu,45:[0,.44444,0,0,.33333],46:Cu,47:ki,48:ca,49:ca,50:ca,51:ca,52:ca,53:ca,54:ca,55:ca,56:ca,57:ca,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:lc,64:Ia,65:Ia,66:Ia,67:zt,68:[0,.69444,0,0,.72223],69:Eu,70:[0,.69444,0,0,.56945],71:Ia,72:uc,73:Xi,74:lc,75:[0,.69444,0,0,.69445],76:cc,77:[0,.69444,0,0,.875],78:uc,79:[0,.69444,0,0,.73611],80:zt,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Ma,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:Ia,89:[0,.69444,.025,0,.66667],90:Or,91:Ko,93:Ko,94:bn,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Ho,99:Qs,100:Ho,101:Qs,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Ho,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:Au,111:[0,.44444,0,0,.5],112:ku,113:ku,114:[0,.44444,.01389,0,.34167],115:Du,116:[0,.57143,0,0,.36111],117:Au,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:Ct,168:[0,.67937,0,0,.5],176:Ia,184:Ys,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:bn,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:bn,715:bn,728:bn,729:[0,.67937,0,0,.27778],730:Ia,732:[0,.67659,0,0,.5],733:bn,915:cc,916:Lu,920:Sa,923:Or,926:Ia,928:uc,931:bo,933:Sa,934:bo,936:Sa,937:bo,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Xi,8217:Xi,8220:bn,8221:bn},"Script-Regular":{32:Ct,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:Ct},"Size1-Regular":{32:Ct,40:Bu,41:Bu,47:Iu,91:$u,92:Iu,93:$u,123:Tu,125:Tu,160:Ct,710:el,732:el,770:el,771:el,8214:[-99e-5,.601,0,0,.77778],8593:Pu,8595:Pu,8657:Ru,8659:Ru,8719:tl,8720:tl,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:dc,8748:Ou,8749:Ou,8750:dc,8896:So,8897:So,8898:So,8899:So,8968:_o,8969:_o,8970:_o,8971:_o,9168:ys,10216:_o,10217:_o,10752:fc,10753:fc,10754:fc,10756:So,10758:So},"Size2-Regular":{32:Ct,40:Nu,41:Nu,47:hc,91:Fu,92:hc,93:Fu,123:pc,125:pc,160:Ct,710:rl,732:rl,770:rl,771:rl,8719:zu,8720:zu,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:Hu,8748:Ku,8749:Ku,8750:Hu,8896:Di,8897:Di,8898:Di,8899:Di,8968:nl,8969:nl,8970:nl,8971:nl,10216:mc,10217:mc,10752:ms,10753:ms,10754:ms,10756:Di,10758:Di},"Size3-Regular":{32:Ct,40:Wu,41:Wu,47:gc,91:vc,92:gc,93:vc,123:il,125:il,160:Ct,710:gs,732:gs,770:gs,771:gs,8730:[.95003,1.45,0,0,1],8968:vs,8969:vs,8970:vs,8971:vs,10216:il,10217:il},"Size4-Regular":{32:Ct,40:Vu,41:Vu,47:Zu,91:bc,92:Zu,93:bc,123:al,125:al,160:Ct,710:Wo,732:Wo,770:Wo,771:Wo,8730:[1.25003,1.75,0,0,1],8968:bs,8969:bs,8970:bs,8971:bs,9115:Vo,9116:ju,9117:Vo,9118:Vo,9119:ju,9120:Vo,9121:ol,9122:ys,9123:ol,9124:ol,9125:ys,9126:ol,9127:Uu,9128:Gu,9129:yc,9130:[0,.3,0,0,.88889],9131:Uu,9132:Gu,9133:yc,9143:[.88502,.915,0,0,1.05556],10216:al,10217:al,57344:qu,57345:qu,57680:sl,57681:sl,57682:sl,57683:sl},"Typewriter-Regular":{32:Xu,33:wt,34:wt,35:wt,36:oi,37:oi,38:wt,39:wt,40:oi,41:oi,42:[0,.52083,0,0,.525],43:Mo,44:[.13889,.125,0,0,.525],45:Mo,46:[0,.125,0,0,.525],47:oi,48:wt,49:wt,50:wt,51:wt,52:wt,53:wt,54:wt,55:wt,56:wt,57:wt,58:hi,59:[.13889,.43056,0,0,.525],60:ll,61:[-.19549,.41562,0,0,.525],62:ll,63:wt,64:wt,65:wt,66:wt,67:wt,68:wt,69:wt,70:wt,71:wt,72:wt,73:wt,74:wt,75:wt,76:wt,77:wt,78:wt,79:wt,80:wt,81:[.13889,.61111,0,0,.525],82:wt,83:wt,84:wt,85:wt,86:wt,87:wt,88:wt,89:wt,90:wt,91:oi,92:oi,93:oi,94:wt,95:[.09514,0,0,0,.525],96:wt,97:hi,98:wt,99:hi,100:wt,101:hi,102:wt,103:Zo,104:wt,105:wt,106:[.22222,.61111,0,0,.525],107:wt,108:wt,109:hi,110:hi,111:hi,112:Zo,113:Zo,114:hi,115:hi,116:[0,.55358,0,0,.525],117:hi,118:hi,119:hi,120:hi,121:Zo,122:hi,123:oi,124:oi,125:oi,126:wt,127:wt,160:Xu,176:wt,184:[.19445,0,0,0,.525],305:hi,567:Zo,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:wt,715:wt,728:wt,730:wt,770:wt,771:wt,776:wt,915:wt,916:wt,920:wt,923:wt,926:wt,928:wt,931:wt,933:wt,934:wt,936:wt,937:wt,8216:wt,8217:wt,8242:wt,9251:[.11111,.21944,0,0,.525]}},d0=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,jo=10,yn=.25,xc=1.2,$a=.431,Ju={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[$a,$a,$a],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],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:[yn,yn,yn],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]},cl=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Co=5,wc={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Uo(e,t){e===void 0&&(e=77);const r=xs[t][e];if(r)return{defaultMetrics:!1,depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]};if(e===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const n=String.fromCodePoint(e);if(n in wc)e=wc[n].codePointAt(0);else if(d0.test(n))return e=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var Sc={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"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["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],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["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],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},_c={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]},ul={doubleleftarrow:`M262 157
|
|
|
l10-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
|
|
|
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
|
|
|
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
|
|
|
c2 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
|
|
|
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
|
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
|
-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
|
|
|
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
|
|
|
-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
|
|
|
-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
|
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
|
c-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
|
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
|
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
|
|
|
-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
|
|
|
c-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
|
|
|
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
|
|
|
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
|
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
|
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
|
|
|
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
|
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
|
-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
|
|
|
c -179 0 -524 -115 -524 -115
|
|
|
c -5 -1 -9 -5 -9 -10
|
|
|
c 0 -1 1 -2 1 -3
|
|
|
l 4 -22
|
|
|
c 1 -5 5 -9 11 -9
|
|
|
h 2
|
|
|
s 338 93 512 92
|
|
|
c 174 0 513 -92 513 -92
|
|
|
h 2
|
|
|
c 5 0 9 4 11 9
|
|
|
l 5 22
|
|
|
c 1 6 -2 12 -8 13
|
|
|
c 0 0 -342 115 -520 115
|
|
|
z
|
|
|
`,leftgroup:`M400000 80
|
|
|
H435C64 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
|
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
|
-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
|
|
|
-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
|
|
|
-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
|
|
|
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
|
|
|
-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
|
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
|
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
|
|
|
-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
|
|
|
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
|
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
|
-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
|
|
|
-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
|
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 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-70-101l-7-8h399905v-40H95l7-8
|
|
|
c28.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
|
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
|
c-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
|
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
|
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
|
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
|
c100.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
|
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
|
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
|
|
|
-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
|
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
|
m368.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
|
|
|
60.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
|
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
|
c0 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
|
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
|
85.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
|
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
|
c0 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
|
|
|
-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
|
|
|
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
|
|
|
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
|
|
|
-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
|
|
|
-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
|
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
|
-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
|
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
|
c124.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
|
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
|
-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
|
|
|
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
|
|
|
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
|
|
|
-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
|
|
|
-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
|
|
|
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
|
|
|
-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
|
|
|
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
|
|
|
m0 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
|
|
|
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
|
|
|
-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
|
|
|
-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
|
|
|
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
|
|
|
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
|
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
|
m0-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
|
|
|
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
|
|
|
-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
|
|
|
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
|
|
|
M399960 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
|
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
|
-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
|
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
|
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
|
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
|
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
|
|
|
c-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
|
|
|
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
|
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
|
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
|
|
|
-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
|
|
|
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
|
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
|
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
|
-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
|
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
|
c1 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
|
|
|
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
|
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
|
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
|
-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
|
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
|
-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
|
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
|
c-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
|
|
|
-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
|
|
|
-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
|
|
|
-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,
|
|
|
-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,
|
|
|
-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,
|
|
|
-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,
|
|
|
-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
|
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
|
c-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
|
|
|
s-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
|
|
|
121.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
|
|
|
s2.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
|
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-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 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 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-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
|
|
|
-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
|
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
|
c2,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
|
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-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
|
|
|
c-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
|
|
|
M0 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
|
|
|
c1.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,
|
|
|
1c0,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,
|
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
|
M93 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
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-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
|
|
|
c-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
|
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function ws(e){if(_c[e]){const[h,p,y]=_c[e],M=`<span class="stretchy" style="height:${y}em"><svg width="100%" height="${y}em" viewBox="0 0 ${h} ${p}" preserveAspectRatio="none" ><path fill="currentcolor" d="${ul[e]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*y/2)/100}em;min-width:0">${M}</span>`}const[t,r,n,i]=Sc[e];let a,s;const u=n/1e3;t.length===3?(a=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],s=["xMinYMin","xMidYMin","xMaxYMin"]):t.length===2?(a=["slice-1-of-2","slice-2-of-2"],s=["xMinYMin","xMaxYMin"]):(a=["slice-1-of-1"],s=[i]);const d=t.map((h,p)=>`<span class="${a[p]}" style=height:${u}em><svg width=400em height=${u}em viewBox="0 0 400000 ${n}" preserveAspectRatio="${s[p]} slice"><path fill="currentcolor" d="${ul[h]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${u}em;min-width:${r}em;">${d}</span>`}function f0(e){return Sc[e]?Sc[e][2]/1e3:_c[e][2]}function h0(e){const t=[];for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n===13&&e.charCodeAt(r+1)===10&&(n=10,r++),(n===13||n===12)&&(n=10),n===0&&(n=65533),n>=55296&&n<=56319){const i=e.charCodeAt(r+1);if(i>=56320&&i<=57343){const a=n-55296,s=i-56320;n=po(2,16)+a*po(2,10)+s,r++}}t.push(n)}return t}var dl=8205,Yu=[[dl,1],[65038,2],[127995,5],[129456,4],[917536,96]],fl,Qu=[127462,127487];function hl(e){var t;if(fl===void 0){fl={};for(const r of Yu)for(let n=r[0];n<=r[0]+r[1]-1;n++)fl[n]=!0}return(t=fl[e])!=null?t:!1}function p0(e){return e>=Qu[0]&&e<=Qu[1]}function ed(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;const t=[],r=h0(e);let n=0;for(;n<r.length;){const i=r[n++],a=r[n];if(a===dl){const s=n-1;for(n+=2;r[n]===dl;)n+=2;t.push(String.fromCodePoint(...r.slice(s,n-s+1)))}else if(hl(a)){const s=n-1;for(;hl(r[n]);)n+=r[n]===dl?2:1;t.push(String.fromCodePoint(...r.slice(s,2*n-s-1)))}else p0(i)?(n+=1,t.push(String.fromCodePoint(...r.slice(n-2,2)))):t.push(String.fromCodePoint(i))}return t}var pl=class{constructor(e){this.obeyspaces=!1,this.pos=0,this.s=ed(e)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(e){const t=typeof this.s=="string"?e.exec(this.s.slice(this.pos)):e.exec(this.s.slice(this.pos).join(""));return t!=null&&t[0]?(this.pos+=t[0].length,t[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";const e=this.get();if(e==="\\"){if(!this.end()){let t=this.match(/^[a-zA-Z\*]+/);return t?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):t=this.get(),"\\"+t}}else{if(e==="{")return"<{>";if(e==="}")return"<}>";if(e==="^"){if(this.peek()==="^"){this.get();const t=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(t)return String.fromCodePoint(Number.parseInt(t.slice(t.lastIndexOf("^")+1),16))}return e}else if(e==="#"){if(!this.end()){let t=!1;if(/[\d?@]/.test(this.peek())&&(t=!0,this.pos+1<this.s.length)){const r=this.s[this.pos+1];t=/[^\dA-Za-z]/.test(r)}return t?"#"+this.get():"#"}}else if(e==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return e}};function m0(e,t){var r,n,i,a;const s=[];let u=e.next();if(u&&u!=="\\relax"){if(u==="\\noexpand")u=e.next(),u&&s.push(u);else if(u==="\\obeyspaces")e.obeyspaces=!0;else if(u==="\\bgroup")s.push("<{>");else if(u==="\\egroup")s.push("<}>");else if(u==="\\string"){if(u=e.next(),u)if(u.startsWith("\\"))for(const d of u)s.push(d==="\\"?"\\backslash":d);else u==="<{>"?s.push("\\{"):u==="<space>"?s.push("~"):u==="<}>"&&s.push("\\}")}else if(u==="\\csname"){for(;e.peek()==="<space>";)e.next();let d="",h=!1,p=[];do{if(p.length===0)if(/^#[\d?@]$/.test(e.peek())){const y=e.get().slice(1);p=ml((n=(r=t==null?void 0:t(y))!=null?r:t==null?void 0:t("?"))!=null?n:"\\placeholder{}",t),u=p[0]}else u=e.next(),p=u?[u]:[];h=p.length===0,!h&&u==="\\endcsname"&&(h=!0,p.shift()),h||(h=u==="<$>"||u==="<$$>"||u==="<{>"||u==="<}>"||typeof u=="string"&&u.length>1&&u.startsWith("\\")),h||(d+=p.shift())}while(!h);d&&s.push("\\"+d),s.push(...p)}else if(u!=="\\endcsname")if(u.length>1&&u.startsWith("#")){const d=u.slice(1);s.push(...ml((a=(i=t==null?void 0:t(d))!=null?i:t==null?void 0:t("?"))!=null?a:"\\placeholder{}",t))}else s.push(u)}return s}function ml(e,t=null){const r=[];let n="";for(const s of e.toString().split(/\r?\n/)){n&&r.push(n),n=" ";const u=s.match(/((?:\\%)|[^%])*/);u!==null&&r.push(u[0])}const i=new pl(Le(r.join(""))),a=[];do a.push(...m0(i,t));while(!i.end());return a}function Cr(e){let t="";const r=[];for(const n of e)n&&(t&&/^[a-zA-Z\*]/.test(n)&&r.push(t),r.push(n),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(n)&&r.push(" "),t=/\\[a-zA-Z]+\*?$/.test(n)?" ":"");return r.join("")}function an(e,...t){return console.assert(e.startsWith("\\")),t.length===0?e:Cr([e,...t.map(r=>`{${r}}`)])}function Eo(e){return Cr(e.map(t=>{var r;return(r={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[t])!=null?r:t}))}var g0=class au{constructor(t){au._registry[t]=this}static createAtom(t,r,n){return au._registry[t].createAtom(r,de(r,t),n)}static serialize(t,r){var n;if(!t||t.length===0)return"";if((n=r.skipStyles)!=null&&n){const i=[];for(const a of v0(t)){const s=au._registry[a[0].mode];i.push(...s.serialize(a,r))}return Cr(i)}return Cr(b0(t,r))}static getFont(t,r,n){return au._registry[t].getFont(r,n)}};g0._registry={};var Ai=g0;function v0(e){const t=[];let r=[],n="NONE";for(const i of e)i.type!=="first"&&(i.mode!==n?(r.length>0&&t.push(r),r=[i],n=i.mode):r.push(i));return r.length>0&&t.push(r),t}function Hi(e,t){const r=[];let n=[],i;for(const a of e)if(a.type!=="first"&&a.style){let s;t==="variant"?(s=a.style.variant,a.style.variantStyle&&a.style.variantStyle!=="up"&&(s+="-"+a.style.variantStyle)):s=a.style[t],s===i?n.push(a):(n.length>0&&r.push(n),n=[a],i=s)}return n.length>0&&r.push(n),r}function td(e,t){var r;const{parent:n}=e[0],i=n==null?void 0:n.computedStyle.color,a=[];for(const s of v0(e)){const u=t.defaultMode;for(const d of Hi(s,"color")){const h=d[0].computedStyle,p=Ai._registry[d[0].mode].serialize(d,_(S({},t),{defaultMode:u==="text"?"text":"math"}));!t.skipStyles&&h.color&&h.color!=="none"&&(!n||i!==h.color)?a.push(an("\\textcolor",(r=h.verbatimColor)!=null?r:h.color,Cr(p))):a.push(Cr(p))}}return a}function Mc(e,t){const{parent:r}=e[0],n=r==null?void 0:r.computedStyle.backgroundColor;return Hi(e,"backgroundColor").map(i=>{var a;if(i.length>0||i[0].type!=="box"){const s=i[0].computedStyle;if(s.backgroundColor&&s.backgroundColor!=="none"&&(!r||n!==s.backgroundColor))return an("\\colorbox",(a=s.verbatimBackgroundColor)!=null?a:s.backgroundColor,Cr(td(i,_(S({},t),{defaultMode:"text"}))))}return Cr(td(i,t))})}function b0(e,t){if(e.length===0)return[];const{parent:r}=e[0],n=r==null?void 0:r.computedStyle.fontSize,i=[];for(const a of Hi(e,"fontSize")){const s=a[0].computedStyle.fontSize,u=Mc(a,t);u&&(s&&s!=="auto"&&(!r||n!==s)?i.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][s],...u):i.push(...u))}return i}function Cc(e){return e?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[e]:void 0}function Ss(e){if(e.length===0)return"ord";const t=Cc(e[0].type),r=Cc(e[e.length-1].type);return t&&t===r?t:"ord"}function ko(e,t){if(typeof e=="string")return e;if(typeof e=="number"){console.assert(Number.isFinite(e));const r=Math.ceil(100*e)/100;return r===0?"0":r.toString()+(t!=null?t:"")}return""}var Ue=class Qh{constructor(t,r){var n,i,a,s,u;if(typeof t=="number"?this.value=String.fromCodePoint(t):typeof t=="string"?this.value=t:A(t)?this.children=t.filter(h=>h!==null):t&&t instanceof Qh&&(this.children=[t]),this.children)for(const h of this.children)h.parent=this;this.type=(n=r==null?void 0:r.type)!=null?n:"ignore",this.isSelected=(r==null?void 0:r.isSelected)===!0,r!=null&&r.caret&&(this.caret=r.caret),this.classes=(i=r==null?void 0:r.classes)!=null?i:"",this.isTight=(a=r==null?void 0:r.isTight)!=null?a:!1,r!=null&&r.attributes&&(this.attributes=r.attributes);let d=r==null?void 0:r.fontFamily;r!=null&&r.style&&this.value&&(d=(u=Ai.getFont((s=r.mode)!=null?s:"math",this,_(S({variant:"normal"},r.style),{letterShapeStyle:r.letterShapeStyle})))!=null?u:void 0),d||(d="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(r==null?void 0:r.maxFontSize)!==void 0&&(this.maxFontSize=r.maxFontSize),y0(this,d)}set atomID(t){t===void 0||t.length===0||(this.id=t)}selected(t){if(this.isSelected!==t&&(this.isSelected=t,this.children))for(const r of this.children)r.selected(t)}setStyle(t,r,n){if(r===void 0)return;const i=ko(r,n);i.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[t]=i)}setTop(t){Number.isFinite(t)&&Math.abs(t)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=ko(t,"em"),this.height-=t,this.depth+=t)}get left(){var t;return(t=this.cssProperties)!=null&&t["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=ko(t,"em")))}set right(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=ko(t,"em")))}set bottom(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=ko(t,"em")))}get width(){return this._width*this.scale}set width(t){this._width=t,this.hasExplicitWidth=!0}set softWidth(t){}get height(){return this._height*this.scale}set height(t){this._height=t}get depth(){return this._depth*this.scale}set depth(t){this._depth=t}wrap(t){const r=t.parent;if(!r)return this;t.isPhantom&&this.setStyle("opacity",0);const n=t.color;n&&n!==r.color&&this.setStyle("color",n);let i=t.backgroundColor;this.isSelected&&(i=F(i)),i&&i!==r.backgroundColor&&(this.setStyle("background-color",i),this.setStyle("display","inline-block"));const a=t.scalingFactor;return this.scale=a,this.skew*=a,this.italic*=a,this}toMarkup(){var t,r,n,i;let a=(t=this.value)!=null?t:"";if(this.children)for(const I of this.children)a+=I.toMarkup();let s="";if(this.svgBody)s=ws(this.svgBody);else if(this.svgOverlay){s='<span style="',s+="display: inline-block;",s+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,s+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,s+='">',s+=a,s+="</span>",s+='<svg style="position:absolute;overflow:visible;',s+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const I=(r=this.cssProperties)==null?void 0:r.padding;I?(s+=`top:${I};`,s+=`left:${I};`,s+=`width:calc(100% - 2 * ${I} );`):s+="top:0;left:0;width:100%;",s+="z-index:2;",s+='"',this.svgStyle&&(s+=this.svgStyle),s+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,s+=`>${this.svgOverlay}</svg>`}let u="";const d=this.classes.split(" ");d.push((n={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?n:""),this.caret==="latex"&&d.push("ML__latex-caret"),this.isSelected&&d.push("ML__selected");const h=d.length===1?d[0]:d.filter((I,$,se)=>I.length>0&&se.indexOf(I)===$).join(" ");if(h.length>0&&(u+=` class="${h}"`),this.id&&(u+=` data-atom-id=${this.id}`),this.cssId&&(u+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(u+=" "+Object.keys(this.attributes).map(I=>`${I}="${this.attributes[I]}"`).join(" ")),this.htmlData){const I=this.htmlData.split(",");for(const $ of I){const se=$.match(/([^=]+)=(.+$)/);if(se){const Ze=se[1].trim().replace(/ /g,"-");Ze&&(u+=` data-${Ze}="${se[2]}" `)}else{const Ze=$.trim().replace(/ /g,"-");Ze&&(u+=` data-${Ze} `)}}}const p=(i=this.cssProperties)!=null?i:{};this.hasExplicitWidth&&p.width===void 0&&(p.width=`${Math.ceil(this._width*100)/100}em`);const y=Object.keys(p).map(I=>`${I}:${p[I]}`);if(this.scale!==void 0&&this.scale!==1&&(a.length>0||s.length>0)&&y.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const I=this.htmlStyle.split(";");let $="";for(const se of I){const Ze=se.match(/([^=]+):(.+$)/);if(Ze){const ee=Ze[1].trim().replace(/ /g,"-");ee&&($+=`${ee}:${Ze[2]};`)}}$&&(u+=` style="${$}"`)}y.length>0&&(u+=` style="${y.join(";")}"`);let M="";return u.length>0||s.length>0?M=`<span${u}>${a}${s}</span>`:M=a,this.caret==="text"?M+='<span class="ML__text-caret"></span>':this.caret==="math"&&(M+='<span class="ML__caret"></span>'),M}tryCoalesceWith(t){if(this.svgBody||!this.value||t.svgBody||!t.value)return!1;const r=this.children&&this.children.length>0,n=t.children&&t.children.length>0;if(r||n)return!1;if(t.cssProperties||this.cssProperties){for(const d of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(t.cssProperties&&d in t.cssProperties||this.cssProperties&&d in this.cssProperties)return!1}const i=this.cssProperties?Object.keys(this.cssProperties).length:0,a=t.cssProperties?Object.keys(t.cssProperties).length:0;if(i!==a)return!1;if(i>0){for(const d of Object.keys(this.cssProperties))if(this.cssProperties[d]!==t.cssProperties[d])return!1}const s=this.classes.trim().replace(/\s+/g," ").split(" "),u=t.classes.trim().replace(/\s+/g," ").split(" ");if(s.length!==u.length)return!1;s.sort(),u.sort();for(const[d,h]of s.entries())if(h==="vertical-separator"||h!==u[d])return!1;return this.value+=t.value,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this._width=this._width+t._width,this.maxFontSize=Math.max(this.maxFontSize,t.maxFontSize),this.italic=t.italic,!0}};function Ec(e){if(!e||e.length===0)return[];e[0].children=Ec(e[0].children);const t=[e[0]];for(let r=1;r<e.length;r++)t[t.length-1].tryCoalesceWith(e[r])||(e[r].children=Ec(e[r].children),t.push(e[r]));return t}function gl(e){return e.children&&(e.children=Ec(e.children)),e}function vl(e,t){if(!e)return new Ue(null,t);const r=new Ue(null,{classes:"ML__strut",type:"ignore"});r.setStyle("height",Math.max(0,e.height),"em");const n=[r];if(e.depth!==0){const i=new Ue(null,{classes:"ML__strut--bottom",type:"ignore"});i.setStyle("height",e.height+e.depth,"em"),i.setStyle("vertical-align",-e.depth,"em"),n.push(i)}return n.push(e),new Ue(n,_(S({},t),{type:"lift"}))}function bl(e){const t=f0(e)/2,r=new Ue(null,{maxFontSize:0});return r.height=t+.166,r.depth=t-.166,r.svgBody=e,r}function y0(e,t){var r;if(e.type==="latex"){e.height=.9,e.depth=.2,e._width=1;return}if(e.value){e.height=-1/0,e.depth=-1/0,e._width=0,e.skew=-1/0,e.italic=-1/0;for(let n=0;n<e.value.length;n++){const i=Uo(e.value.codePointAt(n),t);e.height=Math.max(e.height,i.height),e.depth=Math.max(e.depth,i.depth),e._width+=i.width,e.skew=i.skew,e.italic=i.italic}return}if(e.children&&e.children.length>0){let n=-1/0,i=-1/0,a=0;for(const s of e.children)s.height>n&&(n=s.height),s.depth>i&&(i=s.depth),a=Math.max(a,(r=s.maxFontSize)!=null?r:0);e.height=n,e.depth=i,e._width=e.children.reduce((s,u)=>s+u.width,0),e.maxFontSize=a}}function x0(e){if("individualShift"in e){const t=e.individualShift;let r=t[0];const n=[r],i=-r.shift-r.box.depth;let a=i;for(let s=1;s<t.length;s++){const u=t[s],d=-u.shift-a-u.box.depth,h=d-(r.box.height+r.box.depth);a=a+d,n.push(h),n.push(u),r=u}return[n,i]}if("top"in e){let t=e.top;for(const r of e.children)t-=typeof r=="number"?r:r.box.height+r.box.depth;return[e.children,t]}else{if("bottom"in e)return[e.children,-e.bottom];if("firstBaseline"in e){const t=e.firstBaseline[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.firstBaseline,-t.box.depth]}else if("shift"in e){const t=e.children[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.children,-t.box.depth-e.shift]}}return[null,0]}function w0(e){var t;const[r,n]=x0(e);if(!r)return[[],0,0];const i=new Ue(null,{classes:"pstrut"});let a=0;for(const $ of r)if(typeof $!="number"){const se=$.box;a=Math.max(a,se.maxFontSize,se.height)}a+=2,i.height=a,i.setStyle("height",a,"em");const s=[];let u=n,d=n,h=n,p=0;for(const $ of r){if(typeof $=="number")h+=$;else{const se=$.box,Ze=(t=$.classes)!=null?t:[],ee=new Ue([i,se],{classes:Ze.join(" "),style:$.style});se.setStyle("height",se.height+se.depth,"em"),se.setStyle("display","inline-block"),ee.setStyle("top",-a-h-se.depth,"em"),$.marginLeft&&ee.setStyle("margin-left",$.marginLeft,"em"),$.marginRight&&ee.setStyle("margin-right",$.marginRight,"em"),s.push(ee),h+=se.height+se.depth,p=Math.max(p,ee.width)}u=Math.min(u,h),d=Math.max(d,h)}s.forEach($=>{$.softWidth=p});const y=new Ue(s,{classes:"vlist"});if(y.softWidth=p,y.height=d,y.setStyle("height",d,"em"),u>=0)return[[new Ue(y,{classes:"vlist-r"})],d,-u];const M=new Ue(new Ue(null),{classes:"vlist"});M.height=-u,M.setStyle("height",-u,"em");const I=new Ue(8203,{classes:"vlist-s",maxFontSize:0});return I.softWidth=0,I.height=0,I.depth=0,[[new Ue([y,I],{classes:"vlist-r"}),new Ue(M,{classes:"vlist-r"})],d,-u]}var An=class extends Ue{constructor(e,t){var r;const[n,i,a]=w0(e);super(n.length===1?n[0]:n,{type:t==null?void 0:t.type,classes:((r=t==null?void 0:t.classes)!=null?r:"")+" vlist-t"+(n.length===2?" vlist-t2":"")}),this.height=i,this.depth=a,this.softWidth=n.reduce((s,u)=>Math.max(s,u.width),0)}};function yl(e,t){var r,n,i,a,s;const u=e.metrics,d=new Ue(t.base),h=(r=t.baseShift)!=null?r:0,p=(n=t.slant)!=null?n:0;let y=0,M=0;t.above&&(y=(i=t.aboveShift)!=null?i:Math.max(u.bigOpSpacing1,u.bigOpSpacing3-t.above.depth)),t.below&&(M=(a=t.belowShift)!=null?a:Math.max(u.bigOpSpacing2,u.bigOpSpacing4-t.below.height));let I=null;if(t.below&&t.above){const $=u.bigOpSpacing5+t.below.height+t.below.depth+M+d.depth+h;I=new An({bottom:$,children:[u.bigOpSpacing5,{box:t.below,marginLeft:-p,classes:["ML__center"]},M,{box:d,classes:["ML__center"]},y,{box:t.above,marginLeft:p,classes:["ML__center"]},u.bigOpSpacing5]}).wrap(e)}else if(t.below&&!t.above)I=new An({top:d.height-h,children:[u.bigOpSpacing5,{box:t.below,marginLeft:-p,classes:["ML__center"]},M,{box:d,classes:["ML__center"]}]}).wrap(e);else if(!t.below&&t.above){const $=d.depth+h;I=new An({bottom:$,children:[{box:d,classes:["ML__center"]},y,{box:t.above,marginLeft:p,classes:["ML__center"]},u.bigOpSpacing5]}).wrap(e)}else{const $=d.depth+h;I=new An({bottom:$,children:[{box:d},u.bigOpSpacing5]}).wrap(e)}return new Ue(I,{type:(s=t.type)!=null?s:"op"})}var kc=7,_s=6,Do=5,Va=4,Ao=3,Li=2,Za=1,si=0,ja=class{constructor(e,t,r){this.id=e,this.sizeDelta=t,this.cramped=r;const n={"-4":2,"-3":1,0:0}[t];this.metrics=Object.keys(Ju).reduce((i,a)=>_(S({},i),{[a]:Ju[a][n]}),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return da[[si,Za,si,Za,Li,Ao,Li,Ao][this.id]]}get sub(){return da[[si,si,si,si,Li,Li,Li,Li][this.id]]}get fracNum(){return da[[si,Za,si,Za,Li,Ao,Va,Do][this.id]]}get fracDen(){return da[[si,si,si,si,Li,Li,Va,Va][this.id]]}get cramp(){return da[[si,si,Li,Li,Va,Va,_s,_s][this.id]]}get isTight(){return this.sizeDelta<0}},ua={7:new ja(kc,0,!1),6:new ja(_s,0,!0),5:new ja(Do,0,!1),4:new ja(Va,0,!0),3:new ja(Ao,-3,!1),2:new ja(Li,-3,!0),1:new ja(Za,-4,!1),0:new ja(si,-4,!0)},da=_(S({},ua),{displaystyle:ua[kc],textstyle:ua[Do],scriptstyle:ua[Ao],scriptscriptstyle:ua[Za]});function rd(e,t){var r;if(!e)return 0;const n={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:jo,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(r=e.unit)!=null?r:"pt"];if(Number.isFinite(t)){const i=po(10,t);return Math.round(e.dimension/jo*n*i)/i}return e.dimension*n}function nd(e,t){if(e===null)return 0;const r=rd(e)/jo;if(Number.isFinite(t)){const n=po(10,t);return Math.round(r*n)/n}return r}function Dc(e){var t;return`${e.dimension}${(t=e.unit)!=null?t:"pt"}`}function Ac(e){let t=Dc(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=` plus ${Dc(e.grow)}`),e.shrink&&e.shrink.dimension!==0&&(t+=` minus ${Dc(e.shrink)}`),t}function Zn(e){var t,r;if(e==null)return null;let n="";if("dimension"in e&&(n=`${e.dimension}${(t=e.unit)!=null?t:"pt"}`),"glue"in e&&(n=Ac(e)),"number"in e)if(!("base"in e)||e.base==="decimal")n=Number(e.number).toString();else if(e.base==="alpha")n=`\`${String.fromCodePoint(e.number)}`;else{const i=Math.round(e.number)>>>0;e.base==="hexadecimal"?(n=Number(i).toString(16).toUpperCase(),i<=255?n=n.padStart(2,"0"):i<=65535?n=n.padStart(4,"0"):i<=16777215?n=n.padStart(6,"0"):n=n.padStart(8,"0"),n=`"${n}`):e.base==="octal"&&(n=Number(i).toString(8),i<=63?n=n.padStart(2,"0"):i<=30583?n=n.padStart(4,"0"):n=n.padStart(8,"0"),n=`'${n}`)}return"register"in e&&("factor"in e&&(e.factor===-1?n="-":e.factor!==1&&(n=Number(e.factor).toString())),"global"in e&&e.global&&(n+="\\global"),n+=`\\${e.register}`),"string"in e&&(n=e.string),(r=e.relax)!=null&&r&&(n+="\\relax"),n}function fa(e,t){return e==null?null:"number"in e?_(S({},e),{number:e.number*t}):"register"in e?"factor"in e&&e.factor?_(S({},e),{factor:e.factor*t}):_(S({},e),{factor:t}):"dimension"in e?_(S({},e),{dimension:e.dimension*t}):"glue"in e?e.shrink&&e.grow?{glue:fa(e.glue,t),shrink:fa(e.shrink,t),grow:fa(e.grow,t)}:e.shrink?{glue:fa(e.glue,t),shrink:fa(e.shrink,t)}:e.grow?{glue:fa(e.glue,t),grow:fa(e.grow,t)}:{glue:fa(e.glue,t)}:null}var S0={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},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:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function id(){return S({},S0)}function Lc(){return{registers:id(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Ce.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:ut,backgroundColorMap:dt,getMacro:e=>at(e,vt())}}var Dr=class ep{constructor(t,r){var n,i,a,s,u,d,h,p,y,M,I,$,se,Ze,ee;let De;t!=null&&t.parent?(this.parent=t.parent,De=t.parent,this.registers={}):(De=S(S({},Lc()),(n=t==null?void 0:t.from)!=null?n:{}),this.registers=De.registers),De.atomIdsSettings&&(this.atomIdsSettings=S({},De.atomIdsSettings)),this.renderPlaceholder=De.renderPlaceholder,this.isPhantom=(s=(a=t==null?void 0:t.isPhantom)!=null?a:(i=this.parent)==null?void 0:i.isPhantom)!=null?s:!1,this.letterShapeStyle=De.letterShapeStyle,this.minFontScale=De.minFontScale,r!=null&&r.color&&r.color!=="none"?this.color=r.color:this.color=(d=(u=this.parent)==null?void 0:u.color)!=null?d:"",r!=null&&r.backgroundColor&&r.backgroundColor!=="none"?this.backgroundColor=r.backgroundColor:this.backgroundColor=(p=(h=this.parent)==null?void 0:h.backgroundColor)!=null?p:"",r!=null&&r.fontSize&&r.fontSize!=="auto"&&r.fontSize!==((y=this.parent)==null?void 0:y.size)?this.size=r.fontSize:this.size=(I=(M=this.parent)==null?void 0:M.size)!=null?I:Co;let Je=(se=($=this.parent)==null?void 0:$.mathstyle)!=null?se:da.displaystyle;if(typeof(t==null?void 0:t.mathstyle)=="string"){if(De instanceof ep)switch(t.mathstyle){case"cramp":Je=Je.cramp;break;case"superscript":Je=Je.sup;break;case"subscript":Je=Je.sub;break;case"numerator":Je=Je.fracNum;break;case"denominator":Je=Je.fracDen;break}switch(t.mathstyle){case"textstyle":Je=da.textstyle;break;case"displaystyle":Je=da.displaystyle;break;case"scriptstyle":Je=da.scriptstyle;break;case"scriptscriptstyle":Je=da.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Je,this.smartFence=De.smartFence,this.placeholderSymbol=De.placeholderSymbol,this.colorMap=(Ze=De.colorMap)!=null?Ze:Te=>Te,this.backgroundColorMap=(ee=De.backgroundColorMap)!=null?ee:Te=>Te,this.getMacro=De.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const t=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,t}scale(t){return t*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===kc||this.mathstyle.id===_s}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(cl[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(t){var r;if((r=this.registers)!=null&&r[t])return this.registers[t];if(this.parent)return this.parent.getRegister(t)}getRegisterAsNumber(t){const r=this.getRegister(t);if(typeof r=="number")return r;if(typeof r=="string")return Number(r)}getRegisterAsGlue(t){var r;if((r=this.registers)!=null&&r[t]){const n=this.registers[t];return typeof n=="object"&&"glue"in n?n:typeof n=="object"&&"dimension"in n?{glue:{dimension:n.dimension}}:typeof n=="number"?{glue:{dimension:n}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(t)}getRegisterAsEm(t,r){return nd(this.getRegisterAsDimension(t),r)}getRegisterAsDimension(t){var r;if((r=this.registers)!=null&&r[t]){const n=this.registers[t];return typeof n=="object"&&"glue"in n?n.glue:typeof n=="object"&&"dimension"in n?n:typeof n=="number"?{dimension:n}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(t)}setRegister(t,r){if(r===void 0){delete this.registers[t];return}this.registers[t]=r}evaluate(t){if(!t||!("register"in t))return t;let r=this;if("global"in t&&t.global)for(;r.parent;)r=r.parent;let n=1;"factor"in t&&t.factor!==1&&t.factor!==void 0&&(n=t.factor);const i=r.getRegister(t.register);if(i===void 0)return;if(typeof i=="string")return{string:Number(i).toString()+i};if(typeof i=="number")return{number:n*i};const a=r.evaluate(i);if(a!==void 0)return"string"in a?{string:Number(i).toString()+a.string}:"number"in a?{number:n*a.number}:"dimension"in a?_(S({},a),{dimension:n*a.dimension}):"glue"in a?_(S({},a),{glue:_(S({},a.glue),{dimension:n*a.glue.dimension}),shrink:a.shrink?_(S({},a.shrink),{dimension:n*a.shrink.dimension}):void 0,grow:a.grow?_(S({},a.grow),{dimension:n*a.grow.dimension}):void 0}):t}toDimension(t){const r=this.evaluate(t);return r===void 0?null:"dimension"in r?r:"glue"in r?r.glue:"number"in r?{dimension:r.number}:null}toEm(t,r){if(t===null)return 0;const n=this.toDimension(t);return n===null?0:rd(n,r)/jo}toNumber(t){if(t===null)return null;const r=this.evaluate(t);return r===void 0?null:"number"in r?r.number:"dimension"in r?r.dimension:"glue"in r?r.glue.dimension:"string"in r?Number(r.string):null}toColor(t){var r,n;if(t===null)return null;const i=this.evaluate(t);return i===void 0?null:"string"in i?(n=(r=this.colorMap)==null?void 0:r.call(this,i.string))!=null?n:i.string:null}toBackgroundColor(t){var r,n;if(t===null)return null;const i=this.evaluate(t);return i===void 0?null:"string"in i?(n=(r=this.backgroundColorMap)==null?void 0:r.call(this,i.string))!=null?n:i.string:null}},Go=["body","above","below","superscript","subscript"];function Ua(e){return typeof e=="string"&&Go.includes(e)}function xl(e){return e!==void 0&&Array.isArray(e)&&e.length===2}var _e=class Oo{constructor(t){var r,n,i,a,s,u;this.type=t.type,typeof t.value=="string"&&(this.value=t.value),this.command=(n=(r=t.command)!=null?r:this.value)!=null?n:"",this.mode=(i=t.mode)!=null?i:"math",t.isFunction&&(this.isFunction=!0),t.limits&&(this.subsupPlacement=t.limits),this.style=S({},t.style),this.displayContainsHighlight=(a=t.displayContainsHighlight)!=null?a:!1,this.captureSelection=(s=t.captureSelection)!=null?s:!1,this.skipBoundary=(u=t.skipBoundary)!=null?u:!1,t.verbatimLatex!==void 0&&t.verbatimLatex!==null&&(this.verbatimLatex=t.verbatimLatex),t.args&&(this.args=t.args),t.body&&(this.body=t.body),this._changeCounter=0}static createBox(t,r,n){var i;if(!r)return null;const a=_0(r),s=[];for(const d of a){const h=d[0].style,p=M0(t,d,{style:{color:h.color,backgroundColor:h.backgroundColor,fontSize:h.fontSize}});p&&s.push(p)}if(s.length===0)return null;const u=((i=n==null?void 0:n.classes)!=null?i:"").trim();return s.length===1&&!u&&!(n!=null&&n.type)?s[0].wrap(t):new Ue(s,{classes:u,type:n==null?void 0:n.type}).wrap(t)}static serialize(t,r){return Ai.serialize(t,r)}static commonAncestor(t,r){if(t===r||t.parent===r.parent)return t.parent;const n=new WeakSet;let{parent:i}=t;for(;i;)n.add(i),i=i.parent;for(i=r.parent;i;){if(n.has(i))return i;i=i.parent}console.assert(!!i)}static fromJson(t){return typeof t=="string"?new Oo({type:"mord",value:t,mode:"math"}):new Oo(t)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const t={};if(this.type&&(t.type=this.type),this.mode!=="math"&&(t.mode=this.mode),this.command&&this.command!==this.value&&(t.command=this.command),this.value!==void 0&&(t.value=this.value),this.style&&Object.keys(this.style).length>0&&(t.style=S({},this.style)),this.verbatimLatex!==void 0&&(t.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(t.explicitSubsupPlacement=!0),this.isFunction&&(t.isFunction=!0),this.displayContainsHighlight&&(t.displayContainsHighlight=!0),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.skipBoundary&&(t.skipBoundary=!0),this.captureSelection&&(t.captureSelection=!0),this.args&&(t.args=C0(this.args)),this._branches)for(const r of Object.keys(this._branches))this._branches[r]&&(t[r]=this._branches[r].filter(n=>n.type!=="first").map(n=>n.toJson()));return t.type==="mord"&&Object.keys(t).length===2&&"value"in t?t.value:t}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(t){if(t){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:r}=this;for(;r;)r.parent||r._changeCounter++,"verbatimLatex"in r&&(r.verbatimLatex=void 0),r._children=void 0,r=r.parent}}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=de(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):this.body&&this.command?Cr([an(this.command,this.bodyToLatex(t)),this.supsubToLatex(t)]):this.body?Cr([this.bodyToLatex(t),this.supsubToLatex(t)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(t){var r;return Ai.serialize(this.body,_(S({},t),{defaultMode:(r=t.defaultMode)!=null?r:this.latexMode}))}aboveToLatex(t){return Ai.serialize(this.above,t)}belowToLatex(t){return Ai.serialize(this.below,t)}supsubToLatex(t){let r="";if(t=_(S({},t),{defaultMode:"math"}),this.branch("subscript")!==void 0){const n=Ai.serialize(this.subscript,t);n.length===0?r+="_{}":n.length===1?/^[0-9]$/.test(n)?r+=`_${n}`:r+=`_{${n}}`:r+=`_{${n}}`}if(this.branch("superscript")!==void 0){const n=Ai.serialize(this.superscript,t);n.length===0?r+="^{}":n.length===1?n==="\u2032"?r+="^\\prime ":n==="\u2033"?r+="^\\doubleprime ":/^[0-9]$/.test(n)?r+=`^${n}`:r+=`^{${n}}`:r+=`^{${n}}`}return r}get treeDepth(){let t=1,r=this.parent;for(;r;)r=r.parent,t+=1;return t}get inCaptureSelection(){let t=this;for(;t;){if(t.captureSelection)return!0;t=t.parent}return!1}get parentPrompt(){let t=this.parent;for(;t;){if(t.type==="prompt"&&!t.captureSelection)return t;t=t.parent}return null}branch(t){if(Ua(t)&&this._branches)return this._branches[t]}get branches(){if(!this._branches)return[];const t=[];for(const r of Go)this._branches[r]&&t.push(r);return t}createBranch(t){return console.assert(Ua(t)),Ua(t)?(this._branches?this._branches[t]||(this._branches[t]=[this.makeFirstAtom(t)]):this._branches={[t]:[this.makeFirstAtom(t)]},this.isDirty=!0,this._branches[t]):[]}get row(){return xl(this.parentBranch)?this.parentBranch[0]:-1}get col(){return xl(this.parentBranch)?this.parentBranch[1]:-1}get body(){var t;return(t=this._branches)==null?void 0:t.body}set body(t){this.setChildren(t,"body")}get superscript(){var t;return(t=this._branches)==null?void 0:t.superscript}set superscript(t){this.setChildren(t,"superscript")}get subscript(){var t;return(t=this._branches)==null?void 0:t.subscript}set subscript(t){this.setChildren(t,"subscript")}get above(){var t;return(t=this._branches)==null?void 0:t.above}set above(t){this.setChildren(t,"above")}get below(){var t;return(t=this._branches)==null?void 0:t.below}set below(t){this.setChildren(t,"below")}get computedStyle(){var t,r;const n=typeof this.style.verbatimColor=="string",i=typeof this.style.verbatimBackgroundColor=="string",a=S(S({},(r=(t=this.parent)==null?void 0:t.computedStyle)!=null?r:{}),this.style);return delete a.variant,delete a.variantStyle,i||delete a.verbatimBackgroundColor,n||delete a.verbatimColor,a}applyStyle(t){this.isDirty=!0,this.style=S(S({},this.style),t),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(const r of this.children)r.applyStyle(t)}getInitialBaseElement(){var t,r,n;return this.hasEmptyBranch("body")?this:(console.assert(((t=this.body)==null?void 0:t[0].type)==="first"),(n=(r=this.body[1])==null?void 0:r.getInitialBaseElement())!=null?n:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(t){const r=this.branch(t);return r?(console.assert(r.length>0),console.assert(r[0].type==="first"),r.length===1):!0}setChildren(t,r){var n;if(!t||(console.assert(Ua(r)),!Ua(r)))return;console.assert(((n=t[0])==null?void 0:n.type)!=="first");const i=[this.makeFirstAtom(r),...t];this._branches?this._branches[r]=i:this._branches={[r]:i};for(const a of t)a.parent=this,a.parentBranch=r;this.isDirty=!0}makeFirstAtom(t){const r=new Oo({type:"first",mode:this.mode});return r.parent=this,r.parentBranch=t,r}addChild(t,r){console.assert(t.type!=="first"),this.createBranch(r).push(t),this.isDirty=!0,t.parent=this,t.parentBranch=r}addChildBefore(t,r){console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r),0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildAfter(t,r){console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r)+1,0,t),this.isDirty=!0,t.parent=this,t.parentBranch=r.parentBranch}addChildren(t,r){const n=this.createBranch(r);for(const i of t)i.parent=this,i.parentBranch=r,n.push(i);this.isDirty=!0}addChildrenAfter(t,r){console.assert(t.length===0||t[0].type!=="first"),console.assert(r.parentBranch!==void 0);const n=this.createBranch(r.parentBranch);n.splice(n.indexOf(r)+1,0,...t),this.isDirty=!0;for(const i of t)i.parent=this,i.parentBranch=r.parentBranch;return t[t.length-1]}removeBranch(t){const r=this.branch(t);if(Ua(t)&&(this._branches[t]=void 0),!r)return[];for(const n of r)n.parent=void 0,n.parentBranch=void 0;return console.assert(r[0].type==="first"),r.shift(),this.isDirty=!0,r}removeChild(t){if(console.assert(t.parent===this),t.type==="first")return;const r=this.branch(t.parentBranch),n=r.indexOf(t);console.assert(n>=0),r.splice(n,1),this.isDirty=!0,t.parent=void 0,t.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:t}=this;return t[t.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){console.assert(this.parent!==void 0);const t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const t=this.parent.branch(this.parentBranch);return t[t.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:t}=this;return t[t.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const t=[];for(const r of Go)if(this._branches[r])for(const n of this._branches[r])t.push(...n.children),t.push(n);return this._children=t,t}render(t){if(this.type==="first"&&!t.atomIdsSettings)return null;const r=de(this.command,this.mode);if(r!=null&&r.render)return r.render(this,t);const n=new Dr({parent:t},this.style);let i=this.createBox(n,{classes:this.parent?"":"ML__base"});return i?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(i=this.attachSupsub(n,{base:i})),i.wrap(n)):null}attachSupsub(t,r){var n;const i=r.base,a=this.superscript,s=this.subscript;if(!a&&!s)return i;let u=null,d=null;const h=(n=r.isCharacterBox)!=null?n:this.isCharacterBox();let p=0;if(a){const se=new Dr({parent:t,mathstyle:"superscript"});u=Oo.createBox(se,a),h||(p=i.height-t.metrics.supDrop*se.scalingFactor)}let y=0;if(s){const se=new Dr({parent:t,mathstyle:"subscript"});d=Oo.createBox(se,s),h||(y=i.depth+t.metrics.subDrop*se.scalingFactor)}let M;t.isDisplayStyle?M=t.metrics.sup1:t.isCramped?M=t.metrics.sup3:M=t.metrics.sup2;const I=.5/jo/t.scalingFactor;let $=null;if(d&&u){p=Math.max(p,M,u.depth+.25*t.metrics.xHeight),y=Math.max(y,t.metrics.sub2);const se=t.metrics.defaultRuleThickness;if(p-u.depth-(d.height-y)<4*se){y=4*se-(p-u.depth)+d.height;const ee=.8*t.metrics.xHeight-(p-u.depth);ee>0&&(p+=ee,y-=ee)}const Ze=this.isExtensibleSymbol&&i.italic?-i.italic:0;$=new An({individualShift:[{box:d,shift:y,marginLeft:Ze},{box:u,shift:-p}]}).wrap(t)}else d&&!u?(y=Math.max(y,t.metrics.sub1,d.height-.8*$a),$=new An({shift:y,children:[{box:d,marginRight:I,marginLeft:this.isCharacterBox()?-i.italic:0}]})):!d&&u&&(p=Math.max(p,M,u.depth+.25*$a),$=new An({shift:-p,children:[{box:u,marginRight:I}]}));return new Ue([i,new Ue($,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:r.type})}attachLimits(t,r){const n=this.superscript?Oo.createBox(new Dr({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,i=this.subscript?Oo.createBox(new Dr({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!n&&!i?r.base.wrap(t):yl(t,_(S({},r),{above:n,below:i}))}bind(t,r){if(!r||t.isPhantom||this.value==="\u200B")return r;let n=this.parent;for(;n&&!n.captureSelection;)n=n.parent;return n!=null&&n.captureSelection||(this.id||(this.id=t.makeID()),r.atomID=this.id),r}createBox(t,r){var n,i,a,s;const u=(n=this.value)!=null?n:this.body,d=(i=r==null?void 0:r.boxType)!=null?i:Cc(this.type);let h=(a=r==null?void 0:r.classes)!=null?a:"";this.mode==="text"&&(h+=" ML__text");const p=typeof u=="string"||u===void 0?new Ue(u!=null?u:null,{type:d,isSelected:this.isSelected,mode:this.mode,maxFontSize:t.scalingFactor,style:_(S({variant:"normal"},this.style),{fontSize:Math.max(1,t.size+t.mathstyle.sizeDelta)}),letterShapeStyle:t.letterShapeStyle,classes:h}):(s=Oo.createBox(t,u,{type:d,classes:h}))!=null?s:new Ue(null);return t.isTight&&(p.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(p.italic=0),p.right=p.italic,this.bind(t,p),this.caret&&!this.superscript&&!this.subscript&&(p.caret=this.caret),p}isDigit(){var t;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((t=this.body)==null?void 0:t.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var t;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((t=this.body)==null?void 0:t.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function _0(e){let t;const r=[];let n=[];for(const i of e)if(!t&&!i.style)n.push(i);else{const a=i.computedStyle;t&&a.color===t.color&&a.backgroundColor===t.backgroundColor&&a.fontSize===t.fontSize?n.push(i):(n.length>0&&r.push(n),n=[i],t=a)}return n.length>0&&r.push(n),r}function M0(e,t,r){var n,i,a,s,u;if(!t||t.length===0)return null;const d=new Dr({parent:e},r.style),h=!((n=d.atomIdsSettings)!=null&&n.groupNumbers);let p=[];if(t.length===1){const M=t[0],I=M.render(d);I&&(h&&M.isSelected&&I.selected(!0),p=[I])}else{let M="",I=!0;for(const $ of t){(i=d.atomIdsSettings)!=null&&i.groupNumbers&&M&&(I&&$.isDigit()||!I&&wl($))&&(d.atomIdsSettings.overrideID=M);const se=$.render(d);d.atomIdsSettings&&(d.atomIdsSettings.overrideID=void 0),se&&((a=d.atomIdsSettings)!=null&&a.groupNumbers&&(($.isDigit()||wl($))&&(!M||I!==$.isDigit())&&(I=$.isDigit(),M=(s=$.id)!=null?s:""),M&&(!($.isDigit()||wl($))||!$.hasEmptyBranch("superscript")||!$.hasEmptyBranch("subscript"))&&(M="")),h&&$.isSelected&&se.selected(!0),p.push(se))}}if(p.length===0)return null;const y=new Ue(p,_(S({isTight:d.isTight},r),{type:(u=r.type)!=null?u:"lift"}));return y.isSelected=p.every(M=>M.isSelected),y.wrap(d)}function wl(e){return e.mode==="text"}function C0(e){return e.map(t=>t===null?"<null>":Array.isArray(t)&&t[0]instanceof _e?{atoms:t.map(r=>r.toJson())}:typeof t=="object"&&"group"in t?{group:t.group.map(r=>r.toJson())}:t)}var Ms=class tp extends _e{constructor(t,r,n){super({type:"text",command:t,mode:"text",displayContainsHighlight:!0}),this.value=r,this.verbatimLatex=r,this.applyStyle(n)}static fromJson(t){return new tp(t.command,t.value,t.style)}render(t){const r=this.createBox(t);return this.caret&&(r.caret=this.caret),r}_serialize(t){var r;return(r=this.verbatimLatex)!=null?r:Oe("text",this.value.codePointAt(0))}};function E0(e,t){if(e.direction===t.direction){const r=e.ranges.length;if(t.ranges.length===r){let n=0;for(;n<r&&k0(e.ranges[n],t.ranges[n])==="equal";)n++;return n===r?"equal":"different"}}return"different"}function k0(e,t){return e[0]===t[0]&&e[1]===t[1]?"equal":"different"}function Qn(e){let t=1/0,r=-1/0;for(const n of e.ranges)t=Math.min(t,n[0],n[1]),r=Math.max(r,n[0],n[1]);return[t,r]}function Ga(e){return typeof e=="number"&&!Number.isNaN(e)}function Lo(e){return Array.isArray(e)&&e.length===2}function Cs(e){return e!=null&&typeof e=="object"&&"ranges"in e&&Array.isArray(e.ranges)}function D0(e,t){const r=e.at(t);let n;if(r){n=r.mode;let i=r.parent;for(;!n&&i;)i&&(n=i.mode),i=i.parent}return n}function A0(e,t){if(!t)return"";if(typeof t=="string")return t;if(!e||t.after===void 0)return t.value;let r=!1,n=!1,i=!1,a=!1,s=!1,u=!1,d=!1,h=!1,p=!1,y=!1,M=!1,I=!1,$=!1,se=!1,Ze=!1,ee=e[0],De=0;for(;ee!=null&&ee.type&&/^(subsup|placeholder)$/.test(ee.type);)De+=1,ee=e[De];return r=!ee||ee.type==="first",ee&&(se=ee.mode==="text",n=!se&&ee.type==="mord"&&V.test(ee.value),i=!se&&ee.type==="mord"&&/\d+$/.test(ee.value),a=!se&&ee.isFunction,s=ee.type==="genfrac",u=ee.type==="surd",d=ee.type==="mbin",h=ee.type==="mrel",p=ee.type==="mop"||ee.type==="operator"||ee.type==="extensible-symbol",y=ee.type==="mpunct"||ee.type==="minner",M=ee.type==="array",I=ee.type==="mopen",$=ee.type==="mclose"||ee.type==="leftright",Ze=ee.type==="space"),t.after.includes("nothing")&&r||t.after.includes("letter")&&n||t.after.includes("digit")&&i||t.after.includes("function")&&a||t.after.includes("frac")&&s||t.after.includes("surd")&&u||t.after.includes("binop")&&d||t.after.includes("relop")&&h||t.after.includes("operator")&&p||t.after.includes("punct")&&y||t.after.includes("array")&&M||t.after.includes("openfence")&&I||t.after.includes("closefence")&&$||t.after.includes("text")&&se||t.after.includes("space")&&Ze?t.value:""}function Bc(e,t,r){return r?A0(e,r[t]):""}var ad={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",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",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",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"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\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"},\u00B5:"\\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",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",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","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function qa(e,t){var r;let n=(r=t==null?void 0:t.format)!=null?r:"auto";return n==="auto"&&([n,e]=L0(e)),n==="ascii-math"?(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",pi(e,{inlineShortcuts:t==null?void 0:t.inlineShortcuts})]):["latex",e]}function pi(e,t){var r,n,i;if(!e)return"";let a=!1,s;const u=(r=t.inlineShortcuts)!=null?r:ad;if(!a&&(e.startsWith("^")||e.startsWith("_"))&&(s=Xa(e.slice(1),{inlineShortcuts:u,noWrap:!0}),e=e[0]+"{"+s.match+"}",e+=pi(s.rest,t),a=!0),a||(s=e.match(/^(sqrt|\u221A)(.*)/),s&&(s=Xa(s[2],{inlineShortcuts:u,noWrap:!0}),e="\\sqrt{"+((n=s.match)!=null?n:"\\placeholder{}")+"}",e+=pi(s.rest,t),a=!0)),a||(s=e.match(/^(\\cbrt|\u221B)(.*)/),s&&(s=Xa(s[2],{inlineShortcuts:u,noWrap:!0}),e="\\sqrt[3]{"+((i=s.match)!=null?i:"\\placeholder{}")+"}",e+=pi(s.rest,t),a=!0)),a||(s=e.match(/^abs(.*)/),s&&(s=Xa(s[1],{inlineShortcuts:u,noWrap:!0}),e="\\left|"+s.match+"\\right|",e+=pi(s.rest,t),a=!0)),a||(s=e.match(/^["”“](.*?)["”“](.*)/),s&&(e="\\text{"+s[1]+"}",e+=pi(s[2],t),a=!0)),a||(s=e.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),s&&(e=od(s[1],u),e+=pi(s[2],t),a=!0)),!a&&/^([fgh])[^a-zA-Z]/.test(e)&&(s=Xa(e.slice(1),{inlineShortcuts:u,noWrap:!0}),e=e[1]==="("?e[0]+"\\left("+s.match+"\\right)":e[0]+s.match,e+=pi(s.rest,t),a=!0),a||(s=e.match(/^([a-zA-Z]+)(.*)/),s&&(e=od(s[1],u),e+=pi(s[2],t),a=!0)),!a)if(s=Xa(e,{inlineShortcuts:u,noWrap:!0}),s.match&&s.rest[0]==="/"){const d=Xa(s.rest.slice(1),{inlineShortcuts:u,noWrap:!0});d.match&&(e="\\frac{"+s.match+"}{"+d.match+"}"+pi(d.rest,t)),a=!0}else s.match&&(e=e.startsWith("(")?"\\left("+s.match+"\\right)"+pi(s.rest,t):s.match+pi(s.rest,t),a=!0);return a||(s=e.match(/^(\s+)(.*)$/),s&&(e=" "+pi(s[2],t),a=!0)),e}function Xa(e,t){let r="";e=e.trim();let n=e,i=e.charAt(0),a={"(":")","{":"}","[":"]"}[i];if(a){let s=1,u=1;for(;u<e.length&&s>0;)e[u]===i&&s++,e[u]===a&&s--,u++;s===0?(t.noWrap&&i==="("?r=pi(e.substring(1,u-1),t):(i==="{"&&a==="}"&&(i="\\{",a="\\}"),r="\\left"+i+pi(e.substring(1,u-1),t)+"\\right"+a),n=e.slice(Math.max(0,u))):(r=e.substring(1,u),n="")}else{let s=e.match(/^([a-zA-Z]+)/);if(s){let u=Bc(null,e,t.inlineShortcuts);if(u)return u=u.replace("_{#?}",""),u=u.replace("^{#?}",""),{match:u,rest:e.slice(u.length)}}if(s=e.match(/^([a-zA-Z])/),s)return{match:s[1],rest:e.slice(1)};if(s=e.match(/^(-)?\d+(\.\d*)?/),s)return{match:s[0],rest:e.slice(s[0].length)};/^\\(left|right)/.test(e)||(s=e.match(/^(\\[a-zA-Z]+)/),s&&(n=e.slice(s[1].length),r=s[1]))}return{match:r,rest:n}}function od(e,t){let r=Bc(null,e,t);return r?(r=r.replace("_{#?}",""),r=r.replace("^{#?}",""),r+=" "):r=e,r}var sd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function ld(e){const t=e.trim();for(const r of sd)if(t.startsWith(r[0])&&t.endsWith(r[1]))return[!0,t.substring(r[0].length,t.length-r[1].length)];return[!1,e]}function L0(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=ld(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]}var Ic="$$",B0="$$",I0=(e,t,r)=>(sd.some(n=>t.startsWith(n[0])&&t.endsWith(n[1]))||(t=`${Ic} ${t} ${B0}`),t),cd=class c0{constructor(t){c0._modes[t]=this}static onPaste(t,r,n){var i;if(!r.contentEditable&&r.userSelect==="none")return r.model.announce("plonk"),!1;if(typeof n=="string"){const s=new DataTransfer;s.setData("text/plain",n),n=s}const a=new ClipboardEvent("paste",{clipboardData:n,cancelable:!0});return(i=r.host)!=null&&i.dispatchEvent(a)?c0._modes[t].onPaste(r,n):!1}static copyToClipboard(t,r){if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}const n=t.model,i=n.selectionIsCollapsed?[0,n.lastOffset]:Qn(n.selection),a=n.getValue(i,r);navigator.clipboard.writeText(a).then(()=>{},()=>t.model.announce("plonk"))}static onCopy(t,r){var n;if(!r.clipboardData)return;if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}const i=t.model,a=i.selectionIsCollapsed?[0,i.lastOffset]:Qn(i.selection);let s=i.getAtoms(a);if(s.every(u=>u.mode==="text"||!u.mode))r.clipboardData.setData("text/plain",s.filter(u=>u instanceof Ms).map(u=>u.value).join(""));else if(s.every(u=>u.mode==="latex"))r.clipboardData.setData("text/plain",i.getAtoms(a,{includeChildren:!0}).map(u=>{var d;return(d=u.value)!=null?d:""}).join(""));else{let u;s.length===1&&s[0].verbatimLatex!==void 0?u=s[0].verbatimLatex:u=i.getValue(a,"latex-expanded"),r.clipboardData.setData("application/x-latex",u);try{r.clipboardData.setData("text/plain",t.options.onExport(t,u,a))}catch(d){}if(s.length===1){const d=s[0];(d.type==="root"||d.type==="group")&&(s=d.body.filter(h=>h.type!=="first"))}try{r.clipboardData.setData("application/json+mathlive",JSON.stringify(s.map(d=>d.toJson())))}catch(d){}if((n=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&n.ComputeEngine){const d=window.MathfieldElement.computeEngine;if(d)try{const h=d.jsonSerializationOptions;d.jsonSerializationOptions={metadata:["latex"]};const p=d.parse(i.getValue(a,"latex-unstyled"));d.jsonSerializationOptions=h;const y=JSON.stringify(p.json);y&&r.clipboardData.setData("application/json",y)}catch(h){}}}r.preventDefault()}static insert(t,r,n={}){var i;const a=n.mode==="auto"?t.mode:(i=n.mode)!=null?i:t.mode;return c0._modes[a].insert(t,r,n)}onPaste(t,r){return!1}insert(t,r,n){return!1}};cd._modes={};var Qr=cd,$0=[{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:"[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]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{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:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",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:"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+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:"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:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",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+shift+/",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+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{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"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],ud={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Bo(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e}function dd(e){var t,r;return(r=(t=e.querySelector(".ML__caret"))!=null?t:e.querySelector(".ML__text-caret"))!=null?r:e.querySelector(".ML__latex-caret")}function Sl(e){const t=dd(e);if(!t)return null;const r=t.getBoundingClientRect();return{x:r.right,y:r.bottom,height:r.height}}function $c(e){var t;if(!e.parent)return"root";let r=(t=e.parent.id)!=null?t:"";return r+=typeof e.parentBranch=="string"?"-"+e.parentBranch:`-${e.parentBranch[0]}/${e.parentBranch[0]}`,r}function fd(e,t,r){if(!t)return null;const n=e.field.getBoundingClientRect(),i=t.right-t.left,a=t.bottom-t.top,s=Math.ceil(t.left-n.left+e.field.scrollLeft*r),u=Math.ceil(t.top-n.top);return{left:s,right:s+i,top:u,bottom:u+a}}function hd(e){const t=e.getBoundingClientRect(),r=parseInt(getComputedStyle(e).marginRight),n={top:t.top-1,bottom:t.bottom,left:t.left,right:t.right-1+r};if(e.children.length===0||e.tagName.toUpperCase()==="SVG")return n;for(const i of e.children)if(i.nodeType===1&&"atomId"in i.dataset&&!i.classList.contains("pstrut")){const a=hd(i);n.left=Math.min(n.left,a.left),n.right=Math.max(n.right,a.right),n.top=Math.min(n.top,a.top),n.bottom=Math.max(n.bottom,a.bottom)}return n}function Es(e,t){var r,n;if(!t.id)return null;let i=(n=(r=e.atomBoundsCache)==null?void 0:r.get(t.id))!=null?n:null;if(i!==null)return i;const a=e.field.querySelector(`[data-atom-id="${t.id}"]`);return i=a?hd(a):null,e.atomBoundsCache&&(i?e.atomBoundsCache.set(t.id,i):e.atomBoundsCache.delete(t.id)),i!=null?i:null}function T0(e,t,r){const n=new Map;for(const i of e.model.getAtoms(t,{includeChildren:!0})){if(r!=null&&r.excludeAtomsWithBackground&&i.style.backgroundColor)continue;const a=e.field,s=a.offsetWidth;let d=Math.floor(a.getBoundingClientRect().width)/s;d=isNaN(d)?1:d;const h=fd(e,Es(e,i),d);if(h){const p=$c(i);if(n.has(p)){const y=n.get(p);n.set(p,{left:Math.min(y.left,h.left),right:Math.max(y.right,h.right),top:Math.min(y.top,h.top),bottom:Math.max(y.bottom,h.bottom)})}else n.set(p,h)}}return[...n.values()]}function pd(e,t){return e.model.selection.ranges.reduce((r,n)=>r.concat(...T0(e,n,t)),[])}function Tc(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:typeof t=="function"?t(e):!1}function md(e){let t=0,r=0;const n=e.offsetWidth,i=e.offsetHeight;for(;e instanceof HTMLElement;)t+=e.offsetTop,r+=e.offsetLeft,e=e.offsetParent;return new DOMRect(r,t,n,i)}var gd=`@keyframes ML__caret-blink {
|
|
|
0%,
|
|
|
100% {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
50% {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
}
|
|
|
.ML__container {
|
|
|
display: inline-flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-end;
|
|
|
min-height: 39px;
|
|
|
/* Need some room for the virtual keyboard toggle */
|
|
|
width: 100%;
|
|
|
/* Encourage browsers to consider allocating a hardware accelerated
|
|
|
layer for this element. */
|
|
|
isolation: isolate;
|
|
|
/* Prevent the browser from trying to interpret touch gestures in the field */
|
|
|
/* "Disabling double-tap to zoom removes the need for browsers to
|
|
|
delay the generation of click events when the user taps the screen." */
|
|
|
touch-action: none;
|
|
|
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_selection-color: var(--selection-color, #000);
|
|
|
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
|
|
|
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
|
|
|
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
|
|
|
--_smart-fence-color: var(--smart-fence-color, currentColor);
|
|
|
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
|
|
|
--_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
|
|
|
--_correct-color: var(--correct-color, #10a000);
|
|
|
--_incorrect-color: var(--incorrect-color, #a01b00);
|
|
|
--_composition-background-color: var(--composition-background-color, #fff1c2);
|
|
|
--_composition-text-color: var(--composition-text-color, black);
|
|
|
--_composition-underline-color: var(--composition-underline-color, transparent);
|
|
|
}
|
|
|
/* This is the actual field content (formula) */
|
|
|
.ML__content {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
align-self: center;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
padding: 2px 3px 2px 1px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle,
|
|
|
.ML__menu-toggle {
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
flex-shrink: 0;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
width: 34px;
|
|
|
height: 34px;
|
|
|
padding: 0;
|
|
|
margin-right: 4px;
|
|
|
cursor: pointer;
|
|
|
/* Avoid some weird blinking with :hover */
|
|
|
border-radius: 8px;
|
|
|
border: 1px solid transparent;
|
|
|
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
color: hsl(var(--_hue), 40%, 50%);
|
|
|
fill: currentColor;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:hover,
|
|
|
.ML__menu-toggle:hover {
|
|
|
background: hsla(0, 0%, 70%, 0.3);
|
|
|
color: #333;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle > span,
|
|
|
.ML__menu-toggle > span {
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
/* The invisible element used to capture keyboard events. We're just trying
|
|
|
really hard to make sure it doesn't show. */
|
|
|
.ML__keyboard-sink {
|
|
|
display: inline-block;
|
|
|
resize: none;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
/* Need these for Microsoft Edge */
|
|
|
position: fixed;
|
|
|
clip: rect(0 0 0 0);
|
|
|
/* Need this to prevent iOS Safari from auto-zooming */
|
|
|
font-size: 1em;
|
|
|
font-family: KaTeX_Main;
|
|
|
line-height: 0.5;
|
|
|
/* On Chromium, if this is 0, no keyboard events are received */
|
|
|
}
|
|
|
[part="placeholder"] {
|
|
|
color: var(--neutral-400);
|
|
|
}
|
|
|
.ML__composition {
|
|
|
background: var(--_composition-background-color);
|
|
|
color: var(--_composition-text-color);
|
|
|
text-decoration: underline var(--_composition-underline-color);
|
|
|
}
|
|
|
.ML__caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__text-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__latex-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_latex-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.019em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__focused .ML__latex-caret::after,
|
|
|
.ML__focused .ML__text-caret::after,
|
|
|
.ML__focused .ML__caret::after {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.ML__focused .ML__text {
|
|
|
background: var(--_text-highlight-background-color);
|
|
|
}
|
|
|
/* When using smartFence, the anticipated closing fence is displayed
|
|
|
with this style */
|
|
|
.ML__smart-fence__close {
|
|
|
opacity: var(--_smart-fence-opacity);
|
|
|
color: var(--_smart-fence-color);
|
|
|
}
|
|
|
.ML__selected,
|
|
|
.ML__focused .ML__selected .ML__contains-caret,
|
|
|
.ML__focused .ML__selected .ML__smart-fence__close,
|
|
|
.ML__focused .ML__selected .ML__placeholder {
|
|
|
color: var(--_selection-color);
|
|
|
opacity: 1;
|
|
|
}
|
|
|
.ML__selection {
|
|
|
box-sizing: border-box;
|
|
|
background: var(--_selection-background-color) !important;
|
|
|
}
|
|
|
.ML__contains-caret.ML__close,
|
|
|
.ML__contains-caret.ML__open,
|
|
|
.ML__contains-caret > .ML__close,
|
|
|
.ML__contains-caret > .ML__open,
|
|
|
.ML__contains-caret .ML__sqrt-sign,
|
|
|
.ML__contains-caret .ML__sqrt-line {
|
|
|
color: var(--_caret-color);
|
|
|
}
|
|
|
.ML__contains-highlight {
|
|
|
box-sizing: border-box;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__focused .ML__contains-highlight {
|
|
|
background: var(--_contains-highlight-background-color);
|
|
|
}
|
|
|
.ML__raw-latex {
|
|
|
font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
font-weight: 400;
|
|
|
font-size: 0.8em;
|
|
|
letter-spacing: -0.05em;
|
|
|
color: var(--_latex-color);
|
|
|
}
|
|
|
.ML__suggestion {
|
|
|
color: var(--neutral-500);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:focus {
|
|
|
outline: none;
|
|
|
border-radius: 8px;
|
|
|
border: 2px solid hsl(var(--_hue), 40%, 50%);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-pressed,
|
|
|
.ML__virtual-keyboard-toggle.is-active:hover,
|
|
|
.ML__virtual-keyboard-toggle.is-active {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to automatically show a
|
|
|
tooltip over a element on hover.
|
|
|
*/
|
|
|
[data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
[data-tooltip]::after {
|
|
|
content: attr(data-tooltip);
|
|
|
position: absolute;
|
|
|
display: block;
|
|
|
z-index: 2;
|
|
|
pointer-events: none;
|
|
|
right: auto;
|
|
|
top: calc(-100% - 4px);
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
border-radius: 4px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
text-align: center;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-style: normal;
|
|
|
font-weight: 400;
|
|
|
font-size: 13px;
|
|
|
/* Phone */
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
@media only screen and (max-width: 767px) {
|
|
|
[data-tooltip]::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
menu [data-tooltip]::after {
|
|
|
left: 100%;
|
|
|
top: 0%;
|
|
|
}
|
|
|
menu .ML__base {
|
|
|
cursor: default;
|
|
|
}
|
|
|
/** Don't display if we're tracking, i.e. have the pointer down */
|
|
|
.tracking [data-tooltip]:hover::after {
|
|
|
/* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
/** But do display if tracking and inside a menu */
|
|
|
.tracking menu li[data-tooltip]:hover::after,
|
|
|
[data-tooltip]:hover::after {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
transition-property: opacity, scale;
|
|
|
transition-duration: 0.15s;
|
|
|
transition-delay: 1s;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__prompt {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.ML__editablePromptBox {
|
|
|
outline: 1px solid #acacac;
|
|
|
border-radius: 2px;
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__focusedPromptBox {
|
|
|
outline: highlight auto 1px;
|
|
|
}
|
|
|
.ML__lockedPromptBox {
|
|
|
background-color: rgba(142, 142, 141, 0.4);
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__correctPromptBox {
|
|
|
outline: 1px solid var(--_correct-color);
|
|
|
box-shadow: 0 0 5px var(--_correct-color);
|
|
|
}
|
|
|
.ML__incorrectPromptBox {
|
|
|
outline: 1px solid var(--_incorrect-color);
|
|
|
box-shadow: 0 0 5px var(--_incorrect-color);
|
|
|
}
|
|
|
.variant-submenu {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
padding: 8px;
|
|
|
}
|
|
|
.variant-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
text-align: center;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.insert-matrix-submenu {
|
|
|
display: grid;
|
|
|
padding: 8px;
|
|
|
align-content: center;
|
|
|
justify-content: center;
|
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
|
}
|
|
|
.insert-matrix-submenu [part=menu-item] {
|
|
|
font-size: 21px;
|
|
|
border: none;
|
|
|
border-radius: 0;
|
|
|
line-height: 21px;
|
|
|
text-align: center;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.border-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
line-height: 1.2;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.swatches-submenu {
|
|
|
--_swatch-size: 2rem;
|
|
|
--_columns: 4;
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|
|
|
padding: 8px;
|
|
|
max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.menu-swatch {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
box-sizing: border-box;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
margin: 2px;
|
|
|
padding: 0;
|
|
|
background: var(--neutral-200);
|
|
|
}
|
|
|
.menu-swatch > .label {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
.menu-swatch > .label > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
min-width: var(--_swatch-size);
|
|
|
min-height: var(--_swatch-size);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.menu-swatch.active {
|
|
|
background: var(--neutral-100);
|
|
|
scale: 1.4;
|
|
|
}
|
|
|
.menu-swatch.active > .label > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.menu-swatch .ui-checkmark,
|
|
|
.menu-swatch .ui-mixedmark {
|
|
|
position: absolute;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
color: white;
|
|
|
}
|
|
|
.menu-swatch.dark-contrast .ui-checkmark,
|
|
|
.menu-swatch.dark-contrast .ui-mixedmark {
|
|
|
color: #000;
|
|
|
}
|
|
|
`,_l=`.ML__container {
|
|
|
min-height: auto !important;
|
|
|
--_hue: var(--hue, 212);
|
|
|
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
|
|
|
--_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);
|
|
|
}
|
|
|
.ML__sr-only {
|
|
|
position: absolute;
|
|
|
width: 1px;
|
|
|
height: 1px;
|
|
|
margin: -1px;
|
|
|
padding: 0;
|
|
|
overflow: hidden;
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
clip-path: inset(50%);
|
|
|
white-space: nowrap;
|
|
|
border: 0;
|
|
|
}
|
|
|
.ML__is-inline {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__base {
|
|
|
visibility: inherit;
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
cursor: text;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
box-sizing: content-box;
|
|
|
border: 0;
|
|
|
outline: 0;
|
|
|
vertical-align: baseline;
|
|
|
font-weight: inherit;
|
|
|
font-family: inherit;
|
|
|
font-style: inherit;
|
|
|
text-decoration: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__strut,
|
|
|
.ML__strut--bottom {
|
|
|
display: inline-block;
|
|
|
min-height: 0.5em;
|
|
|
}
|
|
|
.ML__small-delim {
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
/* Text mode */
|
|
|
.ML__text {
|
|
|
font-family: var(--_text-font-family);
|
|
|
white-space: pre;
|
|
|
}
|
|
|
/* Use cmr for 'math upright' */
|
|
|
.ML__cmr {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-style: normal;
|
|
|
}
|
|
|
.ML__mathit {
|
|
|
font-family: KaTeX_Math;
|
|
|
/* The KaTeX_Math font is italic by default, so the font-style below is only
|
|
|
useful when a fallback font is used
|
|
|
*/
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__mathbf {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
|
|
|
to match TeX idiosyncratic behavior */
|
|
|
.lcGreek.ML__mathbf {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
.ML__mathbfit {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: bold;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__ams {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
/* Blackboard */
|
|
|
.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_ul {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_el {
|
|
|
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 black;
|
|
|
text-stroke: 1px black;
|
|
|
color: transparent;
|
|
|
}
|
|
|
.ML__shape_sc {
|
|
|
font-variant: small-caps;
|
|
|
}
|
|
|
.ML__shape_sl {
|
|
|
font-style: oblique;
|
|
|
}
|
|
|
/* First level emphasis */
|
|
|
.ML__emph {
|
|
|
color: #bc2612;
|
|
|
}
|
|
|
/* Second level emphasis */
|
|
|
.ML__emph .ML__emph {
|
|
|
color: #0c7f99;
|
|
|
}
|
|
|
.ML__highlight {
|
|
|
color: #007cb2;
|
|
|
background: #edd1b0;
|
|
|
}
|
|
|
.ML__center {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__label_padding {
|
|
|
padding: 0 0.5em;
|
|
|
}
|
|
|
.ML__frac-line {
|
|
|
width: 100%;
|
|
|
min-height: 1px;
|
|
|
}
|
|
|
.ML__frac-line:after {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: max(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
/* There's a bug since Chrome 62 where
|
|
|
sub-pixel border lines don't draw at some zoom
|
|
|
levels (110%, 90%).
|
|
|
Setting the min-height used to work around it, but that workaround
|
|
|
broke in Chrome 84 or so.
|
|
|
Setting the background (and the min-height) seems to work for now.
|
|
|
*/
|
|
|
background: currentColor;
|
|
|
box-sizing: content-box;
|
|
|
/* Vuetify sets the box-sizing to inherit
|
|
|
causes the fraction line to not draw at all sizes (see #26) */
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__sqrt-sign {
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__sqrt-line {
|
|
|
display: inline-block;
|
|
|
height: max(1px, 0.04em);
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__sqrt-line:before {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: min(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
background: currentColor;
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt-line:after {
|
|
|
border-bottom-width: 1px;
|
|
|
content: ' ';
|
|
|
display: block;
|
|
|
margin-top: -0.1em;
|
|
|
}
|
|
|
.ML__sqrt-index {
|
|
|
margin-left: 0.27777778em;
|
|
|
margin-right: -0.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 {
|
|
|
position: relative;
|
|
|
left: 0.24em;
|
|
|
}
|
|
|
/** The markup for a LaTeX formula, either in an editable mathfield or
|
|
|
in a static display.
|
|
|
*/
|
|
|
.ML__latex {
|
|
|
display: inline-block;
|
|
|
direction: ltr;
|
|
|
text-align: left;
|
|
|
text-indent: 0;
|
|
|
text-rendering: auto;
|
|
|
font-family: KaTeX_Main, 'Times New Roman', serif;
|
|
|
font-style: normal;
|
|
|
font-size-adjust: none;
|
|
|
font-stretch: normal;
|
|
|
font-variant-caps: normal;
|
|
|
letter-spacing: normal;
|
|
|
line-height: 1.2;
|
|
|
word-wrap: normal;
|
|
|
word-spacing: normal;
|
|
|
white-space: nowrap;
|
|
|
text-shadow: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__latex .style-wrap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .mfrac {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .left-right {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist-t {
|
|
|
display: inline-table;
|
|
|
table-layout: fixed;
|
|
|
border-collapse: collapse;
|
|
|
}
|
|
|
.ML__latex .vlist-r {
|
|
|
display: table-row;
|
|
|
}
|
|
|
.ML__latex .vlist {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span {
|
|
|
display: block;
|
|
|
height: 0;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span > span {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist > span > .pstrut {
|
|
|
overflow: hidden;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__latex .vlist-t2 {
|
|
|
margin-right: -2px;
|
|
|
}
|
|
|
.ML__latex .vlist-s {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
font-size: 1px;
|
|
|
width: 2px;
|
|
|
min-width: 2px;
|
|
|
}
|
|
|
.ML__latex .msubsup {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .negativethinspace {
|
|
|
display: inline-block;
|
|
|
margin-left: -0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thinspace {
|
|
|
display: inline-block;
|
|
|
width: 0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .mediumspace {
|
|
|
display: inline-block;
|
|
|
width: 0.22222em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thickspace {
|
|
|
display: inline-block;
|
|
|
width: 0.27778em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .enspace {
|
|
|
display: inline-block;
|
|
|
width: 0.5em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .quad {
|
|
|
display: inline-block;
|
|
|
width: 1em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .qquad {
|
|
|
display: inline-block;
|
|
|
width: 2em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .llap,
|
|
|
.ML__latex .rlap {
|
|
|
width: 0;
|
|
|
position: relative;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner,
|
|
|
.ML__latex .rlap > .inner {
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__latex .llap > .fix,
|
|
|
.ML__latex .rlap > .fix {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner {
|
|
|
right: 0;
|
|
|
}
|
|
|
.ML__latex .rlap > .inner {
|
|
|
left: 0;
|
|
|
}
|
|
|
.ML__latex .rule {
|
|
|
display: inline-block;
|
|
|
border: solid 0;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line,
|
|
|
.ML__latex .underline .underline-line {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:before,
|
|
|
.ML__latex .underline .underline-line:before {
|
|
|
content: '';
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:after,
|
|
|
.ML__latex .underline .underline-line:after {
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: -1px;
|
|
|
}
|
|
|
.ML__latex .stretchy {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .stretchy:before,
|
|
|
.ML__latex .stretchy:after {
|
|
|
content: '';
|
|
|
}
|
|
|
.ML__latex .stretchy svg {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
height: inherit;
|
|
|
fill: currentColor;
|
|
|
stroke: currentColor;
|
|
|
fill-rule: nonzero;
|
|
|
fill-opacity: 1;
|
|
|
stroke-width: 1;
|
|
|
stroke-linecap: butt;
|
|
|
stroke-linejoin: miter;
|
|
|
stroke-miterlimit: 4;
|
|
|
stroke-dasharray: none;
|
|
|
stroke-dashoffset: 0;
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 25%;
|
|
|
width: 50%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-3-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-1 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .nulldelimiter {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-group {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-symbol {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .op-symbol.small-op {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__latex .op-symbol.large-op {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__latex .mtable .vertical-separator {
|
|
|
display: inline-block;
|
|
|
min-width: 1px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .mtable .arraycolsep {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-m > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-c > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-l > .vlist-t {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-r > .vlist-t {
|
|
|
text-align: right;
|
|
|
}
|
|
|
.ML__error {
|
|
|
display: inline-block;
|
|
|
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
|
|
|
background-color: hsla(341, 100%, 40%, 0.1);
|
|
|
background-repeat: repeat-x;
|
|
|
background-size: 3px 3px;
|
|
|
padding-bottom: 3px;
|
|
|
background-position: 0 100%;
|
|
|
}
|
|
|
.ML__error > .ML__error {
|
|
|
background: transparent;
|
|
|
padding: 0;
|
|
|
}
|
|
|
.ML__placeholder {
|
|
|
color: var(--_placeholder-color);
|
|
|
opacity: var(--_placeholder-opacity);
|
|
|
padding-left: 0.4ex;
|
|
|
padding-right: 0.4ex;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
}
|
|
|
.ML__notation {
|
|
|
position: absolute;
|
|
|
box-sizing: border-box;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
|
|
|
For UI elements, see \`[data-ML__tooltip]\`
|
|
|
*/
|
|
|
.ML__tooltip-container {
|
|
|
position: relative;
|
|
|
transform: scale(0);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content {
|
|
|
position: fixed;
|
|
|
display: inline-table;
|
|
|
visibility: hidden;
|
|
|
z-index: 2;
|
|
|
width: max-content;
|
|
|
max-width: 400px;
|
|
|
padding: 12px 12px;
|
|
|
border-radius: 8px;
|
|
|
background: #616161;
|
|
|
--_selection-color: #fff;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
opacity: 0;
|
|
|
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__text {
|
|
|
white-space: normal;
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__base {
|
|
|
display: contents;
|
|
|
}
|
|
|
.ML__tooltip-container:hover .ML__tooltip-content {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
font-size: 0.75em;
|
|
|
transform: scale(1) translate(0, 3em);
|
|
|
}
|
|
|
`,Ml=`#mathlive-environment-popover.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
#mathlive-environment-popover {
|
|
|
--_environment-panel-height: var(--environment-panel-height, 70px);
|
|
|
--_accent-color: var(--accent-color, #aaa);
|
|
|
--_background: var(--environment-panel-background, #fff);
|
|
|
--_button-background: var(--environment-panel-button-background, white);
|
|
|
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
|
|
|
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
|
|
|
--_button-text: var(--environment-panel-button-text, #e3e4e8);
|
|
|
position: absolute;
|
|
|
width: calc(var(--_environment-panel-height) * 2);
|
|
|
height: var(--_environment-panel-height);
|
|
|
border-radius: 4px;
|
|
|
border: 1.5px solid var(--_accent-color);
|
|
|
background-color: var(--_background);
|
|
|
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
|
|
|
pointer-events: all;
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons {
|
|
|
height: calc(var(--_environment-panel-height) * 5/4);
|
|
|
width: calc(var(--_environment-panel-height) * 5/4);
|
|
|
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
|
|
|
margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .font {
|
|
|
fill: white;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons circle {
|
|
|
fill: #7f7f7f;
|
|
|
transition: fill 300ms;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
|
|
|
fill-opacity: 1;
|
|
|
fill: var(--_background);
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-width: 3px;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons line {
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-opacity: 0;
|
|
|
stroke-width: 40;
|
|
|
pointer-events: none;
|
|
|
transition: stroke-opacity 300ms;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
|
|
|
height: 100%;
|
|
|
width: 50%;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
|
|
|
width: var(--_environment-panel-height);
|
|
|
height: var(--_environment-panel-height);
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
|
|
|
pointer-events: all;
|
|
|
margin-top: 2px;
|
|
|
width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
|
|
|
height: calc(var(--_environment-panel-height) / 3 - 2px);
|
|
|
border-radius: calc(var(--_environment-panel-height) / 25);
|
|
|
background-color: var(--_button-background);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
|
|
|
background-color: var(--_button-background-hover);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
|
|
|
stroke: var(--_button-text);
|
|
|
stroke-width: 2;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
|
|
|
fill-opacity: 0;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
|
|
|
pointer-events: none;
|
|
|
background-color: var(--_button-background-active);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
|
|
|
stroke: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
`,P0=`/* The element that display info while in latex mode */
|
|
|
#mathlive-suggestion-popover {
|
|
|
background-color: rgba(97, 97, 97);
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
border-radius: 8px;
|
|
|
position: fixed;
|
|
|
z-index: 1;
|
|
|
display: none;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
}
|
|
|
#mathlive-suggestion-popover.top-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
top: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-bottom: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.bottom-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
bottom: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-top: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-animated {
|
|
|
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-visible {
|
|
|
display: flex;
|
|
|
}
|
|
|
@keyframes ML__fade-in {
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
/* The wrapper class for the entire content of the popover panel */
|
|
|
#mathlive-suggestion-popover ul {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
list-style: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
align-items: flex-start;
|
|
|
max-height: 400px;
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
margin: 8px;
|
|
|
padding: 8px;
|
|
|
width: calc(100% - 16px - 16px);
|
|
|
column-gap: 1em;
|
|
|
border-radius: 8px;
|
|
|
cursor: pointer;
|
|
|
/* Since the content can be clicked on, provide feedback on hover */
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a {
|
|
|
color: #5ea6fd;
|
|
|
padding-top: 0.3em;
|
|
|
margin-top: 0.4em;
|
|
|
display: block;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a:hover {
|
|
|
color: #5ea6fd;
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li:hover,
|
|
|
#mathlive-suggestion-popover li.is-pressed,
|
|
|
#mathlive-suggestion-popover li.is-active {
|
|
|
background: rgba(255, 255, 255, 0.1);
|
|
|
}
|
|
|
/* The command inside a popover (inside a #mathlive-suggestion-popover) */
|
|
|
.ML__popover__command {
|
|
|
font-size: 1.6rem;
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
.ML__popover__current {
|
|
|
background: #5ea6fd;
|
|
|
color: #fff;
|
|
|
}
|
|
|
.ML__popover__latex {
|
|
|
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
align-self: center;
|
|
|
}
|
|
|
/* The keyboard shortcuts for a symbol as displayed in the popover */
|
|
|
.ML__popover__keybinding {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 0.8em;
|
|
|
opacity: 0.7;
|
|
|
}
|
|
|
/* Style for the character that joins the modifiers of a keyboard shortcut
|
|
|
(usually a "+" sign)*/
|
|
|
.ML__shortcut-join {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
`,Pc=`/* The element that displays the keys as the user type them */
|
|
|
#mathlive-keystroke-caption-panel {
|
|
|
visibility: hidden;
|
|
|
/*min-width: 160px;*/
|
|
|
/*background-color: rgba(97, 97, 200, .95);*/
|
|
|
background: var(--secondary, hsl(var(--_hue), 19%, 26%));
|
|
|
border-color: var(--secondary-border, hsl(0, 0%, 91%));
|
|
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 16px;
|
|
|
position: absolute;
|
|
|
z-index: 1;
|
|
|
display: flex;
|
|
|
flex-direction: row-reverse;
|
|
|
justify-content: center;
|
|
|
--keystroke: white;
|
|
|
--on-keystroke: #555;
|
|
|
--keystroke-border: #f7f7f7;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
body:not([theme='light']) #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
}
|
|
|
body[theme='dark'] #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
#mathlive-keystroke-caption-panel > span {
|
|
|
min-width: 14px;
|
|
|
/*height: 8px;*/
|
|
|
margin: 0 8px 0 0;
|
|
|
padding: 4px;
|
|
|
background-color: var(--keystroke);
|
|
|
color: var(--on-keystroke);
|
|
|
fill: currentColor;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 1em;
|
|
|
border-radius: 6px;
|
|
|
border: 2px solid var(--keystroke-border);
|
|
|
/*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
|
|
|
}
|
|
|
`,vd=`.ML__keyboard {
|
|
|
--_keyboard-height: 0;
|
|
|
--_keyboard-zindex: var(--keyboard-zindex, 105);
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
|
|
|
--_padding-top: var(--keyboard-padding-top, 5px);
|
|
|
--_padding-bottom: var(--keyboard-padding-bottom, 0px);
|
|
|
--_row-padding-left: var(--keyboard-row-padding-left, 0px);
|
|
|
--_row-padding-right: var(--keyboard-row-padding-right, 0px);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
|
|
|
--_keycap-primary-text: var(--keycap-primary-text, #ddd);
|
|
|
--_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_keycap-height: var(--keycap-height, 60px);
|
|
|
/* Keycap width (incl. margin) */
|
|
|
--_keycap-max-width: var(--keycap-max-width, 100px);
|
|
|
--_keycap-gap: var(--keycap-gap, 8px);
|
|
|
--_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
|
|
|
--_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
|
|
|
--_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 70px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
|
|
|
--_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
|
|
|
--_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
|
|
|
--_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
|
|
|
--_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));
|
|
|
}
|
|
|
.is-math-mode .MLK__rows .if-text-mode,
|
|
|
.is-text-mode .MLK__rows .if-math-mode {
|
|
|
display: none;
|
|
|
}
|
|
|
.if-can-undo,
|
|
|
.if-can-redo,
|
|
|
.if-can-copy,
|
|
|
.if-can-cut,
|
|
|
.if-can-paste {
|
|
|
opacity: 0.4;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.can-undo .if-can-undo,
|
|
|
.can-redo .if-can-redo,
|
|
|
.can-copy .if-can-copy,
|
|
|
.can-cut .if-can-cut,
|
|
|
.can-paste .if-can-paste {
|
|
|
opacity: 1;
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
body > .ML__keyboard {
|
|
|
position: fixed;
|
|
|
--_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
|
|
|
border-top: 1px solid var(--_border);
|
|
|
}
|
|
|
body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
|
|
|
box-shadow: none;
|
|
|
border: none;
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
|
|
|
transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
|
|
|
transition-property: transform, opacity;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__keyboard {
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
z-index: var(--_keyboard-zindex);
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
opacity: 1;
|
|
|
transform: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.ML__keyboard :where(div) {
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
transform: none;
|
|
|
}
|
|
|
.MLK__backdrop {
|
|
|
position: absolute;
|
|
|
bottom: calc(-1 * var(--_keyboard-height));
|
|
|
width: 100%;
|
|
|
height: var(--_keyboard-height);
|
|
|
box-sizing: border-box;
|
|
|
padding-top: var(--_padding-top);
|
|
|
padding-bottom: var(--_padding-bottom);
|
|
|
padding-left: var(--_padding-horizontal);
|
|
|
padding-right: var(--_padding-horizontal);
|
|
|
opacity: 0;
|
|
|
visibility: hidden;
|
|
|
transform: translate(0, 0);
|
|
|
background: var(--_background);
|
|
|
}
|
|
|
.backdrop-is-transparent .MLK__backdrop {
|
|
|
background: transparent;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop
|
|
|
(backdrop-is-transparent), make sure to let pointer event go through. */
|
|
|
.backdrop-is-transparent .MLK__plate {
|
|
|
background: transparent;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop, make sure to
|
|
|
allow pointer events on it. */
|
|
|
.backdrop-is-transparent .MLK__layer > div > div {
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
.ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
transform: translate(0, calc(-1 * var(--_keyboard-height)));
|
|
|
opacity: 1;
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.caps-lock-indicator {
|
|
|
display: none;
|
|
|
width: 8px;
|
|
|
height: 8px;
|
|
|
background: #0cbc0c;
|
|
|
box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
|
|
|
border-radius: 8px;
|
|
|
right: 8px;
|
|
|
top: 8px;
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .caps-lock-indicator {
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .shift {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
}
|
|
|
.MLK__plate {
|
|
|
position: absolute;
|
|
|
top: var(--_padding-top);
|
|
|
left: var(--_padding-horizontal);
|
|
|
width: calc(100% - 2 * var(--_padding-horizontal));
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
box-sizing: border-box;
|
|
|
container-type: inline-size;
|
|
|
touch-action: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
pointer-events: all;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 16px;
|
|
|
/* Size of toolbar labels */
|
|
|
font-weight: 400;
|
|
|
text-shadow: none;
|
|
|
}
|
|
|
.ML__box-placeholder {
|
|
|
color: var(--_box-placeholder-color);
|
|
|
}
|
|
|
.MLK__tex {
|
|
|
font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__tex-math {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.MLK__layer {
|
|
|
display: none;
|
|
|
outline: none;
|
|
|
}
|
|
|
.MLK__layer.is-visible {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
}
|
|
|
/* Keyboard layouts are made or rows of keys... */
|
|
|
.MLK__rows {
|
|
|
--_keycap-width: min(var(--_keycap-max-width), 10cqw);
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
border-collapse: separate;
|
|
|
clear: both;
|
|
|
border: 0;
|
|
|
margin: 0;
|
|
|
margin-bottom: var(--_keycap-gap);
|
|
|
gap: var(--_keycap-gap);
|
|
|
/* If the styling include, e.g., some shadows, they will be
|
|
|
cut off by the overflow. In that case, set the padding to
|
|
|
compensate. */
|
|
|
padding-left: var(--_row-padding-left);
|
|
|
padding-right: var(--_row-padding-right);
|
|
|
overflow: visible;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: center;
|
|
|
width: 100%;
|
|
|
gap: var(--_keycap-gap);
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
/* For the alignment of the text on some modifiers (e.g. shift) */
|
|
|
/* Extra spacing between two adjacent keys */
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex-math {
|
|
|
font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .big-op {
|
|
|
font-size: calc(1.25 * var(--_keycap-font-size));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bottom {
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .left {
|
|
|
align-items: flex-start;
|
|
|
padding-left: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .right {
|
|
|
align-items: flex-end;
|
|
|
padding-right: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w0 {
|
|
|
width: 0;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w5 {
|
|
|
width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w15 {
|
|
|
width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w20 {
|
|
|
width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w40 {
|
|
|
width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w50 {
|
|
|
width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .MLK__keycap.w50 {
|
|
|
font-size: 80%;
|
|
|
padding-top: 10px;
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .separator {
|
|
|
background: transparent;
|
|
|
border: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .horizontal-rule {
|
|
|
height: 6px;
|
|
|
margin-top: 3px;
|
|
|
margin-bottom: 0;
|
|
|
width: 100%;
|
|
|
border-radius: 0;
|
|
|
border-top: var(--_horizontal-rule);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost {
|
|
|
background: var(--_toolbar-background);
|
|
|
border: none;
|
|
|
color: var(--_toolbar-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost:hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bigfnbutton {
|
|
|
font-size: var(--_keycap-extra-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift,
|
|
|
.MLK__rows > .MLK__row .action {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
background: var(--_keycap-secondary-background);
|
|
|
border-color: var(--_keycap-secondary-border);
|
|
|
border-bottom-color: var(--_keycap-secondary-border-bottom);
|
|
|
line-height: 0.8;
|
|
|
font-size: min(1rem, var(--_keycap-small-font-size));
|
|
|
font-weight: 600;
|
|
|
padding: 8px 12px 8px 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift:hover,
|
|
|
.MLK__rows > .MLK__row .action:hover {
|
|
|
background: var(--_keycap-secondary-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary {
|
|
|
background: var(--_keycap-primary-background);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary:hover {
|
|
|
background: var(--_keycap-primary-background-hover);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected,
|
|
|
.MLK__rows > .MLK__row .action.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-active,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-active {
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning {
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning svg.svg-glyph {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
/** A regular keycap
|
|
|
* Use the :where() pseudo-class to give it a very low specifity,
|
|
|
* so that it can be overriden by custom style.
|
|
|
*/
|
|
|
:where(.MLK__rows > .MLK__row div) {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: space-evenly;
|
|
|
width: calc(var(--_keycap-width) - var(--_keycap-gap));
|
|
|
height: var(--_keycap-height);
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
vertical-align: top;
|
|
|
text-align: center;
|
|
|
float: left;
|
|
|
color: var(--_keycap-text);
|
|
|
fill: currentColor;
|
|
|
font-size: var(--_keycap-font-size);
|
|
|
background: var(--_keycap-background);
|
|
|
border: 1px solid var(--_keycap-border);
|
|
|
border-bottom-color: var(--_keycap-border-bottom);
|
|
|
border-radius: 6px;
|
|
|
cursor: pointer;
|
|
|
touch-action: none;
|
|
|
/* Keys with a variants panel */
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div):hover {
|
|
|
overflow: visible;
|
|
|
background: var(--_keycap-background-hover);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) .ML__latex {
|
|
|
pointer-events: none;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph {
|
|
|
margin: 8px 0;
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
|
min-height: 20px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {
|
|
|
margin: 8px 0;
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__tex-math {
|
|
|
font-size: 25px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
z-index: calc(var(--_keyboard-zindex) - 5);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed aside {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) small {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) aside {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 10px;
|
|
|
line-height: 10px;
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to display a tooltip on hover.
|
|
|
Note there are a different set of tooltip rules for the keyboard toggle
|
|
|
(it's in a different CSS tree) */
|
|
|
.ML__keyboard [data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]::after {
|
|
|
position: absolute;
|
|
|
display: inline-table;
|
|
|
content: attr(data-tooltip);
|
|
|
top: inherit;
|
|
|
bottom: 100%;
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
z-index: 2;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
border-radius: 2px;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-weight: 400;
|
|
|
font-size: 12px;
|
|
|
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover::after {
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
}
|
|
|
.MLK__toolbar {
|
|
|
align-self: center;
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
width: 100%;
|
|
|
max-width: 996px;
|
|
|
min-height: 32px;
|
|
|
/* Icons for undo/redo, etc. */
|
|
|
}
|
|
|
.MLK__toolbar svg {
|
|
|
height: 20px;
|
|
|
width: 20px;
|
|
|
}
|
|
|
.MLK__toolbar > .left {
|
|
|
position: relative;
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > .right {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
/* "button" in the toolbar */
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
color: var(--_toolbar-text);
|
|
|
fill: currentColor;
|
|
|
background: var(--_toolbar-background);
|
|
|
font-size: var(--_toolbar-font-size);
|
|
|
padding: 4px 15px;
|
|
|
cursor: pointer;
|
|
|
width: max-content;
|
|
|
min-width: 42px;
|
|
|
min-height: 34px;
|
|
|
border: none;
|
|
|
padding-left: 10px;
|
|
|
padding-right: 10px;
|
|
|
padding-bottom: 8px;
|
|
|
padding-top: 8px;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 4px;
|
|
|
margin-left: 4px;
|
|
|
margin-right: 4px;
|
|
|
border-radius: 8px;
|
|
|
box-shadow: none;
|
|
|
border-bottom: 2px solid transparent;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.disabled svg,
|
|
|
.MLK__toolbar > div > div.disabled:hover svg,
|
|
|
.MLK__toolbar > div > div.disabled.is-pressed svg {
|
|
|
color: var(--_toolbar-text);
|
|
|
opacity: 0.2;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:hover,
|
|
|
.MLK__toolbar > div > div:active,
|
|
|
.MLK__toolbar > div > div.is-pressed,
|
|
|
.MLK__toolbar > div > div.is-active {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
background: var(--_toolbar-background-selected);
|
|
|
border-radius: 0;
|
|
|
border-bottom-color: var(--_toolbar-text-active);
|
|
|
padding-bottom: 4px;
|
|
|
margin-bottom: 8px;
|
|
|
}
|
|
|
/* This is the element that displays variants on press+hold */
|
|
|
.MLK__variant-panel {
|
|
|
visibility: hidden;
|
|
|
position: fixed;
|
|
|
display: flex;
|
|
|
flex-flow: row wrap-reverse;
|
|
|
justify-content: center;
|
|
|
align-content: center;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
bottom: auto;
|
|
|
top: 0;
|
|
|
box-sizing: content-box;
|
|
|
transform: none;
|
|
|
z-index: calc(var(--_keyboard-zindex) + 1);
|
|
|
touch-action: none;
|
|
|
max-width: 350px;
|
|
|
background: var(--_variant-panel-background);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 6px;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
transition: none;
|
|
|
}
|
|
|
.MLK__variant-panel.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.MLK__variant-panel.compact {
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);
|
|
|
}
|
|
|
.MLK__variant-panel .item {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
font-size: var(--_variant-keycap-font-size);
|
|
|
height: var(--_variant-keycap-length);
|
|
|
width: var(--_variant-keycap-length);
|
|
|
margin: 0;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
border: 1px solid transparent;
|
|
|
background: transparent;
|
|
|
pointer-events: all;
|
|
|
cursor: pointer;
|
|
|
color: var(--_variant-keycap-text);
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
@media (max-height: 412px) {
|
|
|
.MLK__variant-panel .item {
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
.MLK__variant-panel .item .ML__latex {
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-active {
|
|
|
background: var(--_variant-keycap-background-active);
|
|
|
color: var(--_variant-keycap-text-active);
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-pressed {
|
|
|
background: var(--_variant-keycap-background-pressed);
|
|
|
color: var(--_variant-keycap-text-pressed);
|
|
|
}
|
|
|
.MLK__variant-panel .item.small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button {
|
|
|
box-sizing: border-box;
|
|
|
background: #fbfbfb;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
width: calc(100% - 12px);
|
|
|
height: calc(100% - 12px);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover {
|
|
|
background: #f0f0f0;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.MLK__variant-panel .item.box > div,
|
|
|
.MLK__variant-panel .item.box > span {
|
|
|
border: 1px dashed rgba(0, 0, 0, 0.24);
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning {
|
|
|
min-height: 60px;
|
|
|
min-width: 60px;
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
padding: 5px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border-radius: 5px;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning.is-pressed,
|
|
|
.MLK__variant-panel .item .warning.is-active {
|
|
|
background: red;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning svg.svg-glyph {
|
|
|
width: 50px;
|
|
|
height: 50px;
|
|
|
}
|
|
|
.MLK__variant-panel .item aside {
|
|
|
font-size: var(--_variant-keycap-aside-font-size);
|
|
|
line-height: 12px;
|
|
|
opacity: 0.78;
|
|
|
padding-top: 2px;
|
|
|
}
|
|
|
.MLK__keycap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
right: 4px;
|
|
|
top: 4px;
|
|
|
font-size: var(--_keycap-shift-font-size);
|
|
|
color: var(--_keycap-shift-color);
|
|
|
}
|
|
|
.hide-shift .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
@media (max-width: 414px) {
|
|
|
.MLK__variant-panel {
|
|
|
max-width: 350px;
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
/* @xs breakpoint: iPhone 5 */
|
|
|
@container (max-width: 414px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--_keycap-height), 42px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
font-size: 100%;
|
|
|
margin-left: 2px;
|
|
|
margin-right: 2px;
|
|
|
}
|
|
|
.MLK__rows .shift,
|
|
|
.MLK__rows .action {
|
|
|
font-size: 65%;
|
|
|
}
|
|
|
.MLK__rows .warning svg.svg-glyph {
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
min-height: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 744px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--keycap-height, 52px), 52px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
padding-left: 0;
|
|
|
padding-right: 0;
|
|
|
}
|
|
|
.MLK__tooltip::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.fnbutton {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.bigfnbutton {
|
|
|
font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.small {
|
|
|
font-size: 13px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > aside {
|
|
|
display: none;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
/* Medium breakpoint: larger phones */
|
|
|
@container (max-width: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@media (max-height: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 1444px) {
|
|
|
.MLK__rows .if-wide {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
.ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
}
|
|
|
/* Same as the media query, but with a class */
|
|
|
[theme='dark'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
[theme='light'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--_keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
}
|
|
|
`,R0=`:host {
|
|
|
--primary-color: #5898ff;
|
|
|
--primary-color-dimmed: #c0c0f0;
|
|
|
--primary-color-dark: var(--blue-500);
|
|
|
--primary-color-light: var(--blue-100);
|
|
|
--primary-color-reverse: #ffffff;
|
|
|
--secondary-color: #ff8a65;
|
|
|
--secondary-color-dimmed: #f0d5c5;
|
|
|
--secondary-color-dark: var(--orange-500);
|
|
|
--secondary-color-light: var(--orange-100);
|
|
|
--secondary-color-reverse: #ffffff;
|
|
|
--link-color: #5898ff;
|
|
|
--link-color-dimmed: #c5c5c5;
|
|
|
--link-color-dark: #121212;
|
|
|
--link-color-light: #e2e2e2;
|
|
|
--link-color-reverse: #ffffff;
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--neutral-100: #f5f5f5;
|
|
|
--neutral-200: #eeeeee;
|
|
|
--neutral-300: #e0e0e0;
|
|
|
--neutral-400: #bdbdbd;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #757575;
|
|
|
--neutral-700: #616161;
|
|
|
--neutral-800: #424242;
|
|
|
--neutral-900: #212121;
|
|
|
--red-25: #fff8f7;
|
|
|
--red-50: #fff1ef;
|
|
|
--red-100: #ffeae6;
|
|
|
--red-200: #ffcac1;
|
|
|
--red-300: #ffa495;
|
|
|
--red-400: #ff7865;
|
|
|
--red-500: #f21c0d;
|
|
|
--red-600: #e50018;
|
|
|
--red-700: #d30024;
|
|
|
--red-800: #bd002c;
|
|
|
--red-900: #a1002f;
|
|
|
--orange-25: #fffbf8;
|
|
|
--orange-50: #fff7f1;
|
|
|
--orange-100: #fff3ea;
|
|
|
--orange-200: #ffe1c9;
|
|
|
--orange-300: #ffcca2;
|
|
|
--orange-400: #ffb677;
|
|
|
--orange-500: #fe9310;
|
|
|
--orange-600: #f58700;
|
|
|
--orange-700: #ea7c00;
|
|
|
--orange-800: #dc6d00;
|
|
|
--orange-900: #ca5b00;
|
|
|
--brown-25: #fff8ef;
|
|
|
--brown-50: #fff1df;
|
|
|
--brown-100: #ffe9ce;
|
|
|
--brown-200: #ebcca6;
|
|
|
--brown-300: #cdaf8a;
|
|
|
--brown-400: #af936f;
|
|
|
--brown-500: #856a47;
|
|
|
--brown-600: #7f5e34;
|
|
|
--brown-700: #78511f;
|
|
|
--brown-800: #6e4200;
|
|
|
--brown-900: #593200;
|
|
|
--yellow-25: #fffdf9;
|
|
|
--yellow-50: #fffcf2;
|
|
|
--yellow-100: #fffaec;
|
|
|
--yellow-200: #fff2ce;
|
|
|
--yellow-300: #ffe8ab;
|
|
|
--yellow-400: #ffdf85;
|
|
|
--yellow-500: #ffcf33;
|
|
|
--yellow-600: #f1c000;
|
|
|
--yellow-700: #dfb200;
|
|
|
--yellow-800: #c9a000;
|
|
|
--yellow-900: #ad8a00;
|
|
|
--lime-25: #f4ffee;
|
|
|
--lime-50: #e9ffdd;
|
|
|
--lime-100: #ddffca;
|
|
|
--lime-200: #a8fb6f;
|
|
|
--lime-300: #94e659;
|
|
|
--lime-400: #80d142;
|
|
|
--lime-500: #63b215;
|
|
|
--lime-600: #45a000;
|
|
|
--lime-700: #268e00;
|
|
|
--lime-800: #007417;
|
|
|
--lime-900: #005321;
|
|
|
--green-25: #f5fff5;
|
|
|
--green-50: #ebffea;
|
|
|
--green-100: #e0ffdf;
|
|
|
--green-200: #a7ffa7;
|
|
|
--green-300: #5afa65;
|
|
|
--green-400: #45e953;
|
|
|
--green-500: #17cf36;
|
|
|
--green-600: #00b944;
|
|
|
--green-700: #00a34a;
|
|
|
--green-800: #008749;
|
|
|
--green-900: #00653e;
|
|
|
--teal-25: #f3ffff;
|
|
|
--teal-50: #e6fffe;
|
|
|
--teal-100: #d9fffe;
|
|
|
--teal-200: #8dfffe;
|
|
|
--teal-300: #57f4f4;
|
|
|
--teal-400: #43e5e5;
|
|
|
--teal-500: #17cfcf;
|
|
|
--teal-600: #00c2c0;
|
|
|
--teal-700: #00b5b1;
|
|
|
--teal-800: #00a49e;
|
|
|
--teal-900: #009087;
|
|
|
--cyan-25: #f7fcff;
|
|
|
--cyan-50: #eff8ff;
|
|
|
--cyan-100: #e7f5ff;
|
|
|
--cyan-200: #c2e6ff;
|
|
|
--cyan-300: #95d5ff;
|
|
|
--cyan-400: #61c4ff;
|
|
|
--cyan-500: #13a7ec;
|
|
|
--cyan-600: #069eda;
|
|
|
--cyan-700: #0095c9;
|
|
|
--cyan-800: #0088b2;
|
|
|
--cyan-900: #0a7897;
|
|
|
--blue-25: #f7faff;
|
|
|
--blue-50: #eef5ff;
|
|
|
--blue-100: #e5f1ff;
|
|
|
--blue-200: #bfdbff;
|
|
|
--blue-300: #92c2ff;
|
|
|
--blue-400: #63a8ff;
|
|
|
--blue-500: #0d80f2;
|
|
|
--blue-600: #0077db;
|
|
|
--blue-700: #006dc4;
|
|
|
--blue-800: #0060a7;
|
|
|
--blue-900: #005086;
|
|
|
--indigo-25: #f8f7ff;
|
|
|
--indigo-50: #f1efff;
|
|
|
--indigo-100: #eae7ff;
|
|
|
--indigo-200: #ccc3ff;
|
|
|
--indigo-300: #ac99ff;
|
|
|
--indigo-400: #916aff;
|
|
|
--indigo-500: #63c;
|
|
|
--indigo-600: #5a21b2;
|
|
|
--indigo-700: #4e0b99;
|
|
|
--indigo-800: #3b0071;
|
|
|
--indigo-900: #220040;
|
|
|
--purple-25: #fbf7ff;
|
|
|
--purple-50: #f8f0ff;
|
|
|
--purple-100: #f4e8ff;
|
|
|
--purple-200: #e4c4ff;
|
|
|
--purple-300: #d49aff;
|
|
|
--purple-400: #c36aff;
|
|
|
--purple-500: #a219e6;
|
|
|
--purple-600: #9000c4;
|
|
|
--purple-700: #7c009f;
|
|
|
--purple-800: #600073;
|
|
|
--purple-900: #3d0043;
|
|
|
--magenta-25: #fff8fb;
|
|
|
--magenta-50: #fff2f6;
|
|
|
--magenta-100: #ffebf2;
|
|
|
--magenta-200: #ffcddf;
|
|
|
--magenta-300: #ffa8cb;
|
|
|
--magenta-400: #ff7fb7;
|
|
|
--magenta-500: #eb4799;
|
|
|
--magenta-600: #da3689;
|
|
|
--magenta-700: #c82179;
|
|
|
--magenta-800: #b00065;
|
|
|
--magenta-900: #8a004c;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
/* @media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--label-color: #fff;
|
|
|
--active-label-color: #000;
|
|
|
--menu-bg: #525252;
|
|
|
--active-bg: #5898ff;
|
|
|
--active-bg-dimmed: #5c5c5c;
|
|
|
}
|
|
|
} */
|
|
|
:host {
|
|
|
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
|
|
|
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
|
|
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
|
--ui-font-size: 14px;
|
|
|
--ui-line-height: 1.5;
|
|
|
--ui-letter-spacing: 0.007em;
|
|
|
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
|
|
|
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
|
|
|
--ui-layer-1: var(--neutral-100);
|
|
|
--ui-layer-2: var(--neutral-200);
|
|
|
--ui-layer-3: var(--neutral-300);
|
|
|
--ui-layer-4: var(--neutral-400);
|
|
|
--ui-layer-5: var(--neutral-500);
|
|
|
--ui-layer-6: var(--neutral-600);
|
|
|
--ui-border-color: var(--primary-color);
|
|
|
--ui-border-radius: 4px;
|
|
|
--ui-text: var(--neutral-900);
|
|
|
--ui-text-secondary: var(--neutral-700);
|
|
|
--ui-text-placeholder: var(--neutral-500);
|
|
|
--ui-text-muted: var(--neutral-300);
|
|
|
/** A field is a UI element in which a user can type data, for
|
|
|
* example an input or textarea element.
|
|
|
*/
|
|
|
--ui-field-bg: var(--neutral-100);
|
|
|
--ui-field-bg-hover: var(--neutral-100);
|
|
|
--ui-field-bg-disabled: var(--neutral-300);
|
|
|
--ui-field-bg-invalid: var(--red-100);
|
|
|
--ui-field-bg-focus: var(--neutral-100);
|
|
|
--ui-field-border: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-hover: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-disabled: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-invalid: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-focus: 0.5px solid var(--border-color);
|
|
|
--ui-menu-bg: var(--neutral-100);
|
|
|
--ui-menu-text: var(--neutral-900);
|
|
|
--ui-menu-bg-hover: var(--neutral-200);
|
|
|
--ui-menu-text-hover: var(--neutral-900);
|
|
|
/** The \`active\` state is used for the state of menu items
|
|
|
* when they are selected.
|
|
|
*/
|
|
|
--ui-menu-bg-active: var(--primary-color);
|
|
|
--ui-menu-text-active: var(--primary-color-reverse);
|
|
|
/** The \`active-muted\` set is used for the state of
|
|
|
* submenus when they are open.
|
|
|
*/
|
|
|
--ui-menu-bg-active-muted: var(--neutral-300);
|
|
|
--ui-menu-text-active-muted: var(--neutral-900);
|
|
|
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
|
|
|
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
|
|
|
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
|
|
|
--ui-menu-divider: 0.5px solid #c7c7c7;
|
|
|
/* var(--neutral-300); */
|
|
|
--ui-menu-z-index: 10000;
|
|
|
--page-bg: var(--neutral-100);
|
|
|
--content-bg: var(--neutral-200);
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
|
|
|
Noto is a Linux/Android font.
|
|
|
*/
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
|
|
|
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
|
|
|
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
|
|
|
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
|
|
|
}
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
|
|
|
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
|
|
|
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
|
|
|
}
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
|
|
|
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
|
|
|
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
|
|
|
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
|
|
|
}
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
|
|
|
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
|
|
|
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh),
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo),
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac),
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std),
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-size: 1rem;
|
|
|
--ui-line-height: 1.7;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
:dir(rtl) {
|
|
|
--ui-line-height: auto;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
`,O0=`.ui-menu *,
|
|
|
.ui-menu ::before,
|
|
|
.ui-menu ::after {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ui-menu {
|
|
|
display: none;
|
|
|
color-scheme: light dark;
|
|
|
-webkit-user-select: none;
|
|
|
/* Important: Safari iOS doesn't respect user-select */
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0 0 0 0);
|
|
|
--active-label-color: #fff;
|
|
|
/* ui-menu-text-active */
|
|
|
--label-color: #121212;
|
|
|
/* ui-menu-text */
|
|
|
--menu-bg: #e2e2e2;
|
|
|
/* ui-menu-background */
|
|
|
--active-bg: #5898ff;
|
|
|
/* ui-menu-background-active */
|
|
|
--active-bg-dimmed: #c5c5c5;
|
|
|
/* ui-menu-background-active-muted */
|
|
|
}
|
|
|
/** Use the :where pseudo selector to make the specificity of the
|
|
|
* selector 0, so that it can be overridden by the user.
|
|
|
*/
|
|
|
:where(.ui-menu-container) {
|
|
|
position: absolute;
|
|
|
overflow: visible;
|
|
|
width: auto;
|
|
|
height: auto;
|
|
|
z-index: 10000;
|
|
|
border-radius: 8px;
|
|
|
background: var(--ui-menu-bg);
|
|
|
box-shadow: var(--ui-menu-shadow);
|
|
|
list-style: none;
|
|
|
padding: 6px 0 6px 0;
|
|
|
margin: 0;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
color: var(--ui-menu-text);
|
|
|
font-weight: normal;
|
|
|
font-style: normal;
|
|
|
text-shadow: none;
|
|
|
text-transform: none;
|
|
|
letter-spacing: 0;
|
|
|
outline: none;
|
|
|
opacity: 1;
|
|
|
/* The [popover] elements have a 1px solid black border. Ugh. */
|
|
|
border: none;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
}
|
|
|
:where(.ui-menu-container > li) {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
align-items: center;
|
|
|
padding: 1px 7px 1px 7px;
|
|
|
margin-top: 0;
|
|
|
margin-left: 6px;
|
|
|
margin-right: 6px;
|
|
|
border-radius: 4px;
|
|
|
white-space: nowrap;
|
|
|
position: relative;
|
|
|
outline: none;
|
|
|
fill: currentColor;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
text-align: left;
|
|
|
color: inherit;
|
|
|
font-family: var(--ui-font-family);
|
|
|
font-size: var(--ui-font-size);
|
|
|
line-height: var(--ui-line-height);
|
|
|
letter-spacing: var(--ui-letter-spacing);
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label) {
|
|
|
appearance: none;
|
|
|
background: none;
|
|
|
outline: none;
|
|
|
width: 100%;
|
|
|
margin: 0;
|
|
|
padding: 1px 2px 1px 1px;
|
|
|
overflow: visible;
|
|
|
border: 1px solid transparent;
|
|
|
white-space: nowrap;
|
|
|
text-align: start;
|
|
|
}
|
|
|
:where(.ui-menu-container > li:has(.heading)) {
|
|
|
margin-top: 0.5em;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.heading) {
|
|
|
font-weight: bold;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.indent > .label) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.indent) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[role='divider']) {
|
|
|
border-bottom: 1px solid var(--ui-menu-divider);
|
|
|
border-radius: 0;
|
|
|
padding: 0;
|
|
|
margin-left: 15px;
|
|
|
margin-right: 15px;
|
|
|
padding-top: 5px;
|
|
|
margin-bottom: 5px;
|
|
|
width: calc(100% - 30px);
|
|
|
/** 100% - (margin-left + margin-right) */
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-disabled='true']) {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active) {
|
|
|
background: var(--ui-menu-bg-active);
|
|
|
background: -apple-system-control-accent;
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active.is-submenu-open) {
|
|
|
background: var(--ui-menu-bg-active-muted);
|
|
|
color: inherit;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
|
|
|
padding-inline-end: 0;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
/** Keyboard shortcut */
|
|
|
:where(.ui-menu-container > li > kbd) {
|
|
|
font-family: var(--ui-font-family);
|
|
|
margin-inline-start: 12px;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active > kbd) {
|
|
|
opacity: 0.85;
|
|
|
}
|
|
|
.ui-trailing-chevron {
|
|
|
display: flex;
|
|
|
margin-inline-start: 24px;
|
|
|
width: 10px;
|
|
|
height: 10px;
|
|
|
margin-bottom: 4px;
|
|
|
}
|
|
|
.ui-trailing-chevron:dir(rtl) {
|
|
|
transform: scaleX(-1);
|
|
|
}
|
|
|
.ui-checkmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
.ui-mixedmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
`,Ja;function Io(e){let t="";switch(e){case"mathfield-element":t=`
|
|
|
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
|
|
|
:host([hidden]) { display: none; }
|
|
|
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
|
|
|
:host(:focus), :host(:focus-within) {
|
|
|
outline: Highlight auto 1px; /* For Firefox */
|
|
|
outline: -webkit-focus-ring-color auto 1px;
|
|
|
}
|
|
|
:host([readonly]:focus), :host([readonly]:focus-within),
|
|
|
:host([read-only]:focus), :host([read-only]:focus-within) {
|
|
|
outline: none;
|
|
|
}
|
|
|
@media (hover: none) and (pointer: coarse) {
|
|
|
:host(:not(:focus)) :first-child { pointer-events: none !important; }
|
|
|
}`;break;case"core":t=_l;break;case"mathfield":t=gd;break;case"environment-popover":t=Ml;break;case"suggestion-popover":t=P0;break;case"keystroke-caption":t=Pc;break;case"virtual-keyboard":t=vd;break;case"ui":t=R0;break;case"menu":t=O0;break;default:debugger}return t}function Ya(e){return Ja||(Ja={}),Ja[e]||(Ja[e]=new CSSStyleSheet,Ja[e].replaceSync(Io(e))),Ja[e]}var ha;function Yi(e){var t;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${e}`))return;const r=window.document.createElement("style");r.id=`mathlive-style-${e}`,r.append(window.document.createTextNode(Io(e))),window.document.head.appendChild(r);return}if(ha||(ha={}),((t=ha[e])!=null?t:0)!==0)ha[e]+=1;else{const r=Ya(e);document.adoptedStyleSheets=[...document.adoptedStyleSheets,r],ha[e]=1}}function pa(e){if("adoptedStyleSheets"in document&&ha!=null&&ha[e]&&(ha[e]-=1,ha[e]<=0)){const t=Ja[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(r=>r!==t)}}var Cl=class rp extends _e{constructor(t){var r;super(_(S({},t),{type:"accent",body:(r=t.body)!=null?r:void 0})),t.accentChar?this.accent=t.accentChar:this.svgAccent=t==null?void 0:t.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(t){return new rp(t)}toJson(){return _(S({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(t){var r;const n=new Dr({parent:t,mathstyle:"cramp"},this.style),i=(r=_e.createBox(n,this.body))!=null?r:new Ue("\u25A2",{style:this.style});let a=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(a=i.skew);let s=Math.min(i.height,$a),u;if(this.svgAccent)u=bl(this.svgAccent),s=n.metrics.bigOpSpacing1-s;else if(this.accent){const h=new Ue(this.accent,{fontFamily:"Main-Regular"});h.italic=0;const p=this.accent===8407?" ML__accent-vec":"";u=new Ue(new Ue(h),{classes:"ML__accent-body"+p})}u=new An({shift:0,children:[{box:new Ue(i)},-s,{box:u,marginLeft:i.left+2*a,classes:["ML__center"]}]});const d=new Ue(u,{type:"lift"});return this.caret&&(d.caret=this.caret),this.bind(n,d.wrap(n)),this.attachSupsub(n,{base:d})}},El={"(":")","{":"}","[":"]","|":"|","\\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"},kl=Object.fromEntries(Object.entries(El).map(([e,t])=>[t,e]));function Dl(e){var t;return(t={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":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])!=null?t:e.codePointAt(0)}function N0(e,t,r,n){var i;const s=new Ue(Dl(e),{fontFamily:"Main-Regular",isSelected:n.isSelected,classes:"ML__small-delim "+((i=n.classes)!=null?i:"")}).wrap(t);return r&&s.setTop((1-t.scalingFactor)*yn),s}function Rc(e,t,r,n,i){var a,s;const u=new Dr({parent:n,mathstyle:"textstyle"},i==null?void 0:i.style),d=new Ue(Dl(e),{fontFamily:`Size${t}-Regular`,isSelected:i.isSelected,classes:((a=i.classes)!=null?a:"")+` ML__delim-size${t}`,type:(s=i.type)!=null?s:"ignore"}).wrap(u);return r&&d.setTop((1-u.scalingFactor)*yn),d}function bd(e,t,r,n,i){var a;let s,u,d,h;s=d=h=Dl(e),u=null;let p="Size1-Regular";e==="\\vert"||e==="\\lvert"||e==="\\rvert"||e==="\\mvert"||e==="\\mid"?d=s=h=8739:e==="\\Vert"||e==="\\lVert"||e==="\\rVert"||e==="\\mVert"||e==="\\|"?d=s=h=8741:e==="\\uparrow"?d=h=9168:e==="\\Uparrow"?d=h=8214:e==="\\downarrow"?s=d=9168:e==="\\Downarrow"?s=d=8214:e==="\\updownarrow"?(s=8593,d=9168,h=8595):e==="\\Updownarrow"?(s=8657,d=8214,h=8659):e==="["||e==="\\lbrack"?(s=9121,d=9122,h=9123,p="Size4-Regular"):e==="]"||e==="\\rbrack"?(s=9124,d=9125,h=9126,p="Size4-Regular"):e==="\\lfloor"||e==="\u230A"?(d=s=9122,h=9123,p="Size4-Regular"):e==="\\lceil"||e==="\u2308"?(s=9121,d=h=9122,p="Size4-Regular"):e==="\\rfloor"||e==="\u230B"?(d=s=9125,h=9126,p="Size4-Regular"):e==="\\rceil"||e==="\u2309"?(s=9124,d=h=9125,p="Size4-Regular"):e==="("||e==="\\lparen"?(s=9115,d=9116,h=9117,p="Size4-Regular"):e===")"||e==="\\rparen"?(s=9118,d=9119,h=9120,p="Size4-Regular"):e==="\\{"||e==="\\lbrace"?(s=9127,u=9128,h=9129,d=9130,p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(s=9131,u=9132,h=9133,d=9130,p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(s=9127,h=9129,d=9130,p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(s=9131,h=9133,d=9130,p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(s=9127,h=9133,d=9130,p="Size4-Regular"):e==="\\rmoustache"||e==="\u23B1"?(s=9131,h=9129,d=9130,p="Size4-Regular"):e==="\\surd"?(s=57345,h=9143,d=57344,p="Size4-Regular"):e==="\\ulcorner"?(s=9484,d=h=32):e==="\\urcorner"?(s=9488,d=h=32):e==="\\llcorner"?(h=9492,d=s=32):e==="\\lrcorner"&&(s=9496,d=s=32);const y=Uo(s,p),M=y.height+y.depth,I=Uo(d,p),$=I.height+I.depth,se=Uo(h,p),Ze=se.height+se.depth;let ee=0,De=1;if(u!==null){const Gn=Uo(u,p);ee=Gn.height+Gn.depth,De=2}const Je=M+Ze+ee,Te=Math.max(0,Math.ceil((t-Je)/(De*$))),yt=Je+Te*De*$;let Rt=yn;r&&(Rt=Rt*n.scalingFactor);const Dt=yt/2-Rt,Ar=.008,Xr=[];Xr.push({box:new Ue(h,{fontFamily:p})}),Xr.push(-Ar);const nt=new Ue(d,{fontFamily:p});if(u===null)for(let Gn=0;Gn<Te;Gn++)Xr.push({box:nt});else{for(let Gn=0;Gn<Te;Gn++)Xr.push({box:nt});Xr.push(-Ar),Xr.push({box:new Ue(u,{fontFamily:p})}),Xr.push(-Ar);for(let Gn=0;Gn<Te;Gn++)Xr.push({box:nt})}Xr.push(-Ar),Xr.push({box:new Ue(s,{fontFamily:p})});let na="";p==="Size1-Regular"?na=" delim-size1":p==="Size4-Regular"&&(na=" delim-size4");const lo=new An({bottom:Dt,children:Xr},{classes:na});return new Ue(lo,_(S({},i!=null?i:{}),{classes:((a=i==null?void 0:i.classes)!=null?a:"")+" ML__delim-mult"}))}var yd=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),F0=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),xd=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),z0=[0,1.2,1.8,2.4,3];function K0(e,t,r,n){return e===void 0||e==="."?Qa(r,n.classes):(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),yd.has(e)||xd.has(e)?Rc(e,t,!1,r,n):F0.has(e)?bd(e,z0[t],!1,r,n):(console.assert(!1,"Unknown delimiter '"+e+"'"),null))}var H0=[{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}],W0=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],V0=[{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 Z0(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(console.assert(e.type==="stack"),"Size4-Regular")}function j0(e,t,r,n){const i={"-4":0,"-3":1,0:2}[n.mathstyle.sizeDelta];for(let a=i;a<r.length&&r[a].type!=="stack";a++){const s=Uo(e,Z0(r[a]));if(s.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let u=s.height+s.depth;if(r[a].type==="small"&&(r[a].mathstyle==="scriptscriptstyle"?u*=Math.max(cl[Math.max(1,n.size-2)],n.minFontScale):r[a].mathstyle==="scriptstyle"&&(u*=Math.max(cl[Math.max(1,n.size-1)],n.minFontScale))),u>t)return r[a]}return r[r.length-1]}function Al(e,t,r,n,i,a){if(!t||t.length===0||t===".")return Qa(i);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");let s;xd.has(t)?s=H0:yd.has(t)?s=V0:s=W0;const u=j0(Dl(t),r,s,i),d=new Dr({parent:i,mathstyle:u.mathstyle},a==null?void 0:a.style);return u.type==="small"?N0(t,d,n,_(S({},a),{type:e})):u.type==="large"?Rc(t,u.size,n,d,_(S({},a),{type:e})):(console.assert(u.type==="stack"),bd(t,r,n,d,_(S({},a),{type:e})))}function qo(e,t,r,n,i,a){if(t===".")return Qa(i,a==null?void 0:a.classes);const s=yn*i.scalingFactor,u=901,d=5/jo,h=Math.max(r-s,n+s),p=Math.max(h/500*u,2*h-d);return Al(e,t,p,!0,i,a)}function Qa(e,t){const r=new Ue(null,{classes:" nulldelimiter "+(t!=null?t:""),type:"ignore"});return r.width=e.getRegisterAsEm("nulldelimiterspace"),r.wrap(new Dr({parent:e,mathstyle:"textstyle"}))}var Ta=class np extends _e{constructor(t){var r;super({type:"placeholder",command:"\\placeholder",mode:(r=t==null?void 0:t.mode)!=null?r:"math",style:t==null?void 0:t.style}),this.captureSelection=!0}static fromJson(t){return new np(t)}toJson(){return super.toJson()}render(t){let r;return this.value=t.placeholderSymbol,typeof t.renderPlaceholder=="function"?r=t.renderPlaceholder(t):r=this.createBox(t),this.caret&&(r.classes+=" ML__placeholder-selected"),r}_serialize(t){return t.skipPlaceholders?"":"\\placeholder{}"}},wd=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],Sd=["cases","dcases","rcases"],Oc=["align","align*","aligned","gather","gathered","split"],U0=["array","subequations","eqnarray"];function G0(e){return U0.concat(Oc).concat(Sd).concat(wd).includes(e)}function _d(e){return wd.includes(e)}function q0(e){return Sd.includes(e)}function X0(e){return Oc.includes(e)}function Md(e,t,r){let n=0;for(const h of r)"align"in h&&(n+=1);let i=0;const a=[];for(const h of t){let p=0;for(i=Math.max(i,Math.min(h.length,n));p<h.length;){const y=[],M=Math.min(h.length,p+n);for(;p<M;){const I=h[p];I.length===0?y.push([new _e({type:"first",mode:e.mode})]):I[0].type!=="first"?y.push([new _e({type:"first",mode:e.mode}),...I]):(console.assert(!I.slice(1).some($=>$.type==="first")),y.push(I)),p+=1}a.push(y)}}a.length>0&&a[a.length-1].length===1&&a[a.length-1][0].length===1&&a[a.length-1][0][0].type==="first"&&a.pop();const s=[];for(const h of a){if(h.length!==i)for(let p=h.length;p<i;p++)h.push([new _e({type:"first",mode:e.mode}),new Ta]);s.push(h)}let u=0,d=0;for(const h of s){d=0;for(const p of h){for(const y of p)y.parent=e,y.parentBranch=[u,d];d+=1}u+=1}return e.isDirty=!0,s}var jr=class ip extends _e{constructor(t,r,n,i={}){var a;super({type:"array"}),this.environmentName=t,this.rowGaps=n,i.mathstyleName&&(this.mathstyleName=i.mathstyleName),i.columns&&(i.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=i.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=Md(this,r,this.colFormat),i.leftDelim&&(this.leftDelim=i.leftDelim),i.rightDelim&&(this.rightDelim=i.rightDelim),i.arraycolsep!==void 0&&(this.arraycolsep=i.arraycolsep),this.colSeparationType=i.colSeparationType,i.arraystretch!==void 0&&(this.arraystretch=i.arraystretch),this.minColumns=(a=i.minColumns)!=null?a:1}static fromJson(t){return new ip(t.environmentName,t.array,t.rowGaps,t)}toJson(){const t=_(S({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(r=>r.map(n=>n.map(i=>i.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(t.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(t.arraycolsep=this.arraycolsep),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}branch(t){var r;if(xl(t))return(r=this.array[t[0]][t[1]])!=null?r:void 0}createBranch(t){var r;return xl(t)?(this.isDirty=!0,(r=this.branch(t))!=null?r:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(t=>!!t.align).length}removeBranch(t){if(Ua(t))return super.removeBranch(t);const r=this.branch(t);return this.array[t[0]][t[1]]=void 0,r.forEach(n=>{n.parent=void 0,n.parentBranch=void 0}),console.assert(r[0].type==="first"),r.shift(),this.isDirty=!0,r}get hasChildren(){return this.children.length>0}get children(){const t=[];for(const r of this.array)for(const n of r)if(n)for(const i of n)t.push(...i.children),t.push(i);return[...t,...super.children]}render(t){var r,n,i,a,s,u;const d=new Dr({parent:t,mathstyle:this.mathstyleName},this.style),h=d.getRegisterAsEm("arrayrulewidth"),p=d.getRegisterAsEm("arraycolsep"),y=d.getRegisterAsEm("doublerulesep"),M=(n=(r=this.arraystretch)!=null?r:d.getRegisterAsNumber("arraystretch"))!=null?n:1;let I=typeof this.arraycolsep=="number"?this.arraycolsep:p;this.colSeparationType==="small"&&(I=.2778*(new Dr({parent:t,mathstyle:"scriptstyle"}).scalingFactor/t.scalingFactor));const $=M*xc,se=.7*$,Ze=.3*$;let ee=0;const De=[];let Je=0;const Te=this.array.length;for(let tn=0;tn<Te;++tn){const Cn=this.array[tn];Je=Math.max(Je,Cn.length);const qn=new Dr({parent:d,mathstyle:this.mathstyleName},this.style);let co=se/qn.scalingFactor,uo=Ze/qn.scalingFactor;const fo={cells:[],height:0,depth:0,pos:0};for(const Oa of Cn){const Ff=(i=_e.createBox(qn,Oa,{type:"ignore"}))!=null?i:new Ue(null,{type:"ignore"});uo=Math.max(uo,Ff.depth),co=Math.max(co,Ff.height),fo.cells.push(Ff)}let ho=(a=nd(this.rowGaps[tn]))!=null?a:0;ho>0&&(ho+=Ze,uo=Math.max(uo,ho),ho=0),tn<Te-1&&!_d(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(uo+=d.getRegisterAsEm("jot")),fo.height=co,fo.depth=uo,ee+=co,fo.pos=ee,ee+=uo+ho,De.push(fo)}const yt=ee/2+yn,Rt=[];for(let tn=0;tn<Je;tn++){const Cn=[];for(const qn of De){const co=qn.cells[tn];co.depth=qn.depth,co.height=qn.height,Cn.push({box:co,shift:qn.pos-yt})}Cn.length>0&&Rt.push(new An({individualShift:Cn}))}const Dt=[];let Ar=!1,Xr=!1,nt=0,na=!this.leftDelim;const{colFormat:lo}=this;for(const tn of lo){if("align"in tn&&nt>=Rt.length)break;if("align"in tn)Ar?Dt.push(Xo(2*I)):(Xr||na)&&Dt.push(Xo(I)),Dt.push(new Ue(Rt[nt],{classes:"col-align-"+tn.align})),nt++,Ar=!0,Xr=!1,na=!1;else if("gap"in tn){if(typeof tn.gap=="number")Dt.push(Xo(tn.gap));else{const Cn=Cd(t,De,yt,tn.gap);Cn&&Dt.push(Cn)}Ar=!1,Xr=!1,na=!1}else if("separator"in tn){const Cn=new Ue(null,{classes:"vertical-separator"});Cn.height=ee,Cn.setStyle("height",ee,"em"),Cn.setStyle("border-right",`${h}em ${tn.separator} currentColor`),Cn.setStyle("vertical-align",-(ee-yt),"em");let qn=0;Xr?qn=y-h:Ar&&(qn=I-h),Cn.left=qn,Dt.push(Cn),Ar=!1,Xr=!0,na=!1}}Ar&&!this.rightDelim&&Dt.push(Xo(I));const ba=new Ue(Dt,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(ba.caret=this.caret),this.bind(t,ba);const Gn=ba.height,ia=ba.depth,Ti=this.bind(t,new Ue([this.bind(t,qo("open",(s=this.leftDelim)!=null?s:".",Gn,ia,d,{isSelected:this.isSelected})),ba,this.bind(t,qo("close",(u=this.rightDelim)!=null?u:".",Gn,ia,d,{isSelected:this.isSelected}))],{type:"ord"}));return Ti?(Ti.setStyle("display","inline-block"),this.caret&&(Ti.caret=this.caret),this.bind(t,this.attachSupsub(t,{base:Ti}))):null}_serialize(t){var r;const n=[];if(this.environmentName==="lines"?n.push("{\\displaylines"):n.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(n.push("{"),this.colFormat!==void 0)for(const i of this.colFormat)"align"in i&&typeof i.align=="string"?n.push(i.align):"separator"in i&&i.separator==="solid"?n.push("|"):"separator"in i&&i.separator==="dashed"&&n.push(":");n.push("}")}for(let i=0;i<this.array.length;i++){for(let a=0;a<this.array[i].length;a++)a>0&&n.push(" & "),n.push(_e.serialize(this.array[i][a],t));if(i<this.array.length-1){const a=this.rowGaps[i];a!=null&&a.dimension?n.push(`\\\\[${a.dimension} ${(r=a.unit)!=null?r:"pt"}] `):n.push("\\\\ ")}}return this.environmentName==="lines"?n.push("}"):n.push(`\\end{${this.environmentName}}`),Cr(n)}getCell(t,r){return this.array[t][r]}setCell(t,r,n){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[t][r]!==void 0);for(const a of this.array[t][r])a.parent=void 0,a.parentBranch=void 0;let i=n;(n.length===0||n[0].type!=="first")&&(i=[new _e({type:"first",mode:this.mode}),...n]),this.array[t][r]=i;for(const a of i)a.parent=this,a.parentBranch=[t,r];this.isDirty=!0}addRowBefore(t){console.assert(this.type==="array"&&Array.isArray(this.array));const r=[];for(let n=0;n<this.colCount;n++)r.push(Ll(this));this.array.splice(t,0,r);for(let n=t;n<this.rowCount;n++)for(let i=0;i<this.colCount;i++){const a=this.array[n][i];if(a)for(const s of a)s.parentBranch=[n,i]}this.isDirty=!0}addRowAfter(t){console.assert(this.type==="array"&&Array.isArray(this.array));const r=[];for(let n=0;n<this.colCount;n++)r.push(Ll(this));this.array.splice(t+1,0,r);for(let n=t+1;n<this.rowCount;n++)for(let i=0;i<this.colCount;i++){const a=this.array[n][i];if(a)for(const s of a)s.parentBranch=[n,i]}this.isDirty=!0}removeRow(t){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>t);const r=this.array.splice(t,1);for(const n of r)for(const i of n)if(i)for(const a of i)a.parent=void 0,a.parentBranch=void 0;for(let n=t;n<this.rowCount;n++)for(let i=0;i<this.colCount;i++){const a=this.array[n][i];if(a)for(const s of a)s.parentBranch=[n,i]}this.isDirty=!0}addColumnBefore(t){console.assert(this.type==="array"&&Array.isArray(this.array));for(const r of this.array)r.splice(t,0,Ll(this));for(let r=0;r<this.rowCount;r++)for(let n=t;n<this.colCount;n++){const i=this.array[r][n];if(i)for(const a of i)a.parentBranch=[r,n]}this.isDirty=!0}addColumnAfter(t){console.assert(this.type==="array"&&Array.isArray(this.array));for(const r of this.array)r.splice(t+1,0,Ll(this));for(let r=0;r<this.rowCount;r++)for(let n=t+1;n<this.colCount;n++){const i=this.array[r][n];if(i)for(const a of i)a.parentBranch=[r,n]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(t){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>t);for(const r of this.array){const n=r.splice(t,1);for(const i of n)if(i)for(const a of i)a.parent=void 0,a.parentBranch=void 0}for(let r=0;r<this.rowCount;r++)for(let n=t;n<this.colCount;n++){const i=this.array[r][n];if(i)for(const a of i)a.parentBranch=[r,n]}this.isDirty=!0}get cells(){const t=[];for(const r of this.array)for(const n of r)n&&t.push(n.filter(i=>i.type!=="first"));return t}};function Ll(e){const t=new _e({type:"first",mode:e.mode});t.parent=e;const r=new Ta;return r.parent=e,[t,r]}function Xo(e){const t=new Ue(null,{classes:"arraycolsep"});return t.width=e,t}function Cd(e,t,r,n){if(!n)return null;const i=[];for(const a of t){const s=_e.createBox(e,n,{type:"ignore"});s&&(s.depth=a.depth,s.height=a.height,i.push({box:s,shift:a.pos-r}))}return new An({individualShift:i}).wrap(e)}var eo=class ap extends _e{constructor(t){super({mode:t.mode,command:t.command,style:t.style,body:t.body,type:"box"}),this.framecolor=t.framecolor,this.backgroundcolor=t.backgroundcolor,this.padding=t.padding,this.offset=t.offset,this.border=t.border}static fromJson(t){return new ap(t)}toJson(){return _(S({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(t){var r,n,i,a;const s=_e.createBox(t,this.body,{type:"lift"});if(!s)return null;const u=t.toEm((r=this.offset)!=null?r:{dimension:0});s.depth+=u,s.setStyle("display","inline-block"),s.setStyle("position","relative"),s.setStyle("height",Math.floor(100*s.height+s.depth)/100,"em"),s.setStyle("vertical-align",-Math.floor(100*s.height)/100,"em");const d=new Dr({parent:t},this.style),h=d.toEm((n=this.padding)!=null?n:{register:"fboxsep"}),p=new Ue(null,{classes:"ML__box"});p.height=s.height+h,p.depth=s.depth+h,p.setStyle("box-sizing","border-box"),p.setStyle("position","absolute"),p.setStyle("top",-h+.3,"em"),p.setStyle("left",0),p.setStyle("height",p.height+p.depth,"em"),p.setStyle("width","100%"),this.backgroundcolor&&p.setStyle("background-color",(i=d.toColor(this.backgroundcolor))!=null?i:"transparent"),this.framecolor&&p.setStyle("border",`${d.getRegisterAsEm("fboxrule",2)}em solid ${(a=d.toColor(this.framecolor))!=null?a:"black"}`),this.border&&p.setStyle("border",this.border);const y=new Ue([p,s],{type:"lift"});return y.setStyle("display","inline-block"),y.setStyle("position","relative"),y.setStyle("line-height",0),y.height=s.height+h+(u>0?u:0),y.depth=s.depth+h+(u<0?-u:0),y.setStyle("padding-left",h,"em"),y.setStyle("padding-right",h,"em"),y.setStyle("height",Math.floor(100*(s.height+s.depth+2*h+Math.abs(u)))/100,"em"),y.setStyle("margin-top",-h,"em"),y.setStyle("top",Math.floor(100*(s.depth-s.height+2*h-u))/100,"em"),y.setStyle("vertical-align",Math.floor(100*(s.depth+2*h))/100,"em"),this.caret&&(y.caret=this.caret),this.attachSupsub(t,{base:y})}_serialize(t){return t.skipStyles?Cr([this.bodyToLatex(t),this.supsubToLatex(t)]):super._serialize(t)}},Ed=class op extends _e{constructor(t,r){var n;super({type:"composition",mode:(n=r==null?void 0:r.mode)!=null?n:"math",value:t})}static fromJson(t){return new op(t.value,t)}toJson(){return super.toJson()}get computedStyle(){return{}}render(t){const r=new Ue(this.value,{classes:"ML__composition",type:"composition"});return this.bind(t,r),this.caret&&(r.caret=this.caret),r}_serialize(t){return""}},$o=class sp extends _e{constructor(t){super({type:"error",value:t,command:t,mode:"math"}),this.verbatimLatex=t}static fromJson(t){return new sp(t.command)}toJson(){return super.toJson()}render(t){const r=this.createBox(t,{classes:"ML__error"});return this.caret&&(r.caret=this.caret),r}},kd=class lp extends _e{constructor(t,r,n){super({type:"group",mode:r,style:n}),this.body=t,this.boxType=t.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,t&&t.length===1&&t[0].command===","&&(this.captureSelection=!0)}static fromJson(t){return new lp(t.body,t.mode,t.style)}render(t){const r=_e.createBox(t,this.body,{type:this.boxType});return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=de(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):`{${this.bodyToLatex(t)}}`}},ln=class cp extends _e{constructor(t,r,n){super({type:"leftright",style:n.style,displayContainsHighlight:!0}),this.variant=t,this.body=r,this.leftDelim=n.leftDelim,this.rightDelim=n.rightDelim}static fromJson(t){var r;return new cp((r=t.variant)!=null?r:"",t.body,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}_serialize(t){var r,n;const i=this.matchingRightDelim();return this.variant==="left...right"?Cr(["\\left",(r=this.leftDelim)!=null?r:".",this.bodyToLatex(t),"\\right",i]):this.variant==="mleft...mright"?Cr(["\\mleft",(n=this.leftDelim)!=null?n:".",this.bodyToLatex(t),"\\mright",i]):Cr([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(t),i])}matchingRightDelim(){var t,r;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const n=(t=this.leftDelim)!=null?t:".";return(r=El[n])!=null?r:n}render(t){var r,n;const i=new Dr({parent:t},this.style);console.assert(this.body!==void 0);const a=new Dr({parent:t,mathstyle:"textstyle"},this.style),s=(r=_e.createBox(i,this.body,{type:"inner"}))!=null?r:new Ue(null,{type:"inner"}),u=s.height/a.scalingFactor,d=s.depth/a.scalingFactor,h=[];if(this.leftDelim&&h.push(this.bind(a,qo("open",this.leftDelim,u,d,a,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),s&&(o(s.children,this,i,u,d),h.push(s)),this.rightDelim){let I=this.containsCaret?" ML__contains-caret":"",$=this.rightDelim;$==="?"&&(i.smartFence?($=this.matchingRightDelim(),I+=" ML__smart-fence__close"):$="."),h.push(this.bind(a,qo("close",$,u,d,a,{isSelected:this.isSelected,classes:I+" ML__close",mode:this.mode,style:this.style})))}let p=this.variant==="mleft...mright";const y=this.leftSibling;y&&(!p&&y.isFunction&&(p=!0),!p&&y.type==="subsup"&&((n=y.leftSibling)!=null&&n.isFunction)&&(p=!0));const M=new Ue(h,{type:p?"close":"inner",classes:"left-right"});return M.setStyle("margin-top",`${-s.depth}em`),M.setStyle("height",`${s.height+s.depth}em`),this.caret&&(M.caret=this.caret),this.bind(i,M.wrap(i))}};function o(e,t,r,n,i){if(e)for(let a=0;a<e.length;a++){const s=e[a];s.type==="middle"?(e[a]=t.bind(r,qo("inner",s.value,n,i,r,{isSelected:t.isSelected})),e[a].caret=s.caret,e[a].isSelected=s.isSelected,e[a].cssId=s.cssId,e[a].htmlData=s.htmlData,e[a].htmlStyle=s.htmlStyle,e[a].attributes=s.attributes,e[a].cssProperties=s.cssProperties):s.children&&o(s.children,t,r,n,i)}}var l=class up extends _e{constructor(t,r){var n;super({type:"macro",command:t,style:r.style}),this.body=r.body,r.captureSelection===void 0?r.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=r.captureSelection,this.macroArgs=r.args,this.expand=(n=r.expand)!=null?n:!1}static fromJson(t){return new up(t.command,t)}toJson(){const t=super.toJson();return this.expand&&(t.expand=!0),this.captureSelection!==void 0&&(t.captureSelection=this.captureSelection),this.macroArgs&&(t.args=this.macroArgs),t}_serialize(t){var r;return t.expandMacro&&this.expand?this.bodyToLatex(t):this.command+((r=this.macroArgs)!=null?r:"")}render(t){const r=_e.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}},c=class dp extends _e{constructor(){super({type:"macro-argument"})}static fromJson(t){return new dp}toJson(){return super.toJson()}_serialize(t){return""}render(t){return null}},f=class fp extends _e{constructor(t,r,n=!1,i,a){var s;super({type:"prompt",mode:(s=a==null?void 0:a.mode)!=null?s:"math",style:a==null?void 0:a.style,command:"\\placeholder"}),this.body=i,this.correctness=r,this.placeholderId=t,this.locked=n,this.captureSelection=this.locked}static fromJson(t){return new fp(t.placeholderId,t.correctness,t.locked,t.body,t)}toJson(){const t=super.toJson();return this.placeholderId&&(t.placeholderId=this.placeholderId),this.body||delete t.body,this.body&&(t.body=this.body.filter(r=>r.type!=="first").map(r=>r.toJson())),this.correctness&&(t.correctness=this.correctness),t.locked=this.locked,t}render(t){const r=new Dr({parent:t}),n=r.getRegisterAsEm("fboxsep"),i=n,a=n,s=_e.createBox(t,this.body);if(!s)return null;s.height||(s.height=r.metrics.xHeight),s.setStyle("vertical-align",-s.height,"em"),this.correctness==="correct"?s.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&s.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const u=new Ue(s,{type:"ord"});u.setStyle("display","inline-block"),u.setStyle("height",s.height+s.depth,"em"),u.setStyle("vertical-align",-a,"em");let d="ML__prompt ";this.locked?d+=" ML__lockedPromptBox ":d+=" ML__editablePromptBox ",this.correctness==="correct"?d+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(d+=" ML__incorrectPromptBox "),this.containsCaret&&(d+=" ML__focusedPromptBox ");const h=new Ue(null,{classes:d,attributes:{part:"prompt"}});h.height=u.height+a,h.depth=u.depth+a,h.width=u.width+2*i,h.setStyle("box-sizing","border-box"),h.setStyle("position","absolute"),h.setStyle("height",u.height+u.depth+2*a,"em"),i===0&&h.setStyle("width","100%"),i!==0&&(h.setStyle("width",`calc(100% + ${2*i}em)`),h.setStyle("top",n,"em"),h.setStyle("left",-i,"em")),(!this.body||this.body.length===1)&&(h.width=3*i,h.setStyle("width",`calc(100% + ${3*i}em)`),h.setStyle("left",-1.5*i,"em"));let p="";this.correctness==="incorrect"&&(p+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),p&&(h.svgOverlay=p);const y=new Ue([h,u],{classes:"ML__prompt-atom"});return y.setStyle("position","relative"),y.setStyle("display","inline-block"),y.setStyle("line-height",0),y.height=u.height+a+.2,y.depth=u.depth+a,y.left=i,y.right=i,y.setStyle("height",u.height+a,"em"),y.setStyle("top",u.depth-u.height,"em"),y.setStyle("vertical-align",u.depth+a,"em"),y.setStyle("margin-left",.5,"em"),y.setStyle("margin-right",.5,"em"),this.caret&&(y.caret=this.caret),this.bind(r,this.attachSupsub(t,{base:y}))}_serialize(t){var r;const n=(r=this.bodyToLatex(t))!=null?r:"";if(t.skipPlaceholders)return n;let i="\\placeholder";return this.placeholderId&&(i+=`[${this.placeholderId}]`),this.correctness==="correct"?i+="[correct]":this.correctness==="incorrect"&&(i+="[incorrect]"),this.locked&&(i+="[locked]"),an(i,n)}},m=class hp extends _e{constructor(t){super({type:"subsup",style:t==null?void 0:t.style}),this.subsupPlacement="auto"}static fromJson(t){const r=new hp(t);for(const n of Go)t[n]&&r.setChildren(t[n],n);return r}render(t){var r;const n=new Dr({parent:t,isPhantom:!0}),i=this.leftSibling,a=(r=i.render(n))!=null?r:new Ue(null),s=new Ue(null);return s.height=a.height,s.depth=a.depth,this.attachSupsub(t,{base:s,isCharacterBox:i.isCharacterBox(),type:"ignore"})}_serialize(t){return this.supsubToLatex(t)}};function g(e){return e?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1}var v=class{constructor(e,t,r){this.errors=[],this.index=0,this.endCount=0;var n,i,a,s;r!=null||(r={}),this.tokens=e,this.context=t instanceof Dr&&!(r!=null&&r.parseMode)&&!r.mathstyle?t:new Dr({from:t,mathstyle:r.mathstyle},r.style),this.args=(n=r.args)!=null?n:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(i=r.style)!=null?i:{},parseMode:(a=r.parseMode)!=null?a:"math",mathstyle:(s=r.mathstyle)!=null?s:"displaystyle",tabular:!1}}beginContext(e){var t,r,n;const i=this.parsingContext,a={parent:i,mathlist:[],style:S({},i.style),parseMode:(t=e==null?void 0:e.mode)!=null?t:i.parseMode,mathstyle:(r=e==null?void 0:e.mathstyle)!=null?r:i.mathstyle,tabular:(n=e==null?void 0:e.tabular)!=null?n:!1};this.parsingContext=a}endContext(){this.parsingContext=this.parsingContext.parent}onError(e){this.errors.push(S({before:Eo(this.tokens.slice(this.index,this.index+10)),after:Eo(this.tokens.slice(Math.max(0,this.index-10),this.index))},e))}get mathlist(){return this.parsingContext.mathlist}set mathlist(e){this.parsingContext.mathlist=e}get parseMode(){return this.parsingContext.parseMode}set parseMode(e){this.parsingContext.parseMode=e}get tabularMode(){return this.parsingContext.tabular}get style(){let e=this.parsingContext;for(;e;){if(e.style)return S({},e.style);e=e.parent}return{}}set style(e){this.parsingContext.style=e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}match(e){return this.tokens[this.index]===e?(this.index++,!0):!1}lastSubsupAtom(){let e;return this.mathlist.length>0&&(e=this.mathlist[this.mathlist.length-1],e.type==="subsup"||e.subsupPlacement!==void 0)||(e=new m({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<this.tokens.length&&this.tokens[t].startsWith("\\")){const r=de(this.tokens[t],this.parseMode);return!r||r.definitionType==="symbol"||r.ifMode&&!r.ifMode.includes(this.parseMode)?!1:(e=r.infix)!=null?e:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const e=this.peek();return e!=="\\\\"&&e!=="\\cr"&&e!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var e;const t=(e=this.args)==null?void 0:e.call(this,"?");return t?b(t,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Ta({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(e){const t=this.index;let r=this.end(),n="";for(;!r;){const a=this.get();g(a)?(n+=a,r=this.end()||n.length>=e.length):r=!0}const i=e.toUpperCase()===n.toUpperCase();return i||(this.index=t),i}scanString(){let e="";for(;!this.end();){const t=this.peek();if(t==="]")return e;if(t==="<space>")e+=" ";else if(t.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),e+=t.substring(1);else if(g(t))e+=t;else return e;this.next()}return e}scanBalancedString(){let e="",t=this.end(),r=1;for(;!t;){const n=this.get();n==="<space>"?e+=" ":n==="<{>"?(e+="{",r+=1):n==="<}>"?(r-=1,r>0?e+="}":this.index-=1):n==="<$>"?e+="$":n==="<$$>"?e+="$$":e+=n,t=r===0||this.end()}return e}scanLiteralGroup(){var e;if(!this.match("<{>"))return"";let t="",r=1;for(;r>0&&!this.end();){const n=this.get();n==="<}>"?(r-=1,r>0&&(t+="}")):n==="<{>"?(r+=1,t+="{"):(/\\[a-zA-Z]+$/.test(t)&&/^[a-zA-Z]/.test(n)&&(t+=" "),t+=(e={"<space>":" ","<$$>":"$$","<$>":"$"}[n])!=null?e:n)}return t}scanNumber(e=!0){var t,r;let n=!1,i=this.peek();for(;i==="<space>"||i==="+"||i==="-";)this.get(),i==="-"&&(n=!n),i=this.peek();e=!!e;let a=10,s=/\d/;if(this.match("'"))a=8,s=/[0-7]/,e=!0;else if(this.match('"'))a=16,s=/[\dA-F]/,e=!0;else if(this.match("x"))a=16,s=/[\dA-Fa-f]/,e=!0;else if(this.match("`"))return i=this.get(),i?i.length===2&&i.startsWith("\\")?{number:(n?-1:1)*((t=i.codePointAt(1))!=null?t:0),base:"alpha"}:{number:(n?-1:1)*((r=i.codePointAt(0))!=null?r:0),base:"alpha"}:null;let u="";for(;this.hasPattern(s);)u+=this.get();if(!e&&(this.match(".")||this.match(",")))for(u+=".";this.hasPattern(s);)u+=this.get();const d=e?Number.parseInt(u,a):Number.parseFloat(u);return Number.isNaN(d)?null:{number:n?-d:d,base:a===16?"hexadecimal":a===8?"octal":"decimal"}}scanRegister(){var e;const t=this.index,r=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return r;let n=!1;if(r===null)for(;;){const a=this.peek();if(a==="-")n=!n;else if(a!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const a=this.get();return a.startsWith("\\")?r?{register:a,global:!0,factor:(n?-1:1)*r.number}:n?{register:a,global:!0,factor:-1}:{register:a,global:!0}:(this.index=t,null)}let i=this.get();return i!=null&&i.startsWith("\\")?(i=i.substring(1),this.context.registers[i]?!n||r!==null?{register:i,factor:(n?-1:1)*((e=r==null?void 0:r.number)!=null?e:1)}:{register:i}:(this.index=t,null)):(this.index=t,null)}scanValue(){const e=this.scanRegister();if(e)return e;const t=this.index,r=this.scanGlueOrDimen();if(r&&("unit"in r||"glue"in r&&"unit"in r.glue))return r;this.index=t;const n=this.scanNumber();if(n)return n;if(this.end()||!g(this.peek()))return null;const i=this.scanString();return i.length>0?{string:i}:null}scanDimen(){const e=this.scanNumber(!1);if(e===null)return null;const t=e.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let r;return this.matchKeyword("pt")?r="pt":this.matchKeyword("mm")?r="mm":this.matchKeyword("cm")?r="cm":this.matchKeyword("ex")?r="ex":this.matchKeyword("px")?r="px":this.matchKeyword("em")?r="em":this.matchKeyword("bp")?r="bp":this.matchKeyword("dd")?r="dd":this.matchKeyword("pc")?r="pc":this.matchKeyword("in")?r="in":this.matchKeyword("mu")&&(r="mu"),r?{dimension:t,unit:r}:{dimension:t}}scanGlueOrDimen(){const e=this.scanDimen();if(e===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return e;const t={glue:e};if(this.matchKeyword("plus")){const r=this.scanDimen();if(r)t.grow=r;else return t}if(this.skipWhitespace(),this.match("\\relax"))return t;if(this.skipWhitespace(),this.matchKeyword("minus")){const r=this.scanDimen();if(r)t.shrink=r;else return t}return!t.grow&&!t.shrink?e:t}scanColspec(){this.skipWhitespace();const e=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const t=this.get();t==="c"||t==="r"||t==="l"?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.scan(r=>r==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return e}scanModeSet(){let e;if(this.match("\\(")&&(e="textstyle"),!e&&this.match("\\[")&&(e="displaystyle"),!e)return null;this.beginContext({mode:"math",mathstyle:e});const t=this.scan(r=>r===(e==="displaystyle"?"\\]":"\\)"));return this.match(e==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const t=this.scan(r=>r===e);return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanEnvironment(){if(!this.match("\\begin"))return null;const e=this.scanArgument("string");if(!e)return null;const t=re(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const r=[];if(t.params)for(const u of t.params)if(u.isOptional)r.push(this.scanOptionalArgument(u.type));else{const d=this.scanArgument(u.type);d||this.onError({code:"missing-argument",arg:e}),r.push(d)}this.beginContext({tabular:t.tabular});const n=[],i=[];let a=[],s=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s&&this.match("\\end")&&(this.scanArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),s=!0),!s)if(this.matchColumnSeparator())a.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){a.push(this.mathlist),this.mathlist=[];let u=null;this.skipWhitespace(),this.match("[")&&(u=this.scanDimen(),this.skipWhitespace(),this.match("]")),i.push(u!=null?u:{dimension:0}),n.push(a),a=[]}else this.mathlist.push(...this.scan(u=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(u)));while(!s);return a.push(this.mathlist),a.length>0&&n.push(a),this.endContext(),t.createAtom(e,n,i,r)}scanExpression(){const e=this.mathlist;if(this.mathlist=[],this.parseExpression()){const t=this.mathlist;return this.mathlist=e,t}return this.mathlist=e,null}scan(e){this.beginContext(),e||(e=s=>s==="<}>");let t="",r=null,n=[],i=null;for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!t?(t=this.get(),r=de(t,"math"),r&&(n=this.scanArguments(r)[1]),i=this.mathlist,this.mathlist=[]):this.parseExpression();let a;return t?(console.assert(!!r),n.unshift(this.mathlist),i&&n.unshift(i),a=[r.createAtom({command:t,args:n,style:this.style,mode:this.parseMode})]):a=this.mathlist,this.endContext(),a}scanGroup(){const e=this.index;if(!this.match("<{>"))return null;const t=this.scan(n=>n==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const r=new kd(t,this.parseMode,this.style);return r.verbatimLatex=Eo(this.tokens.slice(e,this.index)),r}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let e=1;for(;!this.end()&&e!==0;)this.match("(")&&(e+=1),this.match(")")&&(e-=1),e!==0&&this.parseExpression();const t=new ln("",this.mathlist,{leftDelim:"(",rightDelim:e===0?")":"?"});return this.endContext(),t}scanDelim(){this.skipWhitespace();const e=this.peek();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;if(!g(e)&&!e.startsWith("\\"))return null;this.next();const t=de(e,"math");return t?t.definitionType==="function"&&t.ifMode&&!t.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:e}),null):t.definitionType==="symbol"&&(t.type==="mopen"||t.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(e)?e:(this.onError({code:"unexpected-delimiter",arg:e}),null):(this.onError({code:"unknown-command",arg:e}),null)}scanLeftRight(){var e;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new $o("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new $o("\\mright");let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const r=this.scanDelim();if(!r)return this.onError({code:"unexpected-delimiter"}),new $o(t==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(t);)this.parseExpression();const n=this.mathlist;this.endContext();const i=(e=this.scanDelim())!=null?e:".";return new ln(t==="\\right"?"left...right":"mleft...mright",n,{leftDelim:r,rightDelim:i,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let e=this.peek();if(e!=="^"&&e!=="_"&&e!=="'")return!1;const t=this.lastSubsupAtom();for(;e==="^"||e==="_"||e==="'";)this.match("'")?this.match("'")?t.addChild(new _e({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):t.addChild(new _e({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&t.addChildren(ce(this.scanArgument("expression")),e==="_"?"subscript":"superscript"),e=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const e=this.match("\\limits"),t=!e&&this.match("\\nolimits"),r=!t&&!e&&this.match("\\displaylimits");if(!e&&!t&&!r)return!1;const n=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return n===null?!1:(n.explicitSubsupPlacement=!0,e&&(n.subsupPlacement="over-under"),t&&(n.subsupPlacement="adjacent"),r&&(n.subsupPlacement="auto"),!0)}scanArguments(e){if(!(e!=null&&e.params))return[void 0,[]];let t;const r=[];let n=e.infix?2:0;for(;n<e.params.length;){const i=e.params[n];i.type==="rest"?r.push(this.scan(a=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(a))):i.isOptional?r.push(this.scanOptionalArgument(i.type)):i.type.endsWith("*")?t=i.type.slice(0,-1):r.push(this.scanArgument(i.type)),n+=1}return[t,r]}scanSymbolOrLiteral(){const e=this.peek();if(!e)return null;this.next();let t;if(g(e)){const r=Ai.createAtom(this.parseMode,e,S({},this.style));return r?[r]:null}if(t=this.scanMacro(e),t)return[t];if(e.startsWith("\\")){const r=de(e,this.parseMode);if(!r)return this.onError({code:"unknown-command",arg:e}),[new $o(e)];if(r.definitionType==="symbol"){const n=S({},this.style);r.variant&&(n.variant=r.variant),t=new _e({type:r.type,command:e,style:n,value:String.fromCodePoint(r.codepoint),mode:this.parseMode,verbatimLatex:e})}else{if(r.applyMode||r.applyStyle||r.infix)return this.onError({code:"invalid-command",arg:e}),[new $o(e)];r.createAtom&&(t=r.createAtom({command:e,args:[],style:this.style,mode:this.parseMode}))}}return t?[t]:null}scanArgument(e){var t;this.skipFiller();const r=this.parseMode;if(e==="auto"&&(e=r),!this.match("<{>")){if(e==="string")return this.scanString();if(e==="value")return this.scanValue();if(e==="delim")return(t=this.scanDelim())!=null?t:".";if(e==="expression")return this.scanExpression();if(e==="math"){e!==r&&this.beginContext({mode:"math"});const i=this.scanSymbolOrLiteral();return e!==r&&this.endContext(),i}if(e==="text"){e!==r&&this.beginContext({mode:"text"});const i=this.scanSymbolOrLiteral();return e!==r&&this.endContext(),i}return e==="balanced-string"||console.assert(!1),null}if(e==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const i=this.mathlist;return this.endContext(),{group:i}}if(e==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const i=this.mathlist;return this.endContext(),{group:i}}let n=null;if(e==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const i=this.mathlist;return this.endContext(),{group:i}}return e==="string"?n=this.scanString():e==="balanced-string"?n=this.scanBalancedString():e==="colspec"?n=this.scanColspec():e==="value"&&(n=this.scanValue()),this.skipUntilToken("<}>"),n}scanOptionalArgument(e){if(e=e==="auto"?this.parseMode:e,this.skipFiller(),!this.match("["))return null;let t=null;for(;!this.end()&&!this.match("]");)if(e==="string")t=this.scanString();else if(e==="value")t=this.scanValue();else if(e==="colspec")t=this.scanColspec();else if(e==="bbox"){const r={},n=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const i of n){const a=i.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(a)r.padding={dimension:parseInt(a[1]),unit:a[2]};else{const s=i.match(/^\s*border\s*:\s*(.*)/);s?r.border=s[1]:r.backgroundcolor={string:i}}}t=r}else e==="math"&&(this.beginContext({mode:"math"}),t=this.mathlist.concat(this.scan(r=>r==="]")),this.endContext());return t}scanSymbolOrCommand(e){var t,r,n;if(e==="\\placeholder"){const u=this.scanOptionalArgument("string"),d=this.scanOptionalArgument("math"),h=_e.serialize(d,{defaultMode:"math"});let p=[],y;!y&&h==="correct"?y="correct":!y&&h==="incorrect"?y="incorrect":h!==""&&(p=d);const M=this.scanOptionalArgument("string")==="locked",I=this.scanArgument("auto");let $;return I&&Array.isArray(I)&&I.length>0?$=I:I&&typeof I=="object"&&"group"in I?$=I.group:$=p,u?[new f(u,y,M,$!=null?$:p,{mode:this.parseMode,style:this.style})]:[new Ta({mode:this.parseMode,style:this.style})]}if(e==="\\renewcommand"||e==="\\newcommand"||e==="\\providecommand"||e==="\\def"){const u=this.index,d=this.scanLiteralGroup()||this.next();if(!d)return null;if(this.context.registers[d.substring(1)]){const h=this.scanArgument("string");h!==null&&(this.context.registers[d.substring(1)]=h);const p=Cr([e,Eo(this.tokens.slice(u,this.index))]);return[new _e({type:"text",value:"",verbatimLatex:p})]}}let i=this.scanMacro(e);if(i)return[i];const a=de(e,this.parseMode);if(!a)return this.parseMode==="text"?(/[a-zA-Z]/.test((t=this.peek())!=null?t:"")&&(e+=" "),[...e].map(u=>new _e({type:"text",value:u,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:e}),[new $o(e)]);const s=this.index;if(a.definitionType==="symbol"){const u=S({},this.style);a.variant&&(u.variant=a.variant),i=new _e({type:a.type,command:e,style:u,value:String.fromCodePoint(a.codepoint),mode:this.parseMode})}else{if(a.ifMode&&!a.ifMode.includes(this.parseMode))return[];const u=this.parseMode;a.applyMode&&(this.parseMode=a.applyMode);let d,h=[];if(a.parse?h=a.parse(this):[d,h]=this.scanArguments(a),this.parseMode=u,a.applyMode&&!a.applyStyle&&!a.createAtom)return ce(h[0]);if(a.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if(typeof a.createAtom=="function")i=a.createAtom({command:e,args:h,style:this.style,mode:this.parseMode}),d&&(i.body=ce(this.scanArgument(d)));else if(typeof a.applyStyle=="function"){const p=S(S({},this.style),a.applyStyle(e,h,this.context)),y=this.parseMode;if(a.applyMode&&(this.parseMode=a.applyMode),d){const M=this.style;this.style=p;const I=this.scanArgument(d);return this.style=M,this.parseMode=y,ce(I)}this.style=p}else i=new _e({type:"mord",command:(r=a.command)!=null?r:e,style:S({},this.style),value:e,mode:(n=a.applyMode)!=null?n:this.parseMode})}if(!i)return null;if(i instanceof _e&&i.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){const u=Cr([e,Eo(this.tokens.slice(s,this.index))]);u&&(i.verbatimLatex=u)}if(i.verbatimLatex===null&&(i.verbatimLatex=void 0),i.isFunction&&this.smartFence){const u=this.scanSmartFence();if(u)return[i,u]}return[i]}scanSymbolCommandOrLiteral(){const e=this.get();if(!e)return null;if(g(e)){const t=Ai.createAtom(this.parseMode,e,S({},this.style));if(!t)return null;if(t.isFunction&&this.smartFence){const r=this.scanSmartFence();if(r)return[t,r]}return[t]}return e.startsWith("\\")?this.scanSymbolOrCommand(e):e==="<space>"?this.parseMode==="text"?[new Ms(" "," ",this.style)]:null:(e==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null)}scanMacro(e){var t;const r=this.context.getMacro(e);if(!r)return null;const n=this.index,i=r.args,a={"?":(t=this.args)==null?void 0:t.call(this,"?")};for(let s=1;s<=i;s++){let u=this.scanLiteralGroup();if(!u){const d=this.index;this.scanExpression(),u=Eo(this.tokens.slice(d,this.index))}a[s]=u}return new l(e,{expand:r.expand,captureSelection:r.captureSelection,args:n===this.index?null:Eo(this.tokens.slice(n,this.index)),style:this.parsingContext.style,body:b(r.def,{context:this.context,parseMode:this.parseMode,args:s=>a[s],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var e,t,r,n;let i=(n=(r=(t=(e=this.scanEnvironment())!=null?e:this.scanModeShift())!=null?t:this.scanModeSet())!=null?r:this.scanGroup())!=null?n:this.scanLeftRight();if(i===null){if(this.parseSupSub()||this.parseLimits())return!0;i=this.scanSymbolCommandOrLiteral()}return i?(Array.isArray(i)?this.mathlist.push(...i):this.mathlist.push(i),!0):!1}};function b(e,t){var r,n,i,a;const s=(r=t==null?void 0:t.args)!=null?r:void 0,u=new v(ml(e,s),t==null?void 0:t.context,{args:s,mathstyle:(n=t==null?void 0:t.mathstyle)!=null?n:"displaystyle",parseMode:(i=t==null?void 0:t.parseMode)!=null?i:"math",style:(a=t==null?void 0:t.style)!=null?a:{}}),d=[];for(;!u.end();)d.push(...u.scan(()=>!1));return d}function D(e,t){var r;const n=new v(ml(e,null),t==null?void 0:t.context,{mathstyle:"displaystyle",parseMode:(r=t==null?void 0:t.parseMode)!=null?r:"math"});for(;!n.end();)n.scan();return n.errors}var T=class pp extends _e{constructor(t,r){super({type:"chem"},{command:t,mode:"math"});const n=E.go(w.go(r,t==="\\pu"?"pu":"ce"),!1);this.body=b(n),this._verbatimLatex=t+"{"+r+"}",this.arg=r,this.captureSelection=!0}static fromJson(t){return new pp(t.command,t.arg)}set verbatimLatex(t){}get verbatimLatex(){return this._verbatimLatex}toJson(){return _(S({},super.toJson()),{arg:this.arg})}render(t){const r=_e.createBox(t,this.body,{type:"inner"});return this.caret&&(r.caret=this.caret),this.bind(t,r)}_serialize(t){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};W(["ce","pu"],"{chemformula:balanced-string}",{createAtom:e=>{var t;return new T(e.command,(t=e.args[0])!=null?t:"")}});var w={go:function(e,t){if(!e)return[];t===void 0&&(t="ce");var r="0",n={};n.parenthesisLevel=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");for(var i,a=10,s=[];;){i!==e?(a=10,i=e):a--;var u=w.stateMachines[t],d=u.transitions[r]||u.transitions["*"];e:for(var h=0;h<d.length;h++){var p=w.patterns.match_(d[h].pattern,e);if(p){for(var y=d[h].task,M=0;M<y.action_.length;M++){var I;if(u.actions[y.action_[M].type_])I=u.actions[y.action_[M].type_](n,p.match_,y.action_[M].option);else if(w.actions[y.action_[M].type_])I=w.actions[y.action_[M].type_](n,p.match_,y.action_[M].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+y.action_[M].type_+")"];w.concatArray(s,I)}if(r=y.nextState||r,e.length>0){if(y.revisit||(e=p.remainder),!y.toContinue)break e}else return s}}if(a<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Object.prototype.toString.call(t)==="[object Array]")for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=w.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var r=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:e.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return w.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return w.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return w.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return w.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return w.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return w.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return w.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return w.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return w.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return w.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return w.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return w.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return w.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\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 w.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return w.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return w.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return w.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 w.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return w.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return w.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return w.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return w.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return w.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 r=w.patterns.findObserveGroups(e,"","$","$","");return r&&(t=r.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,r,n,i,a,s,u,d,h){var p=function(ee,De){if(typeof De=="string")return ee.indexOf(De)!==0?null:De;var Je=ee.match(De);return Je?Je[0]:null},y=function(ee,De,Je){for(var Te=0;De<ee.length;){var yt=ee.charAt(De),Rt=p(ee.substr(De),Je);if(Rt!==null&&Te===0)return{endMatchBegin:De,endMatchEnd:De+Rt.length};if(yt==="{")Te++;else if(yt==="}"){if(Te===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];Te--}De++}return Te>0,null},M=p(e,t);if(M===null||(e=e.substr(M.length),M=p(e,r),M===null))return null;var I=y(e,M.length,n||i);if(I===null)return null;var $=e.substring(0,n?I.endMatchEnd:I.endMatchBegin);if(a||s){var se=this.findObserveGroups(e.substr(I.endMatchEnd),a,s,u,d);if(se===null)return null;var Ze=[$,se.match_];return{match_:h?Ze.join(""):Ze,remainder:se.remainder}}else return{match_:$,remainder:e.substr(I.endMatchEnd)}},match_:function(e,t){var r=w.patterns.patterns[e];if(r===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof r=="function")return w.patterns.patterns[e](t);var n=t.match(r);if(n){var i;return n[2]?i=[n[1],n[2]]:n[1]?i=n[1]:i=n[0],{match_:i,remainder:t.substr(n[0].length)}}return null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,r){return{type_:r}},"insert+p1":function(e,t,r){return{type_:r,p1:t}},"insert+p1+p2":function(e,t,r){return{type_:r,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return w.go(t,"text")},"{text}":function(e,t){var r=["{"];return w.concatArray(r,w.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return w.go(t,"tex-math")},"tex-math tight":function(e,t){return w.go(t,"tex-math tight")},bond:function(e,t,r){return{type_:"bond",kind_:r||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return w.go(t)},"1/2":function(e,t){var r=[];t.match(/^[+\-]/)&&(r.push(t.substr(0,1)),t=t.substr(1));var n=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return n[1]=n[1].replace(/\$/g,""),r.push({type_:"frac",p1:n[1],p2:n[2]}),n[3]&&(n[3]=n[3].replace(/\$/g,""),r.push({type_:"tex-math",p1:n[3]})),r},"9,9":function(e,t){return w.go(t,"9,9")}},createTransitions:function(e){var t,r,n,i,a={};for(t in e)for(r in e[t])for(n=r.split("|"),e[t][r].stateArray=n,i=0;i<n.length;i++)a[n[i]]=[];for(t in e)for(r in e[t])for(n=e[t][r].stateArray||[],i=0;i<n.length;i++){var s=e[t][r];if(s.action_){s.action_=[].concat(s.action_);for(var u=0;u<s.action_.length;u++)typeof s.action_[u]=="string"&&(s.action_[u]={type_:s.action_[u]})}else s.action_=[];for(var d=t.split("|"),h=0;h<d.length;h++)if(n[i]==="*")for(var p in a)a[p].push({pattern:d[h],task:s});else a[n[i]].push({pattern:d[h],task:s})}return a},stateMachines:{}};w.stateMachines={ce:{transitions:w.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"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 r;if((e.d||"").match(/^[0-9]+$/)){var n=e.d;e.d=void 0,r=this.output(e),e.b=n}else r=this.output(e);return w.actions["o="](e,t),r},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var r=[];return w.concatArray(r,this.output(e)),w.concatArray(r,w.actions.bond(e,t,"-")),r}else e.d=t},"- after o/d":function(e,t,r){var n=w.patterns.match_("orbital",e.o||""),i=w.patterns.match_("one lowercase greek letter $",e.o||""),a=w.patterns.match_("one lowercase latin letter $",e.o||""),s=w.patterns.match_("$one lowercase latin letter$ $",e.o||""),u=t==="-"&&(n&&n.remainder===""||i||a||s);u&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!n&&a&&(e.o="$"+e.o+"$");var d=[];return u?(w.concatArray(d,this.output(e)),d.push({type_:"hyphen"})):(n=w.patterns.match_("digits",e.d||""),r&&n&&n.remainder===""?(w.concatArray(d,w.actions["d="](e,t)),w.concatArray(d,this.output(e))):(w.concatArray(d,this.output(e)),w.concatArray(d,w.actions.bond(e,t,"-")))),d},"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:w.go(t,"o")}},comma:function(e,t){var r=t.replace(/\s*$/,""),n=r!==t;return n&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(e,t,r){var n;if(!e.r)n=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!r||(e.sb&&n.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&r!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType==="kv"&&w.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&e.dType==="kv"&&!e.q&&(e.dType=void 0),n.push({type_:"chemfive",a:w.go(e.a,"a"),b:w.go(e.b,"bd"),p:w.go(e.p,"pq"),o:w.go(e.o,"o"),q:w.go(e.q,"pq"),d:w.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var i;e.rdt==="M"?i=w.go(e.rd,"tex-math"):e.rdt==="T"?i=[{type_:"text",p1:e.rd||""}]:i=w.go(e.rd);var a;e.rqt==="M"?a=w.go(e.rq,"tex-math"):e.rqt==="T"?a=[{type_:"text",p1:e.rq||""}]:a=w.go(e.rq),n={type_:"arrow",r:e.r,rd:i,rq:a}}for(var s in e)s!=="parenthesisLevel"&&s!=="beginsWithBond"&&delete e[s];return n},"oxidation-output":function(e,t){var r=["{"];return w.concatArray(r,w.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:w.go(t[0]),p2:w.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:w.go(t[0]),p2:w.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:w.go(t[0]),p2:w.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:w.go(t[0]),p2:w.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:w.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,r){return{type_:"operator",kind_:r||t}}}},a:{transitions:w.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:w.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:w.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 r in e)delete e[r];return t}}}},pq:{transitions:w.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:w.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:w.go(t[1],"pq")}}}},bd:{transitions:w.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:w.go(t[1],"bd")}}}},oxidation:{transitions:w.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:w.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 r in e)delete e[r];return t}}}},"tex-math tight":{transitions:w.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 r in e)delete e[r];return t}}}},"9,9":{transitions:w.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:w.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 r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),t[1]&&(w.concatArray(r,w.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?w.concatArray(r,w.go(t[2],"pu-9,9")):r.push(t[2])),(t[3]||t[4])&&(t[3]==="e"||t[4]==="*"?r.push({type_:"cdot"}):r.push({type_:"times"}))),t[5]&&r.push("10^{"+t[5]+"}"),r},"number^":function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),w.concatArray(r,w.go(t[1],"pu-9,9")),r.push("^{"+t[2]+"}"),r},operator:function(e,t,r){return{type_:"operator",kind_:r||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,r=w.patterns.match_("{(...)}",e.d||"");r&&r.remainder===""&&(e.d=r.match_);var n=w.patterns.match_("{(...)}",e.q||"");if(n&&n.remainder===""&&(e.q=n.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 i={d:w.go(e.d,"pu"),q:w.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:i.d,p2:i.q}:(t=i.d,i.d.length>1||i.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),w.concatArray(t,i.q))}else t=w.go(e.d,"pu-2");for(var a in e)delete e[a];return t}}},"pu-2":{transitions:w.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 r=w.patterns.match_("{(...)}",e.rm||"");r&&r.remainder===""?t=w.go(r.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var n in e)delete e[n];return t}}},"pu-9,9":{transitions:w.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 r=e.text_.length%3;r===0&&(r=3);for(var n=e.text_.length-3;n>0;n-=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,r)),t.reverse()}else t.push(e.text_);for(var i in e)delete e[i];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var r=e.text_.length-3,n=0;n<r;n+=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(n))}else t.push(e.text_);for(var i in e)delete e[i];return t}}}};var E={go:function(e,t){if(!e)return"";for(var r="",n=!1,i=0;i<e.length;i++){var a=e[i];typeof a=="string"?r+=a:(r+=E._go2(a),a.type_==="1st-level escape"&&(n=!0))}return!t&&!n&&r&&(r="{"+r+"}"),r},_goInner:function(e){return e&&E.go(e,!0)},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var r={a:E._goInner(e.a),b:E._goInner(e.b),p:E._goInner(e.p),o:E._goInner(e.o),q:E._goInner(e.q),d:E._goInner(e.d)};r.a&&(r.a.match(/^[+\-]/)&&(r.a="{"+r.a+"}"),t+=r.a+"\\,"),(r.b||r.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(r.b||"")+"}}_{\\hphantom{"+(r.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(r.b||"")+"}}",t+="_{\\vphantom{2}\\llap{\\smash[t]{"+(r.p||"")+"}}}"),r.o&&(r.o.match(/^[+\-]/)&&(r.o="{"+r.o+"}"),t+=r.o),e.dType==="kv"?((r.d||r.q)&&(t+="{\\vphantom{X}}"),r.d&&(t+="^{"+r.d+"}"),r.q&&(t+="_{\\smash[t]{"+r.q+"}}")):e.dType==="oxidation"?(r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"),r.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+r.q+"}}")):(r.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+r.q+"}}"),r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"));break;case"rm":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+E._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+E._goInner(e.p1);break;case"bond":if(t=E._getBond(e.kind_),!t)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var n="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+n+"}{"+n+"}{"+n+"}{"+n+"}";break;case"pu-frac":var i="\\frac{"+E._goInner(e.p1)+"}{"+E._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+i+"}{"+i+"}{"+i+"}{"+i+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+E._goInner(e.p1)+"}{"+E._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+E._goInner(e.p1)+"}{"+E._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+E._goInner(e.p1)+"}{"+E._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+E._goInner(e.p1)+"}_{"+E._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+E._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var a={rd:E._goInner(e.rd),rq:E._goInner(e.rq)},s=E._getArrow(e.r);a.rd||a.rq?e.r==="<=>"||e.r==="<=>>"||e.r==="<<=>"||e.r==="<-->"?(s="\\long"+s,a.rd&&(s="\\overset{"+a.rd+"}{"+s+"}"),a.rq&&(e.r==="<-->"?s="\\underset{\\lower2mu{"+a.rq+"}}{"+s+"}":s="\\underset{\\lower6mu{"+a.rq+"}}{"+s+"}"),s=" {}\\mathrel{"+s+"}{} "):(a.rq&&(s+="[{"+a.rq+"}]"),s+="{"+a.rd+"}",s=" {}\\mathrel{\\x"+s+"}{} "):s=" {}\\mathrel{\\long"+s+"}{} ",t=s;break;case"operator":t=E._getOperator(e.kind_);break;case"1st-level escape":t=e.p1+" ";break;case"space":t=" ";break;case"entitySkip":t="~";break;case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";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"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.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."]}}};function B(e){}function P(e){}var Q=class mp extends _e{constructor(t){super(_(S({},t),{type:"delim"})),this.value=t.delim,this.size=t.size}static fromJson(t){return new mp(t)}toJson(){return _(S({},super.toJson()),{delim:this.value,size:this.size})}render(t){return new Ue(this.value,{type:"middle"})}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=de(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):an(this.command,this.value)}},We=class gp extends _e{constructor(t){super(_(S({},t),{type:"sizeddelim",value:t.delim})),this.delimType=t.delimType,this.size=t.size}static fromJson(t){return new gp(t)}toJson(){return _(S({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(t){let r=K0(this.value,this.size,t,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return r?(r=this.bind(t,r),this.caret&&(r.caret=this.caret),r):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=de(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):an(this.command,this.value)}},qe=class vp extends _e{constructor(t,r,n,i){var a,s;super({type:"enclose",command:t,style:i.style}),this.body=r,this.backgroundcolor=i.backgroundcolor,n.updiagonalarrow&&(n.updiagonalstrike=!1),n.box&&(n.left=!1,n.right=!1,n.bottom=!1,n.top=!1),this.notation=n,this.shadow=(a=i.shadow)!=null?a:"none",this.strokeWidth=(s=i.strokeWidth)!=null?s:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=i.strokeStyle,this.svgStrokeStyle=i.svgStrokeStyle,this.strokeColor=i.strokeColor,this.borderStyle=i.borderStyle,this.padding=i.padding,this.captureSelection=!1}static fromJson(t){return new vp(t.command,t.body,t.notation,t)}toJson(){return _(S({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(t){var r;if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=de(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);let i=(r=this.command)!=null?r:"";if(this.command==="\\enclose"){i+="{"+Object.keys(this.notation).join(" ")+"}";let a="",s="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(a+=s+'mathbackground="'+this.backgroundcolor+'"',s=","),this.shadow&&this.shadow!=="auto"&&(a+=s+'shadow="'+this.shadow+'"',s=","),this.strokeWidth||this.strokeStyle!=="solid"?(a+=s+this.borderStyle,s=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(a+=s+'mathcolor="'+this.strokeColor+'"',s=","),a&&(i+=`[${a}]`)}return an(i,this.bodyToLatex(t))}render(t){const r=new Dr({parent:t},this.style),n=_e.createBox(r,this.body);if(!n)return null;const i=pt(this.borderStyle),a=r.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});n.setStyle("position","relative"),n.setStyle("display","inline-block"),n.setStyle("top",a,"em"),n.setStyle("height",n.height+n.depth,"em"),n.setStyle("width",n.width,"em");const s=new Ue(null,{classes:"ML__notation"});let u=n.height+n.depth+2*a;const d=n.width+2*a;let h="";if(this.notation.horizontalstrike&&(h+=this.line(3,50,97,50)),this.notation.verticalstrike&&(h+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(h+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(h+=this.line(3,3,97,97)),this.notation.updiagonalarrow){h+=this.line(a.toString(),(a+n.depth+n.height).toString(),(a+n.width).toString(),a.toString());const $=.03*Math.sqrt(d*d+u*u)*1,se=n.width*$,Ze=(n.depth+n.height)*$,ee=a+n.width;let De=a;De+Ze-.4*se<0&&(De=.4*se-Ze),h+='<polygon points="',h+=`${ee},${De} ${ee-se-.4*Ze},${De+Ze-.4*se} `,h+=`${ee-.7*se},${De+.7*Ze} ${ee-se+.4*Ze},${De+Ze+.4*se} `,h+=`${ee},${De}`,h+=`" stroke='none' fill="${this.strokeColor}"`,h+="/>"}let p=0;if(this.notation.phasorangle){const M=It(r),I=(n.height+n.depth+2*M+a).toString(),$=(n.height+n.depth)/2;h+=this.line(a.toString(),I,(a+$+n.width).toString(),I),h+=this.line(a.toString(),I,(a+$).toString(),(a-M).toString()),u+=M,p=$,n.left+=u/2-a}if(this.notation.longdiv){const M=It(r);u+=M,h+=this.line(a.toString(),a.toString(),(a+n.width).toString(),a.toString());const I=.3;p=I+M,n.left+=I+M,n.setTop(a+M),h+='<path d="',h+=`M ${a} ${a} a${I} ${(n.depth+n.height+2*M)/2}, 0, 1, 1, 0 ${n.depth+n.height+2*M} "`,h+=` stroke-width="${kt(r)}" stroke="${this.strokeColor}" fill="none"`,h+="/>"}if(s.width=n.width+2*a+p,s.height=n.height+a,s.depth=n.depth+a,s.setStyle("box-sizing","border-box"),s.setStyle("left",`calc(-${i} / 2 )`),s.setStyle("height",`${Math.floor(100*u)/100}em`),s.setStyle("top",`calc(${i} / 2 )`),this.backgroundcolor&&s.setStyle("background-color",this.backgroundcolor),this.notation.box&&s.setStyle("border","1px solid red"),this.notation.actuarial&&(s.setStyle("border-top",this.borderStyle),s.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(s.setStyle("border-bottom",this.borderStyle),s.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(s.setStyle("border-radius","8px"),s.setStyle("border",this.borderStyle)),this.notation.circle&&(s.setStyle("border-radius","50%"),s.setStyle("border",this.borderStyle)),this.notation.top&&s.setStyle("border-top",this.borderStyle),this.notation.left&&s.setStyle("border-left",this.borderStyle),this.notation.right&&s.setStyle("border-right",this.borderStyle),this.notation.bottom&&s.setStyle("border-bottom",this.borderStyle),h){let M="";this.shadow==="auto"&&(M+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(M+=`filter: drop-shadow(${this.shadow})`),M+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,M+=' stroke-linecap="round"',this.svgStrokeStyle&&(M+=` stroke-dasharray="${this.svgStrokeStyle}"`),s.svgStyle=M,s.svgOverlay=h}const y=new Ue([s,n]);return y.setStyle("position","relative"),y.setStyle("vertical-align",a,"em"),y.setStyle("height",`${Math.floor(100*(n.height+n.depth+2*a))/100}em`),y.setStyle("display","inline-block"),y.height=s.height,y.depth=s.depth,y.width=s.width-2*a,y.left=a,y.right=a,this.caret&&(y.caret=this.caret),y.wrap(r)}line(t,r,n,i){return`<line x1="${rt(t)}" y1="${rt(r)}" x2="${rt(n)}" y2="${rt(i)}" vector-effect="non-scaling-stroke"></line>`}};function rt(e){return typeof e=="number"?`${Math.floor(100*e)/100}%`:e}function pt(e){if(!e)return"1px";const t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1]}function kt(e){return(Math.floor(100*e.metrics.sqrtRuleThickness/e.scalingFactor)/100/10).toString()+"em"}function It(e){const t=e.isDisplayStyle?$a:e.metrics.defaultRuleThickness;return e.metrics.defaultRuleThickness+e.scalingFactor*t/4}var lr=class bp extends _e{constructor(t,r,n){var i,a;super(_(S({},n),{type:"genfrac",displayContainsHighlight:!0})),this.above=t,this.below=r,this.hasBarLine=(i=n==null?void 0:n.hasBarLine)!=null?i:!0,this.continuousFraction=(a=n==null?void 0:n.continuousFraction)!=null?a:!1,this.numerPrefix=n==null?void 0:n.numerPrefix,this.denomPrefix=n==null?void 0:n.denomPrefix,this.mathstyleName=n==null?void 0:n.mathstyleName,this.leftDelim=n==null?void 0:n.leftDelim,this.rightDelim=n==null?void 0:n.rightDelim,this.fractionNavigationOrder=n==null?void 0:n.fractionNavigationOrder}static fromJson(t){return new bp(t.above,t.below,t)}toJson(){const t={};return this.continuousFraction&&(t.continuousFraction=!0),this.numerPrefix&&(t.numerPrefix=this.numerPrefix),this.denomPrefix&&(t.denomPrefix=this.denomPrefix),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),this.hasBarLine||(t.hasBarLine=!1),this.mathstyleName&&(t.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(t.fractionNavigationOrder=this.fractionNavigationOrder),S(S({},super.toJson()),t)}get children(){if(this._children)return this._children;const t=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const r of this.below)t.push(...r.children),t.push(r);for(const r of this.above)t.push(...r.children),t.push(r)}else{for(const r of this.above)t.push(...r.children),t.push(r);for(const r of this.below)t.push(...r.children),t.push(r)}return this._children=t,t}render(t){var r,n;const i=new Dr({parent:t,mathstyle:this.mathstyleName},this.style),a=i.metrics,s=new Dr({parent:i,mathstyle:this.continuousFraction?"":"numerator"},this.style),u=this.numerPrefix?new Ue([new Ue(this.numerPrefix),_e.createBox(s,this.above)],{isTight:s.isTight,type:"ignore"}):(r=_e.createBox(s,this.above,{type:"ignore"}))!=null?r:new Ue(null,{type:"ignore"}),d=new Dr({parent:i,mathstyle:this.continuousFraction?"":"denominator"},this.style),h=this.denomPrefix?new Ue([new Ue(this.denomPrefix),_e.createBox(d,this.below,{type:"ignore"})]):(n=_e.createBox(d,this.below,{type:"ignore"}))!=null?n:new Ue(null,{type:"ignore"}),p=this.hasBarLine?a.defaultRuleThickness:0;let y,M=0,I;i.isDisplayStyle?(y=s.metrics.num1,M=p>0?3*p:7*p,I=d.metrics.denom1):(p>0?(y=s.metrics.num2,M=p):(y=s.metrics.num3,M=3*a.defaultRuleThickness),I=d.metrics.denom2);const $=[];this.isSelected&&$.push("ML__selected");const se=u.depth,Ze=h.height;let ee;if(p<=0){const Dt=y-se-(Ze-I);Dt<M&&(y+=(M-Dt)/2,I+=(M-Dt)/2),ee=new An({individualShift:[{box:u,shift:-y,classes:[...$,"ML__center"]},{box:h,shift:I,classes:[...$,"ML__center"]}]}).wrap(i)}else{const Dt=new Ue(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});Dt.softWidth=Math.max(u.width,h.width),Dt.height=p/2,Dt.depth=p/2;const Ar=yn+p/2;y<M+se+Ar&&(y=M+se+Ar);const Xr=yn-p/2;I<M+Ze-Xr&&(I=M+Ze-Xr),ee=new An({individualShift:[{box:h,shift:I,classes:[...$,"ML__center"]},{box:Dt,shift:-Xr,classes:$},{box:u,shift:-y,classes:[...$,"ML__center"]}]}).wrap(i)}const De=i.isDisplayStyle?a.delim1:a.delim2,Je=this.leftDelim?this.bind(t,Al("open",this.leftDelim,De,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Qa(i,"open");let Te=null;this.continuousFraction?Te=new Ue(null,{type:"close"}):this.rightDelim?Te=this.bind(t,Al("close",this.rightDelim,De,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Te=Qa(i,"close");const yt=new Ue([Je,ee,Te],{isTight:i.isTight,type:"inner",classes:"mfrac"}),Rt=this.bind(t,yt);return this.caret&&(Rt.caret=this.caret),this.attachSupsub(t,{base:Rt})}},Pt=class yp extends _e{constructor(t,r){var n;super({type:"latex",value:t,mode:"latex"}),this.isSuggestion=(n=r==null?void 0:r.isSuggestion)!=null?n:!1,this.isError=!1}static fromJson(t){const r=new yp(t.value);return t.isSuggestion&&(r.isSuggestion=!0),t.isError&&(r.isError=!0),r}toJson(){const t={};return this.isSuggestion&&(t.isSuggestion=!0),this.isError&&(t.isError=!0),S({type:"latex",value:this.value},t)}get computedStyle(){return{}}render(t){const r=new Ue(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}},vr=class xp extends _e{constructor(t){super({type:"latexgroup",mode:"latex"}),this.body=[...t].map(r=>new Pt(r)),this.skipBoundary=!1}static fromJson(t){return new xp("")}toJson(){return super.toJson()}render(t){const r=_e.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}_serialize(t){var r,n;return(n=(r=this.body)==null?void 0:r.map(i=>i.value).join(""))!=null?n:""}},pn=class wp extends _e{constructor(t,r){super(_(S({},r),{type:"extensible-symbol",isFunction:r==null?void 0:r.isFunction})),this.value=t,this.variant=r==null?void 0:r.variant,this.subsupPlacement=r==null?void 0:r.limits}static fromJson(t){return new wp(t.symbol,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.value&&(t.symbol=this.value),t}render(t){var r;const n=t.isDisplayStyle&&this.value!=="\\smallint",i=new Ue(this.value,{fontFamily:n?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(n?"large-op":"small-op"),type:"op",maxFontSize:t.scalingFactor,isSelected:this.isSelected});if(!i)return null;i.right=i.italic;const a=(i.height-i.depth)/2-yn*t.scalingFactor,s=i.italic;i.setTop(a);let u=i;if(this.superscript||this.subscript){const d=(r=this.subsupPlacement)!=null?r:"auto";u=d==="over-under"||d==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:i,baseShift:a,slant:s}):this.attachSupsub(t,{base:i})}return new Ue(this.bind(t,u),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=de(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=[];return n.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(t)),Cr(n)}},br=class Sp extends _e{constructor(t){const r=t.body;super(_(S({},t),{type:"overlap",body:typeof r=="string"?[new _e({value:r})]:r,style:t==null?void 0:t.style})),this.skipBoundary=!0,this.align=t==null?void 0:t.align,this.boxType=t==null?void 0:t.boxType}static fromJson(t){return new Sp(t)}toJson(){const t={};return this.align&&(t.align=this.align),this.boxType&&(t.boxType=this.boxType),S(S({},super.toJson()),t)}render(t){const r=_e.createBox(t,this.body,{classes:"inner"});return r?(this.caret&&(r.caret=this.caret),this.bind(t,new Ue([r,new Ue(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Kr=class _p extends _e{constructor(t){var r,n,i,a;super({type:"overunder",command:t.command,style:t.style,mode:t.mode,body:t.body,skipBoundary:(r=t.skipBoundary)!=null?r:!0}),this.subsupPlacement=t.supsubPlacement,this.svgAbove=t.svgAbove,this.svgBelow=t.svgBelow,this.svgBody=t.svgBody,this.above=t.above,this.below=t.below,this.boxType=(n=t.boxType)!=null?n:"ord",this.paddedBody=(i=t.paddedBody)!=null?i:!1,this.paddedLabels=(a=t.paddedLabels)!=null?a:!1}static fromJson(t){return new _p(t)}toJson(){const t=super.toJson();return this.skipBoundary||(t.skipBoundary=!1),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.svgAbove&&(t.svgAbove=this.svgAbove),this.svgBelow&&(t.svgBelow=this.svgBelow),this.svgBody&&(t.svgBody=this.svgBody),this.boxType!=="ord"&&(t.boxType=this.boxType),this.paddedBody&&(t.paddedBody=!0),this.paddedLabels&&(t.paddedLabels=!0),t}render(t){let r=this.svgBody?bl(this.svgBody):_e.createBox(t,this.body,{type:"ignore"});const n=new Dr({parent:t,mathstyle:"scriptstyle"},this.style);let i=null;this.svgAbove?i=bl(this.svgAbove):this.above&&(i=_e.createBox(n,this.above,{type:"ignore"}));let a=null;this.svgBelow?a=bl(this.svgBelow):this.below&&(a=_e.createBox(n,this.below,{type:"ignore"})),this.paddedBody&&(r=new Ue([Qa(t,"open"),r,Qa(t,"close")],{type:"ignore"}));let s=jn(t,{base:r,above:i,below:a,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return s?(this.subsupPlacement==="over-under"?s=this.attachLimits(t,{base:s,type:s.type}):s=this.attachSupsub(t,{base:s}),this.caret&&(s.caret=this.caret),this.bind(t,s)):null}};function jn(e,t){if(!t.base)return null;if(!t.above&&!t.below){const u=new Ue(t.base,{type:t.type});return u.setStyle("position","relative"),u}let r=0;t.above&&(r=e.metrics.bigOpSpacing5);let n=null;const i=t.base,a=0,s=["ML__center"];if(t.paddedAboveBelow&&s.push("ML__label_padding"),t.below&&t.above){const u=e.metrics.bigOpSpacing5+t.below.height+t.below.depth+i.depth+a;n=new An({bottom:u,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:i,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]})}else t.below?n=new An({top:i.height-a,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:i,classes:["ML__center"]}]}):t.above&&(n=new An({bottom:i.depth+a,children:[{box:i,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]}));return new Ue(n,{type:t.type})}var Ln=class Mp extends _e{constructor(t){var r,n,i,a;super(_(S({},t),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(r=t.isInvisible)!=null?r:!1,this.smashDepth=(n=t.smashDepth)!=null?n:!1,this.smashHeight=(i=t.smashHeight)!=null?i:!1,this.smashWidth=(a=t.smashWidth)!=null?a:!1}static fromJson(t){return new Mp(t)}toJson(){const t={};return this.isInvisible&&(t.isInvisible=!0),this.smashDepth&&(t.smashDepth=!0),this.smashHeight&&(t.smashHeight=!0),this.smashWidth&&(t.smashWidth=!0),S(S({},super.toJson()),t)}render(t){const r=new Dr({parent:t,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),_e.createBox(r,this.body,{classes:"inner"});const n=_e.createBox(this.isInvisible?r:t,this.body);if(!n)return null;if(this.smashWidth){const i=new Ue(null,{classes:"fix"});return new Ue([n,i],{classes:"rlap"}).wrap(t)}if(!this.smashHeight&&!this.smashDepth)return n;if(this.smashHeight&&(n.height=0),this.smashDepth&&(n.depth=0),n.children)for(const i of n.children)this.smashHeight&&(i.height=0),this.smashDepth&&(i.depth=0);return new An({firstBaseline:[{box:n}]},{type:n.type}).wrap(t)}},xi=class Cp extends _e{constructor(t){var r;super(S({type:"spacing"},t)),this.width=t==null?void 0:t.width,this._braced=(r=t==null?void 0:t.braced)!=null?r:!1}static fromJson(t){return new Cp(t)}toJson(){const t=super.toJson();return this.width!==void 0&&(t.width=this.width),this._braced&&(t.braced=!0),t}render(t){var r;if(this.command==="space")return new Ue(this.mode==="math"?null:" ");let n;if(this.width!==void 0)n=new Ue(null,{classes:"mspace"}),n.left=t.toEm(this.width);else{const i=(r={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?r:"mediumspace";n=new Ue(null,{classes:i})}return n=this.bind(t,n),this.caret&&(n.caret=this.caret),n}_serialize(t){var r;if(!t.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=de(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);const i=(r=this.command)!=null?r:"";return this.width===void 0?i:this._braced&&!("register"in this.width)?`${i}{${Zn(this.width)}}`:`${i}${Zn(this.width)}`}},Wi=class Ep extends _e{constructor(t){var r;super(_(S({},t),{type:"surd",mode:(r=t.mode)!=null?r:"math",style:t.style,displayContainsHighlight:!0,body:t.body})),this.above=t.index}static fromJson(t){return new Ep(_(S({},t),{index:t.above}))}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=de(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=this.command,i=this.bodyToLatex(t);return this.above&&!this.hasEmptyBranch("above")?an(`${n}[${this.aboveToLatex(t)}]`,i):/^[0-9]$/.test(i)?`${n}${i}`:an(n,i)}get children(){if(this._children)return this._children;const t=[];if(this.above)for(const r of this.above)t.push(...r.children),t.push(r);if(this.body)for(const r of this.body)t.push(...r.children),t.push(r);return this._children=t,t}render(t){var r;const n=new Dr({parent:t,mathstyle:"cramp"},this.style),i=(r=_e.createBox(n,this.body,{type:"inner"}))!=null?r:new Ue(null),a=n.scalingFactor,s=n.metrics.defaultRuleThickness/a,u=t.isDisplayStyle?$a:s,d=new Ue(null,{classes:"ML__sqrt-line",style:this.style});d.height=s,d.softWidth=i.width;let h=a*(s+u/4);const y=Math.max(a*2*u,i.height+i.depth)+h+s,M=new Dr({parent:t},this.style),I=this.bind(M,new Ue(Al("inner","\\surd",y,!1,M,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!I)return null;const $=I.height+I.depth-s;$>i.height+i.depth+h&&(h=(h+$-(i.height+i.depth))/2),I.setTop(I.height-i.height-h);const se=this.bind(t,new An({firstBaseline:[{box:new Ue(i)},h-2*s,{box:d},s]})),Ze=_e.createBox(new Dr({parent:t,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!Ze){const Je=new Ue([I,se],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return Je.setStyle("display","inline-block"),Je.setStyle("height",Je.height+Je.depth,"em"),this.caret&&(Je.caret=this.caret),this.bind(t,Je)}const ee=new An({shift:-.6*(Math.max(I.height,se.height)-Math.max(I.depth,se.depth)),children:[{box:Ze}]}),De=new Ue([new Ue(ee,{classes:"ML__sqrt-index",type:"ignore"}),I,se],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return De.height=I.height,De.depth=I.depth,this.caret&&(De.caret=this.caret),this.bind(t,De)}},Bi=class extends Ue{constructor(e){super(null,{type:"skip"}),this._width=e}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function Ii(e,t){if(!e.parent)return;const r=e.parent.children,n=r.indexOf(e);let i=n-1;for(;i>=0&&r[i].type==="ignore";)i-=1;if(i<0&&e.parent.parent&&e.parent.type==="lift"){Ii(e.parent,t);return}n>0&&r[n-1].type==="skip"?r[n-1].width+=t:r.splice(n,0,new Bi(t))}var ei={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},to={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function ma(e){Qi(e,(t,r)=>{r.type==="bin"&&(!t||/^(middle|bin|op|rel|open|punct)$/.test(t.type))&&(r.type="ord"),(t==null?void 0:t.type)==="bin"&&/^(rel|close|punct)$/.test(r.type)&&(t.type="ord"),r.type!=="ignore"&&(t=r)})}function Pa(e,t){if(!e.children)return e;const r=e.children;ma(r);const n=t.getRegisterAsEm("thinmuskip"),i=t.getRegisterAsEm("medmuskip"),a=t.getRegisterAsEm("thickmuskip");return Qi(r,(s,u)=>{var d,h,p;if(!s)return;const y=s.type,M=u.isTight?(d=to[y])!=null?d:null:(h=ei[y])!=null?h:null,I=(p=M==null?void 0:M[u.type])!=null?p:null;I===3&&Ii(u,n),I===4&&Ii(u,i),I===5&&Ii(u,a)}),e}function Qi(e,t,r=void 0){if(!e)return r;e=[...e];for(const n of e)n.type==="lift"?r=Qi(n.children,t,r):n.type==="ignore"?Qi(n.children,t):(t(r,n),Qi(n.children,t),r=n);return r}var ga=class kp extends _e{constructor(t){super({type:"tooltip",command:t.command,mode:t.mode,style:t.style,body:t.body,displayContainsHighlight:!0}),this.tooltip=new _e({type:"root",mode:t.content,body:t.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(t){return new kp(_(S({},t),{tooltip:wi(t.tooltip)}))}toJson(){var t;const r=(t=this.tooltip.body)==null?void 0:t.filter(n=>n.type!=="first").map(n=>n.toJson());return _(S({},super.toJson()),{tooltip:r})}render(t){const r=_e.createBox(new Dr,this.body);if(!r)return null;const n=new Dr({parent:t,mathstyle:"displaystyle"},{fontSize:Co}),i=gl(Pa(new Ue(this.tooltip.render(n),{classes:"ML__tooltip-content"}),n)),a=new Ue([i,r],{classes:"ML__tooltip-container"});return this.caret&&(a.caret=this.caret),this.bind(t,a)}},li=class Dp extends _e{constructor(t,r){super(_(S({},r),{type:"operator",isFunction:r==null?void 0:r.isFunction})),this.value=t,this.variant=r==null?void 0:r.variant,this.variantStyle=r==null?void 0:r.variantStyle,this.subsupPlacement=r==null?void 0:r.limits}static fromJson(t){return new Dp(t.symbol,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.variantStyle&&(t.variantStyle=this.variantStyle),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.value&&(t.symbol=this.value),t}render(t){var r;const n=new Ue(this.value,{type:"op",mode:"math",maxFontSize:t.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:t.letterShapeStyle});let i=n;if(this.superscript||this.subscript){const a=(r=this.subsupPlacement)!=null?r:"auto";i=a==="over-under"||a==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:n}):this.attachSupsub(t,{base:n})}return new Ue(this.bind(t,i),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=de(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);const n=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(t)),Cr(n)}};function wi(e){if(A(e))return e.map(n=>wi(n));if(typeof e=="string")return _e.fromJson(e);e=S({},e);for(const n of Go)e[n]&&(e[n]=wi(e[n]));e.args&&(e.args=Bl(e.args)),e.array&&(e.array=wi(e.array));const t=e.type;let r;t==="accent"&&(r=Cl.fromJson(e)),t==="array"&&(r=jr.fromJson(e)),t==="box"&&(r=eo.fromJson(e)),t==="chem"&&(r=T.fromJson(e)),t==="composition"&&(r=Ed.fromJson(e)),t==="delim"&&(r=Q.fromJson(e)),t==="enclose"&&(r=qe.fromJson(e)),t==="error"&&(r=$o.fromJson(e)),t==="extensible-symbol"&&(r=pn.fromJson(e)),t==="genfrac"&&(r=lr.fromJson(e)),t==="group"&&(r=kd.fromJson(e)),t==="latex"&&(r=Pt.fromJson(e)),t==="latexgroup"&&(r=vr.fromJson(e)),t==="leftright"&&(r=ln.fromJson(e)),t==="macro"&&(r=l.fromJson(e)),t==="macro-argument"&&(r=c.fromJson(e)),t==="operator"&&(r=li.fromJson(e)),t==="overlap"&&(r=br.fromJson(e)),t==="overunder"&&(r=Kr.fromJson(e)),t==="placeholder"&&(r=Ta.fromJson(e)),t==="prompt"&&(r=f.fromJson(e)),t==="phantom"&&(r=Ln.fromJson(e)),t==="sizeddelim"&&(r=We.fromJson(e)),t==="spacing"&&(r=xi.fromJson(e)),t==="subsup"&&(r=m.fromJson(e)),t==="surd"&&(r=Wi.fromJson(e)),t==="text"&&(r=Ms.fromJson(e)),t==="tooltip"&&(r=ga.fromJson(e)),r||(console.assert(!t||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(t),`MathLive 0.98.5: an unexpected atom type "${t}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),r=_e.fromJson(e));for(const n of Go)e[n]&&r.setChildren(e[n],n);return e.verbatimLatex!==void 0&&(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 Bl(e){if(e&&Array.isArray(e))return e.map(t=>t==="<null>"?null:typeof t=="object"&&"group"in t?{group:t.group.map(r=>wi(r))}:typeof t=="object"&&"atoms"in t?t.atoms.map(r=>wi(r)):t)}var ea={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"]},To={"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]$/},ks=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,Jo=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,Il=[/^[a-z]$/,/^[A-Z]$/,ks,Jo],$l={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},Dd=class extends Ai{constructor(){super("math")}createAtom(e,t,r){var n,i,a,s;if(t===null)return new _e({type:"mord",mode:"math",command:e,value:e,style:r});const u=window.MathfieldElement.isFunction((n=t.command)!=null?n:e);if(t.definitionType==="symbol"){const h=new _e({type:(i=t.type)!=null?i:"mord",mode:"math",command:(a=t.command)!=null?a:e,value:String.fromCodePoint(t.codepoint),style:r});return u&&(h.isFunction=!0),e.startsWith("\\")&&(h.verbatimLatex=e),h}const d=new _e({type:"mord",mode:"math",command:(s=t.command)!=null?s:e,value:e,style:r});return u&&(d.isFunction=!0),e.startsWith("\\")&&(d.verbatimLatex=e),d}serialize(e,t){const r=J0(e,_(S({},t),{defaultMode:"math"}));return r.length===0||t.defaultMode!=="text"?r:["$ ",...r," $"]}getFont(e,t){console.assert(t.variant!==void 0);let{variant:r}=t,{variantStyle:n}=t;r==="normal"&&!n&&/[\u00A3\u0131\u0237]/.test(e.value)&&(r="main",n="italic"),r==="normal"&&!n&&e.value.length===1&&Il.forEach((u,d)=>{var h;u.test(e.value)&&$l[(h=t.letterShapeStyle)!=null?h:"tex"][d]==="it"&&(n="italic")}),n==="up"&&(n=void 0);const i=n?r+"-"+n:r;console.assert(ea[i]!==void 0);const[a,s]=ea[i];return To[r]&&!To[r].test(e.value)?(e.value=Fe(e.value,r,n),null):(ks.test(e.value)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),a)}};function J0(e,t){const{parent:r}=e[0],n=Ds(r);return Hi(e,"variant").map(i=>{const a=Ds(i[0]);let s="";a&&a!==n&&(s={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"}[a],console.assert(s!==void 0));const u=Cr(i.map(d=>d._serialize(t)));return s?an(s,u):u})}function Ds(e){if(!e)return"";const{style:t}=e;if(t.variant===void 0)return"";let r=t.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(t.variant)&&t.variantStyle&&t.variantStyle!=="up"&&(r+="-"+t.variantStyle),r}new Dd;function Y0(e,t){return e.map(r=>r._serialize(t))}function Ad(e,t){return Hi(e,"fontShape").map(r=>{const n=Y0(r,t),{fontShape:i}=r[0].style;let a="";return i==="it"&&(a="\\textit"),i==="sl"&&(a="\\textsl"),i==="sc"&&(a="\\textsc"),i==="n"&&(a="\\textup"),!a&&i?`{${an("\\fontshape",i)}${Cr(n)}}`:a?an(a,Cr(n)):Cr(n)})}function Nc(e,t){return Hi(e,"fontSeries").map(r=>{const n=Ad(r,t),{fontSeries:i}=r[0].style;let a="";return i==="b"&&(a="\\textbf"),i==="l"&&(a="\\textlf"),i==="m"&&(a="\\textmd"),i&&!a?`{${an("\\fontseries",i)}${Cr(n)}}`:a?an(a,Cr(n)):Cr(n)})}function Tl(e,t){return Hi(e,"fontSize").map(r=>{var n,i;const a=Nc(r,t),s=(i=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(n=r[0].style.fontSize)!=null?n:""])!=null?i:"";return s?`${s} ${Cr(a)}`:Cr(a)})}function Ld(e,t,r){return Hi(e,"fontFamily").map(n=>{var i,a;const s=Tl(n,t),u=(a={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(i=n[0].style.fontFamily)!=null?i:""])!=null?a:"";return u?`\\${u}{${Cr(s)}}`:n[0].style.fontFamily?`{\\fontfamily{${n[0].style.fontFamily}} ${Cr(s)}}`:r?`\\text{${Cr(s)}}`:Cr(s)})}var Pl={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Fc=class extends Ai{constructor(){super("text")}createAtom(e,t,r){return t&&t.definitionType==="symbol"?new Ms(e,String.fromCodePoint(t.codepoint),r!=null?r:{}):null}serialize(e,t){return Ld(e,_(S({},t),{defaultMode:"text"}),t.defaultMode!=="text")}getFont(e,t){var r,n,i,a,s;const{fontFamily:u}=t;if(Pl[u]?e.classes+=" "+Pl[u]:u&&e.setStyle("font-family",u),t.fontShape&&(e.classes+=" ",e.classes+=(r={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape])!=null?r:""),t.fontSeries){const d=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);d&&(e.classes+=" ",e.classes+=(i={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"}[(n=d[1])!=null?n:""])!=null?i:"",e.classes+=" ",e.classes+=(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"}[(a=d[2])!=null?a:""])!=null?s:"")}return"Main-Regular"}};new Fc;var Q0=class extends Ai{constructor(){super("latex")}createAtom(e){return new Pt(e)}serialize(e,t){return e.filter(r=>r instanceof Pt&&!r.isSuggestion).map(r=>r.value)}getFont(){return null}};new Q0;var As={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],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:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},Ls={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],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:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},zf={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},Kf={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:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},$p={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},Tp={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","\u20AC",""],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:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Pp={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Rp={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Op={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","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],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",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Np={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],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:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Fp={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],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:["\xBA","\xAA","\\","\xB0"]}},zp={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","\u20AC",""],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","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Kp={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],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:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function Hf(e){const t=e.split("+"),r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(r.shift=!0),t.includes("alt")&&(r.alt=!0),t.includes("ctrl")&&(r.ctrl=!0),t.includes("cmd")&&(r.cmd=!0),t.includes("win")&&(r.win=!0),t.includes("meta")&&(r.meta=!0),r}function Rl(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}var Hp={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]"},zc=[],Kc;function ef(){switch(Qe()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function ta(e){(!e.platform||e.platform===ef())&&zc.push(e)}function Wp(e,t){var r;const n={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return n;for(const[i,a]of Object.entries(t.mapping)){if(a[0]===e)return n.key=`[${i}]`,n;if(a[1]===e)return n.shift=!0,n.key=`[${i}]`,n;if(a[2]===e)return n.alt=!0,n.key=`[${i}]`,n;if(a[3]===e)return n.shift=!0,n.alt=!0,n.key=`[${i}]`,n}return n.key=(r=Hp[e])!=null?r:"",n}function Vp(e){if(e.code)return e;const t=Object.entries(Hc().mapping);let r=!1,n=!1,i="";for(let a=0;a<4;a++){for(const[s,u]of t)if(u[a]===e.key){i=s,a===3?(r=!0,n=!0):a===2?r=!0:a===1&&(n=!0);break}if(i)break}return new KeyboardEvent(e.type,_(S({},e),{altKey:r,shiftKey:n,code:i}))}function Zp(e){var t,r;if(!e||e.key==="Unidentified"||e.key==="Dead")return;const n=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;for(const i of zc)((t=i.mapping[e.code])==null?void 0:t[n])===e.key?i.score+=1:(r=i.mapping[e.code])!=null&&r[n]&&(i.score=0);zc.sort((i,a)=>a.score-i.score)}function jp(e){Kc=zc.find(t=>e.startsWith(t.locale))}function Hc(){return Kc!=null?Kc:zc[0]}function Up(){switch(ef()){case"apple":return Ls;case"windows":return zf;case"linux":return Kf}return Ls}switch(ef()){case"apple":ta(Ls),ta($p),ta(Fp),ta(Rp);break;case"windows":ta(zf),ta(Tp),ta(zp),ta(Op);break;case"linux":ta(Kf),ta(Pp),ta(Kp),ta(Np);break}ta(As);function tf(e){var t;const r=/macos|ios/.test(Qe()),n=e.split("+");let i="";for(const a of n)i&&(i+=r?"\u2009":'<span class="ML__shortcut-join">+</span>'),a.startsWith("[Key")?i+=a.slice(4,5):a.startsWith("Key")?i+=a.slice(3,4):a.startsWith("[Digit")?i+=a.slice(6,7):a.startsWith("Digit")?i+=a.slice(5,6):i+=(t={cmd:"\u2318",meta:r?"\u2318":"Ctrl",shift:r?"\u21E7":"Shift",alt:r?"\u2325":"Alt",ctrl:r?"\u2303":"Ctrl","\n":r?"\u23CE":"Return","[return]":r?"\u23CE":"Return","[enter]":r?"\u2324":"Enter","[tab]":r?"\u21E5":"Tab","[escape]":"Esc","[backspace]":r?"\u232B":"Backspace","[delete]":r?"\u2326":"Del","[pageup]":r?"\u21DE":"Page Up","[pagedown]":r?"\u21DF":"Page Down","[home]":r?"\u2912":"Home","[end]":r?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[a.toLowerCase()])!=null?t:a.toUpperCase();return i}function Bd(e){if(e instanceof MouseEvent||e instanceof PointerEvent)return{x:e.clientX,y:e.clientY};if(e instanceof TouchEvent){const t=[...e.touches].reduce((n,i)=>({x:n.x+i.clientX,y:n.y+i.clientY}),{x:0,y:0}),r=e.touches.length;return{x:t.x/r,y:t.y/r}}}function Bs(e){const t={alt:!1,control:!1,shift:!1,meta:!1};return(e instanceof MouseEvent||e instanceof PointerEvent||e instanceof TouchEvent||e instanceof KeyboardEvent)&&(e.altKey&&(t.alt=!0),e.ctrlKey&&(t.control=!0),e.metaKey&&(t.meta=!0),e.shiftKey&&(t.shift=!0)),t}function Gp(e,t){return!e&&t||e&&!t?!1:!e||!t?!0:e.alt===t.alt&&e.control===t.control&&e.shift===t.shift&&e.meta===t.meta}var qp=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 Id(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:qp.has(e.code)}function $d(){var e;let t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}var ro=class No{static get scrim(){return No._scrim||(No._scrim=new No),No._scrim}static open(t){No.scrim.open(t)}static close(){No.scrim.close()}static get state(){return No.scrim.state}static get element(){return No.scrim.element}constructor(t){var r,n;this.lightDismiss=(r=t==null?void 0:t.lightDismiss)!=null?r:!0,this.translucent=(n=t==null?void 0:t.translucent)!=null?n:!1,this.state="closed"}get element(){if(this._element)return this._element;const t=document.createElement("div");return t.setAttribute("role","presentation"),t.style.position="fixed",t.style.contain="content",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.style.zIndex="var(--scrim-zindex, 10099)",t.style.outline="none",this.translucent?(t.style.background="rgba(255, 255, 255, .2)",t.style.backdropFilter="contrast(40%)"):t.style.background="transparent",this._element=t,t}open(t){var r;if(this.state!=="closed")return;this.state="opening",this.onDismiss=t==null?void 0:t.onDismiss,this.savedActiveElement=$d();const{element:n}=this;((r=t==null?void 0:t.root)!=null?r:document.body).appendChild(n),n.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const i=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const a=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${a+i}px`,t!=null&&t.child&&n.append(t.child),this.state="open"}close(){var t,r,n,i;if(this.state!=="open"){console.assert(this.element.parentElement!==null);return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;const{element:a}=this;a.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),a.remove(),document.body.style.overflow=(t=this.savedOverflow)!=null?t:"",document.body.style.marginRight=(r=this.savedMarginRight)!=null?r:"",$d()!==this.savedActiveElement&&((i=(n=this.savedActiveElement)==null?void 0:n.focus)==null||i.call(n)),a.innerHTML="",this.state="closed"}handleEvent(t){this.lightDismiss&&(t.target===this._element&&t.type==="click"?(this.close(),t.preventDefault(),t.stopPropagation()):t.target===document&&(t.type==="touchmove"||t.type==="scroll")&&(this.close(),t.preventDefault(),t.stopPropagation()))}};function Xp(e,t,r){let n=null,i=null,a=!1,s=!1,u=!1;const d=new AbortController,h=d.signal;return e.addEventListener("keydown",p=>{if(a||p.key==="Process"||p.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(p.code)){n=null;return}n=p,i=null,r.onKeystroke(p)?e.textContent="":n=null},{capture:!0,signal:h}),e.addEventListener("keypress",p=>{a||(n&&i&&r.onKeystroke(n),i=p)},{capture:!0,signal:h}),e.addEventListener("compositionstart",p=>{e.textContent="",a=!0,r.onCompositionStart(p.data)},{capture:!0,signal:h}),e.addEventListener("compositionupdate",p=>{a&&r.onCompositionUpdate(p.data)},{capture:!0,signal:h}),e.addEventListener("compositionend",p=>{e.textContent="",a&&(a=!1,r.onCompositionEnd(p.data))},{capture:!0,signal:h}),e.addEventListener("beforeinput",p=>p.stopImmediatePropagation(),{signal:h}),e.addEventListener("input",p=>{var y;if(!a&&(e.textContent="",p.inputType!=="insertCompositionText")){if(p.inputType==="insertFromPaste"){p.preventDefault(),p.stopPropagation();return}r.onInput((y=p.data)!=null?y:""),p.preventDefault(),p.stopPropagation()}},{signal:h}),e.addEventListener("paste",p=>{e.focus({preventScroll:!0}),e.textContent="",r.onPaste(p)||p.preventDefault(),p.stopImmediatePropagation()},{signal:h}),e.addEventListener("cut",p=>r.onCut(p),{capture:!0,signal:h}),e.addEventListener("copy",p=>r.onCopy(p),{capture:!0,signal:h}),e.addEventListener("blur",p=>{var y,M;if(((M=(y=p.relatedTarget)==null?void 0:y._mathfield)==null?void 0:M.element)===t){e.focus({preventScroll:!0}),p.preventDefault(),p.stopPropagation();return}const I=ro.state;if(I==="open"||I==="opening"){p.preventDefault(),p.stopPropagation();return}if(p.relatedTarget===p.target.getRootNode().host){p.preventDefault(),p.stopPropagation();return}u||s||(u=!0,n=null,i=null,r.onBlur(),u=!1)},{capture:!0,signal:h}),e.addEventListener("focus",p=>{u||s||(s=!0,r.onFocus(),s=!1)},{capture:!0,signal:h}),{dispose:()=>d.abort(),cancelComposition:()=>{a&&(e.blur(),requestAnimationFrame(()=>e.focus({preventScroll:!0})))},blur:()=>{typeof e.blur=="function"&&e.blur()},focus:()=>{!s&&typeof e.focus=="function"&&e.focus({preventScroll:!0})},hasFocus:()=>$d()===e,setAriaLabel:p=>e.setAttribute("aria-label",p),setValue:p=>{var y;e.textContent=p,e.style.left="-1000px",(y=window.getSelection())==null||y.selectAllChildren(e)},moveTo:(p,y)=>{e.style.top=`${y}px`,e.style.left=`${p}px`}}}function Ol(e){var t;if(!e||!Id(e))return"";let r;return e.key==="Unidentified"&&e.target&&(r=e.target.value),r=(t=r!=null?r:e.key)!=null?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(r)&&(r=""),r}function Wf(e){e=Vp(e);const t=[];return e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.length===0?`[${e.code}]`:(t.push(`[${e.code}]`),t.join("+"))}function Jp(e){if(Ke()){const t=Qe(),r=e.startsWith("!"),n=e.endsWith(t);if(r&&!n||!r&&n)return!0}return e==="!other"?!1:e==="other"}function Yp(e,t,r){if(e.length===0)return"";const n=Rl(Hf(Wf(r))),i=Rl({key:r.key,shift:r.shiftKey,alt:r.altKey,ctrl:r.ctrlKey,meta:r.metaKey||r.ctrlKey&&/macos|ios/.test(Qe()),cmd:!1,win:!1});for(let a=e.length-1;a>=0;a--)if((e[a].key===n||e[a].key===i)&&(!e[a].ifMode||e[a].ifMode===t))return e[a].command;return""}function Vf(e){let t=e;return A(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t}function Qp(e,t){let r=[];if(typeof t=="string"){const a=ud[t];A(a)?r=a.slice():a&&r.push(a)}const n=Vf(t),i=new RegExp("^"+n.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const a of e)i.test(Vf(a.command))&&r.push(a.key);return r.map(tf)}function em(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(e.ifLayout!==void 0&&(t.score===0||!e.ifLayout.includes(t.id)))return;const r=Hf(e.key);let n=e.ifPlatform;if(r.cmd){if(n&&n!=="macos"&&n!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+n+`"
|
|
|
"cmd" modifier can only be used with macOS or iOS platform.`);n||(n=Qe()==="ios"?"ios":"macos"),r.win=!1,r.cmd=!1,r.meta=!0}if(r.win){if(n&&n!=="windows")throw new Error('Unexpected "win" modifier with platform "'+n+`"
|
|
|
"win" modifier can only be used with Windows platform.`);n="windows",r.win=!1,r.cmd=!1,r.meta=!0}if(n&&!Jp(n))return;if(/^\[.+\]$/.test(r.key))return _(S({},e),{key:Rl(r)});const i=Wp(r.key,t);if(!i)return _(S({},e),{key:Rl(r)});if(i.shift&&r.shift||i.alt&&r.alt)throw new Error(`The keybinding ${e.key} (${rf(e.command)}) is conflicting with the key combination ${Rl(i)} using the ${t.displayName} keyboard layout`);return i.shift=i.shift||r.shift,i.alt=i.alt||r.alt,i.meta=r.meta,i.ctrl=r.ctrl,_(S({},e),{key:Rl(i)})}function rf(e){if(Array.isArray(e)){const t=[...e];return t.shift()+"("+t.map(r=>typeof r=="string"?`"${r}"`:r.toString()).join(", ")+")"}return e}function tm(e,t){const r=[],n=[];for(const i of e)try{const a=em(i,t);if(!a)continue;const s=n.find(u=>u.key===a.key&&u.ifMode===a.ifMode);if(s)throw new Error(`Ambiguous key binding ${i.key} (${rf(i.command)}) matches ${s.key} (${rf(s.command)}) with the ${t.displayName} keyboard layout`);n.push(a)}catch(a){a instanceof Error&&r.push(a.message)}return[n,r]}var rm=class extends Qr{constructor(){super("latex")}createAtom(e){return new Pt(e)}onPaste(e,t){if(!t)return!1;const r=typeof t=="string"?t:t.getData("application/x-latex")||t.getData("text/plain");return r&&e.model.contentWillChange({inputType:"insertFromPaste",data:r})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r)&&(e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),xn(e)),e.startRecording(),!0):!1}insert(e,t,r){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;r||(r={}),r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder");const{silenceNotifications:n}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const i=e.silenceNotifications;e.silenceNotifications=!0,r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(Qn(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward");const a=[];for(const d of t)oe.test(d)&&a.push(new Pt(d));let s=e.at(e.position);if(s instanceof vr&&(s=s.lastChild),!(s.parent instanceof vr)){const d=new vr("");s.parent.addChildAfter(d,s),s=d.firstChild}const u=s.parent.addChildrenAfter(a,s);return e.silenceNotifications=i,r.selectionMode==="before"||(r.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(u)):u&&(e.position=e.offsetOf(u))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=n,!0}};function nm(e){return e.atoms.find(t=>t.type==="latexgroup")}function Wc(e){var t,r;const n=e.atoms.find(i=>i.type==="latexgroup");return n?(r=(t=n.body)==null?void 0:t.filter(i=>i.type==="latex"))!=null?r:[]:[]}function Zf(e,t){var r;let n=0,i=!1;const a=Number.isFinite(t==null?void 0:t.before)?(r=t==null?void 0:t.before)!=null?r:0:e.lastOffset;for(;n<=a&&!i;){const d=e.at(n);i=d instanceof Pt&&d.isSuggestion,i||n++}if(!i)return[void 0,void 0];let s=n,u=!1;for(;s<=a&&!u;){const d=e.at(s);u=!(d instanceof Pt&&d.isSuggestion),u||s++}return[n-1,s-1]}new rm;function Td(e){const t=Wc(e.model).filter(r=>r.isSuggestion);if(t.length!==0){e.model.position=e.model.offsetOf(t[0].leftSibling);for(const r of t)r.parent.removeChild(r)}}function Vc(e,t){var r;const{model:n}=e;Td(e);for(const p of Wc(n))p.isError=!1;if(!n.selectionIsCollapsed||e.options.popoverPolicy==="off"){Fl(e);return}const i=[];let a=n.at(n.position);for(;a&&a instanceof Pt&&/^[a-zA-Z\*]$/.test(a.value);)a=a.leftSibling;if(a&&a instanceof Pt&&a.value==="\\")for(i.push(a),a=a.rightSibling;a&&a instanceof Pt&&/^[a-zA-Z\*]$/.test(a.value);)i.push(a),a=a.rightSibling;const s=i.map(p=>p.value).join(""),u=ie(e,s);if(u.length===0){if(/^\\[a-zA-Z\*]+$/.test(s))for(const p of i)p.isError=!0;Fl(e);return}const d=(r=t==null?void 0:t.atIndex)!=null?r:0;e.suggestionIndex=d<0?u.length-1:d%u.length;const h=u[e.suggestionIndex];if(h!==s){const p=i[i.length-1];p.parent.addChildrenAfter([...h.slice(s.length-h.length)].map(y=>new Pt(y,{isSuggestion:!0})),p),Is(e,{interactive:!0})}am(e,u)}function jf(e){const[t,r]=Zf(e,{before:e.position});if(t===void 0||r===void 0)return!1;let n=!1;return e.getAtoms([t,r]).forEach(i=>{i.isSuggestion&&(i.isSuggestion=!1,n=!0)}),n}function Nl(e,t="accept",r){var n,i;Fl(e);const a=nm(e.model);if(!a)return!1;if(t==="accept-suggestion"||t==="accept-all"){const h=Wc(e.model).filter(p=>p.isSuggestion);if(h.length!==0){for(const p of h)p.isSuggestion=!1;e.model.position=e.model.offsetOf(h[h.length-1])}if(t==="accept-suggestion")return h.length!==0}const u=Wc(e.model).filter(h=>!h.isSuggestion).map(h=>h.value).join(""),d=a.leftSibling;return a.parent.removeChild(a),e.model.position=e.model.offsetOf(d),e.switchMode((n=r==null?void 0:r.mode)!=null?n:"math"),t==="reject"||(Qr.insert(e.model,u,{selectionMode:(i=r==null?void 0:r.selectItem)!=null&&i?"item":"placeholder",format:"latex",mode:"math"}),e.snapshot(),e.model.announce("replacement"),e.switchMode("math")),!0}function Pd(e){var t;let r=document.getElementById(e);return r?r.dataset.refcount=Number(Number.parseInt((t=r.dataset.refcount)!=null?t:"0")+1).toString():(r=document.createElement("div"),r.setAttribute("aria-hidden","true"),r.dataset.refcount="1",r.id=e,document.body.append(r)),r}function nf(e){var t;const r=document.getElementById(e);if(!r)return;const n=Number.parseInt((t=r.getAttribute("data-refcount"))!=null?t:"0");n<=1?r.remove():r.dataset.refcount=Number(n-1).toString()}function im(e,t){const r=new Dr({from:e.context}),n=new _e({mode:"math",type:"root",body:b(t,{context:r})}),i=gl(Pa(new Ue(n.render(r),{classes:"ML__base"}),r));return vl(i,{classes:"ML__latex"}).toMarkup()}function am(e,t){var r;if(t.length===0){Fl(e);return}let n="";for(const[a,s]of t.entries()){const u=s,d=im(e,s),h=Qp(e.keybindings,u).join("<br>");n+=`<li role="button" data-command="${u}" ${a===e.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${u}</span><span class="ML__popover__command">${d}</span>`,h&&(n+=`<span class="ML__popover__keybinding">${h}</span>`),n+="</li>"}const i=om(e,`<ul>${n}</ul>`);af()&&((r=i.querySelector(".ML__popover__current"))==null||r.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var a;i&&!af()&&(i.classList.add("is-visible"),Rd(e),(a=i.querySelector(".ML__popover__current"))==null||a.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function af(){const e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1}function Rd(e,t){var r;if(!e.element||e.element.mathfield!==e||!af())return;if(((r=e.model.at(e.model.position))==null?void 0:r.type)!=="latex"){Fl(e);return}if(t!=null&&t.deferred){setTimeout(()=>Rd(e),32);return}const n=Sl(e.field);if(!n)return;const i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerWidth-document.documentElement.clientWidth,u=window.innerHeight-document.documentElement.clientHeight,d=window.mathVirtualKeyboard.boundingRect.height,h=document.getElementById("mathlive-suggestion-popover");n.x+h.offsetWidth/2>a-s?h.style.left=`${a-h.offsetWidth-s}px`:n.x-h.offsetWidth/2<0?h.style.left="0":h.style.left=`${n.x-h.offsetWidth/2}px`;const p=n.y-n.height;i-u-d-n.y<p?(h.classList.add("ML__popover--reverse-direction"),h.classList.remove("top-tip"),h.classList.add("bottom-tip"),h.style.top=`${n.y-n.height-h.offsetHeight-15}px`):(h.classList.remove("ML__popover--reverse-direction"),h.classList.add("top-tip"),h.classList.remove("bottom-tip"),h.style.top=`${n.y+15}px`)}function Fl(e){e.suggestionIndex=0;const t=document.getElementById("mathlive-suggestion-popover");t&&(t.classList.remove("is-visible"),t.innerHTML="")}function om(e,t){let r=document.getElementById("mathlive-suggestion-popover");return r||(r=Pd("mathlive-suggestion-popover"),Yi("suggestion-popover"),Yi("core"),r.addEventListener("pointerdown",n=>n.preventDefault()),r.addEventListener("click",n=>{let i=n.target;for(;i&&!i.dataset.command;)i=i.parentElement;i&&(Nl(e,"reject"),Qr.insert(e.model,i.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),e.dirty=!0,e.focus())})),r.innerHTML=window.MathfieldElement.createHTML(t),r}function sm(){document.getElementById("mathlive-suggestion-popover")&&(nf("mathlive-suggestion-popover"),pa("suggestion-popover"),pa("core"))}function lm(){const e=String(new Error().stack).replace(/^Error.*\n/,"").split(`
|
|
|
`);if(e.length===0)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],r=t.match(/http.*\.ts[\?:]/);return r&&(t=e[2]),r=t.match(/(https?:.*):[0-9]+:[0-9]+/),r||(r=t.match(/at (.*(\.ts))[\?:]/),r||(r=t.match(/at (.*(\.mjs|\.js))[\?:]/))),r?r[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}").`),"")}var Od=null,Uf,Gf,of=((Gf=(Uf=globalThis==null?void 0:globalThis.document)==null?void 0:Uf.currentScript)==null?void 0:Gf.src)||lm();function qf(e){return rs(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(e))return new URL(e).href;if(Od===null)try{const t=yield fetch(of,{method:"HEAD"});t.status===200&&(Od=t.url)}catch(t){console.error(`Invalid URL "${e}" (relative to "${of}")`)}return new URL(e,Od!=null?Od:of).href})}function cm(e,t,r={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,r)}var ra="not-loaded";function um(){return rs(this,null,function*(){return ra="not-loaded",Nd()})}function Nd(){return rs(this,null,function*(){var e;if(ra!=="not-loaded")return;if(ra="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?e:!1){ra="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const r=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],n=Array.from(document.fonts).map(s=>s.family);if(r.every(s=>n.includes(s))){ra="ready";return}if(!window.MathfieldElement.fontsDirectory){ra="not-loaded";return}const i=yield qf(window.MathfieldElement.fontsDirectory);if(!i){document.body.classList.add("ML__fonts-did-not-load"),ra="error";return}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"],["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(s=>cm(s[0].replace(/-[a-zA-Z]+$/,""),`${i}/${s[0]}`,s[1]));try{(yield Promise.all(a.map(u=>{try{return u.load()}catch(d){}}))).forEach(u=>document.fonts.add(u)),ra="ready";return}catch(s){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${i}"`,{cause:s}),document.body.classList.add("ML__fonts-did-not-load")}ra="error"}})}function dm(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r),t=t|0;return Math.abs(t)}function xn(e,t){e&&(e.dirty||(e.dirty=!0,requestAnimationFrame(()=>{Bo(e)&&e.dirty&&(e.atomBoundsCache=new Map,Is(e,t),e.atomBoundsCache=void 0)})))}function fm(e,t){var r;t=t!=null?t:{};const n=new Dr({from:_(S({},e.context),{atomIdsSettings:{seed:t.forHighlighting?dm(_e.serialize([e.model.root],{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:(r=t.forHighlighting)!=null?r:!1},letterShapeStyle:e.options.letterShapeStyle}),mathstyle:e.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),i=e.model.root.render(n);return vl(Pa(i,n),{classes:e.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function Xf(e,t){const{model:r}=e;r.root.caret=void 0,r.root.isSelected=!1,r.root.containsCaret=!0;for(const i of r.atoms)i.caret=void 0,i.isSelected=!1,i.containsCaret=!1;if(r.selectionIsCollapsed){const i=r.at(r.position);i.caret=e.model.mode;let a=i.parent;for(;a;)a.containsCaret=!0,a=a.parent}else{const i=r.getAtoms(r.selection,{includeChildren:!0});for(const a of i)a.isSelected=!0}return fm(e,t).toMarkup()}function Is(e,t){if(!Bo(e))return;t!=null||(t={});const r=e.element.querySelector("[part=virtual-keyboard-toggle]");r&&(r.style.display=e.hasEditableContent?"":"none");const n=e.field;if(!n)return;const i=e.isSelectionEditable&&e.hasFocus(),a=n.classList.contains("ML__focused");a&&!i?n.classList.remove("ML__focused"):!a&&i&&n.classList.add("ML__focused");let s=Xf(e,t);const u=e.element.querySelector("[part=menu-toggle]");if(u&&(e.model.atoms.length<=1||e.disabled||e.readOnly&&!e.hasEditableContent||e.userSelect==="none"?u.style.display="none":u.style.display=""),e.model.atoms.length<=1){const d=e.options.contentPlaceholder;d&&(s+=`<span part=placeholder class="ML__content-placeholder">${Un(d)}</span>`)}n.innerHTML=window.MathfieldElement.createHTML(s),Fd(e,t.interactive),e.dirty=!1}function Fd(e,t){const r=e.field;if(!r)return;for(const u of r.querySelectorAll(".ML__selection, .ML__contains-highlight"))u.remove();!(t!=null&&t)&&ra!=="error"&&ra!=="ready"&&setTimeout(()=>{ra==="ready"?Fd(e):setTimeout(()=>Fd(e),128)},32);const n=e.model,i=r.offsetWidth,a=r.getBoundingClientRect().width;let s=Math.floor(a)/i;if(s=isNaN(s)?1:s,n.selectionIsCollapsed){Rd(e,{deferred:!0});let u=n.at(n.position);for(;u&&u.type!=="prompt"&&!(u.containsCaret&&u.displayContainsHighlight);)u=u.parent;if(u!=null&&u.containsCaret&&u.displayContainsHighlight){const d=fd(e,Es(e,u),s);if(d){d.left/=s,d.right/=s,d.top/=s,d.bottom/=s;const h=document.createElement("div");h.classList.add("ML__contains-highlight"),h.style.position="absolute",h.style.left=`${d.left+1}px`,h.style.top=`${Math.ceil(d.top)}px`,h.style.width=`${Math.ceil(d.right-d.left)}px`,h.style.height=`${Math.ceil(d.bottom-d.top)}px`,r.insertBefore(h,r.childNodes[0])}}return}for(const u of hm(pd(e,{excludeAtomsWithBackground:!0}))){u.left/=s,u.right/=s,u.top/=s,u.bottom/=s;const d=document.createElement("div");d.classList.add("ML__selection"),d.style.position="absolute",d.style.left=`${u.left}px`,d.style.top=`${u.top}px`,d.style.width=`${Math.ceil(u.right-u.left)}px`,d.style.height=`${Math.ceil(u.bottom-u.top-1)}px`,r.insertBefore(d,r.childNodes[0])}}function hm(e){let t=[];for(const r of e){let n=!1;for(const i of t)if(r.left===i.left&&r.right===i.right&&r.top===i.top&&r.bottom===i.bottom){n=!0;break}n||t.push(r)}e=t,t=[];for(const r of e){let n=0;for(const i of e)if(r.left>=i.left&&r.right<=i.right&&r.top>=i.top&&r.bottom<=i.bottom&&(n+=1,n>1))break;n===1&&t.push(r)}return t}var Jf=3,no;function Vi(e,t){t=S({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t!=null?t:{}),no||(no={});for(const r of Object.keys(e))console.assert(!no[r],"Selector already defined: ",r),no[r]=_(S({},t),{fn:e[r]})}function sf(e){let t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return sf(e[1]);t=e[0]}else t=e;return t=t.replace(/-\w/g,r=>r[1].toUpperCase()),no[t]}function zl(e){var t;return(t=sf(e))==null?void 0:t.target}function pm(e,t){var r;if(!t)return!1;let n,i=[],a=!1,s=!1;A(t)?(n=t[0],i=t.slice(1)):n=t,n=n.replace(/-\w/g,h=>h[1].toUpperCase());const u=no[n],d=u==null?void 0:u.target;if(d==="model"){if(!e.isSelectionEditable&&(u!=null&&u.changeContent))return e.model.announce("plonk"),!1;/^(delete|add)/.test(n)&&(n!=="deleteBackward"&&e.flushInlineShortcutBuffer(),e.snapshot(n)),/^complete/.test(n)||Td(e),no[n].fn(e.model,...i),Vc(e),s=!0,a=!0}else if(d==="virtual-keyboard")s=(r=window.mathVirtualKeyboard.executeCommand(t))!=null?r:!1,a=!0;else if(no[n]){if(!e.isSelectionEditable&&(u!=null&&u.changeContent))return e.model.announce("plonk"),!1;/^(undo|redo)/.test(n)&&e.flushInlineShortcutBuffer(),s=no[n].fn(e,...i),a=!0}else throw new Error(`Unknown command "${n}"`);return d!=="virtual-keyboard"&&(!e.model.selectionIsCollapsed||u!=null&&u.changeSelection&&t!=="deleteBackward")&&(e.flushInlineShortcutBuffer(),u!=null&&u.changeContent||e.stopCoalescingUndo(),e.defaultStyle={}),s&&xn(e),a}function mm(e,t){var r;if(!e)return!1;e.focus(),jh.keypressVibration&>()&&navigator.vibrate(Jf);const n=sf(t);window.MathfieldElement.playSound((r=n==null?void 0:n.audioFeedback)!=null?r:"keypress");const i=e.executeCommand(t);return e.scrollIntoView(),i}Vi({performWithFeedback:(e,t)=>mm(e,t)});function gm(e){return Vc(e,{atIndex:e.suggestionIndex+1}),!1}function vm(e){return Vc(e,{atIndex:e.suggestionIndex-1}),!1}Vi({complete:Nl},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Vi({nextSuggestion:gm,previousSuggestion:vm},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var zd="mathlive#virtual-keyboard-message";function lf(e){var t;return e.type!=="message"?!1:((t=e.data)==null?void 0:t.type)===zd}var bm=class Ap{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new Ap),this._singleton}set alphabeticLayout(t){this.sendMessage("update-setting",{alphabeticLayout:t})}set layouts(t){this.sendMessage("update-setting",{layouts:t})}get normalizedLayouts(){return[]}set editToolbar(t){this.sendMessage("update-setting",{editToolbar:t})}set actionKeycap(t){this.sendMessage("update-setting",{actionKeycap:t})}set shiftKeycap(t){this.sendMessage("update-setting",{shiftKeycap:t})}set backspaceKeycap(t){this.sendMessage("update-setting",{backspaceKeycap:t})}set tabKeycap(t){this.sendMessage("update-setting",{tabKeycap:t})}set container(t){throw new Error("Container inside an iframe cannot be changed")}show(t){this.sendMessage("show",t)}hide(t){this.sendMessage("hide",t)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(t){t?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(t){return this.sendMessage("execute-command",{command:t}),!0}updateToolbar(t){this.sendMessage("update-toolbar",t)}update(t){this.sendMessage("update-setting",t)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(t,r,n){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r==null||r.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,n){this.listeners[t]&&this.listeners[t].delete(r)}handleEvent(t){if(lf(t)){if(!Tc(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");this.handleMessage(t.data)}}handleMessage(t){const{action:r}=t;if(r==="execute-command"){const{command:n}=t;zl(n)==="virtual-keyboard"&&this.executeCommand(n);return}if(r==="synchronize-proxy"){this._boundingRect=t.boundingRect,this._isShifted=t.isShifted;return}if(r==="geometry-changed"){this._boundingRect=t.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(t,r={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(S({type:zd,action:t},r),this.targetOrigin)}},Yf={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{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:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
|
|
|
.minimalist-backdrop {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
.minimalist-container {
|
|
|
--keycap-height: 40px;
|
|
|
--keycap-max-width: 53px;
|
|
|
--keycap-small-font-size: 12px;
|
|
|
background: var(--keyboard-background);
|
|
|
padding: 20px;
|
|
|
border-top-left-radius: 8px;
|
|
|
border-top-right-radius: 8px;
|
|
|
border: 1px solid var(--keyboard-border);
|
|
|
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
|
|
|
}
|
|
|
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},Kd={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE0","\xE1","\xE2","\xE4","\xE6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6","\u0153"],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"}],u:["\xF9","\xFA","\xFB","\xFC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},Zc;function Qf(e,t){var r,n,i;const a=Yo.singleton;if(!a)return;const s=Kl(e),u=(n=(r=a.getKeycap(s==null?void 0:s.id))==null?void 0:r.variants)!=null?n:"";if(typeof u=="string"&&!eh(u)||Array.isArray(u)&&u.length===0){t==null||t();return}const d={};let h="";for(const se of xm(u)){const Ze=rh(se),ee=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);d[ee]=Ze;const[De,Je]=Hd(Ze);h+=`<div id=${ee} class="item ${Je}">${De}</div>`}const p=document.createElement("div");p.setAttribute("aria-hidden","true"),p.className="MLK__variant-panel",p.style.height="auto";const y=Object.keys(d).length;let M=5;y===1?M=1:y===2||y===4?M=2:y===3||y===5||y===6?M=3:y>=7&&y<14&&(M=4),p.style.width=`calc(var(--variant-keycap-length) * ${M} + 12px)`,p.innerHTML=jh.createHTML(h),ro.open({root:(i=a==null?void 0:a.container)==null?void 0:i.querySelector(".ML__keyboard"),child:p}),Zc=new AbortController;const{signal:I}=Zc,$=e==null?void 0:e.getBoundingClientRect();if($){$.top-p.clientHeight<0&&(p.style.width="auto",y<=6?p.style.height="56px":y<=12?p.style.height="108px":y<=18?p.style.height="205px":p.classList.add("compact"));const se=Math.max(0,Math.min(window.innerWidth-p.offsetWidth,($.left+$.right-p.offsetWidth)/2)),Ze=$.top-p.clientHeight+5;p.style.transform=`translate(${se}px, ${Ze}px)`,p.classList.add("is-visible"),requestAnimationFrame(()=>{p.addEventListener("pointerup",ee=>{const De=Kl(ee.target);!(De!=null&&De.id)||!d[De.id]||(cf(d[De.id]),jc(),t==null||t(),ee.preventDefault())},{capture:!0,passive:!1,signal:I}),p.addEventListener("pointerenter",ee=>{const De=Kl(ee.target);!(De!=null&&De.id)||!d[De.id]||De.classList.add("is-active")},{capture:!0,signal:I}),p.addEventListener("pointerleave",ee=>{const De=Kl(ee.target);!(De!=null&&De.id)||!d[De.id]||De.classList.remove("is-active")},{capture:!0,signal:I}),window.addEventListener("pointercancel",()=>{jc(),t==null||t()},{signal:I}),window.addEventListener("pointerup",()=>{jc(),t==null||t()},{signal:I})})}}function jc(){Zc==null||Zc.abort(),Zc=null,ro.state==="open"&&ro.close()}function ym(e){if(e==="foreground-color"){const t=[];for(const r of Object.keys(te))t.push({class:"swatch-button",label:'<span style="border: 3px solid '+te[r]+'"></span>',command:["applyStyle",{color:r}]});return t}if(e==="background-color"){const t=[];for(const r of Object.keys(Y))t.push({class:"swatch-button",label:'<span style="background:'+Y[r]+'"></span>',command:["applyStyle",{backgroundColor:r}]});return t}}function eh(e){return Kd[e]!==void 0}function xm(e){var t;return typeof e!="string"?e:(Kd[e]||(Kd[e]=(t=ym(e))!=null?t:[]),Kd[e])}function wm(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r} !important`).join(";")}function Sm(e){return Object.keys(e).map(t=>`${t} {${wm(e[t])}}`).join("")}function Uc(e){if(!e)return"";const t=new Dr,r=new _e({mode:"math",type:"root",body:b(e,{context:t,args:i=>i==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),n=gl(Pa(new Ue(r.render(t),{classes:"ML__base"}),t));return vl(n,{classes:"ML__latex"}).toMarkup()}function Gc(e){var t;if(Array.isArray(e))return e.map(n=>Gc(n)).flat();const r=typeof e=="string"?{markup:e}:e;return"rows"in r&&Array.isArray(r.rows)&&(r.rows=r.rows.map(n=>n.map(i=>rh(i)))),(t=r.id)!=null||(r.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[r]}function _m(){var e,t;let n=window.mathVirtualKeyboard.alphabeticLayout;if(n==="auto"){const u=Hc();u&&(n=u.virtualLayout),(!n||n==="auto")&&(n=(e={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Ce.locale.slice(0,2)])!=null?e:"qwerty")}const i={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},a=(t=i[n])!=null?t:i.qwerty,s=n==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(const u of a){const d=[];for(const h of u)/[a-z]/.test(h)?d.push({label:h,class:"hide-shift",shift:{label:h.toUpperCase()},variants:eh(h)?h:void 0}):h==="~"?n!=="dvorak"?d.push("[backspace]"):d.push({label:"[backspace]",width:1}):h==="^"?d.push("[shift]"):h===" "&&d.push("[separator-5]");s.push(d)}return s.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:Gc({rows:s})}}function th(e){if(e==="alphabetic")return _m();if(typeof e=="string")return console.assert(Yf[e]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${e}"`),th(Yf[e]);let t;if("rows"in e&&Array.isArray(e.rows)){console.assert(!("layers"in e||"markup"in e),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const i=e,{rows:a}=i,s=je(i,["rows"]);t=_(S({},s),{layers:Gc({rows:e.rows})})}else if("markup"in e&&typeof e.markup=="string"){const i=e,{markup:a}=i,s=je(i,["markup"]);t=_(S({},s),{layers:Gc(e.markup)})}else t=S({},e),"layers"in e?t.layers=Gc(e.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let r=!1,n=!1;for(const i of t.layers)if(i.rows)for(const a of i.rows.flat()){Hl(a)&&(r=!0);const s=a.command;typeof s=="string"&&["undo","redo","cut","copy","paste"].includes(s)&&(n=!0)}return(!("displayShiftedKeycaps"in e)||e.displayShiftedKeycaps===void 0)&&(t.displayShiftedKeycaps=r),(!("displayEditToolbar"in e)||e.displayEditToolbar===void 0)&&(t.displayEditToolbar=!n),t}function Mm(e,t){var r,n;let i='<div class="left">';if(e.normalizedLayouts.length>1)for(const[a,s]of e.normalizedLayouts.entries()){const u=s,d=[a===t?"selected":"layer-switch"];u.tooltip&&d.push("MLK__tooltip"),u.labelClass&&d.push(...u.labelClass.split(" ")),i+=`<div class="${d.join(" ")}"`,u.tooltip&&(i+=" data-tooltip='"+((r=Se(u.tooltip))!=null?r:u.tooltip)+"' "),a!==t&&(i+=`data-layer="${u.layers[0].id}"`),i+=`>${(n=u.label)!=null?n:"untitled"}</div>`}return i+="</div>",i}function Cm(e,t){let r="";if(e.editToolbar==="none")return"";const i=[];t.selectionIsCollapsed?i.push("undo","redo","pasteFromClipboard"):i.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const a={undo:`<div class='action ${t.canUndo===!1?"disabled":""}'
|
|
|
data-command='"undo"'
|
|
|
data-tooltip='${Se("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${t.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${Se("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${Se("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${Se("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${Se("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return r+=i.map(s=>a[s]).join(""),r}function Em(e){for(const t of e)km(t)}function km(e){const t=Yo.singleton;if(!t)return;const r={};if(!e.id){if(e.hasAttribute("data-label")&&(r.label=e.dataset.label),e.hasAttribute("data-latex")&&(r.latex=e.dataset.latex),e.hasAttribute("data-key")&&(r.key=e.dataset.key),e.hasAttribute("data-insert")&&(r.insert=e.dataset.insert),e.hasAttribute("data-variants")&&(r.variants=e.dataset.variants),e.hasAttribute("data-aside")&&(r.aside=e.dataset.aside),e.className&&(r.class=e.className),!r.label&&!r.latex&&!r.key&&!r.insert&&(r.latex=e.innerText,r.label=e.innerHTML),e.hasAttribute("data-command"))try{r.command=JSON.parse(e.dataset.command)}catch(n){}e.id=t.registerKeycap(r)}if(!e.innerHTML){const[n,i]=Hd(r);e.innerHTML=window.MathfieldElement.createHTML(n)}}function Dm(){Yi("virtual-keyboard"),Yi("core"),Nd()}function Am(){pa("core"),pa("virtual-keyboard")}var Lm=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
|
|
|
|
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
|
|
|
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-shift" viewBox="0 0 384 512">
|
|
|
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-commit" viewBox="0 0 512 512">
|
|
|
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
|
|
|
</symbol>
|
|
|
|
|
|
|
|
|
<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
|
|
|
|
|
|
<symbol id="svg-command" viewBox="0 0 640 512">
|
|
|
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-undo" viewBox="0 0 512 512">
|
|
|
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-redo" viewBox="0 0 512 512">
|
|
|
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
|
|
|
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
|
|
|
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-tab" viewBox="0 0 448 512">
|
|
|
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
|
|
|
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
|
|
|
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-trash" viewBox="0 0 448 512">
|
|
|
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
|
|
|
</svg>`;function Bm(e){e.resetKeycapRegistry(),Dm();const t=document.createElement("div");t.className="ML__keyboard";const r=document.createElement("div");r.className="MLK__plate",r.innerHTML=window.MathfieldElement.createHTML(Lm+e.normalizedLayouts.map((s,u)=>Im(e,s,u)).join(""));const n=document.createElement("div");n.className="MLK__backdrop",n.appendChild(r),t.appendChild(n),t.addEventListener("pointerdown",Tm,{passive:!1});const i=t.querySelectorAll(".ML__edit-toolbar");if(i)for(const s of i)s.addEventListener("click",u=>{var d,h;let p=u.target,y="";for(;p&&!y;)y=(d=p==null?void 0:p.getAttribute("data-command"))!=null?d:"",p=(h=p==null?void 0:p.parentElement)!=null?h:null;y&&e.executeCommand(JSON.parse(y))});Em(t.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const a=t.querySelectorAll(".MLK__layer");console.assert(a.length>0,"No virtual keyboards available");for(const s of a)s.addEventListener("pointerdown",u=>u.preventDefault());return e.currentLayer=e.latentLayer,t}function Im(e,t,r){const n=[];if(!("layers"in t))return"";for(const i of t.layers)n.push(`<div tabindex="-1" class="MLK__layer" id="${i.id}">`),(e.normalizedLayouts.length>1||t.displayEditToolbar)&&(n.push("<div class='MLK__toolbar' role='toolbar'>"),n.push(Mm(e,r)),t.displayEditToolbar&&n.push('<div class="ML__edit-toolbar right"></div>'),n.push("</div>")),n.push($m(e,i)),n.push("</div>");return n.join("")}function $m(e,t){if(typeof t=="string")return t;let r="";if(typeof t.style=="string"?r+=`<style>${t.style}</style>`:typeof t.style=="object"&&(r+=`<style>${Sm(t.style)}</style>`),t.backdrop&&(r+=`<div class='${t.backdrop}'>`),t.container&&(r+=`<div class='${t.container}'>`),t.rows){r+="<div class=MLK__rows>";for(const n of t.rows){r+="<div dir='ltr' class=MLK__row>";for(const i of n)if(i){const a=e.registerKeycap(i),[s,u]=Hd(i);/(^|\s)separator/.test(u)?r+=`<div class="${u}"`:r+=`<div tabindex="-1" id="${a}" class="${u}"`,i.tooltip&&(r+=` data-tooltip="${i.tooltip}"`),r+=`>${s}</div>`}r+="</div>"}r+="</div>"}else t.markup&&(r+=t.markup);return t.container&&(r+="</div>"),t.backdrop&&(r+="</div>"),r}function Hd(e,t={shifted:!1}){var r,n,i,a,s,u,d;let h="",p=(r=e.class)!=null?r:"";if(t.shifted&&Hl(e)&&(p+=" is-active"),t.shifted&&"shift"in e)typeof e.shift=="string"?h=Uc(e.shift):typeof e.shift=="object"&&(h=e.shift.label?e.shift.label:(n=Uc(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?n:""),typeof e.shift=="object"&&(p=(a=(i=e.shift.class)!=null?i:e.class)!=null?a:"");else{if(h=e.label?e.label:(s=Uc(e.latex||e.insert||"")||e.key)!=null?s:"",e.shift){let y;typeof e.shift=="string"?y=Uc(e.shift):e.shift.label?y=e.shift.label:y=(u=Uc(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?u:"",h+=`<span class="MLK__shift">${y}</span>`}e.aside&&(h+=`<aside>${e.aside}</aside>`)}return e.layer&&!/layer-switch/.test(p)&&(p+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(p)||(p+=" MLK__keycap"),!/\bw[0-9]+\b/.test(p)&&e.width&&(p+=(d={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[e.width])!=null?d:""),[h,p||"MLK__keycap"]}var $s={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[up]":{class:"action hide-shift",label:"\u2191",command:["performWithFeedback","moveUp"],shift:{label:"\u219F",command:["performWithFeedback","extendSelectionUpward"]}},"[down]":{class:"action hide-shift",label:"\u2193",command:["performWithFeedback","moveDown"],shift:{label:"\u21A1",command:["performWithFeedback","extendSelectionDownward"]}},"[return]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:["performWithFeedback","insertDecimalSeparator"],shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:["performWithFeedback","insertDecimalSeparator"],shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function rh(e){var t;if(typeof e=="string"){if(e==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(e="[,]"),!$s[e])return{latex:e};e={label:e}}let r;return"label"in e&&e.label&&$s[e.label]&&(r=_(S(S({},$s[e.label]),e),{label:$s[e.label].label})),"key"in e&&e.key&&$s[e.key]&&(r=_(S(S({},$s[e.key]),e),{key:$s[e.key].key})),r?(r.command==="insertDecimalSeparator"&&(r.label=(t=window.MathfieldElement.decimalSeparator)!=null?t:"."),e.label==="[action]"&&(r=S(S({},r),window.mathVirtualKeyboard.actionKeycap)),e.label==="[shift]"&&(r=S(S({},r),window.mathVirtualKeyboard.shiftKeycap)),e.label==="[backspace]"&&(r=S(S({},r),window.mathVirtualKeyboard.backspaceKeycap)),e.label==="[tab]"&&(r=S(S({},r),window.mathVirtualKeyboard.tabKeycap)),r):e}var qc;function Tm(e){var t;if(e.button!==0)return;const r=Yo.singleton;if(!r)return;let n=e.target;for(;n&&!n.getAttribute("data-layer");)n=n.parentElement;if(n){r.currentLayer=(t=n.getAttribute("data-layer"))!=null?t:"",e.preventDefault();return}const i=Kl(e.target);if(!(i!=null&&i.id))return;const a=r.getKeycap(i.id);if(!a)return;console.assert(e.type==="pointerdown");const s=new AbortController,u=s.signal;i.classList.add("is-pressed"),i.addEventListener("pointerenter",Wd(s),{capture:!0,signal:u}),i.addEventListener("pointerleave",Wd(s),{capture:!0,signal:u}),i.addEventListener("pointercancel",Wd(s),{signal:u}),i.addEventListener("pointerup",Wd(s),{signal:u}),Hl(a)&&(i.classList.add("is-active"),r.shiftPressCount++),a.variants&&(qc&&clearTimeout(qc),qc=setTimeout(()=>{i.classList.contains("is-pressed")&&(i.classList.remove("is-pressed"),i.classList.add("is-active"),e.target&&"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId),Qf(i,()=>{s.abort(),i==null||i.classList.remove("is-active")}))},300)),e.preventDefault()}function Wd(e){return t=>{const r=Kl(t.target);if(!(r!=null&&r.id))return;const n=Yo.singleton;if(!n)return;const i=n.getKeycap(r.id);if(i){if(t.type==="pointerenter"&&t.target===r&&t.isPrimary&&r.classList.add("is-pressed"),t.type==="pointercancel"){r.classList.remove("is-pressed"),Hl(i)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted)),e.abort();return}if(t.type==="pointerleave"&&t.target===r){r.classList.remove("is-pressed"),Hl(i)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted));return}if(t.type==="pointerup"){qc&&clearTimeout(qc),Hl(i)?r.classList.toggle("is-active",n.isShifted):r.classList.contains("is-pressed")&&(r.classList.remove("is-pressed"),n.isShifted&&i.shift?typeof i.shift=="string"?n.executeCommand(["insert",i.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):cf(i.shift):cf(i),n.shiftPressCount===1&&!t.shiftKey&&(n.shiftPressCount=0)),e.abort(),t.preventDefault();return}}}}function cf(e){var t;let r=e.command;!r&&e.insert&&(r=["insert",e.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!r&&e.key&&(r=["typedText",e.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!r&&e.latex&&(r=["insert",e.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),r||(r=["typedText",e.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(t=Yo.singleton)==null||t.executeCommand(r)}function Pm(e){if(e.nodeType!==1)return!1;const t=e.classList;return t.contains("MLK__keycap")||t.contains("shift")||t.contains("action")||t.contains("fnbutton")||t.contains("bigfnbutton")}function Kl(e){if(!e)return;let t=e;for(;t&&!Pm(t);)t=t.parentElement;return t!=null?t:void 0}function Hl(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class)}var Yo=class Lp{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var t,r,n;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(r=(t=window.document)==null?void 0:t.body)!=null?r:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(i=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(n=window.top)==null||n.addEventListener("message",this)}catch(i){window.addEventListener("message",this)}document.body.addEventListener("focusin",i=>{const a=i.target;a!=null&&a.isConnected&&setTimeout(()=>{const s=nh();s&&!s.readOnly&&s.mathVirtualKeyboardPolicy==="auto"&&mt()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",i=>{i.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{nh()||this.hide()},300)})}get currentLayer(){var t,r,n;return(n=(r=(t=this._element)==null?void 0:t.querySelector(".MLK__layer.is-visible"))==null?void 0:r.id)!=null?n:""}set currentLayer(t){var r;if(!this._element){this.latentLayer=t;return}let n=t?this._element.querySelector(`#${t}.MLK__layer`):null;n||(n=this._element.querySelector(".MLK__layer")),n&&((r=this._element.querySelector(".MLK__layer.is-visible"))==null||r.classList.remove("is-visible"),n.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(t){var r;this._shiftPressCount=t>2||t<0?0:t,(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(t){const r="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[r]=t,r}getKeycap(t){return t?this.keycapRegistry[t]:void 0}getLayer(t){const r=this.normalizedLayouts;for(const n of r)for(const i of n.layers)if(i.id===t)return i}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(t){this._alphabeticLayout=t,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(t){this._actionKeycap=typeof t=="string"?{label:t}:t}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(t){this._shiftKeycap=typeof t=="string"?{label:t}:t}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(t){this._backspaceKeycap=typeof t=="string"?{label:t}:t}get tabKeycap(){return this._tabKeycap}set tabKeycap(t){this._tabKeycap=typeof t=="string"?{label:t}:t}get layouts(){return this._layouts}set layouts(t){this.updateNormalizedLayouts(t),this.rebuild()}updateNormalizedLayouts(t){const r=Array.isArray(t)?[...t]:[t],n=r.findIndex(i=>i==="default");n>=0&&r.splice(n,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(r),this._normalizedLayouts=r.map(i=>th(i))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(t){this._editToolbar=t,this.rebuild()}get container(){return this._container}set container(t){this._container=t,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new Lp}catch(t){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(t,r,n){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(r)||this.listeners[t].add(r)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(r=>{typeof r=="function"?r(t):r==null||r.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,r,n){this.listeners[t]&&this.listeners[t].delete(r)}get element(){return this._element}set element(t){var r;this._element!==t&&((r=this._element)==null||r.remove(),this._element=t)}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get boundingRect(){var t;if(!this._visible)return new DOMRect;const r=(t=this._element)==null?void 0:t.getElementsByClassName("MLK__plate")[0];return r?r.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var t,r;const n=this.boundingRect.height;if(this.container===document.body){(t=this._element)==null||t.style.setProperty("--_keyboard-height",`calc(${n}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const i=n-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${i}px)`:`${i}px`}else(r=this._element)==null||r.style.setProperty("--_keyboard-height",`${n}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const t=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=t,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const t=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(t&&(t.backdrop||t.container)));const r=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(r)for(const n of r){const i=this.getKeycap(n.id);if(i){const[a,s]=Hd(i,{shifted:this.isShifted});n.innerHTML=window.MathfieldElement.createHTML(a),n.className=s}}}show(t){var r;if(this._visible)return;const n=this.container;if(n&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const i=this._element.getElementsByClassName("MLK__plate")[0];if(i&&this.observer.observe(i),n===window.document.body){const a=n.style.paddingBottom;this.originalContainerBottomPadding=a;const s=i.offsetHeight-1;n.style.paddingBottom=a?`calc(${a} + ${s}px)`:`${s}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(r=this._element)==null||r.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,t!=null&&t.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var i;return(i=this._element)==null?void 0:i.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(t){var r;const n=this.container;if(n&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const i=this._element.getElementsByClassName("MLK__plate")[0];i&&this.observer.unobserve(i),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),jc(),Am(),(r=this._element)==null||r.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(n.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var t,r;return(r=(t=this.element)==null?void 0:t.offsetHeight)!=null?r:0}buildAndAttachElement(){var t;console.assert(!this.element),this.element=Bm(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",r=>{r.shiftKey||((r.ctrlKey||r.button===2)&&Qf(r.target),r.preventDefault(),r.stopPropagation())},{capture:!0}),(t=this.container)==null||t.appendChild(this.element)}handleEvent(t){if(lf(t)){if(!Tc(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");t.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:t.data.action!=="update-setting"&&t.data.action!=="proxy-created"&&t.data.action!=="execute-command"&&(console.assert(t.source!==void 0),this.connectedMathfieldWindow=t.source),this.handleMessage(t.data,t.source)}if(this._element)switch(t.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":t.button!==2&&t.preventDefault();break;case"keydown":{t.key==="Shift"&&!t.repeat&&(this.shiftPressCount=1);break}case"keyup":{(t.key==="Shift"||!t.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(t,r){const{action:n}=t;if(n==="execute-command"){const{command:i}=t,a=zl(i);if(window.top!==void 0&&a!=="virtual-keyboard")return;this.executeCommand(i);return}if((n==="connect"||n==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r),n!=="disconnect"&&window===window.top){if(n==="show"){typeof t.animate!="undefined"?this.show({animate:t.animate}):this.show();return}if(n==="hide"){typeof t.animate!="undefined"?this.hide({animate:t.animate}):this.hide();return}if(n==="update-setting"){t.alphabeticLayout&&(this.alphabeticLayout=t.alphabeticLayout),t.layouts&&(this.layouts=t.layouts),t.editToolbar&&(this.editToolbar=t.editToolbar);return}if(n==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},r);return}}}sendMessage(t,r,n){if(n||(n=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||n===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:S({type:zd,action:t},r)}));return}if(n)n.postMessage(S({type:zd,action:t},r),{targetOrigin:this.targetOrigin});else if(r.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:r.command})),t==="execute-command"&&Array.isArray(r.command)&&r.command[0]==="insert"){const i=r.command[1].split("");for(const a of i)this.dispatchEvent(new KeyboardEvent("keydown",{key:a,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:a,bubbles:!0}))}}stateWillChange(t){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:t},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(t){const r=this._element;if(!r)return;r.classList.toggle("is-math-mode",t.mode==="math"),r.classList.toggle("is-text-mode",t.mode==="text"),r.classList.toggle("can-undo",t.canUndo),r.classList.toggle("can-redo",t.canRedo),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-copy",!t.selectionIsCollapsed),r.classList.toggle("can-paste",!0);const n=r.querySelectorAll(".ML__edit-toolbar");if(n)for(const i of n)i.innerHTML=Cm(this,t)}update(t){this._style=t.style,this.updateToolbar(t)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(t){let r,n=[],i=zl(t);return A(t)?(r=t[0],r==="performWithFeedback"&&(t=t.slice(1),i=zl(t)),n=t.slice(1)):r=t,r=r.replace(/-\w/g,a=>a[1].toUpperCase()),i==="virtual-keyboard"?no[r].fn(void 0,...n):(this.sendMessage("execute-command",{command:t}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function nh(){var e,t;let r=$d(),n=null;for(;r;){if("host"in r&&((t=(e=r.host)==null?void 0:e.tagName)==null?void 0:t.toLowerCase())==="math-field"){n=r.host;break}r=r.parentNode}return n}if(Ke()&&!("mathVirtualKeyboard"in window))if(window===window.top){const e=Yo.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>e})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>bm.singleton,configurable:!0});function Vd(e){const t={};for(const r of Object.keys(e))switch(r){case"scriptDepth":const n=e.scriptDepth;if(A(n))t.scriptDepth=[n[0],n[1]];else if(typeof n=="number")t.scriptDepth=[n,n];else if(typeof n=="string"){const[a,s]=n.split(",").map(u=>parseInt(u.trim()));t.scriptDepth=[a,s]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let i=e.mathVirtualKeyboardPolicy.toLowerCase();if(i==="sandboxed"){if(window!==window.top){const a=Yo.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}i="manual"}t.mathVirtualKeyboardPolicy=i;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?Ce.locale.startsWith("fr")?t.letterShapeStyle="french":t.letterShapeStyle="tex":t.letterShapeStyle=e.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(e.defaultMode)?t.defaultMode=e.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),t.defaultMode="math");break;case"macros":t.macros=q(e.macros);break;default:A(e[r])?t[r]=[...e[r]]:typeof e[r]=="object"&&!(e[r]instanceof Element)&&r!=="computeEngine"?t[r]=S({},e[r]):t[r]=e[r]}return t}function Ts(e,t){let r;typeof t=="string"?r=[t]:t===void 0?r=Object.keys(e):r=t;const n={};for(const i of r)e[i]===null?n[i]=null:A(e[i])?n[i]=[...e[i]]:typeof e[i]=="object"&&!(e[i]instanceof Element)&&i!=="computeEngine"?n[i]=S({},e[i]):n[i]=e[i];return typeof t=="string"?n[t]:n}function Zd(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:ut,backgroundColorMap:dt,letterShapeStyle:Ce.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:e=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(e),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:$0,inlineShortcuts:ad,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:I0,value:""}}function ih(e){return e.defaultMode==="inline-math"?"math":e.defaultMode}function Qo(e,t){!e||!t||(A(e)?e.forEach(r=>Qo(r,t)):typeof e=="object"&&!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),Qo(e.body,t),Qo(e.above,t),Qo(e.below,t),Qo(e.subscript,t),Qo(e.superscript,t)))}function uf(e,t,r,n){function i(s,u){for(const d of a)if(d.style[s]!==u)return!1;return!0}if(t=e.normalizeRange(t),t[0]===t[1])return!1;const a=e.getAtoms(t,{includeChildren:!0});n.operation==="toggle"&&(r.color&&i("color",r.color)&&(r.color="none",delete r.verbatimColor),r.backgroundColor&&i("backgroundColor",r.backgroundColor)&&(r.backgroundColor="none",delete r.verbatimBackgroundColor),r.fontFamily&&i("fontFamily",r.fontFamily)&&(r.fontFamily="none"),r.fontSeries&&i("fontSeries",r.fontSeries)&&(r.fontSeries="auto"),r.fontShape&&i("fontShape",r.fontShape)&&(r.fontShape="auto"),r.fontSize&&i("fontSize",r.fontSize)&&(r.fontSize=Co),r.variant&&i("variant",r.variant)&&(r.variant="normal"),r.variantStyle&&i("variantStyle",r.variantStyle)&&(r.variantStyle=""));for(const s of a)s.applyStyle(r);return!0}function Rm(e,t){const r=e.at(e.position);if(r.type==="composition")r.value=t;else{const{caret:n}=r;r.caret=void 0;const i=new Ed(t,{mode:r.mode});i.caret=n,r.parent.addChildAfter(i,r),e.position+=1}}function Om(e){const t=e.at(e.position);t.type==="composition"&&(t.parent.removeChild(t),e.position-=1)}Et(["math","displaymath"],va),Et("center",va),W("displaylines","",{parse:e=>{const t=[];let r=[];e.beginContext({tabular:!0});do{if(e.end()||e.match("<}>"))break;e.matchColumnSeparator()||e.matchRowSeparator()?(t.push([r]),r=[]):r.push(...e.scan(n=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(n)))}while(!0);return e.endContext(),t.push([r]),t},createAtom:e=>new jr("lines",e.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),Bt("array","{columns:colspec}",(e,t,r,n)=>new jr(e,df(t),r,{columns:n[0],mathstyleName:"textstyle"})),Bt(["equation","equation*","subequations"],"",(e,t,r)=>new jr(e,df(t),r,{columns:[{align:"c"}]})),Bt(["multline","multline*"],"",va),Bt(["align","align*","aligned","eqnarray"],"",va),Bt("split","",va),Bt(["gather","gathered"],"",va),Bt(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",va),Bt(["smallmatrix","smallmatrix*"],"[columns:colspec]",va),Bt(["cases","dcases","rcases"],"",va);function Nm(e){for(const t of e)for(const r of t)if(r.length>0)return!1;return!0}function df(e,t=1){return Nm(e)?Array(t).fill([[new _e({type:"first"}),new Ta]]):e.map(r=>r.length===0?[[new _e({type:"first"})]]:r.map(n=>n.length===0?[new _e({type:"first"})]:(n[0].type!=="first"&&n.unshift(new _e({type:"first"})),n)))}function va(e,t=[[[]]],r=[],n=[]){switch(t=df(t,["split","align","align*","aligned","eqnarray"].includes(e)?2:1),e){case"math":return new jr(e,t,r,{mathstyleName:"textstyle"});case"displaymath":return new jr(e,t,r,{mathstyleName:"textstyle"});case"center":return new jr(e,t,r,{columns:[{align:"c"}]});case"multline":case"multline*":return new jr(e,t,r,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new jr(e,t,r,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new jr(e,t,r,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Ps(n[0])});case"bmatrix":case"bmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Ps(n[0])});case"Bmatrix":case"Bmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Ps(n[0])});case"vmatrix":case"vmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Ps(n[0])});case"Vmatrix":case"Vmatrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Ps(n[0])});case"matrix":case"matrix*":return new jr(e,t,r,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Ps(n==null?void 0:n[0])});case"smallmatrix":case"smallmatrix*":return new jr(e,t,r,{mathstyleName:"scriptstyle",columns:Ps(n==null?void 0:n[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new jr(e,t,r,{mathstyleName:e==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new jr(e,t,r,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new jr(e,t,r,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let i=0;for(const u of t)i=Math.max(i,u.length);const a=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let s=2;for(;s<i;)a.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),s+=2;return a.push({gap:0}),new jr(e,t,r,{arraycolsep:0,columns:a,minColumns:2})}}return new jr(e,t,r,{mathstyleName:"textstyle"})}function Ps(e){return e!=null?e:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Fm(e,t){let r=e.at(e.position);for(;r&&!(r.parent instanceof jr);)r=r.parent;if(r&&r.type==="array"&&r.environmentName,!r||!(r.parent instanceof jr)){const n=e.at(e.position);if(r=n,!r.parent.parent){let i=e.extractAtoms([e.position,e.lastOffset]),a=e.extractAtoms([0,e.position]);a.length===0&&(a=Gd()),i.length===0&&(i=Gd());let s;return t.endsWith("column")?(s=va("split",[[a,i]]),e.root=s,Rs(s,0,0)?Os(e,s,0,0):Rs(s,0,1)?Os(e,s,0,1):e.position=e.offsetOf(n)):(s=va("lines",[[a],[i]]),e.root=s,Rs(s,0,0)?Os(e,s,0,0):Rs(s,1,0)?Os(e,s,1,0):e.position=e.offsetOf(n)),[void 0,[0,0]]}if(r.parent instanceof ln){const i=r.parent;let a=e.extractAtoms([e.position,e.offsetOf(i.lastChild)]),s=e.extractAtoms([e.offsetOf(i.firstChild),e.position]);s.length===0&&(s=Gd()),a.length===0&&(a=Gd());let u="pmatrix";const d=i.leftDelim,h=i.rightDelim;d==="("&&(h===")"||h==="?")?u="pmatrix":(d==="["||d==="\\lbrack")&&(h==="]"||h==="\\rbrack"||h==="?")?u="bmatrix":d==="\\vert"&&h==="\\vert"?u="vmatrix":d==="\\Vert"&&h==="\\Vert"?u="Vmatrix":(d==="{"||d==="\\lbrace")&&(h==="."||h==="?")&&(u="cases");const p=va(u,t.endsWith("column")?[[s,a]]:[[s],[a]]);return i.parent.addChildBefore(p,i),i.parent.removeChild(i),Rs(p,0,0)?Os(e,p,0,0):t.endsWith("column")?Rs(p,0,1)?Os(e,p,0,1):e.position=e.offsetOf(r):Rs(p,1,0)?Os(e,p,1,0):e.position=e.offsetOf(r),[void 0,[0,0]]}}return r&&r.parent instanceof jr?[r.parent,r.parentBranch]:[void 0,[0,0]]}function Rs(e,t,r){const n=e.getCell(t,r);return!n||n.length!==2?!1:n[1].type==="placeholder"}function zm(e,t,r,n){const i=t.getCell(r,n);return i?[e.offsetOf(i[0]),e.offsetOf(i[i.length-1])]:-1}function Os(e,t,r,n){const i=zm(e,t,r,n);typeof i!="number"&&e.setSelection(i)}function jd(e,t,r,n,i){const a=t.getCell(r,n);a&&e.setPositionHandlingPlaceholder(e.offsetOf(a[i==="start"?0:a.length-1]))}function Ud(e,t){const[r,[n,i]]=Fm(e,t);if(r)switch(t){case"after row":r.addRowAfter(n),jd(e,r,n+1,0,"end");break;case"after column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnAfter(i),jd(e,r,n,i+1,"end");break;case"before row":r.addRowBefore(n),jd(e,r,n,0,"start");break;case"before column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnBefore(i),jd(e,r,n,i,"start");break}}function ah(e){return e.contentWillChange({inputType:"insertText"})?(Ud(e,"after row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Km(e){return e.contentWillChange({inputType:"insertText"})?(Ud(e,"before row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function oh(e){return e.contentWillChange({inputType:"insertText"})?(Ud(e,"after column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Hm(e){return e.contentWillChange({inputType:"insertText"})?(Ud(e,"before column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function sh(e,t){if(!e.contentWillChange({}))return!1;e.mathfield.snapshot();let r=".",n=".";switch(t){case"pmatrix":case"pmatrix*":r="(",n=")";break;case"bmatrix":case"bmatrix*":r="[",n="]";break;case"Bmatrix":case"Bmatrix*":r="\\lbrace",n="\\rbrace";break;case"vmatrix":case"vmatrix*":r="\\vert",n="\\vert";break;case"Vmatrix":case"Vmatrix*":r="\\Vert",n="\\Vert";break;case"matrix":case"matrix*":r=".",n=".";break;case"cases":case"dcases":r="\\lbrace";break;case"rcases":n="\\rbrace";break}const i=e.at(e.position),a=i.type==="array"?i:e.parentEnvironment;return a.environmentName=t,a.leftDelim=r,a.rightDelim=n,e.contentDidChange({}),!0}function lh(e,t){let r=e.at(e.position);for(;r&&!(Array.isArray(r.parentBranch)&&r.parent instanceof jr);)r=r.parent;if(Array.isArray(r==null?void 0:r.parentBranch)&&(r==null?void 0:r.parent)instanceof jr){const n=r.parent,i=r.parentBranch;let a;switch(t){case"row":if(n.rowCount>1){n.removeRow(i[0]);const s=n.getCell(Math.max(0,i[0]-1),i[1]);a=e.offsetOf(s[s.length-1])}break;case"column":if(n.colCount>n.minColumns){n.removeColumn(i[1]);const s=n.getCell(i[0],Math.max(0,i[1]-1));a=e.offsetOf(s[s.length-1])}break}a&&e.setPositionHandlingPlaceholder(a)}}function Wm(e){return e.contentWillChange({inputType:"deleteContent"})?(lh(e,"row"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}function Vm(e){return e.contentWillChange({inputType:"deleteContent"})?(lh(e,"column"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}Vi({addRowAfter:ah,addColumnAfter:oh,addRowBefore:Km,addColumnBefore:Hm,removeRow:Wm,removeColumn:Vm,setEnvironment:sh},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Gd(){return[new Ta]}var ch=class Bp{constructor(t){this.recording=!1,this.model=t,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(t){t&&this.index>=0&&(this.stack[this.index].selection=t),this.lastOp=""}undo(){return this.canUndo()?(this.model.setState(this.stack[this.index-1],{silenceNotifications:!1,type:"undo"}),this.index-=1,this.lastOp="",!0):!1}redo(){return this.canRedo()?(this.index+=1,this.model.setState(this.stack[this.index],{silenceNotifications:!1,type:"redo"}),this.lastOp="",!0):!1}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(t){return this.recording?(t&&t===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>Bp.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=t!=null?t:"",!0):!1}};ch.maximumDepth=1e3;var Zm=ch;function ff(e,t,r){if(e.at(t).mode!=="text")return t;const n=r==="backward"?-1:1;let i;if(K.test(e.at(t).value)){let a=t,s;do s=e.at(a).mode==="text"&&K.test(e.at(a).value),a+=n;while(e.at(a)&&s);i=e.at(a)?a-2*n:a-n}else if(/\s/.test(e.at(t).value)){let a=t;for(;e.at(a)&&e.at(a).mode==="text"&&/\s/.test(e.at(a).value);)a+=n;if(!e.at(a))i=a-n;else{let s=!0;do s=e.at(a).mode==="text"&&!/\s/.test(e.at(a).value),a+=n;while(e.at(a)&&s);i=e.at(a)?a-2*n:a-n}}else{let a=t;for(;e.at(a)&&e.at(a).mode==="text"&&!/\s/.test(e.at(a).value);)a+=n;i=e.at(a)?a:a-n;let s=!0;for(;e.at(a)&&s;)s=e.at(a).mode==="text"&&/\s/.test(e.at(a).value),s&&(i=a),a+=n;i=e.at(a)?a-2*n:a-n}return i-(n>0?0:1)}function Wl(e,t,r){var n,i,a,s,u,d,h;const p=e.position;(n=r==null?void 0:r.extend)!=null&&n||e.collapseSelection(t);let y=e.at(e.position);if(t==="forward"&&(y.type==="subsup"?(y=y.rightSibling,y||(y=e.at(e.position+1))):y=e.at(e.position+1)),!y)return e.announce("plonk"),!1;let M=e.offsetOf(y);if(y instanceof Ms)M=ff(e,M,t);else if(y instanceof Pt)if(y.isSuggestion)for(console.assert(t==="forward");y&&y instanceof Pt;)y.isSuggestion=!1,M=e.offsetOf(y),y=y.rightSibling;else if(t==="forward"){if(y=y.rightSibling,!y||!(y instanceof Pt))return e.announce("plonk"),!1;for(;y&&y instanceof Pt&&/[a-zA-Z\*]/.test(y.value);)M=e.offsetOf(y),y=y.rightSibling}else{if(y=y.leftSibling,!y||!(y instanceof Pt))return e.announce("plonk"),!1;for(;y&&y instanceof Pt&&/[a-zA-Z\*]/.test(y.value);)M=e.offsetOf(y),y=y.leftSibling}else if(t==="forward"&&y.type==="mopen"){let I=0;do y.type==="mopen"?I+=1:y.type==="mclose"&&(I-=1),y=y.rightSibling;while(!y.isLastSibling&&I!==0);M=e.offsetOf(y.leftSibling)}else if(t==="backward"&&y.type==="mclose"){let I=0;do y.type==="mopen"?I+=1:y.type==="mclose"&&(I-=1),y=y.leftSibling;while(!y.isFirstSibling&&I!==0);M=e.offsetOf(y)}else if(t==="backward")if(y.type==="first")for(;M>0&&y.type==="first";)M-=1,y=e.at(M);else{const I=y.type;y.type==="subsup"&&(M=e.offsetOf(e.at(M).leftSibling)),M-=1;let $=(i=e.at(M))==null?void 0:i.type;for(;M>=0&&$===I;)((a=e.at(M))==null?void 0:a.type)==="subsup"?M=e.offsetOf(e.at(M).leftSibling):M-=1,$=e.at(M).type}else{const{type:I}=y;let $=(s=e.at(M))==null?void 0:s.type;const{lastOffset:se}=e;for(;M<=se&&($===I||$==="subsup");){for(;((u=e.at(M).rightSibling)==null?void 0:u.type)==="subsup";)M=e.offsetOf(e.at(M).rightSibling);M+=1,$=(d=e.at(M))==null?void 0:d.type}M-=1}if((h=r==null?void 0:r.extend)!=null&&h){if(!e.setSelection(e.anchor,M))return e.announce("plonk"),!1}else{if(M===e.position)return e.announce("plonk"),!1;e.position=M}return e.announce("move",p),e.mathfield.stopCoalescingUndo(),!0}function io(e,t,r){var n,i;if(r=r!=null?r:{extend:!1},e.mathfield.adoptStyle=t==="backward"?"right":"left",t!=="forward"){const[u,d]=Zf(e);u!==void 0&&d!==void 0&&e.deleteAtoms([u,d])}if(t==="upward")return Um(e,r);if(t==="downward")return Gm(e,r);if(r.extend){let u=qd(e,e.position,t);u<0&&(u=0),u>e.lastOffset&&(u=e.lastOffset);const d=e.setSelection(e.anchor,u);return e.mathfield.stopCoalescingUndo(),d}if(e.selectionIsPlaceholder){e.collapseSelection(t);const u=io(e,t);return e.mathfield.stopCoalescingUndo(),u}let a=e.position;const s=a;if(e.collapseSelection(t)?(a=e.position,uh(e,a)||(a=qd(e,a,t))):a=qd(e,a,t),a<0||a>e.lastOffset){let u=!0;return e.silenceNotifications||(u=(i=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))!=null?i:!0),u&&e.announce("plonk"),u}return e.setPositionHandlingPlaceholder(a),e.mathfield.stopCoalescingUndo(),e.announce("move",s),!0}function qd(e,t,r){return t=t+(r==="forward"?1:-1),t<0||t>e.lastOffset||uh(e,t)?t:qd(e,t,r)}function uh(e,t){var r;const n=e.at(t);let i=n.parent;for(;i&&!i.inCaptureSelection;)i=i.parent;return!(i!=null&&i.inCaptureSelection||(r=n.parent)!=null&&r.skipBoundary&&(!n.isFirstSibling&&n.isLastSibling||n.type==="first")||e.mathfield.hasEditablePrompts&&!n.parentPrompt)}function jm(e,t,r){let n=1/0,i=0;for(;i<t.length;i++){const a=md(e.getHTMLElement(t[i])).right,s=Math.abs(r-a);if(s<=n)n=s;else break}return t[i-1]}function Xd(e,t,r,n,i){const a=e.mathfield.hasEditablePrompts,s=a?r.filter(h=>h.type==="prompt"&&!h.captureSelection):r,u=md(e.mathfield.getHTMLElement(t)).right,d=e.offsetOf(jm(e.mathfield,s,u))-(a?1:0);if(n){const[h,p]=e.selection.ranges[0];let y;d<(i==="up"?h:p)?y={ranges:[[d,p]],direction:"backward"}:y={ranges:[[h,d]],direction:"forward"},e.setSelection(y)}else e.setPositionHandlingPlaceholder(d);e.announce(`move ${i}`)}function Um(e,t){var r,n;const i=(r=t==null?void 0:t.extend)!=null?r:!1;i||e.collapseSelection("backward");const a=()=>{var d,h;let p=!0;return e.silenceNotifications||(p=(h=(d=e.mathfield.host)==null?void 0:d.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?h:!0),e.announce(p?"plonk":"line"),p},s=e.at(e.position);let u=s;for(;u&&u.parentBranch!=="below"&&!(Array.isArray(u.parentBranch)&&u.parent instanceof jr);)u=u.parent;if(Array.isArray(u==null?void 0:u.parentBranch)&&u.parent instanceof jr){const d=u.parent;if(u.parentBranch[0]<1)return a();const h=u.parentBranch[0]-1,p=d.array[h][u.parentBranch[1]];if(!p.some(M=>M.type==="prompt"&&!M.captureSelection)&&e.mathfield.hasEditablePrompts)return a();Xd(e,s,p,i,"up")}else if(u){const d=(n=u.parent.branch("above"))!=null?n:u.parent.createBranch("above");if(!d.some(p=>p.type==="prompt"&&p.placeholderId)&&e.mathfield.hasEditablePrompts)return a();Xd(e,s,d,i,"up")}else return a();return e.mathfield.stopCoalescingUndo(),!0}function Gm(e,t){var r,n;const i=(r=t==null?void 0:t.extend)!=null?r:!1;i||e.collapseSelection("forward");const a=()=>{var d,h;let p=!0;return e.silenceNotifications||(p=(h=(d=e.mathfield.host)==null?void 0:d.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?h:!0),e.announce(p?"plonk":"line"),p},s=e.at(e.position);let u=s;for(;u&&u.parentBranch!=="above"&&!(Array.isArray(u.parentBranch)&&u.parent instanceof jr);)u=u.parent;if(Array.isArray(u==null?void 0:u.parentBranch)&&u.parent instanceof jr){const d=u.parent;if(u.parentBranch[0]+1>d.array.length-1)return a();const h=u.parentBranch[0]+1,p=d.array[h][u.parentBranch[1]];if(!p.some(M=>M.type==="prompt"&&!M.captureSelection)&&e.mathfield.hasEditablePrompts)return a();Xd(e,s,p,i,"down")}else if(u){const d=(n=u.parent.branch("below"))!=null?n:u.parent.createBranch("below");if(!d.some(p=>p.type==="prompt")&&e.mathfield.hasEditablePrompts)return a();Xd(e,s,d,i,"down")}else return a();return!0}function dh(e){const t=e.position,r=e.at(t).parent;return r!=null&&r.parent?(e.position=e.offsetOf(r),e.mathfield.stopCoalescingUndo(),e.announce("move",t),!0):(e.announce("plonk"),!1)}function qm(e){let t=0,r=e.at(e.position),n=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(t+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(n=!1):n=!0,r=r.parent;return n?t:0}function Xm(e){let t=0,r=e.at(e.position),n=!1;for(;r;)(!r.hasEmptyBranch("superscript")||!r.hasEmptyBranch("subscript"))&&(t+=1),r.hasEmptyBranch("superscript")?r.hasEmptyBranch("subscript")||(n=!0):n=!1,r=r.parent;return n?t:0}function fh(e){var t;if(e.collapseSelection(),qm(e)>=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;let r=e.at(e.position);return r.subsupPlacement===void 0&&(((t=r.rightSibling)==null?void 0:t.type)!=="subsup"&&r.parent.addChildAfter(new m({style:r.computedStyle}),r),r=r.rightSibling),r.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(r.superscript[0]))),!0}function hh(e){var t;if(e.collapseSelection(),Xm(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;let r=e.at(e.position);return r.subsupPlacement===void 0&&(((t=e.at(e.position+1))==null?void 0:t.type)!=="subsup"&&r.parent.addChildAfter(new m({style:e.at(e.position).computedStyle}),r),r=e.at(e.position+1)),r.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(r.subscript[0]))),!0}function Jm(){function e(d){const h=[],p=[];return[...d.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(t).forEach((M,I)=>{const $=n(M);$===0?h.push(M):p.push({documentOrder:I,tabIndex:$,node:M})}),p.sort((M,I)=>M.tabIndex===I.tabIndex?M.documentOrder-I.documentOrder:M.tabIndex-I.tabIndex).map(M=>M.node).concat(h)}function t(d){return!(!r(d)||i(d)||n(d)<0)}function r(d){return!(d.disabled||d.type==="hidden"&&d.tagName.toUpperCase()==="INPUT"||u(d))}function n(d){var h;const p=Number.parseInt((h=d.getAttribute("tabindex"))!=null?h:"NaN",10);return Number.isNaN(p)?d.contentEditable==="true"||(d.nodeName==="AUDIO"||d.nodeName==="VIDEO")&&d.getAttribute("tabindex")===null?0:d.tabIndex:p}function i(d){return d.tagName.toUpperCase()==="INPUT"&&d.type==="radio"&&!s(d)}function a(d,h){for(const p of d)if(p.checked&&p.form===h)return p;return null}function s(d){var h;if(!d.name)return!0;const y=((h=d.form)!=null?h:d.ownerDocument).querySelectorAll('input[type="radio"][name="'+d.name+'"]'),M=a(y,d.form);return!M||M===d}function u(d){if(!Ke()||d===document.activeElement||d.contains(document.activeElement))return!1;if(getComputedStyle(d).visibility==="hidden")return!0;const h=d.getBoundingClientRect();if(h.width===0||h.height===0)return!0;for(;d;){if(getComputedStyle(d).display==="none")return!0;d=d.parentElement}return!1}return Ke()?e(document.body):[]}function Si(e,t,r="forward"){const n=e.position;if(Array.isArray(t)){const i=e.offsetOf(t[0]),a=e.offsetOf(t[t.length-1]);return r==="forward"?e.setSelection(i,a):e.setSelection(a,i),e.announce("move",n),e.mathfield.stopCoalescingUndo(),!0}return r==="forward"?Si(e,[t.leftSibling,t]):Si(e,[t,t.leftSibling])}function Ra(e,t){const r=e.position;if(typeof t=="number"&&(t=e.at(t)),t.type==="prompt")e.setSelection(e.offsetOf(t.firstChild),e.offsetOf(t.lastChild));else{const n=e.offsetOf(t);t.type==="placeholder"?e.setSelection(n-1,n):e.position=n}return e.announce("move",r),e.mathfield.stopCoalescingUndo(),!0}function Jd(e,t,r=!0){var n,i;const a=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&io(e,t);let s;const u=e.at(e.anchor).parentPrompt;u?t==="forward"?s=e.offsetOf(u)+1:s=e.offsetOf(u.leftSibling):s=Math.max(e.position+a,0);const d=hf(e,s,t);if(!d||t==="forward"&&e.offsetOf(d)<s||t==="backward"&&e.offsetOf(d)>s){if(!r||!((i=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null||i))return e.announce("plonk"),!1;const p=Jm();if(!document.activeElement||p.length<=1)return e.announce("plonk"),!1;let y=p.indexOf(document.activeElement)+a;return y<0&&(y=p.length-1),y>=p.length&&(y=0),p[y].focus(),e.mathfield.stopCoalescingUndo(),!0}return Ra(e,d),!0}function hf(e,t=0,r="forward"){return e.findAtom(n=>n.type==="placeholder"||n.type==="prompt"||!e.mathfield.readOnly&&n.treeDepth>2&&n.isFirstSibling&&n.isLastSibling,t,r)}Vi({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},r=e.at(e.position),{parent:n}=r;if(!n)return e.announce("plonk"),!1;const i=r.parentBranch;let a;if(typeof i=="string"&&(a=t[i]),!a){const u=r.subsupPlacement?hh(e):fh(e);return e.mathfield.stopCoalescingUndo(),u}n.branch(a)||n.createBranch(a);const s=e.setSelection(e.getBranchRange(e.offsetOf(n),a));return e.mathfield.stopCoalescingUndo(),s},moveBeforeParent:e=>{const{parent:t}=e.at(e.position);return t?(e.position=e.offsetOf(t),e.mathfield.stopCoalescingUndo(),!0):(e.announce("plonk"),!1)},moveAfterParent:e=>dh(e),moveToNextChar:e=>io(e,"forward"),moveToPreviousChar:e=>io(e,"backward"),moveUp:e=>io(e,"upward"),moveDown:e=>io(e,"downward"),moveToNextWord:e=>Wl(e,"forward"),moveToPreviousWord:e=>Wl(e,"backward"),moveToGroupStart:e=>{const t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:e=>{const t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:e=>{var t,r,n,i;if(e.position===e.lastOffset&&e.anchor===e.lastOffset)return Jd(e,"forward");const a=e.at(e.position);if(a.mode==="text"){if(e.selectionIsCollapsed){let M=a;for(;M&&M.mode==="text";)M=M.leftSibling;let I=a;for(;((t=I.rightSibling)==null?void 0:t.mode)==="text";)I=I.rightSibling;if(M&&I)return Si(e,[M,I])}if(a.rightSibling.mode==="text"){let M=a;for(;M&&M.mode==="text";)M=M.rightSibling;return M?(Ra(e,(r=M.leftSibling)!=null?r:M),e.mathfield.switchMode("math"),!0):Ra(e,e.lastOffset)}}const u=e.at(e.anchor).parentPrompt,d=u?e.offsetOf(u)+1:Math.max(e.position+1,0),h=hf(e,d,"forward");if(h)return Ra(e,h);const p=ph(e,a,M=>M.type==="leftright"||M.type==="text","forward");if(p){if(p.mode==="text"){let M=p;for(;M&&M.mode==="text";)M=M.rightSibling;return Si(e,[(n=p.leftSibling)!=null?n:p,(i=M.leftSibling)!=null?i:M])}return Si(e,p)}const y=a.parent;if(y){if(y.type==="leftright"||y.type==="surd")return Si(e,y);if(a.parentBranch==="superscript"&&y.subscript)return Si(e,y.subscript);if(a.parentBranch==="above"&&y.below)return Si(e,y.below);if(a.parentBranch==="superscript"||a.parentBranch==="subscript")return Ra(e,y);if(a.parentBranch==="above"||a.parentBranch==="below")return Si(e,y)}return Ra(e,e.lastOffset)},moveToPreviousGroup:e=>{var t;if(e.position===0&&e.anchor===0)return Jd(e,"backward");let r=e.at(e.position);const n=r.mode;if(n==="text"){if(e.selectionIsCollapsed){let u=r;for(;u&&u.mode==="text";)u=u.leftSibling;let d=r;for(;((t=d.rightSibling)==null?void 0:t.mode)==="text";)d=d.rightSibling;if(u&&d)return Si(e,[u,d])}for(;r&&r.mode==="text";)r=r.leftSibling;return r?Ra(e,r):Ra(e,0)}const i=e.at(e.anchor).parentPrompt,a=i?e.offsetOf(i.leftSibling):Math.max(e.position-1,0),s=hf(e,a,"backward");if(s)return Ra(e,s);if(n==="math"){const u=ph(e,r,h=>h.type==="leftright"||h.type==="text","backward");if(u){if(u.mode==="text"){let h=u;for(;h&&h.mode==="text";)h=h.leftSibling;return Si(e,[u,h])}return Si(e,u)}const d=r.parent;if(d){if(d.type==="leftright"||d.type==="surd")return Si(e,d);if(r.parentBranch==="subscript"&&d.superscript)return Si(e,d.superscript);if(r.parentBranch==="below"&&d.above)return Si(e,d.above);if(r.parentBranch==="superscript"||r.parentBranch==="subscript")return Ra(e,d);if(r.parentBranch==="above"||r.parentBranch==="below")return Si(e,d)}return Ra(e,0)}return!1},moveToMathfieldStart:e=>e.selectionIsCollapsed&&e.position===0?(e.announce("plonk"),!1):(e.position=0,e.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:e=>e.selectionIsCollapsed&&e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,e.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:fh,moveToSubscript:hh},{target:"model",changeSelection:!0}),Vi({moveToNextPlaceholder:e=>Jd(e,"forward"),moveToPreviousPlaceholder:e=>Jd(e,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function ph(e,t,r,n){if(n==="forward"){let a=t.rightSibling;for(;a&&!r(a);)a=a.rightSibling;return a}let i=t.leftSibling;for(;i&&!r(i);)i=i.leftSibling;return i}function Yd(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let n=e.position,i=!1,a="";for(;!i;){const s=e.at(n);i=t===0||s===void 0||s.type==="first"||s.mode!=="math"||!(s.type&&/mord|mpunct|operator/.test(s.type)||s.type==="mop"&&/[a-zA-Z ]+/.test(s.value))||!s.hasEmptyBranch("superscript")||!s.hasEmptyBranch("subscript")||typeof r=="function"&&!r(s),i||(s.mode="text",s.command=s.value,s.verbatimLatex=void 0,a+=s.value),n-=1,t-=1}e.contentDidChange({data:a,inputType:"insertText"})}function Ns(e,t,r){typeof t=="function"&&(r=t,t=1/0),t===void 0&&(t=1/0);let n=e.position,i=!1;const a=[];for(;!i;){const s=e.at(n);i=t===0||!s||s.type==="first"||s.isFirstSibling||s.mode!=="text"||s.value===" "||typeof r=="function"&&!r(s),i||(a.push(_e.serialize([s],{defaultMode:"math"})),s.mode="math"),n-=1,t-=1}pf(e),e.contentDidChange({data:Cr(a),inputType:"insertText"})}function pf(e){var t;let r=e.position-1;for(;r>=0&&((t=e.at(r))==null?void 0:t.mode)==="math";)r-=1;if(!(r<0)&&e.at(r).mode==="text"&&e.at(r).value===" "&&e.at(r-1).mode==="math"){e.at(r-1).parent.removeChild(e.at(r-1));const n=e.silenceNotifications;e.silenceNotifications=!0,e.position-=1,e.silenceNotifications=n,e.contentDidChange({inputType:"deleteContent"})}}function Ym(e){let t="",r=e.position,n=!1;for(;!n;){const i=e.at(r);n=!(i&&(i.mode==="text"||i.mode==="math"&&i.type&&/mord|mpunct/.test(i.type))),n||(t=i.value+t),r-=1}return t}function Qm(e,t,r){const{model:n}=e;if(n.mode==="latex"||!n.at(n.position).isLastSibling||!r||!Id(r))return!1;const i=Ol(r);if(!n.selectionIsCollapsed)return!!(e.model.mode==="text"&&/[/_^]/.test(i));const a=Ym(n)+i;if(e.model.mode==="text"){if(t==="Esc"||/[/\\]/.test(i))return!0;if(/[\^_]/.test(i))return/(^|\s)[a-zA-Z][^_]$/.test(a)&&Ns(n,1),!0;const s={")":"(","}":"{","]":"["}[i],{parent:u}=n.at(n.position);if(s&&u instanceof ln&&u.leftDelim===s)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(a))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(i))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(a))return Ns(n,1),!1;if(/\D\.[^\d\s]$/.test(a)){Ns(n,1);const d=n.at(n.position);return d.value="\u22C5",d.style.variant="normal",d.command="\\cdot",d.verbatimLatex=void 0,n.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(a)||/\.\d$/.test(a)||/\([\d+\-.]$/.test(a))return Ns(n,1),!0;if(/\([a-z][,;]$/.test(a))return Ns(n,2),!0;if(/[\d+\-=><*|]$/.test(i))return pf(n),!0}else{if(t==="[Space]")return Yd(n,void 0,s=>/[a-z][:,;.]$/.test(s.value)),!0;if(/[a-zA-Z]{3,}$/.test(a)&&!/(dxd|abc|xyz|uvw)$/.test(a))return Yd(n,void 0,s=>/[a-zA-Z]/.test(s.value)),!0;if(/(^|\W)(if)$/i.test(a))return Yd(n,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 Yd(n,void 0,s=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(s.value)),!0;if(i==="?"||i==="."&&!/[\d-+]\.$/.test(a))return!0}return!1}function eg(e,t){if(!e.isSelectionEditable||!e.keystrokeCaptionVisible)return;const r=mh(),n=e.element.getBoundingClientRect();r.style.left=`${n.left}px`,r.style.top=`${n.top-64}px`,r.innerHTML=window.MathfieldElement.createHTML("<span>"+(tf(t)||t)+"</span>"+r.innerHTML),r.style.visibility="visible",setTimeout(()=>{r.childNodes.length>0&&r.childNodes[r.childNodes.length-1].remove(),r.childNodes.length===0&&(r.style.visibility="hidden")},3e3)}function tg(e){if(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible){const t=mh();t.innerHTML=""}else{const t=Pd("mathlive-keystroke-caption-panel");t.style.visibility="hidden"}return!1}function mh(){const e=document.getElementById("mathlive-keystroke-caption-panel");return e||(Yi("keystroke-caption"),Yi("core"),Pd("mathlive-keystroke-caption-panel"))}function rg(){document.getElementById("mathlive-keystroke-caption-panel")&&(nf("mathlive-keystroke-caption-panel"),pa("core"),pa("keystroke-caption"))}function gh(e,t){var r,n,i;const{model:a}=e,s=Wf(t);if(t.isTrusted){Zp(t);const I=Hc();e.keyboardLayout!==I.id&&(e.keyboardLayout=I.id,e._keybindings=void 0)}if(clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,eg(e,s),t.isTrusted&&t.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;let u,d="",h;const p=e.inlineShortcutBuffer;if(e.isSelectionEditable){if(a.mode==="math")if(s==="[Backspace]")p.pop();else if(!Id(t))e.flushInlineShortcutBuffer();else{const I=Ol(t),$=[...(n=(r=p[p.length-1])==null?void 0:r.keystrokes)!=null?n:[],I];p.push({state:a.getState(),keystrokes:$,leftSiblings:ng(e)});let se=0,Ze="";for(;!u&&se<$.length;)h=p.length-($.length-se),Ze=$.slice(se).join(""),u=Bc(p[h].leftSiblings,Ze,e.options.inlineShortcuts),!u&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(Ze)&&(u=e.options.onInlineShortcut(e,Ze)),se+=1;e.flushInlineShortcutBuffer({defer:!0})}e.options.smartMode&&(u?e.switchMode("math"):Qm(e,s,t)&&(e.switchMode({math:"text",text:"math"}[a.mode]),d=""))}if(!u){if(d||(d=Yp(e.keybindings,a.mode,t)),!d&&(s==="[Enter]"||s==="[Return]")){let I=!1;return a.contentWillChange({inputType:"insertLineBreak"})&&(e.host&&(I=!e.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),I||t.preventDefault&&(t.preventDefault(),t.stopPropagation()),a.contentDidChange({inputType:"insertLineBreak"})),I}if((!d||s==="[Space]")&&a.mode==="math"){if(s==="[Space]"){if(e.adoptStyle="none",e.flushInlineShortcutBuffer(),e.options.mathModeSpace)return Qr.insert(a,e.options.mathModeSpace,{format:"latex",mode:"math"}),e.snapshot("insert-space"),d="",e.dirty=!0,e.scrollIntoView(),t.preventDefault&&(t.preventDefault(),t.stopPropagation()),!1;const I=a.at(a.position+1),$=a.at(a.position-1);if((I==null?void 0:I.mode)==="text"||($==null?void 0:$.mode)==="text")return Qr.insert(a," ",{mode:"text"}),e.snapshot("insert-space"),e.dirty=!0,e.scrollIntoView(),!1}(i=a.at(a.position))!=null&&i.isDigit()&&window.MathfieldElement.decimalSeparator===","&&Ol(t)===","&&(d="insertDecimalSeparator")}}if(!u&&!d){if(a.mathfield.smartFence){if(gf(a,Ol(t),e.effectiveStyle))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}else{const{parent:I}=a.at(a.position);if(I instanceof ln&&I.rightDelim==="?"&&a.at(a.position).isLastSibling&&/^[)}\]|]$/.test(s))return e.snapshot(),I.isDirty=!0,I.rightDelim=s,a.position+=1,a.selectionDidChange(),a.contentDidChange({data:Ol(t),inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;if(!a.selectionIsCollapsed){const $=Ol(t);if($==="("||$==="{"||$==="["){const se={"(":"(","{":"\\lbrace","[":"\\lbrack"}[$],Ze={"(":")","{":"\\rbrace","[":"\\rbrack"}[$],[ee,De]=Qn(a.selection);return e.snapshot(),a.position=De,Qr.insert(a,Ze,{format:"latex"}),a.position=ee,Qr.insert(a,se,{format:"latex"}),a.setSelection(ee+1,De+1),a.contentDidChange({data:$,inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}}}return!0}const y=a.at(Math.max(a.position,a.anchor)),{parent:M}=y;if(d==="moveAfterParent"&&(M==null?void 0:M.type)==="leftright"&&y.isLastSibling&&e.options.smartFence&&gf(a,".",e.defaultStyle)&&(d="",xn(e)),e.keyboardDelegate.cancelComposition(),d)e.executeCommand(d);else if(u){const I=e.effectiveStyle;a.setState(p[h].state);const $=p[p.length-1].keystrokes;for(const se of $)Qr.insert(a,se,{silenceNotifications:!0,style:I});e.snapshot("insert-shortcut"),a.setState(p[h].state),a.deferNotifications({content:!0,selection:!0,data:u,type:"insertText"},()=>(Qr.insert(a,u,{format:"latex",style:I}),pf(e.model),u.endsWith(" ")&&(e.switchMode("text"),Qr.insert(a," ",{style:I,mode:"text"})),e.snapshot(),a.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0)),e.dirty=!0,a.announce("replacement")}return e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}function mf(e,t,r){const{model:n}=e;if(!e.isSelectionEditable){n.announce("plonk");return}r!=null||(r={}),r.focus&&e.focus(),r.feedback&&window.MathfieldElement.playSound("keypress"),typeof r.mode=="string"&&(e.switchMode(r.mode),e.snapshot());let i=ed(t);const a=window.mathVirtualKeyboard;if(a!=null&&a.isShifted&&(i=typeof i=="string"?i.toUpperCase():i.map(d=>d.toUpperCase())),r.simulateKeystroke){let d=!0;for(const h of i)gh(e,new KeyboardEvent("keypress",{key:h}))&&(d=!1);if(d)return}const s=n.at(n.position),u=S(S({},s.computedStyle),e.defaultStyle);if(n.selectionIsCollapsed||(n.deleteAtoms(Qn(n.selection)),e.snapshot("delete")),n.mode==="latex")n.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},()=>{Td(e);for(const d of i)Qr.insert(n,d);e.snapshot("insert-latex"),Vc(e)});else if(n.mode==="text"){for(const d of i)Qr.insert(n,d,{style:u});e.snapshot("insert-text")}else if(n.mode==="math")for(const d of i)ig(e,d,u,s);e.dirty=!0,e.scrollIntoView()}function ng(e){const t=e.model,r=[];let n=t.at(Math.min(t.position,t.anchor));for(;n.type!=="first";)r.push(n),n=n.leftSibling;return r}function ig(e,t,r,n){const i=e.model;let a={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(t===" "&&e.options.mathModeSpace&&(a=["insert",e.options.mathModeSpace]),a){e.executeCommand(a);return}if(/\d/.test(t)&&e.options.smartSuperscript&&n.parentBranch==="superscript"&&n.parent.type!=="mop"&&n.parent.type!=="operator"&&n.parent.type!=="extensible-symbol"&&n.hasNoSiblings){ag(i),Qr.insert(i,t,{style:r}),e.snapshot(),dh(i),e.snapshot();return}if(/[a-zA-Z0-9]/.test(t)&&e.adoptStyle!=="none"){const s=e.adoptStyle==="left"?n:n.parent?n.rightSibling:null;(s==null?void 0:s.type)==="mord"&&/[a-zA-Z0-9]/.test(s.value)&&(r=S({},r),s.style.variant&&(r.variant=s.style.variant),s.style.variantStyle&&(r.variantStyle=s.style.variantStyle))}Qr.insert(i,t,{style:r}),e.snapshot(`insert-${i.at(i.position).type}`)}function ag(e){e.selectionIsCollapsed||(e.deleteAtoms(Qn(e.selection)),e.mathfield.snapshot("delete"))}function gf(e,t,r){if(!t||e.mode!=="math")return!1;const n=e.at(e.position),{parent:i}=n,a={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[t];if(!a)return!1;const s=kl[a],u=El[a];if(!e.selectionIsCollapsed){e.mathfield.snapshot();const[d,h]=Qn(e.selection),p=e.extractAtoms([d,h]),y=i.addChildrenAfter([new ln("left...right",p,{leftDelim:a,rightDelim:u})],e.at(d));return e.setSelection(e.offsetOf(y.firstChild),e.offsetOf(y.lastChild)),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:a,inputType:"insertText"}),!0}if(a==="|"){const d=i instanceof ln?i.leftDelim+i.rightDelim:"";if(d==="\\lbrace\\rbrace"||d==="\\{\\}"||d==="\\lbrace?")return e.mathfield.snapshot(),Qr.insert(e,"\\,\\middle\\vert\\,",{format:"latex",style:r}),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:a,inputType:"insertText"}),!0}if(u){if(i instanceof ln&&i.firstChild===n&&(i.leftDelim==="?"||i.leftDelim==="."))return i.leftDelim=a,i.isDirty=!0,e.mathfield.snapshot(),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(!(i instanceof ln)){let y=n;for(;y&&!(y.type==="mclose"&&y.value===u);)y=y.rightSibling;if(y){e.mathfield.snapshot();const M=e.extractAtoms([e.offsetOf(n),e.offsetOf(y)]);return M.pop(),i.addChildrenAfter([new ln("left...right",M,{leftDelim:a,rightDelim:u})],n),e.position=e.offsetOf(i.firstChild)+1,e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}}const d=e.offsetOf(n.lastSibling);let h;for(h=e.position;h<=d;h++){const y=e.at(h);if(y instanceof ln&&(y.leftDelim==="?"||y.leftDelim===".")&&vh(a,y.rightDelim))break}const p=e.at(h);if(h<=d&&p instanceof ln){p.leftDelim=a,e.mathfield.snapshot();let y=e.extractAtoms([e.position,h-1]);return y=y.filter(M=>M.type!=="first"),p.addChildren(y,p.parentBranch),e.position+=1,e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(i instanceof ln&&(i.leftDelim==="?"||i.leftDelim===".")&&vh(a,i.rightDelim)){i.isDirty=!0,i.leftDelim=a,e.mathfield.snapshot();const y=e.extractAtoms([e.offsetOf(n.firstSibling),e.position]);for(const M of y)i.parent.addChildBefore(M,i);return e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(!(i instanceof ln&&i.leftDelim==="|")){if(e.mathfield.snapshot(),Qr.insert(e,`\\left${a}\\right?`,{format:"latex",style:r}),n.lastSibling.type!=="first"){const y=e.offsetOf(n.lastSibling),M=e.extractAtoms([e.position,y]);e.at(e.position).body=M,e.position-=1}return e.mathfield.snapshot("insert-fence"),!0}}if(s){let d=n;for(;d;){if(d.type==="mopen"&&d.value===s){e.mathfield.snapshot();const I=d.leftSibling,$=e.extractAtoms([e.offsetOf(d.leftSibling),e.offsetOf(n)]);$.shift();const se=new ln("left...right",$,{leftDelim:s,rightDelim:a});return i.addChildrenAfter([se],I),e.position=e.offsetOf(se),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}d=d.leftSibling}if(i instanceof ln&&n.isLastSibling&&vf(i.leftDelim,a))return e.mathfield.snapshot(),i.isDirty=!0,i.rightDelim=a,e.position+=1,e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;const h=e.offsetOf(n.firstSibling);let p;for(p=e.position;p>=h;p--){const I=e.at(p);if(I instanceof ln&&(I.rightDelim==="?"||I.rightDelim===".")&&vf(I.leftDelim,a))break}const y=e.at(p);if(p>=h&&y instanceof ln)return e.mathfield.snapshot(),y.rightDelim=a,y.addChildren(e.extractAtoms([p,e.position]),y.parentBranch),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(i instanceof ln&&(i.rightDelim==="?"||i.rightDelim===".")&&vf(i.leftDelim,a))return e.mathfield.snapshot(),i.isDirty=!0,i.rightDelim=a,i.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(n.lastSibling)]),i.parentBranch),e.position=e.offsetOf(i),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;const M=i.parent;return M instanceof ln&&(M.rightDelim==="?"||M.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(M),gf(e,a,r)):!1}return!1}function vf(e,t){return e?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t):El[e]===t:!0}function vh(e,t){return t?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e):kl[t]===e:!0}Vi({undo:e=>(e.undo(),!0),redo:e=>(e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},toggleKeystrokeCaption:tg,toggleContextMenu:e=>{const t=e.toggleContextMenu();return t||e.model.announce("plonk"),t},plonk:e=>(e.model.announce("plonk"),!0),switchMode:(e,t,r,n)=>(e.switchMode(t,r,n),!0),insert:(e,t,r)=>e.insert(t,r),typedText:(e,t,r)=>(mf(e,t,r),!0),insertDecimalSeparator:e=>{const t=e.model;return t.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&t.at(Math.max(t.position,t.anchor)).isDigit()?(e.insert("{,}",{format:"latex"}),e.snapshot("insert-mord"),!0):(e.insert("."),!0)},commit:e=>{var t;return e.model.contentWillChange({inputType:"insertLineBreak"})&&((t=e.host)==null||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(e,t,r)=>{const n=e.getPrompts();let i="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),a=0;for(;n.includes(i)&&a<100;){if(a===99)return console.error("could not find a unique ID after 100 tries"),!1;i="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),a++}return e.insert(`\\placeholder[${t!=null?t:i}]{}`,r),!0}}),Vi({copyToClipboard:e=>(e.focus(),e.model.selectionIsCollapsed&&e.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),Vi({cutToClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(t=>{t&&e.model.contentWillChange({inputType:"insertFromPaste",data:t})?(e.stopCoalescingUndo(),e.stopRecording(),e.insert(t,{mode:e.model.mode})&&(Vc(e),e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),xn(e))):e.model.announce("plonk"),e.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function og(e,t){e.flushInlineShortcutBuffer(),e.stopCoalescingUndo();const r=bf(e,t),{model:n}=e;return n.selectionIsCollapsed?(e.defaultStyle.fontSeries&&r.fontSeries===e.defaultStyle.fontSeries&&(r.fontSeries="auto"),r.fontShape&&r.fontShape===e.defaultStyle.fontShape&&(r.fontShape="auto"),r.color&&r.color===e.defaultStyle.color&&(r.color="none"),r.backgroundColor&&r.backgroundColor===e.defaultStyle.backgroundColor&&(r.backgroundColor="none"),r.fontSize&&r.fontSize===e.defaultStyle.fontSize&&(r.fontSize="auto"),e.defaultStyle=S(S({},e.defaultStyle),r)):e.model.deferNotifications({content:!0,type:"insertText"},()=>{n.selection.ranges.forEach(i=>uf(n,i,r,{operation:"toggle"})),e.snapshot("style-change")}),!0}Vi({applyStyle:og},{target:"mathfield",canUndo:!0,changeContent:!0});function bf(e,t){var r,n,i,a,s,u,d,h,p,y;const M={};if(typeof t.color=="string"){const $=(n=e.colorMap((r=t.color)!=null?r:t.verbatimColor))!=null?n:"none";$!==t.color&&(M.verbatimColor=(i=t.verbatimColor)!=null?i:t.color),M.color=$}if(typeof t.backgroundColor=="string"){const $=(s=e.backgroundColorMap((a=t.backgroundColor)!=null?a:t.verbatimBackgroundColor))!=null?s:"none";$!==t.backgroundColor&&(M.verbatimBackgroundColor=(u=t.verbatimBackgroundColor)!=null?u:t.backgroundColor),M.backgroundColor=$}typeof t.fontFamily=="string"&&(M.fontFamily=t.fontFamily),typeof t.series=="string"&&(M.fontSeries=t.series),typeof t.fontSeries=="string"&&(M.fontSeries=t.fontSeries.toLowerCase()),M.fontSeries&&(M.fontSeries=(d={bold:"b",medium:"m",normal:"m"}[M.fontSeries])!=null?d:M.fontSeries),typeof t.shape=="string"&&(M.fontShape=t.shape),typeof t.fontShape=="string"&&(M.fontShape=t.fontShape.toLowerCase()),M.fontShape&&(M.fontShape=(h={italic:"it",up:"n",upright:"n",normal:"n"}[M.fontShape])!=null?h:M.fontShape),t.variant&&(M.variant=t.variant.toLowerCase()),t.variantStyle&&(M.variantStyle=t.variantStyle.toLowerCase());const I=(p=t.size)!=null?p:t.fontSize;return typeof I=="number"?M.fontSize=Math.max(1,Math.min(10,I)):typeof I=="string"&&(M.fontSize=(y={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[I.toLowerCase()])!=null?y:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[I]),M}function yf(e){let[t,r]=Qn(e.selection);if(t=bh(e,t,"backward"),r=bh(e,r,"forward"),t===r){const n=e.at(t);if(n.type==="leftright")return e.setSelection(e.offsetOf(n.firstChild)-1,r);if(n.type==="first"&&(n.parent.type==="leftright"||n.parent.type==="surd"))return e.setSelection(t-1,e.offsetOf(n.parent.lastChild)+1);e.setSelection(t-1,r)}else e.setSelection(t,r);return!0}function bh(e,t,r){var n,i,a;let s=e.at(t);if(!s)return t;const u=r==="forward"?1:-1;if(s.mode==="text"){for(;s&&!(s.mode!=="text"||!K.test(s.value));)t+=u,s=e.at(t);return r==="backward"?t-1:t}if(s.mode==="latex"){if(/[a-zA-Z\*]/.test(s.value))if(r==="backward")for(;s&&s.mode==="latex"&&s.value!=="\\"&&/[a-zA-Z]/.test(s.value);)t+=u,s=e.at(t);else for(;s&&s.mode==="latex"&&/[a-zA-Z\*]/.test(s.value);)t+=u,s=e.at(t);else if(s.value==="{"){if(r==="forward"){for(;s&&s.mode==="latex"&&s.value!=="}";)t+=u,s=e.at(t);return t}return t-1}else if(s.value==="}"){if(r==="backward"){for(;s&&s.mode==="latex"&&s.value!=="{";)t+=u,s=e.at(t);return t-1}return t}return t-1}if(s.mode==="math"){if(s.isDigit()){for(;(n=e.at(t+u))!=null&&n.isDigit();)t+=u;return r==="backward"?t-1:t}if(s.style.variant||s.style.variantStyle){let d=(i=e.at(t))==null?void 0:i.style;for(;d&&d.variant===s.style.variant&&d.variantStyle===s.style.variantStyle;)d=(a=e.at(t+u))==null?void 0:a.style,t+=u;return r==="backward"?t-1:t}return t}return t}Vi({selectGroup:e=>{const t=yf(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>io(e,"forward",{extend:!0}),extendSelectionBackward:e=>io(e,"backward",{extend:!0}),extendToNextWord:e=>Wl(e,"forward",{extend:!0}),extendToPreviousWord:e=>Wl(e,"backward",{extend:!0}),extendSelectionUpward:e=>io(e,"upward",{extend:!0}),extendSelectionDownward:e=>io(e,"downward",{extend:!0}),extendToNextBoundary:e=>Wl(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>Wl(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",changeSelection:!0});var Fs=null,Xc=0,Qd=class ya{static start(t,r,n,i){var a;ya.element=t,(a=ya.controller)==null||a.abort(),ya.controller=new AbortController;const s={signal:ya.controller.signal};"PointerEvent"in window?(t.addEventListener("pointermove",n,s),t.addEventListener("pointerup",i,s),t.addEventListener("pointercancel",i,s),xf(r)&&(ya.pointerId=r.pointerId,t.setPointerCapture(r.pointerId))):(window.addEventListener("mousemove",n,s),window.addEventListener("blur",i,s),window.addEventListener("mouseup",i,s))}static stop(){var t;(t=ya.controller)==null||t.abort(),ya.controller=void 0,typeof ya.pointerId=="number"&&(ya.element.releasePointerCapture(ya.pointerId),ya.pointerId=void 0)}};function xf(e){return e!==null&&globalThis.PointerEvent!==void 0&&e instanceof PointerEvent}function yh(e,t){var r;if(t.buttons>1)return;e.atomBoundsCache=new Map;const n=e;let i,a=!1,s=!1,u="none",d=!1,h=!1;const p=t.clientX,y=t.clientY,M=Date.now(),I=n.field,$=setInterval(()=>{d?I.scroll({top:0,left:I.scrollLeft-16}):h&&I.scroll({top:0,left:I.scrollLeft+16})},32);function se(){Qd.stop(),a=!1,clearInterval($),e.element.classList.remove("tracking"),t&&t.preventDefault()}function Ze(De){if(!n.hasFocus()){se();return}const Je=De.clientX,Te=De.clientY,yt=xf(De)&&De.pointerType==="touch"?20:5;if(Date.now()<M+500&&Math.abs(p-Je)<yt&&Math.abs(y-Te)<yt){De.preventDefault(),De.stopPropagation();return}const Rt=I.getBoundingClientRect();h=Je>Rt.right,d=Je<Rt.left;let Dt=i;xf(De)&&(De.isPrimary||(Dt=Jc(n,De.clientX,De.clientY,{bias:0})));const Ar=Jc(n,Je,Te,{bias:Je<=p?Je===p?0:-1:1});Dt>=0&&Ar>=0&&(n.model.extendSelectionTo(Dt,Ar),xn(e)),s&&yf(n.model)}Fs&&Math.abs(Fs.x-p)<5&&Math.abs(Fs.y-y)<5&&Date.now()<Fs.time+500?(Xc+=1,Fs.time=M):(Fs={x:p,y,time:M},Xc=1);const ee=I.getBoundingClientRect();if(p>=ee.left&&p<=ee.right&&y>=ee.top&&y<=ee.bottom){if(e.flushInlineShortcutBuffer(),e.adoptStyle="left",i=Jc(e,p,y,{bias:0}),i>=0){if(e.element.classList.add("tracking"),t.shiftKey){const De=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,i),jf(e.model)||De?u="all":u="selection"}else e.model.at(i).type==="placeholder"?(e.model.setSelection(i-1,i),u="selection"):((r=e.model.at(i).rightSibling)==null?void 0:r.type)==="placeholder"?(e.model.setSelection(i,i+1),u="selection"):(e.model.position=i,jf(e.model)?u="all":u="selection");e.defaultStyle={},t.detail===3||Xc>2?(se(),(t.detail===3||Xc===3)&&(e.model.selection={ranges:[[0,e.model.lastOffset]]},u="all")):a||(a=!0,Qd.start(I,t,Ze,se),(t.detail===2||Xc===2)&&(s=!0,yf(e.model),u="all"))}e.hasFocus()||(u="none",e.focus({preventScroll:!0}))}else Fs=null;e.stopCoalescingUndo(),u!=="none"&&(e.model.selectionIsCollapsed&&(u="all"),xn(e)),t.preventDefault()}function sg(e,t,r){if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)return 0;const n=e-(r.left+r.right)/2,i=t-(r.top+r.bottom)/2;return n*n+i*i}function xh(e,t,r,n,i){if(!r.id)return[1/0,null];if(t.has(r.id))return t.get(r.id);const a=Es(e,r);if(!a)return[1/0,null];let s=[1/0,null];if(r.hasChildren&&!r.captureSelection&&n>=a.left&&n<=a.right)for(const u of r.children){const d=xh(e,t,u,n,i);d[0]<=s[0]&&(s=d)}return s[1]||(s=[sg(n,i,a),r]),t.set(r.id,s),s}function lg(e,t,r){const[,n]=xh(e,new Map,e.model.root,t,r);return n}function Jc(e,t,r,n){var i;const a=e.field.querySelector(".ML__latex").getBoundingClientRect();if(!a)return 0;if(t>a.right||r>a.bottom+8)return e.model.lastOffset;if(t<a.left||r<a.top-8)return 0;n=n!=null?n:{},n.bias=(i=n.bias)!=null?i:0;let s=lg(e,t,r);const u=[];let d=s;for(;d;)u.unshift(d),d=d.parent;for(const p of u)if(p.captureSelection){s=p;break}let h=e.model.offsetOf(s);if(h<0)return-1;if(s.leftSibling)if(n.bias===0&&s.type!=="placeholder"){const p=Es(e,s);p&&t<(p.left+p.right)/2&&(h=e.model.offsetOf(s.leftSibling))}else n.bias<0&&(h=e.model.offsetOf(s.leftSibling));return h}var cg=class extends Qr{constructor(){super("math")}onPaste(e,t){if(!t||!e.model.contentWillChange({data:typeof t=="string"?t:null,dataTransfer:typeof t=="string"?null:t,inputType:"insertFromPaste"}))return!1;let r="",n="auto",i=typeof t!="string"?t.getData("application/json+mathlive"):"";if(i)try{const a=JSON.parse(i);if(a&&Array.isArray(a)){e.snapshot();const s=wi(a),{model:u}=e;u.selectionIsCollapsed||u.deleteAtoms(Qn(u.selection));const d=u.at(u.position);if(d.parent instanceof jr){console.assert(d.parentBranch!==void 0);const h=[];let p=[];s[0].type==="first"&&s.shift(),s[s.length-1].type==="first"&&s.pop();for(const $ of s)$.type==="first"&&p.length>0?(h.push(p),p=[$]):p.push($);p.length>0&&h.push(p);let y=Number(d.parentBranch[0]),M=Number(d.parentBranch[1]);const I=d.parent.maxColumns;for(;d.parent.colCount-M<h.length&&d.parent.colCount<I;)d.parent.addColumn();d.parent.addChildrenAfter(h[0],d);for(let $=1;$<h.length;$++)M++,M>=I&&(M=0,d.parent.addRowAfter(y),y++),d.parent.setCell(y,M,h[$])}else d.parent.addChildrenAfter(s.filter(h=>h.type!=="first"),d);return u.position=u.offsetOf(s[s.length-1]),u.contentDidChange({inputType:"insertFromPaste"}),xn(e),!0}}catch(a){}if(i=typeof t!="string"?t.getData("application/json"):"",i&&window.MathfieldElement.computeEngine)try{const a=JSON.parse(i);if(typeof a=="object"&&"latex"in a&&a.latex&&(r=a.latex),!r){const s=window.MathfieldElement.computeEngine.box(a);s&&!s.has("Error")&&(r=s.latex)}r||(n="latex")}catch(a){}if(!r&&typeof t!="string"&&(r=t.getData("application/x-latex"),r&&(n="latex")),r||(r=typeof t=="string"?t:t.getData("text/plain")),r){let a;return[a,r]=ld(r),n==="auto"&&a&&(n="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r,{format:n})&&(e.startRecording(),e.snapshot("paste"),xn(e)),e.startRecording(),!0}return!1}insert(e,t,r){var n,i;const a=typeof t=="string"?t:(i=(n=window.MathfieldElement.computeEngine)==null?void 0:n.box(t).latex)!=null?i:"";if(!r.silenceNotifications&&!e.contentWillChange({data:a,inputType:"insertText"}))return!1;r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder"),r.format||(r.format="auto");const{silenceNotifications:s}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const u=e.silenceNotifications;e.silenceNotifications=!0;const d={"?":"\\placeholder{}","@":"\\placeholder{}"};d[0]=r.insertionMode==="replaceAll"?"":e.getValue(e.selection,"latex-unstyled"),r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(Qn(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward"),!e.at(e.position).isLastSibling&&e.at(e.position+1).type==="placeholder"?e.deleteAtoms([e.position,e.position+1]):e.at(e.position).type==="placeholder"&&e.deleteAtoms([e.position-1,e.position]);let h=-1;d[0]?d["@"]=d[0]:typeof t=="string"&&/(^|[^\\])#@/.test(t)&&(h=dg(e),h>=0&&(d["@"]=e.getValue(h,e.position,"latex"))),d[0]||(d[0]=d["?"]);let p=!1;const y=Je=>(p=!0,d[Je]);let[M,I]=wh(e,t,y,r);if(!I)return!1;const $=I.length===1&&I[0].type==="genfrac";$&&h>=0&&typeof e.mathfield.options.isImplicitFunction=="function"&&e.mathfield.options.isImplicitFunction(e.at(e.position).command)?(d["@"]=d["?"],p=!1,[M,I]=wh(e,t,y,r)):h>=0&&e.deleteAtoms([h,e.position]);const{parent:se}=e.at(e.position),Ze=se.hasEmptyBranch("body");if($&&M!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&se instanceof ln&&se.leftDelim==="("&&Ze){const Je=se.parent,Te=se.parentBranch;Je.removeChild(se),Je.setChildren(I,Te)}const ee=e.at(e.position);ee.parent.addChildrenAfter(I,ee),M==="latex"&&typeof t=="string"&&(se==null?void 0:se.type)==="root"&&Ze&&!p&&(se.verbatimLatex=t),e.silenceNotifications=u;const De=I[I.length-1];if(r.selectionMode==="placeholder"){const Je=I.flatMap(Te=>[Te,...Te.children]).find(Te=>Te.type==="placeholder");if(Je){const Te=e.offsetOf(Je);e.setSelection(Te-1,Te),e.announce("move")}else De&&(e.position=e.offsetOf(De))}else r.selectionMode==="before"||(r.selectionMode==="after"?De&&(e.position=e.offsetOf(De)):r.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(De)));return e.contentDidChange({data:a,inputType:"insertText"}),e.silenceNotifications=s,!0}};function wh(e,t,r,n){var i;let a,s=[];if(typeof t!="string"||n.format==="math-json"){const u=window.MathfieldElement.computeEngine;if(!u)return["math-json",[]];[a,t]=["latex",u.box(t).latex],s=b(t,{context:e.mathfield.context})}else typeof t=="string"&&n.format==="ascii-math"?([a,t]=qa(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),s=b(t,{context:e.mathfield.context}),a!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&e0(s)):(n.format==="auto"||(i=n.format)!=null&&i.startsWith("latex"))&&(n.format==="auto"&&([a,t]=qa(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),n.format==="latex"&&([,t]=ld(t)),s=b(t,{context:e.mathfield.context,args:r}),n.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&e0(s));return Qo(s,n.style),[a!=null?a:"latex",s]}function ug(e){if(!e||(console.assert(e[0].type==="first"),e.length>1))return null;const t=e[0];return t instanceof ln&&t.leftDelim==="("&&t.rightDelim===")"?t.removeBranch("body"):null}function e0(e){if(e){for(let t=0;e[t];t++){const r=e[t];if(r instanceof ln&&r.leftDelim==="("){let n=0,i=0,a=0;for(let s=0;r.body[s];s++)r.body[s].type==="genfrac"&&(n++,i=s),a++;a===0&&n===1&&(e[t]=r.body[i])}}for(const t of e){for(const r of t.branches)if(!t.hasEmptyBranch(r)){e0(t.branch(r));const n=ug(t.branch(r));n&&t.setChildren(n,r)}if(t instanceof jr)for(const r of t.cells)e0(r)}}}function dg(e){let t=e.at(e.position);if(t.mode==="text"){for(;!t.isFirstSibling&&t.mode==="text";)t=t.leftSibling;return e.offsetOf(t)}const r=t;let n=!1;if(t.type==="mclose"){const i=kl[t.value];for(;!t.isFirstSibling&&!(t.type==="mopen"&&t.value===i);)t=t.leftSibling;t.isFirstSibling||(t=t.leftSibling),n=!0}else t.type==="leftright"&&(t=t.leftSibling,n=!0);if(n)for(;!t.isFirstSibling&&(t.isFunction||Sh(t));)t=t.leftSibling;else{const i=[];for(;!t.isFirstSibling&&(Sh(t)||i.length>0);)t.type==="mclose"&&i.unshift(t.value),t.type==="mopen"&&i.length>0&&t.value===kl[i[0]]&&i.shift(),t=t.leftSibling}return r===t?-1:e.offsetOf(t)}function Sh(e){return e.isDigit()?!0:e.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(e.type)?!e.isExtensibleSymbol:!1}new cg;var fg=class extends Qr{constructor(){super("text")}onPaste(e,t){if(!t)return!1;const r=typeof t=="string"?t:t.getData("text/plain");return r&&e.model.contentWillChange({inputType:"insertFromPaste",data:r})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r)&&(e.model.contentDidChange({inputType:"insertFromPaste"}),e.startRecording(),e.snapshot("paste"),xn(e)),e.startRecording(),!0):!1}insert(e,t,r={}){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;r.insertionMode||(r.insertionMode="replaceSelection"),r.selectionMode||(r.selectionMode="placeholder"),r.format||(r.format="auto");const{silenceNotifications:n}=e;r.silenceNotifications&&(e.silenceNotifications=!0);const i=e.silenceNotifications;e.silenceNotifications=!0,r.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(Qn(e.selection)):r.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):r.insertionMode==="insertBefore"?e.collapseSelection("backward"):r.insertionMode==="insertAfter"&&e.collapseSelection("forward");const a=hg(t,e.mathfield.context);if(Qo(a,r.style),!a)return!1;const s=e.at(e.position),u=s.parent.addChildrenAfter(a,s);return e.silenceNotifications=i,r.selectionMode==="before"||(r.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(u)):u&&(e.position=e.offsetOf(u))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=n,!0}};function hg(e,t){return e=e.replace(/\\/g,"\\textbackslash "),e=e.replace(/#/g,"\\#"),e=e.replace(/\$/g,"\\$"),e=e.replace(/%/g,"\\%"),e=e.replace(/&/g,"\\&"),e=e.replace(/_/g,"\\_"),e=e.replace(/{/g,"\\textbraceleft "),e=e.replace(/}/g,"\\textbraceright "),e=e.replace(/lbrace/g,"\\textbraceleft "),e=e.replace(/rbrace/g,"\\textbraceright "),e=e.replace(/\^/g,"\\textasciicircum "),e=e.replace(/~/g,"\\textasciitilde "),e=e.replace(/£/g,"\\textsterling "),b(e,{context:t,parseMode:"text"})}new fg;function ao(e){return{value:e.model.getValue(),selectionIsCollapsed:e.model.selectionIsCollapsed,canUndo:e.canUndo(),canRedo:e.canRedo(),style:e.selectionStyle,mode:e.model.mode}}var on=4,$i=20,In=2*($i+on),t0=(e,t)=>`
|
|
|
<line x1="${e+$i}" y1="${t+$i}"
|
|
|
x2="${e>t?e+$i:7*$i+10*on}"
|
|
|
y2="${e<t?t+$i:7*$i+10*on}"/>
|
|
|
<svg id="plus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
|
|
|
</svg>`,_h=(e,t)=>`
|
|
|
<line x1="${e+$i}" y1="${t+$i}"
|
|
|
x2="${e>t?e+$i:7*$i+10*on}"
|
|
|
y2="${e<t?t+$i:7*$i+10*on}"/>
|
|
|
<svg id="minus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
|
|
|
</svg>`,r0=(e,t,r)=>`
|
|
|
<svg id="arrow" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<g transform="rotate(${r})" transform-origin="20 20">
|
|
|
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
|
|
|
</g>
|
|
|
</svg>`,pg=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*$i+10*on+5} ${8*$i+10*on+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${In+on}"
|
|
|
height="${3*In}"
|
|
|
width="${In}"
|
|
|
rx="${In/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${In+on}"
|
|
|
y="0"
|
|
|
height="${In}"
|
|
|
width="${3*In}"
|
|
|
rx="${In/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${r0(2*(on+In),2*on+3*In,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${r0(2*(on+In),2*on+In,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${r0(2*on+3*In,2*(on+In),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${r0(2*on+In,2*(on+In),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${t0(2*on+In,on)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${_h(2*on+2*In,on)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${t0(2*on+3*In,on)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${t0(on,2*on+In)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${_h(on,2*on+2*In)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${t0(on,2*on+3*In)}
|
|
|
</g>
|
|
|
</svg>`,mg=e=>`
|
|
|
<svg id="matrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","matrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,gg=e=>`
|
|
|
<svg id="pmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","pmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
|
|
|
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,Mh=e=>`
|
|
|
<svg id="Bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","Bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,vg=e=>`
|
|
|
<svg id="bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4h-3v16h3"/>
|
|
|
<path class="cls-2" d="m22,4h3v16h-3"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,bg=e=>`
|
|
|
<svg id="vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
|
|
|
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
|
|
|
</svg>`,yg=e=>`
|
|
|
<svg id="Vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
|
|
|
data-command='["setEnvironment","Vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
|
|
|
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
|
|
|
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
|
|
|
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
|
|
|
</svg>`,xg=e=>`
|
|
|
<svg id="cases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","cases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<circle cx="13" cy="8" r="1"/>
|
|
|
<circle cx="13" cy="16" r="1"/>
|
|
|
<circle cx="21" cy="8" r="1"/>
|
|
|
<circle cx="21" cy="16" r="1"/>
|
|
|
</svg>`,wg=e=>`
|
|
|
<svg id="rcases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","rcases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
|
|
|
<circle cx="15" cy="8" r="1"/>
|
|
|
<circle cx="15" cy="16" r="1"/>
|
|
|
<circle cx="7" cy="8" r="1"/>
|
|
|
<circle cx="7" cy="16" r="1"/>
|
|
|
</svg>`,wf={matrix:mg,pmatrix:gg,bmatrix:vg,Bmatrix:Mh,vmatrix:bg,Vmatrix:yg},Sf={cases:xg,rcases:wg,Bmatrix:Mh};function Sg(e){var t,r;const n=(t=e.model.parentEnvironment)==null?void 0:t.array;if(!n)return;let i=0;n.forEach($=>{(!i||$.length>i)&&(i=$.length)});let a=document.getElementById("mathlive-environment-popover");a||(a=Pd("mathlive-environment-popover"),Yi("environment-popover"),Yi("core"),a.setAttribute("aria-hidden","true"));let s;const u=a.querySelector(".MLEP__environment-controls");u?s=u:(s=document.createElement("div"),a.innerHTML="",a.appendChild(s)),s.className="MLEP__environment-controls",s.style.display="flex",s.style.width="100%",s.style.height="100%",s.style.boxSizing="border-box",s.innerHTML=pg;let d=[],h="";const p=e.model.parentEnvironment.environmentName;if(_d(p)){const $=Mg(p);h=wf[$]("active");const se=wf,{[$]:Ze}=se,ee=je(se,[Ge($)]);d=Object.values(ee).map(De=>De("inactive"))}else if(q0(p)){const $=Cg(p);h=Sf[$]("active");const se=Sf,{[$]:Ze}=se,ee=je(se,[Ge($)]);d=Object.values(ee).map(De=>De("inactive"))}else X0(p)&&(h=wf.matrix("active"),d=Object.values(Sf).map($=>$("inactive")));const y=document.createElement("div");y.className="MLEP__environment-delimiter-controls",y.style.display="flex",y.style.flexDirection="column",y.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${h}
|
|
|
${d.join("")}
|
|
|
</div>`,h&&s.appendChild(y),s.querySelectorAll("[data-command]").forEach($=>{const se=$.dataset.command;let Ze=se;try{Ze=JSON.parse(se)}catch(ee){}$.addEventListener("mousedown",ee=>ee.preventDefault()),Ze&&$.addEventListener("click",()=>e.executeCommand(Ze))});const I=(r=e.field)==null?void 0:r.getBoundingClientRect();I&&(a.style.top=`${window.scrollY+(I.top-a.clientHeight-15)}px`,a.style.left=`${I.left+20}px`,a.classList.add("is-visible"))}function _f(){const e=document.getElementById("mathlive-environment-popover");e==null||e.classList.remove("is-visible")}function _g(){document.getElementById("mathlive-environment-popover")&&(nf("mathlive-environment-popover"),pa("environment-popover"),pa("core"))}function n0(e){if(!e.hasFocus())return;let t=!1;if(e.model.mode==="math"){const r=e.model.parentEnvironment;if(r!=null&&r.array&&G0(r.environmentName)){const n=e.options.environmentPopoverPolicy;t=n==="auto"||n==="on"}}t?Sg(e):_f()}function Mg(e){return e.replace("*","")}function Cg(e){return e==="dcases"?"cases":e}function Ch(e){const t=getComputedStyle(e).direction;return t==="ltr"||t==="rtl"?t:"ltr"}function Eh(e,t,r){return t==="left"||t==="leading"&&r==="ltr"||t==="trailing"&&r==="rtl"?e.left:e.right}function Mf(e,t,r,n){return r==="middle"?e-t/2:r==="start"&&n==="rtl"||r==="end"&&n==="ltr"||r==="top"||r==="right"?Math.max(0,e-t):e}function Eg(e,t,r,n){return r==="middle"?e-t/2:r==="start"&&n==="ltr"||r==="end"&&n==="rtl"||r==="top"||r==="right"?e:e-t}function kg(e,t){var r,n,i;const a=(r=Ch(e))!=null?r:"ltr";e.style.position="fixed",e.style.left="",e.style.top="",e.style.right="",e.style.bottom="",e.style.height="",e.style.width="";const s=e.getBoundingClientRect(),u=Number.isFinite(t.maxHeight)?Math.min(t.maxHeight,window.innerHeight):window.innerHeight;let d=Math.min(u,(n=t.height)!=null?n:s.height),h=Mf(t.location.y,d,t.verticalPos,a);h+d>window.innerHeight-8&&(t.alternateLocation?(h=Mf(t.alternateLocation.y,d,t.verticalPos,a),h+d>window.innerHeight-8&&(h=void 0)):h=void 0),Number.isFinite(h)||(h=Math.max(8,window.innerHeight-8-d),8+d>window.innerHeight-8&&(e.style.bottom="8px")),d=Math.min(h+d,window.innerHeight-8)-h;const p=Number.isFinite(t.maxWidth)?Math.min(t.maxWidth,window.innerWidth):window.innerWidth;let y=Math.min(p,(i=t.width)!=null?i:s.width),M=Mf(t.location.x,y,t.horizontalPos,a);M+y>window.innerWidth-8&&(t.alternateLocation?(M=Eg(t.alternateLocation.x,y,t.verticalPos,a),M+y>window.innerWidth-8&&(M=void 0)):M=void 0),Number.isFinite(M)||(M=Math.max(8,window.innerWidth-8-y),8+y>window.innerWidth-8&&(e.style.right="8px")),y=Math.min(M+y,window.innerWidth-8)-M,a==="rtl"?e.style.right=`${Math.ceil(window.innerWidth-M-y).toString()}px`:e.style.left=`${Math.ceil(M).toString()}px`,e.style.top=`${Math.ceil(h).toString()}px`,d!==s.height&&(e.style.height=`${Math.ceil(d).toString()}px`),y!==s.width&&(e.style.width=`${Math.ceil(y).toString()}px`)}function Dg(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function Vl(e){return"submenu"in e}function oo(e){return"type"in e&&e.type==="command"||"onMenuSelect"in e||"id"in e}function Cf(e){return"type"in e&&e.type==="divider"}function Ef(e){return"type"in e&&e.type==="heading"}var kh={};function kf(e){let t=kh[e];if(!t){let r;switch(e){case"checkmark":r=`<span aria-hidden="true" class="ui-checkmark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
|
|
|
</span>`;break;case"trailing-chevron":r='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":r='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(r){const n=document.createElement("template");n.innerHTML=r,kh[e]=n,t=n}}if(t){if("content"in t)return t.content.cloneNode(!0);const r=document.createElement("svg");return r.innerHTML=t.innerHTML,r}}var Dh=80,Ah=class{constructor(e,t){this._element=null;var r;this.parentMenu=t,this._declaration=e,Vl(e)?(this.type="submenu",this.submenu=new Lh(e.submenu,{parentMenu:t,submenuClass:e.submenuClass,columnCount:e.columnCount})):this.type=(r=e.type)!=null?r:"command",this.hasCheck=oo(e)&&e.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var e,t;(e=this._abortController)==null||e.abort(),this._abortController=void 0,(t=this._element)==null||t.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var e;return(e=this._label)!=null?e:""}set label(e){e===void 0&&(e=""),e!==this._label&&(this._label=e,this.dirty=!0)}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.dirty=!0)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.element&&(e?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(e){this._checked=e,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(e){e!==this._tooltip&&(this._tooltip=e,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){e!==this._ariaLabel&&(this._ariaLabel=e,this.dirty=!0)}get active(){var e,t;return(t=(e=this.element)==null?void 0:e.classList.contains("active"))!=null?t:!1}set active(e){this.element&&this.element.classList.toggle("active",e)}updateState(e){var t,r,n;const i=this._declaration;if(Cf(i)){this.enabled=!1,this.checked=!1;return}Ef(i)&&(this.enabled=!1,this.checked=!1,this.visible=!0),oo(i)&&(this.checked=oo(i)&&((t=Zl(i.checked,e))!=null?t:!1)),(oo(i)||Vl(i))&&(this.enabled=(r=Zl(i.enabled,e))!=null?r:!0,this.visible=(n=Zl(i.visible,e))!=null?n:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(e),this.submenu.visible||(this.visible=!1))),(oo(i)||Ef(i)||Vl(i))&&(this.label=Zl(i.label,e),this.tooltip=Zl(i.tooltip,e),this.ariaLabel=Zl(i.ariaLabel,e)),this._element&&this.updateElement()}set dirty(e){console.assert(e===!0),e&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const e=this.element;e.textContent="",this.enabled?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true"),this.checked===!0?(e.setAttribute("aria-checked","true"),e.append(kf("checkmark"))):this.checked==="mixed"?(e.setAttribute("aria-checked","mixed"),e.append(kf("mixedmark"))):e.removeAttribute("aria-checked"),this.ariaLabel&&e.setAttribute("aria-label",this.ariaLabel);const t=document.createElement("span");if(t.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&t.classList.add("heading"),t.innerHTML=this.label,e.append(t),this._tooltip&&e.setAttribute("data-tooltip",this._tooltip),oo(this._declaration)&&this._declaration.keyboardShortcut){const r=document.createElement("kbd");r.innerHTML=tf(this._declaration.keyboardShortcut),e.append(r)}this.type==="submenu"&&e.append(kf("trailing-chevron"))}get element(){if(this._element)return this._element;if(Cf(this._declaration)){const r=document.createElement("li");return r.setAttribute("part","menu-divider"),r.setAttribute("role","divider"),this._element=r,r}const e=document.createElement("li");this._element=e,(oo(this._declaration)||Ef(this._declaration)||Vl(this._declaration))&&this._declaration.class&&(e.className=this._declaration.class),e.setAttribute("part","menu-item"),e.setAttribute("tabindex","-1"),this.hasCheck?e.setAttribute("role","menuitemcheckbox"):e.setAttribute("role","menuitem"),this.type==="submenu"&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"));const t=this.abortController.signal;return e.addEventListener("pointerenter",this,{signal:t}),e.addEventListener("pointerleave",this,{signal:t}),e.addEventListener("pointerup",this,{signal:t}),e.addEventListener("click",this,{signal:t}),this._element}dispatchSelect(){if(!oo(this._declaration))return;const e=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(e)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(e){var t;if(!(!this.visible||!this.enabled)){if(e.type==="click"){this.rootMenu.state==="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}if(e.type==="pointerenter"){const r=e;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((t=this.parentMenu.activeMenuItem)!=null&&t.movingTowardSubmenu(r))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(e.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(e.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.rootMenu.hide(),this.dispatchSelect()},Dh)},Dh)}openSubmenu(e){var t;if(this.type!=="submenu"||!this.element)return;if((t=e==null?void 0:e.withDelay)!=null&&t){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const r=this.element.getBoundingClientRect(),n=Ch(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:Eh(r,"trailing",n),y:r.top-4},alternateLocation:{x:Eh(r,"leading",n),y:r.top-4}})}movingTowardSubmenu(e){if(!this.element||this.type!=="submenu")return!1;const t=this.rootMenu.lastMoveEvent;if(!t)return!1;const r=e.timeStamp-t.timeStamp;if(r>500)return!1;const n=e.clientX-t.clientX;if(Ag(n,t.clientY-e.clientY,r)<=.2)return!1;let a="right";if(this.submenu.element){const s=this.submenu.element.getBoundingClientRect(),u=this.element.getBoundingClientRect();s.left<u.left+u.width/2&&(a="left")}return a==="right"?n>0:n<0}};function Ag(e,t,r){return Math.hypot(e,t)/r}function Zl(e,t){return e===void 0||typeof e!="function"?e:(t!=null||(t={alt:!1,control:!1,shift:!1,meta:!1}),e(t))}var Lh=class Ql{constructor(t,r){this._element=null,this._activeMenuItem=null,this._dirty=!0;var n,i;this.parentMenu=(n=r==null?void 0:r.parentMenu)!=null?n:null,this._submenuClass=r==null?void 0:r.submenuClass,this.columnCount=(i=r==null?void 0:r.columnCount)!=null?i:1,this.isSubmenuOpen=!1,this.menuItems=t}get children(){return this._menuItems}set menuItems(t){const r=this.parentMenu;this.dispose(),this.parentMenu=r,t=[...t],this._menuItems=t.map(n=>n.onCreate?n.onCreate(n,this):new Ah(n,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var t;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(t=this._menuItems)==null||t.forEach(r=>r.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(t){if(t.type==="wheel"&&this._element){const r=t;this._element.scrollBy(0,r.deltaY),t.stopPropagation()}}dispatchEvent(t){return this.rootMenu.dispatchEvent(t)}get rootMenu(){return this.parentMenu.rootMenu}updateState(t){var r,n,i;this._menuItems.forEach(h=>h.updateState(t));const a=this.hasCheck;this.hasCheck=this._menuItems.some(h=>h.visible&&h.hasCheck),this.hasCheck!==a&&this._menuItems.forEach(h=>h.updateState(t));let s,u=0;for(const h of this._menuItems)h.type==="heading"?(s&&u===0&&(s.visible=!1),s=h,u=0):h.type==="divider"&&s?(s.visible=u>0,s=void 0,u=0):s&&h.visible&&(u+=1);s&&(s.visible=u>0);let d=!0;for(const h of this._menuItems)h.type==="divider"?(h.visible=!d,d=!0):h.visible&&(d=!1);(r=this.activeMenuItem)!=null&&r.visible||(this.activeMenuItem=null),!((n=this.activeMenuItem)!=null&&n.enabled)&&((i=this.activeMenuItem)==null?void 0:i.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible&&t.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible)}set dirty(t){console.assert(t===!0),this._dirty!==t&&t&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var t;if(this._element){this._element.textContent="";for(const{element:r,visible:n}of this._menuItems)r&&n&&this._element.append(r);(t=this._element.querySelector("li:first-of-type"))==null||t.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const t=document.createElement("menu");t.setAttribute("role","menu"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-orientation","vertical"),t.setAttribute("part","ui-menu-container"),this._submenuClass&&t.classList.add(this._submenuClass),t.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const r=this._abortController.signal;return t.addEventListener("focus",this,{signal:r}),t.addEventListener("wheel",this,{passive:!0,signal:r}),this._element=t,this.updateElement(),t}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(t){var r,n,i,a;if(this.rootMenu.cancelDelayedOperation(),t!==this._activeMenuItem){if(this.activeMenuItem){const s=this.activeMenuItem;s.active=!1,(r=s.submenu)==null||r.hide()}if(!((n=t==null?void 0:t.visible)==null||n)){this._activeMenuItem=null;return}this._activeMenuItem=t,t&&(t.active=!0)}t?(i=t.element)==null||i.focus({preventScroll:!0}):(a=this._element)==null||a.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let t=0,r=!1;const n=this._menuItems;for(;!r&&t<=n.length-1;){const i=n[t];r=i.type!=="divider"&&i.visible&&i.enabled,t+=1}return r?n[t-1]:null}get lastMenuItem(){this.updateIfDirty();const t=this._menuItems;let r=t.length-1,n=!1;for(;!n&&r>=0;){const i=t[r];n=i.type!=="divider"&&i.visible&&i.enabled,r-=1}return n?t[r+1]:null}nextMenuItem(t){if(t===0)return this._activeMenuItem;if(!this._activeMenuItem)return t>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const r=this._menuItems.indexOf(this.firstMenuItem),n=this._menuItems.indexOf(this.lastMenuItem);let i=this._menuItems.indexOf(this._activeMenuItem),a=1;for(;i>=r&&i<=n;){i+=t>0?1:-1;const s=this._menuItems[i];if(!s)break;if(s.visible&&s.enabled){if(a===Math.abs(t))return this._menuItems[i];a+=1}}return t>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(t){this.updateIfDirty();const n=this._menuItems.filter(i=>i.visible&&i.enabled).indexOf(t);return n<0?-1:n%this.columnCount}static get collator(){return Ql._collator||(Ql._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Ql._collator}findMenuItem(t){var r;this.updateIfDirty();const n=this._menuItems.filter(u=>u.type!=="divider"&&u.visible&&u.enabled);if(n.length===0)return null;const i=Math.max(...n.map(u=>u.label.length))-t.length;if(i<0)return null;let a=null,s=0;for(;s<i&&!a;)a=(r=n.find(u=>Ql.collator.compare(t,u.label.substring(s,t.length))===0))!=null?r:null,s++;return a}show(t){return!this.visible||!t.container?!1:(this.updateElement(),t.container.appendChild(this.element),Nt()&&(this.element.popover="manual",this.element.showPopover()),t.location&&kg(this.element,{location:t.location,alternateLocation:t.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var t,r,n,i,a;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),Nt()&&((t=this._element)!=null&&t.popover)&&this.element.hidePopover(),(n=(r=this.parentMenu)==null?void 0:r.element)==null||n.focus(),(a=(i=this._element)==null?void 0:i.parentNode)==null||a.removeChild(this._element)}set openSubmenu(t){var r,n,i,a;const s=t!==null;((r=this.activeMenuItem)==null?void 0:r.type)==="submenu"&&((n=this.activeMenuItem.element)==null||n.setAttribute("aria-expanded",s.toString())),(a=(i=this.activeMenuItem)==null?void 0:i.element)==null||a.classList.toggle("is-submenu-open",s),this.isSubmenuOpen=s}},Bh=class Ip extends Lh{constructor(t,r){var n;super(t),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(n=r==null?void 0:r.host)!=null?n:null,this.isDynamic=t.some(Ih),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(t){Gp(this._modifiers,t)||(this._modifiers=t,this.dirty=!0)}get activeSubmenu(){let t=this;for(;t.isSubmenuOpen;)t=t.activeMenuItem.submenu;return t}set dirty(t){this._updating||(console.assert(t===!0),this._dirty!==t&&(this._dirty=!0,t&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(t){this._updating=!0,this.modifiers=t!=null?t:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(t){this.isDynamic&&(this.modifiers=Bs(t)),t.stopImmediatePropagation()}handleKeydownEvent(t){var r,n,i;if(t.key==="Tab"||t.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Bs(t));let a=!0;const s=this.activeSubmenu,u=s.activeMenuItem;switch(t.key){case" ":case"Space":case"Return":case"Enter":u==null||u.select(Bs(t));break;case"ArrowRight":if((u==null?void 0:u.type)==="submenu")u.select(Bs(t)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!u)s.activeMenuItem=s.firstMenuItem;else{const d=(r=s.getMenuItemColumn(u))!=null?r:-1;if(d>=0&&d<((n=s.columnCount)!=null?n:1)-1){const h=s.nextMenuItem(1);h&&(s.activeMenuItem=h)}}break;case"ArrowLeft":if(s===this.rootMenu)u||(s.activeMenuItem=s.firstMenuItem);else if((u&&(i=s.getMenuItemColumn(u))!=null?i:-1)<=0||!u){s.hide();const h=s.parentMenu.activeMenuItem;if(h){const{element:p}=h;p==null||p.focus(),p==null||p.classList.remove("is-submenu-open")}}else{const h=s.nextMenuItem(-1);h&&(s.activeMenuItem=h)}break;case"ArrowDown":s.activeMenuItem=s.nextMenuItem(s.columnCount);break;case"ArrowUp":s.activeMenuItem=s.nextMenuItem(-s.columnCount);break;case"Home":case"PageUp":s.activeMenuItem=s.firstMenuItem;break;case"End":case"PageDown":s.activeMenuItem=s.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const d=s.findMenuItem(this.typingBuffer);d&&(s.activeMenuItem=d),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Id(t)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=t.key;const d=s.findMenuItem(this.typingBuffer);d&&(s.activeMenuItem=d),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else a=!1}a&&(t.preventDefault(),t.stopPropagation())}handleEvent(t){if(t.type==="keydown")this.handleKeydownEvent(t);else if(t.type==="keyup")this.handleKeyupEvent(t);else if(t.type==="pointermove")this.lastMoveEvent=t;else if(t.type==="pointerup"&&t.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(t.type==="contextmenu"){t.preventDefault(),t.stopPropagation();return}super.handleEvent(t)}dispatchEvent(t){return this._host?this._host.dispatchEvent(t):!0}get scrim(){return ro.element}connectScrim(t){const r=this.scrim;r.addEventListener("pointerup",this),r.addEventListener("contextmenu",this),r.addEventListener("keydown",this),r.addEventListener("keyup",this),r.addEventListener("pointermove",this),ro.open({root:t,onDismiss:()=>this.hide()})}disconnectScrim(){const t=this.scrim;t.removeEventListener("pointerup",this),t.removeEventListener("contextmenu",this),t.removeEventListener("keydown",this),t.removeEventListener("keyup",this),t.removeEventListener("pointermove",this),ro.state==="open"&&ro.scrim.close()}get rootMenu(){return this}show(t){return this._onDismiss=t==null?void 0:t.onDismiss,t!=null&&t.modifiers&&(this.modifiers=t.modifiers),this.updateState(),this.connectScrim(t==null?void 0:t.target),super.show(_(S({},t),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,ro.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(t){this.cancelDelayedOperation();const r=Ip.SUBMENU_DELAY;if(r<=0){t();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,t()},r)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};Bh.SUBMENU_DELAY=120;var Lg=Bh;function Ih(e){return Cf(e)?!1:typeof e.label=="function"||typeof e.ariaLabel=="function"||typeof e.tooltip=="function"||(oo(e)||Vl(e))&&(typeof e.enabled=="function"||typeof e.visible=="function")||oo(e)&&typeof e.checked=="function"?!0:Vl(e)?e.submenu.some(Ih):!1}var i0=class{};i0.DELAY=300,i0.MAX_DISTANCE=10;function Bg(e){return new Promise((t,r)=>{const n=Bd(e);n||t(!1);let i=n;const a=setTimeout(()=>{s.abort(),t(Dg(i,n)<i0.MAX_DISTANCE)},i0.DELAY),s=new AbortController,u=s.signal;for(const d of["pointermove","pointerup","pointercancel"])window.addEventListener(d,h=>{if(h.type==="pointerup"||h.type==="pointercancel")clearTimeout(a),s.abort(),t(!1);else if(h.type==="pointermove"){const p=Bd(h);p&&(i=p)}},{passive:!0,signal:u})})}function $h(e,t,r){return rs(this,null,function*(){if(e.type==="contextmenu"){const n=e;if(r.show({target:t,location:Bd(n),modifiers:Bs(n)}))return e.preventDefault(),e.stopPropagation(),!0}if(e.type==="keydown"){const n=e;if(n.code==="ContextMenu"||n.code==="F10"&&n.shiftKey){const i=t==null?void 0:t.getBoundingClientRect();if(i&&r.show({target:t,location:{x:Math.ceil(i.left+i.width/2),y:Math.ceil(i.top+i.height/2)},modifiers:Bs(n)}))return e.preventDefault(),e.stopPropagation(),!0}}if(e.type==="pointerdown"&&e.pointerType!=="mouse"&&e.button===0){let n=e.target;for(;n&&t!==n;)n=n.parentNode;if(!n||!r.visible)return!1;const i=Bd(e);if(yield Bg(e))return r.state!=="closed"?!1:(r.show({target:t,location:i}),!0)}return!1})}var Th={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};W(Object.keys(Th),"{body:auto}",{createAtom:e=>new Cl(_(S({},e),{body:ce(e.args[0]),accentChar:Th[e.command.slice(1)]}))}),W(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:e=>{const t=it(ce(e.args[0]));return new Cl(_(S({},e),{body:ce(e.args[0]),svgAccent:e.command.slice(1)+(t.length>5?"4":["1","1","2","2","3","3"][t.length])}))}}),W(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:e=>new Cl(_(S({},e),{body:ce(e.args[0]),svgAccent:"overarc"}))}),W(["underarc","underparen"],"{body:auto}",{createAtom:e=>new Kr(_(S({},e),{body:ce(e.args[0]),svgBelow:"underarc"}))}),W("utilde","{body:auto}",{createAtom:e=>{const t=ce(e.args[0]),r=it(t),n="widetilde"+(r.length>5?"4":["1","1","2","2","3","3"][r.length]);return new Kr(_(S({},e),{body:t,svgBelow:n,boxType:Ss(t)}))}}),W("^","{:string}",{createAtom:e=>{var t;return new _e(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[e.args[0]])!=null?t:"^"}))}}),W("`","{:string}",{createAtom:e=>{var t;return new _e(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[e.args[0]])!=null?t:"`"}))}}),W("'","{:string}",{createAtom:e=>{var t;return new _e(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[e.args[0]])!=null?t:"'"}))}}),W('"',"{:string}",{createAtom:e=>{var t,r;return new _e(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[e.args[0]])!=null?r:'"'+e.args[0]:'"'}))}}),W(".","{:string}",{createAtom:e=>{var t,r;return new _e(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[e.args[0]])!=null?r:"."+e.args[0]:"."}))}}),W("=","{:string}",{createAtom:e=>{var t,r;return new _e(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(r={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[e.args[0]])!=null?r:"="+e.args[0]:"="}))}}),W("~","{:string}",{createAtom:e=>{var t;return new _e(_(S({type:"mord"},e),{isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[e.args[0]])!=null?t:"\xB4"}))}}),W("c","{:string}",{createAtom:e=>{var t;return new _e(_(S({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={c:"\xE7",C:"\xC7"}[e.args[0]])!=null?t:""}))}}),W("enclose","{notation:string}[style:string]{body:auto}",{createAtom:e=>{var t,r;const n=e.args,i={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(t=e.style)!=null?t:{}};if(n[1]){const s=n[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const u of s){const d=u.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(d)i.strokeWidth=d[1],i.strokeStyle=d[2],i.strokeColor=d[3];else{const h=u.match(/\s*([a-z]*)\s*=\s*"(.*)"/);h&&(h[1]==="mathbackground"?i.backgroundcolor=h[2]:h[1]==="mathcolor"?i.strokeColor=h[2]:h[1]==="padding"?i.padding=h[2]:h[1]==="shadow"&&(i.shadow=h[2]))}}i.strokeStyle==="dashed"?i.svgStrokeStyle="5,5":i.strokeStyle==="dotted"&&(i.svgStrokeStyle="1,5")}i.borderStyle=`${i.strokeWidth} ${i.strokeStyle} ${i.strokeColor}`;const a={};return((r=n[0])!=null?r:"").split(/[, ]/).filter(s=>s.length>0).forEach(s=>{a[s.toLowerCase()]=!0}),new qe(e.command,ce(n[2]),a,i)}}),W("cancel","{body:auto}",{createAtom:e=>{var t;return new qe(e.command,ce(e.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),W("bcancel","{body:auto}",{createAtom:e=>{var t;return new qe(e.command,ce(e.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),W("xcancel","{body:auto}",{createAtom:e=>{var t;return new qe(e.command,ce(e.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),W(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:e=>{var t;return new Kr(_(S({},e),{body:ce((t=e.args)==null?void 0:t[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:e.command.slice(1)}))}}),W("overbrace","{:auto}",{createAtom:e=>new Kr(_(S({},e),{body:ce(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:e.command.slice(1)}))}),W(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:e=>new Kr(_(S({},e),{body:ce(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}))}),W(["underbrace"],"{:auto}",{createAtom:e=>new Kr(_(S({},e),{body:ce(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:e.command.slice(1)}))}),W(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:e=>{var t,r,n,i,a;return new Kr(_(S({},e),{svgBody:e.command.slice(1),above:((r=ce((t=e.args)==null?void 0:t[1]))==null?void 0:r.length)===0?void 0:ce((n=e.args)==null?void 0:n[1]),below:(a=ce((i=e.args)==null?void 0:i[0]))!=null?a:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(e,t)=>e.command+(e.hasEmptyBranch("below")?"":`[${e.belowToLatex(t)}]`)+`{${e.aboveToLatex(t)}}${e.supsubToLatex(t)}`}),W(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:e=>new li(e.command.slice(1),_(S({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),W(["liminf","limsup"],"",{ifMode:"math",createAtom:e=>new li({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],_(S({},e),{limits:"over-under",variant:"main"}))}),W(["lim","mod"],"",{ifMode:"math",createAtom:e=>new li(e.command.slice(1),_(S({},e),{limits:"over-under",variant:"main"}))}),W(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:e=>new li(e.command.slice(1),_(S({},e),{limits:"over-under",isFunction:!0,variant:"main"}))}),W(["ang"],"{:math}",{ifMode:"math",createAtom:e=>new _e(_(S({},e),{body:ce(e.args[0])})),serialize:(e,t)=>`\\ang{${e.bodyToLatex(t)}}`,render:(e,t)=>{const r=e.createBox(t),n=r.caret;r.caret=void 0;const i=new Ue("\xB0",{style:_(S({},e.style),{variant:"normal",variantStyle:"up"})});return new Ue([r,i],{type:"inner",isSelected:e.isSelected,caret:n})}}),W("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:e=>new Wi(_(S({},e),{body:ce(e.args[1]),index:e.args[0]?ce(e.args[0]):void 0}))}),W(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:e=>{const t=S({},e),r=e.command,n=e.args;switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":t.hasBarLine=!0;break;case"\\atopfrac":t.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":t.hasBarLine=!1,t.leftDelim="(",t.rightDelim=")";break;case"\\cfrac":t.hasBarLine=!0,t.continuousFraction=!0;break;default:}switch(r){case"\\dfrac":case"\\dbinom":t.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":t.mathstyleName="textstyle";break;default:}return new lr(n[0]?ce(n[0]):[new Ta],n[1]?ce(n[1]):[new Ta],t)},serialize:(e,t)=>{const r=e.aboveToLatex(t),n=e.belowToLatex(t);return/^[0-9]$/.test(r)&&/^[0-9]$/.test(n)?`${e.command}${r}${n}`:an(e.command,r,n)}}),W(["brace","brack"],"",{infix:!0,createAtom:e=>new lr(ce(e.args[0]),ce(e.args[1]),_(S({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(e,t)=>Cr([e.aboveToLatex(t),e.command,e.belowToLatex(t)])}),W(["over","atop","choose"],"",{infix:!0,createAtom:e=>{let t,r;const n=e.args;return e.command==="\\choose"&&(t="(",r=")"),new lr(ce(n[0]),ce(n[1]),_(S({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:r}))},serialize:(e,t)=>Cr([e.aboveToLatex(t),e.command,e.belowToLatex(t)])}),W(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:e=>{var t,r;const n=e.args;return new lr(ce(n[0]),ce(n[1]),_(S({},e),{leftDelim:(t=n[2])!=null?t:".",rightDelim:(r=n[3])!=null?r:".",hasBarLine:!1}))},serialize:(e,t)=>`${e.aboveToLatex(t)} ${e.command}${e.leftDelim}${e.rightDelim}${e.belowToLatex(t)}`}),W("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:e=>new lr(ce(e.args[0]),ce(e.args[1]),_(S({},e),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),W(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:e=>new pn({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[e.command.slice(1)],_(S({},e),{limits:"auto",variant:"main"}))}),W("smallint","",{ifMode:"math",createAtom:e=>new li("\u222B",_(S({},e),{limits:"adjacent",variant:"main"}))});var Ph={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};W(Object.keys(Ph),"",{ifMode:"math",createAtom:e=>{const t=e.command,r=Ph[t.slice(1)];return new pn(r,_(S({},e),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[r]}))}}),W(["Re","Im"],"",{ifMode:"math",createAtom:e=>new li({"\\Re":"\u211C","\\Im":"\u2111"}[e.command],_(S({},e),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),W("middle","{:delim}",{ifMode:"math",createAtom:e=>{var t;return new Q(_(S({},e),{delim:(t=e.args[0])!=null?t:"|",size:1}))}}),W("the","{:value}",{createAtom:e=>new _e(_(S({},e),{captureSelection:!0,verbatimLatex:null})),render:(e,t)=>{var r;const n=new Dr({parent:t},e.style);let i="";e.isSelected&&(i+=" ML__selected");const a=n.evaluate(e.args[0]);return new Ue(((r=Zn(a))!=null?r:"").split("").map(s=>new Ue(s,{type:"ord",classes:i,mode:e.mode,isSelected:e.isSelected,style:S({variant:"main"},e.style)})),{type:"lift",style:e.style,caret:e.caret,isSelected:e.isSelected,classes:i}).wrap(n)},serialize:e=>{var t;return`\\the${(t=Zn(e.args[0]))!=null?t:"\\relax"}`}}),W("mathtip","{:auto}{:math}",{createAtom:e=>new ga(_(S({},e),{body:ce(e.args[0]),tooltip:ce(e.args[1]),content:"math"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${_e.serialize([e.tooltip],_(S({},t),{defaultMode:"math"}))}}`}),W("texttip","{:auto}{:text}",{createAtom:e=>new ga(_(S({},e),{body:ce(e.args[0]),tooltip:ce(e.args[1]),content:"text"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${_e.serialize([e.tooltip],_(S({},t),{defaultMode:"text"}))}}`}),W("error","{:math}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[0])})),serialize:(e,t)=>`\\error{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__error"})}),W("ensuremath","{:math}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(_(S({},t),{defaultMode:"math"}))}}`}),W("color","{:value}",{applyStyle:(e,t,r)=>{var n,i;return{verbatimColor:(n=Zn(t[0]))!=null?n:void 0,color:r.toColor((i=t[0])!=null?i:{string:"red"})}}}),W("textcolor","{:value}{content:auto*}",{applyStyle:(e,t,r)=>{var n,i;return{verbatimColor:(n=Zn(t[0]))!=null?n:void 0,color:r.toColor((i=t[0])!=null?i:{string:"red"})}}}),W("boxed","{content:math}",{createAtom:e=>new eo(_(S({},e),{body:ce(e.args[0]),framecolor:{string:"black"}}))}),W("colorbox","{:value}{:text*}",{applyStyle:(e,t,r)=>{var n,i;return{verbatimBackgroundColor:(n=Zn(t[0]))!=null?n:void 0,backgroundColor:r.toBackgroundColor((i=t[0])!=null?i:{string:"yellow"})}}}),W("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:e=>{var t,r;return new eo(_(S({},e),{body:ce(e.args[2]),framecolor:(t=e.args[0])!=null?t:{string:"blue"},backgroundcolor:(r=e.args[1])!=null?r:{string:"yellow"}}))},serialize:(e,t)=>{var r,n;return t.skipStyles?e.bodyToLatex(_(S({},t),{defaultMode:"text"})):an(e.command,(r=Zn(e.framecolor))!=null?r:"",(n=Zn(e.backgroundcolor))!=null?n:"",e.bodyToLatex(_(S({},t),{defaultMode:"text"})))}}),W("bbox","[:bbox]{body:auto}",{createAtom:e=>{var t;const r=e.args[0],n=ce(e.args[1]);return r?new eo(_(S({},e),{body:n,padding:r.padding,border:r.border,backgroundcolor:(t=r.backgroundcolor)!=null?t:void 0})):new eo(_(S({},e),{body:n}))},serialize:(e,t)=>{var r,n;if(t.skipStyles)return e.bodyToLatex(t);let i=e.command;if(Number.isFinite(e.padding)||e.border!==void 0||e.backgroundcolor!==void 0){const a=[];e.padding&&a.push((r=Zn(e.padding))!=null?r:""),e.border&&a.push(`border: ${e.border}`),e.backgroundcolor&&a.push((n=Zn(e.backgroundcolor))!=null?n:""),i+=`[${a.join(",")}]`}return an(i,e.bodyToLatex(t))}}),W(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[0])})),render:(e,t)=>{const r=new Dr({parent:t,mathstyle:e.command.slice(1)},e.style),n=_e.createBox(r,e.body,{type:"lift"});return e.caret&&(n.caret=e.caret),e.bind(t,n)},serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{${Cr([e.command,e.bodyToLatex(t)])}}`}),W(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:e=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[e]})}),W("fontseries","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontSeries:(r=t[0])!=null?r:"auto"}}}),W("fontshape","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontShape:(r=t[0])!=null?r:"auto"}}}),W("fontfamily","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var r;return{fontFamily:(r=t[0])!=null?r:"roman"}}}),W("selectfont","",{ifMode:"text",applyStyle:()=>({})}),W("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),W(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:e=>new _e(_(S({},e),{body:ce(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__boldsymbol"})}),W("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),W("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),W("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),W("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),W("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),W("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),W("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),W("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),W("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),W("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),W("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),W("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),W("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),W("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),W("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),W("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),W("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),W("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),W("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),W("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),W("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),W("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),W("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),W("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),W("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),W("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),W("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),W(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),W(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),W("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),W("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),W("mbox","{:text}",{ifMode:"math",createAtom:e=>new _e(_(S({},e),{type:"mord",body:ce(e.args[0]),mode:"math"})),serialize:(e,t)=>an("\\mbox",e.bodyToLatex(_(S({},t),{defaultMode:"text"})))}),W("text","{:text}",{ifMode:"math",applyMode:"text"}),W(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[1])})),serialize:(e,t)=>!e.args[0]||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`,render:(e,t)=>{var r;return e.createBox(t,{classes:(r=e.args[0])!=null?r:""})}}),W(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.cssId=(r=e.args[0])!=null?r:"",n}}),W("htmlData","{data:string}{content:auto}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`\\htmlData{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.htmlData=(r=e.args[0])!=null?r:"",n}}),W(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[1])})),serialize:(e,t)=>{var r;return!((r=e.args)!=null&&r[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var r;const n=e.createBox(t);return n.htmlStyle=(r=e.args[0])!=null?r:"",n}}),W("em","{:rest}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[0])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{\\em ${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})}),W("emph","{:auto}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[1])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\emph{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});var Rh={"\\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}};W(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:e=>{var t;return new We(_(S({},e),{delim:(t=e.args[0])!=null?t:".",size:Rh[e.command].size,delimType:Rh[e.command].mclass}))}}),W(["hspace","hspace*"],"{width:value}",{createAtom:e=>{var t;return new xi(_(S({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),W(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:e=>{var t;return new xi(_(S({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),W("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:e=>new _e(e),render:(e,t)=>{let r=0;const n=t.mathstyle.id;(n===Do||n===Va)&&(r=1),(n===Ao||n===Li)&&(r=2),(n===Za||n===si)&&(r=3);const i=ce(e.args[r]);return _e.createBox(t,i)},serialize:(e,t)=>`\\mathchoice{${_e.serialize(e.args[0],t)}}{${_e.serialize(e.args[1],t)}}{${_e.serialize(e.args[2],t)}}{${_e.serialize(e.args[3],t)}}`}),W("mathop","{:auto}",{createAtom:e=>new _e(_(S({},e),{type:"mop",body:ce(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(e,t)=>{var r;let n=_e.createBox(t,e.body);if(e.superscript||e.subscript){const i=(r=e.subsupPlacement)!=null?r:"auto";n=i==="over-under"||i==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:n}):e.attachSupsub(t,{base:n})}return new Ue(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const r=[an(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),Cr(r)}}),W(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:e=>new _e(_(S({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:ce(e.args[0])}))}),W(["operatorname","operatorname*"],"{operator:math}",{createAtom:e=>{const t=ce(e.args[0]).map(r=>{var n;return r.type!=="first"&&(r.type="mord",r.value=(n={"\u2217":"*","\u2212":"-"}[r.value])!=null?n:r.value,r.isFunction=!1,!r.style.variant&&!r.style.variantStyle&&(r.style.variant="main",r.style.variantStyle="up")),r});return new _e(_(S({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}))},render:(e,t)=>{var r;let n=_e.createBox(t,e.body);if(e.superscript||e.subscript){const i=(r=e.subsupPlacement)!=null?r:"auto";n=i==="over-under"||i==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:n}):e.attachSupsub(t,{base:n})}return e.caret&&(n.caret=e.caret),new Ue(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const r=[an(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&r.push("\\limits"),e.subsupPlacement==="adjacent"&&r.push("\\nolimits"),e.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(e.supsubToLatex(t)),Cr(r)}}),W(["char","unicode"],"{charcode:value}",{createAtom:e=>new _e(_(S({},e),{type:e.mode==="text"?"text":"mord"})),serialize:e=>{var t;return`${e.command}${Zn((t=e.args[0])!=null?t:{number:10067,base:"hexadecimal"})}`},render:(e,t)=>{let r=t.evaluate(e.args[0]);return(!r||!("number"in r))&&(r={number:10067,base:"hexadecimal"}),e.value=String.fromCodePoint(r.number),e.createBox(t)}}),W("rule","[raise:value]{width:value}{thickness:value}",{createAtom:e=>new _e(e),render:(e,t)=>{var r,n,i;const a=new Dr({parent:t,mathstyle:"textstyle"},e.style),s=a.toEm((r=e.args[0])!=null?r:{dimension:0}),u=a.toEm((n=e.args[1])!=null?n:{dimension:10}),d=a.toEm((i=e.args[2])!=null?i:{dimension:10}),h=new Ue(null,{classes:"rule",type:"ord"});return h.width=u,h.height=d+s,h.depth=-s,h.setStyle("border-right-width",u,"em"),h.setStyle("border-top-width",d,"em"),h.setStyle("border-color",e.style.color),h.setStyle("vertical-align",s,"em"),e.isSelected&&h.setStyle("opacity","50%"),e.bind(a,h),e.caret&&(h.caret=e.caret),h.wrap(t)},serialize:e=>`\\rule${e.args[0]?`[${Zn(e.args[0])}]`:""}{${Zn(e.args[1])}}{${Zn(e.args[2])}}`}),W(["overline","underline"],"{:auto}",{createAtom:e=>new _e(_(S({},e),{body:ce(e.args[0])})),render:(e,t)=>{const r=e.command.substring(1),n=new Dr({parent:t,mathstyle:"cramp"},e.style),i=_e.createBox(n,e.body);if(!i)return null;const a=n.metrics.defaultRuleThickness/n.scalingFactor,s=new Ue(null,{classes:r+"-line"});s.height=a,s.maxFontSize=a*1.125*n.scalingFactor;let u;return r==="overline"?u=new An({shift:0,children:[{box:i},3*a,{box:s},a]}):u=new An({top:i.height,children:[a,{box:s},3*a,{box:i}]}),e.caret&&(u.caret=e.caret),new Ue(u,{classes:r,type:"ignore"})}}),W("overset","{:auto}{base:auto}",{createAtom:e=>{const t=ce(e.args[1]);return new Kr(_(S({},e),{above:ce(e.args[0]),body:t,skipBoundary:!1,boxType:Ss(t)}))},serialize:(e,t)=>an(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),W("underset","{:auto}{base:auto}",{createAtom:e=>{const t=ce(e.args[1]);return new Kr(_(S({},e),{below:ce(e.args[0]),body:t,skipBoundary:!1,boxType:Ss(t)}))},serialize:(e,t)=>an(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),W("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:e=>{const t=ce(e.args[2]);return new Kr(_(S({},e),{above:ce(e.args[0]),below:ce(e.args[1]),body:t,skipBoundary:!1,boxType:Ss(t)}))},serialize:(e,t)=>an(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),W(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:e=>new Kr(_(S({},e),{body:ce(e.args[2]),above:ce(e.args[1]),below:ce(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"})),serialize:(e,t)=>an(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),W("smash","[:string]{:auto}",{createAtom:e=>{var t,r,n,i;return new Ln(_(S({},e),{body:ce(e.args[1]),smashHeight:(r=(t=e.args[0])==null?void 0:t.includes("t"))!=null?r:!0,smashDepth:(i=(n=e.args[0])==null?void 0:n.includes("b"))!=null?i:!0}))}}),W(["vphantom"],"{:auto}",{createAtom:e=>new Ln(_(S({},e),{body:ce(e.args[0]),isInvisible:!0,smashWidth:!0}))}),W(["hphantom"],"{:auto}",{createAtom:e=>new Ln(_(S({},e),{body:ce(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),W(["phantom"],"{:auto}",{createAtom:e=>new Ln(_(S({},e),{body:ce(e.args[0]),isInvisible:!0}))}),W("not","{:math}",{createAtom:e=>{const t=ce(e.args[0]);return t.length===0?new _e(_(S({},e),{type:"mrel",value:"\uE020"})):new _e(_(S({},e),{body:[new br(_(S({},e),{body:"\uE020",align:"right"})),...t],captureSelection:!0}))},serialize:(e,t)=>{const r=e.args[0],n=r&&typeof r=="object"&&"group"in r;return e.value!=="\uE020"?n?`\\not{${_e.serialize(r.group,t)}}`:`\\not${_e.serialize(r,t)}`:n?"\\not{}":"\\not"},render:(e,t)=>{if(e.value)return e.createBox(t);const n=e.args[0]&&typeof e.args[0]=="object"&&"group"in e.args[0]?"ord":Ss(ce(e.args[0])),i=_e.createBox(t,e.body,{type:n});return e.caret&&(i.caret=e.caret),e.bind(t,i)}}),W(["ne","neq"],"",{createAtom:e=>new _e(_(S({},e),{type:"mrel",body:[new br(_(S({},e),{body:"\uE020",align:"right",boxType:"rel"})),new _e(_(S({},e),{value:"="}))],captureSelection:!0})),serialize:e=>e.command}),W("rlap","{:auto}",{createAtom:e=>new br(_(S({},e),{body:ce(e.args[0]),align:"right"}))}),W("llap","{:auto}",{createAtom:e=>new br(_(S({},e),{body:ce(e.args[0]),align:"left"}))}),W("mathrlap","{:math}",{createAtom:e=>new br(_(S({},e),{body:ce(e.args[0]),align:"left"}))}),W("mathllap","{:math}",{createAtom:e=>new br(_(S({},e),{body:ce(e.args[0]),align:"left"}))}),W("raisebox","{:value}{:text}",{createAtom:e=>{var t;return new eo(_(S({},e),{body:ce(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return an("\\raisebox",(r=Zn(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}}),W("raise","{:value}{:auto}",{createAtom:e=>{var t;return new eo(_(S({},e),{body:ce(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return an("\\raise",(r=Zn(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}}),W("lower","{:value}{:auto}",{createAtom:e=>{var t;return new eo(_(S({},e),{body:ce(e.args[1]),padding:{dimension:0},offset:(t=fa(e.args[0],-1))!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r,n;return an("\\lower",(n=Zn(fa((r=e.offset)!=null?r:{dimension:0},-1)))!=null?n:"0pt",e.bodyToLatex(t))}}),he("0123456789/@.?!"),ze(65,90),ze(97,122),he([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),he([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),he([["\\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]]),he([["\\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"),he([["\\mapsfrom",8612,"mrel"],["\\Mapsfrom",10502,"mrel"],["\\MapsTo",10503,"mrel"],["\\Yup",8516,"mord"],["\\lightning",8623,"mrel"],["\\leftarrowtriangle",8701,"mrel"],["\\rightarrowtriangle",8702,"mrel"],["\\leftrightarrowtriangle",8703,"mrel"],["\\boxdot",8865,"mbin"],["\\bigtriangleup",9651,"mbin"],["\\bigtriangledown",9661,"mbin"],["\\boxbar",9707,"mbin"],["\\Lbag",10181,"mopen"],["\\Rbag",10182,"mclose"],["\\llbracket",10214,"mopen"],["\\rrbracket",10215,"mclose"],["\\longmapsfrom",10235,"mrel"],["\\Longmapsfrom",10237,"mrel"],["\\Longmapsto",10238,"mrel"],["\\boxslash",10692,"mbin"],["\\boxbslash",10693,"mbin"],["\\boxast",10694,"mbin"],["\\boxcircle",10695,"mbin"],["\\boxbox",10696,"mbin"],["\\fatsemi",10783,"mop"],["\\leftslice",10918,"mrel"],["\\rightslice",10919,"mrel"],["\\interleave",10996,"mbin"],["\\biginterleave",11004,"mop"],["\\sslash",11005,"mbin"],["\\talloblong",11006,"mbin"]]),he([["\\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"]]),he([["\\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],["\\twoheadrightarrowtail",10518],["\\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],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\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"),he([["+",43],["-",8722],["\u2212",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"),he([["\\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"),he([["\\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]]),he([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\coloneqq",8788],["\\colonequals",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"),he([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),he([["\\wp",8472],["\\aleph",8501]]),he([["\\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"),he([["\\ ",160],["~",160]],"space"),W(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:e=>new xi(e)}),W("space","",{createAtom:e=>new xi(e)}),he([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),he([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),he([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var Oh="<mo>⁡</mo>",a0="<mo>⁢</mo>";function o0(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function en(e,t){return!e||!t.generateID?"":` extid="${e}"`}function Ig(e,t,r){var n,i,a,s,u,d,h,p,y,M,I;let $=!1;t=t!=null?t:e.atoms.length;let se="",Ze="",ee=e.atoms[e.index];const De=(i=(n=ee.style)==null?void 0:n.variant)!=null?i:"",Je=(s=(a=ee.style)==null?void 0:a.variantStyle)!=null?s:"";let Te="";if(De||Je){const Rt=Fe(ee.value,(u=ee.style)==null?void 0:u.variant,(d=ee.style)==null?void 0:d.variantStyle);if(Rt!==ee.value)return e.index+=1,se=`<mi${en(ee.id,r)}>${Rt}</mi>`,Po(se,e,r)||(e.mathML+=se,e.lastType="mi"),!0;Te=(h={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[Je+De])!=null?h:"",Te=` mathvariant="${Te}"`}const yt={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(ee.command==="!")return e.index+=1,se="<mo>!</mo>",Po(se,e,r)||(e.mathML+=se,e.lastType="mo"),!0;if(yt[ee.command]){e.index+=1;let Rt=`<mi${en(ee.id,r)}${Te}>${yt[ee.command]}</mi>`;return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(Rt=a0+Rt),Po(Rt,e,r)||(e.mathML+=Rt,e.lastType="mi"),!0}if(ee.command==="\\operatorname")Ze=jl(ee.body),e.index+=1;else if(De||Je)for(;e.index<t&&(ee.type==="mord"||ee.type==="macro")&&!ee.isDigit()&&De===((y=(p=ee.style)==null?void 0:p.variant)!=null?y:"")&&Je===((I=(M=ee.style)==null?void 0:M.variantStyle)!=null?I:"");)Ze+=jl([ee]),e.index+=1,ee=e.atoms[e.index];else(ee.type==="mord"||ee.type==="macro")&&!ee.isDigit()&&(Ze+=jl([ee]),e.index+=1);if(Ze.length>0){$=!0,se=`<mi${Te}>${Ze}</mi>`;const Rt=e.lastType;se.endsWith(">f</mi>")||se.endsWith(">g</mi>")?(se+=Oh,e.lastType="applyfunction"):e.lastType=/^<mo>(.*)<\/mo>$/.test(se)?"mo":"mi",Po(se,e,r)||((Rt==="mi"||Rt==="mn"||Rt==="mtext"||Rt==="fence")&&(se=a0+se),e.mathML+=se)}return $}function $g(e){return e.index<e.atoms.length&&e.atoms[e.index].superscript&&e.atoms[e.index].type==="subsup"}function Tg(e){let t=-1,r=e.index,n=!1,i=!1;for(;r<e.atoms.length&&!n&&!i;){const a=e.atoms[r];n=!a.isDigit(),i=!n&&a.superscript!==void 0,r++}return i&&(t=r-1),t}function Po(e,t,r){var n;let i=t.atoms[t.index-1];if(!i)return!1;if(!i.superscript&&!i.subscript)if(((n=t.atoms[t.index])==null?void 0:n.type)==="subsup")i=t.atoms[t.index],t.index+=1;else return!1;const a=t.lastType;t.lastType="";const s=Hr(i.superscript,r);t.lastType="";const u=Hr(i.subscript,r);if(t.lastType=a,!s&&!u)return!1;let d="";return s&&u?d=`<msubsup>${e}${u}${s}</msubsup>`:s?d=`<msup>${e}${s}</msup>`:u&&(d=`<msub>${e}${u}</msub>`),t.mathML+=d,t.lastType="",!0}function Pg(e,t,r){t=t!=null?t:e.atoms.length;const n=e.index;let i="";for(;e.index<t&&e.atoms[e.index].mode==="text";)i+=e.atoms[e.index].value?e.atoms[e.index].value:" ",e.index+=1;return i.length>0?(e.mathML+=`<mtext ${en(e.atoms[n].id,r)}>${i}</mtext>`,e.lastType="mtext",!0):!1}function Rg(e,t,r){t=t!=null?t:e.atoms.length;const n=e.index;let i="",a=Tg(e);for(a>=0&&a<t&&(t=a);e.index<t&&e.atoms[e.index].isDigit();)i+=e.atoms[e.index].asDigit(),e.index+=1;return i.length<=0?!1:(i="<mn"+en(e.atoms[n].id,r)+">"+i+"</mn>",a<0&&$g(e)&&(a=e.index,e.index+=1),Po(i,e,r)||(e.mathML+=i,e.lastType="mn"),!0)}function Og(e,t,r){let n=!1;t=t!=null?t:e.atoms.length;let i="",a="";if(e.index<t&&e.atoms[e.index].type==="mopen"){let s=!1,u=0;const d=e.index;let h=-1,p=d+1;for(;p<t&&!s;)e.atoms[p].type==="mopen"?u+=1:e.atoms[p].type==="mclose"&&(u-=1),u===-1&&(s=!0,h=p),p+=1;s&&(i="<mrow>",i+=zs(e.atoms[d],r),i+=Hr(e.atoms,r,d+1,h),i+=zs(e.atoms[h],r),i+="</mrow>",e.index=h+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=a0),Po(i,e,r)&&(n=!0,e.lastType="",i=""),a="fence")}return i.length>0&&(n=!0,e.mathML+=i,e.lastType=a),n}function Ng(e,t,r){let n=!1;t=t!=null?t:e.atoms.length;let i="",a="";const s=e.atoms[e.index];if(!s)return!1;const u={"\\ne":"≠","\\neq":"&neq;","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(u[s.command]){e.index+=1;const d=`<mo${en(s.id,r)}>${u[s.command]}</mo>`;return Po(d,e,r)||(e.mathML+=d,e.lastType="mo"),!0}if(e.index<t&&(s.type==="mbin"||s.type==="mrel"))i+=Df(e.atoms[e.index],r),e.index+=1,a="mo";else if(e.index<t&&(s.type==="mop"||s.type==="operator"||s.type==="extensible-symbol")){if(s.subsupPlacement==="over-under"&&(s.superscript||s.subscript)){const d=zs(s,r);return s.superscript&&s.subscript?(i+="<munderover>"+d,i+=Hr(s.subscript,r),i+=Hr(s.superscript,r),i+="</munderover>"):s.superscript?(i+="<mover>"+d,i+=Hr(s.superscript,r),i+="</mover>"):s.subscript&&(i+="<munder>"+d,i+=Hr(s.subscript,r),i+="</munder>"),e.mathML+=i,e.lastType="mo",e.index+=1,!0}{const d=e.atoms[e.index],h=d.value==="\\operatorname",p=h?'<mi class="MathML-Unit"'+en(d.id,r)+">"+jl(d.value)+"</mi>":zs(d,r);i+=p,!h&&!/^<mo>(.*)<\/mo>$/.test(p)?(i+=Oh,a="applyfunction"):a=h?"mi":"mo"}(e.lastType==="mi"||e.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(i)&&(i=a0+i),e.index+=1}return i.length>0&&(n=!0,Po(i,e,r)||(e.mathML+=i,e.lastType=a)),n}function Hr(e,t,r,n){t!=null||(t={});const i={atoms:[],index:r!=null?r:0,mathML:"",lastType:""};if(typeof e=="number"||typeof e=="boolean")i.mathML=e.toString();else if(typeof e=="string")i.mathML=e;else if(e instanceof _e)i.mathML=Df(e,t);else if(Array.isArray(e)){i.atoms=e;let a=0;for(n=n||(e?e.length:0);i.index<n;)if(Pg(i,n,t)||Rg(i,n,t)||Ig(i,n,t)||Ng(i,n,t)||Og(i,n,t))a+=1;else if(i.index<n){let s=Df(i.atoms[i.index],t);i.lastType==="mn"&&s.length>0&&i.atoms[i.index].type==="genfrac"&&(s="<mo>⁤</mo>"+s),i.atoms[i.index].type==="genfrac"?i.lastType="mfrac":i.lastType="",i.index+=1,Po(s,i,t)?a+=1:s.length>0&&(i.mathML+=s,a+=1)}a>1&&(i.mathML="<mrow>"+i.mathML+"</mrow>")}return i.mathML}function zs(e,t){let r="";const n=jl(e.value);return n&&(r="<mo"+en(e.id,t)+">"+n+"</mo>"),r}function jl(e){if(!e)return"";if(typeof e=="string")return o0(e);if(!Array.isArray(e)&&typeof e.body=="string")return o0(e.body);let t="";for(const r of e)typeof r.value=="string"&&(t+=r.value);return o0(t)}function Df(e,t){var r,n,i,a,s,u,d,h,p,y,M,I,$,se,Ze,ee,De,Je,Te,yt,Rt,Dt;if(e.mode==="text")return`<mi${en(e.id,t)}>${e.value}</mi>`;const Ar={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},Xr={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let nt="",na="",lo,ba,Gn,ia,Ti,tn;const{command:Cn}=e;if(e.command==="\\error")return`<merror${en(e.id,t)}>${Hr(e.body,t)}</merror>`;const qn={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},co={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(e.type){case"first":break;case"group":case"root":nt=Hr(e.body,t);break;case"array":if((e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(nt+="<mrow>",e.leftDelim&&e.leftDelim!=="."&&(nt+="<mo>"+(qn[e.leftDelim]||e.leftDelim)+"</mo>")),nt+="<mtable",e.colFormat){for(nt+=' columnalign="',Gn=0;Gn<e.colFormat.length;Gn++)e.colFormat[Gn].align&&(nt+={l:"left",c:"center",r:"right"}[e.colFormat[Gn].align]+" ");nt+='"'}for(nt+=">",ba=0;ba<e.array.length;ba++){for(nt+="<mtr>",lo=0;lo<e.array[ba].length;lo++)nt+="<mtd>"+Hr(e.array[ba][lo],t)+"</mtd>";nt+="</mtr>"}nt+="</mtable>",(e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(e.rightDelim&&e.rightDelim!=="."&&(nt+="<mo>"+(qn[e.leftDelim]||e.rightDelim)+"</mo>"),nt+="</mrow>");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(nt+="<mrow>"),e.leftDelim&&e.leftDelim!=="."&&(nt+="<mo"+en(e.id,t)+">"+(qn[e.leftDelim]||e.leftDelim)+"</mo>"),e.hasBarLine?(nt+="<mfrac>",nt+=Hr(e.above,t)||"<mi> </mi>",nt+=Hr(e.below,t)||"<mi> </mi>",nt+="</mfrac>"):(nt+="<mtable"+en(e.id,t)+">",nt+="<mtr>"+Hr(e.above,t)+"</mtr>",nt+="<mtr>"+Hr(e.below,t)+"</mtr>",nt+="</mtable>"),e.rightDelim&&e.rightDelim!=="."&&(nt+="<mo"+en(e.id,t)+">"+(qn[e.rightDelim]||e.rightDelim)+"</mo>"),(e.leftDelim||e.rightDelim)&&(nt+="</mrow>");break;case"surd":e.hasEmptyBranch("above")?(nt+="<msqrt"+en(e.id,t)+">",nt+=Hr(e.body,t),nt+="</msqrt>"):(nt+="<mroot"+en(e.id,t)+">",nt+=Hr(e.body,t),nt+=Hr(e.above,t),nt+="</mroot>");break;case"leftright":const uo=e,fo=uo.leftDelim;nt="<mrow>",fo&&fo!=="."&&(nt+=`<mo${en(e.id,t)}>${(r=qn[fo])!=null?r:fo}</mo>`),e.body&&(nt+=Hr(e.body,t));const ho=uo.matchingRightDelim();ho&&ho!=="."&&(nt+=`<mo${en(e.id,t)}>${(n=qn[ho])!=null?n:ho}</mo>`),nt+="</mrow>";break;case"sizeddelim":case"delim":nt+=`<mo${en(e.id,t)}>${qn[e.value]||e.value}</mo>`;break;case"accent":nt+='<mover accent="true"'+en(e.id,t)+">",nt+=Hr(e.body,t),nt+="<mo>"+(co[Cn]||e.accent)+"</mo>",nt+="</mover>";break;case"line":case"overlap":break;case"overunder":Ti=e.above,ia=e.below,(e.svgAbove||Ti)&&(e.svgBelow||ia)?tn=e.body:Ti&&Ti.length>0?(tn=e.body,(a=(i=e.body)==null?void 0:i[0])!=null&&a.below?(ia=e.body[0].below,tn=e.body[0].body):((u=(s=e.body)==null?void 0:s[0])==null?void 0:u.type)==="first"&&((h=(d=e.body)==null?void 0:d[1])!=null&&h.below)&&(ia=e.body[1].below,tn=e.body[1].body)):ia&&ia.length>0&&(tn=e.body,(y=(p=e.body)==null?void 0:p[0])!=null&&y.above?(Ti=e.body[0].above,tn=e.body[0].body):((I=(M=e.body)==null?void 0:M[0])==null?void 0:I.type)==="first"&&((se=($=e.body)==null?void 0:$[1])!=null&&se.above)&&(Ti=e.body[1].overscript,tn=e.body[1].body)),(e.svgAbove||Ti)&&(e.svgBelow||ia)?(nt+=`<munderover ${en(e.id,t)}>`,nt+=(Ze=Ar[e.svgBody])!=null?Ze:Hr(tn,t),nt+=(ee=Ar[e.svgBelow])!=null?ee:Hr(ia,t),nt+=(De=Ar[e.svgAbove])!=null?De:Hr(Ti,t),nt+="</munderover>"):e.svgAbove||Ti?(nt+=`<mover ${en(e.id,t)}>`+((Je=Ar[e.svgBody])!=null?Je:Hr(tn,t)),nt+=(Te=Ar[e.svgAbove])!=null?Te:Hr(Ti,t),nt+="</mover>"):(e.svgBelow||ia)&&(nt+=`<munder ${en(e.id,t)}>`+((yt=Ar[e.svgBody])!=null?yt:Hr(tn,t)),nt+=(Rt=Ar[e.svgBelow])!=null?Rt:Hr(ia,t),nt+="</munder>");break;case"placeholder":nt+="?";break;case"mord":{nt=typeof e.value=="string"?e.value:Cn,Cn==="\\char"?nt="&#x"+("000000"+e.args[0].number.toString(16)).slice(-4)+";":nt.length>0&&nt.startsWith("\\")&&(typeof e.value=="string"&&e.value.charCodeAt(0)>255?nt="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof e.value=="string"?nt=e.value.charAt(0):(console.error("Did not expect this"),nt=""));const Oa=/\d/.test(nt)?"mn":"mi";nt=`<${Oa}${en(e.id,t)}>${o0(nt)}</${Oa}>`;break}case"mbin":case"mrel":case"minner":nt=zs(e,t);break;case"mpunct":nt='<mo separator="true"'+en(e.id,t)+">"+Cn+"</mo>";break;case"mop":case"operator":case"extensible-symbol":e.body!=="\u200B"&&(nt="<mo"+en(e.id,t)+">",nt+=Cn==="\\operatorname"?e.body:Cn||e.body,nt+="</mo>");break;case"box":nt='<menclose notation="box"',e.backgroundcolor&&(nt+=' mathbackground="'+e.backgroundcolor+'"'),nt+=en(e.id,t)+">"+Hr(e.body,t)+"</menclose>";break;case"spacing":nt+='<mspace width="'+((Dt=Xr[Cn])!=null?Dt:0)+'em"/>';break;case"enclose":nt='<menclose notation="';for(const Oa in e.notation)Object.prototype.hasOwnProperty.call(e.notation,Oa)&&e.notation[Oa]&&(nt+=na+Oa,na=" ");nt+=en(e.id,t)+'">'+Hr(e.body,t)+"</menclose>";break;case"prompt":nt='<menclose notation="roundexbox""">'+Hr(e.body,t)+"</menclose>";break;case"space":nt+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":nt+=zs(e,t);break;case"mclose":nt+=zs(e,t);break;case"macro":{const Oa=e.command+jl(e.macroArgs);Oa&&(nt+=`<mo ${en(e.id,t)}>${Oa}</mo>`)}break;case"latexgroup":nt+=Hr(e.body,t);break;case"latex":nt+="<mtext"+en(e.id,t)+">"+e.value+"</mtext>";break;case"tooltip":nt+=Hr(e.body,t);break;case"text":nt+=`<mtext ${en(e.id,t)}x>${e.value}</mtext>`;break;default:if(e.command==="\\displaystyle")return`<mrow ${en(e.id,t)} displaystyle="true">${Hr(e.body,t)}</mrow>`;if(e.command==="\\textstyle")return`<mrow ${en(e.id,t)} displaystyle="false">${Hr(e.body,t)}</mrow>`;console.info("Unexpected element in conversion to MathML:",e)}return nt}var Ul={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"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 ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\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 <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Af={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Fg(e){let t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t}function Yc(e){let t=0;if(A(e))for(const r of e)r.type!=="first"&&(t+=1);return t===1}function zg(e){if(A(e)){for(const t of e)if(t.type!=="first"&&t.id)return t.id.toString()}return""}function Nh(e){let t="";if(A(e))for(const r of e)r.type!=="first"&&typeof r.value=="string"&&(t+=r.value);return t}function Kg(e){return e?e.map(t=>t.value).join(""):""}function _r(e,t){var r,n,i,a,s;function u(p){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(p)?` <say-as interpret-as="character">${p}</say-as>`:/[A-Z]/.test(p)?`capital <say-as interpret-as="character">${p.toLowerCase()}</say-as>`:p:/[a-z]/.test(p)?" '"+p.toUpperCase()+"'":/[A-Z]/.test(p)?" 'capital "+p.toUpperCase()+"'":p}function d(p){return"<emphasis>"+p+"</emphasis>"}if(!t)return"";let h="";if(A(t)){let p=!1,y=!1;for(let M=0;M<t.length;M++)t[M].type!=="first"&&(t[M].mode!=="text"&&(y=!1),M<t.length-2&&t[M].type==="mopen"&&t[M+2].type==="mclose"&&t[M+1].type==="mord"?(h+=" of ",h+=d(_r(e,t[M+1])),M+=2):t[M].mode==="text"?y?h+=(r=t[M].value)!=null?r:" ":(y=!0,h+=_r("text",t[M])):t[M].isDigit()?p?h+=t[M].asDigit():(p=!0,h+=_r(e,t[M])):(p=!1,h+=_r(e,t[M])))}else if(t.mode==="text")t.id&&e==="math"&&(h+='<mark name="'+t.id.toString()+'"/>'),h+=t.value;else{t.id&&e==="math"&&(h+='<mark name="'+t.id.toString()+'"/>');let p="",y="",M="",I=!1;const{command:$}=t;switch($){case"\\vec":return"vector "+_r(e,t.body);case"\\acute":return _r(e,t.body)+" acute";case"\\grave":return _r(e,t.body)+" grave";case"\\dot":return"dot over"+_r(e,t.body);case"\\ddot":return"double dot over"+_r(e,t.body);case"\\mathring":return"ring over"+_r(e,t.body);case"\\tilde":case"\\widetilde":return"tilde over"+_r(e,t.body);case"\\bar":return _r(e,t.body)+" bar";case"\\breve":return _r(e,t.body)+" breve";case"\\check":case"\\widecheck":return"check over "+_r(e,t.body);case"\\hat":case"\\widehat":return"hat over"+_r(e,t.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+_r(e,t.body);case"\\underarc":case"\\underparen":return"arc under "+_r(e,t.body)}switch(t.type){case"prompt":const se=t.body.length>1?'start input . <break time="500ms"/> '+_r(e,t.body)+'. <break time="500ms"/> end input':"blank";h+=' <break time="300ms"/> '+se+'. <break time="700ms"/>'+((n=t.correctness)!=null?n:"")+' . <break time="700ms"/> ';break;case"array":const Ze=t.array,ee=t.environmentName;if(Object.keys(Af).includes(ee)){h+=` begin ${Af[ee]} `;for(let Te=0;Te<Ze.length;Te++){Te>0&&(h+=","),h+=` row ${Te+1} `;for(let yt=0;yt<Ze[Te].length;yt++)yt>0&&(h+=","),h+=` column ${yt+1}: `,h+=_r("math",Ze[Te][yt])}h+=` end ${Af[ee]} `}break;case"group":$==="\\ne"?h+=" not equal ":($==="\\not"&&(h+=" not "),h+=_r("math",t.body));break;case"root":h+=_r("math",t.body);break;case"genfrac":if(p=_r("math",t.above),y=_r("math",t.below),Yc(t.above)&&Yc(t.below)){const yt={"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 "}[Nh(t.above)+"/"+Nh(t.below)];yt?h=yt:h+=p+" over "+y}else h+=' the fraction <break time="150ms"/>'+p+' over <break time="150ms"/>'+y+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(M=_r("math",t.body),t.hasEmptyBranch("above"))h+=Yc(t.body)?" the square root of "+M+" , ":' the square root of <break time="200ms"/>'+M+'. <break time="200ms"/> End square root';else{let Te=_r("math",t.above);Te=Te.trim();const yt=Te.replace(/<mark([^/]*)\/>/g,"");yt==="3"?h+=' the cube root of <break time="200ms"/>'+M+'. <break time="200ms"/> End cube root':yt==="n"?h+=' the nth root of <break time="200ms"/>'+M+'. <break time="200ms"/> End root':h+=' the root with index: <break time="200ms"/>'+Te+', of <break time="200ms"/>'+M+'. <break time="200ms"/> End root'}break;case"leftright":{const Te=t;h+=(i=Te.leftDelim?Ul[Te.leftDelim]:void 0)!=null?i:Te.leftDelim,h+=_r("math",t.body),h+=(a=Te.rightDelim?Ul[Te.rightDelim]:void 0)!=null?a:Te.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const De=$.replace(/^\\/g,""),Je=vt()[De];Je&&(Je!=null&&Je.expand?h+=_r("math",t.body):h+=`${De} `);break;case"placeholder":h+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if($==="\\mathbin"||$==="\\mathrel"||$==="\\mathopen"||$==="\\mathclose"||$==="\\mathpunct"||$==="\\mathord"||$==="\\mathinner"){h=_r(e,t.body);break}let Te=t.isDigit()?t.asDigit():t.value,yt=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(yt=t.value,Te=yt),e==="text")h+=Te;else{if(t.type==="mbin"&&(h+='<break time="150ms"/>'),Te){const Rt=Ul[Te]||(yt?Ul[yt.trim()]:"");if(Rt)h+=" "+Rt;else{const Dt=yt?Fg(yt.trim()):"";h+=Dt||u(Te)}}else h+=_r("math",t.body);t.type==="mbin"&&(h+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(t.value!=="\u200B"){const Te=t.command;if(Te==="\\sum")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let yt=_r("math",t.superscript);yt=yt.trim();let Rt=_r("math",t.subscript);Rt=Rt.trim(),h+=' the summation from <break time="200ms"/>'+Rt+'<break time="200ms"/> to <break time="200ms"/>'+yt+'<break time="200ms"/> of <break time="150ms"/>',I=!0}else if(t.hasEmptyBranch("subscript"))h+=" the summation of";else{let yt=_r("math",t.subscript);yt=yt.trim(),h+=' the summation from <break time="200ms"/>'+yt+'<break time="200ms"/> of <break time="150ms"/>',I=!0}else if(Te==="\\prod")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let yt=_r("math",t.superscript);yt=yt.trim();let Rt=_r("math",t.subscript);Rt=Rt.trim(),h+=' the product from <break time="200ms"/>'+Rt+'<break time="200ms"/> to <break time="200ms"/>'+yt+'<break time="200ms"/> of <break time="150ms"/>',I=!0}else if(t.hasEmptyBranch("subscript"))h+=" the product of ";else{let yt=_r("math",t.subscript);yt=yt.trim(),h+=' the product from <break time="200ms"/>'+yt+'<break time="200ms"/> of <break time="150ms"/>',I=!0}else if(Te==="\\int")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let yt=_r("math",t.superscript);yt=yt.trim();let Rt=_r("math",t.subscript);Rt=Rt.trim(),h+=' the integral from <break time="200ms"/>'+d(Rt)+'<break time="200ms"/> to <break time="200ms"/>'+d(yt)+' <break time="200ms"/> of ',I=!0}else h+=' the integral of <break time="200ms"/> ';else if(typeof t.value=="string"){const yt=(s=Ul[t.value])!=null?s:t.command?Ul[t.command]:void 0;h+=yt||" "+t.value}else t.command&&(t.command==="\\mathop"?h+=_r("math",t.body):t.command==="\\operatorname"?h+=Kg(t.body):h+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command)}break;case"enclose":M=_r("math",t.body),h+=" crossed out "+M+". End crossed out.";break;case"space":case"spacing":break}if(!I&&!t.hasEmptyBranch("superscript")){let se=_r(e,t.superscript);se=se.trim();const Ze=se.replace(/<[^>]*>/g,"");if(Yc(t.superscript)){if(e==="math"){const ee=zg(t.superscript);ee&&(h+='<mark name="'+ee+'"/>')}Ze==="\u2032"?h+=" prime ":Ze==="2"?h+=" squared ":Ze==="3"?h+=" cubed ":Number.isNaN(Number.parseInt(Ze))?h+=" to the "+se+"; ":h+=' to the <say-as interpret-as="ordinal">'+Ze+"</say-as> power; "}else Number.isNaN(Number.parseInt(Ze))?h+=" raised to the "+se+"; ":h+=' raised to the <say-as interpret-as="ordinal">'+Ze+"</say-as> power; "}if(!I&&!t.hasEmptyBranch("subscript")){let se=_r("math",t.subscript);se=se.trim(),h+=Yc(t.subscript)?" sub "+se:" subscript "+se+". End subscript. "}}return h}function Gl(e){var t,r;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const i=Hr(e);if(i){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(t=window.MathfieldElement.textToSpeechRulesOptions)!=null?t:{},window.MathfieldElement.textToSpeechRulesOptions=_(S({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=_(S({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=_(S({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const a=(r=window.SRE)!=null?r:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&a.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let s="";try{s=a.toSpeech(i)}catch(u){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",u)}return s}return""}let n=_r("math",e);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let i="";window.MathfieldElement.speechEngineRate&&(i='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),n='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+i+"<p><s>"+n+"</s></p>"+(i?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&Qe()==="macos"?n=n.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):n=n.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return n}var Qc={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\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":" ","\\infty":"oo"},eu={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Hg(e){let t="";for(const r of e){const n=t[t.length-1];n!==void 0&&/\d/.test(n)&&/^\d/.test(r)&&(t+=" "),t+=r}return t}function Mn(e){var t,r,n,i,a,s,u,d,h,p,y,M,I;if(!e)return"";if(A(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(Mn).join("");if(e[0].mode==="text"){let Je=0,Te="";for(;((t=e[Je])==null?void 0:t.mode)==="text";)Te+=e[Je].body?Mn(e[Je].body):e[Je].value,Je++;return`"${Te}" ${Mn(e.slice(Je))}`}let ee=0;const De=[];for(;e[ee]&&e[ee].mode==="math";){let Je="";for(;e[ee]&&e[ee].type==="mord"&&/\d/.test(e[ee].value);)Je+=e[ee++].value;Je?De.push(Je):De.push(Mn(e[ee++]))}return De.push(Mn(e.slice(ee))),Hg(De)}if(e.mode==="text")return`"${e.value}"`;let $="";const{command:se}=e;let Ze;if(se==="\\placeholder")return`(${Mn(e.body)})`;switch(e.type){case"accent":const ee={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[se];$=`${ee!=null?ee:""} ${Mn(e.body)} `;break;case"first":return"";case"latexgroup":return e.body.map(Dt=>Dt.value).join("");case"group":case"root":$=(r=Qc[se])!=null?r:Mn(e.body);break;case"genfrac":{const Dt=e;(Dt.leftDelim||Dt.rightDelim)&&($=Dt.leftDelim==="."||!Dt.leftDelim?"{:":Dt.leftDelim),Dt.hasBarLine?($+="(",$+=Mn(Dt.above),$+=")/(",$+=Mn(Dt.below),$+=")"):($+="("+Mn(Dt.above)+"),",$+="("+Mn(Dt.below)+")"),(Dt.leftDelim||Dt.rightDelim)&&($+=Dt.rightDelim==="."||!Dt.rightDelim?"{:":Dt.rightDelim)}break;case"surd":$+=e.hasEmptyBranch("above")?"sqrt("+Mn(e.body)+")":"root("+Mn(e.above)+")("+Mn(e.body)+")";break;case"latex":$=e.value;break;case"leftright":{const Dt=e,Ar=Dt.leftDelim;$+=Ar==="."||!Ar?"{:":Ar,$+=Mn(Dt.body);const Xr=Dt.matchingRightDelim();$+=Xr==="."||!Xr?":}":Xr}break;case"sizeddelim":case"delim":$=e.value;break;case"overlap":break;case"overunder":break;case"mord":$=(i=(n=Qc[se])!=null?n:se)!=null?i:typeof e.value=="string"?e.value:"",$.startsWith("\\")&&($+=" "),Ze=se?se.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,Ze?$=String.fromCodePoint(Number.parseInt("0x"+Ze[1])):$.length>0&&$.startsWith("\\")&&($=typeof e.value=="string"?e.value.charAt(0):e.command),$=Wg($,e.style);break;case"mbin":case"mrel":case"minner":$=(s=(a=Qc[se])!=null?a:eu[se])!=null?s:e.value;break;case"mopen":case"mclose":$=e.value;break;case"mpunct":$=(u=eu[se])!=null?u:se;break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(eu[se]?$=eu[se]:$=se==="\\operatorname"?Mn(e.body):(d=e.value)!=null?d:se,$+=" ");break;case"array":const De=e.array,Je=e.environmentName,Te=(h={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Je])!=null?h:["(",")"],yt=[];for(const Dt of De){const Ar=[];for(const Xr of Dt)Ar.push(Te[0]+Mn(Xr)+Te[1]);yt.push(Ar.join(","))}const Rt=(p={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Je])!=null?p:["(",")"];$=Rt[0]+yt.join(",")+Rt[1];break;case"box":break;case"spacing":$=(y=Qc[se])!=null?y:" ";break;case"enclose":$="("+Mn(e.body)+")";break;case"space":$=" ";break;case"subsup":$="";break;case"macro":$=(I=(M=Qc[se])!=null?M:eu[se])!=null?I:Mn(e.body);break}if(!e.hasEmptyBranch("subscript")){$+="_";const ee=Mn(e.subscript);$+=ee.length!==1?`(${ee})`:ee}if(!e.hasEmptyBranch("superscript")){$+="^";const ee=Mn(e.superscript);$+=ee.length!==1?`(${ee})`:ee}return $}function Wg(e,t){if(!t)return e;let r=e;return t.variant==="double-struck"&&(r=`bbb "${r}"`),t.variant==="script"&&(r=`cc "${r}"`),t.variant==="fraktur"&&(r=`fr "${r}"`),t.variant==="sans-serif"&&(r=`sf "${r}"`),t.variant==="monospace"&&(r=`tt "${r}"`),t.variantStyle==="bold"&&(r=`bb "${r}"`),t.color?`color({${t.color}})(${r})`:r}function Un(e,t){var r,n;t!=null||(t={}),t.mathstyle=(r=t.mathstyle)!=null?r:"displaystyle";const i=new Dr({from:_(S({},Lc()),{renderPlaceholder:()=>new Ue(160,{maxFontSize:1}),letterShapeStyle:(n=t==null?void 0:t.letterShapeStyle)!=null?n:"tex"}),mathstyle:t.mathstyle}),s=new _e({mode:"math",type:"root",body:b(e,{context:i,parseMode:"math",mathstyle:t.mathstyle})}).render(i);return s?(gl(Pa(s,i)),vl(s,{classes:"ML__latex"}).toMarkup()):""}function $v(e){return D(e,{context:Lc()})}function Vg(e,t={}){return Hr(b(e,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),t)}function Zg(e){const t=b(e,{parseMode:"math",mathstyle:"displaystyle"});return Gl(t)}var s0;function jg(e){var t,r;if(!s0){const n=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;n?s0=new n:console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}return(r=s0==null?void 0:s0.box(e).latex)!=null?r:""}function Tv(e,t="math"){return Mn(new _e({type:"root",body:b(e,{parseMode:t})}))}function Pv(e){return qa(e,{format:"ascii-math"})[1]}function Lf(e){if(typeof e=="string"){const t=Ug(e);if(!t)throw new Error(`Invalid color: ${e}`);return t}return"C"in e?qg(e):"a"in e?Fh(e):e}function ql(e){return e<0?0:e>255?255:Math.round(e)}function Ug(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return 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)},e.length===4&&(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)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&typeof t.a=="undefined"&&(t.a=1),t}function Bf(e){const[t,r,n]=[e.L,e.C,e.H],i=n*Math.PI/180,a={L:t,a:r*Math.cos(i),b:r*Math.sin(i)};return e.alpha!==void 0&&(a.alpha=e.alpha),a}function Gg(e){const[t,r,n]=[e.L,e.a,e.b],i=Math.sqrt(r*r+n*n),s=Math.atan2(n,r)*180/Math.PI,u={L:t,C:i,H:s};return e.alpha!==void 0&&(u.alpha=e.alpha),u}function If(e){const[t,r,n]=[e.L,e.a,e.b],i=Math.pow(.9999999984505198*t+.39633779217376786*r+.2158037580607588*n,3),a=Math.pow(1.00000000888176*t-.10556134232365635*r-.0638541747717059*n,3),s=Math.pow(t*1.000000054672411-.0894841820949657*r-1.2914855378640917*n,3),u=4.076741661347994*i-3.307711590408193*a+.230969928729428*s,d=-1.2684380040921763*i+2.6097574006633715*a-.3413193963102197*s,h=-.004196086541837188*i-.7034186144594493*a+1.7076147009309444*s,p=y=>{const M=Math.abs(y);return M<=.0031308?y*12.92:(Math.sign(y)||1)*(1.055*Math.pow(M,1/2.4)-.055)};return[p(u),p(d),p(h)]}function $f(e){const[t,r,n]=e;return t>=0&&t<=1&&r>=0&&r<=1&&n>=0&&n<=1}function Tf(e,t){let[r,n,i]=e;return r=ql(r*255),n=ql(n*255),i=ql(i*255),t!==void 0?{r,g:n,b:i,alpha:t}:{r,g:n,b:i}}function Fh(e){let[t,r,n]=If(e);if($f([t,r,n]))return Tf([t,r,n],e.alpha);const i=Gg(e);if(i.C=0,[t,r,n]=If(Bf(i)),!$f([t,r,n]))return Tf([t,r,n],e.alpha);let a=0,s=e.L,u=(a+s)/2;i.C=u;const d=.36/Math.pow(2,12);for(;s-a>d;)u=(a+s)/2,i.C=u,[t,r,n]=If(Bf(i)),$f([t,r,n])?a=u:s=u;return Tf([t,r,n],e.alpha)}function qg(e){return Fh(Bf(e))}function zh(e,t){const r=Lf(e),n=Lf(t),i=.56,a=.57,s=.62,u=.65,d=.022,h=1.414,p=.1,y=5e-4,M=1.14,I=.027,$=1.14,se=.027;function Ze(Dt){return Dt>=d?Dt:Dt+po(d-Dt,h)}function ee(Dt){return(Dt<0?-1:1)*Math.pow(Math.abs(Dt),2.4)}const De=Ze(ee(n.r/255)*.2126729+ee(n.g/255)*.7151522+ee(n.b/255)*.072175),Je=Ze(ee(r.r/255)*.2126729+ee(r.g/255)*.7151522+ee(r.b/255)*.072175);let Te,yt,Rt;return Math.abs(Je-De)<y?yt=0:Je>De?(Te=po(Je,i)-po(De,a),yt=Te*M):(Te=po(Je,u)-po(De,s),yt=Te*$),Math.abs(yt)<p?Rt=0:yt>0?Rt=yt-se:Rt=yt+I,Rt*100}function Kh(e,t,r){r!=null||(r="#fff"),t!=null||(t="#000");const n=zh(e,r),i=zh(e,t);return Math.abs(n)>Math.abs(i)?r:t}function Xg(e){const t=Lf(e);let r=((1<<24)+(ql(t.r)<<16)+(ql(t.g)<<8)+ql(t.b)).toString(16).slice(1);return t.alpha!==void 0&&t.alpha<1&&(r+=("00"+Math.round(t.alpha*255).toString(16)).slice(-2)),r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]&&r[6]===r[7]&&(r=r[0]+r[2]+r[4]+(t.alpha!==void 0&&t.alpha<1?r[6]:"")),"#"+r}function cn(e){const t=Hh(e);let r="";for(const n of t){if(typeof n.value!="string")return"";r+=n.value}return r}function Hh(e){const r=e.model.selection.ranges;return r.length!==1?[]:e.model.getAtoms(r[0])}function Jg(e,t){const r=Hh(e);if(r.length!==1)return!1;const n=To[t];return n?!!n.test(r[0].value):!1}function Yg(e,t){return cn(e).length>0}function Qg(e){return[Pf(e,"double-struck","mathbb","tooltip.blackboard"),Pf(e,"fraktur","mathfrak","tooltip.fraktur"),Pf(e,"calligraphic","mathcal","tooltip.caligraphic"),Rf(e,"up","mathrm","tooltip.roman-upright"),Rf(e,"bold","mathbf","tooltip.bold"),Rf(e,"italic","mathit","tooltip.italic")]}function ev(e){return[{label:()=>Un(`\\vec{${cn(e)}}`),visible:()=>cn(e).length===1,onMenuSelect:()=>e.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overrightarrow{${cn(e)}}`),visible:()=>cn(e).length>0,onMenuSelect:()=>e.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overleftarrow{${cn(e)}}`),visible:()=>cn(e).length>0,onMenuSelect:()=>e.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Un(`\\dot{${cn(e)}}`),visible:()=>cn(e).length===1,onMenuSelect:()=>e.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Un(`\\ddot{${cn(e)}}`),visible:()=>cn(e).length===1,onMenuSelect:()=>e.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Un(`\\bar{${cn(e)}}`),visible:()=>cn(e).length===1,onMenuSelect:()=>e.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overline{${cn(e)}}`),visible:()=>cn(e).length>0,onMenuSelect:()=>e.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overgroup{${cn(e)}}`),visible:()=>cn(e).length>0,onMenuSelect:()=>e.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Un(`\\overbrace{${cn(e)}}`),visible:()=>cn(e).length>0,onMenuSelect:()=>e.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Un(`\\underline{${cn(e)}}`),visible:()=>cn(e).length>0,onMenuSelect:()=>e.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Un(`\\undergroup{${cn(e)}}`),visible:()=>cn(e).length>0,onMenuSelect:()=>e.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Un(`\\underbrace{${cn(e)}}`),visible:()=>cn(e).length>0,onMenuSelect:()=>e.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function tv(e){return[{label:()=>Un(`\\boxed{${e.getValue(e.model.selection)}}}`),onMenuSelect:()=>e.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Un(`\\bbox[5px, border: 2px solid red]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Un(`\\bbox[5px, border: 2px dashed black]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function rv(e){const t=[];for(const r of Object.keys(Y))t.push({class:(Xg(Kh(Y[r]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Y[r]} "></span>`,ariaLabel:()=>{var n;return(n=Se(r))!=null?n:r},checked:()=>{var n;return{some:"mixed",all:!0}[(n=e.queryStyle({backgroundColor:r}))!=null?n:!1]},onMenuSelect:()=>{e.applyStyle({backgroundColor:r},{operation:"toggle"}),e.adoptStyle="none"}});return t}function nv(e){const t=[];for(const r of Object.keys(te))t.push({class:(Kh(te[r])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${te[r]} "></span>`,ariaLabel:()=>{var n;return(n=Se(r))!=null?n:r},checked:()=>{var n;return{some:"mixed",all:!0}[(n=e.queryStyle({color:r}))!=null?n:!1]},onMenuSelect:()=>{e.applyStyle({color:r},{operation:"toggle"}),e.adoptStyle="none"}});return t}var iv=class extends Ah{constructor(e,t,r,n){super(e,t),this.row=r,this.col=n}set active(e){const t=this.parentMenu.children;if(e)for(const r of t)r.element.classList.toggle("active",r.row<=this.row&&r.col<=this.col);else for(const r of t)r.element.classList.remove("active")}};function av(e){const t=[];for(let r=1;r<=5;r++)for(let n=1;n<=5;n++)t.push({onCreate:(i,a)=>new iv(i,a,r,n),label:"\u2610",tooltip:()=>Se("tooltip.row-by-col",r,n),data:{row:r,col:n},onMenuSelect:()=>{e.insert(`\\begin{pmatrix}${Array(r).fill(Array(n).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return t}function ov(e){return[{label:()=>Se("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>e.executeCommand("addRowBefore"),visible:()=>Ks(e)},{label:()=>Se("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>e.executeCommand("addRowAfter"),visible:()=>Ks(e)},{label:()=>Se("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>e.executeCommand("addColumnBefore"),visible:()=>Ks(e),enabled:()=>{const t=e.model.parentEnvironment;if(!t)return!1;const[r,n]=lv(e);return r<t.maxColumns}},{label:()=>Se("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>e.executeCommand("addColumnAfter"),visible:()=>Ks(e)},{type:"divider"},{label:()=>Se("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>e.executeCommand("removeRow"),visible:()=>Ks(e)},{label:()=>Se("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>e.executeCommand("removeColumn"),visible:()=>Ks(e)},{type:"divider"},{label:()=>Se("menu.borders"),visible:()=>(sv(e)||Ks(e))&&e.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>tu(e,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>tu(e,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>tu(e,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>tu(e,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>tu(e,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>Se("menu.insert matrix"),id:"insert-matrix",visible:()=>e.isSelectionEditable,submenu:av(e),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>Se("menu.mode"),id:"mode",visible:()=>e.isSelectionEditable&&e.model.selectionIsCollapsed,submenu:[{label:()=>Se("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Nl(e,"accept-all"),e.executeCommand(["switchMode","math"])},checked:()=>e.model.mode==="math"},{label:()=>Se("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Nl(e,"accept-all"),e.executeCommand(["switchMode","text"])},checked:()=>e.model.mode==="text"},{label:()=>Se("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>e.executeCommand(["switchMode","latex"]),checked:()=>e.model.mode==="latex"}]},{type:"divider"},{label:()=>Se("menu.font-style"),id:"variant",visible:()=>e.isSelectionEditable,submenu:Qg(e),submenuClass:"variant-submenu"},{label:()=>Se("menu.color"),id:"color",visible:()=>e.isSelectionEditable,submenu:nv(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>Se("menu.background-color"),id:"background-color",visible:()=>e.isSelectionEditable,submenu:rv(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>Se("menu.accent"),id:"accent",visible:()=>e.isSelectionEditable,submenu:ev(e),submenuClass:"variant-submenu"},{label:()=>Se("menu.decoration"),id:"decoration",visible:()=>e.isSelectionEditable&&cn(e).length>0,submenu:tv(e),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>Se("menu.evaluate"),id:"ce-evaluate",visible:()=>e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const t=cv(e);if(!t){e.model.announce("plonk");return}e.model.selectionIsCollapsed?(e.model.position=e.model.lastOffset,e.insert(`=${t}`,{insertionMode:"insertAfter",selectionMode:"item"})):e.insert(t,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>Se("menu.simplify"),id:"ce-simplify",visible:()=>e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var t,r;if(e.model.selectionIsCollapsed){const n=(t=e.expression)==null?void 0:t.simplify();if(e.model.position=e.model.lastOffset,!n){e.model.announce("plonk");return}e.insert(`=${n.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{const n=(r=window.MathfieldElement.computeEngine)==null?void 0:r.parse(e.getValue(e.model.selection)).simplify();if(!n){e.model.announce("plonk");return}e.insert(n.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var t;if(window.MathfieldElement.computeEngine===null)return"";const r=(t=e.expression)==null?void 0:t.unknowns[0];return r?Se("menu.solve-for",Un(r)):Se("menu.solve")},id:"ce-solve",visible:()=>{var t;return e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((t=e.expression)==null?void 0:t.unknowns.length)===1&&e.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var t;const r=e.expression,n=r==null?void 0:r.unknowns[0],i=(t=r.solve(n))==null?void 0:t.map(a=>{var s;return(s=a.simplify().latex)!=null?s:""});if(!i){e.model.announce("plonk");return}e.insert(`${n}=${i.length===1?i[0]:"\\left\\lbrace"+(i==null?void 0:i.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>Se("menu.cut"),onMenuSelect:()=>e.executeCommand("cutToClipboard"),visible:()=>!e.options.readOnly&&e.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>Se("menu.copy"),id:"copy",submenu:[{label:()=>Se("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>Qr.copyToClipboard(e,"latex"),keyboardShortcut:"meta+C"},{label:()=>Se("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>Qr.copyToClipboard(e,"ascii-math")},{label:()=>Se("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>Qr.copyToClipboard(e,"math-ml")}]},{label:()=>Se("menu.paste"),id:"paste",onMenuSelect:()=>e.executeCommand("pasteFromClipboard"),visible:()=>e.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>Se("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>e.executeCommand("selectAll")}]}function Ks(e){var t;return!!((t=e.model.parentEnvironment)!=null&&t.array)}function sv(e){return e.model.at(e.model.position).type==="array"}function lv(e){var t;const r=(t=e.model.parentEnvironment)==null?void 0:t.array;return r?[r.length,r.reduce((n,i)=>Math.max(n,i.length),0)]:[0,0]}function tu(e,t){Td(e),e.flushInlineShortcutBuffer(),sh(e.model,t),xn(e)}function cv(e){var t,r;let n;if(e.model.selectionIsCollapsed?n=(t=window.MathfieldElement.computeEngine)==null?void 0:t.parse(e.getValue(),{canonical:!1}):n=(r=window.MathfieldElement.computeEngine)==null?void 0:r.parse(e.getValue(e.model.selection),{canonical:!1}),!n)return"";let i=n.evaluate();return i.isSame(n)&&(i=n.N()),i.latex}function Pf(e,t,r,n){return{label:()=>Un(`\\${r}{${cn(e)}}`),tooltip:()=>{var i;return(i=Se(n))!=null?i:n},visible:()=>Jg(e,t),checked:()=>{var i;return{some:"mixed",all:!0}[(i=e.queryStyle({variant:t}))!=null?i:!1]},onMenuSelect:()=>{e.applyStyle({variant:t},{operation:"toggle"}),e.adoptStyle="none"}}}function Rf(e,t,r,n){return{label:()=>Un(`\\${r}{${cn(e)}}`),tooltip:()=>{var i;return(i=Se(n))!=null?i:n},visible:()=>Yg(e,t),checked:()=>{var i;return{some:"mixed",all:!0}[(i=e.queryStyle({variantStyle:t}))!=null?i:!1]},onMenuSelect:()=>{e.applyStyle({variantStyle:t},{operation:"toggle"}),e.adoptStyle="none"}}}function Xl(e,t){return e+Gl(t)}Vi({speak:(e,t,r)=>uv(e,t,r)},{target:"mathfield"});function uv(e,t,r){var n,i;r=r!=null?r:{withHighlighting:!1};const{model:a}=e;function s(p){let y=null;switch(p){case"all":y=a.root;break;case"selection":y=a.getAtoms(a.selection);break;case"left":{y=a.getAtoms(a.offsetOf(a.at(a.position).leftSibling),a.position);break}case"right":{y=a.getAtoms(a.position,a.offsetOf(a.at(a.position).rightSibling));break}case"group":y=a.getAtoms(a.getSiblingsRange(a.position));break;case"parent":{const{parent:M}=a.at(a.position);M!=null&&M.parent?y=M:y=a.root;break}default:y=a.root}return y}function u(p){let y="";switch(p){case"all":console.log("Internal failure: speak all failed");break;case"selection":y="no selection";break;case"left":y="at start";break;case"right":y="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":y="no parent";break;default:console.log('unknown speak_ param value: "'+p+'"');break}return y}const d=s(t);if(d===null)return(i=(n=window.MathfieldElement).speakHook)==null||i.call(n,u(t)),!1;(r.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const h=Gl(d);return Ke()&&r.withHighlighting?(ts().readAloudMathfield=e,Is(e,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(e.field,h)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(h),!1}function dv(e){var t,r;if(!Ke()){console.log("Speak:",e);return}if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){const n=new SpeechSynthesisUtterance(e);window.speechSynthesis.speak(n)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{const n=new window.AWS.Polly({apiVersion:"2016-06-10"}),i={OutputFormat:"mp3",VoiceId:(t=window.MathfieldElement.speechEngineVoice)!=null?t:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((r=window.MathfieldElement.speechEngineVoice)!=null?r:"Joanna")?"neural":"standard",Text:e,TextType:"ssml"};n.synthesizeSpeech(i,(a,s)=>{if(a)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${a}`);else if(s!=null&&s.AudioStream){const u=new Uint8Array(s.AudioStream),d=new Blob([u.buffer],{type:"audio/mpeg"}),h=URL.createObjectURL(d);new Audio(h).play().catch(y=>console.log(y))}else console.log("polly.synthesizeSpeech():",s)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function Wh(e){var t;let r;if(e.parent.type==="prompt")e.parentBranch==="body"&&(r="prompt");else if(e.parentBranch==="body")r=e.type&&(t={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[e.type])!=null?t:"parent";else if(e.parent.type==="genfrac"){if(e.parentBranch==="above")return"numerator";if(e.parentBranch==="below")return"denominator"}else e.parent.type==="surd"?e.parentBranch==="above"&&(r="index"):e.parentBranch==="superscript"?r="superscript":e.parentBranch==="subscript"&&(r="subscript");return r||console.log("unknown relationship"),r!=null?r:"parent"}function fv(e,t,r,n){let i="";if(t==="plonk")window.MathfieldElement.playSound("plonk"),e.flushInlineShortcutBuffer();else if(t==="delete")i=Xl("deleted: ",n);else if(t==="focus"||t.includes("move"))i=hv(e.model,r)+(e.model.selectionIsCollapsed?"":"selected: ")+pv(e.model);else if(t==="replacement")i=Xl("",e.model.at(e.model.position));else if(t==="line"){const a=Xl("",e.model.root);e.keyboardDelegate.setAriaLabel(a)}else i=n?Xl(t+" ",n):t;if(i){const a=e.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";e.ariaLiveText.textContent=i+a}}function hv(e,t){if(Number.isNaN(t))return"";const r=e.at(t);if(!r||r.treeDepth<=e.at(e.position).treeDepth)return"";let n="",i=r.parent;const a=e.at(e.position).parent;for(;i!==e.root&&i!==a;)n+=`out of ${Wh(i)};`,i=i.parent;return n}function pv(e){if(!e.selectionIsCollapsed)return Xl("",e.getAtoms(e.selection));let t="";const r=e.at(e.position),n=Wh(r);return r.isFirstSibling&&(t=(n?"start of "+n:"unknown")+": "),r.isLastSibling?r.isFirstSibling||(t+=n?"end of "+n:"unknown"):t+=Xl("",r),t}var mv=class{constructor(e,t,r){this.mathfield=e,this.mode=t,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=r}dispose(){this.mathfield=void 0}getState(){const e={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(e.direction=this.selection.direction),{content:this.root.toJson(),selection:e,mode:this.mode}}setState(e,t){var r;const n=this.silenceNotifications;this.silenceNotifications=(r=t==null?void 0:t.silenceNotifications)!=null?r:!0;let i={};if((t==null?void 0:t.type)==="undo"&&(i={inputType:"historyUndo"}),(t==null?void 0:t.type)==="redo"&&(i={inputType:"historyRedo"}),this.contentWillChange(i)){const a=this.silenceNotifications;this.silenceNotifications=!0,this.mode=e.mode,this.root=wi(e.content),this.selection=e.selection,this.silenceNotifications=a,this.contentDidChange(i)}this.silenceNotifications=n}get atoms(){return this.root.children}get selection(){return this._selection}set selection(e){this.setSelection(e)}setSelection(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var r,n,i;const a=this.normalizeSelection(e,t);if(a===void 0)throw new TypeError("Invalid selection");if(a.ranges.length===1&&a.ranges[0][0]===a.ranges[0][1]){const p=a.ranges[0][0];if(!this.mathfield.dirty&&!((r=this.at(p))!=null&&r.parentPrompt)&&this.mathfield.hasEditablePrompts){if((n=this.at(p-1))!=null&&n.parentPrompt){this._anchor=this.normalizeOffset(p-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((i=this.at(p+1))!=null&&i.parentPrompt){this._anchor=this.normalizeOffset(p+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]};return}this._anchor=p,this._position=p,this._selection=a;return}const s=Qn(a);a.direction==="backward"?[this._position,this._anchor]=s:[this._anchor,this._position]=s;const u=this.at(s[0]+1),d=this.at(s[1]),h=_e.commonAncestor(u,d);(h==null?void 0:h.type)==="array"&&u.parent===h&&d.parent===h?this._selection={ranges:[s],direction:a.direction}:this._selection={ranges:[s],direction:a.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)})}setPositionHandlingPlaceholder(e){var t;const r=this.at(e);(r==null?void 0:r.type)==="placeholder"?this.setSelection(e-1,e):((t=r==null?void 0:r.rightSibling)==null?void 0:t.type)==="placeholder"?this.setSelection(e,e+1):this.position=e,r instanceof Pt&&r.isSuggestion&&(r.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}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 Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(e="forward"){return this._anchor===this._position?!1:(e==="backward"?this.position=Math.min(this._anchor,this._position):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:r}=t;if(!r)return[0,this.lastOffset];const n=t.parent.branch(t.parentBranch);return[this.offsetOf(n[0]),this.offsetOf(n[n.length-1])]}getBranchRange(e,t){const r=this.at(e).branch(t);return[this.offsetOf(r[0]),this.offsetOf(r[r.length-1])]}getAtoms(e,t,r){let n=r!=null?r:{};if(Cs(e)){if(n=t!=null?t:{},e.ranges.length>1)return e.ranges.reduce((h,p)=>[...h,...this.getAtoms(p,n)],[]);e=e.ranges[0]}let i,a;if(Ga(e)){if(i=e,!Ga(t))return[];a=t}else[i,a]=e,n=t!=null?t:{};if(!Number.isFinite(i))return[];n.includeChildren===void 0&&(n.includeChildren=!1),i<0&&(i=this.lastOffset-i+1),a<0&&(a=this.lastOffset-a+1);const s=Math.min(i,a)+1,u=Math.max(i,a);if(!n.includeChildren&&s===1&&u===this.lastOffset)return[this.root];let d=[];for(let h=s;h<=u;h++){const p=this.atoms[h];Vh(this,p,s,u)&&d.push(p)}return n.includeChildren||(d=d.filter(h=>{let p=!1,{parent:y}=h;for(;y&&!p;)p=Vh(this,y,s,u),y=y.parent;return!p})),d}getAllAtoms(e=0){const t=[],r=this.lastOffset;for(let n=e;n<=r;n++)t.push(this.atoms[n]);for(let n=0;n<e;n++)t.push(this.atoms[n]);return t}findAtom(e,t=0,r="forward"){let n;const i=this.lastOffset;if(r==="forward"){for(let a=t;a<=i;a++)if(n=this.atoms[a],e(n))return n;for(let a=0;a<t;a++)if(n=this.atoms[a],e(n))return n;return}for(let a=t;a>=0;a--)if(n=this.atoms[a],e(n))return n;for(let a=i;a>t;a--)if(n=this.atoms[a],e(n))return n}extractAtoms(e){let t=this.getAtoms(e);if(t.length===1&&!t[0].parent)if(t[0].type==="root")t=[...t[0].body],t.shift();else return t=this.root.cells.flat(),this.root=new _e({type:"root",body:[]}),t;for(const r of t)r.parent.removeChild(r);return t}deleteAtoms(e){this.extractAtoms(e),this.position=e[0]}atomToString(e,t){const r=t!=null?t:"latex";if(r.startsWith("latex"))return _e.serialize([e],{expandMacro:r==="latex-expanded",skipStyles:r==="latex-unstyled",skipPlaceholders:r==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(r==="math-ml")return Hr(e);if(r==="spoken")return Gl(e);if(r==="spoken-text"){const n=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const i=Gl(e);return window.MathfieldElement.textToSpeechMarkup=n,i}if(r==="spoken-ssml"||r==="spoken-ssml-with-highlighting"){const n=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const i=Gl(e);return window.MathfieldElement.textToSpeechMarkup=n,i}return r==="ascii-math"?Mn(e):(console.error(`MathLive 0.98.5: Unexpected format "${r}`),"")}getValue(e,t,r){if(e===void 0)return this.atomToString(this.root,"latex");if(typeof e=="string"&&e!=="math-json")return this.atomToString(this.root,e);let n,i;if(Ga(e)&&Ga(t)?(n=[this.normalizeRange([e,t])],i=r):Lo(e)?(n=[this.normalizeRange(e)],i=t):Cs(e)?(n=e.ranges,i=t):(n=[this.normalizeRange([0,-1])],i=e),i!=null||(i="latex"),i==="math-json"){if(!window.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
|
|
|
Load the library, for example with:
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),'["Error", "compute-engine-not-available"]';const a=this.getValue({ranges:n},"latex-unstyled");try{const s=window.MathfieldElement.computeEngine.parse(a);return JSON.stringify(s.json)}catch(s){return JSON.stringify(["Error",`'${s.toString()}'`])}}if(i.startsWith("latex")){const a={expandMacro:i==="latex-expanded",skipStyles:i==="latex-unstyled",skipPlaceholders:i==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return Cr(n.map(s=>_e.serialize(this.getAtoms(s),a)))}return n.map(a=>this.getAtoms(a).map(s=>this.atomToString(s,i)).join("")).join("")}extendSelectionTo(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const r=this.normalizeRange([e,t]);let[n,i]=r,{parent:a}=this.at(i);if(a&&(a.type==="genfrac"||a.type==="subsup"))for(;a!==this.root&&Of(this,a,[n,i]);)i=this.offsetOf(a),a=a.parent;for(a=this.at(n).parent;a!==this.root&&Of(this,a,[n,i]);)n=this.offsetOf(a.leftSibling),a=a.parent;if(a=this.at(i).parent,(a==null?void 0:a.type)==="genfrac")for(;a!==this.root&&Of(this,a,[n,i]);)i=this.offsetOf(a),console.assert(i>=0),a=a.parent;this._position=this.normalizeOffset(t),this._selection={ranges:[[n,i]],direction:"none"}})}announce(e,t,r=[]){var n,i;((i=(n=this.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:t,atoms:r},cancelable:!0,bubbles:!0,composed:!0})))!=null?i:!0)&&fv(this.mathfield,e,t,r)}deferNotifications(e,t){const r=this._selection,n=this._anchor,i=this._position,a=this.silenceNotifications;this.silenceNotifications=!0;const s=this.root.changeCounter;t();const u=this.root.changeCounter!==s,d=n!==this._anchor||i!==this._position||E0(this._selection,r)==="different";return this.silenceNotifications=a,e.content&&u&&this.contentDidChange({inputType:e.type}),e.selection&&d&&this.selectionDidChange(),u||d}normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e}normalizeRange(e){let[t,r]=e;return t=this.normalizeOffset(t),r=this.normalizeOffset(r),t<r?[t,r]:[r,t]}normalizeSelection(e,t){var r;let n;if(Ga(e)){const i=this.normalizeOffset(e);if(Ga(t)){const a=this.normalizeOffset(t);n=i<=a?{ranges:[[i,a]],direction:"none"}:{ranges:[[a,i]],direction:"backward"}}else n={ranges:[[i,i]],direction:"none"}}else if(Lo(e)){const i=this.normalizeOffset(e[0]),a=this.normalizeOffset(e[1]);n=i<=a?{ranges:[[i,a]],direction:"none"}:{ranges:[[a,i]],direction:"backward"}}else Cs(e)&&(n={ranges:e.ranges.map(i=>this.normalizeRange(i)),direction:(r=e.direction)!=null?r:"none"});return console.assert(n!==void 0),n}get parentEnvironment(){let e=this.at(this.position).parent;if(e){for(;e.parent&&e.type!=="array";)e=e.parent;if(e.type==="array")return e}}get cell(){var e;let t=this.at(this.position);if(t){for(;t&&((e=t.parent)==null?void 0:e.type)!=="array";)t=t.parent;if(!(!(t!=null&&t.parent)||t.parent.type!=="array"))return t.parentBranch}}contentWillChange(e={}){if(this.silenceNotifications||!this.mathfield)return!0;const t=this.silenceNotifications;this.silenceNotifications=!0;const r=this.mathfield.onContentWillChange(e);return this.silenceNotifications=t,r}contentDidChange(e){var t;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const r=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",_(S({},e),{data:e.data?e.data:(t=e.inputType)!=null?t:"",bubbles:!0,composed:!0}))),this.silenceNotifications=r}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this.mathfield)),this.silenceNotifications))return;const e=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=e}};function Vh(e,t,r,n){const i=e.offsetOf(t);if(i<r||i>n)return!1;if(!t.hasChildren)return!0;const a=e.offsetOf(t.firstChild);if(a>=r&&a<=n){const s=e.offsetOf(t.lastChild);if(s>=r&&s<=n)return!0}return!1}function Of(e,t,r){if(!(t!=null&&t.hasChildren))return!1;const[n,i]=r,a=e.offsetOf(t.firstChild),s=e.offsetOf(t.lastChild);return a>=n&&a<=i&&s>=a&&s<=i}function ru(e,t,r,n){var i,a,s,u,d,h;const p=r.parent;if(p&&r instanceof ln){const y=!n&&t==="forward"||n==="body"&&t==="backward";let M=y?e.offsetOf(r.firstChild):e.offsetOf(r.lastChild);return y?r.rightDelim!=="?"&&r.rightDelim!=="."?(r.leftDelim=".",r.isDirty=!0):(p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),M--):r.leftDelim!=="?"&&r.leftDelim!=="."?(r.rightDelim=".",r.isDirty=!0):(p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),M--),e.position=M,!0}if(p&&r.type==="surd"){if(t==="forward"&&!n||t==="backward"&&n==="body"){const y=r.leftSibling;r.hasChildren&&p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),e.position=e.offsetOf(y)}else t==="forward"&&n==="body"?e.position=e.offsetOf(r):!n&&t==="backward"?r.hasChildren?e.position=e.offsetOf(r.lastChild):(e.position=Math.max(0,e.offsetOf(r)-1),p.removeChild(r)):n==="above"&&(r.hasEmptyBranch("above")&&r.removeBranch("above"),t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r.body[0]));return!0}if(p&&(r.type==="box"||r.type==="enclose")){const y=n&&t==="backward"||!n&&t==="forward"?r.leftSibling:r.lastChild;return p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),e.position=e.offsetOf(y),!0}if(r.type==="genfrac"||r.type==="overunder"){if(!n)return r.type==="overunder"&&r.hasEmptyBranch("body")||r.type==="genfrac"&&r.hasEmptyBranch("below")&&r.hasEmptyBranch("above")?!1:(e.position=e.offsetOf(t==="forward"?r.firstChild:r.lastChild),!0);const y=nu.fractionNavigationOrder==="numerator-denominator"?"above":"below",M=y==="above"?"below":"above";if(p&&(t==="forward"&&n===y||t==="backward"&&n===M)){const I=r.removeBranch(y),$=r.removeBranch(M);return p.addChildrenAfter([...I,...$],r),p.removeChild(r),e.position=e.offsetOf(I.length>0?I[I.length-1]:$[0]),!0}return t==="backward"?e.position=e.offsetOf(r.leftSibling):e.position=e.offsetOf(r),!0}if(r.isExtensibleSymbol||r.type==="subsup"){if(!n&&t==="forward")return!1;if(!n){if(r.subscript||r.superscript){const y=t==="forward"?(s=(i=r.superscript)==null?void 0:i[0])!=null?s:(a=r.subscript)==null?void 0:a[0]:(h=(u=r.subscript)==null?void 0:u[0].lastSibling)!=null?h:(d=r.superscript)==null?void 0:d[0].lastSibling;return y&&(e.position=e.offsetOf(y)),!0}return!1}if(!r.hasChildren&&r.type==="subsup"){const y=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);return r.parent.removeChild(r),e.position=y,!0}if(n==="superscript")if(t==="backward"){const y=e.offsetOf(r.firstChild)-1;console.assert(y>=0),e.position=y}else r.subscript?e.position=e.offsetOf(r.subscript[0]):e.position=e.offsetOf(r);else n==="subscript"&&(t==="backward"&&r.superscript?e.position=e.offsetOf(r.superscript[0].lastSibling):t==="backward"?e.position=e.offsetOf(r.firstChild)-1:e.position=e.offsetOf(r));if(n&&r.hasEmptyBranch(n)&&(r.removeBranch(n),r.type==="subsup"&&!r.subscript&&!r.superscript)){const y=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);r.parent.removeChild(r),e.position=y}return!0}if((p==null?void 0:p.type)==="genfrac"&&!n&&r.type!=="first"){let y=e.offsetOf(r.leftSibling);return p.removeChild(r),p.hasEmptyBranch("above")&&p.hasEmptyBranch("below")?(y=e.offsetOf(p.leftSibling),p.parent.removeChild(p),e.announce("delete",void 0,[p]),e.position=y,!0):(e.announce("delete",void 0,[r]),e.position=y,!0)}if(t==="backward"&&((p==null?void 0:p.command)==="\\ln"||(p==null?void 0:p.command)==="\\log")&&r.parentBranch!=="body"){const y=e.offsetOf(p.leftSibling);return p.parent.removeChild(p),e.announce("delete",void 0,[p]),e.position=y,!0}return!1}function gv(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentBackward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let t=e.at(e.position);if(!(t&&ru(e,"backward",t))){if(t!=null&&t.isFirstSibling){if(ru(e,"backward",t.parent,t.parentBranch))return;t=null}if(!t){e.announce("plonk");return}e.position=e.offsetOf(t.leftSibling),t.parent.removeChild(t),e.announce("delete",void 0,[t])}}):so(e,Qn(e.selection),"deleteContentBackward")}function vv(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentForward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var t,r;let n=e.at(e.position).rightSibling;if(n&&ru(e,"forward",n))return;if(n){if(e.at(e.position).isLastSibling&&ru(e,"forward",n.parent,n.parentBranch))return}else{if(n=e.at(e.position),n.isLastSibling&&ru(e,"forward",n.parent,n.parentBranch))return;n=void 0}if(e.position===e.lastOffset||!n){e.announce("plonk");return}n.parent.removeChild(n);let i=(t=e.at(e.position))==null?void 0:t.rightSibling;for(;(i==null?void 0:i.type)==="subsup";)i.parent.removeChild(i),i=(r=e.at(e.position))==null?void 0:r.rightSibling;e.announce("delete",void 0,[n])}):so(e,Qn(e.selection),"deleteContentForward")}function so(e,t,r){const n=e.getAtoms(t);if(n.length>0&&n[0].parent){let i=n[0].parent.firstChild;i.type==="first"&&(i=i.rightSibling);const a=n[n.length-1].parent.lastChild;let s=n[0];s.type==="first"&&(s=s.rightSibling);const u=n[n.length-1];if(s===i&&u===a){const d=n[0].parent;d.parent&&d.type!=="prompt"&&(t=[e.offsetOf(d.leftSibling),e.offsetOf(d)])}if(n.length===1&&n[0].type==="placeholder"&&n[0].parent.type==="genfrac"){const d=n[0].parent,h=n[0].parentBranch==="below"?"above":"below",p=e.offsetOf(d.leftSibling);return e.deferNotifications({content:!0,selection:!0,type:r},()=>{var y,M;const I=d.removeBranch(h);if(I.length===1&&I[0].type==="placeholder")(M=d.parent)==null||M.removeChild(d),e.position=Math.max(0,p);else{const $=d.parent.addChildrenAfter(I,d);(y=d.parent)==null||y.removeChild(d),e.position=e.offsetOf($)}})}}return e.deferNotifications({content:!0,selection:!0,type:r},()=>e.deleteAtoms(t))}Vi({deleteAll:e=>e.contentWillChange({inputType:"deleteContent"})&&so(e,[0,-1],"deleteContent"),deleteForward:e=>vv(e),deleteBackward:e=>gv(e),deleteNextWord:e=>e.contentWillChange({inputType:"deleteWordForward"})&&so(e,[e.anchor,ff(e,e.position,"forward")],"deleteWordForward"),deletePreviousWord:e=>e.contentWillChange({inputType:"deleteWordBackward"})&&so(e,[e.anchor,ff(e,e.position,"backward")],"deleteWordBackward"),deleteToGroupStart:e=>e.contentWillChange({inputType:"deleteSoftLineBackward"})&&so(e,[e.anchor,e.offsetOf(e.at(e.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:e=>e.contentWillChange({inputType:"deleteSoftLineForward"})&&so(e,[e.anchor,e.offsetOf(e.at(e.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:e=>e.contentWillChange({inputType:"deleteHardLineBackward"})&&so(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>e.contentWillChange({inputType:"deleteHardLineForward"})&&so(e,[e.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var bv=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${Se("tooltip.toggle virtual keyboard")}"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>`,yv=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${Se("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,xv=class{constructor(e,t){this.focusBlurInProgress=!1;var r,n,i;this.options=S(_(S({},Zd()),{macros:vt(),registers:id()}),Vd(t)),this.eventController=new AbortController;const a=this.eventController.signal;t.eventSink&&(this.host=t.eventSink),this.element=e,e.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.defaultStyle={},this.adoptStyle="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let s=(n=(r=t.value)!=null?r:this.element.textContent)!=null?n:"";s=s.trim();const u=ih(this.options),d=new _e({type:"root",mode:u,body:b(s,{context:this.context})});this.model=new mv(this,u,d),this.undoManager=new Zm(this.model);const h=[];if(h.push("<span contenteditable=true aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),h.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),h.push("<span part=content class=ML__content>"),h.push(Xf(this)),h.push("</span>"),window.mathVirtualKeyboard&&(h.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'} data-l10n-tooltip="tooltip.toggle virtual keyboard">`),h.push(bv),h.push("</div>")),h.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),h.push(yv),h.push("</div>"),h.push("</span>"),h.push("<span class=ML__sr-only>"),h.push("<span role=status aria-live=assertive aria-atomic=true></span>"),h.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(h.join("")),!this.element.children){console.error("%cMathLive 0.98.5: 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. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=Ce.subscribe(()=>Ce.update(this.element)),Ce.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",y=>y.stopImmediatePropagation(),{capture:!1,signal:a}),this.field.addEventListener("wheel",this,{passive:!1,signal:a}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:a}):this.field.addEventListener("mousedown",this,{signal:a}),(i=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||i.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(ao(this)))},{signal:a}),this._menu=new Lg(ov(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:a});const p=this.element.querySelector("[part=menu-toggle]");p==null||p.addEventListener("pointerdown",y=>{if(y.currentTarget!==p||this._menu.state!=="closed")return;this.element.classList.add("tracking");const M=p.getBoundingClientRect();this._menu.modifiers=Bs(y),this._menu.show({target:p,location:{x:M.left,y:M.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),y.preventDefault(),y.stopPropagation()},{signal:a}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(p.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Xp(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:a}),document.addEventListener("scroll",this,{signal:a}),this.resizeObserver=new ResizeObserver(()=>xn(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:a}),Kc&&!Ce.locale.startsWith(Kc.locale)&&jp(Ce.locale),ra!=="ready"&&document.fonts.ready.then(()=>Fd(this)),e.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(e){this._defaultStyle=e}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const e=this.model.at(this.model.position),t=this.adoptStyle==="right"?e.rightSibling:e;if(!t)return this.defaultStyle;if(t.type==="group"){const r=t.branch("body");return!r||r.length<2?{}:this.adoptStyle==="right"?r[1].computedStyle:r[r.length-1].computedStyle}return t.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),n0(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,_f())}showMenu(e){var t,r;const n=(r=(t=e==null?void 0:e.location)!=null?t:Sl(this.field))!=null?r:void 0,i=e==null?void 0:e.modifiers,a=this.element.querySelector("[part=container]");return this._menu.show({target:a,location:n,modifiers:i})}get colorMap(){return e=>{var t,r,n;return(n=(r=(t=this.options).colorMap)==null?void 0:r.call(t,e))!=null?n:ut(e)}}get backgroundColorMap(){return e=>{var t,r,n,i,a,s;return(s=(a=(r=(t=this.options).backgroundColorMap)==null?void 0:r.call(t,e))!=null?a:(i=(n=this.options).colorMap)==null?void 0:i.call(n,e))!=null?s:dt(e)}}get smartFence(){var e;return(e=this.options.smartFence)!=null?e:!1}get readOnly(){var e;return(e=this.options.readOnly)!=null?e:!1}get disabled(){var e,t;return(t=(e=this.host)==null?void 0:e.disabled)!=null?t:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";const e=getComputedStyle(this.host);return e.getPropertyValue("user-select")||e.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(e=>e.type==="prompt"&&!e.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;const e=this.model.at(this.model.anchor),t=this.model.at(this.model.position),r=_e.commonAncestor(e,t);return!!((r==null?void 0:r.type)==="prompt"||r!=null&&r.parentPrompt)}get letterShapeStyle(){var e;return(e=this.options.letterShapeStyle)!=null?e:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed)return this.effectiveStyle;const e=this.model.getAtoms(this.model.selection);if(e.length===0)return{};const t=S({},e[0].style);for(const r of e)for(const[n,i]of Object.entries(r.style))t[n]!==i&&delete t[n];return t}queryStyle(e){const t=bf(this,e);"verbatimColor"in t&&delete t.verbatimColor,"verbatimBackgroundColor"in t&&delete t.verbatimBackgroundColor;const r=Object.keys(t).length;if(r===0)return"all";if(r>1){for(const d of Object.keys(t)){const h=this.queryStyle({[d]:t[d]});if(h==="none")return"none";if(h==="some")return"some"}return"all"}const n=Object.keys(t)[0],i=t[n];if(this.model.selectionIsCollapsed)return this.effectiveStyle[n]===i?"all":"none";const a=this.model.getAtoms(this.model.selection,{includeChildren:!0});let s=a.length;if(s===0)return"none";let u=0;for(const d of a){if(d.type==="first"){s-=1;continue}d.style[n]===i&&(u+=1)}return u===0?"none":u===s?"all":"some"}get keybindings(){var e,t;if(this._keybindings)return this._keybindings;const[r,n]=tm(this.options.keybindings,(e=Hc())!=null?e:Up());return((t=Hc())==null?void 0:t.score)>0&&(this._keybindings=r,n.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",n)),r}get menu(){return this._menu}setOptions(e){var t;this.options=S(S({},this.options),Vd(e)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let r=this.options.defaultMode;r==="inline-math"&&(r="math"),((t=this.model.root.firstChild)==null?void 0:t.mode)!==r&&(this.model.root.firstChild.mode=r),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const n=_e.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in e||this.model.getValue()!==n)&&Qr.insert(this.model,n,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in e||"macros"in e||"registers"in e||"colorMap"in e||"backgroundColorMap"in e||"letterShapeStyle"in e||"minFontScale"in e||"readOnly"in e||"placeholderSymbol"in e)&&xn(this)}getOptions(e){return Ts(this.options,e)}getOption(e){return Ts(this.options,e)}handleEvent(e){return rs(this,null,function*(){var t;if(Bo(this)){if(lf(e)){if(!Tc(e.origin,(t=this.options.originValidator)!=null?t:"none"))throw new DOMException(`Message from unknown origin (${e.origin}) cannot be handled`,"SecurityError");const{action:r}=e.data;if(r==="execute-command"){const n=e.data.command;if(zl(n)==="virtual-keyboard")return;this.executeCommand(n)}else r==="update-state"||(r==="focus"?this.focus({preventScroll:!0}):r==="blur"&&this.blur());return}switch(e.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&yh(this,e);break;case"pointerdown":this.userSelect!=="none"&&(yh(this,e),e.shiftKey===!1&&(yield $h(e,this.element.querySelector("[part=container]"),this._menu))&&Qd.stop());break;case"contextmenu":this.userSelect!=="none"&&e.shiftKey===!1&&(yield $h(e,this.element.querySelector("[part=container]"),this._menu))&&Qd.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&n0(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Bo(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Bo(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(e);break;default:console.warn("Unexpected event type",e.type)}}})}dispose(){if(!Bo(this))return;Ce.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();const e=this.element;delete e.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,rg(),sm(),_g()}flushInlineShortcutBuffer(e){if(e!=null||(e={defer:!1}),!e.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(e){return zl(e)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(e),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(ao(this))),!1):pm(this,e)}get errors(){return D(this.model.getValue(),{context:this.context})}getValue(e,t,r){return this.model.getValue(e,t,r)}setValue(e,t){var r;t=t!=null?t:{mode:"math"},t.insertionMode===void 0&&(t.insertionMode="replaceAll"),(t.format===void 0||t.format==="auto")&&(t.format="latex"),(t.mode===void 0||t.mode==="auto")&&(t.mode=(r=D0(this.model,this.model.position))!=null?r:"math");const n=this.undoManager.canUndo();Qr.insert(this.model,e,t)&&(xn(this),n||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const e=window.MathfieldElement.computeEngine;return e?e.box(e.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.98.5: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var e;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){const n=window.mathVirtualKeyboard.boundingRect,i=this.host.getBoundingClientRect();i.bottom>n.top&&((e=window.document.scrollingElement)==null||e.scrollBy(0,i.bottom-n.top+8))}}this.dirty&&Is(this,{interactive:!0});const t=this.field.getBoundingClientRect();let r=null;if(this.model.selectionIsCollapsed)r=Sl(this.field);else{const n=pd(this);if(n.length>0){let i=-1/0,a=-1/0;for(const s of n)s.right>i&&(i=s.right),s.top<a&&(a=s.top);r={x:i+t.left-this.field.scrollLeft,y:a+t.top-this.field.scrollTop,height:0}}}if(this.host&&r){const n=this.host.getBoundingClientRect(),i=r.y;let a=this.host.scrollTop;i<n.top?a=i-n.top+this.host.scrollTop:i>n.bottom&&(a=i-n.bottom+this.host.scrollTop+r.height),this.host.scroll({top:a,left:0})}if(r){const n=r.x-window.scrollX;let i=this.field.scrollLeft;n<t.left?i=n-t.left+this.field.scrollLeft-20:n>t.right&&(i=n-t.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:i})}}insert(e,t){return typeof e!="string"||e.length===0&&((t==null?void 0:t.insertionMode)==="insertBefore"||(t==null?void 0:t.insertionMode)==="insertAfter")||e.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),t=t!=null?t:{mode:"math"},t.focus&&this.focus(),t.feedback&&(window.MathfieldElement.keypressVibration&>()&&navigator.vibrate(Jf),window.MathfieldElement.playSound("keypress")),e==="\\\\"?ah(this.model):e==="&"?oh(this.model):this.model.selectionIsCollapsed?Qr.insert(this.model,e,S({style:this.model.at(this.model.position).computedStyle},t)):Qr.insert(this.model,e,t),this.snapshot(`insert-${this.model.at(this.model.position).type}`),xn(this),t.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(e,t="",r=""){var n;if(this.model.mode===e||!this.hasEditableContent||!this.contentEditable||this.disabled)return;const i=this.model.mode;if(this.model.mode=e,!((n=this.host)!=null&&n.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0})))){this.model.mode=i;return}const a=this.model.mode,{model:s}=this;s.deferNotifications({content:!!r||!!t,selection:!0,type:"insertText"},()=>{let u=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),t&&e!=="latex"){const d=b(t,{context:this.context,parseMode:e});s.collapseSelection("forward");const h=s.at(s.position);s.position=s.offsetOf(h.parent.addChildrenAfter(d,h)),u=!0}if(this.model.mode=e,e==="latex"){let d=s.selectionIsCollapsed;Nl(this,"accept");let h,p=s.at(s.position);if(d)h="\\";else{const M=Qn(s.selection);h=this.model.getValue(M,"latex");const I=this.model.extractAtoms(M);I.length===1&&I[0].type==="placeholder"&&(h=t,d=!0),p=s.at(M[0])}const y=new vr(h);p.parent.addChildAfter(y,p),d?s.position=s.offsetOf(y.lastChild):s.setSelection(s.offsetOf(y.firstChild),s.offsetOf(y.lastChild))}else Wc(s).forEach(d=>{d.isError=!1});if(r){const d=b(r,{context:this.context,parseMode:a});s.collapseSelection("forward");const h=s.at(s.position);s.position=s.offsetOf(h.parent.addChildrenAfter(d,h)),u=!0}return xn(this),this.undoManager.snapshot(e==="latex"?"insert-latex":"insert"),u}),this.model.mode=e,window.mathVirtualKeyboard.update(ao(this))}hasFocus(){return!this.blurred}focus(e){var t;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(t=e==null?void 0:e.preventScroll)!=null&&t||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(e,t={}){var r,n;const i={operation:"set",silenceNotifications:!1};Lo(t)?i.range=t:(t.operation==="toggle"&&(i.operation="toggle"),i.range=t.range,i.silenceNotifications=(r=t.silenceNotifications)!=null?r:!1);const a=bf(this,e),s=(n=i.operation)!=null?n:"set";if(i.range===void 0&&this.model.selectionIsCollapsed){if(s==="set"){this.defaultStyle=S(S({},this.defaultStyle),a);return}const u=S({},this.defaultStyle);for(const d of Object.keys(a))u[d]===a[d]?(d==="color"&&delete u.verbatimColor,d==="backgroundColor"&&delete u.verbatimBackgroundColor,delete u[d]):u[d]=a[d];this.defaultStyle=u;return}this.model.deferNotifications({content:!i.silenceNotifications,type:"insertText"},()=>{if(i.range===void 0)for(const u of this.model.selection.ranges)uf(this.model,u,a,{operation:s});else uf(this.model,i.range,a,{operation:s})}),xn(this)}toggleContextMenu(){var e;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(e=this.getCaretPoint())!=null?e:void 0,onDismiss:()=>{var t;return(t=this.element)==null?void 0:t.focus()}}),!0):!1}getCaretPoint(){const e=Sl(this.field);return e?{x:e.x,y:e.y}:null}setCaretPoint(e,t){const r=Jc(this,e,t,{bias:0});if(r<0)return!1;const n=this.model.position;return this.model.position=r,this.model.announce("move",n),xn(this),!0}getPrompt(e){const t=this.model.findAtom(r=>r.type==="prompt"&&r.placeholderId===e);return console.assert(t!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),t}getPromptValue(e,t){const r=this.getPrompt(e);if(!r)return"";const n=this.model.offsetOf(r.firstChild),i=this.model.offsetOf(r.lastChild);return this.model.getValue(n,i,t)}getPrompts(e){return this.model.getAllAtoms().filter(t=>t.type!=="prompt"?!1:e?!(e.id&&t.placeholderId!==e.id||e.locked&&t.locked!==e.locked||e.correctness==="undefined"&&t.correctness||e.correctness&&t.correctness!==e.correctness):!0).map(t=>t.placeholderId)}setPromptValue(e,t,r){if(t!==void 0){const n=this.getPrompt(e);if(!n){console.error(`MathLive 0.98.5: unknown prompt ${e}`);return}const i=this.model.getBranchRange(this.model.offsetOf(n),"body");this.model.setSelection(i),this.insert(t,_(S({},r),{insertionMode:"replaceSelection"}))}r!=null&&r.silenceNotifications&&(this.valueOnFocus=this.getValue()),xn(this)}setPromptState(e,t,r){const n=this.getPrompt(e);if(!n){console.error(`MathLive 0.98.5: unknown prompt ${e}`);return}t==="undefined"?n.correctness=void 0:typeof t=="string"&&(n.correctness=t),typeof r=="boolean"&&(n.locked=r,n.captureSelection=r),xn(this)}getPromptState(e){const t=this.getPrompt(e);return t?[t.correctness,t.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${e}`),[void 0,!0])}getPromptRange(e){const t=this.getPrompt(e);return t?this.model.getBranchRange(this.model.offsetOf(t),"body"):(console.error(`MathLive 0.98.5: unknown prompt ${e}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(e){var t;this.undoManager.snapshot(e)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),(t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var e;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var e;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var e;(e=this.undoManager)==null||e.reset()}onSelectionDidChange(){var e,t;const r=this.model;this.keyboardDelegate.setValue(r.getValue(this.model.selection,"latex-expanded"));{const n=r.at(r.position),i=(e=n.mode)!=null?e:ih(this.options);this.model.mode!==i&&(this.model.mode==="latex"?(Nl(this,"accept",{mode:i}),r.position=r.offsetOf(n)):this.switchMode(i))}(t=this.host)==null||t.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(ao(this)),n0(this)}onContentWillChange(e){var t,r,n;return(n=(r=this.host)==null?void 0:r.dispatchEvent(new InputEvent("beforeinput",_(S({},e),{data:e.data?e.data:(t=e.inputType)!=null?t:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?n:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),Is(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var e,t,r;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Fl(this),this.model.getValue()!==this.valueOnFocus&&((e=this.host)==null||e.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(t=this.host)==null||t.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(r=this.host)==null||r.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),xn(this),this.focusBlurInProgress=!1,_f();const n=new AbortController,i=n.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Bo(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:i})},{once:!0,signal:i}),setTimeout(()=>n.abort(),100)}onInput(e){mf(this,e)}onKeystroke(e){return gh(this,e)}onCompositionStart(e){this.model.deleteAtoms(Qn(this.model.selection));const t=Sl(this.field);t&&requestAnimationFrame(()=>{Is(this),this.keyboardDelegate.moveTo(t.x,t.y-t.height)})}onCompositionUpdate(e){Rm(this.model,e),xn(this)}onCompositionEnd(e){Om(this.model),mf(this,e,{simulateKeystroke:!0})}onCut(e){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),Qr.onCopy(this,e),so(this.model,Qn(this.model.selection),"deleteByCut"),this.snapshot("cut"),xn(this))}onCopy(e){Qr.onCopy(this,e)}onPaste(e){let t=this.isSelectionEditable;return t&&(t=Qr.onPaste(this.model.at(this.model.position).mode,this,e.clipboardData)),t||this.model.announce("plonk"),e.preventDefault(),e.stopPropagation(),t}onGeometryChange(){this._menu.hide(),Rd(this),n0(this)}onWheel(e){const t=5*e.deltaX;if(!Number.isFinite(t)||t===0)return;const r=this.field;t<0&&r.scrollLeft===0||t>0&&r.offsetWidth+r.scrollLeft>=r.scrollWidth||(r.scrollBy({top:0,left:t}),e.preventDefault(),e.stopPropagation())}getHTMLElement(e){let t=e;for(;!t.id&&t.hasChildren;)t=e.children[0];return this.field.querySelector(`[data-atom-id="${t.id}"]`)}get context(){var e,t;return{registers:(e=this.options.registers)!=null?e:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(t=this.options.placeholderSymbol)!=null?t:"\u25A2",colorMap:r=>this.colorMap(r),backgroundColorMap:r=>this.backgroundColorMap(r),getMacro:r=>at(r,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function Zh(e){if(e&&(e.classList.remove("ML__highlight"),e.children))for(const t of e.children)Zh(t)}function Nf(e,t){var r;e&&(!t||((r=e.dataset)==null?void 0:r.atomId)===t?(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&Nf(n)})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&Nf(n,t)})))}function wv(e,t){var r;if(!Ke())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.98.5: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(t);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const n=new window.AWS.Polly({apiVersion:"2016-06-10"}),i={OutputFormat:"json",VoiceId:(r=window.MathfieldElement.speechEngineVoice)!=null?r:"Joanna",Engine:"standard",Text:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};ts().readAloudElement=e,n.synthesizeSpeech(i,(a,s)=>{if(a){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${a}`);return}if(!(s!=null&&s.AudioStream)){console.log("polly.synthesizeSpeech():",s);return}const u=new TextDecoder("utf-8").decode(new Uint8Array(s.AudioStream));ts().readAloudMarks=u.split(`
|
|
|
`).map(d=>d?JSON.parse(d):{}),ts().readAloudTokens=[];for(const d of ts().readAloudMarks)d.value&&ts().readAloudTokens.push(d.value);ts().readAloudCurrentMark="",i.OutputFormat="mp3",i.SpeechMarkTypes=[],n.synthesizeSpeech(i,(d,h)=>{if(d){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${t}") error:${d}`);return}if(!(h!=null&&h.AudioStream))return;const p=new Uint8Array(h.AudioStream),y=new Blob([p.buffer],{type:"audio/mpeg"}),M=URL.createObjectURL(y),I=ts();I.readAloudAudio?I.readAloudAudio.pause():(I.readAloudAudio=new Audio,I.readAloudAudio.addEventListener("ended",()=>{const $=I.readAloudMathfield;I.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),$?(Is($),I.readAloudElement=null,I.readAloudMathfield=null,I.readAloudTokens=[],I.readAloudMarks=[],I.readAloudCurrentMark=""):Zh(I.readAloudElement)}),I.readAloudAudio.addEventListener("timeupdate",()=>{let $="";const se=I.readAloudAudio.currentTime*1e3+100;for(const Ze of I.readAloudMarks)Ze.time<se&&($=Ze.value);I.readAloudCurrentMark!==$&&(I.readAloudCurrentToken=$,$&&$===I.readAloudFinalToken?I.readAloudAudio.pause():(I.readAloudCurrentMark=$,Nf(I.readAloudElement,I.readAloudCurrentMark)))})),I.readAloudAudio.src=M,I.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),I.readAloudAudio.play()})})}Ke()||console.error('MathLive 0.98.5: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var Rr=new WeakMap,Sv=.5,es={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},ti=class Hs extends HTMLElement{static get formAssociated(){return Jl()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(t){t!==this._fontsDirectory&&(this._fontsDirectory=t,um())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(t){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(t){this._soundsDirectory=t,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(t){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(t){var r,n,i;this.audioBuffers={},t===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof t=="string"?this._keypressSound={spacebar:t,return:t,delete:t,default:t}:typeof t=="object"&&"default"in t&&(this._keypressSound={spacebar:(r=t.spacebar)!=null?r:t.default,return:(n=t.return)!=null?n:t.default,delete:(i=t.delete)!=null?i:t.default,default:t.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(t){this.audioBuffers={},this._plonkSound=t}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(t){this._speechEngine=t}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(t){this._speechEngineRate=t}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(t){this._speechEngineVoice=t}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(t){this._textToSpeechMarkup=t}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(t){this._textToSpeechRules=t}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(t){this._textToSpeechRulesOptions=t}static get locale(){return Ce.locale}static set locale(t){t==="auto"&&(t=navigator.language.slice(0,5)),Ce.locale=t}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(t){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return Ce.strings}static set strings(t){Ce.merge(t)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(t){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(t){this._decimalSeparator=t,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(t){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var t,r;if(this._computeEngine===void 0){const n=(t=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;if(!n)return null;this._computeEngine=new n,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(r=this._computeEngine)!=null?r:null}static set computeEngine(t){this._computeEngine=t}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(t){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(t){this._isFunction=t}static loadSound(t){return rs(this,null,function*(){delete this.audioBuffers[t];let r="";switch(t){case"keypress":r=this._keypressSound.default;break;case"return":r=this._keypressSound.return;break;case"spacebar":r=this._keypressSound.spacebar;break;case"delete":r=this._keypressSound.delete;break;case"plonk":r=this.plonkSound;break}if(typeof r!="string")return;r=r.trim();const n=this.soundsDirectory;if(!(n==null||n==="null"||r==="none"||r==="null"))try{const a=yield(yield fetch(yield qf(`${n}/${r}`))).arrayBuffer(),s=yield this.audioContext.decodeAudioData(a);this.audioBuffers[t]=s}catch(i){}})}static playSound(t){return rs(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[t]||(yield this.loadSound(t)),!this.audioBuffers[t])return;const r=this.audioContext.createBufferSource();r.buffer=this.audioBuffers[t];const n=this.audioContext.createGain();n.gain.value=Sv,r.connect(n).connect(this.audioContext.destination),r.start()})}constructor(t){if(super(),t){const r=[];for(const n of Object.keys(t))if(es[n])if(es[n].startsWith("mf."))if(es[n].startsWith(`mf.${n}`))r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${es[n]}`);else{const i=es[n].match(/([a-zA-Z]+) =/);r.push(`Option \`${n}\` has been renamed \`${i[1]}\``)}else r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${es[n]}`);if(r.length>0){console.group("%cMathLive 0.98.5: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(const n of r)console.warn(n);console.groupEnd()}}if(Jl()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[Ya("core"),Ya("mathfield"),Ya("mathfield-element"),Ya("ui"),Ya("menu")],this.shadowRoot.appendChild(document.createElement("span"));const r=document.createElement("slot");r.style.display="none",this.shadowRoot.appendChild(r)}else this.shadowRoot.innerHTML="<style>"+Io("core")+Io("mathfield")+Io("mathfield-element")+Io("ui")+Io("menu")+'</style><span></span><slot style="display:none"></slot>';t&&this._setOptions(t),this.shadowRoot.addEventListener("slotchange",()=>{var r;const n=this.shadowRoot.querySelector("slot:not([name])");this.value=(r=n==null?void 0:n.assignedNodes().map(i=>i.nodeType===3?i.textContent:"").join("").trim())!=null?r:""})}showMenu(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.showMenu(t))!=null?n:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",t=>{var r;t.target===this&&!((r=this._mathfield)!=null&&r.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:t.altKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,metaKey:t.metaKey,movementX:t.movementX,movementY:t.movementY,relatedTarget:t.relatedTarget,screenX:t.screenX,screenY:t.screenY,shiftKey:t.shiftKey}))},{once:!0})}getPromptValue(t,r){var n,i;return(i=(n=this._mathfield)==null?void 0:n.getPromptValue(t,r))!=null?i:""}setPromptValue(t,r,n){var i;(i=this._mathfield)==null||i.setPromptValue(t,r,n)}getPromptRange(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPromptRange(t))!=null?n:null}getPrompts(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPrompts(t))!=null?n:[]}get form(){var t;return(t=this._internals)==null?void 0:t.form}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}get type(){return this.localName}get mode(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.model.mode)!=null?r:this.defaultMode==="text"?"text":"math"}set mode(t){var r;(r=this._mathfield)==null||r.switchMode(t)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(t){var r,n;if(!this._mathfield)return;const i=(n=(r=Hs.computeEngine)==null?void 0:r.box(t).latex)!=null?n:null;i!==null&&this._mathfield.setValue(i),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.errors)!=null?r:[]}_getOptions(t){return this._mathfield?Ts(this._mathfield.options,t):Rr.has(this)?S({},Ts(S(S({},Zd()),Vd(Rr.get(this).options)),t)):null}getOptions(t){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?Ts(this._mathfield.options,t):Rr.has(this)?Ts(S(S({},Zd()),Vd(Rr.get(this).options)),t):null}reflectAttributes(){const t=Zd(),r=this._getOptions();Object.keys(Hs.optionsAttributes).forEach(n=>{const i=Ro(n);Hs.optionsAttributes[n]==="on/off"?t[i]!==r[i]?this.setAttribute(n,r[i]?"on":"off"):this.removeAttribute(n):t[i]!==r[i]&&(Hs.optionsAttributes[n]==="boolean"?r[i]?this.setAttribute(n,""):this.removeAttribute(n):(typeof r[i]=="string"||typeof r[i]=="number")&&this.setAttribute(n,r[i].toString()))})}getOption(t){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([t])[t]}_getOption(t){return this._getOptions([t])[t]}_setOptions(t){if(this._mathfield)this._mathfield.setOptions(t);else if(Rr.has(this)){const r=S(S({},Rr.get(this).options),t);Rr.set(this,_(S({},Rr.get(this)),{selection:{ranges:r.readOnly?[[0,0]]:[[0,-1]]},options:r}))}else Rr.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:t,menuItems:void 0});this.reflectAttributes()}setOptions(t){console.group("%cMathLive 0.98.5: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(const r of Object.keys(t))es[r]&&console.warn(`\`mf.setOptions({${r}:...})\` -> ${es[r]}`);console.groupEnd(),this._setOptions(t)}executeCommand(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.executeCommand(t))!=null?n:!1}getValue(t,r,n){var i,a;if(this._mathfield)return this._mathfield.model.getValue(t,r,n);if(Rr.has(this)){let s,u,d;if(Cs(t)?([s,u]=t.ranges[0],d=r):Lo(t)?([s,u]=t,d=r):Ga(t)&&Ga(r)?(s=t,u=r,d=n):(s=0,u=-1,d=t),(d===void 0||d==="latex")&&s===0&&u===-1)return(a=(i=Rr.get(this).value)!=null?i:this.textContent)!=null?a:""}return""}setValue(t,r){if(this._mathfield&&t!==void 0){r!=null||(r={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(t,r);return}if(Rr.has(this)){const i=Rr.get(this).options;Rr.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:i,menuItems:void 0});return}const n=iu(this);Rr.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:n,menuItems:void 0})}hasFocus(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.hasFocus())!=null?r:!1}focus(){var t;(t=this._mathfield)==null||t.focus()}blur(){var t;(t=this._mathfield)==null||t.blur()}select(){var t;(t=this._mathfield)==null||t.select()}insert(t,r){var n,i;return(i=(n=this._mathfield)==null?void 0:n.insert(t,r))!=null?i:!1}applyStyle(t,r){var n;return(n=this._mathfield)==null?void 0:n.applyStyle(t,r)}queryStyle(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.queryStyle(t))!=null?n:"none"}get caretPoint(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.getCaretPoint())!=null?r:null}set caretPoint(t){var r;t&&((r=this._mathfield)==null||r.setCaretPoint(t.x,t.y))}setCaretPoint(t,r){var n,i;return(i=(n=this._mathfield)==null?void 0:n.setCaretPoint(t,r))!=null?i:!1}offsetFromPoint(t,r,n){return this._mathfield?Jc(this._mathfield,t,r,n):-1}hitboxFromOffset(t){if(!this._mathfield)return null;const r=this._mathfield.model.at(t);if(!r)return null;const n=Es(this._mathfield,r);return n?new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top):null}resetUndo(){var t;(t=this._mathfield)==null||t.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(t){var r,n,i,a;ro.state==="closed"&&((n=(r=this._mathfield)==null?void 0:r.menu)==null?void 0:n.state)==="closed"&&(t.type==="pointerdown"&&this.onPointerDown(),t.type==="focus"&&((i=this._mathfield)==null||i.focus()),t.type==="blur"&&((a=this._mathfield)==null||a.blur()))}connectedCallback(){var t,r,n,i;const a=window.getComputedStyle(this),s=this.shadowRoot,u=a.userSelect!=="none";if(u)s.host.addEventListener("pointerdown",this,!0);else{const p=s.querySelector("span");p.style.pointerEvents="none"}s.host.addEventListener("focus",this,!0),s.host.addEventListener("blur",this,!0),Jl()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),u&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const d=s.querySelector("slot:not([name])");if(d)try{this._style=d.assignedElements().filter(p=>p.tagName.toLowerCase()==="style").map(p=>p.textContent).join("")}catch(p){console.error(p)}if(this._style){const p=document.createElement("style");p.textContent=this._style,s.appendChild(p)}let h="";if(this.hasAttribute("value")?h=this.getAttribute("value"):h=(t=d==null?void 0:d.assignedNodes().map(p=>p.nodeType===3?p.textContent:"").join("").trim())!=null?t:"",this._mathfield=new xv(s.querySelector(":host > span"),_(S({},(n=(r=Rr.get(this))==null?void 0:r.options)!=null?n:iu(this)),{eventSink:this,value:h})),!Rr.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const p of Object.keys(Hs.optionsAttributes))this.upgradeProperty(Ro(p))}if(!((i=this._mathfield)!=null&&i.model)){this._mathfield=null;return}if(Rr.has(this)){const p=this._mathfield,y=Rr.get(this),M=y.menuItems;p.model.deferNotifications({content:!1,selection:!1},()=>{const I=y.value;I!==void 0&&p.setValue(I),p.model.selection=y.selection,Rr.delete(this)}),M&&(this.menuItems=M)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Nd()}disconnectedCallback(){var t,r;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));const n=Ts(this._mathfield.options,Object.keys(Hs.optionsAttributes).map(i=>Ro(i)));Rr.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(r=(t=this._mathfield.menu)==null?void 0:t.menuItems)!=null?r:void 0,options:n}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(t){if(this.hasOwnProperty(t)){const r=this[t];delete this[t],(t==="readonly"||t==="read-only")&&(t="readOnly"),this[t]=r}}attributeChangedCallback(t,r,n){if(r===n)return;const i=n!==null;switch(t){case"contenteditable":xn(this._mathfield);break;case"disabled":this.disabled=i;break;case"read-only":case"readonly":this.readOnly=i;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(t){const r=!!t;r?(this.setAttribute("readonly",""),Jl()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Jl()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:r})}get disabled(){return this.hasAttribute("disabled")}set disabled(t){var r;const n=!!t;n?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Jl()?this._internals.ariaDisabled=n?"true":"false":this.setAttribute("aria-disabled",n?"true":"false"),n&&((r=this._mathfield)!=null&&r.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(t){this.setValue(t)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(t){this._setOptions({defaultMode:t})}get macros(){return this._getOption("macros")}set macros(t){this._setOptions({macros:t})}get registers(){const t=this;return new Proxy({},{get:(r,n)=>{if(typeof n=="string")return t._getOption("registers")[n]},set(r,n,i){return typeof n!="string"?!1:(t._setOptions({registers:_(S({},t._getOption("registers")),{[n]:i})}),!0)}})}set registers(t){this._setOptions({registers:t})}get colorMap(){return this._getOption("colorMap")}set colorMap(t){this._setOptions({colorMap:t})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(t){this._setOptions({backgroundColorMap:t})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(t){this._setOptions({letterShapeStyle:t})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(t){this._setOptions({minFontScale:t})}get smartMode(){return this._getOption("smartMode")}set smartMode(t){this._setOptions({smartMode:t})}get smartFence(){return this._getOption("smartFence")}set smartFence(t){this._setOptions({smartFence:t})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(t){this._setOptions({smartSuperscript:t})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(t){this._setOptions({scriptDepth:t})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(t){this._setOptions({removeExtraneousParentheses:t})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(t){this._setOptions({mathModeSpace:t})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(t){this._setOptions({placeholderSymbol:t})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(t){this._setOptions({popoverPolicy:t})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(t){this._setOptions({environmentPopoverPolicy:t})}get menuItems(){var t,r,n;return this._mathfield?(t=this._mathfield.menu._menuItems.map(i=>i.menuItem))!=null?t:[]:(n=(r=Rr.get(this))==null?void 0:r.menuItems)!=null?n:[]}set menuItems(t){var r;if(this._mathfield){const n=(r=this._mathfield.element)==null?void 0:r.querySelector("[part=menu-toggle]");n&&(n.style.display=t.length===0?"none":""),this._mathfield.menu.menuItems=t}Rr.has(this)?Rr.set(this,_(S({},Rr.get(this)),{menuItems:t})):Rr.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:iu(this),menuItems:t})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(t){this._setOptions({mathVirtualKeyboardPolicy:t})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(t){this._setOptions({inlineShortcuts:t})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(t){this._setOptions({inlineShortcutTimeout:t})}get keybindings(){return this._getOption("keybindings")}set keybindings(t){this._setOptions({keybindings:t})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(t){this._setOptions({onInlineShortcut:t})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(t){this._setOptions({onScrollIntoView:t})}get onExport(){return this._getOption("onExport")}set onExport(t){this._setOptions({onExport:t})}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOptions({readOnly:t})}get isSelectionEditable(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.isSelectionEditable)!=null?r:!1}setPromptState(t,r,n){var i;(i=this._mathfield)==null||i.setPromptState(t,r,n)}getPromptState(t){var r,n;return(n=(r=this._mathfield)==null?void 0:r.getPromptState(t))!=null?n:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(t){this._setOptions({virtualKeyboardTargetOrigin:t})}get selection(){return this._mathfield?this._mathfield.model.selection:Rr.has(this)?Rr.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(t){if(typeof t=="number"&&(t={ranges:[[t,t]]}),this._mathfield){this._mathfield.model.selection=t,xn(this._mathfield);return}if(Rr.has(this)){Rr.set(this,_(S({},Rr.get(this)),{selection:t}));return}Rr.set(this,{value:void 0,selection:t,options:iu(this),menuItems:void 0})}get selectionIsCollapsed(){const t=this.selection;return t.ranges.length===1&&t.ranges[0][0]===t.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Rr.has(this)?Rr.get(this).selection.ranges[0][0]:0}set position(t){if(this._mathfield&&(this._mathfield.model.position=t,xn(this._mathfield)),Rr.has(this)){Rr.set(this,_(S({},Rr.get(this)),{selection:{ranges:[[t,t]]}}));return}Rr.set(this,{value:void 0,selection:{ranges:[[t,t]]},options:iu(this),menuItems:void 0})}getOffsetDepth(t){var r,n;return this._mathfield?((n=(r=this._mathfield.model.at(t))==null?void 0:r.treeDepth)!=null?n:2)-2:0}get lastOffset(){var t,r;return(r=(t=this._mathfield)==null?void 0:t.model.lastOffset)!=null?r:-1}};ti.version="0.98.5",ti._fontsDirectory="./fonts",ti._soundsDirectory="./sounds",ti.keypressVibration=!0,ti._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},ti._plonkSound="plonk.wav",ti.audioBuffers={},ti.createHTML=e=>e,ti._speechEngineRate="100%",ti._speechEngineVoice="Joanna",ti._textToSpeechMarkup="",ti._textToSpeechRules="mathlive",ti._textToSpeechRulesOptions={},ti.speakHook=dv,ti.readAloudHook=wv,ti._decimalSeparator=".",ti.fractionNavigationOrder="numerator-denominator",ti._isFunction=e=>{var t,r;const n=window.MathfieldElement.computeEngine;return(r=(t=n==null?void 0:n.parse(e).domain)==null?void 0:t.isFunction)!=null?r:!1};var nu=ti;function Ro(e){return e.replace(/[^a-zA-Z\d]+(.)/g,(t,r)=>r.toUpperCase())}function iu(e){const t={readOnly:!1},r=nu.optionsAttributes;return Object.keys(r).forEach(n=>{if(e.hasAttribute(n)){const i=e.getAttribute(n);n==="placeholder"?t.contentPlaceholder=i!=null?i:"":r[n]==="boolean"?t[Ro(n)]=!0:r[n]==="on/off"?i==="on"?t[Ro(n)]=!0:i==="off"?t[Ro(n)]=!1:t[Ro(n)]=void 0:r[n]==="number"?t[Ro(n)]=Number.parseFloat(i!=null?i:"0"):t[Ro(n)]=i}}),t}function Jl(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var jh=nu,Uh,Gh,qh,Xh;if(Ke()&&!((Uh=window.customElements)!=null&&Uh.get("math-field"))){(qh=window[Gh=Symbol.for("io.cortexjs.mathlive")])!=null||(window[Gh]={});const e=window[Symbol.for("io.cortexjs.mathlive")];e.version="0.98.5",window.MathfieldElement=nu,(Xh=window.customElements)==null||Xh.define("math-field",nu)}function _v(e,t,r){let n=r,i=0;const a=e.length;for(;n<t.length;){const s=t[n];if(i<=0&&t.slice(n,n+a)===e)return n;s==="\\"?n++:s==="{"?i++:s==="}"&&i--,n++}return-1}function l0(e,t,r,n,i="latex"){const a=[];for(const s of e)if(s.type==="text"){const u=s.data;let d=!0,h=0,p;p=u.indexOf(t),p!==-1&&(h=p,h>0&&a.push({type:"text",data:u.slice(0,h)}),d=!1);let y=!1;for(;!y;){if(d){if(p=u.indexOf(t,h),p===-1){y=!0;break}h!==p&&a.push({type:"text",data:u.slice(h,p)}),h=p}else{if(p=_v(r,u,h+t.length),p===-1){y=!0;break}let M=u.slice(h+t.length,p);i==="ascii-math"&&([,M]=qa(M,{format:"ascii-math"})),a.push({type:"math",data:M,rawData:u.slice(h,p+r.length),mathstyle:n}),h=p+r.length}d=!d}h<u.length&&a.push({type:"text",data:u.slice(h)})}else a.push(s);return a}function Jh(e,t,r){let n=[{type:"text",data:e}];return t!=null&&t.inline&&t.inline.forEach(([i,a])=>{n=l0(n,i,a,"textstyle")}),t!=null&&t.display&&t.display.forEach(([i,a])=>{n=l0(n,i,a,"displaystyle")}),r!=null&&r.inline&&r.inline.forEach(([i,a])=>{n=l0(n,i,a,"textstyle","ascii-math")}),r!=null&&r.display&&r.display.forEach(([i,a])=>{n=l0(n,i,a,"displaystyle","ascii-math")}),n}function Mv(e,t){const r=document.createElement("span");r.setAttribute("translate","no");try{const n="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+t.renderToMathML(e)+"</math>";r.innerHTML=window.MathfieldElement.createHTML(n)}catch(n){console.error(`MathLive 0.98.5: Could not convert "${e}"' to MathML with ${n}`),r.textContent=e}return r.className="ML__sr-only",r}function Cv(e,t,r,n){try{const i=t.renderToMarkup(e,{mathstyle:r,format:"html"}),a=document.createElement("span");return a.dataset.latex=e,a.style.display=r==="displaystyle"?"flex":"inline-flex",a.setAttribute("aria-hidden","true"),a.setAttribute("translate","no"),a.innerHTML=window.MathfieldElement.createHTML(i),a}catch(i){if(console.error("Could not parse'"+e+"' with ",i),n)return document.createTextNode(e)}return null}function Yl(e,t,r,n){var i;const a=Cv(e,r,t||"textstyle",n),s=(i=r.renderAccessibleContent)!=null?i:"";if(a&&/\b(mathml|speakable-text)\b/i.test(s)){const u=document.createElement("span");if(/\bmathml\b/i.test(s)&&r.renderToMathML&&u.append(Mv(e,r)),/\bspeakable-text\b/i.test(s)&&r.renderToSpeakableText){const d=document.createElement("span");d.setAttribute("translate","no");const h=r.renderToSpeakableText(e);d.innerHTML=window.MathfieldElement.createHTML(h),d.className="ML__sr-only",u.append(d)}return u.append(a),u}return a}function Ev(e,t){var r,n,i;let a=null;if((r=t.TeX)!=null&&r.processEnvironments&&/^\s*\\begin/.test(e)){a=document.createDocumentFragment();const s=Yl(e,"",t,!0);s&&a.appendChild(s)}else{if(!e.trim())return null;const s=Jh(e,(n=t.TeX)==null?void 0:n.delimiters,(i=t.asciiMath)==null?void 0:i.delimiters);if(s.length===1&&s[0].type==="text")return null;a=document.createDocumentFragment();for(const u of s)if(u.type==="text")a.appendChild(document.createTextNode(u.data));else{const d=Yl(u.data,u.mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);d&&a.appendChild(d)}}return a}function Yh(e,t){var r,n,i,a,s,u,d,h,p,y,M,I,$,se,Ze,ee;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const De=(r=e.childNodes[0].textContent)!=null?r:"";if((n=t.TeX)!=null&&n.processEnvironments&&/^\s*\\begin/.test(De)){e.textContent="";const Te=Yl(De,"",t,!0);Te&&e.append(Te);return}const Je=Jh(De,(i=t.TeX)==null?void 0:i.delimiters,(a=t.asciiMath)==null?void 0:a.delimiters);if(Je.length===1&&Je[0].type==="math"){e.textContent="";const Te=Yl(Je[0].data,Je[0].mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);Te&&e.append(Te);return}if(Je.length===1&&Je[0].type==="text")return}for(let De=e.childNodes.length-1;De>=0;De--){const Je=e.childNodes[De];if(Je.nodeType===3){const Te=Ev((s=Je.textContent)!=null?s:"",t);Te&&(De+=Te.childNodes.length-1,Je.replaceWith(Te))}else if(Je.nodeType===1){const Te=Je,yt=Je.nodeName.toLowerCase();if(yt==="script"){const Rt=Je;let Dt;if((u=t.processScriptTypePattern)!=null&&u.test(Rt.type))Dt=(d=Rt.textContent)!=null?d:"";else if((h=t.processMathJSONScriptTypePattern)!=null&&h.test(Rt.type))try{Dt=(y=t.serializeToLatex)==null?void 0:y.call(t,JSON.parse((p=Rt.textContent)!=null?p:""))}catch(Ar){console.error(Ar)}if(Dt){let Ar="textstyle";for(const nt of Rt.type.split(";")){const[na,lo]=nt.toLowerCase().split("=");na.trim()==="mode"&&(Ar=lo.trim()==="display"?"displaystyle":"textstyle")}const Xr=Yl(Dt,Ar,t,!0);Xr&&Rt.parentNode.replaceChild(Xr,Rt)}}else if(((I=(M=t.processClassPattern)==null?void 0:M.test(Te.className))!=null?I:!1)||!((se=($=t.skipTags)==null?void 0:$.includes(yt))!=null&&se||(ee=(Ze=t.ignoreClassPattern)==null?void 0:Ze.test(Te.className))!=null&&ee))if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const Dt=e.textContent;e.textContent="";const Ar=Yl(Dt!=null?Dt:"","displaystyle",t,!0);Ar&&e.append(Ar)}else Yh(Te,t)}}}var kv={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function Dv(e,t){var r,n,i,a;try{const s=S(S({},kv),t);s.ignoreClassPattern=new RegExp((r=s.ignoreClass)!=null?r:""),s.processClassPattern=new RegExp((n=s.processClass)!=null?n:""),s.processScriptTypePattern=new RegExp((i=s.processScriptType)!=null?i:""),s.processMathJSONScriptTypePattern=new RegExp((a=s.processMathJSONScriptType)!=null?a:""),Nd(),Yi("core"),Yh(e,s)}catch(s){s instanceof Error?console.error("renderMathInElement(): "+s.message):console.error("renderMathInElement(): Could not render math for element",e)}}function Av(e,t){const r=Yo.singleton;return r?(r.show(),jc(),r.currentLayer=t,r.render(),r.focus(),!0):!1}function Lv(){const e=window.mathVirtualKeyboard;return e.visible?e.hide({animate:!0}):e.show({animate:!0}),!1}Vi({switchKeyboardLayer:Av,toggleVirtualKeyboard:Lv,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function ts(){var e,t;return(t=globalThis[e=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[e]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function Rv(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function Ov(e){Iv(document.body,e)}function Bv(e){if(typeof e=="string"){const t=document.getElementById(e);if(t===null)throw new Error(`The element with ID "${e}" could not be found.`);return t}return typeof e=="string"?null:e}function Iv(e,t){var r,n,i,a;const s=Bv(e);if(!s)return;const u=t!=null?t:{};(r=u.renderToMarkup)!=null||(u.renderToMarkup=Un),(n=u.renderToMathML)!=null||(u.renderToMathML=Vg),(i=u.renderToSpeakableText)!=null||(u.renderToSpeakableText=Zg),(a=u.serializeToLatex)!=null||(u.serializeToLatex=jg),Dv(s,u)}var Nv={mathlive:"0.98.5"}}}]);
|
|
|
}()); |