diff --git a/DatenLord.png b/DatenLord.png new file mode 100644 index 0000000..f87d53e Binary files /dev/null and b/DatenLord.png differ diff --git a/assets/cncf-logo-text-9f32c1ea.png b/assets/cncf-logo-text-9f32c1ea.png new file mode 100644 index 0000000..2c09bb4 Binary files /dev/null and b/assets/cncf-logo-text-9f32c1ea.png differ diff --git a/assets/contribute-cover-754f3436.svg b/assets/contribute-cover-754f3436.svg new file mode 100644 index 0000000..2818940 --- /dev/null +++ b/assets/contribute-cover-754f3436.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/contribute-how-f55a255f.svg b/assets/contribute-how-f55a255f.svg new file mode 100644 index 0000000..1c15b88 --- /dev/null +++ b/assets/contribute-how-f55a255f.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/discord-icon-7417d9bb.svg b/assets/discord-icon-7417d9bb.svg new file mode 100644 index 0000000..952f47f --- /dev/null +++ b/assets/discord-icon-7417d9bb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/dot-37a9b3fe.svg b/assets/dot-37a9b3fe.svg new file mode 100644 index 0000000..7a9ffca --- /dev/null +++ b/assets/dot-37a9b3fe.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/dropIcon-525fd0e1.svg b/assets/dropIcon-525fd0e1.svg new file mode 100644 index 0000000..dcdb17d --- /dev/null +++ b/assets/dropIcon-525fd0e1.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/dropIconActive-9bdef1aa.svg b/assets/dropIconActive-9bdef1aa.svg new file mode 100644 index 0000000..daf414d --- /dev/null +++ b/assets/dropIconActive-9bdef1aa.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/dropdown-active-7d279a33.svg b/assets/dropdown-active-7d279a33.svg new file mode 100644 index 0000000..c1625a6 --- /dev/null +++ b/assets/dropdown-active-7d279a33.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/dropdown-close-533c3c65.svg b/assets/dropdown-close-533c3c65.svg new file mode 100644 index 0000000..c57875f --- /dev/null +++ b/assets/dropdown-close-533c3c65.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/footer-background-8643bf7b.svg b/assets/footer-background-8643bf7b.svg new file mode 100644 index 0000000..efd7d38 --- /dev/null +++ b/assets/footer-background-8643bf7b.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/github-icon-7701b5d6.svg b/assets/github-icon-7701b5d6.svg new file mode 100644 index 0000000..256b1a3 --- /dev/null +++ b/assets/github-icon-7701b5d6.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/home-cover-d1b85aac.png b/assets/home-cover-d1b85aac.png new file mode 100644 index 0000000..46042d7 Binary files /dev/null and b/assets/home-cover-d1b85aac.png differ diff --git a/assets/home-feature-e6cc5478.png b/assets/home-feature-e6cc5478.png new file mode 100644 index 0000000..7847209 Binary files /dev/null and b/assets/home-feature-e6cc5478.png differ diff --git a/assets/home-feature-icon-1-633a0944.svg b/assets/home-feature-icon-1-633a0944.svg new file mode 100644 index 0000000..81c584b --- /dev/null +++ b/assets/home-feature-icon-1-633a0944.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/home-feature-icon-2-f72f9c54.svg b/assets/home-feature-icon-2-f72f9c54.svg new file mode 100644 index 0000000..14e807f --- /dev/null +++ b/assets/home-feature-icon-2-f72f9c54.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/home-feature-icon-3-f98e76a4.svg b/assets/home-feature-icon-3-f98e76a4.svg new file mode 100644 index 0000000..b6056de --- /dev/null +++ b/assets/home-feature-icon-3-f98e76a4.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assets/home-feature-icon-4-25befa9a.svg b/assets/home-feature-icon-4-25befa9a.svg new file mode 100644 index 0000000..38e3457 --- /dev/null +++ b/assets/home-feature-icon-4-25befa9a.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/home-innovation-48569455.svg b/assets/home-innovation-48569455.svg new file mode 100644 index 0000000..b3b4ebc --- /dev/null +++ b/assets/home-innovation-48569455.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/home-introduction-7de62c15.png b/assets/home-introduction-7de62c15.png new file mode 100644 index 0000000..24b4738 Binary files /dev/null and b/assets/home-introduction-7de62c15.png differ diff --git a/assets/home-menu-icon-459d13f5.svg b/assets/home-menu-icon-459d13f5.svg new file mode 100644 index 0000000..26f88ef --- /dev/null +++ b/assets/home-menu-icon-459d13f5.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/image1-9be52310.png b/assets/image1-9be52310.png new file mode 100644 index 0000000..b9bd183 Binary files /dev/null and b/assets/image1-9be52310.png differ diff --git a/assets/image2-baebe8ee.png b/assets/image2-baebe8ee.png new file mode 100644 index 0000000..7acd7c0 Binary files /dev/null and b/assets/image2-baebe8ee.png differ diff --git a/assets/image3-a2f91129.png b/assets/image3-a2f91129.png new file mode 100644 index 0000000..7ac3e0d Binary files /dev/null and b/assets/image3-a2f91129.png differ diff --git a/assets/index-a76bab1d.js b/assets/index-a76bab1d.js new file mode 100644 index 0000000..6fc4133 --- /dev/null +++ b/assets/index-a76bab1d.js @@ -0,0 +1,5121 @@ +var U8=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var vY=U8((TY,od)=>{function j8(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function sw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S={},q8={get exports(){return S},set exports(e){S=e}},a0={},ce={},H8={get exports(){return ce},set exports(e){ce=e}},Qe={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var dc=Symbol.for("react.element"),W8=Symbol.for("react.portal"),V8=Symbol.for("react.fragment"),Y8=Symbol.for("react.strict_mode"),K8=Symbol.for("react.profiler"),G8=Symbol.for("react.provider"),X8=Symbol.for("react.context"),Q8=Symbol.for("react.forward_ref"),Z8=Symbol.for("react.suspense"),J8=Symbol.for("react.memo"),eS=Symbol.for("react.lazy"),Dy=Symbol.iterator;function tS(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}var ow={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lw=Object.assign,cw={};function Ao(e,t,n){this.props=e,this.context=t,this.refs=cw,this.updater=n||ow}Ao.prototype.isReactComponent={};Ao.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ao.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uw(){}uw.prototype=Ao.prototype;function rg(e,t,n){this.props=e,this.context=t,this.refs=cw,this.updater=n||ow}var ig=rg.prototype=new uw;ig.constructor=rg;lw(ig,Ao.prototype);ig.isPureReactComponent=!0;var Ly=Array.isArray,dw=Object.prototype.hasOwnProperty,ag={current:null},hw={key:!0,ref:!0,__self:!0,__source:!0};function fw(e,t,n){var r,i={},a=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)dw.call(t,r)&&!hw.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1>>1,C=F[N];if(0>>1;Ni(ge,X))$i(Ee,ge)?(F[N]=Ee,F[$]=X,N=$):(F[N]=ge,F[ne]=X,N=ne);else if($i(Ee,X))F[N]=Ee,F[$]=X,N=$;else break e}}return V}function i(F,V){var X=F.sortIndex-V.sortIndex;return X!==0?X:F.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(F){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=F)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function _(F){if(h=!1,x(F),!m)if(n(l)!==null)m=!0,I(A);else{var V=n(c);V!==null&&Y(_,V.startTime-F)}}function A(F,V){m=!1,h&&(h=!1,y(B),B=-1),p=!0;var X=f;try{for(x(V),d=n(l);d!==null&&(!(d.expirationTime>V)||F&&!W());){var N=d.callback;if(typeof N=="function"){d.callback=null,f=d.priorityLevel;var C=N(d.expirationTime<=V);V=e.unstable_now(),typeof C=="function"?d.callback=C:d===n(l)&&r(l),x(V)}else r(l);d=n(l)}if(d!==null)var Q=!0;else{var ne=n(c);ne!==null&&Y(_,ne.startTime-V),Q=!1}return Q}finally{d=null,f=X,p=!1}}var E=!1,R=null,B=-1,q=5,G=-1;function W(){return!(e.unstable_now()-GF||125N?(F.sortIndex=X,t(c,F),n(l)===null&&F===n(c)&&(h?(y(B),B=-1):h=!0,Y(_,X-N))):(F.sortIndex=C,t(l,F),m||p||(m=!0,I(A))),F},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(F){var V=f;return function(){var X=f;f=V;try{return F.apply(this,arguments)}finally{f=X}}}})(mw);(function(e){e.exports=mw})(fS);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var gw=ce,Qn=bp;function re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vp=Object.prototype.hasOwnProperty,pS=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zy={},By={};function mS(e){return vp.call(By,e)?!0:vp.call(zy,e)?!1:pS.test(e)?By[e]=!0:(zy[e]=!0,!1)}function gS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yS(e,t,n,r){if(t===null||typeof t>"u"||gS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function An(e,t,n,r,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var hn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){hn[e]=new An(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];hn[t]=new An(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){hn[e]=new An(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){hn[e]=new An(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){hn[e]=new An(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){hn[e]=new An(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){hn[e]=new An(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){hn[e]=new An(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){hn[e]=new An(e,5,!1,e.toLowerCase(),null,!1,!1)});var og=/[\-:]([a-z])/g;function lg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(og,lg);hn[t]=new An(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(og,lg);hn[t]=new An(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(og,lg);hn[t]=new An(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){hn[e]=new An(e,1,!1,e.toLowerCase(),null,!1,!1)});hn.xlinkHref=new An("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){hn[e]=new An(e,1,!1,e.toLowerCase(),null,!0,!0)});function cg(e,t,n,r){var i=hn.hasOwnProperty(t)?hn[t]:null;(i!==null?i.type!==0:r||!(2o||i[s]!==a[o]){var l=` +`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=o);break}}}finally{qh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?sl(e):""}function bS(e){switch(e.tag){case 5:return sl(e.type);case 16:return sl("Lazy");case 13:return sl("Suspense");case 19:return sl("SuspenseList");case 0:case 2:case 15:return e=Hh(e.type,!1),e;case 11:return e=Hh(e.type.render,!1),e;case 1:return e=Hh(e.type,!0),e;default:return""}}function Sp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ps:return"Fragment";case Ls:return"Portal";case wp:return"Profiler";case ug:return"StrictMode";case xp:return"Suspense";case kp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vw:return(e.displayName||"Context")+".Consumer";case bw:return(e._context.displayName||"Context")+".Provider";case dg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hg:return t=e.displayName||null,t!==null?t:Sp(e.type)||"Memo";case Qi:t=e._payload,e=e._init;try{return Sp(e(t))}catch{}}return null}function vS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sp(t);case 8:return t===ug?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function va(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wS(e){var t=xw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $c(e){e._valueTracker||(e._valueTracker=wS(e))}function kw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ld(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _p(e,t){var n=t.checked;return Bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $y(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=va(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Sw(e,t){t=t.checked,t!=null&&cg(e,"checked",t,!1)}function Ep(e,t){Sw(e,t);var n=va(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tp(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tp(e,t.type,va(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Uy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Tp(e,t,n){(t!=="number"||ld(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ol=Array.isArray;function eo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Uc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ol(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xS=["Webkit","ms","Moz","O"];Object.keys(fl).forEach(function(e){xS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fl[t]=fl[e]})});function Cw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fl.hasOwnProperty(e)&&fl[e]?(""+t).trim():t+"px"}function Aw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Cw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var kS=Bt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Np(e,t){if(t){if(kS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(re(62))}}function Mp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rp=null;function fg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Op=null,to=null,no=null;function Hy(e){if(e=pc(e)){if(typeof Op!="function")throw Error(re(280));var t=e.stateNode;t&&(t=u0(t),Op(e.stateNode,e.type,t))}}function Nw(e){to?no?no.push(e):no=[e]:to=e}function Mw(){if(to){var e=to,t=no;if(no=to=null,Hy(e),t)for(e=0;e>>=0,e===0?32:31-(IS(e)/DS|0)|0}var jc=64,qc=4194304;function ll(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=ll(o):(a&=s,a!==0&&(r=ll(a)))}else s=n&~i,s!==0?r=ll(s):a!==0&&(r=ll(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function hc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lr(t),e[t]=n}function BS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ml),Jy=String.fromCharCode(32),eb=!1;function Xw(e,t){switch(e){case"keyup":return h9.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zs=!1;function p9(e,t){switch(e){case"compositionend":return Qw(t);case"keypress":return t.which!==32?null:(eb=!0,Jy);case"textInput":return e=t.data,e===Jy&&eb?null:e;default:return null}}function m9(e,t){if(zs)return e==="compositionend"||!xg&&Xw(e,t)?(e=Kw(),Fu=bg=ta=null,zs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ib(n)}}function tx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nx(){for(var e=window,t=ld();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ld(e.document)}return t}function kg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _9(e){var t=nx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tx(n.ownerDocument.documentElement,n)){if(r!==null&&kg(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=ab(n,a);var s=ab(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bs=null,Bp=null,yl=null,Fp=!1;function sb(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fp||Bs==null||Bs!==ld(r)||(r=Bs,"selectionStart"in r&&kg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yl&&Bl(yl,r)||(yl=r,r=md(Bp,"onSelect"),0Us||(e.current=Wp[Us],Wp[Us]=null,Us--)}function bt(e,t){Us++,Wp[Us]=e.current,e.current=t}var wa={},vn=Aa(wa),Fn=Aa(!1),ts=wa;function bo(e,t){var n=e.type.contextTypes;if(!n)return wa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function $n(e){return e=e.childContextTypes,e!=null}function yd(){Et(Fn),Et(vn)}function fb(e,t,n){if(vn.current!==wa)throw Error(re(168));bt(vn,t),bt(Fn,n)}function dx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(re(108,vS(e)||"Unknown",i));return Bt({},n,r)}function bd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wa,ts=vn.current,bt(vn,e),bt(Fn,Fn.current),!0}function pb(e,t,n){var r=e.stateNode;if(!r)throw Error(re(169));n?(e=dx(e,t,ts),r.__reactInternalMemoizedMergedChildContext=e,Et(Fn),Et(vn),bt(vn,e)):Et(Fn),bt(Fn,n)}var vi=null,d0=!1,af=!1;function hx(e){vi===null?vi=[e]:vi.push(e)}function P9(e){d0=!0,hx(e)}function Na(){if(!af&&vi!==null){af=!0;var e=0,t=ut;try{var n=vi;for(ut=1;e>=s,i-=s,xi=1<<32-Lr(t)+i|n<B?(q=R,R=null):q=R.sibling;var G=f(y,R,x[B],_);if(G===null){R===null&&(R=q);break}e&&R&&G.alternate===null&&t(y,R),v=a(G,v,B),E===null?A=G:E.sibling=G,E=G,R=q}if(B===x.length)return n(y,R),Nt&&$a(y,B),A;if(R===null){for(;BB?(q=R,R=null):q=R.sibling;var W=f(y,R,G.value,_);if(W===null){R===null&&(R=q);break}e&&R&&W.alternate===null&&t(y,R),v=a(W,v,B),E===null?A=W:E.sibling=W,E=W,R=q}if(G.done)return n(y,R),Nt&&$a(y,B),A;if(R===null){for(;!G.done;B++,G=x.next())G=d(y,G.value,_),G!==null&&(v=a(G,v,B),E===null?A=G:E.sibling=G,E=G);return Nt&&$a(y,B),A}for(R=r(y,R);!G.done;B++,G=x.next())G=p(R,y,B,G.value,_),G!==null&&(e&&G.alternate!==null&&R.delete(G.key===null?B:G.key),v=a(G,v,B),E===null?A=G:E.sibling=G,E=G);return e&&R.forEach(function(K){return t(y,K)}),Nt&&$a(y,B),A}function w(y,v,x,_){if(typeof x=="object"&&x!==null&&x.type===Ps&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Fc:e:{for(var A=x.key,E=v;E!==null;){if(E.key===A){if(A=x.type,A===Ps){if(E.tag===7){n(y,E.sibling),v=i(E,x.props.children),v.return=y,y=v;break e}}else if(E.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Qi&&xb(A)===E.type){n(y,E.sibling),v=i(E,x.props),v.ref=Qo(y,E,x),v.return=y,y=v;break e}n(y,E);break}else t(y,E);E=E.sibling}x.type===Ps?(v=Za(x.props.children,y.mode,_,x.key),v.return=y,y=v):(_=Yu(x.type,x.key,x.props,null,y.mode,_),_.ref=Qo(y,v,x),_.return=y,y=_)}return s(y);case Ls:e:{for(E=x.key;v!==null;){if(v.key===E)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),v=i(v,x.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=ff(x,y.mode,_),v.return=y,y=v}return s(y);case Qi:return E=x._init,w(y,v,E(x._payload),_)}if(ol(x))return m(y,v,x,_);if(Vo(x))return h(y,v,x,_);Xc(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,x),v.return=y,y=v):(n(y,v),v=hf(x,y.mode,_),v.return=y,y=v),s(y)):n(y,v)}return w}var wo=wx(!0),xx=wx(!1),mc={},ei=Aa(mc),jl=Aa(mc),ql=Aa(mc);function Va(e){if(e===mc)throw Error(re(174));return e}function Rg(e,t){switch(bt(ql,t),bt(jl,e),bt(ei,mc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ap(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ap(t,e)}Et(ei),bt(ei,t)}function xo(){Et(ei),Et(jl),Et(ql)}function kx(e){Va(ql.current);var t=Va(ei.current),n=Ap(t,e.type);t!==n&&(bt(jl,e),bt(ei,n))}function Og(e){jl.current===e&&(Et(ei),Et(jl))}var Dt=Aa(0);function _d(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sf=[];function Ig(){for(var e=0;en?n:4,e(!0);var r=of.transition;of.transition={};try{e(!1),t()}finally{ut=n,of.transition=r}}function Bx(){return mr().memoizedState}function $9(e,t,n){var r=pa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fx(e))$x(t,n);else if(n=gx(e,t,n,r),n!==null){var i=Tn();Pr(n,e,r,i),Ux(n,t,r)}}function U9(e,t,n){var r=pa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fx(e))$x(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,Br(o,s)){var l=t.interleaved;l===null?(i.next=i,Ng(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=gx(e,t,i,r),n!==null&&(i=Tn(),Pr(n,e,r,i),Ux(n,t,r))}}function Fx(e){var t=e.alternate;return e===zt||t!==null&&t===zt}function $x(e,t){bl=Ed=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ux(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mg(e,n)}}var Td={readContext:pr,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useInsertionEffect:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useMutableSource:pn,useSyncExternalStore:pn,useId:pn,unstable_isNewReconciler:!1},j9={readContext:pr,useCallback:function(e,t){return Vr().memoizedState=[e,t===void 0?null:t],e},useContext:pr,useEffect:Sb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qu(4194308,4,Ix.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qu(4194308,4,e,t)},useInsertionEffect:function(e,t){return qu(4,2,e,t)},useMemo:function(e,t){var n=Vr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$9.bind(null,zt,e),[r.memoizedState,e]},useRef:function(e){var t=Vr();return e={current:e},t.memoizedState=e},useState:kb,useDebugValue:Bg,useDeferredValue:function(e){return Vr().memoizedState=e},useTransition:function(){var e=kb(!1),t=e[0];return e=F9.bind(null,e[1]),Vr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=zt,i=Vr();if(Nt){if(n===void 0)throw Error(re(407));n=n()}else{if(n=t(),on===null)throw Error(re(349));rs&30||Ex(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Sb(Cx.bind(null,r,a,e),[e]),r.flags|=2048,Vl(9,Tx.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Vr(),t=on.identifierPrefix;if(Nt){var n=ki,r=xi;n=(r&~(1<<32-Lr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Hl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Xr]=t,e[Ul]=r,Xx(e,t,!1,!1),t.stateNode=e;e:{switch(s=Mp(n,r),n){case"dialog":kt("cancel",e),kt("close",e),i=r;break;case"iframe":case"object":case"embed":kt("load",e),i=r;break;case"video":case"audio":for(i=0;iSo&&(t.flags|=128,r=!0,Zo(a,!1),t.lanes=4194304)}else{if(!r)if(e=_d(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Nt)return mn(t),null}else 2*Ht()-a.renderingStartTime>So&&n!==1073741824&&(t.flags|=128,r=!0,Zo(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(n=a.last,n!==null?n.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ht(),t.sibling=null,n=Dt.current,bt(Dt,r?n&1|2:n&1),t):(mn(t),null);case 22:case 23:return Hg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Wn&1073741824&&(mn(t),t.subtreeFlags&6&&(t.flags|=8192)):mn(t),null;case 24:return null;case 25:return null}throw Error(re(156,t.tag))}function X9(e,t){switch(_g(t),t.tag){case 1:return $n(t.type)&&yd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xo(),Et(Fn),Et(vn),Ig(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Og(t),null;case 13:if(Et(Dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(re(340));vo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Et(Dt),null;case 4:return xo(),null;case 10:return Ag(t.type._context),null;case 22:case 23:return Hg(),null;case 24:return null;default:return null}}var Zc=!1,gn=!1,Q9=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ws(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ft(e,t,r)}else n.current=null}function rm(e,t,n){try{n()}catch(r){Ft(e,t,r)}}var Ob=!1;function Z9(e,t){if($p=fd,e=nx(),kg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,o=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(o=s+i),d!==a||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===i&&(o=s),f===a&&++u===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Up={focusedElem:e,selectionRange:n},fd=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,w=m.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?h:Ar(t.type,h),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(re(163))}}catch(_){Ft(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return m=Ob,Ob=!1,m}function vl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&rm(t,n,a)}i=i.next}while(i!==r)}}function p0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function im(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Jx(e){var t=e.alternate;t!==null&&(e.alternate=null,Jx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xr],delete t[Ul],delete t[Hp],delete t[D9],delete t[L9])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function e3(e){return e.tag===5||e.tag===3||e.tag===4}function Ib(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||e3(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function am(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gd));else if(r!==4&&(e=e.child,e!==null))for(am(e,t,n),e=e.sibling;e!==null;)am(e,t,n),e=e.sibling}function sm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(sm(e,t,n),e=e.sibling;e!==null;)sm(e,t,n),e=e.sibling}var un=null,Nr=!1;function Yi(e,t,n){for(n=n.child;n!==null;)t3(e,t,n),n=n.sibling}function t3(e,t,n){if(Jr&&typeof Jr.onCommitFiberUnmount=="function")try{Jr.onCommitFiberUnmount(s0,n)}catch{}switch(n.tag){case 5:gn||Ws(n,t);case 6:var r=un,i=Nr;un=null,Yi(e,t,n),un=r,Nr=i,un!==null&&(Nr?(e=un,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):un.removeChild(n.stateNode));break;case 18:un!==null&&(Nr?(e=un,n=n.stateNode,e.nodeType===8?rf(e.parentNode,n):e.nodeType===1&&rf(e,n),Pl(e)):rf(un,n.stateNode));break;case 4:r=un,i=Nr,un=n.stateNode.containerInfo,Nr=!0,Yi(e,t,n),un=r,Nr=i;break;case 0:case 11:case 14:case 15:if(!gn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&rm(n,t,s),i=i.next}while(i!==r)}Yi(e,t,n);break;case 1:if(!gn&&(Ws(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){Ft(n,t,o)}Yi(e,t,n);break;case 21:Yi(e,t,n);break;case 22:n.mode&1?(gn=(r=gn)||n.memoizedState!==null,Yi(e,t,n),gn=r):Yi(e,t,n);break;default:Yi(e,t,n)}}function Db(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Q9),t.forEach(function(r){var i=o_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Tr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~a}if(r=i,r=Ht()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*e_(r/1960))-r,10e?16:e,na===null)var r=!1;else{if(e=na,na=null,Nd=0,rt&6)throw Error(re(331));var i=rt;for(rt|=4,we=e.current;we!==null;){var a=we,s=a.child;if(we.flags&16){var o=a.deletions;if(o!==null){for(var l=0;lHt()-jg?Qa(e,0):Ug|=n),Un(e,t)}function c3(e,t){t===0&&(e.mode&1?(t=qc,qc<<=1,!(qc&130023424)&&(qc=4194304)):t=1);var n=Tn();e=Ii(e,t),e!==null&&(hc(e,t,n),Un(e,n))}function s_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),c3(e,n)}function o_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(re(314))}r!==null&&r.delete(t),c3(e,n)}var u3;u3=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fn.current)zn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zn=!1,K9(e,t,n);zn=!!(e.flags&131072)}else zn=!1,Nt&&t.flags&1048576&&fx(t,wd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hu(e,t),e=t.pendingProps;var i=bo(t,vn.current);io(t,n),i=Lg(null,t,r,e,i,n);var a=Pg();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$n(r)?(a=!0,bd(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Mg(t),i.updater=h0,t.stateNode=i,i._reactInternals=t,Xp(t,r,e,n),t=Jp(null,t,r,!0,a,n)):(t.tag=0,Nt&&a&&Sg(t),kn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=c_(r),e=Ar(r,e),i){case 0:t=Zp(null,t,r,e,n);break e;case 1:t=Nb(null,t,r,e,n);break e;case 11:t=Cb(null,t,r,e,n);break e;case 14:t=Ab(null,t,r,Ar(r.type,e),n);break e}throw Error(re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ar(r,i),Zp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ar(r,i),Nb(e,t,r,i,n);case 3:e:{if(Yx(t),e===null)throw Error(re(387));r=t.pendingProps,a=t.memoizedState,i=a.element,yx(e,t),Sd(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=ko(Error(re(423)),t),t=Mb(e,t,r,n,i);break e}else if(r!==i){i=ko(Error(re(424)),t),t=Mb(e,t,r,n,i);break e}else for(Kn=da(t.stateNode.containerInfo.firstChild),Gn=t,Nt=!0,Rr=null,n=xx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vo(),r===i){t=Di(e,t,n);break e}kn(e,t,r,n)}t=t.child}return t;case 5:return kx(t),e===null&&Yp(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,jp(r,i)?s=null:a!==null&&jp(r,a)&&(t.flags|=32),Vx(e,t),kn(e,t,s,n),t.child;case 6:return e===null&&Yp(t),null;case 13:return Kx(e,t,n);case 4:return Rg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wo(t,null,r,n):kn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ar(r,i),Cb(e,t,r,i,n);case 7:return kn(e,t,t.pendingProps,n),t.child;case 8:return kn(e,t,t.pendingProps.children,n),t.child;case 12:return kn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,bt(xd,r._currentValue),r._currentValue=s,a!==null)if(Br(a.value,s)){if(a.children===i.children&&!Fn.current){t=Di(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){s=a.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=Ti(-1,n&-n),l.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Kp(a.return,n,t),o.lanes|=n;break}l=l.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(re(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Kp(s,n,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}kn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,io(t,n),i=pr(i),r=r(i),t.flags|=1,kn(e,t,r,n),t.child;case 14:return r=t.type,i=Ar(r,t.pendingProps),i=Ar(r.type,i),Ab(e,t,r,i,n);case 15:return Hx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ar(r,i),Hu(e,t),t.tag=1,$n(r)?(e=!0,bd(t)):e=!1,io(t,n),vx(t,r,i),Xp(t,r,i,n),Jp(null,t,r,!0,e,n);case 19:return Gx(e,t,n);case 22:return Wx(e,t,n)}throw Error(re(156,t.tag))};function d3(e,t){return zw(e,t)}function l_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(e,t,n,r){return new l_(e,t,n,r)}function Vg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function c_(e){if(typeof e=="function")return Vg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dg)return 11;if(e===hg)return 14}return 2}function ma(e,t){var n=e.alternate;return n===null?(n=dr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Yu(e,t,n,r,i,a){var s=2;if(r=e,typeof e=="function")Vg(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Ps:return Za(n.children,i,a,t);case ug:s=8,i|=8;break;case wp:return e=dr(12,n,t,i|2),e.elementType=wp,e.lanes=a,e;case xp:return e=dr(13,n,t,i),e.elementType=xp,e.lanes=a,e;case kp:return e=dr(19,n,t,i),e.elementType=kp,e.lanes=a,e;case ww:return g0(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case bw:s=10;break e;case vw:s=9;break e;case dg:s=11;break e;case hg:s=14;break e;case Qi:s=16,r=null;break e}throw Error(re(130,e==null?e:typeof e,""))}return t=dr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Za(e,t,n,r){return e=dr(7,e,r,t),e.lanes=n,e}function g0(e,t,n,r){return e=dr(22,e,r,t),e.elementType=ww,e.lanes=n,e.stateNode={isHidden:!1},e}function hf(e,t,n){return e=dr(6,e,null,t),e.lanes=n,e}function ff(e,t,n){return t=dr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function u_(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vh(0),this.expirationTimes=Vh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Yg(e,t,n,r,i,a,s,o,l){return e=new u_(e,t,n,o,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=dr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mg(a),e}function d_(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Zn})(hS);var jb=yp;gp.createRoot=jb.createRoot,gp.hydrateRoot=jb.hydrateRoot;/** + * @remix-run/router v1.4.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ss(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function y_(){return Math.random().toString(36).substr(2,8)}function Hb(e,t){return{usr:e.state,key:e.key,idx:t}}function Kl(e,t,n,r){return n===void 0&&(n=null),nt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ai(t):t,{state:n,key:t&&t.key||r||y_()})}function Li(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ai(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function b_(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,o=jt.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(nt({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){o=jt.Pop;let w=u(),y=w==null?null:w-c;c=w,l&&l({action:o,location:h.location,delta:y})}function f(w,y){o=jt.Push;let v=Kl(h.location,w,y);n&&n(v,w),c=u()+1;let x=Hb(v,c),_=h.createHref(v);try{s.pushState(x,"",_)}catch{i.location.assign(_)}a&&l&&l({action:o,location:h.location,delta:1})}function p(w,y){o=jt.Replace;let v=Kl(h.location,w,y);n&&n(v,w),c=u();let x=Hb(v,c),_=h.createHref(v);s.replaceState(x,"",_),a&&l&&l({action:o,location:h.location,delta:0})}function m(w){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:Li(w);return He(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let h={get action(){return o},get location(){return e(i,s)},listen(w){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(qb,d),l=w,()=>{i.removeEventListener(qb,d),l=null}},createHref(w){return t(i,w)},createURL:m,encodeLocation(w){let y=m(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:p,go(w){return s.go(w)}};return h}var Jt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Jt||(Jt={}));const v_=new Set(["lazy","caseSensitive","path","id","index","children"]);function w_(e){return e.index===!0}function m3(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,a)=>{let s=[...n,a],o=typeof i.id=="string"?i.id:s.join("-");if(He(i.index!==!0||!i.children,"Cannot specify children on an index route"),He(!r[o],'Found a route id collision on id "'+o+`". Route id's must be globally unique within Data Router usages`),w_(i)){let l=nt({},i,{hasErrorBoundary:t(i),id:o});return r[o]=l,l}else{let l=nt({},i,{id:o,hasErrorBoundary:t(i),children:void 0});return r[o]=l,i.children&&(l.children=m3(i.children,t,s,r)),l}})}function Ys(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?ai(t):t,i=gc(r.pathname||"/",n);if(i==null)return null;let a=g3(e);x_(a);let s=null;for(let o=0;s==null&&o{let l={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};l.relativePath.startsWith("/")&&(He(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Ci([r,l.relativePath]),u=n.concat(l);a.children&&a.children.length>0&&(He(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),g3(a.children,t,u,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:A_(c,a.index),routesMeta:u})};return e.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,s);else for(let l of y3(a.path))i(a,s,l)}),t}function y3(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=y3(r.join("/")),o=[];return o.push(...s.map(l=>l===""?a:[a,l].join("/"))),i&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function x_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:N_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const k_=/^:\w+$/,S_=3,__=2,E_=1,T_=10,C_=-2,Wb=e=>e==="*";function A_(e,t){let n=e.split("/"),r=n.length;return n.some(Wb)&&(r+=C_),t&&(r+=__),n.filter(i=>!Wb(i)).reduce((i,a)=>i+(k_.test(a)?S_:a===""?E_:T_),r)}function N_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function M_(e,t){let{routesMeta:n}=e,r={},i="/",a=[];for(let s=0;s{if(u==="*"){let f=o[d]||"";s=a.slice(0,a.length-f.length).replace(/(.)\/+$/,"$1")}return c[u]=D_(o[d]||"",u),c},{}),pathname:a,pathnameBase:s,pattern:e}}function O_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ss(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,o)=>(r.push(o),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function I_(e){try{return decodeURI(e)}catch(t){return ss(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function D_(e,t){try{return decodeURIComponent(e)}catch(n){return ss(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function gc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function L_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ai(e):e;return{pathname:n?n.startsWith("/")?n:P_(n,t):t,search:B_(r),hash:F_(i)}}function P_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function pf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function x0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Qg(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ai(e):(i=nt({},e),He(!i.pathname||!i.pathname.includes("?"),pf("?","pathname","search",i)),He(!i.pathname||!i.pathname.includes("#"),pf("#","pathname","hash",i)),He(!i.search||!i.search.includes("#"),pf("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,o;if(r||s==null)o=n;else{let d=t.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}o=d>=0?t[d]:"/"}let l=L_(i,o),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ci=e=>e.join("/").replace(/\/\/+/g,"/"),z_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,F_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Vb extends Error{}class $_{constructor(t,n){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],He(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let r;this.abortPromise=new Promise((a,s)=>r=s),this.controller=new AbortController;let i=()=>r(new Vb("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",i),this.controller.signal.addEventListener("abort",i),this.data=Object.entries(t).reduce((a,s)=>{let[o,l]=s;return Object.assign(a,{[o]:this.trackPromise(o,l)})},{}),this.done&&this.unlistenAbortSignal(),this.init=n}trackPromise(t,n){if(!(n instanceof Promise))return n;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let r=Promise.race([n,this.abortPromise]).then(i=>this.onSettle(r,t,null,i),i=>this.onSettle(r,t,i));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(t,n,r,i){return this.controller.signal.aborted&&r instanceof Vb?(this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>r}),Promise.reject(r)):(this.pendingKeysSet.delete(n),this.done&&this.unlistenAbortSignal(),r?(Object.defineProperty(t,"_error",{get:()=>r}),this.emit(!1,n),Promise.reject(r)):(Object.defineProperty(t,"_data",{get:()=>i}),this.emit(!1,n),i))}emit(t,n){this.subscribers.forEach(r=>r(t,n))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,n)=>this.pendingKeysSet.delete(n)),this.emit(!0)}async resolveData(t){let n=!1;if(!this.done){let r=()=>this.cancel();t.addEventListener("abort",r),n=await new Promise(i=>{this.subscribe(a=>{t.removeEventListener("abort",r),(a||this.done)&&i(a)})})}return n}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return He(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,n)=>{let[r,i]=n;return Object.assign(t,{[r]:j_(i)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function U_(e){return e instanceof Promise&&e._tracked===!0}function j_(e){if(!U_(e))return e;if(e._error)throw e._error;return e._data}class Zg{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function b3(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const v3=["post","put","patch","delete"],q_=new Set(v3),H_=["get",...v3],W_=new Set(H_),V_=new Set([301,302,303,307,308]),Y_=new Set([307,308]),mf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},K_={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Yb={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},w3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,x3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",G_=!x3,X_=e=>!!e.hasErrorBoundary;function Q_(e){He(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t=e.detectErrorBoundary||X_,n={},r=m3(e.routes,t,void 0,n),i,a=null,s=new Set,o=null,l=null,c=null,u=e.hydrationData!=null,d=Ys(r,e.history.location,e.basename),f=null;if(d==null){let M=Yr(404,{pathname:e.history.location.pathname}),{matches:z,route:H}=Jb(r);d=z,f={[H.id]:M}}let p=!d.some(M=>M.route.lazy)&&(!d.some(M=>M.route.loader)||e.hydrationData!=null),m,h={historyAction:e.history.action,location:e.history.location,matches:d,initialized:p,navigation:mf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||f,fetchers:new Map,blockers:new Map},w=jt.Pop,y=!1,v,x=!1,_=!1,A=[],E=[],R=new Map,B=0,q=-1,G=new Map,W=new Set,K=new Map,ue=new Map,fe=new Map,Te=!1;function I(){if(a=e.history.listen(H=>{let{action:le,location:ye,delta:Ce}=H;if(Te){Te=!1;return}ss(fe.size===0||Ce!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ke=an({currentLocation:h.location,nextLocation:ye,historyAction:le});if(ke&&Ce!=null){Te=!0,e.history.go(Ce*-1),cn(ke,{state:"blocked",location:ye,proceed(){cn(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),e.history.go(Ce)},reset(){Oe(ke),V({blockers:new Map(m.state.blockers)})}});return}return Q(le,ye)}),h.initialized)return m;let M=h.matches.filter(H=>H.route.lazy);if(M.length===0)return Q(jt.Pop,h.location),m;let z=M.map(H=>dm(H.route,t,n));return Promise.all(z).then(()=>{!h.matches.some(le=>le.route.loader)||e.hydrationData!=null?V({initialized:!0}):Q(jt.Pop,h.location)}),m}function Y(){a&&a(),s.clear(),v&&v.abort(),h.fetchers.forEach((M,z)=>et(z)),h.blockers.forEach((M,z)=>Oe(z))}function F(M){return s.add(M),()=>s.delete(M)}function V(M){h=nt({},h,M),s.forEach(z=>z(h))}function X(M,z){var H,le;let ye=h.actionData!=null&&h.navigation.formMethod!=null&&yi(h.navigation.formMethod)&&h.navigation.state==="loading"&&((H=M.state)==null?void 0:H._isRedirect)!==!0,Ce;z.actionData?Object.keys(z.actionData).length>0?Ce=z.actionData:Ce=null:ye?Ce=h.actionData:Ce=null;let ke=z.loaderData?Zb(h.loaderData,z.loaderData,z.matches||[],z.errors):h.loaderData;for(let[_e]of fe)Oe(_e);let ze=y===!0||h.navigation.formMethod!=null&&yi(h.navigation.formMethod)&&((le=M.state)==null?void 0:le._isRedirect)!==!0;i&&(r=i,i=void 0),V(nt({},z,{actionData:Ce,loaderData:ke,historyAction:w,location:M,initialized:!0,navigation:mf,revalidation:"idle",restoreScrollPosition:xe(M,z.matches||h.matches),preventScrollReset:ze,blockers:new Map(h.blockers)})),x||w===jt.Pop||(w===jt.Push?e.history.push(M,M.state):w===jt.Replace&&e.history.replace(M,M.state)),w=jt.Pop,y=!1,x=!1,_=!1,A=[],E=[]}async function N(M,z){if(typeof M=="number"){e.history.go(M);return}let{path:H,submission:le,error:ye}=Kb(M,z),Ce=h.location,ke=Kl(h.location,H,z&&z.state);ke=nt({},ke,e.history.encodeLocation(ke));let ze=z&&z.replace!=null?z.replace:void 0,_e=jt.Push;ze===!0?_e=jt.Replace:ze===!1||le!=null&&yi(le.formMethod)&&le.formAction===h.location.pathname+h.location.search&&(_e=jt.Replace);let Ge=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,Ze=an({currentLocation:Ce,nextLocation:ke,historyAction:_e});if(Ze){cn(Ze,{state:"blocked",location:ke,proceed(){cn(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ke}),N(M,z)},reset(){Oe(Ze),V({blockers:new Map(h.blockers)})}});return}return await Q(_e,ke,{submission:le,pendingError:ye,preventScrollReset:Ge,replace:z&&z.replace})}function C(){if(Ae(),V({revalidation:"loading"}),h.navigation.state!=="submitting"){if(h.navigation.state==="idle"){Q(h.historyAction,h.location,{startUninterruptedRevalidation:!0});return}Q(w||h.historyAction,h.navigation.location,{overrideNavigation:h.navigation})}}async function Q(M,z,H){v&&v.abort(),v=null,w=M,x=(H&&H.startUninterruptedRevalidation)===!0,ee(h.location,h.matches),y=(H&&H.preventScrollReset)===!0;let le=i||r,ye=H&&H.overrideNavigation,Ce=Ys(le,z,e.basename);if(!Ce){let Ut=Yr(404,{pathname:z.pathname}),{matches:qr,route:Er}=Jb(le);$t(),X(z,{matches:qr,loaderData:{},errors:{[Er.id]:Ut}});return}if(nE(h.location,z)&&!(H&&H.submission&&yi(H.submission.formMethod))){X(z,{matches:Ce});return}v=new AbortController;let ke=tl(e.history,z,v.signal,H&&H.submission),ze,_e;if(H&&H.pendingError)_e={[Ks(Ce).route.id]:H.pendingError};else if(H&&H.submission&&yi(H.submission.formMethod)){let Ut=await ne(ke,z,H.submission,Ce,{replace:H.replace});if(Ut.shortCircuited)return;ze=Ut.pendingActionData,_e=Ut.pendingActionError,ye=nt({state:"loading",location:z},H.submission),ke=new Request(ke.url,{signal:ke.signal})}let{shortCircuited:Ge,loaderData:Ze,errors:xt}=await ge(ke,z,Ce,ye,H&&H.submission,H&&H.replace,ze,_e);Ge||(v=null,X(z,nt({matches:Ce},ze?{actionData:ze}:{},{loaderData:Ze,errors:xt})))}async function ne(M,z,H,le,ye){Ae();let Ce=nt({state:"submitting",location:z},H);V({navigation:Ce});let ke,ze=hm(le,z);if(!ze.route.action&&!ze.route.lazy)ke={type:Jt.error,error:Yr(405,{method:M.method,pathname:z.pathname,routeId:ze.route.id})};else if(ke=await el("action",M,ze,le,n,t,m.basename),M.signal.aborted)return{shortCircuited:!0};if(so(ke)){let _e;return ye&&ye.replace!=null?_e=ye.replace:_e=ke.location===h.location.pathname+h.location.search,await Re(h,ke,{submission:H,replace:_e}),{shortCircuited:!0}}if(kl(ke)){let _e=Ks(le,ze.route.id);return(ye&&ye.replace)!==!0&&(w=jt.Push),{pendingActionData:{},pendingActionError:{[_e.route.id]:ke.error}}}if(Ya(ke))throw Yr(400,{type:"defer-action"});return{pendingActionData:{[ze.route.id]:ke.data}}}async function ge(M,z,H,le,ye,Ce,ke,ze){let _e=le;_e||(_e=nt({state:"loading",location:z,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},ye));let Ge=ye||(_e.formMethod&&_e.formAction&&_e.formData&&_e.formEncType?{formMethod:_e.formMethod,formAction:_e.formAction,formData:_e.formData,formEncType:_e.formEncType}:void 0),Ze=i||r,[xt,Ut]=Gb(e.history,h,H,Ge,z,_,A,E,K,Ze,e.basename,ke,ze);if($t(fn=>!(H&&H.some(Hr=>Hr.route.id===fn))||xt&&xt.some(Hr=>Hr.route.id===fn)),xt.length===0&&Ut.length===0)return X(z,nt({matches:H,loaderData:{},errors:ze||null},ke?{actionData:ke}:{})),{shortCircuited:!0};if(!x){Ut.forEach(Hr=>{let Da=h.fetchers.get(Hr.key),zc={state:"loading",data:Da&&Da.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(Hr.key,zc)});let fn=ke||h.actionData;V(nt({navigation:_e},fn?Object.keys(fn).length===0?{actionData:null}:{actionData:fn}:{},Ut.length>0?{fetchers:new Map(h.fetchers)}:{}))}q=++B,Ut.forEach(fn=>R.set(fn.key,v));let{results:qr,loaderResults:Er,fetcherResults:Wo}=await Ue(h.matches,H,xt,Ut,M);if(M.signal.aborted)return{shortCircuited:!0};Ut.forEach(fn=>R.delete(fn.key));let Lc=ev(qr);if(Lc)return await Re(h,Lc,{replace:Ce}),{shortCircuited:!0};let{loaderData:Pc,errors:Ss}=Qb(h,H,xt,Er,ze,Ut,Wo,ue);ue.forEach((fn,Hr)=>{fn.subscribe(Da=>{(Da||fn.done)&&ue.delete(Hr)})}),de();let Bh=lt(q);return nt({loaderData:Pc,errors:Ss},Bh||Ut.length>0?{fetchers:new Map(h.fetchers)}:{})}function $(M){return h.fetchers.get(M)||K_}function Ee(M,z,H,le){if(G_)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");R.has(M)&&$e(M);let Ce=Ys(i||r,H,e.basename);if(!Ce){ft(M,z,Yr(404,{pathname:H}));return}let{path:ke,submission:ze}=Kb(H,le,!0),_e=hm(Ce,ke);if(y=(le&&le.preventScrollReset)===!0,ze&&yi(ze.formMethod)){J(M,z,ke,_e,Ce,ze);return}K.set(M,{routeId:z,path:ke}),Se(M,z,ke,_e,Ce,ze)}async function J(M,z,H,le,ye,Ce){if(Ae(),K.delete(M),!le.route.action&&!le.route.lazy){let hi=Yr(405,{method:Ce.formMethod,pathname:H,routeId:z});ft(M,z,hi);return}let ke=h.fetchers.get(M),ze=nt({state:"submitting"},Ce,{data:ke&&ke.data," _hasFetcherDoneAnything ":!0});h.fetchers.set(M,ze),V({fetchers:new Map(h.fetchers)});let _e=new AbortController,Ge=tl(e.history,H,_e.signal,Ce);R.set(M,_e);let Ze=await el("action",Ge,le,ye,n,t,m.basename);if(Ge.signal.aborted){R.get(M)===_e&&R.delete(M);return}if(so(Ze)){R.delete(M),W.add(M);let hi=nt({state:"loading"},Ce,{data:void 0," _hasFetcherDoneAnything ":!0});return h.fetchers.set(M,hi),V({fetchers:new Map(h.fetchers)}),Re(h,Ze,{isFetchActionRedirect:!0})}if(kl(Ze)){ft(M,z,Ze.error);return}if(Ya(Ze))throw Yr(400,{type:"defer-action"});let xt=h.navigation.location||h.location,Ut=tl(e.history,xt,_e.signal),qr=i||r,Er=h.navigation.state!=="idle"?Ys(qr,h.navigation.location,e.basename):h.matches;He(Er,"Didn't find any matches after fetcher action");let Wo=++B;G.set(M,Wo);let Lc=nt({state:"loading",data:Ze.data},Ce,{" _hasFetcherDoneAnything ":!0});h.fetchers.set(M,Lc);let[Pc,Ss]=Gb(e.history,h,Er,Ce,xt,_,A,E,K,qr,e.basename,{[le.route.id]:Ze.data},void 0);Ss.filter(hi=>hi.key!==M).forEach(hi=>{let $h=hi.key,Iy=h.fetchers.get($h),$8={state:"loading",data:Iy&&Iy.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set($h,$8),R.set($h,_e)}),V({fetchers:new Map(h.fetchers)});let{results:Bh,loaderResults:fn,fetcherResults:Hr}=await Ue(h.matches,Er,Pc,Ss,Ut);if(_e.signal.aborted)return;G.delete(M),R.delete(M),Ss.forEach(hi=>R.delete(hi.key));let Da=ev(Bh);if(Da)return Re(h,Da);let{loaderData:zc,errors:Fh}=Qb(h,h.matches,Pc,fn,void 0,Ss,Hr,ue),B8={state:"idle",data:Ze.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(M,B8);let F8=lt(Wo);h.navigation.state==="loading"&&Wo>q?(He(w,"Expected pending action"),v&&v.abort(),X(h.navigation.location,{matches:Er,loaderData:zc,errors:Fh,fetchers:new Map(h.fetchers)})):(V(nt({errors:Fh,loaderData:Zb(h.loaderData,zc,Er,Fh)},F8?{fetchers:new Map(h.fetchers)}:{})),_=!1)}async function Se(M,z,H,le,ye,Ce){let ke=h.fetchers.get(M),ze=nt({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Ce,{data:ke&&ke.data," _hasFetcherDoneAnything ":!0});h.fetchers.set(M,ze),V({fetchers:new Map(h.fetchers)});let _e=new AbortController,Ge=tl(e.history,H,_e.signal);R.set(M,_e);let Ze=await el("loader",Ge,le,ye,n,t,m.basename);if(Ya(Ze)&&(Ze=await E3(Ze,Ge.signal,!0)||Ze),R.get(M)===_e&&R.delete(M),Ge.signal.aborted)return;if(so(Ze)){await Re(h,Ze);return}if(kl(Ze)){let Ut=Ks(h.matches,z);h.fetchers.delete(M),V({fetchers:new Map(h.fetchers),errors:{[Ut.route.id]:Ze.error}});return}He(!Ya(Ze),"Unhandled fetcher deferred data");let xt={state:"idle",data:Ze.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(M,xt),V({fetchers:new Map(h.fetchers)})}async function Re(M,z,H){var le;let{submission:ye,replace:Ce,isFetchActionRedirect:ke}=H===void 0?{}:H;z.revalidate&&(_=!0);let ze=Kl(M.location,z.location,nt({_isRedirect:!0},ke?{_isFetchActionRedirect:!0}:{}));if(He(ze,"Expected a location on the redirect navigation"),w3.test(z.location)&&x3&&typeof((le=window)==null?void 0:le.location)<"u"){let qr=e.history.createURL(z.location),Er=gc(qr.pathname,e.basename||"/")==null;if(window.location.origin!==qr.origin||Er){Ce?window.location.replace(z.location):window.location.assign(z.location);return}}v=null;let _e=Ce===!0?jt.Replace:jt.Push,{formMethod:Ge,formAction:Ze,formEncType:xt,formData:Ut}=M.navigation;!ye&&Ge&&Ze&&Ut&&xt&&(ye={formMethod:Ge,formAction:Ze,formEncType:xt,formData:Ut}),Y_.has(z.status)&&ye&&yi(ye.formMethod)?await Q(_e,ze,{submission:nt({},ye,{formAction:z.location}),preventScrollReset:y}):await Q(_e,ze,{overrideNavigation:{state:"loading",location:ze,formMethod:ye?ye.formMethod:void 0,formAction:ye?ye.formAction:void 0,formEncType:ye?ye.formEncType:void 0,formData:ye?ye.formData:void 0},preventScrollReset:y})}async function Ue(M,z,H,le,ye){let Ce=await Promise.all([...H.map(_e=>el("loader",ye,_e,z,n,t,m.basename)),...le.map(_e=>_e.matches&&_e.match?el("loader",tl(e.history,_e.path,ye.signal),_e.match,_e.matches,n,t,m.basename):{type:Jt.error,error:Yr(404,{pathname:_e.path})})]),ke=Ce.slice(0,H.length),ze=Ce.slice(H.length);return await Promise.all([tv(M,H,ke,ye.signal,!1,h.loaderData),tv(M,le.map(_e=>_e.match),ze,ye.signal,!0)]),{results:Ce,loaderResults:ke,fetcherResults:ze}}function Ae(){_=!0,A.push(...$t()),K.forEach((M,z)=>{R.has(z)&&(E.push(z),$e(z))})}function ft(M,z,H){let le=Ks(h.matches,z);et(M),V({errors:{[le.route.id]:H},fetchers:new Map(h.fetchers)})}function et(M){R.has(M)&&$e(M),K.delete(M),G.delete(M),W.delete(M),h.fetchers.delete(M)}function $e(M){let z=R.get(M);He(z,"Expected fetch controller: "+M),z.abort(),R.delete(M)}function ct(M){for(let z of M){let le={state:"idle",data:$(z).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(z,le)}}function de(){let M=[];for(let z of W){let H=h.fetchers.get(z);He(H,"Expected fetcher: "+z),H.state==="loading"&&(W.delete(z),M.push(z))}ct(M)}function lt(M){let z=[];for(let[H,le]of G)if(le0}function tt(M,z){let H=h.blockers.get(M)||Yb;return fe.get(M)!==z&&fe.set(M,z),H}function Oe(M){h.blockers.delete(M),fe.delete(M)}function cn(M,z){let H=h.blockers.get(M)||Yb;He(H.state==="unblocked"&&z.state==="blocked"||H.state==="blocked"&&z.state==="blocked"||H.state==="blocked"&&z.state==="proceeding"||H.state==="blocked"&&z.state==="unblocked"||H.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+H.state+" -> "+z.state),h.blockers.set(M,z),V({blockers:new Map(h.blockers)})}function an(M){let{currentLocation:z,nextLocation:H,historyAction:le}=M;if(fe.size===0)return;fe.size>1&&ss(!1,"A router only supports one blocker at a time");let ye=Array.from(fe.entries()),[Ce,ke]=ye[ye.length-1],ze=h.blockers.get(Ce);if(!(ze&&ze.state==="proceeding")&&ke({currentLocation:z,nextLocation:H,historyAction:le}))return Ce}function $t(M){let z=[];return ue.forEach((H,le)=>{(!M||M(le))&&(H.cancel(),z.push(le),ue.delete(le))}),z}function Ie(M,z,H){if(o=M,c=z,l=H||(le=>le.key),!u&&h.navigation===mf){u=!0;let le=xe(h.location,h.matches);le!=null&&V({restoreScrollPosition:le})}return()=>{o=null,c=null,l=null}}function ee(M,z){if(o&&l&&c){let H=z.map(ye=>nv(ye,h.loaderData)),le=l(M,H)||M.key;o[le]=c()}}function xe(M,z){if(o&&l&&c){let H=z.map(Ce=>nv(Ce,h.loaderData)),le=l(M,H)||M.key,ye=o[le];if(typeof ye=="number")return ye}return null}function U(M){i=M}return m={get basename(){return e.basename},get state(){return h},get routes(){return r},initialize:I,subscribe:F,enableScrollRestoration:Ie,navigate:N,fetch:Ee,revalidate:C,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:$,deleteFetcher:et,dispose:Y,getBlocker:tt,deleteBlocker:Oe,_internalFetchControllers:R,_internalActiveDeferreds:ue,_internalSetRoutes:U},m}function Z_(e){return e!=null&&"formData"in e}function Kb(e,t,n){n===void 0&&(n=!1);let r=typeof e=="string"?e:Li(e);if(!t||!Z_(t))return{path:r};if(t.formMethod&&!iE(t.formMethod))return{path:r,error:Yr(405,{method:t.formMethod})};let i;if(t.formData&&(i={formMethod:t.formMethod||"get",formAction:_3(r),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData},yi(i.formMethod)))return{path:r,submission:i};let a=ai(r),s=S3(t.formData);return n&&a.search&&T3(a.search)&&s.append("index",""),a.search="?"+s,{path:Li(a),submission:i}}function J_(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Gb(e,t,n,r,i,a,s,o,l,c,u,d,f){let p=f?Object.values(f)[0]:d?Object.values(d)[0]:void 0,m=e.createURL(t.location),h=e.createURL(i),w=a||m.toString()===h.toString()||m.search!==h.search,y=f?Object.keys(f)[0]:void 0,x=J_(n,y).filter((A,E)=>{if(A.route.lazy)return!0;if(A.route.loader==null)return!1;if(eE(t.loaderData,t.matches[E],A)||s.some(q=>q===A.route.id))return!0;let R=t.matches[E],B=A;return Xb(A,nt({currentUrl:m,currentParams:R.params,nextUrl:h,nextParams:B.params},r,{actionResult:p,defaultShouldRevalidate:w||k3(R,B)}))}),_=[];return l.forEach((A,E)=>{if(!n.some(G=>G.route.id===A.routeId))return;let R=Ys(c,A.path,u);if(!R){_.push(nt({key:E},A,{matches:null,match:null}));return}let B=hm(R,A.path);if(o.includes(E)){_.push(nt({key:E,matches:R,match:B},A));return}Xb(B,nt({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:n[n.length-1].params},r,{actionResult:p,defaultShouldRevalidate:w}))&&_.push(nt({key:E,matches:R,match:B},A))}),[x,_]}function eE(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function k3(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Xb(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function dm(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];He(i,"No route found in manifest");let a={};for(let s in r){let l=i[s]!==void 0&&s!=="hasErrorBoundary";ss(!l,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!v_.has(s)&&(a[s]=r[s])}Object.assign(i,a),Object.assign(i,{hasErrorBoundary:t(nt({},i)),lazy:void 0})}async function el(e,t,n,r,i,a,s,o,l,c){s===void 0&&(s="/"),o===void 0&&(o=!1),l===void 0&&(l=!1);let u,d,f,p=w=>{let y,v=new Promise((x,_)=>y=_);return f=()=>y(),t.signal.addEventListener("abort",f),Promise.race([w({request:t,params:n.params,context:c}),v])};try{let w=n.route[e];if(n.route.lazy)if(w)d=(await Promise.all([p(w),dm(n.route,a,i)]))[0];else if(await dm(n.route,a,i),w=n.route[e],w)d=await p(w);else{if(e==="action")throw Yr(405,{method:t.method,pathname:new URL(t.url).pathname,routeId:n.route.id});return{type:Jt.data,data:void 0}}else He(w,"Could not find the "+e+' to run on the "'+n.route.id+'" route'),d=await p(w);He(d!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(w){u=Jt.error,d=w}finally{f&&t.signal.removeEventListener("abort",f)}if(rE(d)){let w=d.status;if(V_.has(w)){let x=d.headers.get("Location");if(He(x,"Redirects returned/thrown from loaders/actions must have a Location header"),w3.test(x)){if(!o){let _=new URL(t.url),A=x.startsWith("//")?new URL(_.protocol+x):new URL(x),E=gc(A.pathname,s)!=null;A.origin===_.origin&&E&&(x=A.pathname+A.search+A.hash)}}else{let _=r.slice(0,r.indexOf(n)+1),A=x0(_).map(R=>R.pathnameBase),E=Qg(x,A,new URL(t.url).pathname);if(He(Li(E),"Unable to resolve redirect location: "+x),s){let R=E.pathname;E.pathname=R==="/"?s:Ci([s,R])}x=Li(E)}if(o)throw d.headers.set("Location",x),d;return{type:Jt.redirect,status:w,location:x,revalidate:d.headers.get("X-Remix-Revalidate")!==null}}if(l)throw{type:u||Jt.data,response:d};let y,v=d.headers.get("Content-Type");return v&&/\bapplication\/json\b/.test(v)?y=await d.json():y=await d.text(),u===Jt.error?{type:u,error:new Zg(w,d.statusText,y),headers:d.headers}:{type:Jt.data,data:y,statusCode:d.status,headers:d.headers}}if(u===Jt.error)return{type:u,error:d};if(d instanceof $_){var m,h;return{type:Jt.deferred,deferredData:d,statusCode:(m=d.init)==null?void 0:m.status,headers:((h=d.init)==null?void 0:h.headers)&&new Headers(d.init.headers)}}return{type:Jt.data,data:d}}function tl(e,t,n,r){let i=e.createURL(_3(t)).toString(),a={signal:n};if(r&&yi(r.formMethod)){let{formMethod:s,formEncType:o,formData:l}=r;a.method=s.toUpperCase(),a.body=o==="application/x-www-form-urlencoded"?S3(l):l}return new Request(i,a)}function S3(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,r instanceof File?r.name:r);return t}function tE(e,t,n,r,i){let a={},s=null,o,l=!1,c={};return n.forEach((u,d)=>{let f=t[d].route.id;if(He(!so(u),"Cannot handle redirect results in processLoaderData"),kl(u)){let p=Ks(e,f),m=u.error;r&&(m=Object.values(r)[0],r=void 0),s=s||{},s[p.route.id]==null&&(s[p.route.id]=m),a[f]=void 0,l||(l=!0,o=b3(u.error)?u.error.status:500),u.headers&&(c[f]=u.headers)}else Ya(u)?(i.set(f,u.deferredData),a[f]=u.deferredData.data):a[f]=u.data,u.statusCode!=null&&u.statusCode!==200&&!l&&(o=u.statusCode),u.headers&&(c[f]=u.headers)}),r&&(s=r,a[Object.keys(r)[0]]=void 0),{loaderData:a,errors:s,statusCode:o||200,loaderHeaders:c}}function Qb(e,t,n,r,i,a,s,o){let{loaderData:l,errors:c}=tE(t,n,r,i,o);for(let u=0;ur.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Jb(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Yr(e,t){let{pathname:n,routeId:r,method:i,type:a}=t===void 0?{}:t,s="Unknown Server Error",o="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?o="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"&&(o="defer() is not supported in actions")):e===403?(s="Forbidden",o='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",o='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?o="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(o='Invalid request method "'+i.toUpperCase()+'"')),new Zg(e||500,s,new Error(o),!0)}function ev(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(so(n))return n}}function _3(e){let t=typeof e=="string"?ai(e):e;return Li(nt({},t,{hash:""}))}function nE(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function Ya(e){return e.type===Jt.deferred}function kl(e){return e.type===Jt.error}function so(e){return(e&&e.type)===Jt.redirect}function rE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function iE(e){return W_.has(e)}function yi(e){return q_.has(e)}async function tv(e,t,n,r,i,a){for(let s=0;sd.route.id===l.route.id),u=c!=null&&!k3(c,l)&&(a&&a[l.route.id])!==void 0;Ya(o)&&(i||u)&&await E3(o,r,i).then(d=>{d&&(n[s]=d||n[s])})}}async function E3(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Jt.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Jt.error,error:i}}return{type:Jt.data,data:e.deferredData.data}}}function T3(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function nv(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function hm(e,t){let n=typeof t=="string"?ai(t).search:t.search;if(e[e.length-1].route.index&&T3(n||""))return e[e.length-1];let r=x0(e);return r[r.length-1]}/** + * React Router v6.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function aE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const sE=typeof Object.is=="function"?Object.is:aE,{useState:oE,useEffect:lE,useLayoutEffect:cE,useDebugValue:uE}=mp;function dE(e,t,n){const r=t(),[{inst:i},a]=oE({inst:{value:r,getSnapshot:t}});return cE(()=>{i.value=r,i.getSnapshot=t,gf(i)&&a({inst:i})},[e,r,t]),lE(()=>(gf(i)&&a({inst:i}),e(()=>{gf(i)&&a({inst:i})})),[e]),uE(r),r}function gf(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!sE(n,r)}catch{return!0}}function hE(e,t,n){return t()}const fE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pE=!fE,mE=pE?hE:dE,gE="useSyncExternalStore"in mp?(e=>e.useSyncExternalStore)(mp):mE,Jg=ce.createContext(null),e1=ce.createContext(null),yc=ce.createContext(null),k0=ce.createContext(null),Ma=ce.createContext({outlet:null,matches:[]}),C3=ce.createContext(null);function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;to.pathnameBase)),a=ce.useRef(!1);return ce.useEffect(()=>{a.current=!0}),ce.useCallback(function(o,l){if(l===void 0&&(l={}),!a.current)return;if(typeof o=="number"){t.go(o);return}let c=Qg(o,JSON.parse(i),r,l.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:Ci([e,c.pathname])),(l.replace?t.replace:t.push)(c,l.state,l)},[e,t,i,r])}const bE=ce.createContext(null);function vE(e){let t=ce.useContext(Ma).outlet;return t&&ce.createElement(bE.Provider,{value:e},t)}function t1(){let{matches:e}=ce.useContext(Ma),t=e[e.length-1];return t?t.params:{}}function A3(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=ce.useContext(Ma),{pathname:i}=S0(),a=JSON.stringify(x0(r).map(s=>s.pathnameBase));return ce.useMemo(()=>Qg(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function wE(e,t){bc()||He(!1);let{navigator:n}=ce.useContext(yc),r=ce.useContext(e1),{matches:i}=ce.useContext(Ma),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let o=a?a.pathnameBase:"/";a&&a.route;let l=S0(),c;if(t){var u;let h=typeof t=="string"?ai(t):t;o==="/"||(u=h.pathname)!=null&&u.startsWith(o)||He(!1),c=h}else c=l;let d=c.pathname||"/",f=o==="/"?d:d.slice(o.length)||"/",p=Ys(e,{pathname:f}),m=_E(p&&p.map(h=>Object.assign({},h,{params:Object.assign({},s,h.params),pathname:Ci([o,n.encodeLocation?n.encodeLocation(h.pathname).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?o:Ci([o,n.encodeLocation?n.encodeLocation(h.pathnameBase).pathname:h.pathnameBase])})),i,r||void 0);return t&&m?ce.createElement(k0.Provider,{value:{location:fm({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:jt.Pop}},m):m}function xE(){let e=AE(),t=b3(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return ce.createElement(ce.Fragment,null,ce.createElement("h2",null,"Unexpected Application Error!"),ce.createElement("h3",{style:{fontStyle:"italic"}},t),n?ce.createElement("pre",{style:i},n):null,a)}class kE extends ce.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?ce.createElement(Ma.Provider,{value:this.props.routeContext},ce.createElement(C3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function SE(e){let{routeContext:t,match:n,children:r}=e,i=ce.useContext(Jg);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),ce.createElement(Ma.Provider,{value:t},r)}function _E(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let a=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));a>=0||He(!1),r=r.slice(0,Math.min(r.length,a+1))}return r.reduceRight((a,s,o)=>{let l=s.route.id?i==null?void 0:i[s.route.id]:null,c=null;n&&(s.route.ErrorBoundary?c=ce.createElement(s.route.ErrorBoundary,null):s.route.errorElement?c=s.route.errorElement:c=ce.createElement(xE,null));let u=t.concat(r.slice(0,o+1)),d=()=>{let f=a;return l?f=c:s.route.Component?f=ce.createElement(s.route.Component,null):s.route.element&&(f=s.route.element),ce.createElement(SE,{match:s,routeContext:{outlet:a,matches:u},children:f})};return n&&(s.route.ErrorBoundary||s.route.errorElement||o===0)?ce.createElement(kE,{location:n.location,component:c,error:l,children:d(),routeContext:{outlet:null,matches:u}}):d()},null)}var rv;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(rv||(rv={}));var Od;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Od||(Od={}));function EE(e){let t=ce.useContext(e1);return t||He(!1),t}function TE(e){let t=ce.useContext(Ma);return t||He(!1),t}function CE(e){let t=TE(),n=t.matches[t.matches.length-1];return n.route.id||He(!1),n.route.id}function AE(){var e;let t=ce.useContext(C3),n=EE(Od.UseRouteError),r=CE(Od.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function NE(e){let{fallbackElement:t,router:n}=e,r=ce.useCallback(()=>n.state,[n]),i=gE(n.subscribe,r,r),a=ce.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:l=>n.navigate(l),push:(l,c,u)=>n.navigate(l,{state:c,preventScrollReset:u==null?void 0:u.preventScrollReset}),replace:(l,c,u)=>n.navigate(l,{replace:!0,state:c,preventScrollReset:u==null?void 0:u.preventScrollReset})}),[n]),s=n.basename||"/",o=ce.useMemo(()=>({router:n,navigator:a,static:!1,basename:s}),[n,a,s]);return ce.createElement(ce.Fragment,null,ce.createElement(Jg.Provider,{value:o},ce.createElement(e1.Provider,{value:i},ce.createElement(OE,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:a},n.state.initialized?ce.createElement(IE,null):t))),null)}function ME(e){return vE(e.context)}function RE(e){He(!1)}function OE(e){let{basename:t="/",children:n=null,location:r,navigationType:i=jt.Pop,navigator:a,static:s=!1}=e;bc()&&He(!1);let o=t.replace(/^\/*/,"/"),l=ce.useMemo(()=>({basename:o,navigator:a,static:s}),[o,a,s]);typeof r=="string"&&(r=ai(r));let{pathname:c="/",search:u="",hash:d="",state:f=null,key:p="default"}=r,m=ce.useMemo(()=>{let h=gc(c,o);return h==null?null:{location:{pathname:h,search:u,hash:d,state:f,key:p},navigationType:i}},[o,c,u,d,f,p,i]);return m==null?null:ce.createElement(yc.Provider,{value:l},ce.createElement(k0.Provider,{children:n,value:m}))}function IE(e){let{children:t,location:n}=e,r=ce.useContext(Jg),i=r&&!t?r.router.routes:pm(t);return wE(i,n)}var iv;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(iv||(iv={}));new Promise(()=>{});function pm(e,t){t===void 0&&(t=[]);let n=[];return ce.Children.forEach(e,(r,i)=>{if(!ce.isValidElement(r))return;if(r.type===ce.Fragment){n.push.apply(n,pm(r.props.children,t));return}r.type!==RE&&He(!1),!r.props.index||!r.props.children||He(!1);let a=[...t,i],s={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=pm(r.props.children,a)),n.push(s)}),n}function DE(e){return!!e.ErrorBoundary||!!e.errorElement}/** + * React Router DOM v6.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Id(){return Id=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function PE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zE(e,t){return e.button===0&&(!t||t==="_self")&&!PE(e)}const BE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function FE(e,t){return Q_({basename:t==null?void 0:t.basename,history:g_({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||$E(),routes:e,detectErrorBoundary:DE}).initialize()}function $E(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Id({},t,{errors:UE(t.errors)})),t}function UE(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Zg(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){let a=new Error(i.message);a.stack="",n[r]=a}else n[r]=i;return n}const jE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ro=ce.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:s,state:o,target:l,to:c,preventScrollReset:u}=t,d=LE(t,BE),{basename:f}=ce.useContext(yc),p,m=!1;if(typeof c=="string"&&qE.test(c)&&(p=c,jE)){let v=new URL(window.location.href),x=c.startsWith("//")?new URL(v.protocol+c):new URL(c),_=gc(x.pathname,f);x.origin===v.origin&&_!=null?c=_+x.search+x.hash:m=!0}let h=yE(c,{relative:i}),w=HE(c,{replace:s,state:o,target:l,preventScrollReset:u,relative:i});function y(v){r&&r(v),v.defaultPrevented||w(v)}return ce.createElement("a",Id({},d,{href:p||h,onClick:m||a?r:y,ref:n,target:l}))});var av;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(av||(av={}));var sv;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sv||(sv={}));function HE(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:s}=t===void 0?{}:t,o=ji(),l=S0(),c=A3(e,{relative:s});return ce.useCallback(u=>{if(zE(u,n)){u.preventDefault();let d=r!==void 0?r:Li(l)===Li(c);o(e,{replace:d,state:i,preventScrollReset:a,relative:s})}},[l,o,c,r,i,n,e,a,s])}var Gl={},WE={get exports(){return Gl},set exports(e){Gl=e}},dt={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var n1=Symbol.for("react.element"),r1=Symbol.for("react.portal"),_0=Symbol.for("react.fragment"),E0=Symbol.for("react.strict_mode"),T0=Symbol.for("react.profiler"),C0=Symbol.for("react.provider"),A0=Symbol.for("react.context"),VE=Symbol.for("react.server_context"),N0=Symbol.for("react.forward_ref"),M0=Symbol.for("react.suspense"),R0=Symbol.for("react.suspense_list"),O0=Symbol.for("react.memo"),I0=Symbol.for("react.lazy"),YE=Symbol.for("react.offscreen"),N3;N3=Symbol.for("react.module.reference");function vr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case n1:switch(e=e.type,e){case _0:case T0:case E0:case M0:case R0:return e;default:switch(e=e&&e.$$typeof,e){case VE:case A0:case N0:case I0:case O0:case C0:return e;default:return t}}case r1:return t}}}dt.ContextConsumer=A0;dt.ContextProvider=C0;dt.Element=n1;dt.ForwardRef=N0;dt.Fragment=_0;dt.Lazy=I0;dt.Memo=O0;dt.Portal=r1;dt.Profiler=T0;dt.StrictMode=E0;dt.Suspense=M0;dt.SuspenseList=R0;dt.isAsyncMode=function(){return!1};dt.isConcurrentMode=function(){return!1};dt.isContextConsumer=function(e){return vr(e)===A0};dt.isContextProvider=function(e){return vr(e)===C0};dt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===n1};dt.isForwardRef=function(e){return vr(e)===N0};dt.isFragment=function(e){return vr(e)===_0};dt.isLazy=function(e){return vr(e)===I0};dt.isMemo=function(e){return vr(e)===O0};dt.isPortal=function(e){return vr(e)===r1};dt.isProfiler=function(e){return vr(e)===T0};dt.isStrictMode=function(e){return vr(e)===E0};dt.isSuspense=function(e){return vr(e)===M0};dt.isSuspenseList=function(e){return vr(e)===R0};dt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_0||e===T0||e===E0||e===M0||e===R0||e===YE||typeof e=="object"&&e!==null&&(e.$$typeof===I0||e.$$typeof===O0||e.$$typeof===C0||e.$$typeof===A0||e.$$typeof===N0||e.$$typeof===N3||e.getModuleId!==void 0)};dt.typeOf=vr;(function(e){e.exports=dt})(WE);const KE=sw(Gl);function GE(e){function t(C,Q,ne,ge,$){for(var Ee=0,J=0,Se=0,Re=0,Ue,Ae,ft=0,et=0,$e,ct=$e=Ue=0,de=0,lt=0,tt=0,Oe=0,cn=ne.length,an=cn-1,$t,Ie="",ee="",xe="",U="",M;deUe)&&(Oe=(Ie=Ie.replace(" ",":")).length),0ge&&(ge=(Q=Q.trim()).charCodeAt(0)),ge){case 38:return Q.replace(y,"$1"+C.trim());case 58:return C.trim()+Q.replace(y,"$1"+C.trim());default:if(0<1*ne&&0J.charCodeAt(8))break;case 115:$=$.replace(J,"-webkit-"+J)+";"+$;break;case 207:case 102:$=$.replace(J,"-webkit-"+(102ne.charCodeAt(0)&&(ne=ne.trim()),N=ne,ne=[N],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var mT=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,i=0;i=this.groupSizes.length){for(var i=this.groupSizes,a=i.length,s=a;n>=s;)(s<<=1)<0&&os(16,""+n);this.groupSizes=new Uint32Array(s),this.groupSizes.set(i),this.length=s;for(var o=a;o=this.length||this.groupSizes[n]===0)return r;for(var i=this.groupSizes[n],a=this.indexOfGroup(n),s=a+i,o=a;o=Sl&&(Sl=t+1),Ku.set(e,t),Ld.set(t,e)},bT="style["+Eo+'][data-styled-version="5.3.9"]',vT=new RegExp("^"+Eo+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),wT=function(e,t,n){for(var r,i=n.split(","),a=0,s=i.length;a=0;c--){var u=l[c];if(u&&u.nodeType===1&&u.hasAttribute(Eo))return u}}(n),a=i!==void 0?i.nextSibling:null;r.setAttribute(Eo,"active"),r.setAttribute("data-styled-version","5.3.9");var s=kT();return s&&r.setAttribute("nonce",s),n.insertBefore(r,a),r},ST=function(){function e(n){var r=this.element=I3(n);r.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var a=document.styleSheets,s=0,o=a.length;s=0){var i=document.createTextNode(r),a=this.nodes[n];return this.element.insertBefore(i,a||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(d+=f+",")}),a+=""+c+u+'{content:"'+d+`"}/*!sc*/ +`}}}return a}(this)},e}(),CT=/(a)(d)/gi,pv=function(e){return String.fromCharCode(e+(e>25?39:97))};function ym(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=pv(t%52)+n;return(pv(t%52)+n).replace(CT,"$1-$2")}var Gs=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},D3=function(e){return Gs(5381,e)};function L3(e){for(var t=0;t>>0);if(!n.hasNameForId(i,o)){var l=r(s,"."+o,void 0,i);n.insertRules(i,o,l)}a.push(o),this.staticRulesId=o}else{for(var c=this.rules.length,u=Gs(this.baseHash,r.hash),d="",f=0;f>>0);if(!n.hasNameForId(i,w)){var y=r(d,"."+w,void 0,i);n.insertRules(i,w,y)}a.push(w)}}return a.join(" ")},e}(),MT=/^\s*\/\/.*$/gm,RT=[":","[",".","#"];function OT(e){var t,n,r,i,a=e===void 0?ga:e,s=a.options,o=s===void 0?ga:s,l=a.plugins,c=l===void 0?Dd:l,u=new GE(o),d=[],f=function(h){function w(y){if(y)try{h(y+"}")}catch{}}return function(y,v,x,_,A,E,R,B,q,G){switch(y){case 1:if(q===0&&v.charCodeAt(0)===64)return h(v+";"),"";break;case 2:if(B===0)return v+"/*|*/";break;case 3:switch(B){case 102:case 112:return h(x[0]+v),"";default:return v+(G===0?"/*|*/":"")}case-2:v.split("/*|*/}").forEach(w)}}}(function(h){d.push(h)}),p=function(h,w,y){return w===0&&RT.indexOf(y[n.length])!==-1||y.match(i)?h:"."+t};function m(h,w,y,v){v===void 0&&(v="&");var x=h.replace(MT,""),_=w&&y?y+" "+w+" { "+x+" }":x;return t=v,n=w,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),u(y||!w?"":w,_)}return u.use([].concat(c,[function(h,w,y){h===2&&y.length&&y[0].lastIndexOf(n)>0&&(y[0]=y[0].replace(r,p))},f,function(h){if(h===-2){var w=d;return d=[],w}}])),m.hash=c.length?c.reduce(function(h,w){return w.name||os(15),Gs(h,w.name)},5381).toString():"",m}var P3=Bn.createContext();P3.Consumer;var z3=Bn.createContext(),IT=(z3.Consumer,new Pd),bm=OT();function B3(){return ce.useContext(P3)||IT}function F3(){return ce.useContext(z3)||bm}var DT=function(){function e(t,n){var r=this;this.inject=function(i,a){a===void 0&&(a=bm);var s=r.name+a.hash;i.hasNameForId(r.id,s)||i.insertRules(r.id,s,a(r.rules,s,"@keyframes"))},this.toString=function(){return os(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=bm),this.name+t.hash},e}(),LT=/([A-Z])/,PT=/([A-Z])/g,zT=/^ms-/,BT=function(e){return"-"+e.toLowerCase()};function mv(e){return LT.test(e)?e.replace(PT,BT).replace(zT,"-ms-"):e}var gv=function(e){return e==null||e===!1||e===""};function ls(e,t,n,r){if(Array.isArray(e)){for(var i,a=[],s=0,o=e.length;s1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,$T=/(^-|-$)/g;function yf(e){return e.replace(FT,"-").replace($T,"")}var j3=function(e){return ym(D3(e)>>>0)};function nu(e){return typeof e=="string"&&!0}var vm=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},UT=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function jT(e,t,n){var r=e[n];vm(t)&&vm(r)?q3(r,t):e[n]=t}function q3(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(G[B]=E[B]);return G}(t,["componentId"]),A=x&&x+"-"+(nu(v)?v:yf(hv(v)));return H3(v,Or({},_,{attrs:f,componentId:A}),n)},Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(v){this._foldedDefaultProps=r?q3({},e.defaultProps,v):v}}),Object.defineProperty(m,"toString",{value:function(){return"."+m.styledComponentId}}),i&&hT(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),m}var wm=function(e){return function t(n,r,i){if(i===void 0&&(i=ga),!Gl.isValidElementType(r))return os(1,String(r));var a=function(){return n(r,i,$3.apply(void 0,arguments))};return a.withConfig=function(s){return t(n,r,Or({},i,{},s))},a.attrs=function(s){return t(n,r,Or({},i,{attrs:Array.prototype.concat(i.attrs,s).filter(Boolean)}))},a}(H3,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){wm[e]=wm(e)});var HT=function(){function e(n,r){this.rules=n,this.componentId=r,this.isStatic=L3(n),Pd.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(n,r,i,a){var s=a(ls(this.rules,r,i,a).join(""),""),o=this.componentId+n;i.insertRules(o,o,s)},t.removeStyles=function(n,r){r.clearRules(this.componentId+n)},t.renderStyles=function(n,r,i,a){n>2&&Pd.registerId(this.componentId+n),this.removeStyles(n,i),this.createStyles(n,r,i,a)},e}();function WT(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.isDropdown?"4px solid hsla(234, 60%, 66%, 1)":"none"}; + transition: all 0.05s; + cursor: pointer; + @media screen and (max-width: 1024px) { + font-size: 16px; + font-weight: 300; + padding-inline: 16px; + } +`,KT=P.ul` + position: absolute; + top: 86px; + left: 0; + display: ${e=>e.isDropdown?"block":"none"}; + padding: 16px 20px; + background: hsl(231, 14%, 18%); + border-radius: 8px; + transition: all 0s ease 0.1s; + width: 200px; +`,GT=P.li` + display: block; + padding-block: 8px; + color: hsl(0, 0%, 88%); + font-weight: 400; + font-size: 14px; + &:hover { + color: hsl(234, 60%, 66%); + } +`,W3=(e,t)=>{t&&(t.startsWith("http")||t.startsWith("https")?window.location.href=t:e(t))},XT=({label:e,url:t})=>{const n=ji();return S.jsx(GT,{onClick:()=>W3(n,t),children:e})},QT=({subNavItems:e,isDropdown:t})=>S.jsx(KT,{isDropdown:t,children:e==null?void 0:e.map(({key:n,label:r,url:i})=>S.jsx(XT,{label:r,url:i},n))}),ZT=({label:e,subNavItems:t,url:n})=>{const r=ji(),[i,a]=ce.useState(!1);return S.jsxs(YT,{isDropdown:i,onMouseOver:()=>a(!0),onMouseOut:()=>a(!1),onClick:()=>W3(r,n),children:[e,t&&S.jsx(QT,{subNavItems:t,isDropdown:i})]})},JT=({items:e})=>S.jsx(VT,{children:e.map(({key:t,label:n,url:r,children:i})=>S.jsx(ZT,{label:n,url:r,subNavItems:i},t))}),eC="/xline-home/assets/home-menu-icon-459d13f5.svg",tC="/xline-home/assets/dropIcon-525fd0e1.svg",nC="/xline-home/assets/dropIconActive-9bdef1aa.svg",rC=P.img` + display: none; + margin-left: 12px; + @media screen and (max-width: 768px) { + display: block; + } +`,iC=P.ul` + display: ${e=>e.isDropDown?"flex":"none"}; + flex-direction: column; + position: absolute; + top: 53px; + left: 0; + width: 100%; + z-index: 1000; + @media screen and (min-width: 768px) { + display: none; + } +`,aC=P.li` + display: flex; + align-items: center; + height: 42px; + padding-inline: 20px; +`,sC=P(aC)` + background: #111429; + color: ${e=>e.isDropdown?"#7680DD":"#E0E0E0"}; + font-weight: 500; + font-size: 16px; + line-height: 1; +`,oC=P.p` + /* min-width: 100px; */ +`,lC=P.ul` + display: ${e=>e.isDropdown?"block":"none"}; + height: ${e=>e.isDropdown?"min-content":"0px"}; + transition: all 1s; +`,cC=P.li` + display: flex; + align-items: center; + height: 42px; + padding-inline: 20px; +`,uC=P(cC)` + background: #242840; + color: #e0e0e0; +`,bv=P.img` + margin-left: 12px; + height: 12px; + width: 12px; +`,V3=(e,t,n,r)=>{t?t.startsWith("http")||t.startsWith("https")?window.location.href=t:e(t):r&&r(!n)},dC=({label:e,url:t})=>{const n=ji();return S.jsx(uC,{onClick:()=>V3(n,t),children:e})},hC=({isDropdown:e,subNavItems:t})=>S.jsx(lC,{isDropdown:e,children:t==null?void 0:t.map(({key:n,label:r,url:i})=>S.jsx(dC,{label:r,url:i},n))}),fC=({label:e,url:t,subNavItems:n})=>{const r=ji(),[i,a]=ce.useState(!1);return S.jsxs(S.Fragment,{children:[S.jsxs(sC,{isDropdown:i,onClick:()=>V3(r,t,i,a),children:[S.jsx(oC,{children:e}),(n==null?void 0:n.length)!==0&&S.jsx(S.Fragment,{children:i?S.jsx(bv,{src:nC}):S.jsx(bv,{src:tC})})]}),S.jsx(hC,{isDropdown:i,subNavItems:n})]})},pC=({items:e})=>{const[t,n]=ce.useState(!1);return S.jsxs(S.Fragment,{children:[S.jsx(rC,{src:eC,onClick:()=>n(!t)}),S.jsx(iC,{isDropDown:t,children:(e||[]).map(({key:r,label:i,url:a,children:s})=>S.jsx(fC,{label:i,url:a,subNavItems:s},r))})]})},d1="/xline-home/assets/logo-9c6940ee.svg",Y3="/xline-home/assets/github-icon-7701b5d6.svg",vv=[{key:"docs",label:"Docs",children:[{key:"what's-new",label:"What's new",url:"/docs/What's-New"},{key:"get-started",label:"Get started",url:"/docs/Get-Started"},{key:"deploy",label:"Deploy",url:"/docs/Deploy"},{key:"develop",label:"Develop",url:"/docs/Develop"},{key:"reference",label:"reference",url:"/docs/Xline-Architecture-Details"}]},{key:"deep-dive",label:"Deep dive",children:[{key:"consensus",label:"Consensus",url:"/deep-dive/Consensus"},{key:"kv-engine",label:"KV engine",url:"/deep-dive/Key-value-Engine"},{key:"rpc",label:"RPC",url:"/deep-dive/Remote-Procedure-Calls-(RPC)"},{key:"test",label:"Test",url:"/deep-dive/Testing"}]},{key:"community",label:"Community",children:[{key:"contribute",label:"Contribute",url:"/contribute"},{key:"chat",label:"Chat",url:"https://discord.gg/XyFXGpSfvb"}]},{key:"resources",label:"Resources",children:[{key:"blog",label:"Blog",url:"/blog"},{key:"video",label:"Video",url:"/video"}]}],mC=P.header` + position: absolute; + top: 0; + left: 0; + height: 86px; + width: 100%; + background-color: hsla(236, 60%, 10%, 0.4); + color: ${e=>e.theme.color.white}; + @media screen and (max-width: 1024px) { + height: 69px; + } + @media screen and (max-width: 768px) { + height: 53px; + } +`,gC=P.div` + position: relative; + display: flex; + align-items: center; + height: inherit; + width: 100%; + max-width: 1440px; + margin-inline: auto; + padding-left: 105px; + padding-right: 101px; + @media screen and (max-width: 1024px) { + padding-inline: 64px; + } + @media screen and (max-width: 768px) { + padding-inline: 20px; + } +`,yC=P.img` + width: 111px; + height: 32px; + margin-right: calc(68px - 20px); + @media screen and (max-width: 1024px) { + width: 86px; + height: 22px; + margin-right: 24px; + } + @media screen and (max-width: 768px) { + width: 64px; + height: 18px; + margin-right: 0; + } +`,bC=P.div` + flex: 1; + min-width: ${e=>e.theme.scale.md}; + @media screen and (max-width: 1024px) { + min-width: 16px; + } +`,vC=P.button` + display: flex; + align-items: center; + justify-content: center; + width: 131px; + height: 48px; + /* padding: 8px 16px; */ + color: ${e=>e.theme.color.white}; + background: linear-gradient( + 90deg, + hsla(270, 50%, 60%, 1), + hsla(257, 97%, 73%, 1) 50%, + hsla(266, 87%, 75%, 1) + ); + border: none; + border-radius: 50vh; + cursor: pointer; + @media screen and (max-width: 1024px) { + width: 106px; + height: 36px; + } + @media screen and (max-width: 768px) { + width: 84px; + height: 24px; + } +`,wC=P.img` + width: 24.94px; + height: 24.94px; + margin-right: 8px; + @media screen and (max-width: 1024px) { + width: 18px; + margin-right: 7px; + } + @media screen and (max-width: 768px) { + width: 15px; + margin-right: 6px; + } +`,xC=P.p` + font-size: 18px; + line-height: 1; + text-transform: capitalize; + transform: translateY(5%); + @media screen and (max-width: 1024px) { + font-size: 15px; + } + @media screen and (max-width: 768px) { + font-size: 11px; + } +`,kC=()=>{const e=ji();return S.jsx(mC,{children:S.jsxs(gC,{children:[S.jsx(yC,{src:d1,alt:"Xline",onClick:()=>e("/")}),S.jsx(JT,{items:vv}),S.jsx(bC,{}),S.jsxs(vC,{as:"a",href:"https://github.com/datenlord/xline",children:[S.jsx(wC,{src:Y3,alt:"icon"}),S.jsx(xC,{children:"github"})]}),S.jsx(pC,{items:vv})]})})},K3=[{title:"What's New",url:"/docs/What's-New",children:[{type:"heading",title:"v0.1.0",url:"/docs/What's-New",id:"v0.1.0"},{type:"heading",title:"v0.2.0",url:"/docs/What's-New",id:"v0.2.0"},{type:"heading",title:"v0.3.0",url:"/docs/What's-New",id:"v0.3.0"},{type:"heading",title:"v0.4.0",url:"/docs/What's-New",id:"v0.4.0"},{type:"heading",title:"v0.4.1",url:"/docs/What's-New",id:"v0.4.1"},{type:"heading",title:"v0.5.0",url:"/docs/What's-New",id:"v0.5.0"}]},{title:"Get Started",url:"/docs/Get-Started",children:[{type:"heading",title:"Architecture",url:"/docs/Get-Started",id:"Architecture"},{type:"heading",title:"Xline In 5 Minutes",url:"/docs/Get-Started",id:"Xline-In-5-Minutes"}]},{title:"Deploy",url:"/docs/Deploy",children:[{type:"heading",title:"Install",url:"/docs/Deploy",id:"Install"}]},{title:"Develop",url:"/docs/Develop",children:[{type:"heading",title:"Xline API",url:"/docs/Develop",id:"Xline-API"}]},{title:"Reference",url:"/docs/Xline-Architecture-Details",children:[{type:"article",title:"Xline Architecture Details",url:"/docs/Xline-Architecture-Details"},{type:"article",title:"Performance Comparison",url:"/docs/Performance-Comparison"}]}],G3=[{title:"Consensus",url:"/deep-dive/Consensus",children:[{type:"heading",title:"Basic Concept",url:"/deep-dive/Consensus",id:"Basic-Concept"},{type:"heading",title:"Consensus Protocol",url:"/deep-dive/Consensus",id:"Consensus-Protocol"}]},{title:"KV Engine",url:"/deep-dive/Key-value-Engine",children:[{type:"heading",title:"Metrics",url:"/deep-dive/Key-value-Engine",id:"Metrics"},{type:"heading",title:"LSM Tree And B-Tree",url:"/deep-dive/Key-value-Engine",id:"LSM-Tree-And-B-Tree"}]},{title:"RPC",url:"/deep-dive/Remote-Procedure-Calls-(RPC)",children:[{type:"heading",title:"Remote Procedure Call (RPC)",url:"/deep-dive/Remote-Procedure-Calls-(RPC)"}]},{title:"Test",url:"/deep-dive/Testing",children:[{type:"heading",title:"Unit Testing",url:"/deep-dive/Testing",id:"Unit-Testing"},{type:"heading",title:"Mock Testing",url:"/deep-dive/Testing",id:"Mock-Testing"},{type:"heading",title:"Integration Testing",url:"/deep-dive/Testing",id:"Integration-Testing"},{type:"heading",title:"Validation Testing",url:"/deep-dive/Testing",id:"Validation-Testing"}]}],SC="/xline-home/assets/footer-background-8643bf7b.svg",_C="/xline-home/assets/discord-icon-7417d9bb.svg",EC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAuCAYAAACh8K6vAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANFSURBVHgB7Zs/axRBGId/s7N7t8YoKtqkUjSlKOQ7iNqInZ0gUcFWBK3UQkXUQksLO8HCNDYBxS+gnWAZSCEiqFFMJJvb3Xl99yRkY+YMcznmz2Yf2LvNuzebvWcnM+/OTIAWJwhY4kePjkcKEyZl4hjUIZQwpCcgi8Lsu5UCn/Z1xQdYIoYlpMIVIXDRpIxQvA1xhaIAIsMqJQiz/HYalojQ4oRWvCNa8Y5oxTvCWuc6CCI84H5wXnswwm5+vcrb/lpUcZmH3BnODTpnqSAxIGPj7GUPH7wDxzgXH0d4OdYR7wYdz3N6LyReYE1+xErPFjlOpamYgyFfiSZkz71475uaJBFvqcQ53v22GuOqPCk7mM0yOoxACaKNb6L8YDrXpskPKqtpkvzg0smmyA8yj2+CfGvpZDdBorvLLOwyEaeMgjNzA/ryiY7yblqPx10scDzh8+W6cuNcNI71F2ITe3k8KSEi7R/YBX7g4YciumQqnz//RRfPS3rMNf+JLs/Pskzs6qYbLw928aOpEZhm+U9Z/mjqnfjb7PD5DsBT/GnjRyy/avNL6svfCw/xq3Mddc0Hplj+Gx/lOxfPbevsusA2ke9evMAtHm28vy64VfklHqGWasJD+V40NYkU13Xyecr1Loagluf/rIX78jsy9UK+N228Vj7hJIakkg+Fad4tauGpbowZeIBXnatW/haIYzHD8quaX5d/CB7g3ZCBJfnO8XKsZjvI93aQrJKfK9zEiKjk52W/z1iGB1gbqykQFaQ2xpUcXCaNxStOAQ9ysfP1eFnicyLxjMdqjJb37eAON8vpDGdMr/89RpYHa6yJLwsopcnKpfp/OZY7z4Ne/LZW+6uxtkJhkm/KDVP5izE+pr2Ncdviw5hzlaJ6yLpdj/GNuMby77F8iQAJZ861YfLDmnNtkPzw5lwbIj/MOdcGyA920Wro8p2vnSwIz3+t0ILuWByBOnLTf8VZ4a27+kMlf7nACT7nivbTPXhxU5yL59T+yMCDw+bWhGOWFw0Y066Pd0Qr3hGteEdYa+O5zc345bdpIUbBnMh0ZZioul2LWOuDOMUbW1rCThgyPm4ufrFKbpbMvlv1e3jA7TtaWlpamsMfwGp0UFDsZm0AAAAASUVORK5CYII=",TC="/xline-home/assets/cncf-logo-text-9f32c1ea.png",CC=P.footer` + background-image: url(${SC}); + background-size: cover; +`,AC=P.div` + max-width: 1440px; + margin-inline: auto; + padding-inline: 128px; + padding-block: 64px; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 48px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 32px; + } +`,NC=P.div` + display: flex; + flex-wrap: wrap; + justify-content: space-around; +`,ru=P.div` + margin-inline: 32px; + margin-bottom: 48px; + color: white; + width: 200px; + @media screen and (max-width: 1024px) { + margin-inline: 24px; + margin-bottom: 36px; + } + @media screen and (max-width: 768px) { + margin-inline: 16px; + margin-bottom: 24px; + } +`,iu=P.h2` + padding-bottom: 32px; + margin-bottom: 32px; + font-weight: 500; + font-size: 28px; + text-transform: capitalize; + border-bottom: 1px solid white; + cursor: default; + @media screen and (max-width: 1024px) { + font-size: 21px; + padding-bottom: 24px; + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + font-size: 14px; + padding-bottom: 16px; + margin-bottom: 16px; + } +`,au=P.ul``,Es=P.li` + margin-bottom: 28px; + font-weight: 400; + font-size: 22px; + text-transform: capitalize; + cursor: pointer; + @media screen and (max-width: 1024px) { + margin-bottom: 21px; + font-size: 16.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 14px; + font-size: 11px; + } +`,MC=P.div` + padding-bottom: 48px; + display: flex; + align-items: center; + @media screen and (max-width: 1024px) { + padding-bottom: 36px; + } + @media screen and (max-width: 768px) { + padding-bottom: 24px; + } +`,RC=P.img` + height: 48px; + cursor: pointer; + @media screen and (max-width: 1024px) { + height: 34px; + } + @media screen and (max-width: 768px) { + height: 22px; + } + @media screen and (max-width: 320px) { + height: 18px; + } +`,OC=P.div` + flex: 1; +`,xm=P.div` + display: flex; + align-items: center; + height: 32px; + margin-left: 32px; + color: white; + cursor: pointer; + @media screen and (max-width: 1024px) { + height: 24px; + margin-left: 24px; + } + @media screen and (max-width: 768px) { + height: 16px; + margin-left: 16px; + } +`,wv=P.img` + height: 100%; + margin-right: 16px; + @media screen and (max-width: 1024px) { + margin-right: 12px; + } + @media screen and (max-width: 768px) { + margin-right: 8px; + } +`,xv=P.p` + font-weight: 600; + font-size: 24px; + line-height: 1; + @media screen and (max-width: 1024px) { + font-size: 18px; + } + @media screen and (max-width: 768px) { + font-size: 12px; + } +`,IC=P.div` + margin-left: -4%; + width: 108%; + padding-top: 32px; + + color: #fff; + border-top: 1px solid #fff; +`,kv=P.div` + padding-bottom: 16px; + text-align: center; + font-weight: 600; + font-size: 18px; + line-height: 1; + &:last-child { + padding-bottom: 0; + } + @media screen and (max-width: 1024px) { + padding-bottom: 12px; + font-size: 13.5px; + } + @media screen and (max-width: 768px) { + padding-bottom: 8px; + font-size: 9px; + } +`,DC=P(xm)` + cursor: default; +`,LC=P.img` + height: 100%; +`,PC=P.img` + height: 100%; +`,zC=()=>{const e=ji();return S.jsx(S.Fragment,{children:S.jsx(CC,{children:S.jsxs(AC,{children:[S.jsxs(NC,{children:[S.jsxs(ru,{children:[S.jsx(iu,{children:"docs"}),S.jsx(au,{children:K3.map(({title:t,url:n})=>S.jsx(Es,{onClick:()=>{e(n),window.scrollTo(0,0)},children:t},t))})]}),S.jsxs(ru,{children:[S.jsx(iu,{children:"deep dive"}),S.jsx(au,{children:G3.map(({title:t,url:n})=>S.jsx(Es,{onClick:()=>{e(n),window.scrollTo(0,0)},children:t},t))})]}),S.jsxs(ru,{children:[S.jsx(iu,{children:"community"}),S.jsxs(au,{children:[S.jsx(Es,{onClick:()=>{e("/contribute"),window.scrollTo(0,0)},children:"contribute"}),S.jsx(Es,{onClick:()=>window.location.href="https://discord.gg/XyFXGpSfvb",children:"chat"})]})]}),S.jsxs(ru,{children:[S.jsx(iu,{children:"resources"}),S.jsxs(au,{children:[S.jsx(Es,{onClick:()=>{e("/blog"),window.scrollTo(0,0)},children:"blog"}),S.jsx(Es,{onClick:()=>{e("/video"),window.scrollTo(0,0)},children:"video"})]})]})]}),S.jsxs(MC,{children:[S.jsx(RC,{src:d1,alt:"Xline",onClick:()=>{window.scrollTo(0,0),e("/")}}),S.jsx(OC,{}),S.jsxs(DC,{children:[S.jsx(LC,{src:EC}),S.jsx(PC,{src:TC})]}),S.jsxs(xm,{as:"a",href:"https://github.com/datenlord/xline",children:[S.jsx(wv,{src:Y3,alt:"icon"}),S.jsx(xv,{children:"GitHub"})]}),S.jsxs(xm,{as:"a",href:"https://discord.gg/XyFXGpSfvb",children:[S.jsx(wv,{src:_C,alt:"icon"}),S.jsx(xv,{children:"Discord"})]})]}),S.jsxs(IC,{children:[S.jsx(kv,{children:"We are a Cloud Native Computing Foundation sandbox project."}),S.jsx(kv,{children:"Xline for The Linux Foundation®"})]})]})})})},BC=()=>S.jsxs(S.Fragment,{children:[S.jsx(kC,{}),S.jsx(ME,{}),S.jsx(zC,{})]}),FC="/xline-home/assets/home-cover-d1b85aac.png",Ra="/xline-home/assets/underline-992439df.svg",$C="/xline-home/assets/home-introduction-7de62c15.png",UC="/xline-home/assets/home-feature-e6cc5478.png",jC="/xline-home/assets/home-feature-icon-1-633a0944.svg",qC="/xline-home/assets/home-feature-icon-2-f72f9c54.svg",HC="/xline-home/assets/home-feature-icon-3-f98e76a4.svg",WC="/xline-home/assets/home-feature-icon-4-25befa9a.svg",VC="/xline-home/assets/home-innovation-48569455.svg",YC=P.div` + background-image: url(${FC}); + background-size: cover; +`,KC=P.div` + max-width: 1440px; + margin-inline: auto; + padding-top: calc(86px + 134px); + padding-bottom: 96px; + padding-inline: 156px; + color: white; + @media screen and (max-width: 1024px) { + padding-top: calc(69px + 100px); + padding-bottom: 72px; + padding-inline: 117px; + } + @media screen and (max-width: 768px) { + padding-top: calc(53px + 67px); + padding-bottom: 48px; + padding-inline: 78px; + } +`,GC=P.img` + width: 346px; + height: 100px; + margin-bottom: 36px; + @media screen and (max-width: 1024px) { + width: 225px; + height: 65px; + margin-bottom: 28px; + } + @media screen and (max-width: 786px) { + width: 104px; + height: 30px; + margin-bottom: 24px; + } +`,XC=P.h1` + max-width: 90%; + margin-bottom: 32px; + font-weight: 500; + font-size: 39px; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + font-size: 28.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + font-size: 19px; + } +`,QC=P.button` + display: flex; + align-items: center; + height: 56px; + padding-inline: 48px; + color: ${e=>e.theme.color.white}; + font-size: 26px; + text-transform: capitalize; + background: linear-gradient( + 90deg, + hsla(270, 50%, 60%, 1), + hsla(257, 97%, 73%, 1) 50%, + hsla(266, 87%, 75%, 1) + ); + border: none; + border-radius: 50vh; + cursor: pointer; + @media screen and (max-width: 1024px) { + height: 42px; + padding-inline: 36px; + font-size: 19.5px; + } + @media screen and (max-width: 768px) { + height: 28px; + padding-inline: 24px; + font-size: 13px; + } +`,ZC=P.div` + background: hsl(210, 20%, 98%); +`,JC=P.div` + /* display: flex; */ + max-width: 1440px; + margin-inline: auto; + padding-block: ${({theme:e})=>e.scale.xxl}; + padding-inline: 96px; + @media screen and (max-width: 1024px) { + padding-block: 96px; + padding-inline: 72px; + } + @media screen and (max-width: 768px) { + padding-block: 64px; + padding-inline: 48px; + } +`,eA=P.img` + float: right; + width: 40%; + margin-left: 40px; + margin-bottom: 40px; + object-fit: contain; + @media screen and (max-width: 1024px) { + margin-left: 30px; + margin-bottom: 30px; + } + @media screen and (max-width: 768px) { + margin-left: 20px; + margin-bottom: 20px; + } + @media screen and (max-width: 425px) { + width: 100%; + margin-left: 0px; + } +`,tA=P.div``,nA=P.p` + margin-bottom: ${({theme:e})=>e.scale.md}; + font-weight: 400; + font-size: 20px; + line-height: 1.6; + @media screen and (max-width: 1024px) { + font-size: 15px; + } + @media screen and (max-width: 768px) { + font-size: 10px; + } +`,rA=P.ul` + padding-left: ${({theme:e})=>e.scale.lg}; + @media screen and (max-width: 1024px) { + padding-left: 48px; + } + @media screen and (max-width: 768px) { + padding-left: 32px; + } +`,vf=P.li` + position: relative; + margin-bottom: ${({theme:e})=>e.scale.sm}; + font-weight: 400; + font-size: 20px; + line-height: 1.7; + @media screen and (max-width: 1024px) { + font-size: 15px; + } + @media screen and (max-width: 768px) { + font-size: 10px; + } + ::before { + content: ''; + position: absolute; + left: -48px; + top: 4px; + height: 32px; + width: 32px; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 50%; + @media screen and (max-width: 1024px) { + left: -36px; + top: 3px; + width: 24px; + height: 24px; + } + @media screen and (max-width: 768px) { + left: -24px; + top: 2px; + width: 16px; + height: 16px; + } + } +`,iA=P.div``,aA=P.div` + display: flex; + /* align-items: center; */ + max-width: 1440px; + margin-inline: auto; + padding-block: ${({theme:e})=>e.scale.xxl}; + padding-inline: 96px; + @media screen and (max-width: 1440px) { + flex-direction: column; + } + @media screen and (max-width: 1024px) { + padding-block: 96px; + padding-inline: 72px; + } + @media screen and (max-width: 768px) { + padding-block: 64px; + padding-inline: 48px; + } +`,sA=P.div` + flex-shrink: 0; + width: 25%; + margin-right: 48px; + @media screen and (max-width: 1440px) { + width: 100%; + margin-right: 0; + margin-bottom: 16px; + } +`,oA=P.h2` + position: relative; + margin-top: 104px; + margin-bottom: 96px; + font-weight: 700; + font-size: 44px; + line-height: 1.4; + @media screen and (max-width: 1440px) { + margin-top: 0; + margin-bottom: 0px; + text-align: center; + } + @media screen and (max-width: 1024px) { + font-size: 36px; + } + @media screen and (max-width: 768px) { + font-size: 24px; + } + /* ::after { + content: ''; + z-index: -1; + position: absolute; + bottom: 0; + right: 50px; + display: inline-block; + width: 250px; + height: 30px; + background-image: url(${Ra}); + background-repeat: no-repeat; + background-size: contain; + } */ +`,lA=P.img` + display: block; + margin-inline: auto; + width: 100%; + @media screen and (max-width: 1440px) { + width: 30%; + } +`,cA=P.div` + display: flex; + justify-content: space-between; + align-content: space-between; + flex: 1; + flex-flow: wrap; +`,su=P.div` + width: 48%; + padding: 16px; + @media screen and (max-width: 425px) { + width: 100%; + } +`,ou=P.div` + display: flex; + align-items: center; + justify-content: center; + width: 102px; + height: 102px; + margin-bottom: 32px; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 24px; + @media screen and (max-width: 1024px) { + width: 76.5px; + height: 76.5px; + margin-bottom: 24px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + width: 51px; + height: 51px; + margin-bottom: 16px; + border-radius: 12px; + } +`,lu=P.img` + width: 50%; + height: 50%; +`,cu=P.h3` + margin-bottom: 16px; + font-weight: 500; + font-size: 28px; + line-height: 1.2; + @media screen and (max-width: 1024px) { + font-size: 21px; + margin-bottom: 12px; + } + @media screen and (max-width: 768px) { + font-size: 14px; + margin-bottom: 8px; + } +`,uu=P.p` + font-weight: 400; + font-size: 16px; + line-height: 1.5; + color: hsla(0, 0%, 0%, 0.6); + @media screen and (max-width: 1024px) { + font-size: 12px; + line-height: 1.3; + } + @media screen and (max-width: 768px) { + font-size: 8px; + line-height: 1.1; + } +`,uA=P.div` + background: #f9fafb; +`,dA=P.div` + display: flex; + max-width: 1440px; + margin-inline: auto; + padding-block: ${({theme:e})=>e.scale.xxl}; + padding-inline: 96px; + @media screen and (max-width: 1440px) { + flex-direction: column; + } + @media screen and (max-width: 1024px) { + padding-block: 96px; + padding-inline: 72px; + } + @media screen and (max-width: 768px) { + padding-block: 64px; + padding-inline: 48px; + } +`,hA=P.div` + flex-shrink: 0; + width: 25%; + margin-right: 48px; + @media screen and (max-width: 1440px) { + width: 100%; + margin-right: 0; + margin-bottom: 16px; + } +`,fA=P.div` + text-align: center; +`,pA=P.div` + display: inline-block; + position: relative; + width: 100%; + /* height: 70px; */ + margin-inline: auto; + margin-top: 72px; + margin-bottom: 48px; + font-weight: 700; + font-size: 44px; + line-height: 1.4; + /* background-image: url(${Ra}); + background-repeat: no-repeat; + background-position: bottom 0 right 0; */ + @media screen and (max-width: 1440px) { + margin-top: 0; + margin-bottom: 0; + } + @media screen and (max-width: 1024px) { + font-size: 36px; + } + @media screen and (max-width: 768px) { + font-size: 24px; + } +`,mA=P.img` + display: block; + position: relative; + left: 16px; + width: 100%; + margin-inline: auto; + object-fit: contain; + @media screen and (max-width: 1440px) { + left: 12px; + width: 30%; + } +`,gA=P.div` + flex: 1; + padding: 48px; + height: min-content; + background: white; + border-radius: 24px; + @media screen and (max-width: 1024px) { + padding: 36px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + padding: 24px; + border-radius: 12px; + } +`,wf=P.p` + margin-bottom: 32px; + font-weight: 400; + font-size: 18px; + line-height: 1.4; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + font-size: 13.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + font-size: 9px; + } +`,yA=()=>{const e=ji();return S.jsxs(S.Fragment,{children:[S.jsx(YC,{children:S.jsxs(KC,{children:[S.jsx(GC,{src:d1,alt:"Xline"}),S.jsx(XC,{children:"A High-Performance Geo-distributed Metadata Management System"}),S.jsx(QC,{onClick:()=>e("/docs/Get-Started"),children:"get start"})]})}),S.jsx(ZC,{children:S.jsxs(JC,{children:[S.jsx(eA,{src:$C,alt:"Image"}),S.jsxs(tA,{children:[S.jsx(nA,{children:"Data isolation and data fragmentation resulting from cloud barriers have become impediments to business growth. The biggest challenge of multi-data center architecture is how to maintain strong data consistency and ensure high performance. Traditional single-data center solutions cannot meet the availability, performance, and consistency requirements of multi-data center scenarios."}),S.jsxs(rA,{children:[S.jsx(vf,{children:"Xline is a distributed KV storage for metadata management. Xline makes it possible to manage metadata, such as indexes, permissions, and configurations across multiple clusters."}),S.jsx(vf,{children:"Xline can achieve high-performance data access and strong consistency in cross data center scenarios."}),S.jsx(vf,{children:"Xline is compatible with the ETCD interface, so that existing ETCD users can seamlessly switch to Xline and get high-performance metadata management across multiple clusters."})]})]})]})}),S.jsx(iA,{children:S.jsxs(aA,{children:[S.jsxs(sA,{children:[S.jsx(oA,{children:"Key Features of Xline"}),S.jsx(lA,{src:UC,alt:"Image"})]}),S.jsxs(cA,{children:[S.jsxs(su,{children:[S.jsx(ou,{children:S.jsx(lu,{src:jC,alt:"icon"})}),S.jsx(cu,{children:"A distributed KV storage engine for multi-cluster"}),S.jsx(uu,{children:"Unified data management for multi-cluster scenarios, making mutual access, discovery, and modification simple and convenient."})]}),S.jsxs(su,{children:[S.jsx(ou,{children:S.jsx(lu,{src:qC,alt:"icon"})}),S.jsx(cu,{children:"A unified metadata management system"}),S.jsx(uu,{children:"Data access across clouds by caching hot data in memory, and provide unified data management to automate data migration and backup."})]}),S.jsxs(su,{children:[S.jsx(ou,{children:S.jsx(lu,{src:HC,alt:"icon"})}),S.jsx(cu,{children:"A high-performance multi-datacenter consensus protocol"}),S.jsx(uu,{children:"It is the first geo distributed consistency management service based on the WAN consensus protocol. It addresses the challenges of convergence and consistency across clouds."})]}),S.jsxs(su,{children:[S.jsx(ou,{children:S.jsx(lu,{src:WC,alt:"icon"})}),S.jsx(cu,{children:"Compatible with the ETCD interface"}),S.jsx(uu,{children:"Provide KV interface, Multi-Version Concurrency Control and is compatible with K8S."})]})]})]})}),S.jsx(uA,{children:S.jsxs(dA,{children:[S.jsxs(hA,{children:[S.jsx(fA,{children:S.jsx(pA,{children:"Innovation"})}),S.jsx(mA,{src:VC,alt:"image"})]}),S.jsxs(gA,{children:[S.jsx(wf,{children:"Cross-datacenter network latency is the most important factor that impacts the performance of geo-distributed systems, especially when a consensus protocol is used. As is well known, consensus protocols are frequently used to achieve high availability. For instance, Etcd uses the Raft protocol, which is quite popular in recently developed systems."}),S.jsx(wf,{children:"Although Raft is stable and easy to implement, it takes 2 RTTs to complete a consensus request from the view of a client. One RTT takes place between the client and the leader server, and the leader server takes another RTT to broadcast the message to the follower servers. In a geo-distributed environment where an RTT can run from tens to hundreds of milliseconds, two RTTs would be too expensive."}),S.jsx(wf,{children:"We adopt a new consensus protocol named CURP to resolve the above issue. Please refer to the paper for a detailed description. The main benefit of the protocol is reducing 1 RTT when contention is not too high. As far as we know, Xline is the first product to use CURP."})]})]})})]})},bA="/xline-home/assets/contribute-cover-754f3436.svg",vA="/xline-home/assets/contribute-how-f55a255f.svg",wA="/xline-home/assets/protocol-icon-f31ce54b.svg",xA="/xline-home/assets/sever-icon-1e1bff49.svg",du=P.div` + text-align: center; + margin-bottom: 24px; + @media screen and (max-width: 1024px) { + margin-bottom: 18px; + } + @media screen and (max-width: 768px) { + margin-bottom: 12px; + } +`,hu=P.div` + display: inline-block; + position: relative; + margin-inline: auto; + font-weight: 700; + font-size: 46px; + line-height: 2; + background-image: url(${Ra}); + background-repeat: no-repeat; + background-position: bottom 0 right 0; + background-size: 50%; + @media screen and (max-width: 1024px) { + font-size: 34.5px; + line-height: 1.3; + } + @media screen and (max-width: 768px) { + font-size: 23px; + } +`,Sv=P.p` + text-align: center; + margin-bottom: 48px; + font-weight: 500; + font-size: 28px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + margin-bottom: 36px; + font-size: 21px; + } + @media screen and (max-width: 768px) { + margin-bottom: 24px; + font-size: 14px; + } +`,kA=P.div` + display: flex; + align-items: center; + padding-block: calc(160px + 86px); + color: white; + background-image: url(${bA}); + background-repeat: no-repeat; + background-size: cover; + @media screen and (max-width: 1024px) { + padding-block: calc(120px + 69px); + } + @media screen and (max-width: 768px) { + padding-block: calc(80px + 53px); + } +`,SA=P.div` + width: 100%; + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: 128px; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + } +`,_A=P.h1` + margin-bottom: 20px; + font-weight: 700; + font-size: 72px; + line-height: 80px; + text-transform: capitalize; + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 54px; + line-height: 60px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 36px; + line-height: 40px; + } +`,EA=P.p` + font-weight: 500; + font-size: 30px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + font-size: 22.5px; + } + @media screen and (max-width: 768px) { + font-size: 22.5px; + } +`,TA=P.div``,CA=P.div` + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: 128px; + padding-block: 80px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 60px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 40px; + } +`,AA=P.div` + display: flex; + align-items: center; + text-align: left; + @media screen and (max-width: 768px) { + flex-direction: column; + } +`,NA=P.p` + height: min-content; + padding: ${e=>e.theme.scale.scale06}; + background: #f9fafb; + font-weight: 600; + font-size: 28px; + line-height: 1.5; + border-radius: 24px; + @media screen and (max-width: 1024px) { + padding: 60px; + font-size: 21px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + padding: 40px; + font-size: 14px; + border-radius: 12px; + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + padding: 20px; + } +`,MA=P.img` + width: 40%; + @media screen and (max-width: 425px) { + width: 70%; + } +`,RA=P.div` + background: #f9fafb; +`,OA=P.div` + width: 100%; + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: 128px; + padding-block: ${e=>e.theme.scale.scale06}; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 60px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 40px; + } +`,IA=P.div` + display: flex; + justify-content: space-between; + @media screen and (max-width: 768px) { + flex-direction: column; + } +`,_v=P.div` + display: flex; + flex-flow: column; + align-items: center; + width: 48%; + padding: 64px; + background: #fff; + box-shadow: 0px 2px 15px -4px rgba(0, 0, 0, 0.11); + border-radius: 24px; + @media screen and (max-width: 1024px) { + padding: 48px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + padding: 32px; + border-radius: 12px; + width: 100%; + margin-bottom: 24px; + :last-child { + margin-bottom: 0; + } + } +`,Ev=P.img` + width: 54px; + margin-bottom: 32px; + @media screen and (max-width: 1024px) { + width: 40.5px; + } + @media screen and (max-width: 768px) { + width: 27px; + } +`,Tv=P.h3` + margin-bottom: 32px; + font-weight: 500; + font-size: 28px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + font-size: 21px; + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + font-size: 14px; + margin-bottom: 16px; + } +`,Cv=P.p` + font-weight: 400; + font-size: 18px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + font-size: 13.5px; + } + @media screen and (max-width: 768px) { + font-size: 9px; + } +`,DA=P.div``,LA=P.div` + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: ${e=>e.theme.scale.scale07}; + padding-block: ${e=>e.theme.scale.scale06}; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 60px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 40px; + } +`,PA=P.div` + padding: 64px; + background: #f9fafb; + border-radius: 24px; + text-align: left; + @media screen and (max-width: 1024px) { + padding: 48px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + padding: 32px; + border-radius: 12px; + } +`,zA=P.p` + font-weight: 400; + font-size: 22px; + line-height: 1.6; + @media screen and (max-width: 1024px) { + font-size: 16.5px; + } + @media screen and (max-width: 768px) { + font-size: 11px; + } +`,BA=P.ul` + list-style-type: disc; + padding-left: 2em; +`,Ts=P.li` + font-weight: 400; + font-size: 22px; + line-height: 1.6; + @media screen and (max-width: 1024px) { + font-size: 16.5px; + } + @media screen and (max-width: 768px) { + font-size: 11px; + } +`,FA=P.div` + background: #f9fafb; +`,$A=P.div` + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: ${e=>e.theme.scale.scale07}; + padding-block: ${e=>e.theme.scale.scale06}; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 60px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 40px; + } +`,UA=P.p` + text-align: center; + font-weight: 500; + font-size: 28px; + line-height: 1.5; + margin-bottom: 256px; + @media screen and (max-width: 1024px) { + margin-bottom: 192px; + font-size: 21px; + } + @media screen and (max-width: 768px) { + margin-bottom: 128px; + font-size: 14px; + } +`,jA=()=>S.jsxs(S.Fragment,{children:[S.jsx(kA,{children:S.jsxs(SA,{children:[S.jsx(_A,{children:"contribute"}),S.jsx(EA,{children:"As an open-source project, Xline cannot grow without the support and participation of contributors from the community. If you would like to contribute to this project, be it Xline's code, documentation, or even our website, we would appreciate your help. We are glad to provide any support along the way."})]})}),S.jsx(TA,{children:S.jsxs(CA,{children:[S.jsx(du,{children:S.jsx(hu,{children:"How to be a contributor?"})}),S.jsxs(AA,{children:[S.jsx(NA,{children:"As soon as a PR(Pull Request) proposed by you is approved and merged, you can become an Xline contributor!"}),S.jsx(MA,{src:vA,alt:"image"})]})]})}),S.jsx(RA,{children:S.jsxs(OA,{children:[S.jsx(du,{children:S.jsx(hu,{children:"Pick an area to contribute"})}),S.jsx(Sv,{children:"You can choose one of the following areas to contribute to:"}),S.jsxs(IA,{children:[S.jsxs(_v,{children:[S.jsx(Ev,{src:wA,alt:"icon"}),S.jsx(Tv,{children:"CURP Protocol"}),S.jsx(Cv,{children:"The CURP distributed consensus algorithm implemented in Rust. Read Contribute to Xline for details on how to make contributions to the CURP code base."})]}),S.jsxs(_v,{children:[S.jsx(Ev,{src:xA,alt:"icon"}),S.jsx(Tv,{children:"Xline Server"}),S.jsx(Cv,{children:"The Xline distributed KV storage backend implemented in Rust. Read Contribute to Xline for details on how to make contributions to the CURP code base."})]})]})]})}),S.jsx(DA,{children:S.jsxs(LA,{children:[S.jsx(du,{children:S.jsx(hu,{children:"Find an issue to work on"})}),S.jsx(Sv,{children:"For beginners, we have prepared many suitable tasks for you. You can check out, for example, our Help Wanted issues in the repository."}),S.jsxs(PA,{children:[S.jsx(zA,{children:"See below for some commonly used labels across major repositories listed in:"}),S.jsxs(BA,{children:[S.jsx(Ts,{children:"bug - Indicates an unexpected problem or unintended behavior; it can be small or big in scope"}),S.jsx(Ts,{children:"good first issue - An ideal first issue to work on for first-time contributors, with mentoring available"}),S.jsx(Ts,{children:"help wanted - Indicates that a maintainer wants help on an issue or pull request"}),S.jsx(Ts,{children:"discussion - Status: Under discussion or needs discussion"}),S.jsx(Ts,{children:"enhancement - New feature or request"}),S.jsx(Ts,{children:"question - Further information is requested, or the question is to be answered."})]})]})]})}),S.jsx(FA,{children:S.jsxs($A,{children:[S.jsx(du,{children:S.jsx(hu,{children:"Ask a question"})}),S.jsxs(UA,{children:["If you need any help to get started, understand the codebase, or make a PR(or anything else really), please feel free to ask us on",S.jsx("a",{href:"https://discord.gg/8PrRCP3s",children:" Discord"}),"."]})]})})]}),Av=["http","https","mailto","tel"];function qA(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++ii||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */var HA=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};const X3=HA;function _l(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Nv(e.position):"start"in e||"end"in e?Nv(e):"line"in e||"column"in e?km(e):""}function km(e){return Mv(e&&e.line)+":"+Mv(e&&e.column)}function Nv(e){return km(e&&e.start)+"-"+km(e&&e.end)}function Mv(e){return e&&typeof e=="number"?e:1}class wr extends Error{constructor(t,n,r){const i=[null,null];let a={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const s=r.indexOf(":");s===-1?i[1]=r:(i[0]=r.slice(0,s),i[1]=r.slice(s+1))}n&&("type"in n||"position"in n?n.position&&(a=n.position):"start"in n||"end"in n?a=n:("line"in n||"column"in n)&&(a.start=n)),this.name=_l(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=a.start.line,this.column=a.start.column,this.position=a,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}wr.prototype.file="";wr.prototype.name="";wr.prototype.reason="";wr.prototype.message="";wr.prototype.stack="";wr.prototype.fatal=null;wr.prototype.column=null;wr.prototype.line=null;wr.prototype.source=null;wr.prototype.ruleId=null;wr.prototype.position=null;const Kr={basename:WA,dirname:VA,extname:YA,join:KA,sep:"/"};function WA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');vc(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.charCodeAt(i)===t.charCodeAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function VA(e){if(vc(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function YA(e){vc(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.charCodeAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function KA(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function XA(e,t){let n="",r=0,i=-1,a=0,s=-1,o,l;for(;++s<=e.length;){if(s2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function vc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QA={cwd:ZA};function ZA(){return"/"}function Sm(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function JA(e){if(typeof e=="string")e=new URL(e);else if(!Sm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return eN(e)}function eN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n"u"||Gu.call(t,i)},zv=function(t,n){Iv&&n.name==="__proto__"?Iv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Bv=function(t,n){if(n==="__proto__")if(Gu.call(t,n)){if(Dv)return Dv(t,n).value}else return;return t[n]},Fv=function e(){var t,n,r,i,a,s,o=arguments[0],l=1,c=arguments.length,u=!1;for(typeof o=="boolean"&&(u=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});ls.length;let l;o&&s.push(i);try{l=e.apply(this,s)}catch(c){const u=c;if(o&&n)throw u;return i(u)}o||(l instanceof Promise?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const iN=e6().freeze(),J3={}.hasOwnProperty;function e6(){const e=nN(),t=[];let n={},r,i=-1;return a.data=s,a.Parser=void 0,a.Compiler=void 0,a.freeze=o,a.attachers=t,a.use=l,a.parse=c,a.stringify=u,a.run=d,a.runSync=f,a.process=p,a.processSync=m,a;function a(){const h=e6();let w=-1;for(;++w{if(E||!R||!B)A(E);else{const q=a.stringify(R,B);q==null||(oN(q)?B.value=q:B.result=q),A(E,B)}});function A(E,R){E||!R?x(E):v?v(R):w(null,R)}}}function m(h){let w;a.freeze(),_f("processSync",a.Parser),Ef("processSync",a.Compiler);const y=nl(h);return a.process(y,v),jv("processSync","process",w),y;function v(x){w=!0,Ov(x)}}}function $v(e,t){return typeof e=="function"&&e.prototype&&(aN(e.prototype)||t in e.prototype)}function aN(e){let t;for(t in e)if(J3.call(e,t))return!0;return!1}function _f(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Ef(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Tf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Uv(e){if(!_m(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function nl(e){return sN(e)?e:new Q3(e)}function sN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oN(e){return typeof e=="string"||X3(e)}function lN(e,t){const n=(t||{}).includeImageAlt;return t6(e,typeof n=="boolean"?n:!0)}function t6(e,t){return cN(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&qv(e.children,t))||Array.isArray(e)&&qv(e,t)||""}function qv(e,t){const n=[];let r=-1;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),[].splice.apply(e,s);else for(n&&[].splice.apply(e,[t,n]);a0?(Xn(e,e.length,0,t),e):t}const Hv={}.hasOwnProperty;function n6(e){const t={};let n=-1;for(;++ns))return;const R=t.events.length;let B=R,q,G;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(q){G=t.events[B][1].end;break}q=!0}for(y(r),E=R;Ex;){const A=n[_];t.containerState=A[1],A[0].exit.call(t,e)}n.length=x}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function vN(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bd(e){if(e===null||Qt(e)||H0(e))return 1;if(W0(e))return 2}function V0(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[r][1].end),f=Object.assign({},e[n][1].start);Yv(d,-l),Yv(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},o={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=sr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=sr(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=sr(c,V0(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=sr(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=sr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Xn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n=4?s(c):n(c)}function s(c){return c===null?l(c):Me(c)?e.attempt(RN,s,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Me(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function IN(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Me(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):it(e,a,"linePrefix",4+1)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):Me(s)?i(s):n(s)}}const DN={name:"codeText",tokenize:zN,resolve:LN,previous:PN};function LN(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function o6(e,t,n,r,i,a,s,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),f):y===null||y===41||Ql(y)?n(y):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),h(y))}function f(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(o),f(y)):y===null||y===60||Me(y)?n(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function h(y){return y===40?++u>c?n(y):(e.consume(y),h):y===41?u--?(e.consume(y),h):(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(y)):y===null||Qt(y)?u?n(y):(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(y)):Ql(y)?n(y):(e.consume(y),y===92?w:h)}function w(y){return y===40||y===41||y===92?(e.consume(y),h):h(y)}}function l6(e,t,n,r,i,a){const s=this;let o=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),u}function u(p){return p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs||o>999?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Me(p)||o++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l=l||!mt(p),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),o++,d):d(p)}}function c6(e,t,n,r,i,a){let s;return o;function o(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,l}function l(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),c(f))}function c(f){return f===s?(e.exit(a),l(s)):f===null?n(f):Me(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),it(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||Me(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===s||f===92?(e.consume(f),u):u(f)}}function El(e,t){let n;return r;function r(i){return Me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):mt(i)?it(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function zr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const HN={name:"definition",tokenize:VN},WN={tokenize:YN,partial:!0};function VN(e,t,n){const r=this;let i;return a;function a(l){return e.enter("definition"),l6.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(l)}function s(l){return i=zr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),l===58?(e.enter("definitionMarker"),e.consume(l),e.exit("definitionMarker"),El(e,o6(e,e.attempt(WN,it(e,o,"whitespace"),it(e,o,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(l)}function o(l){return l===null||Me(l)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(l)):n(l)}}function YN(e,t,n){return r;function r(s){return Qt(s)?El(e,i)(s):n(s)}function i(s){return s===34||s===39||s===40?c6(e,it(e,a,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s):n(s)}function a(s){return s===null||Me(s)?t(s):n(s)}}const KN={name:"hardBreakEscape",tokenize:GN};function GN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(a),i}function i(a){return Me(a)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(a)):n(a)}}const XN={name:"headingAtx",tokenize:ZN,resolve:QN};function QN(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function ZN(e,t,n){const r=this;let i=0;return a;function a(u){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&i++<6?(e.consume(u),s):u===null||Qt(u)?(e.exit("atxHeadingSequence"),r.interrupt?t(u):o(u)):n(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Me(u)?(e.exit("atxHeading"),t(u)):mt(u)?it(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||Qt(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const JN=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Xv=["pre","script","style","textarea"],eM={name:"htmlFlow",tokenize:rM,resolveTo:nM,concrete:!0},tM={tokenize:iM,partial:!0};function nM(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function rM(e,t,n){const r=this;let i,a,s,o,l;return c;function c(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),u}function u(C){return C===33?(e.consume(C),d):C===47?(e.consume(C),m):C===63?(e.consume(C),i=3,r.interrupt?t:V):lr(C)?(e.consume(C),s=String.fromCharCode(C),a=!0,h):n(C)}function d(C){return C===45?(e.consume(C),i=2,f):C===91?(e.consume(C),i=5,s="CDATA[",o=0,p):lr(C)?(e.consume(C),i=4,r.interrupt?t:V):n(C)}function f(C){return C===45?(e.consume(C),r.interrupt?t:V):n(C)}function p(C){return C===s.charCodeAt(o++)?(e.consume(C),o===s.length?r.interrupt?t:W:p):n(C)}function m(C){return lr(C)?(e.consume(C),s=String.fromCharCode(C),h):n(C)}function h(C){return C===null||C===47||C===62||Qt(C)?C!==47&&a&&Xv.includes(s.toLowerCase())?(i=1,r.interrupt?t(C):W(C)):JN.includes(s.toLowerCase())?(i=6,C===47?(e.consume(C),w):r.interrupt?t(C):W(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):a?v(C):y(C)):C===45||_n(C)?(e.consume(C),s+=String.fromCharCode(C),h):n(C)}function w(C){return C===62?(e.consume(C),r.interrupt?t:W):n(C)}function y(C){return mt(C)?(e.consume(C),y):q(C)}function v(C){return C===47?(e.consume(C),q):C===58||C===95||lr(C)?(e.consume(C),x):mt(C)?(e.consume(C),v):q(C)}function x(C){return C===45||C===46||C===58||C===95||_n(C)?(e.consume(C),x):_(C)}function _(C){return C===61?(e.consume(C),A):mt(C)?(e.consume(C),_):v(C)}function A(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),l=C,E):mt(C)?(e.consume(C),A):(l=null,R(C))}function E(C){return C===null||Me(C)?n(C):C===l?(e.consume(C),B):(e.consume(C),E)}function R(C){return C===null||C===34||C===39||C===60||C===61||C===62||C===96||Qt(C)?_(C):(e.consume(C),R)}function B(C){return C===47||C===62||mt(C)?v(C):n(C)}function q(C){return C===62?(e.consume(C),G):n(C)}function G(C){return mt(C)?(e.consume(C),G):C===null||Me(C)?W(C):n(C)}function W(C){return C===45&&i===2?(e.consume(C),Te):C===60&&i===1?(e.consume(C),I):C===62&&i===4?(e.consume(C),X):C===63&&i===3?(e.consume(C),V):C===93&&i===5?(e.consume(C),F):Me(C)&&(i===6||i===7)?e.check(tM,X,K)(C):C===null||Me(C)?K(C):(e.consume(C),W)}function K(C){return e.exit("htmlFlowData"),ue(C)}function ue(C){return C===null?N(C):Me(C)?e.attempt({tokenize:fe,partial:!0},ue,N)(C):(e.enter("htmlFlowData"),W(C))}function fe(C,Q,ne){return ge;function ge(Ee){return C.enter("lineEnding"),C.consume(Ee),C.exit("lineEnding"),$}function $(Ee){return r.parser.lazy[r.now().line]?ne(Ee):Q(Ee)}}function Te(C){return C===45?(e.consume(C),V):W(C)}function I(C){return C===47?(e.consume(C),s="",Y):W(C)}function Y(C){return C===62&&Xv.includes(s.toLowerCase())?(e.consume(C),X):lr(C)&&s.length<8?(e.consume(C),s+=String.fromCharCode(C),Y):W(C)}function F(C){return C===93?(e.consume(C),V):W(C)}function V(C){return C===62?(e.consume(C),X):C===45&&i===2?(e.consume(C),V):W(C)}function X(C){return C===null||Me(C)?(e.exit("htmlFlowData"),N(C)):(e.consume(C),X)}function N(C){return e.exit("htmlFlow"),t(C)}}function iM(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(wc,t,n)}}const aM={name:"htmlText",tokenize:sM};function sM(e,t,n){const r=this;let i,a,s,o;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),c}function c(N){return N===33?(e.consume(N),u):N===47?(e.consume(N),R):N===63?(e.consume(N),A):lr(N)?(e.consume(N),G):n(N)}function u(N){return N===45?(e.consume(N),d):N===91?(e.consume(N),a="CDATA[",s=0,w):lr(N)?(e.consume(N),_):n(N)}function d(N){return N===45?(e.consume(N),f):n(N)}function f(N){return N===null||N===62?n(N):N===45?(e.consume(N),p):m(N)}function p(N){return N===null||N===62?n(N):m(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),h):Me(N)?(o=m,F(N)):(e.consume(N),m)}function h(N){return N===45?(e.consume(N),X):m(N)}function w(N){return N===a.charCodeAt(s++)?(e.consume(N),s===a.length?y:w):n(N)}function y(N){return N===null?n(N):N===93?(e.consume(N),v):Me(N)?(o=y,F(N)):(e.consume(N),y)}function v(N){return N===93?(e.consume(N),x):y(N)}function x(N){return N===62?X(N):N===93?(e.consume(N),x):y(N)}function _(N){return N===null||N===62?X(N):Me(N)?(o=_,F(N)):(e.consume(N),_)}function A(N){return N===null?n(N):N===63?(e.consume(N),E):Me(N)?(o=A,F(N)):(e.consume(N),A)}function E(N){return N===62?X(N):A(N)}function R(N){return lr(N)?(e.consume(N),B):n(N)}function B(N){return N===45||_n(N)?(e.consume(N),B):q(N)}function q(N){return Me(N)?(o=q,F(N)):mt(N)?(e.consume(N),q):X(N)}function G(N){return N===45||_n(N)?(e.consume(N),G):N===47||N===62||Qt(N)?W(N):n(N)}function W(N){return N===47?(e.consume(N),X):N===58||N===95||lr(N)?(e.consume(N),K):Me(N)?(o=W,F(N)):mt(N)?(e.consume(N),W):X(N)}function K(N){return N===45||N===46||N===58||N===95||_n(N)?(e.consume(N),K):ue(N)}function ue(N){return N===61?(e.consume(N),fe):Me(N)?(o=ue,F(N)):mt(N)?(e.consume(N),ue):W(N)}function fe(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,Te):Me(N)?(o=fe,F(N)):mt(N)?(e.consume(N),fe):(e.consume(N),i=void 0,Y)}function Te(N){return N===i?(e.consume(N),I):N===null?n(N):Me(N)?(o=Te,F(N)):(e.consume(N),Te)}function I(N){return N===62||N===47||Qt(N)?W(N):n(N)}function Y(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===62||Qt(N)?W(N):(e.consume(N),Y)}function F(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),it(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function V(N){return e.enter("htmlTextData"),o(N)}function X(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}}const f1={name:"labelEnd",tokenize:hM,resolveTo:dM,resolveAll:uM},oM={tokenize:fM},lM={tokenize:pM},cM={tokenize:mM};function uM(e){let t=-1,n;for(;++t-1&&(s[0]=s[0].slice(r)),a>0&&s.push(e[i].slice(0,a))),s}function FM(e,t){let n=-1;const r=[];let i;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const JM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function f6(e){return e.replace(JM,eR)}function eR(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return h6(n.slice(a?2:1),a?16:10)}return h1(n)||e}const p6={}.hasOwnProperty,tR=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),nR(n)(ZM(XM(n).document().write(QM()(e,t,!0))))};function nR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Oe),autolinkProtocol:W,autolinkEmail:W,atxHeading:o(ct),blockQuote:o(Ue),characterEscape:W,characterReference:W,codeFenced:o(Ae),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ae,l),codeText:o(ft,l),codeTextData:W,data:W,codeFlowValue:W,definition:o(et),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o($e),hardBreakEscape:o(de),hardBreakTrailing:o(de),htmlFlow:o(lt,l),htmlFlowData:W,htmlText:o(lt,l),htmlTextData:W,image:o(tt),label:l,link:o(Oe),listItem:o(an),listItemValue:m,listOrdered:o(cn,p),listUnordered:o(cn),paragraph:o($t),reference:ge,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(ct),strong:o(Ie),thematicBreak:o(xe)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:Re,autolinkProtocol:Se,blockQuote:u(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:J,codeFenced:u(v),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:w,codeFlowValue:K,codeIndented:u(x),codeText:u(Y),codeTextData:K,data:K,definition:u(),definitionDestinationString:E,definitionLabelString:_,definitionTitleString:A,emphasis:u(),hardBreakEscape:u(fe),hardBreakTrailing:u(fe),htmlFlow:u(Te),htmlFlowData:K,htmlText:u(I),htmlTextData:K,image:u(V),label:N,labelText:X,lineEnding:ue,link:u(F),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:$,resourceDestinationString:C,resourceTitleString:Q,resource:ne,setextHeading:u(G),setextHeadingLineSequence:q,setextHeadingText:B,strong:u(),thematicBreak:u()}};m6(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let M={type:"root",children:[]};const z={stack:[M],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:f,setData:a,getData:s},H=[];let le=-1;for(;++le0){const ye=z.tokenStack[z.tokenStack.length-1];(ye[1]||Jv).call(z,void 0,ye[0])}for(M.position={start:Ki(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:Ki(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le{const r=this.data("settings");return tR(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function aR(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function sR(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` +`}]}function oR(e,t){const n=t.value?t.value+` +`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function lR(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cR(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oo(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function g6(e,t){const n=String(t.identifier).toUpperCase(),r=Oo(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let a;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,a=e.footnoteOrder.length):(e.footnoteCounts[n]++,a=i+1);const s=e.footnoteCounts[n],o={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,l),e.applyData(t,l)}function uR(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},g6(e,{type:"footnoteReference",identifier:i,position:t.position})}function dR(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hR(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function y6(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function fR(e,t){const n=e.definition(t.identifier);if(!n)return y6(e,t);const r={src:Oo(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function pR(e,t){const n={src:Oo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function mR(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function gR(e,t){const n=e.definition(t.identifier);if(!n)return y6(e,t);const r={href:Oo(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function yR(e,t){const n={href:Oo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bR(e,t,n){const r=e.all(t),i=n?vR(n):b6(t),a={},s=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o1}function wR(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i-1?r.offset:null}}}function ER(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=p1(t.children[1]),l=m1(t.children[t.children.length-1]);o.line&&l.line&&(s.position={start:o,end:l}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function TR(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let l=-1;const c=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(n4(t.slice(i),i>0,!1)),a.join("")}function n4(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===e4||a===t4;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===e4||a===t4;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function NR(e,t){const n={type:"text",value:AR(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function MR(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const RR={blockquote:aR,break:sR,code:oR,delete:lR,emphasis:cR,footnoteReference:g6,footnote:uR,heading:dR,html:hR,imageReference:fR,image:pR,inlineCode:mR,linkReference:gR,link:yR,listItem:bR,list:wR,paragraph:xR,root:kR,strong:SR,table:ER,tableCell:CR,tableRow:TR,text:NR,thematicBreak:MR,toml:fu,yaml:fu,definition:fu,footnoteDefinition:fu};function fu(){return null}const Y0=function(e){if(e==null)return LR;if(typeof e=="string")return DR(e);if(typeof e=="object")return Array.isArray(e)?OR(e):IR(e);if(typeof e=="function")return K0(e);throw new Error("Expected function, string, or object as test")};function OR(e){const t=[];let n=-1;for(;++n":""))+")"})}return d;function d(){let f=[],p,m,h;if((!t||i(o,l,c[c.length-1]||null))&&(f=BR(n(o,c)),f[0]===r4))return f;if(o.children&&f[0]!==zR)for(m=(r?o.children.length:-1)+a,h=c.concat(o);m>-1&&m{const i=a4(r.identifier);i&&!i4.call(t,i)&&(t[i]=r)}),n;function n(r){const i=a4(r);return i&&i4.call(t,i)?t[i]:null}}function a4(e){return String(e||"").toUpperCase()}const Fd={}.hasOwnProperty;function UR(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return s.dangerous=r,s.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,s.handlers={...RR,...n.handlers},s.definition=$R(e),s.footnoteById=i,s.footnoteOrder=[],s.footnoteCounts={},s.patch=jR,s.applyData=qR,s.one=o,s.all=l,s.wrap=WR,s.augment=a,G0(e,"footnoteDefinition",c=>{const u=String(c.identifier).toUpperCase();Fd.call(i,u)||(i[u]=c)}),s;function a(c,u){if(c&&"data"in c&&c.data){const d=c.data;d.hName&&(u.type!=="element"&&(u={type:"element",tagName:"",properties:{},children:[]}),u.tagName=d.hName),u.type==="element"&&d.hProperties&&(u.properties={...u.properties,...d.hProperties}),"children"in u&&u.children&&d.hChildren&&(u.children=d.hChildren)}if(c){const d="type"in c?c:{position:c};FR(d)||(u.position={start:p1(d),end:m1(d)})}return u}function s(c,u,d,f){return Array.isArray(d)&&(f=d,d={}),a(c,{type:"element",tagName:u,properties:d||{},children:f||[]})}function o(c,u){return x6(s,c,u)}function l(c){return g1(s,c)}}function jR(e,t){e.position&&(t.position=_R(e))}function qR(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&a&&(n.properties={...n.properties,...a}),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function x6(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Fd.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:g1(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):HR(e,t)}function g1(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i0&&n.push({type:"text",value:` +`}),n}function VR(e){const t=[];let n=-1;for(;++n1?"-"+o:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};o>1&&d.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(o)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(d)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const d=c.children[c.children.length-1];d&&d.type==="text"?d.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else i.push(...l);const u={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:e.wrap(i,!0)};e.patch(r,u),t.push(u)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:` +`}]}}function k6(e,t){const n=UR(e,t),r=n.one(e,null),i=VR(n);return i&&r.children.push({type:"text",value:` +`},i),Array.isArray(r)?{type:"root",children:r}:r}const YR=function(e,t){return e&&"run"in e?GR(e,t):XR(e||t)},KR=YR;function GR(e,t){return(n,r,i)=>{e.run(k6(n,t),r,a=>{i(a)})}}function XR(e){return t=>k6(t,e)}var Be={},QR={get exports(){return Be},set exports(e){Be=e}},ZR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",JR=ZR,eO=JR;function S6(){}function _6(){}_6.resetWarningCache=S6;var tO=function(){function e(r,i,a,s,o,l){if(l!==eO){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_6,resetWarningCache:S6};return n.PropTypes=n,n};QR.exports=tO();let xc=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};xc.prototype.property={};xc.prototype.normal={};xc.prototype.space=null;function E6(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&sO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(o4,uO);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!o4.test(a)){let s=a.replace(oO,cO);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=y1}return new i(r,t)}function cO(e){return"-"+e.toLowerCase()}function uO(e){return e.charAt(1).toUpperCase()}const l4={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dO=E6([A6,C6,R6,O6,iO],"html"),hO=E6([A6,C6,R6,O6,aO],"svg");function fO(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{G0(t,"element",(n,r,i)=>{const a=i;let s;if(e.allowedElements?s=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(s=e.disallowedElements.includes(n.tagName)),!s&&e.allowElement&&typeof r=="number"&&(s=!e.allowElement(n,r,a)),s&&typeof r=="number")return e.unwrapDisallowed&&n.children?a.children.splice(r,1,...n.children):a.children.splice(r,1),r})}}function pO(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function mO(e){return e.join(" ").trim()}function gO(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var $d={},yO={get exports(){return $d},set exports(e){$d=e}},c4=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,bO=/\n/g,vO=/^\s*/,wO=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xO=/^:\s*/,kO=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,SO=/^[;\s]*/,_O=/^\s+|\s+$/g,EO=` +`,u4="/",d4="*",ja="",TO="comment",CO="declaration",AO=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match(bO);h&&(n+=h.length);var w=m.lastIndexOf(EO);r=~w?m.length-w:r+m.length}function a(){var m={line:n,column:r};return function(h){return h.position=new s(m),c(),h}}function s(m){this.start=m,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function o(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(m){var h=m.exec(e);if(h){var w=h[0];return i(w),e=e.slice(w.length),h}}function c(){l(vO)}function u(m){var h;for(m=m||[];h=d();)h!==!1&&m.push(h);return m}function d(){var m=a();if(!(u4!=e.charAt(0)||d4!=e.charAt(1))){for(var h=2;ja!=e.charAt(h)&&(d4!=e.charAt(h)||u4!=e.charAt(h+1));)++h;if(h+=2,ja===e.charAt(h-1))return o("End of comment missing");var w=e.slice(2,h-2);return r+=2,i(w),e=e.slice(h),r+=2,m({type:TO,comment:w})}}function f(){var m=a(),h=l(wO);if(h){if(d(),!l(xO))return o("property missing ':'");var w=l(kO),y=m({type:CO,property:h4(h[0].replace(c4,ja)),value:w?h4(w[0].replace(c4,ja)):ja});return l(SO),y}}function p(){var m=[];u(m);for(var h;h=f();)h!==!1&&(m.push(h),u(m));return m}return c(),p()};function h4(e){return e?e.replace(_O,ja):ja}var NO=AO;function I6(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=NO(e),a=typeof t=="function",s,o,l=0,c=i.length;l0?Bn.createElement(p,l,d):Bn.createElement(p,l)}function IO(e){let t=-1;for(;++t for more info)`),delete pu[a]}const t=iN().use(iR).use(e.remarkPlugins||[]).use(KR,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(fO,e),n=new Q3;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=Bn.createElement(Bn.Fragment,{},D6({options:e,schema:dO,listDepth:0},r));return e.className&&(i=Bn.createElement("div",{className:e.className},i)),i}kc.propTypes={children:Be.string,className:Be.string,allowElement:Be.func,allowedElements:Be.arrayOf(Be.string),disallowedElements:Be.arrayOf(Be.string),unwrapDisallowed:Be.bool,remarkPlugins:Be.arrayOf(Be.oneOfType([Be.object,Be.func,Be.arrayOf(Be.oneOfType([Be.bool,Be.string,Be.object,Be.func,Be.arrayOf(Be.any)]))])),rehypePlugins:Be.arrayOf(Be.oneOfType([Be.object,Be.func,Be.arrayOf(Be.oneOfType([Be.bool,Be.string,Be.object,Be.func,Be.arrayOf(Be.any)]))])),sourcePos:Be.bool,rawSourcePos:Be.bool,skipHtml:Be.bool,includeElementIndex:Be.bool,transformLinkUri:Be.oneOfType([Be.func,Be.bool]),linkTarget:Be.oneOfType([Be.func,Be.string]),transformImageUri:Be.func,components:Be.object};const FO={tokenize:HO,partial:!0},L6={tokenize:WO,partial:!0},P6={tokenize:VO,partial:!0},lo={tokenize:KO,partial:!0},z6={tokenize:YO,partial:!0},B6={tokenize:jO,previous:U6},F6={tokenize:qO,previous:v1},qi={tokenize:UO,previous:j6},si={},$O={text:si};let La=48;for(;La<123;)si[La]=qi,La++,La===58?La=65:La===91&&(La=97);si[43]=qi;si[45]=qi;si[46]=qi;si[95]=qi;si[72]=[qi,F6];si[104]=[qi,F6];si[87]=[qi,B6];si[119]=[qi,B6];function UO(e,t,n){const r=this;let i,a;return s;function s(p){return!p4(p)||!j6(r.previous)||w1(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(p))}function o(p){return p4(p)?(e.consume(p),o):p===64?(e.consume(p),l):n(p)}function l(p){return p===46?e.check(lo,f,c)(p):p===45||p===95?e.check(lo,n,u)(p):_n(p)?(!a&&zd(p)&&(a=!0),e.consume(p),l):f(p)}function c(p){return e.consume(p),i=!0,a=void 0,l}function u(p){return e.consume(p),d}function d(p){return p===46?e.check(lo,n,c)(p):l(p)}function f(p){return i&&!a?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function jO(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!U6(r.previous)||w1(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(FO,e.attempt(L6,e.attempt(P6,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function qO(e,t,n){const r=this;return i;function i(m){return m!==72&&m!==104||!v1(r.previous)||w1(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(m),a)}function a(m){return m===84||m===116?(e.consume(m),s):n(m)}function s(m){return m===84||m===116?(e.consume(m),o):n(m)}function o(m){return m===80||m===112?(e.consume(m),l):n(m)}function l(m){return m===83||m===115?(e.consume(m),c):c(m)}function c(m){return m===58?(e.consume(m),u):n(m)}function u(m){return m===47?(e.consume(m),d):n(m)}function d(m){return m===47?(e.consume(m),f):n(m)}function f(m){return m===null||Ql(m)||H0(m)||W0(m)?n(m):e.attempt(L6,e.attempt(P6,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function HO(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return l===87||l===119?(e.consume(l),a):n(l)}function a(l){return l===87||l===119?(e.consume(l),s):n(l)}function s(l){return l===46?(e.consume(l),o):n(l)}function o(l){return l===null||Me(l)?n(l):t(l)}}function WO(e,t,n){let r,i;return a;function a(l){return l===38?e.check(z6,o,s)(l):l===46||l===95?e.check(lo,o,s)(l):l===null||Ql(l)||H0(l)||l!==45&&W0(l)?o(l):(e.consume(l),a)}function s(l){return l===46?(i=r,r=void 0,e.consume(l),a):(l===95&&(r=!0),e.consume(l),a)}function o(l){return!i&&!r?t(l):n(l)}}function VO(e,t){let n=0;return r;function r(s){return s===38?e.check(z6,t,i)(s):(s===40&&n++,s===41?e.check(lo,a,i)(s):b1(s)?t(s):$6(s)?e.check(lo,t,i)(s):(e.consume(s),r))}function i(s){return e.consume(s),r}function a(s){return n--,n<0?t(s):i(s)}}function YO(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return lr(s)?(e.consume(s),i):s===59?(e.consume(s),a):n(s)}function a(s){return b1(s)?t(s):n(s)}}function KO(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return $6(a)?(e.consume(a),i):b1(a)?t(a):n(a)}}function $6(e){return e===33||e===34||e===39||e===41||e===42||e===44||e===46||e===58||e===59||e===60||e===63||e===95||e===126}function b1(e){return e===null||e===60||Qt(e)}function p4(e){return e===43||e===45||e===46||e===95||_n(e)}function U6(e){return e===null||e===40||e===42||e===95||e===126||Qt(e)}function v1(e){return e===null||!lr(e)}function j6(e){return e!==47&&v1(e)}function w1(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const GO={tokenize:rI,partial:!0};function XO(){return{document:{[91]:{tokenize:eI,continuation:{tokenize:tI},exit:nI}},text:{[91]:{tokenize:JO},[93]:{add:"after",tokenize:QO,resolveTo:ZO}}}}function QO(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!s||!s._balanced)return n(l);const c=zr(r.sliceSerialize({start:s.end,end:r.now()}));return c.charCodeAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function ZO(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function JO(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){let p;return f===null||f===91||a++>999?n(f):f===93?s?(e.exit("chunkString"),p=e.exit("gfmFootnoteCallString"),i.includes(zr(r.sliceSerialize(p)))?d(f):n(f)):n(f):(e.consume(f),Qt(f)||(s=!0),f===92?u:c)}function u(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}function d(f){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}}function eI(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),u):n(h)}function u(h){let w;return h===null||h===91||s>999?n(h):h===93?o?(w=e.exit("gfmFootnoteDefinitionLabelString"),a=zr(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p):n(h):Me(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),s++,u):(e.enter("chunkString").contentType="string",d(h))}function d(h){return h===null||Me(h)||h===91||h===93||s>999?(e.exit("chunkString"),u(h)):(Qt(h)||(o=!0),s++,e.consume(h),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),it(e,m,"gfmFootnoteDefinitionWhitespace")):n(h)}function m(h){return i.includes(a)||i.push(a),t(h)}}function tI(e,t,n){return e.check(wc,t,e.attempt(GO,t,n))}function nI(e){e.exit("gfmFootnoteDefinition")}function rI(e,t,n){const r=this;return it(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function iI(e={}){let t=e.singleTilde;const n={tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{[126]:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(a,s){let o=-1;for(;++o1?o(p):(a.consume(p),u++,f);if(u<2&&!t)return o(p);const h=a.exit("strikethroughSequenceTemporary"),w=Bd(p);return h._open=!w||w===2&&!!m,h._close=!m||m===2&&!!w,s(p)}}}const aI={flow:{null:{tokenize:oI,resolve:sI}}},m4={tokenize:lI,partial:!0};function sI(e,t){let n=-1,r,i,a,s,o,l,c;for(;++n=4?F(N):(r._gfmTableDynamicInterruptHack=!0,I.check(r.parser.constructs.flow,function(Q){return r._gfmTableDynamicInterruptHack=!1,F(Q)},function(Q){return r._gfmTableDynamicInterruptHack=!1,Y(Q)})(N))}}}function lI(e,t,n){let r=0;return i;function i(s){return e.enter("check"),e.consume(s),a}function a(s){return s===-1||s===32?(e.consume(s),r++,r===4?t:a):s===null||Qt(s)?t(s):n(s)}}const cI={tokenize:dI},uI={text:{[91]:cI}};function dI(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return Qt(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:hI},t,n)):n(o)}}function hI(e,t,n){const r=this;return it(e,i,"whitespace");function i(a){const s=r.events[r.events.length-1];return(s&&s[1].type==="whitespace"||Me(a))&&a!==null?t(a):n(a)}}function fI(e){return n6([$O,XO(),iI(e),aI,uI])}function g4(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function pI(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const mI={}.hasOwnProperty,gI=function(e,t,n,r){let i,a;typeof t=="string"||t instanceof RegExp?(a=[[t,n]],i=r):(a=t,i=n),i||(i={});const s=Y0(i.ignore||[]),o=yI(a);let l=-1;for(;++l0?{type:"text",value:R}:void 0),R!==!1&&(w!==A&&x.push({type:"text",value:d.value.slice(w,A)}),Array.isArray(R)?x.push(...R):R&&x.push(R),w=A+_[0].length,v=!0),!m.global)break;_=m.exec(d.value)}return v?(we}const Rf="phrasing",Of=["autolink","link","image","label"],bI={transforms:[EI],enter:{literalAutolink:wI,literalAutolinkEmail:If,literalAutolinkHttp:If,literalAutolinkWww:If},exit:{literalAutolink:_I,literalAutolinkEmail:SI,literalAutolinkHttp:xI,literalAutolinkWww:kI}},vI={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rf,notInConstruct:Of},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rf,notInConstruct:Of},{character:":",before:"[ps]",after:"\\/",inConstruct:Rf,notInConstruct:Of}]};function wI(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function If(e){this.config.enter.autolinkProtocol.call(this,e)}function xI(e){this.config.exit.autolinkProtocol.call(this,e)}function kI(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function SI(e){this.config.exit.autolinkEmail.call(this,e)}function _I(e){this.exit(e)}function EI(e){gI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TI],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,CI]],{ignore:["link","linkReference"]})}function TI(e,t,n,r,i){let a="";if(!q6(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!AI(n)))return!1;const s=NI(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function CI(e,t,n,r){return!q6(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function AI(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function NI(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=g4(e,"(");let a=g4(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function q6(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||H0(n)||W0(n))&&(!t||n!==47)}function H6(e){return e.label||!e.identifier?e.label||"":f6(e.identifier)}function MI(e,t,n){const r=t.indexStack,i=e.children||[],a=t.createTracker(n),s=[];let o=-1;for(r.push(-1);++o + +`}return` + +`}const OI=/\r?\n|\r/g;function II(e,t){const n=[];let r=0,i=0,a;for(;a=OI.exec(e);)s(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return s(e.slice(r)),n.join("");function s(o){n.push(t(o,i,!o))}}function W6(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function DI(e,t){return v4(e,t.inConstruct,!0)&&!v4(e,t.notInConstruct,!1)}function v4(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r=c||u+10?" ":"")),i.shift(4),a+=i.move(II(MI(e,n,i.current()),KI)),s(),a}function KI(e,t,n){return t===0?e:(n?"":" ")+e}function K6(e,t,n){const r=t.indexStack,i=e.children||[],a=[];let s=-1,o=n.before;r.push(-1);let l=t.createTracker(n);for(;++s0&&(o==="\r"||o===` +`)&&c.type==="html"&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),o=" ",l=t.createTracker(n),l.move(a.join(""))),a.push(l.move(t.handle(c,e,t,{...l.current(),before:o,after:u}))),o=a[a.length-1].slice(-1)}return r.pop(),a.join("")}const GI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];G6.peek=eD;const XI={canContainEols:["delete"],enter:{strikethrough:ZI},exit:{strikethrough:JI}},QI={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:GI}],handlers:{delete:G6}};function ZI(e){this.enter({type:"delete",children:[]},e)}function JI(e){this.exit(e)}function G6(e,t,n,r){const i=X0(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=K6(e,n,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function eD(){return"~"}X6.peek=tD;function X6(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++al&&(l=e[c].length);++wo[w])&&(o[w]=v)}m.push(y)}a[c]=m,s[c]=h}let u=-1;if(typeof n=="object"&&"length"in n)for(;++uo[u]&&(o[u]=y),f[u]=y),d[u]=v}a.splice(1,0,d),s.splice(1,0,f),c=-1;const p=[];for(;++cn==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function oD(e){this.exit(e),this.setData("inTable")}function lD(e){this.enter({type:"tableRow",children:[]},e)}function Df(e){this.exit(e)}function k4(e){this.enter({type:"tableCell",children:[]},e)}function cD(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,uD));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function uD(e,t){return t==="|"?t:e}function dD(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:o,tableCell:l,inlineCode:f}};function s(p,m,h,w){return c(u(p,h,w),p.align)}function o(p,m,h,w){const y=d(p,h,w),v=c([y]);return v.slice(0,v.indexOf(` +`))}function l(p,m,h,w){const y=h.enter("tableCell"),v=h.enter("phrasing"),x=K6(p,h,{...w,before:a,after:a});return v(),y(),x}function c(p,m){return nD(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function u(p,m,h){const w=p.children;let y=-1;const v=[],x=m.enter("table");for(;++y-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),u);return l(),c;function u(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?a:a+" ".repeat(s-a.length))+d}}const mD={exit:{taskListCheckValueChecked:S4,taskListCheckValueUnchecked:S4,paragraph:yD}},gD={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:bD}};function S4(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function yD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a]+>",s="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional(a)+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:h,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},A={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[A,d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:E.concat([{begin:/\(/,end:/\)/,keywords:_,contains:E.concat(["self"]),relevance:0}]),relevance:0},B={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"",keywords:_,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function kD(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=xD(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function SD(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);const o={className:"",begin:/\\"/},l={className:"string",begin:/'/,end:/'/},c={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},u=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],d=e.SHEBANG({binary:`(${u.join("|")})`,relevance:10}),f={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},p=["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],m=["true","false"],h={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias"],v=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],x=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:p,literal:m,built_in:[...w,...y,"set","shopt",...v,...x]},contains:[d,e.SHEBANG(),f,c,e.HASH_COMMENT_MODE,a,h,s,o,l,n]}}function _D(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="<[^<>]+>",s="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional(a)+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",w={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:y.concat([{begin:/\(/,end:/\)/,keywords:w,contains:y.concat(["self"]),relevance:0}]),relevance:0},x={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:w,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:w}}}function ED(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="<[^<>]+>",s="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional(a)+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:h,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},A={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[A,d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:E.concat([{begin:/\(/,end:/\)/,keywords:_,contains:E.concat(["self"]),relevance:0}]),relevance:0},B={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"",keywords:_,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function TD(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:i.concat(a),built_in:t,literal:r},o=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},u=e.inherit(c,{illegal:/\n/}),d={className:"subst",begin:/\{/,end:/\}/,keywords:s},f=e.inherit(d,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},d]},h=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});d.contains=[m,p,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],f.contains=[h,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const w={variants:[m,p,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},o]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",x={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},w,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},o,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[w,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},x]}}const CD=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),AD=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ND=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],MD=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],RD=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],OD=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function ID(e){const t=e.regex,n=CD(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",a=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",o=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+MD.join("|")+")"},{begin:":(:)?("+RD.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+OD.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:ND.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+AD.join("|")+")\\b"}]}}function DD(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function LD(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"Q6(e,t,n-1))}function BD(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Q6("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,_4,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_4,c]}}const E4="[A-Za-z$_][0-9A-Za-z$_]*",FD=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],$D=["true","false","null","undefined","NaN","Infinity"],Z6=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],J6=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],e5=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],UD=["arguments","this","super","console","window","document","localStorage","module","global"],jD=[].concat(e5,Z6,J6);function qD(e){const t=e.regex,n=(Y,{after:F})=>{const V="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,F)=>{const V=Y[0].length+Y.index,X=Y.input[V];if(X==="<"||X===","){F.ignoreMatch();return}X===">"&&(n(Y,{after:V})||F.ignoreMatch());let N;const C=Y.input.substring(V);if(N=C.match(/^\s*=/)){F.ignoreMatch();return}if((N=C.match(/^\s+extends\s+/))&&N.index===0){F.ignoreMatch();return}}},o={$pattern:E4,keyword:FD,literal:$D,built_in:jD,"variable.language":UD},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},m={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},h={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(v)});const x=[].concat(y,f.contains),_=x.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(x)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Z6,...J6]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},q={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},G={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function W(Y){return t.concat("(?!",Y.join("|"),")")}const K={match:t.concat(/\b/,W([...e5,"super","import"]),r,t.lookahead(/\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},fe={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},Te="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",I={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(Te)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:_,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,y,{match:/\$\d+/},d,R,{className:"attr",begin:r+t.lookahead(":"),relevance:0},I,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:Te,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ue,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},K,G,E,fe,{match:/\$[(.]/}]}}function HD(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Is="[0-9](_*[0-9])*",yu=`\\.(${Is})`,bu="[0-9a-fA-F](_*[0-9a-fA-F])*",WD={className:"number",variants:[{begin:`(\\b(${Is})((${yu})|\\.)?|(${yu}))[eE][+-]?(${Is})[fFdD]?\\b`},{begin:`\\b(${Is})((${yu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${yu})[fFdD]?\\b`},{begin:`\\b(${Is})[fFdD]\\b`},{begin:`\\b0[xX]((${bu})\\.?|(${bu})?\\.(${bu}))[pP][+-]?(${Is})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${bu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function VD(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(s);const o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},c=WD,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,o,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,o,l,s,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},o,l]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},c]}}const YD=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),KD=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],GD=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],t5=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],n5=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],XD=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),QD=t5.concat(n5);function ZD(e){const t=YD(e),n=QD,r="and or not only",i="[\\w-]+",a="("+i+"|@\\{"+i+"\\})",s=[],o=[],l=function(x){return{className:"string",begin:"~?"+x+".*?"+x}},c=function(x,_,A){return{className:x,begin:_,relevance:A}},u={$pattern:/[a-z-]+/,keyword:r,attribute:GD.join(" ")},d={begin:"\\(",end:"\\)",contains:o,keywords:u,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const f=o.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(o)},m={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+XD.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:o}}]},h={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:o,relevance:0}},w={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:f}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+KD.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",a,0),c("selector-id","#"+a),c("selector-class","\\."+a,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+t5.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n5.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},v={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,w,v,m,y,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function JD(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function eL(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),f=e.inherit(u,{contains:[]});c.contains.push(f),u.contains.push(d);let p=[n,l];return[c,u,d,f].forEach(w=>{w.contains=w.contains.concat(p)}),p=p.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,a,c,u,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,r,l,s]}}function nL(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,o={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:o,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function rL(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},s={begin:/->\{/,end:/\}/},o={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},l=[e.BACKSLASH_ESCAPE,a,o],c=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],u=(p,m,h="\\1")=>{const w=h==="\\1"?h:t.concat(h,m);return t.concat(t.concat("(?:",p,")"),m,/(?:\\.|[^\\\/])*?/,w,/(?:\\.|[^\\\/])*?/,h,r)},d=(p,m,h)=>t.concat(t.concat("(?:",p,")"),m,/(?:\\.|[^\\\/])*?/,h,r),f=[o,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:l,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:u("s|tr|y",t.either(...c,{capture:!0}))},{begin:u("s|tr|y","\\(","\\)")},{begin:u("s|tr|y","\\[","\\]")},{begin:u("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",t.either(...c,{capture:!0}),/\1/)},{begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=f,s.contains=f,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:f}}function iL(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a={scope:"variable",match:"\\$+"+r},s={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},o={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(o)}),u=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(o)}),d=`[ +]`,f={scope:"string",variants:[c,l,u]},p={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},m=["false","null","true"],h=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],w=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],v={keyword:h,literal:(K=>{const ue=[];return K.forEach(fe=>{ue.push(fe),fe.toLowerCase()===fe?ue.push(fe.toUpperCase()):ue.push(fe.toLowerCase())}),ue})(m),built_in:w},x=K=>K.map(ue=>ue.replace(/\|\d+$/,"")),_={variants:[{match:[/new/,t.concat(d,"+"),t.concat("(?!",x(w).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},A=t.concat(r,"\\b(?!\\()"),E={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},R={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},B={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[R,a,E,e.C_BLOCK_COMMENT_MODE,f,p,_]},q={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",x(h).join("\\b|"),"|",x(w).join("\\b|"),"\\b)"),r,t.concat(d,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[B]};B.contains.push(q);const G=[R,E,e.C_BLOCK_COMMENT_MODE,f,p,_],W={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:m,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:m,keyword:["new","array"]},contains:["self",...G]},...G,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:v,contains:[W,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},a,q,E,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},_,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:v,contains:["self",a,E,e.C_BLOCK_COMMENT_MODE,f,p]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},f,p]}}function aL(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function sL(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function oL(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,m=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${m})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${f})[jJ](?=${m})`}]},w={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,h,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,h,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|->|\?)|=>/,contains:[l,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},d,w,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,y,d]}]}}function lL(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function cL(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function uL(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},E=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:s},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=E,h.contains=E;const R="[>?]>",B="[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]",q="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",G=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+R+"|"+B+"|"+q+")(?=[ ])",starts:{end:"$",keywords:s,contains:E}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(G).concat(c).concat(E)}}function dL(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],a=["true","false","Some","None","Ok","Err"],s=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:i,literal:a,built_in:s},illegal:""},n]}}const hL=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),fL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],pL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],mL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],gL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],yL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function bL(e){const t=hL(e),n=gL,r=mL,i="@[a-z-]+",a="and or not only",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+fL.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+yL.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:pL.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function vL(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function wL(e){const t=e.regex,n=e.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},i={begin:/"/,end:/"/,contains:[{begin:/""/}]},a=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=u,m=[...c,...l].filter(x=>!u.includes(x)),h={className:"variable",begin:/@[a-z0-9]+/},w={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={begin:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(x,{exceptions:_,when:A}={}){const E=A;return _=_||[],x.map(R=>R.match(/\|\d+$/)||_.includes(R)?R:E(R)?`${R}|0`:R)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:v(m,{when:x=>x.length<3}),literal:a,type:o,built_in:d},contains:[{begin:t.either(...f),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:m.concat(f),literal:a,type:o}},{className:"type",begin:t.either(...s)},y,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,w]}}function r5(e){return e?typeof e=="string"?e:e.source:null}function vu(e){return yt("(?=",e,")")}function yt(...e){return e.map(n=>r5(n)).join("")}function xL(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Dn(...e){return"("+(xL(e).capture?"":"?:")+e.map(r=>r5(r)).join("|")+")"}const x1=e=>yt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),kL=["Protocol","Type"].map(x1),T4=["init","self"].map(x1),SL=["Any","Self"],Lf=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],C4=["false","nil","true"],_L=["assignment","associativity","higherThan","left","lowerThan","none","right"],EL=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],A4=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],i5=Dn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),a5=Dn(i5,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Pf=yt(i5,a5,"*"),s5=Dn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ud=Dn(s5,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),mi=yt(s5,Ud,"*"),zf=yt(/[A-Z]/,Ud,"*"),TL=["autoclosure",yt(/convention\(/,Dn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",yt(/objc\(/,mi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],CL=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function AL(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,Dn(...kL,...T4)],className:{2:"keyword"}},a={match:yt(/\./,Dn(...Lf)),relevance:0},s=Lf.filter(Se=>typeof Se=="string").concat(["_|0"]),o=Lf.filter(Se=>typeof Se!="string").concat(SL).map(x1),l={variants:[{className:"keyword",match:Dn(...o,...T4)}]},c={$pattern:Dn(/\b\w+/,/#\w+/),keyword:s.concat(EL),literal:C4},u=[i,a,l],d={match:yt(/\./,Dn(...A4)),relevance:0},f={className:"built_in",match:yt(/\b/,Dn(...A4),/(?=\()/)},p=[d,f],m={match:/->/,relevance:0},h={className:"operator",relevance:0,variants:[{match:Pf},{match:`\\.(\\.|${a5})+`}]},w=[m,h],y="([0-9]_*)+",v="([0-9a-fA-F]_*)+",x={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${v})(\\.(${v}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(Se="")=>({className:"subst",variants:[{match:yt(/\\/,Se,/[0\\tnr"']/)},{match:yt(/\\/,Se,/u\{[0-9a-fA-F]{1,8}\}/)}]}),A=(Se="")=>({className:"subst",match:yt(/\\/,Se,/[\t ]*(?:[\r\n]|\r\n)/)}),E=(Se="")=>({className:"subst",label:"interpol",begin:yt(/\\/,Se,/\(/),end:/\)/}),R=(Se="")=>({begin:yt(Se,/"""/),end:yt(/"""/,Se),contains:[_(Se),A(Se),E(Se)]}),B=(Se="")=>({begin:yt(Se,/"/),end:yt(/"/,Se),contains:[_(Se),E(Se)]}),q={className:"string",variants:[R(),R("#"),R("##"),R("###"),B(),B("#"),B("##"),B("###")]},G={match:yt(/`/,mi,/`/)},W={className:"variable",match:/\$\d+/},K={className:"variable",match:`\\$${Ud}+`},ue=[G,W,K],fe={match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:CL,contains:[...w,x,q]}]}},Te={className:"keyword",match:yt(/@/,Dn(...TL))},I={className:"meta",match:yt(/@/,mi)},Y=[fe,Te,I],F={match:vu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:yt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ud,"+")},{className:"type",match:zf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:yt(/\s+&\s+/,vu(zf)),relevance:0}]},V={begin://,keywords:c,contains:[...r,...u,...Y,m,F]};F.contains.push(V);const X={match:yt(mi,/\s*:/),keywords:"_|0",relevance:0},N={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",X,...r,...u,...p,...w,x,q,...ue,...Y,F]},C={begin://,contains:[...r,F]},Q={begin:Dn(vu(yt(mi,/\s*:/)),vu(yt(mi,/\s+/,mi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:mi}]},ne={begin:/\(/,end:/\)/,keywords:c,contains:[Q,...r,...u,...w,x,q,...Y,F,N],endsParent:!0,illegal:/["']/},ge={match:[/func/,/\s+/,Dn(G.match,mi,Pf)],className:{1:"keyword",3:"title.function"},contains:[C,ne,t],illegal:[/\[/,/%/]},$={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[C,ne,t],illegal:/\[|%/},Ee={match:[/operator/,/\s+/,Pf],className:{1:"keyword",3:"title"}},J={begin:[/precedencegroup/,/\s+/,zf],className:{1:"keyword",3:"title"},contains:[F],keywords:[..._L,...C4],end:/}/};for(const Se of q.variants){const Re=Se.contains.find(Ae=>Ae.label==="interpol");Re.keywords=c;const Ue=[...u,...p,...w,x,q,...ue];Re.contains=[...Ue,{begin:/\(/,end:/\)/,contains:["self",...Ue]}]}return{name:"Swift",keywords:c,contains:[...r,ge,$,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:c,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...u]},Ee,J,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...u,...p,...w,x,q,...ue,...Y,F,N]}}const jd="[A-Za-z$_][0-9A-Za-z$_]*",o5=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],l5=["true","false","null","undefined","NaN","Infinity"],c5=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],u5=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],d5=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],h5=["arguments","this","super","console","window","document","localStorage","module","global"],f5=[].concat(d5,c5,u5);function NL(e){const t=e.regex,n=(Y,{after:F})=>{const V="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,F)=>{const V=Y[0].length+Y.index,X=Y.input[V];if(X==="<"||X===","){F.ignoreMatch();return}X===">"&&(n(Y,{after:V})||F.ignoreMatch());let N;const C=Y.input.substring(V);if(N=C.match(/^\s*=/)){F.ignoreMatch();return}if((N=C.match(/^\s+extends\s+/))&&N.index===0){F.ignoreMatch();return}}},o={$pattern:jd,keyword:o5,literal:l5,built_in:f5,"variable.language":h5},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},m={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},h={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(v)});const x=[].concat(y,f.contains),_=x.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(x)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...c5,...u5]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},q={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},G={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function W(Y){return t.concat("(?!",Y.join("|"),")")}const K={match:t.concat(/\b/,W([...d5,"super","import"]),r,t.lookahead(/\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},fe={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},Te="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",I={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(Te)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:_,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,y,{match:/\$\d+/},d,R,{className:"attr",begin:r+t.lookahead(":"),relevance:0},I,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:Te,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ue,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},K,G,E,fe,{match:/\$[(.]/}]}}function ML(e){const t=NL(e),n=jd,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[t.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},o=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:jd,keyword:o5.concat(o),literal:l5,built_in:f5.concat(r),"variable.language":h5},c={className:"meta",begin:"@"+n},u=(f,p,m)=>{const h=f.contains.findIndex(w=>w.label===p);if(h===-1)throw new Error("can not find mode to replace");f.contains.splice(h,1,m)};Object.assign(t.keywords,l),t.exports.PARAMS_CONTAINS.push(c),t.contains=t.contains.concat([c,i,a]),u(t,"shebang",e.SHEBANG()),u(t,"use_strict",s);const d=t.contains.find(f=>f.label==="func.def");return d.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t}function RL(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(s,o),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function OL(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},o={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,s,i,e.QUOTE_STRING_MODE,l,c,o]}}function IL(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(a,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[a,l,o,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[a,s,l,o]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function DL(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(a,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o="[0-9]{4}(-[0-9][0-9]){0,2}",l="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",c="(\\.[0-9]*)?",u="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",d={className:"number",begin:"\\b"+o+l+c+u+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},p={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},h=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},d,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},p,m,a],w=[...h];return w.pop(),w.push(s),f.contains=w,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:h}}var k1={exports:{}};function S1(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];typeof n=="object"&&!Object.isFrozen(n)&&S1(n)}),e}k1.exports=S1;k1.exports.default=S1;class N4{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function p5(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function ra(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const LL="",M4=e=>!!e.scope||e.sublanguage&&e.language,PL=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class zL{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=p5(t)}openNode(t){if(!M4(t))return;let n="";t.sublanguage?n=`language-${t.language}`:n=PL(t.scope,{prefix:this.classPrefix}),this.span(n)}closeNode(t){M4(t)&&(this.buffer+=LL)}value(){return this.buffer}span(t){this.buffer+=``}}const R4=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class _1{constructor(){this.rootNode=R4(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=R4({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{_1._collapse(n)}))}}class BL extends _1{constructor(t){super(),this.options=t}addKeyword(t,n){t!==""&&(this.openNode(n),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,n){const r=t.root;r.sublanguage=!0,r.language=n,this.add(r)}toHTML(){return new zL(this,this.options).value()}finalize(){return!0}}function Zl(e){return e?typeof e=="string"?e:e.source:null}function m5(e){return ps("(?=",e,")")}function FL(e){return ps("(?:",e,")*")}function $L(e){return ps("(?:",e,")?")}function ps(...e){return e.map(n=>Zl(n)).join("")}function UL(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function E1(...e){return"("+(UL(e).capture?"":"?:")+e.map(r=>Zl(r)).join("|")+")"}function g5(e){return new RegExp(e.toString()+"|").exec("").length-1}function jL(e,t){const n=e&&e.exec(t);return n&&n.index===0}const qL=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function T1(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let a=Zl(r),s="";for(;a.length>0;){const o=qL.exec(a);if(!o){s+=a;break}s+=a.substring(0,o.index),a=a.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?s+="\\"+String(Number(o[1])+i):(s+=o[0],o[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const HL=/\b\B/,y5="[a-zA-Z]\\w*",C1="[a-zA-Z_]\\w*",b5="\\b\\d+(\\.\\d+)?",v5="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",w5="\\b(0b[01]+)",WL="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",VL=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ps(t,/.*\b/,e.binary,/\b.*/)),ra({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Jl={begin:"\\\\[\\s\\S]",relevance:0},YL={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Jl]},KL={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Jl]},GL={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Z0=function(e,t,n={}){const r=ra({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=E1("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ps(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},XL=Z0("//","$"),QL=Z0("/\\*","\\*/"),ZL=Z0("#","$"),JL={scope:"number",begin:b5,relevance:0},eP={scope:"number",begin:v5,relevance:0},tP={scope:"number",begin:w5,relevance:0},nP={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Jl,{begin:/\[/,end:/\]/,relevance:0,contains:[Jl]}]}]},rP={scope:"title",begin:y5,relevance:0},iP={scope:"title",begin:C1,relevance:0},aP={begin:"\\.\\s*"+C1,relevance:0},sP=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var wu=Object.freeze({__proto__:null,MATCH_NOTHING_RE:HL,IDENT_RE:y5,UNDERSCORE_IDENT_RE:C1,NUMBER_RE:b5,C_NUMBER_RE:v5,BINARY_NUMBER_RE:w5,RE_STARTERS_RE:WL,SHEBANG:VL,BACKSLASH_ESCAPE:Jl,APOS_STRING_MODE:YL,QUOTE_STRING_MODE:KL,PHRASAL_WORDS_MODE:GL,COMMENT:Z0,C_LINE_COMMENT_MODE:XL,C_BLOCK_COMMENT_MODE:QL,HASH_COMMENT_MODE:ZL,NUMBER_MODE:JL,C_NUMBER_MODE:eP,BINARY_NUMBER_MODE:tP,REGEXP_MODE:nP,TITLE_MODE:rP,UNDERSCORE_TITLE_MODE:iP,METHOD_GUARD:aP,END_SAME_AS_BEGIN:sP});function oP(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function lP(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function cP(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=oP,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function uP(e,t){Array.isArray(e.illegal)&&(e.illegal=E1(...e.illegal))}function dP(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function hP(e,t){e.relevance===void 0&&(e.relevance=1)}const fP=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=ps(n.beforeMatch,m5(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},pP=["of","and","for","in","not","or","if","then","parent","list","value"],mP="keyword";function x5(e,t,n=mP){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(a){Object.assign(r,x5(e[a],t,a))}),r;function i(a,s){t&&(s=s.map(o=>o.toLowerCase())),s.forEach(function(o){const l=o.split("|");r[l[0]]=[a,gP(l[0],l[1])]})}}function gP(e,t){return t?Number(t):yP(e)?0:1}function yP(e){return pP.includes(e.toLowerCase())}const O4={},Ja=e=>{console.error(e)},I4=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Cs=(e,t)=>{O4[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),O4[`${e}/${t}`]=!0)},qd=new Error;function k5(e,t,{key:n}){let r=0;const i=e[n],a={},s={};for(let o=1;o<=t.length;o++)s[o+r]=i[o],a[o+r]=!0,r+=g5(t[o-1]);e[n]=s,e[n]._emit=a,e[n]._multi=!0}function bP(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Ja("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),qd;if(typeof e.beginScope!="object"||e.beginScope===null)throw Ja("beginScope must be object"),qd;k5(e,e.begin,{key:"beginScope"}),e.begin=T1(e.begin,{joinWith:""})}}function vP(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Ja("skip, excludeEnd, returnEnd not compatible with endScope: {}"),qd;if(typeof e.endScope!="object"||e.endScope===null)throw Ja("endScope must be object"),qd;k5(e,e.end,{key:"endScope"}),e.end=T1(e.end,{joinWith:""})}}function wP(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function xP(e){wP(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),bP(e),vP(e)}function kP(e){function t(s,o){return new RegExp(Zl(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=g5(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(T1(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const c=l.findIndex((d,f)=>f>0&&d!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new n;return this.rules.slice(o).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(o);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(o)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(s){const o=new r;return s.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&o.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&o.addRule(s.illegal,{type:"illegal"}),o}function a(s,o){const l=s;if(s.isCompiled)return l;[lP,dP,xP,fP].forEach(u=>u(s,o)),e.compilerExtensions.forEach(u=>u(s,o)),s.__beforeBegin=null,[cP,uP,hP].forEach(u=>u(s,o)),s.isCompiled=!0;let c=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),c=s.keywords.$pattern,delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=x5(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),o&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=Zl(l.end)||"",s.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(u){return SP(u==="self"?s:u)})),s.contains.forEach(function(u){a(u,l)}),s.starts&&a(s.starts,o),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ra(e.classNameAliases||{}),a(e)}function S5(e){return e?e.endsWithParent||S5(e.starts):!1}function SP(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return ra(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:S5(e)?ra(e,{starts:e.starts?ra(e.starts):null}):Object.isFrozen(e)?ra(e):e}var _P="11.7.0";class EP extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Bf=p5,D4=ra,L4=Symbol("nomatch"),TP=7,CP=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:BL};function l(I){return o.noHighlightRe.test(I)}function c(I){let Y=I.className+" ";Y+=I.parentNode?I.parentNode.className:"";const F=o.languageDetectRe.exec(Y);if(F){const V=q(F[1]);return V||(I4(a.replace("{}",F[1])),I4("Falling back to no-highlight mode for this block.",I)),V?F[1]:"no-highlight"}return Y.split(/\s+/).find(V=>l(V)||q(V))}function u(I,Y,F){let V="",X="";typeof Y=="object"?(V=I,F=Y.ignoreIllegals,X=Y.language):(Cs("10.7.0","highlight(lang, code, ...args) has been deprecated."),Cs("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),X=I,V=Y),F===void 0&&(F=!0);const N={code:V,language:X};fe("before:highlight",N);const C=N.result?N.result:d(N.language,N.code,F);return C.code=N.code,fe("after:highlight",C),C}function d(I,Y,F,V){const X=Object.create(null);function N(ee,xe){return ee.keywords[xe]}function C(){if(!de.keywords){tt.addText(Oe);return}let ee=0;de.keywordPatternRe.lastIndex=0;let xe=de.keywordPatternRe.exec(Oe),U="";for(;xe;){U+=Oe.substring(ee,xe.index);const M=et.case_insensitive?xe[0].toLowerCase():xe[0],z=N(de,M);if(z){const[H,le]=z;if(tt.addText(U),U="",X[M]=(X[M]||0)+1,X[M]<=TP&&(cn+=le),H.startsWith("_"))U+=xe[0];else{const ye=et.classNameAliases[H]||H;tt.addKeyword(xe[0],ye)}}else U+=xe[0];ee=de.keywordPatternRe.lastIndex,xe=de.keywordPatternRe.exec(Oe)}U+=Oe.substring(ee),tt.addText(U)}function Q(){if(Oe==="")return;let ee=null;if(typeof de.subLanguage=="string"){if(!t[de.subLanguage]){tt.addText(Oe);return}ee=d(de.subLanguage,Oe,!0,lt[de.subLanguage]),lt[de.subLanguage]=ee._top}else ee=p(Oe,de.subLanguage.length?de.subLanguage:null);de.relevance>0&&(cn+=ee.relevance),tt.addSublanguage(ee._emitter,ee.language)}function ne(){de.subLanguage!=null?Q():C(),Oe=""}function ge(ee,xe){let U=1;const M=xe.length-1;for(;U<=M;){if(!ee._emit[U]){U++;continue}const z=et.classNameAliases[ee[U]]||ee[U],H=xe[U];z?tt.addKeyword(H,z):(Oe=H,C(),Oe=""),U++}}function $(ee,xe){return ee.scope&&typeof ee.scope=="string"&&tt.openNode(et.classNameAliases[ee.scope]||ee.scope),ee.beginScope&&(ee.beginScope._wrap?(tt.addKeyword(Oe,et.classNameAliases[ee.beginScope._wrap]||ee.beginScope._wrap),Oe=""):ee.beginScope._multi&&(ge(ee.beginScope,xe),Oe="")),de=Object.create(ee,{parent:{value:de}}),de}function Ee(ee,xe,U){let M=jL(ee.endRe,U);if(M){if(ee["on:end"]){const z=new N4(ee);ee["on:end"](xe,z),z.isMatchIgnored&&(M=!1)}if(M){for(;ee.endsParent&&ee.parent;)ee=ee.parent;return ee}}if(ee.endsWithParent)return Ee(ee.parent,xe,U)}function J(ee){return de.matcher.regexIndex===0?(Oe+=ee[0],1):(Ie=!0,0)}function Se(ee){const xe=ee[0],U=ee.rule,M=new N4(U),z=[U.__beforeBegin,U["on:begin"]];for(const H of z)if(H&&(H(ee,M),M.isMatchIgnored))return J(xe);return U.skip?Oe+=xe:(U.excludeBegin&&(Oe+=xe),ne(),!U.returnBegin&&!U.excludeBegin&&(Oe=xe)),$(U,ee),U.returnBegin?0:xe.length}function Re(ee){const xe=ee[0],U=Y.substring(ee.index),M=Ee(de,ee,U);if(!M)return L4;const z=de;de.endScope&&de.endScope._wrap?(ne(),tt.addKeyword(xe,de.endScope._wrap)):de.endScope&&de.endScope._multi?(ne(),ge(de.endScope,ee)):z.skip?Oe+=xe:(z.returnEnd||z.excludeEnd||(Oe+=xe),ne(),z.excludeEnd&&(Oe=xe));do de.scope&&tt.closeNode(),!de.skip&&!de.subLanguage&&(cn+=de.relevance),de=de.parent;while(de!==M.parent);return M.starts&&$(M.starts,ee),z.returnEnd?0:xe.length}function Ue(){const ee=[];for(let xe=de;xe!==et;xe=xe.parent)xe.scope&&ee.unshift(xe.scope);ee.forEach(xe=>tt.openNode(xe))}let Ae={};function ft(ee,xe){const U=xe&&xe[0];if(Oe+=ee,U==null)return ne(),0;if(Ae.type==="begin"&&xe.type==="end"&&Ae.index===xe.index&&U===""){if(Oe+=Y.slice(xe.index,xe.index+1),!i){const M=new Error(`0 width match regex (${I})`);throw M.languageName=I,M.badRule=Ae.rule,M}return 1}if(Ae=xe,xe.type==="begin")return Se(xe);if(xe.type==="illegal"&&!F){const M=new Error('Illegal lexeme "'+U+'" for mode "'+(de.scope||"")+'"');throw M.mode=de,M}else if(xe.type==="end"){const M=Re(xe);if(M!==L4)return M}if(xe.type==="illegal"&&U==="")return 1;if($t>1e5&&$t>xe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Oe+=U,U.length}const et=q(I);if(!et)throw Ja(a.replace("{}",I)),new Error('Unknown language: "'+I+'"');const $e=kP(et);let ct="",de=V||$e;const lt={},tt=new o.__emitter(o);Ue();let Oe="",cn=0,an=0,$t=0,Ie=!1;try{for(de.matcher.considerAll();;){$t++,Ie?Ie=!1:de.matcher.considerAll(),de.matcher.lastIndex=an;const ee=de.matcher.exec(Y);if(!ee)break;const xe=Y.substring(an,ee.index),U=ft(xe,ee);an=ee.index+U}return ft(Y.substring(an)),tt.closeAllNodes(),tt.finalize(),ct=tt.toHTML(),{language:I,value:ct,relevance:cn,illegal:!1,_emitter:tt,_top:de}}catch(ee){if(ee.message&&ee.message.includes("Illegal"))return{language:I,value:Bf(Y),illegal:!0,relevance:0,_illegalBy:{message:ee.message,index:an,context:Y.slice(an-100,an+100),mode:ee.mode,resultSoFar:ct},_emitter:tt};if(i)return{language:I,value:Bf(Y),illegal:!1,relevance:0,errorRaised:ee,_emitter:tt,_top:de};throw ee}}function f(I){const Y={value:Bf(I),illegal:!1,relevance:0,_top:s,_emitter:new o.__emitter(o)};return Y._emitter.addText(I),Y}function p(I,Y){Y=Y||o.languages||Object.keys(t);const F=f(I),V=Y.filter(q).filter(W).map(ne=>d(ne,I,!1));V.unshift(F);const X=V.sort((ne,ge)=>{if(ne.relevance!==ge.relevance)return ge.relevance-ne.relevance;if(ne.language&&ge.language){if(q(ne.language).supersetOf===ge.language)return 1;if(q(ge.language).supersetOf===ne.language)return-1}return 0}),[N,C]=X,Q=N;return Q.secondBest=C,Q}function m(I,Y,F){const V=Y&&n[Y]||F;I.classList.add("hljs"),I.classList.add(`language-${V}`)}function h(I){let Y=null;const F=c(I);if(l(F))return;if(fe("before:highlightElement",{el:I,language:F}),I.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(I)),o.throwUnescapedHTML))throw new EP("One of your code blocks includes unescaped HTML.",I.innerHTML);Y=I;const V=Y.textContent,X=F?u(V,{language:F,ignoreIllegals:!0}):p(V);I.innerHTML=X.value,m(I,F,X.language),I.result={language:X.language,re:X.relevance,relevance:X.relevance},X.secondBest&&(I.secondBest={language:X.secondBest.language,relevance:X.secondBest.relevance}),fe("after:highlightElement",{el:I,result:X,text:V})}function w(I){o=D4(o,I)}const y=()=>{_(),Cs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){_(),Cs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function _(){if(document.readyState==="loading"){x=!0;return}document.querySelectorAll(o.cssSelector).forEach(h)}function A(){x&&_()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function E(I,Y){let F=null;try{F=Y(e)}catch(V){if(Ja("Language definition for '{}' could not be registered.".replace("{}",I)),i)Ja(V);else throw V;F=s}F.name||(F.name=I),t[I]=F,F.rawDefinition=Y.bind(null,e),F.aliases&&G(F.aliases,{languageName:I})}function R(I){delete t[I];for(const Y of Object.keys(n))n[Y]===I&&delete n[Y]}function B(){return Object.keys(t)}function q(I){return I=(I||"").toLowerCase(),t[I]||t[n[I]]}function G(I,{languageName:Y}){typeof I=="string"&&(I=[I]),I.forEach(F=>{n[F.toLowerCase()]=Y})}function W(I){const Y=q(I);return Y&&!Y.disableAutodetect}function K(I){I["before:highlightBlock"]&&!I["before:highlightElement"]&&(I["before:highlightElement"]=Y=>{I["before:highlightBlock"](Object.assign({block:Y.el},Y))}),I["after:highlightBlock"]&&!I["after:highlightElement"]&&(I["after:highlightElement"]=Y=>{I["after:highlightBlock"](Object.assign({block:Y.el},Y))})}function ue(I){K(I),r.push(I)}function fe(I,Y){const F=I;r.forEach(function(V){V[F]&&V[F](Y)})}function Te(I){return Cs("10.7.0","highlightBlock will be removed entirely in v12.0"),Cs("10.7.0","Please use highlightElement now."),h(I)}Object.assign(e,{highlight:u,highlightAuto:p,highlightAll:_,highlightElement:h,highlightBlock:Te,configure:w,initHighlighting:y,initHighlightingOnLoad:v,registerLanguage:E,unregisterLanguage:R,listLanguages:B,getLanguage:q,registerAliases:G,autoDetection:W,inherit:D4,addPlugin:ue}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=_P,e.regex={concat:ps,lookahead:m5,either:E1,optional:$L,anyNumberOfTimes:FL};for(const I in wu)typeof wu[I]=="object"&&k1.exports(wu[I]);return Object.assign(e,wu),e};var ec=CP({}),AP=ec;ec.HighlightJS=ec;ec.default=ec;const Ir=AP;var Nm={},NP={get exports(){return Nm},set exports(e){Nm=e}};(function(e){(function(){var t;t=e.exports=i,t.format=i,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=n);function n(){console.log(i.apply(null,arguments))}function r(a,s){return i.apply(null,[a].concat(s))}function i(a){for(var s=1,o=[].slice.call(arguments),l=0,c=a.length,u="",d,f=!1,p,m,h=!1,w,y=function(){return o[s++]},v=function(){for(var x="";/\d/.test(a[l]);)x+=a[l++],d=a[l];return x.length>0?parseInt(x):null};li.data.relevance&&(i=s)}return i}function DP(e,t){Ir.registerLanguage(e,t)}const LP=function(e,t){if(typeof e=="string")Ir.registerAliases(t,{languageName:e});else{let n;for(n in e)RP.call(e,n)&&Ir.registerAliases(e[n],{languageName:n})}};function PP(e){return!!Ir.getLanguage(e)}function zP(){return Ir.listLanguages()}class BP{constructor(t){this.options=t,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}addKeyword(t,n){this.openNode(n),this.addText(t),this.closeNode()}addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=t.split(".").map((a,s)=>s?a+"_".repeat(s):this.options.classPrefix+a),r=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const We={highlight:_5,highlightAuto:IP,registerLanguage:DP,registered:PP,listLanguages:zP,registerAlias:LP};We.registerLanguage("arduino",kD);We.registerLanguage("bash",SD);We.registerLanguage("c",_D);We.registerLanguage("cpp",ED);We.registerLanguage("csharp",TD);We.registerLanguage("css",ID);We.registerLanguage("diff",DD);We.registerLanguage("go",LD);We.registerLanguage("graphql",PD);We.registerLanguage("ini",zD);We.registerLanguage("java",BD);We.registerLanguage("javascript",qD);We.registerLanguage("json",HD);We.registerLanguage("kotlin",VD);We.registerLanguage("less",ZD);We.registerLanguage("lua",JD);We.registerLanguage("makefile",eL);We.registerLanguage("markdown",tL);We.registerLanguage("objectivec",nL);We.registerLanguage("perl",rL);We.registerLanguage("php",iL);We.registerLanguage("php-template",aL);We.registerLanguage("plaintext",sL);We.registerLanguage("python",oL);We.registerLanguage("python-repl",lL);We.registerLanguage("r",cL);We.registerLanguage("ruby",uL);We.registerLanguage("rust",dL);We.registerLanguage("scss",bL);We.registerLanguage("shell",vL);We.registerLanguage("sql",wL);We.registerLanguage("swift",AL);We.registerLanguage("typescript",ML);We.registerLanguage("vbnet",RL);We.registerLanguage("wasm",OL);We.registerLanguage("xml",IL);We.registerLanguage("yaml",DL);const ms=function(e){if(e==null)return A1;if(typeof e=="string")return $P(e);if(typeof e=="object")return FP(e);if(typeof e=="function")return E5(e);throw new Error("Expected function, string, or array as test")};function FP(e){const t=[];let n=-1;for(;++nl&&(l=c):c&&(l!==void 0&&l>-1&&o.push(` +`.repeat(l)||" "),l=-1,o.push(c))}return o.join("")}function C5(e,t,n){return e.type==="element"?qP(e,t,n):e.type==="text"?n.whitespace==="normal"?A5(e,n):HP(e):[]}function qP(e,t,n){const r=N5(e,n),i=e.children||[];let a=-1,s=[];if(jP(e))return s;let o,l;for(Mm(e)||$4(e)&&P4(t,e,$4)?l=` +`:UP(e)?(o=2,l=2):T5(e)&&(o=1,l=1);++a-1?r.slice(0,c):r}return(c,u)=>{G0(c,"element",(d,f,p)=>{const m=p;if(!m||!("tagName"in m)||m.tagName!=="pre"||d.tagName!=="code"||!d.properties)return;const h=GP(d);if(h===!1||!h&&!o||h&&i&&i.includes(h))return;Array.isArray(d.properties.className)||(d.properties.className=[]),d.properties.className.includes(l)||d.properties.className.unshift(l);let w;try{w=h?We.highlight(h,U4(m),{prefix:r}):We.highlightAuto(U4(m),{prefix:r,subset:s})}catch(y){const v=y;(!a||!/Unknown language/.test(v.message))&&u.fail(v,d,"rehype-highlight:missing-language");return}!h&&w.data.language&&d.properties.className.push("language-"+w.data.language),Array.isArray(w.children)&&w.children.length>0&&(d.children=w.children)})}}function GP(e){const t=e.properties&&e.properties.className;let n=-1;if(Array.isArray(t))for(;++ne.theme.font.fontFamily}; + font-weight: 700; +`,j4=P(Do)` + margin-block: 48px; + font-size: 48px; + line-height: 56px; + @media screen and (max-width: 768px) { + margin-block: 36px; + font-size: 36px; + line-height: 42px; + } +`,XP=P(Do)` + margin-block: 48px; + font-size: 36px; + line-height: 44px; + @media screen and (max-width: 768px) { + margin-block: 36px; + font-size: 27px; + line-height: 33px; + } +`,QP=P(Do)` + margin-block: 40px; + font-size: 28px; + line-height: 36px; + @media screen and (max-width: 768px) { + margin-block: 30px; + font-size: 21px; + line-height: 27px; + } +`,ZP=P(Do)` + margin-block: 32px; + font-size: 24px; + line-height: 32px; + @media screen and (max-width: 768px) { + margin-block: 24px; + font-size: 18px; + line-height: 24px; + } +`,JP=P(Do)` + margin-block: 32px; + font-size: 20px; + line-height: 28px; + @media screen and (max-width: 768px) { + margin-block: 24px; + font-size: 15px; + line-height: 21px; + } +`,ez=P(Do)` + margin-block: 24px; + font-size: 16px; + line-height: 24px; + @media screen and (max-width: 768px) { + margin-block: 18px; + font-size: 12px; + line-height: 18px; + } +`,Mt=({level:e,children:t})=>{const n=String(t).split(" ").join("-");switch(e){case 1:return S.jsx(j4,{id:n,children:t});case 2:return S.jsx(XP,{id:n,as:"h2",children:t});case 3:return S.jsx(QP,{id:n,as:"h3",children:t});case 4:return S.jsx(ZP,{id:n,as:"h4",children:t});case 5:return S.jsx(JP,{id:n,as:"h5",children:t});case 6:return S.jsx(ez,{id:n,as:"h6",children:t});default:return S.jsx(j4,{id:n,children:t})}},tz=P.p` + margin-block: 0; + margin-block: 32px; + color: #000000e5; + font-family: ${e=>e.theme.font.fontFamily}; + font-weight: 400; + font-size: 18px; + line-height: 28px; + @media screen and (max-width: 768px) { + margin-block: 24px; + font-size: 13.5px; + line-height: 21px; + } +`,eh=({children:e})=>S.jsx(tz,{children:e}),nz=P.strong` + font-weight: ${e=>e.theme.font.fontWeightBold}; +`,xa=({children:e,type:t="italic"})=>{switch(t){case"italic":return S.jsx("em",{children:e});case"bold":return S.jsx(nz,{children:e});default:return S.jsx("em",{children:e})}},rz=P.div` + height: 1px; + margin-bottom: ${e=>e.theme.scale.scale04}; + background: ${e=>e.theme.color.neutral.gray08}; +`,th=()=>S.jsx(rz,{}),Ff=P.ul` + margin-block: 0; + margin-block: 32px; + padding-inline-start: ${e=>e.theme.scale.scale03}; + list-style-type: ${e=>e.ordered?"decimal":"disc"}; + @media screen and (max-width: 768px) { + margin-block: 24px; + } +`,iz=P.li` + margin-block: 8px; + font-weight: 400px; + font-size: 18px; + line-height: 28px; + @media screen and (max-width: 768px) { + margin-block: 6px; + font-size: 13.5px; + line-height: 21px; + } +`,ka=({ordered:e,children:t})=>{switch(e){case!1:return S.jsx(Ff,{ordered:e,children:t});case!0:return S.jsx(Ff,{as:"ol",ordered:e,children:t});default:return S.jsx(Ff,{ordered:e,children:t})}},nh=({children:e})=>S.jsx(iz,{children:e}),az=P.img` + display: block; + max-width: 90%; + margin-block: 32px; + margin-inline: auto; + border-radius: 12px; + @media screen and (max-width: 768px) { + margin-block: 24px; + } +`,rh=({src:e,alt:t})=>S.jsx(az,{src:e,alt:t}),sz=P.blockquote` + margin-inline: 0; + margin-block: 0; + margin-block: 32px; + padding-left: 12px; + border-left: 4px solid #c8c8c8; +`,ih=({children:e})=>S.jsx(sz,{children:e}),oz=P.main` + padding: 64px; +`,lz=` + # Header 1 + ## Header 2 + ### Header 3 + #### Header 4 + ##### Header 5 + ###### Header 6 + + + This text is *italic* _italic_. + + This text is **bold** __bold__. + + This text is ***mix*** ___mix___. + + This text is ~~mix~~ ~~mix~~. + + - - - + + This is a unordered list + + - list 1 + - list 2 + - list 3 + + This is a ordered list + + 1. list 1 + 2. list 2 + 3. list 3 + + > This is a zone + + This is a javascripe code block: \`const hello = 'Hello Word'\` + + ~~~ ts + let num: number = 1 + console.log(num) + ~~~ + +`,cz=()=>S.jsx(oz,{children:S.jsx(kc,{children:lz,remarkPlugins:[Q0],rehypePlugins:[J0],components:{h1:({level:e,children:t})=>S.jsx(Mt,{level:e,children:t}),h2:({level:e,children:t})=>S.jsx(Mt,{level:e,children:t}),h3:({level:e,children:t})=>S.jsx(Mt,{level:e,children:t}),h4:({level:e,children:t})=>S.jsx(Mt,{level:e,children:t}),h5:({level:e,children:t})=>S.jsx(Mt,{level:e,children:t}),h6:({level:e,children:t})=>S.jsx(Mt,{level:e,children:t}),p:({children:e})=>S.jsx(eh,{children:e}),em:({children:e})=>S.jsx(xa,{children:e}),strong:({children:e})=>S.jsx(xa,{type:"bold",children:e}),hr:()=>S.jsx(th,{}),ul:({depth:e,ordered:t,className:n,children:r})=>S.jsx(ka,{depth:e,ordered:t,className:n,children:r}),ol:({depth:e,ordered:t,className:n,children:r})=>S.jsx(ka,{depth:e,ordered:t,className:n,children:r}),li:({children:e})=>S.jsx(nh,{children:e}),img:({src:e,alt:t})=>S.jsx(rh,{src:e,alt:t}),blockquote:({children:e})=>S.jsx(ih,{children:e})}})}),uz=`# Install + +Read the [quick start](https://github.com/xline-kv/Xline/blob/master/doc/quick-start/README.md) for more information about how to start an xline cluster.`,dz=`# Xline API + +The current version of Xline implements some etcd-compatible APIs, such as KV API, Auth API, Watch API and so on. In the next release, we will further implement the remaining etcd APIs ( v0.3 ~ v0.5 ) ,such as Maintenance, Lease, and provide a client in different languages ( v0.6 ~ v0.8 ). Read the [roadmap](https://github.com/datenlord/Xline#roadmap) for more details. + +Since Xline is fully compatible with etcd interfaces, you can use etcdctl to interact with Xline cluster in the current version. etcdctl can be used as described in the documentation. For more information, please refer to the [documentation](https://github.com/etcd-io/etcd/tree/main/etcdctl) on how to use etcdctl. Read the etcd-compatible API validation test report for more details.`,hz=`Xline is a high-performance distributed key-value storage engine for multi-cluster. It can provide unified data management for multi-cluster scenarios, making mutual access, discovery, and modification simple and convenient. It also provides KV interface, Multi-Version Concurrency Control and is compatible with etcd and K8S. + +Xline is the first geo-distributed consistency management service based on CURP(a WAN consensus protocol, read the paper for more details). It addresses the challenges of convergence and consistency across clouds. + +# Architecture + +**An Xline instance consists of the following layers:** + +- Client Layer: Provides a simple and easy-to-use API for clients to use, which can greatly reduce the complexity of using Xline for business. Xline clients in different languages will be implemented in the later release, and currently etcdctl can be used to initiate requests because Xline APIs are compatible with etcd. +- Access Layer: The access layer mainly includes the communication protocol between client to server or server to server. Xline API is based on gRPC protocol. +- CURP Protocol Layer: The CURP protocol layer implements the core algorithm features, such as leader election, log replication, fast-path and slow-path, which are used to ensure data consistency among Xline multi-node and improve service availability. CURP protocol is the cornerstone and highlight of Xline. +- Functional Logic Layer: This layer implements Xline business logic, including the typical KV Server, Auth Server, Lease Server and Watch Server, etc. Client sends requests to Xline Server through the access layer, and Xline Server dispatches the requests to specific servers for execution. +- Storage Layer: This layer contains two components, Index and DB, where Index is based on BTreeMap while DB is mainly responsible for persistent storage of data. At present, Xline is still in the early stage of development, so DB is mainly implemented based on memory. We will introduce persistent storage in the next release. + +![image](/xline-home/docs/Get-Started/image1.png) + +For more information about the Architecture of Xline, read [Xline Architecture Details](/xline-home/#/docs/Xline-Architecture-Details). + +# Xline In 5 Minutes + +1. Download binary from [release](https://github.com/datenlord/Xline/releases) page. +2. Use the following command to start cluster: +~~~bash +$ ./xline --name node1 --cluster-peers 127.0.0.1:2380 127.0.0.1:2381 --self-ip-port 127.0.0.1:2379 --leader-ip-port 127.0.0.1:2379 +$ ./xline --name node2 --cluster-peers 127.0.0.1:2379 127.0.0.1:2381 --self-ip-port 127.0.0.1:2380 --leader-ip-port 127.0.0.1:2379 +$ ./xline --name node3 --cluster-peers 127.0.0.1:2379 127.0.0.1:2380 --self-ip-port 127.0.0.1:2381 --leader-ip-port 127.0.0.1:2379 +~~~ +3. Download or build etcdctl from [etcd](https://github.com/etcd-io/etcd) project. +4. Use etcdctl to operate the cluster: +~~~bash +$ etcdctl --endpoints=http://127.0.0.1:2379 put foo bar +$ etcdctl --endpoints=http://127.0.0.1:2379 get foo +~~~`,fz=`# Performance Comparison + +We compare Xline with ETCD in a simulated multi-cluster environment. The details of the deployment are shown below. + +![image](/xline-home/docs/Deploy/image1.png) + +We compare the performance with two different workloads. One is 1 key case, the other is 100k key space case. Here is the test result. + +![image](/xline-home/docs/Deploy/xline-key-perf.png)`,pz=`# v0.1.0 + +#### What is it? + +\`Xline\` is a geo-distributed KV store for metadata management, which is based on the \`Curp\` protocol. + +#### Why make it? + +Existing distributed KV stores mostly adopt the \`Raft\` consensus protocol, which takes two RTTs to complete a request. When deployed in a single data center, the latency between nodes is low, so it will not have a big impact on performance. However, when deployed across data centers, the latency between nodes may be tens or hundreds of milliseconds, at which point the \`Raft\` protocol will become a performance bottleneck. The \`Curp\` protocol is designed to solve this problem. It can reduce one RTT when commands do not conflict, thus improving performance. + +#### What does it provide? + +- Etcd Compatible API + - \`Kv\` service + - \`Watch\` service + - \`Auth\` service +- basic implementation of the \`Curp\` protocol +- basic \`Xline\` client (use \`Curp\` directly) +- benchmark tool + +#### Usage + +[Usage doc](https://github.com/datenlord/Xline/blob/v0.1.0/USAGE.md) + +#### Note + +In this release, we only provide binary files for X86_64 linux. Other platforms need to be compiled by yourself. we will add more support in the future. + +#### Links + +GitHub: https://github.com/datenlord/Xline +Paper of Curp: https://www.usenix.org/system/files/nsdi19-park.pdf + +# v0.2.0 + +#### Features: + +- Enable Xline to boot up from the config file xline_server.conf ([#145](https://github.com/datenlord/Xline/pull/145)) +- Support ETCD APIs, like the lease API and the lock API ([#142](https://github.com/datenlord/Xline/pull/145), [#153](https://github.com/datenlord/Xline/pull/145)) +- Enable the recovery mechanism in the CURP module ([#146](https://github.com/datenlord/Xline/pull/145)) +- Add ETCD APIs compatibility test (test report: (report)[./VALIDATION_REPORT.md]) + +#### Fix Bugs + +- Fix panic in the benchmark ([#123](https://github.com/datenlord/Xline/pull/123)) +- Fix the issue that modifies kv pairs will fail after watching them in etcdctl ([#148](https://github.com/datenlord/Xline/pull/123)) + +# v0.3.0 + +#### Features: + +Implement a persistent storage layer to enable durability, including: +Implement a storage engine layer to abstract the concrete storage engine, like rocksdb, +and enable upper layer storage function ([#185](https://github.com/datenlord/Xline/pull/185), [#187](https://github.com/datenlord/Xline/pull/187)) +Enable recover logic for curp and xline ([#194](https://github.com/datenlord/Xline/pull/194), [#184](https://github.com/datenlord/Xline/pull/194)) + +#### Fix Bugs: + +Fix concurrent cmd order bug ([#197](https://github.com/datenlord/Xline/issues/197)) + +# v0.4.0 + +#### Features: + +1. Introduce batching mechanism to improve network bandwidth utilization +2. Implement the snapshot feature for CURP consensus protocol, +3. Implement the snapshot relevant API,which is compatible with etcdctl. The rest of other APIs in etcdctl maintenance will be implemented in the future. + +#### Fix Bugs: + +1. Fix a bug that commands will execute out of order in some concurrent cases (issue [#197](https://github.com/datenlord/Xline/issues/197)), resolve in the pr [#195](https://github.com/datenlord/Xline/issues/195) +2. Fix a bug that the gc task will panic during benchmark(issue [#206](https://github.com/datenlord/Xline/issues/206)), resolve in the pr [#210](https://github.com/datenlord/Xline/issues/210) +3. Fix a bug that the lock feature will work abnormally in some cases(issue [#209](https://github.com/datenlord/Xline/issues/209)), resolve in the pr [#212](https://github.com/datenlord/Xline/issues/212) +4. Fix a bug that some concurrent put requests will get wrong revisions (issue [#209](https://github.com/datenlord/Xline/issues/212)), resolve in the pr [#238](https://github.com/datenlord/Xline/issues/238) + +#### Benchmark: + +Since we implemented the persistence feature for xline in v0.3.0, we have re-benchmarked xline in this release. The benchmark report can be viewed in the Performance Comparison section in our README file. + +# v0.4.1 + +#### Features + +- Watch Progress Notify [#309](https://github.com/datenlord/Xline/issues/309) + +#### Refactors + +- Sharing state between CurpServer and CurpClient [#299](https://github.com/datenlord/Xline/issues/299) +- Refactor the XlineServer [#293](https://github.com/datenlord/Xline/issues/293) +- Refactor curp fast read implementation [#270](https://github.com/datenlord/Xline/issues/270) +- Improve the read and write logic for the RocksSnapshot [#263](https://github.com/datenlord/Xline/issues/263) +- Refactor the watch server implementation [#253](https://github.com/datenlord/Xline/issues/253) +- Refactor the dependencies of lease server [#251](https://github.com/datenlord/Xline/issues/251) + +#### Fix Bugs + +- Test_kv_authorization block [#291](https://github.com/datenlord/Xline/issues/291) +- The background command workers will panic in the integration test "recovery_after_compaction" [#285](https://github.com/datenlord/Xline/issues/285) +- Handle_propose in raw_cup will panic when try notify events [#280](https://github.com/datenlord/Xline/issues/280) +- Watch prev_kv [#277](https://github.com/datenlord/Xline/issues/277) + +# v0.5.0 + +#### Features: + +- [Feature]: Implemented the Compact feature, which includes the following two aspects (Read issue [#188](https://github.com/xline-kv/Xline/issues/188) for more details about compaction design): + - Implemented historical version compaction feature. The compaction API is compatible with the etcd interface. Resolved in pr [#311](https://github.com/xline-kv/Xline/pull/311) + - Implemented an automatic compaction mode, supporting both periodic Strategy and Revision Strategy. It is not enabled by default. Resolved in pr [#401](https://github.com/xline-kv/Xline/pull/401) +- [Feature]: Implement a Rust SDK for the Xline client (xline-client crate) to fully leverage the performance of CURP protocol. Currently, the SDK covers functionalities: + - Watch: Implemented in pr #[321](https://github.com/xline-kv/Xline/pull/321) + - Kv: Implemented in pr #[318](https://github.com/xline-kv/Xline/pull/318) + - Maintenance: Implemented in pr #[323](https://github.com/xline-kv/Xline/pull/323) + - Auth: Implemented in pr #[320](https://github.com/xline-kv/Xline/pull/320) + - Lease: Implemented in pr #[319](https://github.com/xline-kv/Xline/pull/319) + - Lock: Implemented in pr #[322](https://github.com/xline-kv/Xline/pull/322) + - Compaction: Implemented in pr #[389](https://github.com/xline-kv/Xline/pull/389) +- [Feature]: Implement a command line tool for Xline, which is named xlinectl. Resolved in pr #[348](https://github.com/xline-kv/Xline/pull/348) +- [Feature]: Support single node cluster #[335](https://github.com/xline-kv/Xline/issues/335) +- [Feature]: Support multiplatform for Xline. Read #[doc](https://github.com/xline-kv/Xline/tree/master/doc/quick-start) for more details. +- [Feature]: Support dns resolution for Xline cluster #[351](https://github.com/xline-kv/Xline/issues/351) +- [Feature]: Support grpc health checking protocol, resolved in pr #[385](https://github.com/xline-kv/Xline/pull/385) +- [Feature]: Add madsim simulation in Curp tests #[282](https://github.com/xline-kv/Xline/issues/282) + +#### Fix Bugs + +- [Bug]: Madsim Curp integration tests sometimes fail #[361](https://github.com/xline-kv/Xline/issues/361) +- [Bug]: lease may not synced in lease server #[343](https://github.com/xline-kv/Xline/issues/343) +- [Bug]: EventListener will lose event since it's not cancellation safe. #[339](https://github.com/xline-kv/Xline/issues/339) +- [Bug]: Resolve failing tests related to serialized size. #[259](https://github.com/xline-kv/Xline/issues/259) + +#### Contributors + +We'd like to thank all the contributors who worked on this release! + +[@liubog2008](https://github.com/liubog2008) + +# v0.6.0 + +#### New Features + +- [Feature]: Add membership change mechanism for CUPR consensus Protocol (Read design doc [#306](https://github.com/xline-kv/Xline/issues/306) for more details) +- [Feature]: Implement cluster server and client [#464](https://github.com/xline-kv/Xline/pull/464), [#465](https://github.com/xline-kv/Xline/pull/465) +- [Feature]: Implement the graceful shutdown feature. +- [Feature]: Implement the xlinctl to communicate with the xline cluster. Currently, the xlinectl covers functionalities: + - Compaction and member command: Implemented in pr [#484](https://github.com/xline-kv/Xline/pull/484) + - Txn, watch and lock command: Implemented in pr [#428](https://github.com/xline-kv/Xline/pull/484) + - Role command: Implemented in pr [#427](https://github.com/xline-kv/Xline/pull/427) + - User command: Implemented in pr [#426](https://github.com/xline-kv/Xline/pull/426) + - Snapshot and auth command: Implemented in pr [#425](https://github.com/xline-kv/Xline/pull/425) + - Delete and lease command: Implemented in pr [#424](https://github.com/xline-kv/Xline/pull/424) + +#### Bug Fixes + +- [Bug]: benchmark client cannot connect to server [#462](https://github.com/xline-kv/Xline/pull/462) +- [Bug]: remove stop in simulation tests [#458](https://github.com/xline-kv/Xline/pull/458) +- [Bug]: execute out of order [#454](https://github.com/xline-kv/Xline/pull/454) +- [Bug]: check the password on leader [#435](https://github.com/xline-kv/Xline/pull/435) +- [Bug]: remove recovery of uncommitted pool [#419](https://github.com/xline-kv/Xline/pull/419) +- [Bug]: CURP TLA+ quorum size calculation & property check [#418](https://github.com/xline-kv/Xline/pull/418) +- [Bug]: fix propose doesn't handle SyncedError [#407](https://github.com/xline-kv/Xline/pull/407) + +#### Refactor + +- [Refactor]: reduce code duplication [#407](https://github.com/xline-kv/Xline/pull/407) +- [Refactor]: Take into account the interleaving states of a request broadcast in TLA+ [#429](https://github.com/xline-kv/Xline/pull/429) +- [Refactor]: Refine the bench client implementation [#496](https://github.com/xline-kv/Xline/pull/496) +- [Refactor]: Simplified the error handling logic [#480](https://github.com/xline-kv/Xline/pull/480) +- [Refactor]: Improve readability of bootstrap errors [#432](https://github.com/xline-kv/Xline/pull/432) +- [Refactor]: Imporve command serialization in execution and after-sync [#421](https://github.com/xline-kv/Xline/pull/421), [#422](https://github.com/xline-kv/Xline/pull/422) + +#### Contributors + +- [@EAimTY](https://github.com/EAimTY) +- [@MarkGaox](https://github.com/MarkGaox) +- [@Kikkon](https://github.com/Kikkon) + +Note: +Known issue: If the cluster is shut down immediately after adding a member, the leader node may not shut down properly, continuously trying to send entries to the shut-down new node. Read issue [#526](https://github.com/xline-kv/Xline/issues/526) for more details. +`,mz=`# Xline Architecture Details + +![image](/xline-home/docs/Xline-Architecture-Details/image1.jpg)`,gz="/xline-home/assets/dropdown-close-533c3c65.svg",yz="/xline-home/assets/dropdown-active-7d279a33.svg",bz=P.div` + height: 10px; + width: 10px; + margin-inline: 8px; + border-radius: 50%; + background: ${e=>e.theme.color.neutral.gray05}; +`,M5=P.li` + display: flex; + align-items: center; + margin-bottom: ${e=>e.theme.scale.scale03}; +`,vz=P(M5)` + display: ${e=>e.isActive?"flex":"none"}; + padding-left: 14px; +`,wz=P.div` + display: inline-block; + padding-inline: 8px; + height: 100%; +`,q4=P.img` + width: 12px; + height: 12px; +`,R5=P.p` + color: ${e=>e.theme.color.neutral.gray10}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: 16px; + line-height: 18px; + cursor: pointer; +`,xz=P(R5)` + font-weight: ${e=>e.theme.font.fontWeightRegular}; + cursor: pointer; +`,O5=({item:e})=>S.jsx("ul",{children:e.map(t=>S.jsx(kz,{items:t},t.title))}),kz=({items:e})=>{const[t,n]=ce.useState(!1);return S.jsxs(S.Fragment,{children:[S.jsxs(M5,{onClick:()=>n(!t),children:[S.jsx(wz,{children:t?S.jsx(q4,{src:yz}):S.jsx(q4,{src:gz})}),S.jsx(R5,{children:e.title})]}),S.jsx("ul",{children:S.jsx(Sz,{items:e.children,isActive:t})})]})},Sz=({items:e,isActive:t})=>{const n=ji();return S.jsx(S.Fragment,{children:e.map(r=>S.jsxs(vz,{isActive:t,children:[S.jsx(bz,{}),S.jsx(xz,{onClick:()=>{n(r.url),setTimeout(()=>{const i=document.getElementById(r.id||"");console.log(i),i==null||i.scrollIntoView({behavior:"smooth"})},100)},children:r.title})]},r.id))})},_z=Object.assign({"/src/docs/Deploy.md":uz,"/src/docs/Develop.md":dz,"/src/docs/Get-Started.md":hz,"/src/docs/Performance-Comparison.md":fz,"/src/docs/What's-New.md":pz,"/src/docs/Xline-Architecture-Details.md":mz}),Ez=P.div` + display: flex; + align-items: center; + justify-content: center; + height: calc(86px + 416px); + padding-top: 86px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + height: calc(63px + 312px); + padding-top: 64.5px; + } + @media screen and (max-width: 768px) { + height: calc(53px + 208px); + padding-top: 43px; + } +`,Tz=P.h1` + position: relative; + display: inline-block; + padding-inline: 32px; + color: white; + font-weight: 700; + font-size: 72px; + line-height: 80.64px; + /* text-transform: capitalize; */ + line-height: 1.1; + transform: translateY(-10%); + @media screen and (max-width: 1024px) { + padding-inline: 24px; + font-size: 54px; + } + @media screen and (max-width: 768px) { + padding-inline: 16px; + font-size: 36px; + } +`,Cz=P.img` + z-index: -1; + position: absolute; + left: 50%; + bottom: -17px; + transform: translateX(-45%); + width: 295.01px; + height: 35.35px; + @media screen and (max-width: 1024px) { + bottom: -12px; + width: 222px; + height: 27px; + } + @media screen and (max-width: 768px) { + bottom: -8px; + width: 148px; + height: 18px; + } +`,Az=P.main` + display: flex; + margin-inline: auto; + padding-block: ${e=>e.theme.scale.scale05}; + padding-inline: ${e=>e.theme.scale.scale07}; + max-width: ${e=>e.theme.scale.scale12}; + // - - - + /* height: 200px; + background-color: lightcoral; */ + @media screen and (max-width: 1024px) { + padding-block: 36px; + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-block: 24px; + padding-inline: 64px; + } +`,Nz=P.div` + width: 75%; + /* flex: 1; */ + + // - - - + /* min-height: 100px; + background-color: lightcyan; */ + @media screen and (max-width: 1024px) { + width: 100%; + } +`,Mz=P.div` + flex-shrink: 0; + width: 25%; + margin-right: ${e=>e.theme.scale.scale05}; + // - - - + /* height: 100px; + background-color: lightblue; */ + @media screen and (max-width: 1024px) { + display: none; + } +`,Rz=P.p` + margin-bottom: ${e=>e.theme.scale.scale06}; + color: ${e=>e.theme.color.neutral.gray07}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize5}; + line-height: ${e=>e.theme.font.lineHeight5}; +`,Oz=()=>{const{params:e}=t1();return ce.useEffect(()=>{e==="Xline-Architecture-Details"&&window.scrollTo(0,0)},[e]),S.jsxs(S.Fragment,{children:[S.jsx(Ez,{children:S.jsxs(Tz,{children:[e==null?void 0:e.split("-").join(" "),S.jsx(Cz,{src:Ra,alt:"underline"})]})}),S.jsxs(Az,{children:[S.jsxs(Mz,{children:[S.jsx(Rz,{children:"Docs"}),S.jsx(O5,{item:K3})]}),S.jsx(Nz,{children:S.jsx(kc,{children:_z[`/src/docs/${e}.md`],remarkPlugins:[Q0],rehypePlugins:[J0],components:{h1:({level:t,children:n})=>S.jsx(Mt,{level:t,children:n}),h2:({level:t,children:n})=>S.jsx(Mt,{level:t,children:n}),h3:({level:t,children:n})=>S.jsx(Mt,{level:t,children:n}),h4:({level:t,children:n})=>S.jsx(Mt,{level:t,children:n}),h5:({level:t,children:n})=>S.jsx(Mt,{level:t,children:n}),h6:({level:t,children:n})=>S.jsx(Mt,{level:t,children:n}),p:({children:t})=>S.jsx(eh,{children:t}),em:({children:t})=>S.jsx(xa,{children:t}),strong:({children:t})=>S.jsx(xa,{type:"bold",children:t}),hr:()=>S.jsx(th,{}),ul:({depth:t,ordered:n,className:r,children:i})=>S.jsx(ka,{depth:t,ordered:n,className:r,children:i}),ol:({depth:t,ordered:n,className:r,children:i})=>S.jsx(ka,{depth:t,ordered:n,className:r,children:i}),li:({children:t})=>S.jsx(nh,{children:t}),img:({src:t,alt:n})=>S.jsx(rh,{src:t,alt:n}),blockquote:({children:t})=>S.jsx(ih,{children:t})}})})]})]})},Iz=`# Basic Concept + +## CAP Theorem and PACELC theorem + +In theoretical computer science, the CAP theorem, also named Brewer's theorem after computer scientist Eric Brewer, states that any distributed data store can provide only two of the following three guarantees: + +- Consistency: Every read receives the most recent write or an error. +- Availability: Every Request receives a (non-error) response, without the guarantee that it contains the most recent write. +- Partition tolerance: The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes. + +To deal with a [network partition](https://en.wikipedia.org/wiki/Network_partition) failure, one of the following options must be chosen: + +- cancel the operation and thus decrease the availability but ensure consistency. +- proceed with the operation and thus provide availability but risk inconsistency. + +Thus, if there is a network partition, one has to choose between consistency or availability. Note that consistency as defined in the CAP theorem is quite different from the consistency guaranteed in [ACID database transactions](https://en.wikipedia.org/wiki/ACID). + +Eric Brewer argues that the often-used "two out of three" concept can be somewhat misleading because system designers need only to sacrifice consistency or availability in the presence of partitions, but that in many systems partitions are rare. The **PACELC theorem** is an extension to the CAP theorem. It states that in case of network partitioning (P) in a distributed computer system, one has to choose between availability (A) and consistency (C) (as per the CAP theorem), but else (E), even when the system is running normally in the absence of partitions, one has to choose between latency (L) and consistency (C). + +Read the following docs for more information: + +1. CAP Theorem: + - Paper: [Brewer's Conjecture and the Feasibility of Consistent Available Partition-Tolerant Web Services](https://users.ece.cmu.edu/~adrian/731-sp04/readings/GL-cap.pdf) + - Blog: [An Illustrated Proof of the CAP Theorem](https://mwhittaker.github.io/blog/an_illustrated_proof_of_the_cap_theorem/) +2. PACELC Theorem(Paper): [Consistency Tradeoffs in Modern Distributed Database System Design](https://www.cs.umd.edu/~abadi/papers/abadi-pacelc.pdf) + +## FLP Impossibility + +The paper "[Impossibility of Distributed Consensus with One Faulty Process](https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf)", published by Fischer, Lynch and Patterson in April 1985, proposed the "FLP Impossibility", specifying an upper bound on what is possible using distributed processes in an asynchronous environment. The consensus problem is solvable in a synchronous environment where processes can proceed simultaneously. The synchronous model allows detecting faults by waiting the entire length of a step for a process to reply, and assuming it has crashed if no reply is received. + +Mechanisms that determine whether a failure has occurred based on how long a reply has been received do not work in a fully asynchronous message-passing distributed system. This is because in an asynchronous environment, there is no upper limit to how long a process can reply to a message after completing its work. Thus, it is impossible to tell whether a process has crashed or has taken a long time to respond. The FLP impossibility shows that in a completely asynchronous system, even if only one node fails, there is no algorithm that can bring the system to consensus. This impossibility comes from the worst-case scheduling scenario, which is unlikely to happen in practice except in adversarial situations, such as an intelligent denial-of-service attacker in the network. In most normal cases, process scheduling has a degree of natural randomness. + +A randomized consensus algorithm can circumvent the FLP Impossibility, achieving security and effectiveness with overwhelming probability, even in the worst case scheduling scenario, such as an intelligent denial-of-service attacker in the network. + +# Consensus Protocol + +## Paxos + +Paxos is a consensus algorithm proposed by Leslie Lamport in 1989. The initial paper was "[The Part-Time Parliament](http://lamport.azurewebsites.net/pubs/pubs.html#lamport-paxos)", but it was not published. Lamport wrote “[Paxos Made Simple](https://lamport.azurewebsites.net/pubs/paxos-simple.pdf)” in 2001 and formally proposed the algorithm. + +Paxos uses proposals to drive the entire algorithm, so that the system resolves to the same proposal. Each node continuously proposes a proposal through messaging, and each proposal includes a proposal number and a proposal value. Paxos considers that if more than half of the nodes in the cluster unanimously accept the proposal, a consensus on the proposal is reached and the proposal is said to be **chosen**. + +Paxos divides the system into the following roles: + +- Client: The client sends a request to the distributed system and waits for a response. +- Proposer: When the proposer receives a request from the client, it makes a relevant proposal, tries to get the receiver to accept the proposal, and coordinates in case of conflict to drive the algorithm to run. +- Acceptor: also called voter, votes to accept or reject the proposer's proposal, and if more than half of the receivers accept the proposal, the proposal is chosen. +- Learners: Learners can only learn the chosen proposal and do not participate in the proposal voting. Once the client's request is unified by the acceptors, the learner can execute the requested operation in the proposal and initiate a response to the client. To improve system availability, multiple learners can be added. + +Paxos represents a family of protocols, including: + +- Basic Paxos: The basic protocol, allowing consensus about a single value. +- Multi Paxos: Allow the protocol to handle a stream of messages with less overhead than Basic Paxos. +- [Cheap Paxos](https://lamport.azurewebsites.net/pubs/web-dsn-submission.pdf): Reduce number of nodes needed via dynamic reconfiguration in exchange for reduced burst fault tolerance. +- [Fast Paxos](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-2005-112.pdf): Reduce the number of round trips in exchange for reduced fault tolerance. + +Since Paxos is difficult to understand, algorithms like Raft are designed to be easier to understand. + +## Raft + +In 2013, Diego Ongaro and John Ousterhout of Stanford University published “[In Search of an Understandable Consensus Algorithm with the goal of comprehensibility](https://raft.github.io/raft.pdf)”, formally proposing the Raft algorithm, which aims to optimize the Paxos family of algorithms into a consensus algorithm that is easier to understand and equally satisfying in terms of [safety and liveness](https://en.wikipedia.org/wiki/Safety_and_liveness_properties). + +Raft is similar to Multi-Paxos in that it is a leader-based consensus algorithm. Nodes in the Raft algorithm can only be in one of three states at any given time. + +- Leader: The leader is responsible for handling all client requests and log replication. There can be at most one working leader in the system at the same time. +- Follower: Passively handling requests from the leader. Most of the nodes in the cluster are in this state. +- Candidate: A transitional state between leader and follower, used to elect a new leader. + +Follower persists requests from the leader as log entries as soon as they are received. When a quorum (majority) of nodes confirm that the entry has persisted in their logs, the leader commits the log and followers apply the log entry to its own state machine. When there is a network partition in the system, the partition containing the majority of nodes can still process client requests normally. + +Raft ensures strong consistency of the distributed system through the leader. Raft supports leader election. When the leader crashes, one of the followers is elected as the new leader. Only the follower with more complete logs than the majority of nodes in the cluster can be elected as a leader. From this implementation of leader election, Raft is not a Byzantine fault-tolerant consensus algorithm. Any node can interfere with the cluster by initiating an election and falsely claiming to have the latest logs. + +In addition, there are several optimizations that can be applied to Raft. Prevote can be used to introduce a pre-selection of possible leaders, allowing them to gauge their ability to become leaders before potentially disrupting the cluster. Joint consensus can support arbitrary grouping changes, allowing for better scaling. Batching and pipelining can help high-throughput systems perform better. + +## CURP + +The CURP algorithm was proposed by Seo Jin Park and John Ousterhout of Stanford University in their paper “[Exploiting Commutativity For Practical Fast Replication](https://www.usenix.org/system/files/nsdi19-park.pdf)” published in 2019. + +Traditional approaches to replication, be it Raft or Multi-Paxos, require client requests to be ordered before making them durable by copying them to replica. As a result, clients must wait for two round-trip times (RTTs) before updates complete. The Consistent Unordered Replication Protocol (CURP) allows clients to replicate requests that have not yet been ordered, as long as they are commutative. This strategy allows most operations to complete in 1 RTT. + +CURP supplements a system's existing replication mechanism with a lightweight form of replication without ordering based on witness. A client replicates each operation to one or more witnesses in parallel with sending the request to the primary server. The primary can execute the operation and return to the client without waiting for normal replication, which happens asynchronously. This allows operations to complete in 1 RTT, as long as all witnessed-but-not-yet-replicated operations are commutative. Noncommutative operations still require 2 RTTs. If the primary crashes, information from witnesses is combined with that from the normal replicas to re-create a consistent server state. + +Xline is a distributed key-value store engine which can achieve high-performance data access and strong consistency in cross data center scenarios. The network latency between different data centers is very high, often tens or even hundreds of milliseconds. Ideally, since CURP protocol can save an RTT to reach consensus than Raft or Multi-Paxos does, Xline uses CURP to achieve high-performance data access and strong consistency in cross data center situations. + +Read the [blog](/xline-home/#/blog) for more information about the CURP Protocol.`,Dz=`Key-value stores are used as stand-alone NoSQL systems but they are also used as a part of more complex pipelines and systems such as machine learning and relational systems. + +B-trees and Log-Structured Merge-trees (LSM trees) are two of the most widely used data structures for organizing and storing data in data-intensive applications. However, each of them has its own trade-offs. The purpose of this paper is to compare these two data structures using a quantitative approach. + +# Metrics + +In general, there are three key metrics to measure the performance of a data structure: write amplification, read amplification, and spatial amplification. This section aims to describe these metrics. + +For hard disk drives (HDDs), the cost of disk seek is enormous, such that the performance of random read/write is worse than that of sequential read/write. Therefore, the performance of sequential disk reads and writes is much better than that of random reads and writes. Even for SSDs, sequential read and write performance is better than random read and write. + +## Write Amplification + +Write amplification means that the actual amount of data written to the storage media is greater than the amount of data expected to be written. + +Write amplification occurs because the database itself, in addition to storing data, also needs to store some metadata, such as indexes, wal logs, etc., to improve performance or crash consistency. In addition to metadata, write amplification can also occur on the storage media itself. For example, SSDs have their own garbage collection mechanism that can cause write amplification. Since the lifetime of flash-based storage devices is related to the number of erases, write amplification can reduce the lifetime of flash memory. + +## Read Amplification + +Read amplification is when the amount of data needed to be read per query is greater than the amount of data expected to be read. + +Read amplification occurs because databases often require metadata, such as indexes, to be queried first. The use of caching can reduce read amplification. Also, note that the units of write amplification and read amplification are different. Write amplification measures how much more data is written than the application thinks, while read amplification counts the number of disk reads to execute a query. + +## Space Amplification + +Space amplification is when the data stored in a storage medium is larger than the data stored in a database application + +# LSM Tree And B-Tree + +In the [LSM tree](https://en.wikipedia.org/wiki/Log-structured_merge-tree), data is organized into levels. The data at level 0 resides entirely in memory, while the rest of the levels reside on disk. New records are inserted into level 0. As more data is inserted, when level 0 exceeds a certain size threshold, it is merged into leve 1. If level 1 exceeds a certain size threshold, it is merged into level 2, and so on, with a limit on the size of each level. In order to perform a query on a specific key to get its associated value, a search must be performed in level 0 and also in each level. + +[B-tree](https://en.wikipedia.org/wiki/B-tree) is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree generalizes the binary search tree, allowing for nodes with more than two children.([2]) Unlike other self-balancing binary search trees, the B-tree is well suited for storage systems that read and write relatively large blocks of data, such as databases and file systems. + +Generally speaking, a data structure can be optimized in at most two ways: read, write, or space amplification. This means that one data structure is unlikely to be better than another in all three. The LSM-tree has a better writer performance than the B+ tree, while its read performance is not as good as the B+ tree. + +LSM Tree has better write performance than B+ Tree because the former has lower write amplification than the latter. B+ Tree indexes require at least two writes of data, one to the WAL and one to the page itself. LSMs can have greater write throughput than B+ Trees partly because they sometimes have lower write amplification (which requires the right configuration) and partly because they write compact SSTable files sequentially. LSM Trees can be compressed well enough to produce smaller files on the disk. The B+ Tree storage engine, on the other hand, generates some space fragmentation due to the paging mechanism. + +The B+ Tree has better read performance compared to the LSM Tree because the former has lower read amplification than the latter. LSM Tree requires reading several different data structures with SSTable during the read process. In addition, since each key of the B tree exists in only one location in the index, the LSM tree storage engine, on the other hand, may have multiple copies of the same key in different segments. This also makes B-trees attractive in databases that need to provide strong transactional semantics, because in most relational databases, transactional isolation is achieved by using locks on key ranges. In a B-tree index, these locks can be attached directly to the tree.`,Lz=`In [distributed computing](https://en.wikipedia.org/wiki/Distributed_computing), a **remote procedure call (RPC)** is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal (local) procedure call, without the programmer explicitly coding the details for the remote interaction. That is, the programmer writes essentially the same code whether the subroutine is local to the executing program, or remote. This is a form of client–server interaction (caller is client, executor is server), typically implemented via a request–response message-passing system. In the object-oriented programming paradigm, RPCs are represented by remote method invocation (RMI). The RPC model implies a level of location transparency, namely that calling procedures are largely the same whether they are local or remote, but usually, they are not identical, so local calls can be distinguished from remote calls. Remote calls are usually orders of magnitude slower and less reliable than local calls, so distinguishing them is important. + +RPCs are a form of [inter-process communication](https://en.wikipedia.org/wiki/Inter-process_communication) (IPC), in that different processes have different address spaces: if on the same host machine, they have distinct virtual address spaces, even though the physical address space is the same; while if they are on different hosts, the physical address space is different. Many different (often incompatible) technologies have been used to implement the concept. + +Read the [protobuf doc](https://protobuf.dev/programming-guides/encoding/) and the [gRPC](https://grpc.io/docs/) doc for more details. + +[tonic]() is a gRPC over HTTP/2 implementation focused on **high performance**, **interoperability**, and **flexibility**. This library was created to have first-class support of async/await and to act as a core building block for production systems written in Rust.`,Pz=`Few can argue against the need for quality control when developing software. Any known or unknown software defects can be very costly for the users of the software. Testing can help developers identify these software defects in advance. The sooner development teams receive feedback from testing, the sooner they can address issues such as: + +- Architectural flaws +- Poor design decisions +- Invalid or incorrect functionality +- Security vulnerabilites +- Scalability issues + +Xline, as a distributed key-value store engine, is designed to run in the presence of many failure scenarios and degraded states, which greatly increases the testing surface. These states also must be tested in addition to the normal testing done on a project. + +In futher sections we’ll investigate how to test distributed systems under the influence of these almost infinite variables. For now, let's examine the basics that every project requires. These simple tests will lay the foundation for many later tests that can be run millions of times throughout the life of a project. + +Often, these tests are written before or alongside the code which they test, and they're used to guide the development process. + +# Unit Testing + +Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. This testing methodology is done during the development process by the software developers and sometimes QA staff. + +Xline includes many unit tests that run by cargo test. These tests typically involve simple functionality and are tested using assertions. Many languages, like Rust, offer built-in unit testing functionality: + +~~~rust +#[test] +fn test_parse_members() { + let s1 = ""; + assert!(parse_members(s1).is_err()); + let s2 = "a=1"; + let m2 = HashMap::from_iter(vec![("a".to_owned(), "1".to_owned())]); + assert_eq!(parse_members(s2).unwrap(), m2); + + let s3 = "a=1,b=2,c=3"; + let m3 = HashMap::from_iter(vec![ + ("a".to_owned(), "1".to_owned()), + ("b".to_owned(), "2".to_owned()), + ("c".to_owned(), "3".to_owned()), + ]); + assert_eq!(parse_members(s3).unwrap(), m3); + let s4 = "abcde"; + assert!(parse_members(s4).is_err()); +} +~~~ + +The main objective of unit testing is to isolate written code to test and determine if it works as intended. + +# Mock Testing + +Doing testing is essentially a way to test system or component in a controlled environment. The biggest problem with having a lot of reliance on third-party code is that the third-party code is not controllable. So we need to isolate the tested code and replace the uncontrollable component with a controllable one. That's a so-called mock test. + +mockall is a powerful mock object library for Rust. It provides tools to create mock versions of almost any trait or struct. They can be used in unit tests as a stand-in for the real object. We use mockall to do some mock tests in Xline: + +~~~rust +#[traced_test] +#[tokio::test] +async fn logs_will_be_resent() { + let state = new_test_state(); + + let mut mock_connect = MockConnectInterface::default(); + mock_connect + .expect_append_entries() + .times(4) + .returning(|_, _| Err(ProposeError::RpcStatus("timeout".to_owned()))); + mock_connect + .expect_id() + .return_const(FOLLOWER_ID1.to_owned()); + + let handle = tokio::spawn(async move { + let req = AppendEntriesRequest::new( + 1, + LEADER_ID.to_owned(), + 0, + 0, + vec![LogEntry::new(1, &[Arc::new(TestCommand::default())])], + 0, + ) + .unwrap(); + send_log_until_succeed(1, req, Arc::new(mock_connect), state).await; + }); + sleep_secs(3).await; + assert!(!handle.is_finished()); + handle.abort(); +} +~~~ + +Read the [mock document](https://docs.rs/mockall/0.11.3/mockall/) for more information. + +# Integration Testing + +ntegration tests are often used to ensure that software components or functions operate together properly. + +In Rust, integration tests are entirely external to your library and use your code in the same way any other external code would, using only the public interface and potentially exercising multiple modules per test. It can also exist as documentation. That means it's possible to document your project and benefit from a full test suite simultaneously. + +~~~rust +/// Create a new Xline Server instance with the given config +/// +/// \`\`\`rust +/// let config = if let Ok(path) = env::var("XLINE_SERVER_CONFIG") { +/// fs::read_to_string(&path).await? +/// } else { +/// include_str!("/etc/xline/xline_server.conf").to_owned() +/// }; +/// let xline_server = XlineServer::new(config)?; +/// \`\`\` +struct XlineServer { /*...*/ } +~~~ + +The [Rust Book](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) has a great chapter on how to write tests in Rust, and which testing strategies are appropriate for which problems. + +# Validation Testing + +Since one of the design goals of Xline is to be fully compatible with the etcd API, the validation test is mainly used to test the compatibility of the Xline interface with the etcd client. We used etcdctl to test the compatibility. + +Read the "[Start Xline Servers](https://github.com/datenlord/Xline/blob/master/QUICK_START.md#start-xline-servers)" and "[Send Etcd requests](https://github.com/datenlord/Xline/blob/master/QUICK_START.md#send-etcd-requests)" for more information. + +Read the etcdctl doc for more detail about how to use etcdctl + +Click [here](https://datenlord.feishu.cn/sheets/shtcnTuzElmgDO6NMOlobsCG2Jd) to view the test report.`,zz=Object.assign({"/src/deep-dive/Consensus.md":Iz,"/src/deep-dive/Key-value-Engine.md":Dz,"/src/deep-dive/Remote-Procedure-Calls-(RPC).md":Lz,"/src/deep-dive/Testing.md":Pz}),Bz=P.div` + display: flex; + align-items: center; + justify-content: center; + height: calc(86px + 416px); + padding-top: 86px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + height: calc(63px + 312px); + padding-top: 64.5px; + } + @media screen and (max-width: 768px) { + height: calc(53px + 208px); + padding-top: 43px; + } +`,Fz=P.h1` + position: relative; + display: inline-block; + padding-inline: 32px; + color: white; + font-weight: 700; + font-size: 72px; + /* line-height: 80.64px; */ + line-height: 1.1; + text-transform: capitalize; + transform: translateY(-10%); + @media screen and (max-width: 1024px) { + padding-inline: 24px; + font-size: 54px; + } + @media screen and (max-width: 768px) { + padding-inline: 16px; + font-size: 36px; + } +`,$z=P.img` + z-index: -1; + position: absolute; + left: 50%; + bottom: -17px; + transform: translateX(-45%); + width: 295.01px; + height: 35.35px; + @media screen and (max-width: 1024px) { + bottom: -12px; + width: 222px; + height: 27px; + } + @media screen and (max-width: 768px) { + bottom: -8px; + width: 148px; + height: 18px; + } +`,Uz=P.main` + display: flex; + margin-inline: auto; + padding-block: ${e=>e.theme.scale.scale05}; + padding-inline: ${e=>e.theme.scale.scale07}; + max-width: ${e=>e.theme.scale.scale12}; + // - - - + /* height: 200px; + background-color: lightcoral; */ + @media screen and (max-width: 1024px) { + padding-block: 36px; + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-block: 24px; + padding-inline: 64px; + } +`,jz=P.div` + width: 75%; + /* flex: 1; */ + + // - - - + /* min-height: 100px; + background-color: lightcyan; */ + @media screen and (max-width: 1024px) { + width: 100%; + } +`,qz=P.div` + flex-shrink: 0; + width: 25%; + margin-right: ${e=>e.theme.scale.scale05}; + // - - - + /* height: 100px; + background-color: lightblue; */ + @media screen and (max-width: 1024px) { + display: none; + } +`,Hz=P.p` + margin-bottom: ${e=>e.theme.scale.scale06}; + color: ${e=>e.theme.color.neutral.gray07}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize5}; + line-height: ${e=>e.theme.font.lineHeight5}; +`,Wz=()=>{const{params:e}=t1(),t=e==null?void 0:e.split("-").join(" ");return S.jsxs(S.Fragment,{children:[S.jsx(Bz,{children:S.jsxs(Fz,{children:[t==="Testing"?"Test":t,S.jsx($z,{src:Ra,alt:"underline"})]})}),S.jsxs(Uz,{children:[S.jsxs(qz,{children:[S.jsx(Hz,{children:"Deep Dive"}),S.jsx(O5,{item:G3})]}),S.jsx(jz,{children:S.jsx(kc,{children:zz[`/src/deep-dive/${e}.md`],remarkPlugins:[Q0],rehypePlugins:[J0],components:{h1:({level:n,children:r})=>S.jsx(Mt,{level:n,children:r}),h2:({level:n,children:r})=>S.jsx(Mt,{level:n,children:r}),h3:({level:n,children:r})=>S.jsx(Mt,{level:n,children:r}),h4:({level:n,children:r})=>S.jsx(Mt,{level:n,children:r}),h5:({level:n,children:r})=>S.jsx(Mt,{level:n,children:r}),h6:({level:n,children:r})=>S.jsx(Mt,{level:n,children:r}),p:({children:n})=>S.jsx(eh,{children:n}),em:({children:n})=>S.jsx(xa,{children:n}),strong:({children:n})=>S.jsx(xa,{type:"bold",children:n}),hr:()=>S.jsx(th,{}),ul:({depth:n,ordered:r,className:i,children:a})=>S.jsx(ka,{depth:n,ordered:r,className:i,children:a}),ol:({depth:n,ordered:r,className:i,children:a})=>S.jsx(ka,{depth:n,ordered:r,className:i,children:a}),li:({children:n})=>S.jsx(nh,{children:n}),img:({src:n,alt:r})=>S.jsx(rh,{src:n,alt:r}),blockquote:({children:n})=>S.jsx(ih,{children:n})}})})]})]})},I5=`--- + cover: /xline-home/blog/Revisit-the-Consensus-Protocol/cover.png + author: + name: Jicheng Shi + url: https://github.com/rogercloud + img_url: https://avatars.githubusercontent.com/u/939078?v=4 + read_time: 7 +--- + +Revisit-Consensus protocol is a protocol to keep the information consistent and durable in multiple servers. + +--- + +## Introduction of consensus + +Consensus protocol is a protocol to keep the information consistent and durable in multiple servers, and the property is kept even if some servers fail. When we talk about consensus, usually protocols like classic Paxos or Raft come into our minds. They are the foundation of many later invented protocols like Multi-Paxos or Fast-Paxos. Let’s first review these two protocols to see how they work. + +First let’s take a look at Paxos, which is shown in the below graph. Paxos has two phases. The first phase is Prepare, and its main assignment is to take a Slot on the Log. The second phase is Accept, which makes sure this specific Slot has been explicitly occupied, and not taken by others between two phases. When Client receives OK response from the majority of servers, it means this particular record has been submitted and a consensus is reached. Here we can take Client and Proposer as a whole, and there are two messages delivered in the whole process and one message in each phase respectively. + +![image](/xline-home/blog/Revisit-the-Consensus-Protocol/image1.jpg) + +Then let’s move on to talk about Raft, which is also shown below. In Raft protocol a Client sends a request to the leader server, then the leader broadcast the request to all the follower servers. When the leader collects the OK response from the majority of all servers, including itself, a consensus is reached, then it tells the result to Client. There are two messages delivered during the process, one is between Client and the leader, the other is between the leader and the followers. + +![image](/xline-home/blog/Revisit-the-Consensus-Protocol/image2.webp) + +It thus can be told that the above two protocols take two RTTs to complete a request and reach a consensus. It usually does not have a big impact on performance if the protocol runs in a single data center, while the situation is totally different if we run the protocol in multiple data centers. Because the latency between the data-centers is too high, up to hundreds of milliseconds. Therefore, in multi-data center scenarios, it is critical to reduce the number of messages delivered in the process. + +Then, the next question is “Are two phases necessary?”. The answer is yes if we want to keep the following properties: + +1. Any committed request cannot be revised or lost. +2. The order of committed requests cannot be revised or lost.d +3. The order of committed requests cannot be revised or lost.d + +In terms of the protocol that has no leader, like Paxos, one-message delivery can only make sure that the majority learns the message, but the ordering is out of control. And for the protocol that has a leader (e.g., Raft), two messages are also required to duplicate the message to all the servers, as one message can only make sure the leader learns the request. In other words, one-message delivery can only make the leader decide the execution sequence (the 2nd property),but cannot guarantee the committed request will not be lost, since only the leader is entitled to acquire this particular request. + +Then how do we come up with a way to reduce one number of message delivery? The answer is to compromise the second property, which is to abandon the “globally unique execution order” and change it to “guarantee a globally unique execution order for conflicting requests, and irrelevant requests can be executed out of order”. The CURP protocol introduces this idea and partially gives up the second property. Let’s see how CURP works in the next section. + +## CURP protocol + +We won’t discuss all the details of the CURP protocol for it’s too complicated, so only the critical parts will be covered. Here’s the process diagram of the CURP protocol: + +![image](/xline-home/blog/Revisit-the-Consensus-Protocol/image3.webp) + +To start with, let’s describe the main procedures briefly below: + +1. The Client sends a request to all the CURP servers including the master (leader). +2. Every server maintains a waiting pool, which is the blue part in the above graph. The requests in the waiting pool maybe haven’t reached a consensus yet. +3. Once a server receives a request from the Client, it checks if the request conflicts with the requests in the waiting pool. +4. If there’s a conflict, the server rejects the Client request. +5. Otherwise, it accepts the request and let the Client knows. +6. If the Client received no less than (f + (f + 1)/ 2 + 1) Accept replies, including the reply from the master, it knows the request has been committed. Otherwise, Client waits for the master server to duplicate the request to the follower servers. Once the duplication process completes, the request is removed from the waiting pool and the master server tells the Client that the request has been committed. + +It’s not easy to understand the protocol if we only list the above four steps. Let me put it in a question-and-answer format for further explanations. + +**Q1: Why can the Client make sure a request is committed when no less than (f + (f + 1)/ 2 + 1) Accept responses including the reply from the master are received?** + +A1: Because the waiting pool is exclusive as conflict requests won’t be in the same pool at the same time, once a request is accepted by the majority, the other conflict request won’t get the majority vote until the previous one is removed. Even if there’s f server failures, we can easily recover the request from the remaining (f + 1)/ 2 + 1 servers, which are also the majority of the remaining servers. So as a result CURP protocol keeps the committed request and the ordering of the conflicting requests. + +**Q2: The number (f + (f + 1)/ 2 + 1) is strange, why not f + 1?** + +A2: The reason is the recovery procedure requires the number. In the worst case, there are at most f failures, we must find out the committed requests in the waiting pool according to the remaining informed (f + 1)/ 2 + 1 servers, which are the majority of all remaining servers. + +The consensus protocol allows at most f server failures, so the remaining server is f+1. In the worst case, all failed servers contain that request, then the remaining f+1 still have at least (f+1\\_)/2+1 servers containing that particular request, accounting for the vast majority and is convenient for the recovery process to restore the request and prevent any losses. + +**Q3: Do all the requests reach the consensus after one message delivery?** + +A3: It is not guaranteed. If there’s no conflicting request, one message is enough to reach the consensus. Otherwise, in terms of conflicting requests, the Client must wait for the master (leader) server to complete synchronization, which takes another message delivery. Then the Client can confirm that the request is committed. In this case, two messages are delivered, similar to Raft. Therefore, 1RTT for the best case and 2RTT for the worst case. + +**Q4: How does the master duplicate the message to the follower servers?** + +A4: The same as Raft. + +**Q5: What is the recovery process for the CURP protocol?** + +A5: First, the recovery process needs to elect a new master (leader), which is the same as Raft. Then the process can be roughly divided into two modules. For the synchronized request, the recovery process is consistent with the Raft protocol. For the requests that have not been synchronized yet, they need to be collected from all servers. When f+1 servers (including the new leader itself) are collected information, keep the requests that appear at least (f+1)/2+1 times, because these requests may have been committed, thus cannot be lost. + +## Summary + +We find that the CURP protocol is very similar to the Raft protocol except for the waiting pool. The pool is used to keep the ordering of the conflicting requests, making sure there’s at most one request committed among all the conflicts. In other words, all requests need to wait for the synchronization of the master at the time when the pool is sorting conflicting requests. The waiting pool is the root reason for the outperforming result. + +To sum up, under optimal condition, the CURP takes one round of message delivery to reach consensus. In the worst case, it takes two rounds of message delivery to achieve consensus, just as the Raft protocol. + +For more details about the CURP protocol, please refer here to the original paper. + +Xline, an open source project by DatenLord, is a geo-distributed KV store for metadata management, which is based on the CURP protocol. + +GitHub Links: https://github.com/datenlord/Xline +`,D5=`--- + + cover: /xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/cover.png + author: + name: Ye Tian + url: https://github.com/datenlord + img_url: /xline-home/DatenLord.png + read_time: 13 + +--- + +Thinking About-The purpose of this article is concerning how to think about computer systems and algorithms from a mathematics perspective. + +--- + +The purpose of this article is to provide readers who have not been exposed to formal methods with a new perspective on computer systems and algorithms, rather than formal methods or TLA+ tutorials. Therefore, the focus of this article is how to think about programs from a mathematical perspective, without using a lot of space to explain the syntax of TLA+. + +## How do we write correct programs? + +The goal of programming is always to write correct programs. Our programs become more complex over time, and the errors that may exist in them become more numerous. To write correct programs, we should first understand what errors may occur in our programs. + +### What errors will there be in the program? + +I will roughly divide the errors that may occur in the program into two categories: simple errors and logical errors. + +#### Simple errors + +Simple errors include semantic errors, memory errors, etc. For these easy-to-analyze errors, we already have many mature methods and tools to avoid them, such as compilers, static analysis tools, garbage collector. Because these errors can be relatively easily found and fixed, they are not the focus of our attention. + +#### Logical errors + +Logical errors are the most difficult to find and fix in programs, such as deadlocks, race conditions, data inconsistencies. Logical errors affect the correctness, performance and reliability of the program, and are usually caused by insufficient design of the program. For these errors, we need to analyze and solve them from a higher level, rather than just from the implementation details of the code. + +We usually use some methods to avoid logical errors, such as: + +- **Optimize software architecture design** - Consider the correctness of the program in the design stage +- **Testing** - Use various testing methods to reduce the errors in the program, but it cannot guarantee the complete correctness of the program + +### Experience + +It is not hard to see that the theories above are derived from experience. Experience is accumulated in practice, and we summarize the experience to derive guiding principles, methods and steps that can help us design better programs. + +#### But can we rely only on experience? + +The more experienced people are, the more details and possibilities they can think of, and the systems they design are usually more stable. But we can't just rely on experience: + +- **Experience is limited** - Human experience is limited and unreliable +- **The behavior and state of complex systems are numerous** - A complex system has too many behaviors and states to predict +- **The requirements for correctness of a specific program are very high** - Some programs have very high requirements for correctness, such as financial systems, medical systems, which are difficult to guarantee through experience +- **Unable to verify correctness from theory** - Can only reduce the occurrence of errors as much as possible, but cannot prove the correctness of the program from theory + +Therefore, we need a more rigorous method to guarantee the correctness of the program from the design. + +### Formal methods + +If we can verify the correctness of a program from mathematical perspective, we can solve the above problems. Actually, this is the goal of formal methods. + +Formal methods are based on mathematics, by establishing mathematical models for systems to define the behavior, state, etc. of the system, and then defining the constraints of the system, such as safety, liveness, and finally proving that the model satisfies the formal specification of the system to verify the correctness of the system. For finite-state systems, model checking based on finite-state search can be used to verify the behavior of the system to verify whether the system has the expected properties. For systems with infinite state spaces, deductive verification based on logical inference is used to verify the correctness of the system using induction. + +This article uses the TLA+ language as a tool to introduce formal methods. + +## TLA+ + +Leslie Lamport, the author of TLA+, is a computer scientist who won the Turing Award in 2013 for his groundbreaking work in the field of concurrent and distributed systems. + +### What's TLA+ + +TLA+ is an high-level language for modeling programs and systems - especially concurrent and distributed programs and systems. Its core idea is that the best way to precisely describe things is to use simple mathematics. TLA+ and its tools can be used to eliminate design errors that are difficult to find and correct in code and are expensive to correct. + +TLA+ specifications are not real engineering code and cannot be used in production environments because the goal of TLA+ is to find and solve logical errors at the design stage of the system. In TLA+ we abstract programs as finite-state mathematical models, usually state machines, and then use the TLC Model Checker to exhaustively search all possible states of the program and verify its correctness. + +The following two simple examples introduce TLA+. These two examples are from [Leslie Lamport's The TLA+ Video Course](https://www.youtube.com/playlist?list=PLWAv2Etpa7AOAwkreYImYt0gIpOdWQevD). The goal of this article is to provide a new perspective on computer systems and algorithms for readers who have not been exposed to formal methods, rather than a TLA+ tutorial, so the syntax and use of TLA+ tools will not be discussed in detail. + +### Simple Example + +TLA+ allows us to use simple mathematics to abstract system models, mainly set theory and boolean logic. In the process of abstraction, we need to abandon some implementation details and only focus on the logic of the program itself. + +Here is a simple C program that we try to abstract as a TLA+ program: + +\`\`\`c +int i; +void main() { + i = someNumber(); // someNumber() returns a number between 0 and 1000 + i = i + 1; +} +\`\`\` + +#### State Abstraction + +We need to abstract this program into a series of independent **states**. Obviously, the difference between each state is only the value of \`i\`. Suppose that the default value of \`i\` is 0 after initialization, and that \`someNumber()\` returns 42 when this program is run, then the state transition relationship of this program is: + +[i : 0] -> [i : 42] -> [i : 43] + +There are three states in this, and the difference between each state is that the value of \`i\` is different. + +It seems that the abstraction is complete, but there are problems. Suppose that \`someNumber()\` returns 43 in another run, then the state transition relationship of this program is: + +[i : 0] -> [i : 43] -> [i : 44] + +This is inconsistent with the previous abstraction, because the state transition relationship of the two runs is different. This is because we have not considered the return value of \`someNumber()\`. + +The _state_ of a program refers to the time point when the program is at each stage, not the process of the program running. Therefore, each state is independent, and the transition between states is atomic. This is very different from traditional programming, which is procedural, and TLA+ is state-oriented. We only care about what state the program is currently running in, so we can introduce a new variable \`pc\` to represent which stage the program is running in, so that we can clearly represent the sub-state relationship of the program: + +\`\`\`c +int i; +void main() { + i = someNumber(); // pc = "start" + i = i + 1; // pc = "middle" +} // pc = "done" +\`\`\` + +In this way, we no longer need to consider the value of \`i\`, but only the value of \`pc\`: + +[pc : start] -> [pc : middle] -> [pc : done] + +#### Writing States + +The initial value of \`i\` is 0, and the initial value of \`pc\` is \`start\`, so we can write the sub-state relationship as: + +![image1](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image1.png) + +In which, for the variable \`i\`, its next state is represented as \`i'\`, which is the way TLA+ defines the state transition of variables. \`i' ∈ 0..1000\` means that the value of \`i\` in the next state is a number between 0 and 1000, that is, \`someNumber()\`, \`0..1000\` represents the set \`{0,1,...,1000}\`. \`∧\` is the logical and in Boolean logic, which can be understood as "and". Finally, the program runs to completion and there is no next state, so it is represented as \`FALSE\`. + +In TLA+ , we write a state. Therefore, it is not "because \`pc = start\` so \`i' ∈ 0..1000\`", in fact, the relationship between the two is parallel: **In this state, the value of \`pc\` is \`start\` and the value of \`i\` in the next state \`∈ 0..1000\`**. With this idea, we can rewrite the above abstraction as: + +![image2](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image2.png) + +In which, the "or" is used to connect two states, which can be represented by the logical or \`∨\` in Boolean logic. In this way, we can clearly represent the state transition relationship of the program. For the sake of beauty, the same Boolean logic symbol can also be supplemented before the first sentence in TLA+ : + +![image3](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image3.png) + +We finally get the two states after the initial state of this simple program, and then we will complete the initial state and supplement the entire specification according to the requirements of the TLA+ language: + +![image4](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image4.png) + +- \`EXTENDS\` is used to introduce modules defined in other specifications, which is mainly used in \`i' ∈ 0..1000\` here. +- \`VARIABLES\` is used to define variables, which are defined as \`i\` and \`pc\` here. +- \`Init\` is used to define the initial state, which is defined as \`i = 0\` and \`pc = "start"\` here. +- \`Next\` is used to define the state transition relationship. + +Now we have a complete TLA+ specification. Later, we can use the TLC Model Checker to check the model, but this is not within the scope of this article. + +For simple systems, modeling with TLA+ cannot bring many benefits. Generally speaking, TLA+ is only used when designing very complex, very critical, and very experience-based systems. Concurrency and distributed systems are usually the fields where TLA+ is used. Let's take a look at an example of a distributed system algorithm: Two-Phase Commit. + +### Two-Phase Commit + +> In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC) is a type of atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction. This protocol (a specialised type of consensus protocol) achieves its goal even in many cases of temporary system failure (involving either process, network node, communication, etc. failures), and is thus widely used. —— [Two-phase commit protocol (Wikipedia)](https://en.wikipedia.org/wiki/Two-phase_commit_protocol) + +Lamport explains Two-Phase Commit in the following analogy in [Leslie Lamport's The TLA+ Video Course](https://www.youtube.com/playlist?list=PLWAv2Etpa7AOAwkreYImYt0gIpOdWQevD): + +![image5](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image5.png) + +In a wedding, the minister is the coordinator, the groom and the bride are the participants. When the groom and the bride both agree to the marriage, the minister will officially announce the marriage. If one of them does not agree, the minister will abort the marriage: + +1. The minister asks the groom: Do you agree to this marriage? +2. The groom answers: I agree (prepared). +3. The minister asks the bride: Do you agree to this marriage? +4. The bride answers: I agree (prepared). +5. The minister announces: The marriage is officially established (committed). + +If one of them does not agree, the minister will abort the marriage. + +In a database, the Transaction Manager is the coordinator (the minister). When the Transaction Manager asks all the participants Resource Managers (the groom / bride), if all the Resource Managers agree to commit the transaction, the Transaction Manager will commit the transaction. If one of them does not agree, the Transaction Manager will abort the transaction. + +The detailed introduction and process of Two-Phase Commit can be found on [Wikipedia](https://en.wikipedia.org/wiki/Two-phase_commit_protocol). + +First, let's define some constants and variables and their initial state: + +![image6](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image6.png) + +- The constant \`RM\` is the set of all Resource Manager identifiers, for example, it can be set to the set \`{"r1", "r2", "r3"}\`. +- The variable \`rmState\` is used to record the state of each Resource Manager, and \`rmState[r]\` is used to represent the state of \`r\`, which has four states: \`working\`, \`prepared\`, \`committed\`, \`aborted\`. The initial state of each \`RM\` is \`working\`. +- The variable \`tmState\` is used to record the state of the Transaction Manager, which has three states: \`init\`, \`committed\`, \`aborted\`. The initial state is \`init\`. +- The variable \`tmPrepared\` is used to record the Resource Manager that is ready (in the \`prepared\` state). The initial value is an empty set. +- The variable \`msgs\` is used as a message pool to record all messages that are being transmitted. The initial value is an empty set. + +Next, let's define the actions that the system may perform. + +![image7](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image7.png) + +- In TLA+, expressions similar to the "function" concept in other programming languages can be defined in the above way, so there is no need to define an expression for each Resource Manager. +- \`[type → "prepare", rm → r]\` is a record in TLA+, similar to a struct in other programming languages. +- \`UNCHANGED ⟨rmState, tmState, msgs⟩\` means that this action will not change the values of the variables \`rmState\`, \`tmState\`, \`msgs\`. In TLA+, it is necessary to explicitly declare whether the value of each variable changes or not. + +When the state of \`TM\` is \`init\`, and there is a \`Prepared\` message from \`r\` in the message pool, the value of \`tmPrepared\` in the next state will be the union of \`tmPrepared\` and \`{r}\`. + +![image8](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image8.png) + +The above two actions are Transaction Manager performing Commit and Abort. + +![image9](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image9.png) + +The above 4 Resource Manager actions are Resource Manager choosing Prepare and Abort, and handling the Commit and Abort decided by the Transaction Manager. + +The syntax \`rmState' = [rmState except ![r] = "prepared"]\` means "in the next state, the value of \`rmState[r]\` is changed to \`prepared\`, and the other parts remain unchanged". + +If we use a form like \`rmState[r]' = "prepared"\`, we have not explicitly stated the values of the other parts of \`rmState\` in the next state, so it is incorrect. + +TLA+ is different from the programs we usually write, it is mathematics. In programming, we use arrays, and in TLA+, we use functions to express similar concepts, and the set of array indices is the domain of the function. + +After writing all the actions that the system may exist, we can start to deduce the state transition of the system: + +![image10](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image10.png) + +We use the existential quantifier \`∃r ∈ RM\` to represent "for any element \`r\` in the set \`RM\`, there is such an action". The state transition in TLA+ is atomic, so in a state, only one \`r\` will be selected in this "or" branch, which can be compared to the \`for r in RM\` in the programming language, but fundamentally different. + +At this point, the modeling of the system is complete. Now we need to write the system's constraint conditions: + +![image11](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image11.png) + +In the constraint condition \`TypeOK\`, we have limited the possible values of each variable. The \`[RM → {"working", "prepared", "committed", "aborted"}]\` is similar to the Cartesian product of the set \`RM\` and the set \`{"working", "prepared", "committed", "aborted"}\`, but the result is a set composed of records: + +\`\`\`rust +{ + [r1 |-> "working", r2 |-> "working"], + [r1 |-> "working", r2 |-> "prepared"], + [r1 |-> "working", r2 |-> "committed"], + ... + [r1 |-> "aborted", r2 |-> "committed"], + [r1 |-> "aborted", r2 |-> "aborted"] +} +\`\`\` + +In \`TypeOK\`, we use the set \`Messages\` defined above. When defining \`Messages\`, we used the syntax: \`[type: {"Prepared"}, rm: RM]\`. This syntax is also similar to the Cartesian product of \`{"Prepared"}\` and \`RM\`, but the result is also a record set: + +\`\`\`rust +{ + [type |-> "Prepared", rm |-> r1], + [type |-> "Prepared", rm |-> r2], + ... +} +\`\`\` + +The final constraint condition \`Consistent\` is used to ensure the consistency of the system: at any time, it is impossible for two Resource Managers to be in the \`committed\` and \`abort\` state respectively. + +Finally, we will give the constraint conditions as invariants, together with the system model, to the TLC Model Checker for verification, and we can prove the correctness of the system. + +## Summary + +From the above two examples, we have a preliminary understanding of the idea of formal methods. TLA+ is designed for verifying distributed systems, but its ideas can be applied to fields far beyond distributed systems. When writing programs, if we can not only consider the contents on the code level, but also think from a higher level, from a mathematical point of view, we can write more robust programs. + +If you are interested in TLA+, you can refer to [Leslie Lamport's The TLA+ Video Course - YouTube](https://youtube.com/playlist?list=PLWAv2Etpa7AOAwkreYImYt0gIpOdWQevD) and [Learn TLA+](https://learntla.com). +`,L5=`--- + + cover: /xline-home/blog/How-to-elegantly-organize-async-Rust-code/cover.png + author: + name: Tianyu Chen + url: https://github.com/datenlord + img_url: /xline-home/DatenLord.png + read_time: 5 + +--- + +Elegant-The article starts from my experience of writing async Rust code and concludes with my practice of applying the principles in a recent refractoring of Curp. + +--- + +## Summary + +Anyone who has worked with async Rust has likely struggled with the bounds it requires, e.g., the \`'static\` bound on spawned tasks, \`MutexGuard\` can not be held across \`.await\` point. Overcoming these constraints requires carefully structured scopes, which might result in opaque and nested code that is challenging for both the developer to write and for reviewers to read. In this talk, I will first list some pain points from my experience of writing async Rust code. Then, I will point out scenarios where we actually need async code and argue why we should separate async and non-async code. Finally, I will demonstrate how I've practiced this principle in a recent refactoring of Curp. + +## Pain Point + +### Spawned Task must be \`'static\` + +The compiler has no idea how long an asynchronous task will run for when we create it; it may be ephemeral or it may continue to run until the program terminates. For this reason, the compiler requires all types owned by the tasks to be \`'static\`. +Such a limitation often leads to a lot of cloning before spawning a task. Admittedly, these codes help programmers to better understand which variables' ownership should be transferred to the new task. Unfortunately, the code will look tedious. + +\`\`\`rust +let a_arc = Arc::clone(&a); +let b_arc = Arc::clone(&b); +tokio::spawn(async move { + // ... +}); +\`\`\` + +### \`Non-Send\` variables cannot be held across \`.await\` point + +The Tokio runtime can move a task between threads at every \`.await\`. That's why all variables that are held across\` .await\` must be sent, bringing a lot of trouble when writing async functions. + +For example, the following code does not compile because \`log_l\`, a non-\`Send\` \`MutexGuard\`, can not be held across the \`.await\` point. + +\`\`\`rust +let mut log_l = log.lock(); +log_l.append(new_entry.clone()); +broadcast(new_entry).await; +\`\`\` + +As the broadcast could take a while, we don't want the \`MutexGuard\` to be held across the.await point either. The compiler does a great job at pointing up places for possible performance improvement. + +To avoid this, we naturally add a line to drop the lock just before broadcasting. + +\`\`\`rust +let mut log_l = log.lock(); +log_l.append(new_entry.clone()); +drop(log_l); +broadcast(new_entry).await; +\`\`\` + +Sadly, it still won't compile. The explanation here is from \`tokio\` official website: + +> The compiler currently calculates whether a future is \`Send\` based on scope information only. The compiler will hopefully be updated to support explicitly dropping it in the future, but for now, you must explicitly use a scope. + +To get around, we must wrap our code in an redundant scope. The code is not elegant anymore🙁. + +\`\`\`rust +{ + let mut log_w = log.write(); + log_w.append(new_entry.clone()); +} +broadcast(new_entry).await; +\`\`\` + +More nested scope will be created if multiple locks must be acquired by an async function. When this happens, the code becomes unreadable and unmaintainable. + +> Side Note: You might be wondering why we don't make use of the async lock(\`tokio::sync::Mutex\`) tokio offers. It can be held across the \`.await\` point and will save us a lot of trouble. That's because it has relatively limited use cases in practice. Normally, we don't want critical sections to be too long. For example, we don't want to hold the lock when we are broadcasting the new entry. Therefore, be careful about async mutex, you don't want to accidentally use it. + +## Async scenarios + +The previously mentioned problems are, in my opinion, caused by a lack of clarity in the separation between async and non-async code. In other words, we may fail to separate the async part and non-async part when designing our application's architecture. So, I will sort out the scenarios where we can actually take advantage of async Rust. + +### I/O + +You don't want I/O to block the current thread since I/O can take a long time. Async I/O helps us to hand out control flow to other tasks when we are waiting for I/O resources. + +\`\`\`rust +// .await will enable other scheduled tasks to progress +let mut file = File::create("foo.txt").await?; + +file.write(b"some bytes").await?; +\`\`\` + +### Background tasks + +You want to spawn a background task in order to handle things in the background(usually paired with the receive end of an async channel). + +\`\`\`rust +tokio::spawn(async move { + while let Some(job) = rx.recv().await { + // ... + } +}; +\`\`\` + +### Concurrent tasks + +You want to spawn multiple tasks to utilize multicore. + +\`\`\`rust +let chunks = data.chunks(data.len() / N_TASKS); +for chunk in chunks { + tokio::spawn(work_on(chunk)); +} +\`\`\` + +### Wait for others + +You want to pause the current thread and wait for some other events. + +\`\`\`rust +// wait for some event +event.listen().await; + +// barrier +barrier.wait().await; +\`\`\` + +As can be seen, async code usually resides in limited places: I/O, concurrent, and background tasks. Therefore, when we are designing our code, we can consciously identify async functions and try to minimize them. Separating these two parts can not only alleviate the pain points mentioned at the beginning of the article, but also help us to clarify the code structure. + +\`\`\`rust +// before +{ + let mut log_w = log.write(); + log_w.append(new_entry.clone()); + // ... +} +broadcast(new_entry).await; + +// after: move the logic to another function instead + +fn update_log(log: &mut Log, new_entry: Entry) { + log.append(new_entry); + // ... +} + +update_log(&mut log.write(), new_entry.clone()); +broadcast(new_entry).await; +\`\`\` + +## Regarding a recent major refactor of curp + +Before refactoring, due to multiple iterations, the readability and structure of the code became increasingly poor. Specifically, we had several lock structures that needed to be shared among various parts of the Curp server, and most functions of Curp server were async. The async and locking code were mixed together, frequently leading to the aforementioned pain points during development. + +Therefore, we reorganized the structure of Curp server, dividing it into an async part called CurpNode and a non-async part called Rawcurp: + +- CurpNode includes only async code + - I/O tasks: receiving, sending network requests, persisting log entries + - Background tasks: periodically checking leader activity, copying and aligning data on each node +- Rawcurp can be considered as a state machine that receives calls from CurpNode and updates the state. It includes only non-async code. If RawCurp wants to perform some async operations (such as broadcasting heartbeat), it can use return values and channels to let CurpNode make requests on its behalf. + +![image1](/xline-home/blog/How-to-elegantly-organize-async-Rust-code/image1.png) + +Take our tick function as an example. Before refactoring, due to the limitation that LockGuard cannot pass the await point and the restriction of multiple logical branches, we had to organize the code in this way: + +\`\`\`rust + loop { + let _now = ticker.tick().await; + let task = { + let state_c = Arc::clone(&state); + let state_r = state.upgradable_read(); + if state_r.is_leader() { + if state_r.needs_hb + { + let resps = bcast_heartbeats(connects.clone(), state_r, rpc_timeout); + Either::Left(handle_heartbeat_responses( + resps, + state_c, + Arc::clone(&timeout), + )) + } else { + continue; + } + } else { + let mut state_w = RwLockUgradableReadGuard::upgrade(state_r); + // ... + let resps = bcast_votes(connects.clone(), state_r, rpc_timeout); + Either::Right(handle_vote_responses(resps, state_c)) + } + }; + task.await; + } +\`\`\` + +After the refactoring, the code is significantly more understandable because all of the non-async functionality has been transferred to \`RawCurp\`. + +\`\`\`rust +loop { + let _now = ticker.tick().await; + let action = raw_curp.tick(); + match action { + TickAction::Heartbeat(hbs) => { + Self::bcast_heartbeats(Arc::clone(&raw_curp), &connects, hbs).await; + } + TickAction::Votes(votes) => { + Self::bcast_votes(Arc::clone(&raw_curp), &connects, votes).await; + } + TickAction::Nothing => {} + } +} +\`\`\` +`,P5=`--- + cover: /xline-home/blog/Database-Isolation-Levels-and-MVCC/cover.png + author: + name: Jicheng Shi + url: https://github.com/rogercloud + img_url: https://avatars.githubusercontent.com/u/939078?v=4 + read_time: 5 +--- + +When processing multiple transactions at the same time, the database needs to decide whether the transactions can see each other's changes, how much they can see, etc. + +--- + +## Introduction to database isolation levels + +When processing multiple transactions at the same time, the database needs to decide whether the transactions can see each other's changes, how much they can see, etc. According to the strict level of isolation, they can be classified from strict to loose as Serializable, Repeatable reads, Read committed, Read uncommitted. We use the following example of KV storage to explain these four isolation levels. The initial situations of the KV storage are as follows: + +![image1](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image1.png) + +### Read uncommitted + +When two transactions are being executed at the same time, top-down is the order of execution. + +![image2](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image2.png) + +Under the isolation level of Read uncommitted, multiple transactions executing at the same time are able to see each other not committing the writing operations, which can be considered almost useless. +In the above example, Operation 2 reads "AA" and even though the second transaction eventually Rollback, Operation 4 still reads "DD". When two transactions are being executed simultaneously in the Read committed, they follow top-down order. + +![image3](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image3.png) + +Under the isolation level of Read committed, only the result after Commit can be seen. So in the execution order of Table 2, both Operation 2 and 4 can read the value of "AA", that is, the value of Key 1 is not changed. If two transactions are executed as in Table 3, Operation 2 will read "AA" and Operation 5 will read "DD", because Transaction 2 has been executed successfully at the time. + +### Repeatable read + +If Transaction 1 in Table 3 has two consecutive read operations while the user wants to guarantee that the same value is read, then the repeatable read isolation level should be used. Under this isolation level, multiple reads of the same data in the same transaction are guaranteed to yield the same value, even if the data is modified by other committed transactions in the process. Of course, there are cases where isolation is not guaranteed in this isolation level, which is shown as follows: + +![image4](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image4.png) + +Under the isolation level of repeatable read, Operation 2 returns ["CC"] as result, which means only the value of Key 3 is returned, while that of Operation 5 is [“CC", "DD"]. To summarize, the isolation level of repeatable read still cannot perfectly handle situations involving multiple pieces of data, especially when new data is inserted or deleted. + +### Serializable + +The strictest isolation level is called Serializable, which is also the most perspicuously defined. The execution result under this level is "as if" all transactions were serialized and executed one by one. + +It is worth emphasizing the word "as if" in the above sentence. To improve performance, few databases use serial execution on the real meaning of physical to ensure Serializable, but only to achieve a similar effect, which can be achieved in a variety of ways. There is a subcategory under the Serializable level called Snapshot, which is similar to Serializable but slightly less constrained. It is because of the relaxation of constraints that gives a better-performed implementation and makes it the default supported isolation level by most databases. + +Let's talk about Snapshot, and by extension, the MVCC implementation. + +## Snapshot isolation level and MVCC + +To distinguish between the strictest Serializable and Snapshot, let's look at the following two transactions as examples. + +![image5](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image5.png) + +If strictly following the Serializable isolation level, regardless of either Transaction 1 or 2 is executed first, the ultimate value of Key 1 and 2 is the same, either "AA" or "BB". + +However, when executed under the Snapshot level, the result is that the values of Key 1 and 2 are swapped. + +The isolation power of Snapshot is obviously weaker in this case. Isolation seems helpless in dealing with the order of transactions with read-write intersections, while only ensuring the order of transactions with write conflicts. + +While the above example looks specifically at the differences between the Snapshot isolation level and Serializable, we have not yet fully described the characteristics of Snapshot: + +- Transactions in Snapshot have two important timestamps, a read timestamp R and a write timestamp W. All read operations after R can only read the data committed before R. +- Snapshot allows two transactions that do not have a write intersection to execute simultaneously and in parallel. + +In order to satisfy both of these features, it is natural to think of saving multiple versions for each data, so that when a write operation is committed, the new data is saved in the new version while the old one is not covered, which is what we call MVCC (Multiversion concurrency control). + +We know that there is no conflict between read operations, and write operations cannot be executed simultaneously under the Snapshot level (or Roll back if a conflict is found), so MVCC works mainly when there is a conflict between read and write operations, allowing two seemingly conflicting transactions to execute concurrently. + +MVCC also requires garbage collection, otherwise too much old version data will take up unnecessary storage space. The next question is, how do you determine whether a version of data can be deleted? The answer is that it can be deleted when all read operations involved in such version of data are completed, provided that there is a newer version of data ahead. + +## Some little thoughts + +In the process of introducing MVCC we can easily capture the following key points: +1.Multiple versions. +2.Garbage handling. +3.Improving the efficiency of concurrent operations. + +In a previous article by DatenLord titled "Memory Management for Rust Language Lock-Free Data Structures", we introduced another technology related to these keywords, which is the "epoch-based memory management" (epoch) method for lock-free data structures. Epoch maintains the memory state of two generations, and when the memory of the oldest generation is no longer accessible, then the corresponding memory will be reclaimed and released, and a new generation will be opened. The purpose of doing this is also to allow the operation of modifying the data of the new generation and the operation of reading the data of the old generation to be parallelized, also to achieve read-write concurrency optimization. Of course, in addition to these similarities, there are also differences in that MVCC can simultaneously exist in many versions, while epoch always exists in two versions. This can be interpreted as epoch's memory management being more granular, so when contention is heavy epoch can sometimes cause an increase in memory pressure. + +In general, MVCC and epoch are similar in the central idea of using multi-version memory control technology to solve the problem of concurrent read/write conflicts. + +## Summary + +In this paper, we introduced the four isolation levels of the database and the differences between the different isolation levels with examples. + +Later, we dug into details about Snapshot, a most widely used insolation level and its most frequently used implementing method MVCC. +Finally, compared and discussed the memory management mechanisms of MVCC and lock-free data structures. + +DatenLord project Xline focuses on cross-cloud metadata management KV storage and is currently using MVCC for database isolation in practice. If you want to learn more about it, please refer to the Xline GitHub link: [https://github.com/datenlord/Xline](https://github.com/datenlord/Xline) +`,z5=`--- + cover: /xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/cover.png + author: + name: Jiawei Zhao + url: https://github.com/Phoenix500526 + img_url: https://avatars.githubusercontent.com/u/9337239?v=4 + read_time: 20 +--- + +In the early prototype phase of Xline, we used in-memory storage for data persistence. While this simplified the complexity of the Xline prototype design and speeded up the development and iteration of the project, it also had significant consequences: since the data was stored in memory, the recovery of node data after a process crash relied on pulling the full data from other healthy nodes, resulting in longer recovery times. + +--- + +## Introduction + +In the early prototype phase of Xline, we used in-memory storage for data persistence. While this simplified the complexity of the Xline prototype design and speeded up the development and iteration of the project, it also had significant consequences: since the data was stored in memory, the recovery of node data after a process crash relied on pulling the full data from other healthy nodes, resulting in longer recovery times. + +With this consideration in mind, Xline introduced a Persistent Storage Layer in its latest release v0.3.0 to persist data to disk and shield upper-layer callers from irrelevant low-level details. + +## Selection of Storage Engines + +Currently, mainstream storage engines in the industry can be broadly categorized into B+ Tree-based storage engines and LSM Tree-based storage engines. Each has its own advantages and disadvantages. + +### Analysis of B+ Tree Read and Write Amplification + +When reading data from B+ Tree, we need to first search along the root node, and then move down the index until we finally reach the bottom leaf node. Each access corresponds to one disk IO. Similarly, when writing data, the search starts from the root node and goes down to the appropriate leaf node for data insertion. + +To facilitate the analysis, let's make the following assumption: the block size of the B+ Tree is denoted as B, so each internal node contains O(B) child nodes, and each leaf node contains O(B) data entries. Assuming the size of the dataset is N, the height of the B+ Tree is approximately $$O(\\log_B(\\frac{N}{B}))$$ + +Write Amplification: Each insert operation in the B+ Tree writes data to a leaf node, regardless of the actual size of the data. This means that each insert operation requires writing a block of size B, resulting in a write amplification of O(B). + +Read Amplification: A single query in the B+ Tree requires traversing from the root node to a specific leaf node, resulting in a number of I/O operations equal to the height of the tree, which is approximately O(log_B(N/B)). Thus, the read amplification is O(log_B(N/B)). + +### LSM Tree Read and Write Amplification Analysis + +In LSM Tree, when data is written, it is first written to an in-memory file called the memtable (Level 0) in an append-only manner. When the memtable reaches a certain size, it is converted into an immutable memtable and merged into the next level. For data retrieval, the search starts in the memtable, and if the search fails, it proceeds to search in lower levels until the element is found. LSM Tree often utilizes Bloom Filters to optimize read operations by filtering out elements that do not exist in the database. + +Assuming the dataset size is N, the amplification factor is k, and the minimum file size in each level is B, with each level having the same file size as B but a different number of files. + +Write Amplification: Assuming we write a record, it will be compacted to the next level after being written k times in the current level. Therefore, the average write amplification per level is $$\\frac{\\sum_{i=1}^{k} k_i}{k} = \\frac{k+1}{2} $$. There are $$\\log_k(\\frac{N}{B} ) $$ levels in total, so the write amplification is $$O(k\\log_k(\\frac{N}{B}))$$. + +Read Amplification: In the worst-case scenario, data is compacted to the last level, and a binary search is required at each level until the data is found at the last level. +For the highest level, $$level_i$$, with data size O(N), a binary search requires $$O(\\log \\frac{N}{B}) $$ disk read operations. +For the next level, $$level_{i-1}$$, with data size $$O(\\frac{N}{k})$$, a binary search requires $$O(\\log \\frac{N}{kB}) $$ disk read operations. +For $$level_{i-2}$$, with data size $$O(\\frac{N}{k^2})$$, a binary search requires $$O(\\log \\frac{N}{k^2B})$$ disk read operations. +..... +Continuing this pattern, the final read amplification can be calculated as R = $$\\sum_{i=0}^{n}(\\log(\\frac{N}{k^iB} )) = O(\\frac{\\log^2\\frac{N}{B}}{log_k}) $$ + +### Summary + +![image](/xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image1.PNG) + +From the analysis of read and write amplification, it can be concluded that B+ Tree-based storage engines are more suitable for scenarios with more reads and fewer writes, while LSM Tree-based storage engines are more suitable for scenarios with more writes and fewer reads. + +As an open-source distributed KV storage software written in Rust, Xline needs to consider the following factors when selecting a persistent storage engine: + +1. In terms of Performance: Storage engines often become one of the performance bottlenecks in a system, so it is necessary to choose a high-performance storage engine. High-performance storage engines are typically implemented in high-performance languages, preferably with asynchronous implementations. Rust language is the first choice, followed by C/C++. + +2. From a development perspective: Prioritize the implementation in Rust language to reduce additional development work at the current stage. + +3. From a maintenance perspective: + +- Consider the supporters behind the engine, with priority given to large commercial companies and open-source communities. +- It should be widely used in the industry to facilitate learning from experiences in debugging and tuning processes. +- It should have high visibility and popularity (GitHub stars) to attract excellent contributors. + +4. From a functional perspective: The storage engine should provide transactional semantics, support basic KV operations, and batch processing operations. + +The priority order of requirements is: Functionality > Maintenance > =Performance > Development. + +We conducted research on several open-source embedded databases, including Sled, ForestDB, RocksDB, Bbolt, and Badger. Among them, only RocksDB fulfilled all four requirements mentioned earlier. RocksDB, implemented and open-sourced by Facebook, has been widely adopted in the industry with good production practices. It also maintains a stable release cycle and perfectly covers our functional requirements. + +Xline primarily serves the consistency metadata management across cloud data centers, where the workload is predominantly read-intensive with fewer writes. Some readers may wonder why we chose RocksDB even though it is an LSM Tree-based storage engine, which is more suitable for write-intensive, read-light scenarios. + +Indeed, in theory, the most suitable storage engine should be based on B+ Trees. However, considering that B+ Tree-based embedded databases like Sled and ForestDB lack extensive production practices and their version maintenance has stalled, we made a trade-off and selected RocksDB as the storage backend for Xline. Additionally, we designed the Persistent Storage Layer with good interface separation and encapsulation to minimize the cost of changing the storage engine in the future, considering the possibility of more suitable storage engines becoming available. + +## Design and Implementation of the Persistent Storage Layer + +Before discussing the design and implementation of the persistent storage layer, it is important to clarify our expectations and requirements for persistent storage: + +1. As mentioned earlier, after considering the trade-offs, we have chosen RocksDB as the backend storage engine for Xline. However, we cannot rule out the possibility of replacing this storage engine in the future. Therefore, the design of the StorageEngine should adhere to the Open-Closed Principle (OCP) and support configurability and easy replacement. +2. We need to provide a basic key-value (KV) interface for the upper-layer users. +3. A comprehensive recovery mechanism needs to be implemented. + +### Overall Architecture and Write Flow + +Let's first take a look at the current overall architecture of Xline, as shown in the following diagram: +![image](/xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image2.png) +From top to bottom, the overall architecture of Xline can be divided into the access layer, consensus module, business logic module, storage API layer, and storage engine layer. The storage API layer is responsible for providing business-related StorageApi to both the business module and the consensus module, while abstracting the implementation details of the underlying storage engine. The storage engine layer is responsible for the actual data persistence operations. +Let's take a PUT request as an example to understand the data writing process. When a client initiates a PUT request to the Xline Server, the following events occur: + +1. The KvServer receives the PutRequest from the client and performs validity checks. Once the request passes the checks, it sends a propose RPC request to the Curp Server using its own CurpClient. +2. Upon receiving the Propose request, the Curp Server first enters the fast path flow. It stores the command from the request in the Speculative Executed Pool (aka. spec_pool) to determine if it conflicts with any existing commands in the pool. If there is a conflict, it returns ProposeError::KeyConflict and waits for the slow path to complete. Otherwise, it continues with the current fast path. +3. In the fast path, if a command is neither conflicting nor duplicated, it notifies the background cmd_worker for execution through a specific channel. Once the cmd_worker starts executing the command, it stores the corresponding command in the CommandBoard to track the execution progress. +4. When consensus is reached among multiple nodes in the cluster, the state machine log is committed and persisted in the CurpStore. Finally, the log is applied, triggering the corresponding CommandExecutor in the business module. Each server's store module is responsible for persisting the actual data to the backend database using the DB interface during the apply process. + +### Interface Design + +The following diagram illustrates the relationships between the StorageApi and StorageEngine traits, as well as their corresponding data structures. + +![image](/xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image3.png) + +#### Storage Engine Layer + +The Storage Engine Layer primarily defines the StorageEngine trait and related errors. +Definition of StorageEngine Trait (engine/src/engine_api.rs): + +\`\`\`rust +/// Write operation +#[non_exhaustive] +#[derive(Debug)] +pub enum WriteOperation<'a> { + /// \`Put\` operation + Put { table: &'a str, key: Vec, value: Vec }, + /// \`Delete\` operation + Delete { table: &'a str, key: &'a [u8] }, + /// Delete range operation, it will remove the database entries in the range [from, to) + DeleteRange { table: &'a str, from: &'a [u8], to: &'a [u8] }, +} + +/// The \`StorageEngine\` trait +pub trait StorageEngine: Send + Sync + 'static + std::fmt::Debug { + /// Get the value associated with a key value and the given table + /// + /// # Errors + /// Return \`EngineError::TableNotFound\` if the given table does not exist + /// Return \`EngineError\` if met some errors + fn get(&self, table: &str, key: impl AsRef<[u8]>) -> Result>, EngineError>; + + /// Get the values associated with the given keys + /// + /// # Errors + /// Return \`EngineError::TableNotFound\` if the given table does not exist + /// Return \`EngineError\` if met some errors + fn get_multi( + &self, + table: &str, + keys: &[impl AsRef<[u8]>], + ) -> Result>>, EngineError>; + + /// Get all the values of the given table + /// # Errors + /// Return \`EngineError::TableNotFound\` if the given table does not exist + /// Return \`EngineError\` if met some errors + #[allow(clippy::type_complexity)] // it's clear that (Vec, Vec) is a key-value pair + fn get_all(&self, table: &str) -> Result, Vec)>, EngineError>; + + /// Commit a batch of write operations + /// If sync is true, the write will be flushed from the operating system + /// buffer cache before the write is considered complete. If this + /// flag is true, writes will be slower. + /// + /// # Errors + /// Return \`EngineError::TableNotFound\` if the given table does not exist + /// Return \`EngineError\` if met some errors + fn write_batch(&self, wr_ops: Vec>, sync: bool) -> Result<(), EngineError>; +} +\`\`\` + +Related Error Definitions + +\`\`\`rust +#[non_exhaustive] +#[derive(Error, Debug)] +pub enum EngineError { + /// Met I/O Error during persisting data + #[error("I/O Error: {0}")] + IoError(#[from] std::io::Error), + /// Table Not Found + #[error("Table {0} Not Found")] + TableNotFound(String), + /// DB File Corrupted + #[error("DB File {0} Corrupted")] + Corruption(String), + /// Invalid Argument Error + #[error("Invalid Argument: {0}")] + InvalidArgument(String), + /// The Underlying Database Error + #[error("The Underlying Database Error: {0}")] + UnderlyingError(String), +} +\`\`\` + +\`MemoryEngine\` (engine/src/memory_engine.rs) and \`RocksEngine\` (engine/src/rocksdb_engine.rs) implement the StorageEngine trait. MemoryEngine is mainly used for testing purposes, while the definition of RocksEngine is as follows: + +\`\`\`rust +/// \`RocksDB\` Storage Engine +#[derive(Debug, Clone)] +pub struct RocksEngine { + /// The inner storage engine of \`RocksDB\` + inner: Arc, +} + +/// Translate a \`RocksError\` into an \`EngineError\` +impl From for EngineError { + #[inline] + fn from(err: RocksError) -> Self { + let err = err.into_string(); + if let Some((err_kind, err_msg)) = err.split_once(':') { + match err_kind { + "Corruption" => EngineError::Corruption(err_msg.to_owned()), + "Invalid argument" => { + if let Some(table_name) = err_msg.strip_prefix(" Column family not found: ") { + EngineError::TableNotFound(table_name.to_owned()) + } else { + EngineError::InvalidArgument(err_msg.to_owned()) + } + } + "IO error" => EngineError::IoError(IoError::new(Other, err_msg)), + _ => EngineError::UnderlyingError(err_msg.to_owned()), + } + } else { + EngineError::UnderlyingError(err) + } + } +} + +impl StorageEngine for RocksEngine { + /// omit some code +} +\`\`\` + +#### StorageApi Layer + +##### Business Module + +Definition of StorageApi in the business module: + +\`\`\`rust +/// The Stable Storage Api +pub trait StorageApi: Send + Sync + 'static + std::fmt::Debug { + /// Get values by keys from storage + fn get_values(&self, table: &'static str, keys: &[K]) -> Result>>, ExecuteError> + where + K: AsRef<[u8]> + std::fmt::Debug; + + /// Get values by keys from storage + fn get_value(&self, table: &'static str, key: K) -> Result>, ExecuteError> + where + K: AsRef<[u8]> + std::fmt::Debug; + + /// Get all values of the given table from the storage + fn get_all(&self, table: &'static str) -> Result, Vec)>, ExecuteError>; + + /// Reset the storage + fn reset(&self) -> Result<(), ExecuteError>; + + /// Flush the operations to storage + fn flush_ops(&self, ops: Vec) -> Result<(), ExecuteError>; +} +\`\`\` + +In the business module, \`DB\` (xline/src/storage/db.rs) is responsible for converting StorageEngine into \`StorageApi\` for upper-level calls. Its definition is as follows: + +\`\`\`rust +/// Database to store revision to kv mapping +#[derive(Debug)] +pub struct DB { + /// internal storage of \`DB\` + engine: Arc, +} + +impl StorageApi for DB +where + S: StorageEngine +{ + /// omit some code +} +\`\`\` + +In the business module, different servers have their own Store backends, and the core data structure is the \`DB\` in the \`StorageApi\` Layer. + +##### Consensus Module + +The \`StorageApi\` definition of the Curp module is located in curp/src/server/storage/mod.rs. + +\`\`\`rust +/// Curp storage api +#[async_trait] +pub(super) trait StorageApi: Send + Sync { + /// Command + type Command: Command; + + /// Put \`voted_for\` in storage, must be flushed on disk before returning + async fn flush_voted_for(&self, term: u64, voted_for: ServerId) -> Result<(), StorageError>; + + /// Put log entries in the storage + async fn put_log_entry(&self, entry: LogEntry) -> Result<(), StorageError>; + + /// Recover from persisted storage + /// Return \`voted_for\` and all log entries + async fn recover( + &self, + ) -> Result<(Option<(u64, ServerId)>, Vec>), StorageError>; +} +\`\`\` + +\`RocksDBStorage\` (curp/src/server/storage/rocksdb.rs) is the CurpStore mentioned in the previous architectural diagram. It is responsible for converting \`StorageApi\` into underlying \`RocksEngine\` operations. + +\`\`\`rust +/// \`RocksDB\` storage implementation +pub(in crate::server) struct RocksDBStorage { + /// DB handle + db: RocksEngine, + /// Phantom + phantom: PhantomData, +} + +#[async_trait] +impl StorageApi for RocksDBStorage { + /// Command + type Command = C; + /// omit some code +} +\`\`\` + +#### Implementation Details + +##### Data Views + +With the introduction of the Persistent Storage Layer, Xline uses logical tables to separate different namespaces. Currently, these tables correspond to Column Families in the underlying RocksDB. +The following tables are currently available: + +1. curp: Stores persistent information related to curp, including log entries, voted_for, and corresponding term information. +2. lease: Stores granted lease information. +3. kv: Stores key-value information. +4. auth: Stores the enablement status of auth in Xline and the corresponding enable revision. +5. user: Stores user information added in Xline. +6. role: Stores role information added in Xline. +7. meta: Stores the current applied log index. + +##### Scalability + +Xline separates storage-related operations into two different traits, StorageEngine and StorageApi, and distributes them across two different layers to isolate changes. The StorageEngine trait provides a mechanism, while the StorageApi is defined by upper-level modules, allowing different modules to have their own definitions and implement specific storage strategies. The CurpStore and DB in the StorageApi layer are responsible for implementing the conversion between these two traits. Since the upper-level callers do not directly depend on the underlying Storage Engine, changing the storage engine later would not require extensive modifications to the code of the upper-level modules. + +##### Recovery Process + +For the recovery process, two important aspects need to be considered: what data to recover and when to perform the recovery. Let's first examine the data involved in recovery between different modules. + +###### Consensus Module + +In the consensus module, since RocksDBStorage is exclusive to Curp Server, the recovery process can be directly added to the respective StorageApi trait. The specific implementation is as follows: + +\`\`\`rust +#[async_trait] +impl StorageApi for RocksDBStorage { + /// Command + type Command = C; + /// omit some code + async fn recover( + &self, + ) -> Result<(Option<(u64, ServerId)>, Vec>), StorageError> { + let voted_for = self + .db + .get(CF, VOTE_FOR)? + .map(|bytes| bincode::deserialize::<(u64, ServerId)>(&bytes)) + .transpose()?; + + let mut entries = vec![]; + let mut prev_index = 0; + for (k, v) in self.db.get_all(CF)? { + // we can identify whether a kv is a state or entry by the key length + if k.len() == VOTE_FOR.len() { + continue; + } + let entry: LogEntry = bincode::deserialize(&v)?; + #[allow(clippy::integer_arithmetic)] // won't overflow + if entry.index != prev_index + 1 { + // break when logs are no longer consistent + break; + } + prev_index = entry.index; + entries.push(entry); + } + + Ok((voted_for, entries)) + } +} +\`\`\` + +For the consensus module, during the recovery process, the voted_for value and the corresponding term are first loaded from the underlying database. This is a security guarantee for the consensus algorithm to prevent voting twice within the same term. Subsequently, the corresponding log entries are loaded. + +###### Business Module + +For the business module, different servers have different stores and rely on the mechanisms provided by the underlying DB. Therefore, the recovery process is not defined in the StorageApi trait but exists as separate methods in LeaseStore (xline/src/storage/lease_store/mod.rs), AuthStore (xline/src/storage/auth_store/store.rs), and KvStore (xline/src/storage/kv_store.rs). + +\`\`\`rust +/// Lease store +#[derive(Debug)] +pub(crate) struct LeaseStore +where + DB: StorageApi, +{ + /// Lease store Backend + inner: Arc>, +} + +impl LeaseStoreBackend +where + DB: StorageApi, +{ + /// omit some code + /// Recover data form persistent storage + fn recover_from_current_db(&self) -> Result<(), ExecuteError> { + let leases = self.get_all()?; + for lease in leases { + let _ignore = self + .lease_collection + .write() + .grant(lease.id, lease.ttl, false); + } + Ok(()) + } +} + +impl AuthStore +where + S: StorageApi, +{ + /// Recover data from persistent storage + pub(crate) fn recover(&self) -> Result<(), ExecuteError> { + let enabled = self.backend.get_enable()?; + if enabled { + self.enabled.store(true, AtomicOrdering::Relaxed); + } + let revision = self.backend.get_revision()?; + self.revision.set(revision); + self.create_permission_cache()?; + Ok(()) + } +} +\`\`\` + +Among them, the recovery logic for \`LeaseStore\` and \`AuthStore\` is relatively simple, and we won't delve into it too much. Let's focus on the recovery process of \`KvStore\`. The flowchart for its recovery process is as follows: + +![image](/xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image4.png) + +###### Recovery Timing + +The recovery timing in Xline primarily occurs during the initial system startup. The recovery of the business module is prioritized, followed by the recovery of the consensus module. Since the recovery of KvStore depends on the recovery of LeaseStore, the recovery of LeaseStore needs to take place before the recovery of KvStore. The corresponding code in xline/src/server/xline_server.rs is as follows: + +\`\`\`rust +impl XlineServer +where + S: StorageApi, +{ + /// Start \`XlineServer\` + #[inline] + pub async fn start(&self, addr: SocketAddr) -> Result<()> { + // lease storage must recover before kv storage + self.lease_storage.recover()?; + self.kv_storage.recover().await?; + self.auth_storage.recover()?; + let (kv_server, lock_server, lease_server, auth_server, watch_server, curp_server) = + self.init_servers().await; + Ok(Server::builder() + .add_service(RpcLockServer::new(lock_server)) + .add_service(RpcKvServer::new(kv_server)) + .add_service(RpcLeaseServer::from_arc(lease_server)) + .add_service(RpcAuthServer::new(auth_server)) + .add_service(RpcWatchServer::new(watch_server)) + .add_service(ProtocolServer::new(curp_server)) + .serve(addr) + .await?) + } +\`\`\` + +The recovery process of the consensus module (curp/src/server/curp_node.rs) is as follows, with the function call chain: XlineServer::start -> XlineServer::init_servers -> CurpServer::new -> CurpNode::new + +\`\`\`rust +// utils +impl CurpNode { + /// Create a new server instance + #[inline] + pub(super) async fn new + 'static>( + id: ServerId, + is_leader: bool, + others: HashMap, + cmd_executor: CE, + curp_cfg: Arc, + tx_filter: Option>, + ) -> Result { + // omit some code + // create curp state machine + let (voted_for, entries) = storage.recover().await?; + let curp = if voted_for.is_none() && entries.is_empty() { + Arc::new(RawCurp::new( + id, + others.keys().cloned().collect(), + is_leader, + Arc::clone(&cmd_board), + Arc::clone(&spec_pool), + uncommitted_pool, + curp_cfg, + Box::new(exe_tx), + sync_tx, + calibrate_tx, + log_tx, + )) + } else { + info!( + "{} recovered voted_for({voted_for:?}), entries from {:?} to {:?}", + id, + entries.first(), + entries.last() + ); + Arc::new(RawCurp::recover_from( + id, + others.keys().cloned().collect(), + is_leader, + Arc::clone(&cmd_board), + Arc::clone(&spec_pool), + uncommitted_pool, + curp_cfg, + Box::new(exe_tx), + sync_tx, + calibrate_tx, + log_tx, + voted_for, + entries, + last_applied.numeric_cast(), + )) + }; + // omit some code + Ok(Self { + curp, + spec_pool, + cmd_board, + shutdown_trigger, + storage, + }) + } +\`\`\` + +Performance Evaluation +In v0.3.0, except for introducing the persistent storage layer, we also conducted significant refactoring on certain parts of CURP. After completing the refactoring and adding new features, we recently passed the validation test and integration test. The performance testing information has already been released in Xline v 0.4.0. +Xline GitHub :https://github.com/datenlord/Xline +`,B5=`--- + cover: /xline-home/blog/Introduction-to-CURP-Protocol/cover.png + author: + name: Jiawei Zhao + url: https://github.com/Phoenix500526 + img_url: https://avatars.githubusercontent.com/u/9337239?v=4 + read_time: 20 +--- + +Xline is an open source distributed KV storage engine, its core purpose is to achieve high-performance strong consistency across data centers, providing cross-data center metadata management. So how does Xline achieve this high-performance strong consistency across data centers? This article will lead you to find out. + +--- + +## 1. What is Xline + +Xline is an open source distributed KV storage engine, its core purpose is to achieve high-performance strong consistency across data centers, providing cross-data center metadata management. So how does Xline achieve this high-performance strong consistency across data centers? This article will lead you to find out. + +## 2. The Overall Architecture of Xline + +Let's take a look at the overall architecture of Xline, as shown below: + +![Graph1](/xline-home/blog/Introduction-to-CURP-Protocol/graph1.jpg) + +From top to bottom, Xline can be roughly divided into three layers, namely + +- Access layer: Implemented using the gRPC framework, responsible for receiving requests from clients. +- Middle Layer: it can be divided into CURP Consensus Module (left) and Business Server Module (right), where: + - CURP Consensus Module: Implements the CURP consensus algorithm, the code corresponds to the curp crate in Xline, while the corresponding RPC service is defined in curp/proto. + - Business Server Module: It is responsible for realizing the upper layer business logic of Xline, such as KvServer for KV-related requests and AuthServer for authentication requests, etc. The code corresponds to the xline crate, while the corresponding RPC service is defined in the xlineapi crate. +- Storage layer: responsible for the persistence of data and metadata within Xline, providing abstract interfaces to the upper layer, the code corresponds to the engine crate. + +## 3. Introduction to the CURP protocol + +### What is CURP? + +The consensus protocol used in Xline is not Paxos or Raft, but a new consensus protocol called CURP, which is called "Consistent Unordered Replication Protocol (CURP)". It was initiated in NSDI 2019's paper "Exploiting Commutativity For Practical Fast Replication," which was authored by Seo Jin Park, a PhD student from Stanford, and Prof. John Ousterhout, who is also the authors of Raft algorithm. + +### Why the CURP Protocol? + +Why did Xline use a new protocol like CURP instead of Raft or Multi-Paxos as the underlying consensus protocol? To illustrate, let's look at the problems with Raft and Multi-Paxos. +The following figure shows a flow of Raft's consensus process: + +![Graph2](/xline-home/blog/Introduction-to-CURP-Protocol/graph2.jpg) + +In this timing diagram, we can see how the Raft protocol reaches consensus: + +1. The client makes a proposal request to the leader. +2. The leader receives the proposal request from the client, appends it to its state machine log, and broadcasts the AppendEntries request to other followers in the cluster. +3. After receiving the AppendEntries request from the leader, the follower performs a log consistency check to determine whether it can be added to its own state machine log. It responds with a success message if the check is successful or a failure message if the check fails. +4. The leader counts the number of successful responses received, and if it exceeds half of the number of cluster nodes, the consensus is considered reached and the proposal is successful, otherwise the proposal is considered to have failed and the result is returned to the client. + +The following figure shows the flow of Multi-Paxos protocol to reach a consensus: + +![Graph3](/xline-home/blog/Introduction-to-CURP-Protocol/graph3.jpg) + +In this timing diagram, we can understand the flow of Multi-Paxos protocol to reach consensus: + +1. The client makes a proposal request to the leader. +2. The leader finds the index of the first unapproved log entry in its state machine log, and then executes the Basic Paxos algorithm to propose the log at index with the proposal value requested by the client. +3. The follower receives the proposal value from the leader and decides whether to accept the proposal value and return a successful response, or to return a failing response. +4. The leader counts the number of successful responses received, and if it exceeds half of the number of nodes in the cluster, it considers that the consensus has been reached and the proposal is successful, otherwise, it considers that the proposal fails and returns the result to the client. + +Be it Multi-Paxos or Raft, reaching consensus inevitably requires 2 RTTs. Both of them are based on a core assumption: the criteria of being durably stored and ordered must be met after command approval or log commit. As a result, the state machine can directly perform the approved commands or apply committed logs. Due to the inherent asynchrony of the network, ensuring orderliness is challenging. Therefore, a leader is required to enforce the execution order of different commands and achieve persistence by obtaining replication from the majority through broadcasting. This process cannot be completed within a single RTT. + +That's why Xline didn't choose Raft or Multi-Paxos as the underlying consensus algorithm. Xline was primarily designed to manage metadata across data centers. As we all know, for a single data center, the latency of its intranet is often very low, only a few milliseconds or even less than 1ms, while for a cross-datacenter wide area network, the network latency can reach tens of milliseconds or even hundreds of milliseconds. Traditional consensus algorithms, such as Raft or Multi-Paxos, require 2 RTTs to reach a consensus, regardless of the state of the consensus, which often leads to serious performance bottlenecks in such high latency network environments. This makes us wonder whether two or more RTTs are necessary to reach consensus in any case. + +The CURP algorithm is an unordered replication algorithm that breaks down the consensus scenarios into the following two categories: +**Fast path**: In non-conflicting scenarios , relaxing the ordering requirements for consensus does not affect the final consensus under the premise of persistent storage. Since the fast path only requires storage persistency, only 1 RTT is needed to reach consensus. We call fast path the front-end of the protocol. +**Slow path**: In conflicting scenarios, both the requirement for ordered concurrent request and persistent storage need to be satisfied, thus requring 2 RTTs to achieve consensus. We refer to the slow path as the back-end of the protocol. + +Then reader may wonder, what exactly is the conflict here? Let's use a simple KV operation as an example. In the nodes of a distributed system, the operations we do on the state machine are just read and write, and in the case of concurrent operations on the state machine, there are four scenarios: read-after-read, read-after-write, write-after-read, and write-after-write. Obviously, for read-after-read, which is a read-only operation with no side-effects, there is no conflict under any circumstances, and the final result is always the same, whether it is read first or next. When operating on different keys, for example, PUT A=1, PUT B=2, then for the final state of the state machine, no matter whether to execute PUT A=1 first, PUT B=2 next, or vice versa, the final result of reading from the state machine is A=1, B=2. The same applies to the scenario of read-write mixing. Therefore, when there is no intersection between the keys of multiple operations performed concurrently on a state machine, we say that these operations are non-conflicting. Conversely, if the concurrent operations include at least one write operation, and the keys of those operations are intersected, the operations are in conflict. + +### fast path vs. slow path + +How does CURP implement fast path and slow path? Below is a sketch of the cluster topology in the CURP algorithm. + +Let's take a look at what's going on in this diagram: + +![Graph4](/xline-home/blog/Introduction-to-CURP-Protocol/graph4.jpg) + +1. Client: the client that makes the request to the cluster. +2. Master: Corresponds to the leader node in the cluster, which holds the state machine logs, where the green part represents the logs that have been persisted to disk, and the blue part represents the logs that are stored in memory. +3. Follower nodes: Corresponds to the yellow dotted box in the figure above, each follower contains the following two components. + a. Witness: it can be approximated as a memory-based HashMap, on one hand, it is responsible for logging the current requests in the cluster in the fast path process, on the other hand, CURP will also use Witness to determine whether there is a conflict in the current request. All the records saved in Witness are unordered. + b. Backup: Keeps state machine logs that are persisted to disk. + +Next, let's take the example PUT z=7 in the figure to see the execution flow of fast path: + +1. Client broadcasts a request for PUT z=7 to all nodes in the cluster. +2. When a node in the cluster receives the request, it executes different logic depending on its role. + a. The leader receives the request and immediately writes the data z = 7 locally (that is, the blue part in the state machine log) and returns OK immediately. + b. When the follower receives the request, it uses witness to determine whether the request is in conflict . Since z = 7 does not conflict with y = 5, which is the only one in the witness, the follower saves z = 7 to the witness and returns OK to the client. +3. Client collects and counts the number of successful responses received. For a cluster with 2f + 1 nodes, when the number of received successful responses reaches f+f/2+1, the operation is confirmed to be persisted to the cluster, which takes 1 RTT for the whole process. + +Next, based on the previous fast path example, let's take PUT z = 9 as an example to see the execution flow of slow path. Since z = 9 conflicts with z = 7, the fast path initiated by the client will fail and the slow path will be executed: + +1. Client broadcasts a PUT z=9 request to all nodes in the cluster. +2. The nodes in the cluster receive the request and perform different logic according to their roles. + a. The leader receives the request and writes z = 9 to the state machine log. Since z = 9 conflicts with z = 7, it returns a KeyConflict response to the client and asynchronously initiates an AppendEntries request to synchronize the state machine log to the other nodes in the cluster. + b. The follower receives the request and refuses to save the proposal since z = 9 conflicts with z = 7 in the witness. +3. Client collects and counts the number of successful responses received. Since the number of rejected responses received exceeds f/2, client needs to wait for the slow path to complete. +4. When the AppendEntries in step 2 are executed successfully, the follower appends all three state machine logs (y = 5, z = 7, z = 9) of the leader to the Backup, removes the relevant logs from the witness, and returns the successful responses to the leader. +5. The leader counts the number of successful responses received. If it exceeds half of the number of cluster nodes, the consensus is considered reached and the proposal succeeds. Otherwise, the proposal fails and the result is returned to the client. + +## 4. Summary + +Xline is a distributed KV storage that provides strong consistency across data centers. One of its core problems is how to provide high-performance strong consistency in a high latency WAN environment across data centers. Traditional distributed consensus algorithms, such as Raft and Multi-Paxos, guarantee state machine consistency by making all operations satisfy storage persistency and the ordering prerequisite. The CURP protocol, makes a finer-grained division of consensus scenarios, splitting the protocol into front-end (fast path) and back-end (slow path), where the front-end only guarantees that the proposal will be persisted to the cluster, while the back-end not only guarantees persistence, but also ensures that all nodes that have saved the proposal will execute the commands in the same order, guaranteeing the consistency of the state machine. + +This is the end of the introduction to the CURP protocol. For more details, please refer to our other articles and shares, as follows: +Rethinking the Curp Consensus Protocol +DatenLord | Xline Geo-distributed KV Storage + +Xline is a geo-distributed KV storage for metadata management. Xline project is written in Rust, and you are welcomed to participate in our open-source project! +GitHub link: +https://github.com/xline-kv/Xline +Xline official website: www.xline.cloud +Xline Discord: +https://discord.gg/XyFXGpSfvb +`,F5=`--- + cover: /xline-home/blog/Mechanism-and-Implementation-of-Lease/cover.png + author: + name: Yu Guan + url: https://github.com/themanforfree + img_url: https://avatars.githubusercontent.com/u/56149350?v=4 + read_time: 20 +--- + +Xline is an open source distributed KV storage engine for managing small amounts of critical data, with the aim of high performance data access and strong consistency across data centers. Xline provides a series of etcd-compatible access interfaces, including KV, Watch, Lease, and more. In this article, we will focus on the Lease interface. + +--- + +## 1. Introduction + +Xline is an open source distributed KV storage engine for managing small amounts of critical data, with the aim of high performance data access and strong consistency across data centers. Xline provides a series of etcd-compatible access interfaces, including KV, Watch, Lease, and more. In this article, we will focus on the Lease interface. + +Lease is a lease mechanism between client and server. Similar to the car rental service in our real life, when we need to use a car, we can apply for a lease from the car rental company, the car rental company will assign a car to us, and guarantee that the car will not be assigned to other people during the validity period agreed between us and the car rental company. If we want to use it for a longer period of time, we can renew the lease to the car rental company. If we no longer want to use the car, we can either return and cancel it, or wait for the lease to expire and return it automatically. + +The use of Lease in Xline is very similar to the real life car rental service. The client can apply for a lease from the server, the server will then ensure that the lease will not be revoked during the validity period. The client can also end the lease early or extend the TTL of lease through the corresponding interface. Unlike real-life car rental, we can bind some key-values to the lease, while they will be deleted with the expiration of the lease. + +According to the ability of Lease introduced above, we can use Lease to realize our purpose in many scenarios, the following are some common Lease application scenarios: +Distributed locks: Distributed locks are realized through several mechanisms, while Lease play a role in avoiding deadlocks in distributed locks. When a client requests for a distributed lock, it creates a lease and renews the lease continuously, while also writes key-value and attaches it to the lease. This key-value represents the occupancy state of the distributed lock, and if the client occupying the lock is unable to release the lock actively due to a failure, the Lease mechanism ensures that the corresponding key-value will be deleted automatically to release the current lock after the expiration of the lease. +Service Registry: A lease is created when registering a new service, and written the key-value of service-related information with lease. During the survival of the service, the service will renew its lease continuously. If the lease cannot be renewed automatically after the service fails, the corresponding key-value will be deleted automatically, and the corresponding service will be deregistered in the registry center. +Authorization Management in Distributed Systems: Clients apply for a lease to gain permissions for resources, if the client loses connection with the server, or if the lease expires due to failure to renew the lease in time, the client loses the corresponding permissions. + +## 2. Architecture + +![Image](/xline-home/blog/Mechanism-and-Implementation-of-Lease/image1.PNG) + +The above figure is a simple architecture diagram of Lease implementation. There are two ways for an external client to send a request to the Xline cluster. One is to directly broadcast the request to all nodes in the cluster through the Curp protocol. After the Curp module reaches a consensus, it applies the request to the state machine, which is to write the request to the storage layer. + +Another way is for the client to directly send the request to the LeaseServer of one of the nodes in the cluster, which is also the service request method that is compatible with etcd. After the request reaches the LeaseServer, there will be two different processing paths, most of the requests will be broadcasted to all the nodes in the cluster through the Curp client bound to the server, and the remaining small number of requests may only be handled by some of the nodes, which will be forwarded to the LeaseServer of the specific nodes and applied to the state machine. + +## 3. Source Code Analysis + +### Source Code Organization + +The Lease-related source code is mainly stored in the following files, which are roughly organized into three sections: + +1. RPC Definitions: + +- xlineapi/proto/rpc.proto: rpc interface definitions for each Server within Xline, including the LeaseServer interface definition. +- xlineapi/proto/lease.proto: rpc message definition for Lease. + +2. LeaseServer implementation: + +- xline/src/server/lease_server.rs: Responsible for providing the implementation of the Lease RPC service, the main purpose is to provide etcd compliant interface.If the client send the propose directly through the external curp, this interface can be omitted, while some of the requests that do not go through the consensus protocol must be processed through the LeaseServer. + +3. LeaseStore implementation: + +- xline/src/storage/lease_store/lease.rs: Defines the Lease data structure, which is used to store Lease-related information, such as all the keys bound on the Lease, the expiration time of the Lease, the remaining TTL of the Lease, etc. It also implements some practical methods for it. +- xline/src/storage/lease_store/lease_queue.rs: Defines LeaseQueue and related methods. LeaseQueue is a priority queue consisting of lease IDs and lease expiration times, while a background-resident task will capture all the expired lease IDs through this structure at regular intervals. +- xline/src/storage/lease_store/lease_collection.rs: Defines the LeaseCollection and related methods. The LeaseCollection is a collection of the core data structures of a lease, providing the core capabilities of the lease mechanism. The structure contains three parts: lease_map saves all the lease structures; item_map caches the key to lease ID mapping; and expired_queue manages the lease expiration time. expired_queue is only used on the leader node, and is empty on other nodes. +- xline/src/storage/lease_store/mod.rs: Definition and method implementation of LeaseStore. It is responsible for providing the storage layer abstraction for lease and the storage layer interface for all lease related operations externally. Its inner part contains LeaseCollection and some data structures which are shared with KvStore. + +### Lease Creation + +If you want to use a lease, you must create a lease first, and when doing so, you need to use the LeaseGrant interface provided by LeaseServer. The LeaseGrant RPC is quite straightforward, which is to assign a lease ID, and submit the request to the consensus protocol through propose interface?. Once consensus is reached, the request is executed in the LeaseStore. + +LeaseStore will create and insert a new lease in LeaseCollection. The core code logic is as follows: + +\`\`\`rust +... +if is_leader { + let expiry = lease.refresh(Duration::ZERO); + let _ignore = inner.expired_queue.insert(lease_id, expiry); +} else { + lease.forever(); +} +let _ignore = inner.lease_map.insert(lease_id, lease.clone()); +... +\`\`\` + +Note that if the current node is the leader node, it also needs to manage the lease's expiration time. Therefore, it must calculate the expiration time of the lease through the refresh method and insert it into the expired_queue. The other nodes do not need this step, they just need to insert the new lease into the lease_map. + +After the lease is created, the server returns a response to the client containing the lease ID. + +### Using Lease + +![Image](/xline-home/blog/Mechanism-and-Implementation-of-Lease/image2.png) + +After getting the lease ID, the client can use the lease through the lease ID. When putting a pair of key values, lease ID can be attached. When this Put request is applied to the state machine, in addition to writing the key-value directly to the index and DB of the KvStore, it will detach the current key from the old lease by the detach method provided by the LeaseCollection, and attach the key that needs to be put to the new lease ID by attach. + +\`\`\`bash +pub(crate) fn attach(&self, lease_id: i64, key: Vec) -> Result<(), ExecuteError> { + let mut inner = self.inner.write(); + let Some(lease) = inner.lease_map.get_mut(&lease_id) else { + return Err(ExecuteError::lease_not_found(lease_id)); + }; + lease.insert_key(key.clone()); + let _ignore = inner.item_map.insert(key, lease_id); + Ok(()) +} +\`\`\` + +The implementation of attach is to find the corresponding lease by the lease ID, attach the key to the lease, and add the mapping of the key to the lease ID to the item_map. Detach is the opposite of attach, it removes the content inserted when attaching. + +After the above process, we have successfully associated the key with the lease ID. If the lease is actively revoked or times out, the lease and all the keys associated with it will be deleted. + +## Active Lease Deletion + +To delete a lease, you need to use the LeaseRevoke interface, which is basically the same as LeaseGrant in LeaseServer. Both of them pass the request to the consensus protocol for processing, while the only difference is that LeaseRevoke doesn't need to assign a lease ID. + +\`\`\`rust +let del_keys = match self.lease_collection.look_up(req.id) { + Some(l) => l.keys(), + None => return Err(ExecuteError::lease_not_found(req.id)), +}; +if del_keys.is_empty() { + let _ignore = self.lease_collection.revoke(req.id); + return Ok(Vec::new()); +} + +// delete keys ... + +let _ignore = self.lease_collection.revoke(req.id); +\`\`\` + +When LeaseRevoke is executed, it first tries to find out if the lease has any associated keys, if not, it can directly remove the lease through the revoke method on the LeaseCollection. If there are associated keys, it needs to remove all associated keys from the KV Store and clean up the relationship between these keys and the lease ID in the LeaseCollection before you can revoke the lease from the LeaseCollection. + +### Lease expiration + +![Image](/xline-home/blog/Mechanism-and-Implementation-of-Lease/image3.png) + +The Lease expiration process is shown in the above figure, which omits the consensus part. When initializing LeaseServer, a background resident revoke_expired_leases_task is created, the main code of this task is as follows: + +\`\`\`bash +loop { + // only leader will check expired lease + if lease_server.lease_storage.is_primary() { + for id in lease_server.lease_storage.find_expired_leases() { + let _handle = tokio::spawn({ + let s = Arc::clone(&lease_server); + async move { + let request = tonic::Request::new(LeaseRevokeRequest { id }); + if let Err(e) = s.lease_revoke(request).await { + warn!("Failed to revoke expired leases: {}", e); + } + } + }); + } + } + time::sleep(DEFAULT_LEASE_REQUEST_TIME).await; +} +\`\`\` + +On the node responsible for managing Lease expiration time, this task will periodically captures all the expired lease IDs through find_expired_leases, and calls the lease_revoke interface on the lease server to delete the expired Leases, utilizing the same interface as clients use to actively delete Leases. +find_expired_leases is a core method in LeaseCollection, and its implementation is as follows: + +\`\`\`rust +pub(crate) fn find_expired_leases(&self) -> Vec { + let mut expired_leases = vec![]; + let mut inner = self.inner.write(); + while let Some(expiry) = inner.expired_queue.peek() { + if *expiry <= Instant::now() { + #[allow(clippy::unwrap_used)] // queue.peek() returns Some + let id = inner.expired_queue.pop().unwrap(); + if inner.lease_map.contains_key(&id) { + expired_leases.push(id); + } + } else { + break; + } + } + expired_leases +} +\`\`\` + +When a lease is created, the expiration time of the lease is already calculated and inserted into the expired_queue. When calling find_expired_queue, the process continuously attempts to extract the expired leases from the head of the priority queue until it encounters the first one that has not yet expired. It then returns all the lease ID obtained in this process. + +### Lease Renewal + +If you want the created lease to last longer, you need to maintain a stream between the client and the server, where the client sends LeaseKeepAlive requests to the server at regular intervals. Unlike the previous requests, LeaseKeepAlive requests do not need to go through the consensus protocol because they rely on the expiration time of a lease that exists only on the leader node, so only the leader node can process LeaseKeepAlive requests, while the follower node forwards the request to the leader node for processing. The forwarding logic can be found in the source code of lease_server.rs. +After the stream is established between the leader and the client, whenever the leader receives a lease ID from the stream, it will renew the lease. The final renewal logic is realized by the renewal method provided by LeaseCollection. This method is defined as follows: + +\`\`\`bash +pub(crate) fn renew(&self, lease_id: i64) -> Result { + let mut inner = self.inner.write(); + let (expiry, ttl) = { + let Some(lease) = inner.lease_map.get_mut(&lease_id) else { + return Err(ExecuteError::lease_not_found(lease_id)); + }; + if lease.expired() { + return Err(ExecuteError::lease_expired(lease_id)); + } + let expiry = lease.refresh(Duration::default()); + let ttl = lease.ttl().as_secs().cast(); + (expiry, ttl) + }; + let _ignore = inner.expired_queue.update(lease_id, expiry); + Ok(ttl) +} +\`\`\` + +Renew will first check whether the corresponding lease has expired or not. If not, it will recalculate the expiration time, and then update its order in the expired_queue. +As long as the connection between the client and the server is not interrupted, the client will continue to send LeaseKeepAlive requests to the server via stream, preventing the lease from timing out. The primary application scenarios for leases, as mentioned in the previous section, almost always use this feature to determine whether the client is running normally. + +### Lease information reading + +Lease has two reading interfaces. One is LeaseTimeToLive, which will read the detailed information of a lease, including its expiration time. Same as LeaseKeepAlive, because the expiration time only exists in the leader node, so the request needs to be forwarded to only the leader for processing. +Another reading interface is LeaseLeases, which lists all the lease IDs in the system. This interface doesn't need information about the lease expiration time, so it can be handed over to the consensus protocol directly, which makes the processing in LeaseServer similar to that of LeaseGrant and LeaseRevoke. We wouldn’t go into further details here. +The ability of LeaseTimeToLive and LeaseLeases to read information is finally realized by LeaseCollection, the source code is as follows: + +\`\`\`rust +pub(crate) fn look_up(&self, lease_id: i64) -> Option { + self.inner.read().lease_map.get(&lease_id).cloned() +} + +pub(crate) fn leases(&self) -> Vec { + let mut leases = self + .inner + .read() + .lease_map + .values() + .cloned() + .collect::>(); + leases.sort_by_key(Lease::remaining); + leases +} +\`\`\` + +## 4. Summary + +In this article, we have introduced Lease, an important interface of Xline, which allows users to realize the on-time expiration of a set of keys and renew the lease through KeepAlive interface. This feature also allows the server to monitor the client's status. Relying on these features of the Lease mechanism, many typical application scenarios have been born, such as distributed locks, service registries, authorization management and so on, as described in this article. +The article also explains how users can utilize the Lease interface, and outlines the realization of key functionalities within this process. If you want to learn more about the detailed code, you can also refer to our open source repository: https://github.com/xline-kv/Xline . + +Xline is a geo-distributed KV storage for metadata management. the Xline project is written in Rust, and you are welcome to participate in our open source project! + +GitHub link: +https://github.com/xline-kv/Xline +Xline official website: www.xline.cloud +Xline Discord: +https://discord.gg/XyFXGpSfvb +`,$5=`--- + cover: /xline-home/blog/Implementation-of-CURP-Server/cover.jpg + author: + name: Jiawei Zhao + url: https://github.com/Phoenix500526 + img_url: https://avatars.githubusercontent.com/u/9337239?v=4 + read_time: 30 +--- + +In the previous article, An Introduction to the CURP Protocol, we gave a preliminary introduction to the CURP Protocol. Now, let’s continue from where we left off and delve into the internal workings of the CURP Server. + +--- + +## Organization of the Curp Crate’s Source Code + +Now, let’s focus on the curp consensus module. The curp module is a separate crate in Xline, with all of its source code stored in the curp directory, which is organized as follows: + +curp/proto: Holds the definition of the rpc interfaces and messages related to the curp protocol. + +curp/tla+: Holds content related to the tla+ specification of the curp protocol + +curp/tests: integration tests + +curp/src: the main implementation code of the CURP protocol, which can be divided into: + +client.rs: CURP client-side implementation. + +cmd.rs: defines key traits for interacting with external mods + +log_entry.rs: state machine log entries. + +rpc/: CURP server implementation of rpc methods. + +server/: CURP server-side implementation, including the following + +Key data structure definitions: cmd_board.rs, spec_pool.rs + +Key background tasks: cmd_worker/, gc.rs + +CURP server front and backend implementations: curp_node.rs, raw_curp/ + +storage/: implements the interface definition of the persistence layer, used to interact with the storage layer + +## Curp Server Architecture and Task Division + +After understanding the rpc services provided by Curp Server and the corresponding traits, let’s take a look at the architecture and startup process of Curp Server. + +![image1](/xline-home/blog/Implementation-of-CURP-Server/image1.png) + +Architecturally, the entire Curp Server can be divided into the front-end CurpNode and the back-end RawCurp. Such a design primarily aims to separate synchronous and asynchronous code. Regarding Rust’s asynchronous code: + +1. For tasks spawned by tokio, since the compiler inherently doesn’t know how long the task will run, it enforces that all tasks must have a ‘static lifetime. This often requires us to clone certain reference data structures. +2. Non-Send variables, like MutexGuard, are prohibited from crossing .await statements. When synchronous and asynchronous code are mixed, it necessitates manually releasing this MutexGuard before the await, either within a block or through an explicit drop. This leads to nested code structures, making it more challenging to read.By separating CurpNode (handling synchronous requests) and RawCurp (handling asynchronous requests), the code boundaries are more transparent, enhancing code readability. + +For insights on organizing asynchronous code gracefully in Rust projects, you can refer to another article: How to Gracefully Organize Asynchronous Code in Rust Projects. + +Within the CurpNode structure, there are spec_pool and cmd_board structures. The spec_pool corresponds to the witness structure in the CURP paper, responsible for storing commands executed in the fast path. In contrast, cmd_board stores the results of command executions. CurpNode can register a listener to cmd_board. Once the RawCurp backend asynchronously completes command execution, the result is inserted into cmd_board, and CurpNode is notified via the listener to return the command execution outcome to the user. When RawCurp receives a request from CurpNode, it inserts the command into the conflict detection queue — the conflict_checked_channel. + +As the name implies, a conflict_checked_channel is essentially an mpmc channel that accepts cmd’s from a CurpNode concurrently and dynamically maintains conflict relationships between different cmd’s to ensure that the commands a command worker receives from the channel will always conflict with the currently executing command. + +As the name suggests, the conflict_checked_channel is essentially an mpmc channel, capable of concurrently accepting cmds from CurpNode. It dynamically maintains the conflict relationships between different cmds, ensuring that commands retrieved by the command worker from the channel always not conflict with the currently executed commands. The command worker is the command execution entity. While the conflict_checked_channel focuses on relationships between various commands, the command worker is concerned with how to execute the commands. After the command worker completes the command and obtains the result, it inserts the result into cmd_board, triggering the listener and notifying CurpNode that the command execution is finished. + +## How Curp Server Interacts with Business Server + +From the architecture diagram mentioned earlier, we can see that the Curp consensus module provides a Curp Server, which offers rpc services externally. In Xline, the Business Servers make requests to Curp Server via rpc calls. Once the Curp Server processes the request, it notifies the Business Server through the corresponding trait. + +## Service Definitions + +Let’s first take a look at the services defined by Curp Server: + +\`\`\` +service Protocol { + rpc Propose (ProposeRequest) returns (ProposeResponse); + rpc WaitSynced (WaitSyncedRequest) returns (WaitSyncedResponse); + rpc AppendEntries (AppendEntriesRequest) returns (AppendEntriesResponse); + rpc Vote (VoteRequest) returns (VoteResponse); + rpc FetchLeader (FetchLeaderRequest) returns (FetchLeaderResponse); + rpc InstallSnapshot (stream InstallSnapshotRequest) returns (InstallSnapshotResponse); +} +\`\`\` + +The purposes of these services are: + +- Propose: To initiate a proposal request to the Curp cluster. +- WaitSynced: To wait for the Curp cluster to complete requests in the after-sync phase. +- AppendEntries: To initiate a request to the Curp cluster to append state machine logs. +- Vote: When a Curp Server initiates an election, it transitions its role to Candidate and uses this interface to send voting requests to other Curp Servers. If it receives a majority of positive responses, it becomes the leader; otherwise, it reverts to follower. +- FetchLeader: To retrieve the current leader node of the Curp cluster. +- InstallSnapshot: If a Curp Server’s state machine log lags significantly behind the leader, it can request a snapshot from the leader through this interface to catch up with the leader’s state machine log. Except for Propose and FetchLeader, the other services are primarily for internal use by Curp Server. The Business Servers fetch the current leader information via FetchLeader and makes proposals to the Curp cluster through Propose. + +## Interface Definitions + +Next, let’s see which traits are defined by the Curp module. From a design perspective, the traits defined in Curp can be divided into two categories: + +1. Command-related: Once the Curp module reaches a consensus on a specific command, it notifies the Business Server to execute the corresponding command via related traits. +2. Role-related: When the role of a Curp node changes, it notifies the corresponding business component (e.g., Lessor, Compactor) via related traits. + +### Command-related Traits + +The command-related traits defined in the Curp module mainly include Command, ConflictCheck, and CommandExecutor. Let’s first examine the Command and ConflictCheck traits, which are defined as: + +\`\`\`rust +pub trait ConflictCheck { + fn is_conflict(&self, other: &Self) -> bool; +} + +#[async_trait] +pub trait Command{ + /// omit some code... + + #[inline] + fn prepare(&self, e: &E, index: LogIndex) -> Result + where + E: CommandExecutor + Send + Sync, + { + >::prepare(e, self, index) + } + + #[inline] + async fn execute(&self, e: &E, index: LogIndex) -> Result + where + E: CommandExecutor + Send + Sync, + { + >::execute(e, self, index).await + } + + #[inline] + async fn after_sync( + &self, + e: &E, + index: LogIndex, + prepare_res: Self::PR, + ) -> Result + where + E: CommandExecutor + Send + Sync, + { + >::after_sync(e, self, index, prepare_res).await + } +}The Command trait describes a command entity that can be executed by Business Server. ConflictCheck detects whether conflicts exist between multiple commands. The conflict criterion is whether there’s an intersection between keys of two different commands. +\`\`\` + +Command defines four associated types (K, PR, ER, and ASR). Here, K represents the Key corresponding to the command, while ER and ASR correspond to the results of the command in the execute and after_sync phases of the Curp protocol, respectively. What does PR represent? PR denotes the result of the command in the prepare phase. + +To explain the need for a prepare phase, let’s consider an example. Since Xline employs the MVCC mechanism for multi-version management of key-value pairs, each key is assigned a revision. If a client sends two consecutive commands to Xline: PUT A=1 and PUT B=1 (denoted as cmd1 and cmd2) with expected revisions of 3 and 4, respectively, Xline can execute these two non-conflicting commands concurrently and out of order. If cmd2 finishes before cmd1, the revision order may be reversed, leading to errors. + +To solve this, a prepare phase is introduced to Command. Curp ensures that the execution in the prepare phase is serialized and always precedes the execute phase. By moving the revision calculation from the after_sync phase to the prepare phase, Xline ensures that the revision order matches the order of user requests arriving at Xline while still allowing for concurrent out-of-order execution of non-conflicting commands. + +Next, let’s look at the CommandExecutor trait definition: + +\`\`\`rust +#[async_trait] +pub trait CommandExecutor{ + fn prepare(&self, cmd: &C, index: LogIndex) -> Result; + + async fn execute(&self, cmd: &C, index: LogIndex) -> Result; + + async fn after_sync( + &self, + cmd: &C, + index: LogIndex, + prepare_res: C::PR, + ) -> Result; + + /// omit some code ... +} + +\`\`\` + +CommandExecutor describes the command execution entity. The Curp module uses it to notify the Business Server to execute related commands. + +The relationship among these three traits is: ConflictCheck describes the relationship between two different commands; the Curp Server cares only about whether commands conflict, not how they are executed. CommandExecutor describes how commands are executed without concerning themselves with their interrelationships. Their dependency is CommandExecutor ←> Command → ConflictCheck. + +### Traits for Role Change + +The role-related trait defined in Curp is RoleChange: + +\`\`\`rust +/// Callback when the leadership changes +pub trait RoleChange { + /// The \`on_election_win\` will be invoked when the current server win the election. + /// It means that the current server's role will change from Candidate to Leader. + fn on_election_win(&self); + + /// The \`on_calibrate\` will be invoked when the current server has been calibrated. + /// It means that the current server's role will change from Leader to Follower. + fn on_calibrate(&self); +} +\`\`\` + +In Xline’s Curp module, the protocol backend uses the Raft protocol. The so-called backend means that when a conflict occurs, the Curp module automatically falls back to the Raft protocol. In this scenario, the latency to reach a consensus is the same as the Raft protocol, both being 2 RTT. As we know, the original Raft paper defined three roles for nodes in a Raft cluster: Leader, Follower, and Candidate, with their transition relationships as follows: + +![image2](/xline-home/blog/Implementation-of-CURP-Server/image2.png) + +Initially, a node is a Follower. If it doesn’t receive any messages from the current cluster Leader within the election_timeout, including heartbeats or AppendEntries requests, it initiates an election operation and transitions to Candidate. If it wins the election, it becomes the Leader; otherwise, it reverts to the Follower. If a network partition occurs, two Leaders might emerge. Once the network partition resolves, the Leader with a smaller term will calibrate itself upon receiving any message from the Leader with a larger term, updating its term and transitioning to the Follower. + +Why does Xline need to define a trait like RoleChange? In some Xline business scenarios, some components, like LeaseServer and LeaseStore, perform different operations on Leader node and non-Leader nodes. Thus, when a node’s role changes, the corresponding components need to be notified. Currently, because Lease-related components only differentiate between Leader and non-Leader nodes, the defined callback only covers the election_win and calibrate events. If future business requires finer-grained role differentiation, more callback methods will be added to cover those requirements. + +## How Curp Server Handles Requests + +Let’s assume there are two PutRequests: PUT A=1 and PUT A=2. Let’s see how the curp server handles these conflicting requests. As mentioned earlier, users need to initiate a proposal to Curp Server through the propose method of the Curp Client. Let’s first look at the pseudocode implementation of propose. + +\`\`\`rust +/// Propose the request to servers +#[inline] +pub async fn propose(&self, cmd: C) -> Result { + // create two futures + let fast_round = self.fast_round(cmd); + let slow_round = self.slow_round(cmd); + + // Wait for the fast and slow round at the same time + match which_one_complete_first(fast_round, slow_round).await { + fast_round returns fast_result => { + let (fast_er, success) = fast_result?; + if success { + Ok(fast_er.unwrap()) + } else { + let (_asr, er) = wait for slow_round to finish; + Ok(er) + } + } + slow_round returns slow_result => match slow_result { + Ok((_asr, er)) => Ok(er), + Err(e) => { + if let Ok((Some(er), true)) = wait for fast_round to finish { + return Ok(er); + } + Err(e) + } + }, + } +} +\`\`\` + +As the code suggests, when a Client calls propose, it simultaneously starts two different futures, namely fast_round and slow_round, corresponding to the fast path and slow path of the Curp protocol, respectively. The process waits for one of the futures to complete. Clearly, when the first request arrives, there will be no conflict with other requests. Thus, it can be assumed that this request will be processed during the fast round. Let’s first look at the implementation of fast_round. + +## Curp Consensus Process — Fast Round + +The fast_round code is defined in curp/src/client, corresponding to the frontend process of the Curp protocol. + +\`\`\`rust +/// The fast round of Curp protocol +/// It broadcasts the requests to all the curp servers. +async fn fast_round( + &self, + cmd_arc: Arc, +) -> Result<(Option<::ER>, bool), ProposeError> { + let request = create a new ProposeRequest; + let mut rpcs = broadcast request to each node and put responses into a stream; + + let mut ok_cnt: usize = 0; + let mut execute_result: Option = None; + let superquorum = superquorum(self.connects.len()); + + while let Some(resp_result) = rpcs.next().await { + let resp = match resp_result { + Ok(resp) => resp.into_inner(), + Err(e) => { + warn!("Propose error: {}", e); + continue; + } + }; + + update_state(resp.term, resp.leader_id); + + resp.map_or_else::( + |er| { + if let Some(er) = er { + execute_result = Some(er); + } + ok_cnt += 1; + Ok(()) + }, + |err| { + if let ProposeError::ExecutionError(_) = err { + return Err(err); + } + Ok(()) + }, + )??; + if (ok_cnt >= superquorum) && execute_result.is_some() { + return Ok((execute_result, true)); + } + } + Ok((execute_result, false)) +} +\`\`\` + +Overall, the logic of fast_round can be divided into three steps: + +1. Wrap Command into the corresponding ProposeRequest. +2. Broadcast the ProposeRequest to all nodes in the Curp cluster. +3. Summarize the results. If the current Command doesn’t conflict with the others, a successful execution result will be obtained. If the number of successful ProposeResponses received exceeds the super quorum (approximately 3/4 of the cluster node count), the command is deemed successfully executed; otherwise, it fails. + +Some readers might wonder why, in a distributed cluster with 2f + 1 nodes, consensus protocols like Raft or Paxos only need f + 1 nodes to return a successful response, but Curp requires more than f + f/2+1 nodes to return successful responses in the fast path. Here, f represents the fault tolerance of the cluster. To understand this discrepancy, let’s consider what would happen if the Curp protocol also used f+1as the criterion for success in the fast path. + +Assume Client_A broadcasts ProposeRequest (marked as A) to 2f + 1 nodes and receives f + 1 successful responses. There must be one leader node among them, with the remaining f nodes being followers. Suppose f nodes, including the leader, crashed and all had request A. Among the remaining f+1 nodes, only one follower retains request A in its in-memory spec_pool. Then, the client broadcasts another ProposeRequest (marked as B, conflicting with A). Since each node uses its in-memory spec_pool to determine whether incoming requests conflict with speculatively executed requests, even though Client_B won’t receive a successful result, request B will still be saved in the spec_pool of f nodes. If the leader node recovers and replays all requests saved in spec_pool across all nodes to restore the state machine (a process we call “recover”), the originally executed request A becomes the minority, while the unsuccessfully executed request B becomes the majority. This leads to an error during the leader’s recovery process. + +When the Curp protocol usesf+ f/2+ 1 as the criterion for success in the fast path, even if all f nodes containing request A crash, there are still more than half the nodes in the remaining f + 1 nodes that retain the request. This ensures that a later conflicting request will not outnumber the originally successfully executed request. + +Returning to our example, since Curp Server didn’t encounter conflicts when processing the request PUT A=1, it smoothly completes in the fast_round. For the Leader node, the request goes through CurpNode, to RawCurp, to the conflict detection queue Conflict_Checked_MPMC, and finally handed over to cmd_worker for execution. After the cmd_worker executes PUT A=1, it inserts the corresponding result into cmd_board, notifying CurpNode to return the command execution response to the Client. The following diagram depicts the sequence of events in the fast_round process. + +![image3](/xline-home/blog/Implementation-of-CURP-Server/image3.png) + +## Curp Consensus Process — Slow Round + +When the Client sends the request PUT A=2 to the Curp Server, as known from the previous propose method, the Client will simultaneously start both the fast_round and slow_round futures. Clearly, since the request PUT A=2 is in obvious conflict with the previous request PUT A=1, fast_round cannot be successfully executed, hence waiting for the completion of slow_round. The code for slow_round is defined in curp/src/client, corresponding to the backend process of the Curp protocol, i.e., the wait_synced process. + +\`\`\`rust +/// The slow round of Curp protocol +async fn slow_round( + &self, + cmd: Arc, +) -> Result<(::ASR, ::ER), ProposeError> { + loop { + let leader_id = self.get_leader_id().await; + + let resp = match call wait_synced from leader node { + Ok(resp) => resp.into_inner(), + Err(e) => { + wait for retry_timeout to retry propose again; + continue; + } + }; + + match resp? { + SyncResult::Success { er, asr } => { + return Ok((asr, er)); + } + SyncResult::Error(Redirect(new_leader, term)) => { + let new_leader = new_leader.and_then(|id| { + update_state(new_leader, term) + }) + }); + self.resend_propose(Arc::clone(&cmd), new_leader).await?; // resend the propose to the new leader + } + SyncResult::Error(Timeout) => { + return Err(ProposeError::SyncedError("wait sync timeout".to_owned())); + } + SyncResult::Error(e) => { + return Err(ProposeError::SyncedError(format!("{e:?}"))); + } + } + } +}Overall, the slow_round logic can also be divided into two steps: +\`\`\` + +1. Obtain the current leader of the cluster and send a WaitSyncedRequest to it. +2. Wait for the leader to return the execution result of WaitSyncedRequest. If failed, wait for retry_timeout and try again. + +In the Client’s propose method, because fast_round determines that the newly arrived request conflicts with the previously speculatively executed request, RawCurp will first save this Command in the state machine log and initiate an AppendEntries request to the cluster. After completion, it will return a ProposeError::KeyConflict error to the client, waiting for the end of slow_round. After the Leader completes the AppendEntries operation to the Followers in the cluster, the apply operation will be performed to apply the log to the state machine. It’s during this process that the leader will send the Command to the conflict detection queue, Conflict_Checked_MPMC. Only after the cmd_worker has executed all commands conflicting with PUT A=2 can the PUT A=2 command be popped from the conflict detection queue for execution. Unlike fast_round, in the slow_round process, after the command is executed and the execution result is saved in cmd_board, it will not return directly. Instead, the command will be put back into the conflict detection queue until the command completes the after_sync operation and saves the corresponding result to cmd_board. Only then will it return to CurpNode and finally return the corresponding ProposeResponse to the Client. The sequence diagram for the entire slow_round operation is as follows: + +![image4](/xline-home/blog/Implementation-of-CURP-Server/image4.png) + +## Summary + +In this article, we discussed how the Curp Server in Xline interacts with the business Servers. The business Server initiates requests to the Curp Server through the RPC interfaces predefined by Curp Server. Curp Server, on the other hand, notifies the business Server through two different types of traits. The command-related Traits, such as Command, ConflictCheck, and CommandExecutor, are mainly responsible for notifying the business Server after reaching consensus on commands. The RoleChange trait mainly notifies the business Server when the role of a cluster node changes. + +In Xline, the Curp Server is divided into two parts: the front-end CurpNode and the backend RawCurp. CurpNode mainly handles synchronous RPC call requests and forwards the requests to RawCurp for asynchronous execution. RawCurp submits commands to the conflict_checked_channel, with the command workers responsible for execution. After execution, the result is inserted into cmd_board, notifying CurpNode of the execution result. +`,N1=Symbol.for("yaml.alias"),Rm=Symbol.for("yaml.document"),ya=Symbol.for("yaml.map"),U5=Symbol.for("yaml.pair"),Pi=Symbol.for("yaml.scalar"),Lo=Symbol.for("yaml.seq"),gr=Symbol.for("yaml.node.type"),gs=e=>!!e&&typeof e=="object"&&e[gr]===N1,Sc=e=>!!e&&typeof e=="object"&&e[gr]===Rm,ys=e=>!!e&&typeof e=="object"&&e[gr]===ya,Rt=e=>!!e&&typeof e=="object"&&e[gr]===U5,wt=e=>!!e&&typeof e=="object"&&e[gr]===Pi,Po=e=>!!e&&typeof e=="object"&&e[gr]===Lo;function Pt(e){if(e&&typeof e=="object")switch(e[gr]){case ya:case Lo:return!0}return!1}function Vt(e){if(e&&typeof e=="object")switch(e[gr]){case N1:case ya:case Pi:case Lo:return!0}return!1}const Vz=e=>(wt(e)||Pt(e))&&!!e.anchor;class M1{constructor(t){Object.defineProperty(this,gr,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}}const Pn=Symbol("break visit"),j5=Symbol("skip children"),ti=Symbol("remove node");function Sa(e,t){const n=q5(t);Sc(e)?Xs(null,e.contents,n,Object.freeze([e]))===ti&&(e.contents=null):Xs(null,e,n,Object.freeze([]))}Sa.BREAK=Pn;Sa.SKIP=j5;Sa.REMOVE=ti;function Xs(e,t,n,r){const i=H5(e,t,n,r);if(Vt(i)||Rt(i))return W5(e,r,i),Xs(e,i,n,r);if(typeof i!="symbol"){if(Pt(t)){r=Object.freeze(r.concat(t));for(let a=0;ae.replace(/[!,[\]{}]/g,t=>Yz[t]);class Sn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Sn.defaultYaml,t),this.tags=Object.assign({},Sn.defaultTags,n)}clone(){const t=new Sn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Sn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Sn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Sn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Sn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Sn.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[a,s]=r;return this.tags[a]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[a]=r;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{const s=/^\d+\.\d+$/.test(a);return n(6,`Unsupported YAML version ${a}`,s),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const s=t.slice(2,-1);return s==="!"||s==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),s)}const[,r,i]=t.match(/^(.*!)([^!]*)$/);i||n(`The ${t} tag has no suffix`);const a=this.tags[r];return a?a+decodeURIComponent(i):r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+Kz(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(t&&r.length>0&&Vt(t.contents)){const a={};Sa(t.contents,(s,o)=>{Vt(o)&&o.tag&&(a[o.tag]=!0)}),i=Object.keys(a)}else i=[];for(const[a,s]of r)a==="!!"&&s==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(s)))&&n.push(`%TAG ${a} ${s}`);return n.join(` +`)}}Sn.defaultYaml={explicit:!1,version:"1.2"};Sn.defaultTags={"!!":"tag:yaml.org,2002:"};function V5(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Y5(e){const t=new Set;return Sa(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function K5(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function Gz(e,t){const n=[],r=new Map;let i=null;return{onAnchor:a=>{n.push(a),i||(i=Y5(e));const s=K5(t,i);return i.add(s),s},setAnchors:()=>{for(const a of n){const s=r.get(a);if(typeof s=="object"&&s.anchor&&(wt(s.node)||Pt(s.node)))s.node.anchor=s.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=a,o}}},sourceObjects:r}}class sh extends M1{constructor(t){super(N1),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return Sa(t,{Node:(r,i)=>{if(i===this)return Sa.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:a}=n,s=this.resolve(i);if(!s){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}const o=r.get(s);if(!o||o.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(a>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Zu(i,s,r)),o.count*o.aliasCount>a)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return o.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(V5(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(t.implicitKey)return`${i} `}return i}}function Zu(e,t,n){if(gs(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Pt(t)){let r=0;for(const i of t.items){const a=Zu(e,i,n);a>r&&(r=a)}return r}else if(Rt(t)){const r=Zu(e,t.key,n),i=Zu(e,t.value,n);return Math.max(r,i)}return 1}function ni(e,t,n){if(Array.isArray(e))return e.map((r,i)=>ni(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!Vz(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=a=>{r.res=a,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}const G5=e=>!e||typeof e!="function"&&typeof e!="object";class je extends M1{constructor(t){super(Pi),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:ni(this.value,t,n)}toString(){return String(this.value)}}je.BLOCK_FOLDED="BLOCK_FOLDED";je.BLOCK_LITERAL="BLOCK_LITERAL";je.PLAIN="PLAIN";je.QUOTE_DOUBLE="QUOTE_DOUBLE";je.QUOTE_SINGLE="QUOTE_SINGLE";const Xz="tag:yaml.org,2002:";function Qz(e,t,n){if(t){const r=n.filter(a=>a.tag===t),i=r.find(a=>!a.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,e))&&!r.format})}function tc(e,t,n){var d,f;if(Sc(e)&&(e=e.contents),Vt(e))return e;if(Rt(e)){const p=(f=(d=n.schema[ya]).createNode)==null?void 0:f.call(d,n.schema,null,n);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:s,sourceObjects:o}=n;let l;if(r&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor||(l.anchor=i(e)),new sh(l.anchor);l={anchor:null,node:null},o.set(e,l)}t!=null&&t.startsWith("!!")&&(t=Xz+t.slice(2));let c=Qz(e,t,s.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const p=new je(e);return l&&(l.node=p),p}c=e instanceof Map?s[ya]:Symbol.iterator in Object(e)?s[Lo]:s[ya]}a&&(a(c),delete n.onTagObj);const u=c!=null&&c.createNode?c.createNode(n.schema,e,n):new je(e);return t&&(u.tag=t),l&&(l.node=u),u}function Hd(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const a=t[i];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){const s=[];s[a]=r,r=s}else r=new Map([[a,r]])}return tc(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const ul=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class oh extends M1{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Vt(r)||Rt(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(ul(t))this.add(n);else{const[r,...i]=t,a=this.get(r,!0);if(Pt(a))a.addIn(i,n);else if(a===void 0&&this.schema)this.set(r,Hd(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Pt(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...i]=t,a=this.get(r,!0);return i.length===0?!n&&wt(a)?a.value:a:Pt(a)?a.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Rt(n))return!1;const r=n.value;return r==null||t&&wt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Pt(i)?i.hasIn(r):!1}setIn(t,n){const[r,...i]=t;if(i.length===0)this.set(r,n);else{const a=this.get(r,!0);if(Pt(a))a.setIn(i,n);else if(a===void 0&&this.schema)this.set(r,Hd(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}oh.maxFlowStringSingleLineLength=60;const Zz=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Si(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const ia=(e,t,n)=>e.endsWith(` +`)?Si(n,t):n.includes(` +`)?` +`+Si(n,t):(e.endsWith(" ")?"":" ")+n,X5="flow",Om="block",Ju="quoted";function lh(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:s,onOverflow:o}={}){if(!i||i<0)return e;const l=Math.max(1+a,1+i-t.length);if(e.length<=l)return e;const c=[],u={};let d=i-t.length;typeof r=="number"&&(r>i-Math.max(2,a)?c.push(0):d=i-r);let f,p,m=!1,h=-1,w=-1,y=-1;n===Om&&(h=H4(e,h),h!==-1&&(d=h+l));for(let x;x=e[h+=1];){if(n===Ju&&x==="\\"){switch(w=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}y=h}if(x===` +`)n===Om&&(h=H4(e,h)),d=h+l,f=void 0;else{if(x===" "&&p&&p!==" "&&p!==` +`&&p!==" "){const _=e[h+1];_&&_!==" "&&_!==` +`&&_!==" "&&(f=h)}if(h>=d)if(f)c.push(f),d=f+l,f=void 0;else if(n===Ju){for(;p===" "||p===" ";)p=x,x=e[h+=1],m=!0;const _=h>y+1?h-2:w-1;if(u[_])return e;c.push(_),u[_]=!0,d=_+l,f=void 0}else m=!0}p=x}if(m&&o&&o(),c.length===0)return e;s&&s();let v=e.slice(0,c[0]);for(let x=0;x({indentAtStart:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),uh=e=>/^(%|---|\.\.\.)/m.test(e);function Jz(e,t,n){if(!t||t<0)return!1;const r=t-n,i=e.length;if(i<=r)return!1;for(let a=0,s=0;ar)return!0;if(s=a+1,i-s<=r)return!1}return!0}function Tl(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(uh(e)?" ":"");let s="",o=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(s+=n.slice(o,l)+"\\ ",l+=1,o=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{s+=n.slice(o,l);const u=n.substr(l+2,4);switch(u){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:u.substr(0,2)==="00"?s+="\\x"+u.substr(2):s+=n.substr(l,6)}l+=5,o=l+1}break;case"n":if(r||n[l+2]==='"'||n.length +`;let d,f;for(f=n.length;f>0;--f){const E=n[f-1];if(E!==` +`&&E!==" "&&E!==" ")break}let p=n.substring(f);const m=p.indexOf(` +`);m===-1?d="-":n===p||m!==p.length-1?(d="+",a&&a()):d="",p&&(n=n.slice(0,-p.length),p[p.length-1]===` +`&&(p=p.slice(0,-1)),p=p.replace(/\n+(?!\n|$)/g,`$&${c}`));let h=!1,w,y=-1;for(w=0;w")+(h?c?"2":"1":"")+d;if(e&&(_+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),u)return n=n.replace(/\n+/g,`$&${c}`),`${_} +${c}${v}${n}${p}`;n=n.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);const A=lh(`${v}${n}${p}`,c,Om,ch(r));return`${_} +${c}${A}`}function eB(e,t,n,r){const{type:i,value:a}=e,{actualString:s,implicitKey:o,indent:l,indentStep:c,inFlow:u}=t;if(o&&/[\n[\]{},]/.test(a)||u&&/[[\]{},]/.test(a))return Zs(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return o||u||!a.includes(` +`)?Zs(a,t):ed(e,t,n,r);if(!o&&!u&&i!==je.PLAIN&&a.includes(` +`))return ed(e,t,n,r);if(uh(a)){if(l==="")return t.forceBlockIndent=!0,ed(e,t,n,r);if(o&&l===c)return Zs(a,t)}const d=a.replace(/\n+/g,`$& +${l}`);if(s){const f=h=>{var w;return h.default&&h.tag!=="tag:yaml.org,2002:str"&&((w=h.test)==null?void 0:w.test(d))},{compat:p,tags:m}=t.doc.schema;if(m.some(f)||p!=null&&p.some(f))return Zs(a,t)}return o?d:lh(d,l,X5,ch(t))}function _c(e,t,n,r){const{implicitKey:i,inFlow:a}=t,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==je.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=je.QUOTE_DOUBLE);const l=u=>{switch(u){case je.BLOCK_FOLDED:case je.BLOCK_LITERAL:return i||a?Zs(s.value,t):ed(s,t,n,r);case je.QUOTE_DOUBLE:return Tl(s.value,t);case je.QUOTE_SINGLE:return Im(s.value,t);case je.PLAIN:return eB(s,t,n,r);default:return null}};let c=l(o);if(c===null){const{defaultKeyType:u,defaultStringType:d}=t.options,f=i&&u||d;if(c=l(f),c===null)throw new Error(`Unsupported default string type ${f}`)}return c}function Q5(e,t){const n=Object.assign({blockQuote:!0,commentString:Zz,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function tB(e,t){var i;if(t.tag){const a=e.filter(s=>s.tag===t.tag);if(a.length>0)return a.find(s=>s.format===t.format)??a[0]}let n,r;if(wt(t)){r=t.value;const a=e.filter(s=>{var o;return(o=s.identify)==null?void 0:o.call(s,r)});n=a.find(s=>s.format===t.format)??a.find(s=>!s.format)}else r=t,n=e.find(a=>a.nodeClass&&r instanceof a.nodeClass);if(!n){const a=((i=r==null?void 0:r.constructor)==null?void 0:i.name)??typeof r;throw new Error(`Tag not resolved for ${a} value`)}return n}function nB(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],a=(wt(e)||Pt(e))&&e.anchor;a&&V5(a)&&(n.add(a),i.push(`&${a}`));const s=e.tag?e.tag:t.default?null:t.tag;return s&&i.push(r.directives.tagString(s)),i.join(" ")}function cs(e,t,n,r){var l;if(Rt(e))return e.toString(t,n,r);if(gs(e)){if(t.doc.directives)return e.toString(t);if((l=t.resolvedAliases)!=null&&l.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const a=Vt(e)?e:t.doc.createNode(e,{onTagObj:c=>i=c});i||(i=tB(t.doc.schema.tags,a));const s=nB(a,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const o=typeof i.stringify=="function"?i.stringify(a,t,n,r):wt(a)?_c(a,t,n,r):a.toString(t,n,r);return s?wt(a)||o[0]==="{"||o[0]==="["?`${s} ${o}`:`${s} +${t.indent}${o}`:o}function rB({key:e,value:t},n,r,i){const{allNullValues:a,doc:s,indent:o,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:d}}=n;let f=Vt(e)&&e.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(Pt(e)){const R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let p=!d&&(!e||f&&t==null&&!n.inFlow||Pt(e)||(wt(e)?e.type===je.BLOCK_FOLDED||e.type===je.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:o+l});let m=!1,h=!1,w=cs(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&w.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),w===""?"?":p?`? ${w}`:w}else if(a&&!d||t==null&&p)return w=`? ${w}`,f&&!m?w+=ia(w,n.indent,c(f)):h&&i&&i(),w;m&&(f=null),p?(f&&(w+=ia(w,n.indent,c(f))),w=`? ${w} +${o}:`):(w=`${w}:`,f&&(w+=ia(w,n.indent,c(f))));let y,v,x;Vt(t)?(y=!!t.spaceBefore,v=t.commentBefore,x=t.comment):(y=!1,v=null,x=null,t&&typeof t=="object"&&(t=s.createNode(t))),n.implicitKey=!1,!p&&!f&&wt(t)&&(n.indentAtStart=w.length+1),h=!1,!u&&l.length>=2&&!n.inFlow&&!p&&Po(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let _=!1;const A=cs(t,n,()=>_=!0,()=>h=!0);let E=" ";if(f||y||v){if(E=y?` +`:"",v){const R=c(v);E+=` +${Si(R,n.indent)}`}A===""&&!n.inFlow?E===` +`&&(E=` + +`):E+=` +${n.indent}`}else if(!p&&Pt(t)){const R=A[0],B=A.indexOf(` +`),q=B!==-1,G=n.inFlow??t.flow??t.items.length===0;if(q||!G){let W=!1;if(q&&(R==="&"||R==="!")){let K=A.indexOf(" ");R==="&"&&K!==-1&&Ke===W4||wt(e)&&e.value===W4&&(!e.type||e.type===je.PLAIN);function $f(e,t,n){const r=e&&gs(n)?n.resolve(e.doc):n;if(!ys(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,e,Map);for(const[a,s]of i)t instanceof Map?t.has(a)||t.set(a,s):t instanceof Set?t.add(a):Object.prototype.hasOwnProperty.call(t,a)||Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function aB(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Vt(e)&&n&&n.doc){const r=Q5(n.doc,{});r.anchors=new Set;for(const a of n.anchors.keys())r.anchors.add(a.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=e.toString(r);if(!n.mapKeyWarned){let a=JSON.stringify(i);a.length>40&&(a=a.substring(0,36)+'..."'),Z5(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}function R1(e,t,n){const r=tc(e,void 0,n),i=tc(t,void 0,n);return new yn(r,i)}class yn{constructor(t,n=null){Object.defineProperty(this,gr,{value:U5}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Vt(n)&&(n=n.clone(t)),Vt(r)&&(r=r.clone(t)),new yn(n,r)}toJSON(t,n){const r=n!=null&&n.mapAsMap?new Map:{};return J5(n,r,this)}toString(t,n,r){return t!=null&&t.doc?rB(this,t,n,r):JSON.stringify(this)}}function e7(e,t,n){return(t.inFlow??e.flow?oB:sB)(e,t,n)}function sB({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:s,onComment:o}){const{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:a,type:null});let d=!1;const f=[];for(let m=0;mw=null,()=>d=!0);w&&(y+=ia(y,a,c(w))),d&&w&&(d=!1),f.push(r+y)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let m=1;mx=null);yf||_.includes(` +`))&&(d=!0),p.push(_),f=p.length}let m;const{start:h,end:w}=r;if(p.length===0)m=h+w;else if(d||(d=p.reduce((v,x)=>v+x.length+2,2)>oh.maxFlowStringSingleLineLength),d){m=h;for(const y of p)m+=y?` +${o}${s}${y}`:` +`;m+=` +${s}${w}`}else m=`${h}${l}${p.join(" ")}${l}${w}`;return e&&(m+=ia(m,c(e),s),a&&a()),m}function Wd({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const a=Si(t(r),e);n.push(a.trimStart())}}function Ka(e,t){const n=wt(t)?t.value:t;for(const r of e)if(Rt(r)&&(r.key===t||r.key===n||wt(r.key)&&r.key.value===n))return r}class cr extends oh{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(ya,t),this.items=[]}add(t,n){var s;let r;Rt(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new yn(t,t==null?void 0:t.value):r=new yn(t.key,t.value);const i=Ka(this.items,r.key),a=(s=this.schema)==null?void 0:s.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);wt(i.value)&&G5(r.value)?i.value.value=r.value:i.value=r.value}else if(a){const o=this.items.findIndex(l=>a(r,l)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(t){const n=Ka(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=Ka(this.items,t),i=r==null?void 0:r.value;return(!n&&wt(i)?i.value:i)??void 0}has(t){return!!Ka(this.items,t)}set(t,n){this.add(new yn(t,n),!0)}toJSON(t,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const a of this.items)J5(n,i,a);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(const i of this.items)if(!Rt(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e7(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}function lB(e,t,n){const{keepUndefined:r,replacer:i}=n,a=new cr(e),s=(o,l)=>{if(typeof i=="function")l=i.call(t,o,l);else if(Array.isArray(i)&&!i.includes(o))return;(l!==void 0||r)&&a.items.push(R1(o,l,n))};if(t instanceof Map)for(const[o,l]of t)s(o,l);else if(t&&typeof t=="object")for(const o of Object.keys(t))s(o,t[o]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}const zo={collection:"map",createNode:lB,default:!0,nodeClass:cr,tag:"tag:yaml.org,2002:map",resolve(e,t){return ys(e)||t("Expected a mapping for this tag"),e}};class bs extends oh{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Lo,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=xu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=xu(t);if(typeof r!="number")return;const i=this.items[r];return!n&&wt(i)?i.value:i}has(t){const n=xu(t);return typeof n=="number"&&n=0?t:null}function cB(e,t,n){const{replacer:r}=n,i=new bs(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let s of t){if(typeof r=="function"){const o=t instanceof Set?s:String(a++);s=r.call(t,o,s)}i.items.push(tc(s,void 0,n))}}return i}const Bo={collection:"seq",createNode:cB,default:!0,nodeClass:bs,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Po(e)||t("Expected a sequence for this tag"),e}},dh={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),_c(e,t,n,r)}},hh={identify:e=>e==null,createNode:()=>new je(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new je(null),stringify:({source:e},t)=>typeof e=="string"&&hh.test.test(e)?e:t.options.nullStr},O1={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new je(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&O1.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function Ur({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let a=JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(a)){let s=a.indexOf(".");s<0&&(s=a.length,a+=".");let o=t-(a.length-s-1);for(;o-- >0;)a+="0"}return a}const t7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ur},n7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Ur(e)}},r7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new je(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Ur},fh=e=>typeof e=="bigint"||Number.isInteger(e),I1=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function i7(e,t,n){const{value:r}=e;return fh(r)&&r>=0?n+r.toString(t):Ur(e)}const a7={identify:e=>fh(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>I1(e,2,8,n),stringify:e=>i7(e,8,"0o")},s7={identify:fh,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>I1(e,0,10,n),stringify:Ur},o7={identify:e=>fh(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>I1(e,2,16,n),stringify:e=>i7(e,16,"0x")},uB=[zo,Bo,dh,hh,O1,a7,s7,o7,t7,n7,r7];function V4(e){return typeof e=="bigint"||Number.isInteger(e)}const ku=({value:e})=>JSON.stringify(e),dB=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:ku},{identify:e=>e==null,createNode:()=>new je(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ku},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>e==="true",stringify:ku},{identify:V4,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>V4(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:ku}],hB={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},fB=[zo,Bo].concat(dB,hB),D1={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Buffer=="function")return Buffer.from(e,"base64");if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i1&&t("Each pair must have its own sequence indicator");const i=r.items[0]||new yn(new je(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore} +${i.key.commentBefore}`:r.commentBefore),r.comment){const a=i.value??i.key;a.comment=a.comment?`${r.comment} +${a.comment}`:r.comment}r=i}e.items[n]=Rt(r)?r:new yn(r)}}else t("Expected a sequence for this tag");return e}function c7(e,t,n){const{replacer:r}=n,i=new bs(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let s of t){typeof r=="function"&&(s=r.call(t,String(a++),s));let o,l;if(Array.isArray(s))if(s.length===2)o=s[0],l=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const c=Object.keys(s);if(c.length===1)o=c[0],l=s[o];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else o=s;i.items.push(R1(o,l,n))}return i}const L1={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:l7,createNode:c7};class co extends bs{constructor(){super(),this.add=cr.prototype.add.bind(this),this.delete=cr.prototype.delete.bind(this),this.get=cr.prototype.get.bind(this),this.has=cr.prototype.has.bind(this),this.set=cr.prototype.set.bind(this),this.tag=co.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let a,s;if(Rt(i)?(a=ni(i.key,"",n),s=ni(i.value,a,n)):a=ni(i,"",n),r.has(a))throw new Error("Ordered maps must not include duplicate keys");r.set(a,s)}return r}}co.tag="tag:yaml.org,2002:omap";const P1={collection:"seq",identify:e=>e instanceof Map,nodeClass:co,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=l7(e,t),r=[];for(const{key:i}of n.items)wt(i)&&(r.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new co,n)},createNode(e,t,n){const r=c7(e,t,n),i=new co;return i.items=r.items,i}};function u7({value:e,source:t},n){return t&&(e?d7:h7).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const d7={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new je(!0),stringify:u7},h7={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new je(!1),stringify:u7},pB={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ur},mB={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Ur(e)}},gB={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new je(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:Ur},Ec=e=>typeof e=="bigint"||Number.isInteger(e);function ph(e,t,n,{intAsBigInt:r}){const i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const s=BigInt(e);return i==="-"?BigInt(-1)*s:s}const a=parseInt(e,n);return i==="-"?-1*a:a}function z1(e,t,n){const{value:r}=e;if(Ec(r)){const i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return Ur(e)}const yB={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>ph(e,2,2,n),stringify:e=>z1(e,2,"0b")},bB={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>ph(e,1,8,n),stringify:e=>z1(e,8,"0")},vB={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>ph(e,0,10,n),stringify:Ur},wB={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>ph(e,2,16,n),stringify:e=>z1(e,16,"0x")};class uo extends cr{constructor(t){super(t),this.tag=uo.tag}add(t){let n;Rt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new yn(t.key,null):n=new yn(t,null),Ka(this.items,n.key)||this.items.push(n)}get(t,n){const r=Ka(this.items,t);return!n&&Rt(r)?wt(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Ka(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new yn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}}uo.tag="tag:yaml.org,2002:set";const B1={collection:"map",identify:e=>e instanceof Set,nodeClass:uo,default:!1,tag:"tag:yaml.org,2002:set",resolve(e,t){if(ys(e)){if(e.hasAllNullValues(!0))return Object.assign(new uo,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e},createNode(e,t,n){const{replacer:r}=n,i=new uo(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof r=="function"&&(a=r.call(t,a,a)),i.items.push(R1(a,null,n));return i}};function F1(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,i=s=>t?BigInt(s):Number(s),a=r.replace(/_/g,"").split(":").reduce((s,o)=>s*i(60)+i(o),i(0));return n==="-"?i(-1)*a:a}function f7(e){let{value:t}=e,n=s=>s;if(typeof t=="bigint")n=s=>BigInt(s);else if(isNaN(t)||!isFinite(t))return Ur(e);let r="";t<0&&(r="-",t*=n(-1));const i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(s=>s<10?"0"+String(s):String(s)).join(":").replace(/000000\d*$/,"")}const p7={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>F1(e,n),stringify:f7},m7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>F1(e,!1),stringify:f7},mh={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(mh.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,a,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(n,r-1,i,a||0,s||0,o||0,l);const u=t[8];if(u&&u!=="Z"){let d=F1(u,!1);Math.abs(d)<30&&(d*=60),c-=6e4*d}return new Date(c)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Y4=[zo,Bo,dh,hh,d7,h7,yB,bB,vB,wB,pB,mB,gB,D1,P1,L1,B1,p7,m7,mh],K4=new Map([["core",uB],["failsafe",[zo,Bo,dh]],["json",fB],["yaml11",Y4],["yaml-1.1",Y4]]),G4={binary:D1,bool:O1,float:r7,floatExp:n7,floatNaN:t7,floatTime:m7,int:s7,intHex:o7,intOct:a7,intTime:p7,map:zo,null:hh,omap:P1,pairs:L1,seq:Bo,set:B1,timestamp:mh},xB={"tag:yaml.org,2002:binary":D1,"tag:yaml.org,2002:omap":P1,"tag:yaml.org,2002:pairs":L1,"tag:yaml.org,2002:set":B1,"tag:yaml.org,2002:timestamp":mh};function Uf(e,t){let n=K4.get(t);if(!n)if(Array.isArray(e))n=[];else{const r=Array.from(K4.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${r} or define customTags array`)}if(Array.isArray(e))for(const r of e)n=n.concat(r);else typeof e=="function"&&(n=e(n.slice()));return n.map(r=>{if(typeof r!="string")return r;const i=G4[r];if(i)return i;const a=Object.keys(G4).map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown custom tag "${r}"; use one of ${a}`)})}const kB=(e,t)=>e.keyt.key?1:0;let g7=class y7{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:i,schema:a,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(t)?Uf(t,"compat"):t?Uf(null,t):null,this.merge=!!r,this.name=typeof a=="string"&&a||"core",this.knownTags=i?xB:{},this.tags=Uf(n,this.name),this.toStringOptions=o??null,Object.defineProperty(this,ya,{value:zo}),Object.defineProperty(this,Pi,{value:dh}),Object.defineProperty(this,Lo,{value:Bo}),this.sortMapEntries=typeof s=="function"?s:s===!0?kB:null}clone(){const t=Object.create(y7.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function SB(e,t){var l;const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const c=e.directives.toString(e);c?(n.push(c),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const i=Q5(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift("");const c=a(e.commentBefore);n.unshift(Si(c,""))}let s=!1,o=null;if(e.contents){if(Vt(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const d=a(e.contents.commentBefore);n.push(Si(d,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}const c=o?void 0:()=>s=!0;let u=cs(e.contents,i,()=>o=null,c);o&&(u+=ia(u,"",a(o))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(cs(e.contents,i));if((l=e.directives)!=null&&l.docEnd)if(e.comment){const c=a(e.comment);c.includes(` +`)?(n.push("..."),n.push(Si(c,""))):n.push(`... ${c}`)}else n.push("...");else{let c=e.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||o)&&n[n.length-1]!==""&&n.push(""),n.push(Si(a(c),"")))}return n.join(` +`)+` +`}function dl(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,a=r.length;itypeof v=="number"||v instanceof String||v instanceof Number,y=n.filter(w).map(String);y.length>0&&(n=n.concat(y)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:a,anchorPrefix:s,flow:o,keepUndefined:l,onTagObj:c,tag:u}=r??{},{onAnchor:d,setAnchors:f,sourceObjects:p}=Gz(this,s||"a"),m={aliasDuplicateObjects:a??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:p},h=tc(t,u,m);return o&&Pt(h)&&(h.flow=!0),f(),h}createPair(t,n,r={}){const i=this.createNode(t,null,r),a=this.createNode(n,null,r);return new yn(i,a)}delete(t){return As(this.contents)?this.contents.delete(t):!1}deleteIn(t){return ul(t)?this.contents==null?!1:(this.contents=null,!0):As(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Pt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return ul(t)?!n&&wt(this.contents)?this.contents.value:this.contents:Pt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Pt(this.contents)?this.contents.has(t):!1}hasIn(t){return ul(t)?this.contents!==void 0:Pt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Hd(this.schema,[t],n):As(this.contents)&&this.contents.set(t,n)}setIn(t,n){ul(t)?this.contents=n:this.contents==null?this.contents=Hd(this.schema,Array.from(t),n):As(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Sn({version:"1.1"}),r={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Sn({version:t}),r={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new g7(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:a,reviver:s}={}){const o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100,stringify:cs},l=ni(this.contents,n??"",o);if(typeof a=="function")for(const{count:c,res:u}of o.anchors.values())a(u,c);return typeof s=="function"?dl(s,{"":l},"",l):l}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return SB(this,t)}}function As(e){if(Pt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class $1 extends Error{constructor(t,n,r,i){super(),this.name=t,this.code=r,this.message=i,this.pos=n}}class Ga extends $1{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class b7 extends $1{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const Vd=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>t.linePos(o));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,s=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(a>=60&&s.length>80){const o=Math.min(a-39,s.length-79);s="…"+s.substring(o),a-=o-1}if(s.length>80&&(s=s.substring(0,79)+"…"),r>1&&/^ *$/.test(s.substring(0,a))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`… +`),s=o+s}if(/[^ ]/.test(s)){let o=1;const l=n.linePos[1];l&&l.line===r&&l.col>i&&(o=Math.min(l.col-i,80-a));const c=" ".repeat(a)+"^".repeat(o);n.message+=`: + +${s} +${c} +`}};function To(e,{flow:t,indicator:n,next:r,offset:i,onError:a,startOnNewline:s}){let o=!1,l=s,c=s,u="",d="",f=!1,p=!1,m=!1,h=null,w=null,y=null,v=null,x=null;for(const E of e)switch(m&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&a(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),E.type){case"space":!t&&l&&n!=="doc-start"&&E.source[0]===" "&&a(E,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{c||a(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const R=E.source.substring(1)||" ";u?u+=d+R:u=R,d="",l=!1;break}case"newline":l?u?u+=E.source:o=!0:d+=E.source,l=!0,f=!0,(h||w)&&(p=!0),c=!0;break;case"anchor":h&&a(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&a(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),h=E,x===null&&(x=E.offset),l=!1,c=!1,m=!0;break;case"tag":{w&&a(E,"MULTIPLE_TAGS","A node can have at most one tag"),w=E,x===null&&(x=E.offset),l=!1,c=!1,m=!0;break}case n:(h||w)&&a(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),v&&a(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${t??"collection"}`),v=E,l=!1,c=!1;break;case"comma":if(t){y&&a(E,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),y=E,l=!1,c=!1;break}default:a(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),l=!1,c=!1}const _=e[e.length-1],A=_?_.offset+_.source.length:i;return m&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&a(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:y,found:v,spaceBefore:o,comment:u,hasNewline:f,hasNewlineAfterProp:p,anchor:h,tag:w,end:A,start:x??A}}function nc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` +`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(nc(t.key)||nc(t.value))return!0}return!1;default:return!0}}function Dm(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&nc(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function v7(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const i=typeof r=="function"?r:(a,s)=>a===s||wt(a)&&wt(s)&&a.value===s.value&&!(a.value==="<<"&&e.schema.merge);return t.some(a=>i(a.key,n))}const X4="All mapping items must start at the same column";function _B({composeNode:e,composeEmptyNode:t},n,r,i){var l;const a=new cr(n.schema);n.atRoot&&(n.atRoot=!1);let s=r.offset,o=null;for(const c of r.items){const{start:u,key:d,sep:f,value:p}=c,m=To(u,{indicator:"explicit-key-ind",next:d??(f==null?void 0:f[0]),offset:s,onError:i,startOnNewline:!0}),h=!m.found;if(h){if(d&&(d.type==="block-seq"?i(s,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&i(s,"BAD_INDENT",X4)),!m.anchor&&!m.tag&&!f){o=m.end,m.comment&&(a.comment?a.comment+=` +`+m.comment:a.comment=m.comment);continue}(m.hasNewlineAfterProp||nc(d))&&i(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((l=m.found)==null?void 0:l.indent)!==r.indent&&i(s,"BAD_INDENT",X4);const w=m.end,y=d?e(n,d,m,i):t(n,w,u,null,m,i);n.schema.compat&&Dm(r.indent,d,i),v7(n,a.items,y)&&i(w,"DUPLICATE_KEY","Map keys must be unique");const v=To(f??[],{indicator:"map-value-ind",next:p,offset:y.range[2],onError:i,startOnNewline:!d||d.type==="block-scalar"});if(s=v.end,v.found){h&&((p==null?void 0:p.type)==="block-map"&&!v.hasNewline&&i(s,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&m.starte&&(e.type==="block-map"||e.type==="block-seq");function TB({composeNode:e,composeEmptyNode:t},n,r,i){const a=r.start.source==="{",s=a?"flow map":"flow sequence",o=a?new cr(n.schema):new bs(n.schema);o.flow=!0;const l=n.atRoot;l&&(n.atRoot=!1);let c=r.offset+r.start.source.length;for(let m=0;m0){const m=Tc(f,p,n.options.strict,i);m.comment&&(o.comment?o.comment+=` +`+m.comment:o.comment=m.comment),o.range=[r.offset,p,m.offset]}else o.range=[r.offset,p,p];return o}function CB(e,t,n,r,i){let a;switch(n.type){case"block-map":{a=_B(e,t,n,i);break}case"block-seq":{a=EB(e,t,n,i);break}case"flow-collection":{a=TB(e,t,n,i);break}}if(!r)return a;const s=t.directives.tagName(r.source,f=>i(r,"TAG_RESOLVE_FAILED",f));if(!s)return a;const o=a.constructor;if(s==="!"||s===o.tagName)return a.tag=o.tagName,a;const l=ys(a)?"map":"seq";let c=t.schema.tags.find(f=>f.collection===l&&f.tag===s);if(!c){const f=t.schema.knownTags[s];if(f&&f.collection===l)t.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),a.tag=s,a}const u=c.resolve(a,f=>i(r,"TAG_RESOLVE_FAILED",f),t.options),d=Vt(u)?u:new je(u);return d.range=a.range,d.tag=s,c!=null&&c.format&&(d.format=c.format),d}function w7(e,t,n){const r=e.offset,i=AB(e,t,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const a=i.mode===">"?je.BLOCK_FOLDED:je.BLOCK_LITERAL,s=e.source?NB(e.source):[];let o=s.length;for(let h=s.length-1;h>=0;--h){const w=s[h][1];if(w===""||w==="\r")o=h;else break}if(o===0){const h=i.chomp==="+"&&s.length>0?` +`.repeat(Math.max(1,s.length-1)):"";let w=r+i.length;return e.source&&(w+=e.source.length),{value:h,type:a,comment:i.comment,range:[r,w,w]}}let l=e.indent+i.indent,c=e.offset+i.length,u=0;for(let h=0;hl&&(l=w.length);else{if(w.length=o;--h)s[h][0].length>l&&(o=h+1);let d="",f="",p=!1;for(let h=0;hl||y[0]===" "?(f===" "?f=` +`:!p&&f===` +`&&(f=` + +`),d+=f+w.slice(l)+y,f=` +`,p=!0):y===""?f===` +`?d+=` +`:f=` +`:(d+=f+y,f=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let h=o;hn(r+f,p,m);switch(i){case"scalar":o=je.PLAIN,l=MB(a,c);break;case"single-quoted-scalar":o=je.QUOTE_SINGLE,l=RB(a,c);break;case"double-quoted-scalar":o=je.QUOTE_DOUBLE,l=OB(a,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+a.length,r+a.length]}}const u=r+a.length,d=Tc(s,u,t,n);return{value:l,type:o,comment:d.comment,range:[r,u,d.offset]}}function MB(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),k7(e)}function RB(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),k7(e.slice(1,-1)).replace(/''/g,"'")}function k7(e){let t,n;try{t=new RegExp(`(.*?)(?a?e.slice(a,r+1):i)}else n+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function IB(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===` +`||r==="\r")&&!(r==="\r"&&e[t+2]!==` +`);)r===` +`&&(n+=` +`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}const DB={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` +`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function LB(e,t,n,r){const i=e.substr(t,n),s=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(s)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(s)}function S7(e,t,n,r){const{value:i,type:a,comment:s,range:o}=t.type==="block-scalar"?w7(t,e.options.strict,r):x7(t,e.options.strict,r),l=n?e.directives.tagName(n.source,d=>r(n,"TAG_RESOLVE_FAILED",d)):null,c=n&&l?PB(e.schema,i,l,n,r):t.type==="scalar"?zB(e,i,t,r):e.schema[Pi];let u;try{const d=c.resolve(i,f=>r(n??t,"TAG_RESOLVE_FAILED",f),e.options);u=wt(d)?d:new je(d)}catch(d){const f=d instanceof Error?d.message:String(d);r(n??t,"TAG_RESOLVE_FAILED",f),u=new je(i)}return u.range=o,u.source=i,a&&(u.type=a),l&&(u.tag=l),c.format&&(u.format=c.format),s&&(u.comment=s),u}function PB(e,t,n,r,i){var o;if(n==="!")return e[Pi];const a=[];for(const l of e.tags)if(!l.collection&&l.tag===n)if(l.default&&l.test)a.push(l);else return l;for(const l of a)if((o=l.test)!=null&&o.test(t))return l;const s=e.knownTags[n];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Pi])}function zB({directives:e,schema:t},n,r,i){const a=t.tags.find(s=>{var o;return s.default&&((o=s.test)==null?void 0:o.test(n))})||t[Pi];if(t.compat){const s=t.compat.find(o=>{var l;return o.default&&((l=o.test)==null?void 0:l.test(n))})??t[Pi];if(a.tag!==s.tag){const o=e.tagString(a.tag),l=e.tagString(s.tag),c=`Value may be parsed as either ${o} or ${l}`;i(r,"TAG_RESOLVE_FAILED",c,!0)}}return a}function BB(e,t,n){if(t){n===null&&(n=t.length);for(let r=n-1;r>=0;--r){let i=t[r];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++r];(i==null?void 0:i.type)==="space";)e+=i.source.length,i=t[++r];break}}return e}const FB={composeNode:_7,composeEmptyNode:U1};function _7(e,t,n,r){const{spaceBefore:i,comment:a,anchor:s,tag:o}=n;let l,c=!0;switch(t.type){case"alias":l=$B(e,t,r),(s||o)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=S7(e,t,o,r),s&&(l.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=CB(FB,e,t,o,r),s&&(l.anchor=s.source.substring(1));break;default:{const u=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",u),l=U1(e,t.offset,void 0,null,n,r),c=!1}}return s&&l.anchor===""&&r(s,"BAD_ALIAS","Anchor cannot be an empty string"),i&&(l.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&c&&(l.srcToken=t),l}function U1(e,t,n,r,{spaceBefore:i,comment:a,anchor:s,tag:o,end:l},c){const u={type:"scalar",offset:BB(t,n,r),indent:-1,source:""},d=S7(e,u,o,c);return s&&(d.anchor=s.source.substring(1),d.anchor===""&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}function $B({options:e},{offset:t,source:n,end:r},i){const a=new sh(n.substring(1));a.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+n.length,o=Tc(r,s,e.strict,i);return a.range=[t,s,o.offset],o.comment&&(a.comment=o.comment),a}function UB(e,t,{offset:n,start:r,value:i,end:a},s){const o=Object.assign({_directives:t},e),l=new Fo(void 0,o),c={atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=To(r,{indicator:"doc-start",next:i??(a==null?void 0:a[0]),offset:n,onError:s,startOnNewline:!0});u.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?_7(c,i,u,s):U1(c,u.end,r,null,u,s);const d=l.contents.range[2],f=Tc(a,d,!1,s);return f.comment&&(l.comment=f.comment),l.range=[n,d,f.offset],l}function rl(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Q4(e){var i;let t="",n=!1,r=!1;for(let a=0;a{const s=rl(n);a?this.warnings.push(new b7(s,r,i)):this.errors.push(new Ga(s,r,i))},this.directives=new Sn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:i}=Q4(this.prelude);if(r){const a=t.contents;if(n)t.comment=t.comment?`${t.comment} +${r}`:r;else if(i||t.directives.docStart||!a)t.commentBefore=r;else if(Pt(a)&&!a.flow&&a.items.length>0){let s=a.items[0];Rt(s)&&(s=s.key);const o=s.commentBefore;s.commentBefore=o?`${r} +${o}`:r}else{const s=a.commentBefore;a.commentBefore=s?`${r} +${s}`:r}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Q4(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(const i of t)yield*this.next(i);yield*this.end(n,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,r,i)=>{const a=rl(t);a[0]+=n,this.onError(a,"BAD_DIRECTIVE",r,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=UB(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Ga(rl(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Ga(rl(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Tc(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r} +${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ga(rl(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),i=new Fo(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function jB(e,t=!0,n){if(e){const r=(i,a,s)=>{const o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(o,a,s);else throw new Ga([o,o+1],a,s)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return x7(e,t,r);case"block-scalar":return w7(e,t,r)}}return null}function qB(e,t){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:a=-1,type:s="PLAIN"}=t,o=_c({type:s,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:r,source:` +`}];switch(o[0]){case"|":case">":{const c=o.indexOf(` +`),u=o.substring(0,c),d=o.substring(c+1)+` +`,f=[{type:"block-scalar-header",offset:a,indent:r,source:u}];return E7(f,l)||f.push({type:"newline",offset:-1,indent:r,source:` +`}),{type:"block-scalar",offset:a,indent:r,props:f,source:d}}case'"':return{type:"double-quoted-scalar",offset:a,indent:r,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:r,source:o,end:l};default:return{type:"scalar",offset:a,indent:r,source:o,end:l}}}function HB(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:a=!1,type:s}=n,o="indent"in e?e.indent:null;if(r&&typeof o=="number"&&(o+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const c=e.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const l=_c({type:s,value:t},{implicitKey:i||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":WB(e,l);break;case'"':Hf(e,l,"double-quoted-scalar");break;case"'":Hf(e,l,"single-quoted-scalar");break;default:Hf(e,l,"scalar")}}function WB(e,t){const n=t.indexOf(` +`),r=t.substring(0,n),i=t.substring(n+1)+` +`;if(e.type==="block-scalar"){const a=e.props[0];if(a.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a.source=r,e.source=i}else{const{offset:a}=e,s="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:a,indent:s,source:r}];E7(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:s,source:` +`});for(const l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:"block-scalar",indent:s,props:o,source:i})}}function E7(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function Hf(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let i=t.length;e.props[0].type==="block-scalar-header"&&(i-=e.props[0].source.length);for(const a of r)a.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:` +`};delete e.items,Object.assign(e,{type:n,source:t,end:[i]});break}default:{const r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(a=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(const a of Object.keys(e))a!=="type"&&a!=="offset"&&delete e[a];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}const VB=e=>"type"in e?Yd(e):td(e);function Yd(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=Yd(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=td(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=td(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=td(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function td({start:e,key:t,sep:n,value:r}){let i="";for(const a of e)i+=a.source;if(t&&(i+=Yd(t)),n)for(const a of n)i+=a.source;return r&&(i+=Yd(r)),i}const Lm=Symbol("break visit"),YB=Symbol("skip children"),T7=Symbol("remove item");function us(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),C7(Object.freeze([]),e,t)}us.BREAK=Lm;us.SKIP=YB;us.REMOVE=T7;us.itemAtPath=(e,t)=>{let n=e;for(const[r,i]of t){const a=n==null?void 0:n[r];if(a&&"items"in a)n=a.items[i];else return}return n};us.parentCollection=(e,t)=>{const n=us.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n==null?void 0:n[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function C7(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const i of["key","value"]){const a=t[i];if(a&&"items"in a){for(let s=0;s!!e&&"items"in e,GB=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function XB(e){switch(e){case gh:return"";case yh:return"";case bh:return"";case rc:return"";default:return JSON.stringify(e)}}function A7(e){switch(e){case gh:return"byte-order-mark";case yh:return"doc-mode";case bh:return"flow-error-end";case rc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`:case`\r +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const QB=Object.freeze(Object.defineProperty({__proto__:null,BOM:gh,DOCUMENT:yh,FLOW_END:bh,SCALAR:rc,createScalarToken:qB,isCollection:KB,isScalar:GB,prettyToken:XB,resolveAsScalar:jB,setScalarValue:HB,stringify:VB,tokenType:A7,visit:us},Symbol.toStringTag,{value:"Module"}));function rr(e){switch(e){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}const Z4="0123456789ABCDEFabcdef".split(""),ZB="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),Wf=",[]{}".split(""),JB=` ,[]{} +\r `.split(""),Vf=e=>!e||JB.includes(e);let N7=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){t&&(this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null),this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===` +`?!0:n==="\r"?this.buffer[t+1]===` +`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const i=this.buffer[r+t+1];if(i===` +`||!i&&!this.atEnd)return t+r+1}return n===` +`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&rr(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!rr(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&rr(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Vf),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>rr(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case` +`:t=i,n=0;break;case"\r":{const a=this.buffer[i+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===` +`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext+=this.blockScalarIndent;do{const i=this.continueScalar(t+1);if(i===-1)break;t=this.buffer.indexOf(` +`,i)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)do{let i=t-1,a=this.buffer[i];a==="\r"&&(a=this.buffer[--i]);const s=i;for(;a===" "||a===" ";)a=this.buffer[--i];if(a===` +`&&i>=this.pos&&i+1+n>s)t=i;else break}while(!0);return yield rc,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const a=this.buffer[r+1];if(rr(a)||t&&a===",")break;n=r}else if(rr(i)){let a=this.buffer[r+1];if(i==="\r"&&(a===` +`?(r+=1,i=` +`,a=this.buffer[r+1]):n=r),a==="#"||t&&Wf.includes(a))break;if(i===` +`){const s=this.continueScalar(r+1);if(s===-1)break;r=Math.max(r,s-2)}}else{if(t&&Wf.includes(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield rc,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Vf))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(rr(n)||t&&Wf.includes(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!rr(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(ZB.includes(n))n=this.buffer[++t];else if(n==="%"&&Z4.includes(this.buffer[t+1])&&Z4.includes(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===` +`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===` +`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};class M7{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n>1;this.lineStarts[a]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function e2(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!Cr(t.start,"explicit-key-ind")&&!Cr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,R7(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}let q1=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new N7,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=A7(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(!t||t.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(n)if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&e2(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!Cr(i.start,"explicit-key-ind");return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&J4(i.start)===-1&&(n.indent===0||i.start.every(a=>a.type!=="comment"||a.indent=t.indent){const i=!this.onKeyLine&&this.indent===t.indent&&n.sep;let a=[];if(i&&n.sep&&!n.value){const s=[];for(let o=0;ot.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(a=n.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!Cr(n.start,"explicit-key-ind")?n.start.push(this.sourceToken):i||n.value?(a.push(this.sourceToken),t.items.push({start:a})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(Cr(n.start,"explicit-key-ind"))if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Cr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(R7(n.key)&&!Cr(n.sep,"newline")){const s=Ns(n.start),o=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:o,sep:l}]})}else a.length>0?n.sep=n.sep.concat(a,this.sourceToken):n.sep.push(this.sourceToken);else if(Cr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const s=Ns(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?t.items.push({start:a,key:null,sep:[this.sourceToken]}):Cr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);i||n.value?(t.items.push({start:a,key:s,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(s):(Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{const s=this.startBlockValue(t);if(s){i&&s.type!=="block-seq"&&Cr(n.start,"explicit-key-ind")&&t.items.push({start:a}),this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0,a=Array.isArray(i)?i[i.length-1]:void 0;(a==null?void 0:a.type)==="comment"?i==null||i.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const i=t.items[t.items.length-2],a=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(a)){Array.prototype.push.apply(a,n.start),a.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||Cr(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=Su(r),a=Ns(i);e2(t);const s=t.end.splice(1,t.end.length);s.push(this.sourceToken);const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(` +`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(` +`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Su(t),r=Ns(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Su(t),r=Ns(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function O7(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new M7||null,prettyErrors:t}}function eF(e,t={}){const{lineCounter:n,prettyErrors:r}=O7(t),i=new q1(n==null?void 0:n.addNewLine),a=new j1(t),s=Array.from(a.compose(i.parse(e)));if(r&&n)for(const o of s)o.errors.forEach(Vd(e,n)),o.warnings.forEach(Vd(e,n));return s.length>0?s:Object.assign([],{empty:!0},a.streamInfo())}function I7(e,t={}){const{lineCounter:n,prettyErrors:r}=O7(t),i=new q1(n==null?void 0:n.addNewLine),a=new j1(t);let s=null;for(const o of a.compose(i.parse(e),!0,e.length))if(!s)s=o;else if(s.options.logLevel!=="silent"){s.errors.push(new Ga(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(Vd(e,n)),s.warnings.forEach(Vd(e,n))),s}function tF(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);const i=I7(e,n);if(!i)return null;if(i.warnings.forEach(a=>Z5(i.options.logLevel,a)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function nF(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){const{keepUndefined:i}=n??t??{};if(!i)return}return new Fo(e,r,n).toString(n)}const Pm=Object.freeze(Object.defineProperty({__proto__:null,Alias:sh,CST:QB,Composer:j1,Document:Fo,Lexer:N7,LineCounter:M7,Pair:yn,Parser:q1,Scalar:je,Schema:g7,YAMLError:$1,YAMLMap:cr,YAMLParseError:Ga,YAMLSeq:bs,YAMLWarning:b7,isAlias:gs,isCollection:Pt,isDocument:Sc,isMap:ys,isNode:Vt,isPair:Rt,isScalar:wt,isSeq:Po,parse:tF,parseAllDocuments:eF,parseDocument:I7,stringify:nF,visit:Sa,visitAsync:ah},Symbol.toStringTag,{value:"Module"})),rF=P.div` + display: flex; + align-items: center; + justify-content: center; + height: calc(86px + 416px); + padding-top: 86px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + padding-top: 69px; + height: calc(312px + 69px); + } + @media screen and (max-width: 1024px) { + padding-top: 53px; + height: calc(208px + 53px); + } +`,iF=P.h1` + position: relative; + display: inline-block; + padding-inline: 32px; + color: white; + font-weight: 700; + font-size: 72px; + line-height: 1.5; + text-transform: capitalize; + transform: translateY(-10%); + @media screen and (max-width: 1024px) { + padding-inline: 24px; + font-size: 54px; + } + @media screen and (max-width: 768px) { + padding-inline: 16px; + font-size: 36px; + } +`,aF=P.img` + z-index: -1; + position: absolute; + left: 50%; + bottom: -17px; + transform: translateX(-45%); + width: 295.01px; + height: 35.35px; + @media screen and (max-width: 1024px) { + bottom: -12%; + width: 221px; + height: 27px; + } + @media screen and (max-width: 768px) { + bottom: -8%; + width: 148px; + height: 18px; + } +`,sF=P.main` + display: flex; + margin-inline: auto; + padding-block: ${e=>e.theme.scale.scale06}; + padding-inline: ${e=>e.theme.scale.scale07}; + max-width: ${e=>e.theme.scale.scale12}; + // - - - + /* height: 200px; + background-color: lightcoral; */ + @media screen and (max-width: 1024px) { + padding-block: 60px; + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-block: 40px; + padding-inline: 64px; + } +`,oF=P.div` + flex-shrink: 0; + width: ${e=>e.theme.scale.scale08}; + margin-right: ${e=>e.theme.scale.scale06}; + padding-block: ${e=>e.theme.scale.scale07}; + // - - - + /* height: 100px; + background-color: lightblue; */ + @media screen and (max-width: 1440px) { + display: none; + } +`,lF=P.p` + margin-bottom: ${e=>e.theme.scale.scale04}; + color: #a6a6a6; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + line-height: ${e=>e.theme.font.lineHeight4}; +`,cF=P(Ro)` + display: block; + margin-bottom: ${e=>e.theme.scale.scale03}; + padding: ${e=>e.theme.scale.scale03}; + color: #454545; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + line-height: ${e=>e.theme.font.lineHeight3}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale01}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; +`,uF=P.div` + display: flex; + flex-flow: wrap; + justify-content: space-between; + /* flex: 1; */ + /* padding-inline: ${e=>e.theme.scale.scale05}; */ + // - - - + /* min-height: 100px; + background-color: lightcyan; */ + @media screen and (max-width: 1024px) { + flex-direction: column; + } +`,dF=P.div` + width: 48%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale03}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; + overflow: hidden; + // - - - + /* height: 400px; */ + /* background: lightpink; */ + @media screen and (max-width: 1024px) { + width: 100%; + } +`,hF=P.img` + width: 100%; + /* height: ${e=>e.theme.scale.scale08}; */ +`,fF=P.div` + padding: ${e=>e.theme.scale.scale03}; + // - - - + /* height: 100px; */ + @media screen and (max-width: 1024px) { + padding: 15px; + } + @media screen and (max-width: 768px) { + padding: 10px; + } +`,pF=P.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + /* line-height: ${e=>e.theme.font.lineHeight4}; */ + line-height: 1.5; + /* white-space: nowrap; */ + overflow: hidden; + text-overflow: ellipsis; + /* text-transform: capitalize; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 15px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 10px; + } +`,mF=P.p` + display: -webkit-box; + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + /* line-height: ${e=>e.theme.font.lineHeight3}; */ + line-height: 1.5; + word-break: break-all; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + text-overflow: ellipsis; + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 12px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 8px; + } +`,gF=P(Ro)` + display: inline-block; + margin-bottom: ${e=>e.theme.scale.scale01}; + padding-block: ${e=>e.theme.scale.scale01}; + padding-inline: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize2}; + /* line-height: ${e=>e.theme.font.lineHeight2}; */ + line-height: 1.5; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 20px; + @media screen and (max-width: 1024px) { + margin-bottom: 6px; + padding-block: 6px; + padding-inline: 24px; + font-size: 10.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 4px; + padding-block: 4px; + padding-inline: 16px; + font-size: 7px; + } +`,Yf=Object.assign({"/src/blog/2023-01-07-Curp:-Revisit-the-Consensus-Protocol.md":I5,"/src/blog/2023-02-19-Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness.md":D5,"/src/blog/2023-03-10-How-to-Elegantly-Organize-Async-Rust-Code.md":L5,"/src/blog/2023-04-19-Database-Isolation-Levels-and-MVCC.md":P5,"/src/blog/2023-05-21-The-design-and-Implementation-of-the-Xline-Persistent-Storage-Layer.md":z5,"/src/blog/2023-08-18-Introduction-to-CURP-Protocol.md":B5,"/src/blog/2023-09-23-Mechanism-and-Implementation-of-Lease.md":F5,"/src/blog/2023-11-01-Implementation-of-CURP-Server.md":$5}),yF=()=>(ce.useEffect(()=>{window.scrollTo(0,0)},[]),S.jsxs(S.Fragment,{children:[S.jsx(rF,{children:S.jsxs(iF,{children:["blog",S.jsx(aF,{src:Ra,alt:"underline"})]})}),S.jsxs(sF,{children:[S.jsxs(oF,{children:[S.jsx(lF,{children:"Blog"}),Object.keys(Yf).map(e=>{const t=e.split(/[/,.]/),[n,r,i,...a]=t[3].split("-"),s=a.join(" "),o=t[3];return S.jsx(cF,{to:o,children:s},s)})]}),S.jsx(uF,{children:Object.keys(Yf).reverse().map((e,t)=>{const n=e.split(/[/,.]/),r=n[3],[i,a,s,...o]=n[3].split("-"),l=o.join(" ");console.log(l);const[c,u,d,f]=Yf[e].split(`--- +`),p=Pm.parse(u);return S.jsxs(dF,{children:[S.jsx(hF,{src:p.cover,alt:"cover"}),S.jsxs(fF,{children:[S.jsx(pF,{children:l}),S.jsx(mF,{children:d}),S.jsx(gF,{to:r,children:"Read more"})]})]},t)})})]})]}));//! moment.js +//! version : 2.29.4 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var D7;function pe(){return D7.apply(null,arguments)}function bF(e){D7=e}function Fr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function es(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function st(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function H1(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(st(e,t))return!1;return!0}function On(e){return e===void 0}function zi(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Cc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function L7(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var K1=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,_u=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Gf={},ho={};function Ne(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(ho[e]=i),t&&(ho[t[0]]=function(){return ii(i.apply(this,arguments),t[1],t[2])}),n&&(ho[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function SF(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function _F(e){var t=e.match(K1),n,r;for(n=0,r=t.length;n=0&&_u.test(e);)e=e.replace(_u,r),_u.lastIndex=0,n-=1;return e}var EF={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function TF(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(K1).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var CF="Invalid date";function AF(){return this._invalidDate}var NF="%d",MF=/\d{1,2}/;function RF(e){return this._ordinal.replace("%d",e)}var OF={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function IF(e,t,n,r){var i=this._relativeTime[n];return li(i)?i(e,t,n,r):i.replace(/%d/i,e)}function DF(e,t){var n=this._relativeTime[e>0?"future":"past"];return li(n)?n(t):n.replace(/%s/i,t)}var Cl={};function wn(e,t){var n=e.toLowerCase();Cl[n]=Cl[n+"s"]=Cl[t]=e}function Sr(e){return typeof e=="string"?Cl[e]||Cl[e.toLowerCase()]:void 0}function G1(e){var t={},n,r;for(r in e)st(e,r)&&(n=Sr(r),n&&(t[n]=e[r]));return t}var F7={};function xn(e,t){F7[e]=t}function LF(e){var t=[],n;for(n in e)st(e,n)&&t.push({unit:n,priority:F7[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function wh(e){return e%4===0&&e%100!==0||e%400===0}function or(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Xe(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=or(t)),n}function $o(e,t){return function(n){return n!=null?($7(this,e,n),pe.updateOffset(this,t),this):Kd(this,e)}}function Kd(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function $7(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&wh(e.year())&&e.month()===1&&e.date()===29?(n=Xe(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Th(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function PF(e){return e=Sr(e),li(this[e])?this[e]():this}function zF(e,t){if(typeof e=="object"){e=G1(e);var n=LF(e),r,i=n.length;for(r=0;r68?1900:2e3)};var X7=$o("FullYear",!0);function n$(){return wh(this.year())}function r$(e,t,n,r,i,a,s){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,a,s),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,a,s),o}function ic(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xd(e,t,n){var r=7+t-n,i=(7+ic(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Q7(e,t,n,r,i){var a=(7+n-r)%7,s=Xd(e,r,i),o=1+7*(t-1)+a+s,l,c;return o<=0?(l=e-1,c=Al(l)+o):o>Al(e)?(l=e+1,c=o-Al(e)):(l=e,c=o),{year:l,dayOfYear:c}}function ac(e,t,n){var r=Xd(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,s;return i<1?(s=e.year()-1,a=i+Ai(s,t,n)):i>Ai(e.year(),t,n)?(a=i-Ai(e.year(),t,n),s=e.year()+1):(s=e.year(),a=i),{week:a,year:s}}function Ai(e,t,n){var r=Xd(e,t,n),i=Xd(e+1,t,n);return(Al(e)-r+i)/7}Ne("w",["ww",2],"wo","week");Ne("W",["WW",2],"Wo","isoWeek");wn("week","w");wn("isoWeek","W");xn("week",5);xn("isoWeek",5);ve("w",Ct);ve("ww",Ct,tr);ve("W",Ct);ve("WW",Ct,tr);Mc(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Xe(e)});function i$(e){return ac(e,this._week.dow,this._week.doy).week}var a$={dow:0,doy:6};function s$(){return this._week.dow}function o$(){return this._week.doy}function l$(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function c$(e){var t=ac(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ne("d",0,"do","day");Ne("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ne("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ne("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ne("e",0,0,"weekday");Ne("E",0,0,"isoWeekday");wn("day","d");wn("weekday","e");wn("isoWeekday","E");xn("day",11);xn("weekday",11);xn("isoWeekday",11);ve("d",Ct);ve("e",Ct);ve("E",Ct);ve("dd",function(e,t){return t.weekdaysMinRegex(e)});ve("ddd",function(e,t){return t.weekdaysShortRegex(e)});ve("dddd",function(e,t){return t.weekdaysRegex(e)});Mc(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:qe(n).invalidWeekday=e});Mc(["d","e","E"],function(e,t,n,r){t[r]=Xe(e)});function u$(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function d$(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Z1(e,t){return e.slice(t,7).concat(e.slice(0,t))}var h$="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Z7="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),f$="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),p$=Nc,m$=Nc,g$=Nc;function y$(e,t){var n=Fr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Z1(n,this._week.dow):e?n[e.day()]:n}function b$(e){return e===!0?Z1(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function v$(e){return e===!0?Z1(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function w$(e,t,n){var r,i,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=oi([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=qt.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=qt.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=qt.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=qt.call(this._weekdaysParse,s),i!==-1||(i=qt.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=qt.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=qt.call(this._shortWeekdaysParse,s),i!==-1||(i=qt.call(this._weekdaysParse,s),i!==-1)?i:(i=qt.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=qt.call(this._minWeekdaysParse,s),i!==-1||(i=qt.call(this._weekdaysParse,s),i!==-1)?i:(i=qt.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function x$(e,t,n){var r,i,a;if(this._weekdaysParseExact)return w$.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=oi([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function k$(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=u$(e,this.localeData()),this.add(e-t,"d")):t}function S$(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function _$(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=d$(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function E$(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||J1.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(st(this,"_weekdaysRegex")||(this._weekdaysRegex=p$),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function T$(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||J1.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(st(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=m$),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function C$(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||J1.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(st(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=g$),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function J1(){function e(u,d){return d.length-u.length}var t=[],n=[],r=[],i=[],a,s,o,l,c;for(a=0;a<7;a++)s=oi([2e3,1]).day(a),o=Yn(this.weekdaysMin(s,"")),l=Yn(this.weekdaysShort(s,"")),c=Yn(this.weekdays(s,"")),t.push(o),n.push(l),r.push(c),i.push(o),i.push(l),i.push(c);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ey(){return this.hours()%12||12}function A$(){return this.hours()||24}Ne("H",["HH",2],0,"hour");Ne("h",["hh",2],0,ey);Ne("k",["kk",2],0,A$);Ne("hmm",0,0,function(){return""+ey.apply(this)+ii(this.minutes(),2)});Ne("hmmss",0,0,function(){return""+ey.apply(this)+ii(this.minutes(),2)+ii(this.seconds(),2)});Ne("Hmm",0,0,function(){return""+this.hours()+ii(this.minutes(),2)});Ne("Hmmss",0,0,function(){return""+this.hours()+ii(this.minutes(),2)+ii(this.seconds(),2)});function J7(e,t){Ne(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}J7("a",!0);J7("A",!1);wn("hour","h");xn("hour",13);function ek(e,t){return t._meridiemParse}ve("a",ek);ve("A",ek);ve("H",Ct);ve("h",Ct);ve("k",Ct);ve("HH",Ct,tr);ve("hh",Ct,tr);ve("kk",Ct,tr);ve("hmm",q7);ve("hmmss",H7);ve("Hmm",q7);ve("Hmmss",H7);pt(["H","HH"],nn);pt(["k","kk"],function(e,t,n){var r=Xe(e);t[nn]=r===24?0:r});pt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});pt(["h","hh"],function(e,t,n){t[nn]=Xe(e),qe(n).bigHour=!0});pt("hmm",function(e,t,n){var r=e.length-2;t[nn]=Xe(e.substr(0,r)),t[Dr]=Xe(e.substr(r)),qe(n).bigHour=!0});pt("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[nn]=Xe(e.substr(0,r)),t[Dr]=Xe(e.substr(r,2)),t[Ei]=Xe(e.substr(i)),qe(n).bigHour=!0});pt("Hmm",function(e,t,n){var r=e.length-2;t[nn]=Xe(e.substr(0,r)),t[Dr]=Xe(e.substr(r))});pt("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[nn]=Xe(e.substr(0,r)),t[Dr]=Xe(e.substr(r,2)),t[Ei]=Xe(e.substr(i))});function N$(e){return(e+"").toLowerCase().charAt(0)==="p"}var M$=/[ap]\.?m?\.?/i,R$=$o("Hours",!0);function O$(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var tk={calendar:xF,longDateFormat:EF,invalidDate:CF,ordinal:NF,dayOfMonthOrdinalParse:MF,relativeTime:OF,months:VF,monthsShort:W7,week:a$,weekdays:h$,weekdaysMin:f$,weekdaysShort:Z7,meridiemParse:M$},At={},il={},sc;function I$(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=Ch(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&I$(a,r)>=n-1)break;n--}t++}return sc}function L$(e){return e.match("^[^/\\\\]*$")!=null}function Ch(e){var t=null,n;if(At[e]===void 0&&typeof od<"u"&&od&&od.exports&&L$(e))try{t=sc._abbr,n=require,n("./locale/"+e),ba(t)}catch{At[e]=null}return At[e]}function ba(e,t){var n;return e&&(On(t)?n=Hi(e):n=ty(e,t),n?sc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),sc._abbr}function ty(e,t){if(t!==null){var n,r=tk;if(t.abbr=e,At[e]!=null)z7("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=At[e]._config;else if(t.parentLocale!=null)if(At[t.parentLocale]!=null)r=At[t.parentLocale]._config;else if(n=Ch(t.parentLocale),n!=null)r=n._config;else return il[t.parentLocale]||(il[t.parentLocale]=[]),il[t.parentLocale].push({name:e,config:t}),null;return At[e]=new Y1(Bm(r,t)),il[e]&&il[e].forEach(function(i){ty(i.name,i.config)}),ba(e),At[e]}else return delete At[e],null}function P$(e,t){if(t!=null){var n,r,i=tk;At[e]!=null&&At[e].parentLocale!=null?At[e].set(Bm(At[e]._config,t)):(r=Ch(e),r!=null&&(i=r._config),t=Bm(i,t),r==null&&(t.abbr=e),n=new Y1(t),n.parentLocale=At[e],At[e]=n),ba(e)}else At[e]!=null&&(At[e].parentLocale!=null?(At[e]=At[e].parentLocale,e===ba()&&ba(e)):At[e]!=null&&delete At[e]);return At[e]}function Hi(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sc;if(!Fr(e)){if(t=Ch(e),t)return t;e=[e]}return D$(e)}function z$(){return Fm(At)}function ny(e){var t,n=e._a;return n&&qe(e).overflow===-2&&(t=n[_i]<0||n[_i]>11?_i:n[Qr]<1||n[Qr]>Th(n[bn],n[_i])?Qr:n[nn]<0||n[nn]>24||n[nn]===24&&(n[Dr]!==0||n[Ei]!==0||n[Xa]!==0)?nn:n[Dr]<0||n[Dr]>59?Dr:n[Ei]<0||n[Ei]>59?Ei:n[Xa]<0||n[Xa]>999?Xa:-1,qe(e)._overflowDayOfYear&&(tQr)&&(t=Qr),qe(e)._overflowWeeks&&t===-1&&(t=qF),qe(e)._overflowWeekday&&t===-1&&(t=HF),qe(e).overflow=t),e}var B$=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,F$=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,$$=/Z|[+-]\d\d(?::?\d\d)?/,Eu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xf=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],U$=/^\/?Date\((-?\d+)/i,j$=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,q$={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function nk(e){var t,n,r=e._i,i=B$.exec(r)||F$.exec(r),a,s,o,l,c=Eu.length,u=Xf.length;if(i){for(qe(e).iso=!0,t=0,n=c;tAl(s)||e._dayOfYear===0)&&(qe(e)._overflowDayOfYear=!0),n=ic(s,0,e._dayOfYear),e._a[_i]=n.getUTCMonth(),e._a[Qr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[nn]===24&&e._a[Dr]===0&&e._a[Ei]===0&&e._a[Xa]===0&&(e._nextDay=!0,e._a[nn]=0),e._d=(e._useUTC?ic:r$).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[nn]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(qe(e).weekdayMismatch=!0)}}function Q$(e){var t,n,r,i,a,s,o,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,s=4,n=Ds(t.GG,e._a[bn],ac(Tt(),1,4).year),r=Ds(t.W,1),i=Ds(t.E,1),(i<1||i>7)&&(l=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,c=ac(Tt(),a,s),n=Ds(t.gg,e._a[bn],c.year),r=Ds(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),r<1||r>Ai(n,a,s)?qe(e)._overflowWeeks=!0:l!=null?qe(e)._overflowWeekday=!0:(o=Q7(n,r,i,a,s),e._a[bn]=o.year,e._dayOfYear=o.dayOfYear)}pe.ISO_8601=function(){};pe.RFC_2822=function(){};function iy(e){if(e._f===pe.ISO_8601){nk(e);return}if(e._f===pe.RFC_2822){rk(e);return}e._a=[],qe(e).empty=!0;var t=""+e._i,n,r,i,a,s,o=t.length,l=0,c,u;for(i=B7(e._f,e._locale).match(K1)||[],u=i.length,n=0;n0&&qe(e).unusedInput.push(s),t=t.slice(t.indexOf(r)+r.length),l+=r.length),ho[a]?(r?qe(e).empty=!1:qe(e).unusedTokens.push(a),jF(a,r,e)):e._strict&&!r&&qe(e).unusedTokens.push(a);qe(e).charsLeftOver=o-l,t.length>0&&qe(e).unusedInput.push(t),e._a[nn]<=12&&qe(e).bigHour===!0&&e._a[nn]>0&&(qe(e).bigHour=void 0),qe(e).parsedDateParts=e._a.slice(0),qe(e).meridiem=e._meridiem,e._a[nn]=Z$(e._locale,e._a[nn],e._meridiem),c=qe(e).era,c!==null&&(e._a[bn]=e._locale.erasConvertYear(c,e._a[bn])),ry(e),ny(e)}function Z$(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function J$(e){var t,n,r,i,a,s,o=!1,l=e._f.length;if(l===0){qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:vh()});function sk(e,t){var n,r;if(t.length===1&&Fr(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wU(){if(!On(this._isDSTShifted))return this._isDSTShifted;var e={},t;return V1(e,this),e=ik(e),e._a?(t=e._isUTC?oi(e._a):Tt(e._a),this._isDSTShifted=this.isValid()&&dU(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function xU(){return this.isValid()?!this._isUTC:!1}function kU(){return this.isValid()?this._isUTC:!1}function lk(){return this.isValid()?this._isUTC&&this._offset===0:!1}var SU=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,_U=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jr(e,t){var n=e,r=null,i,a,s;return rd(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:zi(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=SU.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:Xe(r[Qr])*i,h:Xe(r[nn])*i,m:Xe(r[Dr])*i,s:Xe(r[Ei])*i,ms:Xe(Um(r[Xa]*1e3))*i}):(r=_U.exec(e))?(i=r[1]==="-"?-1:1,n={y:za(r[2],i),M:za(r[3],i),w:za(r[4],i),d:za(r[5],i),h:za(r[6],i),m:za(r[7],i),s:za(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=EU(Tt(n.from),Tt(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),a=new Ah(n),rd(e)&&st(e,"_locale")&&(a._locale=e._locale),rd(e)&&st(e,"_isValid")&&(a._isValid=e._isValid),a}jr.fn=Ah.prototype;jr.invalid=uU;function za(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function i2(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function EU(e,t){var n;return e.isValid()&&t.isValid()?(t=sy(t,e),e.isBefore(t)?n=i2(e,t):(n=i2(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function ck(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(z7(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=jr(n,r),uk(this,i,e),this}}function uk(e,t,n,r){var i=t._milliseconds,a=Um(t._days),s=Um(t._months);e.isValid()&&(r=r??!0,s&&Y7(e,Kd(e,"Month")+s*n),a&&$7(e,"Date",Kd(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&pe.updateOffset(e,a||s))}var TU=ck(1,"add"),CU=ck(-1,"subtract");function dk(e){return typeof e=="string"||e instanceof String}function AU(e){return $r(e)||Cc(e)||dk(e)||zi(e)||MU(e)||NU(e)||e===null||e===void 0}function NU(e){var t=es(e)&&!H1(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,s=r.length;for(i=0;in.valueOf():n.valueOf()9999?nd(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):li(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",nd(n,"Z")):nd(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function HU(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+i+a)}function WU(e){e||(e=this.isUtc()?pe.defaultFormatUtc:pe.defaultFormat);var t=nd(this,e);return this.localeData().postformat(t)}function VU(e,t){return this.isValid()&&($r(e)&&e.isValid()||Tt(e).isValid())?jr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function YU(e){return this.from(Tt(),e)}function KU(e,t){return this.isValid()&&($r(e)&&e.isValid()||Tt(e).isValid())?jr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function GU(e){return this.to(Tt(),e)}function hk(e){var t;return e===void 0?this._locale._abbr:(t=Hi(e),t!=null&&(this._locale=t),this)}var fk=kr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function pk(){return this._locale}var Qd=1e3,fo=60*Qd,Zd=60*fo,mk=(365*400+97)*24*Zd;function po(e,t){return(e%t+t)%t}function gk(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-mk:new Date(e,t,n).valueOf()}function yk(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-mk:Date.UTC(e,t,n)}function XU(e){var t,n;if(e=Sr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?yk:gk,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=po(t+(this._isUTC?0:this.utcOffset()*fo),Zd);break;case"minute":t=this._d.valueOf(),t-=po(t,fo);break;case"second":t=this._d.valueOf(),t-=po(t,Qd);break}return this._d.setTime(t),pe.updateOffset(this,!0),this}function QU(e){var t,n;if(e=Sr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?yk:gk,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Zd-po(t+(this._isUTC?0:this.utcOffset()*fo),Zd)-1;break;case"minute":t=this._d.valueOf(),t+=fo-po(t,fo)-1;break;case"second":t=this._d.valueOf(),t+=Qd-po(t,Qd)-1;break}return this._d.setTime(t),pe.updateOffset(this,!0),this}function ZU(){return this._d.valueOf()-(this._offset||0)*6e4}function JU(){return Math.floor(this.valueOf()/1e3)}function ej(){return new Date(this.valueOf())}function tj(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function nj(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function rj(){return this.isValid()?this.toISOString():null}function ij(){return W1(this)}function aj(){return aa({},qe(this))}function sj(){return qe(this).overflow}function oj(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ne("N",0,0,"eraAbbr");Ne("NN",0,0,"eraAbbr");Ne("NNN",0,0,"eraAbbr");Ne("NNNN",0,0,"eraName");Ne("NNNNN",0,0,"eraNarrow");Ne("y",["y",1],"yo","eraYear");Ne("y",["yy",2],0,"eraYear");Ne("y",["yyy",3],0,"eraYear");Ne("y",["yyyy",4],0,"eraYear");ve("N",oy);ve("NN",oy);ve("NNN",oy);ve("NNNN",bj);ve("NNNNN",vj);pt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?qe(n).era=i:qe(n).invalidEra=e});ve("y",Uo);ve("yy",Uo);ve("yyy",Uo);ve("yyyy",Uo);ve("yo",wj);pt(["y","yy","yyy","yyyy"],bn);pt(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[bn]=n._locale.eraYearOrdinalParse(e,i):t[bn]=parseInt(e,10)});function lj(e,t){var n,r,i,a=this._eras||Hi("en")._eras;for(n=0,r=a.length;n=0)return a[r]}function uj(e,t){var n=e.since<=e.until?1:-1;return t===void 0?pe(e.since).year():pe(e.since).year()+(t-e.offset)*n}function dj(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ea&&(t=a),Cj.call(this,e,t,n,r,i))}function Cj(e,t,n,r,i){var a=Q7(e,t,n,r,i),s=ic(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}Ne("Q",0,"Qo","quarter");wn("quarter","Q");xn("quarter",7);ve("Q",U7);pt("Q",function(e,t){t[_i]=(Xe(e)-1)*3});function Aj(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ne("D",["DD",2],"Do","date");wn("date","D");xn("date",9);ve("D",Ct);ve("DD",Ct,tr);ve("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});pt(["D","DD"],Qr);pt("Do",function(e,t){t[Qr]=Xe(e.match(Ct)[0])});var vk=$o("Date",!0);Ne("DDD",["DDDD",3],"DDDo","dayOfYear");wn("dayOfYear","DDD");xn("dayOfYear",4);ve("DDD",kh);ve("DDDD",j7);pt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Xe(e)});function Nj(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ne("m",["mm",2],0,"minute");wn("minute","m");xn("minute",14);ve("m",Ct);ve("mm",Ct,tr);pt(["m","mm"],Dr);var Mj=$o("Minutes",!1);Ne("s",["ss",2],0,"second");wn("second","s");xn("second",15);ve("s",Ct);ve("ss",Ct,tr);pt(["s","ss"],Ei);var Rj=$o("Seconds",!1);Ne("S",0,0,function(){return~~(this.millisecond()/100)});Ne(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ne(0,["SSS",3],0,"millisecond");Ne(0,["SSSS",4],0,function(){return this.millisecond()*10});Ne(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ne(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ne(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ne(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ne(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});wn("millisecond","ms");xn("millisecond",16);ve("S",kh,U7);ve("SS",kh,tr);ve("SSS",kh,j7);var sa,wk;for(sa="SSSS";sa.length<=9;sa+="S")ve(sa,Uo);function Oj(e,t){t[Xa]=Xe(("0."+e)*1e3)}for(sa="S";sa.length<=9;sa+="S")pt(sa,Oj);wk=$o("Milliseconds",!1);Ne("z",0,0,"zoneAbbr");Ne("zz",0,0,"zoneName");function Ij(){return this._isUTC?"UTC":""}function Dj(){return this._isUTC?"Coordinated Universal Time":""}var ae=Ac.prototype;ae.add=TU;ae.calendar=IU;ae.clone=DU;ae.diff=UU;ae.endOf=QU;ae.format=WU;ae.from=VU;ae.fromNow=YU;ae.to=KU;ae.toNow=GU;ae.get=PF;ae.invalidAt=sj;ae.isAfter=LU;ae.isBefore=PU;ae.isBetween=zU;ae.isSame=BU;ae.isSameOrAfter=FU;ae.isSameOrBefore=$U;ae.isValid=ij;ae.lang=fk;ae.locale=hk;ae.localeData=pk;ae.max=iU;ae.min=rU;ae.parsingFlags=aj;ae.set=zF;ae.startOf=XU;ae.subtract=CU;ae.toArray=tj;ae.toObject=nj;ae.toDate=ej;ae.toISOString=qU;ae.inspect=HU;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=rj;ae.toString=jU;ae.unix=JU;ae.valueOf=ZU;ae.creationData=oj;ae.eraName=dj;ae.eraNarrow=hj;ae.eraAbbr=fj;ae.eraYear=pj;ae.year=X7;ae.isLeapYear=n$;ae.weekYear=xj;ae.isoWeekYear=kj;ae.quarter=ae.quarters=Aj;ae.month=K7;ae.daysInMonth=JF;ae.week=ae.weeks=l$;ae.isoWeek=ae.isoWeeks=c$;ae.weeksInYear=Ej;ae.weeksInWeekYear=Tj;ae.isoWeeksInYear=Sj;ae.isoWeeksInISOWeekYear=_j;ae.date=vk;ae.day=ae.days=k$;ae.weekday=S$;ae.isoWeekday=_$;ae.dayOfYear=Nj;ae.hour=ae.hours=R$;ae.minute=ae.minutes=Mj;ae.second=ae.seconds=Rj;ae.millisecond=ae.milliseconds=wk;ae.utcOffset=fU;ae.utc=mU;ae.local=gU;ae.parseZone=yU;ae.hasAlignedHourOffset=bU;ae.isDST=vU;ae.isLocal=xU;ae.isUtcOffset=kU;ae.isUtc=lk;ae.isUTC=lk;ae.zoneAbbr=Ij;ae.zoneName=Dj;ae.dates=kr("dates accessor is deprecated. Use date instead.",vk);ae.months=kr("months accessor is deprecated. Use month instead",K7);ae.years=kr("years accessor is deprecated. Use year instead",X7);ae.zone=kr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",pU);ae.isDSTShifted=kr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wU);function Lj(e){return Tt(e*1e3)}function Pj(){return Tt.apply(null,arguments).parseZone()}function xk(e){return e}var ot=Y1.prototype;ot.calendar=kF;ot.longDateFormat=TF;ot.invalidDate=AF;ot.ordinal=RF;ot.preparse=xk;ot.postformat=xk;ot.relativeTime=IF;ot.pastFuture=DF;ot.set=wF;ot.eras=lj;ot.erasParse=cj;ot.erasConvertYear=uj;ot.erasAbbrRegex=gj;ot.erasNameRegex=mj;ot.erasNarrowRegex=yj;ot.months=GF;ot.monthsShort=XF;ot.monthsParse=ZF;ot.monthsRegex=t$;ot.monthsShortRegex=e$;ot.week=i$;ot.firstDayOfYear=o$;ot.firstDayOfWeek=s$;ot.weekdays=y$;ot.weekdaysMin=v$;ot.weekdaysShort=b$;ot.weekdaysParse=x$;ot.weekdaysRegex=E$;ot.weekdaysShortRegex=T$;ot.weekdaysMinRegex=C$;ot.isPM=N$;ot.meridiem=O$;function Jd(e,t,n,r){var i=Hi(),a=oi().set(r,t);return i[n](a,e)}function kk(e,t,n){if(zi(e)&&(t=e,e=void 0),e=e||"",t!=null)return Jd(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Jd(e,r,n,"month");return i}function cy(e,t,n,r){typeof e=="boolean"?(zi(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,zi(t)&&(n=t,t=void 0),t=t||"");var i=Hi(),a=e?i._week.dow:0,s,o=[];if(n!=null)return Jd(t,(n+a)%7,r,"day");for(s=0;s<7;s++)o[s]=Jd(t,(s+a)%7,r,"day");return o}function zj(e,t){return kk(e,t,"months")}function Bj(e,t){return kk(e,t,"monthsShort")}function Fj(e,t,n){return cy(e,t,n,"weekdays")}function $j(e,t,n){return cy(e,t,n,"weekdaysShort")}function Uj(e,t,n){return cy(e,t,n,"weekdaysMin")}ba("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Xe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});pe.lang=kr("moment.lang is deprecated. Use moment.locale instead.",ba);pe.langData=kr("moment.langData is deprecated. Use moment.localeData instead.",Hi);var fi=Math.abs;function jj(){var e=this._data;return this._milliseconds=fi(this._milliseconds),this._days=fi(this._days),this._months=fi(this._months),e.milliseconds=fi(e.milliseconds),e.seconds=fi(e.seconds),e.minutes=fi(e.minutes),e.hours=fi(e.hours),e.months=fi(e.months),e.years=fi(e.years),this}function Sk(e,t,n,r){var i=jr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function qj(e,t){return Sk(this,e,t,1)}function Hj(e,t){return Sk(this,e,t,-1)}function a2(e){return e<0?Math.floor(e):Math.ceil(e)}function Wj(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,s,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=a2(qm(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=or(e/1e3),r.seconds=i%60,a=or(i/60),r.minutes=a%60,s=or(a/60),r.hours=s%24,t+=or(s/24),l=or(_k(t)),n+=l,t-=a2(qm(l)),o=or(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function _k(e){return e*4800/146097}function qm(e){return e*146097/4800}function Vj(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Sr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+_k(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(qm(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Yj(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Xe(this._months/12)*31536e6:NaN}function Wi(e){return function(){return this.as(e)}}var Kj=Wi("ms"),Gj=Wi("s"),Xj=Wi("m"),Qj=Wi("h"),Zj=Wi("d"),Jj=Wi("w"),eq=Wi("M"),tq=Wi("Q"),nq=Wi("y");function rq(){return jr(this)}function iq(e){return e=Sr(e),this.isValid()?this[e+"s"]():NaN}function vs(e){return function(){return this.isValid()?this._data[e]:NaN}}var aq=vs("milliseconds"),sq=vs("seconds"),oq=vs("minutes"),lq=vs("hours"),cq=vs("days"),uq=vs("months"),dq=vs("years");function hq(){return or(this.days()/7)}var bi=Math.round,Js={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function fq(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function pq(e,t,n,r){var i=jr(e).abs(),a=bi(i.as("s")),s=bi(i.as("m")),o=bi(i.as("h")),l=bi(i.as("d")),c=bi(i.as("M")),u=bi(i.as("w")),d=bi(i.as("y")),f=a<=n.ss&&["s",a]||a0,f[4]=r,fq.apply(null,f)}function mq(e){return e===void 0?bi:typeof e=="function"?(bi=e,!0):!1}function gq(e,t){return Js[e]===void 0?!1:t===void 0?Js[e]:(Js[e]=t,e==="s"&&(Js.ss=t-1),!0)}function yq(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Js,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Js,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=pq(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var Qf=Math.abs;function Ms(e){return(e>0)-(e<0)||+e}function Mh(){if(!this.isValid())return this.localeData().invalidDate();var e=Qf(this._milliseconds)/1e3,t=Qf(this._days),n=Qf(this._months),r,i,a,s,o=this.asSeconds(),l,c,u,d;return o?(r=or(e/60),i=or(r/60),e%=60,r%=60,a=or(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",c=Ms(this._months)!==Ms(o)?"-":"",u=Ms(this._days)!==Ms(o)?"-":"",d=Ms(this._milliseconds)!==Ms(o)?"-":"",l+"P"+(a?c+a+"Y":"")+(n?c+n+"M":"")+(t?u+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+s+"S":"")):"P0D"}var Je=Ah.prototype;Je.isValid=cU;Je.abs=jj;Je.add=qj;Je.subtract=Hj;Je.as=Vj;Je.asMilliseconds=Kj;Je.asSeconds=Gj;Je.asMinutes=Xj;Je.asHours=Qj;Je.asDays=Zj;Je.asWeeks=Jj;Je.asMonths=eq;Je.asQuarters=tq;Je.asYears=nq;Je.valueOf=Yj;Je._bubble=Wj;Je.clone=rq;Je.get=iq;Je.milliseconds=aq;Je.seconds=sq;Je.minutes=oq;Je.hours=lq;Je.days=cq;Je.weeks=hq;Je.months=uq;Je.years=dq;Je.humanize=yq;Je.toISOString=Mh;Je.toString=Mh;Je.toJSON=Mh;Je.locale=hk;Je.localeData=pk;Je.toIsoString=kr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Mh);Je.lang=fk;Ne("X",0,0,"unix");Ne("x",0,0,"valueOf");ve("x",_h);ve("X",FF);pt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});pt("x",function(e,t,n){n._d=new Date(Xe(e))});//! moment.js +pe.version="2.29.4";bF(Tt);pe.fn=ae;pe.min=aU;pe.max=sU;pe.now=oU;pe.utc=oi;pe.unix=Lj;pe.months=zj;pe.isDate=Cc;pe.locale=ba;pe.invalid=vh;pe.duration=jr;pe.isMoment=$r;pe.weekdays=Fj;pe.parseZone=Pj;pe.localeData=Hi;pe.isDuration=rd;pe.monthsShort=Bj;pe.weekdaysMin=Uj;pe.defineLocale=ty;pe.updateLocale=P$;pe.locales=z$;pe.weekdaysShort=$j;pe.normalizeUnits=Sr;pe.relativeTimeRounding=mq;pe.relativeTimeThreshold=gq;pe.calendarFormat=OU;pe.prototype=ae;pe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function qa(e){return e!==null&&e<-2}function s2(e){return e===-2||e===-1||e===32}function Tu(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return s2(l)?(e.enter(n),o(l)):t(l)}function o(l){return s2(l)&&a++15?c="…"+s.slice(i-15,i):c=s.slice(0,i);var u;o+15":">","<":"<",'"':""","'":"'"},Mq=/[&><"']/g;function Rq(e){return String(e).replace(Mq,t=>Nq[t])}var Ek=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},Oq=function(t){var n=Ek(t);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},Iq=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},Dq=function(t){var n=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(t);return n!=null?n[1]:"_relative"},Pe={contains:Eq,deflt:Tq,escape:Rq,hyphenate:Aq,getBaseElem:Ek,isCharacterBox:Oq,protocolFromUrl:Dq},ad={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Lq(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class uy{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n in ad)if(ad.hasOwnProperty(n)){var r=ad[n];this[n]=t[n]!==void 0?r.processor?r.processor(t[n]):t[n]:Lq(r)}}reportNonstrict(t,n,r){var i=this.strict;if(typeof i=="function"&&(i=i(t,n,r)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new ie("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),r);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,r){var i=this.strict;if(typeof i=="function")try{i=i(t,n,r)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]")),!1)}isTrusted(t){t.url&&!t.protocol&&(t.protocol=Pe.protocolFromUrl(t.url));var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class Gi{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return Gr[Pq[this.id]]}sub(){return Gr[zq[this.id]]}fracNum(){return Gr[Bq[this.id]]}fracDen(){return Gr[Fq[this.id]]}cramp(){return Gr[$q[this.id]]}text(){return Gr[Uq[this.id]]}isTight(){return this.size>=2}}var dy=0,e0=1,mo=2,Ni=3,oc=4,hr=5,Co=6,En=7,Gr=[new Gi(dy,0,!1),new Gi(e0,0,!0),new Gi(mo,1,!1),new Gi(Ni,1,!0),new Gi(oc,2,!1),new Gi(hr,2,!0),new Gi(Co,3,!1),new Gi(En,3,!0)],Pq=[oc,hr,oc,hr,Co,En,Co,En],zq=[hr,hr,hr,hr,En,En,En,En],Bq=[mo,Ni,oc,hr,Co,En,Co,En],Fq=[Ni,Ni,hr,hr,En,En,En,En],$q=[e0,e0,Ni,Ni,hr,hr,En,En],Uq=[dy,e0,mo,Ni,mo,Ni,mo,Ni],De={DISPLAY:Gr[dy],TEXT:Gr[mo],SCRIPT:Gr[oc],SCRIPTSCRIPT:Gr[Co]},Hm=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function jq(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var sd=[];Hm.forEach(e=>e.blocks.forEach(t=>sd.push(...t)));function Tk(e){for(var t=0;t=sd[t]&&e<=sd[t+1])return!0;return!1}var Rs=80,qq=function(t,n){return"M95,"+(622+t+n)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+t/2.075+" -"+t+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+t)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Hq=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+t/2.084+" -"+t+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+t)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Wq=function(t,n){return"M983 "+(10+t+n)+` +l`+t/3.13+" -"+t+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Vq=function(t,n){return"M424,"+(2398+t+n)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+t)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+` +h400000v`+(40+t)+"h-400000z"},Yq=function(t,n){return"M473,"+(2713+t+n)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},Kq=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},Gq=function(t,n,r){var i=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},Xq=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=qq(n,Rs);break;case"sqrtSize1":i=Hq(n,Rs);break;case"sqrtSize2":i=Wq(n,Rs);break;case"sqrtSize3":i=Vq(n,Rs);break;case"sqrtSize4":i=Yq(n,Rs);break;case"sqrtTall":i=Gq(n,Rs,r)}return i},Qq=function(t,n){switch(t){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},l2={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Zq=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z +M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z +M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z +M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Rc{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return Pe.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),n=0;nn.toText();return this.children.map(t).join("")}}var Zr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Cu={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},c2={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Jq(e,t){Zr[e]=t}function hy(e,t,n){if(!Zr[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=Zr[t][r];if(!i&&e[0]in c2&&(r=c2[e[0]].charCodeAt(0),i=Zr[t][r]),!i&&n==="text"&&Tk(r)&&(i=Zr[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Zf={};function eH(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Zf[t]){var n=Zf[t]={cssEmPerMu:Cu.quad[t]/18};for(var r in Cu)Cu.hasOwnProperty(r)&&(n[r]=Cu[r][t])}return Zf[t]}var tH=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],u2=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],d2=function(t,n){return n.size<2?t:tH[t-1][n.size-1]};class wi{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||wi.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=u2[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new wi(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:d2(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:u2[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=d2(wi.BASESIZE,t);return this.size===n&&this.textSize===wi.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==wi.BASESIZE?["sizing","reset-size"+this.size,"size"+wi.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=eH(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}wi.BASESIZE=6;var Wm={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},nH={ex:!0,em:!0,mu:!0},Ck=function(t){return typeof t!="string"&&(t=t.unit),t in Wm||t in nH||t==="ex"},Lt=function(t,n){var r;if(t.unit in Wm)r=Wm[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var i;if(n.style.isTight()?i=n.havingStyle(n.style.text()):i=n,t.unit==="ex")r=i.fontMetrics().xHeight;else if(t.unit==="em")r=i.fontMetrics().quad;else throw new ie("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},he=function(t){return+t.toFixed(4)+"em"},_a=function(t){return t.filter(n=>n).join(" ")},Ak=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}},Nk=function(t){var n=document.createElement(t);n.className=_a(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&n.setAttribute(i,this.attributes[i]);for(var a=0;a",n};class Oc{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Ak.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return Pe.contains(this.classes,t)}toNode(){return Nk.call(this,"span")}toMarkup(){return Mk.call(this,"span")}}class fy{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Ak.call(this,n,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return Pe.contains(this.classes,t)}toNode(){return Nk.call(this,"a")}toMarkup(){return Mk.call(this,"a")}}class rH{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return Pe.contains(this.classes,t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);return t}toMarkup(){var t=""+this.alt+"0&&(n=document.createElement("span"),n.style.marginRight=he(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=_a(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="0&&(r+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=Pe.hyphenate(i)+":"+this.style[i]+";");r&&(t=!0,n+=' style="'+Pe.escape(r)+'"');var a=Pe.escape(this.text);return t?(n+=">",n+=a,n+="",n):a}}class Bi{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i":""}}class Vm{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t=" but got "+String(e)+".")}var sH={bin:1,close:1,inner:1,open:1,punct:1,rel:1},oH={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},vt={math:{},text:{}};function g(e,t,n,r,i,a){vt[e][i]={font:t,group:n,replace:r},a&&r&&(vt[e][r]=vt[e][i])}var b="math",Z="text",k="main",O="ams",Ot="accent-token",be="bin",Nn="close",jo="inner",Le="mathord",Zt="op-token",nr="open",Rh="punct",D="rel",Vi="spacing",L="textord";g(b,k,D,"≡","\\equiv",!0);g(b,k,D,"≺","\\prec",!0);g(b,k,D,"≻","\\succ",!0);g(b,k,D,"∼","\\sim",!0);g(b,k,D,"⊥","\\perp");g(b,k,D,"⪯","\\preceq",!0);g(b,k,D,"⪰","\\succeq",!0);g(b,k,D,"≃","\\simeq",!0);g(b,k,D,"∣","\\mid",!0);g(b,k,D,"≪","\\ll",!0);g(b,k,D,"≫","\\gg",!0);g(b,k,D,"≍","\\asymp",!0);g(b,k,D,"∥","\\parallel");g(b,k,D,"⋈","\\bowtie",!0);g(b,k,D,"⌣","\\smile",!0);g(b,k,D,"⊑","\\sqsubseteq",!0);g(b,k,D,"⊒","\\sqsupseteq",!0);g(b,k,D,"≐","\\doteq",!0);g(b,k,D,"⌢","\\frown",!0);g(b,k,D,"∋","\\ni",!0);g(b,k,D,"∝","\\propto",!0);g(b,k,D,"⊢","\\vdash",!0);g(b,k,D,"⊣","\\dashv",!0);g(b,k,D,"∋","\\owns");g(b,k,Rh,".","\\ldotp");g(b,k,Rh,"⋅","\\cdotp");g(b,k,L,"#","\\#");g(Z,k,L,"#","\\#");g(b,k,L,"&","\\&");g(Z,k,L,"&","\\&");g(b,k,L,"ℵ","\\aleph",!0);g(b,k,L,"∀","\\forall",!0);g(b,k,L,"ℏ","\\hbar",!0);g(b,k,L,"∃","\\exists",!0);g(b,k,L,"∇","\\nabla",!0);g(b,k,L,"♭","\\flat",!0);g(b,k,L,"ℓ","\\ell",!0);g(b,k,L,"♮","\\natural",!0);g(b,k,L,"♣","\\clubsuit",!0);g(b,k,L,"℘","\\wp",!0);g(b,k,L,"♯","\\sharp",!0);g(b,k,L,"♢","\\diamondsuit",!0);g(b,k,L,"ℜ","\\Re",!0);g(b,k,L,"♡","\\heartsuit",!0);g(b,k,L,"ℑ","\\Im",!0);g(b,k,L,"♠","\\spadesuit",!0);g(b,k,L,"§","\\S",!0);g(Z,k,L,"§","\\S");g(b,k,L,"¶","\\P",!0);g(Z,k,L,"¶","\\P");g(b,k,L,"†","\\dag");g(Z,k,L,"†","\\dag");g(Z,k,L,"†","\\textdagger");g(b,k,L,"‡","\\ddag");g(Z,k,L,"‡","\\ddag");g(Z,k,L,"‡","\\textdaggerdbl");g(b,k,Nn,"⎱","\\rmoustache",!0);g(b,k,nr,"⎰","\\lmoustache",!0);g(b,k,Nn,"⟯","\\rgroup",!0);g(b,k,nr,"⟮","\\lgroup",!0);g(b,k,be,"∓","\\mp",!0);g(b,k,be,"⊖","\\ominus",!0);g(b,k,be,"⊎","\\uplus",!0);g(b,k,be,"⊓","\\sqcap",!0);g(b,k,be,"∗","\\ast");g(b,k,be,"⊔","\\sqcup",!0);g(b,k,be,"◯","\\bigcirc",!0);g(b,k,be,"∙","\\bullet",!0);g(b,k,be,"‡","\\ddagger");g(b,k,be,"≀","\\wr",!0);g(b,k,be,"⨿","\\amalg");g(b,k,be,"&","\\And");g(b,k,D,"⟵","\\longleftarrow",!0);g(b,k,D,"⇐","\\Leftarrow",!0);g(b,k,D,"⟸","\\Longleftarrow",!0);g(b,k,D,"⟶","\\longrightarrow",!0);g(b,k,D,"⇒","\\Rightarrow",!0);g(b,k,D,"⟹","\\Longrightarrow",!0);g(b,k,D,"↔","\\leftrightarrow",!0);g(b,k,D,"⟷","\\longleftrightarrow",!0);g(b,k,D,"⇔","\\Leftrightarrow",!0);g(b,k,D,"⟺","\\Longleftrightarrow",!0);g(b,k,D,"↦","\\mapsto",!0);g(b,k,D,"⟼","\\longmapsto",!0);g(b,k,D,"↗","\\nearrow",!0);g(b,k,D,"↩","\\hookleftarrow",!0);g(b,k,D,"↪","\\hookrightarrow",!0);g(b,k,D,"↘","\\searrow",!0);g(b,k,D,"↼","\\leftharpoonup",!0);g(b,k,D,"⇀","\\rightharpoonup",!0);g(b,k,D,"↙","\\swarrow",!0);g(b,k,D,"↽","\\leftharpoondown",!0);g(b,k,D,"⇁","\\rightharpoondown",!0);g(b,k,D,"↖","\\nwarrow",!0);g(b,k,D,"⇌","\\rightleftharpoons",!0);g(b,O,D,"≮","\\nless",!0);g(b,O,D,"","\\@nleqslant");g(b,O,D,"","\\@nleqq");g(b,O,D,"⪇","\\lneq",!0);g(b,O,D,"≨","\\lneqq",!0);g(b,O,D,"","\\@lvertneqq");g(b,O,D,"⋦","\\lnsim",!0);g(b,O,D,"⪉","\\lnapprox",!0);g(b,O,D,"⊀","\\nprec",!0);g(b,O,D,"⋠","\\npreceq",!0);g(b,O,D,"⋨","\\precnsim",!0);g(b,O,D,"⪹","\\precnapprox",!0);g(b,O,D,"≁","\\nsim",!0);g(b,O,D,"","\\@nshortmid");g(b,O,D,"∤","\\nmid",!0);g(b,O,D,"⊬","\\nvdash",!0);g(b,O,D,"⊭","\\nvDash",!0);g(b,O,D,"⋪","\\ntriangleleft");g(b,O,D,"⋬","\\ntrianglelefteq",!0);g(b,O,D,"⊊","\\subsetneq",!0);g(b,O,D,"","\\@varsubsetneq");g(b,O,D,"⫋","\\subsetneqq",!0);g(b,O,D,"","\\@varsubsetneqq");g(b,O,D,"≯","\\ngtr",!0);g(b,O,D,"","\\@ngeqslant");g(b,O,D,"","\\@ngeqq");g(b,O,D,"⪈","\\gneq",!0);g(b,O,D,"≩","\\gneqq",!0);g(b,O,D,"","\\@gvertneqq");g(b,O,D,"⋧","\\gnsim",!0);g(b,O,D,"⪊","\\gnapprox",!0);g(b,O,D,"⊁","\\nsucc",!0);g(b,O,D,"⋡","\\nsucceq",!0);g(b,O,D,"⋩","\\succnsim",!0);g(b,O,D,"⪺","\\succnapprox",!0);g(b,O,D,"≆","\\ncong",!0);g(b,O,D,"","\\@nshortparallel");g(b,O,D,"∦","\\nparallel",!0);g(b,O,D,"⊯","\\nVDash",!0);g(b,O,D,"⋫","\\ntriangleright");g(b,O,D,"⋭","\\ntrianglerighteq",!0);g(b,O,D,"","\\@nsupseteqq");g(b,O,D,"⊋","\\supsetneq",!0);g(b,O,D,"","\\@varsupsetneq");g(b,O,D,"⫌","\\supsetneqq",!0);g(b,O,D,"","\\@varsupsetneqq");g(b,O,D,"⊮","\\nVdash",!0);g(b,O,D,"⪵","\\precneqq",!0);g(b,O,D,"⪶","\\succneqq",!0);g(b,O,D,"","\\@nsubseteqq");g(b,O,be,"⊴","\\unlhd");g(b,O,be,"⊵","\\unrhd");g(b,O,D,"↚","\\nleftarrow",!0);g(b,O,D,"↛","\\nrightarrow",!0);g(b,O,D,"⇍","\\nLeftarrow",!0);g(b,O,D,"⇏","\\nRightarrow",!0);g(b,O,D,"↮","\\nleftrightarrow",!0);g(b,O,D,"⇎","\\nLeftrightarrow",!0);g(b,O,D,"△","\\vartriangle");g(b,O,L,"ℏ","\\hslash");g(b,O,L,"▽","\\triangledown");g(b,O,L,"◊","\\lozenge");g(b,O,L,"Ⓢ","\\circledS");g(b,O,L,"®","\\circledR");g(Z,O,L,"®","\\circledR");g(b,O,L,"∡","\\measuredangle",!0);g(b,O,L,"∄","\\nexists");g(b,O,L,"℧","\\mho");g(b,O,L,"Ⅎ","\\Finv",!0);g(b,O,L,"⅁","\\Game",!0);g(b,O,L,"‵","\\backprime");g(b,O,L,"▲","\\blacktriangle");g(b,O,L,"▼","\\blacktriangledown");g(b,O,L,"■","\\blacksquare");g(b,O,L,"⧫","\\blacklozenge");g(b,O,L,"★","\\bigstar");g(b,O,L,"∢","\\sphericalangle",!0);g(b,O,L,"∁","\\complement",!0);g(b,O,L,"ð","\\eth",!0);g(Z,k,L,"ð","ð");g(b,O,L,"╱","\\diagup");g(b,O,L,"╲","\\diagdown");g(b,O,L,"□","\\square");g(b,O,L,"□","\\Box");g(b,O,L,"◊","\\Diamond");g(b,O,L,"¥","\\yen",!0);g(Z,O,L,"¥","\\yen",!0);g(b,O,L,"✓","\\checkmark",!0);g(Z,O,L,"✓","\\checkmark");g(b,O,L,"ℶ","\\beth",!0);g(b,O,L,"ℸ","\\daleth",!0);g(b,O,L,"ℷ","\\gimel",!0);g(b,O,L,"ϝ","\\digamma",!0);g(b,O,L,"ϰ","\\varkappa");g(b,O,nr,"┌","\\@ulcorner",!0);g(b,O,Nn,"┐","\\@urcorner",!0);g(b,O,nr,"└","\\@llcorner",!0);g(b,O,Nn,"┘","\\@lrcorner",!0);g(b,O,D,"≦","\\leqq",!0);g(b,O,D,"⩽","\\leqslant",!0);g(b,O,D,"⪕","\\eqslantless",!0);g(b,O,D,"≲","\\lesssim",!0);g(b,O,D,"⪅","\\lessapprox",!0);g(b,O,D,"≊","\\approxeq",!0);g(b,O,be,"⋖","\\lessdot");g(b,O,D,"⋘","\\lll",!0);g(b,O,D,"≶","\\lessgtr",!0);g(b,O,D,"⋚","\\lesseqgtr",!0);g(b,O,D,"⪋","\\lesseqqgtr",!0);g(b,O,D,"≑","\\doteqdot");g(b,O,D,"≓","\\risingdotseq",!0);g(b,O,D,"≒","\\fallingdotseq",!0);g(b,O,D,"∽","\\backsim",!0);g(b,O,D,"⋍","\\backsimeq",!0);g(b,O,D,"⫅","\\subseteqq",!0);g(b,O,D,"⋐","\\Subset",!0);g(b,O,D,"⊏","\\sqsubset",!0);g(b,O,D,"≼","\\preccurlyeq",!0);g(b,O,D,"⋞","\\curlyeqprec",!0);g(b,O,D,"≾","\\precsim",!0);g(b,O,D,"⪷","\\precapprox",!0);g(b,O,D,"⊲","\\vartriangleleft");g(b,O,D,"⊴","\\trianglelefteq");g(b,O,D,"⊨","\\vDash",!0);g(b,O,D,"⊪","\\Vvdash",!0);g(b,O,D,"⌣","\\smallsmile");g(b,O,D,"⌢","\\smallfrown");g(b,O,D,"≏","\\bumpeq",!0);g(b,O,D,"≎","\\Bumpeq",!0);g(b,O,D,"≧","\\geqq",!0);g(b,O,D,"⩾","\\geqslant",!0);g(b,O,D,"⪖","\\eqslantgtr",!0);g(b,O,D,"≳","\\gtrsim",!0);g(b,O,D,"⪆","\\gtrapprox",!0);g(b,O,be,"⋗","\\gtrdot");g(b,O,D,"⋙","\\ggg",!0);g(b,O,D,"≷","\\gtrless",!0);g(b,O,D,"⋛","\\gtreqless",!0);g(b,O,D,"⪌","\\gtreqqless",!0);g(b,O,D,"≖","\\eqcirc",!0);g(b,O,D,"≗","\\circeq",!0);g(b,O,D,"≜","\\triangleq",!0);g(b,O,D,"∼","\\thicksim");g(b,O,D,"≈","\\thickapprox");g(b,O,D,"⫆","\\supseteqq",!0);g(b,O,D,"⋑","\\Supset",!0);g(b,O,D,"⊐","\\sqsupset",!0);g(b,O,D,"≽","\\succcurlyeq",!0);g(b,O,D,"⋟","\\curlyeqsucc",!0);g(b,O,D,"≿","\\succsim",!0);g(b,O,D,"⪸","\\succapprox",!0);g(b,O,D,"⊳","\\vartriangleright");g(b,O,D,"⊵","\\trianglerighteq");g(b,O,D,"⊩","\\Vdash",!0);g(b,O,D,"∣","\\shortmid");g(b,O,D,"∥","\\shortparallel");g(b,O,D,"≬","\\between",!0);g(b,O,D,"⋔","\\pitchfork",!0);g(b,O,D,"∝","\\varpropto");g(b,O,D,"◀","\\blacktriangleleft");g(b,O,D,"∴","\\therefore",!0);g(b,O,D,"∍","\\backepsilon");g(b,O,D,"▶","\\blacktriangleright");g(b,O,D,"∵","\\because",!0);g(b,O,D,"⋘","\\llless");g(b,O,D,"⋙","\\gggtr");g(b,O,be,"⊲","\\lhd");g(b,O,be,"⊳","\\rhd");g(b,O,D,"≂","\\eqsim",!0);g(b,k,D,"⋈","\\Join");g(b,O,D,"≑","\\Doteq",!0);g(b,O,be,"∔","\\dotplus",!0);g(b,O,be,"∖","\\smallsetminus");g(b,O,be,"⋒","\\Cap",!0);g(b,O,be,"⋓","\\Cup",!0);g(b,O,be,"⩞","\\doublebarwedge",!0);g(b,O,be,"⊟","\\boxminus",!0);g(b,O,be,"⊞","\\boxplus",!0);g(b,O,be,"⋇","\\divideontimes",!0);g(b,O,be,"⋉","\\ltimes",!0);g(b,O,be,"⋊","\\rtimes",!0);g(b,O,be,"⋋","\\leftthreetimes",!0);g(b,O,be,"⋌","\\rightthreetimes",!0);g(b,O,be,"⋏","\\curlywedge",!0);g(b,O,be,"⋎","\\curlyvee",!0);g(b,O,be,"⊝","\\circleddash",!0);g(b,O,be,"⊛","\\circledast",!0);g(b,O,be,"⋅","\\centerdot");g(b,O,be,"⊺","\\intercal",!0);g(b,O,be,"⋒","\\doublecap");g(b,O,be,"⋓","\\doublecup");g(b,O,be,"⊠","\\boxtimes",!0);g(b,O,D,"⇢","\\dashrightarrow",!0);g(b,O,D,"⇠","\\dashleftarrow",!0);g(b,O,D,"⇇","\\leftleftarrows",!0);g(b,O,D,"⇆","\\leftrightarrows",!0);g(b,O,D,"⇚","\\Lleftarrow",!0);g(b,O,D,"↞","\\twoheadleftarrow",!0);g(b,O,D,"↢","\\leftarrowtail",!0);g(b,O,D,"↫","\\looparrowleft",!0);g(b,O,D,"⇋","\\leftrightharpoons",!0);g(b,O,D,"↶","\\curvearrowleft",!0);g(b,O,D,"↺","\\circlearrowleft",!0);g(b,O,D,"↰","\\Lsh",!0);g(b,O,D,"⇈","\\upuparrows",!0);g(b,O,D,"↿","\\upharpoonleft",!0);g(b,O,D,"⇃","\\downharpoonleft",!0);g(b,k,D,"⊶","\\origof",!0);g(b,k,D,"⊷","\\imageof",!0);g(b,O,D,"⊸","\\multimap",!0);g(b,O,D,"↭","\\leftrightsquigarrow",!0);g(b,O,D,"⇉","\\rightrightarrows",!0);g(b,O,D,"⇄","\\rightleftarrows",!0);g(b,O,D,"↠","\\twoheadrightarrow",!0);g(b,O,D,"↣","\\rightarrowtail",!0);g(b,O,D,"↬","\\looparrowright",!0);g(b,O,D,"↷","\\curvearrowright",!0);g(b,O,D,"↻","\\circlearrowright",!0);g(b,O,D,"↱","\\Rsh",!0);g(b,O,D,"⇊","\\downdownarrows",!0);g(b,O,D,"↾","\\upharpoonright",!0);g(b,O,D,"⇂","\\downharpoonright",!0);g(b,O,D,"⇝","\\rightsquigarrow",!0);g(b,O,D,"⇝","\\leadsto");g(b,O,D,"⇛","\\Rrightarrow",!0);g(b,O,D,"↾","\\restriction");g(b,k,L,"‘","`");g(b,k,L,"$","\\$");g(Z,k,L,"$","\\$");g(Z,k,L,"$","\\textdollar");g(b,k,L,"%","\\%");g(Z,k,L,"%","\\%");g(b,k,L,"_","\\_");g(Z,k,L,"_","\\_");g(Z,k,L,"_","\\textunderscore");g(b,k,L,"∠","\\angle",!0);g(b,k,L,"∞","\\infty",!0);g(b,k,L,"′","\\prime");g(b,k,L,"△","\\triangle");g(b,k,L,"Γ","\\Gamma",!0);g(b,k,L,"Δ","\\Delta",!0);g(b,k,L,"Θ","\\Theta",!0);g(b,k,L,"Λ","\\Lambda",!0);g(b,k,L,"Ξ","\\Xi",!0);g(b,k,L,"Π","\\Pi",!0);g(b,k,L,"Σ","\\Sigma",!0);g(b,k,L,"Υ","\\Upsilon",!0);g(b,k,L,"Φ","\\Phi",!0);g(b,k,L,"Ψ","\\Psi",!0);g(b,k,L,"Ω","\\Omega",!0);g(b,k,L,"A","Α");g(b,k,L,"B","Β");g(b,k,L,"E","Ε");g(b,k,L,"Z","Ζ");g(b,k,L,"H","Η");g(b,k,L,"I","Ι");g(b,k,L,"K","Κ");g(b,k,L,"M","Μ");g(b,k,L,"N","Ν");g(b,k,L,"O","Ο");g(b,k,L,"P","Ρ");g(b,k,L,"T","Τ");g(b,k,L,"X","Χ");g(b,k,L,"¬","\\neg",!0);g(b,k,L,"¬","\\lnot");g(b,k,L,"⊤","\\top");g(b,k,L,"⊥","\\bot");g(b,k,L,"∅","\\emptyset");g(b,O,L,"∅","\\varnothing");g(b,k,Le,"α","\\alpha",!0);g(b,k,Le,"β","\\beta",!0);g(b,k,Le,"γ","\\gamma",!0);g(b,k,Le,"δ","\\delta",!0);g(b,k,Le,"ϵ","\\epsilon",!0);g(b,k,Le,"ζ","\\zeta",!0);g(b,k,Le,"η","\\eta",!0);g(b,k,Le,"θ","\\theta",!0);g(b,k,Le,"ι","\\iota",!0);g(b,k,Le,"κ","\\kappa",!0);g(b,k,Le,"λ","\\lambda",!0);g(b,k,Le,"μ","\\mu",!0);g(b,k,Le,"ν","\\nu",!0);g(b,k,Le,"ξ","\\xi",!0);g(b,k,Le,"ο","\\omicron",!0);g(b,k,Le,"π","\\pi",!0);g(b,k,Le,"ρ","\\rho",!0);g(b,k,Le,"σ","\\sigma",!0);g(b,k,Le,"τ","\\tau",!0);g(b,k,Le,"υ","\\upsilon",!0);g(b,k,Le,"ϕ","\\phi",!0);g(b,k,Le,"χ","\\chi",!0);g(b,k,Le,"ψ","\\psi",!0);g(b,k,Le,"ω","\\omega",!0);g(b,k,Le,"ε","\\varepsilon",!0);g(b,k,Le,"ϑ","\\vartheta",!0);g(b,k,Le,"ϖ","\\varpi",!0);g(b,k,Le,"ϱ","\\varrho",!0);g(b,k,Le,"ς","\\varsigma",!0);g(b,k,Le,"φ","\\varphi",!0);g(b,k,be,"∗","*",!0);g(b,k,be,"+","+");g(b,k,be,"−","-",!0);g(b,k,be,"⋅","\\cdot",!0);g(b,k,be,"∘","\\circ",!0);g(b,k,be,"÷","\\div",!0);g(b,k,be,"±","\\pm",!0);g(b,k,be,"×","\\times",!0);g(b,k,be,"∩","\\cap",!0);g(b,k,be,"∪","\\cup",!0);g(b,k,be,"∖","\\setminus",!0);g(b,k,be,"∧","\\land");g(b,k,be,"∨","\\lor");g(b,k,be,"∧","\\wedge",!0);g(b,k,be,"∨","\\vee",!0);g(b,k,L,"√","\\surd");g(b,k,nr,"⟨","\\langle",!0);g(b,k,nr,"∣","\\lvert");g(b,k,nr,"∥","\\lVert");g(b,k,Nn,"?","?");g(b,k,Nn,"!","!");g(b,k,Nn,"⟩","\\rangle",!0);g(b,k,Nn,"∣","\\rvert");g(b,k,Nn,"∥","\\rVert");g(b,k,D,"=","=");g(b,k,D,":",":");g(b,k,D,"≈","\\approx",!0);g(b,k,D,"≅","\\cong",!0);g(b,k,D,"≥","\\ge");g(b,k,D,"≥","\\geq",!0);g(b,k,D,"←","\\gets");g(b,k,D,">","\\gt",!0);g(b,k,D,"∈","\\in",!0);g(b,k,D,"","\\@not");g(b,k,D,"⊂","\\subset",!0);g(b,k,D,"⊃","\\supset",!0);g(b,k,D,"⊆","\\subseteq",!0);g(b,k,D,"⊇","\\supseteq",!0);g(b,O,D,"⊈","\\nsubseteq",!0);g(b,O,D,"⊉","\\nsupseteq",!0);g(b,k,D,"⊨","\\models");g(b,k,D,"←","\\leftarrow",!0);g(b,k,D,"≤","\\le");g(b,k,D,"≤","\\leq",!0);g(b,k,D,"<","\\lt",!0);g(b,k,D,"→","\\rightarrow",!0);g(b,k,D,"→","\\to");g(b,O,D,"≱","\\ngeq",!0);g(b,O,D,"≰","\\nleq",!0);g(b,k,Vi," ","\\ ");g(b,k,Vi," ","\\space");g(b,k,Vi," ","\\nobreakspace");g(Z,k,Vi," ","\\ ");g(Z,k,Vi," "," ");g(Z,k,Vi," ","\\space");g(Z,k,Vi," ","\\nobreakspace");g(b,k,Vi,null,"\\nobreak");g(b,k,Vi,null,"\\allowbreak");g(b,k,Rh,",",",");g(b,k,Rh,";",";");g(b,O,be,"⊼","\\barwedge",!0);g(b,O,be,"⊻","\\veebar",!0);g(b,k,be,"⊙","\\odot",!0);g(b,k,be,"⊕","\\oplus",!0);g(b,k,be,"⊗","\\otimes",!0);g(b,k,L,"∂","\\partial",!0);g(b,k,be,"⊘","\\oslash",!0);g(b,O,be,"⊚","\\circledcirc",!0);g(b,O,be,"⊡","\\boxdot",!0);g(b,k,be,"△","\\bigtriangleup");g(b,k,be,"▽","\\bigtriangledown");g(b,k,be,"†","\\dagger");g(b,k,be,"⋄","\\diamond");g(b,k,be,"⋆","\\star");g(b,k,be,"◃","\\triangleleft");g(b,k,be,"▹","\\triangleright");g(b,k,nr,"{","\\{");g(Z,k,L,"{","\\{");g(Z,k,L,"{","\\textbraceleft");g(b,k,Nn,"}","\\}");g(Z,k,L,"}","\\}");g(Z,k,L,"}","\\textbraceright");g(b,k,nr,"{","\\lbrace");g(b,k,Nn,"}","\\rbrace");g(b,k,nr,"[","\\lbrack",!0);g(Z,k,L,"[","\\lbrack",!0);g(b,k,Nn,"]","\\rbrack",!0);g(Z,k,L,"]","\\rbrack",!0);g(b,k,nr,"(","\\lparen",!0);g(b,k,Nn,")","\\rparen",!0);g(Z,k,L,"<","\\textless",!0);g(Z,k,L,">","\\textgreater",!0);g(b,k,nr,"⌊","\\lfloor",!0);g(b,k,Nn,"⌋","\\rfloor",!0);g(b,k,nr,"⌈","\\lceil",!0);g(b,k,Nn,"⌉","\\rceil",!0);g(b,k,L,"\\","\\backslash");g(b,k,L,"∣","|");g(b,k,L,"∣","\\vert");g(Z,k,L,"|","\\textbar",!0);g(b,k,L,"∥","\\|");g(b,k,L,"∥","\\Vert");g(Z,k,L,"∥","\\textbardbl");g(Z,k,L,"~","\\textasciitilde");g(Z,k,L,"\\","\\textbackslash");g(Z,k,L,"^","\\textasciicircum");g(b,k,D,"↑","\\uparrow",!0);g(b,k,D,"⇑","\\Uparrow",!0);g(b,k,D,"↓","\\downarrow",!0);g(b,k,D,"⇓","\\Downarrow",!0);g(b,k,D,"↕","\\updownarrow",!0);g(b,k,D,"⇕","\\Updownarrow",!0);g(b,k,Zt,"∐","\\coprod");g(b,k,Zt,"⋁","\\bigvee");g(b,k,Zt,"⋀","\\bigwedge");g(b,k,Zt,"⨄","\\biguplus");g(b,k,Zt,"⋂","\\bigcap");g(b,k,Zt,"⋃","\\bigcup");g(b,k,Zt,"∫","\\int");g(b,k,Zt,"∫","\\intop");g(b,k,Zt,"∬","\\iint");g(b,k,Zt,"∭","\\iiint");g(b,k,Zt,"∏","\\prod");g(b,k,Zt,"∑","\\sum");g(b,k,Zt,"⨂","\\bigotimes");g(b,k,Zt,"⨁","\\bigoplus");g(b,k,Zt,"⨀","\\bigodot");g(b,k,Zt,"∮","\\oint");g(b,k,Zt,"∯","\\oiint");g(b,k,Zt,"∰","\\oiiint");g(b,k,Zt,"⨆","\\bigsqcup");g(b,k,Zt,"∫","\\smallint");g(Z,k,jo,"…","\\textellipsis");g(b,k,jo,"…","\\mathellipsis");g(Z,k,jo,"…","\\ldots",!0);g(b,k,jo,"…","\\ldots",!0);g(b,k,jo,"⋯","\\@cdots",!0);g(b,k,jo,"⋱","\\ddots",!0);g(b,k,L,"⋮","\\varvdots");g(b,k,Ot,"ˊ","\\acute");g(b,k,Ot,"ˋ","\\grave");g(b,k,Ot,"¨","\\ddot");g(b,k,Ot,"~","\\tilde");g(b,k,Ot,"ˉ","\\bar");g(b,k,Ot,"˘","\\breve");g(b,k,Ot,"ˇ","\\check");g(b,k,Ot,"^","\\hat");g(b,k,Ot,"⃗","\\vec");g(b,k,Ot,"˙","\\dot");g(b,k,Ot,"˚","\\mathring");g(b,k,Le,"","\\@imath");g(b,k,Le,"","\\@jmath");g(b,k,L,"ı","ı");g(b,k,L,"ȷ","ȷ");g(Z,k,L,"ı","\\i",!0);g(Z,k,L,"ȷ","\\j",!0);g(Z,k,L,"ß","\\ss",!0);g(Z,k,L,"æ","\\ae",!0);g(Z,k,L,"œ","\\oe",!0);g(Z,k,L,"ø","\\o",!0);g(Z,k,L,"Æ","\\AE",!0);g(Z,k,L,"Œ","\\OE",!0);g(Z,k,L,"Ø","\\O",!0);g(Z,k,Ot,"ˊ","\\'");g(Z,k,Ot,"ˋ","\\`");g(Z,k,Ot,"ˆ","\\^");g(Z,k,Ot,"˜","\\~");g(Z,k,Ot,"ˉ","\\=");g(Z,k,Ot,"˘","\\u");g(Z,k,Ot,"˙","\\.");g(Z,k,Ot,"¸","\\c");g(Z,k,Ot,"˚","\\r");g(Z,k,Ot,"ˇ","\\v");g(Z,k,Ot,"¨",'\\"');g(Z,k,Ot,"˝","\\H");g(Z,k,Ot,"◯","\\textcircled");var Rk={"--":!0,"---":!0,"``":!0,"''":!0};g(Z,k,L,"–","--",!0);g(Z,k,L,"–","\\textendash");g(Z,k,L,"—","---",!0);g(Z,k,L,"—","\\textemdash");g(Z,k,L,"‘","`",!0);g(Z,k,L,"‘","\\textquoteleft");g(Z,k,L,"’","'",!0);g(Z,k,L,"’","\\textquoteright");g(Z,k,L,"“","``",!0);g(Z,k,L,"“","\\textquotedblleft");g(Z,k,L,"”","''",!0);g(Z,k,L,"”","\\textquotedblright");g(b,k,L,"°","\\degree",!0);g(Z,k,L,"°","\\degree");g(Z,k,L,"°","\\textdegree",!0);g(b,k,L,"£","\\pounds");g(b,k,L,"£","\\mathsterling",!0);g(Z,k,L,"£","\\pounds");g(Z,k,L,"£","\\textsterling",!0);g(b,O,L,"✠","\\maltese");g(Z,O,L,"✠","\\maltese");var f2='0123456789/@."';for(var Jf=0;Jf{if(_a(e.classes)!==_a(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},fH=e=>{for(var t=0;tn&&(n=s.height),s.depth>r&&(r=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=i},In=function(t,n,r,i){var a=new Oc(t,n,r,i);return py(a),a},Ok=(e,t,n,r)=>new Oc(e,t,n,r),pH=function(t,n,r){var i=In([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=he(i.height),i.maxFontSize=1,i},mH=function(t,n,r,i){var a=new fy(t,n,r,i);return py(a),a},Ik=function(t){var n=new Rc(t);return py(n),n},gH=function(t,n){return t instanceof Rc?In([],[t],n):t},yH=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,a=i,s=1;s{var n=In(["mspace"],[],t),r=Lt(e,t);return n.style.marginRight=he(r),n},Ru=function(t,n,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var a;return n==="textbf"&&r==="textit"?a="BoldItalic":n==="textbf"?a="Bold":n==="textit"?a="Italic":a="Regular",i+"-"+a},Dk={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Lk={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},wH=function(t,n){var[r,i,a]=Lk[t],s=new Ea(r),o=new Bi([s],{width:he(i),height:he(a),style:"width:"+he(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Ok(["overlay"],[o],n);return l.height=a,l.style.height=he(a),l.style.width=he(i),l},j={fontMap:Dk,makeSymbol:Mr,mathsym:cH,makeSpan:In,makeSvgSpan:Ok,makeLineSpan:pH,makeAnchor:mH,makeFragment:Ik,wrapFragment:gH,makeVList:bH,makeOrd:dH,makeGlue:vH,staticSvg:wH,svgData:Lk,tryCombineChars:fH},It={number:3,unit:"mu"},Fa={number:4,unit:"mu"},pi={number:5,unit:"mu"},xH={mord:{mop:It,mbin:Fa,mrel:pi,minner:It},mop:{mord:It,mop:It,mrel:pi,minner:It},mbin:{mord:Fa,mop:Fa,mopen:Fa,minner:Fa},mrel:{mord:pi,mop:pi,mopen:pi,minner:pi},mopen:{},mclose:{mop:It,mbin:Fa,mrel:pi,minner:It},mpunct:{mord:It,mop:It,mrel:pi,mopen:It,mclose:It,mpunct:It,minner:It},minner:{mord:It,mop:It,mbin:Fa,mrel:pi,mopen:It,mpunct:It,minner:It}},kH={mord:{mop:It},mop:{mord:It,mop:It},mbin:{},mrel:{},mopen:{},mclose:{mop:It},mpunct:{},minner:{mop:It}},Pk={},n0={},r0={};function me(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l{var w=h.classes[0],y=m.classes[0];w==="mbin"&&Pe.contains(_H,y)?h.classes[0]="mord":y==="mbin"&&Pe.contains(SH,w)&&(m.classes[0]="mord")},{node:d},f,p),b2(a,(m,h)=>{var w=Km(h),y=Km(m),v=w&&y?m.hasClass("mtight")?kH[w][y]:xH[w][y]:null;if(v)return j.makeGlue(v,c)},{node:d},f,p),a},b2=function e(t,n,r,i,a){i&&t.push(i);for(var s=0;sf=>{t.splice(d+1,0,f),s++})(s)}i&&t.pop()},zk=function(t){return t instanceof Rc||t instanceof fy||t instanceof Oc&&t.hasClass("enclosing")?t:null},CH=function e(t,n){var r=zk(t);if(r){var i=r.children;if(i.length){if(n==="right")return e(i[i.length-1],"right");if(n==="left")return e(i[0],"left")}}return t},Km=function(t,n){return t?(n&&(t=CH(t,n)),TH[t.classes[0]]||null):null},lc=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return Fi(n.concat(r))},at=function(t,n,r){if(!t)return Fi();if(n0[t.type]){var i=n0[t.type](t,n);if(r&&n.size!==r.size){i=Fi(n.sizingClasses(r),[i],n);var a=n.sizeMultiplier/r.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new ie("Got group of unknown type: '"+t.type+"'")};function Ou(e,t){var n=Fi(["base"],e,t),r=Fi(["strut"]);return r.style.height=he(n.height+n.depth),n.depth&&(r.style.verticalAlign=he(-n.depth)),n.children.unshift(r),n}function Gm(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=rn(e,t,"root"),i;r.length===2&&r[1].hasClass("tag")&&(i=r.pop());for(var a=[],s=[],o=0;o0&&(a.push(Ou(s,t)),s=[]),a.push(r[o]));s.length>0&&a.push(Ou(s,t));var c;n?(c=Ou(rn(n,t,!0)),c.classes=["tag"],a.push(c)):i&&a.push(i);var u=Fi(["katex-html"],a);if(u.setAttribute("aria-hidden","true"),c){var d=c.children[0];d.style.height=he(u.height+u.depth),u.depth&&(d.style.verticalAlign=he(-u.depth))}return u}function Bk(e){return new Rc(e)}class ur{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=_a(this.classes));for(var r=0;r0&&(t+=' class ="'+Pe.escape(_a(this.classes))+'"'),t+=">";for(var r=0;r",t}toText(){return this.children.map(t=>t.toText()).join("")}}class Nl{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Pe.escape(this.toText())}toText(){return this.text}}class AH{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",he(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var te={MathNode:ur,TextNode:Nl,SpaceNode:AH,newDocumentFragment:Bk},br=function(t,n,r){return vt[n][t]&&vt[n][t].replace&&t.charCodeAt(0)!==55349&&!(Rk.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=vt[n][t].replace),new te.TextNode(t)},my=function(t){return t.length===1?t[0]:new te.MathNode("mrow",t)},gy=function(t,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var i=t.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var a=t.text;if(Pe.contains(["\\imath","\\jmath"],a))return null;vt[i][a]&&vt[i][a].replace&&(a=vt[i][a].replace);var s=j.fontMap[r].fontName;return hy(a,s,i)?j.fontMap[r].variant:null},jn=function(t,n,r){if(t.length===1){var i=gt(t[0],n);return r&&i instanceof ur&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),a.pop())}}}a.push(l),s=l}return a},Ta=function(t,n,r){return my(jn(t,n,r))},gt=function(t,n){if(!t)return new te.MathNode("mrow");if(r0[t.type]){var r=r0[t.type](t,n);return r}else throw new ie("Got group of unknown type: '"+t.type+"'")};function v2(e,t,n,r,i){var a=jn(e,n),s;a.length===1&&a[0]instanceof ur&&Pe.contains(["mrow","mtable"],a[0].type)?s=a[0]:s=new te.MathNode("mrow",a);var o=new te.MathNode("annotation",[new te.TextNode(t)]);o.setAttribute("encoding","application/x-tex");var l=new te.MathNode("semantics",[s,o]),c=new te.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return j.makeSpan([u],[c])}var Fk=function(t){return new wi({style:t.displayMode?De.DISPLAY:De.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},$k=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=j.makeSpan(r,[t])}return t},NH=function(t,n,r){var i=Fk(r),a;if(r.output==="mathml")return v2(t,n,i,r.displayMode,!0);if(r.output==="html"){var s=Gm(t,i);a=j.makeSpan(["katex"],[s])}else{var o=v2(t,n,i,r.displayMode,!1),l=Gm(t,i);a=j.makeSpan(["katex"],[o,l])}return $k(a,r)},MH=function(t,n,r){var i=Fk(r),a=Gm(t,i),s=j.makeSpan(["katex"],[a]);return $k(s,r)},RH={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},OH=function(t){var n=new te.MathNode("mo",[new te.TextNode(RH[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},IH={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},DH=function(t){return t.type==="ordgroup"?t.body.length:1},LH=function(t,n){function r(){var o=4e5,l=t.label.slice(1);if(Pe.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=t,u=DH(c.base),d,f,p;if(u>5)l==="widehat"||l==="widecheck"?(d=420,o=2364,p=.42,f=l+"4"):(d=312,o=2340,p=.34,f="tilde4");else{var m=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=l+m):(o=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var h=new Ea(f),w=new Bi([h],{width:"100%",height:he(p),viewBox:"0 0 "+o+" "+d,preserveAspectRatio:"none"});return{span:j.makeSvgSpan([],[w],n),minWidth:0,height:p}}else{var y=[],v=IH[l],[x,_,A]=v,E=A/1e3,R=x.length,B,q;if(R===1){var G=v[3];B=["hide-tail"],q=[G]}else if(R===2)B=["halfarrow-left","halfarrow-right"],q=["xMinYMin","xMaxYMin"];else if(R===3)B=["brace-left","brace-center","brace-right"],q=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+R+" children.");for(var W=0;W0&&(i.style.minWidth=he(a)),i},PH=function(t,n,r,i,a){var s,o=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(s=j.makeSpan(["stretchy",n],[],a),n==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(n)&&c.push(new Vm({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&c.push(new Vm({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new Bi(c,{width:"100%",height:he(o)});s=j.makeSvgSpan([],[u],a)}return s.height=o,s.style.height=he(o),s},$i={encloseSpan:PH,mathMLnode:OH,svgSpan:LH};function Ve(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function yy(e){var t=Ih(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Ih(e){return e&&(e.type==="atom"||oH.hasOwnProperty(e.type))?e:null}var by=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=Ve(e.base,"accent"),n=r.base,e.base=n,i=aH(at(e,t)),e.base=r):(r=Ve(e,"accent"),n=r.base);var a=at(n,t.havingCrampedStyle()),s=r.isShifty&&Pe.isCharacterBox(n),o=0;if(s){var l=Pe.getBaseElem(n),c=at(l,t.havingCrampedStyle());o=h2(c).skew}var u=r.label==="\\c",d=u?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),f;if(r.isStretchy)f=$i.svgSpan(r,t),f=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+he(2*o)+")",marginLeft:he(2*o)}:void 0}]},t);else{var p,m;r.label==="\\vec"?(p=j.staticSvg("vec",t),m=j.svgData.vec[1]):(p=j.makeOrd({mode:r.mode,text:r.label},t,"textord"),p=h2(p),p.italic=0,m=p.width,u&&(d+=p.depth)),f=j.makeSpan(["accent-body"],[p]);var h=r.label==="\\textcircled";h&&(f.classes.push("accent-full"),d=a.height);var w=o;h||(w-=m/2),f.style.left=he(w),r.label==="\\textcircled"&&(f.style.top=".2em"),f=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-d},{type:"elem",elem:f}]},t)}var y=j.makeSpan(["mord","accent"],[f],t);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},Uk=(e,t)=>{var n=e.isStretchy?$i.mathMLnode(e.label):new te.MathNode("mo",[br(e.label,e.mode)]),r=new te.MathNode("mover",[gt(e.base,t),n]);return r.setAttribute("accent","true"),r},zH=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));me({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=i0(t[0]),r=!zH.test(e.funcName),i=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:by,mathmlBuilder:Uk});me({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:by,mathmlBuilder:Uk});me({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=at(e.base,t),r=$i.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,a=j.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return j.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var n=$i.mathMLnode(e.label),r=new te.MathNode("munder",[gt(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Iu=e=>{var t=new te.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};me({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=j.wrapFragment(at(e.body,r,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;e.below&&(r=t.havingStyle(n.sub()),s=j.wrapFragment(at(e.below,r,t),t),s.classes.push(a+"-arrow-pad"));var o=$i.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,c=-t.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(c-=i.depth);var u;if(s){var d=-t.fontMetrics().axisHeight+s.height+.5*o.height+.111;u=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:s,shift:d}]},t)}else u=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l}]},t);return u.children[0].children[0].children[1].classes.push("svg-align"),j.makeSpan(["mrel","x-arrow"],[u],t)},mathmlBuilder(e,t){var n=$i.mathMLnode(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=Iu(gt(e.body,t));if(e.below){var a=Iu(gt(e.below,t));r=new te.MathNode("munderover",[n,a,i])}else r=new te.MathNode("mover",[n,i])}else if(e.below){var s=Iu(gt(e.below,t));r=new te.MathNode("munder",[n,s])}else r=Iu(),r=new te.MathNode("mover",[n,r]);return r}});var BH=j.makeSpan;function jk(e,t){var n=rn(e.body,t,!0);return BH([e.mclass],n,t)}function qk(e,t){var n,r=jn(e.body,t);return e.mclass==="minner"?n=new te.MathNode("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new te.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new te.MathNode("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}me({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Wt(i),isCharacterBox:Pe.isCharacterBox(i)}},htmlBuilder:jk,mathmlBuilder:qk});var Dh=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};me({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Dh(t[0]),body:Wt(t[1]),isCharacterBox:Pe.isCharacterBox(t[1])}}});me({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],s;r!=="\\stackrel"?s=Dh(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Wt(i)},l={type:"supsub",mode:a.mode,base:o,sup:r==="\\underset"?null:a,sub:r==="\\underset"?a:null};return{type:"mclass",mode:n.mode,mclass:s,body:[l],isCharacterBox:Pe.isCharacterBox(l)}},htmlBuilder:jk,mathmlBuilder:qk});me({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Dh(t[0]),body:Wt(t[0])}},htmlBuilder(e,t){var n=rn(e.body,t,!0),r=j.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=jn(e.body,t),r=new te.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var FH={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},w2=()=>({type:"styling",body:[],mode:"math",style:"display"}),x2=e=>e.type==="textord"&&e.text==="@",$H=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function UH(e,t,n){var r=FH[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=n.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},s=n.callFunction("\\Big",[a],[]),o=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function jH(e){var 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();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new ie("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],i=[r],a=0;a-1))if("<>AV".indexOf(c)>-1)for(var d=0;d<2;d++){for(var f=!0,p=l+1;pAV=|." after @',s[l]);var m=UH(c,u,e),h={type:"styling",body:[m],mode:"math",style:"display"};r.push(h),o=w2()}a%2===0?r.push(o):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var w=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:w,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}me({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=j.wrapFragment(at(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=he(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new te.MathNode("mrow",[gt(e.label,t)]);return n=new te.MathNode("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new te.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});me({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=j.wrapFragment(at(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new te.MathNode("mrow",[gt(e.fragment,t)])}});me({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=Ve(t[0],"ordgroup"),i=r.body,a="",s=0;s=1114111)throw new ie("\\@char with invalid code point "+a);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:c}}});var Hk=(e,t)=>{var n=rn(e.body,t.withColor(e.color),!1);return j.makeFragment(n)},Wk=(e,t)=>{var n=jn(e.body,t.withColor(e.color)),r=new te.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};me({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=Ve(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Wt(i)}},htmlBuilder:Hk,mathmlBuilder:Wk});me({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=Ve(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var a=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:a}},htmlBuilder:Hk,mathmlBuilder:Wk});me({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:i&&Ve(i,"size").value}},htmlBuilder(e,t){var n=j.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=he(Lt(e.size,t)))),n},mathmlBuilder(e,t){var n=new te.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",he(Lt(e.size,t)))),n}});var Xm={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Vk=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ie("Expected a control sequence",e);return t},qH=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Yk=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i==null&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};me({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Xm[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=Xm[r.text]),Ve(t.parseFunction(),"internal");throw new ie("Invalid token after macro prefix",r)}});me({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new ie("Expected a control sequence",r);for(var a=0,s,o=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),o[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new ie('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new ie('Argument number "'+r.text+'" out of order');a++,o.push([])}else{if(r.text==="EOF")throw new ie("Expected a macro definition");o[a].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return s&&l.unshift(s),(n==="\\edef"||n==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},n===Xm[n]),{type:"internal",mode:t.mode}}});me({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Vk(t.gullet.popToken());t.gullet.consumeSpaces();var i=qH(t);return Yk(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});me({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Vk(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Yk(t,r,a,n==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var hl=function(t,n,r){var i=vt.math[t]&&vt.math[t].replace,a=hy(i||t,n,r);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return a},vy=function(t,n,r,i){var a=r.havingBaseStyle(n),s=j.makeSpan(i.concat(a.sizingClasses(r)),[t],r),o=a.sizeMultiplier/r.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},Kk=function(t,n,r){var i=n.havingBaseStyle(r),a=(1-n.sizeMultiplier/i.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=he(a),t.height-=a,t.depth+=a},HH=function(t,n,r,i,a,s){var o=j.makeSymbol(t,"Main-Regular",a,i),l=vy(o,n,i,s);return r&&Kk(l,i,n),l},WH=function(t,n,r,i){return j.makeSymbol(t,"Size"+n+"-Regular",r,i)},Gk=function(t,n,r,i,a,s){var o=WH(t,n,a,i),l=vy(j.makeSpan(["delimsizing","size"+n],[o],i),De.TEXT,i,s);return r&&Kk(l,i,De.TEXT),l},rp=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=j.makeSpan(["delimsizinginner",i],[j.makeSpan([],[j.makeSymbol(t,n,r)])]);return{type:"elem",elem:a}},ip=function(t,n,r){var i=Zr["Size4-Regular"][t.charCodeAt(0)]?Zr["Size4-Regular"][t.charCodeAt(0)][4]:Zr["Size1-Regular"][t.charCodeAt(0)][4],a=new Ea("inner",Qq(t,Math.round(1e3*n))),s=new Bi([a],{width:he(i),height:he(n),style:"width:"+he(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),o=j.makeSvgSpan([],[s],r);return o.height=n,o.style.height=he(n),o.style.width=he(i),{type:"elem",elem:o}},Qm=.008,Du={type:"kern",size:-1*Qm},VH=["|","\\lvert","\\rvert","\\vert"],YH=["\\|","\\lVert","\\rVert","\\Vert"],Xk=function(t,n,r,i,a,s){var o,l,c,u,d="",f=0;o=c=u=t,l=null;var p="Size1-Regular";t==="\\uparrow"?c=u="⏐":t==="\\Uparrow"?c=u="‖":t==="\\downarrow"?o=c="⏐":t==="\\Downarrow"?o=c="‖":t==="\\updownarrow"?(o="\\uparrow",c="⏐",u="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",c="‖",u="\\Downarrow"):Pe.contains(VH,t)?(c="∣",d="vert",f=333):Pe.contains(YH,t)?(c="∥",d="doublevert",f=556):t==="["||t==="\\lbrack"?(o="⎡",c="⎢",u="⎣",p="Size4-Regular",d="lbrack",f=667):t==="]"||t==="\\rbrack"?(o="⎤",c="⎥",u="⎦",p="Size4-Regular",d="rbrack",f=667):t==="\\lfloor"||t==="⌊"?(c=o="⎢",u="⎣",p="Size4-Regular",d="lfloor",f=667):t==="\\lceil"||t==="⌈"?(o="⎡",c=u="⎢",p="Size4-Regular",d="lceil",f=667):t==="\\rfloor"||t==="⌋"?(c=o="⎥",u="⎦",p="Size4-Regular",d="rfloor",f=667):t==="\\rceil"||t==="⌉"?(o="⎤",c=u="⎥",p="Size4-Regular",d="rceil",f=667):t==="("||t==="\\lparen"?(o="⎛",c="⎜",u="⎝",p="Size4-Regular",d="lparen",f=875):t===")"||t==="\\rparen"?(o="⎞",c="⎟",u="⎠",p="Size4-Regular",d="rparen",f=875):t==="\\{"||t==="\\lbrace"?(o="⎧",l="⎨",u="⎩",c="⎪",p="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="⎫",l="⎬",u="⎭",c="⎪",p="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(o="⎧",u="⎩",c="⎪",p="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(o="⎫",u="⎭",c="⎪",p="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(o="⎧",u="⎭",c="⎪",p="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(o="⎫",u="⎩",c="⎪",p="Size4-Regular");var m=hl(o,p,a),h=m.height+m.depth,w=hl(c,p,a),y=w.height+w.depth,v=hl(u,p,a),x=v.height+v.depth,_=0,A=1;if(l!==null){var E=hl(l,p,a);_=E.height+E.depth,A=2}var R=h+x+_,B=Math.max(0,Math.ceil((n-R)/(A*y))),q=R+B*A*y,G=i.fontMetrics().axisHeight;r&&(G*=i.sizeMultiplier);var W=q/2-G,K=[];if(d.length>0){var ue=q-h-x,fe=Math.round(q*1e3),Te=Zq(d,Math.round(ue*1e3)),I=new Ea(d,Te),Y=(f/1e3).toFixed(3)+"em",F=(fe/1e3).toFixed(3)+"em",V=new Bi([I],{width:Y,height:F,viewBox:"0 0 "+f+" "+fe}),X=j.makeSvgSpan([],[V],i);X.height=fe/1e3,X.style.width=Y,X.style.height=F,K.push({type:"elem",elem:X})}else{if(K.push(rp(u,p,a)),K.push(Du),l===null){var N=q-h-x+2*Qm;K.push(ip(c,N,i))}else{var C=(q-h-x-_)/2+2*Qm;K.push(ip(c,C,i)),K.push(Du),K.push(rp(l,p,a)),K.push(Du),K.push(ip(c,C,i))}K.push(Du),K.push(rp(o,p,a))}var Q=i.havingBaseStyle(De.TEXT),ne=j.makeVList({positionType:"bottom",positionData:W,children:K},Q);return vy(j.makeSpan(["delimsizing","mult"],[ne],Q),De.TEXT,i,s)},ap=80,sp=.08,op=function(t,n,r,i,a){var s=Xq(t,i,r),o=new Ea(t,s),l=new Bi([o],{width:"400em",height:he(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return j.makeSvgSpan(["hide-tail"],[l],a)},KH=function(t,n){var r=n.havingBaseSizing(),i=e8("\\surd",t*r.sizeMultiplier,Jk,r),a=r.sizeMultiplier,s=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,l=0,c=0,u=0,d;return i.type==="small"?(u=1e3+1e3*s+ap,t<1?a=1:t<1.4&&(a=.7),l=(1+s+sp)/a,c=(1+s)/a,o=op("sqrtMain",l,u,s,n),o.style.minWidth="0.853em",d=.833/a):i.type==="large"?(u=(1e3+ap)*Ml[i.size],c=(Ml[i.size]+s)/a,l=(Ml[i.size]+s+sp)/a,o=op("sqrtSize"+i.size,l,u,s,n),o.style.minWidth="1.02em",d=1/a):(l=t+s+sp,c=t+s,u=Math.floor(1e3*t+s)+ap,o=op("sqrtTall",l,u,s,n),o.style.minWidth="0.742em",d=1.056),o.height=c,o.style.height=he(l),{span:o,advanceWidth:d,ruleWidth:(n.fontMetrics().sqrtRuleThickness+s)*a}},Qk=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],GH=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Zk=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ml=[0,1.2,1.8,2.4,3],XH=function(t,n,r,i,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Pe.contains(Qk,t)||Pe.contains(Zk,t))return Gk(t,n,!1,r,i,a);if(Pe.contains(GH,t))return Xk(t,Ml[n],!1,r,i,a);throw new ie("Illegal delimiter: '"+t+"'")},QH=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ZH=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"stack"}],Jk=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],JH=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},e8=function(t,n,r,i){for(var a=Math.min(2,3-i.style.size),s=a;sn)return r[s]}return r[r.length-1]},t8=function(t,n,r,i,a,s){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var o;Pe.contains(Zk,t)?o=QH:Pe.contains(Qk,t)?o=Jk:o=ZH;var l=e8(t,n,o,i);return l.type==="small"?HH(t,l.style,r,i,a,s):l.type==="large"?Gk(t,l.size,r,i,a,s):Xk(t,n,r,i,a,s)},eW=function(t,n,r,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,c=5/i.fontMetrics().ptPerEm,u=Math.max(n-o,r+o),d=Math.max(u/500*l,2*u-c);return t8(t,d,!0,i,a,s)},Mi={sqrtImage:KH,sizedDelim:XH,sizeToMaxHeight:Ml,customSizedDelim:t8,leftRightDelim:eW},k2={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},tW=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Lh(e,t){var n=Ih(e);if(n&&Pe.contains(tW,n.text))return n;throw n?new ie("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new ie("Invalid delimiter type '"+e.type+"'",e)}me({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=Lh(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:k2[e.funcName].size,mclass:k2[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?j.makeSpan([e.mclass]):Mi.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(br(e.delim,e.mode));var n=new te.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=he(Mi.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function S2(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}me({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new ie("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Lh(t[0],e).text,color:n}}});me({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Lh(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Ve(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{S2(e);for(var n=rn(e.body,t,!0,["mopen","mclose"]),r=0,i=0,a=!1,s=0;s{S2(e);var n=jn(e.body,t);if(e.left!=="."){var r=new te.MathNode("mo",[br(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new te.MathNode("mo",[br(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return my(n)}});me({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Lh(t[0],e);if(!e.parser.leftrightDepth)throw new ie("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=lc(t,[]);else{n=Mi.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?br("|","text"):br(e.delim,e.mode),r=new te.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var wy=(e,t)=>{var n=j.wrapFragment(at(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,s=0,o=Pe.isCharacterBox(e.body);if(r==="sout")a=j.makeSpan(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,s=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=Lt({number:.6,unit:"pt"},t),c=Lt({number:.35,unit:"ex"},t),u=t.havingBaseSizing();i=i/u.sizeMultiplier;var d=n.height+n.depth+l+c;n.style.paddingLeft=he(d/2+l);var f=Math.floor(1e3*d*i),p=Kq(f),m=new Bi([new Ea("phase",p)],{width:"400em",height:he(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});a=j.makeSvgSpan(["hide-tail"],[m],t),a.style.height=he(d),s=n.depth+l+c}else{/cancel/.test(r)?o||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var h=0,w=0,y=0;/box/.test(r)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),h=t.fontMetrics().fboxsep+(r==="colorbox"?0:y),w=h):r==="angl"?(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),h=4*y,w=Math.max(0,.25-n.depth)):(h=o?.2:0,w=h),a=$i.encloseSpan(n,r,h,w,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=he(y)):r==="angl"&&y!==.049&&(a.style.borderTopWidth=he(y),a.style.borderRightWidth=he(y)),s=n.depth+w,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var v;if(e.backgroundColor)v=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:n,shift:0}]},t);else{var x=/cancel|phase/.test(r)?["svg-align"]:[];v=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:x}]},t)}return/cancel/.test(r)&&(v.height=n.height,v.depth=n.depth),/cancel/.test(r)&&!o?j.makeSpan(["mord","cancel-lap"],[v],t):j.makeSpan(["mord"],[v],t)},xy=(e,t)=>{var n=0,r=new te.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[gt(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};me({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=Ve(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:wy,mathmlBuilder:xy});me({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=Ve(t[0],"color-token").color,s=Ve(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:wy,mathmlBuilder:xy});me({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});me({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:wy,mathmlBuilder:xy});me({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var n8={};function ci(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var t=e.parser.settings;if(!t.displayMode)throw new ie("{"+e.envName+"} can be used only in display mode.")};function ky(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function Ia(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:s,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=e.gullet.expandMacroAsText("\\arraystretch");if(p==null)s=1;else if(s=parseFloat(p),!s||s<0)throw new ie("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var m=[],h=[m],w=[],y=[],v=l!=null?[]:void 0;function x(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function _(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new ri("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(x(),y.push(_2(e));;){var A=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),A={type:"ordgroup",mode:e.mode,body:A},n&&(A={type:"styling",mode:e.mode,style:n,body:[A]}),m.push(A);var E=e.fetch().text;if(E==="&"){if(d&&m.length===d){if(c||o)throw new ie("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(E==="\\end"){_(),m.length===1&&A.type==="styling"&&A.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),y.length0&&(x+=.25),c.push({pos:x,isDashed:lt[tt]})}for(_(s[0]),r=0;r0&&(W+=v,Rlt))for(r=0;r=o)){var Ee=void 0;(i>0||t.hskipBeforeAndAfter)&&(Ee=Pe.deflt(C.pregap,f),Ee!==0&&(Te=j.makeSpan(["arraycolsep"],[]),Te.style.width=he(Ee),fe.push(Te)));var J=[];for(r=0;r0){for(var Ae=j.makeLineSpan("hline",n,u),ft=j.makeLineSpan("hdashline",n,u),et=[{type:"elem",elem:l,shift:0}];c.length>0;){var $e=c.pop(),ct=$e.pos-K;$e.isDashed?et.push({type:"elem",elem:ft,shift:ct}):et.push({type:"elem",elem:Ae,shift:ct})}l=j.makeVList({positionType:"individualShift",children:et},n)}if(Y.length===0)return j.makeSpan(["mord"],[l],n);var de=j.makeVList({positionType:"individualShift",children:Y},n);return de=j.makeSpan(["tag"],[de],n),j.makeFragment([l,de])},nW={c:"center ",l:"left ",r:"right "},di=function(t,n){for(var r=[],i=new te.MathNode("mtd",[],["mtr-glue"]),a=new te.MathNode("mtd",[],["mml-eqn-num"]),s=0;s0){var m=t.cols,h="",w=!1,y=0,v=m.length;m[0].type==="separator"&&(f+="top ",y=1),m[m.length-1].type==="separator"&&(f+="bottom ",v-=1);for(var x=y;x0?"left ":"",f+=B[B.length-1].length>0?"right ":"";for(var q=1;q-1?"alignat":"align",a=t.envName==="split",s=Ia(t.parser,{cols:r,addJot:!0,autoTag:a?void 0:ky(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var u="",d=0;d0&&p&&(w=1),r[m]={type:"align",align:h,pregap:w,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};ci({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Ih(t[0]),r=n?[t[0]]:Ve(t[0],"ordgroup").body,i=r.map(function(s){var o=yy(s),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new ie("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Ia(e.parser,a,Sy(e.envName))},htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,"lcr".indexOf(n)===-1)throw new ie("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var a=Ia(e.parser,r,Sy(e.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=Ia(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Ih(t[0]),r=n?[t[0]]:Ve(t[0],"ordgroup").body,i=r.map(function(s){var o=yy(s),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new ie("Unknown column alignment: "+l,s)});if(i.length>1)throw new ie("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=Ia(e.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new ie("{subarray} can contain only one column");return a},htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=Ia(e.parser,t,Sy(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:i8,htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Pe.contains(["gather","gather*"],e.envName)&&Ph(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ky(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Ia(e.parser,t,"display")},htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:i8,htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Ph(e);var t={autoTag:ky(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Ia(e.parser,t,"display")},htmlBuilder:ui,mathmlBuilder:di});ci({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Ph(e),jH(e.parser)},htmlBuilder:ui,mathmlBuilder:di});T("\\nonumber","\\gdef\\@eqnsw{0}");T("\\notag","\\nonumber");me({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new ie(e.funcName+" valid only within array environment")}});var E2=n8;me({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!=="ordgroup")throw new ie("Invalid environment name",i);for(var a="",s=0;s{var n=e.font,r=t.withFont(n);return at(e.body,r)},s8=(e,t)=>{var n=e.font,r=t.withFont(n);return gt(e.body,r)},T2={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};me({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=i0(t[0]),a=r;return a in T2&&(a=T2[a]),{type:"font",mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:a8,mathmlBuilder:s8});me({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=Pe.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Dh(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}});me({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,s=n.parseExpression(!0,i),o="math"+r.slice(1);return{type:"font",mode:a,font:o,body:{type:"ordgroup",mode:n.mode,body:s}}},htmlBuilder:a8,mathmlBuilder:s8});var o8=(e,t)=>{var n=t;return e==="display"?n=n.id>=De.SCRIPT.id?n.text():De.DISPLAY:e==="text"&&n.size===De.DISPLAY.size?n=De.TEXT:e==="script"?n=De.SCRIPT:e==="scriptscript"&&(n=De.SCRIPTSCRIPT),n},_y=(e,t)=>{var n=o8(e.size,t.style),r=n.fracNum(),i=n.fracDen(),a;a=t.havingStyle(r);var s=at(e.numer,a,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height0?m=3*f:m=7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var w;if(u){var v=t.fontMetrics().axisHeight;p-s.depth-(v+.5*d){var n=new te.MathNode("mfrac",[gt(e.numer,t),gt(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=Lt(e.barSize,t);n.setAttribute("linethickness",he(r))}var i=o8(e.size,t.style);if(i.size!==t.style.size){n=new te.MathNode("mstyle",[n]);var a=i.size===De.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",a),n.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new te.MathNode("mo",[new te.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(n),e.rightDelim!=null){var l=new te.MathNode("mo",[new te.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return my(s)}return n};me({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],s,o=null,l=null,c="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:_y,mathmlBuilder:Ey});me({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});me({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:r}}});var C2=["display","text","script","scriptscript"],A2=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};me({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=i0(t[0]),s=a.type==="atom"&&a.family==="open"?A2(a.text):null,o=i0(t[1]),l=o.type==="atom"&&o.family==="close"?A2(o.text):null,c=Ve(t[2],"size"),u,d=null;c.isBlank?u=!0:(d=c.value,u=d.number>0);var f="auto",p=t[3];if(p.type==="ordgroup"){if(p.body.length>0){var m=Ve(p.body[0],"textord");f=C2[Number(m.text)]}}else p=Ve(p,"textord"),f=C2[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:s,rightDelim:l,size:f}},htmlBuilder:_y,mathmlBuilder:Ey});me({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ve(t[0],"size").value,token:i}}});me({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=Iq(Ve(t[1],"infix").size),s=t[2],o=a.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:_y,mathmlBuilder:Ey});var l8=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?at(e.sup,t.havingStyle(n.sup()),t):at(e.sub,t.havingStyle(n.sub()),t),i=Ve(e.base,"horizBrace")):i=Ve(e,"horizBrace");var a=at(i.base,t.havingBaseStyle(De.DISPLAY)),s=$i.svgSpan(i,t),o;if(i.isOver?(o=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t),o.children[0].children[0].children[1].classes.push("svg-align")):(o=j.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t),o.children[0].children[0].children[0].classes.push("svg-align")),r){var l=j.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t);i.isOver?o=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):o=j.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return j.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t)},rW=(e,t)=>{var n=$i.mathMLnode(e.label);return new te.MathNode(e.isOver?"mover":"munder",[gt(e.base,t),n])};me({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:l8,mathmlBuilder:rW});me({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=Ve(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Wt(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=rn(e.body,t,!1);return j.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ta(e.body,t);return n instanceof ur||(n=new ur("mrow",[n])),n.setAttribute("href",e.href),n}});me({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=Ve(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:n,funcName:r,token:i}=e,a=Ve(t[0],"raw").string,s=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(r){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var c=a.split(","),u=0;u{var n=rn(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=j.makeSpan(r,n,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Ta(e.body,t)});me({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Wt(t[0]),mathml:Wt(t[1])}},htmlBuilder:(e,t)=>{var n=rn(e.html,t,!1);return j.makeFragment(n)},mathmlBuilder:(e,t)=>Ta(e.mathml,t)});var lp=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new ie("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!Ck(r))throw new ie("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};me({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(n[0])for(var l=Ve(n[0],"raw").string,c=l.split(","),u=0;u{var n=Lt(e.height,t),r=0;e.totalheight.number>0&&(r=Lt(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Lt(e.width,t));var a={height:he(n+r)};i>0&&(a.width=he(i)),r>0&&(a.verticalAlign=he(-r));var s=new rH(e.src,e.alt,a);return s.height=n,s.depth=r,s},mathmlBuilder:(e,t)=>{var n=new te.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=Lt(e.height,t),i=0;if(e.totalheight.number>0&&(i=Lt(e.totalheight,t)-r,n.setAttribute("valign",he(-i))),n.setAttribute("height",he(r+i)),e.width.number>0){var a=Lt(e.width,t);n.setAttribute("width",he(a))}return n.setAttribute("src",e.src),n}});me({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=Ve(t[0],"size");if(n.settings.strict){var a=r[1]==="m",s=i.value.unit==="mu";a?(s||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+i.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return j.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=Lt(e.dimension,t);return new te.SpaceNode(n)}});me({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=j.makeSpan([],[at(e.body,t)]),n=j.makeSpan(["inner"],[n],t)):n=j.makeSpan(["inner"],[at(e.body,t)]);var r=j.makeSpan(["fix"],[]),i=j.makeSpan([e.alignment],[n,r],t),a=j.makeSpan(["strut"]);return a.style.height=he(i.height+i.depth),i.depth&&(a.style.verticalAlign=he(-i.depth)),i.children.unshift(a),i=j.makeSpan(["thinbox"],[i],t),j.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new te.MathNode("mpadded",[gt(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});me({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var a=n==="\\("?"\\)":"$",s=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:s}}});me({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new ie("Mismatched "+e.funcName)}});var N2=(e,t)=>{switch(t.style.size){case De.DISPLAY.size:return e.display;case De.TEXT.size:return e.text;case De.SCRIPT.size:return e.script;case De.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};me({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Wt(t[0]),text:Wt(t[1]),script:Wt(t[2]),scriptscript:Wt(t[3])}},htmlBuilder:(e,t)=>{var n=N2(e,t),r=rn(n,t,!1);return j.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=N2(e,t);return Ta(n,t)}});var c8=(e,t,n,r,i,a,s)=>{e=j.makeSpan([],[e]);var o=n&&Pe.isCharacterBox(n),l,c;if(t){var u=at(t,r.havingStyle(i.sup()),r);c={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=at(n,r.havingStyle(i.sub()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(c&&l){var p=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s;f=j.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:he(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:he(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var m=e.height-s;f=j.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:he(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},r)}else if(c){var h=e.depth+s;f=j.makeVList({positionType:"bottom",positionData:h,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:he(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;var w=[f];if(l&&a!==0&&!o){var y=j.makeSpan(["mspace"],[],r);y.style.marginRight=he(a),w.unshift(y)}return j.makeSpan(["mop","op-limits"],w,r)},u8=["\\smallint"],qo=(e,t)=>{var n,r,i=!1,a;e.type==="supsub"?(n=e.sup,r=e.sub,a=Ve(e.base,"op"),i=!0):a=Ve(e,"op");var s=t.style,o=!1;s.size===De.DISPLAY.size&&a.symbol&&!Pe.contains(u8,a.name)&&(o=!0);var l;if(a.symbol){var c=o?"Size2-Regular":"Size1-Regular",u="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(u=a.name.slice(1),a.name=u==="oiint"?"\\iint":"\\iiint"),l=j.makeSymbol(a.name,c,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u.length>0){var d=l.italic,f=j.staticSvg(u+"Size"+(o?"2":"1"),t);l=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:f,shift:o?.08:0}]},t),a.name="\\"+u,l.classes.unshift("mop"),l.italic=d}}else if(a.body){var p=rn(a.body,t,!0);p.length===1&&p[0]instanceof yr?(l=p[0],l.classes[0]="mop"):l=j.makeSpan(["mop"],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new ur("mo",[br(e.name,e.mode)]),Pe.contains(u8,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ur("mo",jn(e.body,t));else{n=new ur("mi",[new Nl(e.name.slice(1))]);var r=new ur("mo",[br("⁡","text")]);e.parentIsSupSub?n=new ur("mrow",[n,r]):n=Bk([n,r])}return n},iW={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};me({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=iW[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:qo,mathmlBuilder:Ic});me({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Wt(r)}},htmlBuilder:qo,mathmlBuilder:Ic});var aW={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};me({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:qo,mathmlBuilder:Ic});me({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:qo,mathmlBuilder:Ic});me({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=aW[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:qo,mathmlBuilder:Ic});var d8=(e,t)=>{var n,r,i=!1,a;e.type==="supsub"?(n=e.sup,r=e.sub,a=Ve(e.base,"operatorname"),i=!0):a=Ve(e,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(d=>{var f=d.text;return typeof f=="string"?{type:"textord",mode:d.mode,text:f}:d}),l=rn(o,t.withFont("mathrm"),!0),c=0;c{for(var n=jn(e.body,t.withFont("mathrm")),r=!0,i=0;iu.toText()).join("");n=[new te.TextNode(o)]}var l=new te.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new te.MathNode("mo",[br("⁡","text")]);return e.parentIsSupSub?new te.MathNode("mrow",[l,c]):te.newDocumentFragment([l,c])};me({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:Wt(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:d8,mathmlBuilder:sW});T("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");ws({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?j.makeFragment(rn(e.body,t,!1)):j.makeSpan(["mord"],rn(e.body,t,!0),t)},mathmlBuilder(e,t){return Ta(e.body,t,!0)}});me({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=at(e.body,t.havingCrampedStyle()),r=j.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return j.makeSpan(["mord","overline"],[a],t)},mathmlBuilder(e,t){var n=new te.MathNode("mo",[new te.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new te.MathNode("mover",[gt(e.body,t),n]);return r.setAttribute("accent","true"),r}});me({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Wt(r)}},htmlBuilder:(e,t)=>{var n=rn(e.body,t.withPhantom(),!1);return j.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=jn(e.body,t);return new te.MathNode("mphantom",n)}});me({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=j.makeSpan([],[at(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=jn(Wt(e.body),t),r=new te.MathNode("mphantom",n),i=new te.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});me({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=j.makeSpan(["inner"],[at(e.body,t.withPhantom())]),r=j.makeSpan(["fix"],[]);return j.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=jn(Wt(e.body),t),r=new te.MathNode("mphantom",n),i=new te.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}});me({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=Ve(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=at(e.body,t),r=Lt(e.dy,t);return j.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new te.MathNode("mpadded",[gt(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});me({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});me({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],a=Ve(t[0],"size"),s=Ve(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&Ve(i,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var n=j.makeSpan(["mord","rule"],[],t),r=Lt(e.width,t),i=Lt(e.height,t),a=e.shift?Lt(e.shift,t):0;return n.style.borderRightWidth=he(r),n.style.borderTopWidth=he(i),n.style.bottom=he(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Lt(e.width,t),r=Lt(e.height,t),i=e.shift?Lt(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new te.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",he(n)),s.setAttribute("height",he(r));var o=new te.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",he(i)):(o.setAttribute("height",he(i)),o.setAttribute("depth",he(-i))),o.setAttribute("voffset",he(i)),o}});function h8(e,t,n){for(var r=rn(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var n=t.havingSize(e.size);return h8(e.body,n,t)};me({type:"sizing",names:M2,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:M2.indexOf(r)+1,body:a}},htmlBuilder:oW,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=jn(e.body,n),i=new te.MathNode("mstyle",r);return i.setAttribute("mathsize",he(n.sizeMultiplier)),i}});me({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,s=n[0]&&Ve(n[0],"ordgroup");if(s)for(var o="",l=0;l{var n=j.makeSpan([],[at(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new te.MathNode("mpadded",[gt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});me({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:"sqrt",mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=at(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=j.wrapFragment(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,a=i;t.style.idn.height+n.depth+s&&(s=(s+d-n.height-n.depth)/2);var f=l.height-n.height-s-c;n.style.paddingLeft=he(u);var p=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+f)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var m=t.havingStyle(De.SCRIPTSCRIPT),h=at(e.index,m,t),w=.6*(p.height-p.depth),y=j.makeVList({positionType:"shift",positionData:-w,children:[{type:"elem",elem:h}]},t),v=j.makeSpan(["root"],[y]);return j.makeSpan(["mord","sqrt"],[v,p],t)}else return j.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new te.MathNode("mroot",[gt(n,t),gt(r,t)]):new te.MathNode("msqrt",[gt(n,t)])}});var R2={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT};me({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),s=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(e,t){var n=R2[e.style],r=t.havingStyle(n).withFont("");return h8(e.body,r,t)},mathmlBuilder(e,t){var n=R2[e.style],r=t.havingStyle(n),i=jn(e.body,r),a=new te.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});var lW=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===De.DISPLAY.size||r.alwaysHandleSupSub);return i?qo:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(n.style.size===De.DISPLAY.size||r.limits);return a?d8:null}else{if(r.type==="accent")return Pe.isCharacterBox(r.base)?by:null;if(r.type==="horizBrace"){var s=!t.sub;return s===r.isOver?l8:null}else return null}else return null};ws({type:"supsub",htmlBuilder(e,t){var n=lW(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,s=at(r,t),o,l,c=t.fontMetrics(),u=0,d=0,f=r&&Pe.isCharacterBox(r);if(i){var p=t.havingStyle(t.style.sup());o=at(i,p,t),f||(u=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());l=at(a,m,t),f||(d=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h;t.style===De.DISPLAY?h=c.sup1:t.style.cramped?h=c.sup3:h=c.sup2;var w=t.sizeMultiplier,y=he(.5/c.ptPerEm/w),v=null;if(l){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(s instanceof yr||x)&&(v=he(-s.italic))}var _;if(o&&l){u=Math.max(u,h,o.depth+.25*c.xHeight),d=Math.max(d,c.sub2);var A=c.defaultRuleThickness,E=4*A;if(u-o.depth-(l.height-d)0&&(u+=R,d-=R)}var B=[{type:"elem",elem:l,shift:d,marginRight:y,marginLeft:v},{type:"elem",elem:o,shift:-u,marginRight:y}];_=j.makeVList({positionType:"individualShift",children:B},t)}else if(l){d=Math.max(d,c.sub1,l.height-.8*c.xHeight);var q=[{type:"elem",elem:l,marginLeft:v,marginRight:y}];_=j.makeVList({positionType:"shift",positionData:d,children:q},t)}else if(o)u=Math.max(u,h,o.depth+.25*c.xHeight),_=j.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:o,marginRight:y}]},t);else throw new Error("supsub must have either sup or sub.");var G=Km(s,"right")||"mord";return j.makeSpan([G],[s,j.makeSpan(["msupsub"],[_])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[gt(e.base,t)];e.sub&&a.push(gt(e.sub,t)),e.sup&&a.push(gt(e.sup,t));var s;if(n)s=r?"mover":"munder";else if(e.sub)if(e.sup){var c=e.base;c&&c.type==="op"&&c.limits&&t.style===De.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===De.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===De.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===De.DISPLAY)?s="munder":s="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===De.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===De.DISPLAY)?s="mover":s="msup"}return new te.MathNode(s,a)}});ws({type:"atom",htmlBuilder(e,t){return j.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new te.MathNode("mo",[br(e.text,e.mode)]);if(e.family==="bin"){var r=gy(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var f8={mi:"italic",mn:"normal",mtext:"normal"};ws({type:"mathord",htmlBuilder(e,t){return j.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new te.MathNode("mi",[br(e.text,e.mode,t)]),r=gy(e,t)||"italic";return r!==f8[n.type]&&n.setAttribute("mathvariant",r),n}});ws({type:"textord",htmlBuilder(e,t){return j.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=br(e.text,e.mode,t),r=gy(e,t)||"normal",i;return e.mode==="text"?i=new te.MathNode("mtext",[n]):/[0-9]/.test(e.text)?i=new te.MathNode("mn",[n]):e.text==="\\prime"?i=new te.MathNode("mo",[n]):i=new te.MathNode("mi",[n]),r!==f8[i.type]&&i.setAttribute("mathvariant",r),i}});var cp={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},up={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ws({type:"spacing",htmlBuilder(e,t){if(up.hasOwnProperty(e.text)){var n=up[e.text].className||"";if(e.mode==="text"){var r=j.makeOrd(e,t,"textord");return r.classes.push(n),r}else return j.makeSpan(["mspace",n],[j.mathsym(e.text,e.mode,t)],t)}else{if(cp.hasOwnProperty(e.text))return j.makeSpan(["mspace",cp[e.text]],[],t);throw new ie('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(up.hasOwnProperty(e.text))n=new te.MathNode("mtext",[new te.TextNode(" ")]);else{if(cp.hasOwnProperty(e.text))return new te.MathNode("mspace");throw new ie('Unknown type of space "'+e.text+'"')}return n}});var O2=()=>{var e=new te.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};ws({type:"tag",mathmlBuilder(e,t){var n=new te.MathNode("mtable",[new te.MathNode("mtr",[O2(),new te.MathNode("mtd",[Ta(e.body,t)]),O2(),new te.MathNode("mtd",[Ta(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var I2={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},D2={"\\textbf":"textbf","\\textmd":"textmd"},cW={"\\textit":"textit","\\textup":"textup"},L2=(e,t)=>{var n=e.font;return n?I2[n]?t.withTextFontFamily(I2[n]):D2[n]?t.withTextFontWeight(D2[n]):t.withTextFontShape(cW[n]):t};me({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:Wt(i),font:r}},htmlBuilder(e,t){var n=L2(e,t),r=rn(e.body,n,!0);return j.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=L2(e,t);return Ta(e.body,n)}});me({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=at(e.body,t),r=j.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=j.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return j.makeSpan(["mord","underline"],[a],t)},mathmlBuilder(e,t){var n=new te.MathNode("mo",[new te.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new te.MathNode("munder",[gt(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});me({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=at(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return j.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){return new te.MathNode("mpadded",[gt(e.body,t)],["vcenter"])}});me({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new ie("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=P2(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),oa=Pk,p8=`[ \r + ]`,uW="\\\\[a-zA-Z@]+",dW="\\\\[^\uD800-\uDFFF]",hW="("+uW+")"+p8+"*",fW=`\\\\( +|[ \r ]+ +?)[ \r ]*`,Zm="[̀-ͯ]",pW=new RegExp(Zm+"+$"),mW="("+p8+"+)|"+(fW+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Zm+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Zm+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+hW)+("|"+dW+")");class z2{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(mW,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new ri("EOF",new Vn(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new ie("Unexpected character: '"+t[n]+"'",new ri(t[n],new Vn(this,n,n+1)));var i=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.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=a+1,this.lex()}return new ri(i,new Vn(this,n,this.tokenRegex.lastIndex))}}class gW{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ie("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,r){if(r===void 0&&(r=!1),r){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var yW=r8;T("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});T("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});T("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});T("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});T("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});T("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");T("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var B2={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};T("\\char",function(e){var t=e.popToken(),n,r="";if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new ie("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=B2[t.text],r==null||r>=n)throw new ie("Invalid base-"+n+" digit "+t.text);for(var i;(i=B2[e.future().text])!=null&&i{var r=e.consumeArg().tokens;if(r.length!==1)throw new ie("\\newcommand's first argument must be a macro name");var i=r[0].text,a=e.isDefined(i);if(a&&!t)throw new ie("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!n)throw new ie("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(r=e.consumeArg().tokens,r.length===1&&r[0].text==="["){for(var o="",l=e.expandNextToken();l.text!=="]"&&l.text!=="EOF";)o+=l.text,l=e.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new ie("Invalid number of arguments: "+o);s=parseInt(o),r=e.consumeArg().tokens}return e.macros.set(i,{tokens:r,numArgs:s}),""};T("\\newcommand",e=>Ty(e,!1,!0));T("\\renewcommand",e=>Ty(e,!0,!1));T("\\providecommand",e=>Ty(e,!0,!0));T("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});T("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});T("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),oa[n],vt.math[n],vt.text[n]),""});T("\\bgroup","{");T("\\egroup","}");T("~","\\nobreakspace");T("\\lq","`");T("\\rq","'");T("\\aa","\\r a");T("\\AA","\\r A");T("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");T("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");T("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");T("ℬ","\\mathscr{B}");T("ℰ","\\mathscr{E}");T("ℱ","\\mathscr{F}");T("ℋ","\\mathscr{H}");T("ℐ","\\mathscr{I}");T("ℒ","\\mathscr{L}");T("ℳ","\\mathscr{M}");T("ℛ","\\mathscr{R}");T("ℭ","\\mathfrak{C}");T("ℌ","\\mathfrak{H}");T("ℨ","\\mathfrak{Z}");T("\\Bbbk","\\Bbb{k}");T("·","\\cdotp");T("\\llap","\\mathllap{\\textrm{#1}}");T("\\rlap","\\mathrlap{\\textrm{#1}}");T("\\clap","\\mathclap{\\textrm{#1}}");T("\\mathstrut","\\vphantom{(}");T("\\underbar","\\underline{\\text{#1}}");T("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');T("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");T("\\ne","\\neq");T("≠","\\neq");T("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");T("∉","\\notin");T("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");T("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");T("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");T("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");T("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");T("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");T("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");T("⟂","\\perp");T("‼","\\mathclose{!\\mkern-0.8mu!}");T("∌","\\notni");T("⌜","\\ulcorner");T("⌝","\\urcorner");T("⌞","\\llcorner");T("⌟","\\lrcorner");T("©","\\copyright");T("®","\\textregistered");T("️","\\textregistered");T("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');T("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');T("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');T("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');T("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");T("⋮","\\vdots");T("\\varGamma","\\mathit{\\Gamma}");T("\\varDelta","\\mathit{\\Delta}");T("\\varTheta","\\mathit{\\Theta}");T("\\varLambda","\\mathit{\\Lambda}");T("\\varXi","\\mathit{\\Xi}");T("\\varPi","\\mathit{\\Pi}");T("\\varSigma","\\mathit{\\Sigma}");T("\\varUpsilon","\\mathit{\\Upsilon}");T("\\varPhi","\\mathit{\\Phi}");T("\\varPsi","\\mathit{\\Psi}");T("\\varOmega","\\mathit{\\Omega}");T("\\substack","\\begin{subarray}{c}#1\\end{subarray}");T("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");T("\\boxed","\\fbox{$\\displaystyle{#1}$}");T("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");T("\\implies","\\DOTSB\\;\\Longrightarrow\\;");T("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var F2={",":"\\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"};T("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in F2?t=F2[n]:(n.slice(0,4)==="\\not"||n in vt.math&&Pe.contains(["bin","rel"],vt.math[n].group))&&(t="\\dotsb"),t});var Cy={")":!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};T("\\dotso",function(e){var t=e.future().text;return t in Cy?"\\ldots\\,":"\\ldots"});T("\\dotsc",function(e){var t=e.future().text;return t in Cy&&t!==","?"\\ldots\\,":"\\ldots"});T("\\cdots",function(e){var t=e.future().text;return t in Cy?"\\@cdots\\,":"\\@cdots"});T("\\dotsb","\\cdots");T("\\dotsm","\\cdots");T("\\dotsi","\\!\\cdots");T("\\dotsx","\\ldots\\,");T("\\DOTSI","\\relax");T("\\DOTSB","\\relax");T("\\DOTSX","\\relax");T("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");T("\\,","\\tmspace+{3mu}{.1667em}");T("\\thinspace","\\,");T("\\>","\\mskip{4mu}");T("\\:","\\tmspace+{4mu}{.2222em}");T("\\medspace","\\:");T("\\;","\\tmspace+{5mu}{.2777em}");T("\\thickspace","\\;");T("\\!","\\tmspace-{3mu}{.1667em}");T("\\negthinspace","\\!");T("\\negmedspace","\\tmspace-{4mu}{.2222em}");T("\\negthickspace","\\tmspace-{5mu}{.277em}");T("\\enspace","\\kern.5em ");T("\\enskip","\\hskip.5em\\relax");T("\\quad","\\hskip1em\\relax");T("\\qquad","\\hskip2em\\relax");T("\\tag","\\@ifstar\\tag@literal\\tag@paren");T("\\tag@paren","\\tag@literal{({#1})}");T("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ie("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});T("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");T("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");T("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");T("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");T("\\newline","\\\\\\relax");T("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var m8=he(Zr["Main-Regular"]["T".charCodeAt(0)][1]-.7*Zr["Main-Regular"]["A".charCodeAt(0)][1]);T("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+m8+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");T("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+m8+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");T("\\hspace","\\@ifstar\\@hspacer\\@hspace");T("\\@hspace","\\hskip #1\\relax");T("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");T("\\ordinarycolon",":");T("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");T("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');T("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');T("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');T("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');T("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');T("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');T("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');T("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');T("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');T("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');T("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');T("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');T("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');T("∷","\\dblcolon");T("∹","\\eqcolon");T("≔","\\coloneqq");T("≕","\\eqqcolon");T("⩴","\\Coloneqq");T("\\ratio","\\vcentcolon");T("\\coloncolon","\\dblcolon");T("\\colonequals","\\coloneqq");T("\\coloncolonequals","\\Coloneqq");T("\\equalscolon","\\eqqcolon");T("\\equalscoloncolon","\\Eqqcolon");T("\\colonminus","\\coloneq");T("\\coloncolonminus","\\Coloneq");T("\\minuscolon","\\eqcolon");T("\\minuscoloncolon","\\Eqcolon");T("\\coloncolonapprox","\\Colonapprox");T("\\coloncolonsim","\\Colonsim");T("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");T("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");T("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");T("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");T("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");T("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");T("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");T("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");T("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");T("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");T("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");T("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");T("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");T("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");T("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");T("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");T("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");T("\\nleqq","\\html@mathml{\\@nleqq}{≰}");T("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");T("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");T("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");T("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");T("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");T("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");T("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");T("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");T("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");T("\\imath","\\html@mathml{\\@imath}{ı}");T("\\jmath","\\html@mathml{\\@jmath}{ȷ}");T("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");T("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");T("⟦","\\llbracket");T("⟧","\\rrbracket");T("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");T("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");T("⦃","\\lBrace");T("⦄","\\rBrace");T("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");T("⦵","\\minuso");T("\\darr","\\downarrow");T("\\dArr","\\Downarrow");T("\\Darr","\\Downarrow");T("\\lang","\\langle");T("\\rang","\\rangle");T("\\uarr","\\uparrow");T("\\uArr","\\Uparrow");T("\\Uarr","\\Uparrow");T("\\N","\\mathbb{N}");T("\\R","\\mathbb{R}");T("\\Z","\\mathbb{Z}");T("\\alef","\\aleph");T("\\alefsym","\\aleph");T("\\Alpha","\\mathrm{A}");T("\\Beta","\\mathrm{B}");T("\\bull","\\bullet");T("\\Chi","\\mathrm{X}");T("\\clubs","\\clubsuit");T("\\cnums","\\mathbb{C}");T("\\Complex","\\mathbb{C}");T("\\Dagger","\\ddagger");T("\\diamonds","\\diamondsuit");T("\\empty","\\emptyset");T("\\Epsilon","\\mathrm{E}");T("\\Eta","\\mathrm{H}");T("\\exist","\\exists");T("\\harr","\\leftrightarrow");T("\\hArr","\\Leftrightarrow");T("\\Harr","\\Leftrightarrow");T("\\hearts","\\heartsuit");T("\\image","\\Im");T("\\infin","\\infty");T("\\Iota","\\mathrm{I}");T("\\isin","\\in");T("\\Kappa","\\mathrm{K}");T("\\larr","\\leftarrow");T("\\lArr","\\Leftarrow");T("\\Larr","\\Leftarrow");T("\\lrarr","\\leftrightarrow");T("\\lrArr","\\Leftrightarrow");T("\\Lrarr","\\Leftrightarrow");T("\\Mu","\\mathrm{M}");T("\\natnums","\\mathbb{N}");T("\\Nu","\\mathrm{N}");T("\\Omicron","\\mathrm{O}");T("\\plusmn","\\pm");T("\\rarr","\\rightarrow");T("\\rArr","\\Rightarrow");T("\\Rarr","\\Rightarrow");T("\\real","\\Re");T("\\reals","\\mathbb{R}");T("\\Reals","\\mathbb{R}");T("\\Rho","\\mathrm{P}");T("\\sdot","\\cdot");T("\\sect","\\S");T("\\spades","\\spadesuit");T("\\sub","\\subset");T("\\sube","\\subseteq");T("\\supe","\\supseteq");T("\\Tau","\\mathrm{T}");T("\\thetasym","\\vartheta");T("\\weierp","\\wp");T("\\Zeta","\\mathrm{Z}");T("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");T("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");T("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");T("\\bra","\\mathinner{\\langle{#1}|}");T("\\ket","\\mathinner{|{#1}\\rangle}");T("\\braket","\\mathinner{\\langle{#1}\\rangle}");T("\\Bra","\\left\\langle#1\\right|");T("\\Ket","\\left|#1\\right\\rangle");var g8=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=d=>f=>{e&&(f.macros.set("|",s),i.length&&f.macros.set("\\|",o));var p=d;if(!d&&i.length){var m=f.future();m.text==="|"&&(f.popToken(),p=!0)}return{tokens:p?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...a,...c,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};T("\\bra@ket",g8(!1));T("\\bra@set",g8(!0));T("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");T("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");T("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");T("\\angln","{\\angl n}");T("\\blue","\\textcolor{##6495ed}{#1}");T("\\orange","\\textcolor{##ffa500}{#1}");T("\\pink","\\textcolor{##ff00af}{#1}");T("\\red","\\textcolor{##df0030}{#1}");T("\\green","\\textcolor{##28ae7b}{#1}");T("\\gray","\\textcolor{gray}{#1}");T("\\purple","\\textcolor{##9d38bd}{#1}");T("\\blueA","\\textcolor{##ccfaff}{#1}");T("\\blueB","\\textcolor{##80f6ff}{#1}");T("\\blueC","\\textcolor{##63d9ea}{#1}");T("\\blueD","\\textcolor{##11accd}{#1}");T("\\blueE","\\textcolor{##0c7f99}{#1}");T("\\tealA","\\textcolor{##94fff5}{#1}");T("\\tealB","\\textcolor{##26edd5}{#1}");T("\\tealC","\\textcolor{##01d1c1}{#1}");T("\\tealD","\\textcolor{##01a995}{#1}");T("\\tealE","\\textcolor{##208170}{#1}");T("\\greenA","\\textcolor{##b6ffb0}{#1}");T("\\greenB","\\textcolor{##8af281}{#1}");T("\\greenC","\\textcolor{##74cf70}{#1}");T("\\greenD","\\textcolor{##1fab54}{#1}");T("\\greenE","\\textcolor{##0d923f}{#1}");T("\\goldA","\\textcolor{##ffd0a9}{#1}");T("\\goldB","\\textcolor{##ffbb71}{#1}");T("\\goldC","\\textcolor{##ff9c39}{#1}");T("\\goldD","\\textcolor{##e07d10}{#1}");T("\\goldE","\\textcolor{##a75a05}{#1}");T("\\redA","\\textcolor{##fca9a9}{#1}");T("\\redB","\\textcolor{##ff8482}{#1}");T("\\redC","\\textcolor{##f9685d}{#1}");T("\\redD","\\textcolor{##e84d39}{#1}");T("\\redE","\\textcolor{##bc2612}{#1}");T("\\maroonA","\\textcolor{##ffbde0}{#1}");T("\\maroonB","\\textcolor{##ff92c6}{#1}");T("\\maroonC","\\textcolor{##ed5fa6}{#1}");T("\\maroonD","\\textcolor{##ca337c}{#1}");T("\\maroonE","\\textcolor{##9e034e}{#1}");T("\\purpleA","\\textcolor{##ddd7ff}{#1}");T("\\purpleB","\\textcolor{##c6b9fc}{#1}");T("\\purpleC","\\textcolor{##aa87ff}{#1}");T("\\purpleD","\\textcolor{##7854ab}{#1}");T("\\purpleE","\\textcolor{##543b78}{#1}");T("\\mintA","\\textcolor{##f5f9e8}{#1}");T("\\mintB","\\textcolor{##edf2df}{#1}");T("\\mintC","\\textcolor{##e0e5cc}{#1}");T("\\grayA","\\textcolor{##f6f7f7}{#1}");T("\\grayB","\\textcolor{##f0f1f2}{#1}");T("\\grayC","\\textcolor{##e3e5e6}{#1}");T("\\grayD","\\textcolor{##d6d8da}{#1}");T("\\grayE","\\textcolor{##babec2}{#1}");T("\\grayF","\\textcolor{##888d93}{#1}");T("\\grayG","\\textcolor{##626569}{#1}");T("\\grayH","\\textcolor{##3b3e40}{#1}");T("\\grayI","\\textcolor{##21242c}{#1}");T("\\kaBlue","\\textcolor{##314453}{#1}");T("\\kaGreen","\\textcolor{##71B307}{#1}");var y8={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class bW{constructor(t,n,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=n,this.expansionCount=0,this.feed(t),this.macros=new gW(yW,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new z2(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,r,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:n,end:r}=this.consumeArg());return this.pushToken(new ri("EOF",r.loc)),this.pushTokens(i),n.range(r,"")}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),n.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new ie("Extra }",a)}else if(a.text==="EOF")throw new ie("Unexpected end of input in a macro argument, expected '"+(t&&r?t[o]:"}")+"'",a);if(t&&r)if((s===0||s===1&&t[o]==="{")&&a.text===t[o]){if(++o,o===t.length){n.splice(-o,o);break}}else o=0}while(s!==0||r);return i.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:i,end:a}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new ie("The length of delimiters doesn't match the number of args!");for(var r=n[0],i=0;ithis.settings.maxExpand)throw new ie("Too many expansions: infinite loop or need to increase maxExpand setting");var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new ie("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new ie("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new ri(t)]):void 0}expandTokens(t){var n=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),n.push(i)}return n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(r=>r.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var r=this.lexer.catcodes[t];if(r!=null&&r!==13)return}var i=typeof n=="function"?n(this):n;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var o=new z2(i,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var u={tokens:l,numArgs:a};return u}return i}isDefined(t){return this.macros.has(t)||oa.hasOwnProperty(t)||vt.math.hasOwnProperty(t)||vt.text.hasOwnProperty(t)||y8.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:oa.hasOwnProperty(t)&&!oa[t].primitive}}var $2=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Lu=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),dp={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},U2={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class cc{constructor(t,n){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 bW(t,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new ie("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new ri("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(t,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(cc.endOfExpression.indexOf(i.text)!==-1||n&&i.text===n||t&&oa[i.text]&&oa[i.text].infix)break;var a=this.parseAtom(n);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var o=vt[this.mode][n].group,l=Vn.range(t),c;if(sH.hasOwnProperty(o)){var u=o;c={type:"atom",mode:this.mode,family:u,loc:l,text:n}}else c={type:o,mode:this.mode,loc:l,text:n};s=c}else if(n.charCodeAt(0)>=128)this.settings.strict&&(Tk(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),s={type:"textord",mode:"text",loc:Vn.range(t),text:n};else return null;if(this.consume(),a)for(var d=0;ds&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function w8(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function SW(e,t){return q2(e,t.inConstruct,!0)&&!q2(e,t.notInConstruct,!1)}function q2(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r=c||u+1":""))+")"})}return d;function d(){let f=[],p,m,h;if((!t||i(o,l,c[c.length-1]||null))&&(f=zW(n(o,c)),f[0]===W2))return f;if(o.children&&f[0]!==LW)for(m=(r?o.children.length:-1)+a,h=c.concat(o);m>-1&&ml&&(l=c):c&&(l!==void 0&&l>-1&&o.push(` +`.repeat(l)||" "),l=-1,o.push(c))}return o.join("")}function S8(e,t,n){return e.type==="element"?HW(e,t,n):e.type==="text"?n.whitespace==="normal"?_8(e,n):WW(e):[]}function HW(e,t,n){const r=E8(e,n),i=e.children||[];let a=-1,s=[];if(jW(e))return s;let o,l;for(Jm(e)||X2(e)&&V2(t,e,X2)?l=` +`:UW(e)?(o=2,l=2):k8(e)&&(o=1,l=1);++a4&&n.slice(0,4)==="data"&&JW.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Z2,rV);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Z2.test(a)){let s=a.replace(eV,nV);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Oy}return new i(r,t)}function nV(e){return"-"+e.toLowerCase()}function rV(e){return e.charAt(1).toUpperCase()}const iV=T8([N8,A8,O8,I8,QW],"html"),aV=T8([N8,A8,O8,I8,ZW],"svg"),J2=/[#.]/g;function sV(e,t){const n=e||"",r={};let i=0,a,s;for(;i{BW(r,"element",a=>{const s=a.properties&&Array.isArray(a.properties.className)?a.properties.className:[],o=s.includes("math-inline"),l=s.includes("math-display");if(!o&&!l)return;const c=qW(a,{whitespace:"pre"});let u;try{u=j2.renderToString(c,iw({},t,{displayMode:l,throwOnError:!0}))}catch(f){const p=f,m=n?"fail":"message",h=[_V,p.name.toLowerCase()].join(":");if(i[m](p.message,a.position,h),p.name!=="ParseError"){a.children=[{type:"element",tagName:"span",properties:{className:["katex-error"],title:String(p),style:"color:"+(t.errorColor||"#cc0000")},children:[{type:"text",value:c}]}];return}u=j2.renderToString(c,iw({},t,{displayMode:l,throwOnError:!1,strict:"ignore"}))}const d=kV(u,{fragment:!0});a.children=d.children})}}const TV=P.div` + height: ${e=>e.theme.scale.scale10}; + background: #0a0c28; + @media screen and (max-width: 1024px) { + height: 414px; + } + @media screen and (max-width: 768px) { + height: 276px; + } +`,CV=P.main` + max-width: 1024px; + margin-top: -${e=>e.theme.scale.scale09}; + margin-bottom: ${e=>e.theme.scale.scale07}; + margin-inline: auto; + padding-inline: 64px; + // - - - + /* height: 400px; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 15px; + } + @media screen and (max-width: 1024px) { + margin-top: -252px; + } + @media screen and (max-width: 768px) { + margin-top: -168px; + padding-inline: 32px; + } +`,AV=P.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize8}; + /* line-height: ${e=>e.theme.font.lineHeight9}; */ + line-height: 1.4; + text-transform: capitalize; + /* word-break: break-all; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 34.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 23px; + } +`,z8=P.p` + margin-bottom: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize5}; + /* line-height: ${e=>e.theme.font.lineHeight5}; */ + line-height: 1.3; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + font-size: 18px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + font-size: 12px; + } +`,NV=P.a` + display: flex; + align-items: center; + margin-bottom: ${e=>e.theme.scale.scale04}; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + } +`,MV=P.img` + margin-right: 24px; + height: ${e=>e.theme.scale.scale06}; + width: ${e=>e.theme.scale.scale06}; + border: 2px solid ${e=>e.theme.color.neutral.gray01}; + border-radius: 50%; + @media screen and (max-width: 1024px) { + margin-right: 18px; + height: 60px; + width: 60px; + } + @media screen and (max-width: 768px) { + margin-right: 12px; + height: 60px; + width: 60px; + } +`,RV=P(z8)` + margin-bottom: 0; +`,OV=P.img` + width: 100%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border-radius: ${e=>e.theme.scale.scale02}; + /* height: 336px; */ + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + border-radius: 9px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + border-radius: 6px; + } +`,IV=P.div` + margin-bottom: ${e=>e.theme.scale.scale08}; + @media screen and (max-width: 1024px) { + margin-bottom: 156px; + } + @media screen and (max-width: 768px) { + margin-bottom: 104px; + } +`,DV=P.div``,LV=P.div` + text-align: center; + margin-bottom: ${e=>e.theme.scale.scale06}; + @media screen and (max-width: 1024px) { + margin-bottom: 60px; + } + @media screen and (max-width: 768px) { + margin-bottom: 40px; + } +`,PV=P.span` + padding-inline: ${e=>e.theme.scale.scale06}; + padding-bottom: ${e=>e.theme.scale.scale01}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize8}; + /* line-height: ${e=>e.theme.font.lineHeight8}; */ + line-height: 1.2; + text-transform: capitalize; + background-image: url(${Ra}); + background-clip: border-box; + background-repeat: no-repeat; + background-position: bottom 0 right 0; + background-size: 50%; + @media screen and (max-width: 768px) { + padding-inline: 60px; + padding-bottom: 6px; + font-size: 34.5px; + } +`,zV=P.ul` + display: flex; + flex-flow: wrap; + justify-content: space-between; + flex: 1; + margin-bottom: ${e=>e.theme.scale.scale04}; + @media screen and (max-width: 1024px) { + } + @media screen and (max-width: 768px) { + flex-direction: column; + + margin-bottom: 24px; + } +`,BV=P.li` + width: 48%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale03}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; + overflow: hidden; + @media screen and (max-width: 768px) { + width: 100%; + margin-bottom: 16px; + border-radius: 15px; + } +`,FV=P.img` + width: 100%; + height: ${e=>e.theme.scale.scale08}; + flex-direction: column; + @media screen and (max-width: 1024px) { + height: 156px; + } +`,$V=P.div` + padding: ${e=>e.theme.scale.scale03}; + // - - - + /* height: 100px; */ + @media screen and (max-width: 768px) { + padding: 15px; + } +`,UV=P.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + /* line-height: ${e=>e.theme.font.lineHeight4}; */ + line-height: 1.4; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-transform: capitalize; + @media screen and (max-width: 768px) { + margin-bottom: 15px; + font-size: 15px; + } +`,jV=P.p` + display: -webkit-box; + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + /* line-height: ${e=>e.theme.font.lineHeight3}; */ + line-height: 1.5; + word-break: break-all; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + text-overflow: ellipsis; + @media screen and (max-width: 768px) { + margin-bottom: 15px; + font-size: 12px; + } +`,qV=P(Ro)` + display: inline-block; + margin-bottom: ${e=>e.theme.scale.scale01}; + padding-block: ${e=>e.theme.scale.scale01}; + padding-inline: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize2}; + /* line-height: ${e=>e.theme.font.lineHeight2}; */ + line-height: 1.5; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 20px; + @media screen and (max-width: 768px) { + margin-bottom: 6px; + padding-block: 6px; + padding-inline: 24px; + font-size: 10.5px; + border-radius: 15px; + } +`,HV=P(Ro)` + display: block; + text-align: right; + color: #7680dd; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize4}; + /* line-height: ${e=>e.theme.font.lineHeight4}; */ + line-height: 1.4; + @media screen and (max-width: 768px) { + font-size: 15px; + } +`,pp=Object.assign({"/src/blog/2023-01-07-Curp:-Revisit-the-Consensus-Protocol.md":I5,"/src/blog/2023-02-19-Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness.md":D5,"/src/blog/2023-03-10-How-to-Elegantly-Organize-Async-Rust-Code.md":L5,"/src/blog/2023-04-19-Database-Isolation-Levels-and-MVCC.md":P5,"/src/blog/2023-05-21-The-design-and-Implementation-of-the-Xline-Persistent-Storage-Layer.md":z5,"/src/blog/2023-08-18-Introduction-to-CURP-Protocol.md":B5,"/src/blog/2023-09-23-Mechanism-and-Implementation-of-Lease.md":F5,"/src/blog/2023-11-01-Implementation-of-CURP-Server.md":$5}),WV=()=>{const{msg:e}=t1();ce.useEffect(()=>{window.scrollTo(0,0)},[]);const[t,n,r,...i]=(e||"").split("-"),a=i.join(" "),s=pp[`/src/blog/${e}.md`],[o,l,c,u]=s.split(`--- +`),d=Pm.parse(l);let f=0;return S.jsxs(S.Fragment,{children:[S.jsx(TV,{}),S.jsxs(CV,{children:[S.jsx(AV,{children:a}),S.jsxs(z8,{children:[pe(`${t}-${n}-${r}`).format("MMM Do")," ·"," ",d.read_time," min read"]}),S.jsxs(NV,{href:d.author.url,children:[S.jsx(MV,{src:d.author.img_url}),S.jsx(RV,{children:d.author.name})]}),S.jsx(OV,{src:d.cover}),S.jsx(IV,{children:S.jsx(kc,{children:u,rehypePlugins:[J0,EV],remarkPlugins:[Q0,NW],components:{h1:({level:p,children:m})=>S.jsx(Mt,{level:p,children:m}),h2:({level:p,children:m})=>S.jsx(Mt,{level:p,children:m}),h3:({level:p,children:m})=>S.jsx(Mt,{level:p,children:m}),h4:({level:p,children:m})=>S.jsx(Mt,{level:p,children:m}),h5:({level:p,children:m})=>S.jsx(Mt,{level:p,children:m}),h6:({level:p,children:m})=>S.jsx(Mt,{level:p,children:m}),p:({children:p})=>S.jsx(eh,{children:p}),em:({children:p})=>S.jsx(xa,{children:p}),strong:({children:p})=>S.jsx(xa,{type:"bold",children:p}),hr:()=>S.jsx(th,{}),ul:({depth:p,ordered:m,className:h,children:w})=>S.jsx(ka,{depth:p,ordered:m,className:h,children:w}),ol:({depth:p,ordered:m,className:h,children:w})=>S.jsx(ka,{depth:p,ordered:m,className:h,children:w}),li:({children:p})=>S.jsx(nh,{children:p}),img:({src:p,alt:m})=>S.jsx(rh,{src:p,alt:m}),blockquote:({children:p})=>S.jsx(ih,{children:p})}})}),S.jsxs(DV,{children:[S.jsx(LV,{children:S.jsx(PV,{children:"related resources"})}),S.jsx(zV,{children:Object.keys(pp).reverse().map((p,m)=>{f++;const h=p.split(/[/,.]/),w=h[3],[y,v,x,..._]=h[3].split("-"),A=_.join(" "),[E,R,B,q]=pp[p].split(`--- +`),G=Pm.parse(R),W=`/src/blog/${e}.md`;return p===W||f>2?(f--,null):S.jsxs(BV,{children:[S.jsx(FV,{src:G.cover,alt:"cover"}),S.jsxs($V,{children:[S.jsx(UV,{children:A}),S.jsx(jV,{children:B}),S.jsx(qV,{onClick:()=>window.scrollTo(0,0),to:`/blog/${w}`,children:"Read more"})]})]},m)})}),S.jsx(HV,{to:"/blog",children:"View All →"})]})]})]})},VV="/xline-home/assets/image1-9be52310.png",YV="/xline-home/assets/image2-baebe8ee.png",KV="/xline-home/assets/image3-a2f91129.png",GV="/xline-home/assets/dot-37a9b3fe.svg",XV=P.div` + display: flex; + align-items: center; + justify-content: center; + height: calc(86px + 416px); + padding-top: 86px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + padding-top: 69px; + height: calc(312px + 69px); + } + @media screen and (max-width: 1024px) { + padding-top: 53px; + height: calc(208px + 53px); + } +`,QV=P.h1` + position: relative; + display: inline-block; + padding-inline: 32px; + color: white; + font-weight: 700; + font-size: 72px; + line-height: 1.5; + text-transform: capitalize; + transform: translateY(-10%); + @media screen and (max-width: 1024px) { + padding-inline: 24px; + font-size: 54px; + } + @media screen and (max-width: 768px) { + padding-inline: 16px; + font-size: 36px; + } +`,ZV=P.img` + z-index: -1; + position: absolute; + left: 50%; + bottom: -17px; + transform: translateX(-45%); + width: 295.01px; + height: 35.35px; + @media screen and (max-width: 1024px) { + bottom: -12%; + width: 221px; + height: 27px; + } + @media screen and (max-width: 768px) { + bottom: -8%; + width: 148px; + height: 18px; + } +`,JV=P.main` + display: flex; + margin-inline: auto; + padding-block: ${e=>e.theme.scale.scale06}; + padding-inline: ${e=>e.theme.scale.scale07}; + max-width: ${e=>e.theme.scale.scale12}; + // - - - + /* height: 200px; + background-color: lightcoral; */ + @media screen and (max-width: 1024px) { + padding-block: 60px; + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-block: 40px; + padding-inline: 64px; + } +`,eY=P.div` + flex-shrink: 0; + width: ${e=>e.theme.scale.scale08}; + margin-right: ${e=>e.theme.scale.scale06}; + padding-block: ${e=>e.theme.scale.scale07}; + // - - - + /* height: 100px; + background-color: lightblue; */ + @media screen and (max-width: 1440px) { + display: none; + } +`,tY=P.p` + margin-bottom: ${e=>e.theme.scale.scale04}; + color: #a6a6a6; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + line-height: ${e=>e.theme.font.lineHeight4}; +`,nY=P(Ro)` + display: block; + margin-bottom: ${e=>e.theme.scale.scale03}; + padding: ${e=>e.theme.scale.scale03}; + color: #454545; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + line-height: ${e=>e.theme.font.lineHeight3}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale01}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; +`;P.div` + display: flex; + flex-flow: wrap; + justify-content: space-between; + /* flex: 1; */ + /* padding-inline: ${e=>e.theme.scale.scale05}; */ + // - - - + /* min-height: 100px; + background-color: lightcyan; */ + @media screen and (max-width: 1024px) { + flex-direction: column; + } +`;P.div` + width: 48%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale03}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; + overflow: hidden; + // - - - + /* height: 400px; */ + /* background: lightpink; */ + @media screen and (max-width: 1024px) { + width: 100%; + } +`;P.img` + width: 100%; + /* height: ${e=>e.theme.scale.scale08}; */ +`;P.div` + padding: ${e=>e.theme.scale.scale03}; + // - - - + /* height: 100px; */ + @media screen and (max-width: 1024px) { + padding: 15px; + } + @media screen and (max-width: 768px) { + padding: 10px; + } +`;P.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + /* line-height: ${e=>e.theme.font.lineHeight4}; */ + line-height: 1.5; + /* white-space: nowrap; */ + overflow: hidden; + text-overflow: ellipsis; + text-transform: capitalize; + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 15px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 10px; + } +`;P.p` + display: -webkit-box; + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + /* line-height: ${e=>e.theme.font.lineHeight3}; */ + line-height: 1.5; + word-break: break-all; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + text-overflow: ellipsis; + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 12px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 8px; + } +`;P(Ro)` + display: inline-block; + margin-bottom: ${e=>e.theme.scale.scale01}; + padding-block: ${e=>e.theme.scale.scale01}; + padding-inline: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize2}; + /* line-height: ${e=>e.theme.font.lineHeight2}; */ + line-height: 1.5; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 20px; + @media screen and (max-width: 1024px) { + margin-bottom: 6px; + padding-block: 6px; + padding-inline: 24px; + font-size: 10.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 4px; + padding-block: 4px; + padding-inline: 16px; + font-size: 7px; + } +`;const rY=P.ul``,iY=P.li` + display: flex; + align-items: center; + padding-block: 24px; + padding-inline: 12px; + border-bottom: 0.5px solid #9a9a9a; + cursor: pointer; + /* :last-child { + border-bottom: none; + } */ + @media screen and (max-width: 1024px) { + flex-direction: column; + padding-block: 18px; + padding-inline: 9px; + } + @media screen and (max-width: 768px) { + padding-block: 12px; + padding-inline: 6px; + } +`,aY=P.div` + flex-grow: 1; + margin-right: 48px; + @media screen and (max-width: 1024px) { + margin-right: 0; + } +`,sY=P.img` + width: 40%; + @media screen and (max-width: 1024px) { + width: 100%; + } +`,oY=P.div` + margin-bottom: 6px; + font-size: 15px; + line-height: 2; + font-weight: 600px; + color: #7680dd; + @media screen and (max-width: 1024px) { + margin-bottom: 4.5px; + font-size: 12px; + } + @media screen and (max-width: 768px) { + margin-bottom: 3px; + } +`,lY=P.div` + margin-bottom: 27px; + font-size: 27px; + line-height: 1.22; + font-weight: 600; + color: #1e1e1e; + @media screen and (max-width: 1024px) { + margin-bottom: 20.25px; + font-size: 20.25; + } + @media screen and (max-width: 768px) { + margin-bottom: 13.5px; + font-size: 16px; + } +`,cY=P.div` + margin-bottom: 6px; + font-size: 13.5px; + line-height: 1.77; + font-weight: 400; + color: #7d7d7d; + @media screen and (max-width: 1024px) { + margin-bottom: 4.5px; + font-size: 12px; + } + @media screen and (max-width: 768px) { + margin-bottom: 3px; + } +`,uY=P.div` + display: flex; + align-items: center; + font-size: 12px; + line-height: 1%.5; + font-weight: 600; + @media screen and (max-width: 1024px) { + font-size: 9px; + } + @media screen and (max-width: 768px) { + font-size: 6px; + } +`,dY=P.img` + width: 22px; + height: 22px; + padding-inline: 8px; + @media screen and (max-width: 1024px) { + width: 16.5px; + height: 16.5px; + padding-inline: 6px; + } + @media screen and (max-width: 768px) { + width: 11px; + height: 11px; + padding-inline: 4px; + } +`,hY=P.div` + color: #797979; +`,fY=P.div` + color: #7680dd; +`,aw=[{date:"2023-01-19",title:"Geo distributed Metadata Management System",description:"The webinar aims to briefly introduce DatenLord’s open source project Xline, a distributed metadata management system for multi-clusters. It reveals the motivation of Xline, the architecture of it and the important consensus protocol, CURP. The performance comparison shows the advantage of Xline over the current solution.",author:"By Jicheng Shi",read:"19min",img:VV,url:"https://www.cncf.io/online-programs/cncf-on-demand-webinar-geo-distributed-metadata-management-system/"},{date:"2023-05-04",title:"Proofing the Correctness of the CURP Consensus Protocol Using TLA+",description:"The CURP Replication Protocol (NSDI ’19) aims to eliminate the additional round trips between servers in replicated state machines. We extended CURP into a consensus protocol and used it in our open source project Xline. This webinar is about how we modeled the CURP consensus protocol in TLA+ and verified the correctness of it.",author:"By Ye Tian",read:"20min",img:YV,url:"https://www.cncf.io/online-programs/cncf-on-demand-webinar-proofing-the-correctness-of-the-curp-consensus-protocol-using-tla/"},{date:"2023-09-08",title:"How to Write a Distributed Key-value store in Rust",description:"In this presentation, we will explore how to use Rust to build a distributed key-value store, taking the open-source distributed KV storage Xline as an example. ",author:"By Jiawei Zhao",read:"35min",img:KV,url:"https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cncf-on-demand-webinar-how-to-write-a-distributed-key-value-store-in-rust/"}],pY=e=>{const{date:t,title:n,description:r,author:i,read:a,img:s,url:o}=e.data;return S.jsxs(iY,{onClick:()=>window.location.href=`${o}`,children:[S.jsxs(aY,{children:[S.jsx(oY,{children:pe(t,"YYYY-MM-DD").format("dddd MMMM D, YYYY")}),S.jsx(lY,{children:n}),S.jsx(cY,{children:r}),S.jsxs(uY,{children:[S.jsx(hY,{children:i}),S.jsx(dY,{src:GV}),S.jsx(fY,{children:a})]})]}),S.jsx(sY,{src:s})]})},mY=()=>S.jsxs(S.Fragment,{children:[S.jsx(XV,{children:S.jsxs(QV,{children:["video",S.jsx(ZV,{src:Ra,alt:"underline"})]})}),S.jsxs(JV,{children:[S.jsxs(eY,{children:[S.jsx(tY,{children:"Video"}),aw.map(({title:e,url:t})=>S.jsx(nY,{to:t,children:e},e))]}),S.jsx(rY,{children:aw.map(e=>S.jsx(pY,{data:e},e.title))})]})]}),gY=FE([{path:"/",element:S.jsx(BC,{}),children:[{path:"/",element:S.jsx(yA,{})},{path:"/contribute",element:S.jsx(jA,{})},{path:"/blog",element:S.jsx(yF,{})},{path:"/blog/:msg",element:S.jsx(WV,{})},{path:"/docs/:params",element:S.jsx(Oz,{})},{path:"/deep-dive/:params",element:S.jsx(Wz,{})},{path:"/video",element:S.jsx(mY,{})}]},{path:"test",element:S.jsx(cz,{})}]),yY={color:{neutral:{gray01:"#ffffff",gray02:"#fafafa",gray03:"#f5f5f5",gray04:"#f0f0f0",gray05:"#d9d9d9",gray06:"#bfbfbf",gray07:"#8c8c8c",gray08:"#595959",gray09:"#434343",gray10:"#262626",gray11:"#1f1f1f",gray12:"#141414",gray13:"#000000"},white:"white"},scale:{scale01:"8px",scale02:"12px",scale03:"20px",scale04:"32px",scale05:"48px",scale06:"80px",scale07:"128px",scale08:"208px",scale09:"336px",scale10:"552px",scale11:"896px",scale12:"1440px",sm:"16px",md:"32px",lg:"64px",xl:"96px",xxl:"128px"},font:{fontFamily:"Arial",fontSize1:"12px",fontSize2:"14px",fontSize3:"16px",fontSize4:"20px",fontSize5:"24px",fontSize6:"30px",fontSize7:"38px",fontSize8:"46px",fontSize9:"56px",fontSize10:"68px",lineHeight1:"20px",lineHeight2:"22px",lineHeight3:"24px",lineHeight4:"28px",lineHeight5:"32px",lineHeight6:"38px",lineHeight7:"46px",lineHeight8:"54px",lineHeight9:"64px",lineHeight10:"76px",fontWeightRegular:"500",fontWeightBold:"600"}},bY=WT` + * { + box-sizing: border-box; + } + + body { + margin: 0; + font-family: Inter; + line-height: 1.5; + } + + a { + text-decoration: none; + } + + h1, h2, h3, h4, h5, h6 { + margin-block: 0; + } + + p { + margin-block: 0; + line-height: 1.2; + } + + ul, ol { + list-style-type: none; + margin-block: 0; + padding-inline-start: 0; + } + + ol + ul { + margin-left: 20px; + } + + pre { + background: ${e=>e.theme.color.neutral.gray04}; + padding: 12px; + border-radius: 4px; + overflow-x: scroll; + } + + code { + font-size: 16px; + padding: 4px; + border-radius: 4px; + background: ${e=>e.theme.color.neutral.gray04}; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + } + + pre code { + padding: 0; + } + + .hljs { + font-size: 16px; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + color: #333; + overflow: hidden; + } + /* .hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; +} */ + .hljs-comment, + .hljs-quote { + color: #998; + font-style: italic; + } + .hljs-keyword, + .hljs-selector-tag, + .hljs-subst { + color: #333; + font-weight: 700; + } + .hljs-literal, + .hljs-number, + .hljs-tag .hljs-attr, + .hljs-template-variable, + .hljs-variable { + color: teal; + } + .hljs-doctag, + .hljs-string { + color: #d14; + } + .hljs-section, + .hljs-selector-id, + .hljs-title { + color: #900; + font-weight: 700; + } + .hljs-subst { + font-weight: 400; + } + .hljs-class .hljs-title, + .hljs-type { + color: #458; + font-weight: 700; + } + .hljs-attribute, + .hljs-name, + .hljs-tag { + color: navy; + font-weight: 400; + } + .hljs-link, + .hljs-regexp { + color: #009926; + } + .hljs-bullet, + .hljs-symbol { + color: #990073; + } + .hljs-built_in, + .hljs-builtin-name { + color: #0086b3; + } + .hljs-meta { + color: #999; + font-weight: 700; + } + .hljs-deletion { + background: #fdd; + } + .hljs-addition { + background: #dfd; + } + .hljs-emphasis { + font-style: italic; + } + .hljs-strong { + font-weight: 700; + } +`;gp.createRoot(document.getElementById("root")).render(S.jsx(Bn.StrictMode,{children:S.jsxs(qT,{theme:yY,children:[S.jsx(NE,{router:gY}),S.jsx(bY,{})]})}))});export default vY(); diff --git a/assets/logo-9c6940ee.svg b/assets/logo-9c6940ee.svg new file mode 100644 index 0000000..18ff884 --- /dev/null +++ b/assets/logo-9c6940ee.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/assets/protocol-icon-f31ce54b.svg b/assets/protocol-icon-f31ce54b.svg new file mode 100644 index 0000000..46cacbe --- /dev/null +++ b/assets/protocol-icon-f31ce54b.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/sever-icon-1e1bff49.svg b/assets/sever-icon-1e1bff49.svg new file mode 100644 index 0000000..1bc6af1 --- /dev/null +++ b/assets/sever-icon-1e1bff49.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/underline-992439df.svg b/assets/underline-992439df.svg new file mode 100644 index 0000000..039bc25 --- /dev/null +++ b/assets/underline-992439df.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/blog/Database-Isolation-Levels-and-MVCC/cover.png b/blog/Database-Isolation-Levels-and-MVCC/cover.png new file mode 100644 index 0000000..ef9bd6d Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/cover.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image1.png b/blog/Database-Isolation-Levels-and-MVCC/image1.png new file mode 100644 index 0000000..6de0ffd Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image1.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image2.png b/blog/Database-Isolation-Levels-and-MVCC/image2.png new file mode 100644 index 0000000..aacba33 Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image2.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image3.png b/blog/Database-Isolation-Levels-and-MVCC/image3.png new file mode 100644 index 0000000..0eb0d9e Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image3.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image4.png b/blog/Database-Isolation-Levels-and-MVCC/image4.png new file mode 100644 index 0000000..6e2aaa2 Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image4.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image5.png b/blog/Database-Isolation-Levels-and-MVCC/image5.png new file mode 100644 index 0000000..081b4cd Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image5.png differ diff --git a/blog/How-to-elegantly-organize-async-Rust-code/cover.png b/blog/How-to-elegantly-organize-async-Rust-code/cover.png new file mode 100644 index 0000000..6def882 Binary files /dev/null and b/blog/How-to-elegantly-organize-async-Rust-code/cover.png differ diff --git a/blog/How-to-elegantly-organize-async-Rust-code/image1.png b/blog/How-to-elegantly-organize-async-Rust-code/image1.png new file mode 100644 index 0000000..edbe629 Binary files /dev/null and b/blog/How-to-elegantly-organize-async-Rust-code/image1.png differ diff --git a/blog/Implementation-of-CURP-Server/cover.jpg b/blog/Implementation-of-CURP-Server/cover.jpg new file mode 100644 index 0000000..beb8ee6 Binary files /dev/null and b/blog/Implementation-of-CURP-Server/cover.jpg differ diff --git a/blog/Implementation-of-CURP-Server/image1.png b/blog/Implementation-of-CURP-Server/image1.png new file mode 100644 index 0000000..467596e Binary files /dev/null and b/blog/Implementation-of-CURP-Server/image1.png differ diff --git a/blog/Implementation-of-CURP-Server/image2.png b/blog/Implementation-of-CURP-Server/image2.png new file mode 100644 index 0000000..e09b412 Binary files /dev/null and b/blog/Implementation-of-CURP-Server/image2.png differ diff --git a/blog/Implementation-of-CURP-Server/image3.png b/blog/Implementation-of-CURP-Server/image3.png new file mode 100644 index 0000000..0c06f32 Binary files /dev/null and b/blog/Implementation-of-CURP-Server/image3.png differ diff --git a/blog/Implementation-of-CURP-Server/image4.png b/blog/Implementation-of-CURP-Server/image4.png new file mode 100644 index 0000000..bc5c48f Binary files /dev/null and b/blog/Implementation-of-CURP-Server/image4.png differ diff --git a/blog/Introduction-to-CURP-Protocol/cover.png b/blog/Introduction-to-CURP-Protocol/cover.png new file mode 100644 index 0000000..affd766 Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/cover.png differ diff --git a/blog/Introduction-to-CURP-Protocol/graph1.jpg b/blog/Introduction-to-CURP-Protocol/graph1.jpg new file mode 100644 index 0000000..8101a77 Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/graph1.jpg differ diff --git a/blog/Introduction-to-CURP-Protocol/graph2.jpg b/blog/Introduction-to-CURP-Protocol/graph2.jpg new file mode 100644 index 0000000..ef7e2e9 Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/graph2.jpg differ diff --git a/blog/Introduction-to-CURP-Protocol/graph3.jpg b/blog/Introduction-to-CURP-Protocol/graph3.jpg new file mode 100644 index 0000000..bd2f355 Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/graph3.jpg differ diff --git a/blog/Introduction-to-CURP-Protocol/graph4.jpg b/blog/Introduction-to-CURP-Protocol/graph4.jpg new file mode 100644 index 0000000..d7416cc Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/graph4.jpg differ diff --git a/blog/Mechanism-and-Implementation-of-Lease/cover.png b/blog/Mechanism-and-Implementation-of-Lease/cover.png new file mode 100644 index 0000000..7c2abd8 Binary files /dev/null and b/blog/Mechanism-and-Implementation-of-Lease/cover.png differ diff --git a/blog/Mechanism-and-Implementation-of-Lease/image1.PNG b/blog/Mechanism-and-Implementation-of-Lease/image1.PNG new file mode 100644 index 0000000..bdb67ed Binary files /dev/null and b/blog/Mechanism-and-Implementation-of-Lease/image1.PNG differ diff --git a/blog/Mechanism-and-Implementation-of-Lease/image2.png b/blog/Mechanism-and-Implementation-of-Lease/image2.png new file mode 100644 index 0000000..3312d73 Binary files /dev/null and b/blog/Mechanism-and-Implementation-of-Lease/image2.png differ diff --git a/blog/Mechanism-and-Implementation-of-Lease/image3.png b/blog/Mechanism-and-Implementation-of-Lease/image3.png new file mode 100644 index 0000000..125bd60 Binary files /dev/null and b/blog/Mechanism-and-Implementation-of-Lease/image3.png differ diff --git a/blog/Revisit-the-Consensus-Protocol/cover.png b/blog/Revisit-the-Consensus-Protocol/cover.png new file mode 100644 index 0000000..69892cf Binary files /dev/null and b/blog/Revisit-the-Consensus-Protocol/cover.png differ diff --git a/blog/Revisit-the-Consensus-Protocol/image1.jpg b/blog/Revisit-the-Consensus-Protocol/image1.jpg new file mode 100644 index 0000000..f4f1afb Binary files /dev/null and b/blog/Revisit-the-Consensus-Protocol/image1.jpg differ diff --git a/blog/Revisit-the-Consensus-Protocol/image2.webp b/blog/Revisit-the-Consensus-Protocol/image2.webp new file mode 100644 index 0000000..4d244e3 Binary files /dev/null and b/blog/Revisit-the-Consensus-Protocol/image2.webp differ diff --git a/blog/Revisit-the-Consensus-Protocol/image3.webp b/blog/Revisit-the-Consensus-Protocol/image3.webp new file mode 100644 index 0000000..11d9128 Binary files /dev/null and b/blog/Revisit-the-Consensus-Protocol/image3.webp differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/cover.png b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/cover.png new file mode 100644 index 0000000..925adbd Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/cover.png differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image1.PNG b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image1.PNG new file mode 100644 index 0000000..76f0120 Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image1.PNG differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image2.png b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image2.png new file mode 100644 index 0000000..db420f8 Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image2.png differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image3.png b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image3.png new file mode 100644 index 0000000..aa4dfa6 Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image3.png differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image4.png b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image4.png new file mode 100644 index 0000000..13f893c Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image4.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/cover.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/cover.png new file mode 100644 index 0000000..4f8bb78 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/cover.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image1.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image1.png new file mode 100644 index 0000000..544ab70 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image1.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image10.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image10.png new file mode 100644 index 0000000..7d1a095 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image10.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image11.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image11.png new file mode 100644 index 0000000..eed8123 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image11.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image2.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image2.png new file mode 100644 index 0000000..b71e109 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image2.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image3.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image3.png new file mode 100644 index 0000000..97a2399 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image3.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image4.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image4.png new file mode 100644 index 0000000..d0d37f9 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image4.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image5.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image5.png new file mode 100644 index 0000000..47db263 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image5.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image6.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image6.png new file mode 100644 index 0000000..d05e4a8 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image6.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image7.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image7.png new file mode 100644 index 0000000..c78511e Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image7.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image8.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image8.png new file mode 100644 index 0000000..b6baba4 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image8.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image9.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image9.png new file mode 100644 index 0000000..1d41505 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image9.png differ diff --git a/docs/Deploy/image1.png b/docs/Deploy/image1.png new file mode 100644 index 0000000..dab7063 Binary files /dev/null and b/docs/Deploy/image1.png differ diff --git a/docs/Deploy/image2.png b/docs/Deploy/image2.png new file mode 100644 index 0000000..5d97891 Binary files /dev/null and b/docs/Deploy/image2.png differ diff --git a/docs/Deploy/image3.png b/docs/Deploy/image3.png new file mode 100644 index 0000000..cb48b46 Binary files /dev/null and b/docs/Deploy/image3.png differ diff --git a/docs/Deploy/xline-key-perf.png b/docs/Deploy/xline-key-perf.png new file mode 100644 index 0000000..ad555cd Binary files /dev/null and b/docs/Deploy/xline-key-perf.png differ diff --git a/docs/Get-Started/image1.png b/docs/Get-Started/image1.png new file mode 100644 index 0000000..0226073 Binary files /dev/null and b/docs/Get-Started/image1.png differ diff --git a/docs/Xline-Architecture-Details/image1.jpg b/docs/Xline-Architecture-Details/image1.jpg new file mode 100644 index 0000000..115c975 Binary files /dev/null and b/docs/Xline-Architecture-Details/image1.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..c45b04d --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Xline + + + +
+ + + diff --git a/xline.svg b/xline.svg new file mode 100644 index 0000000..18ff884 --- /dev/null +++ b/xline.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +