@bmx-labs/chat-widget 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +38 -46
  2. package/dist/adapters/index.d.ts +1 -1
  3. package/dist/adapters/rest-adapter.d.ts +25 -0
  4. package/dist/components/chat/ChatPanel.d.ts +2 -1
  5. package/dist/components/chat/SettingsPanel.d.ts +3 -1
  6. package/dist/components/message/EmptyMessages.d.ts +4 -0
  7. package/dist/components/message/MessageList.d.ts +2 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/styles.css +1 -1
  11. package/dist/types.d.ts +71 -0
  12. package/package.json +10 -9
  13. package/dist/adapters/AnthropicAdapter.d.ts +0 -16
  14. package/dist/adapters/ContextAdapter.d.ts +0 -19
  15. package/dist/adapters/CustomAPIAdapter.d.ts +0 -20
  16. package/dist/adapters/KnowledgeBaseAdapter.d.ts +0 -20
  17. package/dist/adapters/MockAdapter.d.ts +0 -6
  18. package/dist/adapters/MorphexAdapter.d.ts +0 -16
  19. package/dist/adapters/OpenAIAdapter.d.ts +0 -17
  20. package/dist/adapters/RAGAdapter.d.ts +0 -29
  21. package/dist/adapters/RestRAGAdapter.d.ts +0 -9
  22. package/dist/adapters/TestAdapter.d.ts +0 -6
  23. package/dist/adapters/context/ContextAdapter.d.ts +0 -19
  24. package/dist/adapters/context/KnowledgeBaseAdapter.d.ts +0 -20
  25. package/dist/adapters/context/MorphexAdapter.d.ts +0 -16
  26. package/dist/adapters/context/PineconeRAGAdapter.d.ts +0 -40
  27. package/dist/adapters/context/RAGAdapter.d.ts +0 -29
  28. package/dist/adapters/context/index.d.ts +0 -2
  29. package/dist/adapters/rest.d.ts +0 -7
  30. package/dist/components/LazyComponents.d.ts +0 -3
  31. package/dist/components/Orb.d.ts +0 -8
  32. package/dist/components/OrbButton.d.ts +0 -10
  33. package/dist/components/SimpleIridescence.d.ts +0 -8
  34. package/dist/components/SimpleOrb.d.ts +0 -8
  35. package/dist/components/ogl/DarkVeil.d.ts +0 -11
  36. package/dist/data/morphexData.d.ts +0 -7
  37. package/dist/framer.js +0 -1
  38. package/dist/index.js.map +0 -1
  39. package/dist/ogl.js +0 -1
  40. package/dist/styles.css.map +0 -1
  41. package/dist/styles.js.map +0 -1
  42. package/dist/vendors.js +0 -1
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{Fragment as e,jsx as t,jsxs as n}from"react/jsx-runtime";import{Component as i,Fragment as r,createContext as o,createElement as s,default as a,forwardRef as l,useCallback as c,useContext as u,useEffect as d,useId as h,useInsertionEffect as p,useLayoutEffect as f,useMemo as m,useRef as g,useState as b}from"react";import{createPortal as y}from"react-dom";var v={62:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var i=(0,r.default)(e),o="function"==typeof t;return i.forEach(function(e){if("declaration"===e.type){var i=e.property,r=e.value;o?t(i,r,e):r&&((n=n||{})[i]=r)}}),n};var r=i(n(401))},74:e=>{function t(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(n=>{const i=e[n],r=typeof i;"object"!==r&&"function"!==r||Object.isFrozen(i)||t(i)}),e}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach(function(e){for(const t in e)n[t]=e[t]}),n}const o=e=>!!e.scope;class s{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!o(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${"_".repeat(t+1)}`)].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){o(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class l{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=a({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{l._collapse(e)}))}}class c extends l{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new s(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function u(e){return e?"string"==typeof e?e:e.source:null}function d(e){return f("(?=",e,")")}function h(e){return f("(?:",e,")*")}function p(e){return f("(?:",e,")?")}function f(...e){return e.map(e=>u(e)).join("")}function m(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>u(e)).join("|")+")"}function g(e){return new RegExp(e.toString()+"|").exec("").length-1}const b=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function y(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let i=u(e),r="";for(;i.length>0;){const e=b.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const v="[a-zA-Z]\\w*",x="[a-zA-Z_]\\w*",w="\\b\\d+(\\.\\d+)?",k="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",_="\\b(0b[01]+)",E={begin:"\\\\[\\s\\S]",relevance:0},S={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[E]},A={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[E]},C=function(e,t,n={}){const i=r({scope:"comment",begin:e,end:t,contains:[]},n);i.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 o=m("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 i.contains.push({begin:f(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},M=C("//","$"),T=C("/\\*","\\*/"),N=C("#","$"),O={scope:"number",begin:w,relevance:0},I={scope:"number",begin:k,relevance:0},D={scope:"number",begin:_,relevance:0},R={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[E,{begin:/\[/,end:/\]/,relevance:0,contains:[E]}]},P={scope:"title",begin:v,relevance:0},L={scope:"title",begin:x,relevance:0},F={begin:"\\.\\s*"+x,relevance:0};var B=Object.freeze({__proto__:null,APOS_STRING_MODE:S,BACKSLASH_ESCAPE:E,BINARY_NUMBER_MODE:D,BINARY_NUMBER_RE:_,COMMENT:C,C_BLOCK_COMMENT_MODE:T,C_LINE_COMMENT_MODE:M,C_NUMBER_MODE:I,C_NUMBER_RE:k,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:N,IDENT_RE:v,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:F,NUMBER_MODE:O,NUMBER_RE:w,PHRASAL_WORDS_MODE:{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/},QUOTE_STRING_MODE:A,REGEXP_MODE:R,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=f(t,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:P,UNDERSCORE_IDENT_RE:x,UNDERSCORE_TITLE_MODE:L});function z(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function j(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function U(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=z,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function $(e,t){Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function V(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 q(e,t){void 0===e.relevance&&(e.relevance=1)}const H=(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(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=f(n.beforeMatch,d(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},K=["of","and","for","in","not","or","if","then","parent","list","value"];function G(e,t,n="keyword"){const i=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(n){Object.assign(i,G(e[n],t,n))}),i;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){const n=t.split("|");i[n[0]]=[e,W(n[0],n[1])]})}}function W(e,t){return t?Number(t):function(e){return K.includes(e.toLowerCase())}(e)?0:1}const X={},Z=e=>{console.error(e)},Y=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Q=(e,t)=>{X[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),X[`${e}/${t}`]=!0)},J=new Error;function ee(e,t,{key:n}){let i=0;const r=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+i]=r[e],o[e+i]=!0,i+=g(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function te(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Z("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),J;if("object"!=typeof e.beginScope||null===e.beginScope)throw Z("beginScope must be object"),J;ee(e,e.begin,{key:"beginScope"}),e.begin=y(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Z("skip, excludeEnd, returnEnd not compatible with endScope: {}"),J;if("object"!=typeof e.endScope||null===e.endScope)throw Z("endScope must be object"),J;ee(e,e.end,{key:"endScope"}),e.end=y(e.end,{joinWith:""})}}(e)}function ne(e){function t(t,n){return new RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=g(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(y(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}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=r(e.classNameAliases||{}),function n(o,s){const a=o;if(o.isCompiled)return a;[j,V,te,H].forEach(e=>e(o,s)),e.compilerExtensions.forEach(e=>e(o,s)),o.__beforeBegin=null,[U,$,q].forEach(e=>e(o,s)),o.isCompiled=!0;let l=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),l=o.keywords.$pattern,delete o.keywords.$pattern),l=l||/\w+/,o.keywords&&(o.keywords=G(o.keywords,e.case_insensitive)),a.keywordPatternRe=t(l,!0),s&&(o.begin||(o.begin=/\B|\b/),a.beginRe=t(a.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(a.endRe=t(a.end)),a.terminatorEnd=u(a.end)||"",o.endsWithParent&&s.terminatorEnd&&(a.terminatorEnd+=(o.end?"|":"")+s.terminatorEnd)),o.illegal&&(a.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return r(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:ie(e)?r(e,{starts:e.starts?r(e.starts):null}):Object.isFrozen(e)?r(e):e}("self"===e?o:e)})),o.contains.forEach(function(e){n(e,a)}),o.starts&&n(o.starts,s),a.matcher=function(e){const t=new i;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function ie(e){return!!e&&(e.endsWithParent||ie(e.starts))}class re extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const oe=i,se=r,ae=Symbol("nomatch"),le=function(e){const i=Object.create(null),r=Object.create(null),o=[];let s=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let u={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function g(e){return u.noHighlightRe.test(e)}function b(e,t,n){let i="",r="";"object"==typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const o={code:i,language:r};A("before:highlight",o);const s=o.result?o.result:y(o.language,o.code,n);return s.code=o.code,A("after:highlight",s),s}function y(e,t,r,o){const l=Object.create(null);function c(e,t){return e.keywords[t]}function d(){if(!C.keywords)return void T.addText(N);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(N),n="";for(;t;){n+=N.substring(e,t.index);const i=E.case_insensitive?t[0].toLowerCase():t[0],r=c(C,i);if(r){const[e,o]=r;if(T.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=7&&(O+=o),e.startsWith("_"))n+=t[0];else{const n=E.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(N)}n+=N.substring(e),T.addText(n)}function h(){null!=C.subLanguage?function(){if(""===N)return;let e=null;if("string"==typeof C.subLanguage){if(!i[C.subLanguage])return void T.addText(N);e=y(C.subLanguage,N,!0,M[C.subLanguage]),M[C.subLanguage]=e._top}else e=v(N,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(O+=e.relevance),T.__addSublanguage(e._emitter,e.language)}():d(),N=""}function p(e,t){""!==e&&(T.startScope(t),T.addText(e),T.endScope())}function f(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=E.classNameAliases[e[n]]||e[n],r=t[n];i?p(r,i):(N=r,d(),N=""),n++}}function m(e,t){return e.scope&&"string"==typeof e.scope&&T.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(N,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=""):e.beginScope._multi&&(f(e.beginScope,t),N="")),C=Object.create(e,{parent:{value:C}}),C}function g(e,t,i){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,i);if(r){if(e["on:end"]){const i=new n(e);e["on:end"](t,i),i.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,i)}function b(e){return 0===C.matcher.regexIndex?(N+=e[0],1):(R=!0,0)}function x(e){const n=e[0],i=t.substring(e.index),r=g(C,e,i);if(!r)return ae;const o=C;C.endScope&&C.endScope._wrap?(h(),p(n,C.endScope._wrap)):C.endScope&&C.endScope._multi?(h(),f(C.endScope,e)):o.skip?N+=n:(o.returnEnd||o.excludeEnd||(N+=n),h(),o.excludeEnd&&(N=n));do{C.scope&&T.closeNode(),C.skip||C.subLanguage||(O+=C.relevance),C=C.parent}while(C!==r.parent);return r.starts&&m(r.starts,e),o.returnEnd?0:n.length}let w={};function k(i,o){const a=o&&o[0];if(N+=i,null==a)return h(),0;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===a){if(N+=t.slice(o.index,o.index+1),!s){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=w.rule,t}return 1}if(w=o,"begin"===o.type)return function(e){const t=e[0],i=e.rule,r=new n(i),o=[i.__beforeBegin,i["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return b(t);return i.skip?N+=t:(i.excludeBegin&&(N+=t),h(),i.returnBegin||i.excludeBegin||(N=t)),m(i,e),i.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(C.scope||"<unnamed>")+'"');throw e.mode=C,e}if("end"===o.type){const e=x(o);if(e!==ae)return e}if("illegal"===o.type&&""===a)return N+="\n",1;if(D>1e5&&D>3*o.index)throw new Error("potential infinite loop, way more iterations than matches");return N+=a,a.length}const E=_(e);if(!E)throw Z(a.replace("{}",e)),new Error('Unknown language: "'+e+'"');const S=ne(E);let A="",C=o||S;const M={},T=new u.__emitter(u);!function(){const e=[];for(let t=C;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>T.openNode(e))}();let N="",O=0,I=0,D=0,R=!1;try{if(E.__emitTokens)E.__emitTokens(t,T);else{for(C.matcher.considerAll();;){D++,R?R=!1:C.matcher.considerAll(),C.matcher.lastIndex=I;const e=C.matcher.exec(t);if(!e)break;const n=k(t.substring(I,e.index),e);I=e.index+n}k(t.substring(I))}return T.finalize(),A=T.toHTML(),{language:e,value:A,relevance:O,illegal:!1,_emitter:T,_top:C}}catch(n){if(n.message&&n.message.includes("Illegal"))return{language:e,value:oe(t),illegal:!0,relevance:0,_illegalBy:{message:n.message,index:I,context:t.slice(I-100,I+100),mode:n.mode,resultSoFar:A},_emitter:T};if(s)return{language:e,value:oe(t),illegal:!1,relevance:0,errorRaised:n,_emitter:T,_top:C};throw n}}function v(e,t){t=t||u.languages||Object.keys(i);const n=function(e){const t={value:oe(e),illegal:!1,relevance:0,_top:l,_emitter:new u.__emitter(u)};return t._emitter.addText(e),t}(e),r=t.filter(_).filter(S).map(t=>y(t,e,!1));r.unshift(n);const o=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(_(e.language).supersetOf===t.language)return 1;if(_(t.language).supersetOf===e.language)return-1}return 0}),[s,a]=o,c=s;return c.secondBest=a,c}function x(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=_(n[1]);return t||(Y(a.replace("{}",n[1])),Y("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>g(e)||_(e))}(e);if(g(n))return;if(A("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(u.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(e)),u.throwUnescapedHTML))throw new re("One of your code blocks includes unescaped HTML.",e.innerHTML);t=e;const i=t.textContent,o=n?b(i,{language:n,ignoreIllegals:!0}):v(i);e.innerHTML=o.value,e.dataset.highlighted="yes",function(e,t,n){const i=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,n,o.language),e.result={language:o.language,re:o.relevance,relevance:o.relevance},o.secondBest&&(e.secondBest={language:o.secondBest.language,relevance:o.secondBest.relevance}),A("after:highlightElement",{el:e,result:o,text:i})}let w=!1;function k(){if("loading"===document.readyState)return w||window.addEventListener("DOMContentLoaded",function(){k()},!1),void(w=!0);document.querySelectorAll(u.cssSelector).forEach(x)}function _(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]}function E(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{r[e.toLowerCase()]=t})}function S(e){const t=_(e);return t&&!t.disableAutodetect}function A(e,t){const n=e;o.forEach(function(e){e[n]&&e[n](t)})}Object.assign(e,{highlight:b,highlightAuto:v,highlightAll:k,highlightElement:x,highlightBlock:function(e){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),x(e)},configure:function(e){u=se(u,e)},initHighlighting:()=>{k(),Q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){k(),Q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(t,n){let r=null;try{r=n(e)}catch(e){if(Z("Language definition for '{}' could not be registered.".replace("{}",t)),!s)throw e;Z(e),r=l}r.name||(r.name=t),i[t]=r,r.rawDefinition=n.bind(null,e),r.aliases&&E(r.aliases,{languageName:t})},unregisterLanguage:function(e){delete i[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(i)},getLanguage:_,registerAliases:E,autoDetection:S,inherit:se,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},removePlugin:function(e){const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString="11.11.1",e.regex={concat:f,lookahead:d,either:m,optional:p,anyNumberOfTimes:h};for(const e in B)"object"==typeof B[e]&&t(B[e]);return Object.assign(e,B),e},ce=le({});ce.newInstance=()=>le({}),e.exports=ce,ce.HighlightJS=ce,ce.default=ce},401:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var i=e.lastIndexOf("\n");h=~i?e.length-i:h+e.length}function f(){var e={line:d,column:h};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:d,column:h},this.source=l.source}m.prototype.content=e;var g=[];function b(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var i=n[0];return p(i),e=e.slice(i.length),n}}function v(){y(i)}function x(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return b("End of comment missing");var i=e.slice(2,n-2);return h+=2,p(i),e=e.slice(n),h+=2,t({type:"comment",comment:i})}}function k(){var e=f(),n=y(r);if(n){if(w(),!y(o))return b("property missing ':'");var i=y(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:i?u(i[0].replace(t,c)):c});return y(a),l}}return v(),function(){var e,t=[];for(x(t);e=k();)!1!==e&&(t.push(e),x(t));return t}()}},426:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(o,l)).replace(i,a))}},598:function(e,t,n){var i=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(62)),r=n(426);function o(e,t){var n={};return e&&"string"==typeof e?((0,i.default)(e,function(e,i){e&&i&&(n[(0,r.camelCase)(e,t)]=i)}),n):n}o.default=o,e.exports=o},710:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var i,r=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(i in e);return void 0===i||t.call(e,i)},a=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(r)return r(e,n).value}return e[n]};e.exports=function e(){var t,n,i,r,c,u,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)i=l(d,n),d!==(r=l(t,n))&&(f&&r&&(s(r)||(c=o(r)))?(c?(c=!1,u=i&&o(i)?i:[]):u=i&&s(i)?i:{},a(d,{name:n,newValue:e(f,u,r)})):void 0!==r&&a(d,{name:n,newValue:r}));return d}}},x={};function w(e){var t=x[e];if(void 0!==t)return t.exports;var n=x[e]={exports:{}};return v[e].call(n.exports,n,n.exports,w),n.exports}w.d=(e,t)=>{for(var n in t)w.o(t,n)&&!w.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var k={};w.r(k),w.d(k,{boolean:()=>kl,booleanish:()=>_l,commaOrSpaceSeparated:()=>Ml,commaSeparated:()=>Cl,number:()=>Sl,overloadedBoolean:()=>El,spaceSeparated:()=>Al});var _={};function E(e){let t=e[0],n=e[1],i=e[2];return Math.sqrt(t*t+n*n+i*i)}function S(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function A(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function C(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function M(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function T(e){let t=e[0],n=e[1],i=e[2];return t*t+n*n+i*i}function N(e,t){let n=t[0],i=t[1],r=t[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function O(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function I(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[0],a=n[1],l=n[2];return e[0]=r*l-o*a,e[1]=o*s-i*l,e[2]=i*a-r*s,e}w.r(_),w.d(_,{attentionMarkers:()=>id,contentInitial:()=>Yu,disable:()=>rd,document:()=>Zu,flow:()=>Ju,flowInitial:()=>Qu,insideSpan:()=>nd,string:()=>ed,text:()=>td});const D=function(){const e=[0,0,0],t=[0,0,0];return function(n,i){S(e,n),S(t,i),N(e,e),N(t,t);let r=O(e,t);return r>1?0:r<-1?Math.PI:Math.acos(r)}}();class R extends Array{constructor(e=0,t=e,n=e){return super(e,t,n),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this[0]=e}set y(e){this[1]=e}set z(e){this[2]=e}set(e,t=e,n=e){return e.length?this.copy(e):(function(e,t,n,i){e[0]=t,e[1]=n,e[2]=i}(this,e,t,n),this)}copy(e){return S(this,e),this}add(e,t){return t?A(this,e,t):A(this,this,e),this}sub(e,t){return t?C(this,e,t):C(this,this,e),this}multiply(e){var t,n,i;return e.length?(n=this,i=e,(t=this)[0]=n[0]*i[0],t[1]=n[1]*i[1],t[2]=n[2]*i[2]):M(this,this,e),this}divide(e){var t,n,i;return e.length?(n=this,i=e,(t=this)[0]=n[0]/i[0],t[1]=n[1]/i[1],t[2]=n[2]/i[2]):M(this,this,1/e),this}inverse(e=this){var t,n;return n=e,(t=this)[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],this}len(){return E(this)}distance(e){return e?function(e,t){let n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}(this,e):E(this)}squaredLen(){return T(this)}squaredDistance(e){return e?function(e,t){let n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}(this,e):T(this)}negate(e=this){var t,n;return n=e,(t=this)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],this}cross(e,t){return t?I(this,e,t):I(this,this,e),this}scale(e){return M(this,this,e),this}normalize(){return N(this,this),this}dot(e){return O(this,e)}equals(e){return t=e,this[0]===t[0]&&this[1]===t[1]&&this[2]===t[2];var t}applyMatrix3(e){return function(e,t,n){let i=t[0],r=t[1],o=t[2];e[0]=i*n[0]+r*n[3]+o*n[6],e[1]=i*n[1]+r*n[4]+o*n[7],e[2]=i*n[2]+r*n[5]+o*n[8]}(this,this,e),this}applyMatrix4(e){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[3]*i+n[7]*r+n[11]*o+n[15];s=s||1,e[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/s,e[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/s,e[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/s}(this,this,e),this}scaleRotateMatrix4(e){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[3]*i+n[7]*r+n[11]*o+n[15];s=s||1,e[0]=(n[0]*i+n[4]*r+n[8]*o)/s,e[1]=(n[1]*i+n[5]*r+n[9]*o)/s,e[2]=(n[2]*i+n[6]*r+n[10]*o)/s}(this,this,e),this}applyQuaternion(e){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[0],a=n[1],l=n[2],c=a*o-l*r,u=l*i-s*o,d=s*r-a*i,h=a*d-l*u,p=l*c-s*d,f=s*u-a*c,m=2*n[3];c*=m,u*=m,d*=m,h*=2,p*=2,f*=2,e[0]=i+c+h,e[1]=r+u+p,e[2]=o+d+f}(this,this,e),this}angle(e){return D(this,e)}lerp(e,t){return function(e,t,n,i){let r=t[0],o=t[1],s=t[2];e[0]=r+i*(n[0]-r),e[1]=o+i*(n[1]-o),e[2]=s+i*(n[2]-s)}(this,this,e,t),this}smoothLerp(e,t,n){return function(e,t,n,i,r){const o=Math.exp(-i*r);let s=t[0],a=t[1],l=t[2];e[0]=n[0]+(s-n[0])*o,e[1]=n[1]+(a-n[1])*o,e[2]=n[2]+(l-n[2])*o}(this,this,e,t,n),this}clone(){return new R(this[0],this[1],this[2])}fromArray(e,t=0){return this[0]=e[t],this[1]=e[t+1],this[2]=e[t+2],this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e}transformDirection(e){const t=this[0],n=this[1],i=this[2];return this[0]=e[0]*t+e[4]*n+e[8]*i,this[1]=e[1]*t+e[5]*n+e[9]*i,this[2]=e[2]*t+e[6]*n+e[10]*i,this.normalize()}}const P=new R;let L=1;class F{constructor({canvas:e=document.createElement("canvas"),width:t=300,height:n=150,dpr:i=1,alpha:r=!1,depth:o=!0,stencil:s=!1,antialias:a=!1,premultipliedAlpha:l=!1,preserveDrawingBuffer:c=!1,powerPreference:u="default",autoClear:d=!0,webgl:h=2}={}){const p={alpha:r,depth:o,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u};this.dpr=i,this.alpha=r,this.color=!0,this.depth=o,this.stencil=s,this.premultipliedAlpha=l,this.autoClear=d,this.id=L++,2===h&&(this.gl=e.getContext("webgl2",p)),this.isWebgl2=!!this.gl,this.gl||(this.gl=e.getContext("webgl",p)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(t,n),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(e,t){this.width=e,this.height=t,this.gl.canvas.width=e*this.dpr,this.gl.canvas.height=t*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:e+"px",height:t+"px"})}setViewport(e,t,n=0,i=0){this.state.viewport.width===e&&this.state.viewport.height===t||(this.state.viewport.width=e,this.state.viewport.height=t,this.state.viewport.x=n,this.state.viewport.y=i,this.gl.viewport(n,i,e,t))}setScissor(e,t,n=0,i=0){this.gl.scissor(n,i,e,t)}enable(e){!0!==this.state[e]&&(this.gl.enable(e),this.state[e]=!0)}disable(e){!1!==this.state[e]&&(this.gl.disable(e),this.state[e]=!1)}setBlendFunc(e,t,n,i){this.state.blendFunc.src===e&&this.state.blendFunc.dst===t&&this.state.blendFunc.srcAlpha===n&&this.state.blendFunc.dstAlpha===i||(this.state.blendFunc.src=e,this.state.blendFunc.dst=t,this.state.blendFunc.srcAlpha=n,this.state.blendFunc.dstAlpha=i,void 0!==n?this.gl.blendFuncSeparate(e,t,n,i):this.gl.blendFunc(e,t))}setBlendEquation(e,t){e=e||this.gl.FUNC_ADD,this.state.blendEquation.modeRGB===e&&this.state.blendEquation.modeAlpha===t||(this.state.blendEquation.modeRGB=e,this.state.blendEquation.modeAlpha=t,void 0!==t?this.gl.blendEquationSeparate(e,t):this.gl.blendEquation(e))}setCullFace(e){this.state.cullFace!==e&&(this.state.cullFace=e,this.gl.cullFace(e))}setFrontFace(e){this.state.frontFace!==e&&(this.state.frontFace=e,this.gl.frontFace(e))}setDepthMask(e){this.state.depthMask!==e&&(this.state.depthMask=e,this.gl.depthMask(e))}setDepthFunc(e){this.state.depthFunc!==e&&(this.state.depthFunc=e,this.gl.depthFunc(e))}setStencilMask(e){this.state.stencilMask!==e&&(this.state.stencilMask=e,this.gl.stencilMask(e))}setStencilFunc(e,t,n){this.state.stencilFunc===e&&this.state.stencilRef===t&&this.state.stencilFuncMask===n||(this.state.stencilFunc=e||this.gl.ALWAYS,this.state.stencilRef=t||0,this.state.stencilFuncMask=n||0,this.gl.stencilFunc(e||this.gl.ALWAYS,t||0,n||0))}setStencilOp(e,t,n){this.state.stencilFail===e&&this.state.stencilDepthFail===t&&this.state.stencilDepthPass===n||(this.state.stencilFail=e,this.state.stencilDepthFail=t,this.state.stencilDepthPass=n,this.gl.stencilOp(e,t,n))}activeTexture(e){this.state.activeTextureUnit!==e&&(this.state.activeTextureUnit=e,this.gl.activeTexture(this.gl.TEXTURE0+e))}bindFramebuffer({target:e=this.gl.FRAMEBUFFER,buffer:t=null}={}){this.state.framebuffer!==t&&(this.state.framebuffer=t,this.gl.bindFramebuffer(e,t))}getExtension(e,t,n){return t&&this.gl[t]?this.gl[t].bind(this.gl):(this.extensions[e]||(this.extensions[e]=this.gl.getExtension(e)),t?this.extensions[e]?this.extensions[e][n].bind(this.extensions[e]):null:this.extensions[e])}sortOpaque(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program.id!==t.program.id?e.program.id-t.program.id:e.zDepth!==t.zDepth?e.zDepth-t.zDepth:t.id-e.id}sortTransparent(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.zDepth!==t.zDepth?t.zDepth-e.zDepth:t.id-e.id}sortUI(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program.id!==t.program.id?e.program.id-t.program.id:t.id-e.id}getRenderList({scene:e,camera:t,frustumCull:n,sort:i}){let r=[];if(t&&n&&t.updateFrustum(),e.traverse(e=>{if(!e.visible)return!0;e.draw&&(n&&e.frustumCulled&&t&&!t.frustumIntersectsMesh(e)||r.push(e))}),i){const e=[],n=[],i=[];r.forEach(r=>{r.program.transparent?r.program.depthTest?n.push(r):i.push(r):e.push(r),r.zDepth=0,0===r.renderOrder&&r.program.depthTest&&t&&(r.worldMatrix.getTranslation(P),P.applyMatrix4(t.projectionViewMatrix),r.zDepth=P.z)}),e.sort(this.sortOpaque),n.sort(this.sortTransparent),i.sort(this.sortUI),r=e.concat(n,i)}return r}render({scene:e,camera:t,target:n=null,update:i=!0,sort:r=!0,frustumCull:o=!0,clear:s}){null===n?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(n),this.setViewport(n.width,n.height)),(s||this.autoClear&&!1!==s)&&(!this.depth||n&&!n.depth||(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!n||n.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),i&&e.updateMatrixWorld(),t&&t.updateMatrixWorld(),this.getRenderList({scene:e,camera:t,frustumCull:o,sort:r}).forEach(e=>{e.draw({camera:t})})}}const B=new R;let z=1,j=1,U=!1;class ${constructor(e,t={}){e.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=e,this.attributes=t,this.id=z++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let e in t)this.addAttribute(e,t[e])}addAttribute(e,t){if(this.attributes[e]=t,t.id=j++,t.size=t.size||1,t.type=t.type||(t.data.constructor===Float32Array?this.gl.FLOAT:t.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),t.target="index"===e?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,t.normalized=t.normalized||!1,t.stride=t.stride||0,t.offset=t.offset||0,t.count=t.count||(t.stride?t.data.byteLength/t.stride:t.data.length/t.size),t.divisor=t.instanced||0,t.needsUpdate=!1,t.usage=t.usage||this.gl.STATIC_DRAW,t.buffer||this.updateAttribute(t),t.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==t.count*t.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,t.count*t.divisor);this.instancedCount=t.count*t.divisor}else"index"===e?this.drawRange.count=t.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,t.count))}updateAttribute(e){const t=!e.buffer;t&&(e.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==e.buffer&&(this.gl.bindBuffer(e.target,e.buffer),this.glState.boundBuffer=e.buffer),t?this.gl.bufferData(e.target,e.data,e.usage):this.gl.bufferSubData(e.target,0,e.data),e.needsUpdate=!1}setIndex(e){this.addAttribute("index",e)}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}setInstancedCount(e){this.instancedCount=e}createVAO(e){this.VAOs[e.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.bindAttributes(e)}bindAttributes(e){e.attributeLocations.forEach((e,{name:t,type:n})=>{if(!this.attributes[t])return void console.warn(`active attribute ${t} not being supplied`);const i=this.attributes[t];this.gl.bindBuffer(i.target,i.buffer),this.glState.boundBuffer=i.buffer;let r=1;35674===n&&(r=2),35675===n&&(r=3),35676===n&&(r=4);const o=i.size/r,s=1===r?0:r*r*4,a=1===r?0:4*r;for(let t=0;t<r;t++)this.gl.vertexAttribPointer(e+t,o,i.type,i.normalized,i.stride+s,i.offset+t*a),this.gl.enableVertexAttribArray(e+t),this.gl.renderer.vertexAttribDivisor(e+t,i.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:e,mode:t=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${e.attributeOrder}`&&(this.VAOs[e.attributeOrder]||this.createVAO(e),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${e.attributeOrder}`),e.attributeLocations.forEach((e,{name:t})=>{const n=this.attributes[t];n.needsUpdate&&this.updateAttribute(n)});let n=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(n=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(t,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*n,this.instancedCount):this.gl.renderer.drawArraysInstanced(t,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(t,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*n):this.gl.drawArrays(t,this.drawRange.start,this.drawRange.count)}getPosition(){const e=this.attributes.position;return e.data?e:U?void 0:(console.warn("No position buffer data found to compute bounds"),U=!0)}computeBoundingBox(e){e||(e=this.getPosition());const t=e.data,n=e.size;this.bounds||(this.bounds={min:new R,max:new R,center:new R,scale:new R,radius:1/0});const i=this.bounds.min,r=this.bounds.max,o=this.bounds.center,s=this.bounds.scale;i.set(1/0),r.set(-1/0);for(let e=0,o=t.length;e<o;e+=n){const n=t[e],o=t[e+1],s=t[e+2];i.x=Math.min(n,i.x),i.y=Math.min(o,i.y),i.z=Math.min(s,i.z),r.x=Math.max(n,r.x),r.y=Math.max(o,r.y),r.z=Math.max(s,r.z)}s.sub(r,i),o.add(i,r).divide(2)}computeBoundingSphere(e){e||(e=this.getPosition());const t=e.data,n=e.size;this.bounds||this.computeBoundingBox(e);let i=0;for(let e=0,r=t.length;e<r;e+=n)B.fromArray(t,e),i=Math.max(i,this.bounds.center.squaredDistance(B));this.bounds.radius=Math.sqrt(i)}remove(){for(let e in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[e]),delete this.VAOs[e];for(let e in this.attributes)this.gl.deleteBuffer(this.attributes[e].buffer),delete this.attributes[e]}}class V extends ${constructor(e,{attributes:t={}}={}){Object.assign(t,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(e,t)}}let q=1;const H={};class K{constructor(e,{vertex:t,fragment:n,uniforms:i={},transparent:r=!1,cullFace:o=e.BACK,frontFace:s=e.CCW,depthTest:a=!0,depthWrite:l=!0,depthFunc:c=e.LEQUAL}={}){e.canvas||console.error("gl not passed as first argument to Program"),this.gl=e,this.uniforms=i,this.id=q++,t||console.warn("vertex shader not supplied"),n||console.warn("fragment shader not supplied"),this.transparent=r,this.cullFace=o,this.frontFace=s,this.depthTest=a,this.depthWrite=l,this.depthFunc=c,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=e.createShader(e.VERTEX_SHADER),this.fragmentShader=e.createShader(e.FRAGMENT_SHADER),this.program=e.createProgram(),e.attachShader(this.program,this.vertexShader),e.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:t,fragment:n})}setShaders({vertex:e,fragment:t}){if(e&&(this.gl.shaderSource(this.vertexShader,e),this.gl.compileShader(this.vertexShader),""!==this.gl.getShaderInfoLog(this.vertexShader)&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}\nVertex Shader\n${W(e)}`)),t&&(this.gl.shaderSource(this.fragmentShader,t),this.gl.compileShader(this.fragmentShader),""!==this.gl.getShaderInfoLog(this.fragmentShader)&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}\nFragment Shader\n${W(t)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let n=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let e=0;e<n;e++){let t=this.gl.getActiveUniform(this.program,e);this.uniformLocations.set(t,this.gl.getUniformLocation(this.program,t.name));const n=t.name.match(/(\w+)/g);t.uniformName=n[0],t.nameComponents=n.slice(1)}this.attributeLocations=new Map;const i=[],r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let e=0;e<r;e++){const t=this.gl.getActiveAttrib(this.program,e),n=this.gl.getAttribLocation(this.program,t.name);-1!==n&&(i[n]=t.name,this.attributeLocations.set(t,n))}this.attributeOrder=i.join("")}setBlendFunc(e,t,n,i){this.blendFunc.src=e,this.blendFunc.dst=t,this.blendFunc.srcAlpha=n,this.blendFunc.dstAlpha=i,e&&(this.transparent=!0)}setBlendEquation(e,t){this.blendEquation.modeRGB=e,this.blendEquation.modeAlpha=t}setStencilFunc(e,t,n){this.stencilRef=t,this.stencilFunc.func=e,this.stencilFunc.ref=t,this.stencilFunc.mask=n}setStencilOp(e,t,n){this.stencilOp.stencilFail=e,this.stencilOp.depthFail=t,this.stencilOp.depthPass=n}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:e=!1}={}){let t=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((e,n)=>{let i=this.uniforms[n.uniformName];for(const e of n.nameComponents){if(!i)break;if(!(e in i)){if(Array.isArray(i.value))break;i=void 0;break}i=i[e]}if(!i)return Z(`Active uniform ${n.name} has not been supplied`);if(i&&void 0===i.value)return Z(`${n.name} uniform is missing a value parameter`);if(i.value.texture)return t+=1,i.value.update(t),G(this.gl,n.type,e,t);if(i.value.length&&i.value[0].texture){const r=[];return i.value.forEach(e=>{t+=1,e.update(t),r.push(t)}),G(this.gl,n.type,e,r)}G(this.gl,n.type,e,i.value)}),this.applyState(),e&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function G(e,t,n,i){i=i.length?function(e){const t=e.length,n=e[0].length;if(void 0===n)return e;const i=t*n;let r=H[i];r||(H[i]=r=new Float32Array(i));for(let i=0;i<t;i++)r.set(e[i],i*n);return r}(i):i;const r=e.renderer.state.uniformLocations.get(n);if(i.length)if(void 0===r||r.length!==i.length)e.renderer.state.uniformLocations.set(n,i.slice(0));else{if(function(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}(r,i))return;r.set?r.set(i):function(e,t){for(let n=0,i=e.length;n<i;n++)e[n]=t[n]}(r,i),e.renderer.state.uniformLocations.set(n,r)}else{if(r===i)return;e.renderer.state.uniformLocations.set(n,i)}switch(t){case 5126:return i.length?e.uniform1fv(n,i):e.uniform1f(n,i);case 35664:return e.uniform2fv(n,i);case 35665:return e.uniform3fv(n,i);case 35666:return e.uniform4fv(n,i);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return i.length?e.uniform1iv(n,i):e.uniform1i(n,i);case 35671:case 35667:return e.uniform2iv(n,i);case 35672:case 35668:return e.uniform3iv(n,i);case 35673:case 35669:return e.uniform4iv(n,i);case 35674:return e.uniformMatrix2fv(n,!1,i);case 35675:return e.uniformMatrix3fv(n,!1,i);case 35676:return e.uniformMatrix4fv(n,!1,i)}}function W(e){let t=e.split("\n");for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}let X=0;function Z(e){X>100||(console.warn(e),X++,X>100&&console.warn("More than 100 program warnings - stopping logs."))}function Y(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=n[0],l=n[1],c=n[2],u=n[3];return e[0]=i*u+s*a+r*c-o*l,e[1]=r*u+s*l+o*a-i*c,e[2]=o*u+s*c+i*l-r*a,e[3]=s*u-i*a-r*l-o*c,e}class Q extends Array{constructor(e=0,t=0,n=0,i=1){super(e,t,n,i),this.onChange=()=>{},this._target=this;const r=["0","1","2","3"];return new Proxy(this,{set(e,t){const n=Reflect.set(...arguments);return n&&r.includes(t)&&e.onChange(),n}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set w(e){this._target[3]=e,this.onChange()}identity(){var e;return(e=this._target)[0]=0,e[1]=0,e[2]=0,e[3]=1,this.onChange(),this}set(e,t,n,i){return e.length?this.copy(e):(function(e,t,n,i,r){e[0]=t,e[1]=n,e[2]=i,e[3]=r}(this._target,e,t,n,i),this.onChange(),this)}rotateX(e){return function(e,t,n){n*=.5;let i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);e[0]=i*l+s*a,e[1]=r*l+o*a,e[2]=o*l-r*a,e[3]=s*l-i*a}(this._target,this._target,e),this.onChange(),this}rotateY(e){return function(e,t,n){n*=.5;let i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);e[0]=i*l-o*a,e[1]=r*l+s*a,e[2]=o*l+i*a,e[3]=s*l-r*a}(this._target,this._target,e),this.onChange(),this}rotateZ(e){return function(e,t,n){n*=.5;let i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);e[0]=i*l+r*a,e[1]=r*l-i*a,e[2]=o*l+s*a,e[3]=s*l-o*a}(this._target,this._target,e),this.onChange(),this}inverse(e=this._target){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=n*n+i*i+r*r+o*o,a=s?1/s:0;e[0]=-n*a,e[1]=-i*a,e[2]=-r*a,e[3]=o*a}(this._target,e),this.onChange(),this}conjugate(e=this._target){var t,n;return n=e,(t=this._target)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],this.onChange(),this}copy(e){return t=this._target,n=e,t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],this.onChange(),this;var t,n}normalize(e=this._target){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=n*n+i*i+r*r+o*o;s>0&&(s=1/Math.sqrt(s)),e[0]=n*s,e[1]=i*s,e[2]=r*s,e[3]=o*s}(this._target,e),this.onChange(),this}multiply(e,t){return t?Y(this._target,e,t):Y(this._target,this._target,e),this.onChange(),this}dot(e){return t=this._target,n=e,t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3];var t,n}fromMatrix3(e){return function(e,t){let n,i=t[0]+t[4]+t[8];if(i>0)n=Math.sqrt(i+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{let i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);let r=(i+1)%3,o=(i+2)%3;n=Math.sqrt(t[3*i+i]-t[3*r+r]-t[3*o+o]+1),e[i]=.5*n,n=.5/n,e[3]=(t[3*r+o]-t[3*o+r])*n,e[r]=(t[3*r+i]+t[3*i+r])*n,e[o]=(t[3*o+i]+t[3*i+o])*n}}(this._target,e),this.onChange(),this}fromEuler(e,t){return function(e,t,n="YXZ"){let i=Math.sin(.5*t[0]),r=Math.cos(.5*t[0]),o=Math.sin(.5*t[1]),s=Math.cos(.5*t[1]),a=Math.sin(.5*t[2]),l=Math.cos(.5*t[2]);"XYZ"===n?(e[0]=i*s*l+r*o*a,e[1]=r*o*l-i*s*a,e[2]=r*s*a+i*o*l,e[3]=r*s*l-i*o*a):"YXZ"===n?(e[0]=i*s*l+r*o*a,e[1]=r*o*l-i*s*a,e[2]=r*s*a-i*o*l,e[3]=r*s*l+i*o*a):"ZXY"===n?(e[0]=i*s*l-r*o*a,e[1]=r*o*l+i*s*a,e[2]=r*s*a+i*o*l,e[3]=r*s*l-i*o*a):"ZYX"===n?(e[0]=i*s*l-r*o*a,e[1]=r*o*l+i*s*a,e[2]=r*s*a-i*o*l,e[3]=r*s*l+i*o*a):"YZX"===n?(e[0]=i*s*l+r*o*a,e[1]=r*o*l+i*s*a,e[2]=r*s*a-i*o*l,e[3]=r*s*l-i*o*a):"XZY"===n&&(e[0]=i*s*l-r*o*a,e[1]=r*o*l-i*s*a,e[2]=r*s*a+i*o*l,e[3]=r*s*l+i*o*a)}(this._target,e,e.order),t||this.onChange(),this}fromAxisAngle(e,t){return function(e,t,n){n*=.5;let i=Math.sin(n);e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(n)}(this._target,e,t),this.onChange(),this}slerp(e,t){return function(e,t,n,i){let r,o,s,a,l,c=t[0],u=t[1],d=t[2],h=t[3],p=n[0],f=n[1],m=n[2],g=n[3];o=c*p+u*f+d*m+h*g,o<0&&(o=-o,p=-p,f=-f,m=-m,g=-g),1-o>1e-6?(r=Math.acos(o),s=Math.sin(r),a=Math.sin((1-i)*r)/s,l=Math.sin(i*r)/s):(a=1-i,l=i),e[0]=a*c+l*p,e[1]=a*u+l*f,e[2]=a*d+l*m,e[3]=a*h+l*g}(this._target,this._target,e,t),this.onChange(),this}fromArray(e,t=0){return this._target[0]=e[t],this._target[1]=e[t+1],this._target[2]=e[t+2],this._target[3]=e[t+3],this.onChange(),this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e[t+3]=this[3],e}}function J(e){let t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],p=e[12],f=e[13],m=e[14],g=e[15];return(t*s-n*o)*(d*g-h*m)-(t*a-i*o)*(u*g-h*f)+(t*l-r*o)*(u*m-d*f)+(n*a-i*s)*(c*g-h*p)-(n*l-r*s)*(c*m-d*p)+(i*l-r*a)*(c*f-u*p)}function ee(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],p=t[10],f=t[11],m=t[12],g=t[13],b=t[14],y=t[15],v=n[0],x=n[1],w=n[2],k=n[3];return e[0]=v*i+x*a+w*d+k*m,e[1]=v*r+x*l+w*h+k*g,e[2]=v*o+x*c+w*p+k*b,e[3]=v*s+x*u+w*f+k*y,v=n[4],x=n[5],w=n[6],k=n[7],e[4]=v*i+x*a+w*d+k*m,e[5]=v*r+x*l+w*h+k*g,e[6]=v*o+x*c+w*p+k*b,e[7]=v*s+x*u+w*f+k*y,v=n[8],x=n[9],w=n[10],k=n[11],e[8]=v*i+x*a+w*d+k*m,e[9]=v*r+x*l+w*h+k*g,e[10]=v*o+x*c+w*p+k*b,e[11]=v*s+x*u+w*f+k*y,v=n[12],x=n[13],w=n[14],k=n[15],e[12]=v*i+x*a+w*d+k*m,e[13]=v*r+x*l+w*h+k*g,e[14]=v*o+x*c+w*p+k*b,e[15]=v*s+x*u+w*f+k*y,e}function te(e,t){let n=t[0],i=t[1],r=t[2],o=t[4],s=t[5],a=t[6],l=t[8],c=t[9],u=t[10];return e[0]=Math.hypot(n,i,r),e[1]=Math.hypot(o,s,a),e[2]=Math.hypot(l,c,u),e}const ne=function(){const e=[1,1,1];return function(t,n){let i=e;te(i,n);let r=1/i[0],o=1/i[1],s=1/i[2],a=n[0]*r,l=n[1]*o,c=n[2]*s,u=n[4]*r,d=n[5]*o,h=n[6]*s,p=n[8]*r,f=n[9]*o,m=n[10]*s,g=a+d+m,b=0;return g>0?(b=2*Math.sqrt(g+1),t[3]=.25*b,t[0]=(h-f)/b,t[1]=(p-c)/b,t[2]=(l-u)/b):a>d&&a>m?(b=2*Math.sqrt(1+a-d-m),t[3]=(h-f)/b,t[0]=.25*b,t[1]=(l+u)/b,t[2]=(p+c)/b):d>m?(b=2*Math.sqrt(1+d-a-m),t[3]=(p-c)/b,t[0]=(l+u)/b,t[1]=.25*b,t[2]=(h+f)/b):(b=2*Math.sqrt(1+m-a-d),t[3]=(l-u)/b,t[0]=(p+c)/b,t[1]=(h+f)/b,t[2]=.25*b),t}}();function ie(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e}function re(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}class oe extends Array{constructor(e=1,t=0,n=0,i=0,r=0,o=1,s=0,a=0,l=0,c=0,u=1,d=0,h=0,p=0,f=0,m=1){return super(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(e){this[12]=e}set y(e){this[13]=e}set z(e){this[14]=e}set w(e){this[15]=e}set(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m){return e.length?this.copy(e):(function(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m,g){e[0]=t,e[1]=n,e[2]=i,e[3]=r,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c,e[9]=u,e[10]=d,e[11]=h,e[12]=p,e[13]=f,e[14]=m,e[15]=g}(this,e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m),this)}translate(e,t=this){return function(e,t,n){let i,r,o,s,a,l,c,u,d,h,p,f,m=n[0],g=n[1],b=n[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*b+t[12],e[13]=t[1]*m+t[5]*g+t[9]*b+t[13],e[14]=t[2]*m+t[6]*g+t[10]*b+t[14],e[15]=t[3]*m+t[7]*g+t[11]*b+t[15]):(i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],p=t[10],f=t[11],e[0]=i,e[1]=r,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=h,e[10]=p,e[11]=f,e[12]=i*m+a*g+d*b+t[12],e[13]=r*m+l*g+h*b+t[13],e[14]=o*m+c*g+p*b+t[14],e[15]=s*m+u*g+f*b+t[15])}(this,t,e),this}rotate(e,t,n=this){return function(e,t,n,i){let r,o,s,a,l,c,u,d,h,p,f,m,g,b,y,v,x,w,k,_,E,S,A,C,M=i[0],T=i[1],N=i[2],O=Math.hypot(M,T,N);Math.abs(O)<1e-6||(O=1/O,M*=O,T*=O,N*=O,r=Math.sin(n),o=Math.cos(n),s=1-o,a=t[0],l=t[1],c=t[2],u=t[3],d=t[4],h=t[5],p=t[6],f=t[7],m=t[8],g=t[9],b=t[10],y=t[11],v=M*M*s+o,x=T*M*s+N*r,w=N*M*s-T*r,k=M*T*s-N*r,_=T*T*s+o,E=N*T*s+M*r,S=M*N*s+T*r,A=T*N*s-M*r,C=N*N*s+o,e[0]=a*v+d*x+m*w,e[1]=l*v+h*x+g*w,e[2]=c*v+p*x+b*w,e[3]=u*v+f*x+y*w,e[4]=a*k+d*_+m*E,e[5]=l*k+h*_+g*E,e[6]=c*k+p*_+b*E,e[7]=u*k+f*_+y*E,e[8]=a*S+d*A+m*C,e[9]=l*S+h*A+g*C,e[10]=c*S+p*A+b*C,e[11]=u*S+f*A+y*C,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]))}(this,n,e,t),this}scale(e,t=this){return function(e,t,n){let i=n[0],r=n[1],o=n[2];e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]}(this,t,"number"==typeof e?[e,e,e]:e),this}add(e,t){return t?ie(this,e,t):ie(this,this,e),this}sub(e,t){return t?re(this,e,t):re(this,this,e),this}multiply(e,t){var n,i,r;return e.length?t?ee(this,e,t):ee(this,this,e):(i=this,r=e,(n=this)[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=i[3]*r,n[4]=i[4]*r,n[5]=i[5]*r,n[6]=i[6]*r,n[7]=i[7]*r,n[8]=i[8]*r,n[9]=i[9]*r,n[10]=i[10]*r,n[11]=i[11]*r,n[12]=i[12]*r,n[13]=i[13]*r,n[14]=i[14]*r,n[15]=i[15]*r),this}identity(){var e;return(e=this)[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}copy(e){var t,n;return n=e,(t=this)[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}fromPerspective({fov:e,aspect:t,near:n,far:i}={}){return function(e,t,n,i,r){let o=1/Math.tan(t/2),s=1/(i-r);e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+i)*s,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*i*s,e[15]=0}(this,e,t,n,i),this}fromOrthogonal({left:e,right:t,bottom:n,top:i,near:r,far:o}){return function(e,t,n,i,r,o,s){let a=1/(t-n),l=1/(i-r),c=1/(o-s);e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*a,e[13]=(r+i)*l,e[14]=(s+o)*c,e[15]=1}(this,e,t,n,i,r,o),this}fromQuaternion(e){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,d=i*a,h=r*s,p=r*a,f=r*l,m=o*s,g=o*a,b=o*l;e[0]=1-d-f,e[1]=u+b,e[2]=h-g,e[3]=0,e[4]=u-b,e[5]=1-c-f,e[6]=p+m,e[7]=0,e[8]=h+g,e[9]=p-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1}(this,e),this}setPosition(e){return this.x=e[0],this.y=e[1],this.z=e[2],this}inverse(e=this){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],p=t[11],f=t[12],m=t[13],g=t[14],b=t[15],y=n*a-i*s,v=n*l-r*s,x=n*c-o*s,w=i*l-r*a,k=i*c-o*a,_=r*c-o*l,E=u*m-d*f,S=u*g-h*f,A=u*b-p*f,C=d*g-h*m,M=d*b-p*m,T=h*b-p*g,N=y*T-v*M+x*C+w*A-k*S+_*E;N&&(N=1/N,e[0]=(a*T-l*M+c*C)*N,e[1]=(r*M-i*T-o*C)*N,e[2]=(m*_-g*k+b*w)*N,e[3]=(h*k-d*_-p*w)*N,e[4]=(l*A-s*T-c*S)*N,e[5]=(n*T-r*A+o*S)*N,e[6]=(g*x-f*_-b*v)*N,e[7]=(u*_-h*x+p*v)*N,e[8]=(s*M-a*A+c*E)*N,e[9]=(i*A-n*M-o*E)*N,e[10]=(f*k-m*x+b*y)*N,e[11]=(d*x-u*k-p*y)*N,e[12]=(a*S-s*C-l*E)*N,e[13]=(n*C-i*S+r*E)*N,e[14]=(m*v-f*w-g*y)*N,e[15]=(u*w-d*v+h*y)*N)}(this,e),this}compose(e,t,n){return function(e,t,n,i){const r=e,o=t[0],s=t[1],a=t[2],l=t[3],c=o+o,u=s+s,d=a+a,h=o*c,p=o*u,f=o*d,m=s*u,g=s*d,b=a*d,y=l*c,v=l*u,x=l*d,w=i[0],k=i[1],_=i[2];r[0]=(1-(m+b))*w,r[1]=(p+x)*w,r[2]=(f-v)*w,r[3]=0,r[4]=(p-x)*k,r[5]=(1-(h+b))*k,r[6]=(g+y)*k,r[7]=0,r[8]=(f+v)*_,r[9]=(g-y)*_,r[10]=(1-(h+m))*_,r[11]=0,r[12]=n[0],r[13]=n[1],r[14]=n[2],r[15]=1}(this,e,t,n),this}decompose(e,t,n){return function(e,t,n,i){let r=E([e[0],e[1],e[2]]);const o=E([e[4],e[5],e[6]]),s=E([e[8],e[9],e[10]]);J(e)<0&&(r=-r),n[0]=e[12],n[1]=e[13],n[2]=e[14];const a=e.slice(),l=1/r,c=1/o,u=1/s;a[0]*=l,a[1]*=l,a[2]*=l,a[4]*=c,a[5]*=c,a[6]*=c,a[8]*=u,a[9]*=u,a[10]*=u,ne(t,a),i[0]=r,i[1]=o,i[2]=s}(this,e,t,n),this}getRotation(e){return ne(e,this),this}getTranslation(e){var t,n;return n=this,(t=e)[0]=n[12],t[1]=n[13],t[2]=n[14],this}getScaling(e){return te(e,this),this}getMaxScaleOnAxis(){return function(e){let t=e[0],n=e[1],i=e[2],r=e[4],o=e[5],s=e[6],a=e[8],l=e[9],c=e[10];const u=t*t+n*n+i*i,d=r*r+o*o+s*s,h=a*a+l*l+c*c;return Math.sqrt(Math.max(u,d,h))}(this)}lookAt(e,t,n){return function(e,t,n,i){let r=t[0],o=t[1],s=t[2],a=i[0],l=i[1],c=i[2],u=r-n[0],d=o-n[1],h=s-n[2],p=u*u+d*d+h*h;0===p?h=1:(p=1/Math.sqrt(p),u*=p,d*=p,h*=p);let f=l*h-c*d,m=c*u-a*h,g=a*d-l*u;p=f*f+m*m+g*g,0===p&&(c?a+=1e-6:l?c+=1e-6:l+=1e-6,f=l*h-c*d,m=c*u-a*h,g=a*d-l*u,p=f*f+m*m+g*g),p=1/Math.sqrt(p),f*=p,m*=p,g*=p,e[0]=f,e[1]=m,e[2]=g,e[3]=0,e[4]=d*g-h*m,e[5]=h*f-u*g,e[6]=u*m-d*f,e[7]=0,e[8]=u,e[9]=d,e[10]=h,e[11]=0,e[12]=r,e[13]=o,e[14]=s,e[15]=1}(this,e,t,n),this}determinant(){return J(this)}fromArray(e,t=0){return this[0]=e[t],this[1]=e[t+1],this[2]=e[t+2],this[3]=e[t+3],this[4]=e[t+4],this[5]=e[t+5],this[6]=e[t+6],this[7]=e[t+7],this[8]=e[t+8],this[9]=e[t+9],this[10]=e[t+10],this[11]=e[t+11],this[12]=e[t+12],this[13]=e[t+13],this[14]=e[t+14],this[15]=e[t+15],this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e[t+3]=this[3],e[t+4]=this[4],e[t+5]=this[5],e[t+6]=this[6],e[t+7]=this[7],e[t+8]=this[8],e[t+9]=this[9],e[t+10]=this[10],e[t+11]=this[11],e[t+12]=this[12],e[t+13]=this[13],e[t+14]=this[14],e[t+15]=this[15],e}}const se=new oe;class ae extends Array{constructor(e=0,t=e,n=e,i="YXZ"){super(e,t,n),this.order=i,this.onChange=()=>{},this._target=this;const r=["0","1","2"];return new Proxy(this,{set(e,t){const n=Reflect.set(...arguments);return n&&r.includes(t)&&e.onChange(),n}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set(e,t=e,n=e){return e.length?this.copy(e):(this._target[0]=e,this._target[1]=t,this._target[2]=n,this.onChange(),this)}copy(e){return this._target[0]=e[0],this._target[1]=e[1],this._target[2]=e[2],this.onChange(),this}reorder(e){return this._target.order=e,this.onChange(),this}fromRotationMatrix(e,t=this.order){return function(e,t,n="YXZ"){"XYZ"===n?(e[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(e[0]=Math.atan2(-t[9],t[10]),e[2]=Math.atan2(-t[4],t[0])):(e[0]=Math.atan2(t[6],t[5]),e[2]=0)):"YXZ"===n?(e[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(e[1]=Math.atan2(t[8],t[10]),e[2]=Math.atan2(t[1],t[5])):(e[1]=Math.atan2(-t[2],t[0]),e[2]=0)):"ZXY"===n?(e[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(e[1]=Math.atan2(-t[2],t[10]),e[2]=Math.atan2(-t[4],t[5])):(e[1]=0,e[2]=Math.atan2(t[1],t[0]))):"ZYX"===n?(e[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(e[0]=Math.atan2(t[6],t[10]),e[2]=Math.atan2(t[1],t[0])):(e[0]=0,e[2]=Math.atan2(-t[4],t[5]))):"YZX"===n?(e[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(e[0]=Math.atan2(-t[9],t[5]),e[1]=Math.atan2(-t[2],t[0])):(e[0]=0,e[1]=Math.atan2(t[8],t[10]))):"XZY"===n&&(e[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(e[0]=Math.atan2(t[6],t[5]),e[1]=Math.atan2(t[8],t[0])):(e[0]=Math.atan2(-t[9],t[10]),e[1]=0))}(this._target,e,t),this.onChange(),this}fromQuaternion(e,t=this.order,n){return se.fromQuaternion(e),this._target.fromRotationMatrix(se,t),n||this.onChange(),this}fromArray(e,t=0){return this._target[0]=e[t],this._target[1]=e[t+1],this._target[2]=e[t+2],this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e}}class le{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new oe,this.worldMatrix=new oe,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new R,this.quaternion=new Q,this.scale=new R(1),this.rotation=new ae,this.up=new R(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(e,t=!0){this.parent&&e!==this.parent&&this.parent.removeChild(this,!1),this.parent=e,t&&e&&e.addChild(this,!1)}addChild(e,t=!0){~this.children.indexOf(e)||this.children.push(e),t&&e.setParent(this,!1)}removeChild(e,t=!0){~this.children.indexOf(e)&&this.children.splice(this.children.indexOf(e),1),t&&e.setParent(null,!1)}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||e)&&(null===this.parent?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,e=!0);for(let t=0,n=this.children.length;t<n;t++)this.children[t].updateMatrixWorld(e)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(e){if(!e(this))for(let t=0,n=this.children.length;t<n;t++)this.children[t].traverse(e)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(e,t=!1){t?this.matrix.lookAt(this.position,e,this.up):this.matrix.lookAt(e,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function ce(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=n[0],p=n[1],f=n[2],m=n[3],g=n[4],b=n[5],y=n[6],v=n[7],x=n[8];return e[0]=h*i+p*s+f*c,e[1]=h*r+p*a+f*u,e[2]=h*o+p*l+f*d,e[3]=m*i+g*s+b*c,e[4]=m*r+g*a+b*u,e[5]=m*o+g*l+b*d,e[6]=y*i+v*s+x*c,e[7]=y*r+v*a+x*u,e[8]=y*o+v*l+x*d,e}class ue extends Array{constructor(e=1,t=0,n=0,i=0,r=1,o=0,s=0,a=0,l=1){return super(e,t,n,i,r,o,s,a,l),this}set(e,t,n,i,r,o,s,a,l){return e.length?this.copy(e):(function(e,t,n,i,r,o,s,a,l,c){e[0]=t,e[1]=n,e[2]=i,e[3]=r,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c}(this,e,t,n,i,r,o,s,a,l),this)}translate(e,t=this){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=n[0],p=n[1];e[0]=i,e[1]=r,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=h*i+p*s+c,e[7]=h*r+p*a+u,e[8]=h*o+p*l+d}(this,t,e),this}rotate(e,t=this){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=Math.sin(n),p=Math.cos(n);e[0]=p*i+h*s,e[1]=p*r+h*a,e[2]=p*o+h*l,e[3]=p*s-h*i,e[4]=p*a-h*r,e[5]=p*l-h*o,e[6]=c,e[7]=u,e[8]=d}(this,t,e),this}scale(e,t=this){return function(e,t,n){let i=n[0],r=n[1];e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8]}(this,t,e),this}multiply(e,t){return t?ce(this,e,t):ce(this,this,e),this}identity(){var e;return(e=this)[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,this}copy(e){var t,n;return n=e,(t=this)[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}fromMatrix4(e){var t,n;return n=e,(t=this)[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],this}fromQuaternion(e){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,d=i*a,h=r*s,p=r*a,f=r*l,m=o*s,g=o*a,b=o*l;e[0]=1-d-f,e[3]=u-b,e[6]=h+g,e[1]=u+b,e[4]=1-c-f,e[7]=p-m,e[2]=h-g,e[5]=p+m,e[8]=1-c-d}(this,e),this}fromBasis(e,t,n){return this.set(e[0],e[1],e[2],t[0],t[1],t[2],n[0],n[1],n[2]),this}inverse(e=this){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=u*s-a*c,h=-u*o+a*l,p=c*o-s*l,f=n*d+i*h+r*p;f&&(f=1/f,e[0]=d*f,e[1]=(-u*i+r*c)*f,e[2]=(a*i-r*s)*f,e[3]=h*f,e[4]=(u*n-r*l)*f,e[5]=(-a*n+r*o)*f,e[6]=p*f,e[7]=(-c*n+i*l)*f,e[8]=(s*n-i*o)*f)}(this,e),this}getNormalMatrix(e){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],p=t[11],f=t[12],m=t[13],g=t[14],b=t[15],y=n*a-i*s,v=n*l-r*s,x=n*c-o*s,w=i*l-r*a,k=i*c-o*a,_=r*c-o*l,E=u*m-d*f,S=u*g-h*f,A=u*b-p*f,C=d*g-h*m,M=d*b-p*m,T=h*b-p*g,N=y*T-v*M+x*C+w*A-k*S+_*E;N&&(N=1/N,e[0]=(a*T-l*M+c*C)*N,e[1]=(l*A-s*T-c*S)*N,e[2]=(s*M-a*A+c*E)*N,e[3]=(r*M-i*T-o*C)*N,e[4]=(n*T-r*A+o*S)*N,e[5]=(i*A-n*M-o*E)*N,e[6]=(m*_-g*k+b*w)*N,e[7]=(g*x-f*_-b*v)*N,e[8]=(f*k-m*x+b*y)*N)}(this,e),this}}let de=0;class he extends le{constructor(e,{geometry:t,program:n,mode:i=e.TRIANGLES,frustumCulled:r=!0,renderOrder:o=0}={}){super(),e.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=e,this.id=de++,this.geometry=t,this.program=n,this.mode=i,this.frustumCulled=r,this.renderOrder=o,this.modelViewMatrix=new oe,this.normalMatrix=new ue,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(e){return this.beforeRenderCallbacks.push(e),this}onAfterRender(e){return this.afterRenderCallbacks.push(e),this}draw({camera:e}={}){e&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=e.projectionMatrix,this.program.uniforms.cameraPosition.value=e.worldPosition,this.program.uniforms.viewMatrix.value=e.viewMatrix,this.modelViewMatrix.multiply(e.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(t=>t&&t({mesh:this,camera:e}));let t=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:t}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(t=>t&&t({mesh:this,camera:e}))}}function pe({hue:e=0,hoverIntensity:n=.2,rotateOnHover:i=!1,forceHoverState:r=!1}){const o=g(null);return d(()=>{const t=o.current;if(!t)return;const s=new F({alpha:!0,premultipliedAlpha:!1}),a=s.gl;a.clearColor(0,0,0,0),t.appendChild(a.canvas);const l=new V(a),c=new K(a,{vertex:"\n precision highp float;\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 0.0, 1.0);\n }\n ",fragment:"\n precision highp float;\n\n uniform float iTime;\n uniform vec3 iResolution;\n uniform float hue;\n uniform float hover;\n uniform float rot;\n uniform float hoverIntensity;\n varying vec2 vUv;\n\n vec3 rgb2yiq(vec3 c) {\n float y = dot(c, vec3(0.299, 0.587, 0.114));\n float i = dot(c, vec3(0.596, -0.274, -0.322));\n float q = dot(c, vec3(0.211, -0.523, 0.312));\n return vec3(y, i, q);\n }\n \n vec3 yiq2rgb(vec3 c) {\n float r = c.x + 0.956 * c.y + 0.621 * c.z;\n float g = c.x - 0.272 * c.y - 0.647 * c.z;\n float b = c.x - 1.106 * c.y + 1.703 * c.z;\n return vec3(r, g, b);\n }\n \n vec3 adjustHue(vec3 color, float hueDeg) {\n float hueRad = hueDeg * 3.14159265 / 180.0;\n vec3 yiq = rgb2yiq(color);\n float cosA = cos(hueRad);\n float sinA = sin(hueRad);\n float i = yiq.y * cosA - yiq.z * sinA;\n float q = yiq.y * sinA + yiq.z * cosA;\n yiq.y = i;\n yiq.z = q;\n return yiq2rgb(yiq);\n }\n \n vec3 hash33(vec3 p3) {\n p3 = fract(p3 * vec3(0.1031, 0.11369, 0.13787));\n p3 += dot(p3, p3.yxz + 19.19);\n return -1.0 + 2.0 * fract(vec3(\n p3.x + p3.y,\n p3.x + p3.z,\n p3.y + p3.z\n ) * p3.zyx);\n }\n \n float snoise3(vec3 p) {\n const float K1 = 0.333333333;\n const float K2 = 0.166666667;\n vec3 i = floor(p + (p.x + p.y + p.z) * K1);\n vec3 d0 = p - (i - (i.x + i.y + i.z) * K2);\n vec3 e = step(vec3(0.0), d0 - d0.yzx);\n vec3 i1 = e * (1.0 - e.zxy);\n vec3 i2 = 1.0 - e.zxy * (1.0 - e);\n vec3 d1 = d0 - (i1 - K2);\n vec3 d2 = d0 - (i2 - K1);\n vec3 d3 = d0 - 0.5;\n vec4 h = max(0.6 - vec4(\n dot(d0, d0),\n dot(d1, d1),\n dot(d2, d2),\n dot(d3, d3)\n ), 0.0);\n vec4 n = h * h * h * h * vec4(\n dot(d0, hash33(i)),\n dot(d1, hash33(i + i1)),\n dot(d2, hash33(i + i2)),\n dot(d3, hash33(i + 1.0))\n );\n return dot(vec4(31.316), n);\n }\n \n vec4 extractAlpha(vec3 colorIn) {\n float a = max(max(colorIn.r, colorIn.g), colorIn.b);\n return vec4(colorIn.rgb / (a + 1e-5), a);\n }\n \n const vec3 baseColor1 = vec3(0.611765, 0.262745, 0.996078);\n const vec3 baseColor2 = vec3(0.298039, 0.760784, 0.913725);\n const vec3 baseColor3 = vec3(0.062745, 0.078431, 0.600000);\n const float innerRadius = 0.6;\n const float noiseScale = 0.65;\n \n float light1(float intensity, float attenuation, float dist) {\n return intensity / (1.0 + dist * attenuation);\n }\n \n float light2(float intensity, float attenuation, float dist) {\n return intensity / (1.0 + dist * dist * attenuation);\n }\n \n vec4 draw(vec2 uv) {\n vec3 color1 = adjustHue(baseColor1, hue);\n vec3 color2 = adjustHue(baseColor2, hue);\n vec3 color3 = adjustHue(baseColor3, hue);\n \n float ang = atan(uv.y, uv.x);\n float len = length(uv);\n float invLen = len > 0.0 ? 1.0 / len : 0.0;\n \n float n0 = snoise3(vec3(uv * noiseScale, iTime * 0.5)) * 0.5 + 0.5;\n float r0 = mix(mix(innerRadius, 1.0, 0.4), mix(innerRadius, 1.0, 0.6), n0);\n float d0 = distance(uv, (r0 * invLen) * uv);\n float v0 = light1(1.0, 10.0, d0);\n v0 *= smoothstep(r0 * 1.05, r0, len);\n float cl = cos(ang + iTime * 2.0) * 0.5 + 0.5;\n \n float a = iTime * -1.0;\n vec2 pos = vec2(cos(a), sin(a)) * r0;\n float d = distance(uv, pos);\n float v1 = light2(1.5, 5.0, d);\n v1 *= light1(1.0, 50.0, d0);\n \n float v2 = smoothstep(1.0, mix(innerRadius, 1.0, n0 * 0.5), len);\n float v3 = smoothstep(innerRadius, mix(innerRadius, 1.0, 0.5), len);\n \n vec3 col = mix(color1, color2, cl);\n col = mix(color3, col, v0);\n col = (col + v1) * v2 * v3;\n col = clamp(col, 0.0, 1.0);\n \n return extractAlpha(col);\n }\n \n vec4 mainImage(vec2 fragCoord) {\n vec2 center = iResolution.xy * 0.5;\n float size = min(iResolution.x, iResolution.y);\n vec2 uv = (fragCoord - center) / size * 2.0;\n \n float angle = rot;\n float s = sin(angle);\n float c = cos(angle);\n uv = vec2(c * uv.x - s * uv.y, s * uv.x + c * uv.y);\n \n uv.x += hover * hoverIntensity * 0.1 * sin(uv.y * 10.0 + iTime);\n uv.y += hover * hoverIntensity * 0.1 * sin(uv.x * 10.0 + iTime);\n \n return draw(uv);\n }\n \n void main() {\n vec2 fragCoord = vUv * iResolution.xy;\n vec4 col = mainImage(fragCoord);\n gl_FragColor = vec4(col.rgb * col.a, col.a);\n }\n ",uniforms:{iTime:{value:0},iResolution:{value:new R(a.canvas.width,a.canvas.height,a.canvas.width/a.canvas.height)},hue:{value:e},hover:{value:0},rot:{value:0},hoverIntensity:{value:n}}}),u=new he(a,{geometry:l,program:c});function d(){if(!t)return;const e=window.devicePixelRatio||1,n=t.clientWidth,i=t.clientHeight,r=Math.min(n,i);s.setSize(r*e,r*e),a.canvas.style.width=r+"px",a.canvas.style.height=r+"px",a.canvas.style.display="block",a.canvas.style.objectFit="contain",c.uniforms.iResolution.value.set(r*e,r*e,r*e/(r*e))}window.addEventListener("resize",d),d();let h=0,p=0,f=0;const m=e=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,r=e.clientY-n.top,o=n.width,s=n.height,a=Math.min(o,s),l=(i-o/2)/a*2,c=(r-s/2)/a*2;h=Math.sqrt(l*l+c*c)<.8?1:0},g=()=>{h=0};let b;t.addEventListener("mousemove",m),t.addEventListener("mouseleave",g);const y=t=>{b=requestAnimationFrame(y);const o=.001*(t-p);p=t,c.uniforms.iTime.value=.001*t,c.uniforms.hue.value=e,c.uniforms.hoverIntensity.value=n;const a=r?1:h;c.uniforms.hover.value+=.1*(a-c.uniforms.hover.value),i&&a>.5&&(f+=.3*o),c.uniforms.rot.value=f,s.render({scene:u})};return b=requestAnimationFrame(y),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",d),t.removeEventListener("mousemove",m),t.removeEventListener("mouseleave",g),t.removeChild(a.canvas),a.getExtension("WEBGL_lose_context")?.loseContext()}},[e,n,i,r]),t("div",{ref:o,className:"orb-container"})}function fe(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy((...t)=>e(...t),{get:(n,i)=>"create"===i?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function me(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const ge=e=>Array.isArray(e);function be(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function ye(e){return"string"==typeof e||Array.isArray(e)}function ve(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function xe(e,t,n,i){if("function"==typeof t){const[r,o]=ve(i);t=t(void 0!==n?n:e.custom,r,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[r,o]=ve(i);t=t(void 0!==n?n:e.custom,r,o)}return t}function we(e,t,n){const i=e.getProps();return xe(i,t,void 0!==n?n:i.custom,e)}const ke=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_e=["initial",...ke];function Ee(e){let t;return()=>(void 0===t&&(t=e()),t)}const Se=Ee(()=>void 0!==window.ScrollTimeline);class Ae{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map(n=>Se()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0);return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Ce extends Ae{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function Me(e,t){return e?e[t]||e.default||e:void 0}const Te=2e4;function Ne(e){let t=0,n=e.next(t);for(;!n.done&&t<Te;)t+=50,n=e.next(t);return t>=Te?1/0:t}function Oe(e){return"function"==typeof e}function Ie(e,t){e.timeline=t,e.onfinish=null}const De=e=>Array.isArray(e)&&"number"==typeof e[0],Re={linearEasing:void 0};function Pe(e,t){const n=Ee(e);return()=>{var e;return null!==(e=Re[t])&&void 0!==e?e:n()}}const Le=Pe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Fe=(e,t,n)=>{const i=t-e;return 0===i?1:(n-e)/i},Be=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let t=0;t<r;t++)i+=e(Fe(0,r-1,t))+", ";return`linear(${i.substring(0,i.length-2)})`};function ze(e){return Boolean("function"==typeof e&&Le()||!e||"string"==typeof e&&(e in Ue||Le())||De(e)||Array.isArray(e)&&e.every(ze))}const je=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Ue={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:je([0,.65,.55,1]),circOut:je([.55,0,1,.45]),backIn:je([.31,.01,.66,-.59]),backOut:je([.33,1.53,.69,.99])};function $e(e,t){return e?"function"==typeof e&&Le()?Be(e,t):De(e)?je(e):Array.isArray(e)?e.map(e=>$e(e,t)||Ue.easeOut):Ue[e]:void 0}const Ve={x:!1,y:!1};function qe(){return Ve.x||Ve.y}function He(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}function Ke(e){return t=>{"touch"===t.pointerType||qe()||e(t)}}const Ge=(e,t)=>!!t&&(e===t||Ge(e,t.parentElement)),We=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Xe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),Ze=new WeakSet;function Ye(e){return t=>{"Enter"===t.key&&e(t)}}function Qe(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Je(e){return We(e)&&!qe()}const et=e=>1e3*e,tt=e=>e/1e3,nt=e=>e,it=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rt=new Set(it),ot=new Set(["width","height","top","left","right","bottom",...it]),st=e=>ge(e)?e[e.length-1]||0:e,at=["read","resolveKeyframes","update","preRender","render","postRender"];function lt(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=at.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,r=!1,s=!1)=>{const a=s&&i?t:n;return r&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,i?r=!0:(i=!0,[t,n]=[n,t],t.forEach(a),t.clear(),i=!1,r&&(r=!1,l.process(e)))}};return l}(o),e),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,p=()=>{const o=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1),r.timestamp=o,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),h.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(p))};return{schedule:at.reduce((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(p)),a.schedule(t,o,s)),t},{}),cancel:e=>{for(let t=0;t<at.length;t++)s[at[t]].cancel(e)},state:r,steps:s}}const{schedule:ct,cancel:ut,state:dt,steps:ht}=lt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:nt,!0);let pt;function ft(){pt=void 0}const mt={now:()=>(void 0===pt&&mt.set(dt.isProcessing?dt.timestamp:performance.now()),pt),set:e=>{pt=e,queueMicrotask(ft)}};function gt(e,t){-1===e.indexOf(t)&&e.push(t)}function bt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class yt{constructor(){this.subscriptions=[]}add(e){return gt(this.subscriptions,e),()=>bt(this.subscriptions,e)}notify(e,t,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function vt(e,t){return t?e*(1e3/t):0}const xt={current:void 0};class wt{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=mt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=mt.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new yt);const n=this.events[e].add(t);return"change"===e?()=>{n(),ct.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return xt.current&&xt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=mt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return vt(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function kt(e,t){return new wt(e,t)}function _t(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kt(n))}const Et=e=>Boolean(e&&e.getVelocity);function St(e,t){const n=e.getValue("willChange");if(i=n,Boolean(Et(i)&&i.add))return n.add(t);var i}const At=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ct="data-"+At("framerAppearId");function Mt(e){return e.props[Ct]}const Tt=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Nt(e,t,n,i){if(e===t&&n===i)return nt;return r=>0===r||1===r?r:Tt(function(e,t,n,i,r){let o,s,a=0;do{s=t+(n-t)/2,o=Tt(s,i,r)-e,o>0?n=s:t=s}while(Math.abs(o)>1e-7&&++a<12);return s}(r,0,1,e,n),t,i)}const Ot=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,It=e=>t=>1-e(1-t),Dt=Nt(.33,1.53,.69,.99),Rt=It(Dt),Pt=Ot(Rt),Lt=e=>(e*=2)<1?.5*Rt(e):.5*(2-Math.pow(2,-10*(e-1))),Ft=e=>1-Math.sin(Math.acos(e)),Bt=It(Ft),zt=Ot(Ft),jt=e=>/^0[^.\s]+$/u.test(e);function Ut(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||jt(e)}const $t=(e,t,n)=>n>t?t:n<e?e:n,Vt={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},qt={...Vt,transform:e=>$t(0,1,e)},Ht={...Vt,default:1},Kt=e=>Math.round(1e5*e)/1e5,Gt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Wt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xt=(e,t)=>n=>Boolean("string"==typeof n&&Wt.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zt=(e,t,n)=>i=>{if("string"!=typeof i)return i;const[r,o,s,a]=i.match(Gt);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Yt={...Vt,transform:e=>Math.round((e=>$t(0,255,e))(e))},Qt={test:Xt("rgb","red"),parse:Zt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Yt.transform(e)+", "+Yt.transform(t)+", "+Yt.transform(n)+", "+Kt(qt.transform(i))+")"},Jt={test:Xt("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:Qt.transform},en=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),tn=en("deg"),nn=en("%"),rn=en("px"),on=en("vh"),sn=en("vw"),an={...nn,parse:e=>nn.parse(e)/100,transform:e=>nn.transform(100*e)},ln={test:Xt("hsl","hue"),parse:Zt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+nn.transform(Kt(t))+", "+nn.transform(Kt(n))+", "+Kt(qt.transform(i))+")"},cn={test:e=>Qt.test(e)||Jt.test(e)||ln.test(e),parse:e=>Qt.test(e)?Qt.parse(e):ln.test(e)?ln.parse(e):Jt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Qt.transform(e):ln.transform(e)},un=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,dn="number",hn="color",pn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fn(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const s=t.replace(pn,e=>(cn.test(e)?(i.color.push(o),r.push(hn),n.push(cn.parse(e))):e.startsWith("var(")?(i.var.push(o),r.push("var"),n.push(e)):(i.number.push(o),r.push(dn),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:s,indexes:i,types:r}}function mn(e){return fn(e).values}function gn(e){const{split:t,types:n}=fn(e),i=t.length;return e=>{let r="";for(let o=0;o<i;o++)if(r+=t[o],void 0!==e[o]){const t=n[o];r+=t===dn?Kt(e[o]):t===hn?cn.transform(e[o]):e[o]}return r}}const bn=e=>"number"==typeof e?0:e,yn={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Gt))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(un))||void 0===n?void 0:n.length)||0)>0},parse:mn,createTransformer:gn,getAnimatableNone:function(e){const t=mn(e);return gn(e)(t.map(bn))}},vn=new Set(["brightness","contrast","saturate","opacity"]);function xn(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[i]=n.match(Gt)||[];if(!i)return e;const r=n.replace(i,"");let o=vn.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const wn=/\b([a-z-]*)\(.*?\)/gu,kn={...yn,getAnimatableNone:e=>{const t=e.match(wn);return t?t.map(xn).join(" "):e}},_n={borderWidth:rn,borderTopWidth:rn,borderRightWidth:rn,borderBottomWidth:rn,borderLeftWidth:rn,borderRadius:rn,radius:rn,borderTopLeftRadius:rn,borderTopRightRadius:rn,borderBottomRightRadius:rn,borderBottomLeftRadius:rn,width:rn,maxWidth:rn,height:rn,maxHeight:rn,top:rn,right:rn,bottom:rn,left:rn,padding:rn,paddingTop:rn,paddingRight:rn,paddingBottom:rn,paddingLeft:rn,margin:rn,marginTop:rn,marginRight:rn,marginBottom:rn,marginLeft:rn,backgroundPositionX:rn,backgroundPositionY:rn},En={rotate:tn,rotateX:tn,rotateY:tn,rotateZ:tn,scale:Ht,scaleX:Ht,scaleY:Ht,scaleZ:Ht,skew:tn,skewX:tn,skewY:tn,distance:rn,translateX:rn,translateY:rn,translateZ:rn,x:rn,y:rn,z:rn,perspective:rn,transformPerspective:rn,opacity:qt,originX:an,originY:an,originZ:rn},Sn={...Vt,transform:Math.round},An={..._n,...En,zIndex:Sn,size:rn,fillOpacity:qt,strokeOpacity:qt,numOctaves:Sn},Cn={...An,color:cn,backgroundColor:cn,outlineColor:cn,fill:cn,stroke:cn,borderColor:cn,borderTopColor:cn,borderRightColor:cn,borderBottomColor:cn,borderLeftColor:cn,filter:kn,WebkitFilter:kn},Mn=e=>Cn[e];function Tn(e,t){let n=Mn(e);return n!==kn&&(n=yn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Nn=new Set(["auto","none","0"]),On=e=>e===Vt||e===rn,In=(e,t)=>parseFloat(e.split(", ")[t]),Dn=(e,t)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return In(r[1],t);{const t=i.match(/^matrix\((.+)\)$/u);return t?In(t[1],e):0}},Rn=new Set(["x","y","z"]),Pn=it.filter(e=>!Rn.has(e)),Ln={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Dn(4,13),y:Dn(5,14)};Ln.translateX=Ln.x,Ln.translateY=Ln.y;const Fn=new Set;let Bn=!1,zn=!1;function jn(){if(zn){const e=Array.from(Fn).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Pn.forEach(n=>{const i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var i;null===(i=e.getValue(t))||void 0===i||i.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}zn=!1,Bn=!1,Fn.forEach(e=>e.complete()),Fn.clear()}function Un(){Fn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zn=!0)})}class $n{constructor(e,t,n,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Fn.add(this),Bn||(Bn=!0,ct.read(Un),ct.resolveKeyframes(jn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;for(let r=0;r<e.length;r++)if(null===e[r])if(0===r){const r=null==i?void 0:i.get(),o=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){const i=n.readValue(t,o);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=o),i&&void 0===r&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Fn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Fn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let Vn=nt,qn=nt;const Hn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Kn=e=>t=>"string"==typeof t&&t.startsWith(e),Gn=Kn("--"),Wn=Kn("var(--"),Xn=e=>!!Wn(e)&&Zn.test(e.split("/*")[0].trim()),Zn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qn(e,t,n=1){qn(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[i,r]=function(e){const t=Yn.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${null!=n?n:i}`,r]}(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const e=o.trim();return Hn(e)?parseFloat(e):e}return Xn(r)?Qn(r,t,n+1):r}const Jn=e=>t=>t.test(e),ei=[Vt,rn,nn,tn,sn,on,{test:e=>"auto"===e,parse:e=>e}],ti=e=>ei.find(Jn(e));class ni extends $n{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&(i=i.trim(),Xn(i))){const r=Qn(i,t.current);void 0!==r&&(e[n]=r),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ot.has(n)||2!==e.length)return;const[i,r]=e,o=ti(i),s=ti(r);if(o!==s)if(On(o)&&On(s))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)Ut(e[t])&&n.push(t);n.length&&function(e,t,n){let i,r=0;for(;r<e.length&&!i;){const t=e[r];"string"==typeof t&&!Nn.has(t)&&fn(t).values.length&&(i=e[r]),r++}if(i&&n)for(const r of t)e[r]=Tn(n,i)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ln[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Ln[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const ii=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!yn.test(e)&&"0"!==e||e.startsWith("url(")));function ri(e,t,n,i){const r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=ii(r,t),a=ii(o,t);return Vn(s===a,`You are trying to animate ${t} from "${r}" to "${o}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${o} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Oe(n))&&i)}const oi=e=>null!==e;function si(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(oi),o=t&&"loop"!==n&&t%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}class ai{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=mt.now(),this.options={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Un(),jn()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=mt.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!ri(e,n,i,r)){if(!o)return a&&a(si(e,this.options,t)),s&&s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const li=(e,t,n)=>e+(t-e)*n;function ci(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ui(e,t){return n=>n>0?t:e}const di=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},hi=[Jt,Qt,ln];function pi(e){const t=(n=e,hi.find(e=>e.test(n)));var n;if(Vn(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let i=t.parse(e);return t===ln&&(i=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,n/=100;let r=0,o=0,s=0;if(t/=100){const i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;r=ci(a,i,e+1/3),o=ci(a,i,e),s=ci(a,i,e-1/3)}else r=o=s=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*s),alpha:i}}(i)),i}const fi=(e,t)=>{const n=pi(e),i=pi(t);if(!n||!i)return ui(e,t);const r={...n};return e=>(r.red=di(n.red,i.red,e),r.green=di(n.green,i.green,e),r.blue=di(n.blue,i.blue,e),r.alpha=li(n.alpha,i.alpha,e),Qt.transform(r))},mi=(e,t)=>n=>t(e(n)),gi=(...e)=>e.reduce(mi),bi=new Set(["none","hidden"]);function yi(e,t){return n=>li(e,t,n)}function vi(e){return"number"==typeof e?yi:"string"==typeof e?Xn(e)?ui:cn.test(e)?fi:ki:Array.isArray(e)?xi:"object"==typeof e?cn.test(e)?fi:wi:ui}function xi(e,t){const n=[...e],i=n.length,r=e.map((e,n)=>vi(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function wi(e,t){const n={...e,...t},i={};for(const r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=vi(e[r])(e[r],t[r]));return e=>{for(const t in i)n[t]=i[t](e);return n}}const ki=(e,t)=>{const n=yn.createTransformer(t),i=fn(e),r=fn(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?bi.has(e)&&!r.values.length||bi.has(t)&&!i.values.length?function(e,t){return bi.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):gi(xi(function(e,t){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;i[o]=l,r[s]++}return i}(i,r),r.values),n):(Vn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ui(e,t))};function _i(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?li(e,t,n):vi(e)(e,t)}function Ei(e,t,n){const i=Math.max(t-5,0);return vt(n-e(i),t-i)}const Si=.01,Ai=2,Ci=.005,Mi=.5;const Ti=12;function Ni(e,t){return e*Math.sqrt(1-t*t)}const Oi=["duration","bounce"],Ii=["stiffness","damping","mass"];function Di(e,t){return t.some(t=>void 0!==e[t])}function Ri(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Di(e,Ii)&&Di(e,Oi))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*$t(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:1,stiffness:r,damping:o}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let r,o;Vn(e<=et(10),"Spring duration must be 10 seconds or less");let s=1-t;s=$t(.05,1,s),e=$t(.01,10,tt(e)),s<1?(r=t=>{const i=t*s,r=i*e;return.001-(i-n)/Ni(t,s)*Math.exp(-r)},o=t=>{const i=t*s*e,o=i*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-i),c=Ni(Math.pow(t,2),s);return(.001-r(t)>0?-1:1)*((o-a)*l)/c}):(r=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let i=n;for(let n=1;n<Ti;n++)i-=e(i)/t(i);return i}(r,o,5/e);if(e=et(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-tt(n.velocity||0)}),f=h||0,m=c/(2*Math.sqrt(l*u)),g=s-o,b=tt(Math.sqrt(l/u)),y=Math.abs(g)<5;let v;if(i||(i=y?Si:Ai),r||(r=y?Ci:Mi),m<1){const e=Ni(b,m);v=t=>{const n=Math.exp(-m*b*t);return s-n*((f+m*b*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)v=e=>s-Math.exp(-b*e)*(g+(f+b*g)*e);else{const e=b*Math.sqrt(m*m-1);v=t=>{const n=Math.exp(-m*b*t),i=Math.min(e*t,300);return s-n*((f+m*b*g)*Math.sinh(i)+e*g*Math.cosh(i))/e}}const x={calculatedDuration:p&&d||null,next:e=>{const t=v(e);if(p)a.done=e>=d;else{let n=0;m<1&&(n=0===e?et(f):Ei(v,e,t));const o=Math.abs(n)<=i,l=Math.abs(s-t)<=r;a.done=o&&l}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(Ne(x),Te),t=Be(t=>x.next(e*t).value,e,30);return e+"ms "+t}};return x}function Pi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,g=void 0===s?m:s(m);g!==m&&(f=g-d);const b=e=>-f*Math.exp(-e/i),y=e=>g+b(e),v=e=>{const t=b(e),n=y(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let x,w;const k=e=>{var t;t=h.value,(void 0!==a&&t<a||void 0!==l&&t>l)&&(x=e,w=Ri({keyframes:[h.value,p(h.value)],velocity:Ei(y,e,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,v(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&v(e),h)}}}const Li=Nt(.42,0,1,1),Fi=Nt(0,0,.58,1),Bi=Nt(.42,0,.58,1),zi={linear:nt,easeIn:Li,easeInOut:Bi,easeOut:Fi,circIn:Ft,circInOut:zt,circOut:Bt,backIn:Rt,backInOut:Pt,backOut:Dt,anticipate:Lt},ji=e=>{if(De(e)){qn(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,i,r]=e;return Nt(t,n,i,r)}return"string"==typeof e?(qn(void 0!==zi[e],`Invalid easing type '${e}'`),zi[e]):e};function Ui({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=(e=>Array.isArray(e)&&"number"!=typeof e[0])(i)?i.map(ji):ji(i),o={done:!1,value:t[0]},s=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=Fe(0,t,i);e.push(li(n,1,r))}}(t,e.length-1),t}(t),e),a=function(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(qn(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const i=[],r=n||_i,o=e.length-1;for(let n=0;n<o;n++){let o=r(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||nt:t;o=gi(e,o)}i.push(o)}return i}(t,i,r),l=a.length,c=n=>{if(s&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);const r=Fe(e[i],e[i+1],n);return a[i](r)};return n?t=>c($t(e[0],e[o-1],t)):c}(s,t,{ease:Array.isArray(r)?r:(l=t,c=r,l.map(()=>c||Bi).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}const $i=e=>{const t=({timestamp:t})=>e(t);return{start:()=>ct.update(t,!0),stop:()=>ut(t),now:()=>dt.isProcessing?dt.timestamp:mt.now()}},Vi={decay:Pi,inertia:Pi,tween:Ui,keyframes:Ui,spring:Ri},qi=e=>e/100;class Hi extends ai{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:i,keyframes:r}=this.options,o=(null==i?void 0:i.KeyframeResolver)||$n;this.resolver=new o(r,(e,t)=>this.onKeyframesResolved(e,t),t,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,s=Oe(t)?t:Vi[t]||Ui;let a,l;s!==Ui&&"number"!=typeof e[0]&&(a=gi(qi,_i(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===r&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=Ne(c));const{calculatedDuration:u}=c,d=u+i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-i}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return r.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),b=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,v=r;if(h){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1),Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/u)):"mirror"===p&&(v=o)),y=$t(0,1,n)*u}const x=b?{done:!1,value:a[0]}:v.next(y);s&&(x.value=s(x.value));let{done:w}=x;b||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&void 0!==i&&(x.value=si(a,this.options,i)),m&&m(x.value),k&&this.finish(),x}get duration(){const{resolved:e}=this;return e?tt(e.calculatedDuration):0}get time(){return tt(this.currentTime)}set time(e){e=et(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=tt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=$i,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Ki=new Set(["opacity","clipPath","filter","transform"]),Gi=Ee(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Wi={anticipate:Lt,backInOut:Pt,circInOut:zt};class Xi extends ai{constructor(e){super(e);const{name:t,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new ni(r,(e,t)=>this.onKeyframesResolved(e,t),t,n,i),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:i,ease:r,type:o,motionValue:s,name:a,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;var c;if("string"==typeof r&&Le()&&r in Wi&&(r=Wi[r]),Oe((c=this.options).type)||"spring"===c.type||!ze(c.ease)){const{onComplete:t,onUpdate:s,motionValue:a,element:l,...c}=this.options,u=function(e,t){const n=new Hi({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:e[0]};const r=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),r.push(i.value),o+=10;return{times:void 0,keyframes:r,duration:o-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,i=u.times,r=u.ease,o="keyframes"}const u=function(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=$e(a,r);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(s.owner.current,a,e,{...this.options,duration:n,times:i,ease:r});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(Ie(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(si(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:i,type:o,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return tt(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return tt(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=et(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return nt;const{animation:n}=t;Ie(n,e)}else this.pendingTimeline=e;return nt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:i,type:r,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,u=new Hi({...c,keyframes:n,duration:i,type:r,ease:o,times:s,isGenerator:!0}),d=et(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return Gi()&&n&&Ki.has(n)&&!a&&!l&&!i&&"mirror"!==r&&0!==o&&"inertia"!==s}}const Zi={type:"spring",stiffness:500,damping:25,restSpeed:10},Yi={type:"keyframes",duration:.8},Qi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ji=(e,{keyframes:t})=>t.length>2?Yi:rt.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Zi:Qi,er=(e,t,n,i={},r,o)=>s=>{const a=Me(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=et(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};(function({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...Ji(e,u)}),u.duration&&(u.duration=et(u.duration)),u.repeatDelay&&(u.repeatDelay=et(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!o&&void 0!==t.get()){const e=si(u.keyframes,a);if(void 0!==e)return ct.update(()=>{u.onUpdate(e),u.onComplete()}),new Ce([])}return!o&&Xi.supports(u)?new Xi(u):new Hi(u)};function tr({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}function nr(e,t,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;i&&(s=i);const c=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const t in l){const i=e.getValue(t,null!==(o=e.latestValues[t])&&void 0!==o?o:null),r=l[t];if(void 0===r||u&&tr(u,t))continue;const a={delay:n,...Me(s||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=Mt(e);if(n){const e=window.MotionHandoffAnimation(n,t,ct);null!==e&&(a.startTime=e,d=!0)}}St(e,t),i.start(er(t,i,r,e.shouldReduceMotion&&ot.has(t)?{type:!1}:a,e,d));const h=i.animation;h&&c.push(h)}return a&&Promise.all(c).then(()=>{ct.update(()=>{a&&function(e,t){const n=we(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const t in o)_t(e,t,st(o[t]))}(e,a)})}),c}function ir(e,t,n={}){var i;const r=we(e,t,"exit"===n.type?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(nr(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,i=0,r=1,o){const s=[],a=(e.variantChildren.size-1)*i,l=1===r?(e=0)=>e*i:(e=0)=>a-e*i;return Array.from(e.variantChildren).sort(rr).forEach((e,i)=>{e.notify("AnimationStart",t),s.push(ir(e,t,{...o,delay:n+l(i)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,r+i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then(()=>t())}return Promise.all([s(),a(n.delay)])}function rr(e,t){return e.sortNodePosition(t)}const or=_e.length;function sr(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&sr(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<or;n++){const i=_e[n],r=e.props[i];(ye(r)||!1===r)&&(t[i]=r)}return t}const ar=[...ke].reverse(),lr=ke.length;function cr(e){let t=function(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t)){const r=t.map(t=>ir(e,t,n));i=Promise.all(r)}else if("string"==typeof t)i=ir(e,t,n);else{const r="function"==typeof t?we(e,t,n.custom):t;i=Promise.all(nr(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=hr(),i=!0;const r=t=>(n,i)=>{var r;const o=we(e,i,"exit"===t?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);if(o){const{transition:e,transitionEnd:t,...i}=o;n={...n,...i,...t}}return n};function o(o){const{props:s}=e,a=sr(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<lr;t++){const h=ar[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=ye(f),g=h===o?p.isActive:null;!1===g&&(d=t);let b=f===a[h]&&f!==s[h]&&m;if(b&&i&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys={...u},!p.isActive&&null===g||!f&&!p.prevProp||me(f)||"boolean"==typeof f)continue;const y=ur(p.prevProp,f);let v=y||h===o&&p.isActive&&!b&&m||t>d&&m,x=!1;const w=Array.isArray(f)?f:[f];let k=w.reduce(r(h),{});!1===g&&(k={});const{prevResolvedValues:_={}}=p,E={..._,...k},S=t=>{v=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=k[e],n=_[e];if(u.hasOwnProperty(e))continue;let i=!1;i=ge(t)&&ge(n)?!be(t,n):t!==n,i?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=k,p.isActive&&(u={...u,...k}),i&&e.blockInitialAnimation&&(v=!1),v&&(!b||!y||x)&&l.push(...w.map(e=>({animation:e,options:{type:h}})))}if(c.size){const t={};c.forEach(n=>{const i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=null!=i?i:null}),l.push({animation:t})}let h=Boolean(l.length);return!i||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),i=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,i){var r;if(n[t].isActive===i)return Promise.resolve();null===(r=e.variantChildren)||void 0===r||r.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,i)}),n[t].isActive=i;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=hr(),i=!0}}}function ur(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!be(t,e)}function dr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hr(){return{animate:dr(!0),whileInView:dr(),whileHover:dr(),whileTap:dr(),whileDrag:dr(),whileFocus:dr(),exit:dr()}}class pr{constructor(e){this.isMounted=!1,this.node=e}update(){}}let fr=0;const mr={animation:{Feature:class extends pr{constructor(e){super(e),e.animationState||(e.animationState=cr(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();me(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends pr{constructor(){super(...arguments),this.id=fr++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function gr(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function br(e){return{point:{x:e.pageX,y:e.pageY}}}function yr(e,t,n,i){return gr(e,t,(e=>t=>We(t)&&e(t,br(t)))(n),i)}const vr=(e,t)=>Math.abs(e-t);class xr{constructor(e,t,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=_r(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=vr(e.x,t.x),i=vr(e.y,t.y);return Math.sqrt(n**2+i**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:i}=e,{timestamp:r}=dt;this.history.push({...i,timestamp:r});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=wr(t,this.transformPagePoint),ct.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=_r("pointercancel"===e.type?this.lastMoveEventInfo:wr(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),i&&i(e,o)},!We(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=n,this.contextWindow=i||window;const o=wr(br(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=dt;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,_r(o,this.history)),this.removeListeners=gi(yr(this.contextWindow,"pointermove",this.handlePointerMove),yr(this.contextWindow,"pointerup",this.handlePointerUp),yr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ut(this.updatePoint)}}function wr(e,t){return t?{point:t(e.point)}:e}function kr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _r({point:e},t){return{point:e,delta:kr(e,Sr(t)),offset:kr(e,Er(t)),velocity:Ar(t,.1)}}function Er(e){return e[0]}function Sr(e){return e[e.length-1]}function Ar(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=Sr(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>et(t)));)n--;if(!i)return{x:0,y:0};const o=tt(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Cr(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Mr(e){return e.max-e.min}function Tr(e,t,n,i=.5){e.origin=i,e.originPoint=li(t.min,t.max,e.origin),e.scale=Mr(n)/Mr(t),e.translate=li(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Nr(e,t,n,i){Tr(e.x,t.x,n.x,i?i.originX:void 0),Tr(e.y,t.y,n.y,i?i.originY:void 0)}function Or(e,t,n){e.min=n.min+t.min,e.max=e.min+Mr(t)}function Ir(e,t,n){e.min=t.min-n.min,e.max=e.min+Mr(t)}function Dr(e,t,n){Ir(e.x,t.x,n.x),Ir(e.y,t.y,n.y)}function Rr(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Pr(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}const Lr=.35;function Fr(e,t,n){return{min:Br(e,t),max:Br(e,n)}}function Br(e,t){return"number"==typeof e?e:e[t]||0}const zr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function jr(e){return[e("x"),e("y")]}function Ur({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function $r(e){return void 0===e||1===e}function Vr({scale:e,scaleX:t,scaleY:n}){return!$r(e)||!$r(t)||!$r(n)}function qr(e){return Vr(e)||Hr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Hr(e){return Kr(e.x)||Kr(e.y)}function Kr(e){return e&&"0%"!==e}function Gr(e,t,n){return n+t*(e-n)}function Wr(e,t,n,i,r){return void 0!==r&&(e=Gr(e,r,i)),Gr(e,n,i)+t}function Xr(e,t=0,n=1,i,r){e.min=Wr(e.min,t,n,i,r),e.max=Wr(e.max,t,n,i,r)}function Zr(e,{x:t,y:n}){Xr(e.x,t.translate,t.scale,t.originPoint),Xr(e.y,n.translate,n.scale,n.originPoint)}const Yr=.999999999999,Qr=1.0000000000001;function Jr(e,t){e.min=e.min+t,e.max=e.max+t}function eo(e,t,n,i,r=.5){Xr(e,t,n,li(e.min,e.max,r),i)}function to(e,t){eo(e.x,t.x,t.scaleX,t.scale,t.originX),eo(e.y,t.y,t.scaleY,t.scale,t.originY)}function no(e,t){return Ur(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}const io=({current:e})=>e?e.ownerDocument.defaultView:null,ro=new WeakMap;class oo{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new xr(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(br(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Ve[o]?null:(Ve[o]=!0,()=>{Ve[o]=!1}):Ve.x||Ve.y?null:(Ve.x=Ve.y=!0,()=>{Ve.x=Ve.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),jr(e=>{let t=this.getAxisMotionValue(e).get()||0;if(nn.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[e];i&&(t=Mr(i)*(parseFloat(t)/100))}}this.originPoint[e]=t}),r&&ct.postRender(()=>r(e,t)),St(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(i&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>jr(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:io(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&ct.postRender(()=>r(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:i}=this.getProps();if(!n||!so(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},i){return void 0!==t&&e<t?e=i?li(t,e,i.min):Math.max(e,t):void 0!==n&&e>n&&(e=i?li(n,e,i.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,r=this.constraints;t&&Cr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(e,{top:t,left:n,bottom:i,right:r}){return{x:Rr(e.x,n,r),y:Rr(e.y,t,i)}}(i.layoutBox,t),this.elastic=function(e=Lr){return!1===e?e=0:!0===e&&(e=Lr),{x:Fr(e,"left","right"),y:Fr(e,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&jr(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Cr(e))return!1;const n=e.current;qn(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(e,t,n){const i=no(e,n),{scroll:r}=t;return r&&(Jr(i.x,r.offset.x),Jr(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Pr(e.x,t.x),y:Pr(e.y,t.y)}}(i.layout.layoutBox,r);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=Ur(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=jr(s=>{if(!so(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(s,d)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return St(this.visualElement,e),n.start(er(e,n,0,t,this.visualElement,!1))}stopAnimation(){jr(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){jr(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){jr(t=>{const{drag:n}=this.getProps();if(!so(t,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(t);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[t];r.set(e[t]-li(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Cr(t)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};jr(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();i[e]=function(e,t){let n=.5;const i=Mr(e),r=Mr(t);return r>i?n=Fe(t.min,t.max-i,e.min):i>r&&(n=Fe(e.min,e.max-r,t.min)),$t(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),jr(t=>{if(!so(t,e,null))return;const n=this.getAxisMotionValue(t),{min:r,max:o}=this.constraints[t];n.set(li(r,o,i[t]))})}addListeners(){if(!this.visualElement.current)return;ro.set(this.visualElement,this);const e=yr(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();Cr(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),ct.read(t);const r=gr(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(jr(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{r(),e(),i(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Lr,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function so(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const ao=e=>(t,n)=>{e&&ct.postRender(()=>e(t,n))},lo=o(null),co=o({}),uo=o({}),ho={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function po(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fo={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!rn.test(e))return e;e=parseFloat(e)}return`${po(e,t.target.x)}% ${po(e,t.target.y)}%`}},mo={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=yn.parse(e);if(r.length>5)return i;const o=yn.createTransformer(e),s="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=l;const c=li(a,l,.5);return"number"==typeof r[2+s]&&(r[2+s]/=c),"number"==typeof r[3+s]&&(r[3+s]/=c),o(r)}},go={},{schedule:bo,cancel:yo}=lt(queueMicrotask,!1);class vo extends i{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=e;var o;o=wo,Object.assign(go,o),r&&(t.group&&t.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),ho.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:i,isPresent:r}=this.props,o=n.projection;return o?(o.isPresent=r,i||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||ct.postRender(()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),bo.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function xo(e){const[n,i]=function(e=!0){const t=u(lo);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,o=h();d(()=>{e&&r(o)},[e]);const s=c(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,s]:[!0]}(),r=u(co);return t(vo,{...e,layoutGroup:r,switchLayoutGroup:u(uo),isPresent:n,safeToRemove:i})}const wo={borderRadius:{...fo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fo,borderTopRightRadius:fo,borderBottomLeftRadius:fo,borderBottomRightRadius:fo,boxShadow:mo},ko=(e,t)=>e.depth-t.depth;class _o{constructor(){this.children=[],this.isDirty=!1}add(e){gt(this.children,e),this.isDirty=!0}remove(e){bt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ko),this.isDirty=!1,this.children.forEach(e)}}function Eo(e){const t=Et(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const So=["TopLeft","TopRight","BottomLeft","BottomRight"],Ao=So.length,Co=e=>"string"==typeof e?parseFloat(e):e,Mo=e=>"number"==typeof e||rn.test(e);function To(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const No=Io(0,.5,Bt),Oo=Io(.5,.95,nt);function Io(e,t,n){return i=>i<e?0:i>t?1:n(Fe(e,t,i))}function Do(e,t){e.min=t.min,e.max=t.max}function Ro(e,t){Do(e.x,t.x),Do(e.y,t.y)}function Po(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Lo(e,t,n,i,r){return e=Gr(e-=t,1/n,i),void 0!==r&&(e=Gr(e,1/r,i)),e}function Fo(e,t,[n,i,r],o,s){!function(e,t=0,n=1,i=.5,r,o=e,s=e){if(nn.test(t)&&(t=parseFloat(t),t=li(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=li(o.min,o.max,i);e===o&&(a-=t),e.min=Lo(e.min,t,n,a,r),e.max=Lo(e.max,t,n,a,r)}(e,t[n],t[i],t[r],t.scale,o,s)}const Bo=["x","scaleX","originX"],zo=["y","scaleY","originY"];function jo(e,t,n,i){Fo(e.x,t,Bo,n?n.x:void 0,i?i.x:void 0),Fo(e.y,t,zo,n?n.y:void 0,i?i.y:void 0)}function Uo(e){return 0===e.translate&&1===e.scale}function $o(e){return Uo(e.x)&&Uo(e.y)}function Vo(e,t){return e.min===t.min&&e.max===t.max}function qo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ho(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Ko(e){return Mr(e.x)/Mr(e.y)}function Go(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Wo{constructor(){this.members=[]}add(e){gt(this.members,e),e.scheduleRender()}remove(e){if(bt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Xo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Zo="undefined"!=typeof window&&void 0!==window.MotionDebug,Yo=["","X","Y","Z"],Qo={visibility:"hidden"};let Jo=0;function es(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function ts(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mt(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ct,!(t||i))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&ts(i)}function ns({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Jo++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Zo&&(Xo.totalNodes=Xo.resolvedTargetDeltas=Xo.recalculatedProjection=0),this.nodes.forEach(os),this.nodes.forEach(hs),this.nodes.forEach(ps),this.nodes.forEach(ss),Zo&&window.MotionDebug.record(Xo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new _o)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new yt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=t)instanceof SVGElement&&"svg"!==i.tagName,this.instance=t;const{layoutId:r,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),e){let n;const i=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=mt.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(ut(i),e(o-t))};return ct.read(i,!0),()=>ut(i)}(i,250),ho.hasAnimatedSinceResize&&(ho.hasAnimatedSinceResize=!1,this.nodes.forEach(ds))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||vs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Ho(this.targetLayout,i)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Me(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ut(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(fs),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ts(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ls);this.isUpdating||this.nodes.forEach(cs),this.isUpdating=!1,this.nodes.forEach(us),this.nodes.forEach(is),this.nodes.forEach(rs),this.clearAllSnapshots();const e=mt.now();dt.delta=$t(0,1e3/60,e-dt.timestamp),dt.timestamp=e,dt.isProcessing=!0,ht.update.process(dt),ht.preRender.process(dt),ht.render.process(dt),dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(as),this.sharedNodes.forEach(ms)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!r)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!$o(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;e&&(t||qr(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var i;return e&&(n=this.removeTransform(n)),ks((i=n).x),ks(i.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Es)){const{scroll:e}=this.root;e&&(Jr(n.x,e.offset.x),Jr(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Ro(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const i=this.path[t],{scroll:r,options:o}=i;i!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&Ro(n,e),Jr(n.x,r.offset.x),Jr(n.y,r.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ro(n,e);for(let e=0;e<this.path.length;e++){const i=this.path[e];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&to(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),qr(i.latestValues)&&to(n,i.latestValues)}return qr(this.latestValues)&&to(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Ro(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!qr(n.latestValues))continue;Vr(n.latestValues)&&n.updateSnapshot();const i=zr();Ro(i,n.measurePageBox()),jo(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return qr(this.latestValues)&&jo(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(this.layout&&(r||o)){if(this.resolvedRelativeTargetAt=dt.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Dr(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Ro(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Or(s.x,a.x,l.x),Or(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ro(this.target,this.layout.layoutBox),Zr(this.target,this.targetDelta)):Ro(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Dr(this.relativeTargetOrigin,this.target,e.target),Ro(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Zo&&Xo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Vr(this.parent.latestValues)&&!Hr(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===dt.timestamp&&(i=!1),i)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;Ro(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,i=!1){const r=n.length;if(!r)return;let o,s;t.x=t.y=1;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&to(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Zr(e,s)),i&&qr(o.latestValues)&&to(e,o.latestValues))}t.x<Qr&&t.x>Yr&&(t.x=1),t.y<Qr&&t.y>Yr&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Po(this.prevProjectionDelta.x,this.projectionDelta.x),Po(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Nr(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Go(this.projectionDelta.x,this.prevProjectionDelta.x)&&Go(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Zo&&Xo.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(ys));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h;gs(o.x,e.x,n),gs(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dr(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,i){bs(e.x,t.x,n.x,i),bs(e.y,t.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&(l=this.relativeTarget,h=d,Vo(l.x,h.x)&&Vo(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Ro(d,this.relativeTarget)),a&&(this.animationValues=r,function(e,t,n,i,r,o){r?(e.opacity=li(0,void 0!==n.opacity?n.opacity:1,No(i)),e.opacityExit=li(void 0!==t.opacity?t.opacity:1,0,Oo(i))):o&&(e.opacity=li(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let r=0;r<Ao;r++){const o=`border${So[r]}Radius`;let s=To(t,o),a=To(n,o);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||Mo(s)===Mo(a)?(e[o]=Math.max(li(Co(s),Co(a),i),0),(nn.test(a)||nn.test(s))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=li(t.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ut(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ct.update(()=>{ho.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const i=Et(0)?0:kt(0);return i.start(er("",i,1e3,n)),i.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:i,latestValues:r}=e;if(t&&n&&i){if(this!==e&&this.layout&&i&&_s(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Mr(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const i=Mr(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+i}Ro(t,n),to(t,r),Nr(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Wo),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const i={};n.z&&es("z",e,i,this.animationValues);for(let t=0;t<Yo.length;t++)es(`rotate${Yo[t]}`,e,i,this.animationValues),es(`skew${Yo[t]}`,e,i,this.animationValues);e.render();for(const t in i)e.setStaticValue(t,i[t]),this.animationValues&&(this.animationValues[t]=i[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Qo;const i={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Eo(null==e?void 0:e.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Eo(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!qr(this.latestValues)&&(t.transform=r?r({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:r,rotateY:o,skewX:s,skewY:a}=n;e&&(i=`perspective(${e}px) ${i}`),t&&(i+=`rotate(${t}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),s&&(i+=`skewX(${s}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),r&&(i.transform=r(s,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:i.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in go){if(void 0===s[e])continue;const{correct:t,applyTo:n}=go[e],r="none"===i.transform?s[e]:t(s[e],o);if(n){const e=n.length;for(let t=0;t<e;t++)i[n[t]]=r}else i[e]=r}return this.options.layoutId&&(i.pointerEvents=o===this?Eo(null==e?void 0:e.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(ls),this.root.sharedNodes.clear()}}}function is(e){e.updateLayout()}function rs(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:i}=e.layout,{animationType:r}=e.options,o=n.source!==e.layout.source;"size"===r?jr(e=>{const i=o?n.measuredBox[e]:n.layoutBox[e],r=Mr(i);i.min=t[e].min,i.max=i.min+r}):_s(r,n.layoutBox,t)&&jr(i=>{const r=o?n.measuredBox[i]:n.layoutBox[i],s=Mr(t[i]);r.max=r.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[i].max=e.relativeTarget[i].min+s)});const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Nr(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Nr(a,e.applyTransform(i,!0),n.measuredBox):Nr(a,t,n.layoutBox);const l=!$o(s);let c=!1;if(!e.resumeFrom){const i=e.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const s={x:{min:0,max:0},y:{min:0,max:0}};Dr(s,n.layoutBox,r.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Dr(a,t,o.layoutBox),Ho(s,a)||(c=!0),i.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=i)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function os(e){Zo&&Xo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ss(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function as(e){e.clearSnapshot()}function ls(e){e.clearMeasurements()}function cs(e){e.isLayoutDirty=!1}function us(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ds(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hs(e){e.resolveTargetDelta()}function ps(e){e.calcProjection()}function fs(e){e.resetSkewAndRotation()}function ms(e){e.removeLeadSnapshot()}function gs(e,t,n){e.translate=li(t.translate,0,n),e.scale=li(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function bs(e,t,n,i){e.min=li(t.min,n.min,i),e.max=li(t.max,n.max,i)}function ys(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const vs={duration:.45,ease:[.4,0,.1,1]},xs=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ws=xs("applewebkit/")&&!xs("chrome/")?Math.round:nt;function ks(e){e.min=ws(e.min),e.max=ws(e.max)}function _s(e,t,n){return"position"===e||"preserve-aspect"===e&&(i=Ko(t),r=Ko(n),!(Math.abs(i-r)<=.2));var i,r}function Es(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Ss=ns({attachResizeListener:(e,t)=>gr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),As={current:void 0},Cs=ns({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!As.current){const e=new Ss({});e.mount(window),e.setOptions({layoutScroll:!0}),As.current=e}return As.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Ms={pan:{Feature:class extends pr{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(e){this.session=new xr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:io(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:ao(e),onStart:ao(t),onMove:n,onEnd:(e,t)=>{delete this.session,i&&ct.postRender(()=>i(e,t))}}}mount(){this.removePointerDownListener=yr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends pr{constructor(e){super(e),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new oo(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Cs,MeasureLayout:xo}};function Ts(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);const r=i["onHover"+n];r&&ct.postRender(()=>r(t,br(t)))}function Ns(e,t,n){const{props:i}=e;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);const r=i["onTap"+("End"===n?"":n)];r&&ct.postRender(()=>r(t,br(t)))}const Os=new WeakMap,Is=new WeakMap,Ds=e=>{const t=Os.get(e.target);t&&t(e)},Rs=e=>{e.forEach(Ds)};const Ps={some:0,all:1},Ls={inView:{Feature:class extends pr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:i="some",once:r}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ps[i]};return function(e,t,n){const i=function({root:e,...t}){const n=e||document;Is.has(n)||Is.set(n,{});const i=Is.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(Rs,{root:e,...t})),i[r]}(t);return Os.set(e,n),i.observe(e),()=>{Os.delete(e),i.unobserve(e)}}(this.node.current,o,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,r&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=t?n:i;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends pr{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[i,r,o]=He(e,n),s=e=>{const i=e.currentTarget;if(!Je(e)||Ze.has(i))return;Ze.add(i);const o=t(e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Je(e)&&Ze.has(i)&&(Ze.delete(i),"function"==typeof o&&o(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||Ge(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return i.forEach(e=>{(function(e){return Xe.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const i=Ye(()=>{if(Ze.has(n))return;Qe(n,"down");const e=Ye(()=>{Qe(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Qe(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,r),r)}),o}(e,e=>(Ns(this.node,e,"Start"),(e,{success:t})=>Ns(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends pr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gi(gr(this.node.current,"focus",()=>this.onFocus()),gr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends pr{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[i,r,o]=He(e,n),s=Ke(e=>{const{target:n}=e,i=t(e);if("function"!=typeof i||!n)return;const o=Ke(e=>{i(e),n.removeEventListener("pointerleave",o)});n.addEventListener("pointerleave",o,r)});return i.forEach(e=>{e.addEventListener("pointerenter",s,r)}),o}(e,e=>(Ts(this.node,e,"Start"),e=>Ts(this.node,e,"End"))))}unmount(){}}}},Fs={layout:{ProjectionNode:Cs,MeasureLayout:xo}},Bs=o({strict:!1}),zs=o({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),js=o({});function Us(e){return me(e.animate)||_e.some(t=>ye(e[t]))}function $s(e){return Boolean(Us(e)||e.variants)}function Vs(e){return Array.isArray(e)?e.join(" "):e}const qs="undefined"!=typeof window,Hs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ks={};for(const e in Hs)Ks[e]={isEnabled:t=>Hs[e].some(e=>!!t[e])};const Gs=Symbol.for("motionComponentSymbol");function Ws(e,t,n){return c(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&("function"==typeof n?n(i):Cr(n)&&(n.current=i))},[t])}const Xs=qs?f:d;function Zs(e,t,n,i,r){var o,s;const{visualElement:a}=u(js),l=u(Bs),c=u(lo),h=u(zs).reducedMotion,f=g(null);i=i||l.renderer,!f.current&&i&&(f.current=i(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h}));const m=f.current,b=u(uo);!m||m.projection||!r||"html"!==m.type&&"svg"!==m.type||function(e,t,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ys(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Cr(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(f.current,n,r,b);const y=g(!1);p(()=>{m&&y.current&&m.update(n,c)});const v=n[Ct],x=g(Boolean(v)&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,v))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,v)));return Xs(()=>{m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),bo.render(m.render),x.current&&m.animationState&&m.animationState.animateChanges())}),d(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,v)}),x.current=!1))}),m}function Ys(e){if(e)return!1!==e.options.allowProjection?e.projection:Ys(e.parent)}function Qs({preloadedFeatures:e,createVisualElement:i,useRender:r,useVisualState:o,Component:s}){var a,c;function d(e,a){let l;const c={...u(zs),...e,layoutId:Js(e)},{isStatic:d}=c,h=function(e){const{initial:t,animate:n}=function(e,t){if(Us(e)){const{initial:t,animate:n}=e;return{initial:!1===t||ye(t)?t:void 0,animate:ye(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,u(js));return m(()=>({initial:t,animate:n}),[Vs(t),Vs(n)])}(e),p=o(e,d);if(!d&&qs){u(Bs).strict;const e=function(e){const{drag:t,layout:n}=Ks;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(c);l=e.MeasureLayout,h.visualElement=Zs(s,p,c,i,e.ProjectionNode)}return n(js.Provider,{value:h,children:[l&&h.visualElement?t(l,{visualElement:h.visualElement,...c}):null,r(s,e,Ws(p,h.visualElement,a),p,d,h.visualElement)]})}e&&function(e){for(const t in e)Ks[t]={...Ks[t],...e[t]}}(e),d.displayName=`motion.${"string"==typeof s?s:`create(${null!==(c=null!==(a=s.displayName)&&void 0!==a?a:s.name)&&void 0!==c?c:""})`}`;const h=l(d);return h[Gs]=s,h}function Js({layoutId:e}){const t=u(co).id;return t&&void 0!==e?t+"-"+e:e}const ea=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ta(e){return"string"==typeof e&&!e.includes("-")&&!!(ea.indexOf(e)>-1||/[A-Z]/u.test(e))}const na=e=>(t,n)=>{const i=u(js),r=u(lo),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},i,r,o){const s={latestValues:ia(i,r,o,e),renderState:t()};return n&&(s.onMount=e=>n({props:i,current:e,...s}),s.onUpdate=e=>n(e)),s}(e,t,i,r);return n?o():function(e){const t=g(null);return null===t.current&&(t.current=e()),t.current}(o)};function ia(e,t,n,i){const r={},o=i(e,{});for(const e in o)r[e]=Eo(o[e]);let{initial:s,animate:a}=e;const l=Us(e),c=$s(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!me(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const i=xe(e,t[n]);if(i){const{transitionEnd:e,transition:t,...n}=i;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(r[e]=t)}for(const t in e)r[t]=e[t]}}}return r}const ra=(e,t)=>t&&"number"==typeof e?t.transform(e):e,oa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sa=it.length;function aa(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let s=!1,a=!1;for(const e in t){const n=t[e];if(rt.has(e))s=!0;else if(Gn(e))r[e]=n;else{const t=ra(n,An[e]);e.startsWith("origin")?(a=!0,o[e]=t):i[e]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let o=0;o<sa;o++){const s=it[o],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=ra(a,An[s]);l||(r=!1,i+=`${oa[s]||s}(${e}) `),n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;i.transformOrigin=`${e} ${t} ${n}`}}const la={offset:"stroke-dashoffset",array:"stroke-dasharray"},ca={offset:"strokeDashoffset",array:"strokeDasharray"};function ua(e,t,n){return"string"==typeof e?e:rn.transform(t+n*e)}function da(e,{attrX:t,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(aa(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${ua(t,e.x,e.width)} ${ua(n,e.y,e.height)}`}(f,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?la:ca;e[o.offset]=rn.transform(-i);const s=rn.transform(t),a=rn.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const ha=e=>"string"==typeof e&&"svg"===e.toLowerCase();function pa(e,{style:t,vars:n},i,r){Object.assign(e.style,t,r&&r.getProjectionStyles(i));for(const t in n)e.style.setProperty(t,n[t])}const fa=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ma(e,t,n,i){pa(e,t,void 0,i);for(const n in t.attrs)e.setAttribute(fa.has(n)?n:At(n),t.attrs[n])}function ga(e,{layout:t,layoutId:n}){return rt.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!go[e]||"opacity"===e)}function ba(e,t,n){var i;const{style:r}=e,o={};for(const s in r)(Et(r[s])||t.style&&Et(t.style[s])||ga(s,e)||void 0!==(null===(i=null==n?void 0:n.getValue(s))||void 0===i?void 0:i.liveStyle))&&(o[s]=r[s]);return o}function ya(e,t,n){const i=ba(e,t,n);for(const n in e)(Et(e[n])||Et(t[n]))&&(i[-1!==it.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return i}const va=["x","y","width","height","cx","cy","r"],xa={useVisualState:na({scrapeMotionValuesFromProps:ya,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:i,latestValues:r})=>{if(!n)return;let o=!!e.drag;if(!o)for(const e in r)if(rt.has(e)){o=!0;break}if(!o)return;let s=!t;if(t)for(let n=0;n<va.length;n++){const i=va[n];e[i]!==t[i]&&(s=!0)}s&&ct.read(()=>{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,i),ct.render(()=>{da(i,r,ha(n.tagName),e.transformTemplate),ma(n,i)})})}})},wa={useVisualState:na({scrapeMotionValuesFromProps:ba,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function ka(e,t,n){for(const i in t)Et(t[i])||ga(i,n)||(e[i]=t[i])}function _a(e,t){const n={},i=function(e,t){const n={};return ka(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return m(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return aa(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const Ea=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Sa(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ea.has(e)}let Aa=e=>!Sa(e);try{(Ca=require("@emotion/is-prop-valid").default)&&(Aa=e=>e.startsWith("on")?!Sa(e):Ca(e))}catch(e){}var Ca;function Ma(e,t,n,i){const r=m(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return da(n,t,ha(i),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};ka(t,e.style,e),r.style={...t,...r.style}}return r}function Ta(e=!1){return(t,n,i,{latestValues:o},a)=>{const l=(ta(t)?Ma:_a)(n,o,a,t),c=function(e,t,n){const i={};for(const r in e)"values"===r&&"object"==typeof e.values||(Aa(r)||!0===n&&Sa(r)||!t&&!Sa(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(n,"string"==typeof t,e),u=t!==r?{...c,...l,ref:i}:{},{children:d}=n,h=m(()=>Et(d)?d.get():d,[d]);return s(t,{...u,children:h})}}function Na(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Qs({...ta(n)?xa:wa,preloadedFeatures:e,useRender:Ta(i),createVisualElement:t,Component:n})}}const Oa={current:null},Ia={current:!1},Da=[...ei,cn,yn],Ra=new WeakMap,Pa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class La{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$n,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=mt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ct.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:c}=o;this.onUpdate=c,this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=Us(t),this.isVariantNode=$s(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==a[e]&&Et(t)&&t.set(a[e],!1)}}mount(e){this.current=e,Ra.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),Ia.current||function(){if(Ia.current=!0,qs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Oa.current=e.matches;e.addListener(t),t()}else Oa.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Oa.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ra.delete(this.current),this.projection&&this.projection.unmount(),ut(this.notifyUpdate),ut(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=rt.has(e),i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ct.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),r(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Ks){const t=Ks[e];if(!t)continue;const{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Pa.length;t++){const n=Pa[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(const i in t){const r=t[i],o=n[i];if(Et(r))e.addValue(i,r);else if(Et(o))e.addValue(i,kt(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{const t=e.getStaticValue(i);e.addValue(i,kt(void 0!==t?t:r,{owner:e}))}}for(const i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=kt(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let i=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=i&&("string"==typeof i&&(Hn(i)||jt(i))?i=parseFloat(i):(r=i,!Da.find(Jn(r))&&yn.test(t)&&(i=Tn(e,t))),this.setBaseTarget(e,Et(i)?i.get():i)),Et(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=xe(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);r&&(i=r[e])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||Et(r)?void 0!==this.initialValues[e]&&void 0===i?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new yt),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Fa extends La{constructor(){super(...arguments),this.KeyframeResolver=ni}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Et(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class Ba extends Fa{constructor(){super(...arguments),this.type="html",this.renderInstance=pa}readValueFromInstance(e,t){if(rt.has(t)){const e=Mn(t);return e&&e.default||0}{const i=(n=e,window.getComputedStyle(n)),r=(Gn(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return no(e,t)}build(e,t,n){aa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ba(e,t,n)}}class za extends Fa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=zr}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(rt.has(t)){const e=Mn(t);return e&&e.default||0}return t=fa.has(t)?t:At(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ya(e,t,n)}build(e,t,n){da(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,i){ma(e,t,0,i)}mount(e){this.isSVGTag=ha(e.tagName),super.mount(e)}}const ja=fe(Na({...mr,...Ls,...Ms,...Fs},(e,t)=>ta(e)?new za(t):new Ba(t,{allowProjection:e!==r})));function Ua({open:e,onClick:n,hue:i=0,hoverIntensity:r=.5,rotateOnHover:o=!0,forceHoverState:s=!1}){return t(ja.button,{className:"bmxcb__orb-button","aria-label":e?"Close chat":"Open chat",onClick:n,whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:25},children:t(pe,{hue:i,hoverIntensity:r,rotateOnHover:o,forceHoverState:s})})}function $a({open:e,onClick:n,hue:i=0,hoverIntensity:r=.5,rotateOnHover:o=!0,forceHoverState:s=!1}){return t(Ua,{open:e,onClick:n,hue:i,hoverIntensity:r,rotateOnHover:o,forceHoverState:s})}var Va,qa={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ha=a.createContext&&a.createContext(qa),Ka=["attr","size","title"];function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ga.apply(this,arguments)}function Wa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Xa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wa(Object(n),!0).forEach(function(t){var i,r,o,s;i=e,r=t,o=n[t],s=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r),(r="symbol"==typeof s?s:s+"")in i?Object.defineProperty(i,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Za(e){return e&&e.map((e,t)=>a.createElement(e.tag,Xa({key:t},e.attr),Za(e.child)))}function Ya(e){return t=>a.createElement(Qa,Ga({attr:Xa({},e.attr)},t),Za(e.child))}function Qa(e){var t=t=>{var n,{attr:i,size:r,title:o}=e,s=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,Ka),l=r||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),a.createElement("svg",Ga({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,s,{className:n,style:Xa(Xa({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&a.createElement("title",null,o),e.children)};return void 0!==Ha?a.createElement(Ha.Consumer,null,e=>t(e)):t(qa)}function Ja(e){return Ya({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(e)}function el(e){return Ya({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 249.93a10.58 10.58 0 0 0-9.36-9.94L429 235.84a5.42 5.42 0 0 1-4.5-4.67c-.49-3.15-1-6.42-1.7-9.52a5.52 5.52 0 0 1 2.63-5.85l22.78-12.65a10.35 10.35 0 0 0 5-12.83l-3.95-10.9a10.32 10.32 0 0 0-12.13-6.51l-25.55 5a5.51 5.51 0 0 1-5.82-2.81c-1.49-2.79-3.11-5.63-4.8-8.42a5.6 5.6 0 0 1 .44-6.5l17-19.64a10.42 10.42 0 0 0 .39-13.76l-7.42-8.91a10.24 10.24 0 0 0-13.58-2l-22.37 13.43a5.39 5.39 0 0 1-6.39-.63c-2.47-2.17-5-4.26-7.37-6.19a5.45 5.45 0 0 1-1.72-6.21l9.26-24.4a10.35 10.35 0 0 0-4.31-13.07l-10.09-5.89a10.3 10.3 0 0 0-13.45 2.83L325 96.28a4.6 4.6 0 0 1-5.6 1.72c-.61-.25-5.77-2.36-9.78-3.7a5.42 5.42 0 0 1-3.74-5.23l.39-26.07a10.48 10.48 0 0 0-8.57-10.88l-11.45-2a10.45 10.45 0 0 0-11.75 7.17L266 82.1a5.46 5.46 0 0 1-5.36 3.65h-9.75a5.5 5.5 0 0 1-5.3-3.67l-8.46-24.67a10.46 10.46 0 0 0-11.77-7.25l-11.47 2a10.46 10.46 0 0 0-8.56 10.79l.4 26.16a5.45 5.45 0 0 1-3.86 5.25c-2.29.89-7.26 2.79-9.52 3.63-2 .72-4.18-.07-5.94-2.1l-16.26-20A10.3 10.3 0 0 0 156.69 73l-10.06 5.83A10.36 10.36 0 0 0 142.31 92l9.25 24.34a5.54 5.54 0 0 1-1.7 6.23c-2.43 2-4.92 4-7.4 6.22a5.38 5.38 0 0 1-6.35.64L114 115.74a10.4 10.4 0 0 0-13.61 2L93 126.63a10.31 10.31 0 0 0 .37 13.75L110.45 160a5.42 5.42 0 0 1 .45 6.45c-1.71 2.72-3.34 5.58-4.82 8.44a5.53 5.53 0 0 1-5.86 2.82l-25.51-4.93a10.34 10.34 0 0 0-12.14 6.51l-4 10.88a10.38 10.38 0 0 0 5 12.85l22.78 12.65a5.39 5.39 0 0 1 2.65 5.92l-.24 1.27c-.52 2.79-1 5.43-1.46 8.24a5.48 5.48 0 0 1-4.46 4.64l-25.69 4.15A10.42 10.42 0 0 0 48 250.16v11.58A10.26 10.26 0 0 0 57.16 272l25.68 4.14a5.41 5.41 0 0 1 4.5 4.67c.49 3.16 1 6.42 1.7 9.52a5.52 5.52 0 0 1-2.63 5.85l-22.77 12.67a10.35 10.35 0 0 0-5 12.83l4 10.9a10.33 10.33 0 0 0 12.13 6.51l25.55-4.95a5.49 5.49 0 0 1 5.82 2.81c1.5 2.8 3.11 5.63 4.8 8.42a5.58 5.58 0 0 1-.44 6.5l-17 19.63a10.41 10.41 0 0 0-.5 13.77l7.41 8.91a10.23 10.23 0 0 0 13.58 2l22.37-13.43a5.39 5.39 0 0 1 6.39.63c2.48 2.17 5 4.26 7.37 6.19a5.47 5.47 0 0 1 1.73 6.21l-9.27 24.4a10.35 10.35 0 0 0 4.31 13.07l10.11 5.84a10.3 10.3 0 0 0 13.45-2.82L187 415.92c1.4-1.73 3.6-2.5 5.23-1.84 3.48 1.44 5.81 2.25 9.94 3.63a5.44 5.44 0 0 1 3.75 5.23l-.4 26.05a10.5 10.5 0 0 0 8.57 10.88l11.45 2a10.43 10.43 0 0 0 11.75-7.17l8.5-24.77a5.45 5.45 0 0 1 5.36-3.65h9.75a5.49 5.49 0 0 1 5.3 3.67l8.47 24.67a10.48 10.48 0 0 0 10 7.41 9.74 9.74 0 0 0 1.78-.16l11.47-2a10.46 10.46 0 0 0 8.56-10.79l-.4-26.16a5.43 5.43 0 0 1 3.75-5.2c3.84-1.29 6.54-2.33 8.91-3.25l.6-.23c3.1-1.07 4.6.23 5.47 1.31l16.75 20.63A10.3 10.3 0 0 0 355 439l10.07-5.83a10.35 10.35 0 0 0 4.31-13.1l-9.24-24.34a5.52 5.52 0 0 1 1.69-6.23c2.43-2 4.92-4 7.4-6.22a5.39 5.39 0 0 1 6.38-.62l22.39 13.4a10.39 10.39 0 0 0 13.61-2l7.4-8.9a10.31 10.31 0 0 0-.37-13.75l-17.06-19.67a5.42 5.42 0 0 1-.45-6.45c1.71-2.71 3.34-5.57 4.82-8.44a5.55 5.55 0 0 1 5.86-2.82l25.48 4.97a10.34 10.34 0 0 0 12.14-6.51l3.95-10.88a10.37 10.37 0 0 0-5-12.84l-22.8-12.67a5.4 5.4 0 0 1-2.61-5.89l.24-1.27c.52-2.79 1-5.43 1.46-8.24a5.48 5.48 0 0 1 4.46-4.64l25.69-4.14a10.43 10.43 0 0 0 9.18-10.28v-11.71zm-282.45 94a15.8 15.8 0 0 1-25.47 2.66 135.06 135.06 0 0 1 .42-181.65 15.81 15.81 0 0 1 25.5 2.77l45.65 80.35a15.85 15.85 0 0 1 0 15.74zM256 391.11a134.75 134.75 0 0 1-28.31-3 15.81 15.81 0 0 1-10.23-23.36l46-80a15.79 15.79 0 0 1 13.7-7.93h92.14a15.8 15.8 0 0 1 15.1 20.53c-17.49 54.32-68.4 93.76-128.4 93.76zm7.51-163.9L218 147.07a15.81 15.81 0 0 1 10.31-23.3 134 134 0 0 1 27.69-2.88c60 0 110.91 39.44 128.37 93.79a15.8 15.8 0 0 1-15.1 20.53h-92a15.78 15.78 0 0 1-13.76-8z"},child:[]}]})(e)}function tl(e){return Ya({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m441 336.2-.06-.05c-9.93-9.18-22.78-11.34-32.16-12.92l-.69-.12c-9.05-1.49-10.48-2.5-14.58-6.17-2.44-2.17-5.35-5.65-5.35-9.94s2.91-7.77 5.34-9.94l30.28-26.87c25.92-22.91 40.2-53.66 40.2-86.59s-14.25-63.68-40.2-86.6c-35.89-31.59-85-49-138.37-49C223.72 48 162 71.37 116 112.11c-43.87 38.77-68 90.71-68 146.24s24.16 107.47 68 146.23c21.75 19.24 47.49 34.18 76.52 44.42a266.17 266.17 0 0 0 86.87 15h1.81c61 0 119.09-20.57 159.39-56.4 9.7-8.56 15.15-20.83 15.34-34.56.21-14.17-5.37-27.95-14.93-36.84zM112 208a32 32 0 1 1 32 32 32 32 0 0 1-32-32zm40 135a32 32 0 1 1 32-32 32 32 0 0 1-32 32zm40-199a32 32 0 1 1 32 32 32 32 0 0 1-32-32zm64 271a48 48 0 1 1 48-48 48 48 0 0 1-48 48zm72-239a32 32 0 1 1 32-32 32 32 0 0 1-32 32z"},child:[]}]})(e)}function nl(e){return Ya({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"m400 148-21.12-24.57A191.43 191.43 0 0 0 240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 0 0 181.07-128"},child:[]},{tag:"path",attr:{d:"M464 97.42V208a16 16 0 0 1-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"},child:[]}]})(e)}function il(e){return Ya({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m476.59 227.05-.16-.07L49.35 49.84A23.56 23.56 0 0 0 27.14 52 24.65 24.65 0 0 0 16 72.59v113.29a24 24 0 0 0 19.52 23.57l232.93 43.07a4 4 0 0 1 0 7.86L35.53 303.45A24 24 0 0 0 16 327v113.31A23.57 23.57 0 0 0 26.59 460a23.94 23.94 0 0 0 13.22 4 24.55 24.55 0 0 0 9.52-1.93L476.4 285.94l.19-.09a32 32 0 0 0 0-58.8z"},child:[]}]})(e)}function rl(e){return Ya({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"256",cy:"256",r:"48"},child:[]},{tag:"path",attr:{d:"m470.39 300-.47-.38-31.56-24.75a16.11 16.11 0 0 1-6.1-13.33v-11.56a16 16 0 0 1 6.11-13.22L469.92 212l.47-.38a26.68 26.68 0 0 0 5.9-34.06l-42.71-73.9a1.59 1.59 0 0 1-.13-.22A26.86 26.86 0 0 0 401 92.14l-.35.13-37.1 14.93a15.94 15.94 0 0 1-14.47-1.29q-4.92-3.1-10-5.86a15.94 15.94 0 0 1-8.19-11.82l-5.59-39.59-.12-.72A27.22 27.22 0 0 0 298.76 26h-85.52a26.92 26.92 0 0 0-26.45 22.39l-.09.56-5.57 39.67a16 16 0 0 1-8.13 11.82 175.21 175.21 0 0 0-10 5.82 15.92 15.92 0 0 1-14.43 1.27l-37.13-15-.35-.14a26.87 26.87 0 0 0-32.48 11.34l-.13.22-42.77 73.95a26.71 26.71 0 0 0 5.9 34.1l.47.38 31.56 24.75a16.11 16.11 0 0 1 6.1 13.33v11.56a16 16 0 0 1-6.11 13.22L42.08 300l-.47.38a26.68 26.68 0 0 0-5.9 34.06l42.71 73.9a1.59 1.59 0 0 1 .13.22 26.86 26.86 0 0 0 32.45 11.3l.35-.13 37.07-14.93a15.94 15.94 0 0 1 14.47 1.29q4.92 3.11 10 5.86a15.94 15.94 0 0 1 8.19 11.82l5.56 39.59.12.72A27.22 27.22 0 0 0 213.24 486h85.52a26.92 26.92 0 0 0 26.45-22.39l.09-.56 5.57-39.67a16 16 0 0 1 8.18-11.82c3.42-1.84 6.76-3.79 10-5.82a15.92 15.92 0 0 1 14.43-1.27l37.13 14.95.35.14a26.85 26.85 0 0 0 32.48-11.34 2.53 2.53 0 0 1 .13-.22l42.71-73.89a26.7 26.7 0 0 0-5.89-34.11zm-134.48-40.24a80 80 0 1 1-83.66-83.67 80.21 80.21 0 0 1 83.66 83.67z"},child:[]}]})(e)}function ol(e){return Ya({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",d:"M296 64h-80a7.91 7.91 0 0 0-8 8v24h96V72a7.91 7.91 0 0 0-8-8z"},child:[]},{tag:"path",attr:{d:"M432 96h-96V72a40 40 0 0 0-40-40h-80a40 40 0 0 0-40 40v24H80a16 16 0 0 0 0 32h17l19 304.92c1.42 26.85 22 47.08 48 47.08h184c26.13 0 46.3-19.78 48-47l19-305h17a16 16 0 0 0 0-32zM192.57 416H192a16 16 0 0 1-16-15.43l-8-224a16 16 0 1 1 32-1.14l8 224A16 16 0 0 1 192.57 416zM272 400a16 16 0 0 1-32 0V176a16 16 0 0 1 32 0zm32-304h-96V72a7.91 7.91 0 0 1 8-8h80a7.91 7.91 0 0 1 8 8zm32 304.57A16 16 0 0 1 320 416h-.58A16 16 0 0 1 304 399.43l8-224a16 16 0 1 1 32 1.14z"},child:[]}]})(e)}function sl({title:e,onClose:i,onSettings:r}){return n("div",{className:"bmxcb__header",children:[t("span",{style:{all:"inherit"},children:e}),n("div",{className:"bmxcb__header-actions",children:[t("button",{className:"bmxcb__settings-button",onClick:r,"aria-label":"Open settings",children:t(rl,{size:16})}),t("button",{className:"bmxcb__close",onClick:i,"aria-label":"Close",children:t(Ja,{size:18})})]})]})}function al(e){try{return(e?new Date(e):new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}function ll({content:e,createdAt:i}){return t(ja.div,{className:"bmxcb__message bmxcb__message--user",initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:400,damping:25,duration:.3},layout:!0,children:n("div",{className:"bmxcb__message-content",children:[t("div",{className:"bmxcb__message-text",children:e}),t("div",{className:"bmxcb__message-time bmxcb__message-time--user",children:al(i)})]})})}function cl(){}function ul(){}!function(e){e.USER="user",e.ASSISTANT="assistant",e.SYSTEM="system"}(Va||(Va={}));const dl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pl={};function fl(e,t){return((t||pl).jsx?hl:dl).test(e)}const ml=/[ \t\n\f\r]/g;function gl(e){return""===e.replace(ml,"")}class bl{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function yl(e,t){const n={},i={};for(const t of e)Object.assign(n,t.property),Object.assign(i,t.normal);return new bl(n,i,t)}function vl(e){return e.toLowerCase()}bl.prototype.normal={},bl.prototype.property={},bl.prototype.space=void 0;class xl{constructor(e,t){this.attribute=t,this.property=e}}xl.prototype.attribute="",xl.prototype.booleanish=!1,xl.prototype.boolean=!1,xl.prototype.commaOrSpaceSeparated=!1,xl.prototype.commaSeparated=!1,xl.prototype.defined=!1,xl.prototype.mustUseProperty=!1,xl.prototype.number=!1,xl.prototype.overloadedBoolean=!1,xl.prototype.property="",xl.prototype.spaceSeparated=!1,xl.prototype.space=void 0;let wl=0;const kl=Tl(),_l=Tl(),El=Tl(),Sl=Tl(),Al=Tl(),Cl=Tl(),Ml=Tl();function Tl(){return 2**++wl}const Nl=Object.keys(k);class Ol extends xl{constructor(e,t,n,i){let r=-1;if(super(e,t),Il(this,"space",i),"number"==typeof n)for(;++r<Nl.length;){const e=Nl[r];Il(this,Nl[r],(n&k[e])===k[e])}}}function Il(e,t,n){n&&(e[t]=n)}function Dl(e){const t={},n={};for(const[i,r]of Object.entries(e.properties)){const o=new Ol(i,e.transform(e.attributes||{},i),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),t[i]=o,n[vl(i)]=i,n[vl(o.attribute)]=i}return new bl(t,n,e.space)}Ol.prototype.defined=!0;const Rl=Dl({properties:{ariaActiveDescendant:null,ariaAtomic:_l,ariaAutoComplete:null,ariaBusy:_l,ariaChecked:_l,ariaColCount:Sl,ariaColIndex:Sl,ariaColSpan:Sl,ariaControls:Al,ariaCurrent:null,ariaDescribedBy:Al,ariaDetails:null,ariaDisabled:_l,ariaDropEffect:Al,ariaErrorMessage:null,ariaExpanded:_l,ariaFlowTo:Al,ariaGrabbed:_l,ariaHasPopup:null,ariaHidden:_l,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Al,ariaLevel:Sl,ariaLive:null,ariaModal:_l,ariaMultiLine:_l,ariaMultiSelectable:_l,ariaOrientation:null,ariaOwns:Al,ariaPlaceholder:null,ariaPosInSet:Sl,ariaPressed:_l,ariaReadOnly:_l,ariaRelevant:null,ariaRequired:_l,ariaRoleDescription:Al,ariaRowCount:Sl,ariaRowIndex:Sl,ariaRowSpan:Sl,ariaSelected:_l,ariaSetSize:Sl,ariaSort:null,ariaValueMax:Sl,ariaValueMin:Sl,ariaValueNow:Sl,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Pl(e,t){return t in e?e[t]:t}function Ll(e,t){return Pl(e,t.toLowerCase())}const Fl=Dl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cl,acceptCharset:Al,accessKey:Al,action:null,allow:null,allowFullScreen:kl,allowPaymentRequest:kl,allowUserMedia:kl,alt:null,as:null,async:kl,autoCapitalize:null,autoComplete:Al,autoFocus:kl,autoPlay:kl,blocking:Al,capture:null,charSet:null,checked:kl,cite:null,className:Al,cols:Sl,colSpan:null,content:null,contentEditable:_l,controls:kl,controlsList:Al,coords:Sl|Cl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:kl,defer:kl,dir:null,dirName:null,disabled:kl,download:El,draggable:_l,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:kl,formTarget:null,headers:Al,height:Sl,hidden:El,high:Sl,href:null,hrefLang:null,htmlFor:Al,httpEquiv:Al,id:null,imageSizes:null,imageSrcSet:null,inert:kl,inputMode:null,integrity:null,is:null,isMap:kl,itemId:null,itemProp:Al,itemRef:Al,itemScope:kl,itemType:Al,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:kl,low:Sl,manifest:null,max:null,maxLength:Sl,media:null,method:null,min:null,minLength:Sl,multiple:kl,muted:kl,name:null,nonce:null,noModule:kl,noValidate:kl,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:kl,optimum:Sl,pattern:null,ping:Al,placeholder:null,playsInline:kl,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:kl,referrerPolicy:null,rel:Al,required:kl,reversed:kl,rows:Sl,rowSpan:Sl,sandbox:Al,scope:null,scoped:kl,seamless:kl,selected:kl,shadowRootClonable:kl,shadowRootDelegatesFocus:kl,shadowRootMode:null,shape:null,size:Sl,sizes:null,slot:null,span:Sl,spellCheck:_l,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Sl,step:null,style:null,tabIndex:Sl,target:null,title:null,translate:null,type:null,typeMustMatch:kl,useMap:null,value:_l,width:Sl,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Al,axis:null,background:null,bgColor:null,border:Sl,borderColor:null,bottomMargin:Sl,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:kl,declare:kl,event:null,face:null,frame:null,frameBorder:null,hSpace:Sl,leftMargin:Sl,link:null,longDesc:null,lowSrc:null,marginHeight:Sl,marginWidth:Sl,noResize:kl,noHref:kl,noShade:kl,noWrap:kl,object:null,profile:null,prompt:null,rev:null,rightMargin:Sl,rules:null,scheme:null,scrolling:_l,standby:null,summary:null,text:null,topMargin:Sl,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Sl,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:kl,disableRemotePlayback:kl,prefix:null,property:null,results:Sl,security:null,unselectable:null},space:"html",transform:Ll}),Bl=Dl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ml,accentHeight:Sl,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Sl,amplitude:Sl,arabicForm:null,ascent:Sl,attributeName:null,attributeType:null,azimuth:Sl,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Sl,by:null,calcMode:null,capHeight:Sl,className:Al,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Sl,diffuseConstant:Sl,direction:null,display:null,dur:null,divisor:Sl,dominantBaseline:null,download:kl,dx:null,dy:null,edgeMode:null,editable:null,elevation:Sl,enableBackground:null,end:null,event:null,exponent:Sl,externalResourcesRequired:null,fill:null,fillOpacity:Sl,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Cl,g2:Cl,glyphName:Cl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Sl,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Sl,horizOriginX:Sl,horizOriginY:Sl,id:null,ideographic:Sl,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Sl,k:Sl,k1:Sl,k2:Sl,k3:Sl,k4:Sl,kernelMatrix:Ml,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Sl,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Sl,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Sl,overlineThickness:Sl,paintOrder:null,panose1:null,path:null,pathLength:Sl,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Al,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Sl,pointsAtY:Sl,pointsAtZ:Sl,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ml,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ml,rev:Ml,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ml,requiredFeatures:Ml,requiredFonts:Ml,requiredFormats:Ml,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Sl,specularExponent:Sl,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Sl,strikethroughThickness:Sl,string:null,stroke:null,strokeDashArray:Ml,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Sl,strokeOpacity:Sl,strokeWidth:null,style:null,surfaceScale:Sl,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ml,tabIndex:Sl,tableValues:null,target:null,targetX:Sl,targetY:Sl,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ml,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Sl,underlineThickness:Sl,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Sl,values:null,vAlphabetic:Sl,vMathematical:Sl,vectorEffect:null,vHanging:Sl,vIdeographic:Sl,version:null,vertAdvY:Sl,vertOriginX:Sl,vertOriginY:Sl,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Sl,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pl}),zl=Dl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),jl=Dl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ll}),Ul=Dl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),$l=yl([Rl,Fl,zl,jl,Ul],"html"),Vl=yl([Rl,Bl,zl,jl,Ul],"svg"),ql=/[A-Z]/g,Hl=/-[a-z]/g,Kl=/^data[-\w.:]+$/i;function Gl(e){return"-"+e.toLowerCase()}function Wl(e){return e.charAt(1).toUpperCase()}const Xl={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"};var Zl=w(598);const Yl=Jl("end"),Ql=Jl("start");function Jl(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ec(e){return e&&"object"==typeof e?"position"in e||"type"in e?nc(e.position):"start"in e||"end"in e?nc(e):"line"in e||"column"in e?tc(e):"":""}function tc(e){return ic(e&&e.line)+":"+ic(e&&e.column)}function nc(e){return tc(e&&e.start)+"-"+tc(e&&e.end)}function ic(e){return e&&"number"==typeof e?e:1}class rc extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let i="",r={},o=!1;if(t&&(r="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?i=e:!r.cause&&e&&(o=!0,i=e.message,r.cause=e),!r.ruleId&&!r.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?r.ruleId=n:(r.source=n.slice(0,e),r.ruleId=n.slice(e+1))}if(!r.place&&r.ancestors&&r.ancestors){const e=r.ancestors[r.ancestors.length-1];e&&(r.place=e.position)}const s=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=ec(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=o&&r.cause&&"string"==typeof r.cause.stack?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rc.prototype.file="",rc.prototype.name="",rc.prototype.reason="",rc.prototype.message="",rc.prototype.stack="",rc.prototype.column=void 0,rc.prototype.line=void 0,rc.prototype.ancestors=void 0,rc.prototype.cause=void 0,rc.prototype.fatal=void 0,rc.prototype.place=void 0,rc.prototype.ruleId=void 0,rc.prototype.source=void 0;const oc={}.hasOwnProperty,sc=new Map,ac=/[A-Z]/g,lc=new Set(["table","tbody","thead","tfoot","tr"]),cc=new Set(["td","th"]),uc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dc(e,t,n){return"element"===t.type?function(e,t,n){const i=e.schema;let r=i;"svg"===t.tagName.toLowerCase()&&"html"===i.space&&(r=Vl,e.schema=r),e.ancestors.push(t);const o=gc(e,t.tagName,!1),s=function(e,t){const n={};let i,r;for(r in t.properties)if("children"!==r&&oc.call(t.properties,r)){const o=mc(e,r,t.properties[r]);if(o){const[r,s]=o;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof s&&cc.has(t.tagName)?i=s:n[r]=s}}return i&&((n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=i),n}(e,t);let a=fc(e,t);return lc.has(t.tagName)&&(a=a.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&gl(t.value):gl(t));var t})),hc(e,s,o,t),pc(s,a),e.ancestors.pop(),e.schema=i,e.create(t,o,s,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}bc(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const i=e.schema;let r=i;"svg"===t.name&&"html"===i.space&&(r=Vl,e.schema=r),e.ancestors.push(t);const o=null===t.name?e.Fragment:gc(e,t.name,!0),s=function(e,t){const n={};for(const i of t.attributes)if("mdxJsxExpressionAttribute"===i.type)if(i.data&&i.data.estree&&e.evaluater){const t=i.data.estree.body[0];cl(t.type);const r=t.expression;cl(r.type);const o=r.properties[0];cl(o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else bc(e,t.position);else{const r=i.name;let o;if(i.value&&"object"==typeof i.value)if(i.value.data&&i.value.data.estree&&e.evaluater){const t=i.value.data.estree.body[0];cl(t.type),o=e.evaluater.evaluateExpression(t.expression)}else bc(e,t.position);else o=null===i.value||i.value;n[r]=o}return n}(e,t),a=fc(e,t);return hc(e,s,o,t),pc(s,a),e.ancestors.pop(),e.schema=i,e.create(t,o,s,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bc(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const i={};return pc(i,fc(e,t)),e.create(t,e.Fragment,i,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function hc(e,t,n,i){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=i)}function pc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fc(e,t){const n=[];let i=-1;const r=e.passKeys?new Map:sc;for(;++i<t.children.length;){const o=t.children[i];let s;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=r.get(e)||0;s=e+"-"+t,r.set(e,t+1)}}const a=dc(e,o,s);void 0!==a&&n.push(a)}return n}function mc(e,t,n){const i=function(e,t){const n=vl(t);let i=t,r=xl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Kl.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Hl,Wl);i="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Hl.test(e)){let n=e.replace(ql,Gl);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}r=Ol}return new r(i,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===i.property){let t="object"==typeof n?n:function(e,t){try{return Zl(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,i=new rc("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=uc+"#cannot-parse-style-attribute",i}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)oc.call(e,n)&&(t[yc(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&i.space?Xl[i.property]||i.property:i.attribute,n]}}function gc(e,t,n){let i;if(n)if(t.includes(".")){const e=t.split(".");let n,r=-1;for(;++r<e.length;){const t=fl(e[r])?{type:"Identifier",name:e[r]}:{type:"Literal",value:e[r]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(r&&"Literal"===t.type),optional:!1}:t}i=n}else i=fl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else i={type:"Literal",value:t};if("Literal"===i.type){const t=i.value;return oc.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(i);bc(e)}function bc(e,t){const n=new rc("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=uc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function yc(e){let t=e.replace(ac,vc);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function vc(e){return"-"+e.toLowerCase()}const xc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},wc={};function kc(e,t){const n=t||wc;return _c(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function _c(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ec(e.children,t,n)}return Array.isArray(e)?Ec(e,t,n):""}function Ec(e,t,n){const i=[];let r=-1;for(;++r<e.length;)i[r]=_c(e[r],t,n);return i.join("")}function Sc(e,t,n,i){const r=e.length;let o,s=0;if(t=t<0?-t>r?0:r+t:t>r?r:t,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<i.length;)o=i.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function Ac(e,t){return e.length>0?(Sc(e,e.length,0,t),e):t}class Cc{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const i=t||0;this.setCursor(Math.trunc(e));const r=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Mc(this.left,n),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Mc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Mc(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Mc(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Mc(this.left,t.reverse())}}}function Mc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Tc(e){const t={};let n,i,r,o,s,a,l,c=-1;const u=new Cc(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(a=n[1]._tokenizer.events,r=0,r<a.length&&"lineEndingBlank"===a[r][1].type&&(r+=2),r<a.length&&"content"===a[r][1].type))for(;++r<a.length&&"content"!==a[r][1].type;)"chunkText"===a[r][1].type&&(a[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Nc(u,c)),c=t[c],l=!0);else if(n[1]._container){for(r=c,i=void 0;r--;)if(o=u.get(r),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=r);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;i&&(n[1].end={...u.get(i)[1].start},s=u.slice(i,c),s.unshift(n),u.splice(i,c-i+1,s))}}return Sc(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Nc(e,t){const n=e.get(t)[1],i=e.get(t)[2];let r=t-1;const o=[];let s=n._tokenizer;s||(s=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,l=[],c={};let u,d,h=-1,p=n,f=0,m=0;const g=[m];for(;p;){for(;e.get(++r)[1]!==p;);o.push(r),p._tokenizer||(u=i.sliceStream(p),p.next||u.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<a.length;)"exit"===a[h][0]&&"enter"===a[h-1][0]&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=a.slice(g[h],g[h+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),h=-1;++h<l.length;)c[f+l[h][0]]=f+l[h][1],f+=l[h][1]-l[h][0]-1;return c}const Oc={}.hasOwnProperty;function Ic(e){const t={};let n=-1;for(;++n<e.length;)Dc(t,e[n]);return t}function Dc(e,t){let n;for(n in t){const i=(Oc.call(e,n)?e[n]:void 0)||(e[n]={}),r=t[n];let o;if(r)for(o in r){Oc.call(i,o)||(i[o]=[]);const e=r[o];Rc(i[o],Array.isArray(e)?e:e?[e]:[])}}}function Rc(e,t){let n=-1;const i=[];for(;++n<t.length;)("after"===t[n].add?e:i).push(t[n]);Sc(e,0,0,i)}const Pc=Gc(/[A-Za-z]/),Lc=Gc(/[\dA-Za-z]/),Fc=Gc(/[#-'*+\--9=?A-Z^-~]/);function Bc(e){return null!==e&&(e<32||127===e)}const zc=Gc(/\d/),jc=Gc(/[\dA-Fa-f]/),Uc=Gc(/[!-/:-@[-`{-~]/);function $c(e){return null!==e&&e<-2}function Vc(e){return null!==e&&(e<0||32===e)}function qc(e){return-2===e||-1===e||32===e}const Hc=Gc(/\p{P}|\p{S}/u),Kc=Gc(/\s/);function Gc(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Wc(e,t,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let o=0;return function(i){return qc(i)?(e.enter(n),s(i)):t(i)};function s(i){return qc(i)&&o++<r?(e.consume(i),s):(e.exit(n),t(i))}}const Xc={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Wc(e,t,"linePrefix");e.consume(n)},function(t){return e.enter("paragraph"),i(t)});let n;return t;function i(t){const i=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=i),n=i,r(t)}function r(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):$c(t)?(e.consume(t),e.exit("chunkText"),i):(e.consume(t),r)}}},Zc={tokenize:function(e){const t=this,n=[];let i,r,o,s=0;return a;function a(i){if(s<n.length){const r=n[s];return t.containerState=r[1],e.attempt(r[0].continuation,l,c)(i)}return c(i)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const n=t.events.length;let r,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){r=t.events[o][1].end;break}b(s);let a=n;for(;a<t.events.length;)t.events[a][1].end={...r},a++;return Sc(t.events,o+1,0,t.events.slice(n)),t.events.length=a,c(e)}return a(e)}function c(r){if(s===n.length){if(!i)return h(r);if(i.currentConstruct&&i.currentConstruct.concrete)return f(r);t.interrupt=Boolean(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Yc,u,d)(r)}function u(e){return i&&y(),b(s),h(e)}function d(e){return t.parser.lazy[t.now().line]=s!==n.length,o=t.now().offset,f(e)}function h(n){return t.containerState={},e.attempt(Yc,p,f)(n)}function p(e){return s++,n.push([t.currentConstruct,t.containerState]),h(e)}function f(n){return null===n?(i&&y(),b(0),void e.consume(n)):(i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:r}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),b(0),void e.consume(n)):$c(n)?(e.consume(n),g(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(n),m)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=r,r&&(r.next=e),r=e,i.defineSkip(e.start),i.write(a),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;const n=t.events.length;let r,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(r){a=t.events[l][1].end;break}r=!0}for(b(s),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;Sc(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(i){let r=n.length;for(;r-- >i;){const i=n[r];t.containerState=i[1],i[0].exit.call(t,e)}n.length=i}function y(){i.write([null]),r=void 0,i=void 0,t.containerState._closeFlow=void 0}}},Yc={tokenize:function(e,t,n){return Wc(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},Qc={partial:!0,tokenize:function(e,t,n){return function(t){return qc(t)?Wc(e,i,"linePrefix")(t):i(t)};function i(e){return null===e||$c(e)?t(e):n(e)}}},Jc={resolve:function(e){return Tc(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(t)};function i(t){return null===t?r(t):$c(t)?e.check(eu,o,r)(t):(e.consume(t),i)}function r(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}},eu={partial:!0,tokenize:function(e,t,n){const i=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Wc(e,r,"linePrefix")};function r(r){if(null===r||$c(r))return n(r);const o=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}},tu={tokenize:function(e){const t=this,n=e.attempt(Qc,function(i){if(null!==i)return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(i)},e.attempt(this.parser.constructs.flowInitial,i,Wc(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Jc,i)),"linePrefix")));return n;function i(i){if(null!==i)return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(i)}}},nu={resolveAll:su()},iu=ou("string"),ru=ou("text");function ou(e){return{resolveAll:su("text"===e?au:void 0),tokenize:function(t){const n=this,i=this.parser.constructs[e],r=t.attempt(i,o,s);return o;function o(e){return l(e)?r(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),r(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=i[e];let r=-1;if(t)for(;++r<t.length;){const e=t[r];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function su(e){return function(t,n){let i,r=-1;for(;++r<=t.length;)void 0===i?t[r]&&"data"===t[r][1].type&&(i=r,r++):t[r]&&"data"===t[r][1].type||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function au(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const i=e[n-1][1],r=t.sliceStream(i);let o,s=r.length,a=-1,l=0;for(;s--;){const e=r[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)o=!0,l++;else if(-1!==e){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const r={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:i.start._bufferIndex+a,_index:i.start._index+s,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...r.start},i.start.offset===i.end.offset?Object.assign(i,r):(e.splice(n,0,["enter",r,t],["exit",r,t]),n+=2)}n++}return e}const lu={name:"thematicBreak",tokenize:function(e,t,n){let i,r=0;return function(t){return e.enter("thematicBreak"),function(e){return i=e,o(e)}(t)};function o(o){return o===i?(e.enter("thematicBreakSequence"),s(o)):r>=3&&(null===o||$c(o))?(e.exit("thematicBreak"),t(o)):n(o)}function s(t){return t===i?(e.consume(t),r++,s):(e.exit("thematicBreakSequence"),qc(t)?Wc(e,o,"whitespace")(t):o(t))}}},cu={continuation:{tokenize:function(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Qc,function(n){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Wc(e,t,"listItemIndent",i.containerState.size+1)(n)},function(n){return i.containerState.furtherBlankLines||!qc(n)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(n)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(du,t,r)(n))});function r(r){return i.containerState._closeFlow=!0,i.interrupt=void 0,Wc(e,e.attempt(cu,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const i=this,r=i.events[i.events.length-1];let o=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,s=0;return function(t){const r=i.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===r?!i.containerState.marker||t===i.containerState.marker:zc(t)){if(i.containerState.type||(i.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===t||45===t?e.check(lu,n,l)(t):l(t);if(!i.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return zc(t)&&++s<10?(e.consume(t),a):(!i.interrupt||s<2)&&(i.containerState.marker?t===i.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||t,e.check(Qc,i.interrupt?n:c,e.attempt(uu,d,u))}function c(e){return i.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return qc(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},uu={partial:!0,tokenize:function(e,t,n){const i=this;return Wc(e,function(e){const r=i.events[i.events.length-1];return!qc(e)&&r&&"listItemPrefixWhitespace"===r[1].type?t(e):n(e)},"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},du={partial:!0,tokenize:function(e,t,n){const i=this;return Wc(e,function(e){const r=i.events[i.events.length-1];return r&&"listItemIndent"===r[1].type&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(e):n(e)},"listItemIndent",i.containerState.size+1)}},hu={continuation:{tokenize:function(e,t,n){const i=this;return function(t){return qc(t)?Wc(e,r,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):r(t)};function r(i){return e.attempt(hu,t,n)(i)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const i=this;return function(t){if(62===t){const n=i.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),r}return n(t)};function r(n){return qc(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};function pu(e,t,n,i,r,o,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(i),e.enter(r),e.enter(o),e.consume(t),e.exit(o),d):null===t||32===t||41===t||Bc(t)?n(t):(e.enter(i),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t))};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),e.exit(i),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||$c(t)?n(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function f(r){return u||null!==r&&41!==r&&!Vc(r)?u<c&&40===r?(e.consume(r),u++,f):41===r?(e.consume(r),u--,f):null===r||32===r||40===r||Bc(r)?n(r):(e.consume(r),92===r?m:f):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(i),t(r))}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function fu(e,t,n,i,r,o){const s=this;let a,l=0;return function(t){return e.enter(i),e.enter(r),e.consume(t),e.exit(r),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):93===d?(e.exit(o),e.enter(r),e.consume(d),e.exit(r),e.exit(i),t):$c(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||$c(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!qc(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function mu(e,t,n,i,r,o){let s;return function(t){return 34===t||39===t||40===t?(e.enter(i),e.enter(r),e.consume(t),e.exit(r),s=40===t?41:t,a):n(t)};function a(n){return n===s?(e.enter(r),e.consume(n),e.exit(r),e.exit(i),t):(e.enter(o),l(n))}function l(t){return t===s?(e.exit(o),a(s)):null===t?n(t):$c(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Wc(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||$c(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===s||92===t?(e.consume(t),c):c(t)}}function gu(e,t){let n;return function i(r){return $c(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,i):qc(r)?Wc(e,i,n?"linePrefix":"lineSuffix")(r):t(r)}}function bu(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yu={name:"definition",tokenize:function(e,t,n){const i=this;let r;return function(t){return e.enter("definition"),function(t){return fu.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return r=bu(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return Vc(t)?gu(e,a)(t):a(t)}function a(t){return pu(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(vu,c,c)(t)}function c(t){return qc(t)?Wc(e,u,"whitespace")(t):u(t)}function u(o){return null===o||$c(o)?(e.exit("definition"),i.parser.defined.push(r),t(o)):n(o)}}},vu={partial:!0,tokenize:function(e,t,n){return function(t){return Vc(t)?gu(e,i)(t):n(t)};function i(t){return mu(e,r,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function r(t){return qc(t)?Wc(e,o,"whitespace")(t):o(t)}function o(e){return null===e||$c(e)?t(e):n(e)}}},xu={name:"codeIndented",tokenize:function(e,t,n){const i=this;return function(t){return e.enter("codeIndented"),Wc(e,r,"linePrefix",5)(t)};function r(e){const t=i.events[i.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?a(t):$c(t)?e.attempt(wu,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||$c(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}},wu={partial:!0,tokenize:function(e,t,n){const i=this;return r;function r(t){return i.parser.lazy[i.now().line]?n(t):$c(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r):Wc(e,o,"linePrefix",5)(t)}function o(e){const o=i.events[i.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):$c(e)?r(e):n(e)}}},ku={name:"headingAtx",resolve:function(e,t){let n,i,r=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),r-2>o&&"whitespace"===e[r][1].type&&(r-=2),"atxHeadingSequence"===e[r][1].type&&(o===r-1||r-4>o&&"whitespace"===e[r-2][1].type)&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},i={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},Sc(e,o,r-o+1,[["enter",n,t],["enter",i,t],["exit",i,t],["exit",n,t]])),e},tokenize:function(e,t,n){let i=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),r(t)}(t)};function r(t){return 35===t&&i++<6?(e.consume(t),r):null===t||Vc(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||$c(n)?(e.exit("atxHeading"),t(n)):qc(n)?Wc(e,o,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function a(t){return null===t||35===t||Vc(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),a)}}},_u={name:"setextUnderline",resolveTo:function(e,t){let n,i,r,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(i=o)}else"content"===e[o][1].type&&e.splice(o,1),r||"definition"!==e[o][1].type||(r=o);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",r?(e.splice(i,0,["enter",s,t]),e.splice(r+1,0,["exit",e[n][1],t]),e[n][1].end={...e[r][1].end}):e[n][1]=s,e.push(["exit",s,t]),e},tokenize:function(e,t,n){const i=this;let r;return function(t){let s,a=i.events.length;for(;a--;)if("lineEnding"!==i.events[a][1].type&&"linePrefix"!==i.events[a][1].type&&"content"!==i.events[a][1].type){s="paragraph"===i.events[a][1].type;break}return i.parser.lazy[i.now().line]||!i.interrupt&&!s?n(t):(e.enter("setextHeadingLine"),r=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t))};function o(t){return t===r?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),qc(t)?Wc(e,s,"lineSuffix")(t):s(t))}function s(i){return null===i||$c(i)?(e.exit("setextHeadingLine"),t(i)):n(i)}}},Eu=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Su=["pre","script","style","textarea"],Au={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(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},tokenize:function(e,t,n){const i=this;let r,o,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),o=!0,p):63===a?(e.consume(a),r=3,i.interrupt?t:R):Pc(a)?(e.consume(a),s=String.fromCharCode(a),f):n(a)}function u(o){return 45===o?(e.consume(o),r=2,d):91===o?(e.consume(o),r=5,a=0,h):Pc(o)?(e.consume(o),r=4,i.interrupt?t:R):n(o)}function d(r){return 45===r?(e.consume(r),i.interrupt?t:R):n(r)}function h(r){return r==="CDATA[".charCodeAt(a++)?(e.consume(r),6===a?i.interrupt?t:A:h):n(r)}function p(t){return Pc(t)?(e.consume(t),s=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||Vc(a)){const l=47===a,c=s.toLowerCase();return l||o||!Su.includes(c)?Eu.includes(s.toLowerCase())?(r=6,l?(e.consume(a),m):i.interrupt?t(a):A(a)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(a):o?g(a):b(a)):(r=1,i.interrupt?t(a):A(a))}return 45===a||Lc(a)?(e.consume(a),s+=String.fromCharCode(a),f):n(a)}function m(r){return 62===r?(e.consume(r),i.interrupt?t:A):n(r)}function g(t){return qc(t)?(e.consume(t),g):E(t)}function b(t){return 47===t?(e.consume(t),E):58===t||95===t||Pc(t)?(e.consume(t),y):qc(t)?(e.consume(t),b):E(t)}function y(t){return 45===t||46===t||58===t||95===t||Lc(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),x):qc(t)?(e.consume(t),v):b(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):qc(t)?(e.consume(t),x):k(t)}function w(t){return t===l?(e.consume(t),l=null,_):null===t||$c(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Vc(t)?v(t):(e.consume(t),k)}function _(e){return 47===e||62===e||qc(e)?b(e):n(e)}function E(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||$c(t)?A(t):qc(t)?(e.consume(t),S):n(t)}function A(t){return 45===t&&2===r?(e.consume(t),N):60===t&&1===r?(e.consume(t),O):62===t&&4===r?(e.consume(t),P):63===t&&3===r?(e.consume(t),R):93===t&&5===r?(e.consume(t),D):!$c(t)||6!==r&&7!==r?null===t||$c(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),A):(e.exit("htmlFlowData"),e.check(Cu,L,C)(t))}function C(t){return e.check(Mu,M,L)(t)}function M(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return null===t||$c(t)?C(t):(e.enter("htmlFlowData"),A(t))}function N(t){return 45===t?(e.consume(t),R):A(t)}function O(t){return 47===t?(e.consume(t),s="",I):A(t)}function I(t){if(62===t){const n=s.toLowerCase();return Su.includes(n)?(e.consume(t),P):A(t)}return Pc(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),I):A(t)}function D(t){return 93===t?(e.consume(t),R):A(t)}function R(t){return 62===t?(e.consume(t),P):45===t&&2===r?(e.consume(t),R):A(t)}function P(t){return null===t||$c(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),P)}function L(n){return e.exit("htmlFlow"),t(n)}}},Cu={partial:!0,tokenize:function(e,t,n){return function(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qc,t,n)}}},Mu={partial:!0,tokenize:function(e,t,n){const i=this;return function(t){return $c(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r):n(t)};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}}},Tu={partial:!0,tokenize:function(e,t,n){const i=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r)};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}}},Nu={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const i=this,r={partial:!0,tokenize:function(e,t,n){let r=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s};function s(t){return e.enter("codeFencedFence"),qc(t)?Wc(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(r++,e.consume(t),c):r>=a?(e.exit("codeFencedFenceSequence"),qc(t)?Wc(e,u,"whitespace")(t):u(t)):n(t)}function u(i){return null===i||$c(i)?(e.exit("codeFencedFence"),t(i)):n(i)}}};let o,s=0,a=0;return function(t){return function(t){const n=i.events[i.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(a++,e.consume(t),l):a<3?n(t):(e.exit("codeFencedFenceSequence"),qc(t)?Wc(e,c,"whitespace")(t):c(t))}function c(n){return null===n||$c(n)?(e.exit("codeFencedFence"),i.interrupt?t(n):e.check(Tu,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||$c(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):qc(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Wc(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||$c(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||$c(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),h)}function p(t){return e.attempt(r,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&qc(t)?Wc(e,g,"linePrefix",s+1)(t):g(t)}function g(t){return null===t||$c(t)?e.check(Tu,p,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||$c(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}}},Ou=document.createElement("i");function Iu(e){const t="&"+e+";";Ou.innerHTML=t;const n=Ou.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}const Du={name:"characterReference",tokenize:function(e,t,n){const i=this;let r,o,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,o=Lc,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,o=jc,c):(e.enter("characterReferenceValue"),r=7,o=zc,c(t))}function c(a){if(59===a&&s){const r=e.exit("characterReferenceValue");return o!==Lc||Iu(i.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return o(a)&&s++<r?(e.consume(a),c):n(a)}}},Ru={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),i};function i(i){return Uc(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}},Pu={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Wc(e,t,"linePrefix")}}};function Lu(e,t,n){const i=[];let r=-1;for(;++r<e.length;){const o=e[r].resolveAll;o&&!i.includes(o)&&(t=o(t,n),i.push(o))}return t}const Fu={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),"labelImage"===i.type||"labelLink"===i.type||"labelEnd"===i.type){const e="labelImage"===i.type?4:2;i.type="data",t+=e}}return e.length!==n.length&&Sc(e,0,e.length,n),e},resolveTo:function(e,t){let n,i,r,o,s=e.length,a=0;for(;s--;)if(n=e[s][1],i){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(r){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(i=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(r=s);const l={type:"labelLink"===e[i][1].type?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[r][1].end}},u={type:"labelText",start:{...e[i+a+2][1].end},end:{...e[r-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Ac(o,e.slice(i+1,i+a+3)),o=Ac(o,[["enter",u,t]]),o=Ac(o,Lu(t.parser.constructs.insideSpan.null,e.slice(i+a+4,r-3),t)),o=Ac(o,[["exit",u,t],e[r-2],e[r-1],["exit",c,t]]),o=Ac(o,e.slice(r+1)),o=Ac(o,[["exit",l,t]]),Sc(e,i,e.length,o),e},tokenize:function(e,t,n){const i=this;let r,o,s=i.events.length;for(;s--;)if(("labelImage"===i.events[s][1].type||"labelLink"===i.events[s][1].type)&&!i.events[s][1]._balanced){r=i.events[s][1];break}return function(t){return r?r._inactive?u(t):(o=i.parser.defined.includes(bu(i.sliceSerialize({start:r.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(Bu,c,o?c:u)(t):91===t?e.attempt(zu,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(ju,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}}},Bu={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),i};function i(t){return Vc(t)?gu(e,r)(t):r(t)}function r(t){return 41===t?c(t):pu(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Vc(t)?gu(e,a)(t):c(t)}function s(e){return n(e)}function a(t){return 34===t||39===t||40===t?mu(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Vc(t)?gu(e,c)(t):c(t)}function c(i){return 41===i?(e.enter("resourceMarker"),e.consume(i),e.exit("resourceMarker"),e.exit("resource"),t):n(i)}}},zu={tokenize:function(e,t,n){const i=this;return function(t){return fu.call(i,e,r,o,"reference","referenceMarker","referenceString")(t)};function r(e){return i.parser.defined.includes(bu(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},ju={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),i};function i(i){return 93===i?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}},Uu={name:"labelStartImage",resolveAll:Fu.resolveAll,tokenize:function(e,t,n){const i=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),r};function r(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?n(e):t(e)}}};function $u(e){return null===e||Vc(e)||Kc(e)?1:Hc(e)?2:void 0}const Vu={name:"attention",resolveAll:function(e,t){let n,i,r,o,s,a,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},h={...e[u][1].start};qu(d,-a),qu(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:h},r={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[n][1].end={...o.start},e[u][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Ac(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Ac(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",r,t]]),l=Ac(l,Lu(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Ac(l,[["exit",r,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Ac(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Sc(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,r=$u(i);let o;return function(t){return o=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===o)return e.consume(a),s;const l=e.exit("attentionSequence"),c=$u(a),u=!c||2===c&&r||n.includes(a),d=!r||2===r&&c||n.includes(i);return l._open=Boolean(42===o?u:u&&(r||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(a)}}};function qu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Hu={name:"autolink",tokenize:function(e,t,n){let i=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r};function r(t){return Pc(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||Lc(e)?(i=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),i=0,a):(43===t||45===t||46===t||Lc(t))&&i++<32?(e.consume(t),s):(i=0,l(t))}function a(i){return 62===i?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):null===i||32===i||60===i||Bc(i)?n(i):(e.consume(i),a)}function l(t){return 64===t?(e.consume(t),c):Fc(t)?(e.consume(t),l):n(t)}function c(e){return Lc(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),i=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Lc(t))&&i++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},Ku={name:"htmlText",tokenize:function(e,t,n){const i=this;let r,o,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),y):Pc(t)?(e.consume(t),_):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,p):Pc(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),h):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):$c(t)?(s=u,I(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),h):u(t)}function h(e){return 62===e?O(e):45===e?d(e):u(e)}function p(t){return t==="CDATA[".charCodeAt(o++)?(e.consume(t),6===o?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):$c(t)?(s=f,I(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):f(t)}function b(t){return null===t||62===t?O(t):$c(t)?(s=b,I(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):$c(t)?(s=y,I(t)):(e.consume(t),y)}function v(e){return 62===e?O(e):y(e)}function x(t){return Pc(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||Lc(t)?(e.consume(t),w):k(t)}function k(t){return $c(t)?(s=k,I(t)):qc(t)?(e.consume(t),k):O(t)}function _(t){return 45===t||Lc(t)?(e.consume(t),_):47===t||62===t||Vc(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),O):58===t||95===t||Pc(t)?(e.consume(t),S):$c(t)?(s=E,I(t)):qc(t)?(e.consume(t),E):O(t)}function S(t){return 45===t||46===t||58===t||95===t||Lc(t)?(e.consume(t),S):A(t)}function A(t){return 61===t?(e.consume(t),C):$c(t)?(s=A,I(t)):qc(t)?(e.consume(t),A):E(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,M):$c(t)?(s=C,I(t)):qc(t)?(e.consume(t),C):(e.consume(t),T)}function M(t){return t===r?(e.consume(t),r=void 0,N):null===t?n(t):$c(t)?(s=M,I(t)):(e.consume(t),M)}function T(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Vc(t)?E(t):(e.consume(t),T)}function N(e){return 47===e||62===e||Vc(e)?E(e):n(e)}function O(i){return 62===i?(e.consume(i),e.exit("htmlTextData"),e.exit("htmlText"),t):n(i)}function I(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),D}function D(t){return qc(t)?Wc(e,R,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):R(t)}function R(t){return e.enter("htmlTextData"),s(t)}}},Gu={name:"labelStartLink",resolveAll:Fu.resolveAll,tokenize:function(e,t,n){const i=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),r};function r(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?n(e):t(e)}}},Wu={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),i};function i(i){return $c(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}},Xu={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,i=e.length-4,r=3;if(!("lineEnding"!==e[r][1].type&&"space"!==e[r][1].type||"lineEnding"!==e[i][1].type&&"space"!==e[i][1].type))for(t=r;++t<i;)if("codeTextData"===e[t][1].type){e[r][1].type="codeTextPadding",e[i][1].type="codeTextPadding",r+=2,i-=2;break}for(t=r-1,i++;++t<=i;)void 0===n?t!==i&&"lineEnding"!==e[t][1].type&&(n=t):t!==i&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),i-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let i,r,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),o++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(r=e.enter("codeTextSequence"),i=0,c(t)):$c(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||$c(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),i++,c):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(r.type="codeTextData",l(n))}}},Zu={42:cu,43:cu,45:cu,48:cu,49:cu,50:cu,51:cu,52:cu,53:cu,54:cu,55:cu,56:cu,57:cu,62:hu},Yu={91:yu},Qu={[-2]:xu,[-1]:xu,32:xu},Ju={35:ku,42:lu,45:[_u,lu],60:Au,61:_u,95:lu,96:Nu,126:Nu},ed={38:Du,92:Ru},td={[-5]:Pu,[-4]:Pu,[-3]:Pu,33:Uu,38:Du,42:Vu,60:[Hu,Ku],91:Gu,92:[Wu,Ru],93:Fu,95:Vu,96:Xu},nd={null:[Vu,nu]},id={null:[42,95]},rd={null:[]};function od(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const r={},o=[];let s=[],a=[],l=!0;const c={attempt:b(function(e,t){y(e,t.from)}),check:b(g),consume:function(e){$c(e)?(i.line++,i.column=1,i.offset+=-3===e?2:1,v()):-1!==e&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===s[i._index].length&&(i._bufferIndex=-1,i._index++)),u.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:b(g,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){r[e.line]=e.column,v()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const i=[];let r;for(;++n<e.length;){const o=e[n];let s;if("string"==typeof o)s=o;else switch(o){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&r)continue;s=" ";break;default:s=String.fromCharCode(o)}r=-2===o,i.push(s)}return i.join("")}(p(e),t)},sliceStream:p,write:function(e){return s=Ac(s,e),function(){let e;for(;i._index<s.length;){const t=s[i._index];if("string"==typeof t)for(e=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===e&&i._bufferIndex<t.length;)m(t.charCodeAt(i._bufferIndex));else m(t)}}(),null!==s[s.length-1]?[]:(y(t,0),u.events=Lu(o,u.events,u),u.events)}};let d,h=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function p(e){return function(e,t){const n=t.start._index,i=t.start._bufferIndex,r=t.end._index,o=t.end._bufferIndex;let s;if(n===r)s=[e[n].slice(i,o)];else{if(s=e.slice(n,r),i>-1){const e=s[0];"string"==typeof e?s[0]=e.slice(i):s.shift()}o>0&&s.push(e[r].slice(0,o))}return s}(s,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:r,offset:o}=i;return{_bufferIndex:e,_index:t,line:n,column:r,offset:o}}function m(e){l=void 0,d=e,h=h(e)}function g(e,t){t.restore()}function b(e,t){return function(n,r,o){let s,d,h,p;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):function(e){return function(t){const n=null!==t&&e[t],i=null!==t&&e.null;return m([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(i)?i:i?[i]:[]])(t)}}(n);function m(e){return s=e,d=0,0===e.length?o:g(e[d])}function g(e){return function(n){return p=function(){const e=f(),t=u.previous,n=u.currentConstruct,r=u.events.length,o=Array.from(a);return{from:r,restore:function(){i=e,u.previous=t,u.currentConstruct=n,u.events.length=r,a=o,v()}}}(),h=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name)?y():e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,b,y)(n)}}function b(t){return l=!0,e(h,p),r}function y(e){return l=!0,p.restore(),++d<s.length?g(s[d]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Sc(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function v(){i.line in r&&i.column<2&&(i.column=r[i.line],i.offset+=r[i.line]-1)}}const sd=/[\0\t\n\r]/g;function ad(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}const ld=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cd(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ad(n.slice(t?2:1),t?16:10)}return Iu(n)||e}const ud={}.hasOwnProperty;function dd(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(y),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(m),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(f),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:r(f,o),codeText:r(function(){return{type:"inlineCode",value:""}},o),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(g),hardBreakTrailing:r(g),htmlFlow:r(b,o),htmlFlowData:u,htmlText:r(b,o),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:o,link:r(y),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(v,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(v),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:r(m),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:a(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:a(),autolinkEmail:function(e){d.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){d.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:a(),characterEscapeValue:d,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let i;n?(i=ad(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):i=Iu(t);this.stack[this.stack.length-1].value+=i},characterReference:function(e){this.stack.pop().position.end=hd(e.end)},codeFenced:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:d,codeIndented:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:a(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bu(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:a(),hardBreakEscape:a(h),hardBreakTrailing:a(h),htmlFlow:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:a(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(ld,cd)}(t),n.identifier=bu(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=hd(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),d.call(this,e))},link:a(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bu(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:a(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:a(),thematicBreak:a()}};pd(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let r={type:"root",children:[]};const a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},u=[];let d=-1;for(;++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?u.push(d):d=i(e,u.pop(),d));for(d=-1;++d<e.length;){const n=t[e[d][0]];ud.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||md).call(a,void 0,e[0])}for(r.position={start:hd(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:hd(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r};function i(e,t,n){let i,r,o,s,a=t-1,l=-1,c=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!i||s||l||o||(o=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(i){let s=a;for(r=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;r&&(e[r][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",r=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!r||o<r)&&(i._spread=!0),i.end=Object.assign({},r?e[r][1].start:t[1].end),e.splice(r||a,0,["exit",i,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const r={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};i=r,e.splice(a,0,["enter",r,t[2]]),a++,n++,o=void 0,s=!0}}}return e[t][1]._spread=c,n}function r(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:hd(t.start),end:void 0}}function a(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),i=this.tokenStack.pop();if(!i)throw new Error("Cannot close `"+e.type+"` ("+ec({start:e.start,end:e.end})+"): it’s not open");i[0].type!==e.type&&(t?t.call(this,e,i[0]):(i[1]||md).call(this,e,i[0])),n.position.end=hd(e.end)}function c(){return kc(this.stack.pop())}function u(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:hd(e.start),end:void 0},t.push(n)),this.stack.push(n)}function d(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=hd(e.end)}function h(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"heading",depth:0,children:[]}}function g(){return{type:"break"}}function b(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function v(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!Tc(e););return e}(function(e){const t={constructs:Ic([_,...(e||{}).extensions||[]]),content:n(Xc),defined:[],document:n(Zc),flow:n(tu),lazy:{},string:n(iu),text:n(ru)};return t;function n(e){return function(n){return od(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",i=!0;return function(r,o,s){const a=[];let l,c,u,d,h;for(r=n+("string"==typeof r?r.toString():new TextDecoder(o||void 0).decode(r)),u=0,n="",i&&(65279===r.charCodeAt(0)&&u++,i=void 0);u<r.length;){if(sd.lastIndex=u,l=sd.exec(r),d=l&&void 0!==l.index?l.index:r.length,h=r.charCodeAt(d),!l){n=r.slice(u);break}if(10===h&&u===d&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),u<d&&(a.push(r.slice(u,d)),t+=d-u),h){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return s&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function hd(e){return{line:e.line,column:e.column,offset:e.offset}}function pd(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?pd(e,i):fd(e,i)}}function fd(e,t){let n;for(n in t)if(ud.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function md(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ec({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ec({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ec({start:t.start,end:t.end})+") is still open")}function gd(e){const t=this;t.parser=function(n){return dd(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const bd="object"==typeof self?self:globalThis,yd=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),i=r=>{if(e.has(r))return e.get(r);const[o,s]=t[r];switch(o){case 0:case-1:return n(s,r);case 1:{const e=n([],r);for(const t of s)e.push(i(t));return e}case 2:{const e=n({},r);for(const[t,n]of s)e[i(t)]=i(n);return e}case 3:return n(new Date(s),r);case 4:{const{source:e,flags:t}=s;return n(new RegExp(e,t),r)}case 5:{const e=n(new Map,r);for(const[t,n]of s)e.set(i(t),i(n));return e}case 6:{const e=n(new Set,r);for(const t of s)e.add(i(t));return e}case 7:{const{name:e,message:t}=s;return n(new bd[e](t),r)}case 8:return n(BigInt(s),r);case"BigInt":return n(Object(BigInt(s)),r);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:e}=new Uint8Array(s);return n(new DataView(e),s)}}return n(new bd[o](s),r)};return i})(new Map,e)(0),vd="",{toString:xd}={},{keys:wd}=Object,kd=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=xd.call(e).slice(8,-1);switch(n){case"Array":return[1,vd];case"Object":return[2,vd];case"Date":return[3,vd];case"RegExp":return[4,vd];case"Map":return[5,vd];case"Set":return[6,vd];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},_d=([e,t])=>0===e&&("function"===t||"symbol"===t),Ed=(e,{json:t,lossy:n}={})=>{const i=[];return((e,t,n,i)=>{const r=(e,t)=>{const r=i.push(e)-1;return n.set(t,r),r},o=i=>{if(n.has(i))return n.get(i);let[s,a]=kd(i);switch(s){case 0:{let t=i;switch(a){case"bigint":s=8,t=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return r([-1],i)}return r([s,t],i)}case 1:{if(a){let e=i;return"DataView"===a?e=new Uint8Array(i.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(i)),r([a,[...e]],i)}const e=[],t=r([s,e],i);for(const t of i)e.push(o(t));return t}case 2:{if(a)switch(a){case"BigInt":return r([a,i.toString()],i);case"Boolean":case"Number":case"String":return r([a,i.valueOf()],i)}if(t&&"toJSON"in i)return o(i.toJSON());const n=[],l=r([s,n],i);for(const t of wd(i))!e&&_d(kd(i[t]))||n.push([o(t),o(i[t])]);return l}case 3:return r([s,i.toISOString()],i);case 4:{const{source:e,flags:t}=i;return r([s,{source:e,flags:t}],i)}case 5:{const t=[],n=r([s,t],i);for(const[n,r]of i)(e||!_d(kd(n))&&!_d(kd(r)))&&t.push([o(n),o(r)]);return n}case 6:{const t=[],n=r([s,t],i);for(const n of i)!e&&_d(kd(n))||t.push(o(n));return n}}const{message:l}=i;return r([s,{name:a,message:l}],i)};return o})(!(t||n),!!t,new Map,i)(e),i},Sd="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?yd(Ed(e,t)):structuredClone(e):(e,t)=>yd(Ed(e,t));function Ad(e){const t=[];let n=-1,i=0,r=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(37===o&&Lc(e.charCodeAt(n+1))&&Lc(e.charCodeAt(n+2)))r=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),r=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(i,n),encodeURIComponent(s)),i=n+r+1,s=""),r&&(n+=r,r=0)}return t.join("")+e.slice(i)}function Cd(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Md(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Td=function(e){if(null==e)return Od;if("function"==typeof e)return Nd(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Td(e[n]);return Nd(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return Nd(function(n){const i=n;let r;for(r in e)if(i[r]!==t[r])return!1;return!0})}(e);if("string"==typeof e)return t=e,Nd(function(e){return e&&e.type===t});var t;throw new Error("Expected function, string, or object as test")};function Nd(e){return function(t,n,i){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,i||void 0))}}function Od(){return!0}const Id=[],Dd=!1;function Rd(e,t,n,i){let r;"function"==typeof t&&"function"!=typeof n?(i=n,n=t):r=t;const o=Td(r),s=i?-1:1;!function e(r,a,l){const c=r&&"object"==typeof r?r:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+r.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,h=Id;if((!t||o(r,a,l[l.length-1]||void 0))&&(h=function(e){return Array.isArray(e)?e:"number"==typeof e?[true,e]:null==e?Id:[e]}(n(r,l)),h[0]===Dd))return h;if("children"in r&&r.children){const t=r;if(t.children&&"skip"!==h[0])for(u=(i?t.children.length:-1)+s,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Dd)return c;u="number"==typeof c[1]?c[1]:u+s}}return h}}(e,void 0,[])()}function Pd(e,t,n,i){let r,o,s;"function"==typeof t&&"function"!=typeof n?(o=void 0,s=t,r=n):(o=t,s=n,r=i),Rd(e,o,function(e,t){const n=t[t.length-1],i=n?n.children.indexOf(e):void 0;return s(e,i,n)},r)}function Ld(e,t){const n=t.referenceType;let i="]";if("collapsed"===n?i+="[]":"full"===n&&(i+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+i}];const r=e.all(t),o=r[0];o&&"text"===o.type?o.value="["+o.value:r.unshift({type:"text",value:"["});const s=r[r.length-1];return s&&"text"===s.type?s.value+=i:r.push({type:"text",value:i}),r}function Fd(e){const t=e.spread;return null==t?e.children.length>1:t}function Bd(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),r=0;const o=[];for(;i;)o.push(zd(t.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=n.exec(t);return o.push(zd(t.slice(r),r>0,!1)),o.join("")}function zd(e,t,n){let i=0,r=e.length;if(t){let t=e.codePointAt(i);for(;9===t||32===t;)i++,t=e.codePointAt(i)}if(n){let t=e.codePointAt(r-1);for(;9===t||32===t;)r--,t=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}const jd={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",i={};t.lang&&(i.className=["language-"+t.lang]);let r={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),r=Ad(i.toLowerCase()),o=e.footnoteOrder.indexOf(i);let s,a=e.footnoteCounts.get(i);void 0===a?(a=0,e.footnoteOrder.push(i),s=e.footnoteOrder.length):s=o+1,a+=1,e.footnoteCounts.set(i,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Ld(e,t);const r={src:Ad(i.url||""),alt:t.alt};null!==i.title&&void 0!==i.title&&(r.title=i.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:Ad(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Ld(e,t);const r={href:Ad(i.url||"")};null!==i.title&&void 0!==i.title&&(r.title=i.title);const o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:Ad(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},listItem:function(e,t,n){const i=e.all(t),r=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Fd(n[i])}return t}(n):Fd(t),o={},s=[];if("boolean"==typeof t.checked){const e=i[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},i.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<i.length;){const e=i[a];(r||0!==a||"element"!==e.type||"p"!==e.tagName)&&s.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||r?s.push(e):s.push(...e.children)}const l=i[i.length-1];l&&(r||"element"!==l.type||"p"!==l.tagName)&&s.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},i=e.all(t);let r=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++r<i.length;){const e=i[r];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),i=n.shift(),r=[];if(i){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],n),r.push(n)}if(n.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Ql(t.children[1]),s=Yl(t.children[t.children.length-1]);o&&s&&(i.position={start:o,end:s}),r.push(i)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const i=n?n.children:void 0,r=0===(i?i.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const l=[];for(;++a<s;){const n=t.children[a],i={},s=o?o[a]:void 0;s&&(i.align=s);let c={type:"element",tagName:r,properties:i,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Bd(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Ud,yaml:Ud,definition:Ud,footnoteDefinition:Ud};function Ud(){}const $d={}.hasOwnProperty,Vd={};function qd(e,t){e.position&&(t.position=function(e){const t=Ql(e),n=Yl(e);if(t&&n)return{start:t,end:n}}(e))}function Hd(e,t){let n=t;if(e&&e.data){const t=e.data.hName,i=e.data.hChildren,r=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&r&&Object.assign(n.properties,Sd(r)),"children"in n&&n.children&&null!=i&&(n.children=i)}return n}function Kd(e,t){const n=t.data||{},i=!("value"in t)||$d.call(n,"hProperties")||$d.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,i),e.applyData(t,i)}function Gd(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:"\n"});++i<e.length;)i&&n.push({type:"text",value:"\n"}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Wd(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Xd(e,t){const n=function(e,t){const n=t||Vd,i=new Map,r=new Map,o=new Map,s={...jd,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let i=-1;for(;++i<n.length;){const r=a.one(n[i],e);if(r){if(i&&"break"===n[i-1].type&&(Array.isArray(r)||"text"!==r.type||(r.value=Wd(r.value)),!Array.isArray(r)&&"element"===r.type)){const e=r.children[0];e&&"text"===e.type&&(e.value=Wd(e.value))}Array.isArray(r)?t.push(...r):t.push(r)}}}return t},applyData:Hd,definitionById:i,footnoteById:r,footnoteCounts:o,footnoteOrder:[],handlers:s,one:function(e,t){const n=e.type,i=a.handlers[n];if($d.call(a.handlers,n)&&i)return i(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,i=Sd(n);return i.children=a.all(e),i}return Sd(e)}return(a.options.unknownHandler||Kd)(a,e,t)},options:n,patch:qd,wrap:Gd};return Pd(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?i:r,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}(e,t),i=n.one(e,void 0),r=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Cd,i=e.options.footnoteBackLabel||Md,r=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const r=e.footnoteById.get(e.footnoteOrder[l]);if(!r)continue;const o=e.all(r),s=String(r.identifier).toUpperCase(),c=Ad(s.toLowerCase());let u=0;const d=[],h=e.footnoteCounts.get(s);for(;void 0!==h&&++u<=h;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof i?i:i(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else o.push(...d);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(r,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Sd(s),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&o.children.push({type:"text",value:"\n"},r),o}function Zd(e,t){return e&&"run"in e?async function(n,i){const r=Xd(n,{file:i,...t});await e.run(r,i)}:function(n,i){return Xd(n,{file:i,...e||t})}}function Yd(e){if(e)throw e}var Qd=w(710);function Jd(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}const eh=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');oh(e);let n,i=0,r=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){i=o+1;break}}else r<0&&(n=!0,r=o+1);return r<0?"":e.slice(i,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){i=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.codePointAt(o)===t.codePointAt(a--)?a<0&&(r=o):(a=-1,r=s));return i===r?r=s:r<0&&(r=e.length),e.slice(i,r)},th=function(e){if(oh(e),0===e.length)return".";let t,n=-1,i=e.length;for(;--i;)if(47===e.codePointAt(i)){if(t){n=i;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},nh=function(e){oh(e);let t,n=e.length,i=-1,r=0,o=-1,s=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)i<0&&(t=!0,i=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1);else if(t){r=n+1;break}}return o<0||i<0||0===s||1===s&&o===i-1&&o===r+1?"":e.slice(o,i)},ih=function(...e){let t,n=-1;for(;++n<e.length;)oh(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){oh(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,i,r="",o=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(r.length<2||2!==o||46!==r.codePointAt(r.length-1)||46!==r.codePointAt(r.length-2))if(r.length>2){if(i=r.lastIndexOf("/"),i!==r.length-1){i<0?(r="",o=0):(r=r.slice(0,i),o=r.length-1-r.lastIndexOf("/")),s=l,a=0;continue}}else if(r.length>0){r="",o=0,s=l,a=0;continue}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(s+1,l):r=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return r}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},rh="/";function oh(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sh=function(){return"/"};function ah(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}const lh=["history","path","basename","stem","extname","dirname"];class ch{constructor(e){let t;t=e?ah(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":sh(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,i=-1;for(;++i<lh.length;){const e=lh[i];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)lh.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?eh(this.path):void 0}set basename(e){dh(e,"basename"),uh(e,"basename"),this.path=ih(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?th(this.path):void 0}set dirname(e){hh(this.basename,"dirname"),this.path=ih(e||"",this.basename)}get extname(){return"string"==typeof this.path?nh(this.path):void 0}set extname(e){if(uh(e,"extname"),hh(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ih(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ah(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!ah(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),dh(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?eh(this.path,this.extname):void 0}set stem(e){dh(e,"stem"),uh(e,"stem"),this.path=ih(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const i=this.message(e,t,n);throw i.fatal=!0,i}info(e,t,n){const i=this.message(e,t,n);return i.fatal=void 0,i}message(e,t,n){const i=new rc(e,t,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function uh(e,t){if(e&&e.includes(rh))throw new Error("`"+t+"` cannot be a path: did not expect `"+rh+"`")}function dh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const ph=function(e){const t=this.constructor.prototype,n=t[e],i=function(){return n.apply(i,arguments)};return Object.setPrototypeOf(i,t),i},fh={}.hasOwnProperty;class mh extends ph{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const i=t.pop();if("function"!=typeof i)throw new TypeError("Expected function as last argument, not "+i);!function r(o,...s){const a=e[++n];let l=-1;if(o)i(o);else{for(;++l<t.length;)null!==s[l]&&void 0!==s[l]||(s[l]=t[l]);t=s,a?function(e,t){let n;return function(...t){const o=e.length>t.length;let s;o&&t.push(i);try{s=e.apply(this,t)}catch(e){if(o&&n)throw e;return i(e)}o||(s&&s.then&&"function"==typeof s.then?s.then(r,i):s instanceof Error?i(s):r(s))};function i(e,...i){n||(n=!0,t(e,...i))}function r(e){i(null,e)}}(a,r)(...s):i(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const e=new mh;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Qd(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(vh("data",this.frozen),this.namespace[e]=t,this):fh.call(this.namespace,e)&&this.namespace[e]||void 0:e?(vh("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const i=t.call(e,...n);"function"==typeof i&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=kh(e),n=this.parser||this.Parser;return bh("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),bh("process",this.parser||this.Parser),yh("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(i,r){const o=kh(e),s=n.parse(o);function a(e,n){e||!n?r(e):i?i(n):t(void 0,n)}n.run(s,o,function(e,t,i){if(e||!t||!i)return a(e);const r=t,o=n.stringify(r,i);var s;"string"==typeof(s=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(s)?i.value=o:i.result=o,a(e,i)})}}processSync(e){let t,n=!1;return this.freeze(),bh("processSync",this.parser||this.Parser),yh("processSync",this.compiler||this.Compiler),this.process(e,function(e,i){n=!0,Yd(e),t=i}),wh("processSync","process",n),t}run(e,t,n){xh(e),this.freeze();const i=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?r(void 0,n):new Promise(r);function r(r,o){const s=kh(t);i.run(e,s,function(t,i,s){const a=i||e;t?o(t):r?r(a):n(void 0,a,s)})}}runSync(e,t){let n,i=!1;return this.run(e,t,function(e,t){Yd(e),n=t,i=!0}),wh("runSync","run",i),n}stringify(e,t){this.freeze();const n=kh(t),i=this.compiler||this.Compiler;return yh("stringify",i),xh(e),i(e,n)}use(e,...t){const n=this.attachers,i=this.namespace;if(vh("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?s(e):o(e)}return this;function r(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(i.settings=Qd(!0,i.settings,e.settings))}function s(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)r(e[t])}}function a(e,t){let i=-1,r=-1;for(;++i<n.length;)if(n[i][0]===e){r=i;break}if(-1===r)n.push([e,...t]);else if(t.length>0){let[i,...o]=t;const s=n[r][1];Jd(s)&&Jd(i)&&(i=Qd(!0,s,i)),n[r]=[e,i,...o]}}}}const gh=(new mh).freeze();function bh(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function yh(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function vh(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 xh(e){if(!Jd(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function wh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kh(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ch(e)}const _h=[],Eh={allowDangerousHtml:!0},Sh=/^(https?|ircs?|mailto|xmpp)$/i,Ah=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ch(i){const r=function(e){const t=e.rehypePlugins||_h,n=e.remarkPlugins||_h,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Eh}:Eh;return gh().use(gd).use(n).use(Zd,i).use(t)}(i),o=function(e){const t=e.children||"",n=new ch;return"string"==typeof t&&(n.value=t),n}(i);return function(i,r){const o=r.allowedElements,s=r.allowElement,a=r.components,l=r.disallowedElements,c=r.skipHtml,u=r.unwrapDisallowed,d=r.urlTransform||Mh;for(const e of Ah)Object.hasOwn(r,e.from)&&ul((e.from,e.to&&e.to,e.id));return Pd(i,function(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return c?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in xc)if(Object.hasOwn(xc,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],i=xc[t];(null===i||i.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let i=o?!o.includes(e.tagName):!!l&&l.includes(e.tagName);if(!i&&s&&"number"==typeof t&&(i=!s(e,t,n)),i&&n&&"number"==typeof t)return u&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}),function(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=function(e,t){return function(n,i,r,o){const s=Array.isArray(r.children),a=Ql(n);return t(i,r,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=t.jsx,o=t.jsxs,i=function(e,t,n,i){const s=Array.isArray(n.children)?o:r;return i?s(t,n,i):s(t,n)}}var r,o;const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Vl:$l,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=dc(s,e,void 0);return a&&"string"!=typeof a?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}(i,{Fragment:e,components:a,ignoreInvalidStyle:!0,jsx:t,jsxs:n,passKeys:!0,passNode:!0})}(r.runSync(r.parse(o),o),i)}function Mh(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return-1===t||-1!==r&&t>r||-1!==n&&t>n||-1!==i&&t>i||Sh.test(e.slice(0,t))?e:""}function Th(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let i=0,r=n.indexOf(t);for(;-1!==r;)i++,r=n.indexOf(t,r+t.length);return i}function Nh(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Oh(e){return"function"==typeof e?e:function(){return e}}const Ih="phrasing",Dh=["autolink","link","image","label"];function Rh(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ph(e){this.config.enter.autolinkProtocol.call(this,e)}function Lh(e){this.config.exit.autolinkProtocol.call(this,e)}function Fh(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Bh(e){this.config.exit.autolinkEmail.call(this,e)}function zh(e){this.exit(e)}function jh(e){!function(e,t,n){const i=Td((n||{}).ignore||[]),r=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const e=n[i];t.push([Nh(e[0]),Oh(e[1])])}return t}(t);let o=-1;for(;++o<r.length;)Rd(e,"text",s);function s(e,t){let n,s=-1;for(;++s<t.length;){const e=t[s],r=n?n.children:void 0;if(i(e,r?r.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],i=r[o][0],s=r[o][1];let a=0;const l=n.children.indexOf(e);let c=!1,u=[];i.lastIndex=0;let d=i.exec(e.value);for(;d;){const n=d.index,r={index:d.index,input:d.input,stack:[...t,e]};let o=s(...d,r);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?i.lastIndex=n+1:(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),a=n+d[0].length,c=!0),!i.global)break;d=i.exec(e.value)}return c?(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Uh],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,$h]],{ignore:["link","linkReference"]})}function Uh(e,t,n,i,r){let o="";if(!Vh(r))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(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])))}(n))return!1;const s=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const r=Th(e,"(");let o=Th(e,")");for(;-1!==i&&r>o;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[e,n]}(n+i);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function $h(e,t,n,i){return!(!Vh(i,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Vh(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Kc(n)||Hc(n))&&(!t||47!==n)}function qh(){this.buffer()}function Hh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Kh(){this.buffer()}function Gh(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Wh(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Xh(e){this.exit(e)}function Zh(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Yh(e){this.exit(e)}function Qh(e,t,n,i){const r=n.createTracker(i);let o=r.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=r.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),s(),o+=r.move("]"),o}function Jh(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,i,r){const o=i.createTracker(r);let s=o.move("[^");const a=i.enter("footnoteDefinition"),l=i.enter("label");return s+=o.move(i.safe(i.associationId(e),{before:s,after:"]"})),l(),s+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),s+=o.move((t?"\n":" ")+i.indentLines(i.containerFlow(e,o.current()),t?tp:ep))),a(),s},footnoteReference:Qh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ep(e,t,n){return 0===t?e:tp(e,0,n)}function tp(e,t,n){return(n?"":" ")+e}Qh.peek=function(){return"["};const np=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ip(e){this.enter({type:"delete",children:[]},e)}function rp(e){this.exit(e)}function op(e,t,n,i){const r=n.createTracker(i),o=n.enter("strikethrough");let s=r.move("~~");return s+=n.containerPhrasing(e,{...r.current(),before:s,after:"~"}),s+=r.move("~~"),o(),s}function sp(e){return e.length}function ap(e){return null==e?"":String(e)}function lp(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function cp(e,t,n){return">"+(n?"":" ")+e}function up(e,t){return dp(e,t.inConstruct,!0)&&!dp(e,t.notInConstruct,!1)}function dp(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function hp(e,t,n,i){let r=-1;for(;++r<n.unsafe.length;)if("\n"===n.unsafe[r].character&&up(n.stack,n.unsafe[r]))return/[ \t]/.test(i.before)?"":" ";return"\\\n"}function pp(e,t,n){return(n?"":" ")+e}function fp(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function mp(e){return"&#x"+e.toString(16).toUpperCase()+";"}function gp(e,t,n){const i=$u(e),r=$u(t);return void 0===i?void 0===r?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===r?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===i?void 0===r?{inside:!1,outside:!1}:1===r?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===r?{inside:!1,outside:!1}:1===r?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function bp(e,t,n,i){const r=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),s=n.createTracker(i),a=s.move(r);let l=s.move(n.containerPhrasing(e,{after:r,before:a,...s.current()}));const c=l.charCodeAt(0),u=gp(i.before.charCodeAt(i.before.length-1),c,r);u.inside&&(l=mp(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=gp(i.after.charCodeAt(0),d,r);h.inside&&(l=l.slice(0,-1)+mp(d));const p=s.move(r);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+p}function yp(e){return e.value||""}function vp(e,t,n,i){const r=fp(n),o='"'===r?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(n.safe(e.title,{before:c,after:r,...l.current()})),c+=l.move(r),a()),c+=l.move(")"),s(),c}function xp(e,t,n,i){const r=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),"full"!==r&&c&&c===d?"shortcut"===r?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function wp(e,t,n){let i=e.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let r;if(e.atBreak)for(;r=t.exec(i);){let e=r.index;10===i.charCodeAt(e)&&13===i.charCodeAt(e-1)&&e--,i=i.slice(0,e)+" "+i.slice(r.index+1)}}return r+i+r}function kp(e,t){const n=kc(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function _p(e,t,n,i){const r=fp(n),o='"'===r?"Quote":"Apostrophe",s=n.createTracker(i);let a,l;if(kp(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let i=s.move("<");return i+=s.move(n.containerPhrasing(e,{before:i,after:">",...s.current()})),i+=s.move(">"),a(),n.stack=t,i}a=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=s.move(" "+r),c+=s.move(n.safe(e.title,{before:c,after:r,...s.current()})),c+=s.move(r),l()),c+=s.move(")"),a(),c}function Ep(e,t,n,i){const r=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),"full"!==r&&c&&c===d?"shortcut"===r?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function Sp(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ap(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}op.peek=function(){return"~"},bp.peek=function(e,t,n){return n.options.emphasis||"*"},yp.peek=function(){return"<"},vp.peek=function(){return"!"},xp.peek=function(){return"!"},wp.peek=function(){return"`"},_p.peek=function(e,t,n){return kp(e,n)?"<":"["},Ep.peek=function(){return"["};const Cp=Td(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Mp(e,t,n,i){const r=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),s=n.createTracker(i),a=s.move(r+r);let l=s.move(n.containerPhrasing(e,{after:r,before:a,...s.current()}));const c=l.charCodeAt(0),u=gp(i.before.charCodeAt(i.before.length-1),c,r);u.inside&&(l=mp(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=gp(i.after.charCodeAt(0),d,r);h.inside&&(l=l.slice(0,-1)+mp(d));const p=s.move(r+r);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+p}Mp.peek=function(e,t,n){return n.options.strong||"*"};const Tp={blockquote:function(e,t,n,i){const r=n.enter("blockquote"),o=n.createTracker(i);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),cp);return r(),s},break:hp,code:function(e,t,n,i){const r=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",s="`"===r?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,pp);return e(),t}const a=n.createTracker(i),l=r.repeat(Math.max(function(e,t){const n=String(e);let i=n.indexOf(t),r=i,o=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==i;)i===r?++o>s&&(s=o):o=1,r=i+t.length,i=n.indexOf(t,r);return s}(o,r)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const t=n.enter(`codeFencedLang${s}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...a.current()})),t()}return u+=a.move("\n"),o&&(u+=a.move(o+"\n")),u+=a.move(l),c(),u},definition:function(e,t,n,i){const r=fp(n),o='"'===r?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(n.safe(e.title,{before:c,after:r,...l.current()})),c+=l.move(r),a()),s(),c},emphasis:bp,hardBreak:hp,heading:function(e,t,n,i){const r=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(i);if(function(e,t){let n=!1;return Pd(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Dd}),Boolean((!e.depth||e.depth<3)&&kc(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return i(),t(),s+"\n"+(1===r?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(r),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=mp(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),a(),c},html:yp,image:vp,imageReference:xp,inlineCode:wp,link:_p,linkReference:Ep,list:function(e,t,n,i){const r=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Sp(n);const a=e.ordered?"."===s?")":".":function(e){const t=Sp(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ap(n)===s&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const c=n.containerFlow(e,i);return n.bulletLastUsed=s,n.bulletCurrent=o,r(),c},listItem:function(e,t,n,i){const r=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Sp(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let s=o.length+1;("tab"===r||"mixed"===r&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(i);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?o:o+" ".repeat(s-o.length))+e});return l(),c},paragraph:function(e,t,n,i){const r=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,i);return o(),r(),s},root:function(e,t,n,i){return(e.children.some(function(e){return Cp(e)})?n.containerPhrasing:n.containerFlow).call(n,e,i)},strong:Mp,text:function(e,t,n,i){return n.safe(e.value,i)},thematicBreak:function(e,t,n){const i=(Ap(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?i.slice(0,-1):i}};function Np(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Op(e){this.exit(e),this.data.inTable=void 0}function Ip(e){this.enter({type:"tableRow",children:[]},e)}function Dp(e){this.exit(e)}function Rp(e){this.enter({type:"tableCell",children:[]},e)}function Pp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Lp));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Lp(e,t){return"|"===t?t:e}function Fp(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,r=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let i=Tp.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(i=i.replace(/\|/g,"\\$&")),i},table:function(e,t,n,i){return a(function(e,t,n){const i=e.children;let r=-1;const o=[],s=t.enter("table");for(;++r<i.length;)o[r]=l(i[r],t,n);return s(),o}(e,n,i),e.align)},tableCell:s,tableRow:function(e,t,n,i){const r=a([l(e,n,i)]);return r.slice(0,r.indexOf("\n"))}}};function s(e,t,n,i){const r=n.enter("tableCell"),s=n.enter("phrasing"),a=n.containerPhrasing(e,{...i,before:o,after:o});return s(),r(),a}function a(e,t){return function(e,t){const n=t||{},i=(n.align||[]).concat(),r=n.stringLength||sp,o=[],s=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],i=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const s=ap(e[u][o]);if(!1!==n.alignDelimiters){const e=r(s);i[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(s)}s[u]=t,a[u]=i}let d=-1;if("object"==typeof i&&"length"in i)for(;++d<c;)o[d]=lp(i[d]);else{const e=lp(i);for(;++d<c;)o[d]=e}d=-1;const h=[],p=[];for(;++d<c;){const e=o[d];let t="",i="";99===e?(t=":",i=":"):108===e?t=":":114===e&&(i=":");let r=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-i.length);const s=t+"-".repeat(r)+i;!1!==n.alignDelimiters&&(r=t.length+r+i.length,r>l[d]&&(l[d]=r),p[d]=r),h[d]=s}s.splice(1,0,h),a.splice(1,0,p),u=-1;const f=[];for(;++u<s.length;){const e=s[u],t=a[u];d=-1;const i=[];for(;++d<c;){const r=e[d]||"";let s="",a="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=o[d];114===n?s=" ".repeat(e):99===n?e%2?(s=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):(s=" ".repeat(e/2),a=s):a=" ".repeat(e)}!1===n.delimiterStart||d||i.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===r||!1===n.delimiterStart&&!d||i.push(" "),!1!==n.alignDelimiters&&i.push(s),i.push(r),!1!==n.alignDelimiters&&i.push(a),!1!==n.padding&&i.push(" "),!1===n.delimiterEnd&&d===c-1||i.push("|")}f.push(!1===n.delimiterEnd?i.join("").replace(/ +$/,""):i.join(""))}return f.join("\n")}(e,{align:t,alignDelimiters:i,padding:n,stringLength:r})}function l(e,t,n){const i=e.children;let r=-1;const o=[],a=t.enter("tableRow");for(;++r<i.length;)o[r]=s(i[r],0,t,n);return a(),o}}function Bp(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function zp(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const i=t.children;let r,o=-1;for(;++o<i.length;){const e=i[o];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function jp(e,t,n,i){const r=e.children[0],o="boolean"==typeof e.checked&&r&&"paragraph"===r.type,s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(i);o&&a.move(s);let l=Tp.listItem(e,t,n,{...i,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+s})),l}const Up={tokenize:function(e,t,n){let i=0;return function t(o){return(87===o||119===o)&&i<3?(i++,e.consume(o),t):46===o&&3===i?(e.consume(o),r):n(o)};function r(e){return null===e?n(e):t(e)}},partial:!0},$p={tokenize:function(e,t,n){let i,r,o;return s;function s(t){return 46===t||95===t?e.check(qp,l,a)(t):null===t||Vc(t)||Kc(t)||45!==t&&Hc(t)?l(t):(o=!0,e.consume(t),s)}function a(t){return 95===t?i=!0:(r=i,i=void 0),e.consume(t),s}function l(e){return r||i||!o?n(e):t(e)}},partial:!0},Vp={tokenize:function(e,t){let n=0,i=0;return r;function r(s){return 40===s?(n++,e.consume(s),r):41===s&&i<n?o(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?e.check(qp,t,o)(s):null===s||Vc(s)||Kc(s)?t(s):(e.consume(s),r)}function o(t){return 41===t&&i++,e.consume(t),r}},partial:!0},qp={tokenize:function(e,t,n){return i;function i(s){return 33===s||34===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||63===s||95===s||126===s?(e.consume(s),i):38===s?(e.consume(s),o):93===s?(e.consume(s),r):60===s||null===s||Vc(s)||Kc(s)?t(s):n(s)}function r(e){return null===e||40===e||91===e||Vc(e)||Kc(e)?t(e):i(e)}function o(e){return Pc(e)?s(e):n(e)}function s(t){return 59===t?(e.consume(t),i):Pc(t)?(e.consume(t),s):n(t)}},partial:!0},Hp={tokenize:function(e,t,n){return function(t){return e.consume(t),i};function i(e){return Lc(e)?n(e):t(e)}},partial:!0},Kp={name:"wwwAutolink",tokenize:function(e,t,n){const i=this;return function(t){return 87!==t&&119!==t||!Yp.call(i,i.previous)||tf(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Up,e.attempt($p,e.attempt(Vp,r),n),n)(t))};function r(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Yp},Gp={name:"protocolAutolink",tokenize:function(e,t,n){const i=this;let r="",o=!1;return function(t){return 72!==t&&104!==t||!Qp.call(i,i.previous)||tf(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(t),e.consume(t),s)};function s(t){if(Pc(t)&&r.length<5)return r+=String.fromCodePoint(t),e.consume(t),s;if(58===t){const n=r.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),o?l:(o=!0,a)):n(t)}function l(t){return null===t||Bc(t)||Vc(t)||Kc(t)||Hc(t)?n(t):e.attempt($p,e.attempt(Vp,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Qp},Wp={name:"emailAutolink",tokenize:function(e,t,n){const i=this;let r,o;return function(t){return ef(t)&&Jp.call(i,i.previous)&&!tf(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)):n(t)};function s(t){return ef(t)?(e.consume(t),s):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Hp,c,l)(t):45===t||95===t||Lc(t)?(o=!0,e.consume(t),a):c(t)}function l(t){return e.consume(t),r=!0,a}function c(s){return o&&r&&Pc(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}},previous:Jp},Xp={};let Zp=48;for(;Zp<123;)Xp[Zp]=Wp,Zp++,58===Zp?Zp=65:91===Zp&&(Zp=97);function Yp(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Vc(e)}function Qp(e){return!Pc(e)}function Jp(e){return!(47===e||ef(e))}function ef(e){return 43===e||45===e||46===e||95===e||Lc(e)}function tf(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if(("labelLink"===i.type||"labelImage"===i.type)&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Xp[43]=Wp,Xp[45]=Wp,Xp[46]=Wp,Xp[95]=Wp,Xp[72]=[Wp,Gp],Xp[104]=[Wp,Gp],Xp[87]=[Wp,Kp],Xp[119]=[Wp,Kp];const nf={tokenize:function(e,t,n){const i=this;return Wc(e,function(e){const r=i.events[i.events.length-1];return r&&"gfmFootnoteDefinitionIndent"===r[1].type&&4===r[2].sliceSerialize(r[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function rf(e,t,n){const i=this;let r=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s;for(;r--;){const e=i.events[r][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(r){if(!s||!s._balanced)return n(r);const a=bu(i.sliceSerialize({start:s.end,end:i.now()}));return 94===a.codePointAt(0)&&o.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),t(r)):n(r)}}function of(e,t){let n,i=e.length;for(;i--;)if("labelImage"===e[i][1].type&&"enter"===e[i][0]){n=e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[i+1],e[i+2],["enter",r,t],e[i+3],e[i+4],["enter",o,t],["exit",o,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(i,e.length-i+1,...l),e}function sf(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){if(s>999||93===a&&!o||null===a||91===a||Vc(a))return n(a);if(93===a){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return r.includes(bu(i.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return Vc(a)||(o=!0),s++,e.consume(a),92===a?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function af(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(a>999||93===t&&!s||null===t||91===t||Vc(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=bu(i.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Vc(t)||(s=!0),a++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),r.includes(o)||r.push(o),Wc(e,h,"gfmFootnoteDefinitionWhitespace")):n(t)}function h(e){return t(e)}}function lf(e,t,n){return e.check(Qc,t,e.attempt(nf,t,n))}function cf(e){e.exit("gfmFootnoteDefinition")}function uf(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,i){const r=this.previous,o=this.events;let s=0;return function(t){return 126===r&&"characterEscape"!==o[o.length-1][1].type?i(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(o){const l=$u(r);if(126===o)return s>1?i(o):(e.consume(o),s++,a);if(s<2&&!t)return i(o);const c=e.exit("strikethroughSequenceTemporary"),u=$u(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let i=n;for(;i--;)if("exit"===e[i][0]&&"strikethroughSequenceTemporary"===e[i][1].type&&e[i][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[i][1].end.offset-e[i][1].start.offset){e[n][1].type="strikethroughSequence",e[i][1].type="strikethroughSequence";const r={type:"strikethrough",start:Object.assign({},e[i][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[n][1].start)},s=[["enter",r,t],["enter",e[i][1],t],["exit",e[i][1],t],["enter",o,t]],a=t.parser.constructs.insideSpan.null;a&&Sc(s,s.length,0,Lu(a,e.slice(i+1,n),t)),Sc(s,s.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",r,t]]),Sc(e,i-1,n-i+3,s),n=i+s.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class df{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,i){let r=0;if(0!==n||0!==i.length){for(;r<e.map.length;){if(e.map[r][0]===t)return e.map[r][1]+=n,void e.map[r][2].push(...i);r+=1}e.map.push([t,n,i])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(const t of i)e.push(t);i=n.pop()}this.map.length=0}}function hf(e,t){let n=!1;const i=[];for(;t<e.length;){const r=e[t];if(n){if("enter"===r[0])"tableContent"===r[1].type&&i.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===r[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=i.length-1;i[e]="left"===i[e]?"center":"right"}}else if("tableDelimiterRow"===r[1].type)break}else"enter"===r[0]&&"tableDelimiterRow"===r[1].type&&(n=!0);t+=1}return i}function pf(e,t,n){const i=this;let r,o=0,s=0;return function(e){let t=i.events.length-1;for(;t>-1;){const e=i.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const r=t>-1?i.events[t][1].type:null,o="tableHead"===r||"tableRow"===r?x:a;return o===x&&i.parser.lazy[i.now().line]?n(e):o(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(r=!0,s+=1),l(e)}(t)}function l(t){return null===t?n(t):$c(t)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):qc(t)?Wc(e,l,"whitespace")(t):(s+=1,r&&(r=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Vc(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(t):(e.enter("tableDelimiterRow"),r=!1,qc(t)?Wc(e,h,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t))}function h(t){return 45===t||58===t?f(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):v(t)}function p(t){return qc(t)?Wc(e,f,"whitespace")(t):f(t)}function f(t){return 58===t?(s+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(s+=1,m(t)):null===t||$c(t)?y(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return qc(t)?Wc(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?h(n):(null===n||$c(n))&&r&&o===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function x(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||$c(n)?(e.exit("tableRow"),t(n)):qc(n)?Wc(e,w,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||Vc(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?_:k)}function _(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function ff(e,t){let n,i,r,o=-1,s=!0,a=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const h=new df;for(;++o<e.length;){const p=e[o],f=p[1];"enter"===p[0]?"tableHead"===f.type?(u=!1,0!==d&&(gf(h,t,d,n,i),i=void 0,d=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(o,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(s=!0,r=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,i={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(o,0,[["enter",i,t]])),a="tableDelimiterRow"===f.type?2:i?3:1):!a||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type?"tableCellDivider"===f.type&&(s?s=!1:(0!==l[1]&&(c[0]=c[1],r=mf(h,t,l,a,void 0,r)),l=c,c=[l[1],o,0,0])):(s=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],r=mf(h,t,l,a,void 0,r),l=[0,0,0,0]),c[2]=o)):"tableHead"===f.type?(u=!0,d=o):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=o,0!==l[1]?(c[0]=c[1],r=mf(h,t,l,a,o,r)):0!==c[1]&&(r=mf(h,t,c,a,o,r)),a=0):!a||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type||(c[3]=o)}for(0!==d&&gf(h,t,d,n,i),h.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=hf(t.events,o))}return e}function mf(e,t,n,i,r,o){const s=1===i?"tableHeader":2===i?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},bf(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=bf(t.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const r=bf(t.events,n[2]),o=bf(t.events,n[3]),s={type:"tableContent",start:Object.assign({},r),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",s,t]]),2!==i){const i=t.events[n[2]],r=t.events[n[3]];if(i[1].end=Object.assign({},r[1].end),i[1].type="chunkText",i[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,i=n[3]-n[2]-1;e.add(t,i,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==r&&(o.end=Object.assign({},bf(t.events,r)),e.add(r,0,[["exit",o,t]]),o=void 0),o}function gf(e,t,n,i,r){const o=[],s=bf(t.events,n);r&&(r.end=Object.assign({},s),o.push(["exit",r,t])),i.end=Object.assign({},s),o.push(["exit",i,t]),e.add(n+1,0,o)}function bf(e,t){const n=e[t],i="enter"===n[0]?"start":"end";return n[1][i]}const yf={name:"tasklistCheck",tokenize:function(e,t,n){const i=this;return function(t){return null===i.previous&&i._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),r):n(t)};function r(t){return Vc(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(i){return $c(i)?t(i):qc(i)?e.check({tokenize:vf},t,n)(i):n(i)}}};function vf(e,t,n){return Wc(e,function(e){return null===e?n(e):t(e)},"whitespace")}const xf={},wf=function(e,t,n){const i=Td(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if("number"==typeof t){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if((t=e.children.indexOf(t))<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(i(e.children[t],t,e))return e.children[t]},kf=function(e){if(null==e)return Ef;if("string"==typeof e)return t=e,_f(function(e){return e.tagName===t});var t;if("object"==typeof e)return function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kf(e[n]);return _f(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e);if("function"==typeof e)return _f(e);throw new Error("Expected function, string, or array as `test`")};function _f(e){return function(t,n,i){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e&&"tagName"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,i||void 0))}}function Ef(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}const Sf=/\n/g,Af=/[\t ]+/g,Cf=kf("br"),Mf=kf(function(e){return"td"===e.tagName||"th"===e.tagName}),Tf=kf("p"),Nf=kf("tr"),Of=kf(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return Boolean((e.properties||{}).hidden)},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),If=kf(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Df(e,t,n){return"element"===e.type?function(e,t,n){const i=Lf(e,n),r=e.children||[];let o,s,a=-1,l=[];if(Of(e))return l;for(Cf(e)||Nf(e)&&wf(t,e,Nf)?s="\n":Tf(e)?(o=2,s=2):If(e)&&(o=1,s=1);++a<r.length;)l=l.concat(Df(r[a],e,{whitespace:i,breakBefore:a?void 0:o,breakAfter:a<r.length-1?Cf(r[a+1]):s}));return Mf(e)&&wf(t,e,Mf)&&l.push("\t"),o&&l.unshift(o),s&&l.push(s),l}(e,t,n):"text"===e.type?"normal"===n.whitespace?Rf(e,n):function(e){return[String(e.value)]}(e):[]}function Rf(e,t){const n=String(e.value),i=[],r=[];let o=0;for(;o<=n.length;){Sf.lastIndex=o;const e=Sf.exec(n),r=e&&"index"in e?e.index:n.length;i.push(Pf(n.slice(o,r).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==o||t.breakBefore,r!==n.length||t.breakAfter)),o=r+1}let s,a=-1;for(;++a<i.length;)8203===i[a].charCodeAt(i[a].length-1)||a<i.length-1&&8203===i[a+1].charCodeAt(0)?(r.push(i[a]),s=void 0):i[a]?("number"==typeof s&&r.push(s),r.push(i[a]),s=0):0!==a&&a!==i.length-1||r.push(0);return r}function Pf(e,t,n){const i=[];let r,o=0;for(;o<e.length;){Af.lastIndex=o;const n=Af.exec(e);r=n?n.index:e.length,o||r||!n||t||i.push(""),o!==r&&i.push(e.slice(o,r)),o=n?r+n[0].length:r}return o===r||n||i.push(""),i.join(" ")}function Lf(e,t){if("element"===e.type){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}const Ff=["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","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Bf=["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"].sort().reverse(),zf=["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"].sort().reverse(),jf=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Uf=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","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-end-end-radius","border-end-start-radius","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-start-end-radius","border-start-start-radius","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-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","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","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","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","margin-trim","marker","marker-end","marker-mid","marker-start","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","masonry-auto-flow","math-depth","math-shift","math-style","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","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-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","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","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","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();var $f="[0-9](_*[0-9])*",Vf=`\\.(${$f})`,qf="[0-9a-fA-F](_*[0-9a-fA-F])*",Hf={className:"number",variants:[{begin:`(\\b(${$f})((${Vf})|\\.)?|(${Vf}))[eE][+-]?(${$f})[fFdD]?\\b`},{begin:`\\b(${$f})((${Vf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Vf})[fFdD]?\\b`},{begin:`\\b(${$f})[fFdD]\\b`},{begin:`\\b0[xX]((${qf})\\.?|(${qf})?\\.(${qf}))[pP][+-]?(${$f})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${qf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Kf(e,t,n){return-1===n?"":e.replace(t,i=>Kf(e,t,n-1))}const Gf="[A-Za-z$_][0-9A-Za-z$_]*",Wf=["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","using"],Xf=["true","false","null","undefined","NaN","Infinity"],Zf=["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"],Yf=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Qf=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Jf=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],em=[].concat(Qf,Zf,Yf);var tm="[0-9](_*[0-9])*",nm=`\\.(${tm})`,im="[0-9a-fA-F](_*[0-9a-fA-F])*",rm={className:"number",variants:[{begin:`(\\b(${tm})((${nm})|\\.)?|(${nm}))[eE][+-]?(${tm})[fFdD]?\\b`},{begin:`\\b(${tm})((${nm})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${nm})[fFdD]?\\b`},{begin:`\\b(${tm})[fFdD]\\b`},{begin:`\\b0[xX]((${im})\\.?|(${im})?\\.(${im}))[pP][+-]?(${tm})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${im})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const om=["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","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],sm=["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"].sort().reverse(),am=["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"].sort().reverse(),lm=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),cm=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","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-end-end-radius","border-end-start-radius","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-start-end-radius","border-start-start-radius","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-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","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","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","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","margin-trim","marker","marker-end","marker-mid","marker-start","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","masonry-auto-flow","math-depth","math-shift","math-style","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","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-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","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","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","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),um=am.concat(lm).sort().reverse(),dm=["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","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],hm=["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"].sort().reverse(),pm=["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"].sort().reverse(),fm=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),mm=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","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-end-end-radius","border-end-start-radius","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-start-end-radius","border-start-start-radius","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-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","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","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","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","margin-trim","marker","marker-end","marker-mid","marker-start","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","masonry-auto-flow","math-depth","math-shift","math-style","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","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-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","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","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","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function gm(e){return e?"string"==typeof e?e:e.source:null}function bm(e){return ym("(?=",e,")")}function ym(...e){return e.map(e=>gm(e)).join("")}function vm(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>gm(e)).join("|")+")"}const xm=e=>ym(/\b/,e,/\w$/.test(e)?/\b/:/\B/),wm=["Protocol","Type"].map(xm),km=["init","self"].map(xm),_m=["Any","Self"],Em=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","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","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","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"],Sm=["false","nil","true"],Am=["assignment","associativity","higherThan","left","lowerThan","none","right"],Cm=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Mm=["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"],Tm=vm(/[/=\-+!*%<>&|^~?]/,/[\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]/),Nm=vm(Tm,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Om=ym(Tm,Nm,"*"),Im=vm(/[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]/),Dm=vm(Im,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Rm=ym(Im,Dm,"*"),Pm=ym(/[A-Z]/,Dm,"*"),Lm=["attached","autoclosure",ym(/convention\(/,vm("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ym(/objc\(/,Rm,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Fm=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"],Bm="[A-Za-z$_][0-9A-Za-z$_]*",zm=["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","using"],jm=["true","false","null","undefined","NaN","Infinity"],Um=["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"],$m=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vm=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],qm=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Hm=[].concat(Vm,Um,$m),Km={arduino:function(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=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},c={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(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},d=t.optional(r)+e.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["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"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","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"]},p={className:"function.dispatch",relevance:0,keywords:{_hint:["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"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[p,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:f.concat([{begin:/\(/,end:/\)/,keywords:h,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,p,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:h,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),i=n.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n},bash:function(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(a);const l={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},c=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),u={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias","set","shopt","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","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"]},contains:[c,e.SHEBANG(),u,l,o,s,{match:/(\/[a-z._-]+)+/},a,{match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},n]}},c:function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},d=t.optional(r)+e.IDENT_RE+"\\s*\\(",h={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","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","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","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"},p=[c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:p.concat([{begin:/\(/,end:/\)/,keywords:h,contains:p.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:h,disableAutodetect:!0,illegal:"</",contains:[].concat(f,m,p,[c,{begin:e.IDENT_RE+"::",keywords:h},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:h}}},cpp:function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},c={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(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},d=t.optional(r)+e.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["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"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","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"]},p={className:"function.dispatch",relevance:0,keywords:{_hint:["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"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[p,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:f.concat([{begin:/\(/,end:/\)/,keywords:h,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,p,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:h,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}},csharp:function(e){const t={keyword:["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"].concat(["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),i={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},r={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(r,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},u=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE],a.contains=[u,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const d={variants:[{className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},p=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),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"}},d,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,h,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:"("+p+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[d,i,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},f]}},css:function(e){const t=e.regex,n=(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_-]*/}}))(e),i=[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,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+zf.join("|")+")"},{begin:":(:)?("+jf.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Uf.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...i,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...i,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:Bf.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...i,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ff.join("|")+")\\b"}]}},diff:function(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:/$/}]}},go:function(e){const t={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:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}},graphql:function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}},ini:function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},i=e.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const r={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[i,o,r,s,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[i,a,o,r,s,n]}}]}},java:function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+Kf("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),r={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","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:r,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:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:r,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Hf,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Hf,o]}},javascript:function(e){const t=e.regex,n=Gf,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let r;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((r=o.match(/^\s*=/))||(r=o.match(/^\s+extends\s+/))&&0===r.index)&&t.ignoreMatch()}},r={$pattern:Gf,keyword:Wf,literal:Xf,built_in:em,"variable.language":Jf},o="[0-9](_?[0-9])*",s=`\\.(${o})`,a="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",l={className:"number",variants:[{begin:`(\\b(${a})((${s})|\\.)?|(${s}))[eE][+-]?(${o})\\b`},{begin:`\\b(${a})\\b((${s})\\b|\\.)?|(${s})\\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},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:r,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},d={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"graphql"}},p={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,c]},f={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:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},m=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,p,{match:/\$\d+/},l];c.contains=m.concat({begin:/\{/,end:/\}/,keywords:r,contains:["self"].concat(m)});const g=[].concat(f,c.contains),b=g.concat([{begin:/(\s*)\(/,end:/\)/,keywords:r,contains:["self"].concat(g)}]),y={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:b},v={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},x={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:{_:[...Zf,...Yf]}},w={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},k={match:t.concat(/\b/,function(e){return t.concat("(?!",e.join("|"),")")}([...Qf,"super","import"].map(e=>`${e}\\s*\\(`)),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},_={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",A={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:r,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,p,f,{match:/\$\d+/},l,x,{scope:"attr",match:n+t.lookahead(":"),relevance:0},A,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},w,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},v,E,{match:/\$[(.]/}]}},json:function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}},kotlin:function(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:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},r={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[r,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,r,i]}]};i.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},l=rm,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=u;return d.variants[1].contains=[u],u.variants[1].contains=[d],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{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:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,a,o,e.C_NUMBER_MODE]},c]},{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:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}},less:function(e){const t=(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_-]*/}}))(e),n=um,i="[\\w-]+",r="("+i+"|@\\{"+i+"\\})",o=[],s=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},l=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:sm.join(" ")},u={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,u,l("variable","@@?"+i,10),l("variable","@\\{"+i+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const d=s.concat({begin:/\{/,end:/\}/,contains:o}),h={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},p={begin:r+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+cm.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:d}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,l("keyword","all\\b"),l("variable","@\\{"+i+"\\}"),{begin:"\\b("+om.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,l("selector-tag",r,0),l("selector-id","#"+r),l("selector-class","\\."+r,0),l("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+am.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+lm.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:d},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:i+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,m,b,p,g,h,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}},lua:function(e){const t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},r=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{name:"Lua",aliases:["pluto"],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:r.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:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}},makefile:function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},i={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},r={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,i,r,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}},markdown:function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),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}]},i={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},r={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},o=e.inherit(i,{contains:[]}),s=e.inherit(r,{contains:[]});i.contains.push(s),r.contains.push(o);let a=[t,n];return[i,r,o,s].forEach(e=>{e.contains=e.contains.concat(a)}),a=a.concat(i,r),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,r,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{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}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}},objectivec:function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,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"]},illegal:"</",contains:[{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+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}},perl:function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","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","field","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","method","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"].join(" ")},r={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},s={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},a={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,r,a],u=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],d=(e,i,r="\\1")=>{const o="\\1"===r?r:t.concat(r,i);return t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,r,n)},h=(e,i,r)=>t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,r,n),p=[a,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:c,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}]},l,{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:d("s|tr|y",t.either(...u,{capture:!0}))},{begin:d("s|tr|y","\\(","\\)")},{begin:d("s|tr|y","\\[","\\]")},{begin:d("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:h("(?:m|qr)?",/\//,/\//)},{begin:h("m|qr",t.either(...u,{capture:!0}),/\1/)},{begin:h("m|qr",/\(/,/\)/)},{begin:h("m|qr",/\[/,/\]/)},{begin:h("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return r.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}},php:function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),r=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+i},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c="[ \t\n]",u={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l,{begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},d={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},h=["false","null","true"],p=["__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"],f=["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"],m={keyword:p,literal:(e=>{const t=[];return e.forEach(e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())}),t})(h),built_in:f},g=e=>e.map(e=>e.replace(/\|\d+$/,"")),b={variants:[{match:[/new/,t.concat(c,"+"),t.concat("(?!",g(f).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},y=t.concat(i,"\\b(?!\\()"),v={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),y],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,t.concat(/::/,t.lookahead(/(?!class\b)/)),y],scope:{1:"title.class",3:"variable.constant"}},{match:[r,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},x={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:m,contains:[x,s,v,e.C_BLOCK_COMMENT_MODE,u,d,b]},k={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",g(p).join("\\b|"),"|",g(f).join("\\b|"),"\\b)"),i,t.concat(c,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(k);const _=[x,v,e.C_BLOCK_COMMENT_MODE,u,d,b],E={begin:t.concat(/#\[\s*\\?/,t.either(r,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:h,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:h,keyword:["new","array"]},contains:["self",..._]},..._,{scope:"meta",variants:[{match:r},{match:o}]}]};return{case_insensitive:!1,keywords:m,contains:[E,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}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},s,k,v,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},b,{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:m,contains:["self",E,s,v,e.C_BLOCK_COMMENT_MODE,u,d]}]},{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]},u,d]}},"php-template":function(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})]}]}},plaintext:function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}},python:function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["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"],r={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,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"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:r,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{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,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",u=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,d=`\\b|${i.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${u}))[eE][+-]?(${c})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${c})[jJ](?=${d})`}]},p={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:r,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:["self",o,h,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,h,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:r,illegal:/(<\/|\?)|=>/,contains:[o,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},l,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{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,f,l]}]}},"python-repl":function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}},r:function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=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]?/),r=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=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:[r,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[o,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:r},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}},ruby:function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(i,/(::\w+)*/),o={"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"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{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,c]})]}]},d="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${d}))?([eE][+-]?(${d})|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"}]},p={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},f=[u,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:o},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:i,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],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(a,l),relevance:0}].concat(a,l);c.contains=f,p.contains=f;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:o,contains:f}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(f)}},rust:function(e){const t=e.regex,n=/(r#)?/,i=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["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!","eprintln!","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!"],l=["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:l,keyword:["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","union","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:a},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,i],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,i],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,i,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:a,type:l}},{className:"punctuation",begin:"->"},o]}},scss:function(e){const t=(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_-]*/}}))(e),n=fm,i=pm,r="@[a-z-]+",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("+dm.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+mm.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:r,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:hm.join(" ")},contains:[{begin:r,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]}},shell:function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}},sql:function(e){const t=e.regex,n=e.COMMENT("--","$"),i=["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"],r=i,o=["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","add","asc","collation","desc","final","first","last","view"].filter(e=>!i.includes(e)),s={match:t.concat(/\b/,t.either(...r),/\s*\(/),relevance:0,keywords:{built_in:r}};function a(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,"\\s+"))),/\b/)}const l={scope:"keyword",match:a(["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"]),relevance:0};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const i=n;return t=t||[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:i(e)?`${e}|0`:e)}(o,{when:e=>e.length<3}),literal:["true","false","unknown"],type:["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"],built_in:["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"]},contains:[{scope:"type",match:a(["double precision","large object","with timezone","without timezone"])},l,s,{scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},{scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},{begin:/"/,end:/"/,contains:[{match:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}},swift:function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],r={match:[/\./,vm(...wm,...km)],className:{2:"keyword"}},o={match:ym(/\./,vm(...Em)),relevance:0},s=Em.filter(e=>"string"==typeof e).concat(["_|0"]),a={variants:[{className:"keyword",match:vm(...Em.filter(e=>"string"!=typeof e).concat(_m).map(xm),...km)}]},l={$pattern:vm(/\b\w+/,/#\w+/),keyword:s.concat(Cm),literal:Sm},c=[r,o,a],u=[{match:ym(/\./,vm(...Mm)),relevance:0},{className:"built_in",match:ym(/\b/,vm(...Mm),/(?=\()/)}],d={match:/->/,relevance:0},h=[d,{className:"operator",relevance:0,variants:[{match:Om},{match:`\\.(\\.|${Nm})+`}]}],p="([0-9]_*)+",f="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${p})(\\.(${p}))?([eE][+-]?(${p}))?\\b`},{match:`\\b0x(${f})(\\.(${f}))?([pP][+-]?(${p}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:ym(/\\/,e,/[0\\tnr"']/)},{match:ym(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:ym(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),y=(e="")=>({className:"subst",label:"interpol",begin:ym(/\\/,e,/\(/),end:/\)/}),v=(e="")=>({begin:ym(e,/"""/),end:ym(/"""/,e),contains:[g(e),b(e),y(e)]}),x=(e="")=>({begin:ym(e,/"/),end:ym(/"/,e),contains:[g(e),y(e)]}),w={className:"string",variants:[v(),v("#"),v("##"),v("###"),x(),x("#"),x("##"),x("###")]},k=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],_={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:k},E=e=>{const t=ym(e,/\//),n=ym(/\//,e);return{begin:t,end:n,contains:[...k,{scope:"comment",begin:`#(?!.*${n})`,end:/$/}]}},S={scope:"regexp",variants:[E("###"),E("##"),E("#"),_]},A={match:ym(/`/,Rm,/`/)},C=[A,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${Dm}+`}],M=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Fm,contains:[...h,m,w]}]}},{scope:"keyword",match:ym(/@/,vm(...Lm),bm(vm(/\(/,/\s+/)))},{scope:"meta",match:ym(/@/,Rm)}],T={match:bm(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ym(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Dm,"+")},{className:"type",match:Pm,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ym(/\s+&\s+/,bm(Pm)),relevance:0}]},N={begin:/</,end:/>/,keywords:l,contains:[...i,...c,...M,d,T]};T.contains.push(N);const O={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:ym(Rm,/\s*:/),keywords:"_|0",relevance:0},...i,S,...c,...u,...h,m,w,...C,...M,T]},I={begin:/</,end:/>/,keywords:"repeat each",contains:[...i,T]},D={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:vm(bm(ym(Rm,/\s*:/)),bm(ym(Rm,/\s+/,Rm,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Rm}]},...i,...c,...h,m,w,...M,T,O],endsParent:!0,illegal:/["']/},R={match:[/(func|macro)/,/\s+/,vm(A.match,Rm,Om)],className:{1:"keyword",3:"title.function"},contains:[I,D,t],illegal:[/\[/,/%/]},P={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[I,D,t],illegal:/\[|%/},L={match:[/operator/,/\s+/,Om],className:{1:"keyword",3:"title"}},F={begin:[/precedencegroup/,/\s+/,Pm],className:{1:"keyword",3:"title"},contains:[T],keywords:[...Am,...Sm],end:/}/},B={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Rm,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:l,contains:[I,...c,{begin:/:/,end:/\{/,keywords:l,contains:[{scope:"title.class.inherited",match:Pm},...c],relevance:0}]};for(const e of w.variants){const t=e.contains.find(e=>"interpol"===e.label);t.keywords=l;const n=[...c,...u,...h,m,w,...C];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...i,R,P,{match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},{match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},B,L,F,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},S,...c,...u,...h,m,w,...C,...M,T,O]}},typescript:function(e){const t=e.regex,n=function(e){const t=e.regex,n=Bm,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let r;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((r=o.match(/^\s*=/))||(r=o.match(/^\s+extends\s+/))&&0===r.index)&&t.ignoreMatch()}},r={$pattern:Bm,keyword:zm,literal:jm,built_in:Hm,"variable.language":qm},o="[0-9](_?[0-9])*",s=`\\.(${o})`,a="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",l={className:"number",variants:[{begin:`(\\b(${a})((${s})|\\.)?|(${s}))[eE][+-]?(${o})\\b`},{begin:`\\b(${a})\\b((${s})\\b|\\.)?|(${s})\\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},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:r,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},d={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"graphql"}},p={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,c]},f={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:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},m=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,p,{match:/\$\d+/},l];c.contains=m.concat({begin:/\{/,end:/\}/,keywords:r,contains:["self"].concat(m)});const g=[].concat(f,c.contains),b=g.concat([{begin:/(\s*)\(/,end:/\)/,keywords:r,contains:["self"].concat(g)}]),y={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:b},v={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},x={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:{_:[...Um,...$m]}},w={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},k={match:t.concat(/\b/,function(e){return t.concat("(?!",e.join("|"),")")}([...Vm,"super","import"].map(e=>`${e}\\s*\\(`)),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},_={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",A={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:r,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,p,f,{match:/\$\d+/},l,x,{scope:"attr",match:n+t.lookahead(":"),relevance:0},A,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},w,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},v,E,{match:/\$[(.]/}]}}(e),i=Bm,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[n.exports.CLASS_REFERENCE]},a={$pattern:Bm,keyword:zm.concat(["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"]),literal:jm,built_in:Hm.concat(r),"variable.language":qm},l={className:"meta",begin:"@"+i},c=(e,t,n)=>{const i=e.contains.findIndex(e=>e.label===t);if(-1===i)throw new Error("can not find mode to replace");e.contains.splice(i,1,n)};Object.assign(n.keywords,a),n.exports.PARAMS_CONTAINS.push(l);const u=n.contains.find(e=>"attr"===e.scope),d=Object.assign({},u,{match:t.concat(i,t.lookahead(/\s*\?:/))});return n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,u,d]),n.contains=n.contains.concat([l,o,s,d]),c(n,"shebang",e.SHEBANG()),c(n,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),n.contains.find(e=>"func.def"===e.label).relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n},vbnet:function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,r=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,n),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,r,/ *#/)},{begin:t.concat(/# */,t.either(i,n),/ +/,t.either(r,o),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=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:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{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])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{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:[l]}]}},wasm:function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["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"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{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/},{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/}]}},xml:function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(r,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,o,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}},yaml:function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},r=e.inherit(i,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},s={begin:/\{/,end:/\}/,contains:[o],illegal:"\\n",relevance:0},a={begin:"\\[",end:"\\]",contains:[o],illegal:"\\n",relevance:0},l=[{className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},{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}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},s,a,{className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},i],c=[...l];return c.pop(),c.push(r),o.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:l}}},Gm=w(74),Wm={};class Xm{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){const n=this.stack[this.stack.length-1],i=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):n.children.push(...i)}openNode(e){const t=this,n={type:"element",tagName:"span",properties:{className:e.split(".").map(function(e,n){return n?e+"_".repeat(n):t.options.classPrefix+e})},children:[]};this.stack[this.stack.length-1].children.push(n),this.stack.push(n)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Zm={},Ym={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff",fuchsia:"#ff00ff",cyan:"#00ffff",yellow:"#ffff00",orange:"#ff8000"};function Qm(e){4===e.length&&(e=e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t||console.warn(`Unable to convert hex string ${e} to rgb values`),[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]}function Jm(e){return void 0===e?[0,0,0]:3===arguments.length?arguments:isNaN(e)?"#"===e[0]?Qm(e):Ym[e.toLowerCase()]?Qm(Ym[e.toLowerCase()]):(console.warn("Color format not recognised"),[0,0,0]):(t=e,[((t=parseInt(t))>>16&255)/255,(t>>8&255)/255,(255&t)/255]);var t}class eg extends Array{constructor(e){return Array.isArray(e)?super(...e):super(...Jm(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(e){this[0]=e}set g(e){this[1]=e}set b(e){this[2]=e}set(e){return Array.isArray(e)?this.copy(e):this.copy(Jm(...arguments))}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this}}function tg({color:e=[1,1,1],speed:n=1,amplitude:i=.1,mouseReact:r=!0,...o}){const s=g(null),a=g({x:.5,y:.5});return d(()=>{if(!s.current)return;const t=s.current,o=new F,l=o.gl;let c;function u(){o.setSize(1*t.offsetWidth,1*t.offsetHeight),c&&(c.uniforms.uResolution.value=new eg(l.canvas.width,l.canvas.height,l.canvas.width/l.canvas.height))}l.clearColor(1,1,1,1),window.addEventListener("resize",u,!1),u();const d=new V(l);c=new K(l,{vertex:"\nattribute vec2 uv;\nattribute vec2 position;\n\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n gl_Position = vec4(position, 0, 1);\n}\n",fragment:"\nprecision highp float;\n\nuniform float uTime;\nuniform vec3 uColor;\nuniform vec3 uResolution;\nuniform vec2 uMouse;\nuniform float uAmplitude;\nuniform float uSpeed;\n\nvarying vec2 vUv;\n\nvoid main() {\n float mr = min(uResolution.x, uResolution.y);\n vec2 uv = (vUv.xy * 2.0 - 1.0) * uResolution.xy / mr;\n\n uv += (uMouse - vec2(0.5)) * uAmplitude;\n\n float d = -uTime * 0.5 * uSpeed;\n float a = 0.0;\n for (float i = 0.0; i < 8.0; ++i) {\n a += cos(i - d - a * uv.x);\n d += sin(uv.y * i + a);\n }\n d += uTime * 0.5 * uSpeed;\n vec3 col = vec3(cos(uv * vec2(d, a)) * 0.6 + 0.4, cos(a + d) * 0.5 + 0.5);\n col = cos(col * cos(vec3(d, a, 2.5)) * 0.5 + 0.5) * uColor;\n gl_FragColor = vec4(col, 1.0);\n}\n",uniforms:{uTime:{value:0},uColor:{value:new eg(...e)},uResolution:{value:new eg(l.canvas.width,l.canvas.height,l.canvas.width/l.canvas.height)},uMouse:{value:new Float32Array([a.current.x,a.current.y])},uAmplitude:{value:i},uSpeed:{value:n}}});const h=new he(l,{geometry:d,program:c});let p;function f(e){const n=t.getBoundingClientRect(),i=(e.clientX-n.left)/n.width,r=1-(e.clientY-n.top)/n.height;a.current={x:i,y:r},c.uniforms.uMouse.value[0]=i,c.uniforms.uMouse.value[1]=r}return p=requestAnimationFrame(function e(t){p=requestAnimationFrame(e),c.uniforms.uTime.value=.001*t,o.render({scene:h})}),t.appendChild(l.canvas),r&&t.addEventListener("mousemove",f),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",u),r&&t.removeEventListener("mousemove",f),t.removeChild(l.canvas),l.getExtension("WEBGL_lose_context")?.loseContext()}},[e,n,i,r]),t("div",{ref:s,className:"iridescence-container",...o})}const ng={a:({href:e,children:n,...i})=>t("a",{href:e,target:"_blank",rel:"noopener noreferrer",...i,children:n})},ig=[function(e){const t=e||xf,n=this.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),r=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(function(e){return Ic([{text:Xp},{document:{91:{name:"gfmFootnoteDefinition",tokenize:af,continuation:{tokenize:lf},exit:cf}},text:{91:{name:"gfmFootnoteCall",tokenize:sf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rf,resolveTo:of}}},uf(e),{flow:{null:{name:"table",tokenize:pf,resolveAll:ff}}},{text:{91:yf}}])}(t)),r.push([{transforms:[jh],enter:{literalAutolink:Rh,literalAutolinkEmail:Ph,literalAutolinkHttp:Ph,literalAutolinkWww:Ph},exit:{literalAutolink:zh,literalAutolinkEmail:Bh,literalAutolinkHttp:Lh,literalAutolinkWww:Fh}},{enter:{gfmFootnoteCallString:qh,gfmFootnoteCall:Hh,gfmFootnoteDefinitionLabelString:Kh,gfmFootnoteDefinition:Gh},exit:{gfmFootnoteCallString:Wh,gfmFootnoteCall:Xh,gfmFootnoteDefinitionLabelString:Zh,gfmFootnoteDefinition:Yh}},{canContainEols:["delete"],enter:{strikethrough:ip},exit:{strikethrough:rp}},{enter:{table:Np,tableData:Rp,tableHeader:Rp,tableRow:Ip},exit:{codeText:Pp,table:Op,tableData:Dp,tableHeader:Dp,tableRow:Dp}},{exit:{taskListCheckValueChecked:Bp,taskListCheckValueUnchecked:Bp,paragraph:zp}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ih,notInConstruct:Dh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ih,notInConstruct:Dh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ih,notInConstruct:Dh}]},Jh(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:np}],handlers:{delete:op}},Fp(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jp}}]}}(t))}],rg=[function(e){const t=e||Zm,n=t.aliases,i=t.detect||!1,r=t.languages||Km,o=t.plainText,s=t.prefix,a=t.subset;let l="hljs";const c=function(e){const t=Gm.newInstance();return e&&r(e),{highlight:n,highlightAuto:function(e,r){const o=(r||Wm).subset||i();let s,a=-1,l=0;for(;++a<o.length;){const i=o[a];if(!t.getLanguage(i))continue;const c=n(i,e,r);c.data&&void 0!==c.data.relevance&&c.data.relevance>l&&(l=c.data.relevance,s=c)}return s||{type:"root",children:[],data:{language:void 0,relevance:l}}},listLanguages:i,register:r,registerAlias:function(e,n){if("string"==typeof e)t.registerAliases("string"==typeof n?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){const i=e[n];t.registerAliases("string"==typeof i?i:[...i],{languageName:n})}}},registered:function(e){return Boolean(t.getLanguage(e))}};function n(e,n,i){const r=i||Wm,o="string"==typeof r.prefix?r.prefix:"hljs-";if(!t.getLanguage(e))throw new Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:Xm,classPrefix:o});const s=t.highlight(n,{ignoreIllegals:!0,language:e});if(s.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:s.errorRaised});const a=s._emitter.root,l=a.data;return l.language=s.language,l.relevance=s.relevance,a}function i(){return t.listLanguages()}function r(e,n){if("string"==typeof e)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}}(r);if(n&&c.registerAlias(n),s){const e=s.indexOf("-");l=-1===e?s:s.slice(0,e)}return function(e,t){Pd(e,"element",function(e,n,r){if("code"!==e.tagName||!r||"element"!==r.type||"pre"!==r.tagName)return;const u=function(e){const t=e.properties.className;let n,i=-1;if(Array.isArray(t)){for(;++i<t.length;){const e=String(t[i]);if("no-highlight"===e||"nohighlight"===e)return!1;n||"lang-"!==e.slice(0,5)||(n=e.slice(5)),n||"language-"!==e.slice(0,9)||(n=e.slice(9))}return n}}(e);if(!1===u||!u&&!i||u&&o&&o.includes(u))return;Array.isArray(e.properties.className)||(e.properties.className=[]),e.properties.className.includes(l)||e.properties.className.unshift(l);const d=function(e){const t={whitespace:"pre"}||{},n="children"in e?e.children:[],i=If(e),r=Lf(e,{whitespace:t.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];"text"!==e.type&&"comment"!==e.type||o.push(...Rf(e,{whitespace:r,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<n.length;)o.push(...Df(n[s],e,{whitespace:r,breakBefore:s?void 0:i,breakAfter:s<n.length-1?Cf(n[s+1]):i}));const a=[];let l;for(s=-1;++s<o.length;){const e=o[s];"number"==typeof e?void 0!==l&&e>l&&(l=e):e&&(void 0!==l&&l>-1&&a.push("\n".repeat(l)||" "),l=-1,a.push(e))}return a.join("")}(e);let h;try{h=u?c.highlight(u,d,{prefix:s}):c.highlightAuto(d,{prefix:s,subset:a})}catch(n){const i=n;if(u&&/Unknown language/.test(i.message))return void t.message("Cannot highlight as `"+u+"`, it’s not registered",{ancestors:[r,e],cause:i,place:e.position,ruleId:"missing-language",source:"rehype-highlight"});throw i}!u&&h.data&&h.data.language&&e.properties.className.push("language-"+h.data.language),h.children.length>0&&(e.children=h.children)})}}];function og({content:e,createdAt:i}){return n(ja.div,{className:"bmxcb__message bmxcb__message--assistant",initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:400,damping:25,duration:.3},layout:!0,children:[t("div",{className:"bmxcb__message-avatar",children:t("div",{className:"bmxcb__avatar",children:t(tg,{color:[.5,.5,.7],mouseReact:!1,amplitude:.1,speed:1.7})})}),n("div",{className:"bmxcb__message-content",children:[t("div",{className:"bmxcb__markdown",children:t(Ch,{remarkPlugins:ig,rehypePlugins:rg,components:ng,children:e})}),t("div",{className:"bmxcb__message-time",children:al(i)})]})]})}function sg({message:e}){return e.role===Va.USER?t(ll,{content:e.content,createdAt:e.createdAt}):e.role===Va.ASSISTANT?t(og,{content:e.content,createdAt:e.createdAt}):t(ll,{content:e.content})}function ag(){return n("div",{className:"bmxcb__message bmxcb__message--assistant",children:[t("div",{className:"bmxcb__message-avatar",children:t("div",{className:"bmxcb__avatar",children:t(tg,{color:[.5,.5,.7],mouseReact:!1,amplitude:.1,speed:1.7})})}),t("div",{className:"bmxcb__message-content",children:n("div",{className:"bmxcb__typing",children:[t(ja.span,{className:"bmxcb__dot",animate:{opacity:[.2,1,.2]},transition:{repeat:1/0,duration:1.2,delay:0}}),t(ja.span,{className:"bmxcb__dot",animate:{opacity:[.2,1,.2]},transition:{repeat:1/0,duration:1.2,delay:.2}}),t(ja.span,{className:"bmxcb__dot",animate:{opacity:[.2,1,.2]},transition:{repeat:1/0,duration:1.2,delay:.4}})]})})]})}function lg({messages:e,sending:i}){const r=g(null),o=g(null),[s,a]=b(!1),l=()=>{r.current?.scrollIntoView({behavior:"smooth"})};return d(()=>{l()},[e]),n("div",{className:"bmxcb__messages",ref:o,onScroll:()=>{if(o.current){const{scrollTop:e,scrollHeight:t,clientHeight:n}=o.current;a(!(t-e-n<100))}},children:[e.map(e=>t(sg,{message:e},e.id)),i&&t(ag,{}),t("div",{ref:r}),s&&t("button",{className:"bmxcb__scroll-to-bottom",onClick:l,"aria-label":"Scroll to bottom",children:"↓"})]})}function cg({input:e,setInput:i,onKeyDown:r,onSend:o,placeholder:s,sending:a}){return n(ja.div,{className:"bmxcb__inputRow",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1,duration:.3},children:[t(ja.textarea,{className:"bmxcb__input",value:e,onChange:e=>i(e.target.value),onKeyDown:r,placeholder:s,rows:1,whileFocus:{scale:1.02},transition:{type:"spring",stiffness:400,damping:25}}),t(ja.button,{className:"bmxcb__send",onClick:o,disabled:a||!e.trim(),whileHover:{scale:1.05,y:-1},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:25},"aria-label":a?"Sending...":"Send message",children:t(ja.div,{animate:a?{rotate:360}:{rotate:0},transition:{duration:1,repeat:a?1/0:0,ease:"linear"},children:t(a?nl:il,{size:16})})})]})}function ug({onClose:e,onClearHistory:i,hue:r,onHueChange:o,hoverIntensity:s,onHoverIntensityChange:a,rotateOnHover:l,onRotateOnHoverChange:c}){return n(ja.div,{className:"bmxcb__settings-panel",initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.2},children:[n("div",{className:"bmxcb__settings-header",children:[n("div",{className:"bmxcb__settings-title",children:[t(el,{size:18}),"Settings"]}),t("button",{className:"bmxcb__settings-close",onClick:e,"aria-label":"Close settings",children:t(Ja,{size:16})})]}),n("div",{className:"bmxcb__settings-content",children:[n("div",{className:"bmxcb__settings-section",children:[n("h3",{className:"bmxcb__settings-section-title",children:[t(tl,{size:16}),"Orb Appearance"]}),n("div",{className:"bmxcb__settings-group",children:[n("label",{className:"bmxcb__settings-label",children:["Color Hue: ",r,"°"]}),t("input",{type:"range",min:"0",max:"360",value:r,onChange:e=>o(Number(e.target.value)),className:"bmxcb__settings-slider"})]}),n("div",{className:"bmxcb__settings-group",children:[n("label",{className:"bmxcb__settings-label",children:["Hover Intensity: ",Math.round(100*s),"%"]}),t("input",{type:"range",min:"0",max:"1",step:"0.1",value:s,onChange:e=>a(Number(e.target.value)),className:"bmxcb__settings-slider"})]}),t("div",{className:"bmxcb__settings-group",children:n("label",{className:"bmxcb__settings-checkbox-label",children:[t("input",{type:"checkbox",checked:l,onChange:e=>c(e.target.checked),className:"bmxcb__settings-checkbox"}),t("span",{children:"Rotate on hover"})]})})]}),t("div",{className:"bmxcb__settings-section",children:n("button",{className:"bmxcb__settings-clear-button",onClick:i,children:[t(ol,{size:16}),"Clear Chat History"]})})]})]})}function dg({title:i,messages:r,input:o,setInput:s,onKeyDown:a,onSend:l,onClose:c,placeholder:u,sending:d,showSettings:h,onToggleSettings:p,onClearHistory:f,hue:m,onHueChange:g,hoverIntensity:b,onHoverIntensityChange:y,rotateOnHover:v,onRotateOnHoverChange:x}){return t(ja.div,{className:"bmxcb__panel",role:"dialog","aria-modal":"true","aria-label":"BMX Chat",initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},transition:{type:"spring",stiffness:300,damping:30,duration:.3},children:h?t(ug,{onClose:p,onClearHistory:f,hue:m,onHueChange:g,hoverIntensity:b,onHoverIntensityChange:y,rotateOnHover:v,onRotateOnHoverChange:x}):n(e,{children:[t(sl,{title:i,onClose:c,onSettings:p}),t(lg,{messages:r,sending:d}),t(cg,{input:o,setInput:s,onKeyDown:a,onSend:l,placeholder:u,sending:d})]})})}function hg({api:i,projectId:r,zIndex:o=2147483e3,storage:s="local",storageKey:a="bmx-chat-bot-history",placeholder:l="Ask about this project…",title:u="BMX AI",children:h}){const[p,f]=b(!1),[v,x]=b(!1),[w,k]=b([]),[_,E]=b(""),[S,A]=b(!1),[C,M]=b(!1),[T,N]=b(0),[O,I]=b(.5),[D,R]=b(!0),P=g(null);d(()=>{x(!0)},[]),d(()=>{if("undefined"!=typeof window&&"local"===s)try{const e=window.localStorage.getItem(a);e&&k(JSON.parse(e))}catch{}},[s,a]),d(()=>{if("undefined"!=typeof window&&"local"===s)try{window.localStorage.setItem(a,JSON.stringify(w))}catch{}},[w,s,a]);const L=m(()=>{if(!v||"undefined"==typeof document)return null;const e=document.createElement("div");return e.setAttribute("data-bmx-chat-bot-root",""),e.style.all="initial",e.style.fontFamily="var(--bmx-font-family)",e.style.position="fixed",e.style.right="16px",e.style.bottom="16px",e.style.zIndex=String(o),e},[v,o]);d(()=>{if(L&&"undefined"!=typeof document)return document.body.appendChild(L),()=>{try{document.body.removeChild(L)}catch{}}},[L]);const F=c(async()=>{const e=_.trim();if(!e||S)return;const t={id:`${Date.now()}-user`,role:"user",content:e,createdAt:Date.now()};k(e=>[...e,t]),E(""),A(!0),P.current?.abort(),P.current=new AbortController;try{const n=await i.sendMessage([...w,t],e,{projectId:r,signal:P.current.signal});k(e=>[...e,n])}catch(e){const t={id:`${Date.now()}-error`,role:"assistant",content:"Sorry, something went wrong. Please try again.",createdAt:Date.now()};k(e=>[...e,t])}finally{A(!1)}},[i,_,w,r,S]),B=c(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),F())},[F]),z=c(()=>{if(k([]),"undefined"!=typeof window&&"local"===s)try{window.localStorage.removeItem(a)}catch{}},[s,a]),j=c(()=>{M(e=>!e)},[]);return v&&L?n(e,{children:[h??null,y(n("div",{className:"bmxcb",children:[t($a,{open:p,onClick:()=>f(e=>!e),hue:T,hoverIntensity:O,rotateOnHover:D,forceHoverState:!1}),p&&t(dg,{title:u,messages:w,input:_,setInput:E,onKeyDown:B,onSend:()=>{F()},onClose:()=>f(!1),placeholder:l,sending:S,showSettings:C,onToggleSettings:j,onClearHistory:z,hue:T,onHueChange:N,hoverIntensity:O,onHoverIntensityChange:I,rotateOnHover:D,onRotateOnHoverChange:R})]}),L)]}):t(e,{children:h??null})}function pg(e=400){return{async sendMessage(t,n){const i={id:`${Date.now()}-assistant`,role:"assistant",content:`Echo: ${n}`,createdAt:Date.now()};return await new Promise(t=>setTimeout(t,e)),i}}}class fg{constructor(e){this.apiKey=e.apiKey,this.model=e.model||"gpt-4o-mini",this.baseURL=e.baseURL||"https://api.openai.com/v1"}async sendMessage(e,t,n){const i=[];i.push({role:"system",content:"You are a Morphex BMX expert assistant. Use the following comprehensive information about Morphex BMX to answer questions accurately and helpfully. If the information doesn't contain the answer, say so clearly.\n\n\n# Morphex BMX - Complete Information Guide\n\n## Overview\nBMX is a DeFi ecosystem designed to address a core challenge for long-term users and liquidity providers: the reliance on speculative trading cycles and temporary, unsustainable incentive programs. The protocol provides an alternative design for long-term holding, built on the principle of capturing real fees from a wide range of activities and routing them back to users without inflationary token emissions.\n\n## Catalyst Ahead\n- **DeliSwap Launch**: Long awaited launch of DeliSwap, a Base-native DEX built on Uniswap v4 hooks. Highly innovative design.\n- **Fee Cycling**: 100% of fees cycle back into BMX (97% auto-swapped, 3% to stakers). Even if routed through other aggregators, DeliSwap still captures backend fees.\n\n## Team, Tokenomics, Backing / Sentiment\n**Unique Backing**: One and only project after Aero where Coinbase market bought half a million $ worth of tokens onchain at 20% below current price.\n\n**Team**: Ex-Coinbase by Coinbase people, strong praise/support from Moonwell founder, Jesse etc.\n\n**Tokenomics**:\n- All tokens are unlocked\n- Only 16% in active circulation:\n - 70% are staked\n - 10% are in the treasury (according to the docs)\n - 4% are held by Coinbase Ventures, won't be sold anytime soon\n- ~2.7M Total supply, 700k tokens Circ.\n- At current prices that's just ~$4M effective mcap.\n- Project has Zero inflation, only buybacks announced recently\n\n## Platform Architecture\nThe ecosystem's architecture is centered around wBLT, an auto-compounding liquidity token comprised of blue-chip assets like BTC, ETH, and USDC. wBLT is designed to capture fees generated not only by BMX's native products but also from broader onchain activity, such as swaps routed through major DEX aggregators.\n\n## Core Products\n\n### 1. wBLT (Wrapped BMX Liquidity Token)\n- **Composition**: Blue-chip assets (cbBTC, ETH, USDC)\n- **Features**: Auto-compounding, transferable vault token\n- **APR**: Historical annualized APR around 60% (future rates may vary)\n- **Use Cases**: \n - High-quality collateral for platforms like Morpho\n - Useful pairing asset on DEXes\n - Auto-fee-accruing version of BLT\n\n### 2. BMX Classic\n- **Type**: Spot and margin trading platform based on GMX-v1\n- **Focus**: Capital efficiency and low fees\n- **Settlement**: All trades settled against singular liquidity pool (BLT)\n- **Liquidity**: Users can provide liquidity with any whitelisted asset\n\n### 3. BMX Freestyle\n- **Type**: Intent-based trading platform\n- **Features**: Low fees, access to over 250 trading markets\n- **Technology**: Powered by SYMMIO protocol\n- **Leverage**: Up to 60x leverage available\n\n### 4. Carousel (formerly Based MediaX)\n- **Type**: Non-fungible asset (NFA) exchange\n- **Features**: \n - Scan listings from all major NFT platforms\n - Save 50%+ on standard fees (0.25%)\n - Access auctions and randomized \"Carousel\" style listings\n - Earn or post incentives permissionlessly\n\n### 5. Deli Swap (Coming Soon)\n- **Type**: Base-native DEX built on Uniswap v4 hooks\n- **Architecture**: Non-custodial, decentralized, permissionless\n- **Features**: \n - Built on Uniswap V4 with hooks\n - wBLT base pairs in v1\n - 100% of fees distributed to BMX ecosystem\n - Static pool fees for v1, dynamic fees for v2\n\n## Fee Distribution System\n**Protocol Accrued Fee Allocation (BIP-20)**:\n- **Classic**: 80% to BLT, 20% to BMX Staking Safety Module (vote-directed)\n- **Freestyle**: 40% to BLT, 60% to BMX Staking Safety Module (vote-directed)\n- **Carousel**: 40% to BLT, 60% to BMX Staking Safety Module (vote-directed)\n- **Deli Swap**: 97% to LPs as BMX, 3% to BMX Staking Safety Module (vote-directed)\n\n## BMX Staking System\n**Staking Benefits**:\n- No lock up period\n- Receive multiplier points (100% APR)\n- Accrued fees routed as wETH\n- Available on Base, Mode, and Sonic\n\n**Multiplier Points (MPs)**:\n- Accrue at 100% APR on staked balance\n- Boost formula: Boost = MP / BMX\n- Unstaking burns MPs (encourages long-term staking)\n- Non-transferable and supply-neutral\n\n## Tokenomics & Distribution\n**Total Supply**: 2.85M BMX (after burns)\n**Allocation**:\n- **Treasury**: 322.61K BMX (10%)\n- **Team**: 419.39K BMX (13%)\n- **MPX Claimable Airdrop**: 600K BMX as oBMX (18.5%) - No Longer Active\n- **Initial Seed Liquidity**: 80.65K BMX (2.5%)\n\n**Recent Burns**: 179,688 BMX burned (bought back with treasury wBLT) as of June 15, 2024.\n\n## Technical Specifications\n**Networks**: Base, Mode, Sonic\n**Oracles**: Chainlink (onchain) and Pyth (offchain)\n**Governance**: Gas-free, off-chain voting via Snapshot\n**Security**: Multi-sig governed, audited contracts\n\n## Recent Developments\n- **Token Burns**: Over 5 million BMX tokens burned, valued at over $8 million\n- **Freestyle Launch**: New decentralized perpetual trading engine with 60x leverage\n- **wBLT Introduction**: Wrapped, composable, multi-use token with auto-fee-accruing\n- **DeliSwap Development**: Base-native DEX on Uniswap v4 hooks\n\n## Community & Resources\n- **Website**: https://morphex.trade\n- **Documentation**: https://docs.morphex.trade\n- **Discord**: https://discord.com/invite/morphex\n- **Warpcast**: https://warpcast.com/~/channel/morphex\n- **GitHub**: https://github.com/morphex\n- **Snapshot**: https://snapshot.box/#/s:bmxonbase.eth\n\n## Key Innovations\n1. **Vault-First Approach**: Automated fee-processing vaults\n2. **Composability**: wBLT enables multiple use cases\n3. **Capital Efficiency**: Eliminates competition between trading and native token liquidity\n4. **Zero Emissions**: No inflationary token emissions\n5. **Real Fee Capture**: Powered by actual protocol cash flow\n\n## Risk Management\n- **Counterparty Risk**: BLT is counterparty to traders\n- **Smart Contract Risk**: Standard DeFi protocol risks\n- **Asset Risk**: Exposure to bridged tokens and volatile assets\n- **Liquidation Risk**: Positions can be liquidated if margin insufficient\n\n## Getting Started\n1. Visit https://morphex.trade\n2. Connect wallet to Base/Mode/Sonic\n3. Choose product (Classic, Freestyle, Carousel)\n4. Deposit collateral and start trading\n5. Stake BMX for governance and fee accrual\n\nThis comprehensive guide covers all aspects of the BMX ecosystem including platform architecture, products, tokenomics, staking, and recent developments.\n\n\nInstructions:\n- Be accurate and helpful when answering questions about Morphex BMX\n- Use the provided data to give specific, detailed answers\n- If asked about recent developments, refer to the token burn and Freestyle market launch\n- For trading questions, mention the 200+ assets and 60x leverage capabilities\n- For technical questions, reference the Base network deployment and intents-based technology\n- Always be professional and informative\n- If you don't know something specific, say so clearly"}),i.push(...e.map(e=>({role:e.role,content:e.content}))),i.push({role:"user",content:t});try{const e=await fetch(`${this.baseURL}/chat/completions`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:this.model,messages:i,stream:!1,temperature:.7,max_tokens:1500}),signal:n?.signal});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(`Morphex API error: ${e.status} ${e.statusText}. ${t.error?.message||""}`)}const t=await e.json(),r=t.choices[0]?.message?.content;if(!r)throw new Error("No response from Morphex API");return{id:`morphex-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,role:"assistant",content:r,createdAt:Date.now()}}catch(e){throw console.error("Morphex API error:",e),e}}}class mg{constructor(e){this.config={showTimestamp:!0,prefix:"BMX",...e}}formatMessage(e,t,...n){if(!this.config.enabled)return;const i=`${this.config.showTimestamp?(new Date).toISOString().substring(11,23):""} ${this.config.prefix?`[${this.config.prefix}]`:""} ${e}: ${t}`;console.log(i,...n)}debug(e,...t){this.formatMessage("🔍 DEBUG",e,...t)}info(e,...t){this.formatMessage("ℹ️ INFO",e,...t)}warn(e,...t){this.formatMessage("⚠️ WARN",e,...t)}error(e,...t){this.formatMessage("❌ ERROR",e,...t)}success(e,...t){this.formatMessage("✅ SUCCESS",e,...t)}ragQuery(e){this.debug(`PineconeRAG Query: ${e}`)}ragMatches(e,t){this.debug(`Retrieved matches: ${e}`),t&&t.length>0&&this.debug("Match scores:",t)}ragContent(e){this.debug(`First match content: ${e}...`)}ragSystemPrompt(e){this.debug(`System prompt: ${e.substring(0,500)}...`)}ragMessages(e){this.debug("Messages to OpenAI:",e.map(e=>({role:e.role,content:e.content.substring(0,100)+"..."})))}ragResponse(e){this.debug(`OpenAI response: ${e}`)}ragError(e){this.error("PineconeRAGAdapter error:",e)}}new mg({enabled:!1,prefix:"BMX-RAG",showTimestamp:!0}),new mg({enabled:!0,prefix:"BMX-RAG-DEV",showTimestamp:!0});class gg{constructor(e){this.openAIApiKey=e.openAIApiKey,this.pineconeApiKey=e.pineconeApiKey,this.pineconeIndexUrl=e.pineconeIndexUrl.replace(/\/$/,""),this.namespace=e.namespace??"bmx-docs",this.topK=e.topK??4,this.chatModel=e.chatModel??"gpt-4o-mini",this.embeddingModel=e.embeddingModel??"text-embedding-3-large",this.openAIBaseURL=e.openAIBaseURL??"https://api.openai.com/v1",this.enableStreaming=e.enableStreaming??!1,this.maxContextTokens=e.maxContextTokens??2e3,this.minScoreThreshold=e.minScoreThreshold??.3,this.logger=new mg({enabled:e.debug??!1,prefix:"BMX-RAG",showTimestamp:!0})}async embed(e,t){const n=await fetch(`${this.openAIBaseURL}/embeddings`,{method:"POST",headers:{Authorization:`Bearer ${this.openAIApiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:this.embeddingModel,input:e}),signal:t});if(!n.ok){const e=await n.text();throw new Error(`OpenAI embeddings error ${n.status}: ${e}`)}const i=await n.json(),r=i.data?.[0]?.embedding;if(!r)throw new Error("No embedding returned by OpenAI");return r}async queryPinecone(e,t){const n=await fetch(`${this.pineconeIndexUrl}/query`,{method:"POST",headers:{"Content-Type":"application/json","Api-Key":this.pineconeApiKey},body:JSON.stringify({vector:e,topK:this.topK,includeMetadata:!0,namespace:this.namespace}),signal:t});if(!n.ok){const e=await n.text();throw new Error(`Pinecone query error ${n.status}: ${e}`)}const i=await n.json();return i?.matches??[]}preprocessQuery(e){let t=e.trim().replace(/\s+/g," ");const n={"deli swap":["swap","trading","exchange","liquidity"],swap:["trading","exchange","liquidity","token"],trading:["swap","exchange","market","liquidity"]},i=t.toLowerCase();for(const[e,r]of Object.entries(n))if(i.includes(e)){t+=" "+r.join(" ");break}return t}estimateTokens(e){return Math.ceil(e.length/4)}truncateContext(e){let t=0;const n=[];for(const i of e){const e=i.metadata?.text||"",r=this.estimateTokens(e);if(t+r>this.maxContextTokens){const r=this.maxContextTokens-t;if(r>100){const t=e.substring(0,4*r);n.push({...i,metadata:{...i.metadata,text:t+"..."}})}break}n.push(i),t+=r}return n}buildSystemPrompt(e){return"You are a helpful assistant for the BMX project. Use the following retrieved context to answer the user's question. If the context contains relevant information, provide a helpful response based on that information. If the context doesn't contain the specific answer but has related information, provide what you can and mention that you don't have specific details about the exact term they asked about. If the context is completely unrelated, say you don't have information about that specific topic. Do not fabricate URLs or data.\n\nRetrieved Context:\n\n"+e.map(e=>{const t=e.metadata??{},n=t.text??t.content??"",i=[t.title??"",t.source??t.url??""].filter(Boolean).join(" — ");return`${i?`# ${i}\n`:""}${n}`.trim()}).filter(Boolean).join("\n\n---\n\n")}async sendMessage(e,t,n){try{const i=this.preprocessQuery(t),r=await this.embed(i,n?.signal),o=await this.queryPinecone(r,n?.signal),s=this.truncateContext(o.filter(e=>(e.score??0)>=this.minScoreThreshold).slice(0,this.topK));this.logger.ragQuery(i),this.logger.ragMatches(o.length),this.logger.ragMatches(s.length),s.length>0&&(this.logger.ragMatches(s.length,s.map(e=>({id:e.id,score:e.score??0}))),this.logger.ragContent(s[0]?.metadata?.text?.substring(0,200)||""));const a=s.length>0?this.buildSystemPrompt(s):"You are a helpful assistant for the BMX project. I don't have access to specific documentation about your question, but I can help with general information about BMX. Please let me know if you need help with something else or if you have more specific questions.";this.logger.ragSystemPrompt(a);const l=[{role:Va.SYSTEM,content:a},...e.map(e=>({role:e.role,content:e.content}))],c=e[e.length-1];c&&c.content===i||l.push({role:Va.USER,content:i}),this.logger.ragMessages(l);const u=await fetch(`${this.openAIBaseURL}/chat/completions`,{method:"POST",headers:{Authorization:`Bearer ${this.openAIApiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:this.chatModel,messages:l,stream:!1,temperature:.2,max_tokens:1e3}),signal:n?.signal});if(!u.ok){const e=await u.text();throw new Error(`OpenAI chat error ${u.status}: ${e}`)}const d=await u.json(),h=d?.choices?.[0]?.message?.content??"";return this.logger.ragResponse(h),{id:`pc-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,role:Va.ASSISTANT,content:h,createdAt:Date.now()}}catch(e){return this.logger.ragError(e),{id:`pc-error-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,role:Va.ASSISTANT,content:"I'm having trouble accessing the knowledge base right now. Please try again in a moment. If the problem persists, please check your API keys and network connection.",createdAt:Date.now()}}}}export{hg as BmxChatBot,fg as MorphexAdapter,gg as PineconeRAGAdapter,pg as createMockAdapter};
1
+ import{Fragment as e,jsx as t,jsxs as n}from"react/jsx-runtime";import{Component as i,Fragment as r,createContext as o,createElement as s,default as a,forwardRef as l,useCallback as c,useContext as u,useEffect as d,useId as h,useInsertionEffect as p,useLayoutEffect as f,useMemo as m,useRef as g,useState as b}from"react";import{createPortal as y}from"react-dom";var v={62:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var i=(0,r.default)(e),o="function"==typeof t;return i.forEach(function(e){if("declaration"===e.type){var i=e.property,r=e.value;o?t(i,r,e):r&&((n=n||{})[i]=r)}}),n};var r=i(n(401))},74:e=>{function t(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(n=>{const i=e[n],r=typeof i;"object"!==r&&"function"!==r||Object.isFrozen(i)||t(i)}),e}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach(function(e){for(const t in e)n[t]=e[t]}),n}const o=e=>!!e.scope;class s{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!o(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${"_".repeat(t+1)}`)].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){o(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class l{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=a({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{l._collapse(e)}))}}class c extends l{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new s(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function u(e){return e?"string"==typeof e?e:e.source:null}function d(e){return f("(?=",e,")")}function h(e){return f("(?:",e,")*")}function p(e){return f("(?:",e,")?")}function f(...e){return e.map(e=>u(e)).join("")}function m(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>u(e)).join("|")+")"}function g(e){return new RegExp(e.toString()+"|").exec("").length-1}const b=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function y(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let i=u(e),r="";for(;i.length>0;){const e=b.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const v="[a-zA-Z]\\w*",x="[a-zA-Z_]\\w*",w="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",k="\\b(0b[01]+)",E={begin:"\\\\[\\s\\S]",relevance:0},S={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[E]},A={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[E]},C=function(e,t,n={}){const i=r({scope:"comment",begin:e,end:t,contains:[]},n);i.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 o=m("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 i.contains.push({begin:f(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},M=C("//","$"),N=C("/\\*","\\*/"),T=C("#","$"),O={scope:"number",begin:w,relevance:0},D={scope:"number",begin:_,relevance:0},I={scope:"number",begin:k,relevance:0},R={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[E,{begin:/\[/,end:/\]/,relevance:0,contains:[E]}]},P={scope:"title",begin:v,relevance:0},L={scope:"title",begin:x,relevance:0},F={begin:"\\.\\s*"+x,relevance:0};var B=Object.freeze({__proto__:null,APOS_STRING_MODE:S,BACKSLASH_ESCAPE:E,BINARY_NUMBER_MODE:I,BINARY_NUMBER_RE:k,COMMENT:C,C_BLOCK_COMMENT_MODE:N,C_LINE_COMMENT_MODE:M,C_NUMBER_MODE:D,C_NUMBER_RE:_,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:T,IDENT_RE:v,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:F,NUMBER_MODE:O,NUMBER_RE:w,PHRASAL_WORDS_MODE:{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/},QUOTE_STRING_MODE:A,REGEXP_MODE:R,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=f(t,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:P,UNDERSCORE_IDENT_RE:x,UNDERSCORE_TITLE_MODE:L});function z(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function j(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function U(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=z,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function V(e,t){Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function $(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 H(e,t){void 0===e.relevance&&(e.relevance=1)}const q=(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(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=f(n.beforeMatch,d(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},K=["of","and","for","in","not","or","if","then","parent","list","value"];function G(e,t,n="keyword"){const i=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(n){Object.assign(i,G(e[n],t,n))}),i;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){const n=t.split("|");i[n[0]]=[e,W(n[0],n[1])]})}}function W(e,t){return t?Number(t):function(e){return K.includes(e.toLowerCase())}(e)?0:1}const Z={},X=e=>{console.error(e)},Y=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Q=(e,t)=>{Z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Z[`${e}/${t}`]=!0)},J=new Error;function ee(e,t,{key:n}){let i=0;const r=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+i]=r[e],o[e+i]=!0,i+=g(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function te(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw X("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),J;if("object"!=typeof e.beginScope||null===e.beginScope)throw X("beginScope must be object"),J;ee(e,e.begin,{key:"beginScope"}),e.begin=y(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw X("skip, excludeEnd, returnEnd not compatible with endScope: {}"),J;if("object"!=typeof e.endScope||null===e.endScope)throw X("endScope must be object"),J;ee(e,e.end,{key:"endScope"}),e.end=y(e.end,{joinWith:""})}}(e)}function ne(e){function t(t,n){return new RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=g(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(y(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}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=r(e.classNameAliases||{}),function n(o,s){const a=o;if(o.isCompiled)return a;[j,$,te,q].forEach(e=>e(o,s)),e.compilerExtensions.forEach(e=>e(o,s)),o.__beforeBegin=null,[U,V,H].forEach(e=>e(o,s)),o.isCompiled=!0;let l=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),l=o.keywords.$pattern,delete o.keywords.$pattern),l=l||/\w+/,o.keywords&&(o.keywords=G(o.keywords,e.case_insensitive)),a.keywordPatternRe=t(l,!0),s&&(o.begin||(o.begin=/\B|\b/),a.beginRe=t(a.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(a.endRe=t(a.end)),a.terminatorEnd=u(a.end)||"",o.endsWithParent&&s.terminatorEnd&&(a.terminatorEnd+=(o.end?"|":"")+s.terminatorEnd)),o.illegal&&(a.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return r(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:ie(e)?r(e,{starts:e.starts?r(e.starts):null}):Object.isFrozen(e)?r(e):e}("self"===e?o:e)})),o.contains.forEach(function(e){n(e,a)}),o.starts&&n(o.starts,s),a.matcher=function(e){const t=new i;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function ie(e){return!!e&&(e.endsWithParent||ie(e.starts))}class re extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const oe=i,se=r,ae=Symbol("nomatch"),le=function(e){const i=Object.create(null),r=Object.create(null),o=[];let s=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let u={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function g(e){return u.noHighlightRe.test(e)}function b(e,t,n){let i="",r="";"object"==typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const o={code:i,language:r};A("before:highlight",o);const s=o.result?o.result:y(o.language,o.code,n);return s.code=o.code,A("after:highlight",s),s}function y(e,t,r,o){const l=Object.create(null);function c(e,t){return e.keywords[t]}function d(){if(!C.keywords)return void N.addText(T);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(T),n="";for(;t;){n+=T.substring(e,t.index);const i=E.case_insensitive?t[0].toLowerCase():t[0],r=c(C,i);if(r){const[e,o]=r;if(N.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=7&&(O+=o),e.startsWith("_"))n+=t[0];else{const n=E.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(T)}n+=T.substring(e),N.addText(n)}function h(){null!=C.subLanguage?function(){if(""===T)return;let e=null;if("string"==typeof C.subLanguage){if(!i[C.subLanguage])return void N.addText(T);e=y(C.subLanguage,T,!0,M[C.subLanguage]),M[C.subLanguage]=e._top}else e=v(T,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(O+=e.relevance),N.__addSublanguage(e._emitter,e.language)}():d(),T=""}function p(e,t){""!==e&&(N.startScope(t),N.addText(e),N.endScope())}function f(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=E.classNameAliases[e[n]]||e[n],r=t[n];i?p(r,i):(T=r,d(),T=""),n++}}function m(e,t){return e.scope&&"string"==typeof e.scope&&N.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(T,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),T=""):e.beginScope._multi&&(f(e.beginScope,t),T="")),C=Object.create(e,{parent:{value:C}}),C}function g(e,t,i){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,i);if(r){if(e["on:end"]){const i=new n(e);e["on:end"](t,i),i.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,i)}function b(e){return 0===C.matcher.regexIndex?(T+=e[0],1):(R=!0,0)}function x(e){const n=e[0],i=t.substring(e.index),r=g(C,e,i);if(!r)return ae;const o=C;C.endScope&&C.endScope._wrap?(h(),p(n,C.endScope._wrap)):C.endScope&&C.endScope._multi?(h(),f(C.endScope,e)):o.skip?T+=n:(o.returnEnd||o.excludeEnd||(T+=n),h(),o.excludeEnd&&(T=n));do{C.scope&&N.closeNode(),C.skip||C.subLanguage||(O+=C.relevance),C=C.parent}while(C!==r.parent);return r.starts&&m(r.starts,e),o.returnEnd?0:n.length}let w={};function _(i,o){const a=o&&o[0];if(T+=i,null==a)return h(),0;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===a){if(T+=t.slice(o.index,o.index+1),!s){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=w.rule,t}return 1}if(w=o,"begin"===o.type)return function(e){const t=e[0],i=e.rule,r=new n(i),o=[i.__beforeBegin,i["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return b(t);return i.skip?T+=t:(i.excludeBegin&&(T+=t),h(),i.returnBegin||i.excludeBegin||(T=t)),m(i,e),i.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(C.scope||"<unnamed>")+'"');throw e.mode=C,e}if("end"===o.type){const e=x(o);if(e!==ae)return e}if("illegal"===o.type&&""===a)return T+="\n",1;if(I>1e5&&I>3*o.index)throw new Error("potential infinite loop, way more iterations than matches");return T+=a,a.length}const E=k(e);if(!E)throw X(a.replace("{}",e)),new Error('Unknown language: "'+e+'"');const S=ne(E);let A="",C=o||S;const M={},N=new u.__emitter(u);!function(){const e=[];for(let t=C;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>N.openNode(e))}();let T="",O=0,D=0,I=0,R=!1;try{if(E.__emitTokens)E.__emitTokens(t,N);else{for(C.matcher.considerAll();;){I++,R?R=!1:C.matcher.considerAll(),C.matcher.lastIndex=D;const e=C.matcher.exec(t);if(!e)break;const n=_(t.substring(D,e.index),e);D=e.index+n}_(t.substring(D))}return N.finalize(),A=N.toHTML(),{language:e,value:A,relevance:O,illegal:!1,_emitter:N,_top:C}}catch(n){if(n.message&&n.message.includes("Illegal"))return{language:e,value:oe(t),illegal:!0,relevance:0,_illegalBy:{message:n.message,index:D,context:t.slice(D-100,D+100),mode:n.mode,resultSoFar:A},_emitter:N};if(s)return{language:e,value:oe(t),illegal:!1,relevance:0,errorRaised:n,_emitter:N,_top:C};throw n}}function v(e,t){t=t||u.languages||Object.keys(i);const n=function(e){const t={value:oe(e),illegal:!1,relevance:0,_top:l,_emitter:new u.__emitter(u)};return t._emitter.addText(e),t}(e),r=t.filter(k).filter(S).map(t=>y(t,e,!1));r.unshift(n);const o=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(k(e.language).supersetOf===t.language)return 1;if(k(t.language).supersetOf===e.language)return-1}return 0}),[s,a]=o,c=s;return c.secondBest=a,c}function x(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=k(n[1]);return t||(Y(a.replace("{}",n[1])),Y("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>g(e)||k(e))}(e);if(g(n))return;if(A("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(u.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(e)),u.throwUnescapedHTML))throw new re("One of your code blocks includes unescaped HTML.",e.innerHTML);t=e;const i=t.textContent,o=n?b(i,{language:n,ignoreIllegals:!0}):v(i);e.innerHTML=o.value,e.dataset.highlighted="yes",function(e,t,n){const i=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,n,o.language),e.result={language:o.language,re:o.relevance,relevance:o.relevance},o.secondBest&&(e.secondBest={language:o.secondBest.language,relevance:o.secondBest.relevance}),A("after:highlightElement",{el:e,result:o,text:i})}let w=!1;function _(){if("loading"===document.readyState)return w||window.addEventListener("DOMContentLoaded",function(){_()},!1),void(w=!0);document.querySelectorAll(u.cssSelector).forEach(x)}function k(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]}function E(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{r[e.toLowerCase()]=t})}function S(e){const t=k(e);return t&&!t.disableAutodetect}function A(e,t){const n=e;o.forEach(function(e){e[n]&&e[n](t)})}Object.assign(e,{highlight:b,highlightAuto:v,highlightAll:_,highlightElement:x,highlightBlock:function(e){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),x(e)},configure:function(e){u=se(u,e)},initHighlighting:()=>{_(),Q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){_(),Q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(t,n){let r=null;try{r=n(e)}catch(e){if(X("Language definition for '{}' could not be registered.".replace("{}",t)),!s)throw e;X(e),r=l}r.name||(r.name=t),i[t]=r,r.rawDefinition=n.bind(null,e),r.aliases&&E(r.aliases,{languageName:t})},unregisterLanguage:function(e){delete i[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(i)},getLanguage:k,registerAliases:E,autoDetection:S,inherit:se,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},removePlugin:function(e){const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString="11.11.1",e.regex={concat:f,lookahead:d,either:m,optional:p,anyNumberOfTimes:h};for(const e in B)"object"==typeof B[e]&&t(B[e]);return Object.assign(e,B),e},ce=le({});ce.newInstance=()=>le({}),e.exports=ce,ce.HighlightJS=ce,ce.default=ce},401:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var i=e.lastIndexOf("\n");h=~i?e.length-i:h+e.length}function f(){var e={line:d,column:h};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:d,column:h},this.source=l.source}m.prototype.content=e;var g=[];function b(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var i=n[0];return p(i),e=e.slice(i.length),n}}function v(){y(i)}function x(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return b("End of comment missing");var i=e.slice(2,n-2);return h+=2,p(i),e=e.slice(n),h+=2,t({type:"comment",comment:i})}}function _(){var e=f(),n=y(r);if(n){if(w(),!y(o))return b("property missing ':'");var i=y(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:i?u(i[0].replace(t,c)):c});return y(a),l}}return v(),function(){var e,t=[];for(x(t);e=_();)!1!==e&&(t.push(e),x(t));return t}()}},426:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(o,l)).replace(i,a))}},598:function(e,t,n){var i=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(62)),r=n(426);function o(e,t){var n={};return e&&"string"==typeof e?((0,i.default)(e,function(e,i){e&&i&&(n[(0,r.camelCase)(e,t)]=i)}),n):n}o.default=o,e.exports=o},710:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var i,r=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(i in e);return void 0===i||t.call(e,i)},a=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(r)return r(e,n).value}return e[n]};e.exports=function e(){var t,n,i,r,c,u,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)i=l(d,n),d!==(r=l(t,n))&&(f&&r&&(s(r)||(c=o(r)))?(c?(c=!1,u=i&&o(i)?i:[]):u=i&&s(i)?i:{},a(d,{name:n,newValue:e(f,u,r)})):void 0!==r&&a(d,{name:n,newValue:r}));return d}}},x={};function w(e){var t=x[e];if(void 0!==t)return t.exports;var n=x[e]={exports:{}};return v[e].call(n.exports,n,n.exports,w),n.exports}w.d=(e,t)=>{for(var n in t)w.o(t,n)&&!w.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var _={};w.r(_),w.d(_,{boolean:()=>Sl,booleanish:()=>Al,commaOrSpaceSeparated:()=>Ol,commaSeparated:()=>Tl,number:()=>Ml,overloadedBoolean:()=>Cl,spaceSeparated:()=>Nl});var k={};function E(e=400){return{async sendMessage(t,n){const i={id:`${Date.now()}-assistant`,role:"assistant",content:`Echo: ${n}`,createdAt:Date.now()};return await new Promise(t=>setTimeout(t,e)),i}}}function S(e){const{baseUrl:t,endpoint:n="/common/ai/chat",headers:i={}}=e;return{async sendMessage(e,r,{signal:o}={}){const s=`${t.replace(/\/$/,"")}${n}`,a=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",...i},body:JSON.stringify({history:e,input:r}),signal:o});if(!a.ok){const e=await a.text();throw new Error(`API error ${a.status}: ${e}`)}return await a.json()}}}w.r(k),w.d(k,{attentionMarkers:()=>sd,contentInitial:()=>ed,disable:()=>ad,document:()=>Ju,flow:()=>nd,flowInitial:()=>td,insideSpan:()=>od,string:()=>id,text:()=>rd});const A={development:()=>S({baseUrl:"http://localhost:8080",endpoint:"/common/ai/chat"}),production:e=>S({baseUrl:e??"",endpoint:"/common/ai/chat"}),custom:e=>S(e)};function C(e){let t=e[0],n=e[1],i=e[2];return Math.sqrt(t*t+n*n+i*i)}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function N(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function T(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function O(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function D(e){let t=e[0],n=e[1],i=e[2];return t*t+n*n+i*i}function I(e,t){let n=t[0],i=t[1],r=t[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function R(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function P(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[0],a=n[1],l=n[2];return e[0]=r*l-o*a,e[1]=o*s-i*l,e[2]=i*a-r*s,e}const L=function(){const e=[0,0,0],t=[0,0,0];return function(n,i){M(e,n),M(t,i),I(e,e),I(t,t);let r=R(e,t);return r>1?0:r<-1?Math.PI:Math.acos(r)}}();class F extends Array{constructor(e=0,t=e,n=e){return super(e,t,n),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this[0]=e}set y(e){this[1]=e}set z(e){this[2]=e}set(e,t=e,n=e){return e.length?this.copy(e):(function(e,t,n,i){e[0]=t,e[1]=n,e[2]=i}(this,e,t,n),this)}copy(e){return M(this,e),this}add(e,t){return t?N(this,e,t):N(this,this,e),this}sub(e,t){return t?T(this,e,t):T(this,this,e),this}multiply(e){var t,n,i;return e.length?(n=this,i=e,(t=this)[0]=n[0]*i[0],t[1]=n[1]*i[1],t[2]=n[2]*i[2]):O(this,this,e),this}divide(e){var t,n,i;return e.length?(n=this,i=e,(t=this)[0]=n[0]/i[0],t[1]=n[1]/i[1],t[2]=n[2]/i[2]):O(this,this,1/e),this}inverse(e=this){var t,n;return n=e,(t=this)[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],this}len(){return C(this)}distance(e){return e?function(e,t){let n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}(this,e):C(this)}squaredLen(){return D(this)}squaredDistance(e){return e?function(e,t){let n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}(this,e):D(this)}negate(e=this){var t,n;return n=e,(t=this)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],this}cross(e,t){return t?P(this,e,t):P(this,this,e),this}scale(e){return O(this,this,e),this}normalize(){return I(this,this),this}dot(e){return R(this,e)}equals(e){return t=e,this[0]===t[0]&&this[1]===t[1]&&this[2]===t[2];var t}applyMatrix3(e){return function(e,t,n){let i=t[0],r=t[1],o=t[2];e[0]=i*n[0]+r*n[3]+o*n[6],e[1]=i*n[1]+r*n[4]+o*n[7],e[2]=i*n[2]+r*n[5]+o*n[8]}(this,this,e),this}applyMatrix4(e){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[3]*i+n[7]*r+n[11]*o+n[15];s=s||1,e[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/s,e[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/s,e[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/s}(this,this,e),this}scaleRotateMatrix4(e){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[3]*i+n[7]*r+n[11]*o+n[15];s=s||1,e[0]=(n[0]*i+n[4]*r+n[8]*o)/s,e[1]=(n[1]*i+n[5]*r+n[9]*o)/s,e[2]=(n[2]*i+n[6]*r+n[10]*o)/s}(this,this,e),this}applyQuaternion(e){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[0],a=n[1],l=n[2],c=a*o-l*r,u=l*i-s*o,d=s*r-a*i,h=a*d-l*u,p=l*c-s*d,f=s*u-a*c,m=2*n[3];c*=m,u*=m,d*=m,h*=2,p*=2,f*=2,e[0]=i+c+h,e[1]=r+u+p,e[2]=o+d+f}(this,this,e),this}angle(e){return L(this,e)}lerp(e,t){return function(e,t,n,i){let r=t[0],o=t[1],s=t[2];e[0]=r+i*(n[0]-r),e[1]=o+i*(n[1]-o),e[2]=s+i*(n[2]-s)}(this,this,e,t),this}smoothLerp(e,t,n){return function(e,t,n,i,r){const o=Math.exp(-i*r);let s=t[0],a=t[1],l=t[2];e[0]=n[0]+(s-n[0])*o,e[1]=n[1]+(a-n[1])*o,e[2]=n[2]+(l-n[2])*o}(this,this,e,t,n),this}clone(){return new F(this[0],this[1],this[2])}fromArray(e,t=0){return this[0]=e[t],this[1]=e[t+1],this[2]=e[t+2],this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e}transformDirection(e){const t=this[0],n=this[1],i=this[2];return this[0]=e[0]*t+e[4]*n+e[8]*i,this[1]=e[1]*t+e[5]*n+e[9]*i,this[2]=e[2]*t+e[6]*n+e[10]*i,this.normalize()}}const B=new F;let z=1;class j{constructor({canvas:e=document.createElement("canvas"),width:t=300,height:n=150,dpr:i=1,alpha:r=!1,depth:o=!0,stencil:s=!1,antialias:a=!1,premultipliedAlpha:l=!1,preserveDrawingBuffer:c=!1,powerPreference:u="default",autoClear:d=!0,webgl:h=2}={}){const p={alpha:r,depth:o,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u};this.dpr=i,this.alpha=r,this.color=!0,this.depth=o,this.stencil=s,this.premultipliedAlpha=l,this.autoClear=d,this.id=z++,2===h&&(this.gl=e.getContext("webgl2",p)),this.isWebgl2=!!this.gl,this.gl||(this.gl=e.getContext("webgl",p)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(t,n),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(e,t){this.width=e,this.height=t,this.gl.canvas.width=e*this.dpr,this.gl.canvas.height=t*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:e+"px",height:t+"px"})}setViewport(e,t,n=0,i=0){this.state.viewport.width===e&&this.state.viewport.height===t||(this.state.viewport.width=e,this.state.viewport.height=t,this.state.viewport.x=n,this.state.viewport.y=i,this.gl.viewport(n,i,e,t))}setScissor(e,t,n=0,i=0){this.gl.scissor(n,i,e,t)}enable(e){!0!==this.state[e]&&(this.gl.enable(e),this.state[e]=!0)}disable(e){!1!==this.state[e]&&(this.gl.disable(e),this.state[e]=!1)}setBlendFunc(e,t,n,i){this.state.blendFunc.src===e&&this.state.blendFunc.dst===t&&this.state.blendFunc.srcAlpha===n&&this.state.blendFunc.dstAlpha===i||(this.state.blendFunc.src=e,this.state.blendFunc.dst=t,this.state.blendFunc.srcAlpha=n,this.state.blendFunc.dstAlpha=i,void 0!==n?this.gl.blendFuncSeparate(e,t,n,i):this.gl.blendFunc(e,t))}setBlendEquation(e,t){e=e||this.gl.FUNC_ADD,this.state.blendEquation.modeRGB===e&&this.state.blendEquation.modeAlpha===t||(this.state.blendEquation.modeRGB=e,this.state.blendEquation.modeAlpha=t,void 0!==t?this.gl.blendEquationSeparate(e,t):this.gl.blendEquation(e))}setCullFace(e){this.state.cullFace!==e&&(this.state.cullFace=e,this.gl.cullFace(e))}setFrontFace(e){this.state.frontFace!==e&&(this.state.frontFace=e,this.gl.frontFace(e))}setDepthMask(e){this.state.depthMask!==e&&(this.state.depthMask=e,this.gl.depthMask(e))}setDepthFunc(e){this.state.depthFunc!==e&&(this.state.depthFunc=e,this.gl.depthFunc(e))}setStencilMask(e){this.state.stencilMask!==e&&(this.state.stencilMask=e,this.gl.stencilMask(e))}setStencilFunc(e,t,n){this.state.stencilFunc===e&&this.state.stencilRef===t&&this.state.stencilFuncMask===n||(this.state.stencilFunc=e||this.gl.ALWAYS,this.state.stencilRef=t||0,this.state.stencilFuncMask=n||0,this.gl.stencilFunc(e||this.gl.ALWAYS,t||0,n||0))}setStencilOp(e,t,n){this.state.stencilFail===e&&this.state.stencilDepthFail===t&&this.state.stencilDepthPass===n||(this.state.stencilFail=e,this.state.stencilDepthFail=t,this.state.stencilDepthPass=n,this.gl.stencilOp(e,t,n))}activeTexture(e){this.state.activeTextureUnit!==e&&(this.state.activeTextureUnit=e,this.gl.activeTexture(this.gl.TEXTURE0+e))}bindFramebuffer({target:e=this.gl.FRAMEBUFFER,buffer:t=null}={}){this.state.framebuffer!==t&&(this.state.framebuffer=t,this.gl.bindFramebuffer(e,t))}getExtension(e,t,n){return t&&this.gl[t]?this.gl[t].bind(this.gl):(this.extensions[e]||(this.extensions[e]=this.gl.getExtension(e)),t?this.extensions[e]?this.extensions[e][n].bind(this.extensions[e]):null:this.extensions[e])}sortOpaque(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program.id!==t.program.id?e.program.id-t.program.id:e.zDepth!==t.zDepth?e.zDepth-t.zDepth:t.id-e.id}sortTransparent(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.zDepth!==t.zDepth?t.zDepth-e.zDepth:t.id-e.id}sortUI(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program.id!==t.program.id?e.program.id-t.program.id:t.id-e.id}getRenderList({scene:e,camera:t,frustumCull:n,sort:i}){let r=[];if(t&&n&&t.updateFrustum(),e.traverse(e=>{if(!e.visible)return!0;e.draw&&(n&&e.frustumCulled&&t&&!t.frustumIntersectsMesh(e)||r.push(e))}),i){const e=[],n=[],i=[];r.forEach(r=>{r.program.transparent?r.program.depthTest?n.push(r):i.push(r):e.push(r),r.zDepth=0,0===r.renderOrder&&r.program.depthTest&&t&&(r.worldMatrix.getTranslation(B),B.applyMatrix4(t.projectionViewMatrix),r.zDepth=B.z)}),e.sort(this.sortOpaque),n.sort(this.sortTransparent),i.sort(this.sortUI),r=e.concat(n,i)}return r}render({scene:e,camera:t,target:n=null,update:i=!0,sort:r=!0,frustumCull:o=!0,clear:s}){null===n?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(n),this.setViewport(n.width,n.height)),(s||this.autoClear&&!1!==s)&&(!this.depth||n&&!n.depth||(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!n||n.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),i&&e.updateMatrixWorld(),t&&t.updateMatrixWorld(),this.getRenderList({scene:e,camera:t,frustumCull:o,sort:r}).forEach(e=>{e.draw({camera:t})})}}const U=new F;let V=1,$=1,H=!1;class q{constructor(e,t={}){e.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=e,this.attributes=t,this.id=V++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let e in t)this.addAttribute(e,t[e])}addAttribute(e,t){if(this.attributes[e]=t,t.id=$++,t.size=t.size||1,t.type=t.type||(t.data.constructor===Float32Array?this.gl.FLOAT:t.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),t.target="index"===e?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,t.normalized=t.normalized||!1,t.stride=t.stride||0,t.offset=t.offset||0,t.count=t.count||(t.stride?t.data.byteLength/t.stride:t.data.length/t.size),t.divisor=t.instanced||0,t.needsUpdate=!1,t.usage=t.usage||this.gl.STATIC_DRAW,t.buffer||this.updateAttribute(t),t.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==t.count*t.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,t.count*t.divisor);this.instancedCount=t.count*t.divisor}else"index"===e?this.drawRange.count=t.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,t.count))}updateAttribute(e){const t=!e.buffer;t&&(e.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==e.buffer&&(this.gl.bindBuffer(e.target,e.buffer),this.glState.boundBuffer=e.buffer),t?this.gl.bufferData(e.target,e.data,e.usage):this.gl.bufferSubData(e.target,0,e.data),e.needsUpdate=!1}setIndex(e){this.addAttribute("index",e)}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}setInstancedCount(e){this.instancedCount=e}createVAO(e){this.VAOs[e.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.bindAttributes(e)}bindAttributes(e){e.attributeLocations.forEach((e,{name:t,type:n})=>{if(!this.attributes[t])return void console.warn(`active attribute ${t} not being supplied`);const i=this.attributes[t];this.gl.bindBuffer(i.target,i.buffer),this.glState.boundBuffer=i.buffer;let r=1;35674===n&&(r=2),35675===n&&(r=3),35676===n&&(r=4);const o=i.size/r,s=1===r?0:r*r*4,a=1===r?0:4*r;for(let t=0;t<r;t++)this.gl.vertexAttribPointer(e+t,o,i.type,i.normalized,i.stride+s,i.offset+t*a),this.gl.enableVertexAttribArray(e+t),this.gl.renderer.vertexAttribDivisor(e+t,i.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:e,mode:t=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${e.attributeOrder}`&&(this.VAOs[e.attributeOrder]||this.createVAO(e),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${e.attributeOrder}`),e.attributeLocations.forEach((e,{name:t})=>{const n=this.attributes[t];n.needsUpdate&&this.updateAttribute(n)});let n=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(n=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(t,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*n,this.instancedCount):this.gl.renderer.drawArraysInstanced(t,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(t,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*n):this.gl.drawArrays(t,this.drawRange.start,this.drawRange.count)}getPosition(){const e=this.attributes.position;return e.data?e:H?void 0:(console.warn("No position buffer data found to compute bounds"),H=!0)}computeBoundingBox(e){e||(e=this.getPosition());const t=e.data,n=e.size;this.bounds||(this.bounds={min:new F,max:new F,center:new F,scale:new F,radius:1/0});const i=this.bounds.min,r=this.bounds.max,o=this.bounds.center,s=this.bounds.scale;i.set(1/0),r.set(-1/0);for(let e=0,o=t.length;e<o;e+=n){const n=t[e],o=t[e+1],s=t[e+2];i.x=Math.min(n,i.x),i.y=Math.min(o,i.y),i.z=Math.min(s,i.z),r.x=Math.max(n,r.x),r.y=Math.max(o,r.y),r.z=Math.max(s,r.z)}s.sub(r,i),o.add(i,r).divide(2)}computeBoundingSphere(e){e||(e=this.getPosition());const t=e.data,n=e.size;this.bounds||this.computeBoundingBox(e);let i=0;for(let e=0,r=t.length;e<r;e+=n)U.fromArray(t,e),i=Math.max(i,this.bounds.center.squaredDistance(U));this.bounds.radius=Math.sqrt(i)}remove(){for(let e in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[e]),delete this.VAOs[e];for(let e in this.attributes)this.gl.deleteBuffer(this.attributes[e].buffer),delete this.attributes[e]}}class K extends q{constructor(e,{attributes:t={}}={}){Object.assign(t,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(e,t)}}let G=1;const W={};class Z{constructor(e,{vertex:t,fragment:n,uniforms:i={},transparent:r=!1,cullFace:o=e.BACK,frontFace:s=e.CCW,depthTest:a=!0,depthWrite:l=!0,depthFunc:c=e.LEQUAL}={}){e.canvas||console.error("gl not passed as first argument to Program"),this.gl=e,this.uniforms=i,this.id=G++,t||console.warn("vertex shader not supplied"),n||console.warn("fragment shader not supplied"),this.transparent=r,this.cullFace=o,this.frontFace=s,this.depthTest=a,this.depthWrite=l,this.depthFunc=c,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=e.createShader(e.VERTEX_SHADER),this.fragmentShader=e.createShader(e.FRAGMENT_SHADER),this.program=e.createProgram(),e.attachShader(this.program,this.vertexShader),e.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:t,fragment:n})}setShaders({vertex:e,fragment:t}){if(e&&(this.gl.shaderSource(this.vertexShader,e),this.gl.compileShader(this.vertexShader),""!==this.gl.getShaderInfoLog(this.vertexShader)&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}\nVertex Shader\n${Y(e)}`)),t&&(this.gl.shaderSource(this.fragmentShader,t),this.gl.compileShader(this.fragmentShader),""!==this.gl.getShaderInfoLog(this.fragmentShader)&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}\nFragment Shader\n${Y(t)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let n=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let e=0;e<n;e++){let t=this.gl.getActiveUniform(this.program,e);this.uniformLocations.set(t,this.gl.getUniformLocation(this.program,t.name));const n=t.name.match(/(\w+)/g);t.uniformName=n[0],t.nameComponents=n.slice(1)}this.attributeLocations=new Map;const i=[],r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let e=0;e<r;e++){const t=this.gl.getActiveAttrib(this.program,e),n=this.gl.getAttribLocation(this.program,t.name);-1!==n&&(i[n]=t.name,this.attributeLocations.set(t,n))}this.attributeOrder=i.join("")}setBlendFunc(e,t,n,i){this.blendFunc.src=e,this.blendFunc.dst=t,this.blendFunc.srcAlpha=n,this.blendFunc.dstAlpha=i,e&&(this.transparent=!0)}setBlendEquation(e,t){this.blendEquation.modeRGB=e,this.blendEquation.modeAlpha=t}setStencilFunc(e,t,n){this.stencilRef=t,this.stencilFunc.func=e,this.stencilFunc.ref=t,this.stencilFunc.mask=n}setStencilOp(e,t,n){this.stencilOp.stencilFail=e,this.stencilOp.depthFail=t,this.stencilOp.depthPass=n}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:e=!1}={}){let t=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((e,n)=>{let i=this.uniforms[n.uniformName];for(const e of n.nameComponents){if(!i)break;if(!(e in i)){if(Array.isArray(i.value))break;i=void 0;break}i=i[e]}if(!i)return J(`Active uniform ${n.name} has not been supplied`);if(i&&void 0===i.value)return J(`${n.name} uniform is missing a value parameter`);if(i.value.texture)return t+=1,i.value.update(t),X(this.gl,n.type,e,t);if(i.value.length&&i.value[0].texture){const r=[];return i.value.forEach(e=>{t+=1,e.update(t),r.push(t)}),X(this.gl,n.type,e,r)}X(this.gl,n.type,e,i.value)}),this.applyState(),e&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function X(e,t,n,i){i=i.length?function(e){const t=e.length,n=e[0].length;if(void 0===n)return e;const i=t*n;let r=W[i];r||(W[i]=r=new Float32Array(i));for(let i=0;i<t;i++)r.set(e[i],i*n);return r}(i):i;const r=e.renderer.state.uniformLocations.get(n);if(i.length)if(void 0===r||r.length!==i.length)e.renderer.state.uniformLocations.set(n,i.slice(0));else{if(function(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}(r,i))return;r.set?r.set(i):function(e,t){for(let n=0,i=e.length;n<i;n++)e[n]=t[n]}(r,i),e.renderer.state.uniformLocations.set(n,r)}else{if(r===i)return;e.renderer.state.uniformLocations.set(n,i)}switch(t){case 5126:return i.length?e.uniform1fv(n,i):e.uniform1f(n,i);case 35664:return e.uniform2fv(n,i);case 35665:return e.uniform3fv(n,i);case 35666:return e.uniform4fv(n,i);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return i.length?e.uniform1iv(n,i):e.uniform1i(n,i);case 35671:case 35667:return e.uniform2iv(n,i);case 35672:case 35668:return e.uniform3iv(n,i);case 35673:case 35669:return e.uniform4iv(n,i);case 35674:return e.uniformMatrix2fv(n,!1,i);case 35675:return e.uniformMatrix3fv(n,!1,i);case 35676:return e.uniformMatrix4fv(n,!1,i)}}function Y(e){let t=e.split("\n");for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}let Q=0;function J(e){Q>100||(console.warn(e),Q++,Q>100&&console.warn("More than 100 program warnings - stopping logs."))}function ee(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=n[0],l=n[1],c=n[2],u=n[3];return e[0]=i*u+s*a+r*c-o*l,e[1]=r*u+s*l+o*a-i*c,e[2]=o*u+s*c+i*l-r*a,e[3]=s*u-i*a-r*l-o*c,e}class te extends Array{constructor(e=0,t=0,n=0,i=1){super(e,t,n,i),this.onChange=()=>{},this._target=this;const r=["0","1","2","3"];return new Proxy(this,{set(e,t){const n=Reflect.set(...arguments);return n&&r.includes(t)&&e.onChange(),n}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set w(e){this._target[3]=e,this.onChange()}identity(){var e;return(e=this._target)[0]=0,e[1]=0,e[2]=0,e[3]=1,this.onChange(),this}set(e,t,n,i){return e.length?this.copy(e):(function(e,t,n,i,r){e[0]=t,e[1]=n,e[2]=i,e[3]=r}(this._target,e,t,n,i),this.onChange(),this)}rotateX(e){return function(e,t,n){n*=.5;let i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);e[0]=i*l+s*a,e[1]=r*l+o*a,e[2]=o*l-r*a,e[3]=s*l-i*a}(this._target,this._target,e),this.onChange(),this}rotateY(e){return function(e,t,n){n*=.5;let i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);e[0]=i*l-o*a,e[1]=r*l+s*a,e[2]=o*l+i*a,e[3]=s*l-r*a}(this._target,this._target,e),this.onChange(),this}rotateZ(e){return function(e,t,n){n*=.5;let i=t[0],r=t[1],o=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);e[0]=i*l+r*a,e[1]=r*l-i*a,e[2]=o*l+s*a,e[3]=s*l-o*a}(this._target,this._target,e),this.onChange(),this}inverse(e=this._target){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=n*n+i*i+r*r+o*o,a=s?1/s:0;e[0]=-n*a,e[1]=-i*a,e[2]=-r*a,e[3]=o*a}(this._target,e),this.onChange(),this}conjugate(e=this._target){var t,n;return n=e,(t=this._target)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],this.onChange(),this}copy(e){return t=this._target,n=e,t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],this.onChange(),this;var t,n}normalize(e=this._target){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=n*n+i*i+r*r+o*o;s>0&&(s=1/Math.sqrt(s)),e[0]=n*s,e[1]=i*s,e[2]=r*s,e[3]=o*s}(this._target,e),this.onChange(),this}multiply(e,t){return t?ee(this._target,e,t):ee(this._target,this._target,e),this.onChange(),this}dot(e){return t=this._target,n=e,t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3];var t,n}fromMatrix3(e){return function(e,t){let n,i=t[0]+t[4]+t[8];if(i>0)n=Math.sqrt(i+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{let i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);let r=(i+1)%3,o=(i+2)%3;n=Math.sqrt(t[3*i+i]-t[3*r+r]-t[3*o+o]+1),e[i]=.5*n,n=.5/n,e[3]=(t[3*r+o]-t[3*o+r])*n,e[r]=(t[3*r+i]+t[3*i+r])*n,e[o]=(t[3*o+i]+t[3*i+o])*n}}(this._target,e),this.onChange(),this}fromEuler(e,t){return function(e,t,n="YXZ"){let i=Math.sin(.5*t[0]),r=Math.cos(.5*t[0]),o=Math.sin(.5*t[1]),s=Math.cos(.5*t[1]),a=Math.sin(.5*t[2]),l=Math.cos(.5*t[2]);"XYZ"===n?(e[0]=i*s*l+r*o*a,e[1]=r*o*l-i*s*a,e[2]=r*s*a+i*o*l,e[3]=r*s*l-i*o*a):"YXZ"===n?(e[0]=i*s*l+r*o*a,e[1]=r*o*l-i*s*a,e[2]=r*s*a-i*o*l,e[3]=r*s*l+i*o*a):"ZXY"===n?(e[0]=i*s*l-r*o*a,e[1]=r*o*l+i*s*a,e[2]=r*s*a+i*o*l,e[3]=r*s*l-i*o*a):"ZYX"===n?(e[0]=i*s*l-r*o*a,e[1]=r*o*l+i*s*a,e[2]=r*s*a-i*o*l,e[3]=r*s*l+i*o*a):"YZX"===n?(e[0]=i*s*l+r*o*a,e[1]=r*o*l+i*s*a,e[2]=r*s*a-i*o*l,e[3]=r*s*l-i*o*a):"XZY"===n&&(e[0]=i*s*l-r*o*a,e[1]=r*o*l-i*s*a,e[2]=r*s*a+i*o*l,e[3]=r*s*l+i*o*a)}(this._target,e,e.order),t||this.onChange(),this}fromAxisAngle(e,t){return function(e,t,n){n*=.5;let i=Math.sin(n);e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(n)}(this._target,e,t),this.onChange(),this}slerp(e,t){return function(e,t,n,i){let r,o,s,a,l,c=t[0],u=t[1],d=t[2],h=t[3],p=n[0],f=n[1],m=n[2],g=n[3];o=c*p+u*f+d*m+h*g,o<0&&(o=-o,p=-p,f=-f,m=-m,g=-g),1-o>1e-6?(r=Math.acos(o),s=Math.sin(r),a=Math.sin((1-i)*r)/s,l=Math.sin(i*r)/s):(a=1-i,l=i),e[0]=a*c+l*p,e[1]=a*u+l*f,e[2]=a*d+l*m,e[3]=a*h+l*g}(this._target,this._target,e,t),this.onChange(),this}fromArray(e,t=0){return this._target[0]=e[t],this._target[1]=e[t+1],this._target[2]=e[t+2],this._target[3]=e[t+3],this.onChange(),this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e[t+3]=this[3],e}}function ne(e){let t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],p=e[12],f=e[13],m=e[14],g=e[15];return(t*s-n*o)*(d*g-h*m)-(t*a-i*o)*(u*g-h*f)+(t*l-r*o)*(u*m-d*f)+(n*a-i*s)*(c*g-h*p)-(n*l-r*s)*(c*m-d*p)+(i*l-r*a)*(c*f-u*p)}function ie(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],p=t[10],f=t[11],m=t[12],g=t[13],b=t[14],y=t[15],v=n[0],x=n[1],w=n[2],_=n[3];return e[0]=v*i+x*a+w*d+_*m,e[1]=v*r+x*l+w*h+_*g,e[2]=v*o+x*c+w*p+_*b,e[3]=v*s+x*u+w*f+_*y,v=n[4],x=n[5],w=n[6],_=n[7],e[4]=v*i+x*a+w*d+_*m,e[5]=v*r+x*l+w*h+_*g,e[6]=v*o+x*c+w*p+_*b,e[7]=v*s+x*u+w*f+_*y,v=n[8],x=n[9],w=n[10],_=n[11],e[8]=v*i+x*a+w*d+_*m,e[9]=v*r+x*l+w*h+_*g,e[10]=v*o+x*c+w*p+_*b,e[11]=v*s+x*u+w*f+_*y,v=n[12],x=n[13],w=n[14],_=n[15],e[12]=v*i+x*a+w*d+_*m,e[13]=v*r+x*l+w*h+_*g,e[14]=v*o+x*c+w*p+_*b,e[15]=v*s+x*u+w*f+_*y,e}function re(e,t){let n=t[0],i=t[1],r=t[2],o=t[4],s=t[5],a=t[6],l=t[8],c=t[9],u=t[10];return e[0]=Math.hypot(n,i,r),e[1]=Math.hypot(o,s,a),e[2]=Math.hypot(l,c,u),e}const oe=function(){const e=[1,1,1];return function(t,n){let i=e;re(i,n);let r=1/i[0],o=1/i[1],s=1/i[2],a=n[0]*r,l=n[1]*o,c=n[2]*s,u=n[4]*r,d=n[5]*o,h=n[6]*s,p=n[8]*r,f=n[9]*o,m=n[10]*s,g=a+d+m,b=0;return g>0?(b=2*Math.sqrt(g+1),t[3]=.25*b,t[0]=(h-f)/b,t[1]=(p-c)/b,t[2]=(l-u)/b):a>d&&a>m?(b=2*Math.sqrt(1+a-d-m),t[3]=(h-f)/b,t[0]=.25*b,t[1]=(l+u)/b,t[2]=(p+c)/b):d>m?(b=2*Math.sqrt(1+d-a-m),t[3]=(p-c)/b,t[0]=(l+u)/b,t[1]=.25*b,t[2]=(h+f)/b):(b=2*Math.sqrt(1+m-a-d),t[3]=(l-u)/b,t[0]=(p+c)/b,t[1]=(h+f)/b,t[2]=.25*b),t}}();function se(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e}function ae(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}class le extends Array{constructor(e=1,t=0,n=0,i=0,r=0,o=1,s=0,a=0,l=0,c=0,u=1,d=0,h=0,p=0,f=0,m=1){return super(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(e){this[12]=e}set y(e){this[13]=e}set z(e){this[14]=e}set w(e){this[15]=e}set(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m){return e.length?this.copy(e):(function(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m,g){e[0]=t,e[1]=n,e[2]=i,e[3]=r,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c,e[9]=u,e[10]=d,e[11]=h,e[12]=p,e[13]=f,e[14]=m,e[15]=g}(this,e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,m),this)}translate(e,t=this){return function(e,t,n){let i,r,o,s,a,l,c,u,d,h,p,f,m=n[0],g=n[1],b=n[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*b+t[12],e[13]=t[1]*m+t[5]*g+t[9]*b+t[13],e[14]=t[2]*m+t[6]*g+t[10]*b+t[14],e[15]=t[3]*m+t[7]*g+t[11]*b+t[15]):(i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=t[9],p=t[10],f=t[11],e[0]=i,e[1]=r,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=h,e[10]=p,e[11]=f,e[12]=i*m+a*g+d*b+t[12],e[13]=r*m+l*g+h*b+t[13],e[14]=o*m+c*g+p*b+t[14],e[15]=s*m+u*g+f*b+t[15])}(this,t,e),this}rotate(e,t,n=this){return function(e,t,n,i){let r,o,s,a,l,c,u,d,h,p,f,m,g,b,y,v,x,w,_,k,E,S,A,C,M=i[0],N=i[1],T=i[2],O=Math.hypot(M,N,T);Math.abs(O)<1e-6||(O=1/O,M*=O,N*=O,T*=O,r=Math.sin(n),o=Math.cos(n),s=1-o,a=t[0],l=t[1],c=t[2],u=t[3],d=t[4],h=t[5],p=t[6],f=t[7],m=t[8],g=t[9],b=t[10],y=t[11],v=M*M*s+o,x=N*M*s+T*r,w=T*M*s-N*r,_=M*N*s-T*r,k=N*N*s+o,E=T*N*s+M*r,S=M*T*s+N*r,A=N*T*s-M*r,C=T*T*s+o,e[0]=a*v+d*x+m*w,e[1]=l*v+h*x+g*w,e[2]=c*v+p*x+b*w,e[3]=u*v+f*x+y*w,e[4]=a*_+d*k+m*E,e[5]=l*_+h*k+g*E,e[6]=c*_+p*k+b*E,e[7]=u*_+f*k+y*E,e[8]=a*S+d*A+m*C,e[9]=l*S+h*A+g*C,e[10]=c*S+p*A+b*C,e[11]=u*S+f*A+y*C,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]))}(this,n,e,t),this}scale(e,t=this){return function(e,t,n){let i=n[0],r=n[1],o=n[2];e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]}(this,t,"number"==typeof e?[e,e,e]:e),this}add(e,t){return t?se(this,e,t):se(this,this,e),this}sub(e,t){return t?ae(this,e,t):ae(this,this,e),this}multiply(e,t){var n,i,r;return e.length?t?ie(this,e,t):ie(this,this,e):(i=this,r=e,(n=this)[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=i[3]*r,n[4]=i[4]*r,n[5]=i[5]*r,n[6]=i[6]*r,n[7]=i[7]*r,n[8]=i[8]*r,n[9]=i[9]*r,n[10]=i[10]*r,n[11]=i[11]*r,n[12]=i[12]*r,n[13]=i[13]*r,n[14]=i[14]*r,n[15]=i[15]*r),this}identity(){var e;return(e=this)[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}copy(e){var t,n;return n=e,(t=this)[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}fromPerspective({fov:e,aspect:t,near:n,far:i}={}){return function(e,t,n,i,r){let o=1/Math.tan(t/2),s=1/(i-r);e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+i)*s,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*i*s,e[15]=0}(this,e,t,n,i),this}fromOrthogonal({left:e,right:t,bottom:n,top:i,near:r,far:o}){return function(e,t,n,i,r,o,s){let a=1/(t-n),l=1/(i-r),c=1/(o-s);e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*a,e[13]=(r+i)*l,e[14]=(s+o)*c,e[15]=1}(this,e,t,n,i,r,o),this}fromQuaternion(e){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,d=i*a,h=r*s,p=r*a,f=r*l,m=o*s,g=o*a,b=o*l;e[0]=1-d-f,e[1]=u+b,e[2]=h-g,e[3]=0,e[4]=u-b,e[5]=1-c-f,e[6]=p+m,e[7]=0,e[8]=h+g,e[9]=p-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1}(this,e),this}setPosition(e){return this.x=e[0],this.y=e[1],this.z=e[2],this}inverse(e=this){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],p=t[11],f=t[12],m=t[13],g=t[14],b=t[15],y=n*a-i*s,v=n*l-r*s,x=n*c-o*s,w=i*l-r*a,_=i*c-o*a,k=r*c-o*l,E=u*m-d*f,S=u*g-h*f,A=u*b-p*f,C=d*g-h*m,M=d*b-p*m,N=h*b-p*g,T=y*N-v*M+x*C+w*A-_*S+k*E;T&&(T=1/T,e[0]=(a*N-l*M+c*C)*T,e[1]=(r*M-i*N-o*C)*T,e[2]=(m*k-g*_+b*w)*T,e[3]=(h*_-d*k-p*w)*T,e[4]=(l*A-s*N-c*S)*T,e[5]=(n*N-r*A+o*S)*T,e[6]=(g*x-f*k-b*v)*T,e[7]=(u*k-h*x+p*v)*T,e[8]=(s*M-a*A+c*E)*T,e[9]=(i*A-n*M-o*E)*T,e[10]=(f*_-m*x+b*y)*T,e[11]=(d*x-u*_-p*y)*T,e[12]=(a*S-s*C-l*E)*T,e[13]=(n*C-i*S+r*E)*T,e[14]=(m*v-f*w-g*y)*T,e[15]=(u*w-d*v+h*y)*T)}(this,e),this}compose(e,t,n){return function(e,t,n,i){const r=e,o=t[0],s=t[1],a=t[2],l=t[3],c=o+o,u=s+s,d=a+a,h=o*c,p=o*u,f=o*d,m=s*u,g=s*d,b=a*d,y=l*c,v=l*u,x=l*d,w=i[0],_=i[1],k=i[2];r[0]=(1-(m+b))*w,r[1]=(p+x)*w,r[2]=(f-v)*w,r[3]=0,r[4]=(p-x)*_,r[5]=(1-(h+b))*_,r[6]=(g+y)*_,r[7]=0,r[8]=(f+v)*k,r[9]=(g-y)*k,r[10]=(1-(h+m))*k,r[11]=0,r[12]=n[0],r[13]=n[1],r[14]=n[2],r[15]=1}(this,e,t,n),this}decompose(e,t,n){return function(e,t,n,i){let r=C([e[0],e[1],e[2]]);const o=C([e[4],e[5],e[6]]),s=C([e[8],e[9],e[10]]);ne(e)<0&&(r=-r),n[0]=e[12],n[1]=e[13],n[2]=e[14];const a=e.slice(),l=1/r,c=1/o,u=1/s;a[0]*=l,a[1]*=l,a[2]*=l,a[4]*=c,a[5]*=c,a[6]*=c,a[8]*=u,a[9]*=u,a[10]*=u,oe(t,a),i[0]=r,i[1]=o,i[2]=s}(this,e,t,n),this}getRotation(e){return oe(e,this),this}getTranslation(e){var t,n;return n=this,(t=e)[0]=n[12],t[1]=n[13],t[2]=n[14],this}getScaling(e){return re(e,this),this}getMaxScaleOnAxis(){return function(e){let t=e[0],n=e[1],i=e[2],r=e[4],o=e[5],s=e[6],a=e[8],l=e[9],c=e[10];const u=t*t+n*n+i*i,d=r*r+o*o+s*s,h=a*a+l*l+c*c;return Math.sqrt(Math.max(u,d,h))}(this)}lookAt(e,t,n){return function(e,t,n,i){let r=t[0],o=t[1],s=t[2],a=i[0],l=i[1],c=i[2],u=r-n[0],d=o-n[1],h=s-n[2],p=u*u+d*d+h*h;0===p?h=1:(p=1/Math.sqrt(p),u*=p,d*=p,h*=p);let f=l*h-c*d,m=c*u-a*h,g=a*d-l*u;p=f*f+m*m+g*g,0===p&&(c?a+=1e-6:l?c+=1e-6:l+=1e-6,f=l*h-c*d,m=c*u-a*h,g=a*d-l*u,p=f*f+m*m+g*g),p=1/Math.sqrt(p),f*=p,m*=p,g*=p,e[0]=f,e[1]=m,e[2]=g,e[3]=0,e[4]=d*g-h*m,e[5]=h*f-u*g,e[6]=u*m-d*f,e[7]=0,e[8]=u,e[9]=d,e[10]=h,e[11]=0,e[12]=r,e[13]=o,e[14]=s,e[15]=1}(this,e,t,n),this}determinant(){return ne(this)}fromArray(e,t=0){return this[0]=e[t],this[1]=e[t+1],this[2]=e[t+2],this[3]=e[t+3],this[4]=e[t+4],this[5]=e[t+5],this[6]=e[t+6],this[7]=e[t+7],this[8]=e[t+8],this[9]=e[t+9],this[10]=e[t+10],this[11]=e[t+11],this[12]=e[t+12],this[13]=e[t+13],this[14]=e[t+14],this[15]=e[t+15],this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e[t+3]=this[3],e[t+4]=this[4],e[t+5]=this[5],e[t+6]=this[6],e[t+7]=this[7],e[t+8]=this[8],e[t+9]=this[9],e[t+10]=this[10],e[t+11]=this[11],e[t+12]=this[12],e[t+13]=this[13],e[t+14]=this[14],e[t+15]=this[15],e}}const ce=new le;class ue extends Array{constructor(e=0,t=e,n=e,i="YXZ"){super(e,t,n),this.order=i,this.onChange=()=>{},this._target=this;const r=["0","1","2"];return new Proxy(this,{set(e,t){const n=Reflect.set(...arguments);return n&&r.includes(t)&&e.onChange(),n}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set(e,t=e,n=e){return e.length?this.copy(e):(this._target[0]=e,this._target[1]=t,this._target[2]=n,this.onChange(),this)}copy(e){return this._target[0]=e[0],this._target[1]=e[1],this._target[2]=e[2],this.onChange(),this}reorder(e){return this._target.order=e,this.onChange(),this}fromRotationMatrix(e,t=this.order){return function(e,t,n="YXZ"){"XYZ"===n?(e[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(e[0]=Math.atan2(-t[9],t[10]),e[2]=Math.atan2(-t[4],t[0])):(e[0]=Math.atan2(t[6],t[5]),e[2]=0)):"YXZ"===n?(e[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(e[1]=Math.atan2(t[8],t[10]),e[2]=Math.atan2(t[1],t[5])):(e[1]=Math.atan2(-t[2],t[0]),e[2]=0)):"ZXY"===n?(e[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(e[1]=Math.atan2(-t[2],t[10]),e[2]=Math.atan2(-t[4],t[5])):(e[1]=0,e[2]=Math.atan2(t[1],t[0]))):"ZYX"===n?(e[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(e[0]=Math.atan2(t[6],t[10]),e[2]=Math.atan2(t[1],t[0])):(e[0]=0,e[2]=Math.atan2(-t[4],t[5]))):"YZX"===n?(e[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(e[0]=Math.atan2(-t[9],t[5]),e[1]=Math.atan2(-t[2],t[0])):(e[0]=0,e[1]=Math.atan2(t[8],t[10]))):"XZY"===n&&(e[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(e[0]=Math.atan2(t[6],t[5]),e[1]=Math.atan2(t[8],t[0])):(e[0]=Math.atan2(-t[9],t[10]),e[1]=0))}(this._target,e,t),this.onChange(),this}fromQuaternion(e,t=this.order,n){return ce.fromQuaternion(e),this._target.fromRotationMatrix(ce,t),n||this.onChange(),this}fromArray(e,t=0){return this._target[0]=e[t],this._target[1]=e[t+1],this._target[2]=e[t+2],this}toArray(e=[],t=0){return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e}}class de{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new le,this.worldMatrix=new le,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new F,this.quaternion=new te,this.scale=new F(1),this.rotation=new ue,this.up=new F(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(e,t=!0){this.parent&&e!==this.parent&&this.parent.removeChild(this,!1),this.parent=e,t&&e&&e.addChild(this,!1)}addChild(e,t=!0){~this.children.indexOf(e)||this.children.push(e),t&&e.setParent(this,!1)}removeChild(e,t=!0){~this.children.indexOf(e)&&this.children.splice(this.children.indexOf(e),1),t&&e.setParent(null,!1)}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||e)&&(null===this.parent?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,e=!0);for(let t=0,n=this.children.length;t<n;t++)this.children[t].updateMatrixWorld(e)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(e){if(!e(this))for(let t=0,n=this.children.length;t<n;t++)this.children[t].traverse(e)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(e,t=!1){t?this.matrix.lookAt(this.position,e,this.up):this.matrix.lookAt(e,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function he(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=n[0],p=n[1],f=n[2],m=n[3],g=n[4],b=n[5],y=n[6],v=n[7],x=n[8];return e[0]=h*i+p*s+f*c,e[1]=h*r+p*a+f*u,e[2]=h*o+p*l+f*d,e[3]=m*i+g*s+b*c,e[4]=m*r+g*a+b*u,e[5]=m*o+g*l+b*d,e[6]=y*i+v*s+x*c,e[7]=y*r+v*a+x*u,e[8]=y*o+v*l+x*d,e}class pe extends Array{constructor(e=1,t=0,n=0,i=0,r=1,o=0,s=0,a=0,l=1){return super(e,t,n,i,r,o,s,a,l),this}set(e,t,n,i,r,o,s,a,l){return e.length?this.copy(e):(function(e,t,n,i,r,o,s,a,l,c){e[0]=t,e[1]=n,e[2]=i,e[3]=r,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c}(this,e,t,n,i,r,o,s,a,l),this)}translate(e,t=this){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=n[0],p=n[1];e[0]=i,e[1]=r,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=h*i+p*s+c,e[7]=h*r+p*a+u,e[8]=h*o+p*l+d}(this,t,e),this}rotate(e,t=this){return function(e,t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=Math.sin(n),p=Math.cos(n);e[0]=p*i+h*s,e[1]=p*r+h*a,e[2]=p*o+h*l,e[3]=p*s-h*i,e[4]=p*a-h*r,e[5]=p*l-h*o,e[6]=c,e[7]=u,e[8]=d}(this,t,e),this}scale(e,t=this){return function(e,t,n){let i=n[0],r=n[1];e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8]}(this,t,e),this}multiply(e,t){return t?he(this,e,t):he(this,this,e),this}identity(){var e;return(e=this)[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,this}copy(e){var t,n;return n=e,(t=this)[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}fromMatrix4(e){var t,n;return n=e,(t=this)[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],this}fromQuaternion(e){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,d=i*a,h=r*s,p=r*a,f=r*l,m=o*s,g=o*a,b=o*l;e[0]=1-d-f,e[3]=u-b,e[6]=h+g,e[1]=u+b,e[4]=1-c-f,e[7]=p-m,e[2]=h-g,e[5]=p+m,e[8]=1-c-d}(this,e),this}fromBasis(e,t,n){return this.set(e[0],e[1],e[2],t[0],t[1],t[2],n[0],n[1],n[2]),this}inverse(e=this){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=u*s-a*c,h=-u*o+a*l,p=c*o-s*l,f=n*d+i*h+r*p;f&&(f=1/f,e[0]=d*f,e[1]=(-u*i+r*c)*f,e[2]=(a*i-r*s)*f,e[3]=h*f,e[4]=(u*n-r*l)*f,e[5]=(-a*n+r*o)*f,e[6]=p*f,e[7]=(-c*n+i*l)*f,e[8]=(s*n-i*o)*f)}(this,e),this}getNormalMatrix(e){return function(e,t){let n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=t[9],h=t[10],p=t[11],f=t[12],m=t[13],g=t[14],b=t[15],y=n*a-i*s,v=n*l-r*s,x=n*c-o*s,w=i*l-r*a,_=i*c-o*a,k=r*c-o*l,E=u*m-d*f,S=u*g-h*f,A=u*b-p*f,C=d*g-h*m,M=d*b-p*m,N=h*b-p*g,T=y*N-v*M+x*C+w*A-_*S+k*E;T&&(T=1/T,e[0]=(a*N-l*M+c*C)*T,e[1]=(l*A-s*N-c*S)*T,e[2]=(s*M-a*A+c*E)*T,e[3]=(r*M-i*N-o*C)*T,e[4]=(n*N-r*A+o*S)*T,e[5]=(i*A-n*M-o*E)*T,e[6]=(m*k-g*_+b*w)*T,e[7]=(g*x-f*k-b*v)*T,e[8]=(f*_-m*x+b*y)*T)}(this,e),this}}let fe=0;class me extends de{constructor(e,{geometry:t,program:n,mode:i=e.TRIANGLES,frustumCulled:r=!0,renderOrder:o=0}={}){super(),e.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=e,this.id=fe++,this.geometry=t,this.program=n,this.mode=i,this.frustumCulled=r,this.renderOrder=o,this.modelViewMatrix=new le,this.normalMatrix=new pe,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(e){return this.beforeRenderCallbacks.push(e),this}onAfterRender(e){return this.afterRenderCallbacks.push(e),this}draw({camera:e}={}){e&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=e.projectionMatrix,this.program.uniforms.cameraPosition.value=e.worldPosition,this.program.uniforms.viewMatrix.value=e.viewMatrix,this.modelViewMatrix.multiply(e.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(t=>t&&t({mesh:this,camera:e}));let t=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:t}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(t=>t&&t({mesh:this,camera:e}))}}function ge({hue:e=0,hoverIntensity:n=.2,rotateOnHover:i=!1,forceHoverState:r=!1}){const o=g(null);return d(()=>{const t=o.current;if(!t)return;const s=new j({alpha:!0,premultipliedAlpha:!1}),a=s.gl;a.clearColor(0,0,0,0),t.appendChild(a.canvas);const l=new K(a),c=new Z(a,{vertex:"\n precision highp float;\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 0.0, 1.0);\n }\n ",fragment:"\n precision highp float;\n\n uniform float iTime;\n uniform vec3 iResolution;\n uniform float hue;\n uniform float hover;\n uniform float rot;\n uniform float hoverIntensity;\n varying vec2 vUv;\n\n vec3 rgb2yiq(vec3 c) {\n float y = dot(c, vec3(0.299, 0.587, 0.114));\n float i = dot(c, vec3(0.596, -0.274, -0.322));\n float q = dot(c, vec3(0.211, -0.523, 0.312));\n return vec3(y, i, q);\n }\n \n vec3 yiq2rgb(vec3 c) {\n float r = c.x + 0.956 * c.y + 0.621 * c.z;\n float g = c.x - 0.272 * c.y - 0.647 * c.z;\n float b = c.x - 1.106 * c.y + 1.703 * c.z;\n return vec3(r, g, b);\n }\n \n vec3 adjustHue(vec3 color, float hueDeg) {\n float hueRad = hueDeg * 3.14159265 / 180.0;\n vec3 yiq = rgb2yiq(color);\n float cosA = cos(hueRad);\n float sinA = sin(hueRad);\n float i = yiq.y * cosA - yiq.z * sinA;\n float q = yiq.y * sinA + yiq.z * cosA;\n yiq.y = i;\n yiq.z = q;\n return yiq2rgb(yiq);\n }\n \n vec3 hash33(vec3 p3) {\n p3 = fract(p3 * vec3(0.1031, 0.11369, 0.13787));\n p3 += dot(p3, p3.yxz + 19.19);\n return -1.0 + 2.0 * fract(vec3(\n p3.x + p3.y,\n p3.x + p3.z,\n p3.y + p3.z\n ) * p3.zyx);\n }\n \n float snoise3(vec3 p) {\n const float K1 = 0.333333333;\n const float K2 = 0.166666667;\n vec3 i = floor(p + (p.x + p.y + p.z) * K1);\n vec3 d0 = p - (i - (i.x + i.y + i.z) * K2);\n vec3 e = step(vec3(0.0), d0 - d0.yzx);\n vec3 i1 = e * (1.0 - e.zxy);\n vec3 i2 = 1.0 - e.zxy * (1.0 - e);\n vec3 d1 = d0 - (i1 - K2);\n vec3 d2 = d0 - (i2 - K1);\n vec3 d3 = d0 - 0.5;\n vec4 h = max(0.6 - vec4(\n dot(d0, d0),\n dot(d1, d1),\n dot(d2, d2),\n dot(d3, d3)\n ), 0.0);\n vec4 n = h * h * h * h * vec4(\n dot(d0, hash33(i)),\n dot(d1, hash33(i + i1)),\n dot(d2, hash33(i + i2)),\n dot(d3, hash33(i + 1.0))\n );\n return dot(vec4(31.316), n);\n }\n \n vec4 extractAlpha(vec3 colorIn) {\n float a = max(max(colorIn.r, colorIn.g), colorIn.b);\n return vec4(colorIn.rgb / (a + 1e-5), a);\n }\n \n const vec3 baseColor1 = vec3(0.611765, 0.262745, 0.996078);\n const vec3 baseColor2 = vec3(0.298039, 0.760784, 0.913725);\n const vec3 baseColor3 = vec3(0.062745, 0.078431, 0.600000);\n const float innerRadius = 0.6;\n const float noiseScale = 0.65;\n \n float light1(float intensity, float attenuation, float dist) {\n return intensity / (1.0 + dist * attenuation);\n }\n \n float light2(float intensity, float attenuation, float dist) {\n return intensity / (1.0 + dist * dist * attenuation);\n }\n \n vec4 draw(vec2 uv) {\n vec3 color1 = adjustHue(baseColor1, hue);\n vec3 color2 = adjustHue(baseColor2, hue);\n vec3 color3 = adjustHue(baseColor3, hue);\n \n float ang = atan(uv.y, uv.x);\n float len = length(uv);\n float invLen = len > 0.0 ? 1.0 / len : 0.0;\n \n float n0 = snoise3(vec3(uv * noiseScale, iTime * 0.5)) * 0.5 + 0.5;\n float r0 = mix(mix(innerRadius, 1.0, 0.4), mix(innerRadius, 1.0, 0.6), n0);\n float d0 = distance(uv, (r0 * invLen) * uv);\n float v0 = light1(1.0, 10.0, d0);\n v0 *= smoothstep(r0 * 1.05, r0, len);\n float cl = cos(ang + iTime * 2.0) * 0.5 + 0.5;\n \n float a = iTime * -1.0;\n vec2 pos = vec2(cos(a), sin(a)) * r0;\n float d = distance(uv, pos);\n float v1 = light2(1.5, 5.0, d);\n v1 *= light1(1.0, 50.0, d0);\n \n float v2 = smoothstep(1.0, mix(innerRadius, 1.0, n0 * 0.5), len);\n float v3 = smoothstep(innerRadius, mix(innerRadius, 1.0, 0.5), len);\n \n vec3 col = mix(color1, color2, cl);\n col = mix(color3, col, v0);\n col = (col + v1) * v2 * v3;\n col = clamp(col, 0.0, 1.0);\n \n return extractAlpha(col);\n }\n \n vec4 mainImage(vec2 fragCoord) {\n vec2 center = iResolution.xy * 0.5;\n float size = min(iResolution.x, iResolution.y);\n vec2 uv = (fragCoord - center) / size * 2.0;\n \n float angle = rot;\n float s = sin(angle);\n float c = cos(angle);\n uv = vec2(c * uv.x - s * uv.y, s * uv.x + c * uv.y);\n \n uv.x += hover * hoverIntensity * 0.1 * sin(uv.y * 10.0 + iTime);\n uv.y += hover * hoverIntensity * 0.1 * sin(uv.x * 10.0 + iTime);\n \n return draw(uv);\n }\n \n void main() {\n vec2 fragCoord = vUv * iResolution.xy;\n vec4 col = mainImage(fragCoord);\n gl_FragColor = vec4(col.rgb * col.a, col.a);\n }\n ",uniforms:{iTime:{value:0},iResolution:{value:new F(a.canvas.width,a.canvas.height,a.canvas.width/a.canvas.height)},hue:{value:e},hover:{value:0},rot:{value:0},hoverIntensity:{value:n}}}),u=new me(a,{geometry:l,program:c});function d(){if(!t)return;const e=window.devicePixelRatio||1,n=t.clientWidth,i=t.clientHeight,r=Math.min(n,i);s.setSize(r*e,r*e),a.canvas.style.width=r+"px",a.canvas.style.height=r+"px",a.canvas.style.display="block",a.canvas.style.objectFit="contain",c.uniforms.iResolution.value.set(r*e,r*e,r*e/(r*e))}window.addEventListener("resize",d),d();let h=0,p=0,f=0;const m=e=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,r=e.clientY-n.top,o=n.width,s=n.height,a=Math.min(o,s),l=(i-o/2)/a*2,c=(r-s/2)/a*2;h=Math.sqrt(l*l+c*c)<.8?1:0},g=()=>{h=0};let b;t.addEventListener("mousemove",m),t.addEventListener("mouseleave",g);const y=t=>{b=requestAnimationFrame(y);const o=.001*(t-p);p=t,c.uniforms.iTime.value=.001*t,c.uniforms.hue.value=e,c.uniforms.hoverIntensity.value=n;const a=r?1:h;c.uniforms.hover.value+=.1*(a-c.uniforms.hover.value),i&&a>.5&&(f+=.3*o),c.uniforms.rot.value=f,s.render({scene:u})};return b=requestAnimationFrame(y),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",d),t.removeEventListener("mousemove",m),t.removeEventListener("mouseleave",g),t.removeChild(a.canvas),a.getExtension("WEBGL_lose_context")?.loseContext()}},[e,n,i,r]),t("div",{ref:o,className:"orb-container"})}function be(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy((...t)=>e(...t),{get:(n,i)=>"create"===i?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function ye(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const ve=e=>Array.isArray(e);function xe(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function we(e){return"string"==typeof e||Array.isArray(e)}function _e(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ke(e,t,n,i){if("function"==typeof t){const[r,o]=_e(i);t=t(void 0!==n?n:e.custom,r,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[r,o]=_e(i);t=t(void 0!==n?n:e.custom,r,o)}return t}function Ee(e,t,n){const i=e.getProps();return ke(i,t,void 0!==n?n:i.custom,e)}const Se=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ae=["initial",...Se];function Ce(e){let t;return()=>(void 0===t&&(t=e()),t)}const Me=Ce(()=>void 0!==window.ScrollTimeline);class Ne{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map(n=>Me()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0);return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Te extends Ne{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function Oe(e,t){return e?e[t]||e.default||e:void 0}const De=2e4;function Ie(e){let t=0,n=e.next(t);for(;!n.done&&t<De;)t+=50,n=e.next(t);return t>=De?1/0:t}function Re(e){return"function"==typeof e}function Pe(e,t){e.timeline=t,e.onfinish=null}const Le=e=>Array.isArray(e)&&"number"==typeof e[0],Fe={linearEasing:void 0};function Be(e,t){const n=Ce(e);return()=>{var e;return null!==(e=Fe[t])&&void 0!==e?e:n()}}const ze=Be(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),je=(e,t,n)=>{const i=t-e;return 0===i?1:(n-e)/i},Ue=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let t=0;t<r;t++)i+=e(je(0,r-1,t))+", ";return`linear(${i.substring(0,i.length-2)})`};function Ve(e){return Boolean("function"==typeof e&&ze()||!e||"string"==typeof e&&(e in He||ze())||Le(e)||Array.isArray(e)&&e.every(Ve))}const $e=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,He={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$e([0,.65,.55,1]),circOut:$e([.55,0,1,.45]),backIn:$e([.31,.01,.66,-.59]),backOut:$e([.33,1.53,.69,.99])};function qe(e,t){return e?"function"==typeof e&&ze()?Ue(e,t):Le(e)?$e(e):Array.isArray(e)?e.map(e=>qe(e,t)||He.easeOut):He[e]:void 0}const Ke={x:!1,y:!1};function Ge(){return Ke.x||Ke.y}function We(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}function Ze(e){return t=>{"touch"===t.pointerType||Ge()||e(t)}}const Xe=(e,t)=>!!t&&(e===t||Xe(e,t.parentElement)),Ye=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Qe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),Je=new WeakSet;function et(e){return t=>{"Enter"===t.key&&e(t)}}function tt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function nt(e){return Ye(e)&&!Ge()}const it=e=>1e3*e,rt=e=>e/1e3,ot=e=>e,st=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],at=new Set(st),lt=new Set(["width","height","top","left","right","bottom",...st]),ct=e=>ve(e)?e[e.length-1]||0:e,ut=["read","resolveKeyframes","update","preRender","render","postRender"];function dt(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=ut.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,r=!1,s=!1)=>{const a=s&&i?t:n;return r&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,i?r=!0:(i=!0,[t,n]=[n,t],t.forEach(a),t.clear(),i=!1,r&&(r=!1,l.process(e)))}};return l}(o),e),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,p=()=>{const o=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1),r.timestamp=o,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),h.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(p))};return{schedule:ut.reduce((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(p)),a.schedule(t,o,s)),t},{}),cancel:e=>{for(let t=0;t<ut.length;t++)s[ut[t]].cancel(e)},state:r,steps:s}}const{schedule:ht,cancel:pt,state:ft,steps:mt}=dt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ot,!0);let gt;function bt(){gt=void 0}const yt={now:()=>(void 0===gt&&yt.set(ft.isProcessing?ft.timestamp:performance.now()),gt),set:e=>{gt=e,queueMicrotask(bt)}};function vt(e,t){-1===e.indexOf(t)&&e.push(t)}function xt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class wt{constructor(){this.subscriptions=[]}add(e){return vt(this.subscriptions,e),()=>xt(this.subscriptions,e)}notify(e,t,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function _t(e,t){return t?e*(1e3/t):0}const kt={current:void 0};class Et{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=yt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=yt.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new wt);const n=this.events[e].add(t);return"change"===e?()=>{n(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return kt.current&&kt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=yt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return _t(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function St(e,t){return new Et(e,t)}function At(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,St(n))}const Ct=e=>Boolean(e&&e.getVelocity);function Mt(e,t){const n=e.getValue("willChange");if(i=n,Boolean(Ct(i)&&i.add))return n.add(t);var i}const Nt=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Tt="data-"+Nt("framerAppearId");function Ot(e){return e.props[Tt]}const Dt=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function It(e,t,n,i){if(e===t&&n===i)return ot;return r=>0===r||1===r?r:Dt(function(e,t,n,i,r){let o,s,a=0;do{s=t+(n-t)/2,o=Dt(s,i,r)-e,o>0?n=s:t=s}while(Math.abs(o)>1e-7&&++a<12);return s}(r,0,1,e,n),t,i)}const Rt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Pt=e=>t=>1-e(1-t),Lt=It(.33,1.53,.69,.99),Ft=Pt(Lt),Bt=Rt(Ft),zt=e=>(e*=2)<1?.5*Ft(e):.5*(2-Math.pow(2,-10*(e-1))),jt=e=>1-Math.sin(Math.acos(e)),Ut=Pt(jt),Vt=Rt(jt),$t=e=>/^0[^.\s]+$/u.test(e);function Ht(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||$t(e)}const qt=(e,t,n)=>n>t?t:n<e?e:n,Kt={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Gt={...Kt,transform:e=>qt(0,1,e)},Wt={...Kt,default:1},Zt=e=>Math.round(1e5*e)/1e5,Xt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Yt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qt=(e,t)=>n=>Boolean("string"==typeof n&&Yt.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jt=(e,t,n)=>i=>{if("string"!=typeof i)return i;const[r,o,s,a]=i.match(Xt);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},en={...Kt,transform:e=>Math.round((e=>qt(0,255,e))(e))},tn={test:Qt("rgb","red"),parse:Jt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+en.transform(e)+", "+en.transform(t)+", "+en.transform(n)+", "+Zt(Gt.transform(i))+")"},nn={test:Qt("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:tn.transform},rn=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),on=rn("deg"),sn=rn("%"),an=rn("px"),ln=rn("vh"),cn=rn("vw"),un={...sn,parse:e=>sn.parse(e)/100,transform:e=>sn.transform(100*e)},dn={test:Qt("hsl","hue"),parse:Jt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+sn.transform(Zt(t))+", "+sn.transform(Zt(n))+", "+Zt(Gt.transform(i))+")"},hn={test:e=>tn.test(e)||nn.test(e)||dn.test(e),parse:e=>tn.test(e)?tn.parse(e):dn.test(e)?dn.parse(e):nn.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?tn.transform(e):dn.transform(e)},pn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,fn="number",mn="color",gn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function bn(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const s=t.replace(gn,e=>(hn.test(e)?(i.color.push(o),r.push(mn),n.push(hn.parse(e))):e.startsWith("var(")?(i.var.push(o),r.push("var"),n.push(e)):(i.number.push(o),r.push(fn),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:s,indexes:i,types:r}}function yn(e){return bn(e).values}function vn(e){const{split:t,types:n}=bn(e),i=t.length;return e=>{let r="";for(let o=0;o<i;o++)if(r+=t[o],void 0!==e[o]){const t=n[o];r+=t===fn?Zt(e[o]):t===mn?hn.transform(e[o]):e[o]}return r}}const xn=e=>"number"==typeof e?0:e,wn={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Xt))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(pn))||void 0===n?void 0:n.length)||0)>0},parse:yn,createTransformer:vn,getAnimatableNone:function(e){const t=yn(e);return vn(e)(t.map(xn))}},_n=new Set(["brightness","contrast","saturate","opacity"]);function kn(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[i]=n.match(Xt)||[];if(!i)return e;const r=n.replace(i,"");let o=_n.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const En=/\b([a-z-]*)\(.*?\)/gu,Sn={...wn,getAnimatableNone:e=>{const t=e.match(En);return t?t.map(kn).join(" "):e}},An={borderWidth:an,borderTopWidth:an,borderRightWidth:an,borderBottomWidth:an,borderLeftWidth:an,borderRadius:an,radius:an,borderTopLeftRadius:an,borderTopRightRadius:an,borderBottomRightRadius:an,borderBottomLeftRadius:an,width:an,maxWidth:an,height:an,maxHeight:an,top:an,right:an,bottom:an,left:an,padding:an,paddingTop:an,paddingRight:an,paddingBottom:an,paddingLeft:an,margin:an,marginTop:an,marginRight:an,marginBottom:an,marginLeft:an,backgroundPositionX:an,backgroundPositionY:an},Cn={rotate:on,rotateX:on,rotateY:on,rotateZ:on,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:on,skewX:on,skewY:on,distance:an,translateX:an,translateY:an,translateZ:an,x:an,y:an,z:an,perspective:an,transformPerspective:an,opacity:Gt,originX:un,originY:un,originZ:an},Mn={...Kt,transform:Math.round},Nn={...An,...Cn,zIndex:Mn,size:an,fillOpacity:Gt,strokeOpacity:Gt,numOctaves:Mn},Tn={...Nn,color:hn,backgroundColor:hn,outlineColor:hn,fill:hn,stroke:hn,borderColor:hn,borderTopColor:hn,borderRightColor:hn,borderBottomColor:hn,borderLeftColor:hn,filter:Sn,WebkitFilter:Sn},On=e=>Tn[e];function Dn(e,t){let n=On(e);return n!==Sn&&(n=wn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const In=new Set(["auto","none","0"]),Rn=e=>e===Kt||e===an,Pn=(e,t)=>parseFloat(e.split(", ")[t]),Ln=(e,t)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Pn(r[1],t);{const t=i.match(/^matrix\((.+)\)$/u);return t?Pn(t[1],e):0}},Fn=new Set(["x","y","z"]),Bn=st.filter(e=>!Fn.has(e)),zn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ln(4,13),y:Ln(5,14)};zn.translateX=zn.x,zn.translateY=zn.y;const jn=new Set;let Un=!1,Vn=!1;function $n(){if(Vn){const e=Array.from(jn).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Bn.forEach(n=>{const i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var i;null===(i=e.getValue(t))||void 0===i||i.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Vn=!1,Un=!1,jn.forEach(e=>e.complete()),jn.clear()}function Hn(){jn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vn=!0)})}class qn{constructor(e,t,n,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(jn.add(this),Un||(Un=!0,ht.read(Hn),ht.resolveKeyframes($n))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;for(let r=0;r<e.length;r++)if(null===e[r])if(0===r){const r=null==i?void 0:i.get(),o=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){const i=n.readValue(t,o);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=o),i&&void 0===r&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),jn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,jn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let Kn=ot,Gn=ot;const Wn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Zn=e=>t=>"string"==typeof t&&t.startsWith(e),Xn=Zn("--"),Yn=Zn("var(--"),Qn=e=>!!Yn(e)&&Jn.test(e.split("/*")[0].trim()),Jn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ei=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ti(e,t,n=1){Gn(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[i,r]=function(e){const t=ei.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${null!=n?n:i}`,r]}(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const e=o.trim();return Wn(e)?parseFloat(e):e}return Qn(r)?ti(r,t,n+1):r}const ni=e=>t=>t.test(e),ii=[Kt,an,sn,on,cn,ln,{test:e=>"auto"===e,parse:e=>e}],ri=e=>ii.find(ni(e));class oi extends qn{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&(i=i.trim(),Qn(i))){const r=ti(i,t.current);void 0!==r&&(e[n]=r),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!lt.has(n)||2!==e.length)return;const[i,r]=e,o=ri(i),s=ri(r);if(o!==s)if(Rn(o)&&Rn(s))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)Ht(e[t])&&n.push(t);n.length&&function(e,t,n){let i,r=0;for(;r<e.length&&!i;){const t=e[r];"string"==typeof t&&!In.has(t)&&bn(t).values.length&&(i=e[r]),r++}if(i&&n)for(const r of t)e[r]=Dn(n,i)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=zn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=zn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const si=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!wn.test(e)&&"0"!==e||e.startsWith("url(")));function ai(e,t,n,i){const r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=si(r,t),a=si(o,t);return Kn(s===a,`You are trying to animate ${t} from "${r}" to "${o}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${o} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Re(n))&&i)}const li=e=>null!==e;function ci(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(li),o=t&&"loop"!==n&&t%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}class ui{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=yt.now(),this.options={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Hn(),$n()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=yt.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!ai(e,n,i,r)){if(!o)return a&&a(ci(e,this.options,t)),s&&s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const di=(e,t,n)=>e+(t-e)*n;function hi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pi(e,t){return n=>n>0?t:e}const fi=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},mi=[nn,tn,dn];function gi(e){const t=(n=e,mi.find(e=>e.test(n)));var n;if(Kn(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let i=t.parse(e);return t===dn&&(i=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,n/=100;let r=0,o=0,s=0;if(t/=100){const i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;r=hi(a,i,e+1/3),o=hi(a,i,e),s=hi(a,i,e-1/3)}else r=o=s=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*s),alpha:i}}(i)),i}const bi=(e,t)=>{const n=gi(e),i=gi(t);if(!n||!i)return pi(e,t);const r={...n};return e=>(r.red=fi(n.red,i.red,e),r.green=fi(n.green,i.green,e),r.blue=fi(n.blue,i.blue,e),r.alpha=di(n.alpha,i.alpha,e),tn.transform(r))},yi=(e,t)=>n=>t(e(n)),vi=(...e)=>e.reduce(yi),xi=new Set(["none","hidden"]);function wi(e,t){return n=>di(e,t,n)}function _i(e){return"number"==typeof e?wi:"string"==typeof e?Qn(e)?pi:hn.test(e)?bi:Si:Array.isArray(e)?ki:"object"==typeof e?hn.test(e)?bi:Ei:pi}function ki(e,t){const n=[...e],i=n.length,r=e.map((e,n)=>_i(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function Ei(e,t){const n={...e,...t},i={};for(const r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=_i(e[r])(e[r],t[r]));return e=>{for(const t in i)n[t]=i[t](e);return n}}const Si=(e,t)=>{const n=wn.createTransformer(t),i=bn(e),r=bn(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?xi.has(e)&&!r.values.length||xi.has(t)&&!i.values.length?function(e,t){return xi.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):vi(ki(function(e,t){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;i[o]=l,r[s]++}return i}(i,r),r.values),n):(Kn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),pi(e,t))};function Ai(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?di(e,t,n):_i(e)(e,t)}function Ci(e,t,n){const i=Math.max(t-5,0);return _t(n-e(i),t-i)}const Mi=.01,Ni=2,Ti=.005,Oi=.5;const Di=12;function Ii(e,t){return e*Math.sqrt(1-t*t)}const Ri=["duration","bounce"],Pi=["stiffness","damping","mass"];function Li(e,t){return t.some(t=>void 0!==e[t])}function Fi(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Li(e,Pi)&&Li(e,Ri))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*qt(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:1,stiffness:r,damping:o}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let r,o;Kn(e<=it(10),"Spring duration must be 10 seconds or less");let s=1-t;s=qt(.05,1,s),e=qt(.01,10,rt(e)),s<1?(r=t=>{const i=t*s,r=i*e;return.001-(i-n)/Ii(t,s)*Math.exp(-r)},o=t=>{const i=t*s*e,o=i*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-i),c=Ii(Math.pow(t,2),s);return(.001-r(t)>0?-1:1)*((o-a)*l)/c}):(r=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let i=n;for(let n=1;n<Di;n++)i-=e(i)/t(i);return i}(r,o,5/e);if(e=it(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-rt(n.velocity||0)}),f=h||0,m=c/(2*Math.sqrt(l*u)),g=s-o,b=rt(Math.sqrt(l/u)),y=Math.abs(g)<5;let v;if(i||(i=y?Mi:Ni),r||(r=y?Ti:Oi),m<1){const e=Ii(b,m);v=t=>{const n=Math.exp(-m*b*t);return s-n*((f+m*b*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)v=e=>s-Math.exp(-b*e)*(g+(f+b*g)*e);else{const e=b*Math.sqrt(m*m-1);v=t=>{const n=Math.exp(-m*b*t),i=Math.min(e*t,300);return s-n*((f+m*b*g)*Math.sinh(i)+e*g*Math.cosh(i))/e}}const x={calculatedDuration:p&&d||null,next:e=>{const t=v(e);if(p)a.done=e>=d;else{let n=0;m<1&&(n=0===e?it(f):Ci(v,e,t));const o=Math.abs(n)<=i,l=Math.abs(s-t)<=r;a.done=o&&l}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(Ie(x),De),t=Ue(t=>x.next(e*t).value,e,30);return e+"ms "+t}};return x}function Bi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,g=void 0===s?m:s(m);g!==m&&(f=g-d);const b=e=>-f*Math.exp(-e/i),y=e=>g+b(e),v=e=>{const t=b(e),n=y(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let x,w;const _=e=>{var t;t=h.value,(void 0!==a&&t<a||void 0!==l&&t>l)&&(x=e,w=Fi({keyframes:[h.value,p(h.value)],velocity:Ci(y,e,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,v(e),_(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&v(e),h)}}}const zi=It(.42,0,1,1),ji=It(0,0,.58,1),Ui=It(.42,0,.58,1),Vi={linear:ot,easeIn:zi,easeInOut:Ui,easeOut:ji,circIn:jt,circInOut:Vt,circOut:Ut,backIn:Ft,backInOut:Bt,backOut:Lt,anticipate:zt},$i=e=>{if(Le(e)){Gn(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,i,r]=e;return It(t,n,i,r)}return"string"==typeof e?(Gn(void 0!==Vi[e],`Invalid easing type '${e}'`),Vi[e]):e};function Hi({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=(e=>Array.isArray(e)&&"number"!=typeof e[0])(i)?i.map($i):$i(i),o={done:!1,value:t[0]},s=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=je(0,t,i);e.push(di(n,1,r))}}(t,e.length-1),t}(t),e),a=function(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(Gn(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const i=[],r=n||Ai,o=e.length-1;for(let n=0;n<o;n++){let o=r(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||ot:t;o=vi(e,o)}i.push(o)}return i}(t,i,r),l=a.length,c=n=>{if(s&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);const r=je(e[i],e[i+1],n);return a[i](r)};return n?t=>c(qt(e[0],e[o-1],t)):c}(s,t,{ease:Array.isArray(r)?r:(l=t,c=r,l.map(()=>c||Ui).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}const qi=e=>{const t=({timestamp:t})=>e(t);return{start:()=>ht.update(t,!0),stop:()=>pt(t),now:()=>ft.isProcessing?ft.timestamp:yt.now()}},Ki={decay:Bi,inertia:Bi,tween:Hi,keyframes:Hi,spring:Fi},Gi=e=>e/100;class Wi extends ui{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:i,keyframes:r}=this.options,o=(null==i?void 0:i.KeyframeResolver)||qn;this.resolver=new o(r,(e,t)=>this.onKeyframesResolved(e,t),t,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,s=Re(t)?t:Ki[t]||Hi;let a,l;s!==Hi&&"number"!=typeof e[0]&&(a=vi(Gi,Ai(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===r&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=Ie(c));const{calculatedDuration:u}=c,d=u+i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-i}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return r.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),b=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,v=r;if(h){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1),Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/u)):"mirror"===p&&(v=o)),y=qt(0,1,n)*u}const x=b?{done:!1,value:a[0]}:v.next(y);s&&(x.value=s(x.value));let{done:w}=x;b||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return _&&void 0!==i&&(x.value=ci(a,this.options,i)),m&&m(x.value),_&&this.finish(),x}get duration(){const{resolved:e}=this;return e?rt(e.calculatedDuration):0}get time(){return rt(this.currentTime)}set time(e){e=it(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=rt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=qi,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Zi=new Set(["opacity","clipPath","filter","transform"]),Xi=Ce(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Yi={anticipate:zt,backInOut:Bt,circInOut:Vt};class Qi extends ui{constructor(e){super(e);const{name:t,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new oi(r,(e,t)=>this.onKeyframesResolved(e,t),t,n,i),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:i,ease:r,type:o,motionValue:s,name:a,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;var c;if("string"==typeof r&&ze()&&r in Yi&&(r=Yi[r]),Re((c=this.options).type)||"spring"===c.type||!Ve(c.ease)){const{onComplete:t,onUpdate:s,motionValue:a,element:l,...c}=this.options,u=function(e,t){const n=new Wi({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:e[0]};const r=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),r.push(i.value),o+=10;return{times:void 0,keyframes:r,duration:o-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,i=u.times,r=u.ease,o="keyframes"}const u=function(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=qe(a,r);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(s.owner.current,a,e,{...this.options,duration:n,times:i,ease:r});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(Pe(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(ci(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:i,type:o,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return rt(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return rt(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=it(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return ot;const{animation:n}=t;Pe(n,e)}else this.pendingTimeline=e;return ot}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:i,type:r,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,u=new Wi({...c,keyframes:n,duration:i,type:r,ease:o,times:s,isGenerator:!0}),d=it(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return Xi()&&n&&Zi.has(n)&&!a&&!l&&!i&&"mirror"!==r&&0!==o&&"inertia"!==s}}const Ji={type:"spring",stiffness:500,damping:25,restSpeed:10},er={type:"keyframes",duration:.8},tr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nr=(e,{keyframes:t})=>t.length>2?er:at.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Ji:tr,ir=(e,t,n,i={},r,o)=>s=>{const a=Oe(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=it(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};(function({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...nr(e,u)}),u.duration&&(u.duration=it(u.duration)),u.repeatDelay&&(u.repeatDelay=it(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!o&&void 0!==t.get()){const e=ci(u.keyframes,a);if(void 0!==e)return ht.update(()=>{u.onUpdate(e),u.onComplete()}),new Te([])}return!o&&Qi.supports(u)?new Qi(u):new Wi(u)};function rr({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}function or(e,t,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;i&&(s=i);const c=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const t in l){const i=e.getValue(t,null!==(o=e.latestValues[t])&&void 0!==o?o:null),r=l[t];if(void 0===r||u&&rr(u,t))continue;const a={delay:n,...Oe(s||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=Ot(e);if(n){const e=window.MotionHandoffAnimation(n,t,ht);null!==e&&(a.startTime=e,d=!0)}}Mt(e,t),i.start(ir(t,i,r,e.shouldReduceMotion&&lt.has(t)?{type:!1}:a,e,d));const h=i.animation;h&&c.push(h)}return a&&Promise.all(c).then(()=>{ht.update(()=>{a&&function(e,t){const n=Ee(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const t in o)At(e,t,ct(o[t]))}(e,a)})}),c}function sr(e,t,n={}){var i;const r=Ee(e,t,"exit"===n.type?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(or(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,i=0,r=1,o){const s=[],a=(e.variantChildren.size-1)*i,l=1===r?(e=0)=>e*i:(e=0)=>a-e*i;return Array.from(e.variantChildren).sort(ar).forEach((e,i)=>{e.notify("AnimationStart",t),s.push(sr(e,t,{...o,delay:n+l(i)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,r+i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then(()=>t())}return Promise.all([s(),a(n.delay)])}function ar(e,t){return e.sortNodePosition(t)}const lr=Ae.length;function cr(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&cr(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<lr;n++){const i=Ae[n],r=e.props[i];(we(r)||!1===r)&&(t[i]=r)}return t}const ur=[...Se].reverse(),dr=Se.length;function hr(e){let t=function(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t)){const r=t.map(t=>sr(e,t,n));i=Promise.all(r)}else if("string"==typeof t)i=sr(e,t,n);else{const r="function"==typeof t?Ee(e,t,n.custom):t;i=Promise.all(or(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=mr(),i=!0;const r=t=>(n,i)=>{var r;const o=Ee(e,i,"exit"===t?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);if(o){const{transition:e,transitionEnd:t,...i}=o;n={...n,...i,...t}}return n};function o(o){const{props:s}=e,a=cr(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<dr;t++){const h=ur[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=we(f),g=h===o?p.isActive:null;!1===g&&(d=t);let b=f===a[h]&&f!==s[h]&&m;if(b&&i&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys={...u},!p.isActive&&null===g||!f&&!p.prevProp||ye(f)||"boolean"==typeof f)continue;const y=pr(p.prevProp,f);let v=y||h===o&&p.isActive&&!b&&m||t>d&&m,x=!1;const w=Array.isArray(f)?f:[f];let _=w.reduce(r(h),{});!1===g&&(_={});const{prevResolvedValues:k={}}=p,E={...k,..._},S=t=>{v=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=_[e],n=k[e];if(u.hasOwnProperty(e))continue;let i=!1;i=ve(t)&&ve(n)?!xe(t,n):t!==n,i?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=_,p.isActive&&(u={...u,..._}),i&&e.blockInitialAnimation&&(v=!1),v&&(!b||!y||x)&&l.push(...w.map(e=>({animation:e,options:{type:h}})))}if(c.size){const t={};c.forEach(n=>{const i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=null!=i?i:null}),l.push({animation:t})}let h=Boolean(l.length);return!i||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),i=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,i){var r;if(n[t].isActive===i)return Promise.resolve();null===(r=e.variantChildren)||void 0===r||r.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,i)}),n[t].isActive=i;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=mr(),i=!0}}}function pr(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!xe(t,e)}function fr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mr(){return{animate:fr(!0),whileInView:fr(),whileHover:fr(),whileTap:fr(),whileDrag:fr(),whileFocus:fr(),exit:fr()}}class gr{constructor(e){this.isMounted=!1,this.node=e}update(){}}let br=0;const yr={animation:{Feature:class extends gr{constructor(e){super(e),e.animationState||(e.animationState=hr(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ye(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends gr{constructor(){super(...arguments),this.id=br++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function vr(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function xr(e){return{point:{x:e.pageX,y:e.pageY}}}function wr(e,t,n,i){return vr(e,t,(e=>t=>Ye(t)&&e(t,xr(t)))(n),i)}const _r=(e,t)=>Math.abs(e-t);class kr{constructor(e,t,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Ar(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=_r(e.x,t.x),i=_r(e.y,t.y);return Math.sqrt(n**2+i**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:i}=e,{timestamp:r}=ft;this.history.push({...i,timestamp:r});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Er(t,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ar("pointercancel"===e.type?this.lastMoveEventInfo:Er(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),i&&i(e,o)},!Ye(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=n,this.contextWindow=i||window;const o=Er(xr(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=ft;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Ar(o,this.history)),this.removeListeners=vi(wr(this.contextWindow,"pointermove",this.handlePointerMove),wr(this.contextWindow,"pointerup",this.handlePointerUp),wr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),pt(this.updatePoint)}}function Er(e,t){return t?{point:t(e.point)}:e}function Sr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ar({point:e},t){return{point:e,delta:Sr(e,Mr(t)),offset:Sr(e,Cr(t)),velocity:Nr(t,.1)}}function Cr(e){return e[0]}function Mr(e){return e[e.length-1]}function Nr(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=Mr(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>it(t)));)n--;if(!i)return{x:0,y:0};const o=rt(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Tr(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Or(e){return e.max-e.min}function Dr(e,t,n,i=.5){e.origin=i,e.originPoint=di(t.min,t.max,e.origin),e.scale=Or(n)/Or(t),e.translate=di(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Ir(e,t,n,i){Dr(e.x,t.x,n.x,i?i.originX:void 0),Dr(e.y,t.y,n.y,i?i.originY:void 0)}function Rr(e,t,n){e.min=n.min+t.min,e.max=e.min+Or(t)}function Pr(e,t,n){e.min=t.min-n.min,e.max=e.min+Or(t)}function Lr(e,t,n){Pr(e.x,t.x,n.x),Pr(e.y,t.y,n.y)}function Fr(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Br(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}const zr=.35;function jr(e,t,n){return{min:Ur(e,t),max:Ur(e,n)}}function Ur(e,t){return"number"==typeof e?e:e[t]||0}const Vr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function $r(e){return[e("x"),e("y")]}function Hr({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function qr(e){return void 0===e||1===e}function Kr({scale:e,scaleX:t,scaleY:n}){return!qr(e)||!qr(t)||!qr(n)}function Gr(e){return Kr(e)||Wr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wr(e){return Zr(e.x)||Zr(e.y)}function Zr(e){return e&&"0%"!==e}function Xr(e,t,n){return n+t*(e-n)}function Yr(e,t,n,i,r){return void 0!==r&&(e=Xr(e,r,i)),Xr(e,n,i)+t}function Qr(e,t=0,n=1,i,r){e.min=Yr(e.min,t,n,i,r),e.max=Yr(e.max,t,n,i,r)}function Jr(e,{x:t,y:n}){Qr(e.x,t.translate,t.scale,t.originPoint),Qr(e.y,n.translate,n.scale,n.originPoint)}const eo=.999999999999,to=1.0000000000001;function no(e,t){e.min=e.min+t,e.max=e.max+t}function io(e,t,n,i,r=.5){Qr(e,t,n,di(e.min,e.max,r),i)}function ro(e,t){io(e.x,t.x,t.scaleX,t.scale,t.originX),io(e.y,t.y,t.scaleY,t.scale,t.originY)}function oo(e,t){return Hr(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}const so=({current:e})=>e?e.ownerDocument.defaultView:null,ao=new WeakMap;class lo{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new kr(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(xr(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Ke[o]?null:(Ke[o]=!0,()=>{Ke[o]=!1}):Ke.x||Ke.y?null:(Ke.x=Ke.y=!0,()=>{Ke.x=Ke.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$r(e=>{let t=this.getAxisMotionValue(e).get()||0;if(sn.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[e];i&&(t=Or(i)*(parseFloat(t)/100))}}this.originPoint[e]=t}),r&&ht.postRender(()=>r(e,t)),Mt(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(i&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>$r(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:so(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&ht.postRender(()=>r(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:i}=this.getProps();if(!n||!co(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},i){return void 0!==t&&e<t?e=i?di(t,e,i.min):Math.max(e,t):void 0!==n&&e>n&&(e=i?di(n,e,i.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,r=this.constraints;t&&Tr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(e,{top:t,left:n,bottom:i,right:r}){return{x:Fr(e.x,n,r),y:Fr(e.y,t,i)}}(i.layoutBox,t),this.elastic=function(e=zr){return!1===e?e=0:!0===e&&(e=zr),{x:jr(e,"left","right"),y:jr(e,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&$r(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Tr(e))return!1;const n=e.current;Gn(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(e,t,n){const i=oo(e,n),{scroll:r}=t;return r&&(no(i.x,r.offset.x),no(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Br(e.x,t.x),y:Br(e.y,t.y)}}(i.layout.layoutBox,r);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=Hr(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=$r(s=>{if(!co(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(s,d)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Mt(this.visualElement,e),n.start(ir(e,n,0,t,this.visualElement,!1))}stopAnimation(){$r(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){$r(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){$r(t=>{const{drag:n}=this.getProps();if(!co(t,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(t);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[t];r.set(e[t]-di(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Tr(t)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};$r(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();i[e]=function(e,t){let n=.5;const i=Or(e),r=Or(t);return r>i?n=je(t.min,t.max-i,e.min):i>r&&(n=je(e.min,e.max-r,t.min)),qt(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),$r(t=>{if(!co(t,e,null))return;const n=this.getAxisMotionValue(t),{min:r,max:o}=this.constraints[t];n.set(di(r,o,i[t]))})}addListeners(){if(!this.visualElement.current)return;ao.set(this.visualElement,this);const e=wr(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();Tr(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),ht.read(t);const r=vr(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&($r(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{r(),e(),i(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=zr,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function co(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const uo=e=>(t,n)=>{e&&ht.postRender(()=>e(t,n))},ho=o(null),po=o({}),fo=o({}),mo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function go(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bo={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!an.test(e))return e;e=parseFloat(e)}return`${go(e,t.target.x)}% ${go(e,t.target.y)}%`}},yo={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=wn.parse(e);if(r.length>5)return i;const o=wn.createTransformer(e),s="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=l;const c=di(a,l,.5);return"number"==typeof r[2+s]&&(r[2+s]/=c),"number"==typeof r[3+s]&&(r[3+s]/=c),o(r)}},vo={},{schedule:xo,cancel:wo}=dt(queueMicrotask,!1);class _o extends i{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=e;var o;o=Eo,Object.assign(vo,o),r&&(t.group&&t.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),mo.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:i,isPresent:r}=this.props,o=n.projection;return o?(o.isPresent=r,i||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||ht.postRender(()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),xo.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ko(e){const[n,i]=function(e=!0){const t=u(ho);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,o=h();d(()=>{e&&r(o)},[e]);const s=c(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,s]:[!0]}(),r=u(po);return t(_o,{...e,layoutGroup:r,switchLayoutGroup:u(fo),isPresent:n,safeToRemove:i})}const Eo={borderRadius:{...bo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bo,borderTopRightRadius:bo,borderBottomLeftRadius:bo,borderBottomRightRadius:bo,boxShadow:yo},So=(e,t)=>e.depth-t.depth;class Ao{constructor(){this.children=[],this.isDirty=!1}add(e){vt(this.children,e),this.isDirty=!0}remove(e){xt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(So),this.isDirty=!1,this.children.forEach(e)}}function Co(e){const t=Ct(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const Mo=["TopLeft","TopRight","BottomLeft","BottomRight"],No=Mo.length,To=e=>"string"==typeof e?parseFloat(e):e,Oo=e=>"number"==typeof e||an.test(e);function Do(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Io=Po(0,.5,Ut),Ro=Po(.5,.95,ot);function Po(e,t,n){return i=>i<e?0:i>t?1:n(je(e,t,i))}function Lo(e,t){e.min=t.min,e.max=t.max}function Fo(e,t){Lo(e.x,t.x),Lo(e.y,t.y)}function Bo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zo(e,t,n,i,r){return e=Xr(e-=t,1/n,i),void 0!==r&&(e=Xr(e,1/r,i)),e}function jo(e,t,[n,i,r],o,s){!function(e,t=0,n=1,i=.5,r,o=e,s=e){if(sn.test(t)&&(t=parseFloat(t),t=di(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=di(o.min,o.max,i);e===o&&(a-=t),e.min=zo(e.min,t,n,a,r),e.max=zo(e.max,t,n,a,r)}(e,t[n],t[i],t[r],t.scale,o,s)}const Uo=["x","scaleX","originX"],Vo=["y","scaleY","originY"];function $o(e,t,n,i){jo(e.x,t,Uo,n?n.x:void 0,i?i.x:void 0),jo(e.y,t,Vo,n?n.y:void 0,i?i.y:void 0)}function Ho(e){return 0===e.translate&&1===e.scale}function qo(e){return Ho(e.x)&&Ho(e.y)}function Ko(e,t){return e.min===t.min&&e.max===t.max}function Go(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Wo(e,t){return Go(e.x,t.x)&&Go(e.y,t.y)}function Zo(e){return Or(e.x)/Or(e.y)}function Xo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Yo{constructor(){this.members=[]}add(e){vt(this.members,e),e.scheduleRender()}remove(e){if(xt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Qo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Jo="undefined"!=typeof window&&void 0!==window.MotionDebug,es=["","X","Y","Z"],ts={visibility:"hidden"};let ns=0;function is(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function rs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ot(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(t||i))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&rs(i)}function os({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=ns++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Jo&&(Qo.totalNodes=Qo.resolvedTargetDeltas=Qo.recalculatedProjection=0),this.nodes.forEach(ls),this.nodes.forEach(ms),this.nodes.forEach(gs),this.nodes.forEach(cs),Jo&&window.MotionDebug.record(Qo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ao)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new wt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=t)instanceof SVGElement&&"svg"!==i.tagName,this.instance=t;const{layoutId:r,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),e){let n;const i=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=yt.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(pt(i),e(o-t))};return ht.read(i,!0),()=>pt(i)}(i,250),mo.hasAnimatedSinceResize&&(mo.hasAnimatedSinceResize=!1,this.nodes.forEach(fs))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||_s,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Wo(this.targetLayout,i)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Oe(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||fs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,pt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bs),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ds);this.isUpdating||this.nodes.forEach(hs),this.isUpdating=!1,this.nodes.forEach(ps),this.nodes.forEach(ss),this.nodes.forEach(as),this.clearAllSnapshots();const e=yt.now();ft.delta=qt(0,1e3/60,e-ft.timestamp),ft.timestamp=e,ft.isProcessing=!0,mt.update.process(ft),mt.preRender.process(ft),mt.render.process(ft),ft.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(us),this.sharedNodes.forEach(ys)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!r)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!qo(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;e&&(t||Gr(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var i;return e&&(n=this.removeTransform(n)),Ss((i=n).x),Ss(i.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Cs)){const{scroll:e}=this.root;e&&(no(n.x,e.offset.x),no(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Fo(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const i=this.path[t],{scroll:r,options:o}=i;i!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&Fo(n,e),no(n.x,r.offset.x),no(n.y,r.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Fo(n,e);for(let e=0;e<this.path.length;e++){const i=this.path[e];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ro(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Gr(i.latestValues)&&ro(n,i.latestValues)}return Gr(this.latestValues)&&ro(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Fo(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Gr(n.latestValues))continue;Kr(n.latestValues)&&n.updateSnapshot();const i=Vr();Fo(i,n.measurePageBox()),$o(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Gr(this.latestValues)&&$o(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ft.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(this.layout&&(r||o)){if(this.resolvedRelativeTargetAt=ft.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Lr(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Fo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Rr(s.x,a.x,l.x),Rr(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Fo(this.target,this.layout.layoutBox),Jr(this.target,this.targetDelta)):Fo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Lr(this.relativeTargetOrigin,this.target,e.target),Fo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Jo&&Qo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Kr(this.parent.latestValues)&&!Wr(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===ft.timestamp&&(i=!1),i)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;Fo(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,i=!1){const r=n.length;if(!r)return;let o,s;t.x=t.y=1;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ro(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Jr(e,s)),i&&Gr(o.latestValues)&&ro(e,o.latestValues))}t.x<to&&t.x>eo&&(t.x=1),t.y<to&&t.y>eo&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Bo(this.prevProjectionDelta.x,this.projectionDelta.x),Bo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ir(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Xo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Xo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Jo&&Qo.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(ws));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h;vs(o.x,e.x,n),vs(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lr(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,i){xs(e.x,t.x,n.x,i),xs(e.y,t.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&(l=this.relativeTarget,h=d,Ko(l.x,h.x)&&Ko(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Fo(d,this.relativeTarget)),a&&(this.animationValues=r,function(e,t,n,i,r,o){r?(e.opacity=di(0,void 0!==n.opacity?n.opacity:1,Io(i)),e.opacityExit=di(void 0!==t.opacity?t.opacity:1,0,Ro(i))):o&&(e.opacity=di(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let r=0;r<No;r++){const o=`border${Mo[r]}Radius`;let s=Do(t,o),a=Do(n,o);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||Oo(s)===Oo(a)?(e[o]=Math.max(di(To(s),To(a),i),0),(sn.test(a)||sn.test(s))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=di(t.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(pt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{mo.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const i=Ct(0)?0:St(0);return i.start(ir("",i,1e3,n)),i.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:i,latestValues:r}=e;if(t&&n&&i){if(this!==e&&this.layout&&i&&As(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Or(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const i=Or(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+i}Fo(t,n),ro(t,r),Ir(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Yo),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const i={};n.z&&is("z",e,i,this.animationValues);for(let t=0;t<es.length;t++)is(`rotate${es[t]}`,e,i,this.animationValues),is(`skew${es[t]}`,e,i,this.animationValues);e.render();for(const t in i)e.setStaticValue(t,i[t]),this.animationValues&&(this.animationValues[t]=i[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ts;const i={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Co(null==e?void 0:e.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Co(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Gr(this.latestValues)&&(t.transform=r?r({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:r,rotateY:o,skewX:s,skewY:a}=n;e&&(i=`perspective(${e}px) ${i}`),t&&(i+=`rotate(${t}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),s&&(i+=`skewX(${s}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),r&&(i.transform=r(s,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:i.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in vo){if(void 0===s[e])continue;const{correct:t,applyTo:n}=vo[e],r="none"===i.transform?s[e]:t(s[e],o);if(n){const e=n.length;for(let t=0;t<e;t++)i[n[t]]=r}else i[e]=r}return this.options.layoutId&&(i.pointerEvents=o===this?Co(null==e?void 0:e.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(ds),this.root.sharedNodes.clear()}}}function ss(e){e.updateLayout()}function as(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:i}=e.layout,{animationType:r}=e.options,o=n.source!==e.layout.source;"size"===r?$r(e=>{const i=o?n.measuredBox[e]:n.layoutBox[e],r=Or(i);i.min=t[e].min,i.max=i.min+r}):As(r,n.layoutBox,t)&&$r(i=>{const r=o?n.measuredBox[i]:n.layoutBox[i],s=Or(t[i]);r.max=r.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[i].max=e.relativeTarget[i].min+s)});const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ir(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Ir(a,e.applyTransform(i,!0),n.measuredBox):Ir(a,t,n.layoutBox);const l=!qo(s);let c=!1;if(!e.resumeFrom){const i=e.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const s={x:{min:0,max:0},y:{min:0,max:0}};Lr(s,n.layoutBox,r.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Lr(a,t,o.layoutBox),Wo(s,a)||(c=!0),i.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=i)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ls(e){Jo&&Qo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function us(e){e.clearSnapshot()}function ds(e){e.clearMeasurements()}function hs(e){e.isLayoutDirty=!1}function ps(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function fs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ms(e){e.resolveTargetDelta()}function gs(e){e.calcProjection()}function bs(e){e.resetSkewAndRotation()}function ys(e){e.removeLeadSnapshot()}function vs(e,t,n){e.translate=di(t.translate,0,n),e.scale=di(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function xs(e,t,n,i){e.min=di(t.min,n.min,i),e.max=di(t.max,n.max,i)}function ws(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const _s={duration:.45,ease:[.4,0,.1,1]},ks=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Es=ks("applewebkit/")&&!ks("chrome/")?Math.round:ot;function Ss(e){e.min=Es(e.min),e.max=Es(e.max)}function As(e,t,n){return"position"===e||"preserve-aspect"===e&&(i=Zo(t),r=Zo(n),!(Math.abs(i-r)<=.2));var i,r}function Cs(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Ms=os({attachResizeListener:(e,t)=>vr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ns={current:void 0},Ts=os({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ns.current){const e=new Ms({});e.mount(window),e.setOptions({layoutScroll:!0}),Ns.current=e}return Ns.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Os={pan:{Feature:class extends gr{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(e){this.session=new kr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:so(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:uo(e),onStart:uo(t),onMove:n,onEnd:(e,t)=>{delete this.session,i&&ht.postRender(()=>i(e,t))}}}mount(){this.removePointerDownListener=wr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends gr{constructor(e){super(e),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new lo(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ts,MeasureLayout:ko}};function Ds(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);const r=i["onHover"+n];r&&ht.postRender(()=>r(t,xr(t)))}function Is(e,t,n){const{props:i}=e;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);const r=i["onTap"+("End"===n?"":n)];r&&ht.postRender(()=>r(t,xr(t)))}const Rs=new WeakMap,Ps=new WeakMap,Ls=e=>{const t=Rs.get(e.target);t&&t(e)},Fs=e=>{e.forEach(Ls)};const Bs={some:0,all:1},zs={inView:{Feature:class extends gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:i="some",once:r}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Bs[i]};return function(e,t,n){const i=function({root:e,...t}){const n=e||document;Ps.has(n)||Ps.set(n,{});const i=Ps.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(Fs,{root:e,...t})),i[r]}(t);return Rs.set(e,n),i.observe(e),()=>{Rs.delete(e),i.unobserve(e)}}(this.node.current,o,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,r&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=t?n:i;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends gr{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[i,r,o]=We(e,n),s=e=>{const i=e.currentTarget;if(!nt(e)||Je.has(i))return;Je.add(i);const o=t(e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),nt(e)&&Je.has(i)&&(Je.delete(i),"function"==typeof o&&o(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||Xe(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return i.forEach(e=>{(function(e){return Qe.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const i=et(()=>{if(Je.has(n))return;tt(n,"down");const e=et(()=>{tt(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>tt(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,r),r)}),o}(e,e=>(Is(this.node,e,"Start"),(e,{success:t})=>Is(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=vi(vr(this.node.current,"focus",()=>this.onFocus()),vr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends gr{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[i,r,o]=We(e,n),s=Ze(e=>{const{target:n}=e,i=t(e);if("function"!=typeof i||!n)return;const o=Ze(e=>{i(e),n.removeEventListener("pointerleave",o)});n.addEventListener("pointerleave",o,r)});return i.forEach(e=>{e.addEventListener("pointerenter",s,r)}),o}(e,e=>(Ds(this.node,e,"Start"),e=>Ds(this.node,e,"End"))))}unmount(){}}}},js={layout:{ProjectionNode:Ts,MeasureLayout:ko}},Us=o({strict:!1}),Vs=o({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),$s=o({});function Hs(e){return ye(e.animate)||Ae.some(t=>we(e[t]))}function qs(e){return Boolean(Hs(e)||e.variants)}function Ks(e){return Array.isArray(e)?e.join(" "):e}const Gs="undefined"!=typeof window,Ws={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Zs={};for(const e in Ws)Zs[e]={isEnabled:t=>Ws[e].some(e=>!!t[e])};const Xs=Symbol.for("motionComponentSymbol");function Ys(e,t,n){return c(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&("function"==typeof n?n(i):Tr(n)&&(n.current=i))},[t])}const Qs=Gs?f:d;function Js(e,t,n,i,r){var o,s;const{visualElement:a}=u($s),l=u(Us),c=u(ho),h=u(Vs).reducedMotion,f=g(null);i=i||l.renderer,!f.current&&i&&(f.current=i(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h}));const m=f.current,b=u(fo);!m||m.projection||!r||"html"!==m.type&&"svg"!==m.type||function(e,t,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ea(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Tr(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(f.current,n,r,b);const y=g(!1);p(()=>{m&&y.current&&m.update(n,c)});const v=n[Tt],x=g(Boolean(v)&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,v))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,v)));return Qs(()=>{m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),xo.render(m.render),x.current&&m.animationState&&m.animationState.animateChanges())}),d(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,v)}),x.current=!1))}),m}function ea(e){if(e)return!1!==e.options.allowProjection?e.projection:ea(e.parent)}function ta({preloadedFeatures:e,createVisualElement:i,useRender:r,useVisualState:o,Component:s}){var a,c;function d(e,a){let l;const c={...u(Vs),...e,layoutId:na(e)},{isStatic:d}=c,h=function(e){const{initial:t,animate:n}=function(e,t){if(Hs(e)){const{initial:t,animate:n}=e;return{initial:!1===t||we(t)?t:void 0,animate:we(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,u($s));return m(()=>({initial:t,animate:n}),[Ks(t),Ks(n)])}(e),p=o(e,d);if(!d&&Gs){u(Us).strict;const e=function(e){const{drag:t,layout:n}=Zs;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(c);l=e.MeasureLayout,h.visualElement=Js(s,p,c,i,e.ProjectionNode)}return n($s.Provider,{value:h,children:[l&&h.visualElement?t(l,{visualElement:h.visualElement,...c}):null,r(s,e,Ys(p,h.visualElement,a),p,d,h.visualElement)]})}e&&function(e){for(const t in e)Zs[t]={...Zs[t],...e[t]}}(e),d.displayName=`motion.${"string"==typeof s?s:`create(${null!==(c=null!==(a=s.displayName)&&void 0!==a?a:s.name)&&void 0!==c?c:""})`}`;const h=l(d);return h[Xs]=s,h}function na({layoutId:e}){const t=u(po).id;return t&&void 0!==e?t+"-"+e:e}const ia=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ra(e){return"string"==typeof e&&!e.includes("-")&&!!(ia.indexOf(e)>-1||/[A-Z]/u.test(e))}const oa=e=>(t,n)=>{const i=u($s),r=u(ho),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},i,r,o){const s={latestValues:sa(i,r,o,e),renderState:t()};return n&&(s.onMount=e=>n({props:i,current:e,...s}),s.onUpdate=e=>n(e)),s}(e,t,i,r);return n?o():function(e){const t=g(null);return null===t.current&&(t.current=e()),t.current}(o)};function sa(e,t,n,i){const r={},o=i(e,{});for(const e in o)r[e]=Co(o[e]);let{initial:s,animate:a}=e;const l=Hs(e),c=qs(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!ye(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const i=ke(e,t[n]);if(i){const{transitionEnd:e,transition:t,...n}=i;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(r[e]=t)}for(const t in e)r[t]=e[t]}}}return r}const aa=(e,t)=>t&&"number"==typeof e?t.transform(e):e,la={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ca=st.length;function ua(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let s=!1,a=!1;for(const e in t){const n=t[e];if(at.has(e))s=!0;else if(Xn(e))r[e]=n;else{const t=aa(n,Nn[e]);e.startsWith("origin")?(a=!0,o[e]=t):i[e]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let o=0;o<ca;o++){const s=st[o],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=aa(a,Nn[s]);l||(r=!1,i+=`${la[s]||s}(${e}) `),n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;i.transformOrigin=`${e} ${t} ${n}`}}const da={offset:"stroke-dashoffset",array:"stroke-dasharray"},ha={offset:"strokeDashoffset",array:"strokeDasharray"};function pa(e,t,n){return"string"==typeof e?e:an.transform(t+n*e)}function fa(e,{attrX:t,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(ua(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${pa(t,e.x,e.width)} ${pa(n,e.y,e.height)}`}(f,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?da:ha;e[o.offset]=an.transform(-i);const s=an.transform(t),a=an.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const ma=e=>"string"==typeof e&&"svg"===e.toLowerCase();function ga(e,{style:t,vars:n},i,r){Object.assign(e.style,t,r&&r.getProjectionStyles(i));for(const t in n)e.style.setProperty(t,n[t])}const ba=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ya(e,t,n,i){ga(e,t,void 0,i);for(const n in t.attrs)e.setAttribute(ba.has(n)?n:Nt(n),t.attrs[n])}function va(e,{layout:t,layoutId:n}){return at.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!vo[e]||"opacity"===e)}function xa(e,t,n){var i;const{style:r}=e,o={};for(const s in r)(Ct(r[s])||t.style&&Ct(t.style[s])||va(s,e)||void 0!==(null===(i=null==n?void 0:n.getValue(s))||void 0===i?void 0:i.liveStyle))&&(o[s]=r[s]);return o}function wa(e,t,n){const i=xa(e,t,n);for(const n in e)(Ct(e[n])||Ct(t[n]))&&(i[-1!==st.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return i}const _a=["x","y","width","height","cx","cy","r"],ka={useVisualState:oa({scrapeMotionValuesFromProps:wa,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:i,latestValues:r})=>{if(!n)return;let o=!!e.drag;if(!o)for(const e in r)if(at.has(e)){o=!0;break}if(!o)return;let s=!t;if(t)for(let n=0;n<_a.length;n++){const i=_a[n];e[i]!==t[i]&&(s=!0)}s&&ht.read(()=>{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,i),ht.render(()=>{fa(i,r,ma(n.tagName),e.transformTemplate),ya(n,i)})})}})},Ea={useVisualState:oa({scrapeMotionValuesFromProps:xa,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Sa(e,t,n){for(const i in t)Ct(t[i])||va(i,n)||(e[i]=t[i])}function Aa(e,t){const n={},i=function(e,t){const n={};return Sa(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return m(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return ua(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const Ca=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ma(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ca.has(e)}let Na=e=>!Ma(e);try{(Ta=require("@emotion/is-prop-valid").default)&&(Na=e=>e.startsWith("on")?!Ma(e):Ta(e))}catch(e){}var Ta;function Oa(e,t,n,i){const r=m(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return fa(n,t,ma(i),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Sa(t,e.style,e),r.style={...t,...r.style}}return r}function Da(e=!1){return(t,n,i,{latestValues:o},a)=>{const l=(ra(t)?Oa:Aa)(n,o,a,t),c=function(e,t,n){const i={};for(const r in e)"values"===r&&"object"==typeof e.values||(Na(r)||!0===n&&Ma(r)||!t&&!Ma(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(n,"string"==typeof t,e),u=t!==r?{...c,...l,ref:i}:{},{children:d}=n,h=m(()=>Ct(d)?d.get():d,[d]);return s(t,{...u,children:h})}}function Ia(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return ta({...ra(n)?ka:Ea,preloadedFeatures:e,useRender:Da(i),createVisualElement:t,Component:n})}}const Ra={current:null},Pa={current:!1},La=[...ii,hn,wn],Fa=new WeakMap,Ba=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class za{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=qn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=yt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ht.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:c}=o;this.onUpdate=c,this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=Hs(t),this.isVariantNode=qs(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==a[e]&&Ct(t)&&t.set(a[e],!1)}}mount(e){this.current=e,Fa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),Pa.current||function(){if(Pa.current=!0,Gs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ra.current=e.matches;e.addListener(t),t()}else Ra.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ra.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Fa.delete(this.current),this.projection&&this.projection.unmount(),pt(this.notifyUpdate),pt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=at.has(e),i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ht.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),r(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Zs){const t=Zs[e];if(!t)continue;const{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Ba.length;t++){const n=Ba[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(const i in t){const r=t[i],o=n[i];if(Ct(r))e.addValue(i,r);else if(Ct(o))e.addValue(i,St(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{const t=e.getStaticValue(i);e.addValue(i,St(void 0!==t?t:r,{owner:e}))}}for(const i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=St(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let i=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=i&&("string"==typeof i&&(Wn(i)||$t(i))?i=parseFloat(i):(r=i,!La.find(ni(r))&&wn.test(t)&&(i=Dn(e,t))),this.setBaseTarget(e,Ct(i)?i.get():i)),Ct(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=ke(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);r&&(i=r[e])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||Ct(r)?void 0!==this.initialValues[e]&&void 0===i?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new wt),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class ja extends za{constructor(){super(...arguments),this.KeyframeResolver=oi}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ct(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class Ua extends ja{constructor(){super(...arguments),this.type="html",this.renderInstance=ga}readValueFromInstance(e,t){if(at.has(t)){const e=On(t);return e&&e.default||0}{const i=(n=e,window.getComputedStyle(n)),r=(Xn(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return oo(e,t)}build(e,t,n){ua(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return xa(e,t,n)}}class Va extends ja{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Vr}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(at.has(t)){const e=On(t);return e&&e.default||0}return t=ba.has(t)?t:Nt(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return wa(e,t,n)}build(e,t,n){fa(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,i){ya(e,t,0,i)}mount(e){this.isSVGTag=ma(e.tagName),super.mount(e)}}const $a=be(Ia({...yr,...zs,...Os,...js},(e,t)=>ra(e)?new Va(t):new Ua(t,{allowProjection:e!==r})));function Ha({open:e,onClick:n,hue:i=0,hoverIntensity:r=.5,rotateOnHover:o=!0,forceHoverState:s=!1}){return t($a.button,{className:"bmxcb__orb-button","aria-label":e?"Close chat":"Open chat",onClick:n,whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:25},children:t(ge,{hue:i,hoverIntensity:r,rotateOnHover:o,forceHoverState:s})})}function qa({open:e,onClick:n,hue:i=0,hoverIntensity:r=.5,rotateOnHover:o=!0,forceHoverState:s=!1}){return t(Ha,{open:e,onClick:n,hue:i,hoverIntensity:r,rotateOnHover:o,forceHoverState:s})}var Ka,Ga={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Wa=a.createContext&&a.createContext(Ga),Za=["attr","size","title"];function Xa(){return Xa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Xa.apply(this,arguments)}function Ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Qa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ya(Object(n),!0).forEach(function(t){var i,r,o,s;i=e,r=t,o=n[t],s=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r),(r="symbol"==typeof s?s:s+"")in i?Object.defineProperty(i,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ja(e){return e&&e.map((e,t)=>a.createElement(e.tag,Qa({key:t},e.attr),Ja(e.child)))}function el(e){return t=>a.createElement(tl,Xa({attr:Qa({},e.attr)},t),Ja(e.child))}function tl(e){var t=t=>{var n,{attr:i,size:r,title:o}=e,s=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,Za),l=r||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),a.createElement("svg",Xa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,s,{className:n,style:Qa(Qa({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&a.createElement("title",null,o),e.children)};return void 0!==Wa?a.createElement(Wa.Consumer,null,e=>t(e)):t(Ga)}function nl(e){return el({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(e)}function il(e){return el({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 249.93a10.58 10.58 0 0 0-9.36-9.94L429 235.84a5.42 5.42 0 0 1-4.5-4.67c-.49-3.15-1-6.42-1.7-9.52a5.52 5.52 0 0 1 2.63-5.85l22.78-12.65a10.35 10.35 0 0 0 5-12.83l-3.95-10.9a10.32 10.32 0 0 0-12.13-6.51l-25.55 5a5.51 5.51 0 0 1-5.82-2.81c-1.49-2.79-3.11-5.63-4.8-8.42a5.6 5.6 0 0 1 .44-6.5l17-19.64a10.42 10.42 0 0 0 .39-13.76l-7.42-8.91a10.24 10.24 0 0 0-13.58-2l-22.37 13.43a5.39 5.39 0 0 1-6.39-.63c-2.47-2.17-5-4.26-7.37-6.19a5.45 5.45 0 0 1-1.72-6.21l9.26-24.4a10.35 10.35 0 0 0-4.31-13.07l-10.09-5.89a10.3 10.3 0 0 0-13.45 2.83L325 96.28a4.6 4.6 0 0 1-5.6 1.72c-.61-.25-5.77-2.36-9.78-3.7a5.42 5.42 0 0 1-3.74-5.23l.39-26.07a10.48 10.48 0 0 0-8.57-10.88l-11.45-2a10.45 10.45 0 0 0-11.75 7.17L266 82.1a5.46 5.46 0 0 1-5.36 3.65h-9.75a5.5 5.5 0 0 1-5.3-3.67l-8.46-24.67a10.46 10.46 0 0 0-11.77-7.25l-11.47 2a10.46 10.46 0 0 0-8.56 10.79l.4 26.16a5.45 5.45 0 0 1-3.86 5.25c-2.29.89-7.26 2.79-9.52 3.63-2 .72-4.18-.07-5.94-2.1l-16.26-20A10.3 10.3 0 0 0 156.69 73l-10.06 5.83A10.36 10.36 0 0 0 142.31 92l9.25 24.34a5.54 5.54 0 0 1-1.7 6.23c-2.43 2-4.92 4-7.4 6.22a5.38 5.38 0 0 1-6.35.64L114 115.74a10.4 10.4 0 0 0-13.61 2L93 126.63a10.31 10.31 0 0 0 .37 13.75L110.45 160a5.42 5.42 0 0 1 .45 6.45c-1.71 2.72-3.34 5.58-4.82 8.44a5.53 5.53 0 0 1-5.86 2.82l-25.51-4.93a10.34 10.34 0 0 0-12.14 6.51l-4 10.88a10.38 10.38 0 0 0 5 12.85l22.78 12.65a5.39 5.39 0 0 1 2.65 5.92l-.24 1.27c-.52 2.79-1 5.43-1.46 8.24a5.48 5.48 0 0 1-4.46 4.64l-25.69 4.15A10.42 10.42 0 0 0 48 250.16v11.58A10.26 10.26 0 0 0 57.16 272l25.68 4.14a5.41 5.41 0 0 1 4.5 4.67c.49 3.16 1 6.42 1.7 9.52a5.52 5.52 0 0 1-2.63 5.85l-22.77 12.67a10.35 10.35 0 0 0-5 12.83l4 10.9a10.33 10.33 0 0 0 12.13 6.51l25.55-4.95a5.49 5.49 0 0 1 5.82 2.81c1.5 2.8 3.11 5.63 4.8 8.42a5.58 5.58 0 0 1-.44 6.5l-17 19.63a10.41 10.41 0 0 0-.5 13.77l7.41 8.91a10.23 10.23 0 0 0 13.58 2l22.37-13.43a5.39 5.39 0 0 1 6.39.63c2.48 2.17 5 4.26 7.37 6.19a5.47 5.47 0 0 1 1.73 6.21l-9.27 24.4a10.35 10.35 0 0 0 4.31 13.07l10.11 5.84a10.3 10.3 0 0 0 13.45-2.82L187 415.92c1.4-1.73 3.6-2.5 5.23-1.84 3.48 1.44 5.81 2.25 9.94 3.63a5.44 5.44 0 0 1 3.75 5.23l-.4 26.05a10.5 10.5 0 0 0 8.57 10.88l11.45 2a10.43 10.43 0 0 0 11.75-7.17l8.5-24.77a5.45 5.45 0 0 1 5.36-3.65h9.75a5.49 5.49 0 0 1 5.3 3.67l8.47 24.67a10.48 10.48 0 0 0 10 7.41 9.74 9.74 0 0 0 1.78-.16l11.47-2a10.46 10.46 0 0 0 8.56-10.79l-.4-26.16a5.43 5.43 0 0 1 3.75-5.2c3.84-1.29 6.54-2.33 8.91-3.25l.6-.23c3.1-1.07 4.6.23 5.47 1.31l16.75 20.63A10.3 10.3 0 0 0 355 439l10.07-5.83a10.35 10.35 0 0 0 4.31-13.1l-9.24-24.34a5.52 5.52 0 0 1 1.69-6.23c2.43-2 4.92-4 7.4-6.22a5.39 5.39 0 0 1 6.38-.62l22.39 13.4a10.39 10.39 0 0 0 13.61-2l7.4-8.9a10.31 10.31 0 0 0-.37-13.75l-17.06-19.67a5.42 5.42 0 0 1-.45-6.45c1.71-2.71 3.34-5.57 4.82-8.44a5.55 5.55 0 0 1 5.86-2.82l25.48 4.97a10.34 10.34 0 0 0 12.14-6.51l3.95-10.88a10.37 10.37 0 0 0-5-12.84l-22.8-12.67a5.4 5.4 0 0 1-2.61-5.89l.24-1.27c.52-2.79 1-5.43 1.46-8.24a5.48 5.48 0 0 1 4.46-4.64l25.69-4.14a10.43 10.43 0 0 0 9.18-10.28v-11.71zm-282.45 94a15.8 15.8 0 0 1-25.47 2.66 135.06 135.06 0 0 1 .42-181.65 15.81 15.81 0 0 1 25.5 2.77l45.65 80.35a15.85 15.85 0 0 1 0 15.74zM256 391.11a134.75 134.75 0 0 1-28.31-3 15.81 15.81 0 0 1-10.23-23.36l46-80a15.79 15.79 0 0 1 13.7-7.93h92.14a15.8 15.8 0 0 1 15.1 20.53c-17.49 54.32-68.4 93.76-128.4 93.76zm7.51-163.9L218 147.07a15.81 15.81 0 0 1 10.31-23.3 134 134 0 0 1 27.69-2.88c60 0 110.91 39.44 128.37 93.79a15.8 15.8 0 0 1-15.1 20.53h-92a15.78 15.78 0 0 1-13.76-8z"},child:[]}]})(e)}function rl(e){return el({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m441 336.2-.06-.05c-9.93-9.18-22.78-11.34-32.16-12.92l-.69-.12c-9.05-1.49-10.48-2.5-14.58-6.17-2.44-2.17-5.35-5.65-5.35-9.94s2.91-7.77 5.34-9.94l30.28-26.87c25.92-22.91 40.2-53.66 40.2-86.59s-14.25-63.68-40.2-86.6c-35.89-31.59-85-49-138.37-49C223.72 48 162 71.37 116 112.11c-43.87 38.77-68 90.71-68 146.24s24.16 107.47 68 146.23c21.75 19.24 47.49 34.18 76.52 44.42a266.17 266.17 0 0 0 86.87 15h1.81c61 0 119.09-20.57 159.39-56.4 9.7-8.56 15.15-20.83 15.34-34.56.21-14.17-5.37-27.95-14.93-36.84zM112 208a32 32 0 1 1 32 32 32 32 0 0 1-32-32zm40 135a32 32 0 1 1 32-32 32 32 0 0 1-32 32zm40-199a32 32 0 1 1 32 32 32 32 0 0 1-32-32zm64 271a48 48 0 1 1 48-48 48 48 0 0 1-48 48zm72-239a32 32 0 1 1 32-32 32 32 0 0 1-32 32z"},child:[]}]})(e)}function ol(e){return el({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"m400 148-21.12-24.57A191.43 191.43 0 0 0 240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 0 0 181.07-128"},child:[]},{tag:"path",attr:{d:"M464 97.42V208a16 16 0 0 1-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"},child:[]}]})(e)}function sl(e){return el({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m476.59 227.05-.16-.07L49.35 49.84A23.56 23.56 0 0 0 27.14 52 24.65 24.65 0 0 0 16 72.59v113.29a24 24 0 0 0 19.52 23.57l232.93 43.07a4 4 0 0 1 0 7.86L35.53 303.45A24 24 0 0 0 16 327v113.31A23.57 23.57 0 0 0 26.59 460a23.94 23.94 0 0 0 13.22 4 24.55 24.55 0 0 0 9.52-1.93L476.4 285.94l.19-.09a32 32 0 0 0 0-58.8z"},child:[]}]})(e)}function al(e){return el({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",d:"M296 64h-80a7.91 7.91 0 0 0-8 8v24h96V72a7.91 7.91 0 0 0-8-8z"},child:[]},{tag:"path",attr:{d:"M432 96h-96V72a40 40 0 0 0-40-40h-80a40 40 0 0 0-40 40v24H80a16 16 0 0 0 0 32h17l19 304.92c1.42 26.85 22 47.08 48 47.08h184c26.13 0 46.3-19.78 48-47l19-305h17a16 16 0 0 0 0-32zM192.57 416H192a16 16 0 0 1-16-15.43l-8-224a16 16 0 1 1 32-1.14l8 224A16 16 0 0 1 192.57 416zM272 400a16 16 0 0 1-32 0V176a16 16 0 0 1 32 0zm32-304h-96V72a7.91 7.91 0 0 1 8-8h80a7.91 7.91 0 0 1 8 8zm32 304.57A16 16 0 0 1 320 416h-.58A16 16 0 0 1 304 399.43l8-224a16 16 0 1 1 32 1.14z"},child:[]}]})(e)}function ll(e){return el({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.41 6.59 15 5.5l2.41-1.09L18.5 2l1.09 2.41L22 5.5l-2.41 1.09L18.5 9l-1.09-2.41zm3.87 6.13L20.5 11l-.78 1.72-1.72.78 1.72.78.78 1.72.78-1.72L23 13.5l-1.72-.78zm-5.04 1.65 1.94 1.47-2.5 4.33-2.24-.94c-.2.13-.42.26-.64.37l-.3 2.4h-5l-.3-2.41c-.22-.11-.43-.23-.64-.37l-2.24.94-2.5-4.33 1.94-1.47c-.01-.11-.01-.24-.01-.36s0-.25.01-.37l-1.94-1.47 2.5-4.33 2.24.94c.2-.13.42-.26.64-.37L7.5 6h5l.3 2.41c.22.11.43.23.64.37l2.24-.94 2.5 4.33-1.94 1.47c.01.12.01.24.01.37s0 .24-.01.36zM13 14c0-1.66-1.34-3-3-3s-3 1.34-3 3 1.34 3 3 3 3-1.34 3-3z"},child:[]}]})(e)}function cl({title:e,onClose:i,onSettings:r}){return n("div",{className:"bmxcb__header",children:[n("div",{className:"bmxcb__header-brand",children:[t("img",{src:"https://www.bmx.trade/images/logo.png",alt:"BMX",className:"bmxcb__header-logo"}),t("span",{className:"bmxcb__header-title",children:e})]}),n("div",{className:"bmxcb__header-actions",children:[t("button",{className:"bmxcb__settings-button",onClick:r,"aria-label":"Open settings",children:t(ll,{size:18})}),t("button",{className:"bmxcb__close",onClick:i,"aria-label":"Close",children:t(nl,{size:18})})]})]})}function ul(e){try{return(e?new Date(e):new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}function dl({content:e,createdAt:i}){return t($a.div,{className:"bmxcb__message bmxcb__message--user",initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:400,damping:25,duration:.3},layout:!0,children:n("div",{className:"bmxcb__message-content",children:[t("div",{className:"bmxcb__message-text",children:e}),t("div",{className:"bmxcb__message-time bmxcb__message-time--user",children:ul(i)})]})})}function hl(){}function pl(){}!function(e){e.USER="user",e.ASSISTANT="assistant",e.SYSTEM="system"}(Ka||(Ka={}));const fl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ml=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gl={};function bl(e,t){return((t||gl).jsx?ml:fl).test(e)}const yl=/[ \t\n\f\r]/g;function vl(e){return""===e.replace(yl,"")}class xl{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function wl(e,t){const n={},i={};for(const t of e)Object.assign(n,t.property),Object.assign(i,t.normal);return new xl(n,i,t)}function _l(e){return e.toLowerCase()}xl.prototype.normal={},xl.prototype.property={},xl.prototype.space=void 0;class kl{constructor(e,t){this.attribute=t,this.property=e}}kl.prototype.attribute="",kl.prototype.booleanish=!1,kl.prototype.boolean=!1,kl.prototype.commaOrSpaceSeparated=!1,kl.prototype.commaSeparated=!1,kl.prototype.defined=!1,kl.prototype.mustUseProperty=!1,kl.prototype.number=!1,kl.prototype.overloadedBoolean=!1,kl.prototype.property="",kl.prototype.spaceSeparated=!1,kl.prototype.space=void 0;let El=0;const Sl=Dl(),Al=Dl(),Cl=Dl(),Ml=Dl(),Nl=Dl(),Tl=Dl(),Ol=Dl();function Dl(){return 2**++El}const Il=Object.keys(_);class Rl extends kl{constructor(e,t,n,i){let r=-1;if(super(e,t),Pl(this,"space",i),"number"==typeof n)for(;++r<Il.length;){const e=Il[r];Pl(this,Il[r],(n&_[e])===_[e])}}}function Pl(e,t,n){n&&(e[t]=n)}function Ll(e){const t={},n={};for(const[i,r]of Object.entries(e.properties)){const o=new Rl(i,e.transform(e.attributes||{},i),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),t[i]=o,n[_l(i)]=i,n[_l(o.attribute)]=i}return new xl(t,n,e.space)}Rl.prototype.defined=!0;const Fl=Ll({properties:{ariaActiveDescendant:null,ariaAtomic:Al,ariaAutoComplete:null,ariaBusy:Al,ariaChecked:Al,ariaColCount:Ml,ariaColIndex:Ml,ariaColSpan:Ml,ariaControls:Nl,ariaCurrent:null,ariaDescribedBy:Nl,ariaDetails:null,ariaDisabled:Al,ariaDropEffect:Nl,ariaErrorMessage:null,ariaExpanded:Al,ariaFlowTo:Nl,ariaGrabbed:Al,ariaHasPopup:null,ariaHidden:Al,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Nl,ariaLevel:Ml,ariaLive:null,ariaModal:Al,ariaMultiLine:Al,ariaMultiSelectable:Al,ariaOrientation:null,ariaOwns:Nl,ariaPlaceholder:null,ariaPosInSet:Ml,ariaPressed:Al,ariaReadOnly:Al,ariaRelevant:null,ariaRequired:Al,ariaRoleDescription:Nl,ariaRowCount:Ml,ariaRowIndex:Ml,ariaRowSpan:Ml,ariaSelected:Al,ariaSetSize:Ml,ariaSort:null,ariaValueMax:Ml,ariaValueMin:Ml,ariaValueNow:Ml,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Bl(e,t){return t in e?e[t]:t}function zl(e,t){return Bl(e,t.toLowerCase())}const jl=Ll({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tl,acceptCharset:Nl,accessKey:Nl,action:null,allow:null,allowFullScreen:Sl,allowPaymentRequest:Sl,allowUserMedia:Sl,alt:null,as:null,async:Sl,autoCapitalize:null,autoComplete:Nl,autoFocus:Sl,autoPlay:Sl,blocking:Nl,capture:null,charSet:null,checked:Sl,cite:null,className:Nl,cols:Ml,colSpan:null,content:null,contentEditable:Al,controls:Sl,controlsList:Nl,coords:Ml|Tl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Sl,defer:Sl,dir:null,dirName:null,disabled:Sl,download:Cl,draggable:Al,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Sl,formTarget:null,headers:Nl,height:Ml,hidden:Cl,high:Ml,href:null,hrefLang:null,htmlFor:Nl,httpEquiv:Nl,id:null,imageSizes:null,imageSrcSet:null,inert:Sl,inputMode:null,integrity:null,is:null,isMap:Sl,itemId:null,itemProp:Nl,itemRef:Nl,itemScope:Sl,itemType:Nl,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Sl,low:Ml,manifest:null,max:null,maxLength:Ml,media:null,method:null,min:null,minLength:Ml,multiple:Sl,muted:Sl,name:null,nonce:null,noModule:Sl,noValidate:Sl,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Sl,optimum:Ml,pattern:null,ping:Nl,placeholder:null,playsInline:Sl,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Sl,referrerPolicy:null,rel:Nl,required:Sl,reversed:Sl,rows:Ml,rowSpan:Ml,sandbox:Nl,scope:null,scoped:Sl,seamless:Sl,selected:Sl,shadowRootClonable:Sl,shadowRootDelegatesFocus:Sl,shadowRootMode:null,shape:null,size:Ml,sizes:null,slot:null,span:Ml,spellCheck:Al,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ml,step:null,style:null,tabIndex:Ml,target:null,title:null,translate:null,type:null,typeMustMatch:Sl,useMap:null,value:Al,width:Ml,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Nl,axis:null,background:null,bgColor:null,border:Ml,borderColor:null,bottomMargin:Ml,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Sl,declare:Sl,event:null,face:null,frame:null,frameBorder:null,hSpace:Ml,leftMargin:Ml,link:null,longDesc:null,lowSrc:null,marginHeight:Ml,marginWidth:Ml,noResize:Sl,noHref:Sl,noShade:Sl,noWrap:Sl,object:null,profile:null,prompt:null,rev:null,rightMargin:Ml,rules:null,scheme:null,scrolling:Al,standby:null,summary:null,text:null,topMargin:Ml,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ml,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Sl,disableRemotePlayback:Sl,prefix:null,property:null,results:Ml,security:null,unselectable:null},space:"html",transform:zl}),Ul=Ll({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ol,accentHeight:Ml,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ml,amplitude:Ml,arabicForm:null,ascent:Ml,attributeName:null,attributeType:null,azimuth:Ml,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ml,by:null,calcMode:null,capHeight:Ml,className:Nl,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ml,diffuseConstant:Ml,direction:null,display:null,dur:null,divisor:Ml,dominantBaseline:null,download:Sl,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ml,enableBackground:null,end:null,event:null,exponent:Ml,externalResourcesRequired:null,fill:null,fillOpacity:Ml,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Tl,g2:Tl,glyphName:Tl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ml,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ml,horizOriginX:Ml,horizOriginY:Ml,id:null,ideographic:Ml,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ml,k:Ml,k1:Ml,k2:Ml,k3:Ml,k4:Ml,kernelMatrix:Ol,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ml,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ml,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ml,overlineThickness:Ml,paintOrder:null,panose1:null,path:null,pathLength:Ml,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Nl,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ml,pointsAtY:Ml,pointsAtZ:Ml,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ol,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ol,rev:Ol,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ol,requiredFeatures:Ol,requiredFonts:Ol,requiredFormats:Ol,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ml,specularExponent:Ml,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ml,strikethroughThickness:Ml,string:null,stroke:null,strokeDashArray:Ol,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ml,strokeOpacity:Ml,strokeWidth:null,style:null,surfaceScale:Ml,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ol,tabIndex:Ml,tableValues:null,target:null,targetX:Ml,targetY:Ml,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ol,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ml,underlineThickness:Ml,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ml,values:null,vAlphabetic:Ml,vMathematical:Ml,vectorEffect:null,vHanging:Ml,vIdeographic:Ml,version:null,vertAdvY:Ml,vertOriginX:Ml,vertOriginY:Ml,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ml,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Bl}),Vl=Ll({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),$l=Ll({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:zl}),Hl=Ll({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),ql=wl([Fl,jl,Vl,$l,Hl],"html"),Kl=wl([Fl,Ul,Vl,$l,Hl],"svg"),Gl=/[A-Z]/g,Wl=/-[a-z]/g,Zl=/^data[-\w.:]+$/i;function Xl(e){return"-"+e.toLowerCase()}function Yl(e){return e.charAt(1).toUpperCase()}const Ql={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"};var Jl=w(598);const ec=nc("end"),tc=nc("start");function nc(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ic(e){return e&&"object"==typeof e?"position"in e||"type"in e?oc(e.position):"start"in e||"end"in e?oc(e):"line"in e||"column"in e?rc(e):"":""}function rc(e){return sc(e&&e.line)+":"+sc(e&&e.column)}function oc(e){return rc(e&&e.start)+"-"+rc(e&&e.end)}function sc(e){return e&&"number"==typeof e?e:1}class ac extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let i="",r={},o=!1;if(t&&(r="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?i=e:!r.cause&&e&&(o=!0,i=e.message,r.cause=e),!r.ruleId&&!r.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?r.ruleId=n:(r.source=n.slice(0,e),r.ruleId=n.slice(e+1))}if(!r.place&&r.ancestors&&r.ancestors){const e=r.ancestors[r.ancestors.length-1];e&&(r.place=e.position)}const s=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=ic(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=o&&r.cause&&"string"==typeof r.cause.stack?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ac.prototype.file="",ac.prototype.name="",ac.prototype.reason="",ac.prototype.message="",ac.prototype.stack="",ac.prototype.column=void 0,ac.prototype.line=void 0,ac.prototype.ancestors=void 0,ac.prototype.cause=void 0,ac.prototype.fatal=void 0,ac.prototype.place=void 0,ac.prototype.ruleId=void 0,ac.prototype.source=void 0;const lc={}.hasOwnProperty,cc=new Map,uc=/[A-Z]/g,dc=new Set(["table","tbody","thead","tfoot","tr"]),hc=new Set(["td","th"]),pc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fc(e,t,n){return"element"===t.type?function(e,t,n){const i=e.schema;let r=i;"svg"===t.tagName.toLowerCase()&&"html"===i.space&&(r=Kl,e.schema=r),e.ancestors.push(t);const o=vc(e,t.tagName,!1),s=function(e,t){const n={};let i,r;for(r in t.properties)if("children"!==r&&lc.call(t.properties,r)){const o=yc(e,r,t.properties[r]);if(o){const[r,s]=o;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof s&&hc.has(t.tagName)?i=s:n[r]=s}}return i&&((n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=i),n}(e,t);let a=bc(e,t);return dc.has(t.tagName)&&(a=a.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&vl(t.value):vl(t));var t})),mc(e,s,o,t),gc(s,a),e.ancestors.pop(),e.schema=i,e.create(t,o,s,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}xc(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const i=e.schema;let r=i;"svg"===t.name&&"html"===i.space&&(r=Kl,e.schema=r),e.ancestors.push(t);const o=null===t.name?e.Fragment:vc(e,t.name,!0),s=function(e,t){const n={};for(const i of t.attributes)if("mdxJsxExpressionAttribute"===i.type)if(i.data&&i.data.estree&&e.evaluater){const t=i.data.estree.body[0];hl(t.type);const r=t.expression;hl(r.type);const o=r.properties[0];hl(o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else xc(e,t.position);else{const r=i.name;let o;if(i.value&&"object"==typeof i.value)if(i.value.data&&i.value.data.estree&&e.evaluater){const t=i.value.data.estree.body[0];hl(t.type),o=e.evaluater.evaluateExpression(t.expression)}else xc(e,t.position);else o=null===i.value||i.value;n[r]=o}return n}(e,t),a=bc(e,t);return mc(e,s,o,t),gc(s,a),e.ancestors.pop(),e.schema=i,e.create(t,o,s,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xc(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const i={};return gc(i,bc(e,t)),e.create(t,e.Fragment,i,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function mc(e,t,n,i){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=i)}function gc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bc(e,t){const n=[];let i=-1;const r=e.passKeys?new Map:cc;for(;++i<t.children.length;){const o=t.children[i];let s;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=r.get(e)||0;s=e+"-"+t,r.set(e,t+1)}}const a=fc(e,o,s);void 0!==a&&n.push(a)}return n}function yc(e,t,n){const i=function(e,t){const n=_l(t);let i=t,r=kl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Zl.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Wl,Yl);i="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Wl.test(e)){let n=e.replace(Gl,Xl);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}r=Rl}return new r(i,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===i.property){let t="object"==typeof n?n:function(e,t){try{return Jl(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,i=new ac("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=pc+"#cannot-parse-style-attribute",i}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)lc.call(e,n)&&(t[wc(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&i.space?Ql[i.property]||i.property:i.attribute,n]}}function vc(e,t,n){let i;if(n)if(t.includes(".")){const e=t.split(".");let n,r=-1;for(;++r<e.length;){const t=bl(e[r])?{type:"Identifier",name:e[r]}:{type:"Literal",value:e[r]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(r&&"Literal"===t.type),optional:!1}:t}i=n}else i=bl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else i={type:"Literal",value:t};if("Literal"===i.type){const t=i.value;return lc.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(i);xc(e)}function xc(e,t){const n=new ac("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=pc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wc(e){let t=e.replace(uc,_c);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function _c(e){return"-"+e.toLowerCase()}const kc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ec={};function Sc(e,t){const n=t||Ec;return Ac(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function Ac(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cc(e.children,t,n)}return Array.isArray(e)?Cc(e,t,n):""}function Cc(e,t,n){const i=[];let r=-1;for(;++r<e.length;)i[r]=Ac(e[r],t,n);return i.join("")}function Mc(e,t,n,i){const r=e.length;let o,s=0;if(t=t<0?-t>r?0:r+t:t>r?r:t,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<i.length;)o=i.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function Nc(e,t){return e.length>0?(Mc(e,e.length,0,t),e):t}class Tc{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const i=t||0;this.setCursor(Math.trunc(e));const r=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Oc(this.left,n),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Oc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Oc(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Oc(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Oc(this.left,t.reverse())}}}function Oc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Dc(e){const t={};let n,i,r,o,s,a,l,c=-1;const u=new Tc(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(a=n[1]._tokenizer.events,r=0,r<a.length&&"lineEndingBlank"===a[r][1].type&&(r+=2),r<a.length&&"content"===a[r][1].type))for(;++r<a.length&&"content"!==a[r][1].type;)"chunkText"===a[r][1].type&&(a[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Ic(u,c)),c=t[c],l=!0);else if(n[1]._container){for(r=c,i=void 0;r--;)if(o=u.get(r),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=r);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;i&&(n[1].end={...u.get(i)[1].start},s=u.slice(i,c),s.unshift(n),u.splice(i,c-i+1,s))}}return Mc(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Ic(e,t){const n=e.get(t)[1],i=e.get(t)[2];let r=t-1;const o=[];let s=n._tokenizer;s||(s=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,l=[],c={};let u,d,h=-1,p=n,f=0,m=0;const g=[m];for(;p;){for(;e.get(++r)[1]!==p;);o.push(r),p._tokenizer||(u=i.sliceStream(p),p.next||u.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<a.length;)"exit"===a[h][0]&&"enter"===a[h-1][0]&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=a.slice(g[h],g[h+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),h=-1;++h<l.length;)c[f+l[h][0]]=f+l[h][1],f+=l[h][1]-l[h][0]-1;return c}const Rc={}.hasOwnProperty;function Pc(e){const t={};let n=-1;for(;++n<e.length;)Lc(t,e[n]);return t}function Lc(e,t){let n;for(n in t){const i=(Rc.call(e,n)?e[n]:void 0)||(e[n]={}),r=t[n];let o;if(r)for(o in r){Rc.call(i,o)||(i[o]=[]);const e=r[o];Fc(i[o],Array.isArray(e)?e:e?[e]:[])}}}function Fc(e,t){let n=-1;const i=[];for(;++n<t.length;)("after"===t[n].add?e:i).push(t[n]);Mc(e,0,0,i)}const Bc=Xc(/[A-Za-z]/),zc=Xc(/[\dA-Za-z]/),jc=Xc(/[#-'*+\--9=?A-Z^-~]/);function Uc(e){return null!==e&&(e<32||127===e)}const Vc=Xc(/\d/),$c=Xc(/[\dA-Fa-f]/),Hc=Xc(/[!-/:-@[-`{-~]/);function qc(e){return null!==e&&e<-2}function Kc(e){return null!==e&&(e<0||32===e)}function Gc(e){return-2===e||-1===e||32===e}const Wc=Xc(/\p{P}|\p{S}/u),Zc=Xc(/\s/);function Xc(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Yc(e,t,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let o=0;return function(i){return Gc(i)?(e.enter(n),s(i)):t(i)};function s(i){return Gc(i)&&o++<r?(e.consume(i),s):(e.exit(n),t(i))}}const Qc={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Yc(e,t,"linePrefix");e.consume(n)},function(t){return e.enter("paragraph"),i(t)});let n;return t;function i(t){const i=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=i),n=i,r(t)}function r(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):qc(t)?(e.consume(t),e.exit("chunkText"),i):(e.consume(t),r)}}},Jc={tokenize:function(e){const t=this,n=[];let i,r,o,s=0;return a;function a(i){if(s<n.length){const r=n[s];return t.containerState=r[1],e.attempt(r[0].continuation,l,c)(i)}return c(i)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const n=t.events.length;let r,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){r=t.events[o][1].end;break}b(s);let a=n;for(;a<t.events.length;)t.events[a][1].end={...r},a++;return Mc(t.events,o+1,0,t.events.slice(n)),t.events.length=a,c(e)}return a(e)}function c(r){if(s===n.length){if(!i)return h(r);if(i.currentConstruct&&i.currentConstruct.concrete)return f(r);t.interrupt=Boolean(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(eu,u,d)(r)}function u(e){return i&&y(),b(s),h(e)}function d(e){return t.parser.lazy[t.now().line]=s!==n.length,o=t.now().offset,f(e)}function h(n){return t.containerState={},e.attempt(eu,p,f)(n)}function p(e){return s++,n.push([t.currentConstruct,t.containerState]),h(e)}function f(n){return null===n?(i&&y(),b(0),void e.consume(n)):(i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:r}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),b(0),void e.consume(n)):qc(n)?(e.consume(n),g(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(n),m)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=r,r&&(r.next=e),r=e,i.defineSkip(e.start),i.write(a),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;const n=t.events.length;let r,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(r){a=t.events[l][1].end;break}r=!0}for(b(s),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;Mc(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(i){let r=n.length;for(;r-- >i;){const i=n[r];t.containerState=i[1],i[0].exit.call(t,e)}n.length=i}function y(){i.write([null]),r=void 0,i=void 0,t.containerState._closeFlow=void 0}}},eu={tokenize:function(e,t,n){return Yc(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},tu={partial:!0,tokenize:function(e,t,n){return function(t){return Gc(t)?Yc(e,i,"linePrefix")(t):i(t)};function i(e){return null===e||qc(e)?t(e):n(e)}}},nu={resolve:function(e){return Dc(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(t)};function i(t){return null===t?r(t):qc(t)?e.check(iu,o,r)(t):(e.consume(t),i)}function r(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}},iu={partial:!0,tokenize:function(e,t,n){const i=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Yc(e,r,"linePrefix")};function r(r){if(null===r||qc(r))return n(r);const o=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}},ru={tokenize:function(e){const t=this,n=e.attempt(tu,function(i){if(null!==i)return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(i)},e.attempt(this.parser.constructs.flowInitial,i,Yc(e,e.attempt(this.parser.constructs.flow,i,e.attempt(nu,i)),"linePrefix")));return n;function i(i){if(null!==i)return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(i)}}},ou={resolveAll:cu()},su=lu("string"),au=lu("text");function lu(e){return{resolveAll:cu("text"===e?uu:void 0),tokenize:function(t){const n=this,i=this.parser.constructs[e],r=t.attempt(i,o,s);return o;function o(e){return l(e)?r(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),r(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=i[e];let r=-1;if(t)for(;++r<t.length;){const e=t[r];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function cu(e){return function(t,n){let i,r=-1;for(;++r<=t.length;)void 0===i?t[r]&&"data"===t[r][1].type&&(i=r,r++):t[r]&&"data"===t[r][1].type||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function uu(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const i=e[n-1][1],r=t.sliceStream(i);let o,s=r.length,a=-1,l=0;for(;s--;){const e=r[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)o=!0,l++;else if(-1!==e){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const r={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:i.start._bufferIndex+a,_index:i.start._index+s,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...r.start},i.start.offset===i.end.offset?Object.assign(i,r):(e.splice(n,0,["enter",r,t],["exit",r,t]),n+=2)}n++}return e}const du={name:"thematicBreak",tokenize:function(e,t,n){let i,r=0;return function(t){return e.enter("thematicBreak"),function(e){return i=e,o(e)}(t)};function o(o){return o===i?(e.enter("thematicBreakSequence"),s(o)):r>=3&&(null===o||qc(o))?(e.exit("thematicBreak"),t(o)):n(o)}function s(t){return t===i?(e.consume(t),r++,s):(e.exit("thematicBreakSequence"),Gc(t)?Yc(e,o,"whitespace")(t):o(t))}}},hu={continuation:{tokenize:function(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(tu,function(n){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Yc(e,t,"listItemIndent",i.containerState.size+1)(n)},function(n){return i.containerState.furtherBlankLines||!Gc(n)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(n)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(fu,t,r)(n))});function r(r){return i.containerState._closeFlow=!0,i.interrupt=void 0,Yc(e,e.attempt(hu,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const i=this,r=i.events[i.events.length-1];let o=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,s=0;return function(t){const r=i.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===r?!i.containerState.marker||t===i.containerState.marker:Vc(t)){if(i.containerState.type||(i.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===t||45===t?e.check(du,n,l)(t):l(t);if(!i.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return Vc(t)&&++s<10?(e.consume(t),a):(!i.interrupt||s<2)&&(i.containerState.marker?t===i.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||t,e.check(tu,i.interrupt?n:c,e.attempt(pu,d,u))}function c(e){return i.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return Gc(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},pu={partial:!0,tokenize:function(e,t,n){const i=this;return Yc(e,function(e){const r=i.events[i.events.length-1];return!Gc(e)&&r&&"listItemPrefixWhitespace"===r[1].type?t(e):n(e)},"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},fu={partial:!0,tokenize:function(e,t,n){const i=this;return Yc(e,function(e){const r=i.events[i.events.length-1];return r&&"listItemIndent"===r[1].type&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(e):n(e)},"listItemIndent",i.containerState.size+1)}},mu={continuation:{tokenize:function(e,t,n){const i=this;return function(t){return Gc(t)?Yc(e,r,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):r(t)};function r(i){return e.attempt(mu,t,n)(i)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const i=this;return function(t){if(62===t){const n=i.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),r}return n(t)};function r(n){return Gc(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};function gu(e,t,n,i,r,o,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(i),e.enter(r),e.enter(o),e.consume(t),e.exit(o),d):null===t||32===t||41===t||Uc(t)?n(t):(e.enter(i),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t))};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),e.exit(i),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||qc(t)?n(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function f(r){return u||null!==r&&41!==r&&!Kc(r)?u<c&&40===r?(e.consume(r),u++,f):41===r?(e.consume(r),u--,f):null===r||32===r||40===r||Uc(r)?n(r):(e.consume(r),92===r?m:f):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(i),t(r))}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function bu(e,t,n,i,r,o){const s=this;let a,l=0;return function(t){return e.enter(i),e.enter(r),e.consume(t),e.exit(r),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):93===d?(e.exit(o),e.enter(r),e.consume(d),e.exit(r),e.exit(i),t):qc(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||qc(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!Gc(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function yu(e,t,n,i,r,o){let s;return function(t){return 34===t||39===t||40===t?(e.enter(i),e.enter(r),e.consume(t),e.exit(r),s=40===t?41:t,a):n(t)};function a(n){return n===s?(e.enter(r),e.consume(n),e.exit(r),e.exit(i),t):(e.enter(o),l(n))}function l(t){return t===s?(e.exit(o),a(s)):null===t?n(t):qc(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Yc(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||qc(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===s||92===t?(e.consume(t),c):c(t)}}function vu(e,t){let n;return function i(r){return qc(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,i):Gc(r)?Yc(e,i,n?"linePrefix":"lineSuffix")(r):t(r)}}function xu(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wu={name:"definition",tokenize:function(e,t,n){const i=this;let r;return function(t){return e.enter("definition"),function(t){return bu.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return r=xu(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return Kc(t)?vu(e,a)(t):a(t)}function a(t){return gu(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(_u,c,c)(t)}function c(t){return Gc(t)?Yc(e,u,"whitespace")(t):u(t)}function u(o){return null===o||qc(o)?(e.exit("definition"),i.parser.defined.push(r),t(o)):n(o)}}},_u={partial:!0,tokenize:function(e,t,n){return function(t){return Kc(t)?vu(e,i)(t):n(t)};function i(t){return yu(e,r,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function r(t){return Gc(t)?Yc(e,o,"whitespace")(t):o(t)}function o(e){return null===e||qc(e)?t(e):n(e)}}},ku={name:"codeIndented",tokenize:function(e,t,n){const i=this;return function(t){return e.enter("codeIndented"),Yc(e,r,"linePrefix",5)(t)};function r(e){const t=i.events[i.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?a(t):qc(t)?e.attempt(Eu,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||qc(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}},Eu={partial:!0,tokenize:function(e,t,n){const i=this;return r;function r(t){return i.parser.lazy[i.now().line]?n(t):qc(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r):Yc(e,o,"linePrefix",5)(t)}function o(e){const o=i.events[i.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):qc(e)?r(e):n(e)}}},Su={name:"headingAtx",resolve:function(e,t){let n,i,r=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),r-2>o&&"whitespace"===e[r][1].type&&(r-=2),"atxHeadingSequence"===e[r][1].type&&(o===r-1||r-4>o&&"whitespace"===e[r-2][1].type)&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},i={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},Mc(e,o,r-o+1,[["enter",n,t],["enter",i,t],["exit",i,t],["exit",n,t]])),e},tokenize:function(e,t,n){let i=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),r(t)}(t)};function r(t){return 35===t&&i++<6?(e.consume(t),r):null===t||Kc(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||qc(n)?(e.exit("atxHeading"),t(n)):Gc(n)?Yc(e,o,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function a(t){return null===t||35===t||Kc(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),a)}}},Au={name:"setextUnderline",resolveTo:function(e,t){let n,i,r,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(i=o)}else"content"===e[o][1].type&&e.splice(o,1),r||"definition"!==e[o][1].type||(r=o);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",r?(e.splice(i,0,["enter",s,t]),e.splice(r+1,0,["exit",e[n][1],t]),e[n][1].end={...e[r][1].end}):e[n][1]=s,e.push(["exit",s,t]),e},tokenize:function(e,t,n){const i=this;let r;return function(t){let s,a=i.events.length;for(;a--;)if("lineEnding"!==i.events[a][1].type&&"linePrefix"!==i.events[a][1].type&&"content"!==i.events[a][1].type){s="paragraph"===i.events[a][1].type;break}return i.parser.lazy[i.now().line]||!i.interrupt&&!s?n(t):(e.enter("setextHeadingLine"),r=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t))};function o(t){return t===r?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),Gc(t)?Yc(e,s,"lineSuffix")(t):s(t))}function s(i){return null===i||qc(i)?(e.exit("setextHeadingLine"),t(i)):n(i)}}},Cu=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Mu=["pre","script","style","textarea"],Nu={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(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},tokenize:function(e,t,n){const i=this;let r,o,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),o=!0,p):63===a?(e.consume(a),r=3,i.interrupt?t:R):Bc(a)?(e.consume(a),s=String.fromCharCode(a),f):n(a)}function u(o){return 45===o?(e.consume(o),r=2,d):91===o?(e.consume(o),r=5,a=0,h):Bc(o)?(e.consume(o),r=4,i.interrupt?t:R):n(o)}function d(r){return 45===r?(e.consume(r),i.interrupt?t:R):n(r)}function h(r){return r==="CDATA[".charCodeAt(a++)?(e.consume(r),6===a?i.interrupt?t:A:h):n(r)}function p(t){return Bc(t)?(e.consume(t),s=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||Kc(a)){const l=47===a,c=s.toLowerCase();return l||o||!Mu.includes(c)?Cu.includes(s.toLowerCase())?(r=6,l?(e.consume(a),m):i.interrupt?t(a):A(a)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(a):o?g(a):b(a)):(r=1,i.interrupt?t(a):A(a))}return 45===a||zc(a)?(e.consume(a),s+=String.fromCharCode(a),f):n(a)}function m(r){return 62===r?(e.consume(r),i.interrupt?t:A):n(r)}function g(t){return Gc(t)?(e.consume(t),g):E(t)}function b(t){return 47===t?(e.consume(t),E):58===t||95===t||Bc(t)?(e.consume(t),y):Gc(t)?(e.consume(t),b):E(t)}function y(t){return 45===t||46===t||58===t||95===t||zc(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),x):Gc(t)?(e.consume(t),v):b(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):Gc(t)?(e.consume(t),x):_(t)}function w(t){return t===l?(e.consume(t),l=null,k):null===t||qc(t)?n(t):(e.consume(t),w)}function _(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Kc(t)?v(t):(e.consume(t),_)}function k(e){return 47===e||62===e||Gc(e)?b(e):n(e)}function E(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||qc(t)?A(t):Gc(t)?(e.consume(t),S):n(t)}function A(t){return 45===t&&2===r?(e.consume(t),T):60===t&&1===r?(e.consume(t),O):62===t&&4===r?(e.consume(t),P):63===t&&3===r?(e.consume(t),R):93===t&&5===r?(e.consume(t),I):!qc(t)||6!==r&&7!==r?null===t||qc(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),A):(e.exit("htmlFlowData"),e.check(Tu,L,C)(t))}function C(t){return e.check(Ou,M,L)(t)}function M(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||qc(t)?C(t):(e.enter("htmlFlowData"),A(t))}function T(t){return 45===t?(e.consume(t),R):A(t)}function O(t){return 47===t?(e.consume(t),s="",D):A(t)}function D(t){if(62===t){const n=s.toLowerCase();return Mu.includes(n)?(e.consume(t),P):A(t)}return Bc(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),D):A(t)}function I(t){return 93===t?(e.consume(t),R):A(t)}function R(t){return 62===t?(e.consume(t),P):45===t&&2===r?(e.consume(t),R):A(t)}function P(t){return null===t||qc(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),P)}function L(n){return e.exit("htmlFlow"),t(n)}}},Tu={partial:!0,tokenize:function(e,t,n){return function(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(tu,t,n)}}},Ou={partial:!0,tokenize:function(e,t,n){const i=this;return function(t){return qc(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r):n(t)};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}}},Du={partial:!0,tokenize:function(e,t,n){const i=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r)};function r(e){return i.parser.lazy[i.now().line]?n(e):t(e)}}},Iu={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const i=this,r={partial:!0,tokenize:function(e,t,n){let r=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s};function s(t){return e.enter("codeFencedFence"),Gc(t)?Yc(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(r++,e.consume(t),c):r>=a?(e.exit("codeFencedFenceSequence"),Gc(t)?Yc(e,u,"whitespace")(t):u(t)):n(t)}function u(i){return null===i||qc(i)?(e.exit("codeFencedFence"),t(i)):n(i)}}};let o,s=0,a=0;return function(t){return function(t){const n=i.events[i.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(a++,e.consume(t),l):a<3?n(t):(e.exit("codeFencedFenceSequence"),Gc(t)?Yc(e,c,"whitespace")(t):c(t))}function c(n){return null===n||qc(n)?(e.exit("codeFencedFence"),i.interrupt?t(n):e.check(Du,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||qc(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Gc(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Yc(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||qc(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||qc(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),h)}function p(t){return e.attempt(r,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&Gc(t)?Yc(e,g,"linePrefix",s+1)(t):g(t)}function g(t){return null===t||qc(t)?e.check(Du,p,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||qc(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}}},Ru=document.createElement("i");function Pu(e){const t="&"+e+";";Ru.innerHTML=t;const n=Ru.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}const Lu={name:"characterReference",tokenize:function(e,t,n){const i=this;let r,o,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,o=zc,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,o=$c,c):(e.enter("characterReferenceValue"),r=7,o=Vc,c(t))}function c(a){if(59===a&&s){const r=e.exit("characterReferenceValue");return o!==zc||Pu(i.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return o(a)&&s++<r?(e.consume(a),c):n(a)}}},Fu={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),i};function i(i){return Hc(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}},Bu={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Yc(e,t,"linePrefix")}}};function zu(e,t,n){const i=[];let r=-1;for(;++r<e.length;){const o=e[r].resolveAll;o&&!i.includes(o)&&(t=o(t,n),i.push(o))}return t}const ju={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),"labelImage"===i.type||"labelLink"===i.type||"labelEnd"===i.type){const e="labelImage"===i.type?4:2;i.type="data",t+=e}}return e.length!==n.length&&Mc(e,0,e.length,n),e},resolveTo:function(e,t){let n,i,r,o,s=e.length,a=0;for(;s--;)if(n=e[s][1],i){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(r){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(i=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(r=s);const l={type:"labelLink"===e[i][1].type?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[r][1].end}},u={type:"labelText",start:{...e[i+a+2][1].end},end:{...e[r-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Nc(o,e.slice(i+1,i+a+3)),o=Nc(o,[["enter",u,t]]),o=Nc(o,zu(t.parser.constructs.insideSpan.null,e.slice(i+a+4,r-3),t)),o=Nc(o,[["exit",u,t],e[r-2],e[r-1],["exit",c,t]]),o=Nc(o,e.slice(r+1)),o=Nc(o,[["exit",l,t]]),Mc(e,i,e.length,o),e},tokenize:function(e,t,n){const i=this;let r,o,s=i.events.length;for(;s--;)if(("labelImage"===i.events[s][1].type||"labelLink"===i.events[s][1].type)&&!i.events[s][1]._balanced){r=i.events[s][1];break}return function(t){return r?r._inactive?u(t):(o=i.parser.defined.includes(xu(i.sliceSerialize({start:r.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(Uu,c,o?c:u)(t):91===t?e.attempt(Vu,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt($u,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}}},Uu={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),i};function i(t){return Kc(t)?vu(e,r)(t):r(t)}function r(t){return 41===t?c(t):gu(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Kc(t)?vu(e,a)(t):c(t)}function s(e){return n(e)}function a(t){return 34===t||39===t||40===t?yu(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Kc(t)?vu(e,c)(t):c(t)}function c(i){return 41===i?(e.enter("resourceMarker"),e.consume(i),e.exit("resourceMarker"),e.exit("resource"),t):n(i)}}},Vu={tokenize:function(e,t,n){const i=this;return function(t){return bu.call(i,e,r,o,"reference","referenceMarker","referenceString")(t)};function r(e){return i.parser.defined.includes(xu(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},$u={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),i};function i(i){return 93===i?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}},Hu={name:"labelStartImage",resolveAll:ju.resolveAll,tokenize:function(e,t,n){const i=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),r};function r(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?n(e):t(e)}}};function qu(e){return null===e||Kc(e)||Zc(e)?1:Wc(e)?2:void 0}const Ku={name:"attention",resolveAll:function(e,t){let n,i,r,o,s,a,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},h={...e[u][1].start};Gu(d,-a),Gu(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:h},r={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[n][1].end={...o.start},e[u][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Nc(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Nc(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",r,t]]),l=Nc(l,zu(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Nc(l,[["exit",r,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Nc(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Mc(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,r=qu(i);let o;return function(t){return o=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===o)return e.consume(a),s;const l=e.exit("attentionSequence"),c=qu(a),u=!c||2===c&&r||n.includes(a),d=!r||2===r&&c||n.includes(i);return l._open=Boolean(42===o?u:u&&(r||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(a)}}};function Gu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Wu={name:"autolink",tokenize:function(e,t,n){let i=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r};function r(t){return Bc(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||zc(e)?(i=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),i=0,a):(43===t||45===t||46===t||zc(t))&&i++<32?(e.consume(t),s):(i=0,l(t))}function a(i){return 62===i?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):null===i||32===i||60===i||Uc(i)?n(i):(e.consume(i),a)}function l(t){return 64===t?(e.consume(t),c):jc(t)?(e.consume(t),l):n(t)}function c(e){return zc(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),i=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||zc(t))&&i++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},Zu={name:"htmlText",tokenize:function(e,t,n){const i=this;let r,o,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),y):Bc(t)?(e.consume(t),k):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,p):Bc(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),h):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):qc(t)?(s=u,D(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),h):u(t)}function h(e){return 62===e?O(e):45===e?d(e):u(e)}function p(t){return t==="CDATA[".charCodeAt(o++)?(e.consume(t),6===o?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):qc(t)?(s=f,D(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):f(t)}function b(t){return null===t||62===t?O(t):qc(t)?(s=b,D(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):qc(t)?(s=y,D(t)):(e.consume(t),y)}function v(e){return 62===e?O(e):y(e)}function x(t){return Bc(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||zc(t)?(e.consume(t),w):_(t)}function _(t){return qc(t)?(s=_,D(t)):Gc(t)?(e.consume(t),_):O(t)}function k(t){return 45===t||zc(t)?(e.consume(t),k):47===t||62===t||Kc(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),O):58===t||95===t||Bc(t)?(e.consume(t),S):qc(t)?(s=E,D(t)):Gc(t)?(e.consume(t),E):O(t)}function S(t){return 45===t||46===t||58===t||95===t||zc(t)?(e.consume(t),S):A(t)}function A(t){return 61===t?(e.consume(t),C):qc(t)?(s=A,D(t)):Gc(t)?(e.consume(t),A):E(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,M):qc(t)?(s=C,D(t)):Gc(t)?(e.consume(t),C):(e.consume(t),N)}function M(t){return t===r?(e.consume(t),r=void 0,T):null===t?n(t):qc(t)?(s=M,D(t)):(e.consume(t),M)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Kc(t)?E(t):(e.consume(t),N)}function T(e){return 47===e||62===e||Kc(e)?E(e):n(e)}function O(i){return 62===i?(e.consume(i),e.exit("htmlTextData"),e.exit("htmlText"),t):n(i)}function D(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return Gc(t)?Yc(e,R,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):R(t)}function R(t){return e.enter("htmlTextData"),s(t)}}},Xu={name:"labelStartLink",resolveAll:ju.resolveAll,tokenize:function(e,t,n){const i=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),r};function r(e){return 94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?n(e):t(e)}}},Yu={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),i};function i(i){return qc(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}},Qu={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,i=e.length-4,r=3;if(!("lineEnding"!==e[r][1].type&&"space"!==e[r][1].type||"lineEnding"!==e[i][1].type&&"space"!==e[i][1].type))for(t=r;++t<i;)if("codeTextData"===e[t][1].type){e[r][1].type="codeTextPadding",e[i][1].type="codeTextPadding",r+=2,i-=2;break}for(t=r-1,i++;++t<=i;)void 0===n?t!==i&&"lineEnding"!==e[t][1].type&&(n=t):t!==i&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),i-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let i,r,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),o++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(r=e.enter("codeTextSequence"),i=0,c(t)):qc(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||qc(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),i++,c):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(r.type="codeTextData",l(n))}}},Ju={42:hu,43:hu,45:hu,48:hu,49:hu,50:hu,51:hu,52:hu,53:hu,54:hu,55:hu,56:hu,57:hu,62:mu},ed={91:wu},td={[-2]:ku,[-1]:ku,32:ku},nd={35:Su,42:du,45:[Au,du],60:Nu,61:Au,95:du,96:Iu,126:Iu},id={38:Lu,92:Fu},rd={[-5]:Bu,[-4]:Bu,[-3]:Bu,33:Hu,38:Lu,42:Ku,60:[Wu,Zu],91:Xu,92:[Yu,Fu],93:ju,95:Ku,96:Qu},od={null:[Ku,ou]},sd={null:[42,95]},ad={null:[]};function ld(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const r={},o=[];let s=[],a=[],l=!0;const c={attempt:b(function(e,t){y(e,t.from)}),check:b(g),consume:function(e){qc(e)?(i.line++,i.column=1,i.offset+=-3===e?2:1,v()):-1!==e&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===s[i._index].length&&(i._bufferIndex=-1,i._index++)),u.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:b(g,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){r[e.line]=e.column,v()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const i=[];let r;for(;++n<e.length;){const o=e[n];let s;if("string"==typeof o)s=o;else switch(o){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&r)continue;s=" ";break;default:s=String.fromCharCode(o)}r=-2===o,i.push(s)}return i.join("")}(p(e),t)},sliceStream:p,write:function(e){return s=Nc(s,e),function(){let e;for(;i._index<s.length;){const t=s[i._index];if("string"==typeof t)for(e=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===e&&i._bufferIndex<t.length;)m(t.charCodeAt(i._bufferIndex));else m(t)}}(),null!==s[s.length-1]?[]:(y(t,0),u.events=zu(o,u.events,u),u.events)}};let d,h=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function p(e){return function(e,t){const n=t.start._index,i=t.start._bufferIndex,r=t.end._index,o=t.end._bufferIndex;let s;if(n===r)s=[e[n].slice(i,o)];else{if(s=e.slice(n,r),i>-1){const e=s[0];"string"==typeof e?s[0]=e.slice(i):s.shift()}o>0&&s.push(e[r].slice(0,o))}return s}(s,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:r,offset:o}=i;return{_bufferIndex:e,_index:t,line:n,column:r,offset:o}}function m(e){l=void 0,d=e,h=h(e)}function g(e,t){t.restore()}function b(e,t){return function(n,r,o){let s,d,h,p;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):function(e){return function(t){const n=null!==t&&e[t],i=null!==t&&e.null;return m([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(i)?i:i?[i]:[]])(t)}}(n);function m(e){return s=e,d=0,0===e.length?o:g(e[d])}function g(e){return function(n){return p=function(){const e=f(),t=u.previous,n=u.currentConstruct,r=u.events.length,o=Array.from(a);return{from:r,restore:function(){i=e,u.previous=t,u.currentConstruct=n,u.events.length=r,a=o,v()}}}(),h=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name)?y():e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,b,y)(n)}}function b(t){return l=!0,e(h,p),r}function y(e){return l=!0,p.restore(),++d<s.length?g(s[d]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Mc(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function v(){i.line in r&&i.column<2&&(i.column=r[i.line],i.offset+=r[i.line]-1)}}const cd=/[\0\t\n\r]/g;function ud(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}const dd=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hd(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ud(n.slice(t?2:1),t?16:10)}return Pu(n)||e}const pd={}.hasOwnProperty;function fd(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(y),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(m),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(f),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:r(f,o),codeText:r(function(){return{type:"inlineCode",value:""}},o),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(g),hardBreakTrailing:r(g),htmlFlow:r(b,o),htmlFlowData:u,htmlText:r(b,o),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:o,link:r(y),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(v,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(v),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:r(m),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:a(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:a(),autolinkEmail:function(e){d.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){d.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:a(),characterEscapeValue:d,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let i;n?(i=ud(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):i=Pu(t);this.stack[this.stack.length-1].value+=i},characterReference:function(e){this.stack.pop().position.end=md(e.end)},codeFenced:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:d,codeIndented:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:a(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=xu(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:a(),hardBreakEscape:a(h),hardBreakTrailing:a(h),htmlFlow:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:a(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:a(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(dd,hd)}(t),n.identifier=xu(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=md(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),d.call(this,e))},link:a(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=xu(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:a(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:a(),thematicBreak:a()}};gd(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let r={type:"root",children:[]};const a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},u=[];let d=-1;for(;++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?u.push(d):d=i(e,u.pop(),d));for(d=-1;++d<e.length;){const n=t[e[d][0]];pd.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||yd).call(a,void 0,e[0])}for(r.position={start:md(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:md(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r};function i(e,t,n){let i,r,o,s,a=t-1,l=-1,c=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!i||s||l||o||(o=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(i){let s=a;for(r=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;r&&(e[r][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",r=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!r||o<r)&&(i._spread=!0),i.end=Object.assign({},r?e[r][1].start:t[1].end),e.splice(r||a,0,["exit",i,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const r={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};i=r,e.splice(a,0,["enter",r,t[2]]),a++,n++,o=void 0,s=!0}}}return e[t][1]._spread=c,n}function r(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:md(t.start),end:void 0}}function a(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),i=this.tokenStack.pop();if(!i)throw new Error("Cannot close `"+e.type+"` ("+ic({start:e.start,end:e.end})+"): it’s not open");i[0].type!==e.type&&(t?t.call(this,e,i[0]):(i[1]||yd).call(this,e,i[0])),n.position.end=md(e.end)}function c(){return Sc(this.stack.pop())}function u(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:md(e.start),end:void 0},t.push(n)),this.stack.push(n)}function d(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=md(e.end)}function h(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"heading",depth:0,children:[]}}function g(){return{type:"break"}}function b(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function v(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!Dc(e););return e}(function(e){const t={constructs:Pc([k,...(e||{}).extensions||[]]),content:n(Qc),defined:[],document:n(Jc),flow:n(ru),lazy:{},string:n(su),text:n(au)};return t;function n(e){return function(n){return ld(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",i=!0;return function(r,o,s){const a=[];let l,c,u,d,h;for(r=n+("string"==typeof r?r.toString():new TextDecoder(o||void 0).decode(r)),u=0,n="",i&&(65279===r.charCodeAt(0)&&u++,i=void 0);u<r.length;){if(cd.lastIndex=u,l=cd.exec(r),d=l&&void 0!==l.index?l.index:r.length,h=r.charCodeAt(d),!l){n=r.slice(u);break}if(10===h&&u===d&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),u<d&&(a.push(r.slice(u,d)),t+=d-u),h){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return s&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function md(e){return{line:e.line,column:e.column,offset:e.offset}}function gd(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?gd(e,i):bd(e,i)}}function bd(e,t){let n;for(n in t)if(pd.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function yd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ic({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ic({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ic({start:t.start,end:t.end})+") is still open")}function vd(e){const t=this;t.parser=function(n){return fd(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const xd="object"==typeof self?self:globalThis,wd=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),i=r=>{if(e.has(r))return e.get(r);const[o,s]=t[r];switch(o){case 0:case-1:return n(s,r);case 1:{const e=n([],r);for(const t of s)e.push(i(t));return e}case 2:{const e=n({},r);for(const[t,n]of s)e[i(t)]=i(n);return e}case 3:return n(new Date(s),r);case 4:{const{source:e,flags:t}=s;return n(new RegExp(e,t),r)}case 5:{const e=n(new Map,r);for(const[t,n]of s)e.set(i(t),i(n));return e}case 6:{const e=n(new Set,r);for(const t of s)e.add(i(t));return e}case 7:{const{name:e,message:t}=s;return n(new xd[e](t),r)}case 8:return n(BigInt(s),r);case"BigInt":return n(Object(BigInt(s)),r);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:e}=new Uint8Array(s);return n(new DataView(e),s)}}return n(new xd[o](s),r)};return i})(new Map,e)(0),_d="",{toString:kd}={},{keys:Ed}=Object,Sd=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=kd.call(e).slice(8,-1);switch(n){case"Array":return[1,_d];case"Object":return[2,_d];case"Date":return[3,_d];case"RegExp":return[4,_d];case"Map":return[5,_d];case"Set":return[6,_d];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Ad=([e,t])=>0===e&&("function"===t||"symbol"===t),Cd=(e,{json:t,lossy:n}={})=>{const i=[];return((e,t,n,i)=>{const r=(e,t)=>{const r=i.push(e)-1;return n.set(t,r),r},o=i=>{if(n.has(i))return n.get(i);let[s,a]=Sd(i);switch(s){case 0:{let t=i;switch(a){case"bigint":s=8,t=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return r([-1],i)}return r([s,t],i)}case 1:{if(a){let e=i;return"DataView"===a?e=new Uint8Array(i.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(i)),r([a,[...e]],i)}const e=[],t=r([s,e],i);for(const t of i)e.push(o(t));return t}case 2:{if(a)switch(a){case"BigInt":return r([a,i.toString()],i);case"Boolean":case"Number":case"String":return r([a,i.valueOf()],i)}if(t&&"toJSON"in i)return o(i.toJSON());const n=[],l=r([s,n],i);for(const t of Ed(i))!e&&Ad(Sd(i[t]))||n.push([o(t),o(i[t])]);return l}case 3:return r([s,i.toISOString()],i);case 4:{const{source:e,flags:t}=i;return r([s,{source:e,flags:t}],i)}case 5:{const t=[],n=r([s,t],i);for(const[n,r]of i)(e||!Ad(Sd(n))&&!Ad(Sd(r)))&&t.push([o(n),o(r)]);return n}case 6:{const t=[],n=r([s,t],i);for(const n of i)!e&&Ad(Sd(n))||t.push(o(n));return n}}const{message:l}=i;return r([s,{name:a,message:l}],i)};return o})(!(t||n),!!t,new Map,i)(e),i},Md="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?wd(Cd(e,t)):structuredClone(e):(e,t)=>wd(Cd(e,t));function Nd(e){const t=[];let n=-1,i=0,r=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(37===o&&zc(e.charCodeAt(n+1))&&zc(e.charCodeAt(n+2)))r=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),r=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(i,n),encodeURIComponent(s)),i=n+r+1,s=""),r&&(n+=r,r=0)}return t.join("")+e.slice(i)}function Td(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Od(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Dd=function(e){if(null==e)return Rd;if("function"==typeof e)return Id(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dd(e[n]);return Id(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return Id(function(n){const i=n;let r;for(r in e)if(i[r]!==t[r])return!1;return!0})}(e);if("string"==typeof e)return t=e,Id(function(e){return e&&e.type===t});var t;throw new Error("Expected function, string, or object as test")};function Id(e){return function(t,n,i){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,i||void 0))}}function Rd(){return!0}const Pd=[],Ld=!1;function Fd(e,t,n,i){let r;"function"==typeof t&&"function"!=typeof n?(i=n,n=t):r=t;const o=Dd(r),s=i?-1:1;!function e(r,a,l){const c=r&&"object"==typeof r?r:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+r.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,h=Pd;if((!t||o(r,a,l[l.length-1]||void 0))&&(h=function(e){return Array.isArray(e)?e:"number"==typeof e?[true,e]:null==e?Pd:[e]}(n(r,l)),h[0]===Ld))return h;if("children"in r&&r.children){const t=r;if(t.children&&"skip"!==h[0])for(u=(i?t.children.length:-1)+s,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Ld)return c;u="number"==typeof c[1]?c[1]:u+s}}return h}}(e,void 0,[])()}function Bd(e,t,n,i){let r,o,s;"function"==typeof t&&"function"!=typeof n?(o=void 0,s=t,r=n):(o=t,s=n,r=i),Fd(e,o,function(e,t){const n=t[t.length-1],i=n?n.children.indexOf(e):void 0;return s(e,i,n)},r)}function zd(e,t){const n=t.referenceType;let i="]";if("collapsed"===n?i+="[]":"full"===n&&(i+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+i}];const r=e.all(t),o=r[0];o&&"text"===o.type?o.value="["+o.value:r.unshift({type:"text",value:"["});const s=r[r.length-1];return s&&"text"===s.type?s.value+=i:r.push({type:"text",value:i}),r}function jd(e){const t=e.spread;return null==t?e.children.length>1:t}function Ud(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),r=0;const o=[];for(;i;)o.push(Vd(t.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=n.exec(t);return o.push(Vd(t.slice(r),r>0,!1)),o.join("")}function Vd(e,t,n){let i=0,r=e.length;if(t){let t=e.codePointAt(i);for(;9===t||32===t;)i++,t=e.codePointAt(i)}if(n){let t=e.codePointAt(r-1);for(;9===t||32===t;)r--,t=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}const $d={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",i={};t.lang&&(i.className=["language-"+t.lang]);let r={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),r=Nd(i.toLowerCase()),o=e.footnoteOrder.indexOf(i);let s,a=e.footnoteCounts.get(i);void 0===a?(a=0,e.footnoteOrder.push(i),s=e.footnoteOrder.length):s=o+1,a+=1,e.footnoteCounts.set(i,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return zd(e,t);const r={src:Nd(i.url||""),alt:t.alt};null!==i.title&&void 0!==i.title&&(r.title=i.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:Nd(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return zd(e,t);const r={href:Nd(i.url||"")};null!==i.title&&void 0!==i.title&&(r.title=i.title);const o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:Nd(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},listItem:function(e,t,n){const i=e.all(t),r=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=jd(n[i])}return t}(n):jd(t),o={},s=[];if("boolean"==typeof t.checked){const e=i[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},i.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<i.length;){const e=i[a];(r||0!==a||"element"!==e.type||"p"!==e.tagName)&&s.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||r?s.push(e):s.push(...e.children)}const l=i[i.length-1];l&&(r||"element"!==l.type||"p"!==l.tagName)&&s.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},i=e.all(t);let r=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++r<i.length;){const e=i[r];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),i=n.shift(),r=[];if(i){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],n),r.push(n)}if(n.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=tc(t.children[1]),s=ec(t.children[t.children.length-1]);o&&s&&(i.position={start:o,end:s}),r.push(i)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const i=n?n.children:void 0,r=0===(i?i.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const l=[];for(;++a<s;){const n=t.children[a],i={},s=o?o[a]:void 0;s&&(i.align=s);let c={type:"element",tagName:r,properties:i,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Ud(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Hd,yaml:Hd,definition:Hd,footnoteDefinition:Hd};function Hd(){}const qd={}.hasOwnProperty,Kd={};function Gd(e,t){e.position&&(t.position=function(e){const t=tc(e),n=ec(e);if(t&&n)return{start:t,end:n}}(e))}function Wd(e,t){let n=t;if(e&&e.data){const t=e.data.hName,i=e.data.hChildren,r=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&r&&Object.assign(n.properties,Md(r)),"children"in n&&n.children&&null!=i&&(n.children=i)}return n}function Zd(e,t){const n=t.data||{},i=!("value"in t)||qd.call(n,"hProperties")||qd.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,i),e.applyData(t,i)}function Xd(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:"\n"});++i<e.length;)i&&n.push({type:"text",value:"\n"}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Yd(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qd(e,t){const n=function(e,t){const n=t||Kd,i=new Map,r=new Map,o=new Map,s={...$d,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let i=-1;for(;++i<n.length;){const r=a.one(n[i],e);if(r){if(i&&"break"===n[i-1].type&&(Array.isArray(r)||"text"!==r.type||(r.value=Yd(r.value)),!Array.isArray(r)&&"element"===r.type)){const e=r.children[0];e&&"text"===e.type&&(e.value=Yd(e.value))}Array.isArray(r)?t.push(...r):t.push(r)}}}return t},applyData:Wd,definitionById:i,footnoteById:r,footnoteCounts:o,footnoteOrder:[],handlers:s,one:function(e,t){const n=e.type,i=a.handlers[n];if(qd.call(a.handlers,n)&&i)return i(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,i=Md(n);return i.children=a.all(e),i}return Md(e)}return(a.options.unknownHandler||Zd)(a,e,t)},options:n,patch:Gd,wrap:Xd};return Bd(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?i:r,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}(e,t),i=n.one(e,void 0),r=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Td,i=e.options.footnoteBackLabel||Od,r=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const r=e.footnoteById.get(e.footnoteOrder[l]);if(!r)continue;const o=e.all(r),s=String(r.identifier).toUpperCase(),c=Nd(s.toLowerCase());let u=0;const d=[],h=e.footnoteCounts.get(s);for(;void 0!==h&&++u<=h;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof i?i:i(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else o.push(...d);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(r,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Md(s),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&o.children.push({type:"text",value:"\n"},r),o}function Jd(e,t){return e&&"run"in e?async function(n,i){const r=Qd(n,{file:i,...t});await e.run(r,i)}:function(n,i){return Qd(n,{file:i,...e||t})}}function eh(e){if(e)throw e}var th=w(710);function nh(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}const ih=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');lh(e);let n,i=0,r=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){i=o+1;break}}else r<0&&(n=!0,r=o+1);return r<0?"":e.slice(i,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){i=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.codePointAt(o)===t.codePointAt(a--)?a<0&&(r=o):(a=-1,r=s));return i===r?r=s:r<0&&(r=e.length),e.slice(i,r)},rh=function(e){if(lh(e),0===e.length)return".";let t,n=-1,i=e.length;for(;--i;)if(47===e.codePointAt(i)){if(t){n=i;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},oh=function(e){lh(e);let t,n=e.length,i=-1,r=0,o=-1,s=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)i<0&&(t=!0,i=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1);else if(t){r=n+1;break}}return o<0||i<0||0===s||1===s&&o===i-1&&o===r+1?"":e.slice(o,i)},sh=function(...e){let t,n=-1;for(;++n<e.length;)lh(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){lh(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,i,r="",o=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(r.length<2||2!==o||46!==r.codePointAt(r.length-1)||46!==r.codePointAt(r.length-2))if(r.length>2){if(i=r.lastIndexOf("/"),i!==r.length-1){i<0?(r="",o=0):(r=r.slice(0,i),o=r.length-1-r.lastIndexOf("/")),s=l,a=0;continue}}else if(r.length>0){r="",o=0,s=l,a=0;continue}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(s+1,l):r=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return r}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},ah="/";function lh(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ch=function(){return"/"};function uh(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}const dh=["history","path","basename","stem","extname","dirname"];class hh{constructor(e){let t;t=e?uh(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":ch(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,i=-1;for(;++i<dh.length;){const e=dh[i];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)dh.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?ih(this.path):void 0}set basename(e){fh(e,"basename"),ph(e,"basename"),this.path=sh(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?rh(this.path):void 0}set dirname(e){mh(this.basename,"dirname"),this.path=sh(e||"",this.basename)}get extname(){return"string"==typeof this.path?oh(this.path):void 0}set extname(e){if(ph(e,"extname"),mh(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=sh(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){uh(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!uh(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),fh(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ih(this.path,this.extname):void 0}set stem(e){fh(e,"stem"),ph(e,"stem"),this.path=sh(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const i=this.message(e,t,n);throw i.fatal=!0,i}info(e,t,n){const i=this.message(e,t,n);return i.fatal=void 0,i}message(e,t,n){const i=new ac(e,t,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function ph(e,t){if(e&&e.includes(ah))throw new Error("`"+t+"` cannot be a path: did not expect `"+ah+"`")}function fh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function mh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const gh=function(e){const t=this.constructor.prototype,n=t[e],i=function(){return n.apply(i,arguments)};return Object.setPrototypeOf(i,t),i},bh={}.hasOwnProperty;class yh extends gh{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const i=t.pop();if("function"!=typeof i)throw new TypeError("Expected function as last argument, not "+i);!function r(o,...s){const a=e[++n];let l=-1;if(o)i(o);else{for(;++l<t.length;)null!==s[l]&&void 0!==s[l]||(s[l]=t[l]);t=s,a?function(e,t){let n;return function(...t){const o=e.length>t.length;let s;o&&t.push(i);try{s=e.apply(this,t)}catch(e){if(o&&n)throw e;return i(e)}o||(s&&s.then&&"function"==typeof s.then?s.then(r,i):s instanceof Error?i(s):r(s))};function i(e,...i){n||(n=!0,t(e,...i))}function r(e){i(null,e)}}(a,r)(...s):i(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const e=new yh;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(th(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(_h("data",this.frozen),this.namespace[e]=t,this):bh.call(this.namespace,e)&&this.namespace[e]||void 0:e?(_h("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const i=t.call(e,...n);"function"==typeof i&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Sh(e),n=this.parser||this.Parser;return xh("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),xh("process",this.parser||this.Parser),wh("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(i,r){const o=Sh(e),s=n.parse(o);function a(e,n){e||!n?r(e):i?i(n):t(void 0,n)}n.run(s,o,function(e,t,i){if(e||!t||!i)return a(e);const r=t,o=n.stringify(r,i);var s;"string"==typeof(s=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(s)?i.value=o:i.result=o,a(e,i)})}}processSync(e){let t,n=!1;return this.freeze(),xh("processSync",this.parser||this.Parser),wh("processSync",this.compiler||this.Compiler),this.process(e,function(e,i){n=!0,eh(e),t=i}),Eh("processSync","process",n),t}run(e,t,n){kh(e),this.freeze();const i=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?r(void 0,n):new Promise(r);function r(r,o){const s=Sh(t);i.run(e,s,function(t,i,s){const a=i||e;t?o(t):r?r(a):n(void 0,a,s)})}}runSync(e,t){let n,i=!1;return this.run(e,t,function(e,t){eh(e),n=t,i=!0}),Eh("runSync","run",i),n}stringify(e,t){this.freeze();const n=Sh(t),i=this.compiler||this.Compiler;return wh("stringify",i),kh(e),i(e,n)}use(e,...t){const n=this.attachers,i=this.namespace;if(_h("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?s(e):o(e)}return this;function r(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(i.settings=th(!0,i.settings,e.settings))}function s(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)r(e[t])}}function a(e,t){let i=-1,r=-1;for(;++i<n.length;)if(n[i][0]===e){r=i;break}if(-1===r)n.push([e,...t]);else if(t.length>0){let[i,...o]=t;const s=n[r][1];nh(s)&&nh(i)&&(i=th(!0,s,i)),n[r]=[e,i,...o]}}}}const vh=(new yh).freeze();function xh(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function wh(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function _h(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 kh(e){if(!nh(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Eh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Sh(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new hh(e)}const Ah=[],Ch={allowDangerousHtml:!0},Mh=/^(https?|ircs?|mailto|xmpp)$/i,Nh=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Th(i){const r=function(e){const t=e.rehypePlugins||Ah,n=e.remarkPlugins||Ah,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ch}:Ch;return vh().use(vd).use(n).use(Jd,i).use(t)}(i),o=function(e){const t=e.children||"",n=new hh;return"string"==typeof t&&(n.value=t),n}(i);return function(i,r){const o=r.allowedElements,s=r.allowElement,a=r.components,l=r.disallowedElements,c=r.skipHtml,u=r.unwrapDisallowed,d=r.urlTransform||Oh;for(const e of Nh)Object.hasOwn(r,e.from)&&pl((e.from,e.to&&e.to,e.id));return Bd(i,function(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return c?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in kc)if(Object.hasOwn(kc,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],i=kc[t];(null===i||i.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let i=o?!o.includes(e.tagName):!!l&&l.includes(e.tagName);if(!i&&s&&"number"==typeof t&&(i=!s(e,t,n)),i&&n&&"number"==typeof t)return u&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}),function(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=function(e,t){return function(n,i,r,o){const s=Array.isArray(r.children),a=tc(n);return t(i,r,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=t.jsx,o=t.jsxs,i=function(e,t,n,i){const s=Array.isArray(n.children)?o:r;return i?s(t,n,i):s(t,n)}}var r,o;const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Kl:ql,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=fc(s,e,void 0);return a&&"string"!=typeof a?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}(i,{Fragment:e,components:a,ignoreInvalidStyle:!0,jsx:t,jsxs:n,passKeys:!0,passNode:!0})}(r.runSync(r.parse(o),o),i)}function Oh(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return-1===t||-1!==r&&t>r||-1!==n&&t>n||-1!==i&&t>i||Mh.test(e.slice(0,t))?e:""}function Dh(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let i=0,r=n.indexOf(t);for(;-1!==r;)i++,r=n.indexOf(t,r+t.length);return i}function Ih(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Rh(e){return"function"==typeof e?e:function(){return e}}const Ph="phrasing",Lh=["autolink","link","image","label"];function Fh(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Bh(e){this.config.enter.autolinkProtocol.call(this,e)}function zh(e){this.config.exit.autolinkProtocol.call(this,e)}function jh(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Uh(e){this.config.exit.autolinkEmail.call(this,e)}function Vh(e){this.exit(e)}function $h(e){!function(e,t,n){const i=Dd((n||{}).ignore||[]),r=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const e=n[i];t.push([Ih(e[0]),Rh(e[1])])}return t}(t);let o=-1;for(;++o<r.length;)Fd(e,"text",s);function s(e,t){let n,s=-1;for(;++s<t.length;){const e=t[s],r=n?n.children:void 0;if(i(e,r?r.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],i=r[o][0],s=r[o][1];let a=0;const l=n.children.indexOf(e);let c=!1,u=[];i.lastIndex=0;let d=i.exec(e.value);for(;d;){const n=d.index,r={index:d.index,input:d.input,stack:[...t,e]};let o=s(...d,r);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?i.lastIndex=n+1:(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),a=n+d[0].length,c=!0),!i.global)break;d=i.exec(e.value)}return c?(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Hh],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,qh]],{ignore:["link","linkReference"]})}function Hh(e,t,n,i,r){let o="";if(!Kh(r))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(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])))}(n))return!1;const s=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const r=Dh(e,"(");let o=Dh(e,")");for(;-1!==i&&r>o;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[e,n]}(n+i);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function qh(e,t,n,i){return!(!Kh(i,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Kh(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Zc(n)||Wc(n))&&(!t||47!==n)}function Gh(){this.buffer()}function Wh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Zh(){this.buffer()}function Xh(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Yh(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qh(e){this.exit(e)}function Jh(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ep(e){this.exit(e)}function tp(e,t,n,i){const r=n.createTracker(i);let o=r.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=r.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),s(),o+=r.move("]"),o}function np(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,i,r){const o=i.createTracker(r);let s=o.move("[^");const a=i.enter("footnoteDefinition"),l=i.enter("label");return s+=o.move(i.safe(i.associationId(e),{before:s,after:"]"})),l(),s+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),s+=o.move((t?"\n":" ")+i.indentLines(i.containerFlow(e,o.current()),t?rp:ip))),a(),s},footnoteReference:tp},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ip(e,t,n){return 0===t?e:rp(e,0,n)}function rp(e,t,n){return(n?"":" ")+e}tp.peek=function(){return"["};const op=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sp(e){this.enter({type:"delete",children:[]},e)}function ap(e){this.exit(e)}function lp(e,t,n,i){const r=n.createTracker(i),o=n.enter("strikethrough");let s=r.move("~~");return s+=n.containerPhrasing(e,{...r.current(),before:s,after:"~"}),s+=r.move("~~"),o(),s}function cp(e){return e.length}function up(e){return null==e?"":String(e)}function dp(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function hp(e,t,n){return">"+(n?"":" ")+e}function pp(e,t){return fp(e,t.inConstruct,!0)&&!fp(e,t.notInConstruct,!1)}function fp(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function mp(e,t,n,i){let r=-1;for(;++r<n.unsafe.length;)if("\n"===n.unsafe[r].character&&pp(n.stack,n.unsafe[r]))return/[ \t]/.test(i.before)?"":" ";return"\\\n"}function gp(e,t,n){return(n?"":" ")+e}function bp(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yp(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vp(e,t,n){const i=qu(e),r=qu(t);return void 0===i?void 0===r?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===r?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===i?void 0===r?{inside:!1,outside:!1}:1===r?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===r?{inside:!1,outside:!1}:1===r?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function xp(e,t,n,i){const r=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),s=n.createTracker(i),a=s.move(r);let l=s.move(n.containerPhrasing(e,{after:r,before:a,...s.current()}));const c=l.charCodeAt(0),u=vp(i.before.charCodeAt(i.before.length-1),c,r);u.inside&&(l=yp(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=vp(i.after.charCodeAt(0),d,r);h.inside&&(l=l.slice(0,-1)+yp(d));const p=s.move(r);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+p}function wp(e){return e.value||""}function _p(e,t,n,i){const r=bp(n),o='"'===r?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(n.safe(e.title,{before:c,after:r,...l.current()})),c+=l.move(r),a()),c+=l.move(")"),s(),c}function kp(e,t,n,i){const r=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),"full"!==r&&c&&c===d?"shortcut"===r?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function Ep(e,t,n){let i=e.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let r;if(e.atBreak)for(;r=t.exec(i);){let e=r.index;10===i.charCodeAt(e)&&13===i.charCodeAt(e-1)&&e--,i=i.slice(0,e)+" "+i.slice(r.index+1)}}return r+i+r}function Sp(e,t){const n=Sc(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Ap(e,t,n,i){const r=bp(n),o='"'===r?"Quote":"Apostrophe",s=n.createTracker(i);let a,l;if(Sp(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let i=s.move("<");return i+=s.move(n.containerPhrasing(e,{before:i,after:">",...s.current()})),i+=s.move(">"),a(),n.stack=t,i}a=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=s.move(" "+r),c+=s.move(n.safe(e.title,{before:c,after:r,...s.current()})),c+=s.move(r),l()),c+=s.move(")"),a(),c}function Cp(e,t,n,i){const r=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(i);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),"full"!==r&&c&&c===d?"shortcut"===r?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function Mp(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Np(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}lp.peek=function(){return"~"},xp.peek=function(e,t,n){return n.options.emphasis||"*"},wp.peek=function(){return"<"},_p.peek=function(){return"!"},kp.peek=function(){return"!"},Ep.peek=function(){return"`"},Ap.peek=function(e,t,n){return Sp(e,n)?"<":"["},Cp.peek=function(){return"["};const Tp=Dd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Op(e,t,n,i){const r=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),s=n.createTracker(i),a=s.move(r+r);let l=s.move(n.containerPhrasing(e,{after:r,before:a,...s.current()}));const c=l.charCodeAt(0),u=vp(i.before.charCodeAt(i.before.length-1),c,r);u.inside&&(l=yp(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=vp(i.after.charCodeAt(0),d,r);h.inside&&(l=l.slice(0,-1)+yp(d));const p=s.move(r+r);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+p}Op.peek=function(e,t,n){return n.options.strong||"*"};const Dp={blockquote:function(e,t,n,i){const r=n.enter("blockquote"),o=n.createTracker(i);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),hp);return r(),s},break:mp,code:function(e,t,n,i){const r=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",s="`"===r?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,gp);return e(),t}const a=n.createTracker(i),l=r.repeat(Math.max(function(e,t){const n=String(e);let i=n.indexOf(t),r=i,o=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==i;)i===r?++o>s&&(s=o):o=1,r=i+t.length,i=n.indexOf(t,r);return s}(o,r)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const t=n.enter(`codeFencedLang${s}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...a.current()})),t()}return u+=a.move("\n"),o&&(u+=a.move(o+"\n")),u+=a.move(l),c(),u},definition:function(e,t,n,i){const r=bp(n),o='"'===r?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(n.safe(e.title,{before:c,after:r,...l.current()})),c+=l.move(r),a()),s(),c},emphasis:xp,hardBreak:mp,heading:function(e,t,n,i){const r=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(i);if(function(e,t){let n=!1;return Bd(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Ld}),Boolean((!e.depth||e.depth<3)&&Sc(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return i(),t(),s+"\n"+(1===r?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(r),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=yp(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),a(),c},html:wp,image:_p,imageReference:kp,inlineCode:Ep,link:Ap,linkReference:Cp,list:function(e,t,n,i){const r=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Mp(n);const a=e.ordered?"."===s?")":".":function(e){const t=Mp(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Np(n)===s&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const c=n.containerFlow(e,i);return n.bulletLastUsed=s,n.bulletCurrent=o,r(),c},listItem:function(e,t,n,i){const r=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Mp(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let s=o.length+1;("tab"===r||"mixed"===r&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(i);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?o:o+" ".repeat(s-o.length))+e});return l(),c},paragraph:function(e,t,n,i){const r=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,i);return o(),r(),s},root:function(e,t,n,i){return(e.children.some(function(e){return Tp(e)})?n.containerPhrasing:n.containerFlow).call(n,e,i)},strong:Op,text:function(e,t,n,i){return n.safe(e.value,i)},thematicBreak:function(e,t,n){const i=(Np(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?i.slice(0,-1):i}};function Ip(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Rp(e){this.exit(e),this.data.inTable=void 0}function Pp(e){this.enter({type:"tableRow",children:[]},e)}function Lp(e){this.exit(e)}function Fp(e){this.enter({type:"tableCell",children:[]},e)}function Bp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zp));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function zp(e,t){return"|"===t?t:e}function jp(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,r=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let i=Dp.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(i=i.replace(/\|/g,"\\$&")),i},table:function(e,t,n,i){return a(function(e,t,n){const i=e.children;let r=-1;const o=[],s=t.enter("table");for(;++r<i.length;)o[r]=l(i[r],t,n);return s(),o}(e,n,i),e.align)},tableCell:s,tableRow:function(e,t,n,i){const r=a([l(e,n,i)]);return r.slice(0,r.indexOf("\n"))}}};function s(e,t,n,i){const r=n.enter("tableCell"),s=n.enter("phrasing"),a=n.containerPhrasing(e,{...i,before:o,after:o});return s(),r(),a}function a(e,t){return function(e,t){const n=t||{},i=(n.align||[]).concat(),r=n.stringLength||cp,o=[],s=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],i=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const s=up(e[u][o]);if(!1!==n.alignDelimiters){const e=r(s);i[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(s)}s[u]=t,a[u]=i}let d=-1;if("object"==typeof i&&"length"in i)for(;++d<c;)o[d]=dp(i[d]);else{const e=dp(i);for(;++d<c;)o[d]=e}d=-1;const h=[],p=[];for(;++d<c;){const e=o[d];let t="",i="";99===e?(t=":",i=":"):108===e?t=":":114===e&&(i=":");let r=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-i.length);const s=t+"-".repeat(r)+i;!1!==n.alignDelimiters&&(r=t.length+r+i.length,r>l[d]&&(l[d]=r),p[d]=r),h[d]=s}s.splice(1,0,h),a.splice(1,0,p),u=-1;const f=[];for(;++u<s.length;){const e=s[u],t=a[u];d=-1;const i=[];for(;++d<c;){const r=e[d]||"";let s="",a="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=o[d];114===n?s=" ".repeat(e):99===n?e%2?(s=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):(s=" ".repeat(e/2),a=s):a=" ".repeat(e)}!1===n.delimiterStart||d||i.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===r||!1===n.delimiterStart&&!d||i.push(" "),!1!==n.alignDelimiters&&i.push(s),i.push(r),!1!==n.alignDelimiters&&i.push(a),!1!==n.padding&&i.push(" "),!1===n.delimiterEnd&&d===c-1||i.push("|")}f.push(!1===n.delimiterEnd?i.join("").replace(/ +$/,""):i.join(""))}return f.join("\n")}(e,{align:t,alignDelimiters:i,padding:n,stringLength:r})}function l(e,t,n){const i=e.children;let r=-1;const o=[],a=t.enter("tableRow");for(;++r<i.length;)o[r]=s(i[r],0,t,n);return a(),o}}function Up(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Vp(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const i=t.children;let r,o=-1;for(;++o<i.length;){const e=i[o];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function $p(e,t,n,i){const r=e.children[0],o="boolean"==typeof e.checked&&r&&"paragraph"===r.type,s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(i);o&&a.move(s);let l=Dp.listItem(e,t,n,{...i,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+s})),l}const Hp={tokenize:function(e,t,n){let i=0;return function t(o){return(87===o||119===o)&&i<3?(i++,e.consume(o),t):46===o&&3===i?(e.consume(o),r):n(o)};function r(e){return null===e?n(e):t(e)}},partial:!0},qp={tokenize:function(e,t,n){let i,r,o;return s;function s(t){return 46===t||95===t?e.check(Gp,l,a)(t):null===t||Kc(t)||Zc(t)||45!==t&&Wc(t)?l(t):(o=!0,e.consume(t),s)}function a(t){return 95===t?i=!0:(r=i,i=void 0),e.consume(t),s}function l(e){return r||i||!o?n(e):t(e)}},partial:!0},Kp={tokenize:function(e,t){let n=0,i=0;return r;function r(s){return 40===s?(n++,e.consume(s),r):41===s&&i<n?o(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?e.check(Gp,t,o)(s):null===s||Kc(s)||Zc(s)?t(s):(e.consume(s),r)}function o(t){return 41===t&&i++,e.consume(t),r}},partial:!0},Gp={tokenize:function(e,t,n){return i;function i(s){return 33===s||34===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||63===s||95===s||126===s?(e.consume(s),i):38===s?(e.consume(s),o):93===s?(e.consume(s),r):60===s||null===s||Kc(s)||Zc(s)?t(s):n(s)}function r(e){return null===e||40===e||91===e||Kc(e)||Zc(e)?t(e):i(e)}function o(e){return Bc(e)?s(e):n(e)}function s(t){return 59===t?(e.consume(t),i):Bc(t)?(e.consume(t),s):n(t)}},partial:!0},Wp={tokenize:function(e,t,n){return function(t){return e.consume(t),i};function i(e){return zc(e)?n(e):t(e)}},partial:!0},Zp={name:"wwwAutolink",tokenize:function(e,t,n){const i=this;return function(t){return 87!==t&&119!==t||!ef.call(i,i.previous)||of(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Hp,e.attempt(qp,e.attempt(Kp,r),n),n)(t))};function r(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:ef},Xp={name:"protocolAutolink",tokenize:function(e,t,n){const i=this;let r="",o=!1;return function(t){return 72!==t&&104!==t||!tf.call(i,i.previous)||of(i.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(t),e.consume(t),s)};function s(t){if(Bc(t)&&r.length<5)return r+=String.fromCodePoint(t),e.consume(t),s;if(58===t){const n=r.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),o?l:(o=!0,a)):n(t)}function l(t){return null===t||Uc(t)||Kc(t)||Zc(t)||Wc(t)?n(t):e.attempt(qp,e.attempt(Kp,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:tf},Yp={name:"emailAutolink",tokenize:function(e,t,n){const i=this;let r,o;return function(t){return rf(t)&&nf.call(i,i.previous)&&!of(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)):n(t)};function s(t){return rf(t)?(e.consume(t),s):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Wp,c,l)(t):45===t||95===t||zc(t)?(o=!0,e.consume(t),a):c(t)}function l(t){return e.consume(t),r=!0,a}function c(s){return o&&r&&Bc(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}},previous:nf},Qp={};let Jp=48;for(;Jp<123;)Qp[Jp]=Yp,Jp++,58===Jp?Jp=65:91===Jp&&(Jp=97);function ef(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Kc(e)}function tf(e){return!Bc(e)}function nf(e){return!(47===e||rf(e))}function rf(e){return 43===e||45===e||46===e||95===e||zc(e)}function of(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if(("labelLink"===i.type||"labelImage"===i.type)&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Qp[43]=Yp,Qp[45]=Yp,Qp[46]=Yp,Qp[95]=Yp,Qp[72]=[Yp,Xp],Qp[104]=[Yp,Xp],Qp[87]=[Yp,Zp],Qp[119]=[Yp,Zp];const sf={tokenize:function(e,t,n){const i=this;return Yc(e,function(e){const r=i.events[i.events.length-1];return r&&"gfmFootnoteDefinitionIndent"===r[1].type&&4===r[2].sliceSerialize(r[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function af(e,t,n){const i=this;let r=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s;for(;r--;){const e=i.events[r][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(r){if(!s||!s._balanced)return n(r);const a=xu(i.sliceSerialize({start:s.end,end:i.now()}));return 94===a.codePointAt(0)&&o.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),t(r)):n(r)}}function lf(e,t){let n,i=e.length;for(;i--;)if("labelImage"===e[i][1].type&&"enter"===e[i][0]){n=e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[i+1],e[i+2],["enter",r,t],e[i+3],e[i+4],["enter",o,t],["exit",o,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(i,e.length-i+1,...l),e}function cf(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){if(s>999||93===a&&!o||null===a||91===a||Kc(a))return n(a);if(93===a){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return r.includes(xu(i.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return Kc(a)||(o=!0),s++,e.consume(a),92===a?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function uf(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,s,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(a>999||93===t&&!s||null===t||91===t||Kc(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=xu(i.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Kc(t)||(s=!0),a++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),r.includes(o)||r.push(o),Yc(e,h,"gfmFootnoteDefinitionWhitespace")):n(t)}function h(e){return t(e)}}function df(e,t,n){return e.check(tu,t,e.attempt(sf,t,n))}function hf(e){e.exit("gfmFootnoteDefinition")}function pf(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,i){const r=this.previous,o=this.events;let s=0;return function(t){return 126===r&&"characterEscape"!==o[o.length-1][1].type?i(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(o){const l=qu(r);if(126===o)return s>1?i(o):(e.consume(o),s++,a);if(s<2&&!t)return i(o);const c=e.exit("strikethroughSequenceTemporary"),u=qu(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let i=n;for(;i--;)if("exit"===e[i][0]&&"strikethroughSequenceTemporary"===e[i][1].type&&e[i][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[i][1].end.offset-e[i][1].start.offset){e[n][1].type="strikethroughSequence",e[i][1].type="strikethroughSequence";const r={type:"strikethrough",start:Object.assign({},e[i][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[n][1].start)},s=[["enter",r,t],["enter",e[i][1],t],["exit",e[i][1],t],["enter",o,t]],a=t.parser.constructs.insideSpan.null;a&&Mc(s,s.length,0,zu(a,e.slice(i+1,n),t)),Mc(s,s.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",r,t]]),Mc(e,i-1,n-i+3,s),n=i+s.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class ff{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,i){let r=0;if(0!==n||0!==i.length){for(;r<e.map.length;){if(e.map[r][0]===t)return e.map[r][1]+=n,void e.map[r][2].push(...i);r+=1}e.map.push([t,n,i])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(const t of i)e.push(t);i=n.pop()}this.map.length=0}}function mf(e,t){let n=!1;const i=[];for(;t<e.length;){const r=e[t];if(n){if("enter"===r[0])"tableContent"===r[1].type&&i.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===r[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=i.length-1;i[e]="left"===i[e]?"center":"right"}}else if("tableDelimiterRow"===r[1].type)break}else"enter"===r[0]&&"tableDelimiterRow"===r[1].type&&(n=!0);t+=1}return i}function gf(e,t,n){const i=this;let r,o=0,s=0;return function(e){let t=i.events.length-1;for(;t>-1;){const e=i.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const r=t>-1?i.events[t][1].type:null,o="tableHead"===r||"tableRow"===r?x:a;return o===x&&i.parser.lazy[i.now().line]?n(e):o(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(r=!0,s+=1),l(e)}(t)}function l(t){return null===t?n(t):qc(t)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Gc(t)?Yc(e,l,"whitespace")(t):(s+=1,r&&(r=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Kc(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(t):(e.enter("tableDelimiterRow"),r=!1,Gc(t)?Yc(e,h,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t))}function h(t){return 45===t||58===t?f(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):v(t)}function p(t){return Gc(t)?Yc(e,f,"whitespace")(t):f(t)}function f(t){return 58===t?(s+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(s+=1,m(t)):null===t||qc(t)?y(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return Gc(t)?Yc(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?h(n):(null===n||qc(n))&&r&&o===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function x(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||qc(n)?(e.exit("tableRow"),t(n)):Gc(n)?Yc(e,w,"whitespace")(n):(e.enter("data"),_(n))}function _(t){return null===t||124===t||Kc(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?k:_)}function k(t){return 92===t||124===t?(e.consume(t),_):_(t)}}function bf(e,t){let n,i,r,o=-1,s=!0,a=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const h=new ff;for(;++o<e.length;){const p=e[o],f=p[1];"enter"===p[0]?"tableHead"===f.type?(u=!1,0!==d&&(vf(h,t,d,n,i),i=void 0,d=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(o,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(s=!0,r=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,i={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(o,0,[["enter",i,t]])),a="tableDelimiterRow"===f.type?2:i?3:1):!a||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type?"tableCellDivider"===f.type&&(s?s=!1:(0!==l[1]&&(c[0]=c[1],r=yf(h,t,l,a,void 0,r)),l=c,c=[l[1],o,0,0])):(s=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],r=yf(h,t,l,a,void 0,r),l=[0,0,0,0]),c[2]=o)):"tableHead"===f.type?(u=!0,d=o):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=o,0!==l[1]?(c[0]=c[1],r=yf(h,t,l,a,o,r)):0!==c[1]&&(r=yf(h,t,c,a,o,r)),a=0):!a||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type||(c[3]=o)}for(0!==d&&vf(h,t,d,n,i),h.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=mf(t.events,o))}return e}function yf(e,t,n,i,r,o){const s=1===i?"tableHeader":2===i?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},xf(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=xf(t.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const r=xf(t.events,n[2]),o=xf(t.events,n[3]),s={type:"tableContent",start:Object.assign({},r),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",s,t]]),2!==i){const i=t.events[n[2]],r=t.events[n[3]];if(i[1].end=Object.assign({},r[1].end),i[1].type="chunkText",i[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,i=n[3]-n[2]-1;e.add(t,i,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==r&&(o.end=Object.assign({},xf(t.events,r)),e.add(r,0,[["exit",o,t]]),o=void 0),o}function vf(e,t,n,i,r){const o=[],s=xf(t.events,n);r&&(r.end=Object.assign({},s),o.push(["exit",r,t])),i.end=Object.assign({},s),o.push(["exit",i,t]),e.add(n+1,0,o)}function xf(e,t){const n=e[t],i="enter"===n[0]?"start":"end";return n[1][i]}const wf={name:"tasklistCheck",tokenize:function(e,t,n){const i=this;return function(t){return null===i.previous&&i._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),r):n(t)};function r(t){return Kc(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(i){return qc(i)?t(i):Gc(i)?e.check({tokenize:_f},t,n)(i):n(i)}}};function _f(e,t,n){return Yc(e,function(e){return null===e?n(e):t(e)},"whitespace")}const kf={},Ef=function(e,t,n){const i=Dd(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if("number"==typeof t){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if((t=e.children.indexOf(t))<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(i(e.children[t],t,e))return e.children[t]},Sf=function(e){if(null==e)return Cf;if("string"==typeof e)return t=e,Af(function(e){return e.tagName===t});var t;if("object"==typeof e)return function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Sf(e[n]);return Af(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e);if("function"==typeof e)return Af(e);throw new Error("Expected function, string, or array as `test`")};function Af(e){return function(t,n,i){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e&&"tagName"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,i||void 0))}}function Cf(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}const Mf=/\n/g,Nf=/[\t ]+/g,Tf=Sf("br"),Of=Sf(function(e){return"td"===e.tagName||"th"===e.tagName}),Df=Sf("p"),If=Sf("tr"),Rf=Sf(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return Boolean((e.properties||{}).hidden)},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),Pf=Sf(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Lf(e,t,n){return"element"===e.type?function(e,t,n){const i=zf(e,n),r=e.children||[];let o,s,a=-1,l=[];if(Rf(e))return l;for(Tf(e)||If(e)&&Ef(t,e,If)?s="\n":Df(e)?(o=2,s=2):Pf(e)&&(o=1,s=1);++a<r.length;)l=l.concat(Lf(r[a],e,{whitespace:i,breakBefore:a?void 0:o,breakAfter:a<r.length-1?Tf(r[a+1]):s}));return Of(e)&&Ef(t,e,Of)&&l.push("\t"),o&&l.unshift(o),s&&l.push(s),l}(e,t,n):"text"===e.type?"normal"===n.whitespace?Ff(e,n):function(e){return[String(e.value)]}(e):[]}function Ff(e,t){const n=String(e.value),i=[],r=[];let o=0;for(;o<=n.length;){Mf.lastIndex=o;const e=Mf.exec(n),r=e&&"index"in e?e.index:n.length;i.push(Bf(n.slice(o,r).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==o||t.breakBefore,r!==n.length||t.breakAfter)),o=r+1}let s,a=-1;for(;++a<i.length;)8203===i[a].charCodeAt(i[a].length-1)||a<i.length-1&&8203===i[a+1].charCodeAt(0)?(r.push(i[a]),s=void 0):i[a]?("number"==typeof s&&r.push(s),r.push(i[a]),s=0):0!==a&&a!==i.length-1||r.push(0);return r}function Bf(e,t,n){const i=[];let r,o=0;for(;o<e.length;){Nf.lastIndex=o;const n=Nf.exec(e);r=n?n.index:e.length,o||r||!n||t||i.push(""),o!==r&&i.push(e.slice(o,r)),o=n?r+n[0].length:r}return o===r||n||i.push(""),i.join(" ")}function zf(e,t){if("element"===e.type){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}const jf=["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","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Uf=["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"].sort().reverse(),Vf=["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"].sort().reverse(),$f=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Hf=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","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-end-end-radius","border-end-start-radius","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-start-end-radius","border-start-start-radius","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-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","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","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","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","margin-trim","marker","marker-end","marker-mid","marker-start","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","masonry-auto-flow","math-depth","math-shift","math-style","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","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-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","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","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","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();var qf="[0-9](_*[0-9])*",Kf=`\\.(${qf})`,Gf="[0-9a-fA-F](_*[0-9a-fA-F])*",Wf={className:"number",variants:[{begin:`(\\b(${qf})((${Kf})|\\.)?|(${Kf}))[eE][+-]?(${qf})[fFdD]?\\b`},{begin:`\\b(${qf})((${Kf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Kf})[fFdD]?\\b`},{begin:`\\b(${qf})[fFdD]\\b`},{begin:`\\b0[xX]((${Gf})\\.?|(${Gf})?\\.(${Gf}))[pP][+-]?(${qf})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Gf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Zf(e,t,n){return-1===n?"":e.replace(t,i=>Zf(e,t,n-1))}const Xf="[A-Za-z$_][0-9A-Za-z$_]*",Yf=["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","using"],Qf=["true","false","null","undefined","NaN","Infinity"],Jf=["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"],em=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],tm=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],nm=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],im=[].concat(tm,Jf,em);var rm="[0-9](_*[0-9])*",om=`\\.(${rm})`,sm="[0-9a-fA-F](_*[0-9a-fA-F])*",am={className:"number",variants:[{begin:`(\\b(${rm})((${om})|\\.)?|(${om}))[eE][+-]?(${rm})[fFdD]?\\b`},{begin:`\\b(${rm})((${om})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${om})[fFdD]?\\b`},{begin:`\\b(${rm})[fFdD]\\b`},{begin:`\\b0[xX]((${sm})\\.?|(${sm})?\\.(${sm}))[pP][+-]?(${rm})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${sm})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const lm=["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","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],cm=["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"].sort().reverse(),um=["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"].sort().reverse(),dm=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),hm=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","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-end-end-radius","border-end-start-radius","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-start-end-radius","border-start-start-radius","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-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","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","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","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","margin-trim","marker","marker-end","marker-mid","marker-start","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","masonry-auto-flow","math-depth","math-shift","math-style","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","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-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","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","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","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),pm=um.concat(dm).sort().reverse(),fm=["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","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],mm=["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"].sort().reverse(),gm=["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"].sort().reverse(),bm=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ym=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","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-end-end-radius","border-end-start-radius","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-start-end-radius","border-start-start-radius","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-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","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","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","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","margin-trim","marker","marker-end","marker-mid","marker-start","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","masonry-auto-flow","math-depth","math-shift","math-style","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","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-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","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","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","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function vm(e){return e?"string"==typeof e?e:e.source:null}function xm(e){return wm("(?=",e,")")}function wm(...e){return e.map(e=>vm(e)).join("")}function _m(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>vm(e)).join("|")+")"}const km=e=>wm(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Em=["Protocol","Type"].map(km),Sm=["init","self"].map(km),Am=["Any","Self"],Cm=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","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","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","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"],Mm=["false","nil","true"],Nm=["assignment","associativity","higherThan","left","lowerThan","none","right"],Tm=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Om=["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"],Dm=_m(/[/=\-+!*%<>&|^~?]/,/[\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]/),Im=_m(Dm,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Rm=wm(Dm,Im,"*"),Pm=_m(/[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]/),Lm=_m(Pm,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Fm=wm(Pm,Lm,"*"),Bm=wm(/[A-Z]/,Lm,"*"),zm=["attached","autoclosure",wm(/convention\(/,_m("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",wm(/objc\(/,Fm,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],jm=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"],Um="[A-Za-z$_][0-9A-Za-z$_]*",Vm=["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","using"],$m=["true","false","null","undefined","NaN","Infinity"],Hm=["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"],qm=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Km=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Gm=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Wm=[].concat(Km,Hm,qm),Zm={arduino:function(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=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},c={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(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},d=t.optional(r)+e.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["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"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","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"]},p={className:"function.dispatch",relevance:0,keywords:{_hint:["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"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[p,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:f.concat([{begin:/\(/,end:/\)/,keywords:h,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,p,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:h,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),i=n.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n},bash:function(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(a);const l={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},c=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),u={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias","set","shopt","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","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"]},contains:[c,e.SHEBANG(),u,l,o,s,{match:/(\/[a-z._-]+)+/},a,{match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},n]}},c:function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},d=t.optional(r)+e.IDENT_RE+"\\s*\\(",h={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","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","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","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"},p=[c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:p.concat([{begin:/\(/,end:/\)/,keywords:h,contains:p.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:h,disableAutodetect:!0,illegal:"</",contains:[].concat(f,m,p,[c,{begin:e.IDENT_RE+"::",keywords:h},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:h}}},cpp:function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},c={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(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},d=t.optional(r)+e.IDENT_RE+"\\s*\\(",h={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["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"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","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"]},p={className:"function.dispatch",relevance:0,keywords:{_hint:["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"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[p,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:f.concat([{begin:/\(/,end:/\)/,keywords:h,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:h,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,p,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:h,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}},csharp:function(e){const t={keyword:["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"].concat(["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),i={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},r={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(r,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},u=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE],a.contains=[u,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const d={variants:[{className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},p=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),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"}},d,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,h,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:"("+p+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[d,i,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},f]}},css:function(e){const t=e.regex,n=(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_-]*/}}))(e),i=[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,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Vf.join("|")+")"},{begin:":(:)?("+$f.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Hf.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...i,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...i,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:Uf.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...i,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+jf.join("|")+")\\b"}]}},diff:function(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:/$/}]}},go:function(e){const t={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:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}},graphql:function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}},ini:function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},i=e.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const r={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[i,o,r,s,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[i,a,o,r,s,n]}}]}},java:function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+Zf("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),r={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","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:r,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:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:r,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Wf,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Wf,o]}},javascript:function(e){const t=e.regex,n=Xf,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let r;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((r=o.match(/^\s*=/))||(r=o.match(/^\s+extends\s+/))&&0===r.index)&&t.ignoreMatch()}},r={$pattern:Xf,keyword:Yf,literal:Qf,built_in:im,"variable.language":nm},o="[0-9](_?[0-9])*",s=`\\.(${o})`,a="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",l={className:"number",variants:[{begin:`(\\b(${a})((${s})|\\.)?|(${s}))[eE][+-]?(${o})\\b`},{begin:`\\b(${a})\\b((${s})\\b|\\.)?|(${s})\\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},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:r,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},d={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"graphql"}},p={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,c]},f={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:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},m=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,p,{match:/\$\d+/},l];c.contains=m.concat({begin:/\{/,end:/\}/,keywords:r,contains:["self"].concat(m)});const g=[].concat(f,c.contains),b=g.concat([{begin:/(\s*)\(/,end:/\)/,keywords:r,contains:["self"].concat(g)}]),y={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:b},v={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},x={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:{_:[...Jf,...em]}},w={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},_={match:t.concat(/\b/,function(e){return t.concat("(?!",e.join("|"),")")}([...tm,"super","import"].map(e=>`${e}\\s*\\(`)),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",A={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:r,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,p,f,{match:/\$\d+/},l,x,{scope:"attr",match:n+t.lookahead(":"),relevance:0},A,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},w,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},v,E,{match:/\$[(.]/}]}},json:function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}},kotlin:function(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:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},r={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[r,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,r,i]}]};i.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},l=am,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=u;return d.variants[1].contains=[u],u.variants[1].contains=[d],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{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:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,a,o,e.C_NUMBER_MODE]},c]},{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:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}},less:function(e){const t=(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_-]*/}}))(e),n=pm,i="[\\w-]+",r="("+i+"|@\\{"+i+"\\})",o=[],s=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},l=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:cm.join(" ")},u={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,u,l("variable","@@?"+i,10),l("variable","@\\{"+i+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const d=s.concat({begin:/\{/,end:/\}/,contains:o}),h={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},p={begin:r+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+hm.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:d}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,l("keyword","all\\b"),l("variable","@\\{"+i+"\\}"),{begin:"\\b("+lm.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,l("selector-tag",r,0),l("selector-id","#"+r),l("selector-class","\\."+r,0),l("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+um.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+dm.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:d},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:i+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,m,b,p,g,h,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}},lua:function(e){const t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},r=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{name:"Lua",aliases:["pluto"],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:r.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:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}},makefile:function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},i={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},r={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,i,r,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}},markdown:function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),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}]},i={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},r={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},o=e.inherit(i,{contains:[]}),s=e.inherit(r,{contains:[]});i.contains.push(s),r.contains.push(o);let a=[t,n];return[i,r,o,s].forEach(e=>{e.contains=e.contains.concat(a)}),a=a.concat(i,r),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,r,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{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}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}},objectivec:function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,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"]},illegal:"</",contains:[{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+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}},perl:function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","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","field","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","method","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"].join(" ")},r={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},s={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},a={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[e.BACKSLASH_ESCAPE,r,a],u=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],d=(e,i,r="\\1")=>{const o="\\1"===r?r:t.concat(r,i);return t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,r,n)},h=(e,i,r)=>t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,r,n),p=[a,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:c,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}]},l,{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:d("s|tr|y",t.either(...u,{capture:!0}))},{begin:d("s|tr|y","\\(","\\)")},{begin:d("s|tr|y","\\[","\\]")},{begin:d("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:h("(?:m|qr)?",/\//,/\//)},{begin:h("m|qr",t.either(...u,{capture:!0}),/\1/)},{begin:h("m|qr",/\(/,/\)/)},{begin:h("m|qr",/\[/,/\]/)},{begin:h("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return r.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}},php:function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),r=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+i},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c="[ \t\n]",u={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l,{begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},d={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},h=["false","null","true"],p=["__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"],f=["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"],m={keyword:p,literal:(e=>{const t=[];return e.forEach(e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())}),t})(h),built_in:f},g=e=>e.map(e=>e.replace(/\|\d+$/,"")),b={variants:[{match:[/new/,t.concat(c,"+"),t.concat("(?!",g(f).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},y=t.concat(i,"\\b(?!\\()"),v={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),y],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,t.concat(/::/,t.lookahead(/(?!class\b)/)),y],scope:{1:"title.class",3:"variable.constant"}},{match:[r,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},x={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:m,contains:[x,s,v,e.C_BLOCK_COMMENT_MODE,u,d,b]},_={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",g(p).join("\\b|"),"|",g(f).join("\\b|"),"\\b)"),i,t.concat(c,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(_);const k=[x,v,e.C_BLOCK_COMMENT_MODE,u,d,b],E={begin:t.concat(/#\[\s*\\?/,t.either(r,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:h,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:h,keyword:["new","array"]},contains:["self",...k]},...k,{scope:"meta",variants:[{match:r},{match:o}]}]};return{case_insensitive:!1,keywords:m,contains:[E,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}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},s,_,v,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},b,{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:m,contains:["self",E,s,v,e.C_BLOCK_COMMENT_MODE,u,d]}]},{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]},u,d]}},"php-template":function(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})]}]}},plaintext:function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}},python:function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["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"],r={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,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"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:r,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{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,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",u=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,d=`\\b|${i.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${u}))[eE][+-]?(${c})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${c})[jJ](?=${d})`}]},p={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:r,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:["self",o,h,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,h,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:r,illegal:/(<\/|\?)|=>/,contains:[o,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},l,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{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,f,l]}]}},"python-repl":function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}},r:function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=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]?/),r=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=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:[r,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[o,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:r},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}},ruby:function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(i,/(::\w+)*/),o={"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"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{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,c]})]}]},d="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${d}))?([eE][+-]?(${d})|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"}]},p={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},f=[u,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:o},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:i,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],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(a,l),relevance:0}].concat(a,l);c.contains=f,p.contains=f;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:o,contains:f}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(f)}},rust:function(e){const t=e.regex,n=/(r#)?/,i=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["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!","eprintln!","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!"],l=["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:l,keyword:["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","union","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:a},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,i],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,i],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,i,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:a,type:l}},{className:"punctuation",begin:"->"},o]}},scss:function(e){const t=(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_-]*/}}))(e),n=bm,i=gm,r="@[a-z-]+",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("+fm.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ym.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:r,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:mm.join(" ")},contains:[{begin:r,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]}},shell:function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}},sql:function(e){const t=e.regex,n=e.COMMENT("--","$"),i=["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"],r=i,o=["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","add","asc","collation","desc","final","first","last","view"].filter(e=>!i.includes(e)),s={match:t.concat(/\b/,t.either(...r),/\s*\(/),relevance:0,keywords:{built_in:r}};function a(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,"\\s+"))),/\b/)}const l={scope:"keyword",match:a(["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"]),relevance:0};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const i=n;return t=t||[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:i(e)?`${e}|0`:e)}(o,{when:e=>e.length<3}),literal:["true","false","unknown"],type:["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"],built_in:["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"]},contains:[{scope:"type",match:a(["double precision","large object","with timezone","without timezone"])},l,s,{scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},{scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},{begin:/"/,end:/"/,contains:[{match:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}},swift:function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],r={match:[/\./,_m(...Em,...Sm)],className:{2:"keyword"}},o={match:wm(/\./,_m(...Cm)),relevance:0},s=Cm.filter(e=>"string"==typeof e).concat(["_|0"]),a={variants:[{className:"keyword",match:_m(...Cm.filter(e=>"string"!=typeof e).concat(Am).map(km),...Sm)}]},l={$pattern:_m(/\b\w+/,/#\w+/),keyword:s.concat(Tm),literal:Mm},c=[r,o,a],u=[{match:wm(/\./,_m(...Om)),relevance:0},{className:"built_in",match:wm(/\b/,_m(...Om),/(?=\()/)}],d={match:/->/,relevance:0},h=[d,{className:"operator",relevance:0,variants:[{match:Rm},{match:`\\.(\\.|${Im})+`}]}],p="([0-9]_*)+",f="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${p})(\\.(${p}))?([eE][+-]?(${p}))?\\b`},{match:`\\b0x(${f})(\\.(${f}))?([pP][+-]?(${p}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:wm(/\\/,e,/[0\\tnr"']/)},{match:wm(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:wm(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),y=(e="")=>({className:"subst",label:"interpol",begin:wm(/\\/,e,/\(/),end:/\)/}),v=(e="")=>({begin:wm(e,/"""/),end:wm(/"""/,e),contains:[g(e),b(e),y(e)]}),x=(e="")=>({begin:wm(e,/"/),end:wm(/"/,e),contains:[g(e),y(e)]}),w={className:"string",variants:[v(),v("#"),v("##"),v("###"),x(),x("#"),x("##"),x("###")]},_=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],k={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:_},E=e=>{const t=wm(e,/\//),n=wm(/\//,e);return{begin:t,end:n,contains:[..._,{scope:"comment",begin:`#(?!.*${n})`,end:/$/}]}},S={scope:"regexp",variants:[E("###"),E("##"),E("#"),k]},A={match:wm(/`/,Fm,/`/)},C=[A,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${Lm}+`}],M=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:jm,contains:[...h,m,w]}]}},{scope:"keyword",match:wm(/@/,_m(...zm),xm(_m(/\(/,/\s+/)))},{scope:"meta",match:wm(/@/,Fm)}],N={match:xm(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:wm(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Lm,"+")},{className:"type",match:Bm,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:wm(/\s+&\s+/,xm(Bm)),relevance:0}]},T={begin:/</,end:/>/,keywords:l,contains:[...i,...c,...M,d,N]};N.contains.push(T);const O={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:wm(Fm,/\s*:/),keywords:"_|0",relevance:0},...i,S,...c,...u,...h,m,w,...C,...M,N]},D={begin:/</,end:/>/,keywords:"repeat each",contains:[...i,N]},I={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:_m(xm(wm(Fm,/\s*:/)),xm(wm(Fm,/\s+/,Fm,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Fm}]},...i,...c,...h,m,w,...M,N,O],endsParent:!0,illegal:/["']/},R={match:[/(func|macro)/,/\s+/,_m(A.match,Fm,Rm)],className:{1:"keyword",3:"title.function"},contains:[D,I,t],illegal:[/\[/,/%/]},P={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[D,I,t],illegal:/\[|%/},L={match:[/operator/,/\s+/,Rm],className:{1:"keyword",3:"title"}},F={begin:[/precedencegroup/,/\s+/,Bm],className:{1:"keyword",3:"title"},contains:[N],keywords:[...Nm,...Mm],end:/}/},B={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Fm,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:l,contains:[D,...c,{begin:/:/,end:/\{/,keywords:l,contains:[{scope:"title.class.inherited",match:Bm},...c],relevance:0}]};for(const e of w.variants){const t=e.contains.find(e=>"interpol"===e.label);t.keywords=l;const n=[...c,...u,...h,m,w,...C];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...i,R,P,{match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},{match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},B,L,F,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},S,...c,...u,...h,m,w,...C,...M,N,O]}},typescript:function(e){const t=e.regex,n=function(e){const t=e.regex,n=Um,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let r;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((r=o.match(/^\s*=/))||(r=o.match(/^\s+extends\s+/))&&0===r.index)&&t.ignoreMatch()}},r={$pattern:Um,keyword:Vm,literal:$m,built_in:Wm,"variable.language":Gm},o="[0-9](_?[0-9])*",s=`\\.(${o})`,a="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",l={className:"number",variants:[{begin:`(\\b(${a})((${s})|\\.)?|(${s}))[eE][+-]?(${o})\\b`},{begin:`\\b(${a})\\b((${s})\\b|\\.)?|(${s})\\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},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:r,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},d={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"graphql"}},p={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,c]},f={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:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},m=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,p,{match:/\$\d+/},l];c.contains=m.concat({begin:/\{/,end:/\}/,keywords:r,contains:["self"].concat(m)});const g=[].concat(f,c.contains),b=g.concat([{begin:/(\s*)\(/,end:/\)/,keywords:r,contains:["self"].concat(g)}]),y={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:b},v={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},x={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:{_:[...Hm,...qm]}},w={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},_={match:t.concat(/\b/,function(e){return t.concat("(?!",e.join("|"),")")}([...Km,"super","import"].map(e=>`${e}\\s*\\(`)),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",A={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:r,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,p,f,{match:/\$\d+/},l,x,{scope:"attr",match:n+t.lookahead(":"),relevance:0},A,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},w,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},_,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},v,E,{match:/\$[(.]/}]}}(e),i=Um,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[n.exports.CLASS_REFERENCE]},a={$pattern:Um,keyword:Vm.concat(["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"]),literal:$m,built_in:Wm.concat(r),"variable.language":Gm},l={className:"meta",begin:"@"+i},c=(e,t,n)=>{const i=e.contains.findIndex(e=>e.label===t);if(-1===i)throw new Error("can not find mode to replace");e.contains.splice(i,1,n)};Object.assign(n.keywords,a),n.exports.PARAMS_CONTAINS.push(l);const u=n.contains.find(e=>"attr"===e.scope),d=Object.assign({},u,{match:t.concat(i,t.lookahead(/\s*\?:/))});return n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,u,d]),n.contains=n.contains.concat([l,o,s,d]),c(n,"shebang",e.SHEBANG()),c(n,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),n.contains.find(e=>"func.def"===e.label).relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n},vbnet:function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,r=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,n),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,r,/ *#/)},{begin:t.concat(/# */,t.either(i,n),/ +/,t.either(r,o),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=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:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{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])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{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:[l]}]}},wasm:function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["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"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{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/},{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/}]}},xml:function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(r,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,o,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}},yaml:function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},r=e.inherit(i,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},s={begin:/\{/,end:/\}/,contains:[o],illegal:"\\n",relevance:0},a={begin:"\\[",end:"\\]",contains:[o],illegal:"\\n",relevance:0},l=[{className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},{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}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},s,a,{className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},i],c=[...l];return c.pop(),c.push(r),o.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:l}}},Xm=w(74),Ym={};class Qm{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){const n=this.stack[this.stack.length-1],i=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):n.children.push(...i)}openNode(e){const t=this,n={type:"element",tagName:"span",properties:{className:e.split(".").map(function(e,n){return n?e+"_".repeat(n):t.options.classPrefix+e})},children:[]};this.stack[this.stack.length-1].children.push(n),this.stack.push(n)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Jm={},eg={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff",fuchsia:"#ff00ff",cyan:"#00ffff",yellow:"#ffff00",orange:"#ff8000"};function tg(e){4===e.length&&(e=e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t||console.warn(`Unable to convert hex string ${e} to rgb values`),[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]}function ng(e){return void 0===e?[0,0,0]:3===arguments.length?arguments:isNaN(e)?"#"===e[0]?tg(e):eg[e.toLowerCase()]?tg(eg[e.toLowerCase()]):(console.warn("Color format not recognised"),[0,0,0]):(t=e,[((t=parseInt(t))>>16&255)/255,(t>>8&255)/255,(255&t)/255]);var t}class ig extends Array{constructor(e){return Array.isArray(e)?super(...e):super(...ng(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(e){this[0]=e}set g(e){this[1]=e}set b(e){this[2]=e}set(e){return Array.isArray(e)?this.copy(e):this.copy(ng(...arguments))}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this}}function rg({color:e=[1,1,1],speed:n=1,amplitude:i=.1,mouseReact:r=!0,...o}){const s=g(null),a=g({x:.5,y:.5});return d(()=>{if(!s.current)return;const t=s.current,o=new j,l=o.gl;let c;function u(){o.setSize(1*t.offsetWidth,1*t.offsetHeight),c&&(c.uniforms.uResolution.value=new ig(l.canvas.width,l.canvas.height,l.canvas.width/l.canvas.height))}l.clearColor(1,1,1,1),window.addEventListener("resize",u,!1),u();const d=new K(l);c=new Z(l,{vertex:"\nattribute vec2 uv;\nattribute vec2 position;\n\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n gl_Position = vec4(position, 0, 1);\n}\n",fragment:"\nprecision highp float;\n\nuniform float uTime;\nuniform vec3 uColor;\nuniform vec3 uResolution;\nuniform vec2 uMouse;\nuniform float uAmplitude;\nuniform float uSpeed;\n\nvarying vec2 vUv;\n\nvoid main() {\n float mr = min(uResolution.x, uResolution.y);\n vec2 uv = (vUv.xy * 2.0 - 1.0) * uResolution.xy / mr;\n\n uv += (uMouse - vec2(0.5)) * uAmplitude;\n\n float d = -uTime * 0.5 * uSpeed;\n float a = 0.0;\n for (float i = 0.0; i < 8.0; ++i) {\n a += cos(i - d - a * uv.x);\n d += sin(uv.y * i + a);\n }\n d += uTime * 0.5 * uSpeed;\n vec3 col = vec3(cos(uv * vec2(d, a)) * 0.6 + 0.4, cos(a + d) * 0.5 + 0.5);\n col = cos(col * cos(vec3(d, a, 2.5)) * 0.5 + 0.5) * uColor;\n gl_FragColor = vec4(col, 1.0);\n}\n",uniforms:{uTime:{value:0},uColor:{value:new ig(...e)},uResolution:{value:new ig(l.canvas.width,l.canvas.height,l.canvas.width/l.canvas.height)},uMouse:{value:new Float32Array([a.current.x,a.current.y])},uAmplitude:{value:i},uSpeed:{value:n}}});const h=new me(l,{geometry:d,program:c});let p;function f(e){const n=t.getBoundingClientRect(),i=(e.clientX-n.left)/n.width,r=1-(e.clientY-n.top)/n.height;a.current={x:i,y:r},c.uniforms.uMouse.value[0]=i,c.uniforms.uMouse.value[1]=r}return p=requestAnimationFrame(function e(t){p=requestAnimationFrame(e),c.uniforms.uTime.value=.001*t,o.render({scene:h})}),t.appendChild(l.canvas),r&&t.addEventListener("mousemove",f),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",u),r&&t.removeEventListener("mousemove",f),t.removeChild(l.canvas),l.getExtension("WEBGL_lose_context")?.loseContext()}},[e,n,i,r]),t("div",{ref:s,className:"iridescence-container",...o})}const og={a:({href:e,children:n,...i})=>t("a",{href:e,target:"_blank",rel:"noopener noreferrer",...i,children:n})},sg=[function(e){const t=e||kf,n=this.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),r=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(function(e){return Pc([{text:Qp},{document:{91:{name:"gfmFootnoteDefinition",tokenize:uf,continuation:{tokenize:df},exit:hf}},text:{91:{name:"gfmFootnoteCall",tokenize:cf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:af,resolveTo:lf}}},pf(e),{flow:{null:{name:"table",tokenize:gf,resolveAll:bf}}},{text:{91:wf}}])}(t)),r.push([{transforms:[$h],enter:{literalAutolink:Fh,literalAutolinkEmail:Bh,literalAutolinkHttp:Bh,literalAutolinkWww:Bh},exit:{literalAutolink:Vh,literalAutolinkEmail:Uh,literalAutolinkHttp:zh,literalAutolinkWww:jh}},{enter:{gfmFootnoteCallString:Gh,gfmFootnoteCall:Wh,gfmFootnoteDefinitionLabelString:Zh,gfmFootnoteDefinition:Xh},exit:{gfmFootnoteCallString:Yh,gfmFootnoteCall:Qh,gfmFootnoteDefinitionLabelString:Jh,gfmFootnoteDefinition:ep}},{canContainEols:["delete"],enter:{strikethrough:sp},exit:{strikethrough:ap}},{enter:{table:Ip,tableData:Fp,tableHeader:Fp,tableRow:Pp},exit:{codeText:Bp,table:Rp,tableData:Lp,tableHeader:Lp,tableRow:Lp}},{exit:{taskListCheckValueChecked:Up,taskListCheckValueUnchecked:Up,paragraph:Vp}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ph,notInConstruct:Lh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ph,notInConstruct:Lh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ph,notInConstruct:Lh}]},np(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:op}],handlers:{delete:lp}},jp(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$p}}]}}(t))}],ag=[function(e){const t=e||Jm,n=t.aliases,i=t.detect||!1,r=t.languages||Zm,o=t.plainText,s=t.prefix,a=t.subset;let l="hljs";const c=function(e){const t=Xm.newInstance();return e&&r(e),{highlight:n,highlightAuto:function(e,r){const o=(r||Ym).subset||i();let s,a=-1,l=0;for(;++a<o.length;){const i=o[a];if(!t.getLanguage(i))continue;const c=n(i,e,r);c.data&&void 0!==c.data.relevance&&c.data.relevance>l&&(l=c.data.relevance,s=c)}return s||{type:"root",children:[],data:{language:void 0,relevance:l}}},listLanguages:i,register:r,registerAlias:function(e,n){if("string"==typeof e)t.registerAliases("string"==typeof n?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){const i=e[n];t.registerAliases("string"==typeof i?i:[...i],{languageName:n})}}},registered:function(e){return Boolean(t.getLanguage(e))}};function n(e,n,i){const r=i||Ym,o="string"==typeof r.prefix?r.prefix:"hljs-";if(!t.getLanguage(e))throw new Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:Qm,classPrefix:o});const s=t.highlight(n,{ignoreIllegals:!0,language:e});if(s.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:s.errorRaised});const a=s._emitter.root,l=a.data;return l.language=s.language,l.relevance=s.relevance,a}function i(){return t.listLanguages()}function r(e,n){if("string"==typeof e)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}}(r);if(n&&c.registerAlias(n),s){const e=s.indexOf("-");l=-1===e?s:s.slice(0,e)}return function(e,t){Bd(e,"element",function(e,n,r){if("code"!==e.tagName||!r||"element"!==r.type||"pre"!==r.tagName)return;const u=function(e){const t=e.properties.className;let n,i=-1;if(Array.isArray(t)){for(;++i<t.length;){const e=String(t[i]);if("no-highlight"===e||"nohighlight"===e)return!1;n||"lang-"!==e.slice(0,5)||(n=e.slice(5)),n||"language-"!==e.slice(0,9)||(n=e.slice(9))}return n}}(e);if(!1===u||!u&&!i||u&&o&&o.includes(u))return;Array.isArray(e.properties.className)||(e.properties.className=[]),e.properties.className.includes(l)||e.properties.className.unshift(l);const d=function(e){const t={whitespace:"pre"}||{},n="children"in e?e.children:[],i=Pf(e),r=zf(e,{whitespace:t.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];"text"!==e.type&&"comment"!==e.type||o.push(...Ff(e,{whitespace:r,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<n.length;)o.push(...Lf(n[s],e,{whitespace:r,breakBefore:s?void 0:i,breakAfter:s<n.length-1?Tf(n[s+1]):i}));const a=[];let l;for(s=-1;++s<o.length;){const e=o[s];"number"==typeof e?void 0!==l&&e>l&&(l=e):e&&(void 0!==l&&l>-1&&a.push("\n".repeat(l)||" "),l=-1,a.push(e))}return a.join("")}(e);let h;try{h=u?c.highlight(u,d,{prefix:s}):c.highlightAuto(d,{prefix:s,subset:a})}catch(n){const i=n;if(u&&/Unknown language/.test(i.message))return void t.message("Cannot highlight as `"+u+"`, it’s not registered",{ancestors:[r,e],cause:i,place:e.position,ruleId:"missing-language",source:"rehype-highlight"});throw i}!u&&h.data&&h.data.language&&e.properties.className.push("language-"+h.data.language),h.children.length>0&&(e.children=h.children)})}}];function lg({content:e,createdAt:i}){return n($a.div,{className:"bmxcb__message bmxcb__message--assistant",initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:400,damping:25,duration:.3},layout:!0,children:[t("div",{className:"bmxcb__message-avatar",children:t("div",{className:"bmxcb__avatar",children:t(rg,{color:[.5,.5,.7],mouseReact:!1,amplitude:.1,speed:1.7})})}),n("div",{className:"bmxcb__message-content",children:[t("div",{className:"bmxcb__markdown",children:t(Th,{remarkPlugins:sg,rehypePlugins:ag,components:og,children:e})}),t("div",{className:"bmxcb__message-time",children:ul(i)})]})]})}function cg({message:e}){return e.role===Ka.USER?t(dl,{content:e.content,createdAt:e.createdAt}):e.role===Ka.ASSISTANT?t(lg,{content:e.content,createdAt:e.createdAt}):t(dl,{content:e.content})}function ug(){return n("div",{className:"bmxcb__message bmxcb__message--assistant",children:[t("div",{className:"bmxcb__message-avatar",children:t("div",{className:"bmxcb__avatar",children:t(rg,{color:[.5,.5,.7],mouseReact:!1,amplitude:.1,speed:1.7})})}),t("div",{className:"bmxcb__message-content",children:n("div",{className:"bmxcb__typing",children:[t($a.span,{className:"bmxcb__dot",animate:{opacity:[.2,1,.2]},transition:{repeat:1/0,duration:1.2,delay:0}}),t($a.span,{className:"bmxcb__dot",animate:{opacity:[.2,1,.2]},transition:{repeat:1/0,duration:1.2,delay:.2}}),t($a.span,{className:"bmxcb__dot",animate:{opacity:[.2,1,.2]},transition:{repeat:1/0,duration:1.2,delay:.4}})]})})]})}const dg=({onSuggestionClick:e})=>t("div",{className:"bmxcb__empty-state",children:n("div",{className:"bmxcb__empty-state-content",children:[t("h3",{className:"bmxcb__empty-state-title",children:"Welcome to BMX Chat"}),t("p",{className:"bmxcb__empty-state-description",children:"Ask me anything about BMX documentation, products, or features!"}),n("div",{className:"bmxcb__empty-state-suggestions",children:[t("span",{className:"bmxcb__empty-state-suggestion",children:"Try asking:"}),n("div",{className:"bmxcb__empty-state-suggestion-chips",children:[t("span",{className:"bmxcb__empty-state-chip",onClick:()=>e?.("What is BMX?"),children:'"What is BMX?"'}),t("span",{className:"bmxcb__empty-state-chip",onClick:()=>e?.("How to trade?"),children:'"How to trade?"'}),t("span",{className:"bmxcb__empty-state-chip",onClick:()=>e?.("BMX Deli Swap"),children:'"BMX Deli Swap"'})]})]})]})});function hg({messages:i,sending:r,onSuggestionClick:o}){const s=g(null),a=g(null),[l,c]=b(!1),u=()=>{s.current?.scrollIntoView({behavior:"smooth"})};d(()=>{u()},[i]);const h=0===i.length;return t("div",{className:"bmxcb__messages "+(h?"bmxcb__messages--empty":""),ref:a,onScroll:()=>{if(a.current){const{scrollTop:e,scrollHeight:t,clientHeight:n}=a.current;c(!(t-e-n<100))}},children:h?t(dg,{onSuggestionClick:o}):n(e,{children:[i.map(e=>t(cg,{message:e},e.id)),r&&t(ug,{}),t("div",{ref:s}),l&&t("button",{className:"bmxcb__scroll-to-bottom",onClick:u,"aria-label":"Scroll to bottom",children:"↓"})]})})}function pg({input:e,setInput:i,onKeyDown:r,onSend:o,placeholder:s,sending:a}){return n($a.div,{className:"bmxcb__inputRow",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1,duration:.3},children:[t($a.textarea,{className:"bmxcb__input",value:e,onChange:e=>i(e.target.value),onKeyDown:r,placeholder:s,rows:1,whileFocus:{scale:1.02},transition:{type:"spring",stiffness:400,damping:25}}),t($a.button,{className:"bmxcb__send",onClick:o,disabled:a||!e.trim(),whileHover:{scale:1.05,y:-1},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:25},"aria-label":a?"Sending...":"Send message",children:t($a.div,{animate:a?{rotate:360}:{rotate:0},transition:{duration:1,repeat:a?1/0:0,ease:"linear"},children:t(a?ol:sl,{size:16})})})]})}function fg({onClose:e,onClearHistory:i,history:r,hue:o,onHueChange:s,hoverIntensity:a,onHoverIntensityChange:l,rotateOnHover:c,onRotateOnHoverChange:u}){return n($a.div,{className:"bmxcb__settings-panel",initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.2},children:[n("div",{className:"bmxcb__settings-header",children:[n("div",{className:"bmxcb__settings-title",children:[t(il,{size:18}),"Settings"]}),t("button",{className:"bmxcb__settings-close",onClick:e,"aria-label":"Close settings",children:t(nl,{size:18})})]}),n("div",{className:"bmxcb__settings-content",children:[n("div",{className:"bmxcb__settings-section",children:[n("h3",{className:"bmxcb__settings-section-title",children:[t(rl,{size:16}),"Orb Appearance"]}),n("div",{className:"bmxcb__settings-group",children:[n("label",{className:"bmxcb__settings-label",children:["Color Hue: ",o,"°"]}),t("input",{type:"range",min:"0",max:"360",value:o,onChange:e=>s(Number(e.target.value)),className:"bmxcb__settings-slider"})]}),n("div",{className:"bmxcb__settings-group",children:[n("label",{className:"bmxcb__settings-label",children:["Hover Intensity: ",Math.round(100*a),"%"]}),t("input",{type:"range",min:"0",max:"1",step:"0.1",value:a,onChange:e=>l(Number(e.target.value)),className:"bmxcb__settings-slider"})]}),t("div",{className:"bmxcb__settings-group",children:n("label",{className:"bmxcb__settings-checkbox-label",children:[t("input",{type:"checkbox",checked:c,onChange:e=>u(e.target.checked),className:"bmxcb__settings-checkbox"}),t("span",{children:"Rotate on hover"})]})})]}),r.length>0&&t("div",{className:"bmxcb__settings-section",children:n("button",{className:"bmxcb__settings-clear-button",onClick:()=>{i(),e()},children:[t(al,{size:16}),"Clear Chat History"]})})]})]})}function mg({title:i,messages:r,input:o,setInput:s,onKeyDown:a,onSend:l,onClose:c,placeholder:u,sending:d,showSettings:h,onToggleSettings:p,onClearHistory:f,hue:m,onHueChange:g,hoverIntensity:b,onHoverIntensityChange:y,rotateOnHover:v,onRotateOnHoverChange:x,onSuggestionClick:w}){return t($a.div,{className:"bmxcb__panel",role:"dialog","aria-modal":"true","aria-label":"BMX Chat",initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},transition:{type:"spring",stiffness:300,damping:30,duration:.3},children:h?t(fg,{onClose:p,onClearHistory:f,history:r,hue:m,onHueChange:g,hoverIntensity:b,onHoverIntensityChange:y,rotateOnHover:v,onRotateOnHoverChange:x}):n(e,{children:[t(cl,{title:i,onClose:c,onSettings:p}),t(hg,{messages:r,sending:d,onSuggestionClick:w}),t(pg,{input:o,setInput:s,onKeyDown:a,onSend:l,placeholder:u,sending:d})]})})}function gg({api:i,projectId:r,zIndex:o=2147483e3,storage:s="local",storageKey:a="bmx-chat-bot-history",placeholder:l="Ask about this project…",title:u="Assistant",children:h}){const[p,f]=b(!1),[v,x]=b(!1),[w,_]=b([]),[k,E]=b(""),[S,A]=b(!1),[C,M]=b(!1),[N,T]=b(0),[O,D]=b(.5),[I,R]=b(!0),P=g(null);d(()=>{x(!0)},[]),d(()=>{if("undefined"!=typeof window&&"local"===s)try{const e=window.localStorage.getItem(a);e&&_(JSON.parse(e))}catch{}},[s,a]),d(()=>{if("undefined"!=typeof window&&"local"===s)try{window.localStorage.setItem(a,JSON.stringify(w))}catch{}},[w,s,a]);const L=m(()=>{if(!v||"undefined"==typeof document)return null;const e=document.createElement("div");return e.setAttribute("data-bmx-chat-bot-root",""),e.style.all="initial",e.style.fontFamily="var(--bmx-font-family)",e.style.position="fixed",e.style.right="16px",e.style.bottom="16px",e.style.zIndex=String(o),e},[v,o]);d(()=>{if(L&&"undefined"!=typeof document)return document.body.appendChild(L),()=>{try{document.body.removeChild(L)}catch{}}},[L]);const F=c(async e=>{const t=e.trim();if(!t||S)return;const n={id:`${Date.now()}-user`,role:"user",content:t,createdAt:Date.now()};_(e=>[...e,n]),A(!0),P.current?.abort(),P.current=new AbortController;try{const e=await i.sendMessage([...w,n],t,{projectId:r,signal:P.current.signal});_(t=>[...t,e])}catch(e){const t={id:`${Date.now()}-error`,role:"assistant",content:"Sorry, something went wrong. Please try again.",createdAt:Date.now()};_(e=>[...e,t])}finally{A(!1)}},[i,w,r,S]),B=c(async()=>{const e=k.trim();e&&!S&&(E(""),await F(e))},[k,S,F]),z=c(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),B())},[B]),j=c(()=>{if(_([]),"undefined"!=typeof window&&"local"===s)try{window.localStorage.removeItem(a)}catch{}},[s,a]),U=c(()=>{M(e=>!e)},[]);return v&&L?n(e,{children:[h??null,y(n("div",{className:"bmxcb",children:[t(qa,{open:p,onClick:()=>f(e=>!e),hue:N,hoverIntensity:O,rotateOnHover:I,forceHoverState:!1}),p&&t(mg,{title:u,messages:w,input:k,setInput:E,onKeyDown:z,onSend:()=>{B()},onClose:()=>f(!1),placeholder:l,sending:S,showSettings:C,onToggleSettings:U,onClearHistory:j,hue:N,onHueChange:T,hoverIntensity:O,onHoverIntensityChange:D,rotateOnHover:I,onRotateOnHoverChange:R,onSuggestionClick:async e=>{E(e),f(!0),E(""),await F(e)}})]}),L)]}):t(e,{children:h??null})}export{gg as BmxChatBot,A as RestAdapters,E as createMockAdapter,S as createRestAdapter};