|
|
!(function(){var ao=Math.pow;var ns=(yr,bt,w)=>new Promise((D,U)=>{var V=Y=>{try{H(w.next(Y))}catch(me){U(me)}},He=Y=>{try{H(w.throw(Y))}catch(me){U(me)}},H=Y=>Y.done?D(Y.value):Promise.resolve(Y.value).then(V,He);H((w=w.apply(yr,bt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[1581],{84105:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return S}});var D=w(54476),U=w(59301),V={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"},He=V,H=w(7657),Y=function(Ue,je){return U.createElement(H.Z,(0,D.Z)({},Ue,{ref:je,icon:He}))},me=U.forwardRef(Y),S=me},18785:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return S}});var D=w(54476),U=w(59301),V={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"},He=V,H=w(7657),Y=function(Ue,je){return U.createElement(H.Z,(0,D.Z)({},Ue,{ref:je,icon:He}))},me=U.forwardRef(Y),S=me},33853:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return S}});var D=w(54476),U=w(59301),V={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"},He=V,H=w(7657),Y=function(Ue,je){return U.createElement(H.Z,(0,D.Z)({},Ue,{ref:je,icon:He}))},me=U.forwardRef(Y),S=me},62772:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return S}});var D=w(54476),U=w(59301),V={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"},He=V,H=w(7657),Y=function(Ue,je){return U.createElement(H.Z,(0,D.Z)({},Ue,{ref:je,icon:He}))},me=U.forwardRef(Y),S=me},38819:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return S}});var D=w(54476),U=w(59301),V={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"},He=V,H=w(7657),Y=function(Ue,je){return U.createElement(H.Z,(0,D.Z)({},Ue,{ref:je,icon:He}))},me=U.forwardRef(Y),S=me},87395:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return S}});var D=w(54476),U=w(59301),V={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"},He=V,H=w(7657),Y=function(Ue,je){return U.createElement(H.Z,(0,D.Z)({},Ue,{ref:je,icon:He}))},me=U.forwardRef(Y),S=me},96408:function(yr,bt){"use strict";bt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},67671:function(yr,bt,w){"use strict";w.d(bt,{t:function(){return A}});var D=w(59301),U=w(3113),V={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},He=w(92310),H=w.n(He),Y=Object.defineProperty,me=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,Ue=(R,ze,yt)=>ze in R?Y(R,ze,{enumerable:!0,configurable:!0,writable:!0,value:yt}):R[ze]=yt,je=(R,ze)=>{for(var yt in ze||(ze={}))S.call(ze,yt)&&Ue(R,yt,ze[yt]);if(me)for(var yt of me(ze))_.call(ze,yt)&&Ue(R,yt,ze[yt]);return R};const A=({cancelText:R="\u53D6\u6D88",okText:ze="\u786E\u5B9A",loading:yt=!1,hasOkBtn:gt=!0,hasCancelBtn:qe=!0,okButtonProps:Re={},onCancel:Nt=()=>{},onOk:Ee=()=>{},className:_e=""})=>D.createElement("div",{className:H()(V.buttonFixed,_e)},D.createElement("div",{className:V.buttonWrap},qe&&D.createElement(U.ZP,{size:"middle",className:`${V.button} mr20`,onClick:Nt},R),gt&&D.createElement(U.ZP,je({size:"middle",type:"primary",className:`${V.button} mr20`,loading:yt,onClick:Ee},Re),ze)))},27687:function(yr,bt,w){"use strict";var D=w(59301),U=w(96408),V=w(48136),He=w(99298),H=w(43418),Y=w(59301);const me=(0,D.forwardRef)(({callback:S,width:_,onChange:Ue,disabled:je,readOnly:A,type:R="",value:ze="",style:yt={}},gt)=>{const qe=(0,D.useRef)(),Re=(0,D.useRef)(),[Nt,Ee]=(0,D.useState)(0),[_e,O]=(0,D.useState)(0),[K,Q]=(0,D.useState)(!1),re=()=>{var lt=document.createElement("div");lt.innerHTML=qe.current.getValue();var ye=lt.innerText;return S&&S(ye),ye};(0,D.useImperativeHandle)(gt,()=>({getData:re}));const We=lt=>{lt.preventDefault();const ye=lt.clientX-Nt,xe=lt.clientY-_e;document.body.onmousemove=et=>{let j=et.clientX-ye,Fe=et.clientY-xe;const Xe=document.getElementsByClassName("markdown-popup-form")[0],F=window.innerWidth-Xe.offsetWidth,Se=window.innerHeight-Xe.offsetHeight;j=Math.max(0,Math.min(j,F)),Fe=Math.max(0,Math.min(Fe,Se)),de(et.clientX,et.clientY,ye,xe)&&(Ee(j),O(Fe))},document.body.onmouseup=function(){document.body.onmousemove=null}},de=(lt,ye,xe,et)=>{const j=document.body.clientHeight,Fe=document.body.clientWidth;return lt<20&&xe>lt||lt>Fe-20&&xe<lt||ye<20&&et>ye||ye>j-20&&et<ye?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,D.useEffect)(()=>{K&&setTimeout(()=>{const lt=document.getElementsByClassName("markdown-popup-form")[0],ye=window.innerWidth/2-lt.offsetWidth/2,xe=window.innerHeight/2-lt.offsetHeight/2;Ee(ye),O(xe)},0)},[K]);const ut=()=>{je||A||Q(!0)};return Y.createElement("div",{style:yt},Y.createElement("div",{style:{width:_||"100%",position:"relative"},className:`${U.Z.mathFillWrap} ${je||A?"cursorDefault":""}`,onClick:()=>ut()},Y.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:ze?18:14},value:ze||""})),Y.createElement(H.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:Nt,top:_e},title:Y.createElement("div",{style:{cursor:"move"},onMouseDown:We},"\u8F93\u5165\u516C\u5F0F"),open:K,onOk:()=>{const lt=Re.current.getData();qe.current.setValue(lt),Ue(lt),Q(!1)},onCancel:()=>{Q(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Y.createElement(He.Z,{value:ze,ref:Re,onChange:Ue,showSaveButton:!1})))});bt.Z=me},99298:function(yr,bt,w){"use strict";var D=w(59301),U=w(95237),V=w(43604),He=w(99313),H=w(3113),Y=w(6339),me=w(96408),S=w(48136),_=w(59301);const Ue=(0,D.forwardRef)(({callback:je,showSaveButton:A,value:R=""},ze)=>{const yt=(0,D.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}`}]}]}],Re=_e=>{yt.current.setValue(yt.current.getValue()+" "+_e.value+" ")},Nt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:_.createElement(U.Z,{className:me.Z.lists,gutter:[10,10]},gt.map((_e,O)=>_.createElement(V.Z,{flex:"110px",className:me.Z.item},_.createElement("div",null,_.createElement(Y.Z,{value:`$$${_e.value}$$`}),_e.name),_.createElement("div",{className:me.Z.children},_e.children.map((K,Q)=>_.createElement("div",{key:Q},_.createElement("h1",null,K.name),_.createElement(U.Z,{gutter:[10,10]},K.data.map((re,We)=>_.createElement(V.Z,{key:We,onClick:()=>Re(re),className:me.Z.diamond},_.createElement(Y.Z,{value:"`$$"+re.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:_.createElement(U.Z,{className:me.Z.lists,gutter:[10,10]},qe.map((_e,O)=>_.createElement(V.Z,{flex:"110px",className:me.Z.item},_.createElement("div",null,_.createElement(Y.Z,{value:"`$$"+_e.value+"$$`"}),_e.name),_.createElement("div",{className:me.Z.children},_e.children.map((K,Q)=>_.createElement("div",{key:Q},K.name&&_.createElement("h1",null,K.name),_.createElement(U.Z,{gutter:[10,10]},K.data.map((re,We)=>_.createElement(V.Z,{key:We,onClick:()=>Re(re),className:me.Z.diamond},_.createElement(Y.Z,{value:"`$$"+re.value+"$$`"}))))))))))}],Ee=()=>{var _e=document.createElement("div");_e.innerHTML=yt.current.getValue();var O=_e.innerText;return je&&je(O),O};return(0,D.useImperativeHandle)(ze,()=>({getData:Ee})),_.createElement("div",{className:me.Z.mathWrap},_.createElement(He.default,{defaultActiveKey:"1",items:Nt}),_.createElement("math-field",{locale:"zh_cn",className:me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:yt,style:{width:800,marginTop:30,fontSize:18}},R||""),A&&_.createElement("div",{className:me.Z.button},_.createElement(H.ZP,{size:"large",onClick:Ee,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});bt.Z=Ue},9488:function(yr,bt,w){"use strict";w.r(bt),w.d(bt,{default:function(){return Xe},formatTypeNameToDefaultScore:function(){return j}});var D=w(59301),U=w(65582),V=w(43418),He=w(5871),H=w(66104),Y=w(22061),me=w(5112),S=w(6339),_={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"},Ue=w(24334),je=w(27687),A=w(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"],ze=[{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:Se,type:be,data:q={},inMouseId:Oe,isshow:Ae,onSetScore:Le=()=>{},onDelete:ue=()=>{},onMouseEnter:ot=()=>{},showAnswer:dt=!1})=>{var Ft;const[Ht,St]=(0,D.useState)(!1),Jt=()=>{var ne;return A.createElement("div",{className:_.answerWrap},(ne=q==null?void 0:q.choices)==null?void 0:ne.map((ie,Je)=>A.createElement("div",{className:`${_.flexRow} mt15`,key:Je},A.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},R[Je]),A.createElement("div",{className:`${_.answer} ml5`},A.createElement(S.Z,{value:ie==null?void 0:ie.choice_text})))),dt&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",q==null?void 0:q.standard_answer_show))},zt=()=>{var ne;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:`${_.flexRow} mt15`},(ne=q==null?void 0:q.choices)==null?void 0:ne.map((ie,Je)=>A.createElement(me.ZP,{disabled:!0,key:Je},ie==null?void 0:ie.choice_text))),dt&&A.createElement("div",{className:`mt10 ${_.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",q==null?void 0:q.standard_answer_show))},tr=()=>{var ne;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:`${_.flexRow} mt15`},A.createElement(S.Z,{value:(ne=q==null?void 0:q.program_attr)==null?void 0:ne.description})),dt&&A.createElement("div",{className:"mt15"},A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",!(q!=null&&q.answer_text)&&"\u6682\u65E0"),A.createElement(S.Z,{value:(q==null?void 0:q.answer_text)||""})))},Lt=()=>{var ne;return A.createElement("div",{className:_.answerWrap},dt&&A.createElement("div",{className:`${_.flexColumn} mt15`},(ne=q==null?void 0:q.standard_answer)==null?void 0:ne.map((ie,Je)=>A.createElement("div",null,(ie==null?void 0:ie.model)===1?A.createElement(S.Z,{key:Je,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")}))))))},ae=()=>{var ne;return A.createElement("div",{className:_.answerWrap},dt&&A.createElement("div",{className:"mt15"},A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),A.createElement(S.Z,{value:(ne=q==null?void 0:q.answer_texts)==null?void 0:ne[0],className:_.answerText})))},Z=()=>{var ne,ie;return A.createElement("div",{className:_.answerWrap,style:{marginTop:10}},A.createElement(S.Z,{showProgramFill:!0,disabledFill:!0,value:Ue.Base64.decode((ne=q==null?void 0:q.program_attr)==null?void 0:ne.code)}),dt&&A.createElement("div",{className:`${_.flexColumn} mt15`},(ie=q==null?void 0:q.standard_answer)==null?void 0:ie.map((Je,tt)=>A.createElement(S.Z,{key:tt,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${Je.position}\uFF09\uFF1A${Je.answer_text}`}))))},z=()=>{var ne;return A.createElement("div",{className:_.answerWrap},A.createElement("div",{className:"mt10"},"\u9636\u6BB5\u6210\u7EE9"),(ne=q==null?void 0:q.shixun)==null?void 0:ne.map((ie,Je)=>{var tt,at;return A.createElement("div",null,A.createElement("div",{className:"mt10 font14",key:Je},"\u7B2C",Je+1,"\u5173 ",ie==null?void 0:ie.challenge_name," \uFF08",ie.challenge_score,"\u5206\uFF09"),dt&&A.createElement("div",null,A.createElement("div",{className:_.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",((tt=ie.challenge_answers)==null?void 0:tt.length)===0?"\u6682\u65E0":""),(at=ie.challenge_answers)==null?void 0:at.map((Mt,Bt)=>A.createElement("div",{className:"mt15"},A.createElement("div",null,"\u7EA7\u522B",Bt+1,"\uFF1A",Mt.name),A.createElement(S.Z,{value:(Mt==null?void 0:Mt.contents)||"",className:_.answerText})))))}))},he=()=>{var ne;return A.createElement("div",{className:_.answerWrap,style:{display:Ht&&"none"}},(ne=q==null?void 0:q.sub_questions)==null?void 0:ne.map((ie,Je)=>{var tt,at,Mt,Bt,W;const _t=`<span style="margin-right: 10px">${F+1}.${Je+1}</span><span>\uFF08${(tt=ze.find(vt=>vt.type==ie.item_type))==null?void 0:tt.name}\uFF09</span><span class="c-grey-999">\uFF08${ie.score}\u5206\uFF09</span>`;return A.createElement(D.Fragment,{key:ie==null?void 0:ie.id},A.createElement("div",{className:_.titleWrap,style:{marginTop:16}},A.createElement(S.Z,{className:_.titleHtml,value:_t+ie.name})),(ie.item_type=="single"||ie.item_type=="multiple")&&A.createElement(A.Fragment,null,(at=ie==null?void 0:ie.choices)==null?void 0:at.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})))),dt&&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`},(Mt=ie==null?void 0:ie.choices)==null?void 0:Mt.map((vt,N)=>A.createElement(me.ZP,{disabled:!0,key:N},vt==null?void 0:vt.choice_text))),dt&&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},dt&&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},dt&&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}))))}))},pe=()=>{const ne={SINGLE:Jt,MULTIPLE:Jt,JUDGMENT:zt,PROGRAM:tr,COMPLETION:Lt,SUBJECTIVE:ae,PRACTICAL:z,COMBINATION:he,BPROGRAM:Z};return ne[be]?ne[be]():null},Ne=(ne,ie)=>{var Je;return`<span style="margin-right: -10px">${ie+1}\u3001</span><span class="c-grey-999">\uFF08${(ne==null?void 0:ne.item_type)==="combination"?`\u5171${(Je=ne==null?void 0:ne.sub_questions)==null?void 0:Je.length}\u5C0F\u9898\uFF0C`:""}${ne.score}\u5206\uFF09</span> `};return A.createElement("div",{onMouseEnter:()=>ot(q.id)},Oe===q.id&&A.createElement("div",{className:_.action},A.createElement("div",{className:_.setScore,onClick:()=>Le(q.id,Se,q==null?void 0:q.shixun,q.score,q)},"\u8BBE\u7F6E\u5F97\u5206"),A.createElement("div",{className:_.delete,onClick:()=>ue(q.id)},"\u5220\u9664")),A.createElement("div",{className:_.content},A.createElement("div",{className:_.titleWrap,style:{justifyContent:"space-between"}},(q==null?void 0:q.item_type)==="bprogram"?A.createElement(S.Z,{className:_.titleHtml,value:Ne(q,F)+((Ft=q==null?void 0:q.program_attr)==null?void 0:Ft.description)}):A.createElement(S.Z,{className:_.titleHtml,value:Ne(q,F)+((q==null?void 0:q.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(q.name||(q==null?void 0:q.shixun_name))}),(q==null?void 0:q.item_type)==="combination"&&!Ae&&A.createElement("span",{onClick:ne=>{St(!Ht)},style:{textAlign:"end",flexShrink:0,cursor:"pointer"}},Ht?"\u5C55\u5F00":"\u6536\u8D77")),pe()))},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"},Re=w(67671),Nt=w(89392),Ee=w.n(Nt),_e=w(11517),O=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ut=(F,Se,be)=>Se in F?O(F,Se,{enumerable:!0,configurable:!0,writable:!0,value:be}):F[Se]=be,lt=(F,Se)=>{for(var be in Se||(Se={}))We.call(Se,be)&&ut(F,be,Se[be]);if(re)for(var be of re(Se))de.call(Se,be)&&ut(F,be,Se[be]);return F},ye=(F,Se)=>K(F,Q(Se)),xe=(F,Se)=>{var be={};for(var q in F)We.call(F,q)&&Se.indexOf(q)<0&&(be[q]=F[q]);if(F!=null&&re)for(var q of re(F))Se.indexOf(q)<0&&de.call(F,q)&&(be[q]=F[q]);return be},et=(F,Se,be)=>new Promise((q,Oe)=>{var Ae=ot=>{try{ue(be.next(ot))}catch(dt){Oe(dt)}},Le=ot=>{try{ue(be.throw(ot))}catch(dt){Oe(dt)}},ue=ot=>ot.done?q(ot.value):Promise.resolve(ot.value).then(Ae,Le);ue((be=be.apply(F,Se)).next())});const j=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,Fe=F=>{var Se=F,{problemsetPreview:be,user:q,globalSetting:Oe,loading:Ae,dispatch:Le}=Se,ue=xe(Se,["problemsetPreview","user","globalSetting","loading","dispatch"]),ot,dt,Ft,Ht;const[St,Jt]=(0,D.useState)(),[zt,tr]=(0,D.useState)(),Lt=(0,D.useRef)();console.log(be,"problemsetPreview"),(0,D.useEffect)(()=>(Le({type:"globalSetting/footerToggle",payload:!1}),()=>{Le({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,D.useEffect)(()=>{ae()},[]);const ae=()=>{Le({type:"problemsetPreview/getPaperData"})},Z=(ne,ie,Je=[],tt,at)=>{var Mt;const Bt=Ee().cloneDeep(at),W=Ee().cloneDeep(Je).map(_t=>ye(lt({},_t),{challenge_score:_t.challenge_score||5}));if(Lt.current=tt||j(ie),ie==="\u5B9E\u8BAD\u9898")return V.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:D.createElement("div",{className:qe.shixunModal},D.createElement("div",null,"\u5173\u5361\uFF1A"),W==null?void 0:W.map((_t,vt)=>D.createElement("div",{className:qe.shixunScore},vt+1,"\u3001",_t.challenge_name,D.createElement("div",{style:{minWidth:"130px"}},D.createElement(He.Z,{defaultValue:_t.challenge_score,min:1,onChange:N=>{_t.challenge_score=N}}),D.createElement("span",{className:"ml5"},"\u5206/\u9898"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){yield(0,_e.Cc)({id:ne,challenge_scores:W.map(_t=>({challenge_id:_t.challenge_id,score:_t.challenge_score}))}),Lt.current=null,ae()})});if(ie==="\u7EC4\u5408\u9898")return V.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:D.createElement("div",{className:qe.shixunModal,style:{maxHeight:200,overflow:"auto"}},(Mt=Bt==null?void 0:Bt.sub_questions)==null?void 0:Mt.map((_t,vt)=>D.createElement("div",{className:qe.shixunScore},"\u7B2C",vt+1,"\u5C0F\u9898",D.createElement("div",{style:{minWidth:"130px"}},D.createElement(He.Z,{defaultValue:_t.score,min:1,onChange:N=>{_t.score=N}}),D.createElement("span",{className:"ml5"},"\u5206"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){var _t;yield(0,_e.Vl)({id:ne,subs:(_t=Bt==null?void 0:Bt.sub_questions)==null?void 0:_t.map(vt=>({basket_id:vt.basket_id,score:vt.score}))}),Lt.current=null,ae()})});V.default.confirm({centered:!0,title:"\u8BBE\u7F6E\u5206\u6570",content:D.createElement("div",{className:""},D.createElement("span",null,"\u672C\u9898\u5206\u503C\uFF1A"),D.createElement(He.Z,{min:1,defaultValue:Lt.current,onChange:_t=>{Lt.current=_t}}),D.createElement("span",{className:"ml5"},"\u5206/\u9898"),D.createElement("br",null),ie==="\u586B\u7A7A\u9898"&&D.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:()=>et(void 0,null,function*(){yield Le({type:"problemsetPreview/setScore",payload:{id:ne,score:Lt.current}}),Lt.current=null,ae()})})},z=ne=>{V.default.confirm({centered:!0,title:"\u63D0\u793A",content:D.createElement("div",{className:qe.modal},"\u786E\u8BA4\u5220\u9664\u8BE5\u8BD5\u9898\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){yield Le({type:"problemsetPreview/handleDelete",payload:{id:ne}}),ae()})})},he=(ne,ie)=>{Lt.current=j(ie),V.default.confirm({centered:!0,title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u6570",content:D.createElement("div",{className:""},D.createElement("span",null,ie==="\u7EC4\u5408\u9898"?"\u7EC4\u5408\u9898\u4E2D\u7684\u6BCF\u5C0F\u9898":ie,"\uFF1A"),D.createElement(He.Z,{min:1,defaultValue:Lt.current,onChange:Je=>{Lt.current=Je}}),D.createElement("span",{className:"ml5"},"\u5206/\u9898"),D.createElement("br",null),ie==="\u586B\u7A7A\u9898"&&D.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:()=>et(void 0,null,function*(){yield Le({type:"problemsetPreview/batchSetScore",payload:{item_type:ne,score:Lt.current}}),Lt.current=null,ae()})})},pe=ne=>{V.default.confirm({centered:!0,title:"\u63D0\u793A",content:D.createElement("div",{className:qe.modalColumn},D.createElement("p",null,"\u5220\u9664\u5927\u9898\uFF0C\u5C06\u5220\u9664\u8BE5\u5927\u9898\u4E0B\u6240\u6709\u5C0F\u9898"),D.createElement("p",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u5927\u9898\uFF1F")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>et(void 0,null,function*(){yield Le({type:"problemsetPreview/batchDelete",payload:{item_type:ne}}),ae()})})},Ne=(ne,ie)=>et(void 0,null,function*(){if(!ne.destination||!ne.source)return;const Je=ie.questions[ne.source.index].id,tt=ne.destination.index+1;(yield Le({type:"problemsetPreview/adjustPosition",payload:{id:Je,position:tt}})).status!==-1&&ae()});return D.createElement("section",{className:qe.bg},D.createElement(H.Z,{className:"mt30",separator:">"},D.createElement(H.Z.Item,null,"\u8BD5\u9898\u5E93"),D.createElement(H.Z.Item,{href:"/problemset"},"\u4EBA\u5DE5\u7EC4\u5377"),D.createElement(H.Z.Item,null,"\u8BD5\u5377\u9884\u89C8")),D.createElement("div",{className:qe.wrap},D.createElement("div",{className:"pt20 pb20"},D.createElement("div",{className:`${qe.flexRow} ${qe.flexJustifyBetween}`},D.createElement("div",null,D.createElement("span",{className:qe.questionNumber},"\u9898\u6570\uFF1A",(ot=be.paperData)==null?void 0:ot.all_questions_count),D.createElement("span",{className:qe.score},"\u603B\u5206\uFF1A",(dt=be.paperData)==null?void 0:dt.all_score)),D.createElement("div",{className:qe.selectTopicButton,onClick:()=>U.history.push("/problemset/preview_select")},"\u7EE7\u7EED\u9009\u9898")),D.createElement("div",{className:qe.line}),D.createElement("div",{className:qe.dragTip},"\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"),(Ht=(Ft=be.paperData)==null?void 0:Ft.questionList)==null?void 0:Ht.map((ne,ie)=>{const Je=ne.type===zt;return console.log(ne,"paperItem"),D.createElement("div",{className:`${qe.relative} mt20 mb20`,key:ie},D.createElement("div",{className:`${qe.typeActive} ${Je?qe.mouseTypeActive:""}`,onMouseEnter:()=>{tr(ne.type),Jt(null)}},D.createElement("span",{className:`${qe.typeName} ${Je?"ml20":""}`},ne.number,"\u3001",ne.name),D.createElement("span",{className:qe.typeNumber},"\uFF08\u5171",ne.questions_count,"\u9898\uFF0C",(ne==null?void 0:ne.type)==="COMBINATION"?`\u5305\u542B${ne==null?void 0:ne.sub_questions_count}\u5C0F\u9898\uFF0C`:"","\u5171",ne.questions_score,"\u5206\uFF09")),Je&&D.createElement("div",{className:`${qe.typeAction} ${qe.flexRow}`},ne.type!=="PRACTICAL"&&D.createElement("div",{className:qe.setScore,onClick:()=>he(ne.type,ne.name)},"\u6279\u91CF\u8BBE\u7F6E\u5F97\u5206"),D.createElement("div",{className:qe.delete,onClick:()=>pe(ne.type)},"\u5220\u9664")),D.createElement(Y.Z5,{onDragEnd:tt=>Ne(tt,ne)},D.createElement(Y.bK,{droppableId:ie.toString()},(tt,at)=>{var Mt;return D.createElement("div",ye(lt({className:"mt20",ref:tt.innerRef},tt.droppableProps),{onScroll:()=>{}}),(Mt=ne.questions)==null?void 0:Mt.map((Bt,W)=>D.createElement(Y._l,{draggableId:Bt.id.toString(),index:W,key:Bt.id},_t=>D.createElement("div",lt(lt({ref:_t.innerRef},_t.draggableProps),_t.dragHandleProps),D.createElement(gt,{index:W,typeName:ne.name,type:ne.type,data:Bt,inMouseId:St,onSetScore:Z,onDelete:z,onMouseEnter:vt=>{Jt(vt),tr(null)}})))))})))}))),D.createElement(Re.t,{okText:"\u4FDD\u5B58\u8BD5\u5377",onCancel:()=>U.history.replace("/problemset"),onOk:()=>U.history.push("/problemset/preview_new")}))};var Xe=(0,U.connect)(({problemsetPreview:F,user:Se,loading:be,globalSetting:q})=>({problemsetPreview:F,user:Se,globalSetting:q,loading:be.effects}))(Fe)},19080:function(yr,bt,w){"use strict";w.d(bt,{F:function(){return H},Z:function(){return He}});var D=w(92310),U=w.n(D);const V=null;function He(Y,me,S){return U()({[`${Y}-status-success`]:me==="success",[`${Y}-status-warning`]:me==="warning",[`${Y}-status-error`]:me==="error",[`${Y}-status-validating`]:me==="validating",[`${Y}-has-feedback`]:S})}const H=(Y,me)=>me||Y},66104:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return et}});var D=w(92310),U=w.n(D),V=w(11592),He=w(26112),H=w(59301),Y=w(92343),me=w(36355),S=w(84105),_=w(91857);const Ue=j=>{let{children:Fe}=j;const{getPrefixCls:Xe}=H.useContext(me.E_),F=Xe("breadcrumb");return H.createElement("li",{className:`${F}-separator`,"aria-hidden":"true"},Fe===""?Fe:Fe||"/")};Ue.__ANT_BREADCRUMB_SEPARATOR=!0;var je=Ue,A=function(j,Fe){var Xe={};for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&Fe.indexOf(F)<0&&(Xe[F]=j[F]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,F=Object.getOwnPropertySymbols(j);Se<F.length;Se++)Fe.indexOf(F[Se])<0&&Object.prototype.propertyIsEnumerable.call(j,F[Se])&&(Xe[F[Se]]=j[F[Se]]);return Xe};function R(j,Fe){if(j.title===void 0||j.title===null)return null;const Xe=Object.keys(Fe).join("|");return typeof j.title=="object"?j.title:String(j.title).replace(new RegExp(`:(${Xe})`,"g"),(F,Se)=>Fe[Se]||F)}function ze(j,Fe,Xe,F){if(Xe==null)return null;const{className:Se,onClick:be}=Fe,q=A(Fe,["className","onClick"]),Oe=Object.assign(Object.assign({},(0,He.Z)(q,{data:!0,aria:!0})),{onClick:be});return F!==void 0?H.createElement("a",Object.assign({},Oe,{className:U()(`${j}-link`,Se),href:F}),Xe):H.createElement("span",Object.assign({},Oe,{className:U()(`${j}-link`,Se)}),Xe)}function yt(j,Fe){return(F,Se,be,q,Oe)=>{if(Fe)return Fe(F,Se,be,q);const Ae=R(F,Se);return ze(j,F,Ae,Oe)}}var gt=function(j,Fe){var Xe={};for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&Fe.indexOf(F)<0&&(Xe[F]=j[F]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,F=Object.getOwnPropertySymbols(j);Se<F.length;Se++)Fe.indexOf(F[Se])<0&&Object.prototype.propertyIsEnumerable.call(j,F[Se])&&(Xe[F[Se]]=j[F[Se]]);return Xe};const qe=j=>{const{prefixCls:Fe,separator:Xe="/",children:F,menu:Se,overlay:be,dropdownProps:q,href:Oe}=j,Le=(ue=>{if(Se||be){const ot=Object.assign({},q);if(Se){const dt=Se||{},{items:Ft}=dt,Ht=gt(dt,["items"]);ot.menu=Object.assign(Object.assign({},Ht),{items:Ft==null?void 0:Ft.map((St,Jt)=>{var{key:zt,title:tr,label:Lt,path:ae}=St,Z=gt(St,["key","title","label","path"]);let z=Lt!=null?Lt:tr;return ae&&(z=H.createElement("a",{href:`${Oe}${ae}`},z)),Object.assign(Object.assign({},Z),{key:zt!=null?zt:Jt,label:z})})})}else be&&(ot.overlay=be);return H.createElement(_.Z,Object.assign({placement:"bottom"},ot),H.createElement("span",{className:`${Fe}-overlay-link`},ue,H.createElement(S.Z,null)))}return ue})(F);return Le!=null?H.createElement(H.Fragment,null,H.createElement("li",null,Le),Xe&&H.createElement(je,null,Xe)):null},Re=j=>{const{prefixCls:Fe,children:Xe,href:F}=j,Se=gt(j,["prefixCls","children","href"]),{getPrefixCls:be}=H.useContext(me.E_),q=be("breadcrumb",Fe);return H.createElement(qe,Object.assign({},Se,{prefixCls:q}),ze(q,Se,Xe,F))};Re.__ANT_BREADCRUMB_ITEM=!0;var Nt=Re,Ee=w(17313),_e=w(83116),O=w(37613);const K=j=>{const{componentCls:Fe,iconCls:Xe}=j;return{[Fe]:Object.assign(Object.assign({},(0,Ee.Wf)(j)),{color:j.itemColor,fontSize:j.fontSize,[Xe]:{fontSize:j.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:j.linkColor,transition:`color ${j.motionDurationMid}`,padding:`0 ${j.paddingXXS}px`,borderRadius:j.borderRadiusSM,height:j.lineHeight*j.fontSize,display:"inline-block",marginInline:-j.marginXXS,"&:hover":{color:j.linkHoverColor,backgroundColor:j.colorBgTextHover}},(0,Ee.Qy)(j)),"li:last-child":{color:j.lastItemColor},[`${Fe}-separator`]:{marginInline:j.separatorMargin,color:j.separatorColor},[`${Fe}-link`]:{[`
|
|
|
> ${Xe} + span,
|
|
|
> ${Xe} + a
|
|
|
`]:{marginInlineStart:j.marginXXS}},[`${Fe}-overlay-link`]:{borderRadius:j.borderRadiusSM,height:j.lineHeight*j.fontSize,display:"inline-block",padding:`0 ${j.paddingXXS}px`,marginInline:-j.marginXXS,[`> ${Xe}`]:{marginInlineStart:j.marginXXS,fontSize:j.fontSizeIcon},"&:hover":{color:j.linkHoverColor,backgroundColor:j.colorBgTextHover,a:{color:j.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${j.componentCls}-rtl`]:{direction:"rtl"}})}};var Q=(0,_e.Z)("Breadcrumb",j=>{const Fe=(0,O.TS)(j,{});return[K(Fe)]},j=>({itemColor:j.colorTextDescription,lastItemColor:j.colorText,iconFontSize:j.fontSize,linkColor:j.colorTextDescription,linkHoverColor:j.colorText,separatorColor:j.colorTextDescription,separatorMargin:j.marginXS})),re=function(j,Fe){var Xe={};for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&Fe.indexOf(F)<0&&(Xe[F]=j[F]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,F=Object.getOwnPropertySymbols(j);Se<F.length;Se++)Fe.indexOf(F[Se])<0&&Object.prototype.propertyIsEnumerable.call(j,F[Se])&&(Xe[F[Se]]=j[F[Se]]);return Xe};function We(j){const{breadcrumbName:Fe,children:Xe}=j,F=re(j,["breadcrumbName","children"]),Se=Object.assign({title:Fe},F);return Xe&&(Se.menu={items:Xe.map(be=>{var{breadcrumbName:q}=be,Oe=re(be,["breadcrumbName"]);return Object.assign(Object.assign({},Oe),{title:q})})}),Se}function de(j,Fe){return(0,H.useMemo)(()=>j||(Fe?Fe.map(We):null),[j,Fe])}var ut=function(j,Fe){var Xe={};for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&Fe.indexOf(F)<0&&(Xe[F]=j[F]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,F=Object.getOwnPropertySymbols(j);Se<F.length;Se++)Fe.indexOf(F[Se])<0&&Object.prototype.propertyIsEnumerable.call(j,F[Se])&&(Xe[F[Se]]=j[F[Se]]);return Xe};const lt=(j,Fe)=>{if(Fe===void 0)return Fe;let Xe=(Fe||"").replace(/^\//,"");return Object.keys(j).forEach(F=>{Xe=Xe.replace(`:${F}`,j[F])}),Xe},ye=j=>{const{prefixCls:Fe,separator:Xe="/",style:F,className:Se,rootClassName:be,routes:q,items:Oe,children:Ae,itemRender:Le,params:ue={}}=j,ot=ut(j,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:dt,direction:Ft,breadcrumb:Ht}=H.useContext(me.E_);let St;const Jt=dt("breadcrumb",Fe),[zt,tr]=Q(Jt),Lt=de(Oe,q),ae=yt(Jt,Le);if(Lt&&Lt.length>0){const he=[],pe=Oe||q;St=Lt.map((Ne,ne)=>{const{path:ie,key:Je,type:tt,menu:at,overlay:Mt,onClick:Bt,className:W,separator:_t,dropdownProps:vt}=Ne,N=lt(ue,ie);N!==void 0&&he.push(N);const X=Je!=null?Je:ne;if(tt==="separator")return H.createElement(je,{key:X},_t);const fe={},De=ne===Lt.length-1;at?fe.menu=at:Mt&&(fe.overlay=Mt);let{href:Me}=Ne;return he.length&&N!==void 0&&(Me=`#/${he.join("/")}`),H.createElement(qe,Object.assign({key:X},fe,(0,He.Z)(Ne,{data:!0,aria:!0}),{className:W,dropdownProps:vt,href:Me,separator:De?"":Xe,onClick:Bt,prefixCls:Jt}),ae(Ne,ue,pe,he,Me))})}else if(Ae){const he=(0,V.Z)(Ae).length;St=(0,V.Z)(Ae).map((pe,Ne)=>{if(!pe)return pe;const ne=Ne===he-1;return(0,Y.Tm)(pe,{separator:ne?"":Xe,key:Ne})})}const Z=U()(Jt,Ht==null?void 0:Ht.className,{[`${Jt}-rtl`]:Ft==="rtl"},Se,be,tr),z=Object.assign(Object.assign({},Ht==null?void 0:Ht.style),F);return zt(H.createElement("nav",Object.assign({className:Z,style:z},ot),H.createElement("ol",null,St)))};ye.Item=Nt,ye.Separator=je;var xe=ye,et=xe},91857:function(yr,bt,w){"use strict";var D=w(59301),U=w(38819),V=w(92310),He=w.n(V),H=w(31561),Y=w(70425),me=w(18929),S=w(2738),_=w(79676),Ue=w(53487),je=w(92343),A=w(36355),R=w(20834),ze=w(40875),yt=w(88088),gt=w(47211);const qe=null,Re=O=>{const{menu:K,arrow:Q,prefixCls:re,children:We,trigger:de,disabled:ut,dropdownRender:lt,getPopupContainer:ye,overlayClassName:xe,rootClassName:et,open:j,onOpenChange:Fe,visible:Xe,onVisibleChange:F,mouseEnterDelay:Se=.15,mouseLeaveDelay:be=.1,autoAdjustOverflow:q=!0,placement:Oe="",overlay:Ae,transitionName:Le}=O,{getPopupContainer:ue,getPrefixCls:ot,direction:dt}=D.useContext(A.E_),Ft=D.useMemo(()=>{const at=ot();return Le!==void 0?Le:Oe.includes("top")?`${at}-slide-down`:`${at}-slide-up`},[ot,Oe,Le]),Ht=D.useMemo(()=>Oe?Oe.includes("Center")?Oe.slice(0,Oe.indexOf("Center")):Oe:dt==="rtl"?"bottomRight":"bottomLeft",[Oe,dt]),St=ot("dropdown",re),[Jt,zt]=(0,gt.Z)(St),[,tr]=(0,yt.Z)(),Lt=D.Children.only(We),ae=(0,je.Tm)(Lt,{className:He()(`${St}-trigger`,{[`${St}-rtl`]:dt==="rtl"},Lt.props.className),disabled:ut}),Z=ut?[]:de;let z;Z&&Z.includes("contextMenu")&&(z=!0);const[he,pe]=(0,me.Z)(!1,{value:j!=null?j:Xe}),Ne=(0,Y.useEvent)(at=>{Fe==null||Fe(at),F==null||F(at),pe(at)}),ne=He()(xe,et,zt,{[`${St}-rtl`]:dt==="rtl"}),ie=(0,_.Z)({arrowPointAtCenter:typeof Q=="object"&&Q.pointAtCenter,autoAdjustOverflow:q,offset:tr.marginXXS,arrowWidth:Q?tr.sizePopupArrow:0,borderRadius:tr.borderRadius}),Je=D.useCallback(()=>{pe(!1)},[]),tt=()=>{let at;return K!=null&&K.items?at=D.createElement(R.default,Object.assign({},K)):typeof Ae=="function"?at=Ae():at=Ae,lt&&(at=lt(at)),at=D.Children.only(typeof at=="string"?D.createElement("span",null,at):at),D.createElement(ze.J,{prefixCls:`${St}-menu`,expandIcon:D.createElement("span",{className:`${St}-menu-submenu-arrow`},D.createElement(U.Z,{className:`${St}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Je,validator:Mt=>{let{mode:Bt}=Mt}},at)};return Jt(D.createElement(H.Z,Object.assign({alignPoint:z},(0,S.Z)(O,["rootClassName"]),{mouseEnterDelay:Se,mouseLeaveDelay:be,visible:he,builtinPlacements:ie,arrow:!!Q,overlayClassName:ne,prefixCls:St,getPopupContainer:ye||ue,transitionName:Ft,trigger:Z,overlay:tt,placement:Ht,onVisibleChange:Ne}),ae))};function Nt(O){return Object.assign(Object.assign({},O),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const Ee=(0,Ue.Z)(Re,"dropdown",O=>O,Nt),_e=O=>D.createElement(Ee,Object.assign({},O),D.createElement("span",null));Re._InternalPanelDoNotUseOrYouWillBeFired=_e,bt.Z=Re},47211:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return je}});var D=w(17313),U=w(13826),V=w(92899),He=w(29878),H=w(19447),Y=w(83116),me=w(37613),_=A=>{const{componentCls:R,menuCls:ze,colorError:yt,colorTextLightSolid:gt}=A,qe=`${ze}-item`;return{[`${R}, ${R}-menu-submenu`]:{[`${ze} ${qe}`]:{[`&${qe}-danger:not(${qe}-disabled)`]:{color:yt,"&:hover":{color:gt,backgroundColor:yt}}}}}};const Ue=A=>{const{componentCls:R,menuCls:ze,zIndexPopup:yt,dropdownArrowDistance:gt,sizePopupArrow:qe,antCls:Re,iconCls:Nt,motionDurationMid:Ee,dropdownPaddingVertical:_e,fontSize:O,dropdownEdgeChildPadding:K,colorTextDisabled:Q,fontSizeIcon:re,controlPaddingHorizontal:We,colorBgElevated:de}=A;return[{[R]:Object.assign(Object.assign({},(0,D.Wf)(A)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:yt,display:"block","&::before":{position:"absolute",insetBlock:-gt+qe/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${Re}-btn`]:{[`& > ${Nt}-down, & > ${Re}-btn-icon > ${Nt}-down`]:{fontSize:re}},[`${R}-wrap`]:{position:"relative",[`${Re}-btn > ${Nt}-down`]:{fontSize:re},[`${Nt}-down::before`]:{transition:`transform ${Ee}`}},[`${R}-wrap-open`]:{[`${Nt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${Re}-slide-down-enter${Re}-slide-down-enter-active${R}-placement-bottomLeft,
|
|
|
&${Re}-slide-down-appear${Re}-slide-down-appear-active${R}-placement-bottomLeft,
|
|
|
&${Re}-slide-down-enter${Re}-slide-down-enter-active${R}-placement-bottom,
|
|
|
&${Re}-slide-down-appear${Re}-slide-down-appear-active${R}-placement-bottom,
|
|
|
&${Re}-slide-down-enter${Re}-slide-down-enter-active${R}-placement-bottomRight,
|
|
|
&${Re}-slide-down-appear${Re}-slide-down-appear-active${R}-placement-bottomRight`]:{animationName:U.fJ},[`&${Re}-slide-up-enter${Re}-slide-up-enter-active${R}-placement-topLeft,
|
|
|
&${Re}-slide-up-appear${Re}-slide-up-appear-active${R}-placement-topLeft,
|
|
|
&${Re}-slide-up-enter${Re}-slide-up-enter-active${R}-placement-top,
|
|
|
&${Re}-slide-up-appear${Re}-slide-up-appear-active${R}-placement-top,
|
|
|
&${Re}-slide-up-enter${Re}-slide-up-enter-active${R}-placement-topRight,
|
|
|
&${Re}-slide-up-appear${Re}-slide-up-appear-active${R}-placement-topRight`]:{animationName:U.Qt},[`&${Re}-slide-down-leave${Re}-slide-down-leave-active${R}-placement-bottomLeft,
|
|
|
&${Re}-slide-down-leave${Re}-slide-down-leave-active${R}-placement-bottom,
|
|
|
&${Re}-slide-down-leave${Re}-slide-down-leave-active${R}-placement-bottomRight`]:{animationName:U.Uw},[`&${Re}-slide-up-leave${Re}-slide-up-leave-active${R}-placement-topLeft,
|
|
|
&${Re}-slide-up-leave${Re}-slide-up-leave-active${R}-placement-top,
|
|
|
&${Re}-slide-up-leave${Re}-slide-up-leave-active${R}-placement-topRight`]:{animationName:U.ly}})},(0,H.ZP)(A,{colorBg:de,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${R} ${ze}`]:{position:"relative",margin:0},[`${ze}-submenu-popup`]:{position:"absolute",zIndex:yt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${R}, ${R}-menu-submenu`]:{[ze]:Object.assign(Object.assign({padding:K,listStyleType:"none",backgroundColor:de,backgroundClip:"padding-box",borderRadius:A.borderRadiusLG,outline:"none",boxShadow:A.boxShadowSecondary},(0,D.Qy)(A)),{[`${ze}-item-group-title`]:{padding:`${_e}px ${We}px`,color:A.colorTextDescription,transition:`all ${Ee}`},[`${ze}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ze}-item-icon`]:{minWidth:O,marginInlineEnd:A.marginXS,fontSize:A.fontSizeSM},[`${ze}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Ee}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ze}-item, ${ze}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${_e}px ${We}px`,color:A.colorText,fontWeight:"normal",fontSize:O,lineHeight:A.lineHeight,cursor:"pointer",transition:`all ${Ee}`,borderRadius:A.borderRadiusSM,"&:hover, &-active":{backgroundColor:A.controlItemBgHover}},(0,D.Qy)(A)),{"&-selected":{color:A.colorPrimary,backgroundColor:A.controlItemBgActive,"&:hover, &-active":{backgroundColor:A.controlItemBgActiveHover}},"&-disabled":{color:Q,cursor:"not-allowed","&:hover":{color:Q,backgroundColor:de,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:re,fontStyle:"normal"}}}),[`${ze}-item-group-list`]:{margin:`0 ${A.marginXS}px`,padding:0,listStyle:"none"},[`${ze}-submenu-title`]:{paddingInlineEnd:We+A.fontSizeSM},[`${ze}-submenu-vertical`]:{position:"relative"},[`${ze}-submenu${ze}-submenu-disabled ${R}-menu-submenu-title`]:{[`&, ${R}-menu-submenu-arrow-icon`]:{color:Q,backgroundColor:de,cursor:"not-allowed"}},[`${ze}-submenu-selected ${R}-menu-submenu-title`]:{color:A.colorPrimary}})}},[(0,U.oN)(A,"slide-up"),(0,U.oN)(A,"slide-down"),(0,V.Fm)(A,"move-up"),(0,V.Fm)(A,"move-down"),(0,He._y)(A,"zoom-big")]]};var je=(0,Y.Z)("Dropdown",(A,R)=>{let{rootPrefixCls:ze}=R;const{marginXXS:yt,sizePopupArrow:gt,controlHeight:qe,fontSize:Re,lineHeight:Nt,paddingXXS:Ee,componentCls:_e,borderRadiusLG:O}=A,K=(qe-Re*Nt)/2,{dropdownArrowOffset:Q}=(0,H.fS)({contentRadius:O}),re=(0,me.TS)(A,{menuCls:`${_e}-menu`,rootPrefixCls:ze,dropdownArrowDistance:gt/2+yt,dropdownArrowOffset:Q,dropdownPaddingVertical:K,dropdownEdgeChildPadding:Ee});return[Ue(re),_(re)]},A=>({zIndexPopup:A.zIndexPopupBase+50}))},5871:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return vt}});var D=w(84105),U=w(87395),V=w(92310),He=w.n(V),H=w(54476),Y=w(20068),me=w(76190),S=w(42978),_=w(75931),Ue=w(67732),je=w(83652);function A(){return typeof BigInt=="function"}function R(N){return!N&&N!==0&&!Number.isNaN(N)||!String(N).trim()}function ze(N){var X=N.trim(),fe=X.startsWith("-");fe&&(X=X.slice(1)),X=X.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),X.startsWith(".")&&(X="0".concat(X));var De=X||"0",Me=De.split("."),pt=Me[0]||"0",Yt=Me[1]||"0";pt==="0"&&Yt==="0"&&(fe=!1);var Wt=fe?"-":"";return{negative:fe,negativeStr:Wt,trimStr:De,integerStr:pt,decimalStr:Yt,fullStr:"".concat(Wt).concat(De)}}function yt(N){var X=String(N);return!Number.isNaN(Number(X))&&X.includes("e")}function gt(N){var X=String(N);if(yt(N)){var fe=Number(X.slice(X.indexOf("e-")+2)),De=X.match(/\.(\d+)/);return De!=null&&De[1]&&(fe+=De[1].length),fe}return X.includes(".")&&Re(X)?X.length-X.indexOf(".")-1:0}function qe(N){var X=String(N);if(yt(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);X=N.toFixed(gt(X))}return ze(X).fullStr}function Re(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(X){if((0,Ue.Z)(this,N),(0,Y.Z)(this,"origin",""),(0,Y.Z)(this,"negative",void 0),(0,Y.Z)(this,"integer",void 0),(0,Y.Z)(this,"decimal",void 0),(0,Y.Z)(this,"decimalLen",void 0),(0,Y.Z)(this,"empty",void 0),(0,Y.Z)(this,"nan",void 0),R(X)){this.empty=!0;return}if(this.origin=String(X),X==="-"||Number.isNaN(X)){this.nan=!0;return}var fe=X;if(yt(fe)&&(fe=Number(fe)),fe=typeof fe=="string"?fe:qe(fe),Re(fe)){var De=ze(fe);this.negative=De.negative;var Me=De.trimStr.split(".");this.integer=BigInt(Me[0]);var pt=Me[1]||"0";this.decimal=BigInt(pt),this.decimalLen=pt.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(fe){var De="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(fe,"0"));return BigInt(De)}},{key:"negate",value:function(){var fe=new N(this.toString());return fe.negative=!fe.negative,fe}},{key:"cal",value:function(fe,De,Me){var pt=Math.max(this.getDecimalStr().length,fe.getDecimalStr().length),Yt=this.alignDecimal(pt),Wt=fe.alignDecimal(pt),Dt=De(Yt,Wt).toString(),lr=Me(pt),nr=ze(Dt),Ct=nr.negativeStr,gr=nr.trimStr,pr="".concat(Ct).concat(gr.padStart(lr+1,"0"));return new N("".concat(pr.slice(0,-lr),".").concat(pr.slice(-lr)))}},{key:"add",value:function(fe){if(this.isInvalidate())return new N(fe);var De=new N(fe);return De.isInvalidate()?this:this.cal(De,function(Me,pt){return Me+pt},function(Me){return Me})}},{key:"multi",value:function(fe){var De=new N(fe);return this.isInvalidate()||De.isInvalidate()?new N(NaN):this.cal(De,function(Me,pt){return Me*pt},function(Me){return Me*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(fe){return this.toString()===(fe==null?void 0:fe.toString())}},{key:"lessEquals",value:function(fe){return this.add(fe.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return fe?this.isInvalidate()?"":ze("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),N}(),Ee=function(){function N(X){if((0,Ue.Z)(this,N),(0,Y.Z)(this,"origin",""),(0,Y.Z)(this,"number",void 0),(0,Y.Z)(this,"empty",void 0),R(X)){this.empty=!0;return}this.origin=String(X),this.number=Number(X)}return(0,je.Z)(N,[{key:"negate",value:function(){return new N(-this.toNumber())}},{key:"add",value:function(fe){if(this.isInvalidate())return new N(fe);var De=Number(fe);if(Number.isNaN(De))return this;var Me=this.number+De;if(Me>Number.MAX_SAFE_INTEGER)return new N(Number.MAX_SAFE_INTEGER);if(Me<Number.MIN_SAFE_INTEGER)return new N(Number.MIN_SAFE_INTEGER);var pt=Math.max(gt(this.number),gt(De));return new N(Me.toFixed(pt))}},{key:"multi",value:function(fe){var De=Number(fe);if(this.isInvalidate()||Number.isNaN(De))return new N(NaN);var Me=this.number*De;if(Me>Number.MAX_SAFE_INTEGER)return new N(Number.MAX_SAFE_INTEGER);if(Me<Number.MIN_SAFE_INTEGER)return new N(Number.MIN_SAFE_INTEGER);var pt=Math.max(gt(this.number),gt(De));return new N(Me.toFixed(pt))}},{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(fe){return this.toNumber()===(fe==null?void 0:fe.toNumber())}},{key:"lessEquals",value:function(fe){return this.add(fe.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return fe?this.isInvalidate()?"":qe(this.number):this.origin}}]),N}();function _e(N){return A()?new Nt(N):new Ee(N)}function O(N,X,fe){var De=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(N==="")return"";var Me=ze(N),pt=Me.negativeStr,Yt=Me.integerStr,Wt=Me.decimalStr,Dt="".concat(X).concat(Wt),lr="".concat(pt).concat(Yt);if(fe>=0){var nr=Number(Wt[fe]);if(nr>=5&&!De){var Ct=_e(N).add("".concat(pt,"0.").concat("0".repeat(fe)).concat(10-nr));return O(Ct.toString(),X,fe,De)}return fe===0?lr:"".concat(lr).concat(X).concat(Wt.padEnd(fe,"0").slice(0,fe))}return Dt===".0"?lr:"".concat(lr).concat(Dt)}var K=_e,Q=w(93681),re=w(34280),We=w(8654),de=w(59301),ut=w(48736);function lt(N,X){var fe=(0,de.useRef)(null);function De(){try{var pt=N.selectionStart,Yt=N.selectionEnd,Wt=N.value,Dt=Wt.substring(0,pt),lr=Wt.substring(Yt);fe.current={start:pt,end:Yt,value:Wt,beforeTxt:Dt,afterTxt:lr}}catch(nr){}}function Me(){if(N&&fe.current&&X)try{var pt=N.value,Yt=fe.current,Wt=Yt.beforeTxt,Dt=Yt.afterTxt,lr=Yt.start,nr=pt.length;if(pt.endsWith(Dt))nr=pt.length-fe.current.afterTxt.length;else if(pt.startsWith(Wt))nr=Wt.length;else{var Ct=Wt[lr-1],gr=pt.indexOf(Ct,lr-1);gr!==-1&&(nr=gr+1)}N.setSelectionRange(nr,nr)}catch(pr){(0,ut.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(pr.message))}}return[De,Me]}var ye=w(49658),xe=function(){var X=(0,de.useState)(!1),fe=(0,S.Z)(X,2),De=fe[0],Me=fe[1];return(0,re.Z)(function(){Me((0,ye.Z)())},[]),De},et=xe,j=w(16089),Fe=200,Xe=600;function F(N){var X=N.prefixCls,fe=N.upNode,De=N.downNode,Me=N.upDisabled,pt=N.downDisabled,Yt=N.onStep,Wt=de.useRef(),Dt=de.useRef([]),lr=de.useRef();lr.current=Yt;var nr=function(){clearTimeout(Wt.current)},Ct=function(un,jr){un.preventDefault(),nr(),lr.current(jr);function pn(){lr.current(jr),Wt.current=setTimeout(pn,Fe)}Wt.current=setTimeout(pn,Xe)};de.useEffect(function(){return function(){nr(),Dt.current.forEach(function(jt){return j.Z.cancel(jt)})}},[]);var gr=et();if(gr)return null;var pr="".concat(X,"-handler"),wr=He()(pr,"".concat(pr,"-up"),(0,Y.Z)({},"".concat(pr,"-up-disabled"),Me)),rn=He()(pr,"".concat(pr,"-down"),(0,Y.Z)({},"".concat(pr,"-down-disabled"),pt)),ir=function(){return Dt.current.push((0,j.Z)(nr))},an={unselectable:"on",role:"button",onMouseUp:ir,onMouseLeave:ir};return de.createElement("div",{className:"".concat(pr,"-wrap")},de.createElement("span",(0,H.Z)({},an,{onMouseDown:function(un){Ct(un,!0)},"aria-label":"Increase Value","aria-disabled":Me,className:wr}),fe||de.createElement("span",{unselectable:"on",className:"".concat(X,"-handler-up-inner")})),de.createElement("span",(0,H.Z)({},an,{onMouseDown:function(un){Ct(un,!1)},"aria-label":"Decrease Value","aria-disabled":pt,className:rn}),De||de.createElement("span",{unselectable:"on",className:"".concat(X,"-handler-down-inner")})))}function Se(N){var X=typeof N=="number"?qe(N):ze(N).fullStr,fe=X.includes(".");return fe?ze(X.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:N+"0"}var be=w(5643),q=function(){var N=(0,de.useRef)(0),X=function(){j.Z.cancel(N.current)};return(0,de.useEffect)(function(){return X},[]),function(fe){X(),N.current=(0,j.Z)(function(){fe()})}},Oe=["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(X,fe){return X||fe.isEmpty()?fe.toString():fe.toNumber()},ue=function(X){var fe=K(X);return fe.isInvalidate()?null:fe},ot=de.forwardRef(function(N,X){var fe,De=N.prefixCls,Me=De===void 0?"rc-input-number":De,pt=N.className,Yt=N.style,Wt=N.min,Dt=N.max,lr=N.step,nr=lr===void 0?1:lr,Ct=N.defaultValue,gr=N.value,pr=N.disabled,wr=N.readOnly,rn=N.upHandler,ir=N.downHandler,an=N.keyboard,jt=N.controls,un=jt===void 0?!0:jt,jr=N.classNames,pn=N.stringMode,qr=N.parser,Sr=N.formatter,cr=N.precision,Zn=N.decimalSeparator,mn=N.onChange,ci=N.onInput,yn=N.onPressEnter,jn=N.onStep,C=(0,_.Z)(N,Oe),L="".concat(Me,"-input"),Be=de.useRef(null),Pe=de.useState(!1),Te=(0,S.Z)(Pe,2),Ke=Te[0],xt=Te[1],nt=de.useRef(!1),It=de.useRef(!1),Pt=de.useRef(!1),ur=de.useState(function(){return K(gr!=null?gr:Ct)}),$t=(0,S.Z)(ur,2),At=$t[0],ge=$t[1];function Mr(Kt){gr===void 0&&ge(Kt)}var Nr=de.useCallback(function(Kt,ht){if(!ht)return cr>=0?cr:Math.max(gt(Kt),gt(nr))},[cr,nr]),Cr=de.useCallback(function(Kt){var ht=String(Kt);if(qr)return qr(ht);var rr=ht;return Zn&&(rr=rr.replace(Zn,".")),rr.replace(/[^\w.-]+/g,"")},[qr,Zn]),vr=de.useRef(""),Fr=de.useCallback(function(Kt,ht){if(Sr)return Sr(Kt,{userTyping:ht,input:String(vr.current)});var rr=typeof Kt=="number"?qe(Kt):Kt;if(!ht){var Rt=Nr(rr,ht);if(Re(rr)&&(Zn||Rt>=0)){var Er=Zn||".";rr=O(rr,Er,Rt)}}return rr},[Sr,Nr,Zn]),br=de.useState(function(){var Kt=Ct!=null?Ct:gr;return At.isInvalidate()&&["string","number"].includes((0,me.Z)(Kt))?Number.isNaN(Kt)?"":Kt:Fr(At.toString(),!1)}),Vr=(0,S.Z)(br,2),oe=Vr[0],J=Vr[1];vr.current=oe;function ve(Kt,ht){J(Fr(Kt.isInvalidate()?Kt.toString(!1):Kt.toString(!ht),ht))}var we=de.useMemo(function(){return ue(Dt)},[Dt,cr]),G=de.useMemo(function(){return ue(Wt)},[Wt,cr]),le=de.useMemo(function(){return!we||!At||At.isInvalidate()?!1:we.lessEquals(At)},[we,At]),ce=de.useMemo(function(){return!G||!At||At.isInvalidate()?!1:At.lessEquals(G)},[G,At]),Ie=lt(Be.current,Ke),st=(0,S.Z)(Ie,2),ct=st[0],Ut=st[1],ar=function(ht){return we&&!ht.lessEquals(we)?we:G&&!G.lessEquals(ht)?G:null},xr=function(ht){return!ar(ht)},dr=function(ht,rr){var Rt=ht,Er=xr(Rt)||Rt.isEmpty();if(!Rt.isEmpty()&&!rr&&(Rt=ar(Rt)||Rt,Er=!0),!wr&&!pr&&Er){var Ur=Rt.toString(),hr=Nr(Ur,rr);return hr>=0&&(Rt=K(O(Ur,".",hr)),xr(Rt)||(Rt=K(O(Ur,".",hr,!0)))),Rt.equals(At)||(Mr(Rt),mn==null||mn(Rt.isEmpty()?null:Le(pn,Rt)),gr===void 0&&ve(Rt,rr)),Rt}return At},or=q(),$r=function Kt(ht){if(ct(),vr.current=ht,J(ht),!It.current){var rr=Cr(ht),Rt=K(rr);Rt.isNaN()||dr(Rt,!0)}ci==null||ci(ht),or(function(){var Er=ht;qr||(Er=ht.replace(/。/g,".")),Er!==ht&&Kt(Er)})},Tr=function(){It.current=!0},Gt=function(){It.current=!1,$r(Be.current.value)},qt=function(ht){$r(ht.target.value)},Vt=function(ht){var rr;if(!(ht&&le||!ht&&ce)){nt.current=!1;var Rt=K(Pt.current?Se(nr):nr);ht||(Rt=Rt.negate());var Er=(At||K(0)).add(Rt.toString()),Ur=dr(Er,!1);jn==null||jn(Le(pn,Ur),{offset:Pt.current?Se(nr):nr,type:ht?"up":"down"}),(rr=Be.current)===null||rr===void 0||rr.focus()}},Xt=function(ht){var rr=K(Cr(oe)),Rt=rr;rr.isNaN()?Rt=dr(At,ht):Rt=dr(rr,ht),gr!==void 0?ve(At,!1):Rt.isNaN()||ve(Rt,!1)},Qt=function(){nt.current=!0},sr=function(ht){var rr=ht.key,Rt=ht.shiftKey;nt.current=!0,Pt.current=Rt,rr==="Enter"&&(It.current||(nt.current=!1),Xt(!1),yn==null||yn(ht)),an!==!1&&!It.current&&["Up","ArrowUp","Down","ArrowDown"].includes(rr)&&(Vt(rr==="Up"||rr==="ArrowUp"),ht.preventDefault())},Pr=function(){nt.current=!1,Pt.current=!1},mr=function(){Xt(!1),xt(!1),nt.current=!1};return(0,re.o)(function(){At.isInvalidate()||ve(At,!1)},[cr]),(0,re.o)(function(){var Kt=K(gr);ge(Kt);var ht=K(Cr(oe));(!Kt.equals(ht)||!nt.current||Sr)&&ve(Kt,nt.current)},[gr]),(0,re.o)(function(){Sr&&Ut()},[oe]),de.createElement("div",{className:He()(Me,jr==null?void 0:jr.input,pt,(fe={},(0,Y.Z)(fe,"".concat(Me,"-focused"),Ke),(0,Y.Z)(fe,"".concat(Me,"-disabled"),pr),(0,Y.Z)(fe,"".concat(Me,"-readonly"),wr),(0,Y.Z)(fe,"".concat(Me,"-not-a-number"),At.isNaN()),(0,Y.Z)(fe,"".concat(Me,"-out-of-range"),!At.isInvalidate()&&!xr(At)),fe)),style:Yt,onFocus:function(){xt(!0)},onBlur:mr,onKeyDown:sr,onKeyUp:Pr,onCompositionStart:Tr,onCompositionEnd:Gt,onBeforeInput:Qt},un&&de.createElement(F,{prefixCls:Me,upNode:rn,downNode:ir,upDisabled:le,downDisabled:ce,onStep:Vt}),de.createElement("div",{className:"".concat(L,"-wrap")},de.createElement("input",(0,H.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Wt,"aria-valuemax":Dt,"aria-valuenow":At.isInvalidate()?null:At.toString(),step:nr},C,{ref:(0,We.sQ)(Be,X),className:L,value:oe,onChange:qt,disabled:pr,readOnly:wr}))))}),dt=de.forwardRef(function(N,X){var fe=N.disabled,De=N.style,Me=N.prefixCls,pt=N.value,Yt=N.prefix,Wt=N.suffix,Dt=N.addonBefore,lr=N.addonAfter,nr=N.classes,Ct=N.className,gr=N.classNames,pr=(0,_.Z)(N,Ae),wr=de.useRef(null),rn=function(an){wr.current&&(0,be.nH)(wr.current,an)};return de.createElement(Q.BaseInput,{inputElement:de.createElement(ot,(0,H.Z)({prefixCls:Me,disabled:fe,classNames:gr,ref:(0,We.sQ)(wr,X)},pr)),className:Ct,triggerFocus:rn,prefixCls:Me,value:pt,disabled:fe,style:De,prefix:Yt,suffix:Wt,addonAfter:lr,addonBefore:Dt,classes:nr,classNames:gr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});dt.displayName="InputNumber";var Ft=dt,Ht=Ft,St=w(19080),Jt=w(36355),zt=w(92736),tr=w(1684),Lt=w(19716),ae=w(32441),Z=w(33234),z=w(9937),he=w(17313),pe=w(74207),Ne=w(83116),ne=w(37613);const ie=(N,X)=>{let{componentCls:fe,borderRadiusSM:De,borderRadiusLG:Me}=N;const pt=X==="lg"?Me:De;return{[`&-${X}`]:{[`${fe}-handler-wrap`]:{borderStartEndRadius:pt,borderEndEndRadius:pt},[`${fe}-handler-up`]:{borderStartEndRadius:pt},[`${fe}-handler-down`]:{borderEndEndRadius:pt}}}},Je=N=>{const{componentCls:X,lineWidth:fe,lineType:De,colorBorder:Me,borderRadius:pt,fontSizeLG:Yt,controlHeightLG:Wt,controlHeightSM:Dt,colorError:lr,paddingInlineSM:nr,colorTextDescription:Ct,motionDurationMid:gr,handleHoverColor:pr,paddingInline:wr,paddingBlock:rn,handleBg:ir,handleActiveBg:an,colorTextDisabled:jt,borderRadiusSM:un,borderRadiusLG:jr,controlWidth:pn,handleVisible:qr,handleBorderColor:Sr}=N;return[{[X]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(N)),(0,z.ik)(N)),(0,z.bi)(N,X)),{display:"inline-block",width:pn,margin:0,padding:0,border:`${fe}px ${De} ${Me}`,borderRadius:pt,"&-rtl":{direction:"rtl",[`${X}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Yt,borderRadius:jr,[`input${X}-input`]:{height:Wt-2*fe}},"&-sm":{padding:0,borderRadius:un,[`input${X}-input`]:{height:Dt-2*fe,padding:`0 ${nr}px`}},"&:hover":Object.assign({},(0,z.pU)(N)),"&-focused":Object.assign({},(0,z.M1)(N)),"&-out-of-range":{[`${X}-input-wrap`]:{input:{color:lr}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,he.Wf)(N)),(0,z.s7)(N)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${X}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${X}-group-addon`]:{borderRadius:jr,fontSize:N.fontSizeLG}},"&-sm":{[`${X}-group-addon`]:{borderRadius:un}},[`${X}-wrapper-disabled > ${X}-group-addon`]:Object.assign({},(0,z.Xy)(N))}}),[`&-disabled ${X}-input`]:{cursor:"not-allowed"},[X]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(N)),{width:"100%",padding:`${rn}px ${wr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:pt,outline:0,transition:`all ${gr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,z.nz)(N.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[X]:Object.assign(Object.assign(Object.assign({[`&:hover ${X}-handler-wrap, &-focused ${X}-handler-wrap`]:{opacity:1},[`${X}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:N.handleWidth,height:"100%",background:ir,borderStartStartRadius:0,borderStartEndRadius:pt,borderEndEndRadius:pt,borderEndStartRadius:0,opacity:qr===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${gr} linear ${gr}`,[`${X}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${X}-handler-up-inner,
|
|
|
${X}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:N.handleFontSize}}},[`${X}-handler`]:{height:"50%",overflow:"hidden",color:Ct,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${fe}px ${De} ${Sr}`,transition:`all ${gr} linear`,"&:active":{background:an},"&:hover":{height:"60%",[`
|
|
|
${X}-handler-up-inner,
|
|
|
${X}-handler-down-inner
|
|
|
`]:{color:pr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,he.Ro)()),{color:Ct,transition:`all ${gr} linear`,userSelect:"none"})},[`${X}-handler-up`]:{borderStartEndRadius:pt},[`${X}-handler-down`]:{borderBlockStart:`${fe}px ${De} ${Sr}`,borderEndEndRadius:pt}},ie(N,"lg")),ie(N,"sm")),{"&-disabled, &-readonly":{[`${X}-handler-wrap`]:{display:"none"},[`${X}-input`]:{color:"inherit"}},[`
|
|
|
${X}-handler-up-disabled,
|
|
|
${X}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${X}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${X}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:jt}})},{[`${X}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${X}-handler-down`]:{borderBlockStartWidth:0}}}]},tt=N=>{const{componentCls:X,paddingBlock:fe,paddingInline:De,inputAffixPadding:Me,controlWidth:pt,borderRadiusLG:Yt,borderRadiusSM:Wt}=N;return{[`${X}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,z.ik)(N)),(0,z.bi)(N,`${X}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:pt,padding:0,paddingInlineStart:De,"&-lg":{borderRadius:Yt},"&-sm":{borderRadius:Wt},[`&:not(${X}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,z.pU)(N)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${X}-disabled`]:{background:"transparent"},[`> div${X}`]:{width:"100%",border:"none",outline:"none",[`&${X}-focused`]:{boxShadow:"none !important"}},[`input${X}-input`]:{padding:`${fe}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${X}-handler-wrap`]:{zIndex:2},[X]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Me},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:De,marginInlineStart:Me}}})}};var at=(0,Ne.Z)("InputNumber",N=>{const X=(0,ne.TS)(N,(0,z.e5)(N));return[Je(X),tt(X),(0,pe.c)(X)]},N=>Object.assign(Object.assign({},(0,z.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})),Mt=function(N,X){var fe={};for(var De in N)Object.prototype.hasOwnProperty.call(N,De)&&X.indexOf(De)<0&&(fe[De]=N[De]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,De=Object.getOwnPropertySymbols(N);Me<De.length;Me++)X.indexOf(De[Me])<0&&Object.prototype.propertyIsEnumerable.call(N,De[Me])&&(fe[De[Me]]=N[De[Me]]);return fe};const Bt=de.forwardRef((N,X)=>{const{getPrefixCls:fe,direction:De}=de.useContext(Jt.E_),Me=de.useRef(null);de.useImperativeHandle(X,()=>Me.current);const{className:pt,rootClassName:Yt,size:Wt,disabled:Dt,prefixCls:lr,addonBefore:nr,addonAfter:Ct,prefix:gr,bordered:pr=!0,readOnly:wr,status:rn,controls:ir}=N,an=Mt(N,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),jt=fe("input-number",lr),[un,jr]=at(jt),{compactSize:pn,compactItemClassnames:qr}=(0,Z.ri)(jt,De);let Sr=de.createElement(U.Z,{className:`${jt}-handler-up-inner`}),cr=de.createElement(D.Z,{className:`${jt}-handler-down-inner`});const Zn=typeof ir=="boolean"?ir:void 0;typeof ir=="object"&&(Sr=typeof ir.upIcon=="undefined"?Sr:de.createElement("span",{className:`${jt}-handler-up-inner`},ir.upIcon),cr=typeof ir.downIcon=="undefined"?cr:de.createElement("span",{className:`${jt}-handler-down-inner`},ir.downIcon));const{hasFeedback:mn,status:ci,isFormItemInput:yn,feedbackIcon:jn}=de.useContext(ae.aM),C=(0,St.F)(ci,rn),L=(0,Lt.Z)(nt=>{var It;return(It=Wt!=null?Wt:pn)!==null&&It!==void 0?It:nt}),Be=de.useContext(tr.Z),Pe=Dt!=null?Dt:Be,Te=He()({[`${jt}-lg`]:L==="large",[`${jt}-sm`]:L==="small",[`${jt}-rtl`]:De==="rtl",[`${jt}-borderless`]:!pr,[`${jt}-in-form-item`]:yn},(0,St.Z)(jt,C),qr,jr),Ke=`${jt}-group`,xt=de.createElement(Ht,Object.assign({ref:Me,disabled:Pe,className:He()(pt,Yt),upHandler:Sr,downHandler:cr,prefixCls:jt,readOnly:wr,controls:Zn,prefix:gr,suffix:mn&&jn,addonAfter:Ct&&de.createElement(Z.BR,null,de.createElement(ae.Ux,{override:!0,status:!0},Ct)),addonBefore:nr&&de.createElement(Z.BR,null,de.createElement(ae.Ux,{override:!0,status:!0},nr)),classNames:{input:Te},classes:{affixWrapper:He()((0,St.Z)(`${jt}-affix-wrapper`,C,mn),{[`${jt}-affix-wrapper-sm`]:L==="small",[`${jt}-affix-wrapper-lg`]:L==="large",[`${jt}-affix-wrapper-rtl`]:De==="rtl",[`${jt}-affix-wrapper-borderless`]:!pr},jr),wrapper:He()({[`${Ke}-rtl`]:De==="rtl",[`${jt}-wrapper-disabled`]:Pe},jr),group:He()({[`${jt}-group-wrapper-sm`]:L==="small",[`${jt}-group-wrapper-lg`]:L==="large",[`${jt}-group-wrapper-rtl`]:De==="rtl"},(0,St.Z)(`${jt}-group-wrapper`,C,mn),jr)}},an));return un(xt)}),W=Bt,_t=N=>de.createElement(zt.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},de.createElement(Bt,Object.assign({},N)));W._InternalPanelDoNotUseOrYouWillBeFired=_t;var vt=W},9937:function(yr,bt,w){"use strict";w.d(bt,{M1:function(){return me},TM:function(){return _e},Xy:function(){return S},bi:function(){return je},e5:function(){return Ee},ik:function(){return A},nz:function(){return H},pU:function(){return Y},s7:function(){return R},x0:function(){return Ue}});var D=w(17313),U=w(74207),V=w(37613),He=w(83116);const H=O=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:O,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Y=O=>({borderColor:O.hoverBorderColor}),me=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({},Y((0,V.TS)(O,{hoverBorderColor:O.colorBorder})))}),_=O=>{const{paddingBlockLG:K,fontSizeLG:Q,lineHeightLG:re,borderRadiusLG:We,paddingInlineLG:de}=O;return{padding:`${K}px ${de}px`,fontSize:Q,lineHeight:re,borderRadius:We}},Ue=O=>({padding:`${O.paddingBlockSM}px ${O.paddingInlineSM}px`,borderRadius:O.borderRadiusSM}),je=(O,K)=>{const{componentCls:Q,colorError:re,colorWarning:We,errorActiveShadow:de,warningActiveShadow:ut,colorErrorBorderHover:lt,colorWarningBorderHover:ye}=O;return{[`&-status-error:not(${K}-disabled):not(${K}-borderless)${K}`]:{borderColor:re,"&:hover":{borderColor:lt},"&:focus, &-focused":Object.assign({},me((0,V.TS)(O,{activeBorderColor:re,activeShadow:de}))),[`${Q}-prefix, ${Q}-suffix`]:{color:re}},[`&-status-warning:not(${K}-disabled):not(${K}-borderless)${K}`]:{borderColor:We,"&:hover":{borderColor:ye},"&:focus, &-focused":Object.assign({},me((0,V.TS)(O,{activeBorderColor:We,activeShadow:ut}))),[`${Q}-prefix, ${Q}-suffix`]:{color:We}}}},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({},Y(O)),"&:focus, &-focused":Object.assign({},me(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({},Ue(O)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),R=O=>{const{componentCls:K,antCls:Q}=O;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:O.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${K}, &-lg > ${K}-group-addon`]:Object.assign({},_(O)),[`&-sm ${K}, &-sm > ${K}-group-addon`]:Object.assign({},Ue(O)),[`&-lg ${Q}-select-single ${Q}-select-selector`]:{height:O.controlHeightLG},[`&-sm ${Q}-select-single ${Q}-select-selector`]:{height:O.controlHeightSM},[`> ${K}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${K}-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,[`${Q}-select`]:{margin:`-${O.paddingBlock+1}px -${O.paddingInline}px`,[`&${Q}-select-single:not(${Q}-select-customize-input)`]:{[`${Q}-select-selector`]:{backgroundColor:"inherit",border:`${O.lineWidth}px ${O.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Q}-select-selector`]:{color:O.colorPrimary}}},[`${Q}-cascader-picker`]:{margin:`-9px -${O.paddingInline}px`,backgroundColor:"transparent",[`${Q}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${K}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${K}-search-with-button &`]:{zIndex:0}}},[`> ${K}:first-child, ${K}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Q}-select ${Q}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${K}-affix-wrapper`]:{[`&:not(:first-child) ${K}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${K}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${K}:last-child, ${K}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Q}-select ${Q}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${K}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${K}-search &`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius}},[`&:not(:first-child), ${K}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${K}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,D.dF)()),{[`${K}-group-addon, ${K}-group-wrap, > ${K}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:O.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${K}-affix-wrapper,
|
|
|
& > ${K}-number-affix-wrapper,
|
|
|
& > ${Q}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-O.lineWidth,borderInlineEndWidth:O.lineWidth},[`${K}`]:{float:"none"},[`& > ${Q}-select > ${Q}-select-selector,
|
|
|
& > ${Q}-select-auto-complete ${K},
|
|
|
& > ${Q}-cascader-picker ${K},
|
|
|
& > ${K}-group-wrapper ${K}`]:{borderInlineEndWidth:O.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Q}-select-focused`]:{zIndex:1},[`& > ${Q}-select > ${Q}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${Q}-select:first-child > ${Q}-select-selector,
|
|
|
& > ${Q}-select-auto-complete:first-child ${K},
|
|
|
& > ${Q}-cascader-picker:first-child ${K}`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius},[`& > *:last-child,
|
|
|
& > ${Q}-select:last-child > ${Q}-select-selector,
|
|
|
& > ${Q}-cascader-picker:last-child ${K},
|
|
|
& > ${Q}-cascader-picker-focused:last-child ${K}`]:{borderInlineEndWidth:O.lineWidth,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius},[`& > ${Q}-select-auto-complete ${K}`]:{verticalAlign:"top"},[`${K}-group-wrapper + ${K}-group-wrapper`]:{marginInlineStart:-O.lineWidth,[`${K}-affix-wrapper`]:{borderRadius:0}},[`${K}-group-wrapper:not(:last-child)`]:{[`&${K}-search > ${K}-group`]:{[`& > ${K}-group-addon > ${K}-search-button`]:{borderRadius:0},[`& > ${K}`]:{borderStartStartRadius:O.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:O.borderRadius}}}})}},ze=O=>{const{componentCls:K,controlHeightSM:Q,lineWidth:re}=O,de=(Q-re*2-16)/2;return{[K]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,D.Wf)(O)),A(O)),je(O,K)),{'&[type="color"]':{height:O.controlHeight,[`&${K}-lg`]:{height:O.controlHeightLG},[`&${K}-sm`]:{height:Q,paddingTop:de,paddingBottom:de}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},yt=O=>{const{componentCls:K}=O;return{[`${K}-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:K,inputAffixPadding:Q,colorTextDescription:re,motionDurationSlow:We,colorIcon:de,colorIconHover:ut,iconCls:lt}=O;return{[`${K}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A(O)),{display:"inline-flex",[`&:not(${K}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Y(O)),{zIndex:1,[`${K}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${K}[disabled]`]:{background:"transparent"}},[`> input${K}`]:{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"'},[`${K}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:O.paddingXS}},"&-show-count-suffix":{color:re},"&-show-count-has-suffix":{marginInlineEnd:O.paddingXXS},"&-prefix":{marginInlineEnd:Q},"&-suffix":{marginInlineStart:Q}}}),yt(O)),{[`${lt}${K}-password-icon`]:{color:de,cursor:"pointer",transition:`all ${We}`,"&:hover":{color:ut}}}),je(O,`${K}-affix-wrapper`))}},qe=O=>{const{componentCls:K,colorError:Q,colorWarning:re,borderRadiusLG:We,borderRadiusSM:de}=O;return{[`${K}-group`]:Object.assign(Object.assign(Object.assign({},(0,D.Wf)(O)),R(O)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${K}-group-addon`]:{borderRadius:We,fontSize:O.fontSizeLG}},"&-sm":{[`${K}-group-addon`]:{borderRadius:de}},"&-status-error":{[`${K}-group-addon`]:{color:Q,borderColor:Q}},"&-status-warning":{[`${K}-group-addon`]:{color:re,borderColor:re}},"&-disabled":{[`${K}-group-addon`]:Object.assign({},S(O))},[`&:not(${K}-compact-first-item):not(${K}-compact-last-item)${K}-compact-item`]:{[`${K}, ${K}-group-addon`]:{borderRadius:0}},[`&:not(${K}-compact-last-item)${K}-compact-first-item`]:{[`${K}, ${K}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${K}-compact-first-item)${K}-compact-last-item`]:{[`${K}, ${K}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Re=O=>{const{componentCls:K,antCls:Q}=O,re=`${K}-search`;return{[re]:{[`${K}`]:{"&:hover, &:focus":{borderColor:O.colorPrimaryHover,[`+ ${K}-group-addon ${re}-button:not(${Q}-btn-primary)`]:{borderInlineStartColor:O.colorPrimaryHover}}},[`${K}-affix-wrapper`]:{borderRadius:0},[`${K}-lg`]:{lineHeight:O.lineHeightLG-2e-4},[`> ${K}-group`]:{[`> ${K}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${re}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${re}-button:not(${Q}-btn-primary)`]:{color:O.colorTextDescription,"&:hover":{color:O.colorPrimaryHover},"&:active":{color:O.colorPrimaryActive},[`&${Q}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${re}-button`]:{height:O.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${re}-button`]:{height:O.controlHeightLG},[`&-small ${re}-button`]:{height:O.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${K}-compact-item`]:{[`&:not(${K}-compact-last-item)`]:{[`${K}-group-addon`]:{[`${K}-search-button`]:{marginInlineEnd:-O.lineWidth,borderRadius:0}}},[`&:not(${K}-compact-first-item)`]:{[`${K},${K}-affix-wrapper`]:{borderRadius:0}},[`> ${K}-group-addon ${K}-search-button,
|
|
|
> ${K},
|
|
|
${K}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${K}-affix-wrapper-focused`]:{zIndex:2}}}}},Nt=O=>{const{componentCls:K,paddingLG:Q}=O,re=`${K}-textarea`;return{[re]:{position:"relative","&-show-count":{[`> ${K}`]:{height:"100%"},[`${K}-data-count`]:{position:"absolute",bottom:-O.fontSize*O.lineHeight,insetInlineEnd:0,color:O.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${K}`]:{paddingInlineEnd:Q}},[`&-affix-wrapper${re}-has-feedback`]:{[`${K}`]:{paddingInlineEnd:Q}},[`&-affix-wrapper${K}-affix-wrapper`]:{padding:0,[`> textarea${K}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${K}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${K}-clear-icon`]:{position:"absolute",insetInlineEnd:O.paddingXS,insetBlockStart:O.paddingXS},[`${re}-suffix`]:{position:"absolute",top:0,insetInlineEnd:O.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Ee(O){return(0,V.TS)(O,{inputAffixPadding:O.paddingXXS})}const _e=O=>{const{controlHeight:K,fontSize:Q,lineHeight:re,lineWidth:We,controlHeightSM:de,controlHeightLG:ut,fontSizeLG:lt,lineHeightLG:ye,paddingSM:xe,controlPaddingHorizontalSM:et,controlPaddingHorizontal:j,colorFillAlter:Fe,colorPrimaryHover:Xe,controlOutlineWidth:F,controlOutline:Se,colorErrorOutline:be,colorWarningOutline:q}=O;return{paddingBlock:Math.max(Math.round((K-Q*re)/2*10)/10-We,3),paddingBlockSM:Math.max(Math.round((de-Q*re)/2*10)/10-We,0),paddingBlockLG:Math.ceil((ut-lt*ye)/2*10)/10-We,paddingInline:xe-We,paddingInlineSM:et-We,paddingInlineLG:j-We,addonBg:Fe,activeBorderColor:Xe,hoverBorderColor:Xe,activeShadow:`0 0 0 ${F}px ${Se}`,errorActiveShadow:`0 0 0 ${F}px ${be}`,warningActiveShadow:`0 0 0 ${F}px ${q}`}};bt.ZP=(0,He.Z)("Input",O=>{const K=(0,V.TS)(O,Ee(O));return[ze(K),Nt(K),gt(K),qe(K),Re(K),(0,U.c)(K)]},_e)},45818:function(yr,bt,w){"use strict";w.d(bt,{D:function(){return Ee},Z:function(){return K}});var D=w(54476),U=w(59301),V={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"},He=V,H=w(7657),Y=function(re,We){return U.createElement(H.Z,(0,D.Z)({},re,{ref:We,icon:He}))},me=U.forwardRef(Y),S=me,_=w(33853),Ue=w(38819),je=w(92310),A=w.n(je),R=w(2738),yt=Q=>!isNaN(parseFloat(Q))&&isFinite(Q),gt=w(36355),qe=w(84966),Re=function(Q,re){var We={};for(var de in Q)Object.prototype.hasOwnProperty.call(Q,de)&&re.indexOf(de)<0&&(We[de]=Q[de]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,de=Object.getOwnPropertySymbols(Q);ut<de.length;ut++)re.indexOf(de[ut])<0&&Object.prototype.propertyIsEnumerable.call(Q,de[ut])&&(We[de[ut]]=Q[de[ut]]);return We};const Nt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Ee=U.createContext({}),_e=(()=>{let Q=0;return function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Q+=1,`${re}${Q}`}})();var K=U.forwardRef((Q,re)=>{const{prefixCls:We,className:de,trigger:ut,children:lt,defaultCollapsed:ye=!1,theme:xe="dark",style:et={},collapsible:j=!1,reverseArrow:Fe=!1,width:Xe=200,collapsedWidth:F=80,zeroWidthTriggerStyle:Se,breakpoint:be,onCollapse:q,onBreakpoint:Oe}=Q,Ae=Re(Q,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Le}=(0,U.useContext)(qe.Gs),[ue,ot]=(0,U.useState)("collapsed"in Q?Q.collapsed:ye),[dt,Ft]=(0,U.useState)(!1);(0,U.useEffect)(()=>{"collapsed"in Q&&ot(Q.collapsed)},[Q.collapsed]);const Ht=(ae,Z)=>{"collapsed"in Q||ot(ae),q==null||q(ae,Z)},St=(0,U.useRef)();St.current=ae=>{Ft(ae.matches),Oe==null||Oe(ae.matches),ue!==ae.matches&&Ht(ae.matches,"responsive")},(0,U.useEffect)(()=>{function ae(z){return St.current(z)}let Z;if(typeof window!="undefined"){const{matchMedia:z}=window;if(z&&be&&be in Nt){Z=z(`(max-width: ${Nt[be]})`);try{Z.addEventListener("change",ae)}catch(he){Z.addListener(ae)}ae(Z)}}return()=>{try{Z==null||Z.removeEventListener("change",ae)}catch(z){Z==null||Z.removeListener(ae)}}},[be]),(0,U.useEffect)(()=>{const ae=_e("ant-sider-");return Le.addSider(ae),()=>Le.removeSider(ae)},[]);const Jt=()=>{Ht(!ue,"clickTrigger")},{getPrefixCls:zt}=(0,U.useContext)(gt.E_),tr=()=>{const ae=zt("layout-sider",We),Z=(0,R.Z)(Ae,["collapsed"]),z=ue?F:Xe,he=yt(z)?`${z}px`:String(z),pe=parseFloat(String(F||0))===0?U.createElement("span",{onClick:Jt,className:A()(`${ae}-zero-width-trigger`,`${ae}-zero-width-trigger-${Fe?"right":"left"}`),style:Se},ut||U.createElement(S,null)):null,ie={expanded:Fe?U.createElement(Ue.Z,null):U.createElement(_.Z,null),collapsed:Fe?U.createElement(_.Z,null):U.createElement(Ue.Z,null)}[ue?"collapsed":"expanded"],Je=ut!==null?pe||U.createElement("div",{className:`${ae}-trigger`,onClick:Jt,style:{width:he}},ut||ie):null,tt=Object.assign(Object.assign({},et),{flex:`0 0 ${he}`,maxWidth:he,minWidth:he,width:he}),at=A()(ae,`${ae}-${xe}`,{[`${ae}-collapsed`]:!!ue,[`${ae}-has-trigger`]:j&&ut!==null&&!pe,[`${ae}-below`]:!!dt,[`${ae}-zero-width`]:parseFloat(he)===0},de);return U.createElement("aside",Object.assign({className:at},Z,{style:tt,ref:re}),U.createElement("div",{className:`${ae}-children`},lt),j||dt&&pe?Je:null)},Lt=U.useMemo(()=>({siderCollapsed:ue}),[ue]);return U.createElement(Ee.Provider,{value:Lt},tr())})},84966:function(yr,bt,w){"use strict";w.d(bt,{VY:function(){return Ee},$_:function(){return Nt},h4:function(){return Re},Gs:function(){return R},ZP:function(){return _e}});var D=w(94480),U=w(92310),V=w.n(U),He=w(2738),H=w(59301),Y=w(36355),me=w(83116),_=O=>{const{componentCls:K,bodyBg:Q,lightSiderBg:re,lightTriggerBg:We,lightTriggerColor:de}=O;return{[`${K}-sider-light`]:{background:re,[`${K}-sider-trigger`]:{color:de,background:We},[`${K}-sider-zero-width-trigger`]:{color:de,background:We,border:`1px solid ${Q}`,borderInlineStart:0}}}};const Ue=O=>{const{antCls:K,componentCls:Q,colorText:re,triggerColor:We,footerBg:de,triggerBg:ut,headerHeight:lt,headerPadding:ye,headerColor:xe,footerPadding:et,triggerHeight:j,zeroTriggerHeight:Fe,zeroTriggerWidth:Xe,motionDurationMid:F,motionDurationSlow:Se,fontSize:be,borderRadius:q,bodyBg:Oe,headerBg:Ae,siderBg:Le}=O;return{[Q]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Oe,"&, *":{boxSizing:"border-box"},[`&${Q}-has-sider`]:{flexDirection:"row",[`> ${Q}, > ${Q}-content`]:{width:0}},[`${Q}-header, &${Q}-footer`]:{flex:"0 0 auto"},[`${Q}-sider`]:{position:"relative",minWidth:0,background:Le,transition:`all ${F}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${K}-menu${K}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:j},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:j,color:We,lineHeight:`${j}px`,textAlign:"center",background:ut,cursor:"pointer",transition:`all ${F}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:lt,insetInlineEnd:-Xe,zIndex:1,width:Xe,height:Fe,color:We,fontSize:O.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Le,borderStartStartRadius:0,borderStartEndRadius:q,borderEndEndRadius:q,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Se} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Se}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Xe,borderStartStartRadius:q,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:q}}}}},_(O)),{"&-rtl":{direction:"rtl"}}),[`${Q}-header`]:{height:lt,padding:ye,color:xe,lineHeight:`${lt}px`,background:Ae,[`${K}-menu`]:{lineHeight:"inherit"}},[`${Q}-footer`]:{padding:et,color:re,fontSize:be,background:de},[`${Q}-content`]:{flex:"auto",minHeight:0}}};var je=(0,me.Z)("Layout",O=>[Ue(O)],O=>{const{colorBgLayout:K,controlHeight:Q,controlHeightLG:re,colorText:We,controlHeightSM:de,marginXXS:ut,colorTextLightSolid:lt,colorBgContainer:ye}=O,xe=re*1.25;return{colorBgHeader:"#001529",colorBgBody:K,colorBgTrigger:"#002140",bodyBg:K,headerBg:"#001529",headerHeight:Q*2,headerPadding:`0 ${xe}px`,headerColor:We,footerPadding:`${de}px ${xe}px`,footerBg:K,siderBg:"#001529",triggerHeight:re+ut*2,triggerBg:"#002140",triggerColor:lt,zeroTriggerWidth:re,zeroTriggerHeight:re,lightSiderBg:ye,lightTriggerBg:ye,lightTriggerColor:We}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),A=function(O,K){var Q={};for(var re in O)Object.prototype.hasOwnProperty.call(O,re)&&K.indexOf(re)<0&&(Q[re]=O[re]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,re=Object.getOwnPropertySymbols(O);We<re.length;We++)K.indexOf(re[We])<0&&Object.prototype.propertyIsEnumerable.call(O,re[We])&&(Q[re[We]]=O[re[We]]);return Q};const R=H.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ze(O){let{suffixCls:K,tagName:Q,displayName:re}=O;return We=>H.forwardRef((ut,lt)=>H.createElement(We,Object.assign({ref:lt,suffixCls:K,tagName:Q},ut)))}const yt=H.forwardRef((O,K)=>{const{prefixCls:Q,suffixCls:re,className:We,tagName:de}=O,ut=A(O,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:lt}=H.useContext(Y.E_),ye=lt("layout",Q),[xe,et]=je(ye),j=re?`${ye}-${re}`:ye;return xe(H.createElement(de,Object.assign({className:V()(Q||j,We,et),ref:K},ut)))}),gt=H.forwardRef((O,K)=>{const{direction:Q}=H.useContext(Y.E_),[re,We]=H.useState([]),{prefixCls:de,className:ut,rootClassName:lt,children:ye,hasSider:xe,tagName:et,style:j}=O,Fe=A(O,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Xe=(0,He.Z)(Fe,["suffixCls"]),{getPrefixCls:F,layout:Se}=H.useContext(Y.E_),be=F("layout",de),[q,Oe]=je(be),Ae=V()(be,{[`${be}-has-sider`]:typeof xe=="boolean"?xe:re.length>0,[`${be}-rtl`]:Q==="rtl"},Se==null?void 0:Se.className,ut,lt,Oe),Le=H.useMemo(()=>({siderHook:{addSider:ue=>{We(ot=>[].concat((0,D.Z)(ot),[ue]))},removeSider:ue=>{We(ot=>ot.filter(dt=>dt!==ue))}}}),[]);return q(H.createElement(R.Provider,{value:Le},H.createElement(et,Object.assign({ref:K,className:Ae,style:Object.assign(Object.assign({},Se==null?void 0:Se.style),j)},Xe),ye)))}),qe=ze({tagName:"div",displayName:"Layout"})(gt),Re=ze({suffixCls:"header",tagName:"header",displayName:"Header"})(yt),Nt=ze({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(yt),Ee=ze({suffixCls:"content",tagName:"main",displayName:"Content"})(yt);var _e=qe},40875:function(yr,bt,w){"use strict";w.d(bt,{J:function(){return Y}});var D=w(59301),U=w(33234),V=w(70425),He=function(me,S){var _={};for(var Ue in me)Object.prototype.hasOwnProperty.call(me,Ue)&&S.indexOf(Ue)<0&&(_[Ue]=me[Ue]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ue=Object.getOwnPropertySymbols(me);je<Ue.length;je++)S.indexOf(Ue[je])<0&&Object.prototype.propertyIsEnumerable.call(me,Ue[je])&&(_[Ue[je]]=me[Ue[je]]);return _};const H=D.createContext(null),Y=D.forwardRef((me,S)=>{const{children:_}=me,Ue=He(me,["children"]),je=D.useContext(H),A=D.useMemo(()=>Object.assign(Object.assign({},je),Ue),[je,Ue.prefixCls,Ue.mode,Ue.selectable]);return D.createElement(H.Provider,{value:A},D.createElement(U.BR,null,(0,V.supportNodeRef)(_)?D.cloneElement(_,{ref:S}):_))});bt.Z=H},20834:function(yr,bt,w){"use strict";w.d(bt,{default:function(){return Lt}});var D=w(15285),U=w(59301),V=w(45818),He=w(92310),H=w.n(He),Y=w(36355),me=function(ae,Z){var z={};for(var he in ae)Object.prototype.hasOwnProperty.call(ae,he)&&Z.indexOf(he)<0&&(z[he]=ae[he]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,he=Object.getOwnPropertySymbols(ae);pe<he.length;pe++)Z.indexOf(he[pe])<0&&Object.prototype.propertyIsEnumerable.call(ae,he[pe])&&(z[he[pe]]=ae[he[pe]]);return z},_=ae=>{const{prefixCls:Z,className:z,dashed:he}=ae,pe=me(ae,["prefixCls","className","dashed"]),{getPrefixCls:Ne}=U.useContext(Y.E_),ne=Ne("menu",Z),ie=H()({[`${ne}-item-divider-dashed`]:!!he},z);return U.createElement(D.iz,Object.assign({className:ie},pe))},Ue=w(11592),je=w(2738),A=w(6848),R=w(92343),yt=(0,U.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),qe=ae=>{var Z;const{className:z,children:he,icon:pe,title:Ne,danger:ne}=ae,{prefixCls:ie,firstLevel:Je,direction:tt,disableMenuItemTitleTooltip:at,inlineCollapsed:Mt}=U.useContext(yt),Bt=fe=>{const De=U.createElement("span",{className:`${ie}-title-content`},he);return(!pe||(0,R.l$)(he)&&he.type==="span")&&he&&fe&&Je&&typeof he=="string"?U.createElement("div",{className:`${ie}-inline-collapsed-noicon`},he.charAt(0)):De},{siderCollapsed:W}=U.useContext(V.D);let _t=Ne;typeof Ne=="undefined"?_t=Je?he:"":Ne===!1&&(_t="");const vt={title:_t};!W&&!Mt&&(vt.title=null,vt.open=!1);const N=(0,Ue.Z)(he).length;let X=U.createElement(D.ck,Object.assign({},(0,je.Z)(ae,["title","icon","danger"]),{className:H()({[`${ie}-item-danger`]:ne,[`${ie}-item-only-child`]:(pe?N+1:N)===1},z),title:typeof Ne=="string"?Ne:void 0}),(0,R.Tm)(pe,{className:H()((0,R.l$)(pe)?(Z=pe.props)===null||Z===void 0?void 0:Z.className:"",`${ie}-item-icon`)}),Bt(Mt));return at||(X=U.createElement(A.Z,Object.assign({},vt,{placement:tt==="rtl"?"left":"right",overlayClassName:`${ie}-inline-collapsed-tooltip`}),X)),X},Nt=ae=>{var Z;const{popupClassName:z,icon:he,title:pe,theme:Ne}=ae,ne=U.useContext(yt),{prefixCls:ie,inlineCollapsed:Je,theme:tt}=ne,at=(0,D.Xl)();let Mt;if(!he)Mt=Je&&!at.length&&pe&&typeof pe=="string"?U.createElement("div",{className:`${ie}-inline-collapsed-noicon`},pe.charAt(0)):U.createElement("span",{className:`${ie}-title-content`},pe);else{const W=(0,R.l$)(pe)&&pe.type==="span";Mt=U.createElement(U.Fragment,null,(0,R.Tm)(he,{className:H()((0,R.l$)(he)?(Z=he.props)===null||Z===void 0?void 0:Z.className:"",`${ie}-item-icon`)}),W?pe:U.createElement("span",{className:`${ie}-title-content`},pe))}const Bt=U.useMemo(()=>Object.assign(Object.assign({},ne),{firstLevel:!1}),[ne]);return U.createElement(yt.Provider,{value:Bt},U.createElement(D.Wd,Object.assign({},(0,je.Z)(ae,["icon"]),{title:Mt,popupClassName:H()(ie,z,`${ie}-${Ne||tt}`)})))},Ee=w(18785),_e=w(70425),O=w(62892),K=w(40875),Q=function(ae,Z){var z={};for(var he in ae)Object.prototype.hasOwnProperty.call(ae,he)&&Z.indexOf(he)<0&&(z[he]=ae[he]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,he=Object.getOwnPropertySymbols(ae);pe<he.length;pe++)Z.indexOf(he[pe])<0&&Object.prototype.propertyIsEnumerable.call(ae,he[pe])&&(z[he[pe]]=ae[he[pe]]);return z};function re(ae){return(ae||[]).map((Z,z)=>{if(Z&&typeof Z=="object"){const he=Z,{label:pe,children:Ne,key:ne,type:ie}=he,Je=Q(he,["label","children","key","type"]),tt=ne!=null?ne:`tmp-${z}`;return Ne||ie==="group"?ie==="group"?U.createElement(D.BW,Object.assign({key:tt},Je,{title:pe}),re(Ne)):U.createElement(Nt,Object.assign({key:tt},Je,{title:pe}),re(Ne)):ie==="divider"?U.createElement(_,Object.assign({key:tt},Je)):U.createElement(qe,Object.assign({key:tt},Je),pe)}return null}).filter(Z=>Z)}function We(ae){return U.useMemo(()=>ae&&re(ae),[ae])}var de=w(64993),ut=w(17313),lt=w(8378),ye=w(13826),xe=w(29878),et=w(83116),j=w(37613),Xe=ae=>{const{componentCls:Z,motionDurationSlow:z,horizontalLineHeight:he,colorSplit:pe,lineWidth:Ne,lineType:ne,itemPaddingInline:ie}=ae;return{[`${Z}-horizontal`]:{lineHeight:he,border:0,borderBottom:`${Ne}px ${ne} ${pe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Z}-item, ${Z}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:ie},[`> ${Z}-item:hover,
|
|
|
> ${Z}-item-active,
|
|
|
> ${Z}-submenu ${Z}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Z}-item, ${Z}-submenu-title`]:{transition:[`border-color ${z}`,`background ${z}`].join(",")},[`${Z}-submenu-arrow`]:{display:"none"}}}},Se=ae=>{let{componentCls:Z,menuArrowOffset:z}=ae;return{[`${Z}-rtl`]:{direction:"rtl"},[`${Z}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Z}-rtl${Z}-vertical,
|
|
|
${Z}-submenu-rtl ${Z}-vertical`]:{[`${Z}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${z})`},"&::after":{transform:`rotate(45deg) translateY(${z})`}}}}};const be=ae=>Object.assign({},(0,ut.oN)(ae));var Oe=(ae,Z)=>{const{componentCls:z,itemColor:he,itemSelectedColor:pe,groupTitleColor:Ne,itemBg:ne,subMenuItemBg:ie,itemSelectedBg:Je,activeBarHeight:tt,activeBarWidth:at,activeBarBorderWidth:Mt,motionDurationSlow:Bt,motionEaseInOut:W,motionEaseOut:_t,itemPaddingInline:vt,motionDurationMid:N,itemHoverColor:X,lineType:fe,colorSplit:De,itemDisabledColor:Me,dangerItemColor:pt,dangerItemHoverColor:Yt,dangerItemSelectedColor:Wt,dangerItemActiveBg:Dt,dangerItemSelectedBg:lr,itemHoverBg:nr,itemActiveBg:Ct,menuSubMenuBg:gr,horizontalItemSelectedColor:pr,horizontalItemSelectedBg:wr,horizontalItemBorderRadius:rn,horizontalItemHoverBg:ir,popupBg:an}=ae;return{[`${z}-${Z}, ${z}-${Z} > ${z}`]:{color:he,background:ne,[`&${z}-root:focus-visible`]:Object.assign({},be(ae)),[`${z}-item-group-title`]:{color:Ne},[`${z}-submenu-selected`]:{[`> ${z}-submenu-title`]:{color:pe}},[`${z}-item-disabled, ${z}-submenu-disabled`]:{color:`${Me} !important`},[`${z}-item:not(${z}-item-selected):not(${z}-submenu-selected)`]:{[`&:hover, > ${z}-submenu-title:hover`]:{color:X}},[`&:not(${z}-horizontal)`]:{[`${z}-item:not(${z}-item-selected)`]:{"&:hover":{backgroundColor:nr},"&:active":{backgroundColor:Ct}},[`${z}-submenu-title`]:{"&:hover":{backgroundColor:nr},"&:active":{backgroundColor:Ct}}},[`${z}-item-danger`]:{color:pt,[`&${z}-item:hover`]:{[`&:not(${z}-item-selected):not(${z}-submenu-selected)`]:{color:Yt}},[`&${z}-item:active`]:{background:Dt}},[`${z}-item a`]:{"&, &:hover":{color:"inherit"}},[`${z}-item-selected`]:{color:pe,[`&${z}-item-danger`]:{color:Wt},"a, a:hover":{color:"inherit"}},[`& ${z}-item-selected`]:{backgroundColor:Je,[`&${z}-item-danger`]:{backgroundColor:lr}},[`${z}-item, ${z}-submenu-title`]:{[`&:not(${z}-item-disabled):focus-visible`]:Object.assign({},be(ae))},[`&${z}-submenu > ${z}`]:{backgroundColor:gr},[`&${z}-popup > ${z}`]:{backgroundColor:an},[`&${z}-horizontal`]:Object.assign(Object.assign({},Z==="dark"?{borderBottom:0}:{}),{[`> ${z}-item, > ${z}-submenu`]:{top:Mt,marginTop:-Mt,marginBottom:0,borderRadius:rn,"&::after":{position:"absolute",insetInline:vt,bottom:0,borderBottom:`${tt}px solid transparent`,transition:`border-color ${Bt} ${W}`,content:'""'},"&:hover, &-active, &-open":{background:ir,"&::after":{borderBottomWidth:tt,borderBottomColor:pr}},"&-selected":{color:pr,backgroundColor:wr,"&:hover":{backgroundColor:wr},"&::after":{borderBottomWidth:tt,borderBottomColor:pr}}}}),[`&${z}-root`]:{[`&${z}-inline, &${z}-vertical`]:{borderInlineEnd:`${Mt}px ${fe} ${De}`}},[`&${z}-inline`]:{[`${z}-sub${z}-inline`]:{background:ie},[`${z}-item, ${z}-submenu-title`]:Mt&&at?{width:`calc(100% + ${Mt}px)`}:{},[`${z}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${at}px solid ${pe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${N} ${_t}`,`opacity ${N} ${_t}`].join(","),content:'""'},[`&${z}-item-danger`]:{"&::after":{borderInlineEndColor:Wt}}},[`${z}-selected, ${z}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${N} ${W}`,`opacity ${N} ${W}`].join(",")}}}}}};const Ae=ae=>{const{componentCls:Z,itemHeight:z,itemMarginInline:he,padding:pe,menuArrowSize:Ne,marginXS:ne,itemMarginBlock:ie}=ae,Je=pe+Ne+ne;return{[`${Z}-item`]:{position:"relative",overflow:"hidden"},[`${Z}-item, ${Z}-submenu-title`]:{height:z,lineHeight:`${z}px`,paddingInline:pe,overflow:"hidden",textOverflow:"ellipsis",marginInline:he,marginBlock:ie,width:`calc(100% - ${he*2}px)`},[`> ${Z}-item,
|
|
|
> ${Z}-submenu > ${Z}-submenu-title`]:{height:z,lineHeight:`${z}px`},[`${Z}-item-group-list ${Z}-submenu-title,
|
|
|
${Z}-submenu-title`]:{paddingInlineEnd:Je}}};var ue=ae=>{const{componentCls:Z,iconCls:z,itemHeight:he,colorTextLightSolid:pe,dropdownWidth:Ne,controlHeightLG:ne,motionDurationMid:ie,motionEaseOut:Je,paddingXL:tt,itemMarginInline:at,fontSizeLG:Mt,motionDurationSlow:Bt,paddingXS:W,boxShadowSecondary:_t,collapsedWidth:vt,collapsedIconSize:N}=ae,X={height:he,lineHeight:`${he}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Z]:{"&-inline, &-vertical":Object.assign({[`&${Z}-root`]:{boxShadow:"none"}},Ae(ae))},[`${Z}-submenu-popup`]:{[`${Z}-vertical`]:Object.assign(Object.assign({},Ae(ae)),{boxShadow:_t})}},{[`${Z}-submenu-popup ${Z}-vertical${Z}-sub`]:{minWidth:Ne,maxHeight:`calc(100vh - ${ne*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Z}-inline`]:{width:"100%",[`&${Z}-root`]:{[`${Z}-item, ${Z}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Bt}`,`background ${Bt}`,`padding ${ie} ${Je}`].join(","),[`> ${Z}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Z}-sub${Z}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Z}-submenu > ${Z}-submenu-title`]:X,[`& ${Z}-item-group-title`]:{paddingInlineStart:tt}},[`${Z}-item`]:X}},{[`${Z}-inline-collapsed`]:{width:vt,[`&${Z}-root`]:{[`${Z}-item, ${Z}-submenu ${Z}-submenu-title`]:{[`> ${Z}-inline-collapsed-noicon`]:{fontSize:Mt,textAlign:"center"}}},[`> ${Z}-item,
|
|
|
> ${Z}-item-group > ${Z}-item-group-list > ${Z}-item,
|
|
|
> ${Z}-item-group > ${Z}-item-group-list > ${Z}-submenu > ${Z}-submenu-title,
|
|
|
> ${Z}-submenu > ${Z}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Mt/2}px - ${at}px)`,textOverflow:"clip",[`
|
|
|
${Z}-submenu-arrow,
|
|
|
${Z}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Z}-item-icon, ${z}`]:{margin:0,fontSize:N,lineHeight:`${he}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Z}-item-icon, ${z}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Z}-item-icon, ${z}`]:{display:"none"},"a, a:hover":{color:pe}},[`${Z}-item-group-title`]:Object.assign(Object.assign({},ut.vS),{paddingInline:W})}}]};const ot=ae=>{const{componentCls:Z,motionDurationSlow:z,motionDurationMid:he,motionEaseInOut:pe,motionEaseOut:Ne,iconCls:ne,iconSize:ie,iconMarginInlineEnd:Je}=ae;return{[`${Z}-item, ${Z}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${z}`,`background ${z}`,`padding ${z} ${pe}`].join(","),[`${Z}-item-icon, ${ne}`]:{minWidth:ie,fontSize:ie,transition:[`font-size ${he} ${Ne}`,`margin ${z} ${pe}`,`color ${z}`].join(","),"+ span":{marginInlineStart:Je,opacity:1,transition:[`opacity ${z} ${pe}`,`margin ${z}`,`color ${z}`].join(",")}},[`${Z}-item-icon`]:Object.assign({},(0,ut.Ro)()),[`&${Z}-item-only-child`]:{[`> ${ne}, > ${Z}-item-icon`]:{marginInlineEnd:0}}},[`${Z}-item-disabled, ${Z}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Z}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},dt=ae=>{const{componentCls:Z,motionDurationSlow:z,motionEaseInOut:he,borderRadius:pe,menuArrowSize:Ne,menuArrowOffset:ne}=ae;return{[`${Z}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:ae.margin,width:Ne,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${z} ${he}, opacity ${z}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ne*.6,height:Ne*.15,backgroundColor:"currentcolor",borderRadius:pe,transition:[`background ${z} ${he}`,`transform ${z} ${he}`,`top ${z} ${he}`,`color ${z} ${he}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${ne})`},"&::after":{transform:`rotate(-45deg) translateY(${ne})`}}}}},Ft=ae=>{const{antCls:Z,componentCls:z,fontSize:he,motionDurationSlow:pe,motionDurationMid:Ne,motionEaseInOut:ne,paddingXS:ie,padding:Je,colorSplit:tt,lineWidth:at,zIndexPopup:Mt,borderRadiusLG:Bt,subMenuItemBorderRadius:W,menuArrowSize:_t,menuArrowOffset:vt,lineType:N,menuPanelMaskInset:X,groupTitleLineHeight:fe,groupTitleFontSize:De}=ae;return[{"":{[`${z}`]:Object.assign(Object.assign({},(0,ut.dF)()),{"&-hidden":{display:"none"}})},[`${z}-submenu-hidden`]:{display:"none"}},{[z]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ut.Wf)(ae)),(0,ut.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:he,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${pe} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${z}-item`]:{flex:"none"}},[`${z}-item, ${z}-submenu, ${z}-submenu-title`]:{borderRadius:ae.itemBorderRadius},[`${z}-item-group-title`]:{padding:`${ie}px ${Je}px`,fontSize:De,lineHeight:fe,transition:`all ${pe}`},[`&-horizontal ${z}-submenu`]:{transition:[`border-color ${pe} ${ne}`,`background ${pe} ${ne}`].join(",")},[`${z}-submenu, ${z}-submenu-inline`]:{transition:[`border-color ${pe} ${ne}`,`background ${pe} ${ne}`,`padding ${Ne} ${ne}`].join(",")},[`${z}-submenu ${z}-sub`]:{cursor:"initial",transition:[`background ${pe} ${ne}`,`padding ${pe} ${ne}`].join(",")},[`${z}-title-content`]:{transition:`color ${pe}`},[`${z}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${z}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:tt,borderStyle:N,borderWidth:0,borderTopWidth:at,marginBlock:at,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ot(ae)),{[`${z}-item-group`]:{[`${z}-item-group-list`]:{margin:0,padding:0,[`${z}-item, ${z}-submenu-title`]:{paddingInline:`${he*2}px ${Je}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Mt,borderRadius:Bt,boxShadow:"none",transformOrigin:"0 0",[`&${z}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${X}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:X},"\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:ae.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:ae.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:ae.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:ae.paddingXS},[`> ${z}`]:Object.assign(Object.assign(Object.assign({borderRadius:Bt},ot(ae)),dt(ae)),{[`${z}-item, ${z}-submenu > ${z}-submenu-title`]:{borderRadius:W},[`${z}-submenu-title::after`]:{transition:`transform ${pe} ${ne}`}})}}),dt(ae)),{[`&-inline-collapsed ${z}-submenu-arrow,
|
|
|
&-inline ${z}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${vt})`},"&::after":{transform:`rotate(45deg) translateX(-${vt})`}},[`${z}-submenu-open${z}-submenu-inline > ${z}-submenu-title > ${z}-submenu-arrow`]:{transform:`translateY(-${_t*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${vt})`},"&::before":{transform:`rotate(45deg) translateX(${vt})`}}})},{[`${Z}-layout-header`]:{[z]:{lineHeight:"inherit"}}}]};var Ht=(ae,Z)=>(0,et.Z)("Menu",he=>{if(Z===!1)return[];const{colorBgElevated:pe,colorPrimary:Ne,colorTextLightSolid:ne,controlHeightLG:ie,fontSize:Je,darkItemColor:tt,darkDangerItemColor:at,darkItemBg:Mt,darkSubMenuItemBg:Bt,darkItemSelectedColor:W,darkItemSelectedBg:_t,darkDangerItemSelectedBg:vt,darkItemHoverBg:N,darkGroupTitleColor:X,darkItemHoverColor:fe,darkItemDisabledColor:De,darkDangerItemHoverColor:Me,darkDangerItemSelectedColor:pt,darkDangerItemActiveBg:Yt}=he,Wt=Je/7*5,Dt=(0,j.TS)(he,{menuArrowSize:Wt,menuHorizontalHeight:ie*1.15,menuArrowOffset:`${Wt*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:pe}),lr=(0,j.TS)(Dt,{itemColor:tt,itemHoverColor:fe,groupTitleColor:X,itemSelectedColor:W,itemBg:Mt,popupBg:Mt,subMenuItemBg:Bt,itemActiveBg:"transparent",itemSelectedBg:_t,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:N,itemDisabledColor:De,dangerItemColor:at,dangerItemHoverColor:Me,dangerItemSelectedColor:pt,dangerItemActiveBg:Yt,dangerItemSelectedBg:vt,menuSubMenuBg:Bt,horizontalItemSelectedColor:ne,horizontalItemSelectedBg:Ne});return[Ft(Dt),Xe(Dt),ue(Dt),Oe(Dt,"light"),Oe(lr,"dark"),Se(Dt),(0,lt.Z)(Dt),(0,ye.oN)(Dt,"slide-up"),(0,ye.oN)(Dt,"slide-down"),(0,xe._y)(Dt,"zoom-big")]},he=>{const{colorPrimary:pe,colorError:Ne,colorTextDisabled:ne,colorErrorBg:ie,colorText:Je,colorTextDescription:tt,colorBgContainer:at,colorFillAlter:Mt,colorFillContent:Bt,lineWidth:W,lineWidthBold:_t,controlItemBgActive:vt,colorBgTextHover:N,controlHeightLG:X,lineHeight:fe,colorBgElevated:De,marginXXS:Me,padding:pt,fontSize:Yt,controlHeightSM:Wt,fontSizeLG:Dt,colorTextLightSolid:lr,colorErrorHover:nr}=he,Ct=new de.C(lr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:he.zIndexPopupBase+50,radiusItem:he.borderRadiusLG,itemBorderRadius:he.borderRadiusLG,radiusSubMenuItem:he.borderRadiusSM,subMenuItemBorderRadius:he.borderRadiusSM,colorItemText:Je,itemColor:Je,colorItemTextHover:Je,itemHoverColor:Je,colorItemTextHoverHorizontal:pe,horizontalItemHoverColor:pe,colorGroupTitle:tt,groupTitleColor:tt,colorItemTextSelected:pe,itemSelectedColor:pe,colorItemTextSelectedHorizontal:pe,horizontalItemSelectedColor:pe,colorItemBg:at,itemBg:at,colorItemBgHover:N,itemHoverBg:N,colorItemBgActive:Bt,itemActiveBg:vt,colorSubItemBg:Mt,subMenuItemBg:Mt,colorItemBgSelected:vt,itemSelectedBg:vt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:_t,activeBarHeight:_t,colorActiveBarBorderSize:W,activeBarBorderWidth:W,colorItemTextDisabled:ne,itemDisabledColor:ne,colorDangerItemText:Ne,dangerItemColor:Ne,colorDangerItemTextHover:Ne,dangerItemHoverColor:Ne,colorDangerItemTextSelected:Ne,dangerItemSelectedColor:Ne,colorDangerItemBgActive:ie,dangerItemActiveBg:ie,colorDangerItemBgSelected:ie,dangerItemSelectedBg:ie,itemMarginInline:he.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:X,groupTitleLineHeight:fe,collapsedWidth:X*2,popupBg:De,itemMarginBlock:Me,itemPaddingInline:pt,horizontalLineHeight:`${X*1.15}px`,iconSize:Yt,iconMarginInlineEnd:Wt-Yt,collapsedIconSize:Dt,groupTitleFontSize:Yt,darkItemDisabledColor:new de.C(lr).setAlpha(.25).toRgbString(),darkItemColor:Ct,darkDangerItemColor:Ne,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:lr,darkItemSelectedBg:pe,darkDangerItemSelectedBg:Ne,darkItemHoverBg:"transparent",darkGroupTitleColor:Ct,darkItemHoverColor:lr,darkDangerItemHoverColor:nr,darkDangerItemSelectedColor:lr,darkDangerItemActiveBg:Ne}},{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"]]})(ae),St=function(ae,Z){var z={};for(var he in ae)Object.prototype.hasOwnProperty.call(ae,he)&&Z.indexOf(he)<0&&(z[he]=ae[he]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,he=Object.getOwnPropertySymbols(ae);pe<he.length;pe++)Z.indexOf(he[pe])<0&&Object.prototype.propertyIsEnumerable.call(ae,he[pe])&&(z[he[pe]]=ae[he[pe]]);return z},zt=(0,U.forwardRef)((ae,Z)=>{var z,he;const pe=U.useContext(K.Z),Ne=pe||{},{getPrefixCls:ne,getPopupContainer:ie,direction:Je,menu:tt}=U.useContext(Y.E_),at=ne(),{prefixCls:Mt,className:Bt,style:W,theme:_t="light",expandIcon:vt,_internalDisableMenuItemTitleTooltip:N,inlineCollapsed:X,siderCollapsed:fe,items:De,children:Me,rootClassName:pt,mode:Yt,selectable:Wt,onClick:Dt,overflowedIndicatorPopupClassName:lr}=ae,nr=St(ae,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Ct=(0,je.Z)(nr,["collapsedWidth"]),gr=We(De)||Me;(z=Ne.validator)===null||z===void 0||z.call(Ne,{mode:Yt});const pr=(0,_e.useEvent)(function(){var cr;Dt==null||Dt.apply(void 0,arguments),(cr=Ne.onClick)===null||cr===void 0||cr.call(Ne)}),wr=Ne.mode||Yt,rn=Wt!=null?Wt:Ne.selectable,ir=U.useMemo(()=>fe!==void 0?fe:X,[X,fe]),an={horizontal:{motionName:`${at}-slide-up`},inline:(0,O.Z)(at),other:{motionName:`${at}-zoom-big`}},jt=ne("menu",Mt||Ne.prefixCls),[un,jr]=Ht(jt,!pe),pn=H()(`${jt}-${_t}`,tt==null?void 0:tt.className,Bt);let qr;if(typeof vt=="function")qr=vt;else if(vt===null||vt===!1)qr=null;else if(Ne.expandIcon===null||Ne.expandIcon===!1)qr=null;else{const cr=vt!=null?vt:Ne.expandIcon;qr=(0,R.Tm)(cr,{className:H()(`${jt}-submenu-expand-icon`,(0,R.l$)(cr)?(he=cr.props)===null||he===void 0?void 0:he.className:"")})}const Sr=U.useMemo(()=>({prefixCls:jt,inlineCollapsed:ir||!1,direction:Je,firstLevel:!0,theme:_t,mode:wr,disableMenuItemTitleTooltip:N}),[jt,ir,Je,N,_t]);return un(U.createElement(K.Z.Provider,{value:null},U.createElement(yt.Provider,{value:Sr},U.createElement(D.ZP,Object.assign({getPopupContainer:ie,overflowedIndicator:U.createElement(Ee.Z,null),overflowedIndicatorPopupClassName:H()(jt,`${jt}-${_t}`,lr),mode:wr,selectable:rn,onClick:pr},Ct,{inlineCollapsed:ir,style:Object.assign(Object.assign({},tt==null?void 0:tt.style),W),className:pn,prefixCls:jt,direction:Je,defaultMotions:an,expandIcon:qr,ref:Z,rootClassName:H()(pt,jr)}),gr))))});const tr=(0,U.forwardRef)((ae,Z)=>{const z=(0,U.useRef)(null),he=U.useContext(V.D);return(0,U.useImperativeHandle)(Z,()=>({menu:z.current,focus:pe=>{var Ne;(Ne=z.current)===null||Ne===void 0||Ne.focus(pe)}})),U.createElement(zt,Object.assign({ref:z},ae,he))});tr.Item=qe,tr.SubMenu=Nt,tr.Divider=_,tr.ItemGroup=D.BW;var Lt=tr},5112:function(yr,bt,w){"use strict";w.d(bt,{ZP:function(){return Se}});var D=w(92310),U=w.n(D),V=w(18929),He=w(26112),H=w(59301),Y=w(36355),me=w(19716);const S=H.createContext(null),_=S.Provider;var Ue=S;const je=H.createContext(null),A=je.Provider;var R=w(5630),ze=w(8654),yt=w(1684),gt=w(32441),qe=w(17313),Re=w(83116),Nt=w(37613);const Ee=be=>{const{componentCls:q,antCls:Oe}=be,Ae=`${q}-group`;return{[Ae]:Object.assign(Object.assign({},(0,qe.Wf)(be)),{display:"inline-block",fontSize:0,[`&${Ae}-rtl`]:{direction:"rtl"},[`${Oe}-badge ${Oe}-badge-count`]:{zIndex:1},[`> ${Oe}-badge:not(:first-child) > ${Oe}-button-wrapper`]:{borderInlineStart:"none"}})}},_e=be=>{const{componentCls:q,wrapperMarginInlineEnd:Oe,colorPrimary:Ae,radioSize:Le,motionDurationSlow:ue,motionDurationMid:ot,motionEaseInOutCirc:dt,colorBgContainer:Ft,colorBorder:Ht,lineWidth:St,dotSize:Jt,colorBgContainerDisabled:zt,colorTextDisabled:tr,paddingXS:Lt,dotColorDisabled:ae,lineType:Z,radioDotDisabledSize:z,wireframe:he,colorWhite:pe}=be,Ne=`${q}-inner`;return{[`${q}-wrapper`]:Object.assign(Object.assign({},(0,qe.Wf)(be)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Oe,cursor:"pointer",[`&${q}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:be.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${q}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${St}px ${Z} ${Ae}`,borderRadius:"50%",visibility:"hidden",content:'""'},[q]:Object.assign(Object.assign({},(0,qe.Wf)(be)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${q}-wrapper:hover &,
|
|
|
&:hover ${Ne}`]:{borderColor:Ae},[`${q}-input:focus-visible + ${Ne}`]:Object.assign({},(0,qe.oN)(be)),[`${q}:hover::after, ${q}-wrapper:hover &::after`]:{visibility:"visible"},[`${q}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Le,height:Le,marginBlockStart:Le/-2,marginInlineStart:Le/-2,backgroundColor:he?Ae:pe,borderBlockStart:0,borderInlineStart:0,borderRadius:Le,transform:"scale(0)",opacity:0,transition:`all ${ue} ${dt}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Le,height:Le,backgroundColor:Ft,borderColor:Ht,borderStyle:"solid",borderWidth:St,borderRadius:"50%",transition:`all ${ot}`},[`${q}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${q}-checked`]:{[Ne]:{borderColor:Ae,backgroundColor:he?Ft:Ae,"&::after":{transform:`scale(${Jt/Le})`,opacity:1,transition:`all ${ue} ${dt}`}}},[`${q}-disabled`]:{cursor:"not-allowed",[Ne]:{backgroundColor:zt,borderColor:Ht,cursor:"not-allowed","&::after":{backgroundColor:ae}},[`${q}-input`]:{cursor:"not-allowed"},[`${q}-disabled + span`]:{color:tr,cursor:"not-allowed"},[`&${q}-checked`]:{[Ne]:{"&::after":{transform:`scale(${z/Le})`}}}},[`span${q} + *`]:{paddingInlineStart:Lt,paddingInlineEnd:Lt}})}},O=be=>{const{buttonColor:q,controlHeight:Oe,componentCls:Ae,lineWidth:Le,lineType:ue,colorBorder:ot,motionDurationSlow:dt,motionDurationMid:Ft,buttonPaddingInline:Ht,fontSize:St,buttonBg:Jt,fontSizeLG:zt,controlHeightLG:tr,controlHeightSM:Lt,paddingXS:ae,borderRadius:Z,borderRadiusSM:z,borderRadiusLG:he,buttonCheckedBg:pe,buttonSolidCheckedColor:Ne,colorTextDisabled:ne,colorBgContainerDisabled:ie,buttonCheckedBgDisabled:Je,buttonCheckedColorDisabled:tt,colorPrimary:at,colorPrimaryHover:Mt,colorPrimaryActive:Bt,buttonSolidCheckedBg:W,buttonSolidCheckedHoverBg:_t,buttonSolidCheckedActiveBg:vt}=be;return{[`${Ae}-button-wrapper`]:{position:"relative",display:"inline-block",height:Oe,margin:0,paddingInline:Ht,paddingBlock:0,color:q,fontSize:St,lineHeight:`${Oe-Le*2}px`,background:Jt,border:`${Le}px ${ue} ${ot}`,borderBlockStartWidth:Le+.02,borderInlineStartWidth:0,borderInlineEndWidth:Le,cursor:"pointer",transition:[`color ${Ft}`,`background ${Ft}`,`box-shadow ${Ft}`].join(","),a:{color:q},[`> ${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 ${dt}`,content:'""'}},"&:first-child":{borderInlineStart:`${Le}px ${ue} ${ot}`,borderStartStartRadius:Z,borderEndStartRadius:Z},"&:last-child":{borderStartEndRadius:Z,borderEndEndRadius:Z},"&:first-child:last-child":{borderRadius:Z},[`${Ae}-group-large &`]:{height:tr,fontSize:zt,lineHeight:`${tr-Le*2}px`,"&:first-child":{borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he}},[`${Ae}-group-small &`]:{height:Lt,paddingInline:ae-Le,paddingBlock:0,lineHeight:`${Lt-Le*2}px`,"&:first-child":{borderStartStartRadius:z,borderEndStartRadius:z},"&:last-child":{borderStartEndRadius:z,borderEndEndRadius:z}},"&:hover":{position:"relative",color:at},"&:has(:focus-visible)":Object.assign({},(0,qe.oN)(be)),[`${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:at,background:pe,borderColor:at,"&::before":{backgroundColor:at},"&:first-child":{borderColor:at},"&:hover":{color:Mt,borderColor:Mt,"&::before":{backgroundColor:Mt}},"&:active":{color:Bt,borderColor:Bt,"&::before":{backgroundColor:Bt}}},[`${Ae}-group-solid &-checked:not(${Ae}-button-wrapper-disabled)`]:{color:Ne,background:W,borderColor:W,"&:hover":{color:Ne,background:_t,borderColor:_t},"&:active":{color:Ne,background:vt,borderColor:vt}},"&-disabled":{color:ne,backgroundColor:ie,borderColor:ot,cursor:"not-allowed","&:first-child, &:hover":{color:ne,backgroundColor:ie,borderColor:ot}},[`&-disabled${Ae}-button-wrapper-checked`]:{color:tt,backgroundColor:Je,borderColor:ot,boxShadow:"none"}}}},K=be=>be-4*2;var Q=(0,Re.Z)("Radio",be=>{const{controlOutline:q,controlOutlineWidth:Oe,radioSize:Ae}=be,Le=`0 0 0 ${Oe}px ${q}`,ue=Le,ot=K(Ae),dt=(0,Nt.TS)(be,{radioDotDisabledSize:ot,radioFocusShadow:Le,radioButtonFocusShadow:ue});return[Ee(dt),_e(dt),O(dt)]},be=>{const{wireframe:q,padding:Oe,marginXS:Ae,lineWidth:Le,fontSizeLG:ue,colorText:ot,colorBgContainer:dt,colorTextDisabled:Ft,controlItemBgActiveDisabled:Ht,colorTextLightSolid:St,colorPrimary:Jt,colorPrimaryHover:zt,colorPrimaryActive:tr}=be,Lt=4,ae=ue,Z=q?K(ae):ae-(Lt+Le)*2;return{radioSize:ae,dotSize:Z,dotColorDisabled:Ft,buttonSolidCheckedColor:St,buttonSolidCheckedBg:Jt,buttonSolidCheckedHoverBg:zt,buttonSolidCheckedActiveBg:tr,buttonBg:dt,buttonCheckedBg:dt,buttonColor:ot,buttonCheckedBgDisabled:Ht,buttonCheckedColorDisabled:Ft,buttonPaddingInline:Oe-Le,wrapperMarginInlineEnd:Ae}}),re=w(14088),We=w(4572),de=function(be,q){var Oe={};for(var Ae in be)Object.prototype.hasOwnProperty.call(be,Ae)&&q.indexOf(Ae)<0&&(Oe[Ae]=be[Ae]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,Ae=Object.getOwnPropertySymbols(be);Le<Ae.length;Le++)q.indexOf(Ae[Le])<0&&Object.prototype.propertyIsEnumerable.call(be,Ae[Le])&&(Oe[Ae[Le]]=be[Ae[Le]]);return Oe};const ut=(be,q)=>{var Oe,Ae;const Le=H.useContext(Ue),ue=H.useContext(je),{getPrefixCls:ot,direction:dt,radio:Ft}=H.useContext(Y.E_),Ht=H.useRef(null),St=(0,ze.sQ)(q,Ht),{isFormItemInput:Jt}=H.useContext(gt.aM),zt=Bt=>{var W,_t;(W=be.onChange)===null||W===void 0||W.call(be,Bt),(_t=Le==null?void 0:Le.onChange)===null||_t===void 0||_t.call(Le,Bt)},{prefixCls:tr,className:Lt,rootClassName:ae,children:Z,style:z}=be,he=de(be,["prefixCls","className","rootClassName","children","style"]),pe=ot("radio",tr),Ne=((Le==null?void 0:Le.optionType)||ue)==="button",ne=Ne?`${pe}-button`:pe,[ie,Je]=Q(pe),tt=Object.assign({},he),at=H.useContext(yt.Z);Le&&(tt.name=Le.name,tt.onChange=zt,tt.checked=be.value===Le.value,tt.disabled=(Oe=tt.disabled)!==null&&Oe!==void 0?Oe:Le.disabled),tt.disabled=(Ae=tt.disabled)!==null&&Ae!==void 0?Ae:at;const Mt=U()(`${ne}-wrapper`,{[`${ne}-wrapper-checked`]:tt.checked,[`${ne}-wrapper-disabled`]:tt.disabled,[`${ne}-wrapper-rtl`]:dt==="rtl",[`${ne}-wrapper-in-form-item`]:Jt},Ft==null?void 0:Ft.className,Lt,ae,Je);return ie(H.createElement(re.Z,{component:"Radio",disabled:tt.disabled},H.createElement("label",{className:Mt,style:Object.assign(Object.assign({},Ft==null?void 0:Ft.style),z),onMouseEnter:be.onMouseEnter,onMouseLeave:be.onMouseLeave},H.createElement(R.Z,Object.assign({},tt,{className:U()(tt.className,!Ne&&We.A),type:"radio",prefixCls:ne,ref:St})),Z!==void 0?H.createElement("span",null,Z):null)))};var ye=H.forwardRef(ut);const xe=H.forwardRef((be,q)=>{const{getPrefixCls:Oe,direction:Ae}=H.useContext(Y.E_),[Le,ue]=(0,V.Z)(be.defaultValue,{value:be.value}),ot=W=>{const _t=Le,vt=W.target.value;"value"in be||ue(vt);const{onChange:N}=be;N&&vt!==_t&&N(W)},{prefixCls:dt,className:Ft,rootClassName:Ht,options:St,buttonStyle:Jt="outline",disabled:zt,children:tr,size:Lt,style:ae,id:Z,onMouseEnter:z,onMouseLeave:he,onFocus:pe,onBlur:Ne}=be,ne=Oe("radio",dt),ie=`${ne}-group`,[Je,tt]=Q(ne);let at=tr;St&&St.length>0&&(at=St.map(W=>typeof W=="string"||typeof W=="number"?H.createElement(ye,{key:W.toString(),prefixCls:ne,disabled:zt,value:W,checked:Le===W},W):H.createElement(ye,{key:`radio-group-value-options-${W.value}`,prefixCls:ne,disabled:W.disabled||zt,value:W.value,checked:Le===W.value,title:W.title,style:W.style},W.label)));const Mt=(0,me.Z)(Lt),Bt=U()(ie,`${ie}-${Jt}`,{[`${ie}-${Mt}`]:Mt,[`${ie}-rtl`]:Ae==="rtl"},Ft,Ht,tt);return Je(H.createElement("div",Object.assign({},(0,He.Z)(be,{aria:!0,data:!0}),{className:Bt,style:ae,onMouseEnter:z,onMouseLeave:he,onFocus:pe,onBlur:Ne,id:Z,ref:q}),H.createElement(_,{value:{onChange:ot,value:Le,disabled:be.disabled,name:be.name,optionType:be.optionType}},at)))});var et=H.memo(xe),j=function(be,q){var Oe={};for(var Ae in be)Object.prototype.hasOwnProperty.call(be,Ae)&&q.indexOf(Ae)<0&&(Oe[Ae]=be[Ae]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,Ae=Object.getOwnPropertySymbols(be);Le<Ae.length;Le++)q.indexOf(Ae[Le])<0&&Object.prototype.propertyIsEnumerable.call(be,Ae[Le])&&(Oe[Ae[Le]]=be[Ae[Le]]);return Oe};const Fe=(be,q)=>{const{getPrefixCls:Oe}=H.useContext(Y.E_),{prefixCls:Ae}=be,Le=j(be,["prefixCls"]),ue=Oe("radio",Ae);return H.createElement(A,{value:"button"},H.createElement(ye,Object.assign({prefixCls:ue},Le,{type:"radio",ref:q})))};var Xe=H.forwardRef(Fe);const F=ye;F.Button=Xe,F.Group=et,F.__ANT_RADIO=!0;var Se=F},8378:function(yr,bt){"use strict";const w=D=>({[D.componentCls]:{[`${D.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${D.motionDurationMid} ${D.motionEaseInOut},
|
|
|
opacity ${D.motionDurationMid} ${D.motionEaseInOut} !important`}},[`${D.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${D.motionDurationMid} ${D.motionEaseInOut},
|
|
|
opacity ${D.motionDurationMid} ${D.motionEaseInOut} !important`}}});bt.Z=w},92899:function(yr,bt,w){"use strict";w.d(bt,{Fm:function(){return A}});var D=w(36237),U=w(95406);const V=new D.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),He=new D.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 D.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Y=new D.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),me=new D.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 D.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 D.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ue=new D.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:Ue},"move-down":{inKeyframes:V,outKeyframes:He},"move-left":{inKeyframes:H,outKeyframes:Y},"move-right":{inKeyframes:me,outKeyframes:S}},A=(R,ze)=>{const{antCls:yt}=R,gt=`${yt}-${ze}`,{inKeyframes:qe,outKeyframes:Re}=je[ze];return[(0,U.R)(gt,qe,Re,R.motionDurationMid),{[`
|
|
|
${gt}-enter,
|
|
|
${gt}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:R.motionEaseOutCirc},[`${gt}-leave`]:{animationTimingFunction:R.motionEaseInOutCirc}}]}},13826:function(yr,bt,w){"use strict";w.d(bt,{Qt:function(){return H},Uw:function(){return He},fJ:function(){return V},ly:function(){return Y},oN:function(){return A}});var D=w(36237),U=w(95406);const V=new D.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),He=new D.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),H=new D.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Y=new D.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),me=new D.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),S=new D.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),_=new D.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Ue=new D.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:V,outKeyframes:He},"slide-down":{inKeyframes:H,outKeyframes:Y},"slide-left":{inKeyframes:me,outKeyframes:S},"slide-right":{inKeyframes:_,outKeyframes:Ue}},A=(R,ze)=>{const{antCls:yt}=R,gt=`${yt}-${ze}`,{inKeyframes:qe,outKeyframes:Re}=je[ze];return[(0,U.R)(gt,qe,Re,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(yr,bt,w){"use strict";w.d(bt,{default:function(){return jn}});var D=w(99267),U=w(18785),V=w(62772),He=w(92310),H=w.n(He),Y=w(54476),me=w(20068),S=w(33885),_=w(42978),Ue=w(76190),je=w(75931),A=w(59301),R=w(49658),ze=w(18929),yt=w(77900),gt=(0,A.createContext)(null),qe=A.forwardRef(function(C,L){var Be=C.prefixCls,Pe=C.className,Te=C.style,Ke=C.id,xt=C.active,nt=C.tabKey,It=C.children;return A.createElement("div",{id:Ke&&"".concat(Ke,"-panel-").concat(nt),role:"tabpanel",tabIndex:xt?0:-1,"aria-labelledby":Ke&&"".concat(Ke,"-tab-").concat(nt),"aria-hidden":!xt,style:Te,className:H()(Be,xt&&"".concat(Be,"-active"),Pe),ref:L},It)}),Re=qe,Nt=["key","forceRender","style","className"];function Ee(C){var L=C.id,Be=C.activeKey,Pe=C.animated,Te=C.tabPosition,Ke=C.destroyInactiveTabPane,xt=A.useContext(gt),nt=xt.prefixCls,It=xt.tabs,Pt=Pe.tabPane,ur="".concat(nt,"-tabpane");return A.createElement("div",{className:H()("".concat(nt,"-content-holder"))},A.createElement("div",{className:H()("".concat(nt,"-content"),"".concat(nt,"-content-").concat(Te),(0,me.Z)({},"".concat(nt,"-content-animated"),Pt))},It.map(function($t){var At=$t.key,ge=$t.forceRender,Mr=$t.style,Nr=$t.className,Cr=(0,je.Z)($t,Nt),vr=At===Be;return A.createElement(yt.default,(0,Y.Z)({key:At,visible:vr,forceRender:ge,removeOnLeave:!!Ke,leavedClassName:"".concat(ur,"-hidden")},Pe.tabPaneMotion),function(Fr,br){var Vr=Fr.style,oe=Fr.className;return A.createElement(Re,(0,Y.Z)({},Cr,{prefixCls:ur,id:L,tabKey:At,animated:Pt,active:vr,style:(0,S.Z)((0,S.Z)({},Mr),Vr),className:H()(Nr,oe),ref:br}))})})))}var _e=w(94480),O=w(29301),K=w(6089),Q=w(8654),re={width:0,height:0,left:0,top:0};function We(C,L,Be){return(0,A.useMemo)(function(){for(var Pe,Te=new Map,Ke=L.get((Pe=C[0])===null||Pe===void 0?void 0:Pe.key)||re,xt=Ke.left+Ke.width,nt=0;nt<C.length;nt+=1){var It=C[nt].key,Pt=L.get(It);if(!Pt){var ur;Pt=L.get((ur=C[nt-1])===null||ur===void 0?void 0:ur.key)||re}var $t=Te.get(It)||(0,S.Z)({},Pt);$t.right=xt-$t.left-$t.width,Te.set(It,$t)}return Te},[C.map(function(Pe){return Pe.key}).join("_"),L,Be])}function de(C,L){var Be=A.useRef(C),Pe=A.useState({}),Te=(0,_.Z)(Pe,2),Ke=Te[1];function xt(nt){var It=typeof nt=="function"?nt(Be.current):nt;It!==Be.current&&L(It,Be.current),Be.current=It,Ke({})}return[Be.current,xt]}var ut=.1,lt=.01,ye=20,xe=Math.pow(.995,ye);function et(C,L){var Be=(0,A.useState)(),Pe=(0,_.Z)(Be,2),Te=Pe[0],Ke=Pe[1],xt=(0,A.useState)(0),nt=(0,_.Z)(xt,2),It=nt[0],Pt=nt[1],ur=(0,A.useState)(0),$t=(0,_.Z)(ur,2),At=$t[0],ge=$t[1],Mr=(0,A.useState)(),Nr=(0,_.Z)(Mr,2),Cr=Nr[0],vr=Nr[1],Fr=(0,A.useRef)();function br(G){var le=G.touches[0],ce=le.screenX,Ie=le.screenY;Ke({x:ce,y:Ie}),window.clearInterval(Fr.current)}function Vr(G){if(Te){G.preventDefault();var le=G.touches[0],ce=le.screenX,Ie=le.screenY;Ke({x:ce,y:Ie});var st=ce-Te.x,ct=Ie-Te.y;L(st,ct);var Ut=Date.now();Pt(Ut),ge(Ut-It),vr({x:st,y:ct})}}function oe(){if(Te&&(Ke(null),vr(null),Cr)){var G=Cr.x/At,le=Cr.y/At,ce=Math.abs(G),Ie=Math.abs(le);if(Math.max(ce,Ie)<ut)return;var st=G,ct=le;Fr.current=window.setInterval(function(){if(Math.abs(st)<lt&&Math.abs(ct)<lt){window.clearInterval(Fr.current);return}st*=xe,ct*=xe,L(st*ye,ct*ye)},ye)}}var J=(0,A.useRef)();function ve(G){var le=G.deltaX,ce=G.deltaY,Ie=0,st=Math.abs(le),ct=Math.abs(ce);st===ct?Ie=J.current==="x"?le:ce:st>ct?(Ie=le,J.current="x"):(Ie=ce,J.current="y"),L(-Ie,-Ie)&&G.preventDefault()}var we=(0,A.useRef)(null);we.current={onTouchStart:br,onTouchMove:Vr,onTouchEnd:oe,onWheel:ve},A.useEffect(function(){function G(st){we.current.onTouchStart(st)}function le(st){we.current.onTouchMove(st)}function ce(st){we.current.onTouchEnd(st)}function Ie(st){we.current.onWheel(st)}return document.addEventListener("touchmove",le,{passive:!1}),document.addEventListener("touchend",ce,{passive:!1}),C.current.addEventListener("touchstart",G,{passive:!1}),C.current.addEventListener("wheel",Ie),function(){document.removeEventListener("touchmove",le),document.removeEventListener("touchend",ce)}},[])}var j=w(34280);function Fe(C){var L=(0,A.useState)(0),Be=(0,_.Z)(L,2),Pe=Be[0],Te=Be[1],Ke=(0,A.useRef)(0),xt=(0,A.useRef)();return xt.current=C,(0,j.o)(function(){var nt;(nt=xt.current)===null||nt===void 0||nt.call(xt)},[Pe]),function(){Ke.current===Pe&&(Ke.current+=1,Te(Ke.current))}}function Xe(C){var L=(0,A.useRef)([]),Be=(0,A.useState)({}),Pe=(0,_.Z)(Be,2),Te=Pe[1],Ke=(0,A.useRef)(typeof C=="function"?C():C),xt=Fe(function(){var It=Ke.current;L.current.forEach(function(Pt){It=Pt(It)}),L.current=[],Ke.current=It,Te({})});function nt(It){L.current.push(It),xt()}return[Ke.current,nt]}var F={width:0,height:0,left:0,top:0,right:0};function Se(C,L,Be,Pe,Te,Ke,xt){var nt=xt.tabs,It=xt.tabPosition,Pt=xt.rtl,ur,$t,At;return["top","bottom"].includes(It)?(ur="width",$t=Pt?"right":"left",At=Math.abs(Be)):(ur="height",$t="top",At=-Be),(0,A.useMemo)(function(){if(!nt.length)return[0,0];for(var ge=nt.length,Mr=ge,Nr=0;Nr<ge;Nr+=1){var Cr=C.get(nt[Nr].key)||F;if(Cr[$t]+Cr[ur]>At+L){Mr=Nr-1;break}}for(var vr=0,Fr=ge-1;Fr>=0;Fr-=1){var br=C.get(nt[Fr].key)||F;if(br[$t]<At){vr=Fr+1;break}}return vr>=Mr?[0,0]:[vr,Mr]},[C,L,Pe,Te,Ke,At,It,nt.map(function(ge){return ge.key}).join("_"),Pt])}function be(C){var L;return C instanceof Map?(L={},C.forEach(function(Be,Pe){L[Pe]=Be})):L=C,JSON.stringify(L)}var q="TABS_DQ";function Oe(C){return String(C).replace(/"/g,q)}function Ae(C,L,Be,Pe){return!(!Be||Pe||C===!1||C===void 0&&(L===!1||L===null))}function Le(C,L){var Be=C.prefixCls,Pe=C.editable,Te=C.locale,Ke=C.style;return!Pe||Pe.showAdd===!1?null:A.createElement("button",{ref:L,type:"button",className:"".concat(Be,"-nav-add"),style:Ke,"aria-label":(Te==null?void 0:Te.addAriaLabel)||"Add tab",onClick:function(nt){Pe.onEdit("add",{event:nt})}},Pe.addIcon||"+")}var ue=A.forwardRef(Le),ot=A.forwardRef(function(C,L){var Be=C.position,Pe=C.prefixCls,Te=C.extra;if(!Te)return null;var Ke,xt={};return(0,Ue.Z)(Te)==="object"&&!A.isValidElement(Te)?xt=Te:xt.right=Te,Be==="right"&&(Ke=xt.right),Be==="left"&&(Ke=xt.left),Ke?A.createElement("div",{className:"".concat(Pe,"-extra-content"),ref:L},Ke):null}),dt=ot,Ft=w(31561),Ht=w(15285),St=w(10228);function Jt(C,L){var Be=C.prefixCls,Pe=C.id,Te=C.tabs,Ke=C.locale,xt=C.mobile,nt=C.moreIcon,It=nt===void 0?"More":nt,Pt=C.moreTransitionName,ur=C.style,$t=C.className,At=C.editable,ge=C.tabBarGutter,Mr=C.rtl,Nr=C.removeAriaLabel,Cr=C.onTabClick,vr=C.getPopupContainer,Fr=C.popupClassName,br=(0,A.useState)(!1),Vr=(0,_.Z)(br,2),oe=Vr[0],J=Vr[1],ve=(0,A.useState)(null),we=(0,_.Z)(ve,2),G=we[0],le=we[1],ce="".concat(Pe,"-more-popup"),Ie="".concat(Be,"-dropdown"),st=G!==null?"".concat(ce,"-").concat(G):null,ct=Ke==null?void 0:Ke.dropdownAriaLabel;function Ut(Gt,qt){Gt.preventDefault(),Gt.stopPropagation(),At.onEdit("remove",{key:qt,event:Gt})}var ar=A.createElement(Ht.ZP,{onClick:function(qt){var Vt=qt.key,Xt=qt.domEvent;Cr(Vt,Xt),J(!1)},prefixCls:"".concat(Ie,"-menu"),id:ce,tabIndex:-1,role:"listbox","aria-activedescendant":st,selectedKeys:[G],"aria-label":ct!==void 0?ct:"expanded dropdown"},Te.map(function(Gt){var qt=Gt.closable,Vt=Gt.disabled,Xt=Gt.closeIcon,Qt=Gt.key,sr=Gt.label,Pr=Ae(qt,Xt,At,Vt);return A.createElement(Ht.sN,{key:Qt,id:"".concat(ce,"-").concat(Qt),role:"option","aria-controls":Pe&&"".concat(Pe,"-panel-").concat(Qt),disabled:Vt},A.createElement("span",null,sr),Pr&&A.createElement("button",{type:"button","aria-label":Nr||"remove",tabIndex:0,className:"".concat(Ie,"-menu-item-remove"),onClick:function(Kt){Kt.stopPropagation(),Ut(Kt,Qt)}},Xt||At.removeIcon||"\xD7"))}));function xr(Gt){for(var qt=Te.filter(function(Pr){return!Pr.disabled}),Vt=qt.findIndex(function(Pr){return Pr.key===G})||0,Xt=qt.length,Qt=0;Qt<Xt;Qt+=1){Vt=(Vt+Gt+Xt)%Xt;var sr=qt[Vt];if(!sr.disabled){le(sr.key);return}}}function dr(Gt){var qt=Gt.which;if(!oe){[St.Z.DOWN,St.Z.SPACE,St.Z.ENTER].includes(qt)&&(J(!0),Gt.preventDefault());return}switch(qt){case St.Z.UP:xr(-1),Gt.preventDefault();break;case St.Z.DOWN:xr(1),Gt.preventDefault();break;case St.Z.ESC:J(!1);break;case St.Z.SPACE:case St.Z.ENTER:G!==null&&Cr(G,Gt);break}}(0,A.useEffect)(function(){var Gt=document.getElementById(st);Gt&&Gt.scrollIntoView&&Gt.scrollIntoView(!1)},[G]),(0,A.useEffect)(function(){oe||le(null)},[oe]);var or=(0,me.Z)({},Mr?"marginRight":"marginLeft",ge);Te.length||(or.visibility="hidden",or.order=1);var $r=H()((0,me.Z)({},"".concat(Ie,"-rtl"),Mr)),Tr=xt?null:A.createElement(Ft.Z,{prefixCls:Ie,overlay:ar,trigger:["hover"],visible:Te.length?oe:!1,transitionName:Pt,onVisibleChange:J,overlayClassName:H()($r,Fr),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:vr},A.createElement("button",{type:"button",className:"".concat(Be,"-nav-more"),style:or,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":ce,id:"".concat(Pe,"-more"),"aria-expanded":oe,onKeyDown:dr},It));return A.createElement("div",{className:H()("".concat(Be,"-nav-operations"),$t),style:ur,ref:L},Tr,A.createElement(ue,{prefixCls:Be,locale:Ke,editable:At}))}var zt=A.memo(A.forwardRef(Jt),function(C,L){return L.tabMoving});function tr(C){var L,Be=C.prefixCls,Pe=C.id,Te=C.active,Ke=C.tab,xt=Ke.key,nt=Ke.label,It=Ke.disabled,Pt=Ke.closeIcon,ur=C.closable,$t=C.renderWrapper,At=C.removeAriaLabel,ge=C.editable,Mr=C.onClick,Nr=C.onFocus,Cr=C.style,vr="".concat(Be,"-tab"),Fr=Ae(ur,Pt,ge,It);function br(J){It||Mr(J)}function Vr(J){J.preventDefault(),J.stopPropagation(),ge.onEdit("remove",{key:xt,event:J})}var oe=A.createElement("div",{key:xt,"data-node-key":Oe(xt),className:H()(vr,(L={},(0,me.Z)(L,"".concat(vr,"-with-remove"),Fr),(0,me.Z)(L,"".concat(vr,"-active"),Te),(0,me.Z)(L,"".concat(vr,"-disabled"),It),L)),style:Cr,onClick:br},A.createElement("div",{role:"tab","aria-selected":Te,id:Pe&&"".concat(Pe,"-tab-").concat(xt),className:"".concat(vr,"-btn"),"aria-controls":Pe&&"".concat(Pe,"-panel-").concat(xt),"aria-disabled":It,tabIndex:It?null:0,onClick:function(ve){ve.stopPropagation(),br(ve)},onKeyDown:function(ve){[St.Z.SPACE,St.Z.ENTER].includes(ve.which)&&(ve.preventDefault(),br(ve))},onFocus:Nr},nt),Fr&&A.createElement("button",{type:"button","aria-label":At||"remove",tabIndex:0,className:"".concat(vr,"-remove"),onClick:function(ve){ve.stopPropagation(),Vr(ve)}},Pt||ge.removeIcon||"\xD7"));return $t?$t(oe):oe}var Lt=tr,ae=w(16089),Z=function(L){var Be=L.activeTabOffset,Pe=L.horizontal,Te=L.rtl,Ke=L.indicatorSize,xt=(0,A.useState)(),nt=(0,_.Z)(xt,2),It=nt[0],Pt=nt[1],ur=(0,A.useRef)(),$t=function(Mr){return typeof Ke=="function"?Ke(Mr):typeof Ke=="number"?Ke:Mr};function At(){ae.Z.cancel(ur.current)}return(0,A.useEffect)(function(){var ge={};return Be&&(Pe?(Te?(ge.right=Be.right+Be.width/2,ge.transform="translateX(50%)"):(ge.left=Be.left+Be.width/2,ge.transform="translateX(-50%)"),ge.width=$t(Be.width)):(ge.top=Be.top+Be.height/2,ge.transform="translateY(-50%)",ge.height=$t(Be.height))),At(),ur.current=(0,ae.Z)(function(){Pt(ge)}),At},[Be,Pe,Te,Ke]),{style:It}},z=Z,he=function(L){var Be=L.current||{},Pe=Be.offsetWidth,Te=Pe===void 0?0:Pe,Ke=Be.offsetHeight,xt=Ke===void 0?0:Ke;return[Te,xt]},pe=function(L,Be){return L[Be?0:1]};function Ne(C,L){var Be,Pe=A.useContext(gt),Te=Pe.prefixCls,Ke=Pe.tabs,xt=C.className,nt=C.style,It=C.id,Pt=C.animated,ur=C.activeKey,$t=C.rtl,At=C.extra,ge=C.editable,Mr=C.locale,Nr=C.tabPosition,Cr=C.tabBarGutter,vr=C.children,Fr=C.onTabClick,br=C.onTabScroll,Vr=C.indicatorSize,oe=(0,A.useRef)(),J=(0,A.useRef)(),ve=(0,A.useRef)(),we=(0,A.useRef)(),G=(0,A.useRef)(),le=(0,A.useRef)(),ce=(0,A.useRef)(),Ie=Nr==="top"||Nr==="bottom",st=de(0,function(zr,kr){Ie&&br&&br({direction:zr>kr?"left":"right"})}),ct=(0,_.Z)(st,2),Ut=ct[0],ar=ct[1],xr=de(0,function(zr,kr){!Ie&&br&&br({direction:zr>kr?"top":"bottom"})}),dr=(0,_.Z)(xr,2),or=dr[0],$r=dr[1],Tr=(0,A.useState)([0,0]),Gt=(0,_.Z)(Tr,2),qt=Gt[0],Vt=Gt[1],Xt=(0,A.useState)([0,0]),Qt=(0,_.Z)(Xt,2),sr=Qt[0],Pr=Qt[1],mr=(0,A.useState)([0,0]),Kt=(0,_.Z)(mr,2),ht=Kt[0],rr=Kt[1],Rt=(0,A.useState)([0,0]),Er=(0,_.Z)(Rt,2),Ur=Er[0],hr=Er[1],Xr=Xe(new Map),Rr=(0,_.Z)(Xr,2),ni=Rr[0],_n=Rr[1],kn=We(Ke,ni,sr[0]),Dn=pe(qt,Ie),Un=pe(sr,Ie),on=pe(ht,Ie),mi=pe(Ur,Ie),Ci=Dn<Un+on,Ir=Ci?Dn-mi:Dn-on,Tn="".concat(Te,"-nav-operations-hidden"),Mn=0,Pn=0;Ie&&$t?(Mn=0,Pn=Math.max(0,Un-Ir)):(Mn=Math.min(0,Ir-Un),Pn=0);function gi(zr){return zr<Mn?Mn:zr>Pn?Pn:zr}var xn=(0,A.useRef)(),Gn=(0,A.useState)(),ui=(0,_.Z)(Gn,2),Ei=ui[0],qn=ui[1];function vi(){qn(Date.now())}function Gi(){window.clearTimeout(xn.current)}et(we,function(zr,kr){function fn(En,On){En(function(Nn){var oo=gi(Nn+On);return oo})}return Ci?(Ie?fn(ar,zr):fn($r,kr),Gi(),vi(),!0):!1}),(0,A.useEffect)(function(){return Gi(),Ei&&(xn.current=window.setTimeout(function(){qn(0)},100)),Gi},[Ei]);var Xn=Se(kn,Ir,Ie?Ut:or,Un,on,mi,(0,S.Z)((0,S.Z)({},C),{},{tabs:Ke})),Sa=(0,_.Z)(Xn,2),Pi=Sa[0],bi=Sa[1],$n=(0,K.Z)(function(){var zr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ur,kr=kn.get(zr)||{width:0,height:0,left:0,right:0,top:0};if(Ie){var fn=Ut;$t?kr.right<Ut?fn=kr.right:kr.right+kr.width>Ut+Ir&&(fn=kr.right+kr.width-Ir):kr.left<-Ut?fn=-kr.left:kr.left+kr.width>-Ut+Ir&&(fn=-(kr.left+kr.width-Ir)),$r(0),ar(gi(fn))}else{var En=or;kr.top<-or?En=-kr.top:kr.top+kr.height>-or+Ir&&(En=-(kr.top+kr.height-Ir)),ar(0),$r(gi(En))}}),Rn={};Nr==="top"||Nr==="bottom"?Rn[$t?"marginRight":"marginLeft"]=Cr:Rn.marginTop=Cr;var _a=Ke.map(function(zr,kr){var fn=zr.key;return A.createElement(Lt,{id:It,prefixCls:Te,key:fn,tab:zr,style:kr===0?void 0:Rn,closable:zr.closable,editable:ge,active:fn===ur,renderWrapper:vr,removeAriaLabel:Mr==null?void 0:Mr.removeAriaLabel,onClick:function(On){Fr(fn,On)},onFocus:function(){$n(fn),vi(),we.current&&($t||(we.current.scrollLeft=0),we.current.scrollTop=0)}})}),ki=function(){return _n(function(){var kr=new Map;return Ke.forEach(function(fn){var En,On=fn.key,Nn=(En=G.current)===null||En===void 0?void 0:En.querySelector('[data-node-key="'.concat(Oe(On),'"]'));Nn&&kr.set(On,{width:Nn.offsetWidth,height:Nn.offsetHeight,left:Nn.offsetLeft,top:Nn.offsetTop})}),kr})};(0,A.useEffect)(function(){ki()},[Ke.map(function(zr){return zr.key}).join("_")]);var Ri=Fe(function(){var zr=he(oe),kr=he(J),fn=he(ve);Vt([zr[0]-kr[0]-fn[0],zr[1]-kr[1]-fn[1]]);var En=he(ce);rr(En);var On=he(le);hr(On);var Nn=he(G);Pr([Nn[0]-En[0],Nn[1]-En[1]]),ki()}),yi=Ke.slice(0,Pi),Oi=Ke.slice(bi+1),Ni=[].concat((0,_e.Z)(yi),(0,_e.Z)(Oi)),Di=kn.get(ur),qi=z({activeTabOffset:Di,horizontal:Ie,rtl:$t,indicatorSize:Vr}),Fi=qi.style;(0,A.useEffect)(function(){$n()},[ur,Mn,Pn,be(Di),be(kn),Ie]),(0,A.useEffect)(function(){Ri()},[$t]);var An=!!Ni.length,di="".concat(Te,"-nav-wrap"),Jn,Yn,Cn,sa;return Ie?$t?(Yn=Ut>0,Jn=Ut!==Pn):(Jn=Ut<0,Yn=Ut!==Mn):(Cn=or<0,sa=or!==Mn),A.createElement(O.Z,{onResize:Ri},A.createElement("div",{ref:(0,Q.x1)(L,oe),role:"tablist",className:H()("".concat(Te,"-nav"),xt),style:nt,onKeyDown:function(){vi()}},A.createElement(dt,{ref:J,position:"left",extra:At,prefixCls:Te}),A.createElement(O.Z,{onResize:Ri},A.createElement("div",{className:H()(di,(Be={},(0,me.Z)(Be,"".concat(di,"-ping-left"),Jn),(0,me.Z)(Be,"".concat(di,"-ping-right"),Yn),(0,me.Z)(Be,"".concat(di,"-ping-top"),Cn),(0,me.Z)(Be,"".concat(di,"-ping-bottom"),sa),Be)),ref:we},A.createElement(O.Z,{onResize:Ri},A.createElement("div",{ref:G,className:"".concat(Te,"-nav-list"),style:{transform:"translate(".concat(Ut,"px, ").concat(or,"px)"),transition:Ei?"none":void 0}},_a,A.createElement(ue,{ref:ce,prefixCls:Te,locale:Mr,editable:ge,style:(0,S.Z)((0,S.Z)({},_a.length===0?void 0:Rn),{},{visibility:An?"hidden":null})}),A.createElement("div",{className:H()("".concat(Te,"-ink-bar"),(0,me.Z)({},"".concat(Te,"-ink-bar-animated"),Pt.inkBar)),style:Fi}))))),A.createElement(zt,(0,Y.Z)({},C,{removeAriaLabel:Mr==null?void 0:Mr.removeAriaLabel,ref:le,prefixCls:Te,tabs:Ni,className:!An&&Tn,tabMoving:!!Ei})),A.createElement(dt,{ref:ve,position:"right",extra:At,prefixCls:Te})))}var ne=A.forwardRef(Ne),ie=["renderTabBar"],Je=["label","key"];function tt(C){var L=C.renderTabBar,Be=(0,je.Z)(C,ie),Pe=A.useContext(gt),Te=Pe.tabs;if(L){var Ke=(0,S.Z)((0,S.Z)({},Be),{},{panes:Te.map(function(xt){var nt=xt.label,It=xt.key,Pt=(0,je.Z)(xt,Je);return A.createElement(Re,(0,Y.Z)({tab:nt,key:It,tabKey:It},Pt))})});return L(Ke,ne)}return A.createElement(ne,Be)}var at=w(48736);function Mt(){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,Ue.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 _t(C,L){var Be,Pe=C.id,Te=C.prefixCls,Ke=Te===void 0?"rc-tabs":Te,xt=C.className,nt=C.items,It=C.direction,Pt=C.activeKey,ur=C.defaultActiveKey,$t=C.editable,At=C.animated,ge=C.tabPosition,Mr=ge===void 0?"top":ge,Nr=C.tabBarGutter,Cr=C.tabBarStyle,vr=C.tabBarExtraContent,Fr=C.locale,br=C.moreIcon,Vr=C.moreTransitionName,oe=C.destroyInactiveTabPane,J=C.renderTabBar,ve=C.onChange,we=C.onTabClick,G=C.onTabScroll,le=C.getPopupContainer,ce=C.popupClassName,Ie=C.indicatorSize,st=(0,je.Z)(C,Bt),ct=A.useMemo(function(){return(nt||[]).filter(function(hr){return hr&&(0,Ue.Z)(hr)==="object"&&"key"in hr})},[nt]),Ut=It==="rtl",ar=Mt(At),xr=(0,A.useState)(!1),dr=(0,_.Z)(xr,2),or=dr[0],$r=dr[1];(0,A.useEffect)(function(){$r((0,R.Z)())},[]);var Tr=(0,ze.Z)(function(){var hr;return(hr=ct[0])===null||hr===void 0?void 0:hr.key},{value:Pt,defaultValue:ur}),Gt=(0,_.Z)(Tr,2),qt=Gt[0],Vt=Gt[1],Xt=(0,A.useState)(function(){return ct.findIndex(function(hr){return hr.key===qt})}),Qt=(0,_.Z)(Xt,2),sr=Qt[0],Pr=Qt[1];(0,A.useEffect)(function(){var hr=ct.findIndex(function(Rr){return Rr.key===qt});if(hr===-1){var Xr;hr=Math.max(0,Math.min(sr,ct.length-1)),Vt((Xr=ct[hr])===null||Xr===void 0?void 0:Xr.key)}Pr(hr)},[ct.map(function(hr){return hr.key}).join("_"),qt,sr]);var mr=(0,ze.Z)(null,{value:Pe}),Kt=(0,_.Z)(mr,2),ht=Kt[0],rr=Kt[1];(0,A.useEffect)(function(){Pe||(rr("rc-tabs-".concat(W)),W+=1)},[]);function Rt(hr,Xr){we==null||we(hr,Xr);var Rr=hr!==qt;Vt(hr),Rr&&(ve==null||ve(hr))}var Er={id:ht,activeKey:qt,animated:ar,tabPosition:Mr,rtl:Ut,mobile:or},Ur=(0,S.Z)((0,S.Z)({},Er),{},{editable:$t,locale:Fr,moreIcon:br,moreTransitionName:Vr,tabBarGutter:Nr,onTabClick:Rt,onTabScroll:G,extra:vr,style:Cr,panes:null,getPopupContainer:le,popupClassName:ce,indicatorSize:Ie});return A.createElement(gt.Provider,{value:{tabs:ct,prefixCls:Ke}},A.createElement("div",(0,Y.Z)({ref:L,id:Pe,className:H()(Ke,"".concat(Ke,"-").concat(Mr),(Be={},(0,me.Z)(Be,"".concat(Ke,"-mobile"),or),(0,me.Z)(Be,"".concat(Ke,"-editable"),$t),(0,me.Z)(Be,"".concat(Ke,"-rtl"),Ut),Be),xt)},st),A.createElement(tt,(0,Y.Z)({},Ur,{renderTabBar:J})),A.createElement(Ee,(0,Y.Z)({destroyInactiveTabPane:oe},Er,{animated:ar}))))}var vt=A.forwardRef(_t),N=vt,X=N,fe=w(36355),De=w(19716),pt=()=>null,Yt=w(62892);const Wt={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Dt(C){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Be;return L===!1?Be={inkBar:!1,tabPane:!1}:L===!0?Be={inkBar:!0,tabPane:!0}:Be=Object.assign({inkBar:!0},typeof L=="object"?L:{}),Be.tabPane&&(Be.tabPaneMotion=Object.assign(Object.assign({},Wt),{motionName:(0,Yt.m)(C,"switch")})),Be}var lr=w(11592),nr=function(C,L){var Be={};for(var Pe in C)Object.prototype.hasOwnProperty.call(C,Pe)&&L.indexOf(Pe)<0&&(Be[Pe]=C[Pe]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,Pe=Object.getOwnPropertySymbols(C);Te<Pe.length;Te++)L.indexOf(Pe[Te])<0&&Object.prototype.propertyIsEnumerable.call(C,Pe[Te])&&(Be[Pe[Te]]=C[Pe[Te]]);return Be};function Ct(C){return C.filter(L=>L)}function gr(C,L){if(C)return C;const Be=(0,lr.Z)(L).map(Pe=>{if(A.isValidElement(Pe)){const{key:Te,props:Ke}=Pe,xt=Ke||{},{tab:nt}=xt,It=nr(xt,["tab"]);return Object.assign(Object.assign({key:String(Te)},It),{label:nt})}return null});return Ct(Be)}var pr=w(17313),wr=w(83116),rn=w(37613),ir=w(13826),jt=C=>{const{componentCls:L,motionDurationSlow:Be}=C;return[{[L]:{[`${L}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Be}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Be}`}}}}},[(0,ir.oN)(C,"slide-up"),(0,ir.oN)(C,"slide-down")]]};const un=C=>{const{componentCls:L,tabsCardPadding:Be,cardBg:Pe,cardGutter:Te,colorBorderSecondary:Ke,itemSelectedColor:xt}=C;return{[`${L}-card`]:{[`> ${L}-nav, > div > ${L}-nav`]:{[`${L}-tab`]:{margin:0,padding:Be,background:Pe,border:`${C.lineWidth}px ${C.lineType} ${Ke}`,transition:`all ${C.motionDurationSlow} ${C.motionEaseInOut}`},[`${L}-tab-active`]:{color:xt,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:`${Te}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:`${Te}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}}}}}}},jr=C=>{const{componentCls:L,itemHoverColor:Be,dropdownEdgeChildVerticalPadding:Pe}=C;return{[`${L}-dropdown`]:Object.assign(Object.assign({},(0,pr.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({},pr.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:Be}},"&:hover":{background:C.controlItemBgHover},"&-disabled":{"&, &:hover":{color:C.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},pn=C=>{const{componentCls:L,margin:Be,colorBorderSecondary:Pe,horizontalMargin:Te,verticalItemPadding:Ke,verticalItemMargin:xt}=C;return{[`${L}-top, ${L}-bottom`]:{flexDirection:"column",[`> ${L}-nav, > div > ${L}-nav`]:{margin:Te,"&::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:`${Be}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:Ke,textAlign:"center"},[`${L}-tab + ${L}-tab`]:{margin:xt},[`${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}}}}}},qr=C=>{const{componentCls:L,cardPaddingSM:Be,cardPaddingLG:Pe,horizontalItemPaddingSM:Te,horizontalItemPaddingLG:Ke}=C;return{[L]:{"&-small":{[`> ${L}-nav`]:{[`${L}-tab`]:{padding:Te,fontSize:C.titleFontSizeSM}}},"&-large":{[`> ${L}-nav`]:{[`${L}-tab`]:{padding:Ke,fontSize:C.titleFontSizeLG}}}},[`${L}-card`]:{[`&${L}-small`]:{[`> ${L}-nav`]:{[`${L}-tab`]:{padding:Be}},[`&${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:Be,itemHoverColor:Pe,iconCls:Te,tabsHorizontalItemMargin:Ke,horizontalItemPadding:xt,itemSelectedColor:nt,itemColor:It}=C,Pt=`${L}-tab`;return{[Pt]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:xt,fontSize:C.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:It,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Be}},(0,pr.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},[`&${Pt}-active ${Pt}-btn`]:{color:nt,textShadow:C.tabsActiveTextShadow},[`&${Pt}-disabled`]:{color:C.colorTextDisabled,cursor:"not-allowed"},[`&${Pt}-disabled ${Pt}-btn, &${Pt}-disabled ${L}-remove`]:{"&:focus, &:active":{color:C.colorTextDisabled}},[`& ${Pt}-remove ${Te}`]:{margin:0},[Te]:{marginRight:{_skip_check_:!0,value:C.marginSM}}},[`${Pt} + ${Pt}`]:{margin:{_skip_check_:!0,value:Ke}}}},cr=C=>{const{componentCls:L,tabsHorizontalItemMarginRTL:Be,iconCls:Pe,cardGutter:Te}=C;return{[`${L}-rtl`]:{direction:"rtl",[`${L}-nav`]:{[`${L}-tab`]:{margin:{_skip_check_:!0,value:Be},[`${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:Te},marginLeft:{_skip_check_:!0,value:0}}}}},[`${L}-dropdown-rtl`]:{direction:"rtl"},[`${L}-menu-item`]:{[`${L}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Zn=C=>{const{componentCls:L,tabsCardPadding:Be,cardHeight:Pe,cardGutter:Te,itemHoverColor:Ke,itemActiveColor:xt,colorBorderSecondary:nt}=C;return{[L]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,pr.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:Be,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:Te},padding:`0 ${C.paddingXS}px`,background:"transparent",border:`${C.lineWidth}px ${C.lineType} ${nt}`,borderRadius:`${C.borderRadiusLG}px ${C.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:C.colorText,transition:`all ${C.motionDurationSlow} ${C.motionEaseInOut}`,"&:hover":{color:Ke},"&:active, &:focus:not(:focus-visible)":{color:xt}},(0,pr.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 mn=(0,wr.Z)("Tabs",C=>{const L=(0,rn.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[qr(L),cr(L),pn(L),jr(L),un(L),Zn(L),jt(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}}),ci=function(C,L){var Be={};for(var Pe in C)Object.prototype.hasOwnProperty.call(C,Pe)&&L.indexOf(Pe)<0&&(Be[Pe]=C[Pe]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,Pe=Object.getOwnPropertySymbols(C);Te<Pe.length;Te++)L.indexOf(Pe[Te])<0&&Object.prototype.propertyIsEnumerable.call(C,Pe[Te])&&(Be[Pe[Te]]=C[Pe[Te]]);return Be};const yn=C=>{const{type:L,className:Be,rootClassName:Pe,size:Te,onEdit:Ke,hideAdd:xt,centered:nt,addIcon:It,popupClassName:Pt,children:ur,items:$t,animated:At,style:ge,indicatorSize:Mr}=C,Nr=ci(C,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:Cr,moreIcon:vr=A.createElement(U.Z,null)}=Nr,{direction:Fr,tabs:br,getPrefixCls:Vr,getPopupContainer:oe}=A.useContext(fe.E_),J=Vr("tabs",Cr),[ve,we]=mn(J);let G;L==="editable-card"&&(G={onEdit:(Ut,ar)=>{let{key:xr,event:dr}=ar;Ke==null||Ke(Ut==="add"?dr:xr,Ut)},removeIcon:A.createElement(D.Z,null),addIcon:It||A.createElement(V.Z,null),showAdd:xt!==!0});const le=Vr(),ce=gr($t,ur),Ie=Dt(J,At),st=(0,De.Z)(Te),ct=Object.assign(Object.assign({},br==null?void 0:br.style),ge);return ve(A.createElement(X,Object.assign({direction:Fr,getPopupContainer:oe,moreTransitionName:`${le}-slide-up`},Nr,{items:ce,className:H()({[`${J}-${st}`]:st,[`${J}-card`]:["card","editable-card"].includes(L),[`${J}-editable-card`]:L==="editable-card",[`${J}-centered`]:nt},br==null?void 0:br.className,Be,Pe,we),popupClassName:H()(Pt,we),style:ct,editable:G,moreIcon:vr,prefixCls:J,animated:Ie,indicatorSize:Mr!=null?Mr:br==null?void 0:br.indicatorSize})))};yn.TabPane=pt;var jn=yn},24334:function(yr,bt,w){var D,U;(function(V,He){yr.exports=He(V)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof w.g!="undefined"?w.g:this,function(V){"use strict";V=V||{};var He=V.Base64,H="2.6.4",Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",me=function(xe){for(var et={},j=0,Fe=xe.length;j<Fe;j++)et[xe.charAt(j)]=j;return et}(Y),S=String.fromCharCode,_=function(xe){if(xe.length<2){var et=xe.charCodeAt(0);return et<128?xe:et<2048?S(192|et>>>6)+S(128|et&63):S(224|et>>>12&15)+S(128|et>>>6&63)+S(128|et&63)}else{var et=65536+(xe.charCodeAt(0)-55296)*1024+(xe.charCodeAt(1)-56320);return S(240|et>>>18&7)+S(128|et>>>12&63)+S(128|et>>>6&63)+S(128|et&63)}},Ue=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,je=function(xe){return xe.replace(Ue,_)},A=function(xe){var et=[0,2,1][xe.length%3],j=xe.charCodeAt(0)<<16|(xe.length>1?xe.charCodeAt(1):0)<<8|(xe.length>2?xe.charCodeAt(2):0),Fe=[Y.charAt(j>>>18),Y.charAt(j>>>12&63),et>=2?"=":Y.charAt(j>>>6&63),et>=1?"=":Y.charAt(j&63)];return Fe.join("")},R=V.btoa&&typeof V.btoa=="function"?function(xe){return V.btoa(xe)}:function(xe){if(xe.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return xe.replace(/[\s\S]{1,3}/g,A)},ze=function(xe){return R(je(String(xe)))},yt=function(xe){return xe.replace(/[+\/]/g,function(et){return et=="+"?"-":"_"}).replace(/=/g,"")},gt=function(xe,et){return et?yt(ze(xe)):ze(xe)},qe=function(xe){return gt(xe,!0)},Re;V.Uint8Array&&(Re=function(xe,et){for(var j="",Fe=0,Xe=xe.length;Fe<Xe;Fe+=3){var F=xe[Fe],Se=xe[Fe+1],be=xe[Fe+2],q=F<<16|Se<<8|be;j+=Y.charAt(q>>>18)+Y.charAt(q>>>12&63)+(typeof Se!="undefined"?Y.charAt(q>>>6&63):"=")+(typeof be!="undefined"?Y.charAt(q&63):"=")}return et?yt(j):j});var Nt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ee=function(xe){switch(xe.length){case 4:var et=(7&xe.charCodeAt(0))<<18|(63&xe.charCodeAt(1))<<12|(63&xe.charCodeAt(2))<<6|63&xe.charCodeAt(3),j=et-65536;return S((j>>>10)+55296)+S((j&1023)+56320);case 3:return S((15&xe.charCodeAt(0))<<12|(63&xe.charCodeAt(1))<<6|63&xe.charCodeAt(2));default:return S((31&xe.charCodeAt(0))<<6|63&xe.charCodeAt(1))}},_e=function(xe){return xe.replace(Nt,Ee)},O=function(xe){var et=xe.length,j=et%4,Fe=(et>0?me[xe.charAt(0)]<<18:0)|(et>1?me[xe.charAt(1)]<<12:0)|(et>2?me[xe.charAt(2)]<<6:0)|(et>3?me[xe.charAt(3)]:0),Xe=[S(Fe>>>16),S(Fe>>>8&255),S(Fe&255)];return Xe.length-=[0,0,2,1][j],Xe.join("")},K=V.atob&&typeof V.atob=="function"?function(xe){return V.atob(xe)}:function(xe){return xe.replace(/\S{1,4}/g,O)},Q=function(xe){return K(String(xe).replace(/[^A-Za-z0-9\+\/]/g,""))},re=function(xe){return _e(K(xe))},We=function(xe){return String(xe).replace(/[-_]/g,function(et){return et=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},de=function(xe){return re(We(xe))},ut;V.Uint8Array&&(ut=function(xe){return Uint8Array.from(Q(We(xe)),function(et){return et.charCodeAt(0)})});var lt=function(){var xe=V.Base64;return V.Base64=He,xe};if(V.Base64={VERSION:H,atob:Q,btoa:R,fromBase64:de,toBase64:gt,utob:je,encode:gt,encodeURI:qe,btou:_e,decode:de,noConflict:lt,fromUint8Array:Re,toUint8Array:ut},typeof Object.defineProperty=="function"){var ye=function(xe){return{value:xe,enumerable:!1,writable:!0,configurable:!0}};V.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ye(function(){return de(this)})),Object.defineProperty(String.prototype,"toBase64",ye(function(xe){return gt(this,xe)})),Object.defineProperty(String.prototype,"toBase64URI",ye(function(){return gt(this,!0)}))}}return V.Meteor&&(Base64=V.Base64),yr.exports?yr.exports.Base64=V.Base64:(D=[],U=function(){return V.Base64}.apply(bt,D),U!==void 0&&(yr.exports=U)),{Base64:V.Base64}})},5630:function(yr,bt,w){"use strict";var D=w(54476),U=w(33885),V=w(20068),He=w(42978),H=w(75931),Y=w(92310),me=w.n(Y),S=w(18929),_=w(59301),Ue=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],je=(0,_.forwardRef)(function(A,R){var ze,yt=A.prefixCls,gt=yt===void 0?"rc-checkbox":yt,qe=A.className,Re=A.style,Nt=A.checked,Ee=A.disabled,_e=A.defaultChecked,O=_e===void 0?!1:_e,K=A.type,Q=K===void 0?"checkbox":K,re=A.title,We=A.onChange,de=(0,H.Z)(A,Ue),ut=(0,_.useRef)(null),lt=(0,S.Z)(O,{value:Nt}),ye=(0,He.Z)(lt,2),xe=ye[0],et=ye[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 j=me()(gt,qe,(ze={},(0,V.Z)(ze,"".concat(gt,"-checked"),xe),(0,V.Z)(ze,"".concat(gt,"-disabled"),Ee),ze)),Fe=function(F){Ee||("checked"in A||et(F.target.checked),We==null||We({target:(0,U.Z)((0,U.Z)({},A),{},{type:Q,checked:F.target.checked}),stopPropagation:function(){F.stopPropagation()},preventDefault:function(){F.preventDefault()},nativeEvent:F.nativeEvent}))};return _.createElement("span",{className:j,title:re,style:Re},_.createElement("input",(0,D.Z)({},de,{className:"".concat(gt,"-input"),ref:ut,onChange:Fe,disabled:Ee,checked:!!xe,type:Q})),_.createElement("span",{className:"".concat(gt,"-inner")}))});bt.Z=je},31561:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return Q}});var D=w(54476),U=w(20068),V=w(42978),He=w(75931),H=w(35593),Y=w(92310),me=w.n(Y),S=w(8654),_=w(59301),Ue=w(10228),je=w(16089),A=Ue.Z.ESC,R=Ue.Z.TAB;function ze(re){var We=re.visible,de=re.triggerRef,ut=re.onVisibleChange,lt=re.autoFocus,ye=re.overlayRef,xe=_.useRef(!1),et=function(){if(We){var F,Se;(F=de.current)===null||F===void 0||(Se=F.focus)===null||Se===void 0||Se.call(F),ut==null||ut(!1)}},j=function(){var F;return(F=ye.current)!==null&&F!==void 0&&F.focus?(ye.current.focus(),xe.current=!0,!0):!1},Fe=function(F){switch(F.keyCode){case A:et();break;case R:{var Se=!1;xe.current||(Se=j()),Se?F.preventDefault():et();break}}};_.useEffect(function(){return We?(window.addEventListener("keydown",Fe),lt&&(0,je.Z)(j,3),function(){window.removeEventListener("keydown",Fe),xe.current=!1}):function(){xe.current=!1}},[We])}var yt=(0,_.forwardRef)(function(re,We){var de=re.overlay,ut=re.arrow,lt=re.prefixCls,ye=(0,_.useMemo)(function(){var et;return typeof de=="function"?et=de():et=de,et},[de]),xe=(0,S.sQ)(We,ye==null?void 0:ye.ref);return _.createElement(_.Fragment,null,ut&&_.createElement("div",{className:"".concat(lt,"-arrow")}),_.cloneElement(ye,{ref:(0,S.Yr)(ye)?xe:void 0}))}),gt=yt,qe={adjustX:1,adjustY:1},Re=[0,0],Nt={topLeft:{points:["bl","tl"],overflow:qe,offset:[0,-4],targetOffset:Re},top:{points:["bc","tc"],overflow:qe,offset:[0,-4],targetOffset:Re},topRight:{points:["br","tr"],overflow:qe,offset:[0,-4],targetOffset:Re},bottomLeft:{points:["tl","bl"],overflow:qe,offset:[0,4],targetOffset:Re},bottom:{points:["tc","bc"],overflow:qe,offset:[0,4],targetOffset:Re},bottomRight:{points:["tr","br"],overflow:qe,offset:[0,4],targetOffset:Re}},Ee=Nt,_e=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function O(re,We){var de,ut=re.arrow,lt=ut===void 0?!1:ut,ye=re.prefixCls,xe=ye===void 0?"rc-dropdown":ye,et=re.transitionName,j=re.animation,Fe=re.align,Xe=re.placement,F=Xe===void 0?"bottomLeft":Xe,Se=re.placements,be=Se===void 0?Ee:Se,q=re.getPopupContainer,Oe=re.showAction,Ae=re.hideAction,Le=re.overlayClassName,ue=re.overlayStyle,ot=re.visible,dt=re.trigger,Ft=dt===void 0?["hover"]:dt,Ht=re.autoFocus,St=re.overlay,Jt=re.children,zt=re.onVisibleChange,tr=(0,He.Z)(re,_e),Lt=_.useState(),ae=(0,V.Z)(Lt,2),Z=ae[0],z=ae[1],he="visible"in re?ot:Z,pe=_.useRef(null),Ne=_.useRef(null),ne=_.useRef(null);_.useImperativeHandle(We,function(){return pe.current});var ie=function(N){z(N),zt==null||zt(N)};ze({visible:he,triggerRef:ne,onVisibleChange:ie,autoFocus:Ht,overlayRef:Ne});var Je=function(N){var X=re.onOverlayClick;z(!1),X&&X(N)},tt=function(){return _.createElement(gt,{ref:Ne,overlay:St,prefixCls:xe,arrow:lt})},at=function(){return typeof St=="function"?tt:tt()},Mt=function(){var N=re.minOverlayWidthMatchTrigger,X=re.alignPoint;return"minOverlayWidthMatchTrigger"in re?N:!X},Bt=function(){var N=re.openClassName;return N!==void 0?N:"".concat(xe,"-open")},W=_.cloneElement(Jt,{className:me()((de=Jt.props)===null||de===void 0?void 0:de.className,he&&Bt()),ref:(0,S.Yr)(Jt)?(0,S.sQ)(ne,Jt.ref):void 0}),_t=Ae;return!_t&&Ft.indexOf("contextMenu")!==-1&&(_t=["click"]),_.createElement(H.Z,(0,D.Z)({builtinPlacements:be},tr,{prefixCls:xe,ref:pe,popupClassName:me()(Le,(0,U.Z)({},"".concat(xe,"-show-arrow"),lt)),popupStyle:ue,action:Ft,showAction:Oe,hideAction:_t,popupPlacement:F,popupAlign:Fe,popupTransitionName:et,popupAnimation:j,popupVisible:he,stretch:Mt()?"minWidth":"",popup:at(),onPopupVisibleChange:ie,onPopupClick:Je,getPopupContainer:q}),W)}var K=_.forwardRef(O),Q=K},93681:function(yr,bt,w){"use strict";w.r(bt),w.d(bt,{BaseInput:function(){return Ue},default:function(){return Nt}});var D=w(54476),U=w(33885),V=w(20068),He=w(76190),H=w(92310),Y=w.n(H),me=w(59301),S=w(5643),_=function(_e){var O,K,Q=_e.inputElement,re=_e.prefixCls,We=_e.prefix,de=_e.suffix,ut=_e.addonBefore,lt=_e.addonAfter,ye=_e.className,xe=_e.style,et=_e.disabled,j=_e.readOnly,Fe=_e.focused,Xe=_e.triggerFocus,F=_e.allowClear,Se=_e.value,be=_e.handleReset,q=_e.hidden,Oe=_e.classes,Ae=_e.classNames,Le=_e.dataAttrs,ue=_e.styles,ot=_e.components,dt=(ot==null?void 0:ot.affixWrapper)||"span",Ft=(ot==null?void 0:ot.groupWrapper)||"span",Ht=(ot==null?void 0:ot.wrapper)||"span",St=(ot==null?void 0:ot.groupAddon)||"span",Jt=(0,me.useRef)(null),zt=function(tt){var at;(at=Jt.current)!==null&&at!==void 0&&at.contains(tt.target)&&(Xe==null||Xe())},tr=function(){var tt;if(!F)return null;var at=!et&&!j&&Se,Mt="".concat(re,"-clear-icon"),Bt=(0,He.Z)(F)==="object"&&F!==null&&F!==void 0&&F.clearIcon?F.clearIcon:"\u2716";return me.createElement("span",{onClick:be,onMouseDown:function(_t){return _t.preventDefault()},className:Y()(Mt,(tt={},(0,V.Z)(tt,"".concat(Mt,"-hidden"),!at),(0,V.Z)(tt,"".concat(Mt,"-has-suffix"),!!de),tt)),role:"button",tabIndex:-1},Bt)},Lt=(0,me.cloneElement)(Q,{value:Se,hidden:q,className:Y()((O=Q.props)===null||O===void 0?void 0:O.className,!(0,S.X3)(_e)&&!(0,S.He)(_e)&&ye)||null,style:(0,U.Z)((0,U.Z)({},(K=Q.props)===null||K===void 0?void 0:K.style),!(0,S.X3)(_e)&&!(0,S.He)(_e)?xe:{})});if((0,S.X3)(_e)){var ae,Z="".concat(re,"-affix-wrapper"),z=Y()(Z,(ae={},(0,V.Z)(ae,"".concat(Z,"-disabled"),et),(0,V.Z)(ae,"".concat(Z,"-focused"),Fe),(0,V.Z)(ae,"".concat(Z,"-readonly"),j),(0,V.Z)(ae,"".concat(Z,"-input-with-clear-btn"),de&&F&&Se),ae),!(0,S.He)(_e)&&ye,Oe==null?void 0:Oe.affixWrapper,Ae==null?void 0:Ae.affixWrapper),he=(de||F)&&me.createElement("span",{className:Y()("".concat(re,"-suffix"),Ae==null?void 0:Ae.suffix),style:ue==null?void 0:ue.suffix},tr(),de);Lt=me.createElement(dt,(0,D.Z)({className:z,style:(0,U.Z)((0,U.Z)({},(0,S.He)(_e)?void 0:xe),ue==null?void 0:ue.affixWrapper),hidden:!(0,S.He)(_e)&&q,onClick:zt},Le==null?void 0:Le.affixWrapper,{ref:Jt}),We&&me.createElement("span",{className:Y()("".concat(re,"-prefix"),Ae==null?void 0:Ae.prefix),style:ue==null?void 0:ue.prefix},We),(0,me.cloneElement)(Q,{value:Se,hidden:null}),he)}if((0,S.He)(_e)){var pe="".concat(re,"-group"),Ne="".concat(pe,"-addon"),ne=Y()("".concat(re,"-wrapper"),pe,Oe==null?void 0:Oe.wrapper),ie=Y()("".concat(re,"-group-wrapper"),ye,Oe==null?void 0:Oe.group);return me.createElement(Ft,{className:ie,style:xe,hidden:q},me.createElement(Ht,{className:ne},ut&&me.createElement(St,{className:Ne},ut),(0,me.cloneElement)(Lt,{hidden:null}),lt&&me.createElement(St,{className:Ne},lt)))}return Lt},Ue=_,je=w(94480),A=w(42978),R=w(75931),ze=w(18929),yt=w(2738),gt=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],qe=(0,me.forwardRef)(function(Ee,_e){var O=Ee.autoComplete,K=Ee.onChange,Q=Ee.onFocus,re=Ee.onBlur,We=Ee.onPressEnter,de=Ee.onKeyDown,ut=Ee.prefixCls,lt=ut===void 0?"rc-input":ut,ye=Ee.disabled,xe=Ee.htmlSize,et=Ee.className,j=Ee.maxLength,Fe=Ee.suffix,Xe=Ee.showCount,F=Ee.type,Se=F===void 0?"text":F,be=Ee.classes,q=Ee.classNames,Oe=Ee.styles,Ae=(0,R.Z)(Ee,gt),Le=(0,ze.Z)(Ee.defaultValue,{value:Ee.value}),ue=(0,A.Z)(Le,2),ot=ue[0],dt=ue[1],Ft=(0,me.useState)(!1),Ht=(0,A.Z)(Ft,2),St=Ht[0],Jt=Ht[1],zt=(0,me.useRef)(null),tr=function(ie){zt.current&&(0,S.nH)(zt.current,ie)};(0,me.useImperativeHandle)(_e,function(){return{focus:tr,blur:function(){var ie;(ie=zt.current)===null||ie===void 0||ie.blur()},setSelectionRange:function(ie,Je,tt){var at;(at=zt.current)===null||at===void 0||at.setSelectionRange(ie,Je,tt)},select:function(){var ie;(ie=zt.current)===null||ie===void 0||ie.select()},input:zt.current}}),(0,me.useEffect)(function(){Jt(function(ne){return ne&&ye?!1:ne})},[ye]);var Lt=function(ie){Ee.value===void 0&&dt(ie.target.value),zt.current&&(0,S.rJ)(zt.current,ie,K)},ae=function(ie){We&&ie.key==="Enter"&&We(ie),de==null||de(ie)},Z=function(ie){Jt(!0),Q==null||Q(ie)},z=function(ie){Jt(!1),re==null||re(ie)},he=function(ie){dt(""),tr(),zt.current&&(0,S.rJ)(zt.current,ie,K)},pe=function(){var ie=(0,yt.Z)(Ee,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return me.createElement("input",(0,D.Z)({autoComplete:O},ie,{onChange:Lt,onFocus:Z,onBlur:z,onKeyDown:ae,className:Y()(lt,(0,V.Z)({},"".concat(lt,"-disabled"),ye),q==null?void 0:q.input),style:Oe==null?void 0:Oe.input,ref:zt,size:xe,type:Se}))},Ne=function(){var ie=Number(j)>0;if(Fe||Xe){var Je=(0,S.D7)(ot),tt=(0,je.Z)(Je).length,at=(0,He.Z)(Xe)==="object"?Xe.formatter({value:Je,count:tt,maxLength:j}):"".concat(tt).concat(ie?" / ".concat(j):"");return me.createElement(me.Fragment,null,!!Xe&&me.createElement("span",{className:Y()("".concat(lt,"-show-count-suffix"),(0,V.Z)({},"".concat(lt,"-show-count-has-suffix"),!!Fe),q==null?void 0:q.count),style:(0,U.Z)({},Oe==null?void 0:Oe.count)},at),Fe)}return null};return me.createElement(Ue,(0,D.Z)({},Ae,{prefixCls:lt,className:et,inputElement:pe(),handleReset:he,value:(0,S.D7)(ot),focused:St,triggerFocus:tr,suffix:Ne(),disabled:ye,classes:be,classNames:q,styles:Oe}))}),Re=qe,Nt=Re},5643:function(yr,bt,w){"use strict";w.d(bt,{D7:function(){return H},He:function(){return D},X3:function(){return U},nH:function(){return He},rJ:function(){return V}});function D(Y){return!!(Y.addonBefore||Y.addonAfter)}function U(Y){return!!(Y.prefix||Y.suffix||Y.allowClear)}function V(Y,me,S,_){if(S){var Ue=me;if(me.type==="click"){var je=Y.cloneNode(!0);Ue=Object.create(me,{target:{value:je},currentTarget:{value:je}}),je.value="",S(Ue);return}if(_!==void 0){Ue=Object.create(me,{target:{value:Y},currentTarget:{value:Y}}),Y.value=_,S(Ue);return}S(Ue)}}function He(Y,me){if(Y){Y.focus(me);var S=me||{},_=S.cursor;if(_){var Ue=Y.value.length;switch(_){case"start":Y.setSelectionRange(0,0);break;case"end":Y.setSelectionRange(Ue,Ue);break;default:Y.setSelectionRange(0,Ue)}}}}function H(Y){return typeof Y=="undefined"||Y===null?"":String(Y)}},15285:function(yr,bt,w){"use strict";w.d(bt,{iz:function(){return $t},ck:function(){return rn},BW:function(){return ur},sN:function(){return rn},Wd:function(){return Ke},ZP:function(){return Vr},Xl:function(){return de}});var D=w(54476),U=w(20068),V=w(33885),He=w(94480),H=w(42978),Y=w(75931),me=w(92310),S=w.n(me),_=w(83836),Ue=w(18929),je=w(13697),A=w(48736),R=w(59301),ze=w(4676),yt=R.createContext(null);function gt(oe,J){return oe===void 0?null:"".concat(oe,"-").concat(J)}function qe(oe){var J=R.useContext(yt);return gt(J,oe)}var Re=w(80547),Nt=["children","locked"],Ee=R.createContext(null);function _e(oe,J){var ve=(0,V.Z)({},oe);return Object.keys(J).forEach(function(we){var G=J[we];G!==void 0&&(ve[we]=G)}),ve}function O(oe){var J=oe.children,ve=oe.locked,we=(0,Y.Z)(oe,Nt),G=R.useContext(Ee),le=(0,Re.Z)(function(){return _e(G,we)},[G,we],function(ce,Ie){return!ve&&(ce[0]!==Ie[0]||!(0,je.Z)(ce[1],Ie[1],!0))});return R.createElement(Ee.Provider,{value:le},J)}var K=[],Q=R.createContext(null);function re(){return R.useContext(Q)}var We=R.createContext(K);function de(oe){var J=R.useContext(We);return R.useMemo(function(){return oe!==void 0?[].concat((0,He.Z)(J),[oe]):J},[J,oe])}var ut=R.createContext(null),lt=R.createContext({}),ye=lt,xe=w(29194);function et(oe){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,xe.Z)(oe)){var ve=oe.nodeName.toLowerCase(),we=["input","select","textarea","button"].includes(ve)||oe.isContentEditable||ve==="a"&&!!oe.getAttribute("href"),G=oe.getAttribute("tabindex"),le=Number(G),ce=null;return G&&!Number.isNaN(le)?ce=le:we&&ce===null&&(ce=0),we&&oe.disabled&&(ce=null),ce!==null&&(ce>=0||J&&ce<0)}return!1}function j(oe){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=(0,He.Z)(oe.querySelectorAll("*")).filter(function(we){return et(we,J)});return et(oe,J)&&ve.unshift(oe),ve}var Fe=null;function Xe(){Fe=document.activeElement}function F(){Fe=null}function Se(){if(Fe)try{Fe.focus()}catch(oe){}}function be(oe,J){if(J.keyCode===9){var ve=j(oe),we=ve[J.shiftKey?0:ve.length-1],G=we===document.activeElement||oe===document.activeElement;if(G){var le=ve[J.shiftKey?ve.length-1:0];le.focus(),J.preventDefault()}}}var q=w(10228),Oe=w(16089),Ae=q.Z.LEFT,Le=q.Z.RIGHT,ue=q.Z.UP,ot=q.Z.DOWN,dt=q.Z.ENTER,Ft=q.Z.ESC,Ht=q.Z.HOME,St=q.Z.END,Jt=[ue,ot,Ae,Le];function zt(oe,J,ve,we){var G,le,ce,Ie,st="prev",ct="next",Ut="children",ar="parent";if(oe==="inline"&&we===dt)return{inlineTrigger:!0};var xr=(G={},(0,U.Z)(G,ue,st),(0,U.Z)(G,ot,ct),G),dr=(le={},(0,U.Z)(le,Ae,ve?ct:st),(0,U.Z)(le,Le,ve?st:ct),(0,U.Z)(le,ot,Ut),(0,U.Z)(le,dt,Ut),le),or=(ce={},(0,U.Z)(ce,ue,st),(0,U.Z)(ce,ot,ct),(0,U.Z)(ce,dt,Ut),(0,U.Z)(ce,Ft,ar),(0,U.Z)(ce,Ae,ve?Ut:ar),(0,U.Z)(ce,Le,ve?ar:Ut),ce),$r={inline:xr,horizontal:dr,vertical:or,inlineSub:xr,horizontalSub:or,verticalSub:or},Tr=(Ie=$r["".concat(oe).concat(J?"":"Sub")])===null||Ie===void 0?void 0:Ie[we];switch(Tr){case st:return{offset:-1,sibling:!0};case ct:return{offset:1,sibling:!0};case ar:return{offset:-1,sibling:!1};case Ut:return{offset:1,sibling:!1};default:return null}}function tr(oe){for(var J=oe;J;){if(J.getAttribute("data-menu-list"))return J;J=J.parentElement}return null}function Lt(oe,J){for(var ve=oe||document.activeElement;ve;){if(J.has(ve))return ve;ve=ve.parentElement}return null}function ae(oe,J){var ve=j(oe,!0);return ve.filter(function(we){return J.has(we)})}function Z(oe,J,ve){var we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!oe)return null;var G=ae(oe,J),le=G.length,ce=G.findIndex(function(Ie){return ve===Ie});return we<0?ce===-1?ce=le-1:ce-=1:we>0&&(ce+=1),ce=(ce+le)%le,G[ce]}var z=function(J,ve){var we=new Set,G=new Map,le=new Map;return J.forEach(function(ce){var Ie=document.querySelector("[data-menu-id='".concat(gt(ve,ce),"']"));Ie&&(we.add(Ie),le.set(Ie,ce),G.set(ce,Ie))}),{elements:we,key2element:G,element2key:le}};function he(oe,J,ve,we,G,le,ce,Ie,st,ct){var Ut=R.useRef(),ar=R.useRef();ar.current=J;var xr=function(){Oe.Z.cancel(Ut.current)};return R.useEffect(function(){return function(){xr()}},[]),function(dr){var or=dr.which;if([].concat(Jt,[dt,Ft,Ht,St]).includes(or)){var $r=le(),Tr=z($r,we),Gt=Tr,qt=Gt.elements,Vt=Gt.key2element,Xt=Gt.element2key,Qt=Vt.get(J),sr=Lt(Qt,qt),Pr=Xt.get(sr),mr=zt(oe,ce(Pr,!0).length===1,ve,or);if(!mr&&or!==Ht&&or!==St)return;(Jt.includes(or)||[Ht,St].includes(or))&&dr.preventDefault();var Kt=function(Rr){if(Rr){var ni=Rr,_n=Rr.querySelector("a");_n!=null&&_n.getAttribute("href")&&(ni=_n);var kn=Xt.get(Rr);Ie(kn),xr(),Ut.current=(0,Oe.Z)(function(){ar.current===kn&&ni.focus()})}};if([Ht,St].includes(or)||mr.sibling||!sr){var ht;!sr||oe==="inline"?ht=G.current:ht=tr(sr);var rr,Rt=ae(ht,qt);or===Ht?rr=Rt[0]:or===St?rr=Rt[Rt.length-1]:rr=Z(ht,qt,sr,mr.offset),Kt(rr)}else if(mr.inlineTrigger)st(Pr);else if(mr.offset>0)st(Pr,!0),xr(),Ut.current=(0,Oe.Z)(function(){Tr=z($r,we);var Xr=sr.getAttribute("aria-controls"),Rr=document.getElementById(Xr),ni=Z(Rr,Tr.elements);Kt(ni)},5);else if(mr.offset<0){var Er=ce(Pr,!0),Ur=Er[Er.length-2],hr=Vt.get(Ur);st(Ur,!1),Kt(hr)}}ct==null||ct(dr)}}function pe(oe){Promise.resolve().then(oe)}var Ne="__RC_UTIL_PATH_SPLIT__",ne=function(J){return J.join(Ne)},ie=function(J){return J.split(Ne)},Je="rc-menu-more";function tt(){var oe=R.useState({}),J=(0,H.Z)(oe,2),ve=J[1],we=(0,R.useRef)(new Map),G=(0,R.useRef)(new Map),le=R.useState([]),ce=(0,H.Z)(le,2),Ie=ce[0],st=ce[1],ct=(0,R.useRef)(0),Ut=(0,R.useRef)(!1),ar=function(){Ut.current||ve({})},xr=(0,R.useCallback)(function(Vt,Xt){var Qt=ne(Xt);G.current.set(Qt,Vt),we.current.set(Vt,Qt),ct.current+=1;var sr=ct.current;pe(function(){sr===ct.current&&ar()})},[]),dr=(0,R.useCallback)(function(Vt,Xt){var Qt=ne(Xt);G.current.delete(Qt),we.current.delete(Vt)},[]),or=(0,R.useCallback)(function(Vt){st(Vt)},[]),$r=(0,R.useCallback)(function(Vt,Xt){var Qt=we.current.get(Vt)||"",sr=ie(Qt);return Xt&&Ie.includes(sr[0])&&sr.unshift(Je),sr},[Ie]),Tr=(0,R.useCallback)(function(Vt,Xt){return Vt.some(function(Qt){var sr=$r(Qt,!0);return sr.includes(Xt)})},[$r]),Gt=function(){var Xt=(0,He.Z)(we.current.keys());return Ie.length&&Xt.push(Je),Xt},qt=(0,R.useCallback)(function(Vt){var Xt="".concat(we.current.get(Vt)).concat(Ne),Qt=new Set;return(0,He.Z)(G.current.keys()).forEach(function(sr){sr.startsWith(Xt)&&Qt.add(G.current.get(sr))}),Qt},[]);return R.useEffect(function(){return function(){Ut.current=!0}},[]),{registerPath:xr,unregisterPath:dr,refreshOverflowKeys:or,isSubPathKey:Tr,getKeyPath:$r,getKeys:Gt,getSubPathKeys:qt}}function at(oe){var J=R.useRef(oe);J.current=oe;var ve=R.useCallback(function(){for(var we,G=arguments.length,le=new Array(G),ce=0;ce<G;ce++)le[ce]=arguments[ce];return(we=J.current)===null||we===void 0?void 0:we.call.apply(we,[J].concat(le))},[]);return oe?ve:void 0}var Mt=Math.random().toFixed(5).toString().slice(2),Bt=0;function W(oe){var J=(0,Ue.Z)(oe,{value:oe}),ve=(0,H.Z)(J,2),we=ve[0],G=ve[1];return R.useEffect(function(){Bt+=1;var le="".concat(Mt,"-").concat(Bt);G("rc-menu-uuid-".concat(le))},[]),we}var _t=w(67732),vt=w(83652),N=w(42403),X=w(158),fe=w(2738),De=w(8654);function Me(oe,J,ve,we){var G=R.useContext(Ee),le=G.activeKey,ce=G.onActive,Ie=G.onInactive,st={active:le===oe};return J||(st.onMouseEnter=function(ct){ve==null||ve({key:oe,domEvent:ct}),ce(oe)},st.onMouseLeave=function(ct){we==null||we({key:oe,domEvent:ct}),Ie(oe)}),st}function pt(oe){var J=R.useContext(Ee),ve=J.mode,we=J.rtl,G=J.inlineIndent;if(ve!=="inline")return null;var le=oe;return we?{paddingRight:le*G}:{paddingLeft:le*G}}function Yt(oe){var J=oe.icon,ve=oe.props,we=oe.children,G;return J===null||J===!1?null:(typeof J=="function"?G=R.createElement(J,(0,V.Z)({},ve)):typeof J!="boolean"&&(G=J),G||we||null)}var Wt=["item"];function Dt(oe){var J=oe.item,ve=(0,Y.Z)(oe,Wt);return Object.defineProperty(ve,"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."),J}}),ve}var lr=["title","attribute","elementRef"],nr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Ct=["active"],gr=function(oe){(0,N.Z)(ve,oe);var J=(0,X.Z)(ve);function ve(){return(0,_t.Z)(this,ve),J.apply(this,arguments)}return(0,vt.Z)(ve,[{key:"render",value:function(){var G=this.props,le=G.title,ce=G.attribute,Ie=G.elementRef,st=(0,Y.Z)(G,lr),ct=(0,fe.Z)(st,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,A.ZP)(!ce,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),R.createElement(_.Z.Item,(0,D.Z)({},ce,{title:typeof le=="string"?le:void 0},ct,{ref:Ie}))}}]),ve}(R.Component),pr=R.forwardRef(function(oe,J){var ve,we=oe.style,G=oe.className,le=oe.eventKey,ce=oe.warnKey,Ie=oe.disabled,st=oe.itemIcon,ct=oe.children,Ut=oe.role,ar=oe.onMouseEnter,xr=oe.onMouseLeave,dr=oe.onClick,or=oe.onKeyDown,$r=oe.onFocus,Tr=(0,Y.Z)(oe,nr),Gt=qe(le),qt=R.useContext(Ee),Vt=qt.prefixCls,Xt=qt.onItemClick,Qt=qt.disabled,sr=qt.overflowDisabled,Pr=qt.itemIcon,mr=qt.selectedKeys,Kt=qt.onActive,ht=R.useContext(ye),rr=ht._internalRenderMenuItem,Rt="".concat(Vt,"-item"),Er=R.useRef(),Ur=R.useRef(),hr=Qt||Ie,Xr=(0,De.x1)(J,Ur),Rr=de(le),ni=function(xn){return{key:le,keyPath:(0,He.Z)(Rr).reverse(),item:Er.current,domEvent:xn}},_n=st||Pr,kn=Me(le,hr,ar,xr),Dn=kn.active,Un=(0,Y.Z)(kn,Ct),on=mr.includes(le),mi=pt(Rr.length),Ci=function(xn){if(!hr){var Gn=ni(xn);dr==null||dr(Dt(Gn)),Xt(Gn)}},Ir=function(xn){if(or==null||or(xn),xn.which===q.Z.ENTER){var Gn=ni(xn);dr==null||dr(Dt(Gn)),Xt(Gn)}},Tn=function(xn){Kt(le),$r==null||$r(xn)},Mn={};oe.role==="option"&&(Mn["aria-selected"]=on);var Pn=R.createElement(gr,(0,D.Z)({ref:Er,elementRef:Xr,role:Ut===null?"none":Ut||"menuitem",tabIndex:Ie?null:-1,"data-menu-id":sr&&Gt?null:Gt},Tr,Un,Mn,{component:"li","aria-disabled":Ie,style:(0,V.Z)((0,V.Z)({},mi),we),className:S()(Rt,(ve={},(0,U.Z)(ve,"".concat(Rt,"-active"),Dn),(0,U.Z)(ve,"".concat(Rt,"-selected"),on),(0,U.Z)(ve,"".concat(Rt,"-disabled"),hr),ve),G),onClick:Ci,onKeyDown:Ir,onFocus:Tn}),ct,R.createElement(Yt,{props:(0,V.Z)((0,V.Z)({},oe),{},{isSelected:on}),icon:_n}));return rr&&(Pn=rr(Pn,oe,{selected:on})),Pn});function wr(oe,J){var ve=oe.eventKey,we=re(),G=de(ve);return R.useEffect(function(){if(we)return we.registerPath(ve,G),function(){we.unregisterPath(ve,G)}},[G]),we?null:R.createElement(pr,(0,D.Z)({},oe,{ref:J}))}var rn=R.forwardRef(wr),ir=["className","children"],an=function(J,ve){var we=J.className,G=J.children,le=(0,Y.Z)(J,ir),ce=R.useContext(Ee),Ie=ce.prefixCls,st=ce.mode,ct=ce.rtl;return R.createElement("ul",(0,D.Z)({className:S()(Ie,ct&&"".concat(Ie,"-rtl"),"".concat(Ie,"-sub"),"".concat(Ie,"-").concat(st==="inline"?"inline":"vertical"),we),role:"menu"},le,{"data-menu-list":!0,ref:ve}),G)},jt=R.forwardRef(an);jt.displayName="SubMenuList";var un=jt,jr=w(11592);function pn(oe,J){return(0,jr.Z)(oe).map(function(ve,we){if(R.isValidElement(ve)){var G,le,ce=ve.key,Ie=(G=(le=ve.props)===null||le===void 0?void 0:le.eventKey)!==null&&G!==void 0?G:ce,st=Ie==null;st&&(Ie="tmp_key-".concat([].concat((0,He.Z)(J),[we]).join("-")));var ct={key:Ie,eventKey:Ie};return R.cloneElement(ve,ct)}return ve})}var qr=w(35593),Sr={adjustX:1,adjustY:1},cr={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}},Zn={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}},mn=null;function ci(oe,J,ve){if(J)return J;if(ve)return ve[oe]||ve.other}var yn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function jn(oe){var J=oe.prefixCls,ve=oe.visible,we=oe.children,G=oe.popup,le=oe.popupStyle,ce=oe.popupClassName,Ie=oe.popupOffset,st=oe.disabled,ct=oe.mode,Ut=oe.onVisibleChange,ar=R.useContext(Ee),xr=ar.getPopupContainer,dr=ar.rtl,or=ar.subMenuOpenDelay,$r=ar.subMenuCloseDelay,Tr=ar.builtinPlacements,Gt=ar.triggerSubMenuAction,qt=ar.forceSubMenuRender,Vt=ar.rootClassName,Xt=ar.motion,Qt=ar.defaultMotions,sr=R.useState(!1),Pr=(0,H.Z)(sr,2),mr=Pr[0],Kt=Pr[1],ht=dr?(0,V.Z)((0,V.Z)({},Zn),Tr):(0,V.Z)((0,V.Z)({},cr),Tr),rr=yn[ct],Rt=ci(ct,Xt,Qt),Er=R.useRef(Rt);ct!=="inline"&&(Er.current=Rt);var Ur=(0,V.Z)((0,V.Z)({},Er.current),{},{leavedClassName:"".concat(J,"-hidden"),removeOnLeave:!1,motionAppear:!0}),hr=R.useRef();return R.useEffect(function(){return hr.current=(0,Oe.Z)(function(){Kt(ve)}),function(){Oe.Z.cancel(hr.current)}},[ve]),R.createElement(qr.Z,{prefixCls:J,popupClassName:S()("".concat(J,"-popup"),(0,U.Z)({},"".concat(J,"-rtl"),dr),ce,Vt),stretch:ct==="horizontal"?"minWidth":null,getPopupContainer:xr,builtinPlacements:ht,popupPlacement:rr,popupVisible:mr,popup:G,popupStyle:le,popupAlign:Ie&&{offset:Ie},action:st?[]:[Gt],mouseEnterDelay:or,mouseLeaveDelay:$r,onPopupVisibleChange:Ut,forceRender:qt,popupMotion:Ur,fresh:!0},we)}var C=w(77900);function L(oe){var J=oe.id,ve=oe.open,we=oe.keyPath,G=oe.children,le="inline",ce=R.useContext(Ee),Ie=ce.prefixCls,st=ce.forceSubMenuRender,ct=ce.motion,Ut=ce.defaultMotions,ar=ce.mode,xr=R.useRef(!1);xr.current=ar===le;var dr=R.useState(!xr.current),or=(0,H.Z)(dr,2),$r=or[0],Tr=or[1],Gt=xr.current?ve:!1;R.useEffect(function(){xr.current&&Tr(!1)},[ar]);var qt=(0,V.Z)({},ci(le,ct,Ut));we.length>1&&(qt.motionAppear=!1);var Vt=qt.onVisibleChanged;return qt.onVisibleChanged=function(Xt){return!xr.current&&!Xt&&Tr(!0),Vt==null?void 0:Vt(Xt)},$r?null:R.createElement(O,{mode:le,locked:!xr.current},R.createElement(C.default,(0,D.Z)({visible:Gt},qt,{forceRender:st,removeOnLeave:!1,leavedClassName:"".concat(Ie,"-hidden")}),function(Xt){var Qt=Xt.className,sr=Xt.style;return R.createElement(un,{id:J,className:Qt,style:sr},G)}))}var Be=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Pe=["active"],Te=function(J){var ve,we=J.style,G=J.className,le=J.title,ce=J.eventKey,Ie=J.warnKey,st=J.disabled,ct=J.internalPopupClose,Ut=J.children,ar=J.itemIcon,xr=J.expandIcon,dr=J.popupClassName,or=J.popupOffset,$r=J.popupStyle,Tr=J.onClick,Gt=J.onMouseEnter,qt=J.onMouseLeave,Vt=J.onTitleClick,Xt=J.onTitleMouseEnter,Qt=J.onTitleMouseLeave,sr=(0,Y.Z)(J,Be),Pr=qe(ce),mr=R.useContext(Ee),Kt=mr.prefixCls,ht=mr.mode,rr=mr.openKeys,Rt=mr.disabled,Er=mr.overflowDisabled,Ur=mr.activeKey,hr=mr.selectedKeys,Xr=mr.itemIcon,Rr=mr.expandIcon,ni=mr.onItemClick,_n=mr.onOpenChange,kn=mr.onActive,Dn=R.useContext(ye),Un=Dn._internalRenderSubMenuItem,on=R.useContext(ut),mi=on.isSubPathKey,Ci=de(),Ir="".concat(Kt,"-submenu"),Tn=Rt||st,Mn=R.useRef(),Pn=R.useRef(),gi=ar!=null?ar:Xr,xn=xr!=null?xr:Rr,Gn=rr.includes(ce),ui=!Er&&Gn,Ei=mi(hr,ce),qn=Me(ce,Tn,Xt,Qt),vi=qn.active,Gi=(0,Y.Z)(qn,Pe),Xn=R.useState(!1),Sa=(0,H.Z)(Xn,2),Pi=Sa[0],bi=Sa[1],$n=function(Cn){Tn||bi(Cn)},Rn=function(Cn){$n(!0),Gt==null||Gt({key:ce,domEvent:Cn})},_a=function(Cn){$n(!1),qt==null||qt({key:ce,domEvent:Cn})},ki=R.useMemo(function(){return vi||(ht!=="inline"?Pi||mi([Ur],ce):!1)},[ht,vi,Ur,Pi,ce,mi]),Ri=pt(Ci.length),yi=function(Cn){Tn||(Vt==null||Vt({key:ce,domEvent:Cn}),ht==="inline"&&_n(ce,!Gn))},Oi=at(function(Yn){Tr==null||Tr(Dt(Yn)),ni(Yn)}),Ni=function(Cn){ht!=="inline"&&_n(ce,Cn)},Di=function(){kn(ce)},qi=Pr&&"".concat(Pr,"-popup"),Fi=R.createElement("div",(0,D.Z)({role:"menuitem",style:Ri,className:"".concat(Ir,"-title"),tabIndex:Tn?null:-1,ref:Mn,title:typeof le=="string"?le:null,"data-menu-id":Er&&Pr?null:Pr,"aria-expanded":ui,"aria-haspopup":!0,"aria-controls":qi,"aria-disabled":Tn,onClick:yi,onFocus:Di},Gi),le,R.createElement(Yt,{icon:ht!=="horizontal"?xn:void 0,props:(0,V.Z)((0,V.Z)({},J),{},{isOpen:ui,isSubMenu:!0})},R.createElement("i",{className:"".concat(Ir,"-arrow")}))),An=R.useRef(ht);if(ht!=="inline"&&Ci.length>1?An.current="vertical":An.current=ht,!Er){var di=An.current;Fi=R.createElement(jn,{mode:di,prefixCls:Ir,visible:!ct&&ui&&ht!=="inline",popupClassName:dr,popupOffset:or,popupStyle:$r,popup:R.createElement(O,{mode:di==="horizontal"?"vertical":di},R.createElement(un,{id:qi,ref:Pn},Ut)),disabled:Tn,onVisibleChange:Ni},Fi)}var Jn=R.createElement(_.Z.Item,(0,D.Z)({role:"none"},sr,{component:"li",style:we,className:S()(Ir,"".concat(Ir,"-").concat(ht),G,(ve={},(0,U.Z)(ve,"".concat(Ir,"-open"),ui),(0,U.Z)(ve,"".concat(Ir,"-active"),ki),(0,U.Z)(ve,"".concat(Ir,"-selected"),Ei),(0,U.Z)(ve,"".concat(Ir,"-disabled"),Tn),ve)),onMouseEnter:Rn,onMouseLeave:_a}),Fi,!Er&&R.createElement(L,{id:qi,open:ui,keyPath:Ci},Ut));return Un&&(Jn=Un(Jn,J,{selected:Ei,active:ki,open:ui,disabled:Tn})),R.createElement(O,{onItemClick:Oi,mode:ht==="horizontal"?"vertical":ht,itemIcon:gi,expandIcon:xn},Jn)};function Ke(oe){var J=oe.eventKey,ve=oe.children,we=de(J),G=pn(ve,we),le=re();R.useEffect(function(){if(le)return le.registerPath(J,we),function(){le.unregisterPath(J,we)}},[we]);var ce;return le?ce=G:ce=R.createElement(Te,oe,G),R.createElement(We.Provider,{value:we},ce)}var xt=w(76190),nt=["className","title","eventKey","children"],It=["children"],Pt=function(J){var ve=J.className,we=J.title,G=J.eventKey,le=J.children,ce=(0,Y.Z)(J,nt),Ie=R.useContext(Ee),st=Ie.prefixCls,ct="".concat(st,"-item-group");return R.createElement("li",(0,D.Z)({role:"presentation"},ce,{onClick:function(ar){return ar.stopPropagation()},className:S()(ct,ve)}),R.createElement("div",{role:"presentation",className:"".concat(ct,"-title"),title:typeof we=="string"?we:void 0},we),R.createElement("ul",{role:"group",className:"".concat(ct,"-list")},le))};function ur(oe){var J=oe.children,ve=(0,Y.Z)(oe,It),we=de(ve.eventKey),G=pn(J,we),le=re();return le?G:R.createElement(Pt,(0,fe.Z)(ve,["warnKey"]),G)}function $t(oe){var J=oe.className,ve=oe.style,we=R.useContext(Ee),G=we.prefixCls,le=re();return le?null:R.createElement("li",{role:"separator",className:S()("".concat(G,"-item-divider"),J),style:ve})}var At=["label","children","key","type"];function ge(oe){return(oe||[]).map(function(J,ve){if(J&&(0,xt.Z)(J)==="object"){var we=J,G=we.label,le=we.children,ce=we.key,Ie=we.type,st=(0,Y.Z)(we,At),ct=ce!=null?ce:"tmp-".concat(ve);return le||Ie==="group"?Ie==="group"?R.createElement(ur,(0,D.Z)({key:ct},st,{title:G}),ge(le)):R.createElement(Ke,(0,D.Z)({key:ct},st,{title:G}),ge(le)):Ie==="divider"?R.createElement($t,(0,D.Z)({key:ct},st)):R.createElement(rn,(0,D.Z)({key:ct},st),G)}return null}).filter(function(J){return J})}function Mr(oe,J,ve){var we=oe;return J&&(we=ge(J)),pn(we,ve)}var Nr=["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"],Cr=[],vr=R.forwardRef(function(oe,J){var ve,we,G=oe,le=G.prefixCls,ce=le===void 0?"rc-menu":le,Ie=G.rootClassName,st=G.style,ct=G.className,Ut=G.tabIndex,ar=Ut===void 0?0:Ut,xr=G.items,dr=G.children,or=G.direction,$r=G.id,Tr=G.mode,Gt=Tr===void 0?"vertical":Tr,qt=G.inlineCollapsed,Vt=G.disabled,Xt=G.disabledOverflow,Qt=G.subMenuOpenDelay,sr=Qt===void 0?.1:Qt,Pr=G.subMenuCloseDelay,mr=Pr===void 0?.1:Pr,Kt=G.forceSubMenuRender,ht=G.defaultOpenKeys,rr=G.openKeys,Rt=G.activeKey,Er=G.defaultActiveFirst,Ur=G.selectable,hr=Ur===void 0?!0:Ur,Xr=G.multiple,Rr=Xr===void 0?!1:Xr,ni=G.defaultSelectedKeys,_n=G.selectedKeys,kn=G.onSelect,Dn=G.onDeselect,Un=G.inlineIndent,on=Un===void 0?24:Un,mi=G.motion,Ci=G.defaultMotions,Ir=G.triggerSubMenuAction,Tn=Ir===void 0?"hover":Ir,Mn=G.builtinPlacements,Pn=G.itemIcon,gi=G.expandIcon,xn=G.overflowedIndicator,Gn=xn===void 0?"...":xn,ui=G.overflowedIndicatorPopupClassName,Ei=G.getPopupContainer,qn=G.onClick,vi=G.onOpenChange,Gi=G.onKeyDown,Xn=G.openAnimation,Sa=G.openTransitionName,Pi=G._internalRenderMenuItem,bi=G._internalRenderSubMenuItem,$n=(0,Y.Z)(G,Nr),Rn=R.useMemo(function(){return Mr(dr,xr,Cr)},[dr,xr]),_a=R.useState(!1),ki=(0,H.Z)(_a,2),Ri=ki[0],yi=ki[1],Oi=R.useRef(),Ni=W($r),Di=or==="rtl",qi=(0,Ue.Z)(ht,{value:rr,postState:function(Hr){return Hr||Cr}}),Fi=(0,H.Z)(qi,2),An=Fi[0],di=Fi[1],Jn=function(Hr){var Jr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ii(){di(Hr),vi==null||vi(Hr)}Jr?(0,ze.flushSync)(ii):ii()},Yn=R.useState(An),Cn=(0,H.Z)(Yn,2),sa=Cn[0],zr=Cn[1],kr=R.useRef(!1),fn=R.useMemo(function(){return(Gt==="inline"||Gt==="vertical")&&qt?["vertical",qt]:[Gt,!1]},[Gt,qt]),En=(0,H.Z)(fn,2),On=En[0],Nn=En[1],oo=On==="inline",Fn=R.useState(On),is=(0,H.Z)(Fn,2),zi=is[0],Xs=is[1],Xi=R.useState(Nn),Ai=(0,H.Z)(Xi,2),xi=Ai[0],la=Ai[1];R.useEffect(function(){Xs(On),la(Nn),kr.current&&(oo?di(sa):Jn(Cr))},[On,Nn]);var ca=R.useState(0),$a=(0,H.Z)(ca,2),so=$a[0],lo=$a[1],hn=so>=Rn.length-1||zi!=="horizontal"||Xt;R.useEffect(function(){oo&&zr(An)},[An]),R.useEffect(function(){return kr.current=!0,function(){kr.current=!1}},[]);var Ki=tt(),vn=Ki.registerPath,fi=Ki.unregisterPath,Bo=Ki.refreshOverflowKeys,Ta=Ki.isSubPathKey,Js=Ki.getKeyPath,as=Ki.getKeys,hi=Ki.getSubPathKeys,Ys=R.useMemo(function(){return{registerPath:vn,unregisterPath:fi}},[vn,fi]),os=R.useMemo(function(){return{isSubPathKey:Ta}},[Ta]);R.useEffect(function(){Bo(hn?Cr:Rn.slice(so+1).map(function(Zr){return Zr.key}))},[so,hn]);var Qs=(0,Ue.Z)(Rt||Er&&((ve=Rn[0])===null||ve===void 0?void 0:ve.key),{value:Rt}),ss=(0,H.Z)(Qs,2),Pa=ss[0],co=ss[1],Ra=at(function(Zr){co(Zr)}),Io=at(function(){co(void 0)});(0,R.useImperativeHandle)(J,function(){return{list:Oi.current,focus:function(Hr){var Jr,ii=as(),Ln=z(ii,Ni),Ma=Ln.elements,da=Ln.key2element,fs=Ln.element2key,hs=ae(Oi.current,Ma),ps=Pa!=null?Pa:hs[0]?fs.get(hs[0]):(Jr=Rn.find(function(tl){return!tl.props.disabled}))===null||Jr===void 0?void 0:Jr.key,fa=da.get(ps);if(ps&&fa){var Ca;fa==null||(Ca=fa.focus)===null||Ca===void 0||Ca.call(fa,Hr)}}}});var uo=(0,Ue.Z)(ni||[],{value:_n,postState:function(Hr){return Array.isArray(Hr)?Hr:Hr==null?Cr:[Hr]}}),ls=(0,H.Z)(uo,2),Hi=ls[0],cs=ls[1],us=function(Hr){if(hr){var Jr=Hr.key,ii=Hi.includes(Jr),Ln;Rr?ii?Ln=Hi.filter(function(da){return da!==Jr}):Ln=[].concat((0,He.Z)(Hi),[Jr]):Ln=[Jr],cs(Ln);var Ma=(0,V.Z)((0,V.Z)({},Hr),{},{selectedKeys:Ln});ii?Dn==null||Dn(Ma):kn==null||kn(Ma)}!Rr&&An.length&&zi!=="inline"&&Jn(Cr)},ds=at(function(Zr){qn==null||qn(Dt(Zr)),us(Zr)}),fo=at(function(Zr,Hr){var Jr=An.filter(function(Ln){return Ln!==Zr});if(Hr)Jr.push(Zr);else if(zi!=="inline"){var ii=hi(Zr);Jr=Jr.filter(function(Ln){return!ii.has(Ln)})}(0,je.Z)(An,Jr,!0)||Jn(Jr,!0)}),el=function(Hr,Jr){var ii=Jr!=null?Jr:!An.includes(Hr);fo(Hr,ii)},ua=he(zi,Pa,Di,Ni,Oi,as,Js,co,el,Gi);R.useEffect(function(){yi(!0)},[]);var $o=R.useMemo(function(){return{_internalRenderMenuItem:Pi,_internalRenderSubMenuItem:bi}},[Pi,bi]),Oa=zi!=="horizontal"||Xt?Rn:Rn.map(function(Zr,Hr){return R.createElement(O,{key:Zr.key,overflowDisabled:Hr>so},Zr)}),Na=R.createElement(_.Z,(0,D.Z)({id:$r,ref:Oi,prefixCls:"".concat(ce,"-overflow"),component:"ul",itemComponent:rn,className:S()(ce,"".concat(ce,"-root"),"".concat(ce,"-").concat(zi),ct,(we={},(0,U.Z)(we,"".concat(ce,"-inline-collapsed"),xi),(0,U.Z)(we,"".concat(ce,"-rtl"),Di),we),Ie),dir:or,style:st,role:"menu",tabIndex:ar,data:Oa,renderRawItem:function(Hr){return Hr},renderRawRest:function(Hr){var Jr=Hr.length,ii=Jr?Rn.slice(-Jr):null;return R.createElement(Ke,{eventKey:Je,title:Gn,disabled:hn,internalPopupClose:Jr===0,popupClassName:ui},ii)},maxCount:zi!=="horizontal"||Xt?_.Z.INVALIDATE:_.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Hr){lo(Hr)},onKeyDown:ua},$n));return R.createElement(ye.Provider,{value:$o},R.createElement(yt.Provider,{value:Ni},R.createElement(O,{prefixCls:ce,rootClassName:Ie,mode:zi,openKeys:An,rtl:Di,disabled:Vt,motion:Ri?mi:null,defaultMotions:Ri?Ci:null,activeKey:Pa,onActive:Ra,onInactive:Io,selectedKeys:Hi,inlineIndent:on,subMenuOpenDelay:sr,subMenuCloseDelay:mr,forceSubMenuRender:Kt,builtinPlacements:Mn,triggerSubMenuAction:Tn,getPopupContainer:Ei,itemIcon:Pn,expandIcon:gi,onItemClick:ds,onOpenChange:fo},R.createElement(ut.Provider,{value:os},Na),R.createElement("div",{style:{display:"none"},"aria-hidden":!0},R.createElement(Q.Provider,{value:Ys},Rn)))))}),Fr=vr,br=Fr;br.Item=rn,br.SubMenu=Ke,br.ItemGroup=ur,br.Divider=$t;var Vr=br},83836:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return Xe}});var D=w(54476),U=w(33885),V=w(42978),He=w(75931),H=w(59301),Y=w(92310),me=w.n(Y),S=w(29301),_=w(34280),Ue=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],je=void 0;function A(F,Se){var be=F.prefixCls,q=F.invalidate,Oe=F.item,Ae=F.renderItem,Le=F.responsive,ue=F.responsiveDisabled,ot=F.registerSize,dt=F.itemKey,Ft=F.className,Ht=F.style,St=F.children,Jt=F.display,zt=F.order,tr=F.component,Lt=tr===void 0?"div":tr,ae=(0,He.Z)(F,Ue),Z=Le&&!Jt;function z(ie){ot(dt,ie)}H.useEffect(function(){return function(){z(null)}},[]);var he=Ae&&Oe!==je?Ae(Oe,{index:zt}):St,pe;q||(pe={opacity:Z?0:1,height:Z?0:je,overflowY:Z?"hidden":je,order:Le?zt:je,pointerEvents:Z?"none":je,position:Z?"absolute":je});var Ne={};Z&&(Ne["aria-hidden"]=!0);var ne=H.createElement(Lt,(0,D.Z)({className:me()(!q&&be,Ft),style:(0,U.Z)((0,U.Z)({},pe),Ht)},Ne,ae,{ref:Se}),he);return Le&&(ne=H.createElement(S.Z,{onResize:function(Je){var tt=Je.offsetWidth;z(tt)},disabled:ue},ne)),ne}var R=H.forwardRef(A);R.displayName="Item";var ze=R,yt=w(6089),gt=w(4676),qe=w(16089);function Re(F){if(typeof MessageChannel=="undefined")(0,qe.Z)(F);else{var Se=new MessageChannel;Se.port1.onmessage=function(){return F()},Se.port2.postMessage(void 0)}}function Nt(){var F=H.useRef(null),Se=function(q){F.current||(F.current=[],Re(function(){(0,gt.unstable_batchedUpdates)(function(){F.current.forEach(function(Oe){Oe()}),F.current=null})})),F.current.push(q)};return Se}function Ee(F,Se){var be=H.useState(Se),q=(0,V.Z)(be,2),Oe=q[0],Ae=q[1],Le=(0,yt.Z)(function(ue){F(function(){Ae(ue)})});return[Oe,Le]}var _e=H.createContext(null),O=["component"],K=["className"],Q=["className"],re=function(Se,be){var q=H.useContext(_e);if(!q){var Oe=Se.component,Ae=Oe===void 0?"div":Oe,Le=(0,He.Z)(Se,O);return H.createElement(Ae,(0,D.Z)({},Le,{ref:be}))}var ue=q.className,ot=(0,He.Z)(q,K),dt=Se.className,Ft=(0,He.Z)(Se,Q);return H.createElement(_e.Provider,{value:null},H.createElement(ze,(0,D.Z)({ref:be,className:me()(ue,dt)},ot,Ft)))},We=H.forwardRef(re);We.displayName="RawItem";var de=We,ut=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],lt="responsive",ye="invalidate";function xe(F){return"+ ".concat(F.length," ...")}function et(F,Se){var be=F.prefixCls,q=be===void 0?"rc-overflow":be,Oe=F.data,Ae=Oe===void 0?[]:Oe,Le=F.renderItem,ue=F.renderRawItem,ot=F.itemKey,dt=F.itemWidth,Ft=dt===void 0?10:dt,Ht=F.ssr,St=F.style,Jt=F.className,zt=F.maxCount,tr=F.renderRest,Lt=F.renderRawRest,ae=F.prefix,Z=F.suffix,z=F.component,he=z===void 0?"div":z,pe=F.itemComponent,Ne=F.onVisibleChange,ne=(0,He.Z)(F,ut),ie=Ht==="full",Je=Nt(),tt=Ee(Je,null),at=(0,V.Z)(tt,2),Mt=at[0],Bt=at[1],W=Mt||0,_t=Ee(Je,new Map),vt=(0,V.Z)(_t,2),N=vt[0],X=vt[1],fe=Ee(Je,0),De=(0,V.Z)(fe,2),Me=De[0],pt=De[1],Yt=Ee(Je,0),Wt=(0,V.Z)(Yt,2),Dt=Wt[0],lr=Wt[1],nr=Ee(Je,0),Ct=(0,V.Z)(nr,2),gr=Ct[0],pr=Ct[1],wr=Ee(Je,0),rn=(0,V.Z)(wr,2),ir=rn[0],an=rn[1],jt=(0,H.useState)(null),un=(0,V.Z)(jt,2),jr=un[0],pn=un[1],qr=(0,H.useState)(null),Sr=(0,V.Z)(qr,2),cr=Sr[0],Zn=Sr[1],mn=H.useMemo(function(){return cr===null&&ie?Number.MAX_SAFE_INTEGER:cr||0},[cr,Mt]),ci=(0,H.useState)(!1),yn=(0,V.Z)(ci,2),jn=yn[0],C=yn[1],L="".concat(q,"-item"),Be=Math.max(Me,Dt),Pe=zt===lt,Te=Ae.length&&Pe,Ke=zt===ye,xt=Te||typeof zt=="number"&&Ae.length>zt,nt=(0,H.useMemo)(function(){var le=Ae;return Te?Mt===null&&ie?le=Ae:le=Ae.slice(0,Math.min(Ae.length,W/Ft)):typeof zt=="number"&&(le=Ae.slice(0,zt)),le},[Ae,Ft,Mt,zt,Te]),It=(0,H.useMemo)(function(){return Te?Ae.slice(mn+1):Ae.slice(nt.length)},[Ae,nt,Te,mn]),Pt=(0,H.useCallback)(function(le,ce){var Ie;return typeof ot=="function"?ot(le):(Ie=ot&&(le==null?void 0:le[ot]))!==null&&Ie!==void 0?Ie:ce},[ot]),ur=(0,H.useCallback)(Le||function(le){return le},[Le]);function $t(le,ce,Ie){cr===le&&(ce===void 0||ce===jr)||(Zn(le),Ie||(C(le<Ae.length-1),Ne==null||Ne(le)),ce!==void 0&&pn(ce))}function At(le,ce){Bt(ce.clientWidth)}function ge(le,ce){X(function(Ie){var st=new Map(Ie);return ce===null?st.delete(le):st.set(le,ce),st})}function Mr(le,ce){lr(ce),pt(Dt)}function Nr(le,ce){pr(ce)}function Cr(le,ce){an(ce)}function vr(le){return N.get(Pt(nt[le],le))}(0,_.Z)(function(){if(W&&typeof Be=="number"&&nt){var le=gr+ir,ce=nt.length,Ie=ce-1;if(!ce){$t(0,null);return}for(var st=0;st<ce;st+=1){var ct=vr(st);if(ie&&(ct=ct||0),ct===void 0){$t(st-1,void 0,!0);break}if(le+=ct,Ie===0&&le<=W||st===Ie-1&&le+vr(Ie)<=W){$t(Ie,null);break}else if(le+Be>W){$t(st-1,le-ct-ir+Dt);break}}Z&&vr(0)+ir>W&&pn(null)}},[W,N,Dt,gr,ir,Pt,nt]);var Fr=jn&&!!It.length,br={};jr!==null&&Te&&(br={position:"absolute",left:jr,top:0});var Vr={prefixCls:L,responsive:Te,component:pe,invalidate:Ke},oe=ue?function(le,ce){var Ie=Pt(le,ce);return H.createElement(_e.Provider,{key:Ie,value:(0,U.Z)((0,U.Z)({},Vr),{},{order:ce,item:le,itemKey:Ie,registerSize:ge,display:ce<=mn})},ue(le,ce))}:function(le,ce){var Ie=Pt(le,ce);return H.createElement(ze,(0,D.Z)({},Vr,{order:ce,key:Ie,item:le,renderItem:ur,itemKey:Ie,registerSize:ge,display:ce<=mn}))},J={order:Fr?mn:Number.MAX_SAFE_INTEGER,className:"".concat(L,"-rest"),registerSize:Mr,display:Fr},ve=tr||xe,we=Lt?H.createElement(_e.Provider,{value:(0,U.Z)((0,U.Z)({},Vr),J)},Lt(It)):H.createElement(ze,(0,D.Z)({},Vr,J),typeof ve=="function"?ve(It):ve),G=H.createElement(he,(0,D.Z)({className:me()(!Ke&&q,Jt),style:St,ref:Se},ne),ae&&H.createElement(ze,(0,D.Z)({},Vr,{responsive:Pe,responsiveDisabled:!Te,order:-1,className:"".concat(L,"-prefix"),registerSize:Nr,display:!0}),ae),nt.map(oe),xt?we:null,Z&&H.createElement(ze,(0,D.Z)({},Vr,{responsive:Pe,responsiveDisabled:!Te,order:mn,className:"".concat(L,"-suffix"),registerSize:Cr,display:!0,style:br}),Z));return Pe?H.createElement(S.Z,{onResize:At,disabled:!Te},G):G}var j=H.forwardRef(et);j.displayName="Overflow",j.Item=de,j.RESPONSIVE=lt,j.INVALIDATE=ye;var Fe=j,Xe=Fe},22061:function(yr,bt,w){"use strict";w.d(bt,{Z5:function(){return Ac},_l:function(){return G0},bK:function(){return Rc}});var D=w(59301),U=w(69168),V=w(54476),He=w(59781),H=D.createContext(null),Y=null;function me(o){o()}var S=me,_=function(l){return S=l},Ue=function(){return S};function je(){var o=Ue(),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 A={notify:function(){},get:function(){return[]}};function R(o,l){var c,f=A;function m(x){return E(),f.subscribe(x)}function g(){f.notify()}function v(){I.onStateChange&&I.onStateChange()}function y(){return!!c}function E(){c||(c=l?l.addNestedSub(v):o.subscribe(v),f=je())}function T(){c&&(c(),c=void 0,f.clear(),f=A)}var I={addNestedSub:m,notifyNestedSubs:g,handleChangeWrapper:v,isSubscribed:y,trySubscribe:E,tryUnsubscribe:T,getListeners:function(){return f}};return I}var ze=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?D.useLayoutEffect:D.useEffect;function yt(o){var l=o.store,c=o.context,f=o.children,m=(0,D.useMemo)(function(){var y=R(l);return{store:l,subscription:y}},[l]),g=(0,D.useMemo)(function(){return l.getState()},[l]);ze(function(){var y=m.subscription;return y.onStateChange=y.notifyNestedSubs,y.trySubscribe(),g!==l.getState()&&y.notifyNestedSubs(),function(){y.tryUnsubscribe(),y.onStateChange=null}},[m,g]);var v=c||H;return D.createElement(v.Provider,{value:m},f)}var gt=yt,qe=w(85377),Re=w(94266),Nt=w.n(Re),Ee=w(53410),_e=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],O=["reactReduxForwardedRef"],K=[],Q=[null,null],re=function(l){try{return JSON.stringify(l)}catch(c){return String(l)}};function We(o,l){var c=o[1];return[l.payload,c+1]}function de(o,l,c){ze(function(){return o.apply(void 0,l)},c)}function ut(o,l,c,f,m,g,v){o.current=f,l.current=m,c.current=!1,g.current&&(g.current=null,v())}function lt(o,l,c,f,m,g,v,y,E,T){if(o){var I=!1,x=null,k=function(){if(!I){var Ve=l.getState(),Qe,rt;try{Qe=f(Ve,m.current)}catch(ft){rt=ft,x=ft}rt||(x=null),Qe===g.current?v.current||E():(g.current=Qe,y.current=Qe,v.current=!0,T({type:"STORE_UPDATED",payload:{error:rt}}))}};c.onStateChange=k,c.trySubscribe(),k();var P=function(){if(I=!0,c.tryUnsubscribe(),c.onStateChange=null,x)throw x};return P}}var ye=function(){return[null,0]};function xe(o,l){l===void 0&&(l={});var c=l,f=c.getDisplayName,m=f===void 0?function(er){return"ConnectAdvanced("+er+")"}:f,g=c.methodName,v=g===void 0?"connectAdvanced":g,y=c.renderCountProp,E=y===void 0?void 0:y,T=c.shouldHandleStateChanges,I=T===void 0?!0:T,x=c.storeKey,k=x===void 0?"store":x,P=c.withRef,te=P===void 0?!1:P,Ve=c.forwardRef,Qe=Ve===void 0?!1:Ve,rt=c.context,ft=rt===void 0?H:rt,Et=(0,qe.Z)(c,_e);if(0)var Tt;var fr=ft;return function(Zt){var ln=Zt.displayName||Zt.name||"Component",Lr=m(ln),Yr=(0,V.Z)({},Et,{getDisplayName:m,methodName:v,renderCountProp:E,shouldHandleStateChanges:I,storeKey:k,displayName:Lr,wrappedComponentName:ln,WrappedComponent:Zt}),Qr=Et.pure;function ti(Bn){return o(Bn.dispatch,Yr)}var Si=Qr?D.useMemo:function(Bn){return Bn()};function pi(Bn){var Ua=(0,D.useMemo)(function(){var Os=Bn.reactReduxForwardedRef,Fc=(0,qe.Z)(Bn,O);return[Bn.context,Os,Fc]},[Bn]),va=Ua[0],Rs=Ua[1],ta=Ua[2],Zi=(0,D.useMemo)(function(){return va&&va.Consumer&&(0,Ee.isContextConsumer)(D.createElement(va.Consumer,null))?va:fr},[va,fr]),ji=(0,D.useContext)(Zi),Ii=!!Bn.store&&!!Bn.store.getState&&!!Bn.store.dispatch,ra=!!ji&&!!ji.store,ba=Ii?Bn.store:ji.store,Jo=(0,D.useMemo)(function(){return ti(ba)},[ba]),Yo=(0,D.useMemo)(function(){if(!I)return Q;var Os=R(ba,Ii?null:ji.subscription),Fc=Os.notifyNestedSubs.bind(Os);return[Os,Fc]},[ba,Ii,ji]),Eo=Yo[0],Tl=Yo[1],Pl=(0,D.useMemo)(function(){return Ii?ji:(0,V.Z)({},ji,{subscription:Eo})},[Ii,ji,Eo]),yd=(0,D.useReducer)(We,K,ye),X0=yd[0],Rl=X0[0],xd=yd[1];if(Rl&&Rl.error)throw Rl.error;var wd=(0,D.useRef)(),Oc=(0,D.useRef)(ta),Ol=(0,D.useRef)(),Sd=(0,D.useRef)(!1),Nc=Si(function(){return Ol.current&&ta===Oc.current?Ol.current:Jo(ba.getState(),ta)},[ba,Rl,ta]);de(ut,[Oc,wd,Sd,ta,Nc,Ol,Tl]),de(lt,[I,ba,Eo,Jo,Oc,wd,Sd,Ol,Tl,xd],[ba,Eo,Jo]);var Nl=(0,D.useMemo)(function(){return D.createElement(Zt,(0,V.Z)({},Nc,{ref:Rs}))},[Rs,Zt,Nc]),J0=(0,D.useMemo)(function(){return I?D.createElement(Zi.Provider,{value:Pl},Nl):Nl},[Zi,Nl,Pl]);return J0}var _i=Qr?D.memo(pi):pi;if(_i.WrappedComponent=Zt,_i.displayName=pi.displayName=Lr,Qe){var ga=D.forwardRef(function(Ua,va){return D.createElement(_i,(0,V.Z)({},Ua,{reactReduxForwardedRef:va}))});return ga.displayName=Lr,ga.WrappedComponent=Zt,Nt()(ga,Zt)}return Nt()(_i,Zt)}}function et(o,l){return o===l?o!==0||l!==0||1/o===1/l:o!==o&&l!==l}function j(o,l){if(et(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])||!et(o[c[m]],l[c[m]]))return!1;return!0}function Fe(o,l){var c={},f=function(v){var y=o[v];typeof y=="function"&&(c[v]=function(){return l(y.apply(void 0,arguments))})};for(var m in o)f(m);return c}function Xe(o){return function(c,f){var m=o(c,f);function g(){return m}return g.dependsOnOwnProps=!1,g}}function F(o){return o.dependsOnOwnProps!==null&&o.dependsOnOwnProps!==void 0?!!o.dependsOnOwnProps:o.length!==1}function Se(o,l){return function(f,m){var g=m.displayName,v=function(E,T){return v.dependsOnOwnProps?v.mapToProps(E,T):v.mapToProps(E)};return v.dependsOnOwnProps=!0,v.mapToProps=function(E,T){v.mapToProps=o,v.dependsOnOwnProps=F(o);var I=v(E,T);return typeof I=="function"&&(v.mapToProps=I,v.dependsOnOwnProps=F(I),I=v(E,T)),I},v}}function be(o){return typeof o=="function"?Se(o,"mapDispatchToProps"):void 0}function q(o){return o?void 0:Xe(function(l){return{dispatch:l}})}function Oe(o){return o&&typeof o=="object"?Xe(function(l){return Fe(o,l)}):void 0}var Ae=[be,q,Oe];function Le(o){return typeof o=="function"?Se(o,"mapStateToProps"):void 0}function ue(o){return o?void 0:Xe(function(){return{}})}var ot=[Le,ue];function dt(o,l,c){return(0,V.Z)({},c,o,l)}function Ft(o){return function(c,f){var m=f.displayName,g=f.pure,v=f.areMergedPropsEqual,y=!1,E;return function(I,x,k){var P=o(I,x,k);return y?(!g||!v(P,E))&&(E=P):(y=!0,E=P),E}}}function Ht(o){return typeof o=="function"?Ft(o):void 0}function St(o){return o?void 0:function(){return dt}}var Jt=[Ht,St],zt=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function tr(o,l,c,f){return function(g,v){return c(o(g,v),l(f,v),v)}}function Lt(o,l,c,f,m){var g=m.areStatesEqual,v=m.areOwnPropsEqual,y=m.areStatePropsEqual,E=!1,T,I,x,k,P;function te(Et,Tt){return T=Et,I=Tt,x=o(T,I),k=l(f,I),P=c(x,k,I),E=!0,P}function Ve(){return x=o(T,I),l.dependsOnOwnProps&&(k=l(f,I)),P=c(x,k,I),P}function Qe(){return o.dependsOnOwnProps&&(x=o(T,I)),l.dependsOnOwnProps&&(k=l(f,I)),P=c(x,k,I),P}function rt(){var Et=o(T,I),Tt=!y(Et,x);return x=Et,Tt&&(P=c(x,k,I)),P}function ft(Et,Tt){var fr=!v(Tt,I),er=!g(Et,T,Tt,I);return T=Et,I=Tt,fr&&er?Ve():fr?Qe():er?rt():P}return function(Tt,fr){return E?ft(Tt,fr):te(Tt,fr)}}function ae(o,l){var c=l.initMapStateToProps,f=l.initMapDispatchToProps,m=l.initMergeProps,g=(0,qe.Z)(l,zt),v=c(o,g),y=f(o,g),E=m(o,g),T=g.pure?Lt:tr;return T(v,y,E,o,g)}var Z=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function z(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 pe(o){var l=o===void 0?{}:o,c=l.connectHOC,f=c===void 0?xe:c,m=l.mapStateToPropsFactories,g=m===void 0?ot:m,v=l.mapDispatchToPropsFactories,y=v===void 0?Ae:v,E=l.mergePropsFactories,T=E===void 0?Jt:E,I=l.selectorFactory,x=I===void 0?ae:I;return function(P,te,Ve,Qe){Qe===void 0&&(Qe={});var rt=Qe,ft=rt.pure,Et=ft===void 0?!0:ft,Tt=rt.areStatesEqual,fr=Tt===void 0?he:Tt,er=rt.areOwnPropsEqual,Zt=er===void 0?j:er,ln=rt.areStatePropsEqual,Lr=ln===void 0?j:ln,Yr=rt.areMergedPropsEqual,Qr=Yr===void 0?j:Yr,ti=(0,qe.Z)(rt,Z),Si=z(P,g,"mapStateToProps"),pi=z(te,y,"mapDispatchToProps"),_i=z(Ve,T,"mergeProps");return f(x,(0,V.Z)({methodName:"connect",getDisplayName:function(Bn){return"Connect("+Bn+")"},shouldHandleStateChanges:!!P,initMapStateToProps:Si,initMapDispatchToProps:pi,initMergeProps:_i,pure:Et,areStatesEqual:fr,areOwnPropsEqual:Zt,areStatePropsEqual:Lr,areMergedPropsEqual:Qr},ti))}}var Ne=pe();function ne(){var o=useContext(ReactReduxContext);return o}function ie(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 Je=null;function tt(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultStore:createStoreHook(o);return function(){var f=l();return f.dispatch}}var at=null,Mt=function(l,c){return l===c};function Bt(o,l,c,f){var m=useReducer(function(te){return te+1},0),g=m[1],v=useMemo(function(){return createSubscription(c,f)},[c,f]),y=useRef(),E=useRef(),T=useRef(),I=useRef(),x=c.getState(),k;try{if(o!==E.current||x!==T.current||y.current){var P=o(x);I.current===void 0||!l(P,I.current)?k=P:k=I.current}else k=I.current}catch(te){throw y.current&&(te.message+=`
|
|
|
The error may be correlated with this previous error:
|
|
|
`+y.current.stack+`
|
|
|
|
|
|
`),te}return useIsomorphicLayoutEffect(function(){E.current=o,T.current=x,I.current=k,y.current=void 0}),useIsomorphicLayoutEffect(function(){function te(){try{var Ve=c.getState();if(Ve===T.current)return;var Qe=E.current(Ve);if(l(Qe,I.current))return;I.current=Qe,T.current=Ve}catch(rt){y.current=rt}g()}return v.onStateChange=te,v.trySubscribe(),te(),function(){return v.tryUnsubscribe()}},[c,v]),k}function W(o){o===void 0&&(o=ReactReduxContext);var l=o===ReactReduxContext?useDefaultReduxContext:function(){return useContext(o)};return function(f,m){m===void 0&&(m=Mt);var g=l(),v=g.store,y=g.subscription,E=Bt(f,m,v,y);return useDebugValue(E),E}}var _t=null,vt=w(4676);_(vt.unstable_batchedUpdates);function N(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 X(o,l){var c=(0,D.useState)(function(){return{inputs:l,result:o()}})[0],f=(0,D.useRef)(!0),m=(0,D.useRef)(c),g=f.current||!!(l&&m.current.inputs&&N(l,m.current.inputs)),v=g?m.current:{inputs:l,result:o()};return(0,D.useEffect)(function(){f.current=!1,m.current=v},[v]),v.result}function fe(o,l){return X(function(){return o},l)}var De=X,Me=fe,pt=!0,Yt="Invariant failed";function Wt(o,l){if(!o){if(pt)throw new Error(Yt);var c=typeof l=="function"?l():l,f=c?"".concat(Yt,": ").concat(c):Yt;throw new Error(f)}}var Dt=function(l){var c=l.top,f=l.right,m=l.bottom,g=l.left,v=f-g,y=m-c,E={top:c,right:f,bottom:m,left:g,width:v,height:y,x:g,y:c,center:{x:(f+g)/2,y:(m+c)/2}};return E},lr=function(l,c){return{top:l.top-c.top,left:l.left-c.left,bottom:l.bottom+c.bottom,right:l.right+c.right}},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.y,left:l.left+c.x,bottom:l.bottom+c.y,right:l.right+c.x}},gr={top:0,right:0,bottom:0,left:0},pr=function(l){var c=l.borderBox,f=l.margin,m=f===void 0?gr:f,g=l.border,v=g===void 0?gr:g,y=l.padding,E=y===void 0?gr:y,T=Dt(lr(c,m)),I=Dt(nr(c,v)),x=Dt(nr(I,E));return{marginBox:T,borderBox:Dt(c),paddingBox:I,contentBox:x,margin:m,border:v,padding:E}},wr=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},rn=function(){return{x:window.pageXOffset,y:window.pageYOffset}},ir=function(l,c){var f=l.borderBox,m=l.border,g=l.margin,v=l.padding,y=Ct(f,c);return pr({borderBox:y,border:m,margin:g,padding:v})},an=function(l,c){return c===void 0&&(c=rn()),ir(l,c)},jt=function(l,c){var f={top:wr(c.marginTop),right:wr(c.marginRight),bottom:wr(c.marginBottom),left:wr(c.marginLeft)},m={top:wr(c.paddingTop),right:wr(c.paddingRight),bottom:wr(c.paddingBottom),left:wr(c.paddingLeft)},g={top:wr(c.borderTopWidth),right:wr(c.borderRightWidth),bottom:wr(c.borderBottomWidth),left:wr(c.borderLeftWidth)};return pr({borderBox:l,margin:f,padding:m,border:g})},un=function(l){var c=l.getBoundingClientRect(),f=window.getComputedStyle(l);return jt(c,f)},jr=Number.isNaN||function(l){return typeof l=="number"&&l!==l};function pn(o,l){return!!(o===l||jr(o)&&jr(l))}function qr(o,l){if(o.length!==l.length)return!1;for(var c=0;c<o.length;c++)if(!pn(o[c],l[c]))return!1;return!0}function Sr(o,l){l===void 0&&(l=qr);var c,f=[],m,g=!1;function v(){for(var y=[],E=0;E<arguments.length;E++)y[E]=arguments[E];return g&&c===this&&l(y,f)||(m=o.apply(this,y),g=!0,c=this,f=y),m}return v}var cr=Sr,Zn=function(l){var c=[],f=null,m=function(){for(var v=arguments.length,y=new Array(v),E=0;E<v;E++)y[E]=arguments[E];c=y,!f&&(f=requestAnimationFrame(function(){f=null,l.apply(void 0,c)}))};return m.cancel=function(){f&&(cancelAnimationFrame(f),f=null)},m},mn=Zn,ci=!0,yn=/[ \t]{2,}/g,jn=/^[ \t]*/gm,C=function(l){return l.replace(yn," ").replace(jn,"").trim()},L=function(l){return C(`
|
|
|
%creact-beautiful-dnd
|
|
|
|
|
|
%c`+C(l)+`
|
|
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
|
`)},Be=function(l){return[L(l),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},Pe="__react-beautiful-dnd-disable-dev-warnings";function Te(o,l){var c;ci||typeof window!="undefined"&&window[Pe]||(c=console)[o].apply(c,Be(l))}var Ke=Te.bind(null,"warn"),xt=Te.bind(null,"error");function nt(){}function It(o,l){return(0,V.Z)({},o,{},l)}function Pt(o,l,c){var f=l.map(function(m){var g=It(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 ur=!0,$t="Invariant failed";function At(o){this.message=o}At.prototype.toString=function(){return this.message};function ge(o,l){if(!o)throw ur?new At($t):new At($t+": "+(l||""))}var Mr=function(o){(0,U.Z)(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=nt,f.onWindowError=function(y){var E=f.getCallbacks();E.isDragging()&&E.tryAbort();var T=y.error;T instanceof At&&y.preventDefault()},f.getCallbacks=function(){if(!f.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return f.callbacks},f.setCallbacks=function(y){f.callbacks=y},f}var c=l.prototype;return c.componentDidMount=function(){this.unbind=Pt(window,[{eventName:"error",fn:this.onWindowError}])},c.componentWillUnmount=function(){this.unbind()},c.componentDidCatch=function(m){if(m instanceof At){this.setState({});return}throw m},c.render=function(){return this.props.children(this.setCallbacks)},l}(D.Component),Nr=`
|
|
|
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
|
|
|
`,Cr=function(l){return l+1},vr=function(l){return`
|
|
|
You have lifted an item in position `+Cr(l.source.index)+`
|
|
|
`},Fr=function(l,c){var f=l.droppableId===c.droppableId,m=Cr(l.index),g=Cr(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+`
|
|
|
`},br=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+`
|
|
|
`},Vr=function(l){var c=l.destination;if(c)return Fr(l.source,c);var f=l.combine;return f?br(l.draggableId,l.source,f):"You are over an area that cannot be dropped on"},oe=function(l){return`
|
|
|
The item has returned to its starting position
|
|
|
of `+Cr(l.index)+`
|
|
|
`},J=function(l){if(l.reason==="CANCEL")return`
|
|
|
Movement cancelled.
|
|
|
`+oe(l.source)+`
|
|
|
`;var c=l.destination,f=l.combine;return c?`
|
|
|
You have dropped the item.
|
|
|
`+Fr(l.source,c)+`
|
|
|
`:f?`
|
|
|
You have dropped the item.
|
|
|
`+br(l.draggableId,l.source,f)+`
|
|
|
`:`
|
|
|
The item has been dropped while not over a drop area.
|
|
|
`+oe(l.source)+`
|
|
|
`},ve={dragHandleUsageInstructions:Nr,onDragStart:vr,onDragUpdate:Vr,onDragEnd:J},we={x:0,y:0},G=function(l,c){return{x:l.x+c.x,y:l.y+c.y}},le=function(l,c){return{x:l.x-c.x,y:l.y-c.y}},ce=function(l,c){return l.x===c.x&&l.y===c.y},Ie=function(l){return{x:l.x!==0?-l.x:0,y:l.y!==0?-l.y:0}},st=function(l,c,f){var m;return f===void 0&&(f=0),m={},m[l]=c,m[l==="x"?"y":"x"]=f,m},ct=function(l,c){return Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2))},Ut=function(l,c){return Math.min.apply(Math,c.map(function(f){return ct(l,f)}))},ar=function(l){return function(c){return{x:l(c.x),y:l(c.y)}}},xr=function(o,l){var c=Dt({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},dr=function(l,c){return{top:l.top+c.y,left:l.left+c.x,bottom:l.bottom+c.y,right:l.right+c.x}},or=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},Tr=function(l,c){return c?dr(l,c.scroll.diff.displacement):l},Gt=function(l,c,f){if(f&&f.increasedBy){var m;return(0,V.Z)({},l,(m={},m[c.end]=l[c.end]+f.increasedBy[c.line],m))}return l},qt=function(l,c){return c&&c.shouldClipSubject?xr(c.pageMarginBox,l):Dt(l)},Vt=function(o){var l=o.page,c=o.withPlaceholder,f=o.axis,m=o.frame,g=Tr(l.marginBox,m),v=Gt(g,f,c),y=qt(v,m);return{page:l,withPlaceholder:c,active:y}},Xt=function(o,l){o.frame||ge(!1);var c=o.frame,f=le(l,c.scroll.initial),m=Ie(f),g=(0,V.Z)({},c,{scroll:{initial:c.scroll.initial,current:l,diff:{value:f,displacement:m},max:c.scroll.max}}),v=Vt({page:o.subject.page,withPlaceholder:o.subject.withPlaceholder,axis:o.axis,frame:g}),y=(0,V.Z)({},o,{frame:g,subject:v});return y};function Qt(o){return Number.isInteger?Number.isInteger(o):typeof o=="number"&&isFinite(o)&&Math.floor(o)===o}function sr(o){return Object.values?Object.values(o):Object.keys(o).map(function(l){return o[l]})}function Pr(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 mr(o,l){if(o.find)return o.find(l);var c=Pr(o,l);if(c!==-1)return o[c]}function Kt(o){return Array.prototype.slice.call(o)}var ht=cr(function(o){return o.reduce(function(l,c){return l[c.descriptor.id]=c,l},{})}),rr=cr(function(o){return o.reduce(function(l,c){return l[c.descriptor.id]=c,l},{})}),Rt=cr(function(o){return sr(o)}),Er=cr(function(o){return sr(o)}),Ur=cr(function(o,l){var c=Er(l).filter(function(f){return o===f.descriptor.droppableId}).sort(function(f,m){return f.descriptor.index-m.descriptor.index});return c});function hr(o){return o.at&&o.at.type==="REORDER"?o.at.destination:null}function Xr(o){return o.at&&o.at.type==="COMBINE"?o.at.combine:null}var Rr=cr(function(o,l){return l.filter(function(c){return c.descriptor.id!==o.descriptor.id})}),ni=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=hr(g);if(!v)return null;function y(Ve){var Qe={type:"COMBINE",combine:{draggableId:Ve,droppableId:f.descriptor.id}};return(0,V.Z)({},g,{at:Qe})}var E=g.displaced.all,T=E.length?E[0]:null;if(l)return T?y(T):null;var I=Rr(c,m);if(!T){if(!I.length)return null;var x=I[I.length-1];return y(x.descriptor.id)}var k=Pr(I,function(Ve){return Ve.descriptor.id===T});k===-1&&ge(!1);var P=k-1;if(P<0)return null;var te=I[P];return y(te.descriptor.id)},_n=function(o,l){return o.descriptor.droppableId===l.descriptor.id},kn={point:we,value:0},Dn={invisible:{},visible:{},all:[]},Un={displaced:Dn,displacedBy:kn,at:null},on=function(o,l){return function(c){return o<=c&&c<=l}},mi=function(o){var l=on(o.top,o.bottom),c=on(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),y=g&&v;if(y)return!0;var E=f.top<o.top&&f.bottom>o.bottom,T=f.left<o.left&&f.right>o.right,I=E&&T;if(I)return!0;var x=E&&v||T&&g;return x}},Ci=function(o){var l=on(o.top,o.bottom),c=on(o.left,o.right);return function(f){var m=l(f.top)&&l(f.bottom)&&c(f.left)&&c(f.right);return m}},Ir={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Tn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Mn=function(o){return function(l){var c=on(l.top,l.bottom),f=on(l.left,l.right);return function(m){return o===Ir?c(m.top)&&c(m.bottom):f(m.left)&&f(m.right)}}},Pn=function(l,c){var f=c.frame?c.frame.scroll.diff.displacement:we;return dr(l,f)},gi=function(l,c,f){return c.subject.active?f(c.subject.active)(l):!1},xn=function(l,c,f){return f(c)(l)},Gn=function(l){var c=l.target,f=l.destination,m=l.viewport,g=l.withDroppableDisplacement,v=l.isVisibleThroughFrameFn,y=g?Pn(c,f):c;return gi(y,f,v)&&xn(y,m,v)},ui=function(l){return Gn((0,V.Z)({},l,{isVisibleThroughFrameFn:mi}))},Ei=function(l){return Gn((0,V.Z)({},l,{isVisibleThroughFrameFn:Ci}))},qn=function(l){return Gn((0,V.Z)({},l,{isVisibleThroughFrameFn:Mn(l.destination.axis)}))},vi=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 Gi(o,l){var c=o.page.marginBox,f={top:l.point.y,right:0,bottom:0,left:l.point.x};return Dt(lr(c,f))}function Xn(o){var l=o.afterDragging,c=o.destination,f=o.displacedBy,m=o.viewport,g=o.forceShouldAnimate,v=o.last;return l.reduce(function(E,T){var I=Gi(T,f),x=T.descriptor.id;E.all.push(x);var k=ui({target:I,destination:c,viewport:m,withDroppableDisplacement:!0});if(!k)return E.invisible[T.descriptor.id]=!0,E;var P=vi(x,v,g),te={draggableId:x,shouldAnimate:P};return E.visible[x]=te,E},{all:[],visible:{},invisible:{}})}function Sa(o,l){if(!o.length)return 0;var c=o[o.length-1].descriptor.index;return l.inHomeList?c:c+1}function Pi(o){var l=o.insideDestination,c=o.inHomeList,f=o.displacedBy,m=o.destination,g=Sa(l,{inHomeList:c});return{displaced:Dn,displacedBy:f,at:{type:"REORDER",destination:{droppableId:m.descriptor.id,index:g}}}}function bi(o){var l=o.draggable,c=o.insideDestination,f=o.destination,m=o.viewport,g=o.displacedBy,v=o.last,y=o.index,E=o.forceShouldAnimate,T=_n(l,f);if(y==null)return Pi({insideDestination:c,inHomeList:T,displacedBy:g,destination:f});var I=mr(c,function(Ve){return Ve.descriptor.index===y});if(!I)return Pi({insideDestination:c,inHomeList:T,displacedBy:g,destination:f});var x=Rr(l,c),k=c.indexOf(I),P=x.slice(k),te=Xn({afterDragging:P,destination:f,displacedBy:g,last:v,viewport:m.frame,forceShouldAnimate:E});return{displaced:te,displacedBy:g,at:{type:"REORDER",destination:{droppableId:f.descriptor.id,index:y}}}}function $n(o,l){return!!l.effected[o]}var Rn=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,y=f[v],E=y.descriptor.index,T=$n(v,g);return T?l?E:E-1:l?E+1:E},_a=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,y=f[0].descriptor.index,E=f[f.length-1].descriptor.index,T=c?E:E+1;return v<y||v>T?null:v},ki=function(o){var l=o.isMovingForward,c=o.isInHomeList,f=o.draggable,m=o.draggables,g=o.destination,v=o.insideDestination,y=o.previousImpact,E=o.viewport,T=o.afterCritical,I=y.at;if(I||ge(!1),I.type==="REORDER"){var x=_a({isMovingForward:l,isInHomeList:c,location:I.destination,insideDestination:v});return x==null?null:bi({draggable:f,insideDestination:v,destination:g,viewport:E,last:y.displaced,displacedBy:y.displacedBy,index:x})}var k=Rn({isMovingForward:l,destination:g,displaced:y.displaced,draggables:m,combine:I.combine,afterCritical:T});return k==null?null:bi({draggable:f,insideDestination:v,destination:g,viewport:E,last:y.displaced,displacedBy:y.displacedBy,index:k})},Ri=function(o){var l=o.displaced,c=o.afterCritical,f=o.combineWith,m=o.displacedBy,g=!!(l.visible[f]||l.invisible[f]);return $n(f,c)?g?we:Ie(m.point):g?m.point:we},yi=function(o){var l=o.afterCritical,c=o.impact,f=o.draggables,m=Xr(c);m||ge(!1);var g=m.draggableId,v=f[g].page.borderBox.center,y=Ri({displaced:c.displaced,afterCritical:l,combineWith:g,displacedBy:c.displacedBy});return G(v,y)},Oi=function(l,c){return c.margin[l.start]+c.borderBox[l.size]/2},Ni=function(l,c){return c.margin[l.end]+c.borderBox[l.size]/2},Di=function(l,c,f){return c[l.crossAxisStart]+f.margin[l.crossAxisStart]+f.borderBox[l.crossAxisSize]/2},qi=function(l){var c=l.axis,f=l.moveRelativeTo,m=l.isMoving;return st(c.line,f.marginBox[c.end]+Oi(c,m),Di(c,f.marginBox,m))},Fi=function(l){var c=l.axis,f=l.moveRelativeTo,m=l.isMoving;return st(c.line,f.marginBox[c.start]-Ni(c,m),Di(c,f.marginBox,m))},An=function(l){var c=l.axis,f=l.moveInto,m=l.isMoving;return st(c.line,f.contentBox[c.start]+Oi(c,m),Di(c,f.contentBox,m))},di=function(o){var l=o.impact,c=o.draggable,f=o.draggables,m=o.droppable,g=o.afterCritical,v=Ur(m.descriptor.id,f),y=c.page,E=m.axis;if(!v.length)return An({axis:E,moveInto:m.page,isMoving:y});var T=l.displaced,I=l.displacedBy,x=T.all[0];if(x){var k=f[x];if($n(x,g))return Fi({axis:E,moveRelativeTo:k.page,isMoving:y});var P=ir(k.page,I.point);return Fi({axis:E,moveRelativeTo:P,isMoving:y})}var te=v[v.length-1];if(te.descriptor.id===c.descriptor.id)return y.borderBox.center;if($n(te.descriptor.id,g)){var Ve=ir(te.page,Ie(g.displacedBy.point));return qi({axis:E,moveRelativeTo:Ve,isMoving:y})}return qi({axis:E,moveRelativeTo:te.page,isMoving:y})},Jn=function(o,l){var c=o.frame;return c?G(l,c.scroll.diff.displacement):l},Yn=function(l){var c=l.impact,f=l.draggable,m=l.droppable,g=l.draggables,v=l.afterCritical,y=f.page.borderBox.center,E=c.at;return!m||!E?y:E.type==="REORDER"?di({impact:c,draggable:f,draggables:g,droppable:m,afterCritical:v}):yi({impact:c,draggables:g,afterCritical:v})},Cn=function(o){var l=Yn(o),c=o.droppable,f=c?Jn(c,l):l;return f},sa=function(o,l){var c=le(l,o.scroll.initial),f=Ie(c),m=Dt({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 zr(o,l){return o.map(function(c){return l[c]})}function kr(o,l){for(var c=0;c<l.length;c++){var f=l[c].visible[o];if(f)return f}return null}var fn=function(o){var l=o.impact,c=o.viewport,f=o.destination,m=o.draggables,g=o.maxScrollChange,v=sa(c,G(c.scroll.current,g)),y=f.frame?Xt(f,G(f.frame.scroll.current,g)):f,E=l.displaced,T=Xn({afterDragging:zr(E.all,m),destination:f,displacedBy:l.displacedBy,viewport:v.frame,last:E,forceShouldAnimate:!1}),I=Xn({afterDragging:zr(E.all,m),destination:y,displacedBy:l.displacedBy,viewport:c.frame,last:E,forceShouldAnimate:!1}),x={},k={},P=[E,T,I];E.all.forEach(function(Ve){var Qe=kr(Ve,P);if(Qe){k[Ve]=Qe;return}x[Ve]=!0});var te=(0,V.Z)({},l,{displaced:{all:E.all,invisible:x,visible:k}});return te},En=function(o,l){return G(o.scroll.diff.displacement,l)},On=function(o){var l=o.pageBorderBoxCenter,c=o.draggable,f=o.viewport,m=En(f,l),g=le(m,c.page.borderBox.center);return G(c.client.borderBox.center,g)},Nn=function(o){var l=o.draggable,c=o.destination,f=o.newPageBorderBoxCenter,m=o.viewport,g=o.withDroppableDisplacement,v=o.onlyOnMainAxis,y=v===void 0?!1:v,E=le(f,l.page.borderBox.center),T=dr(l.page.borderBox,E),I={target:T,destination:c,withDroppableDisplacement:g,viewport:m};return y?qn(I):Ei(I)},oo=function(o){var l=o.isMovingForward,c=o.draggable,f=o.destination,m=o.draggables,g=o.previousImpact,v=o.viewport,y=o.previousPageBorderBoxCenter,E=o.previousClientSelection,T=o.afterCritical;if(!f.isEnabled)return null;var I=Ur(f.descriptor.id,m),x=_n(c,f),k=ni({isMovingForward:l,draggable:c,destination:f,insideDestination:I,previousImpact:g})||ki({isMovingForward:l,isInHomeList:x,draggable:c,draggables:m,destination:f,insideDestination:I,previousImpact:g,viewport:v,afterCritical:T});if(!k)return null;var P=Cn({impact:k,draggable:c,droppable:f,draggables:m,afterCritical:T}),te=Nn({draggable:c,destination:f,newPageBorderBoxCenter:P,viewport:v.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(te){var Ve=On({pageBorderBoxCenter:P,draggable:c,viewport:v});return{clientSelection:Ve,impact:k,scrollJumpRequest:null}}var Qe=le(P,y),rt=fn({impact:k,viewport:v,destination:f,draggables:m,maxScrollChange:Qe});return{clientSelection:E,impact:rt,scrollJumpRequest:Qe}},Fn=function(l){var c=l.subject.active;return c||ge(!1),c},is=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 y=f.axis,E=on(v[y.start],v[y.end]),T=Rt(m).filter(function(x){return x!==f}).filter(function(x){return x.isEnabled}).filter(function(x){return!!x.subject.active}).filter(function(x){return mi(g.frame)(Fn(x))}).filter(function(x){var k=Fn(x);return l?v[y.crossAxisEnd]<k[y.crossAxisEnd]:k[y.crossAxisStart]<v[y.crossAxisStart]}).filter(function(x){var k=Fn(x),P=on(k[y.start],k[y.end]);return E(k[y.start])||E(k[y.end])||P(v[y.start])||P(v[y.end])}).sort(function(x,k){var P=Fn(x)[y.crossAxisStart],te=Fn(k)[y.crossAxisStart];return l?P-te:te-P}).filter(function(x,k,P){return Fn(x)[y.crossAxisStart]===Fn(P[0])[y.crossAxisStart]});if(!T.length)return null;if(T.length===1)return T[0];var I=T.filter(function(x){var k=on(Fn(x)[y.start],Fn(x)[y.end]);return k(c[y.line])});return I.length===1?I[0]:I.length>1?I.sort(function(x,k){return Fn(x)[y.start]-Fn(k)[y.start]})[0]:T.sort(function(x,k){var P=Ut(c,or(Fn(x))),te=Ut(c,or(Fn(k)));return P!==te?P-te:Fn(x)[y.start]-Fn(k)[y.start]})[0]},zi=function(l,c){var f=l.page.borderBox.center;return $n(l.descriptor.id,c)?le(f,c.displacedBy.point):f},Xs=function(l,c){var f=l.page.borderBox;return $n(l.descriptor.id,c)?dr(f,Ie(c.displacedBy.point)):f},Xi=function(o){var l=o.pageBorderBoxCenter,c=o.viewport,f=o.destination,m=o.insideDestination,g=o.afterCritical,v=m.filter(function(y){return Ei({target:Xs(y,g),destination:f,viewport:c.frame,withDroppableDisplacement:!0})}).sort(function(y,E){var T=ct(l,Jn(f,zi(y,g))),I=ct(l,Jn(f,zi(E,g)));return T<I?-1:I<T?1:y.descriptor.index-E.descriptor.index});return v[0]||null},Ai=cr(function(l,c){var f=c[l.line];return{value:f,point:st(l.line,f)}}),xi=function(l,c,f){var m=l.axis;if(l.descriptor.mode==="virtual")return st(m.line,c[m.line]);var g=l.subject.page.contentBox[m.size],v=Ur(l.descriptor.id,f),y=v.reduce(function(I,x){return I+x.client.marginBox[m.size]},0),E=y+c[m.line],T=E-g;return T<=0?null:st(m.line,T)},la=function(l,c){return(0,V.Z)({},l,{scroll:(0,V.Z)({},l.scroll,{max:c})})},ca=function(l,c,f){var m=l.frame;_n(c,l)&&ge(!1),l.subject.withPlaceholder&&ge(!1);var g=Ai(l.axis,c.displaceBy).point,v=xi(l,g,f),y={placeholderSize:g,increasedBy:v,oldFrameMaxScroll:l.frame?l.frame.scroll.max:null};if(!m){var E=Vt({page:l.subject.page,withPlaceholder:y,axis:l.axis,frame:l.frame});return(0,V.Z)({},l,{subject:E})}var T=v?G(m.scroll.max,v):m.scroll.max,I=la(m,T),x=Vt({page:l.subject.page,withPlaceholder:y,axis:l.axis,frame:I});return(0,V.Z)({},l,{subject:x,frame:I})},$a=function(l){var c=l.subject.withPlaceholder;c||ge(!1);var f=l.frame;if(!f){var m=Vt({page:l.subject.page,axis:l.axis,frame:null,withPlaceholder:null});return(0,V.Z)({},l,{subject:m})}var g=c.oldFrameMaxScroll;g||ge(!1);var v=la(f,g),y=Vt({page:l.subject.page,axis:l.axis,frame:v,withPlaceholder:null});return(0,V.Z)({},l,{subject:y,frame:v})},so=function(o){var l=o.previousPageBorderBoxCenter,c=o.moveRelativeTo,f=o.insideDestination,m=o.draggable,g=o.draggables,v=o.destination,y=o.viewport,E=o.afterCritical;if(!c){if(f.length)return null;var T={displaced:Dn,displacedBy:kn,at:{type:"REORDER",destination:{droppableId:v.descriptor.id,index:0}}},I=Cn({impact:T,draggable:m,droppable:v,draggables:g,afterCritical:E}),x=_n(m,v)?v:ca(v,m,g),k=Nn({draggable:m,destination:x,newPageBorderBoxCenter:I,viewport:y.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return k?T:null}var P=l[v.axis.line]<=c.page.borderBox.center[v.axis.line],te=function(){var Qe=c.descriptor.index;return c.descriptor.id===m.descriptor.id||P?Qe:Qe+1}(),Ve=Ai(v.axis,m.displaceBy);return bi({draggable:m,insideDestination:f,destination:v,viewport:y,displacedBy:Ve,last:Dn,index:te})},lo=function(o){var l=o.isMovingForward,c=o.previousPageBorderBoxCenter,f=o.draggable,m=o.isOver,g=o.draggables,v=o.droppables,y=o.viewport,E=o.afterCritical,T=is({isMovingForward:l,pageBorderBoxCenter:c,source:m,droppables:v,viewport:y});if(!T)return null;var I=Ur(T.descriptor.id,g),x=Xi({pageBorderBoxCenter:c,viewport:y,destination:T,insideDestination:I,afterCritical:E}),k=so({previousPageBorderBoxCenter:c,destination:T,draggable:f,draggables:g,moveRelativeTo:x,insideDestination:I,viewport:y,afterCritical:E});if(!k)return null;var P=Cn({impact:k,draggable:f,droppable:T,draggables:g,afterCritical:E}),te=On({pageBorderBoxCenter:P,draggable:f,viewport:y});return{clientSelection:te,impact:k,scrollJumpRequest:null}},hn=function(o){var l=o.at;return l?l.type==="REORDER"?l.destination.droppableId:l.combine.droppableId:null},Ki=function(l,c){var f=hn(l);return f?c[f]:null},vn=function(o){var l=o.state,c=o.type,f=Ki(l.impact,l.dimensions.droppables),m=!!f,g=l.dimensions.droppables[l.critical.droppable.id],v=f||g,y=v.axis.direction,E=y==="vertical"&&(c==="MOVE_UP"||c==="MOVE_DOWN")||y==="horizontal"&&(c==="MOVE_LEFT"||c==="MOVE_RIGHT");if(E&&!m)return null;var T=c==="MOVE_DOWN"||c==="MOVE_RIGHT",I=l.dimensions.draggables[l.critical.draggable.id],x=l.current.page.borderBoxCenter,k=l.dimensions,P=k.draggables,te=k.droppables;return E?oo({isMovingForward:T,previousPageBorderBoxCenter:x,draggable:I,destination:v,draggables:P,viewport:l.viewport,previousClientSelection:l.current.client.selection,previousImpact:l.impact,afterCritical:l.afterCritical}):lo({isMovingForward:T,previousPageBorderBoxCenter:x,draggable:I,isOver:v,draggables:P,droppables:te,viewport:l.viewport,afterCritical:l.afterCritical})};function fi(o){return o.phase==="DRAGGING"||o.phase==="COLLECTING"}function Bo(o){var l=on(o.top,o.bottom),c=on(o.left,o.right);return function(m){return l(m.y)&&c(m.x)}}function Ta(o,l){return o.left<l.right&&o.right>l.left&&o.top<l.bottom&&o.bottom>l.top}function Js(o){var l=o.pageBorderBox,c=o.draggable,f=o.candidates,m=c.page.borderBox.center,g=f.map(function(v){var y=v.axis,E=st(v.axis.line,l.center[y.line],v.page.borderBox.center[y.crossAxisLine]);return{id:v.descriptor.id,distance:ct(m,E)}}).sort(function(v,y){return y.distance-v.distance});return g[0]?g[0].id:null}function as(o){var l=o.pageBorderBox,c=o.draggable,f=o.droppables,m=Rt(f).filter(function(g){if(!g.isEnabled)return!1;var v=g.subject.active;if(!v||!Ta(l,v))return!1;if(Bo(v)(l.center))return!0;var y=g.axis,E=v.center[y.crossAxisLine],T=l[y.crossAxisStart],I=l[y.crossAxisEnd],x=on(v[y.crossAxisStart],v[y.crossAxisEnd]),k=x(T),P=x(I);return!k&&!P?!0:k?T<E:I>E});return m.length?m.length===1?m[0].descriptor.id:Js({pageBorderBox:l,draggable:c,candidates:m}):null}var hi=function(l,c){return Dt(dr(l,c))},Ys=function(o,l){var c=o.frame;return c?hi(l,c.scroll.diff.value):l};function os(o){var l=o.displaced,c=o.id;return!!(l.visible[c]||l.invisible[c])}function Qs(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 ss=function(o){var l=o.pageBorderBoxWithDroppableScroll,c=o.draggable,f=o.destination,m=o.insideDestination,g=o.last,v=o.viewport,y=o.afterCritical,E=f.axis,T=Ai(f.axis,c.displaceBy),I=T.value,x=l[E.start],k=l[E.end],P=Rr(c,m),te=mr(P,function(Qe){var rt=Qe.descriptor.id,ft=Qe.page.borderBox.center[E.line],Et=$n(rt,y),Tt=os({displaced:g,id:rt});return Et?Tt?k<=ft:x<ft-I:Tt?k<=ft+I:x<ft}),Ve=Qs({draggable:c,closest:te,inHomeList:_n(c,f)});return bi({draggable:c,insideDestination:m,destination:f,viewport:v,last:g,displacedBy:T,index:Ve})},Pa=4,co=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 y=m.axis,E=Ai(m.axis,l.displaceBy),T=E.value,I=c[y.start],x=c[y.end],k=Rr(l,g),P=mr(k,function(Ve){var Qe=Ve.descriptor.id,rt=Ve.page.borderBox,ft=rt[y.size],Et=ft/Pa,Tt=$n(Qe,v),fr=os({displaced:f.displaced,id:Qe});return Tt?fr?x>rt[y.start]+Et&&x<rt[y.end]-Et:I>rt[y.start]-T+Et&&I<rt[y.end]-T-Et:fr?x>rt[y.start]+T+Et&&x<rt[y.end]+T-Et:I>rt[y.start]+Et&&I<rt[y.end]-Et});if(!P)return null;var te={displacedBy:E,displaced:f.displaced,at:{type:"COMBINE",combine:{draggableId:P.descriptor.id,droppableId:m.descriptor.id}}};return te},Ra=function(o){var l=o.pageOffset,c=o.draggable,f=o.draggables,m=o.droppables,g=o.previousImpact,v=o.viewport,y=o.afterCritical,E=hi(c.page.borderBox,l),T=as({pageBorderBox:E,draggable:c,droppables:m});if(!T)return Un;var I=m[T],x=Ur(I.descriptor.id,f),k=Ys(I,E);return co({pageBorderBoxWithDroppableScroll:k,draggable:c,previousImpact:g,destination:I,insideDestination:x,afterCritical:y})||ss({pageBorderBoxWithDroppableScroll:k,draggable:c,destination:I,insideDestination:x,last:g.displaced,viewport:v,afterCritical:y})},Io=function(o,l){var c;return(0,V.Z)({},o,(c={},c[l.descriptor.id]=l,c))},uo=function(l){var c=l.previousImpact,f=l.impact,m=l.droppables,g=hn(c),v=hn(f);if(!g||g===v)return m;var y=m[g];if(!y.subject.withPlaceholder)return m;var E=$a(y);return Io(m,E)},ls=function(o){var l=o.draggable,c=o.draggables,f=o.droppables,m=o.previousImpact,g=o.impact,v=uo({previousImpact:m,impact:g,droppables:f}),y=hn(g);if(!y)return v;var E=f[y];if(_n(l,E)||E.subject.withPlaceholder)return v;var T=ca(E,l,c);return Io(v,T)},Hi=function(o){var l=o.state,c=o.clientSelection,f=o.dimensions,m=o.viewport,g=o.impact,v=o.scrollJumpRequest,y=m||l.viewport,E=f||l.dimensions,T=c||l.current.client.selection,I=le(T,l.initial.client.selection),x={offset:I,selection:T,borderBoxCenter:G(l.initial.client.borderBoxCenter,I)},k={selection:G(x.selection,y.scroll.current),borderBoxCenter:G(x.borderBoxCenter,y.scroll.current),offset:G(x.offset,y.scroll.diff.value)},P={client:x,page:k};if(l.phase==="COLLECTING")return(0,V.Z)({phase:"COLLECTING"},l,{dimensions:E,viewport:y,current:P});var te=E.draggables[l.critical.draggable.id],Ve=g||Ra({pageOffset:k.offset,draggable:te,draggables:E.draggables,droppables:E.droppables,previousImpact:l.impact,viewport:y,afterCritical:l.afterCritical}),Qe=ls({draggable:te,impact:Ve,previousImpact:l.impact,draggables:E.draggables,droppables:E.droppables}),rt=(0,V.Z)({},l,{current:P,dimensions:{draggables:E.draggables,droppables:Qe},impact:Ve,viewport:y,scrollJumpRequest:v||null,forceShouldAnimate:v?!1:null});return rt};function cs(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,y=cs(v.all,f),E=Xn({afterDragging:y,destination:m,displacedBy:l.displacedBy,viewport:c.frame,forceShouldAnimate:g,last:v});return(0,V.Z)({},l,{displaced:E})},ds=function(o){var l=o.impact,c=o.draggable,f=o.droppable,m=o.draggables,g=o.viewport,v=o.afterCritical,y=Cn({impact:l,draggable:c,draggables:m,droppable:f,afterCritical:v});return On({pageBorderBoxCenter:y,draggable:c,viewport:g})},fo=function(o){var l=o.state,c=o.dimensions,f=o.viewport;l.movementMode!=="SNAP"&&ge(!1);var m=l.impact,g=f||l.viewport,v=c||l.dimensions,y=v.draggables,E=v.droppables,T=y[l.critical.draggable.id],I=hn(m);I||ge(!1);var x=E[I],k=us({impact:m,viewport:g,destination:x,draggables:y}),P=ds({impact:k,draggable:T,droppable:x,draggables:y,viewport:g,afterCritical:l.afterCritical});return Hi({impact:k,clientSelection:P,state:l,dimensions:v,viewport:g})},el=function(o){return{index:o.index,droppableId:o.droppableId}},ua=function(o){var l=o.draggable,c=o.home,f=o.draggables,m=o.viewport,g=Ai(c.axis,l.displaceBy),v=Ur(c.descriptor.id,f),y=v.indexOf(l);y===-1&&ge(!1);var E=v.slice(y+1),T=E.reduce(function(P,te){return P[te.descriptor.id]=!0,P},{}),I={inVirtualList:c.descriptor.mode==="virtual",displacedBy:g,effected:T},x=Xn({afterDragging:E,destination:c,displacedBy:g,last:null,viewport:m.frame,forceShouldAnimate:!1}),k={displaced:x,displacedBy:g,at:{type:"REORDER",destination:el(l.descriptor)}};return{impact:k,afterCritical:I}},$o=function(o,l){return{draggables:o.draggables,droppables:Io(o.droppables,l)}},Oa=function(l){},Na=function(l){},Zr=function(o){var l=o.draggable,c=o.offset,f=o.initialWindowScroll,m=ir(l.client,c),g=an(m,f),v=(0,V.Z)({},l,{placeholder:(0,V.Z)({},l.placeholder,{client:m}),client:m,page:g});return v},Hr=function(o){var l=o.frame;return l||ge(!1),l},Jr=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,y=c[v],E=Hr(y),T=E.scroll.diff.value,I=G(m,T),x=Zr({draggable:g,offset:I,initialWindowScroll:f.scroll.initial});return x})},ii=function(o){var l=o.state,c=o.published;Oa();var f=c.modified.map(function(Et){var Tt=l.dimensions.droppables[Et.droppableId],fr=Xt(Tt,Et.scroll);return fr}),m=(0,V.Z)({},l.dimensions.droppables,{},ht(f)),g=rr(Jr({additions:c.additions,updatedDroppables:m,viewport:l.viewport})),v=(0,V.Z)({},l.dimensions.draggables,{},g);c.removals.forEach(function(Et){delete v[Et]});var y={droppables:m,draggables:v},E=hn(l.impact),T=E?y.droppables[E]:null,I=y.draggables[l.critical.draggable.id],x=y.droppables[l.critical.droppable.id],k=ua({draggable:I,home:x,draggables:v,viewport:l.viewport}),P=k.impact,te=k.afterCritical,Ve=T&&T.isCombineEnabled?l.impact:P,Qe=Ra({pageOffset:l.current.page.offset,draggable:y.draggables[l.critical.draggable.id],draggables:y.draggables,droppables:y.droppables,previousImpact:Ve,viewport:l.viewport,afterCritical:te});Na();var rt=(0,V.Z)({phase:"DRAGGING"},l,{phase:"DRAGGING",impact:Qe,onLiftImpact:P,dimensions:y,afterCritical:te,forceShouldAnimate:!1});if(l.phase==="COLLECTING")return rt;var ft=(0,V.Z)({phase:"DROP_PENDING"},rt,{phase:"DROP_PENDING",reason:l.reason,isWaiting:!1});return ft},Ln=function(l){return l.movementMode==="SNAP"},Ma=function(l,c,f){var m=$o(l.dimensions,c);return!Ln(l)||f?Hi({state:l,dimensions:m}):fo({state:l,dimensions:m})};function da(o){return o.isDragging&&o.movementMode==="SNAP"?(0,V.Z)({phase:"DRAGGING"},o,{scrollJumpRequest:null}):o}var fs={phase:"IDLE",completed:null,shouldFlush:!1},hs=function(o,l){if(o===void 0&&(o=fs),l.type==="FLUSH")return(0,V.Z)({},fs,{shouldFlush:!0});if(l.type==="INITIAL_PUBLISH"){o.phase!=="IDLE"&&ge(!1);var c=l.payload,f=c.critical,m=c.clientSelection,g=c.viewport,v=c.dimensions,y=c.movementMode,E=v.draggables[f.draggable.id],T=v.droppables[f.droppable.id],I={selection:m,borderBoxCenter:E.client.borderBox.center,offset:we},x={client:I,page:{selection:G(I.selection,g.scroll.initial),borderBoxCenter:G(I.selection,g.scroll.initial),offset:G(I.selection,g.scroll.diff.value)}},k=Rt(v.droppables).every(function(Pl){return!Pl.isFixedOnPage}),P=ua({draggable:E,home:T,draggables:v.draggables,viewport:g}),te=P.impact,Ve=P.afterCritical,Qe={phase:"DRAGGING",isDragging:!0,critical:f,movementMode:y,dimensions:v,initial:x,current:x,isWindowScrollAllowed:k,impact:te,afterCritical:Ve,onLiftImpact:te,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"&&ge(!1);var rt=(0,V.Z)({phase:"COLLECTING"},o,{phase:"COLLECTING"});return rt}if(l.type==="PUBLISH_WHILE_DRAGGING")return o.phase==="COLLECTING"||o.phase==="DROP_PENDING"||ge(!1),ii({state:o,published:l.payload});if(l.type==="MOVE"){if(o.phase==="DROP_PENDING")return o;fi(o)||ge(!1);var ft=l.payload.client;return ce(ft,o.current.client.selection)?o:Hi({state:o,clientSelection:ft,impact:Ln(o)?o.impact:null})}if(l.type==="UPDATE_DROPPABLE_SCROLL"){if(o.phase==="DROP_PENDING"||o.phase==="COLLECTING")return da(o);fi(o)||ge(!1);var Et=l.payload,Tt=Et.id,fr=Et.newScroll,er=o.dimensions.droppables[Tt];if(!er)return o;var Zt=Xt(er,fr);return Ma(o,Zt,!1)}if(l.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(o.phase==="DROP_PENDING")return o;fi(o)||ge(!1);var ln=l.payload,Lr=ln.id,Yr=ln.isEnabled,Qr=o.dimensions.droppables[Lr];Qr||ge(!1),Qr.isEnabled===Yr&&ge(!1);var ti=(0,V.Z)({},Qr,{isEnabled:Yr});return Ma(o,ti,!0)}if(l.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(o.phase==="DROP_PENDING")return o;fi(o)||ge(!1);var Si=l.payload,pi=Si.id,_i=Si.isCombineEnabled,ga=o.dimensions.droppables[pi];ga||ge(!1),ga.isCombineEnabled===_i&&ge(!1);var Bn=(0,V.Z)({},ga,{isCombineEnabled:_i});return Ma(o,Bn,!0)}if(l.type==="MOVE_BY_WINDOW_SCROLL"){if(o.phase==="DROP_PENDING"||o.phase==="DROP_ANIMATING")return o;fi(o)||ge(!1),o.isWindowScrollAllowed||ge(!1);var Ua=l.payload.newScroll;if(ce(o.viewport.scroll.current,Ua))return da(o);var va=sa(o.viewport,Ua);return Ln(o)?fo({state:o,viewport:va}):Hi({state:o,viewport:va})}if(l.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!fi(o))return o;var Rs=l.payload.maxScroll;if(ce(Rs,o.viewport.scroll.max))return o;var ta=(0,V.Z)({},o.viewport,{scroll:(0,V.Z)({},o.viewport.scroll,{max:Rs})});return(0,V.Z)({phase:"DRAGGING"},o,{viewport:ta})}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"&&ge(!1);var Zi=vn({state:o,type:l.type});return Zi?Hi({state:o,impact:Zi.impact,clientSelection:Zi.clientSelection,scrollJumpRequest:Zi.scrollJumpRequest}):o}if(l.type==="DROP_PENDING"){var ji=l.payload.reason;o.phase!=="COLLECTING"&&ge(!1);var Ii=(0,V.Z)({phase:"DROP_PENDING"},o,{phase:"DROP_PENDING",isWaiting:!0,reason:ji});return Ii}if(l.type==="DROP_ANIMATE"){var ra=l.payload,ba=ra.completed,Jo=ra.dropDuration,Yo=ra.newHomeClientOffset;o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||ge(!1);var Eo={phase:"DROP_ANIMATING",completed:ba,dropDuration:Jo,newHomeClientOffset:Yo,dimensions:o.dimensions};return Eo}if(l.type==="DROP_COMPLETE"){var Tl=l.payload.completed;return{phase:"IDLE",completed:Tl,shouldFlush:!1}}return o},ps=function(l){return{type:"BEFORE_INITIAL_CAPTURE",payload:l}},fa=function(l){return{type:"LIFT",payload:l}},Ca=function(l){return{type:"INITIAL_PUBLISH",payload:l}},tl=function(l){return{type:"PUBLISH_WHILE_DRAGGING",payload:l}},ou=function(){return{type:"COLLECTION_STARTING",payload:null}},su=function(l){return{type:"UPDATE_DROPPABLE_SCROLL",payload:l}},lu=function(l){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:l}},cu=function(l){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:l}},nc=function(l){return{type:"MOVE",payload:l}},uu=function(l){return{type:"MOVE_BY_WINDOW_SCROLL",payload:l}},ms=function(l){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:l}},du=function(){return{type:"MOVE_UP",payload:null}},fu=function(){return{type:"MOVE_DOWN",payload:null}},hu=function(){return{type:"MOVE_RIGHT",payload:null}},pu=function(){return{type:"MOVE_LEFT",payload:null}},rl=function(){return{type:"FLUSH",payload:null}},Qn=function(l){return{type:"DROP_ANIMATE",payload:l}},Ji=function(l){return{type:"DROP_COMPLETE",payload:l}},Ea=function(l){return{type:"DROP",payload:l}},mu=function(l){return{type:"DROP_PENDING",payload:l}},nl=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function r0(o){if(!(o.length<=1)){for(var l=o.map(function(y){return y.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(y){var E=!!c[y];return E?"[\u{1F525}"+y+"]":""+y}).join(", ")}}function gu(o,l){if(0)var c}var ic=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,y=v.id,E=v.clientSelection,T=v.movementMode,I=c();I.phase==="DROP_ANIMATING"&&f(Ji({completed:I.completed})),c().phase!=="IDLE"&&ge(!1),f(rl()),f(ps({draggableId:y,movementMode:T}));var x={shouldPublishImmediately:T==="SNAP"},k={draggableId:y,scrollOptions:x},P=o.startPublishing(k),te=P.critical,Ve=P.dimensions,Qe=P.viewport;gu(te,Ve),f(Ca({critical:te,dimensions:Ve,clientSelection:E,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)}}}},il={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},To={opacity:{drop:0,combining:.7},scale:{drop:.75}},Po={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Fa=Po.outOfTheWay+"s "+il.outOfTheWay,Ro={fluid:"opacity "+Fa,snap:"transform "+Fa+", opacity "+Fa,drop:function(l){var c=l+"s "+il.drop;return"transform "+c+", opacity "+c},outOfTheWay:"transform "+Fa,placeholder:"height "+Fa+", width "+Fa+", margin "+Fa},al=function(l){return ce(l,we)?null:"translate("+l.x+"px, "+l.y+"px)"},gs={moveTo:al,drop:function(l,c){var f=al(l);return f?c?f+" scale("+To.scale.drop+")":f:null}},Wi=Po.minDropTime,ol=Po.maxDropTime,ac=ol-Wi,oc=1500,bu=.6,yu=function(o){var l=o.current,c=o.destination,f=o.reason,m=ct(l,c);if(m<=0)return Wi;if(m>=oc)return ol;var g=m/oc,v=Wi+ac*g,y=f==="CANCEL"?v*bu:v;return Number(y.toFixed(2))},xu=function(o){var l=o.impact,c=o.draggable,f=o.dimensions,m=o.viewport,g=o.afterCritical,v=f.draggables,y=f.droppables,E=hn(l),T=E?y[E]:null,I=y[c.descriptor.droppableId],x=ds({impact:l,draggable:c,draggables:v,afterCritical:g,droppable:T||I,viewport:m}),k=le(x,c.client.borderBox.center);return k},sc=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 y=us({draggables:l,impact:v,destination:m,viewport:g,forceShouldAnimate:!0});return{impact:y,didDropInsideDroppable:!1}}if(f.at.type==="REORDER")return{impact:f,didDropInsideDroppable:!0};var E=(0,V.Z)({},f,{displaced:Dn});return{impact:E,didDropInsideDroppable:!0}},wu=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(mu({reason:v}));return}if(g.phase!=="IDLE"){var y=g.phase==="DROP_PENDING"&&g.isWaiting;y&&ge(!1),g.phase==="DRAGGING"||g.phase==="DROP_PENDING"||ge(!1);var E=g.critical,T=g.dimensions,I=T.draggables[g.critical.draggable.id],x=sc({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}),k=x.impact,P=x.didDropInsideDroppable,te=P?hr(k):null,Ve=P?Xr(k):null,Qe={index:E.draggable.index,droppableId:E.droppable.id},rt={draggableId:I.descriptor.id,type:I.descriptor.type,source:Qe,reason:v,mode:g.movementMode,destination:te,combine:Ve},ft=xu({impact:k,draggable:I,dimensions:T,viewport:g.viewport,afterCritical:g.afterCritical}),Et={critical:g.critical,afterCritical:g.afterCritical,result:rt,impact:k},Tt=!ce(g.current.client.offset,ft)||!!rt.combine;if(!Tt){c(Ji({completed:Et}));return}var fr=yu({current:g.current.client.offset,destination:ft,reason:v}),er={newHomeClientOffset:ft,dropDuration:fr,completed:Et};c(Qn(er))}}}},lc=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Su(o){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(c){c.target!==window&&c.target!==window.document||o()}}}function _u(o){var l=o.onWindowScroll;function c(){l(lc())}var f=mn(c),m=Su(f),g=nt;function v(){return g!==nt}function y(){v()&&ge(!1),g=Pt(window,[m])}function E(){v()||ge(!1),f.cancel(),g(),g=nt}return{start:y,stop:E,isActive:v}}var Mu=function(l){return l.type==="DROP_COMPLETE"||l.type==="DROP_ANIMATE"||l.type==="FLUSH"},Cu=function(o){var l=_u({onWindowScroll:function(f){o.dispatch(uu({newScroll:f}))}});return function(c){return function(f){!l.isActive()&&f.type==="INITIAL_PUBLISH"&&l.start(),l.isActive()&&Mu(f)&&l.stop(),c(f)}}},ha=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},cc=function(){var o=[],l=function(g){var v=Pr(o,function(T){return T.timerId===g});v===-1&&ge(!1);var y=o.splice(v,1),E=y[0];E.callback()},c=function(g){var v=setTimeout(function(){return l(v)}),y={timerId:v,callback:g};o.push(y)},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}},ka=function(l,c){return l==null&&c==null?!0:l==null||c==null?!1:l.droppableId===c.droppableId&&l.index===c.index},Eu=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},ho=function(l,c){Oa(),c(),Na()},vs=function(l,c){return{draggableId:l.draggable.id,type:l.droppable.type,source:{droppableId:l.droppable.id,index:l.draggable.index},mode:c}},bs=function(l,c,f,m){if(!l){f(m(c));return}var g=ha(f),v={announce:g};l(c,v),g.wasCalled()||f(m(c))},ku=function(o,l){var c=cc(),f=null,m=function(k,P){f&&ge(!1),ho("onBeforeCapture",function(){var te=o().onBeforeCapture;if(te){var Ve={draggableId:k,mode:P};te(Ve)}})},g=function(k,P){f&&ge(!1),ho("onBeforeDragStart",function(){var te=o().onBeforeDragStart;te&&te(vs(k,P))})},v=function(k,P){f&&ge(!1);var te=vs(k,P);f={mode:P,lastCritical:k,lastLocation:te.source,lastCombine:null},c.add(function(){ho("onDragStart",function(){return bs(o().onDragStart,te,l,ve.onDragStart)})})},y=function(k,P){var te=hr(P),Ve=Xr(P);f||ge(!1);var Qe=!uc(k,f.lastCritical);Qe&&(f.lastCritical=k);var rt=!ka(f.lastLocation,te);rt&&(f.lastLocation=te);var ft=!Eu(f.lastCombine,Ve);if(ft&&(f.lastCombine=Ve),!(!Qe&&!rt&&!ft)){var Et=(0,V.Z)({},vs(k,f.mode),{combine:Ve,destination:te});c.add(function(){ho("onDragUpdate",function(){return bs(o().onDragUpdate,Et,l,ve.onDragUpdate)})})}},E=function(){f||ge(!1),c.flush()},T=function(k){f||ge(!1),f=null,ho("onDragEnd",function(){return bs(o().onDragEnd,k,l,ve.onDragEnd)})},I=function(){if(f){var k=(0,V.Z)({},vs(f.lastCritical,f.mode),{combine:null,destination:null,reason:"CANCEL"});T(k)}};return{beforeCapture:m,beforeStart:g,start:v,update:y,flush:E,drop:T,abort:I}},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 y=g.payload.completed.result;c.flush(),m(g),c.drop(y);return}if(m(g),g.type==="FLUSH"){c.abort();return}var E=f.getState();E.phase==="DRAGGING"&&c.update(E.critical,E.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"&&ge(!1),o.dispatch(Ji({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 E=o.getState();E.phase==="DROP_ANIMATING"&&o.dispatch(nl())}};c=requestAnimationFrame(function(){c=null,l=Pt(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"&&ge(!1),o.start(m);return}c(f),o.scroll(l.getState())}}}},Pu=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(Ea({reason:f.reason})))}}}},sl=He.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,He.MT)(hs,sl((0,He.md)(vu(f),Bu(l),ic(l),wu,Au,Lu,Pu,Tu(v),Cu,Iu(c),Du(m,g))))},ll=function(){return{additions:{},removals:{},modified:{}}};function Ou(o){var l=o.registry,c=o.callbacks,f=ll(),m=null,g=function(){m||(c.collectionStarting(),m=requestAnimationFrame(function(){m=null,Oa();var I=f,x=I.additions,k=I.removals,P=I.modified,te=Object.keys(x).map(function(rt){return l.draggable.getById(rt).getDimension(we)}).sort(function(rt,ft){return rt.descriptor.index-ft.descriptor.index}),Ve=Object.keys(P).map(function(rt){var ft=l.droppable.getById(rt),Et=ft.callbacks.getScrollWhileDragging();return{droppableId:rt,scroll:Et}}),Qe={additions:te,removals:Object.keys(k),modified:Ve};f=ll(),Na(),c.publish(Qe)}))},v=function(I){var x=I.descriptor.id;f.additions[x]=I,f.modified[I.descriptor.droppableId]=!0,f.removals[x]&&delete f.removals[x],g()},y=function(I){var x=I.descriptor;f.removals[x.id]=!0,f.modified[x.droppableId]=!0,f.additions[x.id]&&delete f.additions[x.id],g()},E=function(){m&&(cancelAnimationFrame(m),m=null,f=ll())};return{add:v,remove:y,stop:E}}var dc=function(o){var l=o.scrollHeight,c=o.scrollWidth,f=o.height,m=o.width,g=le({x:c,y:l},{x:m,y:f}),v={x:Math.max(0,g.x),y:Math.max(0,g.y)};return v},fc=function(){var o=document.documentElement;return o||ge(!1),o},po=function(){var o=fc(),l=dc({scrollHeight:o.scrollHeight,scrollWidth:o.scrollWidth,width:o.clientWidth,height:o.clientHeight});return l},Oo=function(){var o=lc(),l=po(),c=o.y,f=o.x,m=fc(),g=m.clientWidth,v=m.clientHeight,y=f+g,E=c+v,T=Dt({top:c,left:f,right:y,bottom:E}),I={frame:T,scroll:{initial:o,current:o,max:l,diff:{value:we,displacement:we}}};return I},hc=function(o){var l=o.critical,c=o.scrollOptions,f=o.registry;Oa();var m=Oo(),g=m.scroll.current,v=l.droppable,y=f.droppable.getAllByType(v.type).map(function(x){return x.callbacks.getDimensionAndWatchScroll(g,c)}),E=f.draggable.getAllByType(l.draggable.type).map(function(x){return x.getDimension(g)}),T={draggables:rr(E),droppables:ht(y)};Na();var I={dimensions:T,critical:l,viewport:m};return I};function pc(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 Nu=function(o,l){var c=null,f=Ou({callbacks:{publish:l.publishWhileDragging,collectionStarting:l.collectionStarting},registry:o}),m=function(P,te){o.droppable.exists(P)||ge(!1),c&&l.updateDroppableIsEnabled({id:P,isEnabled:te})},g=function(P,te){c&&(o.droppable.exists(P)||ge(!1),l.updateDroppableIsCombineEnabled({id:P,isCombineEnabled:te}))},v=function(P,te){c&&(o.droppable.exists(P)||ge(!1),l.updateDroppableScroll({id:P,newScroll:te}))},y=function(P,te){c&&o.droppable.getById(P).callbacks.scroll(te)},E=function(){if(c){f.stop();var P=c.critical.droppable;o.droppable.getAllByType(P.type).forEach(function(te){return te.callbacks.dragStopped()}),c.unsubscribe(),c=null}},T=function(P){c||ge(!1);var te=c.critical.draggable;P.type==="ADDITION"&&pc(o,te,P.value)&&f.add(P.value),P.type==="REMOVAL"&&pc(o,te,P.value)&&f.remove(P.value)},I=function(P){c&&ge(!1);var te=o.draggable.getById(P.draggableId),Ve=o.droppable.getById(te.descriptor.droppableId),Qe={draggable:te.descriptor,droppable:Ve.descriptor},rt=o.subscribe(T);return c={critical:Qe,unsubscribe:rt},hc({critical:Qe,registry:o,scrollOptions:P.scrollOptions})},x={updateDroppableIsEnabled:m,updateDroppableIsCombineEnabled:g,scrollDroppable:y,updateDroppableScroll:v,startPublishing:I,stopPublishing:E};return x},mc=function(o,l){return o.phase==="IDLE"?!0:o.phase!=="DROP_ANIMATING"||o.completed.result.draggableId===l?!1:o.completed.result.reason==="DROP"},Fu=function(o){window.scrollBy(o.x,o.y)},cl=cr(function(o){return Rt(o).filter(function(l){return!(!l.isEnabled||!l.frame)})}),zu=function(l,c){var f=mr(cl(c),function(m){return m.frame||ge(!1),Bo(m.frame.pageMarginBox)(l)});return f},Ku=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=zu(l,f);return g},Da={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(l){return Math.pow(l,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},No=function(o,l){var c=o[l.size]*Da.startFromPercentage,f=o[l.size]*Da.maxScrollAtPercentage,m={startScrollingFrom:c,maxScrollValueAt:f};return m},ys=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},ul=1,gc=function(o,l){if(o>l.startScrollingFrom)return 0;if(o<=l.maxScrollValueAt)return Da.maxPixelScroll;if(o===l.startScrollingFrom)return ul;var c=ys({startOfRange:l.maxScrollValueAt,endOfRange:l.startScrollingFrom,current:o}),f=1-c,m=Da.maxPixelScroll*Da.ease(f);return Math.ceil(m)},vc=Da.durationDampening.accelerateAt,bc=Da.durationDampening.stopDampeningAt,Hu=function(o,l){var c=l,f=bc,m=Date.now(),g=m-c;if(g>=bc)return o;if(g<vc)return ul;var v=ys({startOfRange:vc,endOfRange:f,current:g}),y=o*Da.ease(v);return Math.ceil(y)},xs=function(o){var l=o.distanceToEdge,c=o.thresholds,f=o.dragStartTime,m=o.shouldUseTimeDampening,g=gc(l,c);return g===0?0:m?Math.max(Hu(g,f),ul):g},ws=function(o){var l=o.container,c=o.distanceToEdges,f=o.dragStartTime,m=o.axis,g=o.shouldUseTimeDampening,v=No(l,m),y=c[m.end]<c[m.start];return y?xs({distanceToEdge:c[m.end],thresholds:v,dragStartTime:f,shouldUseTimeDampening:g}):-1*xs({distanceToEdge:c[m.start],thresholds:v,dragStartTime:f,shouldUseTimeDampening:g})},dl=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}},Wu=ar(function(o){return o===0?0:o}),yc=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},y=ws({container:c,distanceToEdges:v,dragStartTime:l,axis:Ir,shouldUseTimeDampening:g}),E=ws({container:c,distanceToEdges:v,dragStartTime:l,axis:Tn,shouldUseTimeDampening:g}),T=Wu({x:E,y});if(ce(T,we))return null;var I=dl({container:c,subject:f,proposedScroll:T});return I?ce(I,we)?null:I:null},Vu=ar(function(o){return o===0?0:o>0?1:-1}),Fo=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=G(c,m),v={x:o(g.x,f.x),y:o(g.y,f.y)};return ce(v,we)?null:v}}(),Ss=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=Vu(m),y=Fo({max:g,current:f,change:v});return!y||v.x!==0&&y.x===0||v.y!==0&&y.y===0},zo=function(l,c){return Ss({current:l.scroll.current,max:l.scroll.max,change:c})},fl=function(l,c){if(!zo(l,c))return null;var f=l.scroll.max,m=l.scroll.current;return Fo({current:m,max:f,change:c})},hl=function(l,c){var f=l.frame;return f?Ss({current:f.scroll.current,max:f.scroll.max,change:c}):!1},xc=function(l,c){var f=l.frame;return!f||!hl(l,c)?null:Fo({current:f.scroll.current,max:f.scroll.max,change:c})},pl=function(o){var l=o.viewport,c=o.subject,f=o.center,m=o.dragStartTime,g=o.shouldUseTimeDampening,v=yc({dragStartTime:m,container:l.frame,subject:c,center:f,shouldUseTimeDampening:g});return v&&zo(l,v)?v:null},Zu=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 y=yc({dragStartTime:m,container:v.pageMarginBox,subject:c,center:f,shouldUseTimeDampening:g});return y&&hl(l,y)?y:null},wc=function(o){var l=o.state,c=o.dragStartTime,f=o.shouldUseTimeDampening,m=o.scrollWindow,g=o.scrollDroppable,v=l.current.page.borderBoxCenter,y=l.dimensions.draggables[l.critical.draggable.id],E=y.page.marginBox;if(l.isWindowScrollAllowed){var T=l.viewport,I=pl({dragStartTime:c,viewport:T,subject:E,center:v,shouldUseTimeDampening:f});if(I){m(I);return}}var x=Ku({center:v,destination:hn(l.impact),droppables:l.dimensions.droppables});if(x){var k=Zu({dragStartTime:c,droppable:x,subject:E,center:v,shouldUseTimeDampening:f});k&&g(x.descriptor.id,k)}},ju=function(o){var l=o.scrollWindow,c=o.scrollDroppable,f=mn(l),m=mn(c),g=null,v=function(I){g||ge(!1);var x=g,k=x.shouldUseTimeDampening,P=x.dragStartTime;wc({state:I,scrollWindow:f,scrollDroppable:m,dragStartTime:P,shouldUseTimeDampening:k})},y=function(I){Oa(),g&&ge(!1);var x=Date.now(),k=!1,P=function(){k=!0};wc({state:I,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:P,scrollDroppable:P}),g={dragStartTime:x,shouldUseTimeDampening:k},Na(),k&&v(I)},E=function(){g&&(f.cancel(),m.cancel(),g=null)};return{start:y,stop:E,scroll:v}},Uu=function(o){var l=o.move,c=o.scrollDroppable,f=o.scrollWindow,m=function(T,I){var x=G(T.current.client.selection,I);l({client:x})},g=function(T,I){if(!hl(T,I))return I;var x=xc(T,I);if(!x)return c(T.descriptor.id,I),null;var k=le(I,x);c(T.descriptor.id,k);var P=le(I,k);return P},v=function(T,I,x){if(!T||!zo(I,x))return x;var k=fl(I,x);if(!k)return f(x),null;var P=le(x,k);f(P);var te=le(x,P);return te},y=function(T){var I=T.scrollJumpRequest;if(I){var x=hn(T.impact);x||ge(!1);var k=g(T.dimensions.droppables[x],I);if(k){var P=T.viewport,te=v(T.isWindowScrollAllowed,P,k);te&&m(T,te)}}};return y},ml=function(o){var l=o.scrollDroppable,c=o.scrollWindow,f=o.move,m=ju({scrollWindow:c,scrollDroppable:l}),g=Uu({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)}},y={scroll:v,start:m.start,stop:m.stop};return y},mt="data-rbd",ai=function(){var o=mt+"-drag-handle";return{base:o,draggableId:o+"-draggable-id",contextId:o+"-context-id"}}(),gl=function(){var o=mt+"-draggable";return{base:o,contextId:o+"-context-id",id:o+"-id"}}(),Gu=function(){var o=mt+"-droppable";return{base:o,contextId:o+"-context-id",id:o+"-id"}}(),oi={contextId:mt+"-scroll-container-context-id"},_s=function(l){return function(c){return"["+c+'="'+l+'"]'}},Ko=function(l,c){return l.map(function(f){var m=f.styles[c];return m?f.selector+" { "+m+" }":""}).join(" ")},n0="pointer-events: none;",i0=function(o){var l=_s(o),c=function(){var y=`
|
|
|
cursor: -webkit-grab;
|
|
|
cursor: grab;
|
|
|
`;return{selector:l(ai.contextId),styles:{always:`
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
touch-action: manipulation;
|
|
|
`,resting:y,dragging:n0,dropAnimating:y}}}(),f=function(){var y=`
|
|
|
transition: `+Ro.outOfTheWay+`;
|
|
|
`;return{selector:l(gl.contextId),styles:{dragging:y,dropAnimating:y,userCancel:y}}}(),m={selector:l(Gu.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:Ko(v,"always"),resting:Ko(v,"resting"),dragging:Ko(v,"dragging"),dropAnimating:Ko(v,"dropAnimating"),userCancel:Ko(v,"userCancel")}},zn=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?D.useLayoutEffect:D.useEffect,Li=function(){var l=document.querySelector("head");return l||ge(!1),l},qu=function(l){var c=document.createElement("style");return l&&c.setAttribute("nonce",l),c.type="text/css",c};function za(o,l){var c=De(function(){return i0(o)},[o]),f=(0,D.useRef)(null),m=(0,D.useRef)(null),g=Me(cr(function(x){var k=m.current;k||ge(!1),k.textContent=x}),[]),v=Me(function(x){var k=f.current;k||ge(!1),k.textContent=x},[]);zn(function(){!f.current&&!m.current||ge(!1);var x=qu(l),k=qu(l);return f.current=x,m.current=k,x.setAttribute(mt+"-always",o),k.setAttribute(mt+"-dynamic",o),Li().appendChild(x),Li().appendChild(k),v(c.always),g(c.resting),function(){var P=function(Ve){var Qe=Ve.current;Qe||ge(!1),Li().removeChild(Qe),Ve.current=null};P(f),P(m)}},[l,v,g,c.always,c.resting,o]);var y=Me(function(){return g(c.dragging)},[g,c.dragging]),E=Me(function(x){if(x==="DROP"){g(c.dropAnimating);return}g(c.userCancel)},[g,c.dropAnimating,c.userCancel]),T=Me(function(){m.current&&g(c.resting)},[g,c.resting]),I=De(function(){return{dragging:y,dropping:E,resting:T}},[y,E,T]);return I}var Sc=function(o){return o&&o.ownerDocument?o.ownerDocument.defaultView:window};function mo(o){return o instanceof Sc(o).HTMLElement}function vl(o,l){var c="["+ai.contextId+'="'+o+'"]',f=Kt(document.querySelectorAll(c));if(!f.length)return null;var m=mr(f,function(g){return g.getAttribute(ai.draggableId)===l});return!m||!mo(m)?null:m}function Xu(o){var l=(0,D.useRef)({}),c=(0,D.useRef)(null),f=(0,D.useRef)(null),m=(0,D.useRef)(!1),g=Me(function(k,P){var te={id:k,focus:P};return l.current[k]=te,function(){var Qe=l.current,rt=Qe[k];rt!==te&&delete Qe[k]}},[]),v=Me(function(k){var P=vl(o,k);P&&P!==document.activeElement&&P.focus()},[o]),y=Me(function(k,P){c.current===k&&(c.current=P)},[]),E=Me(function(){f.current||m.current&&(f.current=requestAnimationFrame(function(){f.current=null;var k=c.current;k&&v(k)}))},[v]),T=Me(function(k){c.current=null;var P=document.activeElement;P&&P.getAttribute(ai.draggableId)===k&&(c.current=k)},[]);zn(function(){return m.current=!0,function(){m.current=!1;var k=f.current;k&&cancelAnimationFrame(k)}},[]);var I=De(function(){return{register:g,tryRecordFocus:T,tryRestoreFocusRecorded:E,tryShiftRecord:y}},[g,T,E,y]);return I}function Ho(){var o={draggables:{},droppables:{}},l=[];function c(x){return l.push(x),function(){var P=l.indexOf(x);P!==-1&&l.splice(P,1)}}function f(x){l.length&&l.forEach(function(k){return k(x)})}function m(x){return o.draggables[x]||null}function g(x){var k=m(x);return k||ge(!1),k}var v={register:function(k){o.draggables[k.descriptor.id]=k,f({type:"ADDITION",value:k})},update:function(k,P){var te=o.draggables[P.descriptor.id];te&&te.uniqueId===k.uniqueId&&(delete o.draggables[P.descriptor.id],o.draggables[k.descriptor.id]=k)},unregister:function(k){var P=k.descriptor.id,te=m(P);te&&k.uniqueId===te.uniqueId&&(delete o.draggables[P],f({type:"REMOVAL",value:k}))},getById:g,findById:m,exists:function(k){return!!m(k)},getAllByType:function(k){return sr(o.draggables).filter(function(P){return P.descriptor.type===k})}};function y(x){return o.droppables[x]||null}function E(x){var k=y(x);return k||ge(!1),k}var T={register:function(k){o.droppables[k.descriptor.id]=k},unregister:function(k){var P=y(k.descriptor.id);P&&k.uniqueId===P.uniqueId&&delete o.droppables[k.descriptor.id]},getById:E,findById:y,exists:function(k){return!!y(k)},getAllByType:function(k){return sr(o.droppables).filter(function(P){return P.descriptor.type===k})}};function I(){o.draggables={},o.droppables={},l.length=0}return{draggable:v,droppable:T,subscribe:c,clean:I}}function _c(){var o=De(Ho,[]);return(0,D.useEffect)(function(){return function(){requestAnimationFrame(o.clean)}},[o]),o}var Ms=D.createContext(null),Wo=function(){var o=document.body;return o||ge(!1),o},a0={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},o0=function(l){return"rbd-announcement-"+l};function s0(o){var l=De(function(){return o0(o)},[o]),c=(0,D.useRef)(null);(0,D.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,V.Z)(g.style,a0),Wo().appendChild(g),function(){setTimeout(function(){var E=Wo();E.contains(g)&&E.removeChild(g),g===c.current&&(c.current=null)})}},[l]);var f=Me(function(m){var g=c.current;if(g){g.textContent=m;return}},[]);return f}var Cs=0,l0={separator:"::"};function bl(){Cs=0}function yl(o,l){return l===void 0&&(l=l0),De(function(){return""+o+l.separator+Cs++},[l.separator,o])}function Ju(o){var l=o.contextId,c=o.uniqueId;return"rbd-hidden-text-"+l+"-"+c}function c0(o){var l=o.contextId,c=o.text,f=yl("hidden-text",{separator:"-"}),m=De(function(){return Ju({contextId:l,uniqueId:f})},[f,l]);return(0,D.useEffect)(function(){var v=document.createElement("div");return v.id=m,v.textContent=c,v.style.display="none",Wo().appendChild(v),function(){var E=Wo();E.contains(v)&&E.removeChild(v)}},[m,c]),m}var Es=D.createContext(null),u0={react:"^16.8.5","react-dom":"^16.8.5"},d0=/(\d+)\.(\d+)\.(\d+)/,ks=function(l){var c=d0.exec(l);c==null&&ge(!1);var f=Number(c[1]),m=Number(c[2]),g=Number(c[3]);return{major:f,minor:m,patch:g,raw:l}},Dr=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},sn=function(o,l){var c=ks(o),f=ks(l);Dr(c,f)},Vo=`
|
|
|
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
|
|
|
`,Yu=function(o){var l=o.doctype;l&&(l.name.toLowerCase(),l.publicId)};function Vi(o){}function Zo(o,l){}function Ka(){Zo(function(){sn(u0.react,D.version),Yu(document)},[])}function xl(o){var l=(0,D.useRef)(o);return(0,D.useEffect)(function(){l.current=o}),l}function f0(){var o=null;function l(){return!!o}function c(v){return v===o}function f(v){o&&ge(!1);var y={abandon:v};return o=y,y}function m(){o||ge(!1),o=null}function g(){o&&(o.abandon(),m())}return{isClaimed:l,isActive:c,claim:f,release:m,tryAbandon:g}}var h0=9,Mc=13,go=27,jo=32,Ge=33,Cc=34,wl=35,Sl=36,_l=37,p0=38,m0=39,g0=40,gn,v0=(gn={},gn[Mc]=!0,gn[h0]=!0,gn),Ml=function(o){v0[o.keyCode]&&o.preventDefault()},vo=function(){var o="visibilitychange";if(typeof document=="undefined")return o;var l=[o,"ms"+o,"webkit"+o,"moz"+o,"o"+o],c=mr(l,function(f){return"on"+f in document});return c||o}(),Ds=0,Ha=5;function Uo(o,l){return Math.abs(l.x-o.x)>=Ha||Math.abs(l.y-o.y)>=Ha}var wi={type:"IDLE"};function bo(o){var l=o.cancel,c=o.completed,f=o.getPhase,m=o.setPhase;return[{eventName:"mousemove",fn:function(v){var y=v.button,E=v.clientX,T=v.clientY;if(y===Ds){var I={x:E,y:T},x=f();if(x.type==="DRAGGING"){v.preventDefault(),x.actions.move(I);return}x.type!=="PENDING"&&ge(!1);var k=x.point;if(Uo(k,I)){v.preventDefault();var P=x.actions.fluidLift(I);m({type:"DRAGGING",actions:P})}}}},{eventName:"mouseup",fn:function(v){var y=f();if(y.type!=="DRAGGING"){l();return}v.preventDefault(),y.actions.drop({shouldBlockNextClick:!0}),c()}},{eventName:"mousedown",fn:function(v){f().type==="DRAGGING"&&v.preventDefault(),l()}},{eventName:"keydown",fn:function(v){var y=f();if(y.type==="PENDING"){l();return}if(v.keyCode===go){v.preventDefault(),l();return}Ml(v)}},{eventName:"resize",fn:l},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){f().type==="PENDING"&&l()}},{eventName:"webkitmouseforcedown",fn:function(v){var y=f();if(y.type==="IDLE"&&ge(!1),y.actions.shouldRespectForcePress()){l();return}v.preventDefault()}},{eventName:vo,fn:l}]}function si(o){var l=(0,D.useRef)(wi),c=(0,D.useRef)(nt),f=De(function(){return{eventName:"mousedown",fn:function(x){if(!x.defaultPrevented&&x.button===Ds&&!(x.ctrlKey||x.metaKey||x.shiftKey||x.altKey)){var k=o.findClosestDraggableId(x);if(k){var P=o.tryGetLock(k,v,{sourceEvent:x});if(P){x.preventDefault();var te={x:x.clientX,y:x.clientY};c.current(),T(P,te)}}}}}},[o]),m=De(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(x){if(!x.defaultPrevented){var k=o.findClosestDraggableId(x);if(k){var P=o.findOptionsForDraggable(k);P&&(P.shouldRespectForcePress||o.canGetLock(k)&&x.preventDefault())}}}}},[o]),g=Me(function(){var x={passive:!1,capture:!0};c.current=Pt(window,[m,f],x)},[m,f]),v=Me(function(){var I=l.current;I.type!=="IDLE"&&(l.current=wi,c.current(),g())},[g]),y=Me(function(){var I=l.current;v(),I.type==="DRAGGING"&&I.actions.cancel({shouldBlockNextClick:!0}),I.type==="PENDING"&&I.actions.abort()},[v]),E=Me(function(){var x={capture:!0,passive:!1},k=bo({cancel:y,completed:v,getPhase:function(){return l.current},setPhase:function(te){l.current=te}});c.current=Pt(window,k,x)},[y,v]),T=Me(function(x,k){l.current.type!=="IDLE"&&ge(!1),l.current={type:"PENDING",point:k,actions:x},E()},[E]);zn(function(){return g(),function(){c.current()}},[g])}var Bi;function As(){}var pa=(Bi={},Bi[Cc]=!0,Bi[Ge]=!0,Bi[Sl]=!0,Bi[wl]=!0,Bi);function Qu(o,l){function c(){l(),o.cancel()}function f(){l(),o.drop()}return[{eventName:"keydown",fn:function(g){if(g.keyCode===go){g.preventDefault(),c();return}if(g.keyCode===jo){g.preventDefault(),f();return}if(g.keyCode===g0){g.preventDefault(),o.moveDown();return}if(g.keyCode===p0){g.preventDefault(),o.moveUp();return}if(g.keyCode===m0){g.preventDefault(),o.moveRight();return}if(g.keyCode===_l){g.preventDefault(),o.moveLeft();return}if(pa[g.keyCode]){g.preventDefault();return}Ml(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:vo,fn:c}]}function ed(o){var l=(0,D.useRef)(As),c=De(function(){return{eventName:"keydown",fn:function(g){if(g.defaultPrevented||g.keyCode!==jo)return;var v=o.findClosestDraggableId(g);if(!v)return;var y=o.tryGetLock(v,I,{sourceEvent:g});if(!y)return;g.preventDefault();var E=!0,T=y.snapLift();l.current();function I(){E||ge(!1),E=!1,l.current(),f()}l.current=Pt(window,Qu(T,I),{capture:!0,passive:!1})}}},[o]),f=Me(function(){var g={passive:!1,capture:!0};l.current=Pt(window,[c],g)},[c]);zn(function(){return f(),function(){l.current()}},[f])}var Ls={type:"IDLE"},b0=120,Kn=.15;function ma(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===go&&m.preventDefault(),l()}},{eventName:vo,fn:l}]}function y0(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 y=g.touches[0],E=y.clientX,T=y.clientY,I={x:E,y:T};g.preventDefault(),v.actions.move(I)}},{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"&&ge(!1);var y=g.touches[0];if(y){var E=y.force>=Kn;if(E){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:vo,fn:l}]}function td(o){var l=(0,D.useRef)(Ls),c=(0,D.useRef)(nt),f=Me(function(){return l.current},[]),m=Me(function(P){l.current=P},[]),g=De(function(){return{eventName:"touchstart",fn:function(P){if(!P.defaultPrevented){var te=o.findClosestDraggableId(P);if(te){var Ve=o.tryGetLock(te,y,{sourceEvent:P});if(Ve){var Qe=P.touches[0],rt=Qe.clientX,ft=Qe.clientY,Et={x:rt,y:ft};c.current(),x(Ve,Et)}}}}}},[o]),v=Me(function(){var P={capture:!0,passive:!1};c.current=Pt(window,[g],P)},[g]),y=Me(function(){var k=l.current;k.type!=="IDLE"&&(k.type==="PENDING"&&clearTimeout(k.longPressTimerId),m(Ls),c.current(),v())},[v,m]),E=Me(function(){var k=l.current;y(),k.type==="DRAGGING"&&k.actions.cancel({shouldBlockNextClick:!0}),k.type==="PENDING"&&k.actions.abort()},[y]),T=Me(function(){var P={capture:!0,passive:!1},te={cancel:E,completed:y,getPhase:f},Ve=Pt(window,y0(te),P),Qe=Pt(window,ma(te),P);c.current=function(){Ve(),Qe()}},[E,f,y]),I=Me(function(){var P=f();P.type!=="PENDING"&&ge(!1);var te=P.actions.fluidLift(P.point);m({type:"DRAGGING",actions:te,hasMoved:!1})},[f,m]),x=Me(function(P,te){f().type!=="IDLE"&&ge(!1);var Ve=setTimeout(I,b0);m({type:"PENDING",point:te,actions:P,longPressTimerId:Ve}),T()},[T,f,m,I]);zn(function(){return v(),function(){c.current();var te=f();te.type==="PENDING"&&(clearTimeout(te.longPressTimerId),m(Ls))}},[f,v,m]),zn(function(){var P=Pt(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return P},[])}function Ec(o){}var Ar={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function yo(o,l){if(l==null)return!1;var c=!!Ar[l.tagName.toLowerCase()];if(c)return!0;var f=l.getAttribute("contenteditable");return f==="true"||f===""?!0:l===o?!1:yo(o,l.parentElement)}function xo(o,l){var c=l.target;return mo(c)?yo(o,c):!1}var Cl=function(o){return Dt(o.getBoundingClientRect()).center};function Ce(o){return o instanceof Sc(o).Element}var x0=function(){var o="matches";if(typeof document=="undefined")return o;var l=[o,"msMatchesSelector","webkitMatchesSelector"],c=mr(l,function(f){return f in Element.prototype});return c||o}();function rd(o,l){return o==null?null:o[x0](l)?o:rd(o.parentElement,l)}function kc(o,l){return o.closest?o.closest(l):rd(o,l)}function w0(o){return"["+ai.contextId+'="'+o+'"]'}function Bs(o,l){var c=l.target;if(!Ce(c))return null;var f=w0(o),m=kc(c,f);return!m||!mo(m)?null:m}function S0(o,l){var c=Bs(o,l);return c?c.getAttribute(ai.draggableId):null}function _0(o,l){var c="["+gl.contextId+'="'+o+'"]',f=Kt(document.querySelectorAll(c)),m=mr(f,function(g){return g.getAttribute(gl.id)===l});return!m||!mo(m)?null:m}function ei(o){o.preventDefault()}function Yi(o){var l=o.expected,c=o.phase,f=o.isLockActive,m=o.shouldWarn;return!(!f()||l!==c)}function Is(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||!mc(c.getState(),m))}function El(o){var l=o.lockAPI,c=o.contextId,f=o.store,m=o.registry,g=o.draggableId,v=o.forceSensorStop,y=o.sourceEvent,E=Is({lockAPI:l,store:f,registry:m,draggableId:g});if(!E)return null;var T=m.draggable.getById(g),I=_0(c,T.descriptor.id);if(!I||y&&!T.options.canDragInteractiveElements&&xo(I,y))return null;var x=l.claim(v||nt),k="PRE_DRAG";function P(){return T.options.shouldRespectForcePress}function te(){return l.isActive(x)}function Ve(er,Zt){Yi({expected:er,phase:k,isLockActive:te,shouldWarn:!0})&&f.dispatch(Zt())}var Qe=Ve.bind(null,"DRAGGING");function rt(er){function Zt(){l.release(),k="COMPLETED"}k!=="PRE_DRAG"&&(Zt(),k!=="PRE_DRAG"&&ge(!1)),f.dispatch(fa(er.liftActionArgs)),k="DRAGGING";function ln(Lr,Yr){if(Yr===void 0&&(Yr={shouldBlockNextClick:!1}),er.cleanup(),Yr.shouldBlockNextClick){var Qr=Pt(window,[{eventName:"click",fn:ei,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(Qr)}Zt(),f.dispatch(Ea({reason:Lr}))}return(0,V.Z)({isActive:function(){return Yi({expected:"DRAGGING",phase:k,isLockActive:te,shouldWarn:!1})},shouldRespectForcePress:P,drop:function(Yr){return ln("DROP",Yr)},cancel:function(Yr){return ln("CANCEL",Yr)}},er.actions)}function ft(er){var Zt=mn(function(Lr){Qe(function(){return nc({client:Lr})})}),ln=rt({liftActionArgs:{id:g,clientSelection:er,movementMode:"FLUID"},cleanup:function(){return Zt.cancel()},actions:{move:Zt}});return(0,V.Z)({},ln,{move:Zt})}function Et(){var er={moveUp:function(){return Qe(du)},moveRight:function(){return Qe(hu)},moveDown:function(){return Qe(fu)},moveLeft:function(){return Qe(pu)}};return rt({liftActionArgs:{id:g,clientSelection:Cl(I),movementMode:"SNAP"},cleanup:nt,actions:er})}function Tt(){var er=Yi({expected:"PRE_DRAG",phase:k,isLockActive:te,shouldWarn:!0});er&&l.release()}var fr={isActive:function(){return Yi({expected:"PRE_DRAG",phase:k,isLockActive:te,shouldWarn:!1})},shouldRespectForcePress:P,fluidLift:ft,snapLift:Et,abort:Tt};return fr}var M0=[si,ed,td];function C0(o){var l=o.contextId,c=o.store,f=o.registry,m=o.customSensors,g=o.enableDefaultSensors,v=[].concat(g?M0:[],m||[]),y=(0,D.useState)(function(){return f0()})[0],E=Me(function(ft,Et){ft.isDragging&&!Et.isDragging&&y.tryAbandon()},[y]);zn(function(){var ft=c.getState(),Et=c.subscribe(function(){var Tt=c.getState();E(ft,Tt),ft=Tt});return Et},[y,c,E]),zn(function(){return y.tryAbandon},[y.tryAbandon]);var T=Me(function(rt){return Is({lockAPI:y,registry:f,store:c,draggableId:rt})},[y,f,c]),I=Me(function(rt,ft,Et){return El({lockAPI:y,registry:f,contextId:l,store:c,draggableId:rt,forceSensorStop:ft,sourceEvent:Et&&Et.sourceEvent?Et.sourceEvent:null})},[l,y,f,c]),x=Me(function(rt){return S0(l,rt)},[l]),k=Me(function(rt){var ft=f.draggable.findById(rt);return ft?ft.options:null},[f.draggable]),P=Me(function(){y.isClaimed()&&(y.tryAbandon(),c.getState().phase!=="IDLE"&&c.dispatch(rl()))},[y,c]),te=Me(y.isClaimed,[y]),Ve=De(function(){return{canGetLock:T,tryGetLock:I,findClosestDraggableId:x,findOptionsForDraggable:k,tryReleaseLock:P,isLockClaimed:te}},[T,I,x,k,P,te]);Ec(v);for(var Qe=0;Qe<v.length;Qe++)v[Qe](Ve)}var Dc=function(l){return{onBeforeCapture:l.onBeforeCapture,onBeforeDragStart:l.onBeforeDragStart,onDragStart:l.onDragStart,onDragEnd:l.onDragEnd,onDragUpdate:l.onDragUpdate}};function Go(o){return o.current||ge(!1),o.current}function kl(o){var l=o.contextId,c=o.setCallbacks,f=o.sensors,m=o.nonce,g=o.dragHandleUsageInstructions,v=(0,D.useRef)(null);Ka();var y=xl(o),E=Me(function(){return Dc(y.current)},[y]),T=s0(l),I=c0({contextId:l,text:g}),x=za(l,m),k=Me(function(Lr){Go(v).dispatch(Lr)},[]),P=De(function(){return(0,He.DE)({publishWhileDragging:tl,updateDroppableScroll:su,updateDroppableIsEnabled:lu,updateDroppableIsCombineEnabled:cu,collectionStarting:ou},k)},[k]),te=_c(),Ve=De(function(){return Nu(te,P)},[te,P]),Qe=De(function(){return ml((0,V.Z)({scrollWindow:Fu,scrollDroppable:Ve.scrollDroppable},(0,He.DE)({move:nc},k)))},[Ve.scrollDroppable,k]),rt=Xu(l),ft=De(function(){return Ru({announce:T,autoScroller:Qe,dimensionMarshal:Ve,focusMarshal:rt,getResponders:E,styleMarshal:x})},[T,Qe,Ve,rt,E,x]);v.current=ft;var Et=Me(function(){var Lr=Go(v),Yr=Lr.getState();Yr.phase!=="IDLE"&&Lr.dispatch(rl())},[]),Tt=Me(function(){var Lr=Go(v).getState();return Lr.isDragging||Lr.phase==="DROP_ANIMATING"},[]),fr=De(function(){return{isDragging:Tt,tryAbort:Et}},[Tt,Et]);c(fr);var er=Me(function(Lr){return mc(Go(v).getState(),Lr)},[]),Zt=Me(function(){return fi(Go(v).getState())},[]),ln=De(function(){return{marshal:Ve,focus:rt,contextId:l,canLift:er,isMovementAllowed:Zt,dragHandleUsageInstructionsId:I,registry:te}},[l,Ve,I,rt,er,Zt,te]);return C0({contextId:l,store:ft,registry:te,customSensors:f,enableDefaultSensors:o.enableDefaultSensors!==!1}),(0,D.useEffect)(function(){return Et},[Et]),D.createElement(Es.Provider,{value:ln},D.createElement(gt,{context:Ms,store:ft},o.children))}var li=0;function wo(){li=0}function nd(){return De(function(){return""+li++},[])}function E0(){wo(),bl()}function Ac(o){var l=nd(),c=o.dragHandleUsageInstructions||ve.dragHandleUsageInstructions;return D.createElement(Mr,null,function(f){return D.createElement(kl,{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 Lc=function(l){return function(c){return l===c}},k0=Lc("scroll"),D0=Lc("auto"),A0=Lc("visible"),Bc=function(l,c){return c(l.overflowX)||c(l.overflowY)},nn=function(l,c){return c(l.overflowX)&&c(l.overflowY)},id=function(l){var c=window.getComputedStyle(l),f={overflowX:c.overflowX,overflowY:c.overflowY};return Bc(f,k0)||Bc(f,D0)},L0=function(){return!1;var l,c,f,m},Wa=function o(l){return l==null?null:l===document.body?L0()?l:null:l===document.documentElement?null:id(l)?l:o(l.parentElement)},Ff=function(o){if(o)var l=Wa(o.parentElement)},So=function(o){return{x:o.scrollLeft,y:o.scrollTop}},B0=function o(l){if(!l)return!1;var c=window.getComputedStyle(l);return c.position==="fixed"?!0:o(l.parentElement)},ad=function(o){var l=Wa(o),c=B0(o);return{closestScrollable:l,isFixedOnPage:c}},od=function(o){var l=o.descriptor,c=o.isEnabled,f=o.isCombineEnabled,m=o.isFixedOnPage,g=o.direction,v=o.client,y=o.page,E=o.closest,T=function(){if(!E)return null;var P=E.scrollSize,te=E.client,Ve=dc({scrollHeight:P.scrollHeight,scrollWidth:P.scrollWidth,height:te.paddingBox.height,width:te.paddingBox.width});return{pageMarginBox:E.page.marginBox,frameClient:te,scrollSize:P,shouldClipSubject:E.shouldClipSubject,scroll:{initial:E.scroll,current:E.scroll,max:Ve,diff:{value:we,displacement:we}}}}(),I=g==="vertical"?Ir:Tn,x=Vt({page:y,withPlaceholder:null,axis:I,frame:T}),k={descriptor:l,isCombineEnabled:f,isFixedOnPage:m,axis:I,isEnabled:c,client:v,page:y,frame:T,subject:x};return k},$s=function(l,c){var f=un(l);if(!c||l!==c)return f;var m=f.paddingBox.top-c.scrollTop,g=f.paddingBox.left-c.scrollLeft,v=m+c.scrollHeight,y=g+c.scrollWidth,E={top:m,right:y,bottom:v,left:g},T=lr(E,f.border),I=pr({borderBox:T,margin:f.margin,border:f.border,padding:f.padding});return I},I0=function(o){var l=o.ref,c=o.descriptor,f=o.env,m=o.windowScroll,g=o.direction,v=o.isDropDisabled,y=o.isCombineEnabled,E=o.shouldClipSubject,T=f.closestScrollable,I=$s(l,T),x=an(I,m),k=function(){if(!T)return null;var te=un(T),Ve={scrollHeight:T.scrollHeight,scrollWidth:T.scrollWidth};return{client:te,page:an(te,m),scroll:So(T),scrollSize:Ve,shouldClipSubject:E}}(),P=od({descriptor:c,isEnabled:!v,isCombineEnabled:y,isFixedOnPage:f.isFixedOnPage,direction:g,client:I,page:x,closest:k});return P},sd={passive:!1},Ic={passive:!0},$c=function(o){return o.shouldPublishImmediately?sd:Ic};function Dl(o){var l=(0,D.useContext)(o);return l||ge(!1),l}var Al=function(l){return l&&l.env.closestScrollable||null};function $0(o){var l=(0,D.useRef)(null),c=Dl(Es),f=yl("droppable"),m=c.registry,g=c.marshal,v=xl(o),y=De(function(){return{id:o.droppableId,type:o.type,mode:o.mode}},[o.droppableId,o.mode,o.type]),E=(0,D.useRef)(y),T=De(function(){return cr(function(Tt,fr){l.current||ge(!1);var er={x:Tt,y:fr};g.updateDroppableScroll(y.id,er)})},[y.id,g]),I=Me(function(){var Tt=l.current;return!Tt||!Tt.env.closestScrollable?we:So(Tt.env.closestScrollable)},[]),x=Me(function(){var Tt=I();T(Tt.x,Tt.y)},[I,T]),k=De(function(){return mn(x)},[x]),P=Me(function(){var Tt=l.current,fr=Al(Tt);Tt&&fr||ge(!1);var er=Tt.scrollOptions;if(er.shouldPublishImmediately){x();return}k()},[k,x]),te=Me(function(Tt,fr){l.current&&ge(!1);var er=v.current,Zt=er.getDroppableRef();Zt||ge(!1);var ln=ad(Zt),Lr={ref:Zt,descriptor:y,env:ln,scrollOptions:fr};l.current=Lr;var Yr=I0({ref:Zt,descriptor:y,env:ln,windowScroll:Tt,direction:er.direction,isDropDisabled:er.isDropDisabled,isCombineEnabled:er.isCombineEnabled,shouldClipSubject:!er.ignoreContainerClipping}),Qr=ln.closestScrollable;return Qr&&(Qr.setAttribute(oi.contextId,c.contextId),Qr.addEventListener("scroll",P,$c(Lr.scrollOptions))),Yr},[c.contextId,y,P,v]),Ve=Me(function(){var Tt=l.current,fr=Al(Tt);return Tt&&fr||ge(!1),So(fr)},[]),Qe=Me(function(){var Tt=l.current;Tt||ge(!1);var fr=Al(Tt);l.current=null,fr&&(k.cancel(),fr.removeAttribute(oi.contextId),fr.removeEventListener("scroll",P,$c(Tt.scrollOptions)))},[P,k]),rt=Me(function(Tt){var fr=l.current;fr||ge(!1);var er=Al(fr);er||ge(!1),er.scrollTop+=Tt.y,er.scrollLeft+=Tt.x},[]),ft=De(function(){return{getDimensionAndWatchScroll:te,getScrollWhileDragging:Ve,dragStopped:Qe,scroll:rt}},[Qe,te,Ve,rt]),Et=De(function(){return{uniqueId:f,descriptor:y,callbacks:ft}},[ft,y,f]);zn(function(){return E.current=Et.descriptor,m.droppable.register(Et),function(){l.current&&Qe(),m.droppable.unregister(Et)}},[ft,y,Qe,Et,g,m.droppable]),zn(function(){l.current&&g.updateDroppableIsEnabled(E.current.id,!o.isDropDisabled)},[o.isDropDisabled,g]),zn(function(){l.current&&g.updateDroppableIsCombineEnabled(E.current.id,o.isCombineEnabled)},[o.isCombineEnabled,g])}function Tc(){}var ld={width:0,height:0,margin:$r},T0=function(l){var c=l.isAnimatingOpenOnMount,f=l.placeholder,m=l.animate;return c||m==="close"?ld:{height:f.client.borderBox.height,width:f.client.borderBox.width,margin:f.client.margin}},P0=function(l){var c=l.isAnimatingOpenOnMount,f=l.placeholder,m=l.animate,g=T0({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"?Ro.placeholder:null}};function R0(o){var l=(0,D.useRef)(null),c=Me(function(){l.current&&(clearTimeout(l.current),l.current=null)},[]),f=o.animate,m=o.onTransitionEnd,g=o.onClose,v=o.contextId,y=(0,D.useState)(o.animate==="open"),E=y[0],T=y[1];(0,D.useEffect)(function(){return E?f!=="open"?(c(),T(!1),Tc):l.current?Tc:(l.current=setTimeout(function(){l.current=null,T(!1)}),c):Tc},[f,E,c]);var I=Me(function(k){k.propertyName==="height"&&(m(),f==="close"&&g())},[f,g,m]),x=P0({isAnimatingOpenOnMount:E,animate:o.animate,placeholder:o.placeholder});return D.createElement(o.placeholder.tagName,{style:x,"data-rbd-placeholder-context-id":v,onTransitionEnd:I,ref:o.innerRef})}var Va=D.memo(R0),Aa=D.createContext(null);function _o(o){o&&mo(o)||ge(!1)}function Qi(o){return typeof o=="boolean"}function ea(o,l){l.forEach(function(c){return c(o)})}var Za=[function(l){var c=l.props;c.droppableId||ge(!1),typeof c.droppableId!="string"&&ge(!1)},function(l){var c=l.props;Qi(c.isDropDisabled)||ge(!1),Qi(c.isCombineEnabled)||ge(!1),Qi(c.ignoreContainerClipping)||ge(!1)},function(l){var c=l.getDroppableRef;_o(c())}],Ll=[function(l){var c=l.props,f=l.getPlaceholderRef;if(c.placeholder)var m=f()}],Bl=[function(l){var c=l.props;c.renderClone||ge(!1)},function(l){var c=l.getPlaceholderRef;c()&&ge(!1)}];function Il(o){Zo(function(){ea(o,Za),o.props.mode==="standard"&&ea(o,Ll),o.props.mode==="virtual"&&ea(o,Bl)})}var $l=function(o){(0,U.Z)(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}(D.PureComponent),cd={dragging:5e3,dropAnimating:4500},ud=function(l,c){return c?Ro.drop(c.duration):l?Ro.snap:Ro.fluid},dd=function(l,c){return l?c?To.opacity.drop:To.opacity.combining:null},fd=function(l){return l.forceShouldAnimate!=null?l.forceShouldAnimate:l.mode==="SNAP"};function O0(o){var l=o.dimension,c=l.client,f=o.offset,m=o.combineWith,g=o.dropping,v=!!m,y=fd(o),E=!!g,T=E?gs.drop(f,v):gs.moveTo(f),I={position:"fixed",top:c.marginBox.top,left:c.marginBox.left,boxSizing:"border-box",width:c.borderBox.width,height:c.borderBox.height,transition:ud(y,g),transform:T,opacity:dd(v,E),zIndex:E?cd.dropAnimating:cd.dragging,pointerEvents:"none"};return I}function hd(o){return{transform:gs.moveTo(o.offset),transition:o.shouldAnimateDisplacement?null:"none"}}function N0(o){return o.type==="DRAGGING"?O0(o):hd(o)}function F0(o,l,c){c===void 0&&(c=we);var f=window.getComputedStyle(l),m=l.getBoundingClientRect(),g=jt(m,f),v=an(g,c),y={client:g,tagName:l.tagName.toLowerCase(),display:f.display},E={x:g.marginBox.width,y:g.marginBox.height},T={descriptor:o,placeholder:y,displaceBy:E,client:g,page:v};return T}function z0(o){var l=yl("draggable"),c=o.descriptor,f=o.registry,m=o.getDraggableRef,g=o.canDragInteractiveElements,v=o.shouldRespectForcePress,y=o.isEnabled,E=De(function(){return{canDragInteractiveElements:g,shouldRespectForcePress:v,isEnabled:y}},[g,y,v]),T=Me(function(P){var te=m();return te||ge(!1),F0(c,te,P)},[c,m]),I=De(function(){return{uniqueId:l,descriptor:c,options:E,getDimension:T}},[c,T,E,l]),x=(0,D.useRef)(I),k=(0,D.useRef)(!0);zn(function(){return f.draggable.register(x.current),function(){return f.draggable.unregister(x.current)}},[f.draggable]),zn(function(){if(k.current){k.current=!1;return}var P=x.current;x.current=I,f.draggable.update(I,P)},[I,f.draggable])}function K0(o,l,c){Zo(function(){function f(g){return"Draggable[id: "+g+"]: "}var m=o.draggableId;m||ge(!1),typeof m!="string"&&ge(!1),Qt(o.index)||ge(!1),o.mapped.type!=="DRAGGING"&&(_o(c()),o.isEnabled&&(vl(l,m)||ge(!1)))})}function H0(o){}function W0(o){o.preventDefault()}function V0(o){var l=(0,D.useRef)(null),c=Me(function(Lr){l.current=Lr},[]),f=Me(function(){return l.current},[]),m=Dl(Es),g=m.contextId,v=m.dragHandleUsageInstructionsId,y=m.registry,E=Dl(Aa),T=E.type,I=E.droppableId,x=De(function(){return{id:o.draggableId,index:o.index,type:T,droppableId:I}},[o.draggableId,o.index,T,I]),k=o.children,P=o.draggableId,te=o.isEnabled,Ve=o.shouldRespectForcePress,Qe=o.canDragInteractiveElements,rt=o.isClone,ft=o.mapped,Et=o.dropAnimationFinished;if(K0(o,g,f),H0(rt),!rt){var Tt=De(function(){return{descriptor:x,registry:y,getDraggableRef:f,canDragInteractiveElements:Qe,shouldRespectForcePress:Ve,isEnabled:te}},[x,y,f,Qe,Ve,te]);z0(Tt)}var fr=De(function(){return te?{tabIndex:0,role:"button","aria-describedby":v,"data-rbd-drag-handle-draggable-id":P,"data-rbd-drag-handle-context-id":g,draggable:!1,onDragStart:W0}:null},[g,v,P,te]),er=Me(function(Lr){ft.type==="DRAGGING"&&ft.dropping&&Lr.propertyName==="transform"&&Et()},[Et,ft]),Zt=De(function(){var Lr=N0(ft),Yr=ft.type==="DRAGGING"&&ft.dropping?er:null,Qr={innerRef:c,draggableProps:{"data-rbd-draggable-context-id":g,"data-rbd-draggable-id":P,style:Lr,onTransitionEnd:Yr},dragHandleProps:fr};return Qr},[g,fr,P,ft,er,c]),ln=De(function(){return{draggableId:x.id,type:x.type,source:{index:x.index,droppableId:x.droppableId}}},[x.droppableId,x.id,x.index,x.type]);return k(Zt,ft.snapshot,ln)}var Ts=function(o,l){return o===l},qo=function(o){var l=o.combine,c=o.destination;return c?c.droppableId:l?l.droppableId:null},Mo=function(l){return l.combine?l.combine.draggableId:null},La=function(l){return l.at&&l.at.type==="COMBINE"?l.at.combine.draggableId:null};function pd(){var o=cr(function(m,g){return{x:m,y:g}}),l=cr(function(m,g,v,y,E){return{isDragging:!0,isClone:g,isDropAnimating:!!E,dropAnimation:E,mode:m,draggingOver:v,combineWith:y,combineTargetFor:null}}),c=cr(function(m,g,v,y,E,T,I){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:E,combineWith:T,mode:g,offset:m,dimension:v,forceShouldAnimate:I,snapshot:l(g,y,E,T,null)}}}),f=function(g,v){if(g.isDragging){if(g.critical.draggable.id!==v.draggableId)return null;var y=g.current.client.offset,E=g.dimensions.draggables[v.draggableId],T=hn(g.impact),I=La(g.impact),x=g.forceShouldAnimate;return c(o(y.x,y.y),g.movementMode,E,v.isClone,T,I,x)}if(g.phase==="DROP_ANIMATING"){var k=g.completed;if(k.result.draggableId!==v.draggableId)return null;var P=v.isClone,te=g.dimensions.draggables[v.draggableId],Ve=k.result,Qe=Ve.mode,rt=qo(Ve),ft=Mo(Ve),Et=g.dropDuration,Tt={duration:Et,curve:il.drop,moveTo:g.newHomeClientOffset,opacity:ft?To.opacity.drop:null,scale:ft?To.scale.drop:null};return{mapped:{type:"DRAGGING",offset:g.newHomeClientOffset,dimension:te,dropping:Tt,draggingOver:rt,combineWith:ft,mode:Qe,forceShouldAnimate:null,snapshot:l(Qe,P,rt,ft,Tt)}}}return null};return f}function Pc(o){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:o,combineWith:null}}var md={mapped:{type:"SECONDARY",offset:we,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Pc(null)}};function Z0(){var o=cr(function(v,y){return{x:v,y}}),l=cr(Pc),c=cr(function(v,y,E){return y===void 0&&(y=null),{mapped:{type:"SECONDARY",offset:v,combineTargetFor:y,shouldAnimateDisplacement:E,snapshot:l(y)}}}),f=function(y){return y?c(we,y,!0):null},m=function(y,E,T,I){var x=T.displaced.visible[y],k=!!(I.inVirtualList&&I.effected[y]),P=Xr(T),te=P&&P.draggableId===y?E:null;if(!x){if(!k)return f(te);if(T.displaced.invisible[y])return null;var Ve=Ie(I.displacedBy.point),Qe=o(Ve.x,Ve.y);return c(Qe,te,!0)}if(k)return f(te);var rt=T.displacedBy.point,ft=o(rt.x,rt.y);return c(ft,te,x.shouldAnimate)},g=function(y,E){if(y.isDragging)return y.critical.draggable.id===E.draggableId?null:m(E.draggableId,y.critical.draggable.id,y.impact,y.afterCritical);if(y.phase==="DROP_ANIMATING"){var T=y.completed;return T.result.draggableId===E.draggableId?null:m(E.draggableId,T.result.draggableId,T.impact,T.afterCritical)}return null};return g}var j0=function(){var l=pd(),c=Z0(),f=function(g,v){return l(g,v)||c(g,v)||md};return f},gd={dropAnimationFinished:nl},U0=Ne(j0,gd,null,{context:Ms,pure:!0,areStatePropsEqual:Ts})(V0);function vd(o){var l=Dl(Aa),c=l.isUsingCloneFor;return c===o.draggableId&&!o.isClone?null:D.createElement(U0,o)}function G0(o){var l=typeof o.isDragDisabled=="boolean"?!o.isDragDisabled:!0,c=!!o.disableInteractiveElementBlocking,f=!!o.shouldRespectForcePress;return D.createElement(vd,(0,V.Z)({},o,{isClone:!1,isEnabled:l,canDragInteractiveElements:c,shouldRespectForcePress:f}))}function Wr(o){var l=(0,D.useContext)(Es);l||ge(!1);var c=l.contextId,f=l.isMovementAllowed,m=(0,D.useRef)(null),g=(0,D.useRef)(null),v=o.children,y=o.droppableId,E=o.type,T=o.mode,I=o.direction,x=o.ignoreContainerClipping,k=o.isDropDisabled,P=o.isCombineEnabled,te=o.snapshot,Ve=o.useClone,Qe=o.updateViewportMaxScroll,rt=o.getContainerForClone,ft=Me(function(){return m.current},[]),Et=Me(function(ti){m.current=ti},[]),Tt=Me(function(){return g.current},[]),fr=Me(function(ti){g.current=ti},[]);Il({props:o,getDroppableRef:ft,getPlaceholderRef:Tt});var er=Me(function(){f()&&Qe({maxScroll:po()})},[f,Qe]);$0({droppableId:y,type:E,mode:T,direction:I,isDropDisabled:k,isCombineEnabled:P,ignoreContainerClipping:x,getDroppableRef:ft});var Zt=D.createElement($l,{on:o.placeholder,shouldAnimate:o.shouldAnimatePlaceholder},function(ti){var Si=ti.onClose,pi=ti.data,_i=ti.animate;return D.createElement(Va,{placeholder:pi,onClose:Si,innerRef:fr,animate:_i,contextId:c,onTransitionEnd:er})}),ln=De(function(){return{innerRef:Et,placeholder:Zt,droppableProps:{"data-rbd-droppable-id":y,"data-rbd-droppable-context-id":c}}},[c,y,Zt,Et]),Lr=Ve?Ve.dragging.draggableId:null,Yr=De(function(){return{droppableId:y,type:E,isUsingCloneFor:Lr}},[y,Lr,E]);function Qr(){if(!Ve)return null;var ti=Ve.dragging,Si=Ve.render,pi=D.createElement(vd,{draggableId:ti.draggableId,index:ti.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(_i,ga){return Si(_i,ga,ti)});return vt.createPortal(pi,rt())}return D.createElement(Aa.Provider,{value:Yr},v(ln,te),Qr())}var Xo=function(l,c){return l===c.droppable.type},Ps=function(l,c){return c.draggables[l.draggable.id]},q0=function(){var l={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},c=(0,V.Z)({},l,{shouldAnimatePlaceholder:!1}),f=cr(function(v){return{draggableId:v.id,type:v.type,source:{index:v.index,droppableId:v.droppableId}}}),m=cr(function(v,y,E,T,I,x){var k=I.descriptor.id,P=I.descriptor.droppableId===v;if(P){var te=x?{render:x,dragging:f(I.descriptor)}:null,Ve={isDraggingOver:E,draggingOverWith:E?k:null,draggingFromThisWith:k,isUsingPlaceholder:!0};return{placeholder:I.placeholder,shouldAnimatePlaceholder:!1,snapshot:Ve,useClone:te}}if(!y)return c;if(!T)return l;var Qe={isDraggingOver:E,draggingOverWith:k,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:I.placeholder,shouldAnimatePlaceholder:!0,snapshot:Qe,useClone:null}}),g=function(y,E){var T=E.droppableId,I=E.type,x=!E.isDropDisabled,k=E.renderClone;if(y.isDragging){var P=y.critical;if(!Xo(I,P))return c;var te=Ps(P,y.dimensions),Ve=hn(y.impact)===T;return m(T,x,Ve,Ve,te,k)}if(y.phase==="DROP_ANIMATING"){var Qe=y.completed;if(!Xo(I,Qe.critical))return c;var rt=Ps(Qe.critical,y.dimensions);return m(T,x,qo(Qe.result)===T,hn(Qe.impact)===T,rt,k)}if(y.phase==="IDLE"&&y.completed&&!y.shouldFlush){var ft=y.completed;if(!Xo(I,ft.critical))return c;var Et=hn(ft.impact)===T,Tt=!!(ft.impact.at&&ft.impact.at.type==="COMBINE"),fr=ft.critical.droppable.id===T;return Et?Tt?l:c:fr?l:c}return c};return g},ja={updateViewportMaxScroll:ms};function bd(){return document.body||ge(!1),document.body}var Co={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:bd},Rc=Ne(q0,ja,null,{context:Ms,pure:!0,areStatePropsEqual:Ts})(Wr);Rc.defaultProps=Co},38486:function(yr,bt){"use strict";var w;var D=60103,U=60106,V=60107,He=60108,H=60114,Y=60109,me=60110,S=60112,_=60113,Ue=60120,je=60115,A=60116,R=60121,ze=60122,yt=60117,gt=60129,qe=60131;if(typeof Symbol=="function"&&Symbol.for){var Re=Symbol.for;D=Re("react.element"),U=Re("react.portal"),V=Re("react.fragment"),He=Re("react.strict_mode"),H=Re("react.profiler"),Y=Re("react.provider"),me=Re("react.context"),S=Re("react.forward_ref"),_=Re("react.suspense"),Ue=Re("react.suspense_list"),je=Re("react.memo"),A=Re("react.lazy"),R=Re("react.block"),ze=Re("react.server.block"),yt=Re("react.fundamental"),gt=Re("react.debug_trace_mode"),qe=Re("react.legacy_hidden")}function Nt(ye){if(typeof ye=="object"&&ye!==null){var xe=ye.$$typeof;switch(xe){case D:switch(ye=ye.type,ye){case V:case H:case He:case _:case Ue:return ye;default:switch(ye=ye&&ye.$$typeof,ye){case me:case S:case A:case je:case Y:return ye;default:return xe}}case U:return xe}}}var Ee=Y,_e=D,O=S,K=V,Q=A,re=je,We=U,de=H,ut=He,lt=_;w=me,w=Ee,w=_e,w=O,w=K,w=Q,w=re,w=We,w=de,w=ut,w=lt,w=function(){return!1},w=function(){return!1},bt.isContextConsumer=function(ye){return Nt(ye)===me},w=function(ye){return Nt(ye)===Y},w=function(ye){return typeof ye=="object"&&ye!==null&&ye.$$typeof===D},w=function(ye){return Nt(ye)===S},w=function(ye){return Nt(ye)===V},w=function(ye){return Nt(ye)===A},w=function(ye){return Nt(ye)===je},w=function(ye){return Nt(ye)===U},w=function(ye){return Nt(ye)===H},w=function(ye){return Nt(ye)===He},w=function(ye){return Nt(ye)===_},w=function(ye){return typeof ye=="string"||typeof ye=="function"||ye===V||ye===H||ye===gt||ye===He||ye===_||ye===Ue||ye===qe||typeof ye=="object"&&ye!==null&&(ye.$$typeof===A||ye.$$typeof===je||ye.$$typeof===Y||ye.$$typeof===me||ye.$$typeof===S||ye.$$typeof===yt||ye.$$typeof===R||ye[0]===ze)},w=Nt},53410:function(yr,bt,w){"use strict";yr.exports=w(38486)},69168:function(yr,bt,w){"use strict";w.d(bt,{Z:function(){return U}});var D=w(18773);function U(V,He){V.prototype=Object.create(He.prototype),V.prototype.constructor=V,(0,D.Z)(V,He)}},48136:function(yr,bt,w){"use strict";var D=Object.defineProperty,U=Object.defineProperties,V=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,me=(e,t,r)=>t in e?D(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)&&me(e,r,t[r]);if(He)for(var r of He(t))Y.call(t,r)&&me(e,r,t[r]);return e},_=(e,t)=>U(e,V(t)),Ue=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&&He)for(var n of He(e))t.indexOf(n)<0&&Y.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 ze(){return"window"in globalThis&&"document"in globalThis}function yt(){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(!ze())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 Re(){if(!ze())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 Ee={strings:R,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Ee._locale||(Ee._locale=ze()?navigator.language.slice(0,5):"en-US"),Ee._locale},set locale(e){Ee._locale=e,Ee._numberFormatter=void 0,Ee.dirty=!0},get numberFormatter(){return Ee._numberFormatter||(Ee._numberFormatter=new Intl.NumberFormat(Ee.locale)),Ee._numberFormatter},merge(e,t){if(typeof e=="string"&&t)Ee.strings[e]=S(S({},Ee.strings[e]),t),Ee.dirty=!0;else for(const r of Object.keys(e))Ee.merge(r,e[r])},get dirty(){return Ee._dirty},set dirty(e){Ee._dirty||Ee._dirty===e||(Ee._dirty=!0,setTimeout(()=>{Ee._dirty=!1,this._subscribers.forEach(t=>t==null?void 0:t())},0))},subscribe(e){return Ee._subscribers.push(e),Ee._subscribers.length-1},unsubscribe(e){e<0||e>=Ee._subscribers.length||(Ee._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=_e(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=_e(n);i&&r.setAttribute("aria-label",i)}}}};function _e(e,...t){if(e===void 0)return;let r="";const n=Ee.locale;Ee.strings[n]&&(r=Ee.strings[n][e]);const i=n.slice(0,2);if(!r&&Ee.strings[i]&&(r=Ee.strings[i][e]),r||(r=Ee.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=Ee.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"},K={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Q={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"},re={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"},We={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"},de={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,b=255,M=255,B=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=b,h=M,p=B;const ee=(t=u[Ze].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:t[1],ke=ee==null?void 0:ee.toLowerCase(),Ye=ee&&(s=(a=(i=(n=(r=re[ke])!=null?r:re[We[ee]])!=null?n:K[ee])!=null?i:de[ee])!=null?a:O[ee])!=null?s:u[Ze].trim();let $e=Ye.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if($e!=null&&$e[1]&&$e[2]&&$e[3])b=Math.max(0,Math.min(255,Number.parseInt($e[1],16))),M=Math.max(0,Math.min(255,Number.parseInt($e[2],16))),B=Math.max(0,Math.min(255,Number.parseInt($e[3],16)));else if($e=Ye.match(/^#([\da-f]{3})$/i),$e!=null&&$e[1]){const wt=Number.parseInt($e[1][0],16),Ot=Number.parseInt($e[1][1],16),kt=Number.parseInt($e[1][2],16);b=Math.max(0,Math.min(255,wt*16+wt)),M=Math.max(0,Math.min(255,Ot*16+Ot)),B=Math.max(0,Math.min(255,kt*16+kt))}else if($e=Ye.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),$e!=null&&$e[1]&&$e[2]&&$e[3])b=Math.max(0,Math.min(255,Number.parseInt($e[1]))),M=Math.max(0,Math.min(255,Number.parseInt($e[2]))),B=Math.max(0,Math.min(255,Number.parseInt($e[3])));else return;$>=0&&(b=(1-$)*b+$*d,M=(1-$)*M+$*h,B=(1-$)*B+$*p,$=-1),Ze+1<u.length&&($=Math.max(0,Math.min(100,Number.parseInt(u[++Ze])))/100)}return $>=0&&(b=$*b+(1-$)*d,M=$*M+(1-$)*h,B=$*B+(1-$)*p),se&&(b=255-b,M=255-M,B=255-B),"#"+("00"+Math.round(b).toString(16)).slice(-2)+("00"+Math.round(M).toString(16)).slice(-2)+("00"+Math.round(B).toString(16)).slice(-2)}function lt(e){var t,r;return e=e.trim(),(r=(t=Q[e.toLowerCase()])!=null?t:Q[We[e]])!=null?r:ut(e)}function ye(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 xe(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 et(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*xe(a,i,t+2)),g:Math.round(255*xe(a,i,t)),b:Math.round(255*xe(a,i,t-2))}}function j(e){return e<0?0:e>255?255:Math.round(e)}function Fe(e){const{r:t,g:r,b:n}=e;let i=((1<<24)+(j(t)<<16)+(j(r)<<8)+j(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 Xe(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=ye(e);if(!t)return e;let{h:r,s:n,l:i}=Xe(t);return n+=.1,i-=.1,Fe(et({h:r,s:n,l:i}))}var Se={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"},be={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},q=[{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 Oe(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 q)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(be[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 be)if(be[r]===e){e=(t=r.codePointAt(0))!=null?t:0;break}for(const r of q)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=Se[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 ue(e){return e?Array.isArray(e)?e:typeof e=="object"&&"group"in e?e.group:[]:[]}var ot={},dt=S({},Se),Ft={},Ht={},St={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}"},Jt={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}},zt={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}},tr={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:zt},"amsmath.sty":{package:Jt,primitive:!0},"texvc.sty":{package:St,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},ae=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,Z,z;Re()?(Z=new RegExp("\\p{Letter}","u"),z=new RegExp("[0-9\\p{Letter}]","u")):(Z=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,z=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function he(e,t,r="mord",n){t!==void 0&&(ot[e]={definitionType:"symbol",type:r,variant:n,codepoint:t},dt[t]||(dt[t]=e))}function pe(e,t,r){if(typeof e=="string"){for(let n=0;n<e.length;n++){const i=e.charAt(n);he(i,i.codePointAt(0))}return}for(const[n,i,a,s]of e)he(n,i,a!=null?a:t,s!=null?s:r)}function Ne(e,t){for(let r=e;r<=t;r++)he(String.fromCodePoint(r),r)}function ne(e){var t;return(t=Ht[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 Ft)s.startsWith(t)&&!Ft[s].infix&&i.push({match:s,frequency:(r=Ft[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 Je(e){let t="auto";const r=e.match(/:([^=]+)/);return r&&(t=r[1].trim()),t}function tt(e){if(!e)return[];const t=[];let r=e.split("]");if(r[0].startsWith("[")){t.push({isOptional:!0,type:Je(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...tt(r[n]))}else if(r=e.split("}"),r[0].startsWith("{")){t.push({isOptional:!1,type:Je(r[0].slice(1))});for(let n=1;n<=r.length;n++)t.push(...tt(r[n]))}return t}function at(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 Mt(e,t){typeof e=="string"&&(e=[e]);const r={tabular:!1,params:[],createAtom:t};for(const n of e)Ht[n]=r}function Bt(e,t,r){typeof e=="string"&&(e=[e]);const i={tabular:!0,params:tt(t),createAtom:r};for(const a of e)Ht[a]=i}function W(e,t,r){var n,i;r||(r={});const a={definitionType:"function",params:tt(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")Ft["\\"+e]=a;else for(const s of e)Ft["\\"+s]=a}var _t;function vt(e){return _t||(_t=X(tr)),e?X(S(S({},_t),e)):_t}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 X(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 fe(e,t="math"){if(!e||e.length===0)return null;let r=null;if(e.startsWith("\\")){if(r=Ft[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=Me("math",e.codePointAt(0));return n.startsWith("\\")?_(S({},fe(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 De(e,t){if(!e.startsWith("\\"))return null;const r=e.slice(1);return t[r]}function Me(e,t){if(t===void 0)return"";if(e==="math"&&dt[t])return dt[t];if(e==="text"){const r=Object.keys(Lt).find(n=>Lt[n]===t);return r||String.fromCodePoint(t)}return String.fromCodePoint(t)}var pt=[0,.68889,0,0,.72222],Yt=[0,.68889,0,0,.66667],Wt=[0,.68889,0,0,.77778],Dt=[0,.68889,0,0,.61111],lr=[.16667,.68889,0,0,.77778],nr=[0,.68889,0,0,.55556],Ct=[0,0,0,0,.25],gr=[0,.825,0,0,2.33334],pr=[0,.9,0,0,2.33334],wr=[0,.68889,0,0,.54028],rn=[-.03598,.46402,0,0,.5],ir=[-.13313,.36687,0,0,1],an=[.01354,.52239,0,0,1],jt=[.01354,.52239,0,0,1.11111],un=[0,.54986,0,0,1],jr=[0,.69224,0,0,.5],pn=[0,.43056,0,0,1],qr=[.08198,.58198,0,0,.77778],Sr=[.19444,.69224,0,0,.41667],cr=[.1808,.675,0,0,1],Zn=[.19444,.69224,0,0,.83334],mn=[.13667,.63667,0,0,1],ci=[-.064,.437,0,0,1.334],yn=[.08167,.58167,0,0,.77778],jn=[0,.69224,0,0,.72222],C=[0,.69224,0,0,.66667],L=[-.13313,.36687,0,0,.77778],Be=[.06062,.54986,0,0,.77778],Pe=[0,.69224,0,0,.77778],Te=[.25583,.75583,0,0,.77778],Ke=[.25142,.75726,0,0,.77778],xt=[.20576,.70576,0,0,.77778],nt=[.30274,.79383,0,0,.77778],It=[.22958,.72958,0,0,.77778],Pt=[.1808,.675,0,0,.77778],ur=[.13667,.63667,0,0,.77778],$t=[.13597,.63597,0,0,.77778],At=[.03517,.54986,0,0,.77778],ge=[0,.675,0,0,.77778],Mr=[.19444,.69224,0,0,.61111],Nr=[0,.54986,0,0,.76042],Cr=[0,.54986,0,0,.66667],vr=[.0391,.5391,0,0,.77778],Fr=[.03517,.54986,0,0,1.33334],br=[.38569,.88569,0,0,.77778],Vr=[.23222,.74111,0,0,.77778],oe=[.19444,.69224,0,0,.77778],J=[0,.37788,0,0,.5],ve=[0,.54986,0,0,.72222],we=[0,.69224,0,0,.83334],G=[.11111,.69224,0,0,.66667],le=[.26167,.75726,0,0,.77778],ce=[.48256,.98256,0,0,.77778],Ie=[.28481,.79383,0,0,.77778],st=[.08167,.58167,0,0,.22222],ct=[.08167,.58167,0,0,.38889],Ut=[0,.43056,.04028,0,.66667],ar=[.41951,.91951,0,0,.77778],xr=[.24982,.74947,0,0,.38865],dr=[.08319,.58283,0,0,.75623],or=[0,.10803,0,0,.27764],$r=[0,.47534,0,0,.50181],Tr=[.18906,.47534,0,0,.50181],Gt=[0,.69141,0,0,.50181],qt=[.24982,.74947,0,0,.27764],Vt=[0,.69141,0,0,.21471],Xt=[.25,.75,0,0,.44722],Qt=[0,.64444,0,0,.575],sr=[.08556,.58556,0,0,.89444],Pr=[0,.69444,0,0,.89444],mr=[0,.68611,0,0,.9],Kt=[0,.68611,0,0,.86944],ht=[.25,.75,0,0,.575],rr=[.25,.75,0,0,.31944],Rt=[0,.69444,0,0,.63889],Er=[0,.69444,0,0,.31944],Ur=[0,.44444,0,0,.63889],hr=[0,.44444,0,0,.51111],Xr=[0,.69444,0,0,.575],Rr=[.13333,.63333,0,0,.89444],ni=[0,.44444,0,0,.31944],_n=[0,.69444,0,0,.86944],kn=[0,.68611,0,0,.69166],Dn=[0,.68611,0,0,.83055],Un=[0,.68611,0,0,.89444],on=[0,.69444,0,0,.60278],mi=[.19444,.69444,0,0,.51111],Ci=[0,.69444,0,0,.83055],Ir=[-.10889,.39111,0,0,1.14999],Tn=[.19444,.69444,0,0,.575],Mn=[.19444,.69444,0,0,1.14999],Pn=[.19444,.69444,0,0,.70277],gi=[.05556,.75,0,0,.575],xn=[0,.68611,0,0,.95833],Gn=[.08556,.58556,0,0,.76666],ui=[-.02639,.47361,0,0,.575],Ei=[0,.44444,0,0,.89444],qn=[0,.55556,0,0,.76666],vi=[-.10889,.39111,0,0,.89444],Gi=[.00222,.50222,0,0,.89444],Xn=[.19667,.69667,0,0,.89444],Sa=[.08556,.58556,0,0,1.14999],Pi=[0,.69444,0,0,.70277],bi=[-.02778,.47222,0,0,.575],$n=[.25,.75,0,0,.51111],Rn=[-.13889,.36111,0,0,1.14999],_a=[.19444,.69444,0,0,1.02222],ki=[.12963,.69444,0,0,.89444],Ri=[.19444,.69444,0,0,.44722],yi=[0,.64444,.13167,0,.59111],Oi=[.19444,.64444,.13167,0,.59111],Ni=[0,.68611,.17208,0,.8961],Di=[.19444,.44444,.105,0,.53222],qi=[0,.44444,.085,0,.82666],Fi=[0,.69444,.06709,0,.59111],An=[0,.69444,.12945,0,.35555],di=[0,.69444,0,0,.94888],Jn=[0,.69444,.11472,0,.59111],Yn=[0,.68611,.10778,0,.88555],Cn=[0,.69444,.07939,0,.62055],sa=[0,.69444,.12417,0,.30667],zr=[0,.64444,.13556,0,.51111],kr=[.19444,.64444,.13556,0,.51111],fn=[0,.68333,.16389,0,.74333],En=[.19444,.43056,.08847,0,.46],On=[0,.43056,.07514,0,.71555],Nn=[0,.69444,.06646,0,.51111],oo=[0,.69444,0,0,.83129],Fn=[0,.69444,.1225,0,.51111],is=[0,.68333,.09403,0,.76666],zi=[0,.68333,.11111,0,.76666],Xs=[0,.69444,.06961,0,.51444],Xi=[0,.69444,0,0,.27778],Ai=[.25,.75,0,0,.38889],xi=[0,.64444,0,0,.5],la=[0,.69444,0,0,.77778],ca=[0,.68333,0,0,.75],$a=[0,.68333,0,0,.77778],so=[0,.68333,0,0,.68056],lo=[0,.68333,0,0,.72222],hn=[.25,.75,0,0,.5],Ki=[.25,.75,0,0,.27778],vn=[0,.69444,0,0,.5],fi=[0,.69444,0,0,.55556],Bo=[0,.43056,0,0,.44445],Ta=[0,.43056,0,0,.5],Js=[.19444,.43056,0,0,.55556],as=[0,.43056,0,0,.55556],hi=[.08333,.58333,0,0,.77778],Ys=[0,.43056,0,0,.27778],os=[0,.66786,0,0,.27778],Qs=[0,.69444,0,0,.75],ss=[0,.66786,0,0,.5],Pa=[0,.68333,0,0,.625],co=[.19444,.69444,0,0,.44445],Ra=[0,.69444,0,0,.72222],Io=[.19444,.69444,0,0,.5],uo=[.19444,.69444,0,0,1],ls=[.011,.511,0,0,1.126],Hi=[.19444,.69444,0,0,.61111],cs=[.05556,.75,0,0,.5],us=[0,.68333,0,0,.83334],ds=[.0391,.5391,0,0,.66667],fo=[-.05555,.44445,0,0,.5],el=[0,.43056,0,0,.77778],ua=[0,.55556,0,0,.66667],$o=[-.03625,.46375,0,0,.77778],Oa=[-.01688,.48312,0,0,.77778],Na=[.0391,.5391,0,0,1],Zr=[0,.69444,0,0,.61111],Hr=[-.03472,.46528,0,0,.5],Jr=[.25,.75,0,0,.44445],ii=[-.14236,.35764,0,0,1],Ln=[.244,.744,0,0,.412],Ma=[.19444,.69444,0,0,.88889],da=[.12963,.69444,0,0,.77778],fs=[.19444,.69444,0,0,.38889],hs=[.011,.511,0,0,1.638],ps=[.19444,.69444,0,0,0],fa=[0,.44444,0,0,.575],Ca=[.19444,.44444,0,0,.575],tl=[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],nc=[0,.44444,0,0,.58472],uu=[.19444,.44444,0,0,.6118],ms=[.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],rl=[.25,.75,0,0,.42778],Qn=[0,.69444,0,0,.55],Ji=[0,.69444,0,0,.73334],Ea=[0,.69444,0,0,.79445],mu=[0,.69444,0,0,.51945],nl=[0,.69444,0,0,.70278],r0=[0,.69444,0,0,.76389],gu=[.25,.75,0,0,.34306],ic=[0,.69444,0,0,.56111],vu=[0,.69444,0,0,.25556],il=[.19444,.45833,0,0,.56111],To=[0,.45833,0,0,.56111],Po=[0,.69444,0,0,.30556],Fa=[0,.69444,0,0,.58056],Ro=[0,.69444,0,0,.67223],al=[0,.69444,0,0,.85556],gs=[0,.69444,0,0,.55834],Wi=[0,.65556,.11156,0,.5],ol=[0,.69444,.08094,0,.70834],ac=[.17014,0,0,0,.44445],oc=[0,.69444,.0799,0,.5],bu=[0,.69444,0,0,.73752],yu=[0,.69444,.09205,0,.5],xu=[0,.69444,.09031,0,.77778],sc=[0,.69444,.07816,0,.27778],wu=[0,.69444,.00316,0,.5],lc=[.19444,.69444,0,0,.83334],Su=[.05556,.75,0,0,.83334],_u=[0,.75,0,0,.5],Mu=[.125,.08333,0,0,.27778],Cu=[0,.08333,0,0,.27778],ha=[0,.65556,0,0,.5],cc=[0,.69444,0,0,.47222],ka=[0,.69444,0,0,.66667],Eu=[0,.69444,0,0,.59722],uc=[0,.69444,0,0,.54167],ho=[0,.69444,0,0,.70834],vs=[.25,.75,0,0,.28889],bs=[0,.69444,0,0,.51667],ku=[0,.44444,0,0,.44445],Du=[.19444,.44444,0,0,.51667],Au=[0,.44444,0,0,.38333],Lu=[0,.44444,0,0,.51667],Bu=[0,.69444,0,0,.83334],Iu=[.35001,.85,0,0,.45834],$u=[.35001,.85,0,0,.57778],Tu=[.35001,.85,0,0,.41667],Pu=[.35001,.85,0,0,.58334],sl=[0,.72222,0,0,.55556],Ru=[1e-5,.6,0,0,.66667],ll=[1e-5,.6,0,0,.77778],Ou=[.25001,.75,0,0,.94445],dc=[.306,.805,.19445,0,.47222],fc=[.30612,.805,.19445,0,.47222],po=[.25001,.75,0,0,.83334],Oo=[.35001,.85,0,0,.47222],hc=[.25001,.75,0,0,1.11111],pc=[.65002,1.15,0,0,.59722],Nu=[.65002,1.15,0,0,.81111],mc=[.65002,1.15,0,0,.47222],Fu=[.65002,1.15,0,0,.66667],cl=[0,.75,0,0,1],zu=[.55001,1.05,0,0,1.27778],Ku=[.862,1.36,.44445,0,.55556],Da=[.86225,1.36,.44445,0,.55556],No=[.55001,1.05,0,0,1.11111],ys=[.65002,1.15,0,0,.52778],ul=[.65002,1.15,0,0,.61111],gc=[.55001,1.05,0,0,1.51112],vc=[.95003,1.45,0,0,.73611],bc=[.95003,1.45,0,0,1.04445],Hu=[.95003,1.45,0,0,.52778],xs=[.95003,1.45,0,0,.75],ws=[0,.75,0,0,1.44445],dl=[.95003,1.45,0,0,.58334],Wu=[1.25003,1.75,0,0,.79167],yc=[1.25003,1.75,0,0,1.27778],Vu=[1.25003,1.75,0,0,.58334],Fo=[1.25003,1.75,0,0,.80556],Ss=[0,.825,0,0,1.8889],zo=[1.25003,1.75,0,0,.63889],fl=[.64502,1.155,0,0,.875],hl=[1e-5,.6,0,0,.875],xc=[-99e-5,.601,0,0,.66667],pl=[.64502,1.155,0,0,.66667],Zu=[1e-5,.9,0,0,.88889],wc=[.65002,1.15,0,0,.88889],ju=[.90001,0,0,0,.88889],Uu=[-.00499,.605,0,0,1.05556],ml=[0,.12,0,0,.45],mt=[0,.61111,0,0,.525],ai=[.08333,.69444,0,0,.525],gl=[-.08056,.53055,0,0,.525],Gu=[-.05556,.55556,0,0,.525],oi=[0,.43056,0,0,.525],_s=[.22222,.43056,0,0,.525],Ko=[0,0,0,0,.525],n0={"AMS-Regular":{32:Ct,65:pt,66:Yt,67:pt,68:pt,69:Yt,70:Dt,71:Wt,72:Wt,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Wt,76:Yt,77:[0,.68889,0,0,.94445],78:pt,79:lr,80:Dt,81:lr,82:pt,83:nr,84:Yt,85:pt,86:pt,87:[0,.68889,0,0,1],88:pt,89:pt,90:Yt,107:nr,160:Ct,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:nr,295:wr,710:gr,732:pr,770:gr,771:pr,989:yn,1008:Ut,8245:[0,.54986,0,0,.275],8463:wr,8487:pt,8498:nr,8502:Yt,8503:[0,.68889,0,0,.44445],8504:Yt,8513:[0,.68889,0,0,.63889],8592:rn,8594:rn,8602:ir,8603:ir,8606:an,8608:an,8610:jt,8611:jt,8619:un,8620:un,8621:[-.13313,.37788,0,0,1.38889],8622:ir,8624:jr,8625:jr,8630:pn,8631:pn,8634:qr,8635:qr,8638:Sr,8639:Sr,8642:Sr,8643:Sr,8644:cr,8646:cr,8647:cr,8648:Zn,8649:cr,8650:Zn,8651:an,8652:an,8653:ir,8654:ir,8655:ir,8666:mn,8667:mn,8669:[-.13313,.37788,0,0,1],8672:ci,8674:ci,8705:[0,.825,0,0,.5],8708:nr,8709:yn,8717:[0,.43056,0,0,.42917],8722:rn,8724:[.08198,.69224,0,0,.77778],8726:yn,8733:Pe,8736:jn,8737:jn,8738:[.03517,.52239,0,0,.72222],8739:st,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:$o,8774:nt,8776:Oa,8778:yn,8782:Be,8783:Be,8785:qr,8786:qr,8787:qr,8790:Pe,8791:It,8796:[.08198,.91667,0,0,.77778],8806:Te,8807:Te,8808:Ke,8809:Ke,8812:[.25583,.75583,0,0,.5],8814:xt,8815:xt,8816:nt,8817:nt,8818:It,8819:It,8822:Pt,8823:Pt,8828:ur,8829:ur,8830:It,8831:It,8832:xt,8833:xt,8840:nt,8841:nt,8842:$t,8843:$t,8847:At,8848:At,8858:qr,8859:qr,8861:qr,8862:ge,8863:ge,8864:ge,8865:ge,8872:[0,.69224,0,0,.61111],8873:jn,8874:[0,.69224,0,0,.88889],8876:Dt,8877:Dt,8878:pt,8879:pt,8882:At,8883:At,8884:ur,8885:ur,8888:[0,.54986,0,0,1.11111],8890:Js,8891:Mr,8892:Mr,8901:[0,.54986,0,0,.27778],8903:yn,8905:yn,8906:yn,8907:Pe,8908:Pe,8909:[-.03598,.46402,0,0,.77778],8910:Nr,8911:Nr,8912:At,8913:At,8914:Cr,8915:Cr,8916:C,8918:vr,8919:vr,8920:Fr,8921:Fr,8922:br,8923:br,8926:ur,8927:ur,8928:nt,8929:nt,8934:Vr,8935:Vr,8936:Vr,8937:Vr,8938:xt,8939:xt,8940:nt,8941:nt,8994:oe,8995:oe,9416:[.15559,.69224,0,0,.90222],9484:jr,9488:jr,9492:J,9496:J,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:ge,9633:ge,9650:ve,9651:ve,9654:At,9660:ve,9661:ve,9664:At,9674:G,9733:[.19444,.69224,0,0,.94445],10003:we,10016:we,10731:G,10846:[.19444,.75583,0,0,.61111],10877:ur,10878:ur,10885:Te,10886:Te,10887:$t,10888:$t,10889:le,10890:le,10891:ce,10892:ce,10901:ur,10902:ur,10933:Ke,10934:Ke,10935:le,10936:le,10937:le,10938:le,10949:Te,10950:Te,10955:Ie,10956:Ie,57350:st,57351:ct,57352:yn,57353:Ut,57356:Ke,57357:Ke,57358:ar,57359:nt,57360:nt,57361:ar,57366:Ke,57367:Ke,57368:Ke,57369:Ke,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:Vt,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:xr,41:xr,42:[0,.62119,0,0,.27764],43:dr,44:or,45:dr,46:or,47:[.24982,.74947,0,0,.50181],48:$r,49:$r,50:$r,51:Tr,52:Tr,53:Tr,54:Gt,55:Tr,56:Gt,57:Tr,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:qt,93:qt,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:Vt,8217:Vt,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:on,35:[.19444,.69444,0,0,.95833],36:gi,37:[.05556,.75,0,0,.95833],38:Pr,39:Er,40:Xt,41:Xt,42:[0,.75,0,0,.575],43:Rr,44:[.19444,.15556,0,0,.31944],45:Au,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:ni,59:[.19444,.44444,0,0,.31944],60:sr,61:vi,62:sr,63:[0,.69444,0,0,.54305],64:Pr,65:Kt,66:[0,.68611,0,0,.81805],67:Dn,68:[0,.68611,0,0,.88194],69:tl,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:mr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:kn,77:[0,.68611,0,0,1.09166],78:mr,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:Kt,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:rr,92:ht,93:rr,94:Xr,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:Rt,99:hr,100:Rt,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:Rt,105:Er,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Er,109:[0,.44444,0,0,.95833],110:Ur,111:fa,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:Ur,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:hr,123:ht,124:rr,125:ht,126:[.35,.34444,0,0,.575],160:Ct,163:[0,.69444,0,0,.86853],168:Xr,172:[0,.44444,0,0,.76666],176:_n,177:Rr,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Rr,216:[.04861,.73472,0,0,.89444],223:Eu,230:[0,.44444,0,0,.83055],247:Rr,248:[.09722,.54167,0,0,.575],305:ni,338:[0,.68611,0,0,1.16944],339:Ei,567:[.19444,.44444,0,0,.35139],710:Xr,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Xr,715:Xr,728:Xr,729:Er,730:_n,732:Xr,733:Xr,915:kn,916:xn,920:Un,923:su,926:cu,928:mr,931:Dn,933:Un,934:Dn,936:Un,937:Dn,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Er,8217:Er,8220:on,8221:on,8224:mi,8225:mi,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:ou,8465:Ci,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:Ci,8501:Pi,8592:Ir,8593:Tn,8594:Ir,8595:Tn,8596:Ir,8597:ht,8598:Mn,8599:Mn,8600:Mn,8601:Mn,8636:Ir,8637:Ir,8640:Ir,8641:Ir,8656:Ir,8657:Pn,8658:Ir,8659:Pn,8660:Ir,8661:[.25,.75,0,0,.70277],8704:Rt,8706:[0,.69444,.06389,0,.62847],8707:Rt,8709:gi,8711:xn,8712:Gn,8715:Gn,8722:Rr,8723:Rr,8725:ht,8726:ht,8727:bi,8728:ui,8729:ui,8730:[.18,.82,0,0,.95833],8733:Ei,8734:[0,.44444,0,0,1.14999],8736:jn,8739:rr,8741:ht,8743:qn,8744:qn,8745:qn,8746:qn,8747:[.19444,.69444,.12778,0,.56875],8764:vi,8768:[.19444,.69444,0,0,.31944],8771:Gi,8776:[.02444,.52444,0,0,.89444],8781:Gi,8801:Gi,8804:Xn,8805:Xn,8810:Sa,8811:Sa,8826:sr,8827:sr,8834:sr,8835:sr,8838:Xn,8839:Xn,8846:qn,8849:Xn,8850:Xn,8851:qn,8852:qn,8853:Rr,8854:Rr,8855:Rr,8856:Rr,8857:Rr,8866:Pi,8867:Pi,8868:Pr,8869:Pr,8900:ui,8901:[-.02639,.47361,0,0,.31944],8902:bi,8968:$n,8969:$n,8970:$n,8971:$n,8994:Rn,8995:Rn,9651:_a,9657:bi,9661:_a,9667:bi,9711:Mn,9824:ki,9825:ki,9826:ki,9827:ki,9837:[0,.75,0,0,.44722],9838:Ri,9839:Ri,10216:Xt,10217:Xt,10815:mr,10927:Xn,10928:Xn,57376:ps},"Main-BoldItalic":{32:Ct,33:[0,.69444,.11417,0,.38611],34:Cn,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:An,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:yi,49:yi,50:yi,51:yi,52:Oi,53:yi,54:yi,55:Oi,56:yi,57:yi,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Jn,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:Ni,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:Ni,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:Di,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:Di,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:qi,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:qi,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:An,730:di,732:Jn,733:Jn,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:Ni,931:[0,.68611,.11431,0,.82666],933:Yn,934:[0,.68611,.05632,0,.82666],936:Yn,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:An,8217:An,8220:[0,.69444,.16772,0,.62055],8221:Cn},"Main-Italic":{32:Ct,33:sa,34:Xs,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:sa,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:kr,53:zr,54:zr,55:kr,56:zr,57:zr,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Fn,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:fn,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:fn,79:is,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:fn,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:Nn,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:En,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:En,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:oo,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:On,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:On,710:Nn,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:oo,732:[0,.66786,.11585,0,.51111],733:Fn,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:is,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:fn,931:[0,.68333,.12028,0,.71555],933:zi,934:[0,.68333,.05986,0,.71555],936:zi,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:sa,8217:sa,8220:[0,.69444,.1685,0,.51444],8221:Xs,8463:wr},"Main-Regular":{32:Ct,33:Xi,34:vn,35:lc,36:cs,37:Su,38:la,39:Xi,40:Ai,41:Ai,42:_u,43:hi,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:hn,48:xi,49:xi,50:xi,51:xi,52:xi,53:xi,54:xi,55:xi,56:xi,57:xi,58:Ys,59:[.19444,.43056,0,0,.27778],60:vr,61:L,62:vr,63:cc,64:la,65:ca,66:[0,.68333,0,0,.70834],67:lo,68:[0,.68333,0,0,.76389],69:so,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:ca,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:$a,76:Pa,77:[0,.68333,0,0,.91667],78:ca,79:$a,80:so,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:lo,85:ca,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:ca,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Ki,92:hn,93:Ki,94:vn,95:[.31,.12056,.02778,0,.5],97:Ta,98:fi,99:Bo,100:fi,101:Bo,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:fi,105:os,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Xi,109:[0,.43056,0,0,.83334],110:as,111:Ta,112:Js,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:as,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:Bo,123:hn,124:Ki,125:hn,126:[.35,.31786,0,0,.5],160:Ct,163:[0,.69444,0,0,.76909],167:co,168:ss,172:[0,.43056,0,0,.66667],176:Qs,177:hi,182:Hi,184:ac,198:[0,.68333,0,0,.90278],215:hi,216:[.04861,.73194,0,0,.77778],223:vn,230:[0,.43056,0,0,.72222],247:hi,248:[.09722,.52778,0,0,.5],305:Ys,338:[0,.68333,0,0,1.01389],339:el,567:[.19444,.43056,0,0,.30556],710:vn,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:vn,715:vn,728:vn,729:os,730:Qs,732:ss,733:vn,915:Pa,916:us,920:$a,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:ca,931:lo,933:$a,934:lo,936:$a,937:lo,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Xi,8217:Xi,8220:vn,8221:vn,8224:co,8225:co,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:wr,8465:Ra,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Ra,8501:Zr,8592:ir,8593:Io,8594:ir,8595:Io,8596:ir,8597:hn,8598:uo,8599:uo,8600:uo,8601:uo,8614:[.011,.511,0,0,1],8617:ls,8618:ls,8636:ir,8637:ir,8640:ir,8641:ir,8652:[.011,.671,0,0,1],8656:ir,8657:Hi,8658:ir,8659:Hi,8660:ir,8661:[.25,.75,0,0,.61111],8704:fi,8706:[0,.69444,.05556,.08334,.5309],8707:fi,8709:cs,8711:us,8712:ds,8715:ds,8722:hi,8723:hi,8725:hn,8726:hn,8727:Hr,8728:fo,8729:fo,8730:[.2,.8,0,0,.83334],8733:el,8734:pn,8736:jn,8739:Ki,8741:hn,8743:ua,8744:ua,8745:ua,8746:ua,8747:[.19444,.69444,.11111,0,.41667],8764:L,8768:[.19444,.69444,0,0,.27778],8771:$o,8773:[-.022,.589,0,0,1],8776:Oa,8781:$o,8784:[-.133,.67,0,0,.778],8801:$o,8804:$t,8805:$t,8810:Na,8811:Na,8826:vr,8827:vr,8834:vr,8835:vr,8838:$t,8839:$t,8846:ua,8849:$t,8850:$t,8851:ua,8852:ua,8853:hi,8854:hi,8855:hi,8856:hi,8857:hi,8866:Zr,8867:Zr,8868:la,8869:la,8872:[.249,.75,0,0,.867],8900:fo,8901:[-.05555,.44445,0,0,.27778],8902:Hr,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:Jr,8969:Jr,8970:Jr,8971:Jr,8994:ii,8995:ii,9136:Ln,9137:Ln,9651:Ma,9657:Hr,9661:Ma,9667:Hr,9711:uo,9824:da,9825:da,9826:da,9827:da,9837:[0,.75,0,0,.38889],9838:fs,9839:fs,10216:Ai,10217:Ai,10222:Ln,10223:Ln,10229:[.011,.511,0,0,1.609],10230:hs,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:hs,10815:ca,10927:$t,10928:$t,57376:ps},"Math-BoldItalic":{32:Ct,48:fa,49:fa,50:fa,51:Ca,52:Ca,53:Ca,54:Qt,55:Ca,56:Qt,57:Ca,65:Kt,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:tl,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:nc,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:xn,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:nc,960:[0,.44444,.03704,0,.68241],961:uu,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:uu,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Ct,48:Ta,49:Ta,50:Ta,51:ms,52:ms,53:ms,54:xi,55:ms,56:xi,57:ms,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:gs,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:Po,40:rl,41:rl,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:Qn,49:Qn,50:Qn,51:Qn,52:Qn,53:Qn,54:Qn,55:Qn,56:Qn,57:Qn,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:mu,64:Ji,65:Ji,66:Ji,67:nl,68:Ea,69:[0,.69444,0,0,.64167],70:Zr,71:Ji,72:Ea,73:[0,.69444,0,0,.33056],74:mu,75:r0,76:Fa,77:[0,.69444,0,0,.97778],78:Ea,79:Ea,80:nl,81:[.10556,.69444,0,0,.79445],82:nl,83:Zr,84:Ji,85:r0,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Ji,89:[0,.69444,.0275,0,.73334],90:Ro,91:gu,93:gu,94:Qn,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:vu,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:vu,109:[0,.45833,0,0,.86667],110:To,111:[0,.45833,0,0,.55],112:il,113:il,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:To,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:Qn,176:Ji,180:Qn,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:Qn,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:Qn,729:Po,730:Ji,732:Qn,733:Qn,915:Fa,916:[0,.69444,0,0,.91667],920:al,923:Ro,926:Ji,928:Ea,931:Ea,933:al,934:Ea,936:al,937:Ea,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Po,8217:Po,8220:gs,8221:gs},"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:sc,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:Wi,49:Wi,50:Wi,51:Wi,52:Wi,53:Wi,54:Wi,55:Wi,56:Wi,57:Wi,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:ka,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:ol,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:uc,77:[0,.69444,.08094,0,.875],78:ol,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:oc,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:bu,184:ac,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:oc,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:yu,715:vn,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:bu,732:[0,.67659,.08826,0,.5],733:yu,915:[0,.69444,.13372,0,.54167],916:Bu,920:[0,.69444,.07555,0,.77778],923:Zr,926:[0,.69444,.12816,0,.66667],928:ol,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:sc,8217:sc,8220:[0,.69444,.14205,0,.5],8221:wu},"SansSerif-Regular":{32:Ct,33:[0,.69444,0,0,.31945],34:vn,35:lc,36:cs,37:Su,38:[0,.69444,0,0,.75834],39:Xi,40:Ai,41:Ai,42:_u,43:hi,44:Mu,45:[0,.44444,0,0,.33333],46:Cu,47:hn,48:ha,49:ha,50:ha,51:ha,52:ha,53:ha,54:ha,55:ha,56:ha,57:ha,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:cc,64:ka,65:ka,66:ka,67:Rt,68:[0,.69444,0,0,.72223],69:Eu,70:[0,.69444,0,0,.56945],71:ka,72:ho,73:Xi,74:cc,75:[0,.69444,0,0,.69445],76:uc,77:[0,.69444,0,0,.875],78:ho,79:[0,.69444,0,0,.73611],80:Rt,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:fi,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:ka,89:[0,.69444,.025,0,.66667],90:Zr,91:vs,93:vs,94:vn,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:bs,99:ku,100:bs,101:ku,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:bs,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:Lu,111:[0,.44444,0,0,.5],112:Du,113:Du,114:[0,.44444,.01389,0,.34167],115:Au,116:[0,.57143,0,0,.36111],117:Lu,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:ka,184:ac,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:vn,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:vn,715:vn,728:vn,729:[0,.67937,0,0,.27778],730:ka,732:[0,.67659,0,0,.5],733:vn,915:uc,916:Bu,920:la,923:Zr,926:ka,928:ho,931:Ra,933:la,934:Ra,936:la,937:Ra,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Xi,8217:Xi,8220:vn,8221:vn},"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:Iu,41:Iu,47:$u,91:Tu,92:$u,93:Tu,123:Pu,125:Pu,160:Ct,710:sl,732:sl,770:sl,771:sl,8214:[-99e-5,.601,0,0,.77778],8593:Ru,8595:Ru,8657:ll,8659:ll,8719:Ou,8720:Ou,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:fc,8748:dc,8749:dc,8750:fc,8896:po,8897:po,8898:po,8899:po,8968:Oo,8969:Oo,8970:Oo,8971:Oo,9168:xc,10216:Oo,10217:Oo,10752:hc,10753:hc,10754:hc,10756:po,10758:po},"Size2-Regular":{32:Ct,40:pc,41:pc,47:Nu,91:mc,92:Nu,93:mc,123:Fu,125:Fu,160:Ct,710:cl,732:cl,770:cl,771:cl,8719:zu,8720:zu,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:Da,8748:Ku,8749:Ku,8750:Da,8896:No,8897:No,8898:No,8899:No,8968:ys,8969:ys,8970:ys,8971:ys,10216:ul,10217:ul,10752:gc,10753:gc,10754:gc,10756:No,10758:No},"Size3-Regular":{32:Ct,40:vc,41:vc,47:bc,91:Hu,92:bc,93:Hu,123:xs,125:xs,160:Ct,710:ws,732:ws,770:ws,771:ws,8730:[.95003,1.45,0,0,1],8968:dl,8969:dl,8970:dl,8971:dl,10216:xs,10217:xs},"Size4-Regular":{32:Ct,40:Wu,41:Wu,47:yc,91:Vu,92:yc,93:Vu,123:Fo,125:Fo,160:Ct,710:Ss,732:Ss,770:Ss,771:Ss,8730:[1.25003,1.75,0,0,1],8968:zo,8969:zo,8970:zo,8971:zo,9115:fl,9116:hl,9117:fl,9118:fl,9119:hl,9120:fl,9121:pl,9122:xc,9123:pl,9124:pl,9125:xc,9126:pl,9127:Zu,9128:wc,9129:ju,9130:[0,.3,0,0,.88889],9131:Zu,9132:wc,9133:ju,9143:[.88502,.915,0,0,1.05556],10216:Fo,10217:Fo,57344:Uu,57345:Uu,57680:ml,57681:ml,57682:ml,57683:ml},"Typewriter-Regular":{32:Ko,33:mt,34:mt,35:mt,36:ai,37:ai,38:mt,39:mt,40:ai,41:ai,42:[0,.52083,0,0,.525],43:gl,44:[.13889,.125,0,0,.525],45:gl,46:[0,.125,0,0,.525],47:ai,48:mt,49:mt,50:mt,51:mt,52:mt,53:mt,54:mt,55:mt,56:mt,57:mt,58:oi,59:[.13889,.43056,0,0,.525],60:Gu,61:[-.19549,.41562,0,0,.525],62:Gu,63:mt,64:mt,65:mt,66:mt,67:mt,68:mt,69:mt,70:mt,71:mt,72:mt,73:mt,74:mt,75:mt,76:mt,77:mt,78:mt,79:mt,80:mt,81:[.13889,.61111,0,0,.525],82:mt,83:mt,84:mt,85:mt,86:mt,87:mt,88:mt,89:mt,90:mt,91:ai,92:ai,93:ai,94:mt,95:[.09514,0,0,0,.525],96:mt,97:oi,98:mt,99:oi,100:mt,101:oi,102:mt,103:_s,104:mt,105:mt,106:[.22222,.61111,0,0,.525],107:mt,108:mt,109:oi,110:oi,111:oi,112:_s,113:_s,114:oi,115:oi,116:[0,.55358,0,0,.525],117:oi,118:oi,119:oi,120:oi,121:_s,122:oi,123:ai,124:ai,125:ai,126:mt,127:mt,160:Ko,176:mt,184:[.19445,0,0,0,.525],305:oi,567:_s,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:mt,715:mt,728:mt,730:mt,770:mt,771:mt,776:mt,915:mt,916:mt,920:mt,923:mt,926:mt,928:mt,931:mt,933:mt,934:mt,936:mt,937:mt,8216:mt,8217:mt,8242:mt,9251:[.11111,.21944,0,0,.525]}},i0=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,zn=10,Li=.25,qu=1.2,za=.431,Sc={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[za,za,za],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:[Li,Li,Li],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]},mo=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],vl=5,Xu={"\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 Ho(e,t){e===void 0&&(e=77);const r=n0[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 Xu)e=Xu[n].codePointAt(0);else if(i0.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 _c={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]},Ms={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]},Wo={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 a0(e){if(Ms[e]){const[h,p,b]=Ms[e],M=`<span class="stretchy" style="height:${b}em"><svg width="100%" height="${b}em" viewBox="0 0 ${h} ${p}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Wo[e]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*b/2)/100}em;min-width:0">${M}</span>`}const[t,r,n,i]=_c[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="${Wo[h]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${u}em;min-width:${r}em;">${d}</span>`}function o0(e){return _c[e]?_c[e][2]/1e3:Ms[e][2]}function s0(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=ao(2,16)+a*ao(2,10)+s,r++}}t.push(n)}return t}var Cs=8205,l0=[[Cs,1],[65038,2],[127995,5],[129456,4],[917536,96]],bl,yl=[127462,127487];function Ju(e){var t;if(bl===void 0){bl={};for(const r of l0)for(let n=r[0];n<=r[0]+r[1]-1;n++)bl[n]=!0}return(t=bl[e])!=null?t:!1}function c0(e){return e>=yl[0]&&e<=yl[1]}function Es(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;const t=[],r=s0(e);let n=0;for(;n<r.length;){const i=r[n++],a=r[n];if(a===Cs){const s=n-1;for(n+=2;r[n]===Cs;)n+=2;t.push(String.fromCodePoint(...r.slice(s,n-s+1)))}else if(Ju(a)){const s=n-1;for(;Ju(r[n]);)n+=r[n]===Cs?2:1;t.push(String.fromCodePoint(...r.slice(s,2*n-s-1)))}else c0(i)?(n+=1,t.push(String.fromCodePoint(...r.slice(n-2,2)))):t.push(String.fromCodePoint(i))}return t}var u0=class{constructor(e){this.obeyspaces=!1,this.pos=0,this.s=Es(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 d0(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 b=e.get().slice(1);p=ks((n=(r=t==null?void 0:t(b))!=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(...ks((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 ks(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 u0(Le(r.join(""))),a=[];do a.push(...d0(i,t));while(!i.end());return a}function Dr(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 sn(e,...t){return console.assert(e.startsWith("\\")),t.length===0?e:Dr([e,...t.map(r=>`{${r}}`)])}function Vo(e){return Dr(e.map(t=>{var r;return(r={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[t])!=null?r:t}))}var Yu=class au{constructor(t){au._registry[t]=this}static createAtom(t,r,n){return au._registry[t].createAtom(r,fe(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 Zo(t)){const s=au._registry[a[0].mode];i.push(...s.serialize(a,r))}return Dr(i)}return Dr(h0(t,r))}static getFont(t,r,n){return au._registry[t].getFont(r,n)}};Yu._registry={};var Vi=Yu;function Zo(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 Ka(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 xl(e,t){var r;const{parent:n}=e[0],i=n==null?void 0:n.computedStyle.color,a=[];for(const s of Zo(e)){const u=t.defaultMode;for(const d of Ka(s,"color")){const h=d[0].computedStyle,p=Vi._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(sn("\\textcolor",(r=h.verbatimColor)!=null?r:h.color,Dr(p))):a.push(Dr(p))}}return a}function f0(e,t){const{parent:r}=e[0],n=r==null?void 0:r.computedStyle.backgroundColor;return Ka(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 sn("\\colorbox",(a=s.verbatimBackgroundColor)!=null?a:s.backgroundColor,Dr(xl(i,_(S({},t),{defaultMode:"text"}))))}return Dr(xl(i,t))})}function h0(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 Ka(e,"fontSize")){const s=a[0].computedStyle.fontSize,u=f0(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 Mc(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 go(e){if(e.length===0)return"ord";const t=Mc(e[0].type),r=Mc(e[e.length-1].type);return t&&t===r?t:"ord"}function jo(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 Ge=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=Vi.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),p0(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=jo(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=jo(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"]=jo(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"]=jo(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"]=jo(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 B of this.children)a+=B.toMarkup();let s="";if(this.svgBody)s=a0(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 B=(r=this.cssProperties)==null?void 0:r.padding;B?(s+=`top:${B};`,s+=`left:${B};`,s+=`width:calc(100% - 2 * ${B} );`):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((B,$,se)=>B.length>0&&se.indexOf(B)===$).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(B=>`${B}="${this.attributes[B]}"`).join(" ")),this.htmlData){const B=this.htmlData.split(",");for(const $ of B){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 b=Object.keys(p).map(B=>`${B}:${p[B]}`);if(this.scale!==void 0&&this.scale!==1&&(a.length>0||s.length>0)&&b.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const B=this.htmlStyle.split(";");let $="";for(const se of B){const Ze=se.match(/([^=]+):(.+$)/);if(Ze){const ee=Ze[1].trim().replace(/ /g,"-");ee&&($+=`${ee}:${Ze[2]};`)}}$&&(u+=` style="${$}"`)}b.length>0&&(u+=` style="${b.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 Cc(e){if(!e||e.length===0)return[];e[0].children=Cc(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=Cc(e[r].children),t.push(e[r]));return t}function wl(e){return e.children&&(e.children=Cc(e.children)),e}function Sl(e,t){if(!e)return new Ge(null,t);const r=new Ge(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 Ge(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 Ge(n,_(S({},t),{type:"lift"}))}function _l(e){const t=o0(e)/2,r=new Ge(null,{maxFontSize:0});return r.height=t+.166,r.depth=t-.166,r.svgBody=e,r}function p0(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=Ho(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 m0(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 g0(e){var t;const[r,n]=m0(e);if(!r)return[[],0,0];const i=new Ge(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 Ge([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 b=new Ge(s,{classes:"vlist"});if(b.softWidth=p,b.height=d,b.setStyle("height",d,"em"),u>=0)return[[new Ge(b,{classes:"vlist-r"})],d,-u];const M=new Ge(new Ge(null),{classes:"vlist"});M.height=-u,M.setStyle("height",-u,"em");const B=new Ge(8203,{classes:"vlist-s",maxFontSize:0});return B.softWidth=0,B.height=0,B.depth=0,[[new Ge([b,B],{classes:"vlist-r"}),new Ge(M,{classes:"vlist-r"})],d,-u]}var gn=class extends Ge{constructor(e,t){var r;const[n,i,a]=g0(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 v0(e,t){var r,n,i,a,s;const u=e.metrics,d=new Ge(t.base),h=(r=t.baseShift)!=null?r:0,p=(n=t.slant)!=null?n:0;let b=0,M=0;t.above&&(b=(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 B=null;if(t.below&&t.above){const $=u.bigOpSpacing5+t.below.height+t.below.depth+M+d.depth+h;B=new gn({bottom:$,children:[u.bigOpSpacing5,{box:t.below,marginLeft:-p,classes:["ML__center"]},M,{box:d,classes:["ML__center"]},b,{box:t.above,marginLeft:p,classes:["ML__center"]},u.bigOpSpacing5]}).wrap(e)}else if(t.below&&!t.above)B=new gn({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;B=new gn({bottom:$,children:[{box:d,classes:["ML__center"]},b,{box:t.above,marginLeft:p,classes:["ML__center"]},u.bigOpSpacing5]}).wrap(e)}else{const $=d.depth+h;B=new gn({bottom:$,children:[{box:d},u.bigOpSpacing5]}).wrap(e)}return new Ge(B,{type:(s=t.type)!=null?s:"op"})}var Ml=7,vo=6,Ds=5,Ha=4,Uo=3,wi=2,bo=1,si=0,Bi=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(Sc).reduce((i,a)=>_(S({},i),{[a]:Sc[a][n]}),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return pa[[si,bo,si,bo,wi,Uo,wi,Uo][this.id]]}get sub(){return pa[[si,si,si,si,wi,wi,wi,wi][this.id]]}get fracNum(){return pa[[si,bo,si,bo,wi,Uo,Ha,Ds][this.id]]}get fracDen(){return pa[[si,si,si,si,wi,wi,Ha,Ha][this.id]]}get cramp(){return pa[[si,si,wi,wi,Ha,Ha,vo,vo][this.id]]}get isTight(){return this.sizeDelta<0}},As={7:new Bi(Ml,0,!1),6:new Bi(vo,0,!0),5:new Bi(Ds,0,!1),4:new Bi(Ha,0,!0),3:new Bi(Uo,-3,!1),2:new Bi(wi,-3,!0),1:new Bi(bo,-4,!1),0:new Bi(si,-4,!0)},pa=_(S({},As),{displaystyle:As[Ml],textstyle:As[Ds],scriptstyle:As[Uo],scriptscriptstyle:As[bo]});function Qu(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:zn,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=ao(10,t);return Math.round(e.dimension/zn*n*i)/i}return e.dimension*n}function ed(e,t){if(e===null)return 0;const r=Qu(e)/zn;if(Number.isFinite(t)){const n=ao(10,t);return Math.round(r*n)/n}return r}function Ls(e){var t;return`${e.dimension}${(t=e.unit)!=null?t:"pt"}`}function b0(e){let t=Ls(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=` plus ${Ls(e.grow)}`),e.shrink&&e.shrink.dimension!==0&&(t+=` minus ${Ls(e.shrink)}`),t}function Kn(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=b0(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 ma(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:ma(e.glue,t),shrink:ma(e.shrink,t),grow:ma(e.grow,t)}:e.shrink?{glue:ma(e.glue,t),shrink:ma(e.shrink,t)}:e.grow?{glue:ma(e.glue,t),grow:ma(e.grow,t)}:{glue:ma(e.glue,t)}:null}var y0={"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 td(){return S({},y0)}function Ec(){return{registers:td(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Ee.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:ut,backgroundColorMap:lt,getMacro:e=>De(e,vt())}}var Ar=class ep{constructor(t,r){var n,i,a,s,u,d,h,p,b,M,B,$,se,Ze,ee;let ke;t!=null&&t.parent?(this.parent=t.parent,ke=t.parent,this.registers={}):(ke=S(S({},Ec()),(n=t==null?void 0:t.from)!=null?n:{}),this.registers=ke.registers),ke.atomIdsSettings&&(this.atomIdsSettings=S({},ke.atomIdsSettings)),this.renderPlaceholder=ke.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=ke.letterShapeStyle,this.minFontScale=ke.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!==((b=this.parent)==null?void 0:b.size)?this.size=r.fontSize:this.size=(B=(M=this.parent)==null?void 0:M.size)!=null?B:vl;let Ye=(se=($=this.parent)==null?void 0:$.mathstyle)!=null?se:pa.displaystyle;if(typeof(t==null?void 0:t.mathstyle)=="string"){if(ke instanceof ep)switch(t.mathstyle){case"cramp":Ye=Ye.cramp;break;case"superscript":Ye=Ye.sup;break;case"subscript":Ye=Ye.sub;break;case"numerator":Ye=Ye.fracNum;break;case"denominator":Ye=Ye.fracDen;break}switch(t.mathstyle){case"textstyle":Ye=pa.textstyle;break;case"displaystyle":Ye=pa.displaystyle;break;case"scriptstyle":Ye=pa.scriptstyle;break;case"scriptscriptstyle":Ye=pa.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Ye,this.smartFence=ke.smartFence,this.placeholderSymbol=ke.placeholderSymbol,this.colorMap=(Ze=ke.colorMap)!=null?Ze:$e=>$e,this.backgroundColorMap=(ee=ke.backgroundColorMap)!=null?ee:$e=>$e,this.getMacro=ke.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===Ml||this.mathstyle.id===vo}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(mo[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 ed(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:Qu(n,r)/zn}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}},yo=["body","above","below","superscript","subscript"];function xo(e){return typeof e=="string"&&yo.includes(e)}function Cl(e){return e!==void 0&&Array.isArray(e)&&e.length===2}var Ce=class Ao{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=x0(r),s=[];for(const d of a){const h=d[0].style,p=rd(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 Ge(s,{classes:u,type:n==null?void 0:n.type}).wrap(t)}static serialize(t,r){return Vi.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 Ao({type:"mord",value:t,mode:"math"}):new Ao(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=w0(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=fe(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):this.body&&this.command?Dr([sn(this.command,this.bodyToLatex(t)),this.supsubToLatex(t)]):this.body?Dr([this.bodyToLatex(t),this.supsubToLatex(t)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(t){var r;return Vi.serialize(this.body,_(S({},t),{defaultMode:(r=t.defaultMode)!=null?r:this.latexMode}))}aboveToLatex(t){return Vi.serialize(this.above,t)}belowToLatex(t){return Vi.serialize(this.below,t)}supsubToLatex(t){let r="";if(t=_(S({},t),{defaultMode:"math"}),this.branch("subscript")!==void 0){const n=Vi.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=Vi.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(xo(t)&&this._branches)return this._branches[t]}get branches(){if(!this._branches)return[];const t=[];for(const r of yo)this._branches[r]&&t.push(r);return t}createBranch(t){return console.assert(xo(t)),xo(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 Cl(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Cl(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(xo(r)),!xo(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 Ao({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(xo(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 yo)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=fe(this.command,this.mode);if(r!=null&&r.render)return r.render(this,t);const n=new Ar({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 Ar({parent:t,mathstyle:"superscript"});u=Ao.createBox(se,a),h||(p=i.height-t.metrics.supDrop*se.scalingFactor)}let b=0;if(s){const se=new Ar({parent:t,mathstyle:"subscript"});d=Ao.createBox(se,s),h||(b=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 B=.5/zn/t.scalingFactor;let $=null;if(d&&u){p=Math.max(p,M,u.depth+.25*t.metrics.xHeight),b=Math.max(b,t.metrics.sub2);const se=t.metrics.defaultRuleThickness;if(p-u.depth-(d.height-b)<4*se){b=4*se-(p-u.depth)+d.height;const ee=.8*t.metrics.xHeight-(p-u.depth);ee>0&&(p+=ee,b-=ee)}const Ze=this.isExtensibleSymbol&&i.italic?-i.italic:0;$=new gn({individualShift:[{box:d,shift:b,marginLeft:Ze},{box:u,shift:-p}]}).wrap(t)}else d&&!u?(b=Math.max(b,t.metrics.sub1,d.height-.8*za),$=new gn({shift:b,children:[{box:d,marginRight:B,marginLeft:this.isCharacterBox()?-i.italic:0}]})):!d&&u&&(p=Math.max(p,M,u.depth+.25*za),$=new gn({shift:-p,children:[{box:u,marginRight:B}]}));return new Ge([i,new Ge($,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:r.type})}attachLimits(t,r){const n=this.superscript?Ao.createBox(new Ar({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,i=this.subscript?Ao.createBox(new Ar({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!n&&!i?r.base.wrap(t):v0(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:Mc(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 Ge(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=Ao.createBox(t,u,{type:d,classes:h}))!=null?s:new Ge(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 x0(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 rd(e,t,r){var n,i,a,s,u;if(!t||t.length===0)return null;const d=new Ar({parent:e},r.style),h=!((n=d.atomIdsSettings)!=null&&n.groupNumbers);let p=[];if(t.length===1){const M=t[0],B=M.render(d);B&&(h&&M.isSelected&&B.selected(!0),p=[B])}else{let M="",B=!0;for(const $ of t){(i=d.atomIdsSettings)!=null&&i.groupNumbers&&M&&(B&&$.isDigit()||!B&&kc($))&&(d.atomIdsSettings.overrideID=M);const se=$.render(d);d.atomIdsSettings&&(d.atomIdsSettings.overrideID=void 0),se&&((a=d.atomIdsSettings)!=null&&a.groupNumbers&&(($.isDigit()||kc($))&&(!M||B!==$.isDigit())&&(B=$.isDigit(),M=(s=$.id)!=null?s:""),M&&(!($.isDigit()||kc($))||!$.hasEmptyBranch("superscript")||!$.hasEmptyBranch("subscript"))&&(M="")),h&&$.isSelected&&se.selected(!0),p.push(se))}}if(p.length===0)return null;const b=new Ge(p,_(S({isTight:d.isTight},r),{type:(u=r.type)!=null?u:"lift"}));return b.isSelected=p.every(M=>M.isSelected),b.wrap(d)}function kc(e){return e.mode==="text"}function w0(e){return e.map(t=>t===null?"<null>":Array.isArray(t)&&t[0]instanceof Ce?{atoms:t.map(r=>r.toJson())}:typeof t=="object"&&"group"in t?{group:t.group.map(r=>r.toJson())}:t)}var Bs=class tp extends Ce{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:Me("text",this.value.codePointAt(0))}};function S0(e,t){if(e.direction===t.direction){const r=e.ranges.length;if(t.ranges.length===r){let n=0;for(;n<r&&_0(e.ranges[n],t.ranges[n])==="equal";)n++;return n===r?"equal":"different"}}return"different"}function _0(e,t){return e[0]===t[0]&&e[1]===t[1]?"equal":"different"}function ei(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 Yi(e){return typeof e=="number"&&!Number.isNaN(e)}function Is(e){return Array.isArray(e)&&e.length===2}function El(e){return e!=null&&typeof e=="object"&&"ranges"in e&&Array.isArray(e.ranges)}function M0(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 C0(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,b=!1,M=!1,B=!1,$=!1,se=!1,Ze=!1,ee=e[0],ke=0;for(;ee!=null&&ee.type&&/^(subsup|placeholder)$/.test(ee.type);)ke+=1,ee=e[ke];return r=!ee||ee.type==="first",ee&&(se=ee.mode==="text",n=!se&&ee.type==="mord"&&Z.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",b=ee.type==="mpunct"||ee.type==="minner",M=ee.type==="array",B=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")&&b||t.after.includes("array")&&M||t.after.includes("openfence")&&B||t.after.includes("closefence")&&$||t.after.includes("text")&&se||t.after.includes("space")&&Ze?t.value:""}function Dc(e,t,r){return r?C0(e,r[t]):""}var Go={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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 kl(e,t){var r;let n=(r=t==null?void 0:t.format)!=null?r:"auto";return n==="auto"&&([n,e]=Lc(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",li(e,{inlineShortcuts:t==null?void 0:t.inlineShortcuts})]):["latex",e]}function li(e,t){var r,n,i;if(!e)return"";let a=!1,s;const u=(r=t.inlineShortcuts)!=null?r:Go;if(!a&&(e.startsWith("^")||e.startsWith("_"))&&(s=wo(e.slice(1),{inlineShortcuts:u,noWrap:!0}),e=e[0]+"{"+s.match+"}",e+=li(s.rest,t),a=!0),a||(s=e.match(/^(sqrt|\u221A)(.*)/),s&&(s=wo(s[2],{inlineShortcuts:u,noWrap:!0}),e="\\sqrt{"+((n=s.match)!=null?n:"\\placeholder{}")+"}",e+=li(s.rest,t),a=!0)),a||(s=e.match(/^(\\cbrt|\u221B)(.*)/),s&&(s=wo(s[2],{inlineShortcuts:u,noWrap:!0}),e="\\sqrt[3]{"+((i=s.match)!=null?i:"\\placeholder{}")+"}",e+=li(s.rest,t),a=!0)),a||(s=e.match(/^abs(.*)/),s&&(s=wo(s[1],{inlineShortcuts:u,noWrap:!0}),e="\\left|"+s.match+"\\right|",e+=li(s.rest,t),a=!0)),a||(s=e.match(/^["”“](.*?)["”“](.*)/),s&&(e="\\text{"+s[1]+"}",e+=li(s[2],t),a=!0)),a||(s=e.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),s&&(e=nd(s[1],u),e+=li(s[2],t),a=!0)),!a&&/^([fgh])[^a-zA-Z]/.test(e)&&(s=wo(e.slice(1),{inlineShortcuts:u,noWrap:!0}),e=e[1]==="("?e[0]+"\\left("+s.match+"\\right)":e[0]+s.match,e+=li(s.rest,t),a=!0),a||(s=e.match(/^([a-zA-Z]+)(.*)/),s&&(e=nd(s[1],u),e+=li(s[2],t),a=!0)),!a)if(s=wo(e,{inlineShortcuts:u,noWrap:!0}),s.match&&s.rest[0]==="/"){const d=wo(s.rest.slice(1),{inlineShortcuts:u,noWrap:!0});d.match&&(e="\\frac{"+s.match+"}{"+d.match+"}"+li(d.rest,t)),a=!0}else s.match&&(e=e.startsWith("(")?"\\left("+s.match+"\\right)"+li(s.rest,t):s.match+li(s.rest,t),a=!0);return a||(s=e.match(/^(\s+)(.*)$/),s&&(e=" "+li(s[2],t),a=!0)),e}function wo(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=li(e.substring(1,u-1),t):(i==="{"&&a==="}"&&(i="\\{",a="\\}"),r="\\left"+i+li(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=Dc(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 nd(e,t){let r=Dc(null,e,t);return r?(r=r.replace("_{#?}",""),r=r.replace("^{#?}",""),r+=" "):r=e,r}var E0=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Ac(e){const t=e.trim();for(const r of E0)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 Lc(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=Ac(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 k0="$$",D0="$$",A0=(e,t,r)=>(E0.some(n=>t.startsWith(n[0])&&t.endsWith(n[1]))||(t=`${k0} ${t} ${D0}`),t),Bc=class t0{constructor(t){t0._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)?t0._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]:ei(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]:ei(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 Bs).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 b=JSON.stringify(p.json);b&&r.clipboardData.setData("application/json",b)}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 t0._modes[a].insert(t,r,n)}onPaste(t,r){return!1}insert(t,r,n){return!1}};Bc._modes={};var nn=Bc,id=[{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","^"]}],L0={"\\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 Wa(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e}function Ff(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 So(e){const t=Ff(e);if(!t)return null;const r=t.getBoundingClientRect();return{x:r.right,y:r.bottom,height:r.height}}function B0(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 ad(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 od(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=od(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 $s(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?od(a):null,e.atomBoundsCache&&(i?e.atomBoundsCache.set(t.id,i):e.atomBoundsCache.delete(t.id)),i!=null?i:null}function I0(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=ad(e,$s(e,i),d);if(h){const p=B0(i);if(n.has(p)){const b=n.get(p);n.set(p,{left:Math.min(b.left,h.left),right:Math.max(b.right,h.right),top:Math.min(b.top,h.top),bottom:Math.max(b.bottom,h.bottom)})}else n.set(p,h)}}return[...n.values()]}function sd(e,t){return e.model.selection.ranges.reduce((r,n)=>r.concat(...I0(e,n,t)),[])}function Ic(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:typeof t=="function"?t(e):!1}function $c(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 Dl=`@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;
|
|
|
}
|
|
|
`,Al=`.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);
|
|
|
}
|
|
|
`,$0=`#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);
|
|
|
}
|
|
|
`,Tc=`/* 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;
|
|
|
}
|
|
|
`,ld=`/* 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);*/
|
|
|
}
|
|
|
`,T0=`.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));
|
|
|
}
|
|
|
`,P0=`: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;
|
|
|
}
|
|
|
`,R0=`.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;
|
|
|
}
|
|
|
`,Va;function Aa(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=Al;break;case"mathfield":t=Dl;break;case"environment-popover":t=$0;break;case"suggestion-popover":t=Tc;break;case"keystroke-caption":t=ld;break;case"virtual-keyboard":t=T0;break;case"ui":t=P0;break;case"menu":t=R0;break;default:debugger}return t}function _o(e){return Va||(Va={}),Va[e]||(Va[e]=new CSSStyleSheet,Va[e].replaceSync(Aa(e))),Va[e]}var Qi;function ea(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(Aa(e))),window.document.head.appendChild(r);return}if(Qi||(Qi={}),((t=Qi[e])!=null?t:0)!==0)Qi[e]+=1;else{const r=_o(e);document.adoptedStyleSheets=[...document.adoptedStyleSheets,r],Qi[e]=1}}function Za(e){if("adoptedStyleSheets"in document&&Qi!=null&&Qi[e]&&(Qi[e]-=1,Qi[e]<=0)){const t=Va[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(r=>r!==t)}}var Ll=class rp extends Ce{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 Ar({parent:t,mathstyle:"cramp"},this.style),i=(r=Ce.createBox(n,this.body))!=null?r:new Ge("\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,za),u;if(this.svgAccent)u=_l(this.svgAccent),s=n.metrics.bigOpSpacing1-s;else if(this.accent){const h=new Ge(this.accent,{fontFamily:"Main-Regular"});h.italic=0;const p=this.accent===8407?" ML__accent-vec":"";u=new Ge(new Ge(h),{classes:"ML__accent-body"+p})}u=new gn({shift:0,children:[{box:new Ge(i)},-s,{box:u,marginLeft:i.left+2*a,classes:["ML__center"]}]});const d=new Ge(u,{type:"lift"});return this.caret&&(d.caret=this.caret),this.bind(n,d.wrap(n)),this.attachSupsub(n,{base:d})}},Bl={"(":")","{":"}","[":"]","|":"|","\\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"},Il=Object.fromEntries(Object.entries(Bl).map(([e,t])=>[t,e]));function $l(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 cd(e,t,r,n){var i;const s=new Ge($l(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)*Li),s}function ud(e,t,r,n,i){var a,s;const u=new Ar({parent:n,mathstyle:"textstyle"},i==null?void 0:i.style),d=new Ge($l(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)*Li),d}function dd(e,t,r,n,i){var a;let s,u,d,h;s=d=h=$l(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 b=Ho(s,p),M=b.height+b.depth,B=Ho(d,p),$=B.height+B.depth,se=Ho(h,p),Ze=se.height+se.depth;let ee=0,ke=1;if(u!==null){const Wn=Ho(u,p);ee=Wn.height+Wn.depth,ke=2}const Ye=M+Ze+ee,$e=Math.max(0,Math.ceil((t-Ye)/(ke*$))),wt=Ye+$e*ke*$;let Ot=Li;r&&(Ot=Ot*n.scalingFactor);const kt=wt/2-Ot,Br=.008,Gr=[];Gr.push({box:new Ge(h,{fontFamily:p})}),Gr.push(-Br);const it=new Ge(d,{fontFamily:p});if(u===null)for(let Wn=0;Wn<$e;Wn++)Gr.push({box:it});else{for(let Wn=0;Wn<$e;Wn++)Gr.push({box:it});Gr.push(-Br),Gr.push({box:new Ge(u,{fontFamily:p})}),Gr.push(-Br);for(let Wn=0;Wn<$e;Wn++)Gr.push({box:it})}Gr.push(-Br),Gr.push({box:new Ge(s,{fontFamily:p})});let aa="";p==="Size1-Regular"?aa=" delim-size1":p==="Size4-Regular"&&(aa=" delim-size4");const eo=new gn({bottom:kt,children:Gr},{classes:aa});return new Ge(eo,_(S({},i!=null?i:{}),{classes:((a=i==null?void 0:i.classes)!=null?a:"")+" ML__delim-mult"}))}var fd=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),O0=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),hd=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),N0=[0,1.2,1.8,2.4,3];function F0(e,t,r,n){return e===void 0||e==="."?Mo(r,n.classes):(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),fd.has(e)||hd.has(e)?ud(e,t,!1,r,n):O0.has(e)?dd(e,N0[t],!1,r,n):(console.assert(!1,"Unknown delimiter '"+e+"'"),null))}var z0=[{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}],K0=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],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},{type:"stack"}];function W0(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(console.assert(e.type==="stack"),"Size4-Regular")}function V0(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=Ho(e,W0(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(mo[Math.max(1,n.size-2)],n.minFontScale):r[a].mathstyle==="scriptstyle"&&(u*=Math.max(mo[Math.max(1,n.size-1)],n.minFontScale))),u>t)return r[a]}return r[r.length-1]}function Ts(e,t,r,n,i,a){if(!t||t.length===0||t===".")return Mo(i);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");let s;hd.has(t)?s=z0:fd.has(t)?s=H0:s=K0;const u=V0($l(t),r,s,i),d=new Ar({parent:i,mathstyle:u.mathstyle},a==null?void 0:a.style);return u.type==="small"?cd(t,d,n,_(S({},a),{type:e})):u.type==="large"?ud(t,u.size,n,d,_(S({},a),{type:e})):(console.assert(u.type==="stack"),dd(t,r,n,d,_(S({},a),{type:e})))}function qo(e,t,r,n,i,a){if(t===".")return Mo(i,a==null?void 0:a.classes);const s=Li*i.scalingFactor,u=901,d=5/zn,h=Math.max(r-s,n+s),p=Math.max(h/500*u,2*h-d);return Ts(e,t,p,!0,i,a)}function Mo(e,t){const r=new Ge(null,{classes:" nulldelimiter "+(t!=null?t:""),type:"ignore"});return r.width=e.getRegisterAsEm("nulldelimiterspace"),r.wrap(new Ar({parent:e,mathstyle:"textstyle"}))}var La=class np extends Ce{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{}"}},pd=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],Pc=["cases","dcases","rcases"],md=["align","align*","aligned","gather","gathered","split"],Z0=["array","subequations","eqnarray"];function j0(e){return Z0.concat(md).concat(Pc).concat(pd).includes(e)}function gd(e){return pd.includes(e)}function U0(e){return Pc.includes(e)}function vd(e){return md.includes(e)}function G0(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 b=[],M=Math.min(h.length,p+n);for(;p<M;){const B=h[p];B.length===0?b.push([new Ce({type:"first",mode:e.mode})]):B[0].type!=="first"?b.push([new Ce({type:"first",mode:e.mode}),...B]):(console.assert(!B.slice(1).some($=>$.type==="first")),b.push(B)),p+=1}a.push(b)}}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 Ce({type:"first",mode:e.mode}),new La]);s.push(h)}let u=0,d=0;for(const h of s){d=0;for(const p of h){for(const b of p)b.parent=e,b.parentBranch=[u,d];d+=1}u+=1}return e.isDirty=!0,s}var Wr=class ip extends Ce{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=G0(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(Cl(t))return(r=this.array[t[0]][t[1]])!=null?r:void 0}createBranch(t){var r;return Cl(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(xo(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 Ar({parent:t,mathstyle:this.mathstyleName},this.style),h=d.getRegisterAsEm("arrayrulewidth"),p=d.getRegisterAsEm("arraycolsep"),b=d.getRegisterAsEm("doublerulesep"),M=(n=(r=this.arraystretch)!=null?r:d.getRegisterAsNumber("arraystretch"))!=null?n:1;let B=typeof this.arraycolsep=="number"?this.arraycolsep:p;this.colSeparationType==="small"&&(B=.2778*(new Ar({parent:t,mathstyle:"scriptstyle"}).scalingFactor/t.scalingFactor));const $=M*qu,se=.7*$,Ze=.3*$;let ee=0;const ke=[];let Ye=0;const $e=this.array.length;for(let tn=0;tn<$e;++tn){const Sn=this.array[tn];Ye=Math.max(Ye,Sn.length);const Vn=new Ar({parent:d,mathstyle:this.mathstyleName},this.style);let to=se/Vn.scalingFactor,ro=Ze/Vn.scalingFactor;const no={cells:[],height:0,depth:0,pos:0};for(const Ia of Sn){const Nf=(i=Ce.createBox(Vn,Ia,{type:"ignore"}))!=null?i:new Ge(null,{type:"ignore"});ro=Math.max(ro,Nf.depth),to=Math.max(to,Nf.height),no.cells.push(Nf)}let io=(a=ed(this.rowGaps[tn]))!=null?a:0;io>0&&(io+=Ze,ro=Math.max(ro,io),io=0),tn<$e-1&&!gd(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(ro+=d.getRegisterAsEm("jot")),no.height=to,no.depth=ro,ee+=to,no.pos=ee,ee+=ro+io,ke.push(no)}const wt=ee/2+Li,Ot=[];for(let tn=0;tn<Ye;tn++){const Sn=[];for(const Vn of ke){const to=Vn.cells[tn];to.depth=Vn.depth,to.height=Vn.height,Sn.push({box:to,shift:Vn.pos-wt})}Sn.length>0&&Ot.push(new gn({individualShift:Sn}))}const kt=[];let Br=!1,Gr=!1,it=0,aa=!this.leftDelim;const{colFormat:eo}=this;for(const tn of eo){if("align"in tn&&it>=Ot.length)break;if("align"in tn)Br?kt.push(Ps(2*B)):(Gr||aa)&&kt.push(Ps(B)),kt.push(new Ge(Ot[it],{classes:"col-align-"+tn.align})),it++,Br=!0,Gr=!1,aa=!1;else if("gap"in tn){if(typeof tn.gap=="number")kt.push(Ps(tn.gap));else{const Sn=q0(t,ke,wt,tn.gap);Sn&&kt.push(Sn)}Br=!1,Gr=!1,aa=!1}else if("separator"in tn){const Sn=new Ge(null,{classes:"vertical-separator"});Sn.height=ee,Sn.setStyle("height",ee,"em"),Sn.setStyle("border-right",`${h}em ${tn.separator} currentColor`),Sn.setStyle("vertical-align",-(ee-wt),"em");let Vn=0;Gr?Vn=b-h:Br&&(Vn=B-h),Sn.left=Vn,kt.push(Sn),Br=!1,Gr=!0,aa=!1}}Br&&!this.rightDelim&&kt.push(Ps(B));const xa=new Ge(kt,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(xa.caret=this.caret),this.bind(t,xa);const Wn=xa.height,oa=xa.depth,Ti=this.bind(t,new Ge([this.bind(t,qo("open",(s=this.leftDelim)!=null?s:".",Wn,oa,d,{isSelected:this.isSelected})),xa,this.bind(t,qo("close",(u=this.rightDelim)!=null?u:".",Wn,oa,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(Ce.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}}`),Dr(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 Ce({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(Xo(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(Xo(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,Xo(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,Xo(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 Xo(e){const t=new Ce({type:"first",mode:e.mode});t.parent=e;const r=new La;return r.parent=e,[t,r]}function Ps(e){const t=new Ge(null,{classes:"arraycolsep"});return t.width=e,t}function q0(e,t,r,n){if(!n)return null;const i=[];for(const a of t){const s=Ce.createBox(e,n,{type:"ignore"});s&&(s.depth=a.depth,s.height=a.height,i.push({box:s,shift:a.pos-r}))}return new gn({individualShift:i}).wrap(e)}var ja=class ap extends Ce{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=Ce.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 Ar({parent:t},this.style),h=d.toEm((n=this.padding)!=null?n:{register:"fboxsep"}),p=new Ge(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 b=new Ge([p,s],{type:"lift"});return b.setStyle("display","inline-block"),b.setStyle("position","relative"),b.setStyle("line-height",0),b.height=s.height+h+(u>0?u:0),b.depth=s.depth+h+(u<0?-u:0),b.setStyle("padding-left",h,"em"),b.setStyle("padding-right",h,"em"),b.setStyle("height",Math.floor(100*(s.height+s.depth+2*h+Math.abs(u)))/100,"em"),b.setStyle("margin-top",-h,"em"),b.setStyle("top",Math.floor(100*(s.depth-s.height+2*h-u))/100,"em"),b.setStyle("vertical-align",Math.floor(100*(s.depth+2*h))/100,"em"),this.caret&&(b.caret=this.caret),this.attachSupsub(t,{base:b})}_serialize(t){return t.skipStyles?Dr([this.bodyToLatex(t),this.supsubToLatex(t)]):super._serialize(t)}},bd=class op extends Ce{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 Ge(this.value,{classes:"ML__composition",type:"composition"});return this.bind(t,r),this.caret&&(r.caret=this.caret),r}_serialize(t){return""}},Co=class sp extends Ce{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}},Rc=class lp extends Ce{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=Ce.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=fe(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):`{${this.bodyToLatex(t)}}`}},o=class cp extends Ce{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"?Dr(["\\left",(r=this.leftDelim)!=null?r:".",this.bodyToLatex(t),"\\right",i]):this.variant==="mleft...mright"?Dr(["\\mleft",(n=this.leftDelim)!=null?n:".",this.bodyToLatex(t),"\\mright",i]):Dr([!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=Bl[n])!=null?r:n}render(t){var r,n;const i=new Ar({parent:t},this.style);console.assert(this.body!==void 0);const a=new Ar({parent:t,mathstyle:"textstyle"},this.style),s=(r=Ce.createBox(i,this.body,{type:"inner"}))!=null?r:new Ge(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&&(l(s.children,this,i,u,d),h.push(s)),this.rightDelim){let B=this.containsCaret?" ML__contains-caret":"",$=this.rightDelim;$==="?"&&(i.smartFence?($=this.matchingRightDelim(),B+=" ML__smart-fence__close"):$="."),h.push(this.bind(a,qo("close",$,u,d,a,{isSelected:this.isSelected,classes:B+" ML__close",mode:this.mode,style:this.style})))}let p=this.variant==="mleft...mright";const b=this.leftSibling;b&&(!p&&b.isFunction&&(p=!0),!p&&b.type==="subsup"&&((n=b.leftSibling)!=null&&n.isFunction)&&(p=!0));const M=new Ge(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 l(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&&l(s.children,t,r,n,i)}}var c=class up extends Ce{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=Ce.createBox(t,this.body);return r?(this.caret&&(r.caret=this.caret),this.bind(t,r)):null}},f=class dp extends Ce{constructor(){super({type:"macro-argument"})}static fromJson(t){return new dp}toJson(){return super.toJson()}_serialize(t){return""}render(t){return null}},m=class fp extends Ce{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 Ar({parent:t}),n=r.getRegisterAsEm("fboxsep"),i=n,a=n,s=Ce.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 Ge(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 Ge(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 b=new Ge([h,u],{classes:"ML__prompt-atom"});return b.setStyle("position","relative"),b.setStyle("display","inline-block"),b.setStyle("line-height",0),b.height=u.height+a+.2,b.depth=u.depth+a,b.left=i,b.right=i,b.setStyle("height",u.height+a,"em"),b.setStyle("top",u.depth-u.height,"em"),b.setStyle("vertical-align",u.depth+a,"em"),b.setStyle("margin-left",.5,"em"),b.setStyle("margin-right",.5,"em"),this.caret&&(b.caret=this.caret),this.bind(r,this.attachSupsub(t,{base:b}))}_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]"),sn(i,n)}},g=class hp extends Ce{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 yo)t[n]&&r.setChildren(t[n],n);return r}render(t){var r;const n=new Ar({parent:t,isPhantom:!0}),i=this.leftSibling,a=(r=i.render(n))!=null?r:new Ge(null),s=new Ge(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 v(e){return e?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1}var y=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 Ar&&!(r!=null&&r.parseMode)&&!r.mathstyle?t:new Ar({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:Vo(this.tokens.slice(this.index,this.index+10)),after:Vo(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 g({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=fe(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?E(t,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new La({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();v(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(v(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()||!v(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=ne(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=fe(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 Rc(t,this.parseMode,this.style);return r.verbatimLatex=Vo(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 o("",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(!v(e)&&!e.startsWith("\\"))return null;this.next();const t=fe(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 Co("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new Co("\\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 Co(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 o(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 Ce({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):t.addChild(new Ce({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&t.addChildren(ue(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(v(e)){const r=Vi.createAtom(this.parseMode,e,S({},this.style));return r?[r]:null}if(t=this.scanMacro(e),t)return[t];if(e.startsWith("\\")){const r=fe(e,this.parseMode);if(!r)return this.onError({code:"unknown-command",arg:e}),[new Co(e)];if(r.definitionType==="symbol"){const n=S({},this.style);r.variant&&(n.variant=r.variant),t=new Ce({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 Co(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=Ce.serialize(d,{defaultMode:"math"});let p=[],b;!b&&h==="correct"?b="correct":!b&&h==="incorrect"?b="incorrect":h!==""&&(p=d);const M=this.scanOptionalArgument("string")==="locked",B=this.scanArgument("auto");let $;return B&&Array.isArray(B)&&B.length>0?$=B:B&&typeof B=="object"&&"group"in B?$=B.group:$=p,u?[new m(u,b,M,$!=null?$:p,{mode:this.parseMode,style:this.style})]:[new La({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=Dr([e,Vo(this.tokens.slice(u,this.index))]);return[new Ce({type:"text",value:"",verbatimLatex:p})]}}let i=this.scanMacro(e);if(i)return[i];const a=fe(e,this.parseMode);if(!a)return this.parseMode==="text"?(/[a-zA-Z]/.test((t=this.peek())!=null?t:"")&&(e+=" "),[...e].map(u=>new Ce({type:"text",value:u,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:e}),[new Co(e)]);const s=this.index;if(a.definitionType==="symbol"){const u=S({},this.style);a.variant&&(u.variant=a.variant),i=new Ce({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 ue(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=ue(this.scanArgument(d)));else if(typeof a.applyStyle=="function"){const p=S(S({},this.style),a.applyStyle(e,h,this.context)),b=this.parseMode;if(a.applyMode&&(this.parseMode=a.applyMode),d){const M=this.style;this.style=p;const B=this.scanArgument(d);return this.style=M,this.parseMode=b,ue(B)}this.style=p}else i=new Ce({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 Ce&&i.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){const u=Dr([e,Vo(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(v(e)){const t=Vi.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 Bs(" "," ",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=Vo(this.tokens.slice(d,this.index))}a[s]=u}return new c(e,{expand:r.expand,captureSelection:r.captureSelection,args:n===this.index?null:Vo(this.tokens.slice(n,this.index)),style:this.parsingContext.style,body:E(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 E(e,t){var r,n,i,a;const s=(r=t==null?void 0:t.args)!=null?r:void 0,u=new y(ks(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 T(e,t){var r;const n=new y(ks(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 I=class pp extends Ce{constructor(t,r){super({type:"chem"},{command:t,mode:"math"});const n=k.go(x.go(r,t==="\\pu"?"pu":"ce"),!1);this.body=E(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=Ce.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 I(e.command,(t=e.args[0])!=null?t:"")}});var x={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=x.stateMachines[t],d=u.transitions[r]||u.transitions["*"];e:for(var h=0;h<d.length;h++){var p=x.patterns.match_(d[h].pattern,e);if(p){for(var b=d[h].task,M=0;M<b.action_.length;M++){var B;if(u.actions[b.action_[M].type_])B=u.actions[b.action_[M].type_](n,p.match_,b.action_[M].option);else if(x.actions[b.action_[M].type_])B=x.actions[b.action_[M].type_](n,p.match_,b.action_[M].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+b.action_[M].type_+")"];x.concatArray(s,B)}if(r=b.nextState||r,e.length>0){if(b.revisit||(e=p.remainder),!b.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=x.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 x.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return x.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return x.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return x.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return x.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return x.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return x.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return x.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return x.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return x.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return x.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return x.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return x.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 x.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return x.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return x.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return x.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 x.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return x.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return x.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return x.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return x.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return x.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return x.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return x.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=x.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,ke){if(typeof ke=="string")return ee.indexOf(ke)!==0?null:ke;var Ye=ee.match(ke);return Ye?Ye[0]:null},b=function(ee,ke,Ye){for(var $e=0;ke<ee.length;){var wt=ee.charAt(ke),Ot=p(ee.substr(ke),Ye);if(Ot!==null&&$e===0)return{endMatchBegin:ke,endMatchEnd:ke+Ot.length};if(wt==="{")$e++;else if(wt==="}"){if($e===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];$e--}ke++}return $e>0,null},M=p(e,t);if(M===null||(e=e.substr(M.length),M=p(e,r),M===null))return null;var B=b(e,M.length,n||i);if(B===null)return null;var $=e.substring(0,n?B.endMatchEnd:B.endMatchBegin);if(a||s){var se=this.findObserveGroups(e.substr(B.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(B.endMatchEnd)}},match_:function(e,t){var r=x.patterns.patterns[e];if(r===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof r=="function")return x.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 x.go(t,"text")},"{text}":function(e,t){var r=["{"];return x.concatArray(r,x.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return x.go(t,"tex-math")},"tex-math tight":function(e,t){return x.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 x.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 x.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:{}};x.stateMachines={ce:{transitions:x.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 x.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 x.concatArray(r,this.output(e)),x.concatArray(r,x.actions.bond(e,t,"-")),r}else e.d=t},"- after o/d":function(e,t,r){var n=x.patterns.match_("orbital",e.o||""),i=x.patterns.match_("one lowercase greek letter $",e.o||""),a=x.patterns.match_("one lowercase latin letter $",e.o||""),s=x.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?(x.concatArray(d,this.output(e)),d.push({type_:"hyphen"})):(n=x.patterns.match_("digits",e.d||""),r&&n&&n.remainder===""?(x.concatArray(d,x.actions["d="](e,t)),x.concatArray(d,this.output(e))):(x.concatArray(d,this.output(e)),x.concatArray(d,x.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:x.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"&&x.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:x.go(e.a,"a"),b:x.go(e.b,"bd"),p:x.go(e.p,"pq"),o:x.go(e.o,"o"),q:x.go(e.q,"pq"),d:x.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var i;e.rdt==="M"?i=x.go(e.rd,"tex-math"):e.rdt==="T"?i=[{type_:"text",p1:e.rd||""}]:i=x.go(e.rd);var a;e.rqt==="M"?a=x.go(e.rq,"tex-math"):e.rqt==="T"?a=[{type_:"text",p1:e.rq||""}]:a=x.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 x.concatArray(r,x.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:x.go(t[0]),p2:x.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:x.go(t[0]),p2:x.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:x.go(t[0]),p2:x.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:x.go(t[0]),p2:x.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:x.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:x.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:x.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:x.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:x.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:x.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:x.go(t[1],"pq")}}}},bd:{transitions:x.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:x.go(t[1],"bd")}}}},oxidation:{transitions:x.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:x.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:x.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:x.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:x.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]&&(x.concatArray(r,x.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?x.concatArray(r,x.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]),x.concatArray(r,x.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=x.patterns.match_("{(...)}",e.d||"");r&&r.remainder===""&&(e.d=r.match_);var n=x.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:x.go(e.d,"pu"),q:x.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_:"/"}),x.concatArray(t,i.q))}else t=x.go(e.d,"pu-2");for(var a in e)delete e[a];return t}}},"pu-2":{transitions:x.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=x.patterns.match_("{(...)}",e.rm||"");r&&r.remainder===""?t=x.go(r.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var n in e)delete e[n];return t}}},"pu-9,9":{transitions:x.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 k={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+=k._go2(a),a.type_==="1st-level escape"&&(n=!0))}return!t&&!n&&r&&(r="{"+r+"}"),r},_goInner:function(e){return e&&k.go(e,!0)},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var r={a:k._goInner(e.a),b:k._goInner(e.b),p:k._goInner(e.p),o:k._goInner(e.o),q:k._goInner(e.q),d:k._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 "+k._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+k._goInner(e.p1);break;case"bond":if(t=k._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{"+k._goInner(e.p1)+"}{"+k._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+i+"}{"+i+"}{"+i+"}{"+i+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+k._goInner(e.p1)+"}{"+k._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+k._goInner(e.p1)+"}{"+k._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+k._goInner(e.p1)+"}{"+k._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+k._goInner(e.p1)+"}_{"+k._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+k._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var a={rd:k._goInner(e.rd),rq:k._goInner(e.rq)},s=k._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=k._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 P(e){}function te(e){}var Ve=class mp extends Ce{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 Ge(this.value,{type:"middle"})}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const r=fe(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):sn(this.command,this.value)}},Qe=class gp extends Ce{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=F0(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=fe(this.command,this.mode);return r!=null&&r.serialize?r.serialize(this,t):sn(this.command,this.value)}},rt=class vp extends Ce{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=fe(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 sn(i,this.bodyToLatex(t))}render(t){const r=new Ar({parent:t},this.style),n=Ce.createBox(r,this.body);if(!n)return null;const i=Et(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 Ge(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 ke=a;ke+Ze-.4*se<0&&(ke=.4*se-Ze),h+='<polygon points="',h+=`${ee},${ke} ${ee-se-.4*Ze},${ke+Ze-.4*se} `,h+=`${ee-.7*se},${ke+.7*Ze} ${ee-se+.4*Ze},${ke+Ze+.4*se} `,h+=`${ee},${ke}`,h+=`" stroke='none' fill="${this.strokeColor}"`,h+="/>"}let p=0;if(this.notation.phasorangle){const M=fr(r),B=(n.height+n.depth+2*M+a).toString(),$=(n.height+n.depth)/2;h+=this.line(a.toString(),B,(a+$+n.width).toString(),B),h+=this.line(a.toString(),B,(a+$).toString(),(a-M).toString()),u+=M,p=$,n.left+=u/2-a}if(this.notation.longdiv){const M=fr(r);u+=M,h+=this.line(a.toString(),a.toString(),(a+n.width).toString(),a.toString());const B=.3;p=B+M,n.left+=B+M,n.setTop(a+M),h+='<path d="',h+=`M ${a} ${a} a${B} ${(n.depth+n.height+2*M)/2}, 0, 1, 1, 0 ${n.depth+n.height+2*M} "`,h+=` stroke-width="${Tt(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 b=new Ge([s,n]);return b.setStyle("position","relative"),b.setStyle("vertical-align",a,"em"),b.setStyle("height",`${Math.floor(100*(n.height+n.depth+2*a))/100}em`),b.setStyle("display","inline-block"),b.height=s.height,b.depth=s.depth,b.width=s.width-2*a,b.left=a,b.right=a,this.caret&&(b.caret=this.caret),b.wrap(r)}line(t,r,n,i){return`<line x1="${ft(t)}" y1="${ft(r)}" x2="${ft(n)}" y2="${ft(i)}" vector-effect="non-scaling-stroke"></line>`}};function ft(e){return typeof e=="number"?`${Math.floor(100*e)/100}%`:e}function Et(e){if(!e)return"1px";const t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1]}function Tt(e){return(Math.floor(100*e.metrics.sqrtRuleThickness/e.scalingFactor)/100/10).toString()+"em"}function fr(e){const t=e.isDisplayStyle?za:e.metrics.defaultRuleThickness;return e.metrics.defaultRuleThickness+e.scalingFactor*t/4}var er=class bp extends Ce{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 Ar({parent:t,mathstyle:this.mathstyleName},this.style),a=i.metrics,s=new Ar({parent:i,mathstyle:this.continuousFraction?"":"numerator"},this.style),u=this.numerPrefix?new Ge([new Ge(this.numerPrefix),Ce.createBox(s,this.above)],{isTight:s.isTight,type:"ignore"}):(r=Ce.createBox(s,this.above,{type:"ignore"}))!=null?r:new Ge(null,{type:"ignore"}),d=new Ar({parent:i,mathstyle:this.continuousFraction?"":"denominator"},this.style),h=this.denomPrefix?new Ge([new Ge(this.denomPrefix),Ce.createBox(d,this.below,{type:"ignore"})]):(n=Ce.createBox(d,this.below,{type:"ignore"}))!=null?n:new Ge(null,{type:"ignore"}),p=this.hasBarLine?a.defaultRuleThickness:0;let b,M=0,B;i.isDisplayStyle?(b=s.metrics.num1,M=p>0?3*p:7*p,B=d.metrics.denom1):(p>0?(b=s.metrics.num2,M=p):(b=s.metrics.num3,M=3*a.defaultRuleThickness),B=d.metrics.denom2);const $=[];this.isSelected&&$.push("ML__selected");const se=u.depth,Ze=h.height;let ee;if(p<=0){const kt=b-se-(Ze-B);kt<M&&(b+=(M-kt)/2,B+=(M-kt)/2),ee=new gn({individualShift:[{box:u,shift:-b,classes:[...$,"ML__center"]},{box:h,shift:B,classes:[...$,"ML__center"]}]}).wrap(i)}else{const kt=new Ge(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});kt.softWidth=Math.max(u.width,h.width),kt.height=p/2,kt.depth=p/2;const Br=Li+p/2;b<M+se+Br&&(b=M+se+Br);const Gr=Li-p/2;B<M+Ze-Gr&&(B=M+Ze-Gr),ee=new gn({individualShift:[{box:h,shift:B,classes:[...$,"ML__center"]},{box:kt,shift:-Gr,classes:$},{box:u,shift:-b,classes:[...$,"ML__center"]}]}).wrap(i)}const ke=i.isDisplayStyle?a.delim1:a.delim2,Ye=this.leftDelim?this.bind(t,Ts("open",this.leftDelim,ke,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Mo(i,"open");let $e=null;this.continuousFraction?$e=new Ge(null,{type:"close"}):this.rightDelim?$e=this.bind(t,Ts("close",this.rightDelim,ke,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):$e=Mo(i,"close");const wt=new Ge([Ye,ee,$e],{isTight:i.isTight,type:"inner",classes:"mfrac"}),Ot=this.bind(t,wt);return this.caret&&(Ot.caret=this.caret),this.attachSupsub(t,{base:Ot})}},Zt=class yp extends Ce{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 Ge(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}},ln=class xp extends Ce{constructor(t){super({type:"latexgroup",mode:"latex"}),this.body=[...t].map(r=>new Zt(r)),this.skipBoundary=!1}static fromJson(t){return new xp("")}toJson(){return super.toJson()}render(t){const r=Ce.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:""}},Lr=class wp extends Ce{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 Ge(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-Li*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 Ge(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=fe(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)),Dr(n)}},Yr=class Sp extends Ce{constructor(t){const r=t.body;super(_(S({},t),{type:"overlap",body:typeof r=="string"?[new Ce({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=Ce.createBox(t,this.body,{classes:"inner"});return r?(this.caret&&(r.caret=this.caret),this.bind(t,new Ge([r,new Ge(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Qr=class _p extends Ce{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?_l(this.svgBody):Ce.createBox(t,this.body,{type:"ignore"});const n=new Ar({parent:t,mathstyle:"scriptstyle"},this.style);let i=null;this.svgAbove?i=_l(this.svgAbove):this.above&&(i=Ce.createBox(n,this.above,{type:"ignore"}));let a=null;this.svgBelow?a=_l(this.svgBelow):this.below&&(a=Ce.createBox(n,this.below,{type:"ignore"})),this.paddedBody&&(r=new Ge([Mo(t,"open"),r,Mo(t,"close")],{type:"ignore"}));let s=ti(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 ti(e,t){if(!t.base)return null;if(!t.above&&!t.below){const u=new Ge(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 gn({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 gn({top:i.height-a,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:s},{box:i,classes:["ML__center"]}]}):t.above&&(n=new gn({bottom:i.depth+a,children:[{box:i,classes:["ML__center"]},r,{box:t.above,classes:s},e.metrics.bigOpSpacing5]}));return new Ge(n,{type:t.type})}var Si=class Mp extends Ce{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 Ar({parent:t,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Ce.createBox(r,this.body,{classes:"inner"});const n=Ce.createBox(this.isInvisible?r:t,this.body);if(!n)return null;if(this.smashWidth){const i=new Ge(null,{classes:"fix"});return new Ge([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 gn({firstBaseline:[{box:n}]},{type:n.type}).wrap(t)}},pi=class Cp extends Ce{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 Ge(this.mode==="math"?null:" ");let n;if(this.width!==void 0)n=new Ge(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 Ge(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=fe(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}{${Kn(this.width)}}`:`${i}${Kn(this.width)}`}},_i=class Ep extends Ce{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=fe(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")?sn(`${n}[${this.aboveToLatex(t)}]`,i):/^[0-9]$/.test(i)?`${n}${i}`:sn(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 Ar({parent:t,mathstyle:"cramp"},this.style),i=(r=Ce.createBox(n,this.body,{type:"inner"}))!=null?r:new Ge(null),a=n.scalingFactor,s=n.metrics.defaultRuleThickness/a,u=t.isDisplayStyle?za:s,d=new Ge(null,{classes:"ML__sqrt-line",style:this.style});d.height=s,d.softWidth=i.width;let h=a*(s+u/4);const b=Math.max(a*2*u,i.height+i.depth)+h+s,M=new Ar({parent:t},this.style),B=this.bind(M,new Ge(Ts("inner","\\surd",b,!1,M,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!B)return null;const $=B.height+B.depth-s;$>i.height+i.depth+h&&(h=(h+$-(i.height+i.depth))/2),B.setTop(B.height-i.height-h);const se=this.bind(t,new gn({firstBaseline:[{box:new Ge(i)},h-2*s,{box:d},s]})),Ze=Ce.createBox(new Ar({parent:t,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!Ze){const Ye=new Ge([B,se],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return Ye.setStyle("display","inline-block"),Ye.setStyle("height",Ye.height+Ye.depth,"em"),this.caret&&(Ye.caret=this.caret),this.bind(t,Ye)}const ee=new gn({shift:-.6*(Math.max(B.height,se.height)-Math.max(B.depth,se.depth)),children:[{box:Ze}]}),ke=new Ge([new Ge(ee,{classes:"ML__sqrt-index",type:"ignore"}),B,se],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return ke.height=B.height,ke.depth=B.depth,this.caret&&(ke.caret=this.caret),this.bind(t,ke)}},ga=class extends Ge{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 Bn(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"){Bn(e.parent,t);return}n>0&&r[n-1].type==="skip"?r[n-1].width+=t:r.splice(n,0,new ga(t))}var Ua={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}},va={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function Rs(e){Zi(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 ta(e,t){if(!e.children)return e;const r=e.children;Rs(r);const n=t.getRegisterAsEm("thinmuskip"),i=t.getRegisterAsEm("medmuskip"),a=t.getRegisterAsEm("thickmuskip");return Zi(r,(s,u)=>{var d,h,p;if(!s)return;const b=s.type,M=u.isTight?(d=va[b])!=null?d:null:(h=Ua[b])!=null?h:null,B=(p=M==null?void 0:M[u.type])!=null?p:null;B===3&&Bn(u,n),B===4&&Bn(u,i),B===5&&Bn(u,a)}),e}function Zi(e,t,r=void 0){if(!e)return r;e=[...e];for(const n of e)n.type==="lift"?r=Zi(n.children,t,r):n.type==="ignore"?Zi(n.children,t):(t(r,n),Zi(n.children,t),r=n);return r}var ji=class kp extends Ce{constructor(t){super({type:"tooltip",command:t.command,mode:t.mode,style:t.style,body:t.body,displayContainsHighlight:!0}),this.tooltip=new Ce({type:"root",mode:t.content,body:t.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(t){return new kp(_(S({},t),{tooltip:ra(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=Ce.createBox(new Ar,this.body);if(!r)return null;const n=new Ar({parent:t,mathstyle:"displaystyle"},{fontSize:vl}),i=wl(ta(new Ge(this.tooltip.render(n),{classes:"ML__tooltip-content"}),n)),a=new Ge([i,r],{classes:"ML__tooltip-container"});return this.caret&&(a.caret=this.caret),this.bind(t,a)}},Ii=class Dp extends Ce{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 Ge(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 Ge(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=fe(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)),Dr(n)}};function ra(e){if(A(e))return e.map(n=>ra(n));if(typeof e=="string")return Ce.fromJson(e);e=S({},e);for(const n of yo)e[n]&&(e[n]=ra(e[n]));e.args&&(e.args=ba(e.args)),e.array&&(e.array=ra(e.array));const t=e.type;let r;t==="accent"&&(r=Ll.fromJson(e)),t==="array"&&(r=Wr.fromJson(e)),t==="box"&&(r=ja.fromJson(e)),t==="chem"&&(r=I.fromJson(e)),t==="composition"&&(r=bd.fromJson(e)),t==="delim"&&(r=Ve.fromJson(e)),t==="enclose"&&(r=rt.fromJson(e)),t==="error"&&(r=Co.fromJson(e)),t==="extensible-symbol"&&(r=Lr.fromJson(e)),t==="genfrac"&&(r=er.fromJson(e)),t==="group"&&(r=Rc.fromJson(e)),t==="latex"&&(r=Zt.fromJson(e)),t==="latexgroup"&&(r=ln.fromJson(e)),t==="leftright"&&(r=o.fromJson(e)),t==="macro"&&(r=c.fromJson(e)),t==="macro-argument"&&(r=f.fromJson(e)),t==="operator"&&(r=Ii.fromJson(e)),t==="overlap"&&(r=Yr.fromJson(e)),t==="overunder"&&(r=Qr.fromJson(e)),t==="placeholder"&&(r=La.fromJson(e)),t==="prompt"&&(r=m.fromJson(e)),t==="phantom"&&(r=Si.fromJson(e)),t==="sizeddelim"&&(r=Qe.fromJson(e)),t==="spacing"&&(r=pi.fromJson(e)),t==="subsup"&&(r=g.fromJson(e)),t==="surd"&&(r=_i.fromJson(e)),t==="text"&&(r=Bs.fromJson(e)),t==="tooltip"&&(r=ji.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=Ce.fromJson(e));for(const n of yo)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 ba(e){if(e&&Array.isArray(e))return e.map(t=>t==="<null>"?null:typeof t=="object"&&"group"in t?{group:t.group.map(r=>ra(r))}:typeof t=="object"&&"atoms"in t?t.atoms.map(r=>ra(r)):t)}var Jo={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"]},Yo={"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]$/},Eo=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,Tl=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,Pl=[/^[a-z]$/,/^[A-Z]$/,Eo,Tl],yd={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},X0=class extends Vi{constructor(){super("math")}createAtom(e,t,r){var n,i,a,s;if(t===null)return new Ce({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 Ce({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 Ce({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=Rl(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&&Pl.forEach((u,d)=>{var h;u.test(e.value)&&yd[(h=t.letterShapeStyle)!=null?h:"tex"][d]==="it"&&(n="italic")}),n==="up"&&(n=void 0);const i=n?r+"-"+n:r;console.assert(Jo[i]!==void 0);const[a,s]=Jo[i];return Yo[r]&&!Yo[r].test(e.value)?(e.value=Oe(e.value,r,n),null):(Eo.test(e.value)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),a)}};function Rl(e,t){const{parent:r}=e[0],n=xd(r);return Ka(e,"variant").map(i=>{const a=xd(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=Dr(i.map(d=>d._serialize(t)));return s?sn(s,u):u})}function xd(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 X0;function wd(e,t){return e.map(r=>r._serialize(t))}function Oc(e,t){return Ka(e,"fontShape").map(r=>{const n=wd(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?`{${sn("\\fontshape",i)}${Dr(n)}}`:a?sn(a,Dr(n)):Dr(n)})}function Ol(e,t){return Ka(e,"fontSeries").map(r=>{const n=Oc(r,t),{fontSeries:i}=r[0].style;let a="";return i==="b"&&(a="\\textbf"),i==="l"&&(a="\\textlf"),i==="m"&&(a="\\textmd"),i&&!a?`{${sn("\\fontseries",i)}${Dr(n)}}`:a?sn(a,Dr(n)):Dr(n)})}function Sd(e,t){return Ka(e,"fontSize").map(r=>{var n,i;const a=Ol(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} ${Dr(a)}`:Dr(a)})}function Nc(e,t,r){return Ka(e,"fontFamily").map(n=>{var i,a;const s=Sd(n,t),u=(a={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(i=n[0].style.fontFamily)!=null?i:""])!=null?a:"";return u?`\\${u}{${Dr(s)}}`:n[0].style.fontFamily?`{\\fontfamily{${n[0].style.fontFamily}} ${Dr(s)}}`:r?`\\text{${Dr(s)}}`:Dr(s)})}var Nl={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},J0=class extends Vi{constructor(){super("text")}createAtom(e,t,r){return t&&t.definitionType==="symbol"?new Bs(e,String.fromCodePoint(t.codepoint),r!=null?r:{}):null}serialize(e,t){return Nc(e,_(S({},t),{defaultMode:"text"}),t.defaultMode!=="text")}getFont(e,t){var r,n,i,a,s;const{fontFamily:u}=t;if(Nl[u]?e.classes+=" "+Nl[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 J0;var Os=class extends Vi{constructor(){super("latex")}createAtom(e){return new Zt(e)}serialize(e,t){return e.filter(r=>r instanceof Zt&&!r.isSuggestion).map(r=>r.value)}getFont(){return null}};new Os;var Fc={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:["","=","","="]}},Y0={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 Fl(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 Q0(){switch(qe()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function na(e){(!e.platform||e.platform===Q0())&&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(Q0()){case"apple":return Y0;case"windows":return zf;case"linux":return Kf}return Y0}switch(Q0()){case"apple":na(Y0),na($p),na(Fp),na(Rp);break;case"windows":na(zf),na(Tp),na(zp),na(Op);break;case"linux":na(Kf),na(Pp),na(Kp),na(Np);break}na(Fc);function ef(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 _d(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 Ns(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 Md(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:qp.has(e.code)}function Cd(){var e;let t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}var Ga=class Lo{static get scrim(){return Lo._scrim||(Lo._scrim=new Lo),Lo._scrim}static open(t){Lo.scrim.open(t)}static close(){Lo.scrim.close()}static get state(){return Lo.scrim.state}static get element(){return Lo.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=Cd();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:"",Cd()!==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 b;if(!a&&(e.textContent="",p.inputType!=="insertCompositionText")){if(p.inputType==="insertFromPaste"){p.preventDefault(),p.stopPropagation();return}r.onInput((b=p.data)!=null?b:""),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 b,M;if(((M=(b=p.relatedTarget)==null?void 0:b._mathfield)==null?void 0:M.element)===t){e.focus({preventScroll:!0}),p.preventDefault(),p.stopPropagation();return}const B=Ga.state;if(B==="open"||B==="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:()=>Cd()===e,setAriaLabel:p=>e.setAttribute("aria-label",p),setValue:p=>{var b;e.textContent=p,e.style.left="-1000px",(b=window.getSelection())==null||b.selectAllChildren(e)},moveTo:(p,b)=>{e.style.top=`${b}px`,e.style.left=`${p}px`}}}function zl(e){var t;if(!e||!Md(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(ze()){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=Fl(Hf(Wf(r))),i=Fl({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=L0[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(ef)}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:Fl(r)});const i=Wp(r.key,t);if(!i)return _(S({},e),{key:Fl(r)});if(i.shift&&r.shift||i.alt&&r.alt)throw new Error(`The keybinding ${e.key} (${tf(e.command)}) is conflicting with the key combination ${Fl(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:Fl(i)})}function tf(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} (${tf(i.command)}) matches ${s.key} (${tf(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 nn{constructor(){super("latex")}createAtom(e){return new Zt(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"}),bn(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(ei(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)ae.test(d)&&a.push(new Zt(d));let s=e.at(e.position);if(s instanceof ln&&(s=s.lastChild),!(s.parent instanceof ln)){const d=new ln("");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 Zt&&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 Zt&&d.isSuggestion),u||s++}return[n-1,s-1]}new rm;function Ed(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;Ed(e);for(const p of Wc(n))p.isError=!1;if(!n.selectionIsCollapsed||e.options.popoverPolicy==="off"){Hl(e);return}const i=[];let a=n.at(n.position);for(;a&&a instanceof Zt&&/^[a-zA-Z\*]$/.test(a.value);)a=a.leftSibling;if(a&&a instanceof Zt&&a.value==="\\")for(i.push(a),a=a.rightSibling;a&&a instanceof Zt&&/^[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;Hl(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(b=>new Zt(b,{isSuggestion:!0})),p),Fs(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 Kl(e,t="accept",r){var n,i;Hl(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"||(nn.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 kd(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 rf(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 Ar({from:e.context}),n=new Ce({mode:"math",type:"root",body:E(t,{context:r})}),i=wl(ta(new Ge(n.render(r),{classes:"ML__base"}),r));return Sl(i,{classes:"ML__latex"}).toMarkup()}function am(e,t){var r;if(t.length===0){Hl(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>`);nf()&&((r=i.querySelector(".ML__popover__current"))==null||r.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var a;i&&!nf()&&(i.classList.add("is-visible"),Dd(e),(a=i.querySelector(".ML__popover__current"))==null||a.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function nf(){const e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1}function Dd(e,t){var r;if(!e.element||e.element.mathfield!==e||!nf())return;if(((r=e.model.at(e.model.position))==null?void 0:r.type)!=="latex"){Hl(e);return}if(t!=null&&t.deferred){setTimeout(()=>Dd(e),32);return}const n=So(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 Hl(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=kd("mathlive-suggestion-popover"),ea("suggestion-popover"),ea("core"),r.addEventListener("pointerdown",n=>n.preventDefault()),r.addEventListener("click",n=>{let i=n.target;for(;i&&!i.dataset.command;)i=i.parentElement;i&&(Kl(e,"reject"),nn.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")&&(rf("mathlive-suggestion-popover"),Za("suggestion-popover"),Za("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 Ad=null,Uf,Gf,af=((Gf=(Uf=globalThis==null?void 0:globalThis.document)==null?void 0:Uf.currentScript)==null?void 0:Gf.src)||lm();function qf(e){return ns(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(e))return new URL(e).href;if(Ad===null)try{const t=yield fetch(af,{method:"HEAD"});t.status===200&&(Ad=t.url)}catch(t){console.error(`Invalid URL "${e}" (relative to "${af}")`)}return new URL(e,Ad!=null?Ad:af).href})}function cm(e,t,r={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,r)}var ia="not-loaded";function um(){return ns(this,null,function*(){return ia="not-loaded",Ld()})}function Ld(){return ns(this,null,function*(){var e;if(ia!=="not-loaded")return;if(ia="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?e:!1){ia="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))){ia="ready";return}if(!window.MathfieldElement.fontsDirectory){ia="not-loaded";return}const i=yield qf(window.MathfieldElement.fontsDirectory);if(!i){document.body.classList.add("ML__fonts-did-not-load"),ia="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)),ia="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")}ia="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 bn(e,t){e&&(e.dirty||(e.dirty=!0,requestAnimationFrame(()=>{Wa(e)&&e.dirty&&(e.atomBoundsCache=new Map,Fs(e,t),e.atomBoundsCache=void 0)})))}function fm(e,t){var r;t=t!=null?t:{};const n=new Ar({from:_(S({},e.context),{atomIdsSettings:{seed:t.forHighlighting?dm(Ce.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 Sl(ta(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 Fs(e,t){if(!Wa(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">${Hn(d)}</span>`)}n.innerHTML=window.MathfieldElement.createHTML(s),Bd(e,t.interactive),e.dirty=!1}function Bd(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)&&ia!=="error"&&ia!=="ready"&&setTimeout(()=>{ia==="ready"?Bd(e):setTimeout(()=>Bd(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){Dd(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=ad(e,$s(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(sd(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,qa;function Ui(e,t){t=S({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t!=null?t:{}),qa||(qa={});for(const r of Object.keys(e))console.assert(!qa[r],"Selector already defined: ",r),qa[r]=_(S({},t),{fn:e[r]})}function of(e){let t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return of(e[1]);t=e[0]}else t=e;return t=t.replace(/-\w/g,r=>r[1].toUpperCase()),qa[t]}function Wl(e){var t;return(t=of(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=qa[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)||Ed(e),qa[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(qa[n]){if(!e.isSelectionEditable&&(u!=null&&u.changeContent))return e.model.announce("plonk"),!1;/^(undo|redo)/.test(n)&&e.flushInlineShortcutBuffer(),s=qa[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&&bn(e),a}function mm(e,t){var r;if(!e)return!1;e.focus(),jh.keypressVibration&>()&&navigator.vibrate(Jf);const n=of(t);window.MathfieldElement.playSound((r=n==null?void 0:n.audioFeedback)!=null?r:"keypress");const i=e.executeCommand(t);return e.scrollIntoView(),i}Ui({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}Ui({complete:Kl},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Ui({nextSuggestion:gm,previousSuggestion:vm},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Id="mathlive#virtual-keyboard-message";function sf(e){var t;return e.type!=="message"?!1:((t=e.data)==null?void 0:t.type)===Id}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(sf(t)){if(!Ic(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;Wl(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:Id,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]"]]}},$d={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=Qo.singleton;if(!a)return;const s=Vl(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[ke,Ye]=Td(Ze);h+=`<div id=${ee} class="item ${Ye}">${ke}</div>`}const p=document.createElement("div");p.setAttribute("aria-hidden","true"),p.className="MLK__variant-panel",p.style.height="auto";const b=Object.keys(d).length;let M=5;b===1?M=1:b===2||b===4?M=2:b===3||b===5||b===6?M=3:b>=7&&b<14&&(M=4),p.style.width=`calc(var(--variant-keycap-length) * ${M} + 12px)`,p.innerHTML=jh.createHTML(h),Ga.open({root:(i=a==null?void 0:a.container)==null?void 0:i.querySelector(".ML__keyboard"),child:p}),Zc=new AbortController;const{signal:B}=Zc,$=e==null?void 0:e.getBoundingClientRect();if($){$.top-p.clientHeight<0&&(p.style.width="auto",b<=6?p.style.height="56px":b<=12?p.style.height="108px":b<=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 ke=Vl(ee.target);!(ke!=null&&ke.id)||!d[ke.id]||(lf(d[ke.id]),jc(),t==null||t(),ee.preventDefault())},{capture:!0,passive:!1,signal:B}),p.addEventListener("pointerenter",ee=>{const ke=Vl(ee.target);!(ke!=null&&ke.id)||!d[ke.id]||ke.classList.add("is-active")},{capture:!0,signal:B}),p.addEventListener("pointerleave",ee=>{const ke=Vl(ee.target);!(ke!=null&&ke.id)||!d[ke.id]||ke.classList.remove("is-active")},{capture:!0,signal:B}),window.addEventListener("pointercancel",()=>{jc(),t==null||t()},{signal:B}),window.addEventListener("pointerup",()=>{jc(),t==null||t()},{signal:B})})}}function jc(){Zc==null||Zc.abort(),Zc=null,Ga.state==="open"&&Ga.close()}function ym(e){if(e==="foreground-color"){const t=[];for(const r of Object.keys(re))t.push({class:"swatch-button",label:'<span style="border: 3px solid '+re[r]+'"></span>',command:["applyStyle",{color:r}]});return t}if(e==="background-color"){const t=[];for(const r of Object.keys(Q))t.push({class:"swatch-button",label:'<span style="background:'+Q[r]+'"></span>',command:["applyStyle",{backgroundColor:r}]});return t}}function eh(e){return $d[e]!==void 0}function xm(e){var t;return typeof e!="string"?e:($d[e]||($d[e]=(t=ym(e))!=null?t:[]),$d[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 Ar,r=new Ce({mode:"math",type:"root",body:E(e,{context:t,args:i=>i==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),n=wl(ta(new Ge(r.render(t),{classes:"ML__base"}),t));return Sl(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"}[Ee.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()){Zl(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=_e(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='${_e("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${t.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${_e("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${_e("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${_e("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${_e("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=Qo.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]=Td(r);e.innerHTML=window.MathfieldElement.createHTML(n)}}function Dm(){ea("virtual-keyboard"),ea("core"),Ld()}function Am(){Za("core"),Za("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,b="";for(;p&&!b;)b=(d=p==null?void 0:p.getAttribute("data-command"))!=null?d:"",p=(h=p==null?void 0:p.parentElement)!=null?h:null;b&&e.executeCommand(JSON.parse(b))});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]=Td(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 Td(e,t={shifted:!1}){var r,n,i,a,s,u,d;let h="",p=(r=e.class)!=null?r:"";if(t.shifted&&Zl(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 b;typeof e.shift=="string"?b=Uc(e.shift):e.shift.label?b=e.shift.label:b=(u=Uc(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?u:"",h+=`<span class="MLK__shift">${b}</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 zs={"[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="[,]"),!zs[e])return{latex:e};e={label:e}}let r;return"label"in e&&e.label&&zs[e.label]&&(r=_(S(S({},zs[e.label]),e),{label:zs[e.label].label})),"key"in e&&e.key&&zs[e.key]&&(r=_(S(S({},zs[e.key]),e),{key:zs[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=Qo.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=Vl(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",Pd(s),{capture:!0,signal:u}),i.addEventListener("pointerleave",Pd(s),{capture:!0,signal:u}),i.addEventListener("pointercancel",Pd(s),{signal:u}),i.addEventListener("pointerup",Pd(s),{signal:u}),Zl(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 Pd(e){return t=>{const r=Vl(t.target);if(!(r!=null&&r.id))return;const n=Qo.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"),Zl(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"),Zl(i)&&(n.shiftPressCount--,r.classList.toggle("is-active",n.isShifted));return}if(t.type==="pointerup"){qc&&clearTimeout(qc),Zl(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"}]):lf(i.shift):lf(i),n.shiftPressCount===1&&!t.shiftKey&&(n.shiftPressCount=0)),e.abort(),t.preventDefault();return}}}}function lf(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=Qo.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 Vl(e){if(!e)return;let t=e;for(;t&&!Pm(t);)t=t.parentElement;return t!=null?t:void 0}function Zl(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class)}var Qo=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"&&yt()&&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]=Td(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(sf(t)){if(!Ic(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=Wl(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:Id,action:t},r)}));return}if(n)n.postMessage(S({type:Id,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=Wl(t);return A(t)?(r=t[0],r==="performWithFeedback"&&(t=t.slice(1),i=Wl(t)),n=t.slice(1)):r=t,r=r.replace(/-\w/g,a=>a[1].toUpperCase()),i==="virtual-keyboard"?qa[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=Cd(),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(ze()&&!("mathVirtualKeyboard"in window))if(window===window.top){const e=Qo.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>e})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>bm.singleton,configurable:!0});function Rd(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=Qo.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}i="manual"}t.mathVirtualKeyboardPolicy=i;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?Ee.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=X(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 Ks(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 Od(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:ut,backgroundColorMap:lt,letterShapeStyle:Ee.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:id,inlineShortcuts:Go,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:A0,value:""}}function ih(e){return e.defaultMode==="inline-math"?"math":e.defaultMode}function es(e,t){!e||!t||(A(e)?e.forEach(r=>es(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),es(e.body,t),es(e.above,t),es(e.below,t),es(e.subscript,t),es(e.superscript,t)))}function cf(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=vl),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 bd(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)}Mt(["math","displaymath"],ya),Mt("center",ya),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 Wr("lines",e.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),Bt("array","{columns:colspec}",(e,t,r,n)=>new Wr(e,uf(t),r,{columns:n[0],mathstyleName:"textstyle"})),Bt(["equation","equation*","subequations"],"",(e,t,r)=>new Wr(e,uf(t),r,{columns:[{align:"c"}]})),Bt(["multline","multline*"],"",ya),Bt(["align","align*","aligned","eqnarray"],"",ya),Bt("split","",ya),Bt(["gather","gathered"],"",ya),Bt(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",ya),Bt(["smallmatrix","smallmatrix*"],"[columns:colspec]",ya),Bt(["cases","dcases","rcases"],"",ya);function Nm(e){for(const t of e)for(const r of t)if(r.length>0)return!1;return!0}function uf(e,t=1){return Nm(e)?Array(t).fill([[new Ce({type:"first"}),new La]]):e.map(r=>r.length===0?[[new Ce({type:"first"})]]:r.map(n=>n.length===0?[new Ce({type:"first"})]:(n[0].type!=="first"&&n.unshift(new Ce({type:"first"})),n)))}function ya(e,t=[[[]]],r=[],n=[]){switch(t=uf(t,["split","align","align*","aligned","eqnarray"].includes(e)?2:1),e){case"math":return new Wr(e,t,r,{mathstyleName:"textstyle"});case"displaymath":return new Wr(e,t,r,{mathstyleName:"textstyle"});case"center":return new Wr(e,t,r,{columns:[{align:"c"}]});case"multline":case"multline*":return new Wr(e,t,r,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new Wr(e,t,r,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new Wr(e,t,r,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new Wr(e,t,r,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Hs(n[0])});case"bmatrix":case"bmatrix*":return new Wr(e,t,r,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Hs(n[0])});case"Bmatrix":case"Bmatrix*":return new Wr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Hs(n[0])});case"vmatrix":case"vmatrix*":return new Wr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Hs(n[0])});case"Vmatrix":case"Vmatrix*":return new Wr(e,t,r,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Hs(n[0])});case"matrix":case"matrix*":return new Wr(e,t,r,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Hs(n==null?void 0:n[0])});case"smallmatrix":case"smallmatrix*":return new Wr(e,t,r,{mathstyleName:"scriptstyle",columns:Hs(n==null?void 0:n[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new Wr(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 Wr(e,t,r,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new Wr(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 Wr(e,t,r,{arraycolsep:0,columns:a,minColumns:2})}}return new Wr(e,t,r,{mathstyleName:"textstyle"})}function Hs(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 Wr);)r=r.parent;if(r&&r.type==="array"&&r.environmentName,!r||!(r.parent instanceof Wr)){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=zd()),i.length===0&&(i=zd());let s;return t.endsWith("column")?(s=ya("split",[[a,i]]),e.root=s,Ws(s,0,0)?Vs(e,s,0,0):Ws(s,0,1)?Vs(e,s,0,1):e.position=e.offsetOf(n)):(s=ya("lines",[[a],[i]]),e.root=s,Ws(s,0,0)?Vs(e,s,0,0):Ws(s,1,0)?Vs(e,s,1,0):e.position=e.offsetOf(n)),[void 0,[0,0]]}if(r.parent instanceof o){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=zd()),a.length===0&&(a=zd());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=ya(u,t.endsWith("column")?[[s,a]]:[[s],[a]]);return i.parent.addChildBefore(p,i),i.parent.removeChild(i),Ws(p,0,0)?Vs(e,p,0,0):t.endsWith("column")?Ws(p,0,1)?Vs(e,p,0,1):e.position=e.offsetOf(r):Ws(p,1,0)?Vs(e,p,1,0):e.position=e.offsetOf(r),[void 0,[0,0]]}}return r&&r.parent instanceof Wr?[r.parent,r.parentBranch]:[void 0,[0,0]]}function Ws(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 Vs(e,t,r,n){const i=zm(e,t,r,n);typeof i!="number"&&e.setSelection(i)}function Nd(e,t,r,n,i){const a=t.getCell(r,n);a&&e.setPositionHandlingPlaceholder(e.offsetOf(a[i==="start"?0:a.length-1]))}function Fd(e,t){const[r,[n,i]]=Fm(e,t);if(r)switch(t){case"after row":r.addRowAfter(n),Nd(e,r,n+1,0,"end");break;case"after column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnAfter(i),Nd(e,r,n,i+1,"end");break;case"before row":r.addRowBefore(n),Nd(e,r,n,0,"start");break;case"before column":if(r.maxColumns<=r.colCount){e.announce("plonk");return}r.addColumnBefore(i),Nd(e,r,n,i,"start");break}}function ah(e){return e.contentWillChange({inputType:"insertText"})?(Fd(e,"after row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Km(e){return e.contentWillChange({inputType:"insertText"})?(Fd(e,"before row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function oh(e){return e.contentWillChange({inputType:"insertText"})?(Fd(e,"after column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Hm(e){return e.contentWillChange({inputType:"insertText"})?(Fd(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 Wr);)r=r.parent;if(Array.isArray(r==null?void 0:r.parentBranch)&&(r==null?void 0:r.parent)instanceof Wr){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}Ui({addRowAfter:ah,addColumnAfter:oh,addRowBefore:Km,addColumnBefore:Hm,removeRow:Wm,removeColumn:Vm,setEnvironment:sh},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function zd(){return[new La]}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 df(e,t,r){if(e.at(t).mode!=="text")return t;const n=r==="backward"?-1:1;let i;if(z.test(e.at(t).value)){let a=t,s;do s=e.at(a).mode==="text"&&z.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 jl(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 b=e.at(e.position);if(t==="forward"&&(b.type==="subsup"?(b=b.rightSibling,b||(b=e.at(e.position+1))):b=e.at(e.position+1)),!b)return e.announce("plonk"),!1;let M=e.offsetOf(b);if(b instanceof Bs)M=df(e,M,t);else if(b instanceof Zt)if(b.isSuggestion)for(console.assert(t==="forward");b&&b instanceof Zt;)b.isSuggestion=!1,M=e.offsetOf(b),b=b.rightSibling;else if(t==="forward"){if(b=b.rightSibling,!b||!(b instanceof Zt))return e.announce("plonk"),!1;for(;b&&b instanceof Zt&&/[a-zA-Z\*]/.test(b.value);)M=e.offsetOf(b),b=b.rightSibling}else{if(b=b.leftSibling,!b||!(b instanceof Zt))return e.announce("plonk"),!1;for(;b&&b instanceof Zt&&/[a-zA-Z\*]/.test(b.value);)M=e.offsetOf(b),b=b.leftSibling}else if(t==="forward"&&b.type==="mopen"){let B=0;do b.type==="mopen"?B+=1:b.type==="mclose"&&(B-=1),b=b.rightSibling;while(!b.isLastSibling&&B!==0);M=e.offsetOf(b.leftSibling)}else if(t==="backward"&&b.type==="mclose"){let B=0;do b.type==="mopen"?B+=1:b.type==="mclose"&&(B-=1),b=b.leftSibling;while(!b.isFirstSibling&&B!==0);M=e.offsetOf(b)}else if(t==="backward")if(b.type==="first")for(;M>0&&b.type==="first";)M-=1,b=e.at(M);else{const B=b.type;b.type==="subsup"&&(M=e.offsetOf(e.at(M).leftSibling)),M-=1;let $=(i=e.at(M))==null?void 0:i.type;for(;M>=0&&$===B;)((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:B}=b;let $=(s=e.at(M))==null?void 0:s.type;const{lastOffset:se}=e;for(;M<=se&&($===B||$==="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 Xa(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=Kd(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=Xa(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=Kd(e,a,t))):a=Kd(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 Kd(e,t,r){return t=t+(r==="forward"?1:-1),t<0||t>e.lastOffset||uh(e,t)?t:Kd(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=$c(e.getHTMLElement(t[i])).right,s=Math.abs(r-a);if(s<=n)n=s;else break}return t[i-1]}function Hd(e,t,r,n,i){const a=e.mathfield.hasEditablePrompts,s=a?r.filter(h=>h.type==="prompt"&&!h.captureSelection):r,u=$c(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 b;d<(i==="up"?h:p)?b={ranges:[[d,p]],direction:"backward"}:b={ranges:[[h,d]],direction:"forward"},e.setSelection(b)}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 Wr);)u=u.parent;if(Array.isArray(u==null?void 0:u.parentBranch)&&u.parent instanceof Wr){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();Hd(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();Hd(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 Wr);)u=u.parent;if(Array.isArray(u==null?void 0:u.parentBranch)&&u.parent instanceof Wr){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();Hd(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();Hd(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 g({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 g({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,B)=>{const $=n(M);$===0?h.push(M):p.push({documentOrder:B,tabIndex:$,node:M})}),p.sort((M,B)=>M.tabIndex===B.tabIndex?M.documentOrder-B.documentOrder:M.tabIndex-B.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 b=((h=d.form)!=null?h:d.ownerDocument).querySelectorAll('input[type="radio"][name="'+d.name+'"]'),M=a(b,d.form);return!M||M===d}function u(d){if(!ze()||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 ze()?e(document.body):[]}function Mi(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"?Mi(e,[t.leftSibling,t]):Mi(e,[t,t.leftSibling])}function Ba(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 Wd(e,t,r=!0){var n,i;const a=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&Xa(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=ff(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 b=p.indexOf(document.activeElement)+a;return b<0&&(b=p.length-1),b>=p.length&&(b=0),p[b].focus(),e.mathfield.stopCoalescingUndo(),!0}return Ba(e,d),!0}function ff(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)}Ui({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=>Xa(e,"forward"),moveToPreviousChar:e=>Xa(e,"backward"),moveUp:e=>Xa(e,"upward"),moveDown:e=>Xa(e,"downward"),moveToNextWord:e=>jl(e,"forward"),moveToPreviousWord:e=>jl(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 Wd(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 B=a;for(;((t=B.rightSibling)==null?void 0:t.mode)==="text";)B=B.rightSibling;if(M&&B)return Mi(e,[M,B])}if(a.rightSibling.mode==="text"){let M=a;for(;M&&M.mode==="text";)M=M.rightSibling;return M?(Ba(e,(r=M.leftSibling)!=null?r:M),e.mathfield.switchMode("math"),!0):Ba(e,e.lastOffset)}}const u=e.at(e.anchor).parentPrompt,d=u?e.offsetOf(u)+1:Math.max(e.position+1,0),h=ff(e,d,"forward");if(h)return Ba(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 Mi(e,[(n=p.leftSibling)!=null?n:p,(i=M.leftSibling)!=null?i:M])}return Mi(e,p)}const b=a.parent;if(b){if(b.type==="leftright"||b.type==="surd")return Mi(e,b);if(a.parentBranch==="superscript"&&b.subscript)return Mi(e,b.subscript);if(a.parentBranch==="above"&&b.below)return Mi(e,b.below);if(a.parentBranch==="superscript"||a.parentBranch==="subscript")return Ba(e,b);if(a.parentBranch==="above"||a.parentBranch==="below")return Mi(e,b)}return Ba(e,e.lastOffset)},moveToPreviousGroup:e=>{var t;if(e.position===0&&e.anchor===0)return Wd(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 Mi(e,[u,d])}for(;r&&r.mode==="text";)r=r.leftSibling;return r?Ba(e,r):Ba(e,0)}const i=e.at(e.anchor).parentPrompt,a=i?e.offsetOf(i.leftSibling):Math.max(e.position-1,0),s=ff(e,a,"backward");if(s)return Ba(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 Mi(e,[u,h])}return Mi(e,u)}const d=r.parent;if(d){if(d.type==="leftright"||d.type==="surd")return Mi(e,d);if(r.parentBranch==="subscript"&&d.superscript)return Mi(e,d.superscript);if(r.parentBranch==="below"&&d.above)return Mi(e,d.above);if(r.parentBranch==="superscript"||r.parentBranch==="subscript")return Ba(e,d);if(r.parentBranch==="above"||r.parentBranch==="below")return Mi(e,d)}return Ba(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}),Ui({moveToNextPlaceholder:e=>Wd(e,"forward"),moveToPreviousPlaceholder:e=>Wd(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 Vd(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 Zs(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(Ce.serialize([s],{defaultMode:"math"})),s.mode="math"),n-=1,t-=1}hf(e),e.contentDidChange({data:Dr(a),inputType:"insertText"})}function hf(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||!Md(r))return!1;const i=zl(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)&&Zs(n,1),!0;const s={")":"(","}":"{","]":"["}[i],{parent:u}=n.at(n.position);if(s&&u instanceof o&&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 Zs(n,1),!1;if(/\D\.[^\d\s]$/.test(a)){Zs(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 Zs(n,1),!0;if(/\([a-z][,;]$/.test(a))return Zs(n,2),!0;if(/[\d+\-=><*|]$/.test(i))return hf(n),!0}else{if(t==="[Space]")return Vd(n,void 0,s=>/[a-z][:,;.]$/.test(s.value)),!0;if(/[a-zA-Z]{3,}$/.test(a)&&!/(dxd|abc|xyz|uvw)$/.test(a))return Vd(n,void 0,s=>/[a-zA-Z]/.test(s.value)),!0;if(/(^|\W)(if)$/i.test(a))return Vd(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 Vd(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>"+(ef(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=kd("mathlive-keystroke-caption-panel");t.style.visibility="hidden"}return!1}function mh(){const e=document.getElementById("mathlive-keystroke-caption-panel");return e||(ea("keystroke-caption"),ea("core"),kd("mathlive-keystroke-caption-panel"))}function rg(){document.getElementById("mathlive-keystroke-caption-panel")&&(rf("mathlive-keystroke-caption-panel"),Za("core"),Za("keystroke-caption"))}function gh(e,t){var r,n,i;const{model:a}=e,s=Wf(t);if(t.isTrusted){Zp(t);const B=Hc();e.keyboardLayout!==B.id&&(e.keyboardLayout=B.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(!Md(t))e.flushInlineShortcutBuffer();else{const B=zl(t),$=[...(n=(r=p[p.length-1])==null?void 0:r.keystrokes)!=null?n:[],B];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=Dc(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 B=!1;return a.contentWillChange({inputType:"insertLineBreak"})&&(e.host&&(B=!e.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),B||t.preventDefault&&(t.preventDefault(),t.stopPropagation()),a.contentDidChange({inputType:"insertLineBreak"})),B}if((!d||s==="[Space]")&&a.mode==="math"){if(s==="[Space]"){if(e.adoptStyle="none",e.flushInlineShortcutBuffer(),e.options.mathModeSpace)return nn.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 B=a.at(a.position+1),$=a.at(a.position-1);if((B==null?void 0:B.mode)==="text"||($==null?void 0:$.mode)==="text")return nn.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===","&&zl(t)===","&&(d="insertDecimalSeparator")}}if(!u&&!d){if(a.mathfield.smartFence){if(mf(a,zl(t),e.effectiveStyle))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}else{const{parent:B}=a.at(a.position);if(B instanceof o&&B.rightDelim==="?"&&a.at(a.position).isLastSibling&&/^[)}\]|]$/.test(s))return e.snapshot(),B.isDirty=!0,B.rightDelim=s,a.position+=1,a.selectionDidChange(),a.contentDidChange({data:zl(t),inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;if(!a.selectionIsCollapsed){const $=zl(t);if($==="("||$==="{"||$==="["){const se={"(":"(","{":"\\lbrace","[":"\\lbrack"}[$],Ze={"(":")","{":"\\rbrace","[":"\\rbrack"}[$],[ee,ke]=ei(a.selection);return e.snapshot(),a.position=ke,nn.insert(a,Ze,{format:"latex"}),a.position=ee,nn.insert(a,se,{format:"latex"}),a.setSelection(ee+1,ke+1),a.contentDidChange({data:$,inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}}}return!0}const b=a.at(Math.max(a.position,a.anchor)),{parent:M}=b;if(d==="moveAfterParent"&&(M==null?void 0:M.type)==="leftright"&&b.isLastSibling&&e.options.smartFence&&mf(a,".",e.defaultStyle)&&(d="",bn(e)),e.keyboardDelegate.cancelComposition(),d)e.executeCommand(d);else if(u){const B=e.effectiveStyle;a.setState(p[h].state);const $=p[p.length-1].keystrokes;for(const se of $)nn.insert(a,se,{silenceNotifications:!0,style:B});e.snapshot("insert-shortcut"),a.setState(p[h].state),a.deferNotifications({content:!0,selection:!0,data:u,type:"insertText"},()=>(nn.insert(a,u,{format:"latex",style:B}),hf(e.model),u.endsWith(" ")&&(e.switchMode("text"),nn.insert(a," ",{style:B,mode:"text"})),e.snapshot(),a.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0)),e.dirty=!0,a.announce("replacement")}return e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}function pf(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=Es(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(ei(n.selection)),e.snapshot("delete")),n.mode==="latex")n.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},()=>{Ed(e);for(const d of i)nn.insert(n,d);e.snapshot("insert-latex"),Vc(e)});else if(n.mode==="text"){for(const d of i)nn.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),nn.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))}nn.insert(i,t,{style:r}),e.snapshot(`insert-${i.at(i.position).type}`)}function ag(e){e.selectionIsCollapsed||(e.deleteAtoms(ei(e.selection)),e.mathfield.snapshot("delete"))}function mf(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=Il[a],u=Bl[a];if(!e.selectionIsCollapsed){e.mathfield.snapshot();const[d,h]=ei(e.selection),p=e.extractAtoms([d,h]),b=i.addChildrenAfter([new o("left...right",p,{leftDelim:a,rightDelim:u})],e.at(d));return e.setSelection(e.offsetOf(b.firstChild),e.offsetOf(b.lastChild)),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:a,inputType:"insertText"}),!0}if(a==="|"){const d=i instanceof o?i.leftDelim+i.rightDelim:"";if(d==="\\lbrace\\rbrace"||d==="\\{\\}"||d==="\\lbrace?")return e.mathfield.snapshot(),nn.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 o&&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 o)){let b=n;for(;b&&!(b.type==="mclose"&&b.value===u);)b=b.rightSibling;if(b){e.mathfield.snapshot();const M=e.extractAtoms([e.offsetOf(n),e.offsetOf(b)]);return M.pop(),i.addChildrenAfter([new o("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 b=e.at(h);if(b instanceof o&&(b.leftDelim==="?"||b.leftDelim===".")&&vh(a,b.rightDelim))break}const p=e.at(h);if(h<=d&&p instanceof o){p.leftDelim=a,e.mathfield.snapshot();let b=e.extractAtoms([e.position,h-1]);return b=b.filter(M=>M.type!=="first"),p.addChildren(b,p.parentBranch),e.position+=1,e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(i instanceof o&&(i.leftDelim==="?"||i.leftDelim===".")&&vh(a,i.rightDelim)){i.isDirty=!0,i.leftDelim=a,e.mathfield.snapshot();const b=e.extractAtoms([e.offsetOf(n.firstSibling),e.position]);for(const M of b)i.parent.addChildBefore(M,i);return e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(!(i instanceof o&&i.leftDelim==="|")){if(e.mathfield.snapshot(),nn.insert(e,`\\left${a}\\right?`,{format:"latex",style:r}),n.lastSibling.type!=="first"){const b=e.offsetOf(n.lastSibling),M=e.extractAtoms([e.position,b]);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 B=d.leftSibling,$=e.extractAtoms([e.offsetOf(d.leftSibling),e.offsetOf(n)]);$.shift();const se=new o("left...right",$,{leftDelim:s,rightDelim:a});return i.addChildrenAfter([se],B),e.position=e.offsetOf(se),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}d=d.leftSibling}if(i instanceof o&&n.isLastSibling&&gf(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 B=e.at(p);if(B instanceof o&&(B.rightDelim==="?"||B.rightDelim===".")&&gf(B.leftDelim,a))break}const b=e.at(p);if(p>=h&&b instanceof o)return e.mathfield.snapshot(),b.rightDelim=a,b.addChildren(e.extractAtoms([p,e.position]),b.parentBranch),e.contentDidChange({data:a,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(i instanceof o&&(i.rightDelim==="?"||i.rightDelim===".")&&gf(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 o&&(M.rightDelim==="?"||M.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(M),mf(e,a,r)):!1}return!1}function gf(e,t){return e?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t):Bl[e]===t:!0}function vh(e,t){return t?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e):Il[t]===e:!0}Ui({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)=>(pf(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}}),Ui({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"}),Ui({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"}),bn(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=vf(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=>cf(n,i,r,{operation:"toggle"})),e.snapshot("style-change")}),!0}Ui({applyStyle:og},{target:"mathfield",canUndo:!0,changeContent:!0});function vf(e,t){var r,n,i,a,s,u,d,h,p,b;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 B=(p=t.size)!=null?p:t.fontSize;return typeof B=="number"?M.fontSize=Math.max(1,Math.min(10,B)):typeof B=="string"&&(M.fontSize=(b={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[B.toLowerCase()])!=null?b:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[B]),M}function bf(e){let[t,r]=ei(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"||!z.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}Ui({selectGroup:e=>{const t=bf(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>Xa(e,"forward",{extend:!0}),extendSelectionBackward:e=>Xa(e,"backward",{extend:!0}),extendToNextWord:e=>jl(e,"forward",{extend:!0}),extendToPreviousWord:e=>jl(e,"backward",{extend:!0}),extendSelectionUpward:e=>Xa(e,"upward",{extend:!0}),extendSelectionDownward:e=>Xa(e,"downward",{extend:!0}),extendToNextBoundary:e=>jl(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>jl(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 js=null,Xc=0,Zd=class wa{static start(t,r,n,i){var a;wa.element=t,(a=wa.controller)==null||a.abort(),wa.controller=new AbortController;const s={signal:wa.controller.signal};"PointerEvent"in window?(t.addEventListener("pointermove",n,s),t.addEventListener("pointerup",i,s),t.addEventListener("pointercancel",i,s),yf(r)&&(wa.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=wa.controller)==null||t.abort(),wa.controller=void 0,typeof wa.pointerId=="number"&&(wa.element.releasePointerCapture(wa.pointerId),wa.pointerId=void 0)}};function yf(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,b=t.clientY,M=Date.now(),B=n.field,$=setInterval(()=>{d?B.scroll({top:0,left:B.scrollLeft-16}):h&&B.scroll({top:0,left:B.scrollLeft+16})},32);function se(){Zd.stop(),a=!1,clearInterval($),e.element.classList.remove("tracking"),t&&t.preventDefault()}function Ze(ke){if(!n.hasFocus()){se();return}const Ye=ke.clientX,$e=ke.clientY,wt=yf(ke)&&ke.pointerType==="touch"?20:5;if(Date.now()<M+500&&Math.abs(p-Ye)<wt&&Math.abs(b-$e)<wt){ke.preventDefault(),ke.stopPropagation();return}const Ot=B.getBoundingClientRect();h=Ye>Ot.right,d=Ye<Ot.left;let kt=i;yf(ke)&&(ke.isPrimary||(kt=Jc(n,ke.clientX,ke.clientY,{bias:0})));const Br=Jc(n,Ye,$e,{bias:Ye<=p?Ye===p?0:-1:1});kt>=0&&Br>=0&&(n.model.extendSelectionTo(kt,Br),bn(e)),s&&bf(n.model)}js&&Math.abs(js.x-p)<5&&Math.abs(js.y-b)<5&&Date.now()<js.time+500?(Xc+=1,js.time=M):(js={x:p,y:b,time:M},Xc=1);const ee=B.getBoundingClientRect();if(p>=ee.left&&p<=ee.right&&b>=ee.top&&b<=ee.bottom){if(e.flushInlineShortcutBuffer(),e.adoptStyle="left",i=Jc(e,p,b,{bias:0}),i>=0){if(e.element.classList.add("tracking"),t.shiftKey){const ke=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,i),jf(e.model)||ke?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,Zd.start(B,t,Ze,se),(t.detail===2||Xc===2)&&(s=!0,bf(e.model),u="all"))}e.hasFocus()||(u="none",e.focus({preventScroll:!0}))}else js=null;e.stopCoalescingUndo(),u!=="none"&&(e.model.selectionIsCollapsed&&(u="all"),bn(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=$s(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=$s(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 nn{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=ra(a),{model:u}=e;u.selectionIsCollapsed||u.deleteAtoms(ei(u.selection));const d=u.at(u.position);if(d.parent instanceof Wr){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 b=Number(d.parentBranch[0]),M=Number(d.parentBranch[1]);const B=d.parent.maxColumns;for(;d.parent.colCount-M<h.length&&d.parent.colCount<B;)d.parent.addColumn();d.parent.addChildrenAfter(h[0],d);for(let $=1;$<h.length;$++)M++,M>=B&&(M=0,d.parent.addRowAfter(b),b++),d.parent.setCell(b,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"}),bn(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]=Ac(r),n==="auto"&&a&&(n="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,r,{format:n})&&(e.startRecording(),e.snapshot("paste"),bn(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(ei(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 b=Ye=>(p=!0,d[Ye]);let[M,B]=wh(e,t,b,r);if(!B)return!1;const $=B.length===1&&B[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,B]=wh(e,t,b,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 o&&se.leftDelim==="("&&Ze){const Ye=se.parent,$e=se.parentBranch;Ye.removeChild(se),Ye.setChildren(B,$e)}const ee=e.at(e.position);ee.parent.addChildrenAfter(B,ee),M==="latex"&&typeof t=="string"&&(se==null?void 0:se.type)==="root"&&Ze&&!p&&(se.verbatimLatex=t),e.silenceNotifications=u;const ke=B[B.length-1];if(r.selectionMode==="placeholder"){const Ye=B.flatMap($e=>[$e,...$e.children]).find($e=>$e.type==="placeholder");if(Ye){const $e=e.offsetOf(Ye);e.setSelection($e-1,$e),e.announce("move")}else ke&&(e.position=e.offsetOf(ke))}else r.selectionMode==="before"||(r.selectionMode==="after"?ke&&(e.position=e.offsetOf(ke)):r.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(ke)));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=E(t,{context:e.mathfield.context})}else typeof t=="string"&&n.format==="ascii-math"?([a,t]=kl(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),s=E(t,{context:e.mathfield.context}),a!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&jd(s)):(n.format==="auto"||(i=n.format)!=null&&i.startsWith("latex"))&&(n.format==="auto"&&([a,t]=kl(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),n.format==="latex"&&([,t]=Ac(t)),s=E(t,{context:e.mathfield.context,args:r}),n.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&jd(s));return es(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 o&&t.leftDelim==="("&&t.rightDelim===")"?t.removeBranch("body"):null}function jd(e){if(e){for(let t=0;e[t];t++){const r=e[t];if(r instanceof o&&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)){jd(t.branch(r));const n=ug(t.branch(r));n&&t.setChildren(n,r)}if(t instanceof Wr)for(const r of t.cells)jd(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=Il[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===Il[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 nn{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"),bn(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(ei(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(es(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 "),E(e,{context:t,parseMode:"text"})}new fg;function Ja(e){return{value:e.model.getValue(),selectionIsCollapsed:e.model.selectionIsCollapsed,canUndo:e.canUndo(),canRedo:e.canRedo(),style:e.selectionStyle,mode:e.model.mode}}var cn=4,$i=20,In=2*($i+cn),Ud=(e,t)=>`
|
|
|
<line x1="${e+$i}" y1="${t+$i}"
|
|
|
x2="${e>t?e+$i:7*$i+10*cn}"
|
|
|
y2="${e<t?t+$i:7*$i+10*cn}"/>
|
|
|
<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*cn}"
|
|
|
y2="${e<t?t+$i:7*$i+10*cn}"/>
|
|
|
<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>`,Gd=(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*cn+5} ${8*$i+10*cn+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${In+cn}"
|
|
|
height="${3*In}"
|
|
|
width="${In}"
|
|
|
rx="${In/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${In+cn}"
|
|
|
y="0"
|
|
|
height="${In}"
|
|
|
width="${3*In}"
|
|
|
rx="${In/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${Gd(2*(cn+In),2*cn+3*In,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${Gd(2*(cn+In),2*cn+In,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${Gd(2*cn+3*In,2*(cn+In),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${Gd(2*cn+In,2*(cn+In),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${Ud(2*cn+In,cn)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${_h(2*cn+2*In,cn)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${Ud(2*cn+3*In,cn)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${Ud(cn,2*cn+In)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${_h(cn,2*cn+2*In)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${Ud(cn,2*cn+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>`,xf={matrix:mg,pmatrix:gg,bmatrix:vg,Bmatrix:Mh,vmatrix:bg,Vmatrix:yg},wf={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=kd("mathlive-environment-popover"),ea("environment-popover"),ea("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(gd(p)){const $=Mg(p);h=xf[$]("active");const se=xf,{[$]:Ze}=se,ee=je(se,[Ue($)]);d=Object.values(ee).map(ke=>ke("inactive"))}else if(U0(p)){const $=Cg(p);h=wf[$]("active");const se=wf,{[$]:Ze}=se,ee=je(se,[Ue($)]);d=Object.values(ee).map(ke=>ke("inactive"))}else vd(p)&&(h=xf.matrix("active"),d=Object.values(wf).map($=>$("inactive")));const b=document.createElement("div");b.className="MLEP__environment-delimiter-controls",b.style.display="flex",b.style.flexDirection="column",b.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${h}
|
|
|
${d.join("")}
|
|
|
</div>`,h&&s.appendChild(b),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 B=(r=e.field)==null?void 0:r.getBoundingClientRect();B&&(a.style.top=`${window.scrollY+(B.top-a.clientHeight-15)}px`,a.style.left=`${B.left+20}px`,a.classList.add("is-visible"))}function Sf(){const e=document.getElementById("mathlive-environment-popover");e==null||e.classList.remove("is-visible")}function _g(){document.getElementById("mathlive-environment-popover")&&(rf("mathlive-environment-popover"),Za("environment-popover"),Za("core"))}function qd(e){if(!e.hasFocus())return;let t=!1;if(e.model.mode==="math"){const r=e.model.parentEnvironment;if(r!=null&&r.array&&j0(r.environmentName)){const n=e.options.environmentPopoverPolicy;t=n==="auto"||n==="on"}}t?Sg(e):Sf()}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 _f(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=_f(t.location.y,d,t.verticalPos,a);h+d>window.innerHeight-8&&(t.alternateLocation?(h=_f(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 b=Math.min(p,(i=t.width)!=null?i:s.width),M=_f(t.location.x,b,t.horizontalPos,a);M+b>window.innerWidth-8&&(t.alternateLocation?(M=Eg(t.alternateLocation.x,b,t.verticalPos,a),M+b>window.innerWidth-8&&(M=void 0)):M=void 0),Number.isFinite(M)||(M=Math.max(8,window.innerWidth-8-b),8+b>window.innerWidth-8&&(e.style.right="8px")),b=Math.min(M+b,window.innerWidth-8)-M,a==="rtl"?e.style.right=`${Math.ceil(window.innerWidth-M-b).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`),b!==s.width&&(e.style.width=`${Math.ceil(b).toString()}px`)}function Dg(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function Ul(e){return"submenu"in e}function Ya(e){return"type"in e&&e.type==="command"||"onMenuSelect"in e||"id"in e}function Mf(e){return"type"in e&&e.type==="divider"}function Cf(e){return"type"in e&&e.type==="heading"}var kh={};function Ef(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,Ul(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=Ya(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(Mf(i)){this.enabled=!1,this.checked=!1;return}Cf(i)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Ya(i)&&(this.checked=Ya(i)&&((t=Gl(i.checked,e))!=null?t:!1)),(Ya(i)||Ul(i))&&(this.enabled=(r=Gl(i.enabled,e))!=null?r:!0,this.visible=(n=Gl(i.visible,e))!=null?n:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(e),this.submenu.visible||(this.visible=!1))),(Ya(i)||Cf(i)||Ul(i))&&(this.label=Gl(i.label,e),this.tooltip=Gl(i.tooltip,e),this.ariaLabel=Gl(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(Ef("checkmark"))):this.checked==="mixed"?(e.setAttribute("aria-checked","mixed"),e.append(Ef("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),Ya(this._declaration)&&this._declaration.keyboardShortcut){const r=document.createElement("kbd");r.innerHTML=ef(this._declaration.keyboardShortcut),e.append(r)}this.type==="submenu"&&e.append(Ef("trailing-chevron"))}get element(){if(this._element)return this._element;if(Mf(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,(Ya(this._declaration)||Cf(this._declaration)||Ul(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(!Ya(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 Gl(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 rc{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 rc._collator||(rc._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),rc._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=>rc.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=Ns(t)),t.stopImmediatePropagation()}handleKeydownEvent(t){var r,n,i;if(t.key==="Tab"||t.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Ns(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(Ns(t));break;case"ArrowRight":if((u==null?void 0:u.type)==="submenu")u.select(Ns(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(Md(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 Ga.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),Ga.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),Ga.state==="open"&&Ga.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,Ga.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 Mf(e)?!1:typeof e.label=="function"||typeof e.ariaLabel=="function"||typeof e.tooltip=="function"||(Ya(e)||Ul(e))&&(typeof e.enabled=="function"||typeof e.visible=="function")||Ya(e)&&typeof e.checked=="function"?!0:Ul(e)?e.submenu.some(Ih):!1}var Xd=class{};Xd.DELAY=300,Xd.MAX_DISTANCE=10;function Bg(e){return new Promise((t,r)=>{const n=_d(e);n||t(!1);let i=n;const a=setTimeout(()=>{s.abort(),t(Dg(i,n)<Xd.MAX_DISTANCE)},Xd.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=_d(h);p&&(i=p)}},{passive:!0,signal:u})})}function $h(e,t,r){return ns(this,null,function*(){if(e.type==="contextmenu"){const n=e;if(r.show({target:t,location:_d(n),modifiers:Ns(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:Ns(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=_d(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 Ll(_(S({},e),{body:ue(e.args[0]),accentChar:Th[e.command.slice(1)]}))}),W(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:e=>{const t=at(ue(e.args[0]));return new Ll(_(S({},e),{body:ue(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 Ll(_(S({},e),{body:ue(e.args[0]),svgAccent:"overarc"}))}),W(["underarc","underparen"],"{body:auto}",{createAtom:e=>new Qr(_(S({},e),{body:ue(e.args[0]),svgBelow:"underarc"}))}),W("utilde","{body:auto}",{createAtom:e=>{const t=ue(e.args[0]),r=at(t),n="widetilde"+(r.length>5?"4":["1","1","2","2","3","3"][r.length]);return new Qr(_(S({},e),{body:t,svgBelow:n,boxType:go(t)}))}}),W("^","{:string}",{createAtom:e=>{var t;return new Ce(_(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 Ce(_(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 Ce(_(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 Ce(_(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 Ce(_(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 Ce(_(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 Ce(_(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 Ce(_(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 rt(e.command,ue(n[2]),a,i)}}),W("cancel","{body:auto}",{createAtom:e=>{var t;return new rt(e.command,ue(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 rt(e.command,ue(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 rt(e.command,ue(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 Qr(_(S({},e),{body:ue((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 Qr(_(S({},e),{body:ue(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 Qr(_(S({},e),{body:ue(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}))}),W(["underbrace"],"{:auto}",{createAtom:e=>new Qr(_(S({},e),{body:ue(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 Qr(_(S({},e),{svgBody:e.command.slice(1),above:((r=ue((t=e.args)==null?void 0:t[1]))==null?void 0:r.length)===0?void 0:ue((n=e.args)==null?void 0:n[1]),below:(a=ue((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 Ii(e.command.slice(1),_(S({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),W(["liminf","limsup"],"",{ifMode:"math",createAtom:e=>new Ii({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],_(S({},e),{limits:"over-under",variant:"main"}))}),W(["lim","mod"],"",{ifMode:"math",createAtom:e=>new Ii(e.command.slice(1),_(S({},e),{limits:"over-under",variant:"main"}))}),W(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:e=>new Ii(e.command.slice(1),_(S({},e),{limits:"over-under",isFunction:!0,variant:"main"}))}),W(["ang"],"{:math}",{ifMode:"math",createAtom:e=>new Ce(_(S({},e),{body:ue(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 Ge("\xB0",{style:_(S({},e.style),{variant:"normal",variantStyle:"up"})});return new Ge([r,i],{type:"inner",isSelected:e.isSelected,caret:n})}}),W("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:e=>new _i(_(S({},e),{body:ue(e.args[1]),index:e.args[0]?ue(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 er(n[0]?ue(n[0]):[new La],n[1]?ue(n[1]):[new La],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}`:sn(e.command,r,n)}}),W(["brace","brack"],"",{infix:!0,createAtom:e=>new er(ue(e.args[0]),ue(e.args[1]),_(S({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(e,t)=>Dr([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 er(ue(n[0]),ue(n[1]),_(S({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:r}))},serialize:(e,t)=>Dr([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 er(ue(n[0]),ue(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 er(ue(e.args[0]),ue(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 Lr({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 Ii("\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 Lr(r,_(S({},e),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[r]}))}}),W(["Re","Im"],"",{ifMode:"math",createAtom:e=>new Ii({"\\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 Ve(_(S({},e),{delim:(t=e.args[0])!=null?t:"|",size:1}))}}),W("the","{:value}",{createAtom:e=>new Ce(_(S({},e),{captureSelection:!0,verbatimLatex:null})),render:(e,t)=>{var r;const n=new Ar({parent:t},e.style);let i="";e.isSelected&&(i+=" ML__selected");const a=n.evaluate(e.args[0]);return new Ge(((r=Kn(a))!=null?r:"").split("").map(s=>new Ge(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=Kn(e.args[0]))!=null?t:"\\relax"}`}}),W("mathtip","{:auto}{:math}",{createAtom:e=>new ji(_(S({},e),{body:ue(e.args[0]),tooltip:ue(e.args[1]),content:"math"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${Ce.serialize([e.tooltip],_(S({},t),{defaultMode:"math"}))}}`}),W("texttip","{:auto}{:text}",{createAtom:e=>new ji(_(S({},e),{body:ue(e.args[0]),tooltip:ue(e.args[1]),content:"text"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${Ce.serialize([e.tooltip],_(S({},t),{defaultMode:"text"}))}}`}),W("error","{:math}",{createAtom:e=>new Ce(_(S({},e),{body:ue(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 Ce(_(S({},e),{body:ue(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=Kn(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=Kn(t[0]))!=null?n:void 0,color:r.toColor((i=t[0])!=null?i:{string:"red"})}}}),W("boxed","{content:math}",{createAtom:e=>new ja(_(S({},e),{body:ue(e.args[0]),framecolor:{string:"black"}}))}),W("colorbox","{:value}{:text*}",{applyStyle:(e,t,r)=>{var n,i;return{verbatimBackgroundColor:(n=Kn(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 ja(_(S({},e),{body:ue(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"})):sn(e.command,(r=Kn(e.framecolor))!=null?r:"",(n=Kn(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=ue(e.args[1]);return r?new ja(_(S({},e),{body:n,padding:r.padding,border:r.border,backgroundcolor:(t=r.backgroundcolor)!=null?t:void 0})):new ja(_(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=Kn(e.padding))!=null?r:""),e.border&&a.push(`border: ${e.border}`),e.backgroundcolor&&a.push((n=Kn(e.backgroundcolor))!=null?n:""),i+=`[${a.join(",")}]`}return sn(i,e.bodyToLatex(t))}}),W(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:e=>new Ce(_(S({},e),{body:ue(e.args[0])})),render:(e,t)=>{const r=new Ar({parent:t,mathstyle:e.command.slice(1)},e.style),n=Ce.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):`{${Dr([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 Ce(_(S({},e),{body:ue(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 Ce(_(S({},e),{type:"mord",body:ue(e.args[0]),mode:"math"})),serialize:(e,t)=>sn("\\mbox",e.bodyToLatex(_(S({},t),{defaultMode:"text"})))}),W("text","{:text}",{ifMode:"math",applyMode:"text"}),W(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:e=>new Ce(_(S({},e),{body:ue(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 Ce(_(S({},e),{body:ue(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 Ce(_(S({},e),{body:ue(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 Ce(_(S({},e),{body:ue(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 Ce(_(S({},e),{body:ue(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 Ce(_(S({},e),{body:ue(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 Qe(_(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 pi(_(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 pi(_(S({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),W("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:e=>new Ce(e),render:(e,t)=>{let r=0;const n=t.mathstyle.id;(n===Ds||n===Ha)&&(r=1),(n===Uo||n===wi)&&(r=2),(n===bo||n===si)&&(r=3);const i=ue(e.args[r]);return Ce.createBox(t,i)},serialize:(e,t)=>`\\mathchoice{${Ce.serialize(e.args[0],t)}}{${Ce.serialize(e.args[1],t)}}{${Ce.serialize(e.args[2],t)}}{${Ce.serialize(e.args[3],t)}}`}),W("mathop","{:auto}",{createAtom:e=>new Ce(_(S({},e),{type:"mop",body:ue(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(e,t)=>{var r;let n=Ce.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 Ge(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const r=[sn(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)),Dr(r)}}),W(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:e=>new Ce(_(S({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:ue(e.args[0])}))}),W(["operatorname","operatorname*"],"{operator:math}",{createAtom:e=>{const t=ue(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 Ce(_(S({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}))},render:(e,t)=>{var r;let n=Ce.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 Ge(e.bind(t,n),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const r=[sn(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)),Dr(r)}}),W(["char","unicode"],"{charcode:value}",{createAtom:e=>new Ce(_(S({},e),{type:e.mode==="text"?"text":"mord"})),serialize:e=>{var t;return`${e.command}${Kn((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 Ce(e),render:(e,t)=>{var r,n,i;const a=new Ar({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 Ge(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]?`[${Kn(e.args[0])}]`:""}{${Kn(e.args[1])}}{${Kn(e.args[2])}}`}),W(["overline","underline"],"{:auto}",{createAtom:e=>new Ce(_(S({},e),{body:ue(e.args[0])})),render:(e,t)=>{const r=e.command.substring(1),n=new Ar({parent:t,mathstyle:"cramp"},e.style),i=Ce.createBox(n,e.body);if(!i)return null;const a=n.metrics.defaultRuleThickness/n.scalingFactor,s=new Ge(null,{classes:r+"-line"});s.height=a,s.maxFontSize=a*1.125*n.scalingFactor;let u;return r==="overline"?u=new gn({shift:0,children:[{box:i},3*a,{box:s},a]}):u=new gn({top:i.height,children:[a,{box:s},3*a,{box:i}]}),e.caret&&(u.caret=e.caret),new Ge(u,{classes:r,type:"ignore"})}}),W("overset","{:auto}{base:auto}",{createAtom:e=>{const t=ue(e.args[1]);return new Qr(_(S({},e),{above:ue(e.args[0]),body:t,skipBoundary:!1,boxType:go(t)}))},serialize:(e,t)=>sn(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),W("underset","{:auto}{base:auto}",{createAtom:e=>{const t=ue(e.args[1]);return new Qr(_(S({},e),{below:ue(e.args[0]),body:t,skipBoundary:!1,boxType:go(t)}))},serialize:(e,t)=>sn(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),W("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:e=>{const t=ue(e.args[2]);return new Qr(_(S({},e),{above:ue(e.args[0]),below:ue(e.args[1]),body:t,skipBoundary:!1,boxType:go(t)}))},serialize:(e,t)=>sn(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),W(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:e=>new Qr(_(S({},e),{body:ue(e.args[2]),above:ue(e.args[1]),below:ue(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"})),serialize:(e,t)=>sn(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),W("smash","[:string]{:auto}",{createAtom:e=>{var t,r,n,i;return new Si(_(S({},e),{body:ue(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 Si(_(S({},e),{body:ue(e.args[0]),isInvisible:!0,smashWidth:!0}))}),W(["hphantom"],"{:auto}",{createAtom:e=>new Si(_(S({},e),{body:ue(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),W(["phantom"],"{:auto}",{createAtom:e=>new Si(_(S({},e),{body:ue(e.args[0]),isInvisible:!0}))}),W("not","{:math}",{createAtom:e=>{const t=ue(e.args[0]);return t.length===0?new Ce(_(S({},e),{type:"mrel",value:"\uE020"})):new Ce(_(S({},e),{body:[new Yr(_(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{${Ce.serialize(r.group,t)}}`:`\\not${Ce.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":go(ue(e.args[0])),i=Ce.createBox(t,e.body,{type:n});return e.caret&&(i.caret=e.caret),e.bind(t,i)}}),W(["ne","neq"],"",{createAtom:e=>new Ce(_(S({},e),{type:"mrel",body:[new Yr(_(S({},e),{body:"\uE020",align:"right",boxType:"rel"})),new Ce(_(S({},e),{value:"="}))],captureSelection:!0})),serialize:e=>e.command}),W("rlap","{:auto}",{createAtom:e=>new Yr(_(S({},e),{body:ue(e.args[0]),align:"right"}))}),W("llap","{:auto}",{createAtom:e=>new Yr(_(S({},e),{body:ue(e.args[0]),align:"left"}))}),W("mathrlap","{:math}",{createAtom:e=>new Yr(_(S({},e),{body:ue(e.args[0]),align:"left"}))}),W("mathllap","{:math}",{createAtom:e=>new Yr(_(S({},e),{body:ue(e.args[0]),align:"left"}))}),W("raisebox","{:value}{:text}",{createAtom:e=>{var t;return new ja(_(S({},e),{body:ue(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return sn("\\raisebox",(r=Kn(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}}),W("raise","{:value}{:auto}",{createAtom:e=>{var t;return new ja(_(S({},e),{body:ue(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r;return sn("\\raise",(r=Kn(e.offset))!=null?r:"0pt",e.bodyToLatex(t))}}),W("lower","{:value}{:auto}",{createAtom:e=>{var t;return new ja(_(S({},e),{body:ue(e.args[1]),padding:{dimension:0},offset:(t=ma(e.args[0],-1))!=null?t:{dimension:0}}))},serialize:(e,t)=>{var r,n;return sn("\\lower",(n=Kn(ma((r=e.offset)!=null?r:{dimension:0},-1)))!=null?n:"0pt",e.bodyToLatex(t))}}),pe("0123456789/@.?!"),Ne(65,90),Ne(97,122),pe([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),pe([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),pe([["\\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]]),pe([["\\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"),pe([["\\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"]]),pe([["\\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"]]),pe([["\\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"),pe([["+",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"),pe([["\\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"),pe([["\\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]]),pe([["=",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"),pe([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),pe([["\\wp",8472],["\\aleph",8501]]),pe([["\\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"),pe([["\\ ",160],["~",160]],"space"),W(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:e=>new pi(e)}),W("space","",{createAtom:e=>new pi(e)}),pe([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),pe([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),pe([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var Oh="<mo>⁡</mo>",Jd="<mo>⁢</mo>";function Yd(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,b,M,B;let $=!1;t=t!=null?t:e.atoms.length;let se="",Ze="",ee=e.atoms[e.index];const ke=(i=(n=ee.style)==null?void 0:n.variant)!=null?i:"",Ye=(s=(a=ee.style)==null?void 0:a.variantStyle)!=null?s:"";let $e="";if(ke||Ye){const Ot=Oe(ee.value,(u=ee.style)==null?void 0:u.variant,(d=ee.style)==null?void 0:d.variantStyle);if(Ot!==ee.value)return e.index+=1,se=`<mi${en(ee.id,r)}>${Ot}</mi>`,ko(se,e,r)||(e.mathML+=se,e.lastType="mi"),!0;$e=(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"}[Ye+ke])!=null?h:"",$e=` mathvariant="${$e}"`}const wt={"\\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>",ko(se,e,r)||(e.mathML+=se,e.lastType="mo"),!0;if(wt[ee.command]){e.index+=1;let Ot=`<mi${en(ee.id,r)}${$e}>${wt[ee.command]}</mi>`;return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(Ot=Jd+Ot),ko(Ot,e,r)||(e.mathML+=Ot,e.lastType="mi"),!0}if(ee.command==="\\operatorname")Ze=ql(ee.body),e.index+=1;else if(ke||Ye)for(;e.index<t&&(ee.type==="mord"||ee.type==="macro")&&!ee.isDigit()&&ke===((b=(p=ee.style)==null?void 0:p.variant)!=null?b:"")&&Ye===((B=(M=ee.style)==null?void 0:M.variantStyle)!=null?B:"");)Ze+=ql([ee]),e.index+=1,ee=e.atoms[e.index];else(ee.type==="mord"||ee.type==="macro")&&!ee.isDigit()&&(Ze+=ql([ee]),e.index+=1);if(Ze.length>0){$=!0,se=`<mi${$e}>${Ze}</mi>`;const Ot=e.lastType;se.endsWith(">f</mi>")||se.endsWith(">g</mi>")?(se+=Oh,e.lastType="applyfunction"):e.lastType=/^<mo>(.*)<\/mo>$/.test(se)?"mo":"mi",ko(se,e,r)||((Ot==="mi"||Ot==="mn"||Ot==="mtext"||Ot==="fence")&&(se=Jd+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 ko(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=Kr(i.superscript,r);t.lastType="";const u=Kr(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),ko(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+=Us(e.atoms[d],r),i+=Kr(e.atoms,r,d+1,h),i+=Us(e.atoms[h],r),i+="</mrow>",e.index=h+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=Jd),ko(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 ko(d,e,r)||(e.mathML+=d,e.lastType="mo"),!0}if(e.index<t&&(s.type==="mbin"||s.type==="mrel"))i+=kf(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=Us(s,r);return s.superscript&&s.subscript?(i+="<munderover>"+d,i+=Kr(s.subscript,r),i+=Kr(s.superscript,r),i+="</munderover>"):s.superscript?(i+="<mover>"+d,i+=Kr(s.superscript,r),i+="</mover>"):s.subscript&&(i+="<munder>"+d,i+=Kr(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)+">"+ql(d.value)+"</mi>":Us(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=Jd+i),e.index+=1}return i.length>0&&(n=!0,ko(i,e,r)||(e.mathML+=i,e.lastType=a)),n}function Kr(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 Ce)i.mathML=kf(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=kf(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,ko(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 Us(e,t){let r="";const n=ql(e.value);return n&&(r="<mo"+en(e.id,t)+">"+n+"</mo>"),r}function ql(e){if(!e)return"";if(typeof e=="string")return Yd(e);if(!Array.isArray(e)&&typeof e.body=="string")return Yd(e.body);let t="";for(const r of e)typeof r.value=="string"&&(t+=r.value);return Yd(t)}function kf(e,t){var r,n,i,a,s,u,d,h,p,b,M,B,$,se,Ze,ee,ke,Ye,$e,wt,Ot,kt;if(e.mode==="text")return`<mi${en(e.id,t)}>${e.value}</mi>`;const Br={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"},Gr={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let it="",aa="",eo,xa,Wn,oa,Ti,tn;const{command:Sn}=e;if(e.command==="\\error")return`<merror${en(e.id,t)}>${Kr(e.body,t)}</merror>`;const Vn={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},to={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(e.type){case"first":break;case"group":case"root":it=Kr(e.body,t);break;case"array":if((e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(it+="<mrow>",e.leftDelim&&e.leftDelim!=="."&&(it+="<mo>"+(Vn[e.leftDelim]||e.leftDelim)+"</mo>")),it+="<mtable",e.colFormat){for(it+=' columnalign="',Wn=0;Wn<e.colFormat.length;Wn++)e.colFormat[Wn].align&&(it+={l:"left",c:"center",r:"right"}[e.colFormat[Wn].align]+" ");it+='"'}for(it+=">",xa=0;xa<e.array.length;xa++){for(it+="<mtr>",eo=0;eo<e.array[xa].length;eo++)it+="<mtd>"+Kr(e.array[xa][eo],t)+"</mtd>";it+="</mtr>"}it+="</mtable>",(e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(e.rightDelim&&e.rightDelim!=="."&&(it+="<mo>"+(Vn[e.leftDelim]||e.rightDelim)+"</mo>"),it+="</mrow>");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(it+="<mrow>"),e.leftDelim&&e.leftDelim!=="."&&(it+="<mo"+en(e.id,t)+">"+(Vn[e.leftDelim]||e.leftDelim)+"</mo>"),e.hasBarLine?(it+="<mfrac>",it+=Kr(e.above,t)||"<mi> </mi>",it+=Kr(e.below,t)||"<mi> </mi>",it+="</mfrac>"):(it+="<mtable"+en(e.id,t)+">",it+="<mtr>"+Kr(e.above,t)+"</mtr>",it+="<mtr>"+Kr(e.below,t)+"</mtr>",it+="</mtable>"),e.rightDelim&&e.rightDelim!=="."&&(it+="<mo"+en(e.id,t)+">"+(Vn[e.rightDelim]||e.rightDelim)+"</mo>"),(e.leftDelim||e.rightDelim)&&(it+="</mrow>");break;case"surd":e.hasEmptyBranch("above")?(it+="<msqrt"+en(e.id,t)+">",it+=Kr(e.body,t),it+="</msqrt>"):(it+="<mroot"+en(e.id,t)+">",it+=Kr(e.body,t),it+=Kr(e.above,t),it+="</mroot>");break;case"leftright":const ro=e,no=ro.leftDelim;it="<mrow>",no&&no!=="."&&(it+=`<mo${en(e.id,t)}>${(r=Vn[no])!=null?r:no}</mo>`),e.body&&(it+=Kr(e.body,t));const io=ro.matchingRightDelim();io&&io!=="."&&(it+=`<mo${en(e.id,t)}>${(n=Vn[io])!=null?n:io}</mo>`),it+="</mrow>";break;case"sizeddelim":case"delim":it+=`<mo${en(e.id,t)}>${Vn[e.value]||e.value}</mo>`;break;case"accent":it+='<mover accent="true"'+en(e.id,t)+">",it+=Kr(e.body,t),it+="<mo>"+(to[Sn]||e.accent)+"</mo>",it+="</mover>";break;case"line":case"overlap":break;case"overunder":Ti=e.above,oa=e.below,(e.svgAbove||Ti)&&(e.svgBelow||oa)?tn=e.body:Ti&&Ti.length>0?(tn=e.body,(a=(i=e.body)==null?void 0:i[0])!=null&&a.below?(oa=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)&&(oa=e.body[1].below,tn=e.body[1].body)):oa&&oa.length>0&&(tn=e.body,(b=(p=e.body)==null?void 0:p[0])!=null&&b.above?(Ti=e.body[0].above,tn=e.body[0].body):((B=(M=e.body)==null?void 0:M[0])==null?void 0:B.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||oa)?(it+=`<munderover ${en(e.id,t)}>`,it+=(Ze=Br[e.svgBody])!=null?Ze:Kr(tn,t),it+=(ee=Br[e.svgBelow])!=null?ee:Kr(oa,t),it+=(ke=Br[e.svgAbove])!=null?ke:Kr(Ti,t),it+="</munderover>"):e.svgAbove||Ti?(it+=`<mover ${en(e.id,t)}>`+((Ye=Br[e.svgBody])!=null?Ye:Kr(tn,t)),it+=($e=Br[e.svgAbove])!=null?$e:Kr(Ti,t),it+="</mover>"):(e.svgBelow||oa)&&(it+=`<munder ${en(e.id,t)}>`+((wt=Br[e.svgBody])!=null?wt:Kr(tn,t)),it+=(Ot=Br[e.svgBelow])!=null?Ot:Kr(oa,t),it+="</munder>");break;case"placeholder":it+="?";break;case"mord":{it=typeof e.value=="string"?e.value:Sn,Sn==="\\char"?it="&#x"+("000000"+e.args[0].number.toString(16)).slice(-4)+";":it.length>0&&it.startsWith("\\")&&(typeof e.value=="string"&&e.value.charCodeAt(0)>255?it="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof e.value=="string"?it=e.value.charAt(0):(console.error("Did not expect this"),it=""));const Ia=/\d/.test(it)?"mn":"mi";it=`<${Ia}${en(e.id,t)}>${Yd(it)}</${Ia}>`;break}case"mbin":case"mrel":case"minner":it=Us(e,t);break;case"mpunct":it='<mo separator="true"'+en(e.id,t)+">"+Sn+"</mo>";break;case"mop":case"operator":case"extensible-symbol":e.body!=="\u200B"&&(it="<mo"+en(e.id,t)+">",it+=Sn==="\\operatorname"?e.body:Sn||e.body,it+="</mo>");break;case"box":it='<menclose notation="box"',e.backgroundcolor&&(it+=' mathbackground="'+e.backgroundcolor+'"'),it+=en(e.id,t)+">"+Kr(e.body,t)+"</menclose>";break;case"spacing":it+='<mspace width="'+((kt=Gr[Sn])!=null?kt:0)+'em"/>';break;case"enclose":it='<menclose notation="';for(const Ia in e.notation)Object.prototype.hasOwnProperty.call(e.notation,Ia)&&e.notation[Ia]&&(it+=aa+Ia,aa=" ");it+=en(e.id,t)+'">'+Kr(e.body,t)+"</menclose>";break;case"prompt":it='<menclose notation="roundexbox""">'+Kr(e.body,t)+"</menclose>";break;case"space":it+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":it+=Us(e,t);break;case"mclose":it+=Us(e,t);break;case"macro":{const Ia=e.command+ql(e.macroArgs);Ia&&(it+=`<mo ${en(e.id,t)}>${Ia}</mo>`)}break;case"latexgroup":it+=Kr(e.body,t);break;case"latex":it+="<mtext"+en(e.id,t)+">"+e.value+"</mtext>";break;case"tooltip":it+=Kr(e.body,t);break;case"text":it+=`<mtext ${en(e.id,t)}x>${e.value}</mtext>`;break;default:if(e.command==="\\displaystyle")return`<mrow ${en(e.id,t)} displaystyle="true">${Kr(e.body,t)}</mrow>`;if(e.command==="\\textstyle")return`<mrow ${en(e.id,t)} displaystyle="false">${Kr(e.body,t)}</mrow>`;console.info("Unexpected element in conversion to MathML:",e)}return it}var Xl={"\\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"},Df={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,b=!1;for(let M=0;M<t.length;M++)t[M].type!=="first"&&(t[M].mode!=="text"&&(b=!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"?b?h+=(r=t[M].value)!=null?r:" ":(b=!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="",b="",M="",B=!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(Df).includes(ee)){h+=` begin ${Df[ee]} `;for(let $e=0;$e<Ze.length;$e++){$e>0&&(h+=","),h+=` row ${$e+1} `;for(let wt=0;wt<Ze[$e].length;wt++)wt>0&&(h+=","),h+=` column ${wt+1}: `,h+=_r("math",Ze[$e][wt])}h+=` end ${Df[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),b=_r("math",t.below),Yc(t.above)&&Yc(t.below)){const wt={"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)];wt?h=wt:h+=p+" over "+b}else h+=' the fraction <break time="150ms"/>'+p+' over <break time="150ms"/>'+b+'.<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 $e=_r("math",t.above);$e=$e.trim();const wt=$e.replace(/<mark([^/]*)\/>/g,"");wt==="3"?h+=' the cube root of <break time="200ms"/>'+M+'. <break time="200ms"/> End cube root':wt==="n"?h+=' the nth root of <break time="200ms"/>'+M+'. <break time="200ms"/> End root':h+=' the root with index: <break time="200ms"/>'+$e+', of <break time="200ms"/>'+M+'. <break time="200ms"/> End root'}break;case"leftright":{const $e=t;h+=(i=$e.leftDelim?Xl[$e.leftDelim]:void 0)!=null?i:$e.leftDelim,h+=_r("math",t.body),h+=(a=$e.rightDelim?Xl[$e.rightDelim]:void 0)!=null?a:$e.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const ke=$.replace(/^\\/g,""),Ye=vt()[ke];Ye&&(Ye!=null&&Ye.expand?h+=_r("math",t.body):h+=`${ke} `);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 $e=t.isDigit()?t.asDigit():t.value,wt=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(wt=t.value,$e=wt),e==="text")h+=$e;else{if(t.type==="mbin"&&(h+='<break time="150ms"/>'),$e){const Ot=Xl[$e]||(wt?Xl[wt.trim()]:"");if(Ot)h+=" "+Ot;else{const kt=wt?Fg(wt.trim()):"";h+=kt||u($e)}}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 $e=t.command;if($e==="\\sum")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let wt=_r("math",t.superscript);wt=wt.trim();let Ot=_r("math",t.subscript);Ot=Ot.trim(),h+=' the summation from <break time="200ms"/>'+Ot+'<break time="200ms"/> to <break time="200ms"/>'+wt+'<break time="200ms"/> of <break time="150ms"/>',B=!0}else if(t.hasEmptyBranch("subscript"))h+=" the summation of";else{let wt=_r("math",t.subscript);wt=wt.trim(),h+=' the summation from <break time="200ms"/>'+wt+'<break time="200ms"/> of <break time="150ms"/>',B=!0}else if($e==="\\prod")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let wt=_r("math",t.superscript);wt=wt.trim();let Ot=_r("math",t.subscript);Ot=Ot.trim(),h+=' the product from <break time="200ms"/>'+Ot+'<break time="200ms"/> to <break time="200ms"/>'+wt+'<break time="200ms"/> of <break time="150ms"/>',B=!0}else if(t.hasEmptyBranch("subscript"))h+=" the product of ";else{let wt=_r("math",t.subscript);wt=wt.trim(),h+=' the product from <break time="200ms"/>'+wt+'<break time="200ms"/> of <break time="150ms"/>',B=!0}else if($e==="\\int")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let wt=_r("math",t.superscript);wt=wt.trim();let Ot=_r("math",t.subscript);Ot=Ot.trim(),h+=' the integral from <break time="200ms"/>'+d(Ot)+'<break time="200ms"/> to <break time="200ms"/>'+d(wt)+' <break time="200ms"/> of ',B=!0}else h+=' the integral of <break time="200ms"/> ';else if(typeof t.value=="string"){const wt=(s=Xl[t.value])!=null?s:t.command?Xl[t.command]:void 0;h+=wt||" "+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(!B&&!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(!B&&!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 Jl(e){var t,r;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const i=Kr(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 wn(e){var t,r,n,i,a,s,u,d,h,p,b,M,B;if(!e)return"";if(A(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(wn).join("");if(e[0].mode==="text"){let Ye=0,$e="";for(;((t=e[Ye])==null?void 0:t.mode)==="text";)$e+=e[Ye].body?wn(e[Ye].body):e[Ye].value,Ye++;return`"${$e}" ${wn(e.slice(Ye))}`}let ee=0;const ke=[];for(;e[ee]&&e[ee].mode==="math";){let Ye="";for(;e[ee]&&e[ee].type==="mord"&&/\d/.test(e[ee].value);)Ye+=e[ee++].value;Ye?ke.push(Ye):ke.push(wn(e[ee++]))}return ke.push(wn(e.slice(ee))),Hg(ke)}if(e.mode==="text")return`"${e.value}"`;let $="";const{command:se}=e;let Ze;if(se==="\\placeholder")return`(${wn(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:""} ${wn(e.body)} `;break;case"first":return"";case"latexgroup":return e.body.map(kt=>kt.value).join("");case"group":case"root":$=(r=Qc[se])!=null?r:wn(e.body);break;case"genfrac":{const kt=e;(kt.leftDelim||kt.rightDelim)&&($=kt.leftDelim==="."||!kt.leftDelim?"{:":kt.leftDelim),kt.hasBarLine?($+="(",$+=wn(kt.above),$+=")/(",$+=wn(kt.below),$+=")"):($+="("+wn(kt.above)+"),",$+="("+wn(kt.below)+")"),(kt.leftDelim||kt.rightDelim)&&($+=kt.rightDelim==="."||!kt.rightDelim?"{:":kt.rightDelim)}break;case"surd":$+=e.hasEmptyBranch("above")?"sqrt("+wn(e.body)+")":"root("+wn(e.above)+")("+wn(e.body)+")";break;case"latex":$=e.value;break;case"leftright":{const kt=e,Br=kt.leftDelim;$+=Br==="."||!Br?"{:":Br,$+=wn(kt.body);const Gr=kt.matchingRightDelim();$+=Gr==="."||!Gr?":}":Gr}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"?wn(e.body):(d=e.value)!=null?d:se,$+=" ");break;case"array":const ke=e.array,Ye=e.environmentName,$e=(h={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Ye])!=null?h:["(",")"],wt=[];for(const kt of ke){const Br=[];for(const Gr of kt)Br.push($e[0]+wn(Gr)+$e[1]);wt.push(Br.join(","))}const Ot=(p={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Ye])!=null?p:["(",")"];$=Ot[0]+wt.join(",")+Ot[1];break;case"box":break;case"spacing":$=(b=Qc[se])!=null?b:" ";break;case"enclose":$="("+wn(e.body)+")";break;case"space":$=" ";break;case"subsup":$="";break;case"macro":$=(B=(M=Qc[se])!=null?M:eu[se])!=null?B:wn(e.body);break}if(!e.hasEmptyBranch("subscript")){$+="_";const ee=wn(e.subscript);$+=ee.length!==1?`(${ee})`:ee}if(!e.hasEmptyBranch("superscript")){$+="^";const ee=wn(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 Hn(e,t){var r,n;t!=null||(t={}),t.mathstyle=(r=t.mathstyle)!=null?r:"displaystyle";const i=new Ar({from:_(S({},Ec()),{renderPlaceholder:()=>new Ge(160,{maxFontSize:1}),letterShapeStyle:(n=t==null?void 0:t.letterShapeStyle)!=null?n:"tex"}),mathstyle:t.mathstyle}),s=new Ce({mode:"math",type:"root",body:E(e,{context:i,parseMode:"math",mathstyle:t.mathstyle})}).render(i);return s?(wl(ta(s,i)),Sl(s,{classes:"ML__latex"}).toMarkup()):""}function $v(e){return T(e,{context:Ec()})}function Vg(e,t={}){return Kr(E(e,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),t)}function Zg(e){const t=E(e,{parseMode:"math",mathstyle:"displaystyle"});return Jl(t)}var Qd;function jg(e){var t,r;if(!Qd){const n=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;n?Qd=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=Qd==null?void 0:Qd.box(e).latex)!=null?r:""}function Tv(e,t="math"){return wn(new Ce({type:"root",body:E(e,{parseMode:t})}))}function Pv(e){return kl(e,{format:"ascii-math"})[1]}function Af(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 Yl(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 Lf(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 Bf(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=b=>{const M=Math.abs(b);return M<=.0031308?b*12.92:(Math.sign(b)||1)*(1.055*Math.pow(M,1/2.4)-.055)};return[p(u),p(d),p(h)]}function If(e){const[t,r,n]=e;return t>=0&&t<=1&&r>=0&&r<=1&&n>=0&&n<=1}function $f(e,t){let[r,n,i]=e;return r=Yl(r*255),n=Yl(n*255),i=Yl(i*255),t!==void 0?{r,g:n,b:i,alpha:t}:{r,g:n,b:i}}function Fh(e){let[t,r,n]=Bf(e);if(If([t,r,n]))return $f([t,r,n],e.alpha);const i=Gg(e);if(i.C=0,[t,r,n]=Bf(Lf(i)),!If([t,r,n]))return $f([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]=Bf(Lf(i)),If([t,r,n])?a=u:s=u;return $f([t,r,n],e.alpha)}function qg(e){return Fh(Lf(e))}function zh(e,t){const r=Af(e),n=Af(t),i=.56,a=.57,s=.62,u=.65,d=.022,h=1.414,p=.1,b=5e-4,M=1.14,B=.027,$=1.14,se=.027;function Ze(kt){return kt>=d?kt:kt+ao(d-kt,h)}function ee(kt){return(kt<0?-1:1)*Math.pow(Math.abs(kt),2.4)}const ke=Ze(ee(n.r/255)*.2126729+ee(n.g/255)*.7151522+ee(n.b/255)*.072175),Ye=Ze(ee(r.r/255)*.2126729+ee(r.g/255)*.7151522+ee(r.b/255)*.072175);let $e,wt,Ot;return Math.abs(Ye-ke)<b?wt=0:Ye>ke?($e=ao(Ye,i)-ao(ke,a),wt=$e*M):($e=ao(Ye,u)-ao(ke,s),wt=$e*$),Math.abs(wt)<p?Ot=0:wt>0?Ot=wt-se:Ot=wt+B,Ot*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=Af(e);let r=((1<<24)+(Yl(t.r)<<16)+(Yl(t.g)<<8)+Yl(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 dn(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=Yo[t];return n?!!n.test(r[0].value):!1}function Yg(e,t){return dn(e).length>0}function Qg(e){return[Tf(e,"double-struck","mathbb","tooltip.blackboard"),Tf(e,"fraktur","mathfrak","tooltip.fraktur"),Tf(e,"calligraphic","mathcal","tooltip.caligraphic"),Pf(e,"up","mathrm","tooltip.roman-upright"),Pf(e,"bold","mathbf","tooltip.bold"),Pf(e,"italic","mathit","tooltip.italic")]}function ev(e){return[{label:()=>Hn(`\\vec{${dn(e)}}`),visible:()=>dn(e).length===1,onMenuSelect:()=>e.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\overrightarrow{${dn(e)}}`),visible:()=>dn(e).length>0,onMenuSelect:()=>e.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\overleftarrow{${dn(e)}}`),visible:()=>dn(e).length>0,onMenuSelect:()=>e.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\dot{${dn(e)}}`),visible:()=>dn(e).length===1,onMenuSelect:()=>e.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\ddot{${dn(e)}}`),visible:()=>dn(e).length===1,onMenuSelect:()=>e.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\bar{${dn(e)}}`),visible:()=>dn(e).length===1,onMenuSelect:()=>e.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\overline{${dn(e)}}`),visible:()=>dn(e).length>0,onMenuSelect:()=>e.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\overgroup{${dn(e)}}`),visible:()=>dn(e).length>0,onMenuSelect:()=>e.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\overbrace{${dn(e)}}`),visible:()=>dn(e).length>0,onMenuSelect:()=>e.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\underline{${dn(e)}}`),visible:()=>dn(e).length>0,onMenuSelect:()=>e.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\undergroup{${dn(e)}}`),visible:()=>dn(e).length>0,onMenuSelect:()=>e.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\underbrace{${dn(e)}}`),visible:()=>dn(e).length>0,onMenuSelect:()=>e.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function tv(e){return[{label:()=>Hn(`\\boxed{${e.getValue(e.model.selection)}}}`),onMenuSelect:()=>e.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\bbox[5px, border: 2px solid red]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Hn(`\\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(Q))t.push({class:(Xg(Kh(Q[r]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Q[r]} "></span>`,ariaLabel:()=>{var n;return(n=_e(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(re))t.push({class:(Kh(re[r])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${re[r]} "></span>`,ariaLabel:()=>{var n;return(n=_e(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:()=>_e("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:()=>_e("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>e.executeCommand("addRowBefore"),visible:()=>Gs(e)},{label:()=>_e("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>e.executeCommand("addRowAfter"),visible:()=>Gs(e)},{label:()=>_e("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>e.executeCommand("addColumnBefore"),visible:()=>Gs(e),enabled:()=>{const t=e.model.parentEnvironment;if(!t)return!1;const[r,n]=lv(e);return r<t.maxColumns}},{label:()=>_e("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>e.executeCommand("addColumnAfter"),visible:()=>Gs(e)},{type:"divider"},{label:()=>_e("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>e.executeCommand("removeRow"),visible:()=>Gs(e)},{label:()=>_e("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>e.executeCommand("removeColumn"),visible:()=>Gs(e)},{type:"divider"},{label:()=>_e("menu.borders"),visible:()=>(sv(e)||Gs(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:()=>_e("menu.insert matrix"),id:"insert-matrix",visible:()=>e.isSelectionEditable,submenu:av(e),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>_e("menu.mode"),id:"mode",visible:()=>e.isSelectionEditable&&e.model.selectionIsCollapsed,submenu:[{label:()=>_e("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Kl(e,"accept-all"),e.executeCommand(["switchMode","math"])},checked:()=>e.model.mode==="math"},{label:()=>_e("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Kl(e,"accept-all"),e.executeCommand(["switchMode","text"])},checked:()=>e.model.mode==="text"},{label:()=>_e("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>e.executeCommand(["switchMode","latex"]),checked:()=>e.model.mode==="latex"}]},{type:"divider"},{label:()=>_e("menu.font-style"),id:"variant",visible:()=>e.isSelectionEditable,submenu:Qg(e),submenuClass:"variant-submenu"},{label:()=>_e("menu.color"),id:"color",visible:()=>e.isSelectionEditable,submenu:nv(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>_e("menu.background-color"),id:"background-color",visible:()=>e.isSelectionEditable,submenu:rv(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>_e("menu.accent"),id:"accent",visible:()=>e.isSelectionEditable,submenu:ev(e),submenuClass:"variant-submenu"},{label:()=>_e("menu.decoration"),id:"decoration",visible:()=>e.isSelectionEditable&&dn(e).length>0,submenu:tv(e),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>_e("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:()=>_e("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?_e("menu.solve-for",Hn(r)):_e("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:()=>_e("menu.cut"),onMenuSelect:()=>e.executeCommand("cutToClipboard"),visible:()=>!e.options.readOnly&&e.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>_e("menu.copy"),id:"copy",submenu:[{label:()=>_e("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>nn.copyToClipboard(e,"latex"),keyboardShortcut:"meta+C"},{label:()=>_e("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>nn.copyToClipboard(e,"ascii-math")},{label:()=>_e("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>nn.copyToClipboard(e,"math-ml")}]},{label:()=>_e("menu.paste"),id:"paste",onMenuSelect:()=>e.executeCommand("pasteFromClipboard"),visible:()=>e.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>_e("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>e.executeCommand("selectAll")}]}function Gs(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){Ed(e),e.flushInlineShortcutBuffer(),sh(e.model,t),bn(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 Tf(e,t,r,n){return{label:()=>Hn(`\\${r}{${dn(e)}}`),tooltip:()=>{var i;return(i=_e(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 Pf(e,t,r,n){return{label:()=>Hn(`\\${r}{${dn(e)}}`),tooltip:()=>{var i;return(i=_e(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 Ql(e,t){return e+Jl(t)}Ui({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 b=null;switch(p){case"all":b=a.root;break;case"selection":b=a.getAtoms(a.selection);break;case"left":{b=a.getAtoms(a.offsetOf(a.at(a.position).leftSibling),a.position);break}case"right":{b=a.getAtoms(a.position,a.offsetOf(a.at(a.position).rightSibling));break}case"group":b=a.getAtoms(a.getSiblingsRange(a.position));break;case"parent":{const{parent:M}=a.at(a.position);M!=null&&M.parent?b=M:b=a.root;break}default:b=a.root}return b}function u(p){let b="";switch(p){case"all":console.log("Internal failure: speak all failed");break;case"selection":b="no selection";break;case"left":b="at start";break;case"right":b="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":b="no parent";break;default:console.log('unknown speak_ param value: "'+p+'"');break}return b}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=Jl(d);return ze()&&r.withHighlighting?(rs().readAloudMathfield=e,Fs(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(!ze()){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(b=>console.log(b))}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=Ql("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=Ql("",e.model.at(e.model.position));else if(t==="line"){const a=Ql("",e.model.root);e.keyboardDelegate.setAriaLabel(a)}else i=n?Ql(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 Ql("",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+=Ql("",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=ra(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=ei(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=Ce.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 Zt&&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(El(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(Yi(e)){if(i=e,!Yi(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:b}=h;for(;b&&!p;)p=Vh(this,b,s,u),b=b.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 Ce({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 Ce.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 Kr(e);if(r==="spoken")return Jl(e);if(r==="spoken-text"){const n=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const i=Jl(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=Jl(e);return window.MathfieldElement.textToSpeechMarkup=n,i}return r==="ascii-math"?wn(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(Yi(e)&&Yi(t)?(n=[this.normalizeRange([e,t])],i=r):Is(e)?(n=[this.normalizeRange(e)],i=t):El(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 Dr(n.map(s=>Ce.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&&Rf(this,a,[n,i]);)i=this.offsetOf(a),a=a.parent;for(a=this.at(n).parent;a!==this.root&&Rf(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&&Rf(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||S0(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(Yi(e)){const i=this.normalizeOffset(e);if(Yi(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(Is(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 El(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(Ja(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(Ja(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 Rf(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 o){const b=!n&&t==="forward"||n==="body"&&t==="backward";let M=b?e.offsetOf(r.firstChild):e.offsetOf(r.lastChild);return b?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 b=r.leftSibling;r.hasChildren&&p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),e.position=e.offsetOf(b)}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 b=n&&t==="backward"||!n&&t==="forward"?r.leftSibling:r.lastChild;return p.addChildrenAfter(r.removeBranch("body"),r),p.removeChild(r),e.position=e.offsetOf(b),!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 b=nu.fractionNavigationOrder==="numerator-denominator"?"above":"below",M=b==="above"?"below":"above";if(p&&(t==="forward"&&n===b||t==="backward"&&n===M)){const B=r.removeBranch(b),$=r.removeBranch(M);return p.addChildrenAfter([...B,...$],r),p.removeChild(r),e.position=e.offsetOf(B.length>0?B[B.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 b=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 b&&(e.position=e.offsetOf(b)),!0}return!1}if(!r.hasChildren&&r.type==="subsup"){const b=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);return r.parent.removeChild(r),e.position=b,!0}if(n==="superscript")if(t==="backward"){const b=e.offsetOf(r.firstChild)-1;console.assert(b>=0),e.position=b}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 b=t==="forward"?e.offsetOf(r):Math.max(0,e.offsetOf(r)-1);r.parent.removeChild(r),e.position=b}return!0}if((p==null?void 0:p.type)==="genfrac"&&!n&&r.type!=="first"){let b=e.offsetOf(r.leftSibling);return p.removeChild(r),p.hasEmptyBranch("above")&&p.hasEmptyBranch("below")?(b=e.offsetOf(p.leftSibling),p.parent.removeChild(p),e.announce("delete",void 0,[p]),e.position=b,!0):(e.announce("delete",void 0,[r]),e.position=b,!0)}if(t==="backward"&&((p==null?void 0:p.command)==="\\ln"||(p==null?void 0:p.command)==="\\log")&&r.parentBranch!=="body"){const b=e.offsetOf(p.leftSibling);return p.parent.removeChild(p),e.announce("delete",void 0,[p]),e.position=b,!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])}}):Qa(e,ei(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])}):Qa(e,ei(e.selection),"deleteContentForward")}function Qa(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 b,M;const B=d.removeBranch(h);if(B.length===1&&B[0].type==="placeholder")(M=d.parent)==null||M.removeChild(d),e.position=Math.max(0,p);else{const $=d.parent.addChildrenAfter(B,d);(b=d.parent)==null||b.removeChild(d),e.position=e.offsetOf($)}})}}return e.deferNotifications({content:!0,selection:!0,type:r},()=>e.deleteAtoms(t))}Ui({deleteAll:e=>e.contentWillChange({inputType:"deleteContent"})&&Qa(e,[0,-1],"deleteContent"),deleteForward:e=>vv(e),deleteBackward:e=>gv(e),deleteNextWord:e=>e.contentWillChange({inputType:"deleteWordForward"})&&Qa(e,[e.anchor,df(e,e.position,"forward")],"deleteWordForward"),deletePreviousWord:e=>e.contentWillChange({inputType:"deleteWordBackward"})&&Qa(e,[e.anchor,df(e,e.position,"backward")],"deleteWordBackward"),deleteToGroupStart:e=>e.contentWillChange({inputType:"deleteSoftLineBackward"})&&Qa(e,[e.anchor,e.offsetOf(e.at(e.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:e=>e.contentWillChange({inputType:"deleteSoftLineForward"})&&Qa(e,[e.anchor,e.offsetOf(e.at(e.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:e=>e.contentWillChange({inputType:"deleteHardLineBackward"})&&Qa(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>e.contentWillChange({inputType:"deleteHardLineForward"})&&Qa(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="${_e("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="${_e("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({},Od()),{macros:vt(),registers:td()}),Rd(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 Ce({type:"root",mode:u,body:E(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=Ee.subscribe(()=>Ee.update(this.element)),Ee.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",b=>b.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(Ja(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",b=>{if(b.currentTarget!==p||this._menu.state!=="closed")return;this.element.classList.add("tracking");const M=p.getBoundingClientRect();this._menu.modifiers=Ns(b),this._menu.show({target:p,location:{x:M.left,y:M.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),b.preventDefault(),b.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(()=>bn(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:a}),Kc&&!Ee.locale.startsWith(Kc.locale)&&jp(Ee.locale),ia!=="ready"&&document.fonts.ready.then(()=>Bd(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(Ja(this)),qd(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Sf())}showMenu(e){var t,r;const n=(r=(t=e==null?void 0:e.location)!=null?t:So(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:lt(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=Ce.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=vf(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),Rd(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=Ce.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in e||this.model.getValue()!==n)&&nn.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)&&bn(this)}getOptions(e){return Ks(this.options,e)}getOption(e){return Ks(this.options,e)}handleEvent(e){return ns(this,null,function*(){var t;if(Wa(this)){if(sf(e)){if(!Ic(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(Wl(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))&&Zd.stop());break;case"contextmenu":this.userSelect!=="none"&&e.shiftKey===!1&&(yield $h(e,this.element.querySelector("[part=container]"),this._menu))&&Zd.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&qd(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Wa(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Wa(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(e);break;default:console.warn("Unexpected event type",e.type)}}})}dispose(){if(!Wa(this))return;Ee.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 Wl(e)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(e),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Ja(this))),!1):pm(this,e)}get errors(){return T(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=M0(this.model,this.model.position))!=null?r:"math");const n=this.undoManager.canUndo();nn.insert(this.model,e,t)&&(bn(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&&Fs(this,{interactive:!0});const t=this.field.getBoundingClientRect();let r=null;if(this.model.selectionIsCollapsed)r=So(this.field);else{const n=sd(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?nn.insert(this.model,e,S({style:this.model.at(this.model.position).computedStyle},t)):nn.insert(this.model,e,t),this.snapshot(`insert-${this.model.at(this.model.position).type}`),bn(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=E(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;Kl(this,"accept");let h,p=s.at(s.position);if(d)h="\\";else{const M=ei(s.selection);h=this.model.getValue(M,"latex");const B=this.model.extractAtoms(M);B.length===1&&B[0].type==="placeholder"&&(h=t,d=!0),p=s.at(M[0])}const b=new ln(h);p.parent.addChildAfter(b,p),d?s.position=s.offsetOf(b.lastChild):s.setSelection(s.offsetOf(b.firstChild),s.offsetOf(b.lastChild))}else Wc(s).forEach(d=>{d.isError=!1});if(r){const d=E(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 bn(this),this.undoManager.snapshot(e==="latex"?"insert-latex":"insert"),u}),this.model.mode=e,window.mathVirtualKeyboard.update(Ja(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};Is(t)?i.range=t:(t.operation==="toggle"&&(i.operation="toggle"),i.range=t.range,i.silenceNotifications=(r=t.silenceNotifications)!=null?r:!1);const a=vf(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)cf(this.model,u,a,{operation:s});else cf(this.model,i.range,a,{operation:s})}),bn(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=So(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),bn(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()),bn(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),bn(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(Ja(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(Ja(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(Ja(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"?(Kl(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(Ja(this)),qd(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(),Fs(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="",Hl(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})),bn(this),this.focusBlurInProgress=!1,Sf();const n=new AbortController,i=n.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Wa(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:i})},{once:!0,signal:i}),setTimeout(()=>n.abort(),100)}onInput(e){pf(this,e)}onKeystroke(e){return gh(this,e)}onCompositionStart(e){this.model.deleteAtoms(ei(this.model.selection));const t=So(this.field);t&&requestAnimationFrame(()=>{Fs(this),this.keyboardDelegate.moveTo(t.x,t.y-t.height)})}onCompositionUpdate(e){Rm(this.model,e),bn(this)}onCompositionEnd(e){Om(this.model),pf(this,e,{simulateKeystroke:!0})}onCut(e){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),nn.onCopy(this,e),Qa(this.model,ei(this.model.selection),"deleteByCut"),this.snapshot("cut"),bn(this))}onCopy(e){nn.onCopy(this,e)}onPaste(e){let t=this.isSelectionEditable;return t&&(t=nn.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(),Dd(this),qd(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=>De(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 Of(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&&Of(n)})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(n=>{n instanceof HTMLElement&&Of(n,t)})))}function wv(e,t){var r;if(!ze())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"]};rs().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));rs().readAloudMarks=u.split(`
|
|
|
`).map(d=>d?JSON.parse(d):{}),rs().readAloudTokens=[];for(const d of rs().readAloudMarks)d.value&&rs().readAloudTokens.push(d.value);rs().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),b=new Blob([p.buffer],{type:"audio/mpeg"}),M=URL.createObjectURL(b),B=rs();B.readAloudAudio?B.readAloudAudio.pause():(B.readAloudAudio=new Audio,B.readAloudAudio.addEventListener("ended",()=>{const $=B.readAloudMathfield;B.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),$?(Fs($),B.readAloudElement=null,B.readAloudMathfield=null,B.readAloudTokens=[],B.readAloudMarks=[],B.readAloudCurrentMark=""):Zh(B.readAloudElement)}),B.readAloudAudio.addEventListener("timeupdate",()=>{let $="";const se=B.readAloudAudio.currentTime*1e3+100;for(const Ze of B.readAloudMarks)Ze.time<se&&($=Ze.value);B.readAloudCurrentMark!==$&&(B.readAloudCurrentToken=$,$&&$===B.readAloudFinalToken?B.readAloudAudio.pause():(B.readAloudCurrentMark=$,Of(B.readAloudElement,B.readAloudCurrentMark)))})),B.readAloudAudio.src=M,B.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),B.readAloudAudio.play()})})}ze()||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 Or=new WeakMap,Sv=.5,ts={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 = ..."},ri=class qs extends HTMLElement{static get formAssociated(){return ec()}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 Ee.locale}static set locale(t){t==="auto"&&(t=navigator.language.slice(0,5)),Ee.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 Ee.strings}static set strings(t){Ee.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 ns(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 ns(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(ts[n])if(ts[n].startsWith("mf."))if(ts[n].startsWith(`mf.${n}`))r.push(`Option \`${n}\` cannot be used as a constructor option. Use ${ts[n]}`);else{const i=ts[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 ${ts[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(ec()&&(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=[_o("core"),_o("mathfield"),_o("mathfield-element"),_o("ui"),_o("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>"+Aa("core")+Aa("mathfield")+Aa("mathfield-element")+Aa("ui")+Aa("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=qs.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?Ks(this._mathfield.options,t):Or.has(this)?S({},Ks(S(S({},Od()),Rd(Or.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?Ks(this._mathfield.options,t):Or.has(this)?Ks(S(S({},Od()),Rd(Or.get(this).options)),t):null}reflectAttributes(){const t=Od(),r=this._getOptions();Object.keys(qs.optionsAttributes).forEach(n=>{const i=Do(n);qs.optionsAttributes[n]==="on/off"?t[i]!==r[i]?this.setAttribute(n,r[i]?"on":"off"):this.removeAttribute(n):t[i]!==r[i]&&(qs.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(Or.has(this)){const r=S(S({},Or.get(this).options),t);Or.set(this,_(S({},Or.get(this)),{selection:{ranges:r.readOnly?[[0,0]]:[[0,-1]]},options:r}))}else Or.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))ts[r]&&console.warn(`\`mf.setOptions({${r}:...})\` -> ${ts[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(Or.has(this)){let s,u,d;if(El(t)?([s,u]=t.ranges[0],d=r):Is(t)?([s,u]=t,d=r):Yi(t)&&Yi(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=Or.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(Or.has(this)){const i=Or.get(this).options;Or.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:i,menuItems:void 0});return}const n=iu(this);Or.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=$s(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;Ga.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),ec()||(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=Or.get(this))==null?void 0:r.options)!=null?n:iu(this)),{eventSink:this,value:h})),!Or.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const p of Object.keys(qs.optionsAttributes))this.upgradeProperty(Do(p))}if(!((i=this._mathfield)!=null&&i.model)){this._mathfield=null;return}if(Or.has(this)){const p=this._mathfield,b=Or.get(this),M=b.menuItems;p.model.deferNotifications({content:!1,selection:!1},()=>{const B=b.value;B!==void 0&&p.setValue(B),p.model.selection=b.selection,Or.delete(this)}),M&&(this.menuItems=M)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Ld()}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=Ks(this._mathfield.options,Object.keys(qs.optionsAttributes).map(i=>Do(i)));Or.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":bn(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",""),ec()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(ec()?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"),ec()?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=Or.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}Or.has(this)?Or.set(this,_(S({},Or.get(this)),{menuItems:t})):Or.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:Or.has(this)?Or.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,bn(this._mathfield);return}if(Or.has(this)){Or.set(this,_(S({},Or.get(this)),{selection:t}));return}Or.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:Or.has(this)?Or.get(this).selection.ranges[0][0]:0}set position(t){if(this._mathfield&&(this._mathfield.model.position=t,bn(this._mathfield)),Or.has(this)){Or.set(this,_(S({},Or.get(this)),{selection:{ranges:[[t,t]]}}));return}Or.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}};ri.version="0.98.5",ri._fontsDirectory="./fonts",ri._soundsDirectory="./sounds",ri.keypressVibration=!0,ri._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},ri._plonkSound="plonk.wav",ri.audioBuffers={},ri.createHTML=e=>e,ri._speechEngineRate="100%",ri._speechEngineVoice="Joanna",ri._textToSpeechMarkup="",ri._textToSpeechRules="mathlive",ri._textToSpeechRulesOptions={},ri.speakHook=dv,ri.readAloudHook=wv,ri._decimalSeparator=".",ri.fractionNavigationOrder="numerator-denominator",ri._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=ri;function Do(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[Do(n)]=!0:r[n]==="on/off"?i==="on"?t[Do(n)]=!0:i==="off"?t[Do(n)]=!1:t[Do(n)]=void 0:r[n]==="number"?t[Do(n)]=Number.parseFloat(i!=null?i:"0"):t[Do(n)]=i}}),t}function ec(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var jh=nu,Uh,Gh,qh,Xh;if(ze()&&!((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 e0(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 b=!1;for(;!b;){if(d){if(p=u.indexOf(t,h),p===-1){b=!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){b=!0;break}let M=u.slice(h+t.length,p);i==="ascii-math"&&([,M]=kl(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=e0(n,i,a,"textstyle")}),t!=null&&t.display&&t.display.forEach(([i,a])=>{n=e0(n,i,a,"displaystyle")}),r!=null&&r.inline&&r.inline.forEach(([i,a])=>{n=e0(n,i,a,"textstyle","ascii-math")}),r!=null&&r.display&&r.display.forEach(([i,a])=>{n=e0(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 tc(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=tc(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=tc(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,b,M,B,$,se,Ze,ee;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const ke=(r=e.childNodes[0].textContent)!=null?r:"";if((n=t.TeX)!=null&&n.processEnvironments&&/^\s*\\begin/.test(ke)){e.textContent="";const $e=tc(ke,"",t,!0);$e&&e.append($e);return}const Ye=Jh(ke,(i=t.TeX)==null?void 0:i.delimiters,(a=t.asciiMath)==null?void 0:a.delimiters);if(Ye.length===1&&Ye[0].type==="math"){e.textContent="";const $e=tc(Ye[0].data,Ye[0].mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);$e&&e.append($e);return}if(Ye.length===1&&Ye[0].type==="text")return}for(let ke=e.childNodes.length-1;ke>=0;ke--){const Ye=e.childNodes[ke];if(Ye.nodeType===3){const $e=Ev((s=Ye.textContent)!=null?s:"",t);$e&&(ke+=$e.childNodes.length-1,Ye.replaceWith($e))}else if(Ye.nodeType===1){const $e=Ye,wt=Ye.nodeName.toLowerCase();if(wt==="script"){const Ot=Ye;let kt;if((u=t.processScriptTypePattern)!=null&&u.test(Ot.type))kt=(d=Ot.textContent)!=null?d:"";else if((h=t.processMathJSONScriptTypePattern)!=null&&h.test(Ot.type))try{kt=(b=t.serializeToLatex)==null?void 0:b.call(t,JSON.parse((p=Ot.textContent)!=null?p:""))}catch(Br){console.error(Br)}if(kt){let Br="textstyle";for(const it of Ot.type.split(";")){const[aa,eo]=it.toLowerCase().split("=");aa.trim()==="mode"&&(Br=eo.trim()==="display"?"displaystyle":"textstyle")}const Gr=tc(kt,Br,t,!0);Gr&&Ot.parentNode.replaceChild(Gr,Ot)}}else if(((B=(M=t.processClassPattern)==null?void 0:M.test($e.className))!=null?B:!1)||!((se=($=t.skipTags)==null?void 0:$.includes(wt))!=null&&se||(ee=(Ze=t.ignoreClassPattern)==null?void 0:Ze.test($e.className))!=null&&ee))if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const kt=e.textContent;e.textContent="";const Br=tc(kt!=null?kt:"","displaystyle",t,!0);Br&&e.append(Br)}else Yh($e,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:""),Ld(),ea("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=Qo.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}Ui({switchKeyboardLayer:Av,toggleVirtualKeyboard:Lv,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function rs(){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=Hn),(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"}}}]);
|
|
|
}()); |