0&&(p+=y,le)))for(r=0;r=a)continue;(o>0||e.hskipBeforeAndAfter)&&(i=l.deflt(c.pregap,u),0!==i&&(z=Pe.makeSpan(["arraycolsep"],[]),z.style.width=P(i),M.push(z)));let d=[];for(r=0;r0){const e=Pe.makeLineSpan("hline",t,m),r=Pe.makeLineSpan("hdashline",t,m),n=[{type:"elem",elem:h,shift:0}];for(;c.length>0;){const t=c.pop(),o=t.pos-k;t.isDashed?n.push({type:"elem",elem:r,shift:o}):n.push({type:"elem",elem:e,shift:o})}h=Pe.makeVList({positionType:"individualShift",children:n},t)}if(0===T.length)return Pe.makeSpan(["mord"],[h],t);{let e=Pe.makeVList({positionType:"individualShift",children:T},t);return e=Pe.makeSpan(["tag"],[e],t),Pe.makeFragment([h,e])}},Vr={c:"center ",l:"left ",r:"right "},Pr=function(e,t){const r=[],n=new ft.MathNode("mtd",[],["mtr-glue"]),o=new ft.MathNode("mtd",[],["mml-eqn-num"]);for(let s=0;s0){const t=e.cols;let r="",n=!1,o=0,i=t.length;"separator"===t[0].type&&(a+="top ",o=1),"separator"===t[t.length-1].type&&(a+="bottom ",i-=1);for(let e=o;e0?"left ":"",a+=c[c.length-1].length>0?"right ":"";for(let e=1;e-1?"alignat":"align",s="split"===e.envName,i=Er(e.parser,{cols:r,addJot:!0,autoTag:s?void 0:Or(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display");let a,l=0;const h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){let e="";for(let r=0;r0&&c&&(n=1),r[e]={type:"align",align:t,pregap:n,postgap:0}}return i.colSeparationType=c?"align":"alignat",i};Br({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){const r=(Ot(t[0])?[t[0]]:Rt(t[0],"ordgroup").body).map((function(e){const t=Ht(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Er(e.parser,o,Lr(e.envName))},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let r="c";const o={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),r=t.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),o.cols=[{type:"align",align:r}]}}const s=Er(e.parser,o,Lr(e.envName)),i=Math.max(0,...s.body.map((e=>e.length)));return s.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){const t=Er(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){const r=(Ot(t[0])?[t[0]]:Rt(t[0],"ordgroup").body).map((function(e){const t=Ht(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");let o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=Er(e.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new n("{subarray} can contain only one column");return o},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){const t=Er(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Lr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Fr,htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){["gather","gather*"].includes(e.envName)&&Hr(e);const t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Or(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Er(e.parser,t,"display")},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Fr,htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Hr(e);const t={autoTag:Or(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Er(e.parser,t,"display")},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Hr(e),function(e){const t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();const r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}let r=[];const o=[r];for(let a=0;a-1);else{if(!("<>AV".indexOf(o)>-1))throw new n('Expected one of "<>AV=|." after @',l[t]);for(let e=0;e<2;e++){let r=!0;for(let h=t+1;h{const r=e.font,n=t.withFont(r);return ct(e.body,n)},Yr=(e,t)=>{const r=e.font,n=t.withFont(r);return St(e.body,n)},Xr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};$e({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=Ke(t[0]);let s=n;return s in Xr&&(s=Xr[s]),{type:"font",mode:r.mode,font:s.slice(1),body:o}},htmlBuilder:Ur,mathmlBuilder:Yr}),$e({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{let{parser:r}=e;const n=t[0],o=l.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Ut(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:o}}}),$e({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n,breakOnTokenText:o}=e;const{mode:s}=r,i=r.parseExpression(!0,o);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:i}}},htmlBuilder:Ur,mathmlBuilder:Yr});const Wr=(e,t)=>{let r=t;return"display"===e?r=r.id>=w.SCRIPT.id?r.text():w.DISPLAY:"text"===e&&r.size===w.DISPLAY.size?r=w.TEXT:"script"===e?r=w.SCRIPT:"scriptscript"===e&&(r=w.SCRIPTSCRIPT),r},_r=(e,t)=>{const r=Wr(e.size,t.style),n=r.fracNum(),o=r.fracDen();let s;s=t.havingStyle(n);const i=ct(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,r=3.5/t.fontMetrics().ptPerEm;i.height=i.height0?3*c:7*c,u=t.fontMetrics().denom1):(h>0?(m=t.fontMetrics().num2,p=c):(m=t.fontMetrics().num3,p=3*c),u=t.fontMetrics().denom2),l){const e=t.fontMetrics().axisHeight;m-i.depth-(e+.5*h){let r=new ft.MathNode("mfrac",[St(e.numer,t),St(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=V(e.barSize,t);r.setAttribute("linethickness",P(n))}}else r.setAttribute("linethickness","0px");const n=Wr(e.size,t.style);if(n.size!==t.style.size){r=new ft.MathNode("mstyle",[r]);const e=n.size===w.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){const t=[];if(null!=e.leftDelim){const r=new ft.MathNode("mo",[new ft.TextNode(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}if(t.push(r),null!=e.rightDelim){const r=new ft.MathNode("mo",[new ft.TextNode(e.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}return yt(t)}return r};$e({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];let i,a=null,l=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,a="(",l=")";break;case"\\\\bracefrac":i=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:s,hasBarLine:i,leftDelim:a,rightDelim:l,size:h,barSize:null}},htmlBuilder:_r,mathmlBuilder:jr}),$e({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:o,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),$e({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:r,funcName:n,token:o}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:o}}});const $r=["display","text","script","scriptscript"],Zr=function(e){let t=null;return e.length>0&&(t=e,t="."===t?null:t),t};$e({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){let{parser:r}=e;const n=t[4],o=t[5],s=Ke(t[0]),i="atom"===s.type&&"open"===s.family?Zr(s.text):null,a=Ke(t[1]),l="atom"===a.type&&"close"===a.family?Zr(a.text):null,h=Rt(t[2],"size");let c,m=null;h.isBlank?c=!0:(m=h.value,c=m.number>0);let p="auto",u=t[3];if("ordgroup"===u.type){if(u.body.length>0){const e=Rt(u.body[0],"textord");p=$r[Number(e.text)]}}else u=Rt(u,"textord"),p=$r[Number(u.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:c,barSize:m,leftDelim:i,rightDelim:l,size:p}},htmlBuilder:_r,mathmlBuilder:jr}),$e({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){let{parser:r,funcName:n,token:o}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Rt(t[0],"size").value,token:o}}}),$e({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Rt(t[1],"infix").size),i=t[2],a=s.number>0;return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:_r,mathmlBuilder:jr});const Kr=(e,t)=>{const r=t.style;let n,o;"supsub"===e.type?(n=e.sup?ct(e.sup,t.havingStyle(r.sup()),t):ct(e.sub,t.havingStyle(r.sub()),t),o=Rt(e.base,"horizBrace")):o=Rt(e,"horizBrace");const s=ct(o.base,t.havingBaseStyle(w.DISPLAY)),i=It(o,t);let a;if(o.isOver?(a=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:i}]},t),a.children[0].children[0].children[1].classes.push("svg-align")):(a=Pe.makeVList({positionType:"bottom",positionData:s.depth+.1+i.height,children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s}]},t),a.children[0].children[0].children[0].classes.push("svg-align")),n){const e=Pe.makeSpan(["mord",o.isOver?"mover":"munder"],[a],t);a=o.isOver?Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Pe.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return Pe.makeSpan(["mord",o.isOver?"mover":"munder"],[a],t)};$e({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:Kr,mathmlBuilder:(e,t)=>{const r=qt(e.label);return new ft.MathNode(e.isOver?"mover":"munder",[St(e.base,t),r])}}),$e({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[1],o=Rt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:r.mode,href:o,body:Je(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{const r=ot(e.body,t,!1);return Pe.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{let r=kt(e.body,t);return r instanceof dt||(r=new dt("mrow",[r])),r.setAttribute("href",e.href),r}}),$e({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=Rt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");const o=[];for(let e=0;e{let{parser:r,funcName:o,token:s}=e;const i=Rt(t[0],"raw").string,a=t[1];let l;r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");const h={};switch(o){case"\\htmlClass":h.class=i,l={command:"\\htmlClass",class:i};break;case"\\htmlId":h.id=i,l={command:"\\htmlId",id:i};break;case"\\htmlStyle":h.style=i,l={command:"\\htmlStyle",style:i};break;case"\\htmlData":{const e=i.split(",");for(let t=0;t{const r=ot(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));const o=Pe.makeSpan(n,r,t);for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&o.setAttribute(t,e.attributes[t]);return o},mathmlBuilder:(e,t)=>kt(e.body,t)}),$e({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Je(t[0]),mathml:Je(t[1])}},htmlBuilder:(e,t)=>{const r=ot(e.html,t,!1);return Pe.makeFragment(r)},mathmlBuilder:(e,t)=>kt(e.mathml,t)});const Jr=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};{const t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new n("Invalid size: '"+e+"' in \\includegraphics");const r={number:+(t[1]+t[2]),unit:t[3]};if(!D(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};$e({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{let{parser:o}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},l="";if(r[0]){const e=Rt(r[0],"raw").string.split(",");for(let t=0;t{const r=V(e.height,t);let n=0;e.totalheight.number>0&&(n=V(e.totalheight,t)-r);let o=0;e.width.number>0&&(o=V(e.width,t));const s={height:P(r+n)};o>0&&(s.width=P(o)),n>0&&(s.verticalAlign=P(-n));const i=new j(e.src,e.alt,s);return i.height=r,i.depth=n,i},mathmlBuilder:(e,t)=>{const r=new ft.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);const n=V(e.height,t);let o=0;if(e.totalheight.number>0&&(o=V(e.totalheight,t)-n,r.setAttribute("valign",P(-o))),r.setAttribute("height",P(n+o)),e.width.number>0){const n=V(e.width,t);r.setAttribute("width",P(n))}return r.setAttribute("src",e.src),r}}),$e({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=Rt(t[0],"size");if(r.settings.strict){const e="m"===n[1],t="mu"===o.value.unit;e?(t||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):t&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:o.value}},htmlBuilder(e,t){return Pe.makeGlue(e.dimension,t)},mathmlBuilder(e,t){const r=V(e.dimension,t);return new ft.SpaceNode(r)}}),$e({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:o}},htmlBuilder:(e,t)=>{let r;"clap"===e.alignment?(r=Pe.makeSpan([],[ct(e.body,t)]),r=Pe.makeSpan(["inner"],[r],t)):r=Pe.makeSpan(["inner"],[ct(e.body,t)]);const n=Pe.makeSpan(["fix"],[]);let o=Pe.makeSpan([e.alignment],[r,n],t);const s=Pe.makeSpan(["strut"]);return s.style.height=P(o.height+o.depth),o.depth&&(s.style.verticalAlign=P(-o.depth)),o.children.unshift(s),o=Pe.makeSpan(["thinbox"],[o],t),Pe.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{const r=new ft.MathNode("mpadded",[St(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",t+"width")}return r.setAttribute("width","0px"),r}}),$e({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){let{funcName:r,parser:n}=e;const o=n.mode;n.switchMode("math");const s="\\("===r?"\\)":"$",i=n.parseExpression(!1,s);return n.expect(s),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",body:i}}}),$e({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new n("Mismatched "+e.funcName)}});const Qr=(e,t)=>{switch(t.style.size){case w.DISPLAY.size:return e.display;case w.TEXT.size:return e.text;case w.SCRIPT.size:return e.script;case w.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};$e({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Je(t[0]),text:Je(t[1]),script:Je(t[2]),scriptscript:Je(t[3])}},htmlBuilder:(e,t)=>{const r=Qr(e,t),n=ot(r,t,!1);return Pe.makeFragment(n)},mathmlBuilder:(e,t)=>{const r=Qr(e,t);return kt(r,t)}});const en=(e,t,r,n,o,s,i)=>{e=Pe.makeSpan([],[e]);const a=r&&l.isCharacterBox(r);let h,c,m;if(t){const e=ct(t,n.havingStyle(o.sup()),n);c={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(r){const e=ct(r,n.havingStyle(o.sub()),n);h={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}}if(c&&h){const t=n.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+i;m=Pe.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:P(-s)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:P(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(h){const t=e.height-i;m=Pe.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:P(-s)},{type:"kern",size:h.kern},{type:"elem",elem:e}]},n)}else{if(!c)return e;{const t=e.depth+i;m=Pe.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:P(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}}const p=[m];if(h&&0!==s&&!a){const e=Pe.makeSpan(["mspace"],[],n);e.style.marginRight=P(s),p.unshift(e)}return Pe.makeSpan(["mop","op-limits"],p,n)},tn=["\\smallint"],rn=(e,t)=>{let r,n,o,s=!1;"supsub"===e.type?(r=e.sup,n=e.sub,o=Rt(e.base,"op"),s=!0):o=Rt(e,"op");const i=t.style;let a,l=!1;if(i.size===w.DISPLAY.size&&o.symbol&&!tn.includes(o.name)&&(l=!0),o.symbol){const e=l?"Size2-Regular":"Size1-Regular";let r="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(r=o.name.slice(1),o.name="oiint"===r?"\\iint":"\\iiint"),a=Pe.makeSymbol(o.name,e,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),r.length>0){const e=a.italic,n=Pe.staticSvg(r+"Size"+(l?"2":"1"),t);a=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:n,shift:l?.08:0}]},t),o.name="\\"+r,a.classes.unshift("mop"),a.italic=e}}else if(o.body){const e=ot(o.body,t,!0);1===e.length&&e[0]instanceof Z?(a=e[0],a.classes[0]="mop"):a=Pe.makeSpan(["mop"],e,t)}else{const e=[];for(let r=1;r{let r;if(e.symbol)r=new dt("mo",[bt(e.name,e.mode)]),tn.includes(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new dt("mo",vt(e.body,t));else{r=new dt("mi",[new gt(e.name.slice(1))]);const t=new dt("mo",[bt("\u2061","text")]);r=e.parentIsSupSub?new dt("mrow",[r,t]):ut([r,t])}return r},on={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};$e({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{let{parser:r,funcName:n}=e,o=n;return 1===o.length&&(o=on[o]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:rn,mathmlBuilder:nn}),$e({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Je(n)}},htmlBuilder:rn,mathmlBuilder:nn});const sn={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};$e({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:rn,mathmlBuilder:nn}),$e({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:rn,mathmlBuilder:nn}),$e({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(e){let{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=sn[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:rn,mathmlBuilder:nn});const an=(e,t)=>{let r,n,o,s,i=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,o=Rt(e.base,"operatorname"),i=!0):o=Rt(e,"operatorname"),o.body.length>0){const e=o.body.map((e=>{const t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),r=ot(e,t.withFont("mathrm"),!0);for(let e=0;e{let{parser:r,funcName:n}=e;const o=t[0];return{type:"operatorname",mode:r.mode,body:Je(o),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:an,mathmlBuilder:(e,t)=>{let r=vt(e.body,t.withFont("mathrm")),n=!0;for(let e=0;ee.toText())).join("");r=[new ft.TextNode(e)]}const o=new ft.MathNode("mi",r);o.setAttribute("mathvariant","normal");const s=new ft.MathNode("mo",[bt("\u2061","text")]);return e.parentIsSupSub?new ft.MathNode("mrow",[o,s]):ft.newDocumentFragment([o,s])}}),Nr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ze({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Pe.makeFragment(ot(e.body,t,!1)):Pe.makeSpan(["mord"],ot(e.body,t,!0),t)},mathmlBuilder(e,t){return kt(e.body,t,!0)}}),$e({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){let{parser:r}=e;const n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){const r=ct(e.body,t.havingCrampedStyle()),n=Pe.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n},{type:"kern",size:o}]},t);return Pe.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){const r=new ft.MathNode("mo",[new ft.TextNode("\u203e")]);r.setAttribute("stretchy","true");const n=new ft.MathNode("mover",[St(e.body,t),r]);return n.setAttribute("accent","true"),n}}),$e({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"phantom",mode:r.mode,body:Je(n)}},htmlBuilder:(e,t)=>{const r=ot(e.body,t.withPhantom(),!1);return Pe.makeFragment(r)},mathmlBuilder:(e,t)=>{const r=vt(e.body,t);return new ft.MathNode("mphantom",r)}}),$e({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{let r=Pe.makeSpan([],[ct(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(let e=0;e{const r=vt(Je(e.body),t),n=new ft.MathNode("mphantom",r),o=new ft.MathNode("mpadded",[n]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),$e({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{const r=Pe.makeSpan(["inner"],[ct(e.body,t.withPhantom())]),n=Pe.makeSpan(["fix"],[]);return Pe.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{const r=vt(Je(e.body),t),n=new ft.MathNode("mphantom",r),o=new ft.MathNode("mpadded",[n]);return o.setAttribute("width","0px"),o}}),$e({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;const n=Rt(t[0],"size").value,o=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:o}},htmlBuilder(e,t){const r=ct(e.body,t),n=V(e.dy,t);return Pe.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){const r=new ft.MathNode("mpadded",[St(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),$e({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){let{parser:t}=e;return{type:"internal",mode:t.mode}}}),$e({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){let{parser:n}=e;const o=r[0],s=Rt(t[0],"size"),i=Rt(t[1],"size");return{type:"rule",mode:n.mode,shift:o&&Rt(o,"size").value,width:s.value,height:i.value}},htmlBuilder(e,t){const r=Pe.makeSpan(["mord","rule"],[],t),n=V(e.width,t),o=V(e.height,t),s=e.shift?V(e.shift,t):0;return r.style.borderRightWidth=P(n),r.style.borderTopWidth=P(o),r.style.bottom=P(s),r.width=n,r.height=o+s,r.depth=-s,r.maxFontSize=1.125*o*t.sizeMultiplier,r},mathmlBuilder(e,t){const r=V(e.width,t),n=V(e.height,t),o=e.shift?V(e.shift,t):0,s=t.color&&t.getColor()||"black",i=new ft.MathNode("mspace");i.setAttribute("mathbackground",s),i.setAttribute("width",P(r)),i.setAttribute("height",P(n));const a=new ft.MathNode("mpadded",[i]);return o>=0?a.setAttribute("height",P(o)):(a.setAttribute("height",P(o)),a.setAttribute("depth",P(-o))),a.setAttribute("voffset",P(o)),a}});const hn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];$e({type:"sizing",names:hn,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!1,r);return{type:"sizing",mode:o.mode,size:hn.indexOf(n)+1,body:s}},htmlBuilder:(e,t)=>{const r=t.havingSize(e.size);return ln(e.body,r,t)},mathmlBuilder:(e,t)=>{const r=t.havingSize(e.size),n=vt(e.body,r),o=new ft.MathNode("mstyle",n);return o.setAttribute("mathsize",P(r.sizeMultiplier)),o}}),$e({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{let{parser:n}=e,o=!1,s=!1;const i=r[0]&&Rt(r[0],"ordgroup");if(i){let e="";for(let t=0;t{const r=Pe.makeSpan([],[ct(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(let e=0;e{const r=new ft.MathNode("mpadded",[St(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),$e({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n}=e;const o=r[0],s=t[0];return{type:"sqrt",mode:n.mode,body:s,index:o}},htmlBuilder(e,t){let r=ct(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Pe.wrapFragment(r,t);const n=t.fontMetrics().defaultRuleThickness;let o=n;t.style.idr.height+r.depth+s&&(s=(s+c-r.height-r.depth)/2);const m=a.height-r.height-s-l;r.style.paddingLeft=P(h);const p=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+m)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){const r=t.havingStyle(w.SCRIPTSCRIPT),n=ct(e.index,r,t),o=.6*(p.height-p.depth),s=Pe.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:n}]},t),i=Pe.makeSpan(["root"],[s]);return Pe.makeSpan(["mord","sqrt"],[i,p],t)}return Pe.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){const{body:r,index:n}=e;return n?new ft.MathNode("mroot",[St(r,t),St(n,t)]):new ft.MathNode("msqrt",[St(r,t)])}});const cn={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT};$e({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!0,r),i=n.slice(1,n.length-5);return{type:"styling",mode:o.mode,style:i,body:s}},htmlBuilder(e,t){const r=cn[e.style],n=t.havingStyle(r).withFont("");return ln(e.body,n,t)},mathmlBuilder(e,t){const r=cn[e.style],n=t.havingStyle(r),o=vt(e.body,n),s=new ft.MathNode("mstyle",o),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return s.setAttribute("scriptlevel",i[0]),s.setAttribute("displaystyle",i[1]),s}});Ze({type:"supsub",htmlBuilder(e,t){const r=function(e,t){const r=e.base;if(r)return"op"===r.type?r.limits&&(t.style.size===w.DISPLAY.size||r.alwaysHandleSupSub)?rn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===w.DISPLAY.size||r.limits)?an:null:"accent"===r.type?l.isCharacterBox(r.base)?Et:null:"horizBrace"===r.type&&!e.sub===r.isOver?Kr:null;return null}(e,t);if(r)return r(e,t);const{base:n,sup:o,sub:s}=e,i=ct(n,t);let a,h;const c=t.fontMetrics();let m=0,p=0;const u=n&&l.isCharacterBox(n);if(o){const e=t.havingStyle(t.style.sup());a=ct(o,e,t),u||(m=i.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());h=ct(s,e,t),u||(p=i.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}let d;d=t.style===w.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;const g=t.sizeMultiplier,f=P(.5/c.ptPerEm/g);let b,y=null;if(h){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(i instanceof Z||t)&&(y=P(-i.italic))}if(a&&h){m=Math.max(m,d,a.depth+.25*c.xHeight),p=Math.max(p,c.sub2);const e=4*c.defaultRuleThickness;if(m-a.depth-(h.height-p)0&&(m+=t,p-=t)}const r=[{type:"elem",elem:h,shift:p,marginRight:f,marginLeft:y},{type:"elem",elem:a,shift:-m,marginRight:f}];b=Pe.makeVList({positionType:"individualShift",children:r},t)}else if(h){p=Math.max(p,c.sub1,h.height-.8*c.xHeight);const e=[{type:"elem",elem:h,marginLeft:y,marginRight:f}];b=Pe.makeVList({positionType:"shift",positionData:p,children:e},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");m=Math.max(m,d,a.depth+.25*c.xHeight),b=Pe.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:a,marginRight:f}]},t)}const x=lt(i,"right")||"mord";return Pe.makeSpan([x],[i,Pe.makeSpan(["msupsub"],[b])],t)},mathmlBuilder(e,t){let r,n,o=!1;e.base&&"horizBrace"===e.base.type&&(n=!!e.sup,n===e.base.isOver&&(o=!0,r=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);const s=[St(e.base,t)];let i;if(e.sub&&s.push(St(e.sub,t)),e.sup&&s.push(St(e.sup,t)),o)i=r?"mover":"munder";else if(e.sub)if(e.sup){const r=e.base;i=r&&"op"===r.type&&r.limits&&t.style===w.DISPLAY||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(t.style===w.DISPLAY||r.limits)?"munderover":"msubsup"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===w.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===w.DISPLAY)?"munder":"msub"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===w.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===w.DISPLAY)?"mover":"msup"}return new ft.MathNode(i,s)}}),Ze({type:"atom",htmlBuilder(e,t){return Pe.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){const r=new ft.MathNode("mo",[bt(e.text,e.mode)]);if("bin"===e.family){const n=xt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});const mn={mi:"italic",mn:"normal",mtext:"normal"};Ze({type:"mathord",htmlBuilder(e,t){return Pe.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){const r=new ft.MathNode("mi",[bt(e.text,e.mode,t)]),n=xt(e,t)||"italic";return n!==mn[r.type]&&r.setAttribute("mathvariant",n),r}}),Ze({type:"textord",htmlBuilder(e,t){return Pe.makeOrd(e,t,"textord")},mathmlBuilder(e,t){const r=bt(e.text,e.mode,t),n=xt(e,t)||"normal";let o;return o="text"===e.mode?new ft.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new ft.MathNode("mn",[r]):"\\prime"===e.text?new ft.MathNode("mo",[r]):new ft.MathNode("mi",[r]),n!==mn[o.type]&&o.setAttribute("mathvariant",n),o}});const pn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},un={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ze({type:"spacing",htmlBuilder(e,t){if(un.hasOwnProperty(e.text)){const r=un[e.text].className||"";if("text"===e.mode){const n=Pe.makeOrd(e,t,"textord");return n.classes.push(r),n}return Pe.makeSpan(["mspace",r],[Pe.mathsym(e.text,e.mode,t)],t)}if(pn.hasOwnProperty(e.text))return Pe.makeSpan(["mspace",pn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){let r;if(!un.hasOwnProperty(e.text)){if(pn.hasOwnProperty(e.text))return new ft.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return r=new ft.MathNode("mtext",[new ft.TextNode("\xa0")]),r}});const dn=()=>{const e=new ft.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ze({type:"tag",mathmlBuilder(e,t){const r=new ft.MathNode("mtable",[new ft.MathNode("mtr",[dn(),new ft.MathNode("mtd",[kt(e.body,t)]),dn(),new ft.MathNode("mtd",[kt(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});const gn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},fn={"\\textbf":"textbf","\\textmd":"textmd"},bn={"\\textit":"textit","\\textup":"textup"},yn=(e,t)=>{const r=e.font;return r?gn[r]?t.withTextFontFamily(gn[r]):fn[r]?t.withTextFontWeight(fn[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(bn[r]):t};$e({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"text",mode:r.mode,body:Je(o),font:n}},htmlBuilder(e,t){const r=yn(e,t),n=ot(e.body,r,!0);return Pe.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){const r=yn(e,t);return kt(e.body,r)}}),$e({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=ct(e.body,t),n=Pe.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Pe.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r}]},t);return Pe.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){const r=new ft.MathNode("mo",[new ft.TextNode("\u203e")]);r.setAttribute("stretchy","true");const n=new ft.MathNode("munder",[St(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),$e({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=ct(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(r.height-n-(r.depth+n));return Pe.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new ft.MathNode("mpadded",[St(e.body,t)],["vcenter"])}}),$e({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){const r=xn(e),n=[],o=t.havingStyle(t.style.text());for(let t=0;te.body.replace(/ /g,e.star?"\u2423":"\xa0");var wn=We;const vn="[ \r\n\t]",kn="(\\\\[a-zA-Z@]+)"+vn+"*",Sn="[\u0300-\u036f]",Mn=new RegExp(Sn+"+$"),zn="("+vn+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+Sn+"*|[\ud800-\udbff][\udc00-\udfff]"+Sn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+kn+"|\\\\[^\ud800-\udfff])";class An{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(zn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Ir("EOF",new qr(this,t,t));const r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new n("Unexpected character: '"+e[t]+"'",new Ir(e[t],new qr(this,t,t+1)));const o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}return new Ir(o,new qr(this,t,this.tokenRegex.lastIndex))}}class Tn{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(let t=0;t0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{const t=this.undefStack[this.undefStack.length-1];t&&!t.hasOwnProperty(e)&&(t[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Bn=Cr;Nr("\\noexpand",(function(e){const t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Nr("\\expandafter",(function(e){const t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Nr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Nr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Nr("\\@ifnextchar",(function(e){const t=e.consumeArgs(3);e.consumeSpaces();const r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Nr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Nr("\\TextOrMath",(function(e){const t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));const Cn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Nr("\\char",(function(e){let t,r=e.popToken(),o="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if(r=e.popToken(),"\\"===r.text[0])o=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");o=r.text.charCodeAt(0)}else t=10;if(t){if(o=Cn[r.text],null==o||o>=t)throw new n("Invalid base-"+t+" digit "+r.text);let s;for(;null!=(s=Cn[e.future().text])&&s{let s=e.consumeArg().tokens;if(1!==s.length)throw new n("\\newcommand's first argument must be a macro name");const i=s[0].text,a=e.isDefined(i);if(a&&!t)throw new n("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!r)throw new n("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");let l=0;if(s=e.consumeArg().tokens,1===s.length&&"["===s[0].text){let t="",r=e.expandNextToken();for(;"]"!==r.text&&"EOF"!==r.text;)t+=r.text,r=e.expandNextToken();if(!t.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+t);l=parseInt(t),s=e.consumeArg().tokens}return a&&o||e.macros.set(i,{tokens:s,numArgs:l}),""};Nr("\\newcommand",(e=>Nn(e,!1,!0,!1))),Nr("\\renewcommand",(e=>Nn(e,!0,!1,!1))),Nr("\\providecommand",(e=>Nn(e,!0,!0,!0))),Nr("\\message",(e=>{const t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Nr("\\errmessage",(e=>{const t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Nr("\\show",(e=>{const t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),wn[r],oe.math[r],oe.text[r]),""})),Nr("\\bgroup","{"),Nr("\\egroup","}"),Nr("~","\\nobreakspace"),Nr("\\lq","`"),Nr("\\rq","'"),Nr("\\aa","\\r a"),Nr("\\AA","\\r A"),Nr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Nr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Nr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Nr("\u212c","\\mathscr{B}"),Nr("\u2130","\\mathscr{E}"),Nr("\u2131","\\mathscr{F}"),Nr("\u210b","\\mathscr{H}"),Nr("\u2110","\\mathscr{I}"),Nr("\u2112","\\mathscr{L}"),Nr("\u2133","\\mathscr{M}"),Nr("\u211b","\\mathscr{R}"),Nr("\u212d","\\mathfrak{C}"),Nr("\u210c","\\mathfrak{H}"),Nr("\u2128","\\mathfrak{Z}"),Nr("\\Bbbk","\\Bbb{k}"),Nr("\xb7","\\cdotp"),Nr("\\llap","\\mathllap{\\textrm{#1}}"),Nr("\\rlap","\\mathrlap{\\textrm{#1}}"),Nr("\\clap","\\mathclap{\\textrm{#1}}"),Nr("\\mathstrut","\\vphantom{(}"),Nr("\\underbar","\\underline{\\text{#1}}"),Nr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Nr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Nr("\\ne","\\neq"),Nr("\u2260","\\neq"),Nr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Nr("\u2209","\\notin"),Nr("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Nr("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Nr("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Nr("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Nr("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Nr("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Nr("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Nr("\u27c2","\\perp"),Nr("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Nr("\u220c","\\notni"),Nr("\u231c","\\ulcorner"),Nr("\u231d","\\urcorner"),Nr("\u231e","\\llcorner"),Nr("\u231f","\\lrcorner"),Nr("\xa9","\\copyright"),Nr("\xae","\\textregistered"),Nr("\ufe0f","\\textregistered"),Nr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Nr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Nr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Nr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Nr("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Nr("\u22ee","\\vdots"),Nr("\\varGamma","\\mathit{\\Gamma}"),Nr("\\varDelta","\\mathit{\\Delta}"),Nr("\\varTheta","\\mathit{\\Theta}"),Nr("\\varLambda","\\mathit{\\Lambda}"),Nr("\\varXi","\\mathit{\\Xi}"),Nr("\\varPi","\\mathit{\\Pi}"),Nr("\\varSigma","\\mathit{\\Sigma}"),Nr("\\varUpsilon","\\mathit{\\Upsilon}"),Nr("\\varPhi","\\mathit{\\Phi}"),Nr("\\varPsi","\\mathit{\\Psi}"),Nr("\\varOmega","\\mathit{\\Omega}"),Nr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Nr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Nr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Nr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Nr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Nr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Nr("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Nr("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const qn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Nr("\\dots",(function(e){let t="\\dotso";const r=e.expandAfterFuture().text;return r in qn?t=qn[r]:("\\not"===r.slice(0,4)||r in oe.math&&["bin","rel"].includes(oe.math[r].group))&&(t="\\dotsb"),t}));const In={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Nr("\\dotso",(function(e){return e.future().text in In?"\\ldots\\,":"\\ldots"})),Nr("\\dotsc",(function(e){const t=e.future().text;return t in In&&","!==t?"\\ldots\\,":"\\ldots"})),Nr("\\cdots",(function(e){return e.future().text in In?"\\@cdots\\,":"\\@cdots"})),Nr("\\dotsb","\\cdots"),Nr("\\dotsm","\\cdots"),Nr("\\dotsi","\\!\\cdots"),Nr("\\dotsx","\\ldots\\,"),Nr("\\DOTSI","\\relax"),Nr("\\DOTSB","\\relax"),Nr("\\DOTSX","\\relax"),Nr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Nr("\\,","\\tmspace+{3mu}{.1667em}"),Nr("\\thinspace","\\,"),Nr("\\>","\\mskip{4mu}"),Nr("\\:","\\tmspace+{4mu}{.2222em}"),Nr("\\medspace","\\:"),Nr("\\;","\\tmspace+{5mu}{.2777em}"),Nr("\\thickspace","\\;"),Nr("\\!","\\tmspace-{3mu}{.1667em}"),Nr("\\negthinspace","\\!"),Nr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Nr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Nr("\\enspace","\\kern.5em "),Nr("\\enskip","\\hskip.5em\\relax"),Nr("\\quad","\\hskip1em\\relax"),Nr("\\qquad","\\hskip2em\\relax"),Nr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Nr("\\tag@paren","\\tag@literal{({#1})}"),Nr("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Nr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Nr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Nr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Nr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Nr("\\newline","\\\\\\relax"),Nr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Rn=P(A["Main-Regular"]["T".charCodeAt(0)][1]-.7*A["Main-Regular"]["A".charCodeAt(0)][1]);Nr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Rn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Nr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Rn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Nr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Nr("\\@hspace","\\hskip #1\\relax"),Nr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Nr("\\ordinarycolon",":"),Nr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Nr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Nr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Nr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Nr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Nr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Nr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Nr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Nr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Nr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Nr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Nr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Nr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Nr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Nr("\u2237","\\dblcolon"),Nr("\u2239","\\eqcolon"),Nr("\u2254","\\coloneqq"),Nr("\u2255","\\eqqcolon"),Nr("\u2a74","\\Coloneqq"),Nr("\\ratio","\\vcentcolon"),Nr("\\coloncolon","\\dblcolon"),Nr("\\colonequals","\\coloneqq"),Nr("\\coloncolonequals","\\Coloneqq"),Nr("\\equalscolon","\\eqqcolon"),Nr("\\equalscoloncolon","\\Eqqcolon"),Nr("\\colonminus","\\coloneq"),Nr("\\coloncolonminus","\\Coloneq"),Nr("\\minuscolon","\\eqcolon"),Nr("\\minuscoloncolon","\\Eqcolon"),Nr("\\coloncolonapprox","\\Colonapprox"),Nr("\\coloncolonsim","\\Colonsim"),Nr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Nr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Nr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Nr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Nr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Nr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Nr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Nr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Nr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Nr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Nr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Nr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Nr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Nr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Nr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Nr("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Nr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Nr("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Nr("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Nr("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Nr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Nr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Nr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Nr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Nr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Nr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Nr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Nr("\\imath","\\html@mathml{\\@imath}{\u0131}"),Nr("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Nr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Nr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Nr("\u27e6","\\llbracket"),Nr("\u27e7","\\rrbracket"),Nr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Nr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Nr("\u2983","\\lBrace"),Nr("\u2984","\\rBrace"),Nr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Nr("\u29b5","\\minuso"),Nr("\\darr","\\downarrow"),Nr("\\dArr","\\Downarrow"),Nr("\\Darr","\\Downarrow"),Nr("\\lang","\\langle"),Nr("\\rang","\\rangle"),Nr("\\uarr","\\uparrow"),Nr("\\uArr","\\Uparrow"),Nr("\\Uarr","\\Uparrow"),Nr("\\N","\\mathbb{N}"),Nr("\\R","\\mathbb{R}"),Nr("\\Z","\\mathbb{Z}"),Nr("\\alef","\\aleph"),Nr("\\alefsym","\\aleph"),Nr("\\Alpha","\\mathrm{A}"),Nr("\\Beta","\\mathrm{B}"),Nr("\\bull","\\bullet"),Nr("\\Chi","\\mathrm{X}"),Nr("\\clubs","\\clubsuit"),Nr("\\cnums","\\mathbb{C}"),Nr("\\Complex","\\mathbb{C}"),Nr("\\Dagger","\\ddagger"),Nr("\\diamonds","\\diamondsuit"),Nr("\\empty","\\emptyset"),Nr("\\Epsilon","\\mathrm{E}"),Nr("\\Eta","\\mathrm{H}"),Nr("\\exist","\\exists"),Nr("\\harr","\\leftrightarrow"),Nr("\\hArr","\\Leftrightarrow"),Nr("\\Harr","\\Leftrightarrow"),Nr("\\hearts","\\heartsuit"),Nr("\\image","\\Im"),Nr("\\infin","\\infty"),Nr("\\Iota","\\mathrm{I}"),Nr("\\isin","\\in"),Nr("\\Kappa","\\mathrm{K}"),Nr("\\larr","\\leftarrow"),Nr("\\lArr","\\Leftarrow"),Nr("\\Larr","\\Leftarrow"),Nr("\\lrarr","\\leftrightarrow"),Nr("\\lrArr","\\Leftrightarrow"),Nr("\\Lrarr","\\Leftrightarrow"),Nr("\\Mu","\\mathrm{M}"),Nr("\\natnums","\\mathbb{N}"),Nr("\\Nu","\\mathrm{N}"),Nr("\\Omicron","\\mathrm{O}"),Nr("\\plusmn","\\pm"),Nr("\\rarr","\\rightarrow"),Nr("\\rArr","\\Rightarrow"),Nr("\\Rarr","\\Rightarrow"),Nr("\\real","\\Re"),Nr("\\reals","\\mathbb{R}"),Nr("\\Reals","\\mathbb{R}"),Nr("\\Rho","\\mathrm{P}"),Nr("\\sdot","\\cdot"),Nr("\\sect","\\S"),Nr("\\spades","\\spadesuit"),Nr("\\sub","\\subset"),Nr("\\sube","\\subseteq"),Nr("\\supe","\\supseteq"),Nr("\\Tau","\\mathrm{T}"),Nr("\\thetasym","\\vartheta"),Nr("\\weierp","\\wp"),Nr("\\Zeta","\\mathrm{Z}"),Nr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Nr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Nr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Nr("\\bra","\\mathinner{\\langle{#1}|}"),Nr("\\ket","\\mathinner{|{#1}\\rangle}"),Nr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Nr("\\Bra","\\left\\langle#1\\right|"),Nr("\\Ket","\\left|#1\\right\\rangle");const Hn=e=>t=>{const r=t.consumeArg().tokens,n=t.consumeArg().tokens,o=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();const l=t=>r=>{e&&(r.macros.set("|",i),o.length&&r.macros.set("\\|",a));let s=t;if(!t&&o.length){"|"===r.future().text&&(r.popToken(),s=!0)}return{tokens:s?o:n,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));const h=t.consumeArg().tokens,c=t.expandTokens([...s,...h,...r]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};Nr("\\bra@ket",Hn(!1)),Nr("\\bra@set",Hn(!0)),Nr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Nr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Nr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Nr("\\angln","{\\angl n}"),Nr("\\blue","\\textcolor{##6495ed}{#1}"),Nr("\\orange","\\textcolor{##ffa500}{#1}"),Nr("\\pink","\\textcolor{##ff00af}{#1}"),Nr("\\red","\\textcolor{##df0030}{#1}"),Nr("\\green","\\textcolor{##28ae7b}{#1}"),Nr("\\gray","\\textcolor{gray}{#1}"),Nr("\\purple","\\textcolor{##9d38bd}{#1}"),Nr("\\blueA","\\textcolor{##ccfaff}{#1}"),Nr("\\blueB","\\textcolor{##80f6ff}{#1}"),Nr("\\blueC","\\textcolor{##63d9ea}{#1}"),Nr("\\blueD","\\textcolor{##11accd}{#1}"),Nr("\\blueE","\\textcolor{##0c7f99}{#1}"),Nr("\\tealA","\\textcolor{##94fff5}{#1}"),Nr("\\tealB","\\textcolor{##26edd5}{#1}"),Nr("\\tealC","\\textcolor{##01d1c1}{#1}"),Nr("\\tealD","\\textcolor{##01a995}{#1}"),Nr("\\tealE","\\textcolor{##208170}{#1}"),Nr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Nr("\\greenB","\\textcolor{##8af281}{#1}"),Nr("\\greenC","\\textcolor{##74cf70}{#1}"),Nr("\\greenD","\\textcolor{##1fab54}{#1}"),Nr("\\greenE","\\textcolor{##0d923f}{#1}"),Nr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Nr("\\goldB","\\textcolor{##ffbb71}{#1}"),Nr("\\goldC","\\textcolor{##ff9c39}{#1}"),Nr("\\goldD","\\textcolor{##e07d10}{#1}"),Nr("\\goldE","\\textcolor{##a75a05}{#1}"),Nr("\\redA","\\textcolor{##fca9a9}{#1}"),Nr("\\redB","\\textcolor{##ff8482}{#1}"),Nr("\\redC","\\textcolor{##f9685d}{#1}"),Nr("\\redD","\\textcolor{##e84d39}{#1}"),Nr("\\redE","\\textcolor{##bc2612}{#1}"),Nr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Nr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Nr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Nr("\\maroonD","\\textcolor{##ca337c}{#1}"),Nr("\\maroonE","\\textcolor{##9e034e}{#1}"),Nr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Nr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Nr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Nr("\\purpleD","\\textcolor{##7854ab}{#1}"),Nr("\\purpleE","\\textcolor{##543b78}{#1}"),Nr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Nr("\\mintB","\\textcolor{##edf2df}{#1}"),Nr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Nr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Nr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Nr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Nr("\\grayD","\\textcolor{##d6d8da}{#1}"),Nr("\\grayE","\\textcolor{##babec2}{#1}"),Nr("\\grayF","\\textcolor{##888d93}{#1}"),Nr("\\grayG","\\textcolor{##626569}{#1}"),Nr("\\grayH","\\textcolor{##3b3e40}{#1}"),Nr("\\grayI","\\textcolor{##21242c}{#1}"),Nr("\\kaBlue","\\textcolor{##314453}{#1}"),Nr("\\kaGreen","\\textcolor{##71B307}{#1}");const On={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class En{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Tn(Bn,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new An(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new Ir("EOF",r.loc)),this.pushTokens(n),new Ir("",qr.range(t,r))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){const t=[],r=e&&e.length>0;r||this.consumeSpaces();const o=this.future();let s,i=0,a=0;do{if(s=this.popToken(),t.push(s),"{"===s.text)++i;else if("}"===s.text){if(--i,-1===i)throw new n("Extra }",s)}else if("EOF"===s.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[a]:"}")+"'",s);if(e&&r)if((0===i||1===i&&"{"===e[a])&&s.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(0!==i||r);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");const r=t[0];for(let e=0;ethis.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){const t=this.popToken(),r=t.text,o=t.noexpand?null:this._getExpansion(r);if(null==o||e&&o.unexpandable){if(e&&null==o&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);let s=o.tokens;const i=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){s=s.slice();for(let e=s.length-1;e>=0;--e){let t=s[e];if("#"===t.text){if(0===e)throw new n("Incomplete placeholder at end of macro body",t);if(t=s[--e],"#"===t.text)s.splice(e+1,1);else{if(!/^[1-9]$/.test(t.text))throw new n("Not a valid argument number",t);s.splice(e,2,...i[+t.text-1])}}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){const e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Ir(e)]):void 0}expandTokens(e){const t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){const t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){const t=this.macros.get(e);if(null==t)return t;if(1===e.length){const t=this.lexer.catcodes[e];if(null!=t&&13!==t)return}const r="function"==typeof t?t(this):t;if("string"==typeof r){let e=0;if(-1!==r.indexOf("#")){const t=r.replace(/##/g,"");for(;-1!==t.indexOf("#"+(e+1));)++e}const t=new An(r,this.settings),n=[];let o=t.lex();for(;"EOF"!==o.text;)n.push(o),o=t.lex();n.reverse();return{tokens:n,numArgs:e}}return r}isDefined(e){return this.macros.has(e)||wn.hasOwnProperty(e)||oe.math.hasOwnProperty(e)||oe.text.hasOwnProperty(e)||On.hasOwnProperty(e)}isExpandable(e){const t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:wn.hasOwnProperty(e)&&!wn[e].primitive}}const Ln=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,Dn=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),Vn={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Pn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class Fn{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new En(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){const t=this.nextToken;this.consume(),this.gullet.pushToken(new Ir("}")),this.gullet.pushTokens(e);const r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){const r=[];for(;;){"math"===this.mode&&this.consumeSpaces();const n=this.fetch();if(-1!==Fn.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&wn[n.text]&&wn[n.text].infix)break;const o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){let t,r=-1;for(let o=0;o=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);const r=oe[this.mode][t].group,n=qr.range(e);let s;if(te.hasOwnProperty(r)){const e=r;s={type:"atom",mode:this.mode,family:e,loc:n,text:t}}else s={type:r,mode:this.mode,loc:n,text:t};o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:qr.range(e),text:t}}if(this.consume(),r)for(let t=0;te.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;n=e.search(o),-1!==n;){n>0&&(r.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));const o=t.findIndex((t=>e.startsWith(t.left)));if(n=l(t[o].right,e,t[o].left.length),-1===n)break;const i=e.slice(0,n+t[o].right.length),a=s.test(i)?i:e.slice(t[o].left.length,n);r.push({type:"math",data:a,rawData:i,display:t[o].display}),e=e.slice(n+t[o].right.length)}return""!==e&&r.push({type:"text",data:e}),r};const c=function(e,t){const n=d(e,t.delimiters);if(1===n.length&&"text"===n[0].type)return null;const r=document.createDocumentFragment();for(let e=0;e-1===e.indexOf(" "+t+" ")))&&f(r,t)}}};var p=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},f(e,n)};return o=o.default}()}));
\ No newline at end of file
diff --git a/public/js/shortcodes/gallery.min.0f214e323c6e8797755a37bef9324e195612b47f71b5f6192b197a68c86b089182cdde4d803cb6978ad9e2092e9f1d78a86d94a143a59c398c600745fe12764e.js b/public/js/shortcodes/gallery.min.0f214e323c6e8797755a37bef9324e195612b47f71b5f6192b197a68c86b089182cdde4d803cb6978ad9e2092e9f1d78a86d94a143a59c398c600745fe12764e.js
new file mode 100644
index 0000000..aeac079
--- /dev/null
+++ b/public/js/shortcodes/gallery.min.0f214e323c6e8797755a37bef9324e195612b47f71b5f6192b197a68c86b089182cdde4d803cb6978ad9e2092e9f1d78a86d94a143a59c398c600745fe12764e.js
@@ -0,0 +1 @@
+function _getDefaultPackeryOptions(){return{percentPosition:!0,gutter:5,resize:!0}}function _getPackeryOptions(e){const t=_getDefaultPackeryOptions(),{packeryGutter:n,packeryPercentPosition:s,packeryResize:o}=e.dataset;return{percentPosition:s!==0[0]?s==="true":t.percentPosition,gutter:n!==0[0]?parseInt(n,10):t.gutter,resize:o!==0[0]?o==="true":t.resize}}(function(){window.addEventListener("load",function(){let e=[],t=document.querySelectorAll(".gallery");t.forEach(t=>{let n=new Packery(t,_getPackeryOptions(t));e.push(n)})})})()
\ No newline at end of file
diff --git a/public/js/shortcodes/tabs.min.b9b8a6b2cf6c81163025e44a18c0ccce600efe2dfc29d2d11515fe41b8e1e8e00896759b9e55eab7032ab15d1bec124c32e8996685e563de84ad243eb61ec236.js b/public/js/shortcodes/tabs.min.b9b8a6b2cf6c81163025e44a18c0ccce600efe2dfc29d2d11515fe41b8e1e8e00896759b9e55eab7032ab15d1bec124c32e8996685e563de84ad243eb61ec236.js
new file mode 100644
index 0000000..909d422
--- /dev/null
+++ b/public/js/shortcodes/tabs.min.b9b8a6b2cf6c81163025e44a18c0ccce600efe2dfc29d2d11515fe41b8e1e8e00896759b9e55eab7032ab15d1bec124c32e8996685e563de84ad243eb61ec236.js
@@ -0,0 +1 @@
+function initTabs(){tabClickHandler=e=>{const t=e.target.closest(".tab__button");if(!t)return;const n=t.closest(".tab__container"),o=parseInt(t.dataset.tabIndex),i=t.dataset.tabLabel,s=n.dataset.tabGroup;if(s){const e=document.querySelectorAll(`.tab__container[data-tab-group="${s}"]`);e.forEach(e=>{const t=Array.from(e.querySelectorAll(".tab__button")).find(e=>e.dataset.tabLabel===i);if(t){const n=parseInt(t.dataset.tabIndex);activateTab(e,n)}})}else activateTab(n,o)},document.addEventListener("click",tabClickHandler)}function activateTab(e,t){const n=e.querySelectorAll(".tab__button"),s=e.querySelectorAll(".tab__panel");n.forEach((e,n)=>{n===t?(e.classList.add("tab--active"),e.setAttribute("aria-selected","true")):(e.classList.remove("tab--active"),e.setAttribute("aria-selected","false"))}),s.forEach((e,n)=>{n===t?e.classList.add("tab--active"):e.classList.remove("tab--active")})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initTabs):initTabs()
\ No newline at end of file
diff --git a/public/lib/katex/fonts/KaTeX_AMS-Regular.ttf b/public/lib/katex/fonts/KaTeX_AMS-Regular.ttf
new file mode 100644
index 0000000..c6f9a5e
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_AMS-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_AMS-Regular.woff b/public/lib/katex/fonts/KaTeX_AMS-Regular.woff
new file mode 100644
index 0000000..b804d7b
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_AMS-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_AMS-Regular.woff2 b/public/lib/katex/fonts/KaTeX_AMS-Regular.woff2
new file mode 100644
index 0000000..0acaaff
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_AMS-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf b/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf
new file mode 100644
index 0000000..9ff4a5e
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff b/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff
new file mode 100644
index 0000000..9759710
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2 b/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2
new file mode 100644
index 0000000..f390922
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf b/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf
new file mode 100644
index 0000000..f522294
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff b/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff
new file mode 100644
index 0000000..9bdd534
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2
new file mode 100644
index 0000000..75344a1
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf b/public/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf
new file mode 100644
index 0000000..4e98259
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Fraktur-Bold.woff b/public/lib/katex/fonts/KaTeX_Fraktur-Bold.woff
new file mode 100644
index 0000000..e7730f6
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Fraktur-Bold.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2 b/public/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2
new file mode 100644
index 0000000..395f28b
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf b/public/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf
new file mode 100644
index 0000000..b8461b2
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Fraktur-Regular.woff b/public/lib/katex/fonts/KaTeX_Fraktur-Regular.woff
new file mode 100644
index 0000000..acab069
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Fraktur-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Fraktur-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Fraktur-Regular.woff2
new file mode 100644
index 0000000..735f694
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Fraktur-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Bold.ttf b/public/lib/katex/fonts/KaTeX_Main-Bold.ttf
new file mode 100644
index 0000000..4060e62
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Bold.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Bold.woff b/public/lib/katex/fonts/KaTeX_Main-Bold.woff
new file mode 100644
index 0000000..f38136a
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Bold.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Bold.woff2 b/public/lib/katex/fonts/KaTeX_Main-Bold.woff2
new file mode 100644
index 0000000..ab2ad21
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Bold.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf b/public/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf
new file mode 100644
index 0000000..dc00797
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-BoldItalic.woff b/public/lib/katex/fonts/KaTeX_Main-BoldItalic.woff
new file mode 100644
index 0000000..67807b0
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-BoldItalic.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-BoldItalic.woff2 b/public/lib/katex/fonts/KaTeX_Main-BoldItalic.woff2
new file mode 100644
index 0000000..5931794
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-BoldItalic.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Italic.ttf b/public/lib/katex/fonts/KaTeX_Main-Italic.ttf
new file mode 100644
index 0000000..0e9b0f3
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Italic.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Italic.woff b/public/lib/katex/fonts/KaTeX_Main-Italic.woff
new file mode 100644
index 0000000..6f43b59
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Italic.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Italic.woff2 b/public/lib/katex/fonts/KaTeX_Main-Italic.woff2
new file mode 100644
index 0000000..b50920e
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Italic.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Regular.ttf b/public/lib/katex/fonts/KaTeX_Main-Regular.ttf
new file mode 100644
index 0000000..dd45e1e
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Regular.woff b/public/lib/katex/fonts/KaTeX_Main-Regular.woff
new file mode 100644
index 0000000..21f5812
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Main-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Main-Regular.woff2
new file mode 100644
index 0000000..eb24a7b
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Main-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf b/public/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf
new file mode 100644
index 0000000..728ce7a
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Math-BoldItalic.woff b/public/lib/katex/fonts/KaTeX_Math-BoldItalic.woff
new file mode 100644
index 0000000..0ae390d
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Math-BoldItalic.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Math-BoldItalic.woff2 b/public/lib/katex/fonts/KaTeX_Math-BoldItalic.woff2
new file mode 100644
index 0000000..2965702
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Math-BoldItalic.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Math-Italic.ttf b/public/lib/katex/fonts/KaTeX_Math-Italic.ttf
new file mode 100644
index 0000000..70d559b
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Math-Italic.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Math-Italic.woff b/public/lib/katex/fonts/KaTeX_Math-Italic.woff
new file mode 100644
index 0000000..eb5159d
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Math-Italic.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Math-Italic.woff2 b/public/lib/katex/fonts/KaTeX_Math-Italic.woff2
new file mode 100644
index 0000000..215c143
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Math-Italic.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf b/public/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf
new file mode 100644
index 0000000..2f65a8a
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Bold.woff b/public/lib/katex/fonts/KaTeX_SansSerif-Bold.woff
new file mode 100644
index 0000000..8d47c02
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Bold.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Bold.woff2 b/public/lib/katex/fonts/KaTeX_SansSerif-Bold.woff2
new file mode 100644
index 0000000..cfaa3bd
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Bold.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Italic.ttf b/public/lib/katex/fonts/KaTeX_SansSerif-Italic.ttf
new file mode 100644
index 0000000..d5850df
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Italic.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Italic.woff b/public/lib/katex/fonts/KaTeX_SansSerif-Italic.woff
new file mode 100644
index 0000000..7e02df9
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Italic.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Italic.woff2 b/public/lib/katex/fonts/KaTeX_SansSerif-Italic.woff2
new file mode 100644
index 0000000..349c06d
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Italic.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Regular.ttf b/public/lib/katex/fonts/KaTeX_SansSerif-Regular.ttf
new file mode 100644
index 0000000..537279f
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Regular.woff b/public/lib/katex/fonts/KaTeX_SansSerif-Regular.woff
new file mode 100644
index 0000000..31b8482
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_SansSerif-Regular.woff2 b/public/lib/katex/fonts/KaTeX_SansSerif-Regular.woff2
new file mode 100644
index 0000000..a90eea8
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_SansSerif-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Script-Regular.ttf b/public/lib/katex/fonts/KaTeX_Script-Regular.ttf
new file mode 100644
index 0000000..fd679bf
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Script-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Script-Regular.woff b/public/lib/katex/fonts/KaTeX_Script-Regular.woff
new file mode 100644
index 0000000..0e7da82
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Script-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Script-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Script-Regular.woff2
new file mode 100644
index 0000000..b3048fc
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Script-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Size1-Regular.ttf b/public/lib/katex/fonts/KaTeX_Size1-Regular.ttf
new file mode 100644
index 0000000..871fd7d
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size1-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Size1-Regular.woff b/public/lib/katex/fonts/KaTeX_Size1-Regular.woff
new file mode 100644
index 0000000..7f292d9
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size1-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Size1-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Size1-Regular.woff2
new file mode 100644
index 0000000..c5a8462
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size1-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Size2-Regular.ttf b/public/lib/katex/fonts/KaTeX_Size2-Regular.ttf
new file mode 100644
index 0000000..7a212ca
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size2-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Size2-Regular.woff b/public/lib/katex/fonts/KaTeX_Size2-Regular.woff
new file mode 100644
index 0000000..d241d9b
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size2-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Size2-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Size2-Regular.woff2
new file mode 100644
index 0000000..e1bccfe
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size2-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Size3-Regular.ttf b/public/lib/katex/fonts/KaTeX_Size3-Regular.ttf
new file mode 100644
index 0000000..00bff34
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size3-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Size3-Regular.woff b/public/lib/katex/fonts/KaTeX_Size3-Regular.woff
new file mode 100644
index 0000000..e6e9b65
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size3-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Size3-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Size3-Regular.woff2
new file mode 100644
index 0000000..249a286
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size3-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Size4-Regular.ttf b/public/lib/katex/fonts/KaTeX_Size4-Regular.ttf
new file mode 100644
index 0000000..74f0892
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size4-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Size4-Regular.woff b/public/lib/katex/fonts/KaTeX_Size4-Regular.woff
new file mode 100644
index 0000000..e1ec545
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size4-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Size4-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Size4-Regular.woff2
new file mode 100644
index 0000000..680c130
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Size4-Regular.woff2 differ
diff --git a/public/lib/katex/fonts/KaTeX_Typewriter-Regular.ttf b/public/lib/katex/fonts/KaTeX_Typewriter-Regular.ttf
new file mode 100644
index 0000000..c83252c
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Typewriter-Regular.ttf differ
diff --git a/public/lib/katex/fonts/KaTeX_Typewriter-Regular.woff b/public/lib/katex/fonts/KaTeX_Typewriter-Regular.woff
new file mode 100644
index 0000000..2432419
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Typewriter-Regular.woff differ
diff --git a/public/lib/katex/fonts/KaTeX_Typewriter-Regular.woff2 b/public/lib/katex/fonts/KaTeX_Typewriter-Regular.woff2
new file mode 100644
index 0000000..771f1af
Binary files /dev/null and b/public/lib/katex/fonts/KaTeX_Typewriter-Regular.woff2 differ
diff --git a/public/lib/katex/katex.min.8165100d4e41db6506cffac421025eebc765641d721cafd22814d4f11dd1da51dbdf6b6de56d5f986eb215db71c32019a2e6b1eaa0d57c6196d23da6ccfd659c.css b/public/lib/katex/katex.min.8165100d4e41db6506cffac421025eebc765641d721cafd22814d4f11dd1da51dbdf6b6de56d5f986eb215db71c32019a2e6b1eaa0d57c6196d23da6ccfd659c.css
new file mode 100644
index 0000000..3fffaff
--- /dev/null
+++ b/public/lib/katex/katex.min.8165100d4e41db6506cffac421025eebc765641d721cafd22814d4f11dd1da51dbdf6b6de56d5f986eb215db71c32019a2e6b1eaa0d57c6196d23da6ccfd659c.css
@@ -0,0 +1 @@
+@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.28"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
diff --git a/public/lib/lite-youtube-embed/lite-yt-embed.7cded41daf98143e07df8cc0dc018ccf6e59d20063687609740707b153da7a52a93fb7e030a92507d60c27ebf490778693a4ea8947ac69ce4b213a89eb55af7d.js b/public/lib/lite-youtube-embed/lite-yt-embed.7cded41daf98143e07df8cc0dc018ccf6e59d20063687609740707b153da7a52a93fb7e030a92507d60c27ebf490778693a4ea8947ac69ce4b213a89eb55af7d.js
new file mode 100644
index 0000000..ec4b613
--- /dev/null
+++ b/public/lib/lite-youtube-embed/lite-yt-embed.7cded41daf98143e07df8cc0dc018ccf6e59d20063687609740707b153da7a52a93fb7e030a92507d60c27ebf490778693a4ea8947ac69ce4b213a89eb55af7d.js
@@ -0,0 +1,241 @@
+/**
+ * A lightweight youtube embed. Still should feel the same to the user, just MUCH faster to initialize and paint.
+ *
+ * Thx to these as the inspiration
+ * https://storage.googleapis.com/amp-vs-non-amp/youtube-lazy.html
+ * https://autoplay-youtube-player.glitch.me/
+ *
+ * Once built it, I also found these:
+ * https://github.com/ampproject/amphtml/blob/master/extensions/amp-youtube (👍👍)
+ * https://github.com/Daugilas/lazyYT
+ * https://github.com/vb/lazyframe
+ */
+class LiteYTEmbed extends HTMLElement {
+ connectedCallback() {
+ this.videoId = this.getAttribute('videoid');
+
+ let playBtnEl = this.querySelector('.lyt-playbtn,.lty-playbtn');
+ // A label for the button takes priority over a [playlabel] attribute on the custom-element
+ this.playLabel = (playBtnEl && playBtnEl.textContent.trim()) || this.getAttribute('playlabel') || 'Play';
+
+ this.dataset.title = this.getAttribute('title') || "";
+
+ /**
+ * Lo, the youtube poster image! (aka the thumbnail, image placeholder, etc)
+ *
+ * See https://github.com/paulirish/lite-youtube-embed/blob/master/youtube-thumbnail-urls.md
+ */
+ if (!this.style.backgroundImage) {
+ this.style.backgroundImage = `url("https://i.ytimg.com/vi/${this.videoId}/hqdefault.jpg")`;
+ this.upgradePosterImage();
+ }
+
+ // Set up play button, and its visually hidden label
+ if (!playBtnEl) {
+ playBtnEl = document.createElement('button');
+ playBtnEl.type = 'button';
+ // Include the mispelled 'lty-' in case it's still being used. https://github.com/paulirish/lite-youtube-embed/issues/65
+ playBtnEl.classList.add('lyt-playbtn', 'lty-playbtn');
+ this.append(playBtnEl);
+ }
+ if (!playBtnEl.textContent) {
+ const playBtnLabelEl = document.createElement('span');
+ playBtnLabelEl.className = 'lyt-visually-hidden';
+ playBtnLabelEl.textContent = this.playLabel;
+ playBtnEl.append(playBtnLabelEl);
+ }
+
+ this.addNoscriptIframe();
+
+ // for the PE pattern, change anchor's semantics to button
+ if(playBtnEl.nodeName === 'A'){
+ playBtnEl.removeAttribute('href');
+ playBtnEl.setAttribute('tabindex', '0');
+ playBtnEl.setAttribute('role', 'button');
+ // fake button needs keyboard help
+ playBtnEl.addEventListener('keydown', e => {
+ if( e.key === 'Enter' || e.key === ' ' ){
+ e.preventDefault();
+ this.activate();
+ }
+ });
+ }
+
+ // On hover (or tap), warm up the TCP connections we're (likely) about to use.
+ this.addEventListener('pointerover', LiteYTEmbed.warmConnections, {once: true});
+ this.addEventListener('focusin', LiteYTEmbed.warmConnections, {once: true});
+
+ // Once the user clicks, add the real iframe and drop our play button
+ // TODO: In the future we could be like amp-youtube and silently swap in the iframe during idle time
+ // We'd want to only do this for in-viewport or near-viewport ones: https://github.com/ampproject/amphtml/pull/5003
+ this.addEventListener('click', this.activate);
+
+ // Chrome & Edge desktop have no problem with the basic YouTube Embed with ?autoplay=1
+ // However Safari desktop and most/all mobile browsers do not successfully track the user gesture of clicking through the creation/loading of the iframe,
+ // so they don't autoplay automatically. Instead we must load an additional 2 sequential JS files (1KB + 165KB) (un-br) for the YT Player API
+ // TODO: Try loading the the YT API in parallel with our iframe and then attaching/playing it. #82
+ this.needsYTApi = this.hasAttribute("js-api") || navigator.vendor.includes('Apple') || navigator.userAgent.includes('Mobi');
+ }
+
+ /**
+ * Add a to the head
+ */
+ static addPrefetch(kind, url, as) {
+ const linkEl = document.createElement('link');
+ linkEl.rel = kind;
+ linkEl.href = url;
+ if (as) {
+ linkEl.as = as;
+ }
+ document.head.append(linkEl);
+ }
+
+ /**
+ * Begin pre-connecting to warm up the iframe load
+ * Since the embed's network requests load within its iframe,
+ * preload/prefetch'ing them outside the iframe will only cause double-downloads.
+ * So, the best we can do is warm up a few connections to origins that are in the critical path.
+ *
+ * Maybe ` ` would work, but it's unsupported: http://crbug.com/593267
+ * But TBH, I don't think it'll happen soon with Site Isolation and split caches adding serious complexity.
+ */
+ static warmConnections() {
+ if (LiteYTEmbed.preconnected) return;
+
+ // The iframe document and most of its subresources come right off youtube.com
+ LiteYTEmbed.addPrefetch('preconnect', 'https://www.youtube-nocookie.com');
+ // The botguard script is fetched off from google.com
+ LiteYTEmbed.addPrefetch('preconnect', 'https://www.google.com');
+
+ // Not certain if these ad related domains are in the critical path. Could verify with domain-specific throttling.
+ LiteYTEmbed.addPrefetch('preconnect', 'https://googleads.g.doubleclick.net');
+ LiteYTEmbed.addPrefetch('preconnect', 'https://static.doubleclick.net');
+
+ LiteYTEmbed.preconnected = true;
+ }
+
+ fetchYTPlayerApi() {
+ if (window.YT || (window.YT && window.YT.Player)) return;
+
+ this.ytApiPromise = new Promise((res, rej) => {
+ var el = document.createElement('script');
+ el.src = 'https://www.youtube.com/iframe_api';
+ el.async = true;
+ el.onload = _ => {
+ YT.ready(res);
+ };
+ el.onerror = rej;
+ this.append(el);
+ });
+ }
+
+ /** Return the YT Player API instance. (Public L-YT-E API) */
+ async getYTPlayer() {
+ if(!this.playerPromise) {
+ await this.activate();
+ }
+
+ return this.playerPromise;
+ }
+
+ async addYTPlayerIframe() {
+ this.fetchYTPlayerApi();
+ await this.ytApiPromise;
+
+ const videoPlaceholderEl = document.createElement('div')
+ this.append(videoPlaceholderEl);
+
+ const paramsObj = Object.fromEntries(this.getParams().entries());
+
+ this.playerPromise = new Promise(resolve => {
+ let player = new YT.Player(videoPlaceholderEl, {
+ width: '100%',
+ videoId: this.videoId,
+ playerVars: paramsObj,
+ events: {
+ 'onReady': event => {
+ event.target.playVideo();
+ resolve(player);
+ }
+ }
+ });
+ });
+ }
+
+ // Add the iframe within for indexability discoverability. See https://github.com/paulirish/lite-youtube-embed/issues/105
+ addNoscriptIframe() {
+ const iframeEl = this.createBasicIframe();
+ const noscriptEl = document.createElement('noscript');
+ // Appending into noscript isn't equivalant for mysterious reasons: https://html.spec.whatwg.org/multipage/scripting.html#the-noscript-element
+ noscriptEl.innerHTML = iframeEl.outerHTML;
+ this.append(noscriptEl);
+ }
+
+ getParams() {
+ const params = new URLSearchParams(this.getAttribute('params') || []);
+ params.append('autoplay', '1');
+ params.append('playsinline', '1');
+ return params;
+ }
+
+ async activate(){
+ if (this.classList.contains('lyt-activated')) return;
+ this.classList.add('lyt-activated');
+
+ if (this.needsYTApi) {
+ return this.addYTPlayerIframe(this.getParams());
+ }
+
+ const iframeEl = this.createBasicIframe();
+ this.append(iframeEl);
+
+ // Set focus for a11y
+ iframeEl.focus();
+ }
+
+ createBasicIframe(){
+ const iframeEl = document.createElement('iframe');
+ iframeEl.width = 560;
+ iframeEl.height = 315;
+ // No encoding necessary as [title] is safe. https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html#:~:text=Safe%20HTML%20Attributes%20include
+ iframeEl.title = this.playLabel;
+ iframeEl.allow = 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture';
+ iframeEl.allowFullscreen = true;
+ // Required by Youtube to fix Error 153
+ iframeEl.referrerPolicy = 'strict-origin-when-cross-origin';
+ // AFAIK, the encoding here isn't necessary for XSS, but we'll do it only because this is a URL
+ // https://stackoverflow.com/q/64959723/89484
+ iframeEl.src = `https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${this.getParams().toString()}`;
+ return iframeEl;
+ }
+
+ /**
+ * In the spirit of the `lowsrc` attribute and progressive JPEGs, we'll upgrade the reliable
+ * poster image to a higher resolution one, if it's available.
+ * Interestingly this sddefault webp is often smaller in filesize, but we will still attempt it second
+ * because getting _an_ image in front of the user if our first priority.
+ *
+ * See https://github.com/paulirish/lite-youtube-embed/blob/master/youtube-thumbnail-urls.md for more details
+ */
+ upgradePosterImage() {
+ // Defer to reduce network contention.
+ setTimeout(() => {
+ const webpUrl = `https://i.ytimg.com/vi_webp/${this.videoId}/sddefault.webp`;
+ const img = new Image();
+ img.fetchPriority = 'low'; // low priority to reduce network contention
+ img.referrerpolicy = 'origin'; // Not 100% sure it's needed, but https://github.com/ampproject/amphtml/pull/3940
+ img.src = webpUrl;
+ img.onload = e => {
+ // A pretty ugly hack since onerror won't fire on YouTube image 404. This is (probably) due to
+ // Youtube's style of returning data even with a 404 status. That data is a 120x90 placeholder image.
+ // … per "annoying yt 404 behavior" in the .md
+ const noAvailablePoster = e.target.naturalHeight == 90 && e.target.naturalWidth == 120;
+ if (noAvailablePoster) return;
+
+ this.style.backgroundImage = `url("${webpUrl}")`;
+ }
+ }, 100);
+ }
+}
+// Register custom element
+customElements.define('lite-youtube', LiteYTEmbed);
diff --git a/public/lib/lite-youtube-embed/lite-yt-embed.9316c068f6459dd9838069f812a91772f6eba68957a6c0517bc827936c6a3883384a6303d4ee49ff129d20773b1566d8b1d0693b9b67697e1af6fdf81e0380ca.css b/public/lib/lite-youtube-embed/lite-yt-embed.9316c068f6459dd9838069f812a91772f6eba68957a6c0517bc827936c6a3883384a6303d4ee49ff129d20773b1566d8b1d0693b9b67697e1af6fdf81e0380ca.css
new file mode 100644
index 0000000..40fb443
--- /dev/null
+++ b/public/lib/lite-youtube-embed/lite-yt-embed.9316c068f6459dd9838069f812a91772f6eba68957a6c0517bc827936c6a3883384a6303d4ee49ff129d20773b1566d8b1d0693b9b67697e1af6fdf81e0380ca.css
@@ -0,0 +1,95 @@
+lite-youtube {
+ background-color: #000;
+ position: relative;
+ display: block;
+ contain: content;
+ background-position: center center;
+ background-size: cover;
+ cursor: pointer;
+ max-width: 720px;
+}
+
+/* gradient */
+lite-youtube::before {
+ content: attr(data-title);
+ display: block;
+ position: absolute;
+ top: 0;
+ /* Pixel-perfect port of YT's gradient PNG, using https://github.com/bluesmoon/pngtocss plus optimizations */
+ background-image: linear-gradient(180deg, rgb(0 0 0 / 67%) 0%, rgb(0 0 0 / 54%) 14%, rgb(0 0 0 / 15%) 54%, rgb(0 0 0 / 5%) 72%, rgb(0 0 0 / 0%) 94%);
+ height: 99px;
+ width: 100%;
+ font-family: "YouTube Noto",Roboto,Arial,Helvetica,sans-serif;
+ color: hsl(0deg 0% 93.33%);
+ text-shadow: 0 0 2px rgba(0,0,0,.5);
+ font-size: 18px;
+ padding: 25px 20px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ box-sizing: border-box;
+}
+
+lite-youtube:hover::before {
+ color: white;
+}
+
+/* responsive iframe with a 16:9 aspect ratio
+ thanks https://css-tricks.com/responsive-iframes/
+*/
+lite-youtube::after {
+ content: "";
+ display: block;
+ padding-bottom: calc(100% / (16 / 9));
+}
+lite-youtube > iframe {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ border: 0;
+}
+
+/* play button */
+lite-youtube > .lyt-playbtn {
+ display: block;
+ /* Make the button element cover the whole area for a large hover/click target… */
+ width: 100%;
+ height: 100%;
+ /* …but visually it's still the same size */
+ background: no-repeat center/68px 48px;
+ /* YT's actual play button svg */
+ background-image: url('data:image/svg+xml;utf8, ');
+ position: absolute;
+ cursor: pointer;
+ z-index: 1;
+ filter: grayscale(100%);
+ transition: filter .1s cubic-bezier(0, 0, 0.2, 1);
+ border: 0;
+}
+
+lite-youtube:hover > .lyt-playbtn,
+lite-youtube .lyt-playbtn:focus {
+ filter: none;
+}
+
+/* Post-click styles */
+lite-youtube.lyt-activated {
+ cursor: unset;
+}
+lite-youtube.lyt-activated::before,
+lite-youtube.lyt-activated > .lyt-playbtn {
+ opacity: 0;
+ pointer-events: none;
+}
+
+.lyt-visually-hidden {
+ clip: rect(0 0 0 0);
+ clip-path: inset(50%);
+ height: 1px;
+ overflow: hidden;
+ position: absolute;
+ white-space: nowrap;
+ width: 1px;
+ }
diff --git a/public/lib/packery/packery.pkgd.min.8b0cbb30a72acb6a0188f690a3768e9c531f056dcf18df8d739ececb994387d28137ed684b2f23da6df5a0c416eb4f8818d5db4493419a9b97c7452ac602fbd4.js b/public/lib/packery/packery.pkgd.min.8b0cbb30a72acb6a0188f690a3768e9c531f056dcf18df8d739ececb994387d28137ed684b2f23da6df5a0c416eb4f8818d5db4493419a9b97c7452ac602fbd4.js
new file mode 100644
index 0000000..0215dc1
--- /dev/null
+++ b/public/lib/packery/packery.pkgd.min.8b0cbb30a72acb6a0188f690a3768e9c531f056dcf18df8d739ececb994387d28137ed684b2f23da6df5a0c416eb4f8818d5db4493419a9b97c7452ac602fbd4.js
@@ -0,0 +1,10 @@
+/*!
+ * Packery v3.0.0
+ * Gapless, draggable grid layouts
+ * MIT License
+ * https://packery.metafizzy.co
+ * Copyright 2013-2025 Metafizzy
+ */
+
+!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function h(t,e,n){var o,s="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var c=u[e];if(!c||"_"==e.charAt(0))return void r(s+" is not a valid method");var d=c.apply(u,n);o=void 0===o?d:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new s(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!c){c=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r=200==Math.round(t(o.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=n(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var c=a.isBorderBox="border-box"==s.boxSizing,d=0;u>d;d++){var l=h[d],f=s[l],p=parseFloat(f);a[l]=isNaN(p)?0:p}var g=a.paddingLeft+a.paddingRight,m=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,x=a.borderTopWidth+a.borderBottomWidth,b=c&&r,E=t(s.width);E!==!1&&(a.width=E+(b?0:g+_));var w=t(s.height);return w!==!1&&(a.height=w+(b?0:m+x)),a.innerWidth=a.width-(g+_),a.innerHeight=a.height-(m+x),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,c=!1;return s}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o=t.x+e&&this.y+this.height>=t.y+i},e.overlaps=function(t){var e=this.x+this.width,i=this.y+this.height,n=t.x+t.width,o=t.y+t.height;return this.xt.x&&this.yt.y},e.getMaximalFreeRects=function(e){if(!this.overlaps(e))return!1;var i,n=[],o=this.x+this.width,s=this.y+this.height,r=e.x+e.width,a=e.y+e.height;return this.yr&&(i=new t({x:r,y:this.y,width:o-r,height:this.height}),n.push(i)),s>a&&(i=new t({x:this.x,y:a,width:this.width,height:s-a}),n.push(i)),this.x=t.width&&this.height>=t.height},t}),function(t,e){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],e);else if("object"==typeof module&&module.exports)module.exports=e(require("./rect"));else{var i=t.Packery=t.Packery||{};i.Packer=e(i.Rect)}}(window,function(t){"use strict";function e(t,e,i){this.width=t||0,this.height=e||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}var i=e.prototype;i.reset=function(){this.spaces=[];var e=new t({x:0,y:0,width:this.width,height:this.height});this.spaces.push(e),this.sorter=n[this.sortDirection]||n.downwardLeftToRight},i.pack=function(t){for(var e=0;e=t.x+t.width&&i.height>=t.height-.01;if(n){t.y=i.y,this.placed(t);break}}},i.rowPack=function(t){for(var e=0;e=t.y+t.height&&i.width>=t.width-.01;if(n){t.x=i.x,this.placed(t);break}}},i.placeInSpace=function(t,e){t.x=e.x,t.y=e.y,this.placed(t)},i.placed=function(t){for(var e=[],i=0;ii&&1>n;return o?void this.goTo(t,e):void a.apply(this,arguments)},s.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&n&&(this.element.style[n]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},s.disablePlacing=function(){this.isPlacing=!1},s.removeElem=function(){var t=this.element.parentNode;t&&t.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},s.showDropPlaceholder=function(){var t=this.dropPlaceholder;t||(t=this.dropPlaceholder=document.createElement("div"),t.className="packery-drop-placeholder",t.style.position="absolute"),t.style.width=this.size.width+"px",t.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(t)},s.positionDropPlaceholder=function(){this.dropPlaceholder.style[n]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},s.hideDropPlaceholder=function(){var t=this.dropPlaceholder.parentNode;t&&t.removeChild(this.dropPlaceholder)},o}),function(t,e){"function"==typeof define&&define.amd?define(["get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):t.Packery=e(t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(t,e,i,n,o){"use strict";function s(t,e){return t.position.y-e.position.y||t.position.x-e.position.x}function r(t,e){return t.position.x-e.position.x||t.position.y-e.position.y}function a(t,e){var i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}i.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var h=e.create("packery");h.Item=o;var u=h.prototype;u._create=function(){e.prototype._create.call(this),this.packer=new n,this.shiftPacker=new n,this.isEnabled=!0,this.dragItemCount=0;var t=this;this.handleDraggabilly={dragStart:function(){t.itemDragStart(this.element)},dragMove:function(){t.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){t.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(e,i){i&&t.itemDragStart(e.currentTarget)},drag:function(e,i){i&&t.itemDragMove(e.currentTarget,i.position.left,i.position.top)},stop:function(e,i){i&&t.itemDragEnd(e.currentTarget)}}},u._resetLayout=function(){this.getSize(),this._getMeasurements();var t,e,i;this._getOption("horizontal")?(t=1/0,e=this.size.innerHeight+this.gutter,i="rightwardTopToBottom"):(t=this.size.innerWidth+this.gutter,e=1/0,i="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=t,this.packer.height=this.shiftPacker.height=e,this.packer.sortDirection=this.shiftPacker.sortDirection=i,this.packer.reset(),this.maxY=0,this.maxX=0},u._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},u._getItemLayoutPosition=function(t){if(this._setRectSize(t.element,t.rect),this.isShifting||this.dragItemCount>0){var e=this._getPackMethod();this.packer[e](t.rect)}else this.packer.pack(t.rect);return this._setMaxXY(t.rect),t.rect},u.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},u._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},u._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},u._setRectSize=function(e,i){var n=t(e),o=n.outerWidth,s=n.outerHeight;(o||s)&&(o=this._applyGridGutter(o,this.columnWidth),s=this._applyGridGutter(s,this.rowHeight)),i.width=Math.min(o,this.packer.width),i.height=Math.min(s,this.packer.height)},u._applyGridGutter=function(t,e){if(!e)return t+this.gutter;e+=this.gutter;var i=t%e,n=i&&1>i?"round":"ceil";return t=Math[n](t/e)*e},u._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},u._manageStamp=function(t){var e,n=this.getItem(t);if(n&&n.isPlacing)e=n.rect;else{var o=this._getElementOffset(t);e=new i({x:this._getOption("originLeft")?o.left:o.right,y:this._getOption("originTop")?o.top:o.bottom})}this._setRectSize(t,e),this.packer.placed(e),this._setMaxXY(e)},u.sortItemsByPosition=function(){var t=this._getOption("horizontal")?r:s;this.items.sort(t)},u.fit=function(t,e,i){var n=this.getItem(t);n&&(this.stamp(n.element),n.enablePlacing(),this.updateShiftTargets(n),e=void 0===e?n.rect.x:e,i=void 0===i?n.rect.y:i,this.shift(n,e,i),this._bindFitEvents(n),n.moveTo(n.rect.x,n.rect.y),this.shiftLayout(),this.unstamp(n.element),this.sortItemsByPosition(),n.disablePlacing())},u._bindFitEvents=function(t){function e(){n++,2==n&&i.dispatchEvent("fitComplete",null,[t])}var i=this,n=0;t.once("layout",e),this.once("layoutComplete",e)},u.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},u.needsResizeLayout=function(){var e=t(this.element),i=this._getOption("horizontal")?"innerHeight":"innerWidth";return e[i]!=this.size[i]},u.resizeShiftPercentLayout=function(){var e=this._getItemsForLayout(this.items),i=this._getOption("horizontal"),n=i?"y":"x",o=i?"height":"width",s=i?"rowHeight":"columnWidth",r=i?"innerHeight":"innerWidth",a=this[s];if(a=a&&a+this.gutter){this._getMeasurements();var h=this[s]+this.gutter;e.forEach(function(t){var e=Math.round(t.rect[n]/a);t.rect[n]=e*h})}else{var u=t(this.element)[r]+this.gutter,c=this.packer[o];e.forEach(function(t){t.rect[n]=t.rect[n]/c*u})}this.shiftLayout()},u.itemDragStart=function(t){if(this.isEnabled){this.stamp(t);var e=this.getItem(t);e&&(e.enablePlacing(),e.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(e))}},u.updateShiftTargets=function(t){this.shiftPacker.reset(),this._getBoundingRect();var e=this._getOption("originLeft"),n=this._getOption("originTop");this.stamps.forEach(function(t){var o=this.getItem(t);if(!o||!o.isPlacing){var s=this._getElementOffset(t),r=new i({x:e?s.left:s.right,y:n?s.top:s.bottom});this._setRectSize(t,r),this.shiftPacker.placed(r)}},this);var o=this._getOption("horizontal"),s=o?"rowHeight":"columnWidth",r=o?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var a,h=this[s];if(h=h&&h+this.gutter){var u=Math.ceil(t.rect[r]/h),c=Math.floor((this.shiftPacker[r]+this.gutter)/h);a=(c-u)*h;for(var d=0;c>d;d++){var l=o?0:d*h,f=o?d*h:0;this._addShiftTarget(l,f,a)}}else a=this.shiftPacker[r]+this.gutter-t.rect[r],this._addShiftTarget(0,0,a);var p=this._getItemsForLayout(this.items),g=this._getPackMethod();p.forEach(function(t){var e=t.rect;this._setRectSize(t.element,e),this.shiftPacker[g](e),this._addShiftTarget(e.x,e.y,a);var i=o?e.x+e.width:e.x,n=o?e.y:e.y+e.height;if(this._addShiftTarget(i,n,a),h)for(var s=Math.round(e[r]/h),u=1;s>u;u++){var c=o?i:e.x+h*u,d=o?e.y+h*u:n;this._addShiftTarget(c,d,a)}},this)},u._addShiftTarget=function(t,e,i){var n=this._getOption("horizontal")?e:t;if(!(0!==n&&n>i)){var o=t+","+e,s=-1!=this.shiftTargetKeys.indexOf(o);s||(this.shiftTargetKeys.push(o),this.shiftTargets.push({x:t,y:e}))}},u.shift=function(t,e,i){var n,o=1/0,s={x:e,y:i};this.shiftTargets.forEach(function(t){
+var e=a(t,s);o>e&&(n=t,o=e)}),t.rect.x=n.x,t.rect.y=n.y};var c=120;u.itemDragMove=function(t,e,i){function n(){s.shift(o,e,i),o.positionDropPlaceholder(),s.layout()}var o=this.isEnabled&&this.getItem(t);if(o){e-=this.size.paddingLeft,i-=this.size.paddingTop;var s=this,r=new Date,a=this._itemDragTime&&r-this._itemDragTimeP in L?jl(L,P,{enumerable:!0,configurable:!0,writable:!0,value:R}):L[P]=R;var $i=(L,P,R)=>(Ul(L,typeof P!="symbol"?P+"":P,R),R);/*!
+* TW Elements
+* Version: FREE 2.0.0
+*
+* Copyright: Material Design for Bootstrap
+* https://mdbootstrap.com/
+*
+* Read the license: https://tw-elements.com/license/
+*
+*
+* Documentation: https://tw-elements.com/
+*
+* Support: https://mdbootstrap.com/support/cat/twe
+*
+* Contact: tailwind@mdbootstrap.com
+*
+*/const P=(()=>{const i={};let t=1;return{set(e,s,n){typeof e[s]>"u"&&(e[s]={key:s,id:t},t++),i[e[s].id]=n},get(e,s){if(!e||typeof e[s]>"u")return null;const n=e[s];return n.key===s?i[n.id]:null},delete(e,s){if(typeof e[s]>"u")return;const n=e[s];n.key===s&&(delete i[n.id],delete e[s])}}})(),R={setData(i,t,e){P.set(i,t,e)},getData(i,t){return P.get(i,t)},removeData(i,t){P.delete(i,t)}},Bn=1e6,jn=1e3,Ie="transitionend",Un=i=>i==null?`${i}`:{}.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase(),Yn=i=>{do i+=Math.floor(Math.random()*Bn);while(document.getElementById(i));return i},Ii=i=>{let t=i.getAttribute("data-twe-target");if(!t||t==="#"){let e=i.getAttribute("href");if(!e||!e.includes("#")&&!e.startsWith("."))return null;e.includes("#")&&!e.startsWith("#")&&(e=`#${e.split("#")[1]}`),t=e&&e!=="#"?e.trim():null}return t},Re=i=>{const t=Ii(i);return t&&document.querySelector(t)?t:null},st=i=>{const t=Ii(i);return t?document.querySelector(t):null},ke=i=>{if(!i)return 0;let{transitionDuration:t,transitionDelay:e}=window.getComputedStyle(i);const s=Number.parseFloat(t),n=Number.parseFloat(e);return!s&&!n?0:(t=t.split(",")[0],e=e.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(e))*jn)},Ri=i=>{i.dispatchEvent(new Event(Ie))},yt=i=>!i||typeof i!="object"?!1:(typeof i.jquery<"u"&&(i=i[0]),typeof i.nodeType<"u"),nt=i=>yt(i)?i.jquery?i[0]:i:typeof i=="string"&&i.length>0?document.querySelector(i):null,x=(i,t,e)=>{Object.keys(e).forEach(s=>{const n=e[s],r=t[s],o=r&&yt(r)?"element":Un(r);if(!new RegExp(n).test(o))throw new Error(`${i.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)})},Ct=i=>{if(!i)return!1;if(i.style&&i.parentNode&&i.parentNode.style){const t=getComputedStyle(i),e=getComputedStyle(i.parentNode);return t.display!=="none"&&e.display!=="none"&&t.visibility!=="hidden"}return!1},ct=i=>!i||i.nodeType!==Node.ELEMENT_NODE||i.classList.contains("disabled")?!0:typeof i.disabled<"u"?i.disabled:i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false",ki=i=>{if(!document.documentElement.attachShadow)return null;if(typeof i.getRootNode=="function"){const t=i.getRootNode();return t instanceof ShadowRoot?t:null}return i instanceof ShadowRoot?i:i.parentNode?ki(i.parentNode):null},se=()=>function(){},Ut=i=>{i.offsetHeight},xi=()=>{const{jQuery:i}=window;return i&&!document.body.hasAttribute("data-twe-no-jquery")?i:null},xe=[],Pi=i=>{document.readyState==="loading"?(xe.length||document.addEventListener("DOMContentLoaded",()=>{xe.forEach(t=>t())}),xe.push(i)):i()},W=()=>document.documentElement.dir==="rtl",Yt=i=>document.createElement(i),dt=i=>{typeof i=="function"&&i()},Mi=(i,t,e=!0)=>{if(!e){dt(i);return}const s=5,n=ke(t)+s;let r=!1;const o=({target:a})=>{a===t&&(r=!0,t.removeEventListener(Ie,o),dt(i))};t.addEventListener(Ie,o),setTimeout(()=>{r||Ri(t)},n)},Hi=(i,t,e,s)=>{let n=i.indexOf(t);if(n===-1)return i[!e&&s?i.length-1:0];const r=i.length;return n+=e?1:-1,s&&(n=(n+r)%r),i[Math.max(0,Math.min(n,r-1))]},Kn=/[^.]*(?=\..*)\.|.*/,Fn=/\..*/,zn=/::\d+$/,Pe={};let Vi=1;const qn={mouseenter:"mouseover",mouseleave:"mouseout"},Xn=/^(mouseenter|mouseleave)/i,Wi=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Bi(i,t){return t&&`${t}::${Vi++}`||i.uidEvent||Vi++}function ji(i){const t=Bi(i);return i.uidEvent=t,Pe[t]=Pe[t]||{},Pe[t]}function Gn(i,t){return function e(s){return s.delegateTarget=i,e.oneOff&&d.off(i,s.type,t),t.apply(i,[s])}}function Qn(i,t,e){return function s(n){const r=i.querySelectorAll(t);for(let{target:o}=n;o&&o!==this;o=o.parentNode)for(let a=r.length;a--;"")if(r[a]===o)return n.delegateTarget=o,s.oneOff&&d.off(i,n.type,e),e.apply(o,[n]);return null}}function Ui(i,t,e=null){const s=Object.keys(i);for(let n=0,r=s.length;nfunction(T){if(!T.relatedTarget||T.relatedTarget!==T.delegateTarget&&!T.delegateTarget.contains(T.relatedTarget))return O.call(this,T)};s?s=g(s):e=g(e)}const[r,o,a]=Yi(t,e,s),l=ji(i),u=l[a]||(l[a]={}),c=Ui(u,o,r?e:null);if(c){c.oneOff=c.oneOff&&n;return}const f=Bi(o,t.replace(Kn,"")),v=r?Qn(i,e,s):Gn(i,e);v.delegationSelector=r?e:null,v.originalHandler=o,v.oneOff=n,v.uidEvent=f,u[f]=v,i.addEventListener(a,v,r)}function Me(i,t,e,s,n){const r=Ui(t[e],s,n);r&&(i.removeEventListener(e,r,!!n),delete t[e][r.uidEvent])}function Zn(i,t,e,s){const n=t[e]||{};Object.keys(n).forEach(r=>{if(r.includes(s)){const o=n[r];Me(i,t,e,o.originalHandler,o.delegationSelector)}})}function Fi(i){return i=i.replace(Fn,""),qn[i]||i}const d={on(i,t,e,s){Ki(i,t,e,s,!1)},one(i,t,e,s){Ki(i,t,e,s,!0)},off(i,t,e,s){if(typeof t!="string"||!i)return;const[n,r,o]=Yi(t,e,s),a=o!==t,l=ji(i),u=t.startsWith(".");if(typeof r<"u"){if(!l||!l[o])return;Me(i,l,o,r,n?e:null);return}u&&Object.keys(l).forEach(f=>{Zn(i,l,f,t.slice(1))});const c=l[o]||{};Object.keys(c).forEach(f=>{const v=f.replace(zn,"");if(!a||t.includes(v)){const g=c[f];Me(i,l,o,g.originalHandler,g.delegationSelector)}})},trigger(i,t,e){if(typeof t!="string"||!i)return null;const s=xi(),n=Fi(t),r=t!==n,o=Wi.has(n);let a,l=!0,u=!0,c=!1,f=null;return r&&s&&(a=s.Event(t,e),s(i).trigger(a),l=!a.isPropagationStopped(),u=!a.isImmediatePropagationStopped(),c=a.isDefaultPrevented()),o?(f=document.createEvent("HTMLEvents"),f.initEvent(n,l,!0)):f=new CustomEvent(t,{bubbles:l,cancelable:!0}),typeof e<"u"&&Object.keys(e).forEach(v=>{Object.defineProperty(f,v,{get(){return e[v]}})}),c&&f.preventDefault(),u&&i.dispatchEvent(f),f.defaultPrevented&&typeof a<"u"&&a.preventDefault(),f}},Jn="5.1.3";class et{constructor(t){t=nt(t),t&&(this._element=t,R.setData(this._element,this.constructor.DATA_KEY,this))}dispose(){R.removeData(this._element,this.constructor.DATA_KEY),d.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,s=!0){Mi(t,e,s)}static getInstance(t){return R.getData(nt(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}static get VERSION(){return Jn}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`twe.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const tr="button",er="active";class ne extends et{static get NAME(){return tr}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(er))}static jQueryInterface(t){return this.each(function(){const e=ne.getOrCreateInstance(this);t==="toggle"&&e[t]()})}}var M="top",B="bottom",j="right",H="left",re="auto",Ot=[M,B,j,H],ut="start",Dt="end",zi="clippingParents",He="viewport",Nt="popper",qi="reference",Ve=Ot.reduce(function(i,t){return i.concat([t+"-"+ut,t+"-"+Dt])},[]),We=[].concat(Ot,[re]).reduce(function(i,t){return i.concat([t,t+"-"+ut,t+"-"+Dt])},[]),Xi="beforeRead",Gi="read",Qi="afterRead",Zi="beforeMain",Ji="main",ts="afterMain",es="beforeWrite",is="write",ss="afterWrite",ns=[Xi,Gi,Qi,Zi,Ji,ts,es,is,ss];function Q(i){return i?(i.nodeName||"").toLowerCase():null}function U(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var t=i.ownerDocument;return t&&t.defaultView||window}return i}function ht(i){var t=U(i).Element;return i instanceof t||i instanceof Element}function F(i){var t=U(i).HTMLElement;return i instanceof t||i instanceof HTMLElement}function Be(i){if(typeof ShadowRoot>"u")return!1;var t=U(i).ShadowRoot;return i instanceof t||i instanceof ShadowRoot}function ir(i){var t=i.state;Object.keys(t.elements).forEach(function(e){var s=t.styles[e]||{},n=t.attributes[e]||{},r=t.elements[e];!F(r)||!Q(r)||(Object.assign(r.style,s),Object.keys(n).forEach(function(o){var a=n[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function sr(i){var t=i.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(s){var n=t.elements[s],r=t.attributes[s]||{},o=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:e[s]),a=o.reduce(function(l,u){return l[u]="",l},{});!F(n)||!Q(n)||(Object.assign(n.style,a),Object.keys(r).forEach(function(l){n.removeAttribute(l)}))})}}const je={name:"applyStyles",enabled:!0,phase:"write",fn:ir,effect:sr,requires:["computeStyles"]};function Z(i){return i.split("-")[0]}var ft=Math.max,oe=Math.min,St=Math.round;function Ue(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function rs(){return!/^((?!chrome|android).)*safari/i.test(Ue())}function Lt(i,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var s=i.getBoundingClientRect(),n=1,r=1;t&&F(i)&&(n=i.offsetWidth>0&&St(s.width)/i.offsetWidth||1,r=i.offsetHeight>0&&St(s.height)/i.offsetHeight||1);var o=ht(i)?U(i):window,a=o.visualViewport,l=!rs()&&e,u=(s.left+(l&&a?a.offsetLeft:0))/n,c=(s.top+(l&&a?a.offsetTop:0))/r,f=s.width/n,v=s.height/r;return{width:f,height:v,top:c,right:u+f,bottom:c+v,left:u,x:u,y:c}}function Ye(i){var t=Lt(i),e=i.offsetWidth,s=i.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:i.offsetLeft,y:i.offsetTop,width:e,height:s}}function os(i,t){var e=t.getRootNode&&t.getRootNode();if(i.contains(t))return!0;if(e&&Be(e)){var s=t;do{if(s&&i.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function it(i){return U(i).getComputedStyle(i)}function nr(i){return["table","td","th"].indexOf(Q(i))>=0}function rt(i){return((ht(i)?i.ownerDocument:i.document)||window.document).documentElement}function ae(i){return Q(i)==="html"?i:i.assignedSlot||i.parentNode||(Be(i)?i.host:null)||rt(i)}function as(i){return!F(i)||it(i).position==="fixed"?null:i.offsetParent}function rr(i){var t=/firefox/i.test(Ue()),e=/Trident/i.test(Ue());if(e&&F(i)){var s=it(i);if(s.position==="fixed")return null}var n=ae(i);for(Be(n)&&(n=n.host);F(n)&&["html","body"].indexOf(Q(n))<0;){var r=it(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function Kt(i){for(var t=U(i),e=as(i);e&&nr(e)&&it(e).position==="static";)e=as(e);return e&&(Q(e)==="html"||Q(e)==="body"&&it(e).position==="static")?t:e||rr(i)||t}function Ke(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Ft(i,t,e){return ft(i,oe(t,e))}function or(i,t,e){var s=Ft(i,t,e);return s>e?e:s}function ls(){return{top:0,right:0,bottom:0,left:0}}function cs(i){return Object.assign({},ls(),i)}function ds(i,t){return t.reduce(function(e,s){return e[s]=i,e},{})}var ar=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,cs(typeof t!="number"?t:ds(t,Ot))};function lr(i){var t,e=i.state,s=i.name,n=i.options,r=e.elements.arrow,o=e.modifiersData.popperOffsets,a=Z(e.placement),l=Ke(a),u=[H,j].indexOf(a)>=0,c=u?"height":"width";if(!(!r||!o)){var f=ar(n.padding,e),v=Ye(r),g=l==="y"?M:H,O=l==="y"?B:j,T=e.rects.reference[c]+e.rects.reference[l]-o[l]-e.rects.popper[c],y=o[l]-e.rects.reference[l],D=Kt(r),I=D?l==="y"?D.clientHeight||0:D.clientWidth||0:0,m=T/2-y/2,p=f[g],_=I-v[c]-f[O],b=I/2-v[c]/2+m,w=Ft(p,b,_),C=l;e.modifiersData[s]=(t={},t[C]=w,t.centerOffset=w-b,t)}}function cr(i){var t=i.state,e=i.options,s=e.element,n=s===void 0?"[data-popper-arrow]":s;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||os(t.elements.popper,n)&&(t.elements.arrow=n))}const us={name:"arrow",enabled:!0,phase:"main",fn:lr,effect:cr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $t(i){return i.split("-")[1]}var dr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ur(i,t){var e=i.x,s=i.y,n=t.devicePixelRatio||1;return{x:St(e*n)/n||0,y:St(s*n)/n||0}}function hs(i){var t,e=i.popper,s=i.popperRect,n=i.placement,r=i.variation,o=i.offsets,a=i.position,l=i.gpuAcceleration,u=i.adaptive,c=i.roundOffsets,f=i.isFixed,v=o.x,g=v===void 0?0:v,O=o.y,T=O===void 0?0:O,y=typeof c=="function"?c({x:g,y:T}):{x:g,y:T};g=y.x,T=y.y;var D=o.hasOwnProperty("x"),I=o.hasOwnProperty("y"),m=H,p=M,_=window;if(u){var b=Kt(e),w="clientHeight",C="clientWidth";if(b===U(e)&&(b=rt(e),it(b).position!=="static"&&a==="absolute"&&(w="scrollHeight",C="scrollWidth")),b=b,n===M||(n===H||n===j)&&r===Dt){p=B;var A=f&&b===_&&_.visualViewport?_.visualViewport.height:b[w];T-=A-s.height,T*=l?1:-1}if(n===H||(n===M||n===B)&&r===Dt){m=j;var N=f&&b===_&&_.visualViewport?_.visualViewport.width:b[C];g-=N-s.width,g*=l?1:-1}}var $=Object.assign({position:a},u&&dr),V=c===!0?ur({x:g,y:T},U(e)):{x:g,y:T};if(g=V.x,T=V.y,l){var k;return Object.assign({},$,(k={},k[p]=I?"0":"",k[m]=D?"0":"",k.transform=(_.devicePixelRatio||1)<=1?"translate("+g+"px, "+T+"px)":"translate3d("+g+"px, "+T+"px, 0)",k))}return Object.assign({},$,(t={},t[p]=I?T+"px":"",t[m]=D?g+"px":"",t.transform="",t))}function hr(i){var t=i.state,e=i.options,s=e.gpuAcceleration,n=s===void 0?!0:s,r=e.adaptive,o=r===void 0?!0:r,a=e.roundOffsets,l=a===void 0?!0:a,u={placement:Z(t.placement),variation:$t(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,hs(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,hs(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Fe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:hr,data:{}};var le={passive:!0};function fr(i){var t=i.state,e=i.instance,s=i.options,n=s.scroll,r=n===void 0?!0:n,o=s.resize,a=o===void 0?!0:o,l=U(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&u.forEach(function(c){c.addEventListener("scroll",e.update,le)}),a&&l.addEventListener("resize",e.update,le),function(){r&&u.forEach(function(c){c.removeEventListener("scroll",e.update,le)}),a&&l.removeEventListener("resize",e.update,le)}}const ze={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:fr,data:{}};var pr={left:"right",right:"left",bottom:"top",top:"bottom"};function ce(i){return i.replace(/left|right|bottom|top/g,function(t){return pr[t]})}var _r={start:"end",end:"start"};function fs(i){return i.replace(/start|end/g,function(t){return _r[t]})}function qe(i){var t=U(i),e=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:e,scrollTop:s}}function Xe(i){return Lt(rt(i)).left+qe(i).scrollLeft}function gr(i,t){var e=U(i),s=rt(i),n=e.visualViewport,r=s.clientWidth,o=s.clientHeight,a=0,l=0;if(n){r=n.width,o=n.height;var u=rs();(u||!u&&t==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:o,x:a+Xe(i),y:l}}function mr(i){var t,e=rt(i),s=qe(i),n=(t=i.ownerDocument)==null?void 0:t.body,r=ft(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),o=ft(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-s.scrollLeft+Xe(i),l=-s.scrollTop;return it(n||e).direction==="rtl"&&(a+=ft(e.clientWidth,n?n.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function Ge(i){var t=it(i),e=t.overflow,s=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+n+s)}function ps(i){return["html","body","#document"].indexOf(Q(i))>=0?i.ownerDocument.body:F(i)&&Ge(i)?i:ps(ae(i))}function zt(i,t){var e;t===void 0&&(t=[]);var s=ps(i),n=s===((e=i.ownerDocument)==null?void 0:e.body),r=U(s),o=n?[r].concat(r.visualViewport||[],Ge(s)?s:[]):s,a=t.concat(o);return n?a:a.concat(zt(ae(o)))}function Qe(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Er(i,t){var e=Lt(i,!1,t==="fixed");return e.top=e.top+i.clientTop,e.left=e.left+i.clientLeft,e.bottom=e.top+i.clientHeight,e.right=e.left+i.clientWidth,e.width=i.clientWidth,e.height=i.clientHeight,e.x=e.left,e.y=e.top,e}function _s(i,t,e){return t===He?Qe(gr(i,e)):ht(t)?Er(t,e):Qe(mr(rt(i)))}function vr(i){var t=zt(ae(i)),e=["absolute","fixed"].indexOf(it(i).position)>=0,s=e&&F(i)?Kt(i):i;return ht(s)?t.filter(function(n){return ht(n)&&os(n,s)&&Q(n)!=="body"}):[]}function br(i,t,e,s){var n=t==="clippingParents"?vr(i):[].concat(t),r=[].concat(n,[e]),o=r[0],a=r.reduce(function(l,u){var c=_s(i,u,s);return l.top=ft(c.top,l.top),l.right=oe(c.right,l.right),l.bottom=oe(c.bottom,l.bottom),l.left=ft(c.left,l.left),l},_s(i,o,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function gs(i){var t=i.reference,e=i.element,s=i.placement,n=s?Z(s):null,r=s?$t(s):null,o=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2,l;switch(n){case M:l={x:o,y:t.y-e.height};break;case B:l={x:o,y:t.y+t.height};break;case j:l={x:t.x+t.width,y:a};break;case H:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var u=n?Ke(n):null;if(u!=null){var c=u==="y"?"height":"width";switch(r){case ut:l[u]=l[u]-(t[c]/2-e[c]/2);break;case Dt:l[u]=l[u]+(t[c]/2-e[c]/2);break}}return l}function It(i,t){t===void 0&&(t={});var e=t,s=e.placement,n=s===void 0?i.placement:s,r=e.strategy,o=r===void 0?i.strategy:r,a=e.boundary,l=a===void 0?zi:a,u=e.rootBoundary,c=u===void 0?He:u,f=e.elementContext,v=f===void 0?Nt:f,g=e.altBoundary,O=g===void 0?!1:g,T=e.padding,y=T===void 0?0:T,D=cs(typeof y!="number"?y:ds(y,Ot)),I=v===Nt?qi:Nt,m=i.rects.popper,p=i.elements[O?I:v],_=br(ht(p)?p:p.contextElement||rt(i.elements.popper),l,c,o),b=Lt(i.elements.reference),w=gs({reference:b,element:m,strategy:"absolute",placement:n}),C=Qe(Object.assign({},m,w)),A=v===Nt?C:b,N={top:_.top-A.top+D.top,bottom:A.bottom-_.bottom+D.bottom,left:_.left-A.left+D.left,right:A.right-_.right+D.right},$=i.modifiersData.offset;if(v===Nt&&$){var V=$[n];Object.keys(N).forEach(function(k){var vt=[j,B].indexOf(k)>=0?1:-1,bt=[M,B].indexOf(k)>=0?"y":"x";N[k]+=V[bt]*vt})}return N}function wr(i,t){t===void 0&&(t={});var e=t,s=e.placement,n=e.boundary,r=e.rootBoundary,o=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,u=l===void 0?We:l,c=$t(s),f=c?a?Ve:Ve.filter(function(O){return $t(O)===c}):Ot,v=f.filter(function(O){return u.indexOf(O)>=0});v.length===0&&(v=f);var g=v.reduce(function(O,T){return O[T]=It(i,{placement:T,boundary:n,rootBoundary:r,padding:o})[Z(T)],O},{});return Object.keys(g).sort(function(O,T){return g[O]-g[T]})}function Tr(i){if(Z(i)===re)return[];var t=ce(i);return[fs(i),t,fs(t)]}function Ar(i){var t=i.state,e=i.options,s=i.name;if(!t.modifiersData[s]._skip){for(var n=e.mainAxis,r=n===void 0?!0:n,o=e.altAxis,a=o===void 0?!0:o,l=e.fallbackPlacements,u=e.padding,c=e.boundary,f=e.rootBoundary,v=e.altBoundary,g=e.flipVariations,O=g===void 0?!0:g,T=e.allowedAutoPlacements,y=t.options.placement,D=Z(y),I=D===y,m=l||(I||!O?[ce(y)]:Tr(y)),p=[y].concat(m).reduce(function(jt,lt){return jt.concat(Z(lt)===re?wr(t,{placement:lt,boundary:c,rootBoundary:f,padding:u,flipVariations:O,allowedAutoPlacements:T}):lt)},[]),_=t.rects.reference,b=t.rects.popper,w=new Map,C=!0,A=p[0],N=0;N=0,bt=vt?"width":"height",K=It(t,{placement:$,boundary:c,rootBoundary:f,altBoundary:v,padding:u}),G=vt?k?j:H:k?B:M;_[bt]>b[bt]&&(G=ce(G));var De=ce(G),wt=[];if(r&&wt.push(K[V]<=0),a&&wt.push(K[G]<=0,K[De]<=0),wt.every(function(jt){return jt})){A=$,C=!1;break}w.set($,wt)}if(C)for(var Ne=O?3:1,Di=function(lt){var ie=p.find(function(Le){var Tt=w.get(Le);if(Tt)return Tt.slice(0,lt).every(function(Ni){return Ni})});if(ie)return A=ie,"break"},ee=Ne;ee>0;ee--){var Se=Di(ee);if(Se==="break")break}t.placement!==A&&(t.modifiersData[s]._skip=!0,t.placement=A,t.reset=!0)}}const ms={name:"flip",enabled:!0,phase:"main",fn:Ar,requiresIfExists:["offset"],data:{_skip:!1}};function Es(i,t,e){return e===void 0&&(e={x:0,y:0}),{top:i.top-t.height-e.y,right:i.right-t.width+e.x,bottom:i.bottom-t.height+e.y,left:i.left-t.width-e.x}}function vs(i){return[M,j,B,H].some(function(t){return i[t]>=0})}function yr(i){var t=i.state,e=i.name,s=t.rects.reference,n=t.rects.popper,r=t.modifiersData.preventOverflow,o=It(t,{elementContext:"reference"}),a=It(t,{altBoundary:!0}),l=Es(o,s),u=Es(a,n,r),c=vs(l),f=vs(u);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const bs={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yr};function Cr(i,t,e){var s=Z(i),n=[H,M].indexOf(s)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:i})):e,o=r[0],a=r[1];return o=o||0,a=(a||0)*n,[H,j].indexOf(s)>=0?{x:a,y:o}:{x:o,y:a}}function Or(i){var t=i.state,e=i.options,s=i.name,n=e.offset,r=n===void 0?[0,0]:n,o=We.reduce(function(c,f){return c[f]=Cr(f,t.rects,r),c},{}),a=o[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[s]=o}const ws={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Or};function Dr(i){var t=i.state,e=i.name;t.modifiersData[e]=gs({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Ze={name:"popperOffsets",enabled:!0,phase:"read",fn:Dr,data:{}};function Nr(i){return i==="x"?"y":"x"}function Sr(i){var t=i.state,e=i.options,s=i.name,n=e.mainAxis,r=n===void 0?!0:n,o=e.altAxis,a=o===void 0?!1:o,l=e.boundary,u=e.rootBoundary,c=e.altBoundary,f=e.padding,v=e.tether,g=v===void 0?!0:v,O=e.tetherOffset,T=O===void 0?0:O,y=It(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),D=Z(t.placement),I=$t(t.placement),m=!I,p=Ke(D),_=Nr(p),b=t.modifiersData.popperOffsets,w=t.rects.reference,C=t.rects.popper,A=typeof T=="function"?T(Object.assign({},t.rects,{placement:t.placement})):T,N=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(b){if(r){var k,vt=p==="y"?M:H,bt=p==="y"?B:j,K=p==="y"?"height":"width",G=b[p],De=G+y[vt],wt=G-y[bt],Ne=g?-C[K]/2:0,Di=I===ut?w[K]:C[K],ee=I===ut?-C[K]:-w[K],Se=t.elements.arrow,jt=g&&Se?Ye(Se):{width:0,height:0},lt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ls(),ie=lt[vt],Le=lt[bt],Tt=Ft(0,w[K],jt[K]),Ni=m?w[K]/2-Ne-Tt-ie-N.mainAxis:Di-Tt-ie-N.mainAxis,Pl=m?-w[K]/2+Ne+Tt+Le+N.mainAxis:ee+Tt+Le+N.mainAxis,Si=t.elements.arrow&&Kt(t.elements.arrow),Ml=Si?p==="y"?Si.clientTop||0:Si.clientLeft||0:0,In=(k=$==null?void 0:$[p])!=null?k:0,Hl=G+Ni-In-Ml,Vl=G+Pl-In,Rn=Ft(g?oe(De,Hl):De,G,g?ft(wt,Vl):wt);b[p]=Rn,V[p]=Rn-G}if(a){var kn,Wl=p==="x"?M:H,Bl=p==="x"?B:j,At=b[_],$e=_==="y"?"height":"width",xn=At+y[Wl],Pn=At-y[Bl],Li=[M,H].indexOf(D)!==-1,Mn=(kn=$==null?void 0:$[_])!=null?kn:0,Hn=Li?xn:At-w[$e]-C[$e]-Mn+N.altAxis,Vn=Li?At+w[$e]+C[$e]-Mn-N.altAxis:Pn,Wn=g&&Li?or(Hn,At,Vn):Ft(g?Hn:xn,At,g?Vn:Pn);b[_]=Wn,V[_]=Wn-At}t.modifiersData[s]=V}}const Ts={name:"preventOverflow",enabled:!0,phase:"main",fn:Sr,requiresIfExists:["offset"]};function Lr(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function $r(i){return i===U(i)||!F(i)?qe(i):Lr(i)}function Ir(i){var t=i.getBoundingClientRect(),e=St(t.width)/i.offsetWidth||1,s=St(t.height)/i.offsetHeight||1;return e!==1||s!==1}function Rr(i,t,e){e===void 0&&(e=!1);var s=F(t),n=F(t)&&Ir(t),r=rt(t),o=Lt(i,n,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!e)&&((Q(t)!=="body"||Ge(r))&&(a=$r(t)),F(t)?(l=Lt(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=Xe(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function kr(i){var t=new Map,e=new Set,s=[];i.forEach(function(r){t.set(r.name,r)});function n(r){e.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&n(l)}}),s.push(r)}return i.forEach(function(r){e.has(r.name)||n(r)}),s}function xr(i){var t=kr(i);return ns.reduce(function(e,s){return e.concat(t.filter(function(n){return n.phase===s}))},[])}function Pr(i){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(i())})})),t}}function Mr(i){var t=i.reduce(function(e,s){var n=e[s.name];return e[s.name]=n?Object.assign({},n,s,{options:Object.assign({},n.options,s.options),data:Object.assign({},n.data,s.data)}):s,e},{});return Object.keys(t).map(function(e){return t[e]})}var As={placement:"bottom",modifiers:[],strategy:"absolute"};function ys(){for(var i=arguments.length,t=new Array(i),e=0;e`-${t.toLowerCase()}`)}const E={setDataAttribute(i,t,e){i.setAttribute(`data-twe-${ei(t)}`,e)},removeDataAttribute(i,t){i.removeAttribute(`data-twe-${ei(t)}`)},getDataAttributes(i){if(!i)return{};const t={};return Object.keys(i.dataset).filter(e=>e.startsWith("twe")).forEach(e=>{if(e.startsWith("tweClass"))return;let s=e.replace(/^twe/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),t[s]=ti(i.dataset[e])}),t},getDataClassAttributes(i){if(!i)return{};const t={...i.dataset};return Object.keys(t).filter(e=>e.startsWith("tweClass")).forEach(e=>{let s=e.replace(/^tweClass/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),t[s]=ti(t[e])}),t},getDataAttribute(i,t){return ti(i.getAttribute(`data-twe-${ei(t)}`))},offset(i){const t=i.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},position(i){return{top:i.offsetTop,left:i.offsetLeft}},style(i,t){Object.assign(i.style,t)},toggleClass(i,t){i&&ii(t).forEach(e=>{i.classList.contains(e)?i.classList.remove(e):i.classList.add(e)})},addClass(i,t){ii(t).forEach(e=>!i.classList.contains(e)&&i.classList.add(e))},addStyle(i,t){Object.keys(t).forEach(e=>{i.style[e]=t[e]})},removeClass(i,t){ii(t).forEach(e=>i.classList.contains(e)&&i.classList.remove(e))},hasClass(i,t){return i.classList.contains(t)},maxOffset(i){const t=i.getBoundingClientRect();return{top:t.top+Math.max(document.body.scrollTop,document.documentElement.scrollTop,window.scrollY),left:t.left+Math.max(document.body.scrollLeft,document.documentElement.scrollLeft,window.scrollX)}}};function ii(i){return typeof i=="string"?i.split(" "):Array.isArray(i)?i:!1}const jr=3,h={closest(i,t){return i.closest(t)},matches(i,t){return i.matches(t)},find(i,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,i))},findOne(i,t=document.documentElement){return Element.prototype.querySelector.call(t,i)},children(i,t){return[].concat(...i.children).filter(s=>s.matches(t))},parents(i,t){const e=[];let s=i.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE&&s.nodeType!==jr;)this.matches(s,t)&&e.push(s),s=s.parentNode;return e},prev(i,t){let e=i.previousElementSibling;for(;e;){if(e.matches(t))return[e];e=e.previousElementSibling}return[]},next(i,t){let e=i.nextElementSibling;for(;e;){if(this.matches(e,t))return[e];e=e.nextElementSibling}return[]},focusableChildren(i){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(", ");return this.find(t,i).filter(e=>!ct(e)&&Ct(e))}},si="dropdown",pt=".twe.dropdown",ni=".data-api",ue="Escape",Os="Space",Ds="Tab",ri="ArrowUp",he="ArrowDown",Ur=2,Yr=new RegExp(`${ri}|${he}|${ue}`),Kr=`hide${pt}`,Fr=`hidden${pt}`,zr=`show${pt}`,qr=`shown${pt}`,Xr=`click${pt}${ni}`,Ns=`keydown${pt}${ni}`,Gr=`keyup${pt}${ni}`,ot="show",Qr="dropup",Zr="dropend",Jr="dropstart",to="[data-twe-navbar-ref]",fe="[data-twe-dropdown-toggle-ref]",oi="[data-twe-dropdown-menu-ref]",eo="[data-twe-navbar-nav-ref]",io="[data-twe-dropdown-menu-ref] [data-twe-dropdown-item-ref]:not(.disabled):not(:disabled)",so=W()?"top-end":"top-start",no=W()?"top-start":"top-end",ro=W()?"bottom-end":"bottom-start",oo=W()?"bottom-start":"bottom-end",ao=W()?"left-start":"right-start",lo=W()?"right-start":"left-start",co=[{opacity:"0"},{opacity:"1"}],uo=[{opacity:"1"},{opacity:"0"}],Ss={iterations:1,easing:"ease",fill:"both"},ho={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0,dropdownAnimation:"on",animationDuration:550},fo={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)",dropdownAnimation:"string",animationDuration:"number"};class z extends et{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._fadeOutAnimate=null;const s=window.matchMedia("(prefers-reduced-motion: reduce)").matches;this._animationCanPlay=this._config.dropdownAnimation==="on"&&!s,this._didInit=!1,this._init()}static get Default(){return ho}static get DefaultType(){return fo}static get NAME(){return si}toggle(){return this._isShown()?this.hide():this.show()}show(){if(ct(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if(d.trigger(this._element,zr,t).defaultPrevented)return;const s=z.getParentFromElement(this._element);this._inNavbar?E.setDataAttribute(this._menu,"popper","none"):this._createPopper(s),"ontouchstart"in document.documentElement&&!s.closest(eo)&&[].concat(...document.body.children).forEach(n=>d.on(n,"mouseover",se)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.setAttribute(`data-twe-dropdown-${ot}`,""),this._animationCanPlay&&this._menu.animate(co,{...Ss,duration:this._config.animationDuration}),this._element.setAttribute(`data-twe-dropdown-${ot}`,""),setTimeout(()=>{d.trigger(this._element,qr,t)},this._animationCanPlay?this._config.animationDuration:0)}hide(){if(ct(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_init(){this._didInit||(d.on(document,Ns,fe,z.dataApiKeydownHandler),d.on(document,Ns,oi,z.dataApiKeydownHandler),d.on(document,Xr,z.clearMenus),d.on(document,Gr,z.clearMenus),this._didInit=!0)}_completeHide(t){this._fadeOutAnimate&&this._fadeOutAnimate.playState==="running"||d.trigger(this._element,Kr,t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(s=>d.off(s,"mouseover",se)),this._animationCanPlay&&(this._fadeOutAnimate=this._menu.animate(uo,{...Ss,duration:this._config.animationDuration})),setTimeout(()=>{this._popper&&this._popper.destroy(),this._menu.removeAttribute(`data-twe-dropdown-${ot}`),this._element.removeAttribute(`data-twe-dropdown-${ot}`),this._element.setAttribute("aria-expanded","false"),E.removeDataAttribute(this._menu,"popper"),d.trigger(this._element,Fr,t)},this._animationCanPlay?this._config.animationDuration:0))}_getConfig(t){if(t={...this.constructor.Default,...E.getDataAttributes(this._element),...t},x(si,t,this.constructor.DefaultType),typeof t.reference=="object"&&!yt(t.reference)&&typeof t.reference.getBoundingClientRect!="function")throw new TypeError(`${si.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(typeof Cs>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=t:yt(this._config.reference)?e=nt(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const s=this._getPopperConfig(),n=s.modifiers.find(r=>r.name==="applyStyles"&&r.enabled===!1);this._popper=Je(e,this._menu,s),n&&E.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.dataset[`tweDropdown${ot.charAt(0).toUpperCase()+ot.slice(1)}`]===""}_getMenuElement(){return h.next(this._element,oi)[0]}_getPlacement(){const t=this._element.parentNode;if(t.dataset.tweDropdownPosition===Zr)return ao;if(t.dataset.tweDropdownPosition===Jr)return lo;const e=t.dataset.tweDropdownAlignment==="end";return t.dataset.tweDropdownPosition===Qr?e?no:so:e?oo:ro}_detectNavbar(){return this._element.closest(to)!==null}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return this._config.display==="static"&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...typeof this._config.popperConfig=="function"?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const s=h.find(io,this._menu).filter(Ct);s.length&&Hi(s,e,t===he,!s.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=z.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(t&&(t.button===Ur||t.type==="keyup"&&t.key!==Ds))return;const e=h.find(fe);for(let s=0,n=e.length;sc===this._element);l!==null&&u.length&&(this._selector=l,this._triggerArray.push(a))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return $s}static get NAME(){return ai}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[],e;if(this._config.parent){const c=h.find(Rs,this._config.parent);t=h.find(To,this._config.parent).filter(f=>!c.includes(f))}const s=h.findOne(this._selector);if(t.length){const c=t.find(f=>s!==f);if(e=c?kt.getInstance(c):null,e&&e._isTransitioning)return}if(d.trigger(this._element,_o).defaultPrevented)return;t.forEach(c=>{s!==c&&kt.getOrCreateInstance(c,{toggle:!1}).hide(),e||R.setData(c,Ls,null)});const r=this._getDimension(),o=r==="height"?this._classes.collapsing:this._classes.collapsingHorizontal;E.removeClass(this._element,this._classes.visible),E.removeClass(this._element,this._classes.hidden),E.addClass(this._element,o),this._element.removeAttribute(Rt),this._element.setAttribute(_e,""),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const a=()=>{this._isTransitioning=!1,E.removeClass(this._element,this._classes.hidden),E.removeClass(this._element,o),E.addClass(this._element,this._classes.visible),this._element.removeAttribute(_e),this._element.setAttribute(Rt,""),this._element.setAttribute(li,""),this._element.style[r]="",d.trigger(this._element,go)},u=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(a,this._element,!0),this._element.style[r]=`${this._element[u]}px`}hide(){if(this._isTransitioning||!this._isShown()||d.trigger(this._element,mo).defaultPrevented)return;const e=this._getDimension(),s=e==="height"?this._classes.collapsing:this._classes.collapsingHorizontal;this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,Ut(this._element),E.addClass(this._element,s),E.removeClass(this._element,this._classes.visible),E.removeClass(this._element,this._classes.hidden),this._element.setAttribute(_e,""),this._element.removeAttribute(Rt),this._element.removeAttribute(li);const n=this._triggerArray.length;for(let o=0;o{this._isTransitioning=!1,E.removeClass(this._element,s),E.addClass(this._element,this._classes.visible),E.addClass(this._element,this._classes.hidden),this._element.removeAttribute(_e),this._element.setAttribute(Rt,""),d.trigger(this._element,Eo)};this._element.style[e]="",this._queueCallback(r,this._element,!0)}_isShown(t=this._element){return t.hasAttribute(li)}_getConfig(t){return t={...$s,...E.getDataAttributes(this._element),...t},t.toggle=!!t.toggle,t.parent=nt(t.parent),x(ai,t,po),t}_getClasses(t){const e=E.getDataClassAttributes(this._element);return t={...Ao,...e,...t},x(ai,t,yo),t}_getDimension(){return this._element.hasAttribute(vo)?bo:wo}_initializeChildren(){if(!this._config.parent)return;const t=h.find(Rs,this._config.parent);h.find(ks,this._config.parent).filter(e=>!t.includes(e)).forEach(e=>{const s=st(e);s&&this._addAriaAndCollapsedClass([e],this._isShown(s))})}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach(s=>{e?s.removeAttribute(Is):s.setAttribute(`${Is}`,""),s.setAttribute("aria-expanded",e)})}static jQueryInterface(t){return this.each(function(){const e={};typeof t=="string"&&/show|hide/.test(t)&&(e.toggle=!1);const s=kt.getOrCreateInstance(this,e);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t]()}})}}const xs=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ps=".sticky-top";class ci{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",e=>e+t),this._setElementAttributes(xs,"paddingRight",e=>e+t),this._setElementAttributes(Ps,"marginRight",e=>e-t)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,s){const n=this.getWidth(),r=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+n)return;this._saveInitialAttribute(o,e);const a=window.getComputedStyle(o)[e];o.style[e]=`${s(Number.parseFloat(a))}px`};this._applyManipulationCallback(t,r)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(xs,"paddingRight"),this._resetElementAttributes(Ps,"marginRight")}_saveInitialAttribute(t,e){const s=t.style[e];s&&E.setDataAttribute(t,e,s)}_resetElementAttributes(t,e){const s=n=>{const r=E.getDataAttribute(n,e);typeof r>"u"?n.style.removeProperty(e):(E.removeDataAttribute(n,e),n.style[e]=r)};this._applyManipulationCallback(t,s)}_applyManipulationCallback(t,e){yt(t)?e(t):h.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const Co={isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null,backdropClasses:null},Oo={isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)",backdropClasses:"(array|string|null)"},Ms="backdrop",Hs=`mousedown.twe.${Ms}`;class Vs{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){if(!this._config.isVisible){dt(t);return}this._append(),this._config.isAnimated&&Ut(this._getElement());const e=this._config.backdropClasses||["opacity-50","transition-all","duration-300","ease-in-out","fixed","top-0","left-0","z-[1040]","bg-black","w-screen","h-screen"];E.removeClass(this._getElement(),"opacity-0"),E.addClass(this._getElement(),e),this._element.setAttribute("data-twe-backdrop-show",""),this._emulateAnimation(()=>{dt(t)})}hide(t){if(!this._config.isVisible){dt(t);return}this._element.removeAttribute("data-twe-backdrop-show"),this._getElement().classList.add("opacity-0"),this._getElement().classList.remove("opacity-50"),this._emulateAnimation(()=>{this.dispose(),dt(t)})}update(t={}){this._config=this._getConfig({...this._config,...t})}_getElement(){if(!this._element){const t=document.createElement("div");this._element=t}return this._element}_getConfig(t){return t={...Co,...typeof t=="object"?t:{}},t.rootElement=nt(t.rootElement),x(Ms,t,Oo),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),d.on(this._getElement(),Hs,()=>{dt(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(d.off(this._element,Hs),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){Mi(t,this._getElement(),this._config.isAnimated)}}class Ws{constructor(t,e={},s){this._element=t,this._toggler=s,this._event=e.event||"blur",this._condition=e.condition||(()=>!0),this._selector=e.selector||'button, a, input, select, textarea, [tabindex]:not([tabindex="-1"])',this._onlyVisible=e.onlyVisible||!1,this._focusableElements=[],this._firstElement=null,this._lastElement=null,this.handler=n=>{this._condition(n)&&!n.shiftKey&&n.target===this._lastElement?(n.preventDefault(),this._firstElement.focus()):this._condition(n)&&n.shiftKey&&n.target===this._firstElement&&(n.preventDefault(),this._lastElement.focus())}}trap(){this._setElements(),this._init(),this._setFocusTrap()}disable(){this._focusableElements.forEach(t=>{t.removeEventListener(this._event,this.handler)}),this._toggler&&this._toggler.focus()}update(){this._setElements(),this._setFocusTrap()}_init(){const t=e=>{!this._firstElement||e.key!=="Tab"||this._focusableElements.includes(e.target)||(e.preventDefault(),this._firstElement.focus(),window.removeEventListener("keydown",t))};window.addEventListener("keydown",t)}_filterVisible(t){return t.filter(e=>{if(!Ct(e))return!1;const s=h.parents(e,"*");for(let n=0;n{const s=e.getAttribute("data-twe-disabled")==="true"||e.hasAttribute("disabled");return e.disabled||s?null:e}),this._onlyVisible&&(this._focusableElements=this._filterVisible(this._focusableElements)),this._firstElement=this._focusableElements[0],this._lastElement=this._focusableElements[this._focusableElements.length-1]}_setFocusTrap(){this._focusableElements.forEach((t,e)=>{e===this._focusableElements.length-1||e===0?t.addEventListener(this._event,this.handler):t.removeEventListener(this._event,this.handler)})}}let Bs=[];const js=(i,t="hide")=>{const e=`click.dismiss${i.EVENT_KEY}`,s=i.NAME;Bs.includes(s)||(Bs.push(s),d.on(document,e,`[data-twe-${s}-dismiss]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),ct(this))return;const r=st(this)||this.closest(`.${s}`)||this.closest(`[data-twe-${s}-init]`);if(!r)return;i.getOrCreateInstance(r)[t]()}))},Do=9,Us="offcanvas",xt=".twe.offcanvas",No=`load${xt}.data-api`,So="Escape",Ys={backdrop:!0,keyboard:!0,scroll:!1},Lo={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},Ks="show",$o="[data-twe-offcanvas-init][data-twe-offcanvas-show]",Io=`show${xt}`,Ro=`shown${xt}`,ko=`hide${xt}`,xo=`hidden${xt}`,Po=`keydown.dismiss${xt}`;class Pt extends et{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners(),this._didInit=!1,this._init()}static get NAME(){return Us}static get Default(){return Ys}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||d.trigger(this._element,Io,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||new ci().hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.setAttribute(`data-twe-offcanvas-${Ks}`,"");const s=()=>{this._config.scroll||this._focustrap.trap(),d.trigger(this._element,Ro,{relatedTarget:t})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown||d.trigger(this._element,ko).defaultPrevented)return;this._focustrap.disable(),this._element.blur(),this._isShown=!1,this._element.removeAttribute(`data-twe-offcanvas-${Ks}`),this._backdrop.hide();const e=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||new ci().reset(),d.trigger(this._element,xo)};this._queueCallback(e,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.disable(),super.dispose()}_init(){this._didInit||(d.on(window,No,()=>h.find($o).forEach(t=>Pt.getOrCreateInstance(t).show())),this._didInit=!0,js(Pt))}_getConfig(t){return t={...Ys,...E.getDataAttributes(this._element),...typeof t=="object"?t:{}},x(Us,t,Lo),t}_initializeBackDrop(){return new Vs({isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ws(this._element,{event:"keydown",condition:t=>t.keyCode===Do,onlyVisible:!0})}_addEventListeners(){d.on(this._element,Po,t=>{this._config.keyboard&&t.key===So&&this.hide()})}static jQueryInterface(t){return this.each(function(){const e=Pt.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}const di="carousel",Y=".twe.carousel",Fs=".data-api",Mo="ArrowLeft",Ho="ArrowRight",Vo=500,Wo=40,zs={interval:5e3,keyboard:!0,ride:!1,pause:"hover",wrap:!0,touch:!0},Bo={interval:"(number|boolean)",keyboard:"boolean",ride:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},jo={pointer:"touch-pan-y",block:"!block",visible:"data-[twe-carousel-fade]:opacity-100 data-[twe-carousel-fade]:z-[1]",invisible:"data-[twe-carousel-fade]:z-0 data-[twe-carousel-fade]:opacity-0 data-[twe-carousel-fade]:duration-[600ms] data-[twe-carousel-fade]:delay-600",slideRight:"translate-x-full",slideLeft:"-translate-x-full"},Uo={pointer:"string",block:"string",visible:"string",invisible:"string",slideRight:"string",slideLeft:"string"},_t="next",gt="prev",mt="left",qt="right",Yo={[Mo]:qt,[Ho]:mt},Ko=`slide${Y}`,ui=`slid${Y}`,Fo=`keydown${Y}`,zo=`mouseenter${Y}`,qo=`mouseleave${Y}`,Xo=`touchstart${Y}`,Go=`touchmove${Y}`,Qo=`touchend${Y}`,Zo=`pointerdown${Y}`,Jo=`pointerup${Y}`,ta=`dragstart${Y}`,qs=`load${Y}${Fs}`,Xs=`click${Y}${Fs}`,Xt="data-twe-carousel-active",ea="data-twe-carousel-item-end",hi="data-twe-carousel-item-start",ia="data-twe-carousel-item-next",sa="data-twe-carousel-item-prev",na="data-twe-carousel-pointer-event",ra="[data-twe-carousel-init]",Gs="[data-twe-carousel-active]",fi="[data-twe-carousel-item]",Mt=`${Gs}${fi}`,oa=`${fi} img`,aa="[data-twe-carousel-item-next], [data-twe-carousel-item-prev]",la="[data-twe-carousel-indicators]",ca="[data-twe-target]",Qs="[data-twe-slide], [data-twe-slide-to]",da="touch",ua="pen";class q extends et{constructor(t,e,s){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._classes=this._getClasses(s),this._indicatorsElement=h.findOne(la,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=!!window.PointerEvent,this._setActiveElementClass(),this._addEventListeners(),this._didInit=!1,this._init(),this._config.ride==="carousel"&&this.cycle()}static get Default(){return zs}static get NAME(){return di}next(){this._slide(_t)}nextWhenVisible(){!document.hidden&&Ct(this._element)&&this.next()}prev(){this._slide(gt)}pause(t){t||(this._isPaused=!0),h.findOne(aa,this._element)&&(Ri(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=h.findOne(Mt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding){d.one(this._element,ui,()=>this.to(t));return}if(e===t){this.pause(),this.cycle();return}const s=t>e?_t:gt;this._slide(s,this._items[t])}dispose(){d.off(document,Xs,Qs,q.dataApiClickHandler),d.off(window,qs),super.dispose()}_init(){this._didInit||(d.on(document,Xs,Qs,q.dataApiClickHandler),d.on(window,qs,()=>{const t=h.find(ra);for(let e=0,s=t.length;ethis.cycle());return}this.cycle()}}_applyInitialClasses(){const t=h.findOne(Mt,this._element);t.classList.add(this._classes.block,...this._classes.visible.split(" ")),this._setActiveIndicatorElement(t)}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=Wo)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?qt:mt)}_setActiveElementClass(){this._activeElement=h.findOne(Mt,this._element),E.addClass(this._activeElement,"hidden")}_addEventListeners(){this._config.keyboard&&d.on(this._element,Fo,t=>this._keydown(t)),this._config.pause==="hover"&&(d.on(this._element,zo,t=>this.pause(t)),d.on(this._element,qo,t=>this._enableCycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners(),this._applyInitialClasses()}_addTouchEventListeners(){const t=r=>this._pointerEvent&&(r.pointerType===ua||r.pointerType===da),e=r=>{t(r)?this.touchStartX=r.clientX:this._pointerEvent||(this.touchStartX=r.touches[0].clientX)},s=r=>{this.touchDeltaX=r.touches&&r.touches.length>1?0:r.touches[0].clientX-this.touchStartX},n=r=>{t(r)&&(this.touchDeltaX=r.clientX-this.touchStartX),this._handleSwipe(),this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(o=>this._enableCycle(o),Vo+this._config.interval))};h.find(oa,this._element).forEach(r=>{d.on(r,ta,o=>o.preventDefault())}),this._pointerEvent?(d.on(this._element,Zo,r=>e(r)),d.on(this._element,Jo,r=>n(r)),this._element.classList.add(this._classes.pointer),this._element.setAttribute(`${na}`,"")):(d.on(this._element,Xo,r=>e(r)),d.on(this._element,Go,r=>s(r)),d.on(this._element,Qo,r=>n(r)))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Yo[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?h.find(fi,t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const s=t===_t;return Hi(this._items,e,s,this._config.wrap)}_triggerSlideEvent(t,e){const s=this._getItemIndex(t),n=this._getItemIndex(h.findOne(Mt,this._element));return d.trigger(this._element,Ko,{relatedTarget:t,direction:e,from:n,to:s})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=h.findOne(Gs,this._indicatorsElement);e.removeAttribute(Xt),e.removeAttribute("aria-current"),e.classList.remove("!opacity-100");const s=h.find(ca,this._indicatorsElement);for(let n=0;n{d.trigger(this._element,ui,{relatedTarget:o,direction:v,from:r,to:a})};o.setAttribute(`${f}`,""),o.classList.add(this._classes.block,O),Ut(o),n.setAttribute(`${c}`,""),n.classList.add(g,...this._classes.invisible.split(" ")),n.classList.remove(...this._classes.visible.split(" ")),o.setAttribute(`${c}`,""),o.classList.add(...this._classes.visible.split(" ")),o.classList.remove(this._classes.slideRight,this._classes.slideLeft);const D=()=>{o.removeAttribute(c),o.removeAttribute(f),o.setAttribute(`${Xt}`,""),n.removeAttribute(Xt),n.classList.remove(g,...this._classes.invisible.split(" "),this._classes.block),n.removeAttribute(f),n.removeAttribute(c),this._isSliding=!1,setTimeout(y,0)};this._queueCallback(D,n,!0),(l||this._config.ride===!0)&&this.cycle()}_directionToOrder(t){return[qt,mt].includes(t)?W()?t===mt?gt:_t:t===mt?_t:gt:t}_orderToDirection(t){return[_t,gt].includes(t)?W()?t===gt?mt:qt:t===gt?qt:mt:t}static carouselInterface(t,e){const s=q.getOrCreateInstance(t,e);let{_config:n}=s;typeof e=="object"&&(n={...n,...e});const r=typeof e=="string"?e:e.slide;if(typeof e=="number"){s.to(e);return}if(typeof r=="string"){if(typeof s[r]>"u")throw new TypeError(`No method named "${r}"`);s[r]()}else n.interval&&n.ride===!0&&s.pause()}static jQueryInterface(t){return this.each(function(){let e=q.getOrCreateInstance(this);if(typeof t=="number"){e.to(t);return}if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}static dataApiClickHandler(t){const e=st(this);if(!e)return;const s={...E.getDataAttributes(e),...E.getDataAttributes(this)},n=this.getAttribute("data-twe-slide-to");n&&(s.interval=!1),q.carouselInterface(e,s),n&&q.getInstance(e).to(n),t.preventDefault()}}const ha=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),fa=/^aria-[\w-]*$/i,pa=/^data-twe-[\w-]*$/i,_a=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,ga=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,ma=(i,t)=>{const e=i.nodeName.toLowerCase();if(t.includes(e))return ha.has(e)?!!(_a.test(i.nodeValue)||ga.test(i.nodeValue)):!0;const s=t.filter(n=>n instanceof RegExp);for(let n=0,r=s.length;n{ma(v,f)||l.removeAttribute(v.nodeName)})}return n.body.innerHTML}const Js="tooltip",J=".twe.tooltip",va="te-tooltip",ba=new Set(["sanitize","allowList","sanitizeFn"]),wa={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Ta={AUTO:"auto",TOP:"top",RIGHT:W()?"left":"right",BOTTOM:"bottom",LEFT:W()?"right":"left"},Aa={animation:!0,template:`
+
+ `,trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:Ea,popperConfig:{hide:!0}},ya={HIDE:`hide${J}`,HIDDEN:`hidden${J}`,SHOW:`show${J}`,SHOWN:`shown${J}`,INSERTED:`inserted${J}`,CLICK:`click${J}`,FOCUSIN:`focusin${J}`,FOCUSOUT:`focusout${J}`,MOUSEENTER:`mouseenter${J}`,MOUSELEAVE:`mouseleave${J}`},Ca="fade",Oa="modal",pi="show",Gt="show",_i="out",tn="[data-twe-tooltip-inner-ref]",en=`.${Oa}`,sn="hide.twe.modal",Qt="hover",gi="focus",Da="click",Na="manual";class Et extends et{constructor(t,e){if(typeof Cs>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Aa}static get NAME(){return Js}static get Event(){return ya}static get DefaultType(){return wa}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(pi)){this._leave(null,this);return}this._enter(null,this)}}dispose(){clearTimeout(this._timeout),d.off(this._element.closest(en),sn,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this.isWithContent()&&this._isEnabled))return;const t=d.trigger(this._element,this.constructor.Event.SHOW),e=ki(this._element),s=e===null?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!s)return;this.constructor.NAME==="tooltip"&&this.tip&&this.getTitle()!==this.tip.querySelector(tn).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),r=Yn(this.constructor.NAME);n.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this._config.animation&&setTimeout(()=>{this.tip.classList.add("opacity-100"),this.tip.classList.remove("opacity-0")},100);const o=typeof this._config.placement=="function"?this._config.placement.call(this,n,this._element):this._config.placement,a=this._getAttachment(o);this._addAttachmentClass(a);const{container:l}=this._config;if(R.setData(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(n),d.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Je(this._element,n,this._getPopperConfig(a)),n.getAttribute("id").includes("tooltip"))switch(o){case"bottom":n.classList.add("py-[0.4rem]");break;case"left":n.classList.add("px-[0.4rem]");break;case"right":n.classList.add("px-[0.4rem]");break;default:n.classList.add("py-[0.4rem]");break}const c=this._resolvePossibleFunction(this._config.customClass);c&&n.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(g=>{d.on(g,"mouseover",se)});const f=()=>{const g=this._hoverState;this._hoverState=null,d.trigger(this._element,this.constructor.Event.SHOWN),g===_i&&this._leave(null,this)},v=this.tip.classList.contains("transition-opacity");this._queueCallback(f,this.tip,v)}hide(){if(!this._popper)return;const t=this.getTipElement(),e=()=>{this._isWithActiveTrigger()||(this._hoverState!==Gt&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),d.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(d.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.add("opacity-0"),t.classList.remove("opacity-100"),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(r=>d.off(r,"mouseover",se)),this._activeTrigger[Da]=!1,this._activeTrigger[gi]=!1,this._activeTrigger[Qt]=!1;const n=this.tip.classList.contains("opacity-0");this._queueCallback(e,this.tip,n),this._hoverState=""}update(){this._popper!==null&&this._popper.update()}isWithContent(){return!!this.getTitle()}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Ca,pi),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),tn)}_sanitizeAndSetContent(t,e,s){const n=h.findOne(s,t);if(!e&&n){n.remove();return}this.setElementContent(n,e)}setElementContent(t,e){if(t!==null){if(yt(e)){e=nt(e),this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent;return}this._config.html?(this._config.sanitize&&(e=Zs(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e}}getTitle(){const t=this._element.getAttribute("data-twe-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return t==="right"?"end":t==="left"?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_resolvePossibleFunction(t){return typeof t=="function"?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:s=>this._handlePopperPlacementChange(s)}],onFirstUpdate:s=>{s.options.placement!==s.placement&&this._handlePopperPlacementChange(s)}};return{...e,...typeof this._config.popperConfig=="function"?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return Ta[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(e=>{if(e==="click")d.on(this._element,this.constructor.Event.CLICK,this._config.selector,s=>this.toggle(s));else if(e!==Na){const s=e===Qt?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,n=e===Qt?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;d.on(this._element,s,this._config.selector,r=>this._enter(r)),d.on(this._element,n,this._config.selector,r=>this._leave(r))}}),this._hideModalHandler=()=>{this._element&&this.hide()},d.on(this._element.closest(en),sn,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-twe-original-title");(t||e!=="string")&&(this._element.setAttribute("data-twe-original-title",t||""),t&&!this._element.getAttribute("aria-label")&&!this._element.textContent&&this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){if(e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger[t.type==="focusin"?gi:Qt]=!0),e.getTipElement().classList.contains(pi)||e._hoverState===Gt){e._hoverState=Gt;return}if(clearTimeout(e._timeout),e._hoverState=Gt,!e._config.delay||!e._config.delay.show){e.show();return}e._timeout=setTimeout(()=>{e._hoverState===Gt&&e.show()},e._config.delay.show)}_leave(t,e){if(e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger[t.type==="focusout"?gi:Qt]=e._element.contains(t.relatedTarget)),!e._isWithActiveTrigger()){if(clearTimeout(e._timeout),e._hoverState=_i,!e._config.delay||!e._config.delay.hide){e.hide();return}e._timeout=setTimeout(()=>{e._hoverState===_i&&e.hide()},e._config.delay.hide)}}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=E.getDataAttributes(this._element);return Object.keys(e).forEach(s=>{ba.has(s)&&delete e[s]}),t={...this.constructor.Default,...e,...typeof t=="object"&&t?t:{}},t.container=t.container===!1?document.body:nt(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),x(Js,t,this.constructor.DefaultType),t.sanitize&&(t.template=Zs(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),s=t.getAttribute("class").match(e);s!==null&&s.length>0&&s.map(n=>n.trim()).forEach(n=>t.classList.remove(n))}_getBasicClassPrefix(){return va}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each(function(){const e=Et.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}const Sa="popover",tt=".twe.popover",La="te-popover",$a={...Et.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:`
+
+ `},Ia={...Et.DefaultType,content:"(string|element|function)"},Ra={HIDE:`hide${tt}`,HIDDEN:`hidden${tt}`,SHOW:`show${tt}`,SHOWN:`shown${tt}`,INSERTED:`inserted${tt}`,CLICK:`click${tt}`,FOCUSIN:`focusin${tt}`,FOCUSOUT:`focusout${tt}`,MOUSEENTER:`mouseenter${tt}`,MOUSELEAVE:`mouseleave${tt}`},ka="[data-twe-popover-header-ref]",xa="[data-twe-popover-body-ref]";class ge extends Et{static get Default(){return $a}static get NAME(){return Sa}static get Event(){return Ra}static get DefaultType(){return Ia}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),ka),this._sanitizeAndSetContent(t,this._getContent(),xa)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return La}static jQueryInterface(t){return this.each(function(){const e=ge.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}const mi="scrollspy",Ei=".twe.scrollspy",nn={offset:10,method:"auto",target:""},Pa={offset:"number",method:"string",target:"(string|element)"},Ma={active:"!text-primary font-semibold border-s-[0.125rem] border-solid border-primary"},Ha={active:"string"},vi=`activate${Ei}`,Va=`scroll${Ei}`,Zt="data-twe-nav-link-active",rn="data-twe-collapsible-scrollspy-ref",on="[data-twe-dropdown-item-ref]",Wa="[data-twe-nav-list-ref]",bi="[data-twe-nav-link-ref]",Ba="[data-twe-nav-item-ref]",an="[data-twe-list-group-item-ref]",wi=`${bi}, ${an}, ${on}`,ja="[data-twe-dropdown-ref]",Ua="[data-twe-dropdown-toggle-ref]",ln=`[${rn}]`,Ya=`[${Zt}]`,Ti="ul",Ka="maxOffset",cn="position";class me extends et{constructor(t,e,s){super(t),this._scrollElement=this._element.tagName==="BODY"?window:this._element,this._config=this._getConfig(e),this._classes=this._getClasses(s),this._offsets=[],this._targets=[],this._collapsibles=[],this._activeTarget=null,this._scrollHeight=0,d.on(this._scrollElement,Va,()=>this._process()),this.refresh(),this._process(),this._bindActivateEvent(),this._getCollapsibles(),this._collapsibles.length!==0&&(this._showSubsection(),this._hideSubsection())}static get Default(){return nn}static get NAME(){return mi}refresh(){const t=this._scrollElement===this._scrollElement.window?Ka:cn,e=this._config.method==="auto"?t:this._config.method,s=e===cn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),h.find(wi,this._config.target).map(r=>{const o=Re(r),a=o?h.findOne(o):null;if(a){const l=a.getBoundingClientRect();if(l.width||l.height)return[E[e](a).top+s,o]}return null}).filter(r=>r).sort((r,o)=>r[0]-o[0]).forEach(r=>{this._offsets.push(r[0]),this._targets.push(r[1])})}dispose(){d.off(this._scrollElement,Ei),d.off(this._scrollElement,vi),super.dispose()}_getConfig(t){return t={...nn,...E.getDataAttributes(this._element),...typeof t=="object"&&t?t:{}},t.target=nt(t.target)||document.documentElement,x(mi,t,Pa),t}_getClasses(t){const e=E.getDataClassAttributes(this._element);return t={...Ma,...e,...t},x(mi,t,Ha),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),s=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=s){const n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n);return}if(this._activeTarget&&t0){this._activeTarget=null,this._clear();return}for(let n=this._offsets.length;n--;)this._activeTarget!==this._targets[n]&&t>=this._offsets[n]&&(typeof this._offsets[n+1]>"u"||t`${n}[data-twe-target="${t}"],${n}[href="${t}"]`),s=h.findOne(e.join(","),this._config.target);s.classList.add(...this._classes.active.split(" ")),s.setAttribute(Zt,""),s.getAttribute(on)?h.findOne(Ua,s.closest(ja)).classList.add(...this._classes.active.split(" ")):h.parents(s,Wa).forEach(n=>{h.prev(n,`${bi}, ${an}`).forEach(r=>{r.classList.add(...this._classes.active.split(" ")),r.setAttribute(Zt,"")}),h.prev(n,Ba).forEach(r=>{h.children(r,bi).forEach(o=>o.classList.add(...this._classes.active.split(" ")))})}),d.trigger(this._scrollElement,vi,{relatedTarget:t})}_clear(){h.find(wi,this._config.target).filter(t=>t.classList.contains(...this._classes.active.split(" "))).forEach(t=>{t.classList.remove(...this._classes.active.split(" ")),t.removeAttribute(Zt)})}_hide(t){const e=h.findOne(Ti,t.parentNode);e.style.overflow="hidden",e.style.height="0px"}_show(t,e){t.style.height=e}_getCollapsibles(){const t=h.find(ln);t&&t.forEach(e=>{const s=e.parentNode,n=h.findOne(Ti,s),r=n.offsetHeight||n.scrollHeight;this._collapsibles.push({element:n,relatedTarget:e.getAttribute("href"),height:`${r}px`})})}_showSubsection(){h.find(Ya).filter(s=>s.hasAttribute(rn)).forEach(s=>{const n=h.findOne(Ti,s.parentNode),r=this._collapsibles.find(o=>o.relatedTarget=s.getAttribute("href")).height;this._show(n,r)})}_hideSubsection(){h.find(ln).filter(e=>e.hasAttribute(Zt)===!1).forEach(e=>{this._hide(e)})}_bindActivateEvent(){d.on(this._element,vi,()=>{this._showSubsection(),this._hideSubsection()})}static jQueryInterface(t){return this.each(function(){const e=me.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}const dn="tab",Ee=".twe.tab",Fa=`hide${Ee}`,za=`hidden${Ee}`,qa=`show${Ee}`,Xa=`shown${Ee}`,Ga="data-twe-dropdown-menu-ref",Ht="data-twe-tab-active",ve="data-twe-nav-active",Qa="[data-twe-dropdown-ref]",Za="[data-twe-nav-ref]",un=`[${Ht}]`,Ja=`[${ve}]`,hn=":scope > li > .active",tl="[data-twe-dropdown-toggle-ref]",el=":scope > [data-twe-dropdown-menu-ref] [data-twe-dropdown-show]",il={show:"opacity-100",hide:"opacity-0"},sl={show:"string",hide:"string"};class be extends et{constructor(t,e){super(t),this._classes=this._getClasses(e)}static get NAME(){return dn}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.getAttribute(ve)==="")return;let t;const e=st(this._element),s=this._element.closest(Za),n=h.findOne(Ja,s);if(s){const l=s.nodeName==="UL"||s.nodeName==="OL"?hn:un;t=h.find(l,s),t=t[t.length-1]}const r=t?d.trigger(t,Fa,{relatedTarget:this._element}):null;if(d.trigger(this._element,qa,{relatedTarget:t}).defaultPrevented||r!==null&&r.defaultPrevented)return;this._activate(this._element,s,null,n,this._element);const a=()=>{d.trigger(t,za,{relatedTarget:this._element}),d.trigger(this._element,Xa,{relatedTarget:t})};e?this._activate(e,e.parentNode,a,n,this._element):a()}_getClasses(t){const e=E.getDataClassAttributes(this._element);return t={...il,...e,...t},x(dn,t,sl),t}_activate(t,e,s,n,r){const a=(e&&(e.nodeName==="UL"||e.nodeName==="OL")?h.find(hn,e):h.children(e,un))[0],l=s&&a&&a.hasAttribute(Ht),u=()=>this._transitionComplete(t,a,s,n,r);a&&l?(E.removeClass(a,this._classes.show),E.addClass(a,this._classes.hide),this._queueCallback(u,t,!0)):u()}_transitionComplete(t,e,s,n,r){if(e&&n){e.removeAttribute(Ht),n.removeAttribute(ve);const a=h.findOne(el,e.parentNode);a&&a.removeAttribute(Ht),e.getAttribute("role")==="tab"&&e.setAttribute("aria-selected",!1)}t.setAttribute(Ht,""),r.setAttribute(ve,""),t.getAttribute("role")==="tab"&&t.setAttribute("aria-selected",!0),Ut(t),t.classList.contains(this._classes.hide)&&(E.removeClass(t,this._classes.hide),E.addClass(t,this._classes.show));let o=t.parentNode;if(o&&o.nodeName==="LI"&&(o=o.parentNode),o&&o.hasAttribute(Ga)){const a=t.closest(Qa);a&&h.find(tl,a).forEach(l=>l.setAttribute(Ht,"")),t.setAttribute("aria-expanded",!0)}s&&s()}static jQueryInterface(t){return this.each(function(){const e=be.getOrCreateInstance(this);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}(()=>{var i={454:(s,n,r)=>{r.d(n,{Z:()=>l});var o=r(645),a=r.n(o)()(function(u){return u[1]});a.push([s.id,"INPUT:-webkit-autofill,SELECT:-webkit-autofill,TEXTAREA:-webkit-autofill{animation-name:onautofillstart}INPUT:not(:-webkit-autofill),SELECT:not(:-webkit-autofill),TEXTAREA:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{}@keyframes onautofillcancel{}",""]);const l=a},645:s=>{s.exports=function(n){var r=[];return r.toString=function(){return this.map(function(o){var a=n(o);return o[2]?"@media ".concat(o[2]," {").concat(a,"}"):a}).join("")},r.i=function(o,a,l){typeof o=="string"&&(o=[[null,o,""]]);var u={};if(l)for(var c=0;c{(function(){if(typeof window<"u")try{var s=new window.CustomEvent("test",{cancelable:!0});if(s.preventDefault(),s.defaultPrevented!==!0)throw new Error("Could not prevent default")}catch{var n=function(o,a){var l,u;return(a=a||{}).bubbles=!!a.bubbles,a.cancelable=!!a.cancelable,(l=document.createEvent("CustomEvent")).initCustomEvent(o,a.bubbles,a.cancelable,a.detail),u=l.preventDefault,l.preventDefault=function(){u.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch{this.defaultPrevented=!0}},l};n.prototype=window.Event.prototype,window.CustomEvent=n}})()},379:(s,n,r)=>{var o,a=function(){var m={};return function(p){if(m[p]===void 0){var _=document.querySelector(p);if(window.HTMLIFrameElement&&_ instanceof window.HTMLIFrameElement)try{_=_.contentDocument.head}catch{_=null}m[p]=_}return m[p]}}(),l=[];function u(m){for(var p=-1,_=0;_{var n=s&&s.__esModule?()=>s.default:()=>s;return e.d(n,{a:n}),n},e.d=(s,n)=>{for(var r in n)e.o(n,r)&&!e.o(s,r)&&Object.defineProperty(s,r,{enumerable:!0,get:n[r]})},e.o=(s,n)=>Object.prototype.hasOwnProperty.call(s,n),(()=>{var s=e(379),n=e.n(s),r=e(454);function o(l){if(!l.hasAttribute("autocompleted")){l.setAttribute("autocompleted","");var u=new window.CustomEvent("onautocomplete",{bubbles:!0,cancelable:!0,detail:null});l.dispatchEvent(u)||(l.value="")}}function a(l){l.hasAttribute("autocompleted")&&(l.removeAttribute("autocompleted"),l.dispatchEvent(new window.CustomEvent("onautocomplete",{bubbles:!0,cancelable:!1,detail:null})))}n()(r.Z,{insert:"head",singleton:!1}),r.Z.locals,e(810),document.addEventListener("animationstart",function(l){l.animationName==="onautofillstart"?o(l.target):a(l.target)},!0),document.addEventListener("input",function(l){l.inputType!=="insertReplacementText"&&"data"in l?a(l.target):o(l.target)},!0)})()})();const Ai="input",we="twe.input",fn="data-twe-input-wrapper-init",pn="data-twe-input-notch-ref",_n="data-twe-input-notch-leading-ref",gn="data-twe-input-notch-middle-ref",nl="data-twe-input-notch-trailing-ref",rl="data-twe-input-helper-ref",ol="data-twe-input-placeholder-active",at="data-twe-input-state-active",mn="data-twe-input-focused",En="data-twe-input-form-counter",Te=`[${fn}] input`,Ae=`[${fn}] textarea`,Vt=`[${pn}]`,vn=`[${_n}]`,bn=`[${gn}]`,al=`[${rl}]`,ll={inputFormWhite:!1},cl={inputFormWhite:"(boolean)"},dl={notch:"group flex absolute left-0 top-0 w-full max-w-full h-full text-left pointer-events-none",notchLeading:"pointer-events-none border border-solid box-border bg-transparent transition-all duration-200 ease-linear motion-reduce:transition-none left-0 top-0 h-full w-2 border-e-0 rounded-s-[0.25rem] group-data-[twe-input-focused]:border-e-0 group-data-[twe-input-state-active]:border-e-0",notchLeadingNormal:"border-secondary-500 dark:border-neutral-400 group-data-[twe-input-focused]:shadow-notch-1 group-data-[twe-input-focused]:border-primary",notchLeadingWhite:"border-neutral-200 group-data-[twe-input-focused]:shadow-notch-1 group-data-[twe-input-focused]:shadow-white group-data-[twe-input-focused]:border-white",notchMiddle:"pointer-events-none border border-solid box-border bg-transparent transition-all duration-200 ease-linear motion-reduce:transition-none grow-0 shrink-0 basis-auto w-auto max-w-[calc(100%-1rem)] h-full border-e-0 border-s-0 group-data-[twe-input-focused]:border-x-0 group-data-[twe-input-state-active]:border-x-0 group-data-[twe-input-focused]:border-t group-data-[twe-input-state-active]:border-t group-data-[twe-input-focused]:border-solid group-data-[twe-input-state-active]:border-solid group-data-[twe-input-focused]:border-t-transparent group-data-[twe-input-state-active]:border-t-transparent",notchMiddleNormal:"border-secondary-500 dark:border-neutral-400 group-data-[twe-input-focused]:shadow-notch-2 group-data-[twe-input-focused]:border-primary",notchMiddleWhite:"border-neutral-200 group-data-[twe-input-focused]:shadow-notch-2 group-data-[twe-input-focused]:shadow-white group-data-[twe-input-focused]:border-white",notchTrailing:"pointer-events-none border border-solid box-border bg-transparent transition-all duration-200 ease-linear motion-reduce:transition-none grow h-full border-s-0 rounded-e-[0.25rem] group-data-[twe-input-focused]:border-s-0 group-data-[twe-input-state-active]:border-s-0",notchTrailingNormal:"border-secondary-500 dark:border-neutral-400 group-data-[twe-input-focused]:shadow-notch-3 group-data-[twe-input-focused]:border-primary",notchTrailingWhite:"border-neutral-200 group-data-[twe-input-focused]:shadow-notch-3 group-data-[twe-input-focused]:shadow-white group-data-[twe-input-focused]:border-white",counter:"text-right leading-[1.6]"},ul={notch:"string",notchLeading:"string",notchLeadingNormal:"string",notchLeadingWhite:"string",notchMiddle:"string",notchMiddleNormal:"string",notchMiddleWhite:"string",notchTrailing:"string",notchTrailingNormal:"string",notchTrailingWhite:"string",counter:"string"};class S{constructor(t,e,s){this._config=this._getConfig(e,t),this._element=t,this._classes=this._getClasses(s),this._label=null,this._labelWidth=0,this._labelMarginLeft=0,this._notchLeading=null,this._notchMiddle=null,this._notchTrailing=null,this._initiated=!1,this._helper=null,this._counter=!1,this._counterElement=null,this._maxLength=0,this._leadingIcon=null,this._element&&(R.setData(t,we,this),this.init())}static get NAME(){return Ai}get input(){return h.findOne("input",this._element)||h.findOne("textarea",this._element)}init(){this._initiated||(this._getLabelData(),this._applyDivs(),this._applyNotch(),this._activate(),this._getHelper(),this._getCounter(),this._getEvents(),this._initiated=!0)}update(){this._getLabelData(),this._getNotchData(),this._applyNotch(),this._activate(),this._getHelper(),this._getCounter()}forceActive(){this.input.setAttribute(at,""),h.findOne(Vt,this.input.parentNode).setAttribute(at,"")}forceInactive(){this.input.removeAttribute(at),h.findOne(Vt,this.input.parentNode).removeAttribute(at)}dispose(){this._removeBorder(),R.removeData(this._element,we),this._element=null}_getConfig(t,e){return t={...ll,...E.getDataAttributes(e),...typeof t=="object"?t:{}},x(Ai,t,cl),t}_getClasses(t){const e=E.getDataClassAttributes(this._element);return t={...dl,...e,...t},x(Ai,t,ul),t}_getLabelData(){this._label=h.findOne("label",this._element),this._label===null?this._showPlaceholder():(this._getLabelWidth(),this._getLabelPositionInInputGroup(),this._toggleDefaultDatePlaceholder())}_getHelper(){this._helper=h.findOne(al,this._element)}_getCounter(){this._counter=E.getDataAttribute(this.input,"inputShowcounter"),this._counter&&(this._maxLength=this.input.maxLength,this._showCounter())}_getEvents(){d.on(this._element,"focus","input",S.activate(new S)),d.on(this._element,"input","input",S.activate(new S)),d.on(this._element,"blur","input",S.deactivate(new S)),d.on(this._element,"focus","textarea",S.activate(new S)),d.on(this._element,"input","textarea",S.activate(new S)),d.on(this._element,"blur","textarea",S.deactivate(new S)),d.on(window,"shown.twe.modal",t=>{h.find(Te,t.target).forEach(e=>{const s=S.getInstance(e.parentNode);s&&s.update()}),h.find(Ae,t.target).forEach(e=>{const s=S.getInstance(e.parentNode);s&&s.update()})}),d.on(window,"shown.twe.dropdown",t=>{const e=t.target.parentNode.querySelector("[data-twe-dropdown-menu-ref]");e&&(h.find(Te,e).forEach(s=>{const n=S.getInstance(s.parentNode);n&&n.update()}),h.find(Ae,e).forEach(s=>{const n=S.getInstance(s.parentNode);n&&n.update()}))}),d.on(window,"shown.twe.tab",t=>{let e;t.target.href?e=t.target.href.split("#")[1]:e=E.getDataAttribute(t.target,"target").split("#")[1];const s=h.findOne(`#${e}`);h.find(Te,s).forEach(n=>{const r=S.getInstance(n.parentNode);r&&r.update()}),h.find(Ae,s).forEach(n=>{const r=S.getInstance(n.parentNode);r&&r.update()})}),d.on(window,"reset",t=>{h.find(Te,t.target).forEach(e=>{const s=S.getInstance(e.parentNode);s&&s.forceInactive()}),h.find(Ae,t.target).forEach(e=>{const s=S.getInstance(e.parentNode);s&&s.forceInactive()})}),d.on(window,"onautocomplete",t=>{const e=S.getInstance(t.target.parentNode);!e||!t.cancelable||e.forceActive()})}_showCounter(){if(h.find(`[${En}]`,this._element).length>0)return;this._counterElement=document.createElement("div"),E.addClass(this._counterElement,this._classes.counter),this._counterElement.setAttribute(En,"");const e=this.input.value.length;this._counterElement.innerHTML=`${e} / ${this._maxLength}`,this._helper.appendChild(this._counterElement),this._bindCounter()}_bindCounter(){d.on(this.input,"input",()=>{const t=this.input.value.length;this._counterElement.innerHTML=`${t} / ${this._maxLength}`})}_toggleDefaultDatePlaceholder(t=this.input){if(!(t.getAttribute("type")==="date"))return;!(document.activeElement===t)&&!t.value?t.style.opacity=0:t.style.opacity=1}_showPlaceholder(){this.input.setAttribute(ol,"")}_getNotchData(){this._notchMiddle=h.findOne(bn,this._element),this._notchLeading=h.findOne(vn,this._element)}_getLabelWidth(){this._labelWidth=this._label.clientWidth*.8+8}_getLabelPositionInInputGroup(){if(this._labelMarginLeft=0,!this._element.hasAttribute("data-twe-input-group-ref"))return;const t=this.input,e=h.prev(t,"[data-twe-input-group-text-ref]")[0];e===void 0?this._labelMarginLeft=0:this._labelMarginLeft=e.offsetWidth-1}_applyDivs(){const t=this._config.inputFormWhite?this._classes.notchLeadingWhite:this._classes.notchLeadingNormal,e=this._config.inputFormWhite?this._classes.notchMiddleWhite:this._classes.notchMiddleNormal,s=this._config.inputFormWhite?this._classes.notchTrailingWhite:this._classes.notchTrailingNormal,n=h.find(Vt,this._element),r=Yt("div");E.addClass(r,this._classes.notch),r.setAttribute(pn,""),this._notchLeading=Yt("div"),E.addClass(this._notchLeading,`${this._classes.notchLeading} ${t}`),this._notchLeading.setAttribute(_n,""),this._notchMiddle=Yt("div"),E.addClass(this._notchMiddle,`${this._classes.notchMiddle} ${e}`),this._notchMiddle.setAttribute(gn,""),this._notchTrailing=Yt("div"),E.addClass(this._notchTrailing,`${this._classes.notchTrailing} ${s}`),this._notchTrailing.setAttribute(nl,""),!(n.length>=1)&&(r.append(this._notchLeading),r.append(this._notchMiddle),r.append(this._notchTrailing),this._element.append(r),r.dir="ltr")}_applyNotch(){this._notchMiddle.style.width=`${this._labelWidth}px`,this._notchLeading.style.width=`${this._labelMarginLeft+9}px`,this._label!==null&&(this._label.style.marginLeft=`${this._labelMarginLeft}px`)}_removeBorder(){const t=h.findOne(Vt,this._element);t&&t.remove()}_activate(t){Pi(()=>{this._getElements(t);const e=t?t.target:this.input,s=h.findOne(Vt,this._element);t&&t.type==="focus"&&s&&s.setAttribute(mn,""),e.value!==""&&(e.setAttribute(at,""),s&&s.setAttribute(at,"")),this._toggleDefaultDatePlaceholder(e)})}_getElements(t){if(t&&(this._element=t.target.parentNode,this._label=h.findOne("label",this._element)),t&&this._label){const e=this._labelWidth;this._getLabelData(),e!==this._labelWidth&&(this._notchMiddle=h.findOne(bn,t.target.parentNode),this._notchLeading=h.findOne(vn,t.target.parentNode),this._applyNotch())}}_deactivate(t){const e=t?t.target:this.input;if(e.getAttribute("aria-expanded")==="true")return;const s=h.findOne(Vt,e.parentNode);s.removeAttribute(mn),e.value===""&&(e.removeAttribute(at),s.removeAttribute(at)),this._toggleDefaultDatePlaceholder(e)}static activate(t){return function(e){t._activate(e)}}static deactivate(t){return function(e){t._deactivate(e)}}static jQueryInterface(t,e){return this.each(function(){let s=R.getData(this,we);const n=typeof t=="object"&&t;if(!(!s&&/dispose/.test(t))&&(s||(s=new S(this,n)),typeof t=="string")){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t](e)}})}static getInstance(t){return R.getData(t,we)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}}const hl={property:"color",defaultValue:null,inherit:!0},Wt=(i,t)=>{const{property:e,defaultValue:s,inherit:n}={...hl,...t},r=document.createElement("div");r.classList.add(i),document.body.appendChild(r);const a=window.getComputedStyle(r)[e]||s,u=window.getComputedStyle(r.parentElement)[e];return document.body.removeChild(r),!n&&u&&a===u?s:a||s},yi="ripple",ye="twe.ripple",fl="rgba({{color}}, 0.2) 0, rgba({{color}}, 0.3) 40%, rgba({{color}}, 0.4) 50%, rgba({{color}}, 0.5) 60%, rgba({{color}}, 0) 70%",pl=["[data-twe-ripple-init]"],Ce=[0,0,0],_l=[{name:"primary",gradientColor:Wt("text-primary",{defaultValue:"#3B71CA",inherit:!1})},{name:"secondary",gradientColor:Wt("text-primary-100",{defaultValue:"#9FA6B2",inherit:!1})},{name:"success",gradientColor:Wt("text-success",{defaultValue:"#14A44D",inherit:!1})},{name:"danger",gradientColor:Wt("text-danger",{defaultValue:"#DC4C64",inherit:!1})},{name:"warning",gradientColor:Wt("text-warning",{defaultValue:"#E4A11B",inherit:!1})},{name:"info",gradientColor:Wt("text-info",{defaultValue:"#54B4D3",inherit:!1})},{name:"light",gradientColor:"#fbfbfb"},{name:"dark",gradientColor:"#262626"}],wn=.5,gl={rippleCentered:!1,rippleColor:"",rippleColorDark:"",rippleDuration:"500ms",rippleRadius:0,rippleUnbound:!1},ml={rippleCentered:"boolean",rippleColor:"string",rippleColorDark:"string",rippleDuration:"string",rippleRadius:"number",rippleUnbound:"boolean"},El={ripple:"relative overflow-hidden inline-block align-bottom",rippleWave:"rounded-[50%] opacity-50 pointer-events-none absolute touch-none scale-0 transition-[transform,_opacity] ease-[cubic-bezier(0,0,0.15,1),_cubic-bezier(0,0,0.15,1)] z-[999]",unbound:"overflow-visible"},vl={ripple:"string",rippleWave:"string",unbound:"string"};class Oe{constructor(t,e,s){this._element=t,this._options=this._getConfig(e),this._classes=this._getClasses(s),this._currentColor=this._options.rippleColor,this._element&&(R.setData(t,ye,this),E.addClass(this._element,this._classes.ripple)),this._clickHandler=this._createRipple.bind(this),this._rippleTimer=null,this._isMinWidthSet=!1,this._initialClasses=null,this.init()}static get NAME(){return yi}init(){this._addClickEvent(this._element)}dispose(){R.removeData(this._element,ye),d.off(this._element,"mousedown",this._clickHandler),this._element=null,this._options=null}_autoInit(t){pl.forEach(e=>{h.closest(t.target,e)&&(this._element=h.closest(t.target,e))}),this._element.style.minWidth||(E.style(this._element,{"min-width":getComputedStyle(this._element).width}),this._isMinWidthSet=!0),this._options=this._getConfig(),this._classes=this._getClasses(),this._initialClasses=[...this._element.classList],E.addClass(this._element,this._classes.ripple),this._createRipple(t)}_addClickEvent(t){d.on(t,"mousedown",this._clickHandler)}_createRipple(t){this._element.className.indexOf(this._classes.ripple)<0&&E.addClass(this._element,this._classes.ripple);const{layerX:e,layerY:s}=t,n=t.offsetX||e,r=t.offsetY||s,o=this._element.offsetHeight,a=this._element.offsetWidth,l=this._durationToMsNumber(this._options.rippleDuration),u={offsetX:this._options.rippleCentered?o/2:n,offsetY:this._options.rippleCentered?a/2:r,height:o,width:a},c=this._getDiameter(u),f=this._options.rippleRadius||c/2,v={delay:l*wn,duration:l-l*wn},g={left:this._options.rippleCentered?`${a/2-f}px`:`${n-f}px`,top:this._options.rippleCentered?`${o/2-f}px`:`${r-f}px`,height:`${this._options.rippleRadius*2||c}px`,width:`${this._options.rippleRadius*2||c}px`,transitionDelay:`0s, ${v.delay}ms`,transitionDuration:`${l}ms, ${v.duration}ms`},O=Yt("div");this._createHTMLRipple({wrapper:this._element,ripple:O,styles:g}),this._removeHTMLRipple({ripple:O,duration:l})}_createHTMLRipple({wrapper:t,ripple:e,styles:s}){Object.keys(s).forEach(n=>e.style[n]=s[n]),E.addClass(e,this._classes.rippleWave),e.setAttribute("data-twe-ripple-ref",""),this._addColor(e,t),this._toggleUnbound(t),this._appendRipple(e,t)}_removeHTMLRipple({ripple:t,duration:e}){this._rippleTimer&&(clearTimeout(this._rippleTimer),this._rippleTimer=null),t&&setTimeout(()=>{t.classList.add("!opacity-0")},10),this._rippleTimer=setTimeout(()=>{if(t&&(t.remove(),this._element)){h.find("[data-twe-ripple-ref]",this._element).forEach(n=>{n.remove()}),this._isMinWidthSet&&(E.style(this._element,{"min-width":""}),this._isMinWidthSet=!1);const s=this._initialClasses?this._addedNewRippleClasses(this._classes.ripple,this._initialClasses):this._classes.ripple.split(" ");E.removeClass(this._element,s)}},e)}_addedNewRippleClasses(t,e){return t.split(" ").filter(s=>e.findIndex(n=>s===n)===-1)}_durationToMsNumber(t){return Number(t.replace("ms","").replace("s","000"))}_getConfig(t={}){const e=E.getDataAttributes(this._element);return t={...gl,...e,...t},x(yi,t,ml),t}_getClasses(t={}){const e=E.getDataClassAttributes(this._element);return t={...El,...e,...t},x(yi,t,vl),t}_getDiameter({offsetX:t,offsetY:e,height:s,width:n}){const r=e<=s/2,o=t<=n/2,a=(v,g)=>Math.sqrt(v**2+g**2),l=e===s/2&&t===n/2,u={first:r===!0&&o===!1,second:r===!0&&o===!0,third:r===!1&&o===!0,fourth:r===!1&&o===!1},c={topLeft:a(t,e),topRight:a(n-t,e),bottomLeft:a(t,s-e),bottomRight:a(n-t,s-e)};let f=0;return l||u.fourth?f=c.topLeft:u.third?f=c.topRight:u.second?f=c.bottomRight:u.first&&(f=c.bottomLeft),f*2}_appendRipple(t,e){e.appendChild(t),setTimeout(()=>{E.addClass(t,"opacity-0 scale-100")},50)}_toggleUnbound(t){this._options.rippleUnbound===!0?E.addClass(t,this._classes.unbound):E.removeClass(t,this._classes.unbound)}_addColor(t){let e=this._options.rippleColor||"rgb(0,0,0)";(localStorage.theme==="dark"||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches)&&(e=this._options.rippleColorDark||this._options.rippleColor);const s=_l.find(o=>o.name===e.toLowerCase()),n=s?this._colorToRGB(s.gradientColor).join(","):this._colorToRGB(e).join(","),r=fl.split("{{color}}").join(`${n}`);t.style.backgroundImage=`radial-gradient(circle, ${r})`}_colorToRGB(t){function e(r){return r.length<7&&(r=`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}`),[parseInt(r.substr(1,2),16),parseInt(r.substr(3,2),16),parseInt(r.substr(5,2),16)]}function s(r){const o=document.body.appendChild(document.createElement("fictum")),a="rgb(1, 2, 3)";return o.style.color=a,o.style.color!==a||(o.style.color=r,o.style.color===a||o.style.color==="")?Ce:(r=getComputedStyle(o).color,document.body.removeChild(o),r)}function n(r){return r=r.match(/[.\d]+/g).map(o=>+Number(o)),r.length=3,r}return t.toLowerCase()==="transparent"?Ce:t[0]==="#"?e(t):(t.indexOf("rgb")===-1&&(t=s(t)),t.indexOf("rgb")===0?n(t):Ce)}static autoInitial(t){return function(e){t._autoInit(e)}}static jQueryInterface(t){return this.each(function(){return R.getData(this,ye)?null:new Oe(this,t)})}static getInstance(t){return R.getData(t,ye)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}}const Ci="modal",X=".twe.modal",Tn="Escape",An={backdrop:!0,keyboard:!0,focus:!0},yn={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},bl={show:"transform-none",static:"scale-[1.02]",staticProperties:"transition-scale duration-300 ease-in-out",backdrop:"opacity-50 transition-all duration-300 ease-in-out fixed top-0 left-0 z-[1040] bg-black w-screen h-screen"},wl={show:"string",static:"string",staticProperties:"string",backdrop:"string"},Tl=`hide${X}`,Al=`hidePrevented${X}`,yl=`hidden${X}`,Cl=`show${X}`,Ol=`shown${X}`,Cn=`resize${X}`,On=`click.dismiss${X}`,Dn=`keydown.dismiss${X}`,Dl=`mouseup.dismiss${X}`,Nn=`mousedown.dismiss${X}`,Sn="data-twe-modal-open",Ln="data-twe-open",Jt="[data-twe-modal-dialog-ref]",Nl="[data-twe-modal-body-ref]";class te extends et{constructor(t,e,s){super(t),this._config=this._getConfig(e),this._classes=this._getClasses(s),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._scrollBar=new ci,this._dialog=h.findOne(Jt,this._element),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._didInit=!1,this._init()}static get NAME(){return Ci}static get Default(){return An}static get getDefaultType(){return yn}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||d.trigger(this._element,Cl,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.setAttribute(Sn,"true"),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),d.on(this._dialog,Nn,()=>{d.one(this._element,Dl,s=>{s.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showElement(t),this._showBackdrop())}hide(){if(!this._isShown||this._isTransitioning||d.trigger(this._element,Tl).defaultPrevented)return;this._isShown=!1;const e=this._isAnimated();e&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.disable(),h.findOne(Jt,this._element).classList.remove(this._classes.show),d.off(this._element,On),d.off(this._dialog,Nn),this._queueCallback(()=>this._hideModal(),this._element,e),this._element.removeAttribute(Ln)}dispose(){[window,document,this._dialog].forEach(t=>d.off(t,X)),this._backdrop.dispose(),this._focustrap.disable(),super.dispose()}handleUpdate(){this._adjustDialog()}_init(){this._didInit||(js(te),this._didInit=!0)}_initializeBackDrop(){return new Vs({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated(),backdropClasses:this._classes.backdrop})}_initializeFocusTrap(){return new Ws(this._element,{event:"keydown",condition:t=>t.key==="Tab"})}_showElement(t){const e=this._isAnimated(),s=h.findOne(Nl,this._dialog);(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE)&&document.body.append(this._element),this._element.style.display="block",this._element.classList.remove("hidden"),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.setAttribute(`${Ln}`,"true"),this._element.scrollTop=0;const n=h.findOne(Jt,this._element);n.classList.add(this._classes.show),n.classList.remove("opacity-0"),n.classList.add("opacity-100"),s&&(s.scrollTop=0),e&&Ut(this._element);const r=()=>{this._config.focus&&this._focustrap.trap(),this._isTransitioning=!1,d.trigger(this._element,Ol,{relatedTarget:t})};this._queueCallback(r,this._dialog,e)}_setEscapeEvent(){this._isShown?d.on(document,Dn,t=>{this._config.keyboard&&t.key===Tn?(t.preventDefault(),this.hide()):!this._config.keyboard&&t.key===Tn&&this._triggerBackdropTransition()}):d.off(this._element,Dn)}_setResizeEvent(){this._isShown?d.on(window,Cn,()=>this._adjustDialog()):d.off(window,Cn)}_hideModal(){const t=h.findOne(Jt,this._element);t.classList.remove(this._classes.show),t.classList.remove("opacity-100"),t.classList.add("opacity-0");const e=ke(t);setTimeout(()=>{this._element.style.display="none"},e),this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.removeAttribute(Sn),this._resetAdjustments(),this._scrollBar.reset(),d.trigger(this._element,yl)})}_showBackdrop(t){d.on(this._element,On,e=>{if(this._ignoreBackdropClick){this._ignoreBackdropClick=!1;return}e.target===e.currentTarget&&(this._config.backdrop===!0?this.hide():this._config.backdrop==="static"&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return!!h.findOne(Jt,this._element)}_triggerBackdropTransition(){if(d.trigger(this._element,Al).defaultPrevented)return;const{classList:e,scrollHeight:s,style:n}=this._element,r=s>document.documentElement.clientHeight;if(!r&&n.overflowY==="hidden"||e.contains(this._classes.static))return;r||(n.overflowY="hidden"),e.add(...this._classes.static.split(" ")),e.add(...this._classes.staticProperties.split(" "));const o=ke(this._element);this._queueCallback(()=>{e.remove(this._classes.static),setTimeout(()=>{e.remove(...this._classes.staticProperties.split(" "))},o),r||this._queueCallback(()=>{n.overflowY=""},this._dialog)},this._dialog),this._element.focus()}_getConfig(t){return t={...An,...E.getDataAttributes(this._element),...typeof t=="object"?t:{}},x(Ci,t,yn),t}_getClasses(t){const e=E.getDataClassAttributes(this._element);return t={...bl,...e,...t},x(Ci,t,wl),t}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),s=e>0;(!s&&t&&!W()||s&&!t&&W())&&(this._element.style.paddingLeft=`${e}px`),(s&&!t&&!W()||!s&&t&&W())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const s=te.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t](e)}})}}const Sl={carousel:{name:"Carousel",selector:"[data-twe-carousel-init]",isToggler:!1},input:{name:"Input",selector:"[data-twe-input-wrapper-init]",isToggler:!1},scrollspy:{name:"ScrollSpy",selector:"[data-twe-spy='scroll']",isToggler:!1},button:{name:"Button",selector:"[data-twe-toggle='button']",isToggler:!0,callback:(i,t)=>{d.on(document,`click.twe.${i.NAME}`,t,e=>{e.preventDefault();const s=e.target.closest(t);i.getOrCreateInstance(s).toggle()})}},collapse:{name:"Collapse",selector:"[data-twe-collapse-init]",isToggler:!0,callback:(i,t)=>{d.on(document,`click.twe.${i.NAME}.data-api`,t,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();const s=Re(this);h.find(s).forEach(r=>{i.getOrCreateInstance(r,{toggle:!1}).toggle()})})}},dropdown:{name:"Dropdown",selector:"[data-twe-dropdown-toggle-ref]",isToggler:!0,callback:(i,t)=>{d.on(document,`click.twe.${i.NAME}`,t,function(e){e.preventDefault(),i.getOrCreateInstance(this).toggle()})}},ripple:{name:"Ripple",selector:"[data-twe-ripple-init]",isToggler:!0,callback:(i,t)=>{d.one(document,"mousedown",t,i.autoInitial(new i))}},offcanvas:{name:"Offcanvas",selector:"[data-twe-offcanvas-toggle]",isToggler:!0,callback:(i,t)=>{d.on(document,`click.twe.${i.NAME}.data-api`,t,function(e){const s=st(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),ct(this))return;d.one(s,i.EVENT_HIDDEN,()=>{Ct(this)&&this.focus()});const n=h.findOne(i.OPEN_SELECTOR);n&&n!==s&&i.getInstance(n).hide(),i.getOrCreateInstance(s).toggle(this)})}},tab:{name:"Tab",selector:"[data-twe-toggle='tab'], [data-twe-toggle='pill'], [data-twe-toggle='list']",isToggler:!0,callback:(i,t)=>{d.on(document,`click.twe.${i.NAME}.data-api`,t,function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),ct(this))return;i.getOrCreateInstance(this).show()})}},tooltip:{name:"Tooltip",selector:"[data-twe-toggle='tooltip']",isToggler:!1,callback:(i,t)=>{[].slice.call(document.querySelectorAll(t)).map(function(s){return new i(s)})}},popover:{name:"Popover",selector:"[data-twe-toggle='popover']",isToggler:!0,callback:(i,t)=>{[].slice.call(document.querySelectorAll(t)).map(function(s){return new i(s)})}},modal:{name:"Modal",selector:"[data-twe-toggle='modal']",isToggler:!0,callback:(i,t)=>{d.on(document,`click.twe.${i.NAME}`,t,function(e){const s=st(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),d.one(s,i.EVENT_SHOW,o=>{o.defaultPrevented||d.one(s,i.EVENT_HIDDEN,()=>{Ct(this)&&this.focus()})});const n=h.findOne(`[${i.OPEN_SELECTOR}="true"]`);n&&i.getInstance(n).hide(),i.getOrCreateInstance(s).toggle(this)})}}},Ll=i=>{Pi(()=>{const t=xi();if(t){const e=i.NAME,s=t.fn[e];t.fn[e]=i.jQueryInterface,t.fn[e].Constructor=i,t.fn[e].noConflict=()=>(t.fn[e]=s,i.jQueryInterface)}})};class $l{constructor(){this.inits=[]}get initialized(){return this.inits}isInited(t){return this.inits.includes(t)}add(t){this.isInited(t)||this.inits.push(t)}}const Oi=new $l;let Bt;const Il=i=>Bt[i.NAME]||null,Rl=(i,t)=>{if(!i||!t.allowReinits&&Oi.isInited(i.NAME))return;Oi.add(i.NAME);const e=Il(i),s=(e==null?void 0:e.isToggler)||!1;if(Ll(i),e!=null&&e.advanced){e==null||e.advanced(i,e==null?void 0:e.selector);return}if(s){e==null||e.callback(i,e==null?void 0:e.selector);return}h.find(e==null?void 0:e.selector).forEach(n=>{let r=i.getInstance(n);r||(r=new i(n),e!=null&&e.onInit&&r[e.onInit]())})},kl={allowReinits:!1,checkOtherImports:!1};class xl{constructor(t){$i(this,"init",(t,e)=>{t.forEach(s=>Rl(s,e))});$i(this,"initTWE",(t,e)=>{const s={...kl,...e},n=Object.keys(Bt).map(r=>{if(!!document.querySelector(Bt[r].selector)){const a=t[Bt[r].name];return!a&&!Oi.isInited(r)&&s.checkOtherImports&&console.warn(`Please import ${Bt[r].name} from "tw-elements" package and add it to a object parameter inside "initTWE" function`),a}});this.init(n,s)});Bt=t}}const $n=new xl(Sl).initTWE;$n({Button:ne,Dropdown:z,Collapse:kt,Offcanvas:Pt,Carousel:q,Popover:ge,ScrollSpy:me,Tab:be,Tooltip:Et,Input:S,Ripple:Oe,Modal:te}),L.Button=ne,L.Carousel=q,L.Collapse=kt,L.Dropdown=z,L.Input=S,L.Modal=te,L.Offcanvas=Pt,L.Popover=ge,L.Ripple=Oe,L.ScrollSpy=me,L.Tab=be,L.Tooltip=Et,L.initTWE=$n,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
+//# sourceMappingURL=tw-elements.umd.min.js.map
diff --git a/public/lib/typeit/typeit.umd.57f9bc6e047efc875cb4f2e9ca74c802de33638d2c3aff6d9b7eb3c7588c24649b6c3e51cd45f49c0ed0cf72aedbd694bf2d35f358a34076d63f9febabc0bd6f.js b/public/lib/typeit/typeit.umd.57f9bc6e047efc875cb4f2e9ca74c802de33638d2c3aff6d9b7eb3c7588c24649b6c3e51cd45f49c0ed0cf72aedbd694bf2d35f358a34076d63f9febabc0bd6f.js
new file mode 100644
index 0000000..d201783
--- /dev/null
+++ b/public/lib/typeit/typeit.umd.57f9bc6e047efc875cb4f2e9ca74c802de33638d2c3aff6d9b7eb3c7588c24649b6c3e51cd45f49c0ed0cf72aedbd694bf2d35f358a34076d63f9febabc0bd6f.js
@@ -0,0 +1,2 @@
+// TypeIt by Alex MacArthur - https://typeitjs.com
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TypeIt=t()}(this,(function(){"use strict";const e=e=>Array.isArray(e),t=t=>e(t)?t:[t];const s="data-typeit-id",i="ti-cursor",r={started:!1,completed:!1,frozen:!1,destroyed:!1},n={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map((e=>({opacity:e}))),options:{iterations:1/0,easing:"steps(2, start)",fill:"forwards"}}},cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},o=`[${s}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,a=e=>document.createElement(e),u=e=>document.createTextNode(e),l=(e,t="")=>{let s=a("style");s.id=t,s.appendChild(u(e)),document.head.appendChild(s)},h=t=>(e(t)||(t=[t/2,t/2]),t),d=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t));let p=e=>e/2;const c=e=>Array.from(e);let f=e=>([...e.childNodes].forEach((e=>{if(e.nodeValue)return[...e.nodeValue].forEach((t=>{e.parentNode.insertBefore(u(t),e)})),void e.remove();f(e)})),e);const m=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,f(t.body)};function y(e,t=!1,s=!1){let r,n=e.querySelector(`.${i}`),o=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(n&&s){if(e.classList?.contains(i))return NodeFilter.FILTER_ACCEPT;if(n.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=[];for(;r=o.nextNode();)r.originalParent||(r.originalParent=r.parentNode),a.push(r);return t?a.reverse():a}function g(e,t=!0){return t?y(m(e)):c(e).map(u)}const b=({index:e,newIndex:t,queueItems:s,cleanUp:i})=>{for(let r=e+1;rNumber.isInteger(e),C=({queueItems:e,selector:t,cursorPosition:s,to:i})=>{if(P(t))return-1*t;let r=new RegExp("END","i").test(i),n=t?[...e].reverse().findIndex((({char:e})=>{let s=e.parentElement,i=s.matches(t);return!(!r||!i)||i&&s.firstChild.isSameNode(e)})):-1;return n<0&&(n=r?0:e.length-1),n-s+(r?0:1)},I=(e,t)=>new Array(t).fill(e);let v=e=>new Promise((t=>{requestAnimationFrame((async()=>{t(await e())}))})),w=e=>e?.getAnimations().find((t=>t.id===e.dataset.tiAnimationId)),T=({cursor:e,frames:t,options:s})=>{let i=e.animate(t,s);return i.pause(),i.id=e.dataset.tiAnimationId,v((()=>{v((()=>{i.play()}))})),i},q=e=>e.func?.call(null),S=async({index:e,queueItems:t,wait:s,cursor:i,cursorOptions:r})=>{let n=t[e][1],o=[],a=e,u=n,l=()=>u&&!u.delay,h=n.shouldPauseCursor()&&r.autoPause;for(;l();)o.push(u),l()&&a++,u=t[a]?t[a][1]:null;if(o.length)return await v((async()=>{for(let e of o)await q(e)})),a-1;let d,p=w(i);return p&&(d={...p.effect.getComputedTiming(),delay:h?r.autoPauseDelay:0}),await s((async()=>{p&&h&&p.cancel(),await v((()=>{q(n)}))}),n.delay),await(({cursor:e,options:t,cursorOptions:s})=>{if(!e||!s)return;let i,r=w(e);r&&(t.delay=r.effect.getComputedTiming().delay,i=r.currentTime,r.cancel());let n=T({cursor:e,frames:s.animation.frames,options:t});return i&&(n.currentTime=i),n})({cursor:i,options:d,cursorOptions:r}),e};const E=e=>"value"in e;let N=e=>"function"==typeof e?e():e,A=(e,t=document,s=!1)=>t["querySelector"+(s?"All":"")](e);const L=(e,t)=>Object.assign({},e,t);let x={"font-family":"","font-weight":"","font-size":"","font-style":"","line-height":"",color:"",transform:"translateX(-.125em)"};return class{element;timeouts;cursorPosition;predictedCursorPosition;statuses={started:!1,completed:!1,frozen:!1,destroyed:!1,firing:!1};opts;id;queue;cursor;flushCallback=null;unfreeze=()=>{};constructor(e,s={}){var i;this.opts=L(n,s),this.element="string"==typeof(i=e)?A(i):i,this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=L({},r),this.id=Math.random().toString().substring(2,9),this.queue=function(e){let s=function(e){return t(e).forEach((e=>o.set(Symbol(e.char?.innerText),i({...e})))),this},i=e=>(e.shouldPauseCursor=function(){return Boolean(this.typeable||this.cursorable||this.deletable)},e),r=()=>o,n=()=>Array.from(o.values()),o=new Map;return s(e),{add:s,set:function(e,t){let s=[...o.keys()];o.set(s[e],i(t))},wipe:function(){o=new Map,s(e)},done:(e,t=!1)=>t?o.delete(e):o.get(e).done=!0,reset:function(){o.forEach((e=>delete e.done))},destroy:e=>o.delete(e),getItems:(e=!1)=>e?n():n().filter((e=>!e.done)),getQueue:r,getTypeable:()=>n().filter((e=>e.typeable)),getPendingQueueItems:()=>{const e=[];for(let[,t]of r())t.done||e.push(t);return e}}}([{delay:this.opts.startDelay}]),this.#e(s),this.cursor=this.#t(),this.element.dataset.typeitId=this.id,l(o),this.opts.strings.length&&this.#s()}go(){return this.statuses.started?this:(this.#i(),this.opts.waitUntilVisible?(e=this.element,t=this.#r.bind(this),new IntersectionObserver(((s,i)=>{s.forEach((s=>{s.isIntersecting&&(t(),i.unobserve(e))}))}),{threshold:1}).observe(e),this):(this.#r(),this));var e,t}destroy(e=!0){this.timeouts=(this.timeouts.forEach(clearTimeout),[]),N(e)&&this.cursor&&this.#n(this.cursor),this.statuses.destroyed=!0}reset(e){!this.is("destroyed")&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let t in this.statuses)this.statuses[t]=!1;return this.element[this.#o()?"value":"innerHTML"]="",this}is=function(e){return this.statuses[e]};type(e,t={}){e=N(e);let{instant:s}=t,i=this.#a(t),r=g(e,this.opts.html).map((e=>{return{func:()=>this.#u(e),char:e,delay:s||(t=e,/<(.+)>(.*?)<\/(.+)>/.test(t.outerHTML))?0:this.#l(),typeable:e.nodeType===Node.TEXT_NODE};var t})),n=[i[0],{func:async()=>await this.opts.beforeString(e,this)},...r,{func:async()=>await this.opts.afterString(e,this)},i[1]];return this.#h(n,t)}break(e={}){return this.#h({func:()=>this.#u(a("BR")),typeable:!0},e)}move(e,t={}){e=N(e);let s=this.#a(t),{instant:i,to:r}=t,n=C({queueItems:this.queue.getTypeable(),selector:null===e?"":e,to:r,cursorPosition:this.#d}),o=n<0?-1:1;return this.predictedCursorPosition=this.#d+n,this.#h([s[0],...I({func:()=>this.#p(o),delay:i?0:this.#l(),cursorable:!0},Math.abs(n)),s[1]],t)}exec(e,t={}){let s=this.#a(t);return this.#h([s[0],{func:()=>e(this)},s[1]],t)}options(e,t={}){return e=N(e),this.#c(e),this.#h({},t)}pause(e,t={}){return this.#h({delay:N(e)},t)}delete(e=null,t={}){e=N(e);let s=this.#a(t),i=e,{instant:r,to:n}=t,o=this.queue.getTypeable(),a=(()=>null===i?o.length:P(i)?i:C({queueItems:o,selector:i,cursorPosition:this.#d,to:n}))();return this.#h([s[0],...I({func:this.#f.bind(this),delay:r?0:this.#l(1),deletable:!0},a),s[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=null){return this.flushCallback=e||this.flushCallback,this.statuses.firing||(this.#i(),this.#r(!1).then((()=>{if(this.queue.getPendingQueueItems().length>0)return this.flush();this.flushCallback(),this.flushCallback=null}))),this}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return this.#c(e)}getElement(){return this.element}empty(e={}){return this.#h({func:this.#m.bind(this)},e)}async#m(){this.#o()?this.element.value="":this.#y.forEach(this.#n.bind(this))}async#r(e=!0){this.statuses.started=!0,this.statuses.firing=!0;let t=t=>{this.queue.done(t,!e)};try{let s=[...this.queue.getQueue()];for(let e=0;e{await this.#P(i[0]),this.#r()}),i[1])}catch(s){}return this.statuses.firing=!1,this}async#p(e){var t,s,r;this.cursorPosition=(t=e,s=this.cursorPosition,r=this.#y,Math.min(Math.max(s+t,0),r.length)),((e,t,s)=>{let r=t[s-1],n=A(`.${i}`,e);(e=r?.parentNode||e).insertBefore(n,r||null)})(this.element,this.#y,this.cursorPosition)}async#P(e){let t=this.#d;t&&await this.#p({value:t});let s=this.#y.map((e=>[Symbol(),{func:this.#f.bind(this),delay:this.#l(1),deletable:!0,shouldPauseCursor:()=>!0}]));for(let i=0;i{this.unfreeze=()=>{this.statuses.frozen=!1,e()}})),s||await this.opts.beforeStep(this),await((e,t,s)=>new Promise((i=>{s.push(setTimeout((async()=>{await e(),i()}),t||0))})))(e,t,this.timeouts),s||await this.opts.afterStep(this)}async#i(){if(!this.#o()&&this.cursor&&this.element.appendChild(this.cursor),this.#C){((e,t)=>{let r=`[${s}='${e}'] .${i}`,n=getComputedStyle(t),o=Object.entries(x).reduce(((e,[t,s])=>`${e} ${t}: var(--ti-cursor-${t}, ${s||n[t]});`),"");l(`${r} { display: inline-block; width: 0; ${o} }`,e)})(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:r}=e;T({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...r}})}}#o(){return E(this.element)}#h(e,t){return this.queue.add(e),this.#I(t),this}#I(e={}){let t=e.delay;t&&this.queue.add({delay:t})}#a(e={}){return[{func:()=>this.#c(e)},{func:()=>this.#c(this.opts)}]}async#c(e){this.opts=L(this.opts,e)}#s(){let e=this.opts.strings.filter((e=>!!e));e.forEach(((t,s)=>{if(this.type(t),s+1===e.length)return;let i=this.opts.breakLines?[{func:()=>this.#u(a("BR")),typeable:!0}]:I({func:this.#f.bind(this),delay:this.#l(1)},this.queue.getTypeable().length);this.#v(i)}))}#e=e=>{this.opts.cursor=(e=>{if("object"==typeof e){let t={},{frames:s,options:i}=n.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||s,t.animation.options=L(i,e.animation?.options||{}),t.autoPause=e.autoPause??n.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||n.cursor.autoPauseDelay,t}return!0===e?n.cursor:e})(e.cursor??n.cursor),this.opts.strings=this.#w(t(this.opts.strings)),this.opts=L(this.opts,{html:!this.#T&&this.opts.html,nextStringDelay:h(this.opts.nextStringDelay),loopDelay:h(this.opts.loopDelay)})};#w(e){let t=this.element.innerHTML;return t?(this.element.innerHTML="",this.opts.startDelete?(this.element.innerHTML=t,f(this.element),this.#v(I({func:this.#f.bind(this),delay:this.#l(1),deletable:!0},this.#y.length)),e):(s=t,s.replace(//g,"").trim().split(/ /)).concat(e)):e;var s}#t(){if(this.#T)return null;let e=a("span");return e.className=i,this.#C?(e.innerHTML=m(this.opts.cursorChar).innerHTML,e):(e.style.visibility="hidden",e)}#v(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])}#u(e){((e,t)=>{if(E(e))return void(e.value=`${e.value}${t.textContent}`);t.innerHTML="";let s=(r=t.originalParent,/body/i.test(r?.tagName)?e:t.originalParent||e);var r;let n=A("."+i,s)||null;n&&n.parentElement!==s&&(s=n.parentElement),s.insertBefore(t,n)})(this.element,e)}#f(){this.#y.length&&(this.#T?this.element.value=this.element.value.slice(0,-1):this.#n(this.#y[this.cursorPosition]))}#n(e){((e,t)=>{if(!e)return;let s=e.parentNode;(s.childNodes.length>1||s.isSameNode(t)?e:s).remove()})(e,this.element)}#l(e=0){return function(e){let{speed:t,deleteSpeed:s,lifeLike:i}=e;return s=null!==s?s:t/3,i?[d(t,p(t)),d(s,p(s))]:[t,s]}(this.opts)[e]}get#d(){return this.predictedCursorPosition??this.cursorPosition}get#T(){return E(this.element)}get#C(){return!!this.opts.cursor&&!this.#T}get#y(){return e=this.element,E(e)?c(e.value):y(e,!0).filter((e=>!(e.childNodes.length>0)));var e}}}));
diff --git a/public/series/index.html b/public/series/index.html
index f72a693..6e139d1 100644
--- a/public/series/index.html
+++ b/public/series/index.html
@@ -751,6 +751,23 @@
+
+
+