@schmitech/chatbot-widget 0.3.1 → 0.3.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.
@@ -1,4 +1,4 @@
1
- (function(we,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],j):(we=typeof globalThis<"u"?globalThis:we||self,j(we.ChatbotWidget={},we.React))})(this,function(we,j){"use strict";typeof window<"u"&&(window.global=window);var Yn={},Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Yn<"u"?Yn:typeof self<"u"?self:{};function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yt={exports:{}},gt={};/**
1
+ (function(we,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],j):(we=typeof globalThis<"u"?globalThis:we||self,j(we.ChatbotWidget={},we.React))})(this,function(we,j){"use strict";typeof window<"u"&&(window.global=window);var Vn={},Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Vn<"u"?Vn:typeof self<"u"?self:{};function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yt={exports:{}},yt={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Kn;function Qi(){if(Kn)return gt;Kn=1;var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(a,u,f){var s,c={},h=null,p=null;f!==void 0&&(h=""+f),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(p=u.ref);for(s in u)r.call(u,s)&&!o.hasOwnProperty(s)&&(c[s]=u[s]);if(a&&a.defaultProps)for(s in u=a.defaultProps,u)c[s]===void 0&&(c[s]=u[s]);return{$$typeof:t,type:a,key:h,ref:p,props:c,_owner:i.current}}return gt.Fragment=n,gt.jsx=l,gt.jsxs=l,gt}var yt={},qn;function Ji(){if(qn)return yt;qn=1;var e={};/**
9
+ */var Wn;function Qi(){if(Wn)return yt;Wn=1;var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(a,u,f){var s,c={},h=null,p=null;f!==void 0&&(h=""+f),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(p=u.ref);for(s in u)r.call(u,s)&&!o.hasOwnProperty(s)&&(c[s]=u[s]);if(a&&a.defaultProps)for(s in u=a.defaultProps,u)c[s]===void 0&&(c[s]=u[s]);return{$$typeof:t,type:a,key:h,ref:p,props:c,_owner:i.current}}return yt.Fragment=n,yt.jsx=l,yt.jsxs=l,yt}var xt={},Yn;function Ji(){if(Yn)return xt;Yn=1;var e={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */return e.NODE_ENV!=="production"&&function(){var t=j,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),x=Symbol.iterator,T="@@iterator";function k(m){if(m===null||typeof m!="object")return null;var S=x&&m[x]||m[T];return typeof S=="function"?S:null}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(m){{for(var S=arguments.length,I=new Array(S>1?S-1:0),M=1;M<S;M++)I[M-1]=arguments[M];z("error",m,I)}}function z(m,S,I){{var M=A.ReactDebugCurrentFrame,ee=M.getStackAddendum();ee!==""&&(S+="%s",I=I.concat([ee]));var re=I.map(function(Q){return String(Q)});re.unshift("Warning: "+S),Function.prototype.apply.call(console[m],console,re)}}var U=!1,w=!1,L=!1,Y=!1,F=!1,K;K=Symbol.for("react.module.reference");function O(m){return!!(typeof m=="string"||typeof m=="function"||m===i||m===l||F||m===o||m===s||m===c||Y||m===y||U||w||L||typeof m=="object"&&m!==null&&(m.$$typeof===p||m.$$typeof===h||m.$$typeof===a||m.$$typeof===u||m.$$typeof===f||m.$$typeof===K||m.getModuleId!==void 0))}function P(m,S,I){var M=m.displayName;if(M)return M;var ee=S.displayName||S.name||"";return ee!==""?I+"("+ee+")":I}function $(m){return m.displayName||"Context"}function G(m){if(m==null)return null;if(typeof m.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case i:return"Fragment";case r:return"Portal";case l:return"Profiler";case o:return"StrictMode";case s:return"Suspense";case c:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case u:var S=m;return $(S)+".Consumer";case a:var I=m;return $(I._context)+".Provider";case f:return P(m,m.render,"ForwardRef");case h:var M=m.displayName||null;return M!==null?M:G(m.type)||"Memo";case p:{var ee=m,re=ee._payload,Q=ee._init;try{return G(Q(re))}catch{return null}}}return null}var H=Object.assign,le=0,te,ge,B,d,ae,Se,g;function ye(){}ye.__reactDisabledLog=!0;function Me(){{if(le===0){te=console.log,ge=console.info,B=console.warn,d=console.error,ae=console.group,Se=console.groupCollapsed,g=console.groupEnd;var m={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}le++}}function se(){{if(le--,le===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},m,{value:te}),info:H({},m,{value:ge}),warn:H({},m,{value:B}),error:H({},m,{value:d}),group:H({},m,{value:ae}),groupCollapsed:H({},m,{value:Se}),groupEnd:H({},m,{value:g})})}le<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Be=A.ReactCurrentDispatcher,Ee;function De(m,S,I){{if(Ee===void 0)try{throw Error()}catch(ee){var M=ee.stack.trim().match(/\n( *(at )?)/);Ee=M&&M[1]||""}return`
18
- `+Ee+m}}var de=!1,Ne;{var It=typeof WeakMap=="function"?WeakMap:Map;Ne=new It}function ht(m,S){if(!m||de)return"";{var I=Ne.get(m);if(I!==void 0)return I}var M;de=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var re;re=Be.current,Be.current=null,Me();try{if(S){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(Pe){M=Pe}Reflect.construct(m,[],Q)}else{try{Q.call()}catch(Pe){M=Pe}m.call(Q.prototype)}}else{try{throw Error()}catch(Pe){M=Pe}m()}}catch(Pe){if(Pe&&M&&typeof Pe.stack=="string"){for(var q=Pe.stack.split(`
19
- `),_e=M.stack.split(`
17
+ */return e.NODE_ENV!=="production"&&function(){var t=j,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),x=Symbol.iterator,T="@@iterator";function k(m){if(m===null||typeof m!="object")return null;var v=x&&m[x]||m[T];return typeof v=="function"?v:null}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(m){{for(var v=arguments.length,I=new Array(v>1?v-1:0),F=1;F<v;F++)I[F-1]=arguments[F];z("error",m,I)}}function z(m,v,I){{var F=A.ReactDebugCurrentFrame,ee=F.getStackAddendum();ee!==""&&(v+="%s",I=I.concat([ee]));var re=I.map(function(Q){return String(Q)});re.unshift("Warning: "+v),Function.prototype.apply.call(console[m],console,re)}}var U=!1,w=!1,L=!1,Y=!1,M=!1,K;K=Symbol.for("react.module.reference");function O(m){return!!(typeof m=="string"||typeof m=="function"||m===i||m===l||M||m===o||m===s||m===c||Y||m===y||U||w||L||typeof m=="object"&&m!==null&&(m.$$typeof===p||m.$$typeof===h||m.$$typeof===a||m.$$typeof===u||m.$$typeof===f||m.$$typeof===K||m.getModuleId!==void 0))}function P(m,v,I){var F=m.displayName;if(F)return F;var ee=v.displayName||v.name||"";return ee!==""?I+"("+ee+")":I}function $(m){return m.displayName||"Context"}function G(m){if(m==null)return null;if(typeof m.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case i:return"Fragment";case r:return"Portal";case l:return"Profiler";case o:return"StrictMode";case s:return"Suspense";case c:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case u:var v=m;return $(v)+".Consumer";case a:var I=m;return $(I._context)+".Provider";case f:return P(m,m.render,"ForwardRef");case h:var F=m.displayName||null;return F!==null?F:G(m.type)||"Memo";case p:{var ee=m,re=ee._payload,Q=ee._init;try{return G(Q(re))}catch{return null}}}return null}var H=Object.assign,le=0,te,ge,B,d,ae,ve,g;function ye(){}ye.__reactDisabledLog=!0;function Fe(){{if(le===0){te=console.log,ge=console.info,B=console.warn,d=console.error,ae=console.group,ve=console.groupCollapsed,g=console.groupEnd;var m={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}le++}}function se(){{if(le--,le===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},m,{value:te}),info:H({},m,{value:ge}),warn:H({},m,{value:B}),error:H({},m,{value:d}),group:H({},m,{value:ae}),groupCollapsed:H({},m,{value:ve}),groupEnd:H({},m,{value:g})})}le<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Be=A.ReactCurrentDispatcher,Ee;function Ne(m,v,I){{if(Ee===void 0)try{throw Error()}catch(ee){var F=ee.stack.trim().match(/\n( *(at )?)/);Ee=F&&F[1]||""}return`
18
+ `+Ee+m}}var de=!1,De;{var It=typeof WeakMap=="function"?WeakMap:Map;De=new It}function dt(m,v){if(!m||de)return"";{var I=De.get(m);if(I!==void 0)return I}var F;de=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var re;re=Be.current,Be.current=null,Fe();try{if(v){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(Pe){F=Pe}Reflect.construct(m,[],Q)}else{try{Q.call()}catch(Pe){F=Pe}m.call(Q.prototype)}}else{try{throw Error()}catch(Pe){F=Pe}m()}}catch(Pe){if(Pe&&F&&typeof Pe.stack=="string"){for(var q=Pe.stack.split(`
19
+ `),_e=F.stack.split(`
20
20
  `),ce=q.length-1,pe=_e.length-1;ce>=1&&pe>=0&&q[ce]!==_e[pe];)pe--;for(;ce>=1&&pe>=0;ce--,pe--)if(q[ce]!==_e[pe]){if(ce!==1||pe!==1)do if(ce--,pe--,pe<0||q[ce]!==_e[pe]){var ze=`
21
- `+q[ce].replace(" at new "," at ");return m.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",m.displayName)),typeof m=="function"&&Ne.set(m,ze),ze}while(ce>=1&&pe>=0);break}}}finally{de=!1,Be.current=re,se(),Error.prepareStackTrace=ee}var mt=m?m.displayName||m.name:"",lt=mt?De(mt):"";return typeof m=="function"&&Ne.set(m,lt),lt}function At(m,S,I){return ht(m,!1)}function it(m){var S=m.prototype;return!!(S&&S.isReactComponent)}function qe(m,S,I){if(m==null)return"";if(typeof m=="function")return ht(m,it(m));if(typeof m=="string")return De(m);switch(m){case s:return De("Suspense");case c:return De("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case f:return At(m.render);case h:return qe(m.type,S,I);case p:{var M=m,ee=M._payload,re=M._init;try{return qe(re(ee),S,I)}catch{}}}return""}var R=Object.prototype.hasOwnProperty,X={},ue=A.ReactDebugCurrentFrame;function ve(m){if(m){var S=m._owner,I=qe(m.type,m._source,S?S.type:null);ue.setExtraStackFrame(I)}else ue.setExtraStackFrame(null)}function Oe(m,S,I,M,ee){{var re=Function.call.bind(R);for(var Q in m)if(re(m,Q)){var q=void 0;try{if(typeof m[Q]!="function"){var _e=Error((M||"React class")+": "+I+" type `"+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[Q]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _e.name="Invariant Violation",_e}q=m[Q](S,Q,M,I,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ce){q=ce}q&&!(q instanceof Error)&&(ve(ee),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",M||"React class",I,Q,typeof q),ve(null)),q instanceof Error&&!(q.message in X)&&(X[q.message]=!0,ve(ee),v("Failed %s type: %s",I,q.message),ve(null))}}}var Ce=Array.isArray;function ot(m){return Ce(m)}function Ge(m){{var S=typeof Symbol=="function"&&Symbol.toStringTag,I=S&&m[Symbol.toStringTag]||m.constructor.name||"Object";return I}}function Ze(m){try{return b(m),!1}catch{return!0}}function b(m){return""+m}function _(m){if(Ze(m))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ge(m)),b(m)}var D=A.ReactCurrentOwner,V={key:!0,ref:!0,__self:!0,__source:!0},J,xe;function ne(m){if(R.call(m,"ref")){var S=Object.getOwnPropertyDescriptor(m,"ref").get;if(S&&S.isReactWarning)return!1}return m.ref!==void 0}function he(m){if(R.call(m,"key")){var S=Object.getOwnPropertyDescriptor(m,"key").get;if(S&&S.isReactWarning)return!1}return m.key!==void 0}function Ye(m,S){typeof m.ref=="string"&&D.current}function Ke(m,S){{var I=function(){J||(J=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};I.isReactWarning=!0,Object.defineProperty(m,"key",{get:I,configurable:!0})}}function be(m,S){{var I=function(){xe||(xe=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};I.isReactWarning=!0,Object.defineProperty(m,"ref",{get:I,configurable:!0})}}var $e=function(m,S,I,M,ee,re,Q){var q={$$typeof:n,type:m,key:S,ref:I,props:Q,_owner:re};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function Ue(m,S,I,M,ee){{var re,Q={},q=null,_e=null;I!==void 0&&(_(I),q=""+I),he(S)&&(_(S.key),q=""+S.key),ne(S)&&(_e=S.ref,Ye(S,ee));for(re in S)R.call(S,re)&&!V.hasOwnProperty(re)&&(Q[re]=S[re]);if(m&&m.defaultProps){var ce=m.defaultProps;for(re in ce)Q[re]===void 0&&(Q[re]=ce[re])}if(q||_e){var pe=typeof m=="function"?m.displayName||m.name||"Unknown":m;q&&Ke(Q,pe),_e&&be(Q,pe)}return $e(m,q,_e,ee,M,D.current,Q)}}var Un=A.ReactCurrentOwner,Vi=A.ReactDebugCurrentFrame;function dt(m){if(m){var S=m._owner,I=qe(m.type,m._source,S?S.type:null);Vi.setExtraStackFrame(I)}else Vi.setExtraStackFrame(null)}var Hn;Hn=!1;function Vn(m){return typeof m=="object"&&m!==null&&m.$$typeof===n}function Wi(){{if(Un.current){var m=G(Un.current.type);if(m)return`
21
+ `+q[ce].replace(" at new "," at ");return m.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",m.displayName)),typeof m=="function"&&De.set(m,ze),ze}while(ce>=1&&pe>=0);break}}}finally{de=!1,Be.current=re,se(),Error.prepareStackTrace=ee}var gt=m?m.displayName||m.name:"",lt=gt?Ne(gt):"";return typeof m=="function"&&De.set(m,lt),lt}function At(m,v,I){return dt(m,!1)}function it(m){var v=m.prototype;return!!(v&&v.isReactComponent)}function qe(m,v,I){if(m==null)return"";if(typeof m=="function")return dt(m,it(m));if(typeof m=="string")return Ne(m);switch(m){case s:return Ne("Suspense");case c:return Ne("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case f:return At(m.render);case h:return qe(m.type,v,I);case p:{var F=m,ee=F._payload,re=F._init;try{return qe(re(ee),v,I)}catch{}}}return""}var R=Object.prototype.hasOwnProperty,X={},ue=A.ReactDebugCurrentFrame;function Se(m){if(m){var v=m._owner,I=qe(m.type,m._source,v?v.type:null);ue.setExtraStackFrame(I)}else ue.setExtraStackFrame(null)}function Oe(m,v,I,F,ee){{var re=Function.call.bind(R);for(var Q in m)if(re(m,Q)){var q=void 0;try{if(typeof m[Q]!="function"){var _e=Error((F||"React class")+": "+I+" type `"+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[Q]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _e.name="Invariant Violation",_e}q=m[Q](v,Q,F,I,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ce){q=ce}q&&!(q instanceof Error)&&(Se(ee),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",F||"React class",I,Q,typeof q),Se(null)),q instanceof Error&&!(q.message in X)&&(X[q.message]=!0,Se(ee),S("Failed %s type: %s",I,q.message),Se(null))}}}var Ce=Array.isArray;function ot(m){return Ce(m)}function Ge(m){{var v=typeof Symbol=="function"&&Symbol.toStringTag,I=v&&m[Symbol.toStringTag]||m.constructor.name||"Object";return I}}function Ze(m){try{return b(m),!1}catch{return!0}}function b(m){return""+m}function _(m){if(Ze(m))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ge(m)),b(m)}var N=A.ReactCurrentOwner,V={key:!0,ref:!0,__self:!0,__source:!0},J,xe;function ne(m){if(R.call(m,"ref")){var v=Object.getOwnPropertyDescriptor(m,"ref").get;if(v&&v.isReactWarning)return!1}return m.ref!==void 0}function he(m){if(R.call(m,"key")){var v=Object.getOwnPropertyDescriptor(m,"key").get;if(v&&v.isReactWarning)return!1}return m.key!==void 0}function Ye(m,v){typeof m.ref=="string"&&N.current}function Ke(m,v){{var I=function(){J||(J=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",v))};I.isReactWarning=!0,Object.defineProperty(m,"key",{get:I,configurable:!0})}}function be(m,v){{var I=function(){xe||(xe=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",v))};I.isReactWarning=!0,Object.defineProperty(m,"ref",{get:I,configurable:!0})}}var $e=function(m,v,I,F,ee,re,Q){var q={$$typeof:n,type:m,key:v,ref:I,props:Q,_owner:re};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function Ue(m,v,I,F,ee){{var re,Q={},q=null,_e=null;I!==void 0&&(_(I),q=""+I),he(v)&&(_(v.key),q=""+v.key),ne(v)&&(_e=v.ref,Ye(v,ee));for(re in v)R.call(v,re)&&!V.hasOwnProperty(re)&&(Q[re]=v[re]);if(m&&m.defaultProps){var ce=m.defaultProps;for(re in ce)Q[re]===void 0&&(Q[re]=ce[re])}if(q||_e){var pe=typeof m=="function"?m.displayName||m.name||"Unknown":m;q&&Ke(Q,pe),_e&&be(Q,pe)}return $e(m,q,_e,ee,F,N.current,Q)}}var zn=A.ReactCurrentOwner,Vi=A.ReactDebugCurrentFrame;function mt(m){if(m){var v=m._owner,I=qe(m.type,m._source,v?v.type:null);Vi.setExtraStackFrame(I)}else Vi.setExtraStackFrame(null)}var Bn;Bn=!1;function Un(m){return typeof m=="object"&&m!==null&&m.$$typeof===n}function Wi(){{if(zn.current){var m=G(zn.current.type);if(m)return`
22
22
 
23
- Check the render method of \``+m+"`."}return""}}function pc(m){return""}var Yi={};function hc(m){{var S=Wi();if(!S){var I=typeof m=="string"?m:m.displayName||m.name;I&&(S=`
23
+ Check the render method of \``+m+"`."}return""}}function dc(m){return""}var Yi={};function mc(m){{var v=Wi();if(!v){var I=typeof m=="string"?m:m.displayName||m.name;I&&(v=`
24
24
 
25
- Check the top-level render call using <`+I+">.")}return S}}function Ki(m,S){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var I=hc(S);if(Yi[I])return;Yi[I]=!0;var M="";m&&m._owner&&m._owner!==Un.current&&(M=" It was passed a child from "+G(m._owner.type)+"."),dt(m),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',I,M),dt(null)}}function qi(m,S){{if(typeof m!="object")return;if(ot(m))for(var I=0;I<m.length;I++){var M=m[I];Vn(M)&&Ki(M,S)}else if(Vn(m))m._store&&(m._store.validated=!0);else if(m){var ee=k(m);if(typeof ee=="function"&&ee!==m.entries)for(var re=ee.call(m),Q;!(Q=re.next()).done;)Vn(Q.value)&&Ki(Q.value,S)}}}function dc(m){{var S=m.type;if(S==null||typeof S=="string")return;var I;if(typeof S=="function")I=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===f||S.$$typeof===h))I=S.propTypes;else return;if(I){var M=G(S);Oe(I,m.props,"prop",M,m)}else if(S.PropTypes!==void 0&&!Hn){Hn=!0;var ee=G(S);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mc(m){{for(var S=Object.keys(m.props),I=0;I<S.length;I++){var M=S[I];if(M!=="children"&&M!=="key"){dt(m),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),dt(null);break}}m.ref!==null&&(dt(m),v("Invalid attribute `ref` supplied to `React.Fragment`."),dt(null))}}var Gi={};function Xi(m,S,I,M,ee,re){{var Q=O(m);if(!Q){var q="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _e=pc();_e?q+=_e:q+=Wi();var ce;m===null?ce="null":ot(m)?ce="array":m!==void 0&&m.$$typeof===n?(ce="<"+(G(m.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):ce=typeof m,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ce,q)}var pe=Ue(m,S,I,ee,re);if(pe==null)return pe;if(Q){var ze=S.children;if(ze!==void 0)if(M)if(ot(ze)){for(var mt=0;mt<ze.length;mt++)qi(ze[mt],m);Object.freeze&&Object.freeze(ze)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else qi(ze,m)}if(R.call(S,"key")){var lt=G(m),Pe=Object.keys(S).filter(function(kc){return kc!=="key"}),Wn=Pe.length>0?"{key: someKey, "+Pe.join(": ..., ")+": ...}":"{key: someKey}";if(!Gi[lt+Wn]){var wc=Pe.length>0?"{"+Pe.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+I+">.")}return v}}function Ki(m,v){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var I=mc(v);if(Yi[I])return;Yi[I]=!0;var F="";m&&m._owner&&m._owner!==zn.current&&(F=" It was passed a child from "+G(m._owner.type)+"."),mt(m),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',I,F),mt(null)}}function qi(m,v){{if(typeof m!="object")return;if(ot(m))for(var I=0;I<m.length;I++){var F=m[I];Un(F)&&Ki(F,v)}else if(Un(m))m._store&&(m._store.validated=!0);else if(m){var ee=k(m);if(typeof ee=="function"&&ee!==m.entries)for(var re=ee.call(m),Q;!(Q=re.next()).done;)Un(Q.value)&&Ki(Q.value,v)}}}function gc(m){{var v=m.type;if(v==null||typeof v=="string")return;var I;if(typeof v=="function")I=v.propTypes;else if(typeof v=="object"&&(v.$$typeof===f||v.$$typeof===h))I=v.propTypes;else return;if(I){var F=G(v);Oe(I,m.props,"prop",F,m)}else if(v.PropTypes!==void 0&&!Bn){Bn=!0;var ee=G(v);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof v.getDefaultProps=="function"&&!v.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function yc(m){{for(var v=Object.keys(m.props),I=0;I<v.length;I++){var F=v[I];if(F!=="children"&&F!=="key"){mt(m),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",F),mt(null);break}}m.ref!==null&&(mt(m),S("Invalid attribute `ref` supplied to `React.Fragment`."),mt(null))}}var Gi={};function Xi(m,v,I,F,ee,re){{var Q=O(m);if(!Q){var q="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _e=dc();_e?q+=_e:q+=Wi();var ce;m===null?ce="null":ot(m)?ce="array":m!==void 0&&m.$$typeof===n?(ce="<"+(G(m.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):ce=typeof m,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ce,q)}var pe=Ue(m,v,I,ee,re);if(pe==null)return pe;if(Q){var ze=v.children;if(ze!==void 0)if(F)if(ot(ze)){for(var gt=0;gt<ze.length;gt++)qi(ze[gt],m);Object.freeze&&Object.freeze(ze)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else qi(ze,m)}if(R.call(v,"key")){var lt=G(m),Pe=Object.keys(v).filter(function(vc){return vc!=="key"}),Hn=Pe.length>0?"{key: someKey, "+Pe.join(": ..., ")+": ...}":"{key: someKey}";if(!Gi[lt+Hn]){var Sc=Pe.length>0?"{"+Pe.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Wn,lt,wc,lt),Gi[lt+Wn]=!0}}return m===i?mc(pe):dc(pe),pe}}function gc(m,S,I){return Xi(m,S,I,!0)}function yc(m,S,I){return Xi(m,S,I,!1)}var xc=yc,bc=gc;yt.Fragment=i,yt.jsx=xc,yt.jsxs=bc}(),yt}var Zi={};Zi.NODE_ENV==="production"?Yt.exports=Qi():Yt.exports=Ji();var E=Yt.exports;/**
30
+ <%s key={someKey} {...props} />`,Hn,lt,Sc,lt),Gi[lt+Hn]=!0}}return m===i?yc(pe):gc(pe),pe}}function xc(m,v,I){return Xi(m,v,I,!0)}function bc(m,v,I){return Xi(m,v,I,!1)}var wc=bc,kc=xc;xt.Fragment=i,xt.jsx=wc,xt.jsxs=kc}(),xt}var Zi={};Zi.NODE_ENV==="production"?Yt.exports=Qi():Yt.exports=Ji();var E=Yt.exports;/**
31
31
  * @license lucide-react v0.344.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
@@ -82,7 +82,7 @@ React keys must be passed directly to JSX without using spread:
82
82
  *
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
- */const Gn=Te("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
85
+ */const Kn=Te("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
86
86
  * @license lucide-react v0.344.0 - ISC
87
87
  *
88
88
  * This source code is licensed under the ISC license.
@@ -92,7 +92,7 @@ React keys must be passed directly to JSX without using spread:
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
- */const Xn=Te("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
95
+ */const qn=Te("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
96
96
  * @license lucide-react v0.344.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
@@ -107,7 +107,7 @@ React keys must be passed directly to JSX without using spread:
107
107
  *
108
108
  * This source code is licensed under the ISC license.
109
109
  * See the LICENSE file in the root directory of this source tree.
110
- */const po=Te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ho={},Qn=e=>{let t;const n=new Set,r=(s,c)=>{const h=typeof s=="function"?s(t):s;if(!Object.is(h,t)){const p=t;t=c??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(y=>y(t,p))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>f,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>{(ho?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,u);return u},mo=e=>e?Qn(e):Qn;var Kt={exports:{}},qt={},Ot={exports:{}},Gt={};/**
110
+ */const po=Te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ho={},Gn=e=>{let t;const n=new Set,r=(s,c)=>{const h=typeof s=="function"?s(t):s;if(!Object.is(h,t)){const p=t;t=c??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(y=>y(t,p))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>f,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>{(ho?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,u);return u},mo=e=>e?Gn(e):Gn;var Kt={exports:{}},qt={},Ot={exports:{}},Gt={};/**
111
111
  * @license React
112
112
  * use-sync-external-store-shim.production.js
113
113
  *
@@ -115,7 +115,7 @@ React keys must be passed directly to JSX without using spread:
115
115
  *
116
116
  * This source code is licensed under the MIT license found in the
117
117
  * LICENSE file in the root directory of this source tree.
118
- */var Jn;function go(){if(Jn)return Gt;Jn=1;var e=j;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function a(c,h){var p=h(),y=r({inst:{value:p,getSnapshot:h}}),x=y[0].inst,T=y[1];return o(function(){x.value=p,x.getSnapshot=h,u(x)&&T({inst:x})},[c,p,h]),i(function(){return u(x)&&T({inst:x}),c(function(){u(x)&&T({inst:x})})},[c]),l(p),p}function u(c){var h=c.getSnapshot;c=c.value;try{var p=h();return!n(c,p)}catch{return!0}}function f(c,h){return h()}var s=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:a;return Gt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:s,Gt}var Xt={},Zn;function yo(){if(Zn)return Xt;Zn=1;var e={};/**
118
+ */var Xn;function go(){if(Xn)return Gt;Xn=1;var e=j;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function a(c,h){var p=h(),y=r({inst:{value:p,getSnapshot:h}}),x=y[0].inst,T=y[1];return o(function(){x.value=p,x.getSnapshot=h,u(x)&&T({inst:x})},[c,p,h]),i(function(){return u(x)&&T({inst:x}),c(function(){u(x)&&T({inst:x})})},[c]),l(p),p}function u(c){var h=c.getSnapshot;c=c.value;try{var p=h();return!n(c,p)}catch{return!0}}function f(c,h){return h()}var s=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:a;return Gt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:s,Gt}var Xt={},Qn;function yo(){if(Qn)return Xt;Qn=1;var e={};/**
119
119
  * @license React
120
120
  * use-sync-external-store-shim.development.js
121
121
  *
@@ -123,7 +123,7 @@ React keys must be passed directly to JSX without using spread:
123
123
  *
124
124
  * This source code is licensed under the MIT license found in the
125
125
  * LICENSE file in the root directory of this source tree.
126
- */return e.NODE_ENV!=="production"&&function(){function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}function n(y,x){c||o.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=x();if(!h){var k=x();l(T,k)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}k=a({inst:{value:T,getSnapshot:x}});var A=k[0].inst,v=k[1];return f(function(){A.value=T,A.getSnapshot=x,r(A)&&v({inst:A})},[y,T,x]),u(function(){return r(A)&&v({inst:A}),y(function(){r(A)&&v({inst:A})})},[y]),s(T),T}function r(y){var x=y.getSnapshot;y=y.value;try{var T=x();return!l(y,T)}catch{return!0}}function i(y,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=j,l=typeof Object.is=="function"?Object.is:t,a=o.useState,u=o.useEffect,f=o.useLayoutEffect,s=o.useDebugValue,c=!1,h=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:n;Xt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Xt}var $n;function er(){if($n)return Ot.exports;$n=1;var e={};return e.NODE_ENV==="production"?Ot.exports=go():Ot.exports=yo(),Ot.exports}/**
126
+ */return e.NODE_ENV!=="production"&&function(){function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}function n(y,x){c||o.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=x();if(!h){var k=x();l(T,k)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}k=a({inst:{value:T,getSnapshot:x}});var A=k[0].inst,S=k[1];return f(function(){A.value=T,A.getSnapshot=x,r(A)&&S({inst:A})},[y,T,x]),u(function(){return r(A)&&S({inst:A}),y(function(){r(A)&&S({inst:A})})},[y]),s(T),T}function r(y){var x=y.getSnapshot;y=y.value;try{var T=x();return!l(y,T)}catch{return!0}}function i(y,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=j,l=typeof Object.is=="function"?Object.is:t,a=o.useState,u=o.useEffect,f=o.useLayoutEffect,s=o.useDebugValue,c=!1,h=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:n;Xt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Xt}var Jn;function Zn(){if(Jn)return Ot.exports;Jn=1;var e={};return e.NODE_ENV==="production"?Ot.exports=go():Ot.exports=yo(),Ot.exports}/**
127
127
  * @license React
128
128
  * use-sync-external-store-shim/with-selector.production.js
129
129
  *
@@ -131,7 +131,7 @@ React keys must be passed directly to JSX without using spread:
131
131
  *
132
132
  * This source code is licensed under the MIT license found in the
133
133
  * LICENSE file in the root directory of this source tree.
134
- */var tr;function xo(){if(tr)return qt;tr=1;var e=j,t=er();function n(f,s){return f===s&&(f!==0||1/f===1/s)||f!==f&&s!==s}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,a=e.useMemo,u=e.useDebugValue;return qt.useSyncExternalStoreWithSelector=function(f,s,c,h,p){var y=o(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=a(function(){function k(w){if(!A){if(A=!0,v=w,w=h(w),p!==void 0&&x.hasValue){var L=x.value;if(p(L,w))return z=L}return z=w}if(L=z,r(v,w))return L;var Y=h(w);return p!==void 0&&p(L,Y)?(v=w,L):(v=w,z=Y)}var A=!1,v,z,U=c===void 0?null:c;return[function(){return k(s())},U===null?void 0:function(){return k(U())}]},[s,c,h,p]);var T=i(f,y[0],y[1]);return l(function(){x.hasValue=!0,x.value=T},[T]),u(T),T},qt}var Qt={},nr;function bo(){if(nr)return Qt;nr=1;var e={};/**
134
+ */var $n;function xo(){if($n)return qt;$n=1;var e=j,t=Zn();function n(f,s){return f===s&&(f!==0||1/f===1/s)||f!==f&&s!==s}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,a=e.useMemo,u=e.useDebugValue;return qt.useSyncExternalStoreWithSelector=function(f,s,c,h,p){var y=o(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=a(function(){function k(w){if(!A){if(A=!0,S=w,w=h(w),p!==void 0&&x.hasValue){var L=x.value;if(p(L,w))return z=L}return z=w}if(L=z,r(S,w))return L;var Y=h(w);return p!==void 0&&p(L,Y)?(S=w,L):(S=w,z=Y)}var A=!1,S,z,U=c===void 0?null:c;return[function(){return k(s())},U===null?void 0:function(){return k(U())}]},[s,c,h,p]);var T=i(f,y[0],y[1]);return l(function(){x.hasValue=!0,x.value=T},[T]),u(T),T},qt}var Qt={},er;function bo(){if(er)return Qt;er=1;var e={};/**
135
135
  * @license React
136
136
  * use-sync-external-store-shim/with-selector.development.js
137
137
  *
@@ -139,23 +139,21 @@ React keys must be passed directly to JSX without using spread:
139
139
  *
140
140
  * This source code is licensed under the MIT license found in the
141
141
  * LICENSE file in the root directory of this source tree.
142
- */return e.NODE_ENV!=="production"&&function(){function t(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=j,r=er(),i=typeof Object.is=="function"?Object.is:t,o=r.useSyncExternalStore,l=n.useRef,a=n.useEffect,u=n.useMemo,f=n.useDebugValue;Qt.useSyncExternalStoreWithSelector=function(s,c,h,p,y){var x=l(null);if(x.current===null){var T={hasValue:!1,value:null};x.current=T}else T=x.current;x=u(function(){function A(L){if(!v){if(v=!0,z=L,L=p(L),y!==void 0&&T.hasValue){var Y=T.value;if(y(Y,L))return U=Y}return U=L}if(Y=U,i(z,L))return Y;var F=p(L);return y!==void 0&&y(Y,F)?(z=L,Y):(z=L,U=F)}var v=!1,z,U,w=h===void 0?null:h;return[function(){return A(c())},w===null?void 0:function(){return A(w())}]},[c,h,p,y]);var k=o(s,x[0],x[1]);return a(function(){T.hasValue=!0,T.value=k},[k]),f(k),k},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Qt}var wo={};wo.NODE_ENV==="production"?Kt.exports=xo():Kt.exports=bo();var ko=Kt.exports;const vo=Wt(ko),rr={},{useDebugValue:So}=j,{useSyncExternalStoreWithSelector:Eo}=vo;let ir=!1;const Co=e=>e;function _o(e,t=Co,n){(rr?"production":void 0)!=="production"&&n&&!ir&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),ir=!0);const r=Eo(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return So(r),r}const or=e=>{(rr?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?mo(e):e,n=(r,i)=>_o(t,r,i);return Object.assign(n,t),n},To=e=>e?or(e):or;let Jt=null,Zt=null,$t=null;const Io=(e,t,n)=>{if(!e||typeof e!="string")throw new Error("API URL must be a valid string");if(!t||typeof t!="string")throw new Error("API key must be a valid string");if(!n||typeof n!="string")throw new Error("Session ID must be a valid string");Jt=e,Zt=t,$t=n},Ao=()=>{if(!Jt)throw new Error("API URL not configured. Please call configureApi() with your server URL before using any API functions.");return Jt},Ro=()=>{if(!Zt)throw new Error("API key not configured. Please call configureApi() with your API key before using any API functions.");return Zt},Oo=()=>{if(!$t)throw new Error("Session ID not configured. Please call configureApi() with your session ID before using any API functions.");return $t},Po=(e,t={})=>{e.startsWith("https:");const r={Connection:"keep-alive","X-Request-ID":Date.now().toString(36)+Math.random().toString(36).substring(2),"X-API-Key":Ro(),"X-Session-ID":Oo()};return{...t,headers:{...t.headers,...r}}},Lo=(e,t=!0)=>({jsonrpc:"2.0",method:"tools/call",params:{name:"chat",arguments:{messages:[{role:"user",content:e}],stream:t}},id:Date.now().toString(36)+Math.random().toString(36).substring(2)});async function*jo(e,t=!0){var n,r,i,o,l,a,u,f,s;try{const c=Ao(),h=new AbortController,p=setTimeout(()=>h.abort(),1e4),y=await fetch(`${c}/v1/chat`,{...Po(c,{method:"POST",headers:{"Content-Type":"application/json",Accept:t?"text/event-stream":"application/json"},body:JSON.stringify(Lo(e,t))}),signal:h.signal});if(clearTimeout(p),!y.ok){const v=await y.text();throw new Error(`Network response was not ok: ${y.status} ${v}`)}if(!t){const v=await y.json();if(v.error)throw new Error(`MCP Error: ${v.error.message}`);(o=(i=(r=(n=v.result)==null?void 0:n.output)==null?void 0:r.messages)==null?void 0:i[0])!=null&&o.content&&(yield{text:v.result.output.messages[0].content,done:!0});return}const x=(l=y.body)==null?void 0:l.getReader();if(!x)throw new Error("No reader available");const T=new TextDecoder;let k="",A="";try{for(;;){const{done:v,value:z}=await x.read();if(v)break;const U=T.decode(z,{stream:!0});k+=U;const w=k.split(`
143
- `);k=w.pop()||"";for(const L of w)if(L.trim()&&L.startsWith("data: "))try{const Y=L.slice(6).trim();if(Y==="[DONE]"){yield{text:"",done:!0};break}const F=JSON.parse(Y);if(F.result){let K="";if(F.result.type==="start")continue;if(F.result.type==="chunk"&&F.result.chunk?K=F.result.chunk.content:F.result.type==="complete"&&((u=(a=F.result.output)==null?void 0:a.messages)!=null&&u[0])&&(K=F.result.output.messages[0].content),K){const O=lr(K,A);O?(A+=O,yield{text:O,done:F.result.type==="complete"}):F.result.type==="complete"&&(yield{text:"",done:!0})}}}catch(Y){console.warn("Error parsing JSON chunk:",L,"Error:",Y)}}}finally{x.releaseLock()}if(k&&k.startsWith("data: "))try{const v=k.slice(6).trim();if(v!=="[DONE]"){const z=JSON.parse(v);if((s=(f=z.result)==null?void 0:f.chunk)!=null&&s.content){const U=lr(z.result.chunk.content,A);U&&(yield{text:U,done:z.result.type==="complete"})}}}catch(v){console.warn("Error parsing final JSON buffer:",k,"Error:",v)}}catch(c){c.name==="AbortError"?yield{text:"Connection timed out. Please check if the server is running.",done:!0}:c.name==="TypeError"&&c.message.includes("Failed to fetch")?yield{text:"Could not connect to the server. Please check if the server is running.",done:!0}:yield{text:`Error: ${c.message}`,done:!0}}}function lr(e,t){if(!t)return e;if(t.endsWith(e))return"";if(e.length>t.length){if(e.startsWith(t))return e.slice(t.length);let n=0;const r=Math.min(t.length,e.length);for(;n<r&&t[n]===e[n];)n++;if(n>t.length/2)return e.slice(n)}return e}function ar(){try{if(typeof window<"u"&&window.CHATBOT_API_URL&&window.CHATBOT_API_KEY){const e=Do();return Io(window.CHATBOT_API_URL,window.CHATBOT_API_KEY,e),!0}}catch(e){console.error("Failed to configure API:",e)}return!1}function Do(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}ar();const en=To((e,t)=>({messages:[],isLoading:!1,error:null,voiceEnabled:!1,toggleVoice:()=>e(n=>({voiceEnabled:!n.voiceEnabled})),sendMessage:async n=>{try{if(!ar())throw new Error("API URL not configured");e(i=>({messages:[...i.messages,{role:"user",content:n}],isLoading:!0,error:null})),e(i=>({messages:[...i.messages,{role:"assistant",content:""}]}));let r=!1;try{for await(const i of jo(n,t().voiceEnabled))i.text&&(t().appendToLastMessage(i.text),r=!0);r||t().appendToLastMessage("No response received from the server. Please try again later.")}catch(i){console.error("Chat API error:",i),t().appendToLastMessage("Sorry, there was an error processing your request.")}e({isLoading:!1})}catch(r){console.error("Chat store error:",r),e(i=>({isLoading:!1,error:`Failed to send message: ${r instanceof Error?r.message:"Unknown error"}`}))}},appendToLastMessage:n=>{e(r=>{const i=[...r.messages],o=i[i.length-1];return o&&o.role==="assistant"&&(i[i.length-1]={...o,content:o.content+n}),{messages:i}})},clearMessages:()=>{e({messages:[]})}}));function vc(){}function Sc(){}function No(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Fo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zo={};function sr(e,t){return(zo.jsx?Mo:Fo).test(e)}const Bo=/[ \t\n\f\r]/g;function Uo(e){return typeof e=="object"?e.type==="text"?ur(e.value):!1:ur(e)}function ur(e){return e.replace(Bo,"")===""}class xt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}xt.prototype.normal={},xt.prototype.property={},xt.prototype.space=void 0;function cr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new xt(n,r,t)}function tn(e){return e.toLowerCase()}class Ie{constructor(t,n){this.attribute=n,this.property=t}}Ie.prototype.attribute="",Ie.prototype.booleanish=!1,Ie.prototype.boolean=!1,Ie.prototype.commaOrSpaceSeparated=!1,Ie.prototype.commaSeparated=!1,Ie.prototype.defined=!1,Ie.prototype.mustUseProperty=!1,Ie.prototype.number=!1,Ie.prototype.overloadedBoolean=!1,Ie.prototype.property="",Ie.prototype.spaceSeparated=!1,Ie.prototype.space=void 0;let Ho=0;const W=et(),fe=et(),nn=et(),C=et(),ie=et(),at=et(),Le=et();function et(){return 2**++Ho}const rn=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:fe,commaOrSpaceSeparated:Le,commaSeparated:at,number:C,overloadedBoolean:nn,spaceSeparated:ie},Symbol.toStringTag,{value:"Module"})),on=Object.keys(rn);class ln extends Ie{constructor(t,n,r,i){let o=-1;if(super(t,n),fr(this,"space",i),typeof r=="number")for(;++o<on.length;){const l=on[o];fr(this,on[o],(r&rn[l])===rn[l])}}}ln.prototype.defined=!0;function fr(e,t,n){n&&(e[t]=n)}function st(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new ln(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[tn(r)]=r,n[tn(o.attribute)]=r}return new xt(t,n,e.space)}const pr=st({properties:{ariaActiveDescendant:null,ariaAtomic:fe,ariaAutoComplete:null,ariaBusy:fe,ariaChecked:fe,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:ie,ariaCurrent:null,ariaDescribedBy:ie,ariaDetails:null,ariaDisabled:fe,ariaDropEffect:ie,ariaErrorMessage:null,ariaExpanded:fe,ariaFlowTo:ie,ariaGrabbed:fe,ariaHasPopup:null,ariaHidden:fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ie,ariaLevel:C,ariaLive:null,ariaModal:fe,ariaMultiLine:fe,ariaMultiSelectable:fe,ariaOrientation:null,ariaOwns:ie,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:fe,ariaReadOnly:fe,ariaRelevant:null,ariaRequired:fe,ariaRoleDescription:ie,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:fe,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hr(e,t){return t in e?e[t]:t}function dr(e,t){return hr(e,t.toLowerCase())}const Vo=st({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:at,acceptCharset:ie,accessKey:ie,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:ie,autoFocus:W,autoPlay:W,blocking:ie,capture:null,charSet:null,checked:W,cite:null,className:ie,cols:C,colSpan:null,content:null,contentEditable:fe,controls:W,controlsList:ie,coords:C|at,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:nn,draggable:fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:ie,height:C,hidden:nn,high:C,href:null,hrefLang:null,htmlFor:ie,httpEquiv:ie,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:ie,itemRef:ie,itemScope:W,itemType:ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,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:W,optimum:C,pattern:null,ping:ie,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:ie,required:W,reversed:W,rows:C,rowSpan:C,sandbox:ie,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:fe,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ie,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:fe,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:dr}),Wo=st({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:Le,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:ie,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:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,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:at,g2:at,glyphName:at,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,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:C,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:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,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:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hr}),mr=st({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),gr=st({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dr}),yr=st({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Yo={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"},Ko=/[A-Z]/g,xr=/-[a-z]/g,qo=/^data[-\w.:]+$/i;function Go(e,t){const n=tn(t);let r=t,i=Ie;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qo.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(xr,Qo);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!xr.test(o)){let l=o.replace(Ko,Xo);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=ln}return new i(r,t)}function Xo(e){return"-"+e.toLowerCase()}function Qo(e){return e.charAt(1).toUpperCase()}const Jo=cr([pr,Vo,mr,gr,yr],"html"),an=cr([pr,Wo,mr,gr,yr],"svg");function Zo(e){return e.join(" ").trim()}var sn={},br=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$o=/\n/g,el=/^\s*/,tl=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,nl=/^:\s*/,rl=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,il=/^[;\s]*/,ol=/^\s+|\s+$/g,ll=`
144
- `,wr="/",kr="*",tt="",al="comment",sl="declaration",ul=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var x=y.match($o);x&&(n+=x.length);var T=y.lastIndexOf(ll);r=~T?y.length-T:r+y.length}function o(){var y={line:n,column:r};return function(x){return x.position=new l(y),f(),x}}function l(y){this.start=y,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(y){var x=new Error(t.source+":"+n+":"+r+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(y){var x=y.exec(e);if(x){var T=x[0];return i(T),e=e.slice(T.length),x}}function f(){u(el)}function s(y){var x;for(y=y||[];x=c();)x!==!1&&y.push(x);return y}function c(){var y=o();if(!(wr!=e.charAt(0)||kr!=e.charAt(1))){for(var x=2;tt!=e.charAt(x)&&(kr!=e.charAt(x)||wr!=e.charAt(x+1));)++x;if(x+=2,tt===e.charAt(x-1))return a("End of comment missing");var T=e.slice(2,x-2);return r+=2,i(T),e=e.slice(x),r+=2,y({type:al,comment:T})}}function h(){var y=o(),x=u(tl);if(x){if(c(),!u(nl))return a("property missing ':'");var T=u(rl),k=y({type:sl,property:vr(x[0].replace(br,tt)),value:T?vr(T[0].replace(br,tt)):tt});return u(il),k}}function p(){var y=[];s(y);for(var x;x=h();)x!==!1&&(y.push(x),s(y));return y}return f(),p()};function vr(e){return e?e.replace(ol,tt):tt}var cl=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sn,"__esModule",{value:!0}),sn.default=pl;var fl=cl(ul);function pl(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,fl.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var l=o.property,a=o.value;i?t(l,a,o):a&&(n=n||{},n[l]=a)}}),n}var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.camelCase=void 0;var hl=/^--[a-zA-Z0-9_-]+$/,dl=/-([a-z])/g,ml=/^[^-]+$/,gl=/^-(webkit|moz|ms|o|khtml)-/,yl=/^-(ms)-/,xl=function(e){return!e||ml.test(e)||hl.test(e)},bl=function(e,t){return t.toUpperCase()},Sr=function(e,t){return"".concat(t,"-")},wl=function(e,t){return t===void 0&&(t={}),xl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(yl,Sr):e=e.replace(gl,Sr),e.replace(dl,bl))};Pt.camelCase=wl;var kl=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vl=kl(sn),Sl=Pt;function un(e,t){var n={};return!e||typeof e!="string"||(0,vl.default)(e,function(r,i){r&&i&&(n[(0,Sl.camelCase)(r,t)]=i)}),n}un.default=un;var El=un;const Cl=Wt(El),Er=Cr("end"),cn=Cr("start");function Cr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function _l(e){const t=cn(e),n=Er(e);if(t&&n)return{start:t,end:n}}function bt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_r(e.position):"start"in e||"end"in e?_r(e):"line"in e||"column"in e?fn(e):""}function fn(e){return Tr(e&&e.line)+":"+Tr(e&&e.column)}function _r(e){return fn(e&&e.start)+"-"+fn(e&&e.end)}function Tr(e){return e&&typeof e=="number"?e:1}class ke extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=bt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}ke.prototype.file="",ke.prototype.name="",ke.prototype.reason="",ke.prototype.message="",ke.prototype.stack="",ke.prototype.column=void 0,ke.prototype.line=void 0,ke.prototype.ancestors=void 0,ke.prototype.cause=void 0,ke.prototype.fatal=void 0,ke.prototype.place=void 0,ke.prototype.ruleId=void 0,ke.prototype.source=void 0;const pn={}.hasOwnProperty,Tl=new Map,Il=/[A-Z]/g,Al=new Set(["table","tbody","thead","tfoot","tr"]),Rl=new Set(["td","th"]),Ir="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ol(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ml(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?an:Jo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Ar(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ar(e,t,n){if(t.type==="element")return Pl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ll(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Dl(e,t,n);if(t.type==="mdxjsEsm")return jl(e,t);if(t.type==="root")return Nl(e,t,n);if(t.type==="text")return Fl(e,t)}function Pl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=an,e.schema=i),e.ancestors.push(t);const o=Or(e,t.tagName,!1),l=Bl(e,t);let a=dn(e,t);return Al.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Uo(u):!0})),Rr(e,l,o,t),hn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Ll(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wt(e,t.position)}function jl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wt(e,t.position)}function Dl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=an,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Or(e,t.name,!0),l=Ul(e,t),a=dn(e,t);return Rr(e,l,o,t),hn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Nl(e,t,n){const r={};return hn(r,dn(e,t)),e.create(t,e.Fragment,r,n)}function Fl(e,t){return t.value}function Rr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ml(e,t,n){return r;function r(i,o,l,a){const f=Array.isArray(l.children)?n:t;return a?f(o,l,a):f(o,l)}}function zl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=cn(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Bl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&pn.call(t.properties,i)){const o=Hl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Rl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ul(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else wt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else wt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function dn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Tl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const f=i.get(u)||0;l=u+"-"+f,i.set(u,f+1)}}const a=Ar(e,o,l);a!==void 0&&n.push(a)}return n}function Hl(e,t,n){const r=Go(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?No(n):Zo(n)),r.property==="style"){let i=typeof n=="object"?n:Vl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Wl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Yo[r.property]||r.property:r.attribute,n]}}function Vl(e,t){try{return Cl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ke("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ir+"#cannot-parse-style-attribute",i}}function Or(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=sr(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=sr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return pn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);wt(e)}function wt(e,t){const n=new ke("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=Ir+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wl(e){const t={};let n;for(n in e)pn.call(e,n)&&(t[Yl(n)]=e[n]);return t}function Yl(e){let t=e.replace(Il,Kl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Kl(e){return"-"+e.toLowerCase()}const mn={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"]},ql={};function Gl(e,t){const n=ql,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pr(e,r,i)}function Pr(e,t,n){if(Xl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Lr(e.children,t,n)}return Array.isArray(e)?Lr(e,t,n):""}function Lr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Pr(e[i],t,n);return r.join("")}function Xl(e){return!!(e&&typeof e=="object")}const jr=document.createElement("i");function gn(e){const t="&"+e+";";jr.innerHTML=t;const n=jr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function He(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function Fe(e,t){return e.length>0?(He(e,e.length,0,t),e):t}const Dr={}.hasOwnProperty;function Ql(e){const t={};let n=-1;for(;++n<e.length;)Jl(t,e[n]);return t}function Jl(e,t){let n;for(n in t){const i=(Dr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Dr.call(i,l)||(i[l]=[]);const a=o[l];Zl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Zl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);He(e,0,0,r)}function Nr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ut(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ve=Xe(/[A-Za-z]/),je=Xe(/[\dA-Za-z]/),$l=Xe(/[#-'*+\--9=?A-Z^-~]/);function yn(e){return e!==null&&(e<32||e===127)}const xn=Xe(/\d/),ea=Xe(/[\dA-Fa-f]/),ta=Xe(/[!-/:-@[-`{-~]/);function N(e){return e!==null&&e<-2}function Ae(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const na=Xe(new RegExp("\\p{P}|\\p{S}","u")),ra=Xe(/\s/);function Xe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ct(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&je(e.charCodeAt(n+1))&&je(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function oe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return Z(u)?(e.enter(n),a(u)):t(u)}function a(u){return Z(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const ia={tokenize:oa};function oa(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),oe(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return N(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const la={tokenize:aa},Fr={tokenize:sa};function aa(e){const t=this,n=[];let r=0,i,o,l;return a;function a(v){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,u,f)(v)}return f(v)}function u(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const z=t.events.length;let U=z,w;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){w=t.events[U][1].end;break}k(r);let L=z;for(;L<t.events.length;)t.events[L][1].end={...w},L++;return He(t.events,U+1,0,t.events.slice(z)),t.events.length=L,f(v)}return a(v)}function f(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return y(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Fr,s,c)(v)}function s(v){return i&&A(),k(r),h(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,y(v)}function h(v){return t.containerState={},e.attempt(Fr,p,y)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function y(v){if(v===null){i&&A(),k(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(v)}function x(v){if(v===null){T(e.exit("chunkFlow"),!0),k(0),e.consume(v);return}return N(v)?(e.consume(v),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),x)}function T(v,z){const U=t.sliceStream(v);if(z&&U.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(U),t.parser.lazy[v.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const L=t.events.length;let Y=L,F,K;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(F){K=t.events[Y][1].end;break}F=!0}for(k(r),w=L;w<t.events.length;)t.events[w][1].end={...K},w++;He(t.events,Y+1,0,t.events.slice(L)),t.events.length=w}}function k(v){let z=n.length;for(;z-- >v;){const U=n[z];t.containerState=U[1],U[0].exit.call(t,e)}n.length=v}function A(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sa(e,t,n){return oe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Mr(e){if(e===null||Ae(e)||ra(e))return 1;if(na(e))return 2}function bn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const wn={name:"attention",resolveAll:ua,tokenize:ca};function ua(e,t){let n=-1,r,i,o,l,a,u,f,s;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};zr(c,-u),zr(h,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Fe(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Fe(f,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),f=Fe(f,bn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Fe(f,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(s=2,f=Fe(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):s=0,He(e,r-1,n-r+3,f),n=r+f.length-s-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ca(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Mr(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const f=e.exit("attentionSequence"),s=Mr(u),c=!s||s===2&&i||n.includes(u),h=!i||i===2&&s||n.includes(r);return f._open=!!(o===42?c:c&&(i||!h)),f._close=!!(o===42?h:h&&(s||!c)),t(u)}}function zr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fa={name:"autolink",tokenize:pa};function pa(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Ve(p)?(e.consume(p),l):p===64?n(p):f(p)}function l(p){return p===43||p===45||p===46||je(p)?(r=1,a(p)):f(p)}function a(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||je(p))&&r++<32?(e.consume(p),a):(r=0,f(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||yn(p)?n(p):(e.consume(p),u)}function f(p){return p===64?(e.consume(p),s):$l(p)?(e.consume(p),f):n(p)}function s(p){return je(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,s):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||je(p))&&r++<63){const y=p===45?h:c;return e.consume(p),y}return n(p)}}const Lt={partial:!0,tokenize:ha};function ha(e,t,n){return r;function r(o){return Z(o)?oe(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||N(o)?t(o):n(o)}}const Br={continuation:{tokenize:ma},exit:ga,name:"blockQuote",tokenize:da};function da(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return Z(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ma(e,t,n){const r=this;return i;function i(l){return Z(l)?oe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Br,t,n)(l)}}function ga(e){e.exit("blockQuote")}const Ur={name:"characterEscape",tokenize:ya};function ya(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ta(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Hr={name:"characterReference",tokenize:xa};function xa(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,l=je,s(c))}function f(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=ea,s):(e.enter("characterReferenceValue"),o=7,l=xn,s(c))}function s(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===je&&!gn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),s):n(c)}}const Vr={partial:!0,tokenize:wa},Wr={concrete:!0,name:"codeFenced",tokenize:ba};function ba(e,t,n){const r=this,i={partial:!0,tokenize:U};let o=0,l=0,a;return u;function u(w){return f(w)}function f(w){const L=r.events[r.events.length-1];return o=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(w)}function s(w){return w===a?(l++,e.consume(w),s):l<3?n(w):(e.exit("codeFencedFenceSequence"),Z(w)?oe(e,c,"whitespace")(w):c(w))}function c(w){return w===null||N(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Vr,x,z)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||N(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):Z(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),oe(e,p,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),h)}function p(w){return w===null||N(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===null||N(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),y)}function x(w){return e.attempt(i,z,T)(w)}function T(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),k}function k(w){return o>0&&Z(w)?oe(e,A,"linePrefix",o+1)(w):A(w)}function A(w){return w===null||N(w)?e.check(Vr,x,z)(w):(e.enter("codeFlowValue"),v(w))}function v(w){return w===null||N(w)?(e.exit("codeFlowValue"),A(w)):(e.consume(w),v)}function z(w){return e.exit("codeFenced"),t(w)}function U(w,L,Y){let F=0;return K;function K(H){return w.enter("lineEnding"),w.consume(H),w.exit("lineEnding"),O}function O(H){return w.enter("codeFencedFence"),Z(H)?oe(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):P(H)}function P(H){return H===a?(w.enter("codeFencedFenceSequence"),$(H)):Y(H)}function $(H){return H===a?(F++,w.consume(H),$):F>=l?(w.exit("codeFencedFenceSequence"),Z(H)?oe(w,G,"whitespace")(H):G(H)):Y(H)}function G(H){return H===null||N(H)?(w.exit("codeFencedFence"),L(H)):Y(H)}}}function wa(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const kn={name:"codeIndented",tokenize:va},ka={partial:!0,tokenize:Sa};function va(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),oe(e,o,"linePrefix",5)(f)}function o(f){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?u(f):N(f)?e.attempt(ka,l,u)(f):(e.enter("codeFlowValue"),a(f))}function a(f){return f===null||N(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),a)}function u(f){return e.exit("codeIndented"),t(f)}}function Sa(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):N(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):oe(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):N(l)?i(l):n(l)}}const Ea={name:"codeText",previous:_a,resolve:Ca,tokenize:Ta};function Ca(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function _a(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ta(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,s(c)):N(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),f(c))}function f(c){return c===null||c===32||c===96||N(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),f)}function s(c){return c===96?(e.consume(c),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",f(c))}}class Ia{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&kt(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),kt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),kt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);kt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);kt(this.left,n.reverse())}}}function kt(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 Yr(e){const t={};let n=-1,r,i,o,l,a,u,f;const s=new Ia(e);for(;++n<s.length;){for(;n in t;)n=t[n];if(r=s.get(n),n&&r[1].type==="chunkFlow"&&s.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Aa(s,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=s.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},a=s.slice(i,n),a.unshift(r),s.splice(i,n-i+1,a))}}return He(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!f}function Aa(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],f={};let s,c,h=-1,p=n,y=0,x=0;const T=[x];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(s=r.sliceStream(p),p.next||s.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(s),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(x=h+1,T.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),h=T.length;h--;){const k=a.slice(T[h],T[h+1]),A=o.pop();u.push([A,A+k.length-1]),e.splice(A,2,k)}for(u.reverse(),h=-1;++h<u.length;)f[y+u[h][0]]=y+u[h][1],y+=u[h][1]-u[h][0]-1;return f}const Ra={resolve:Pa,tokenize:La},Oa={partial:!0,tokenize:ja};function Pa(e){return Yr(e),e}function La(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):N(a)?e.check(Oa,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ja(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),oe(e,o,"linePrefix")}function o(l){if(l===null||N(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Kr(e,t,n,r,i,o,l,a,u){const f=u||Number.POSITIVE_INFINITY;let s=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),h):k===null||k===32||k===41||yn(k)?n(k):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(k))}function h(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(a),h(k)):k===null||k===60||N(k)?n(k):(e.consume(k),k===92?y:p)}function y(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function x(k){return!s&&(k===null||k===41||Ae(k))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(k)):s<f&&k===40?(e.consume(k),s++,x):k===41?(e.consume(k),s--,x):k===null||k===32||k===40||yn(k)?n(k):(e.consume(k),k===92?T:x)}function T(k){return k===40||k===41||k===92?(e.consume(k),x):x(k)}}function qr(e,t,n,r,i,o){const l=this;let a=0,u;return f;function f(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),s}function s(p){return a>999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):N(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||N(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),u||(u=!Z(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function Gr(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,u):n(h)}function u(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),f(h))}function f(h){return h===l?(e.exit(o),u(l)):h===null?n(h):N(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),oe(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(h))}function s(h){return h===l||h===null||N(h)?(e.exit("chunkString"),f(h)):(e.consume(h),h===92?c:s)}function c(h){return h===l||h===92?(e.consume(h),s):s(h)}}function vt(e,t){let n;return r;function r(i){return N(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?oe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Da={name:"definition",tokenize:Fa},Na={partial:!0,tokenize:Ma};function Fa(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return qr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Ae(p)?vt(e,f)(p):f(p)}function f(p){return Kr(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Na,c,c)(p)}function c(p){return Z(p)?oe(e,h,"whitespace")(p):h(p)}function h(p){return p===null||N(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Ma(e,t,n){return r;function r(a){return Ae(a)?vt(e,i)(a):n(a)}function i(a){return Gr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Z(a)?oe(e,l,"whitespace")(a):l(a)}function l(a){return a===null||N(a)?t(a):n(a)}}const za={name:"hardBreakEscape",tokenize:Ba};function Ba(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return N(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ua={name:"headingAtx",resolve:Ha,tokenize:Va};function Ha(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},He(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Va(e,t,n){let r=0;return i;function i(s){return e.enter("atxHeading"),o(s)}function o(s){return e.enter("atxHeadingSequence"),l(s)}function l(s){return s===35&&r++<6?(e.consume(s),l):s===null||Ae(s)?(e.exit("atxHeadingSequence"),a(s)):n(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),u(s)):s===null||N(s)?(e.exit("atxHeading"),t(s)):Z(s)?oe(e,a,"whitespace")(s):(e.enter("atxHeadingText"),f(s))}function u(s){return s===35?(e.consume(s),u):(e.exit("atxHeadingSequence"),a(s))}function f(s){return s===null||s===35||Ae(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),f)}}const Wa=["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"],Xr=["pre","script","style","textarea"],Ya={concrete:!0,name:"htmlFlow",resolveTo:Ga,tokenize:Xa},Ka={partial:!0,tokenize:Ja},qa={partial:!0,tokenize:Qa};function Ga(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Xa(e,t,n){const r=this;let i,o,l,a,u;return f;function f(g){return s(g)}function s(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),o=!0,x):g===63?(e.consume(g),i=3,r.interrupt?t:d):Ve(g)?(e.consume(g),l=String.fromCharCode(g),T):n(g)}function h(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,y):Ve(g)?(e.consume(g),i=4,r.interrupt?t:d):n(g)}function p(g){return g===45?(e.consume(g),r.interrupt?t:d):n(g)}function y(g){const ye="CDATA[";return g===ye.charCodeAt(a++)?(e.consume(g),a===ye.length?r.interrupt?t:P:y):n(g)}function x(g){return Ve(g)?(e.consume(g),l=String.fromCharCode(g),T):n(g)}function T(g){if(g===null||g===47||g===62||Ae(g)){const ye=g===47,Me=l.toLowerCase();return!ye&&!o&&Xr.includes(Me)?(i=1,r.interrupt?t(g):P(g)):Wa.includes(l.toLowerCase())?(i=6,ye?(e.consume(g),k):r.interrupt?t(g):P(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?A(g):v(g))}return g===45||je(g)?(e.consume(g),l+=String.fromCharCode(g),T):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:P):n(g)}function A(g){return Z(g)?(e.consume(g),A):K(g)}function v(g){return g===47?(e.consume(g),K):g===58||g===95||Ve(g)?(e.consume(g),z):Z(g)?(e.consume(g),v):K(g)}function z(g){return g===45||g===46||g===58||g===95||je(g)?(e.consume(g),z):U(g)}function U(g){return g===61?(e.consume(g),w):Z(g)?(e.consume(g),U):v(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,L):Z(g)?(e.consume(g),w):Y(g)}function L(g){return g===u?(e.consume(g),u=null,F):g===null||N(g)?n(g):(e.consume(g),L)}function Y(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Ae(g)?U(g):(e.consume(g),Y)}function F(g){return g===47||g===62||Z(g)?v(g):n(g)}function K(g){return g===62?(e.consume(g),O):n(g)}function O(g){return g===null||N(g)?P(g):Z(g)?(e.consume(g),O):n(g)}function P(g){return g===45&&i===2?(e.consume(g),le):g===60&&i===1?(e.consume(g),te):g===62&&i===4?(e.consume(g),ae):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),B):N(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ka,Se,$)(g)):g===null||N(g)?(e.exit("htmlFlowData"),$(g)):(e.consume(g),P)}function $(g){return e.check(qa,G,Se)(g)}function G(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),H}function H(g){return g===null||N(g)?$(g):(e.enter("htmlFlowData"),P(g))}function le(g){return g===45?(e.consume(g),d):P(g)}function te(g){return g===47?(e.consume(g),l="",ge):P(g)}function ge(g){if(g===62){const ye=l.toLowerCase();return Xr.includes(ye)?(e.consume(g),ae):P(g)}return Ve(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),ge):P(g)}function B(g){return g===93?(e.consume(g),d):P(g)}function d(g){return g===62?(e.consume(g),ae):g===45&&i===2?(e.consume(g),d):P(g)}function ae(g){return g===null||N(g)?(e.exit("htmlFlowData"),Se(g)):(e.consume(g),ae)}function Se(g){return e.exit("htmlFlow"),t(g)}}function Qa(e,t,n){const r=this;return i;function i(l){return N(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Ja(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Lt,t,n)}}const Za={name:"htmlText",tokenize:$a};function $a(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),f):d===47?(e.consume(d),U):d===63?(e.consume(d),v):Ve(d)?(e.consume(d),Y):n(d)}function f(d){return d===45?(e.consume(d),s):d===91?(e.consume(d),o=0,y):Ve(d)?(e.consume(d),A):n(d)}function s(d){return d===45?(e.consume(d),p):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),h):N(d)?(l=c,te(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?le(d):d===45?h(d):c(d)}function y(d){const ae="CDATA[";return d===ae.charCodeAt(o++)?(e.consume(d),o===ae.length?x:y):n(d)}function x(d){return d===null?n(d):d===93?(e.consume(d),T):N(d)?(l=x,te(d)):(e.consume(d),x)}function T(d){return d===93?(e.consume(d),k):x(d)}function k(d){return d===62?le(d):d===93?(e.consume(d),k):x(d)}function A(d){return d===null||d===62?le(d):N(d)?(l=A,te(d)):(e.consume(d),A)}function v(d){return d===null?n(d):d===63?(e.consume(d),z):N(d)?(l=v,te(d)):(e.consume(d),v)}function z(d){return d===62?le(d):v(d)}function U(d){return Ve(d)?(e.consume(d),w):n(d)}function w(d){return d===45||je(d)?(e.consume(d),w):L(d)}function L(d){return N(d)?(l=L,te(d)):Z(d)?(e.consume(d),L):le(d)}function Y(d){return d===45||je(d)?(e.consume(d),Y):d===47||d===62||Ae(d)?F(d):n(d)}function F(d){return d===47?(e.consume(d),le):d===58||d===95||Ve(d)?(e.consume(d),K):N(d)?(l=F,te(d)):Z(d)?(e.consume(d),F):le(d)}function K(d){return d===45||d===46||d===58||d===95||je(d)?(e.consume(d),K):O(d)}function O(d){return d===61?(e.consume(d),P):N(d)?(l=O,te(d)):Z(d)?(e.consume(d),O):F(d)}function P(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,$):N(d)?(l=P,te(d)):Z(d)?(e.consume(d),P):(e.consume(d),G)}function $(d){return d===i?(e.consume(d),i=void 0,H):d===null?n(d):N(d)?(l=$,te(d)):(e.consume(d),$)}function G(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||Ae(d)?F(d):(e.consume(d),G)}function H(d){return d===47||d===62||Ae(d)?F(d):n(d)}function le(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function te(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ge}function ge(d){return Z(d)?oe(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):B(d)}function B(d){return e.enter("htmlTextData"),l(d)}}const vn={name:"labelEnd",resolveAll:rs,resolveTo:is,tokenize:os},es={tokenize:ls},ts={tokenize:as},ns={tokenize:ss};function rs(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&He(e,0,e.length,n),e}function is(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},s={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,t],["enter",f,t]],a=Fe(a,e.slice(o+1,o+r+3)),a=Fe(a,[["enter",s,t]]),a=Fe(a,bn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=Fe(a,[["exit",s,t],e[l-2],e[l-1],["exit",f,t]]),a=Fe(a,e.slice(l+1)),a=Fe(a,[["exit",u,t]]),He(e,o,e.length,a),e}function os(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(l=r.parser.defined.includes(ut(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(es,s,l?s:c)(h):h===91?e.attempt(ts,s,l?f:c)(h):l?s(h):c(h)}function f(h){return e.attempt(ns,s,c)(h)}function s(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function ls(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Ae(c)?vt(e,o)(c):o(c)}function o(c){return c===41?s(c):Kr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return Ae(c)?vt(e,u)(c):s(c)}function a(c){return n(c)}function u(c){return c===34||c===39||c===40?Gr(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):s(c)}function f(c){return Ae(c)?vt(e,s)(c):s(c)}function s(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function as(e,t,n){const r=this;return i;function i(a){return qr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function ss(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const us={name:"labelStartImage",resolveAll:vn.resolveAll,tokenize:cs};function cs(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const fs={name:"labelStartLink",resolveAll:vn.resolveAll,tokenize:ps};function ps(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Sn={name:"lineEnding",tokenize:hs};function hs(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),oe(e,t,"linePrefix")}}const jt={name:"thematicBreak",tokenize:ds};function ds(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),l(f)}function l(f){return i=f,a(f)}function a(f){return f===i?(e.enter("thematicBreakSequence"),u(f)):r>=3&&(f===null||N(f))?(e.exit("thematicBreak"),t(f)):n(f)}function u(f){return f===i?(e.consume(f),r++,u):(e.exit("thematicBreakSequence"),Z(f)?oe(e,a,"whitespace")(f):a(f))}}const Re={continuation:{tokenize:xs},exit:ws,name:"list",tokenize:ys},ms={partial:!0,tokenize:ks},gs={partial:!0,tokenize:bs};function ys(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:xn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(jt,n,f)(p):f(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return xn(p)&&++l<10?(e.consume(p),u):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),f(p)):n(p)}function f(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Lt,r.interrupt?n:s,e.attempt(ms,h,c))}function s(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function xs(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Lt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,oe(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Z(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gs,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,oe(e,e.attempt(Re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function bs(e,t,n){const r=this;return oe(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ws(e){e.exit(this.containerState.type)}function ks(e,t,n){const r=this;return oe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!Z(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Qr={name:"setextUnderline",resolveTo:vs,tokenize:Ss};function vs(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Ss(e,t,n){const r=this;let i;return o;function o(f){let s=r.events.length,c;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){c=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),a(f)}function a(f){return f===i?(e.consume(f),a):(e.exit("setextHeadingLineSequence"),Z(f)?oe(e,u,"lineSuffix")(f):u(f))}function u(f){return f===null||N(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Es={tokenize:Cs};function Cs(e){const t=this,n=e.attempt(Lt,r,e.attempt(this.parser.constructs.flowInitial,i,oe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ra,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _s={resolveAll:Zr()},Ts=Jr("string"),Is=Jr("text");function Jr(e){return{resolveAll:Zr(e==="text"?As:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(s){return f(s)?o(s):a(s)}function a(s){if(s===null){n.consume(s);return}return n.enter("data"),n.consume(s),u}function u(s){return f(s)?(n.exit("data"),o(s)):(n.consume(s),u)}function f(s){if(s===null)return!0;const c=i[s];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Zr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function As(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const f=i[o];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(f===-2)u=!0,a++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const f={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const Rs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Da},disable:{null:[]},document:{42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:Br},flow:{35:Ua,42:jt,45:[Qr,jt],60:Ya,61:Qr,95:jt,96:Wr,126:Wr},flowInitial:{[-2]:kn,[-1]:kn,32:kn},insideSpan:{null:[wn,_s]},string:{38:Hr,92:Ur},text:{[-5]:Sn,[-4]:Sn,[-3]:Sn,33:us,38:Hr,42:wn,60:[fa,Za],91:fs,92:[za,Ur],93:vn,95:wn,96:Ea}},Symbol.toStringTag,{value:"Module"}));function Os(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:L(U),check:L(w),consume:A,enter:v,exit:z,interrupt:L(w,{interrupt:!0})},f={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let s=t.tokenize.call(f,u);return t.resolveAll&&o.push(t),f;function c(O){return l=Fe(l,O),T(),l[l.length-1]!==null?[]:(Y(t,0),f.events=bn(o,f.events,f),f.events)}function h(O,P){return Ls(p(O),P)}function p(O){return Ps(l,O)}function y(){const{_bufferIndex:O,_index:P,line:$,column:G,offset:H}=r;return{_bufferIndex:O,_index:P,line:$,column:G,offset:H}}function x(O){i[O.line]=O.column,K()}function T(){let O;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<P.length;)k(P.charCodeAt(r._bufferIndex));else k(P)}}function k(O){s=s(O)}function A(O){N(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,K()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=O}function v(O,P){const $=P||{};return $.type=O,$.start=y(),f.events.push(["enter",$,f]),a.push($),$}function z(O){const P=a.pop();return P.end=y(),f.events.push(["exit",P,f]),P}function U(O,P){Y(O,P.from)}function w(O,P){P.restore()}function L(O,P){return $;function $(G,H,le){let te,ge,B,d;return Array.isArray(G)?Se(G):"tokenize"in G?Se([G]):ae(G);function ae(se){return Be;function Be(Ee){const De=Ee!==null&&se[Ee],de=Ee!==null&&se.null,Ne=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(de)?de:de?[de]:[]];return Se(Ne)(Ee)}}function Se(se){return te=se,ge=0,se.length===0?le:g(se[ge])}function g(se){return Be;function Be(Ee){return d=F(),B=se,se.partial||(f.currentConstruct=se),se.name&&f.parser.constructs.disable.null.includes(se.name)?Me():se.tokenize.call(P?Object.assign(Object.create(f),P):f,u,ye,Me)(Ee)}}function ye(se){return O(B,d),H}function Me(se){return d.restore(),++ge<te.length?g(te[ge]):le}}}function Y(O,P){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&He(f.events,P,f.events.length-P,O.resolve(f.events.slice(P),f)),O.resolveTo&&(f.events=O.resolveTo(f.events,f))}function F(){const O=y(),P=f.previous,$=f.currentConstruct,G=f.events.length,H=Array.from(a);return{from:G,restore:le};function le(){r=O,f.previous=P,f.currentConstruct=$,f.events.length=G,a=H,K()}}function K(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ps(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ls(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
142
+ */return e.NODE_ENV!=="production"&&function(){function t(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=j,r=Zn(),i=typeof Object.is=="function"?Object.is:t,o=r.useSyncExternalStore,l=n.useRef,a=n.useEffect,u=n.useMemo,f=n.useDebugValue;Qt.useSyncExternalStoreWithSelector=function(s,c,h,p,y){var x=l(null);if(x.current===null){var T={hasValue:!1,value:null};x.current=T}else T=x.current;x=u(function(){function A(L){if(!S){if(S=!0,z=L,L=p(L),y!==void 0&&T.hasValue){var Y=T.value;if(y(Y,L))return U=Y}return U=L}if(Y=U,i(z,L))return Y;var M=p(L);return y!==void 0&&y(Y,M)?(z=L,Y):(z=L,U=M)}var S=!1,z,U,w=h===void 0?null:h;return[function(){return A(c())},w===null?void 0:function(){return A(w())}]},[c,h,p,y]);var k=o(s,x[0],x[1]);return a(function(){T.hasValue=!0,T.value=k},[k]),f(k),k},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Qt}var wo={};wo.NODE_ENV==="production"?Kt.exports=xo():Kt.exports=bo();var ko=Kt.exports;const So=Wt(ko),tr={},{useDebugValue:vo}=j,{useSyncExternalStoreWithSelector:Eo}=So;let nr=!1;const Co=e=>e;function _o(e,t=Co,n){(tr?"production":void 0)!=="production"&&n&&!nr&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),nr=!0);const r=Eo(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return vo(r),r}const rr=e=>{(tr?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?mo(e):e,n=(r,i)=>_o(t,r,i);return Object.assign(n,t),n},To=e=>e?rr(e):rr;let Jt=null,ir=null,or=null;const Io=(e,t=null,n=null)=>{if(!e||typeof e!="string")throw new Error("API URL must be a valid string");if(t!==null&&typeof t!="string")throw new Error("API key must be a valid string or null");if(n!==null&&typeof n!="string")throw new Error("Session ID must be a valid string or null");Jt=e,ir=t,or=n},Ao=()=>{if(!Jt)throw new Error("API URL not configured. Please call configureApi() with your server URL before using any API functions.");return Jt},Ro=()=>ir,Oo=()=>or,Po=(e,t={})=>{e.startsWith("https:");const r={Connection:"keep-alive","X-Request-ID":Date.now().toString(36)+Math.random().toString(36).substring(2)},i=Ro();i&&(r["X-API-Key"]=i);const o=Oo();return o&&(r["X-Session-ID"]=o),{...t,headers:{...t.headers,...r}}},Lo=(e,t=!0)=>({jsonrpc:"2.0",method:"tools/call",params:{name:"chat",arguments:{messages:[{role:"user",content:e}],stream:t}},id:Date.now().toString(36)+Math.random().toString(36).substring(2)});async function*jo(e,t=!0){var n,r,i,o,l,a,u,f,s;try{const c=Ao(),h=new AbortController,p=setTimeout(()=>h.abort(),6e4),y=await fetch(`${c}/v1/chat`,{...Po(c,{method:"POST",headers:{"Content-Type":"application/json",Accept:t?"text/event-stream":"application/json"},body:JSON.stringify(Lo(e,t))}),signal:h.signal});if(clearTimeout(p),!y.ok){const S=await y.text();throw new Error(`Network response was not ok: ${y.status} ${S}`)}if(!t){const S=await y.json();if(S.error)throw new Error(`MCP Error: ${S.error.message}`);(o=(i=(r=(n=S.result)==null?void 0:n.output)==null?void 0:r.messages)==null?void 0:i[0])!=null&&o.content&&(yield{text:S.result.output.messages[0].content,done:!0});return}const x=(l=y.body)==null?void 0:l.getReader();if(!x)throw new Error("No reader available");const T=new TextDecoder;let k="",A="";try{for(;;){const{done:S,value:z}=await x.read();if(S)break;const U=T.decode(z,{stream:!0});k+=U;const w=k.split(`
143
+ `);k=w.pop()||"";for(const L of w)if(L.trim()&&L.startsWith("data: "))try{const Y=L.slice(6).trim();if(Y==="[DONE]"){yield{text:"",done:!0};break}const M=JSON.parse(Y);if(M.result){let K="";if(M.result.type==="start")continue;if(M.result.type==="chunk"&&M.result.chunk?K=M.result.chunk.content:M.result.type==="complete"&&((u=(a=M.result.output)==null?void 0:a.messages)!=null&&u[0])&&(K=M.result.output.messages[0].content),K){const O=lr(K,A);O?(A+=O,yield{text:O,done:M.result.type==="complete"}):M.result.type==="complete"&&(yield{text:"",done:!0})}}}catch(Y){console.warn("Error parsing JSON chunk:",L,"Error:",Y)}}}finally{x.releaseLock()}if(k&&k.startsWith("data: "))try{const S=k.slice(6).trim();if(S!=="[DONE]"){const z=JSON.parse(S);if((s=(f=z.result)==null?void 0:f.chunk)!=null&&s.content){const U=lr(z.result.chunk.content,A);U&&(yield{text:U,done:z.result.type==="complete"})}}}catch(S){console.warn("Error parsing final JSON buffer:",k,"Error:",S)}}catch(c){c.name==="AbortError"?yield{text:"Connection timed out. Please check if the server is running.",done:!0}:c.name==="TypeError"&&c.message.includes("Failed to fetch")?yield{text:"Could not connect to the server. Please check if the server is running.",done:!0}:yield{text:`Error: ${c.message}`,done:!0}}}function lr(e,t){if(!t)return e;if(t.endsWith(e))return"";if(e.length>t.length){if(e.startsWith(t))return e.slice(t.length);let n=0;const r=Math.min(t.length,e.length);for(;n<r&&t[n]===e[n];)n++;if(n>t.length/2)return e.slice(n)}return e}function ar(){try{if(typeof window<"u"&&window.CHATBOT_API_URL&&window.CHATBOT_API_KEY){const e=No();return Io(window.CHATBOT_API_URL,window.CHATBOT_API_KEY,e),!0}}catch(e){console.error("Failed to configure API:",e)}return!1}function No(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}ar();const Zt=To((e,t)=>({messages:[],isLoading:!1,error:null,voiceEnabled:!1,toggleVoice:()=>e(n=>({voiceEnabled:!n.voiceEnabled})),sendMessage:async n=>{try{if(!ar())throw new Error("API URL not configured");e(i=>({messages:[...i.messages,{role:"user",content:n}],isLoading:!0,error:null})),e(i=>({messages:[...i.messages,{role:"assistant",content:""}]}));let r=!1;try{for await(const i of jo(n,t().voiceEnabled))i.text&&(t().appendToLastMessage(i.text),r=!0);r||t().appendToLastMessage("No response received from the server. Please try again later.")}catch(i){console.error("Chat API error:",i),t().appendToLastMessage("Sorry, there was an error processing your request.")}e({isLoading:!1})}catch(r){console.error("Chat store error:",r),e(i=>({isLoading:!1,error:`Failed to send message: ${r instanceof Error?r.message:"Unknown error"}`}))}},appendToLastMessage:n=>{e(r=>{const i=[...r.messages],o=i[i.length-1];return o&&o.role==="assistant"&&(i[i.length-1]={...o,content:o.content+n}),{messages:i}})},clearMessages:()=>{e({messages:[]})}}));function Ec(){}function Cc(){}function Do(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Mo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zo={};function sr(e,t){return(zo.jsx?Fo:Mo).test(e)}const Bo=/[ \t\n\f\r]/g;function Uo(e){return typeof e=="object"?e.type==="text"?ur(e.value):!1:ur(e)}function ur(e){return e.replace(Bo,"")===""}class bt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}bt.prototype.normal={},bt.prototype.property={},bt.prototype.space=void 0;function cr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new bt(n,r,t)}function $t(e){return e.toLowerCase()}class Ie{constructor(t,n){this.attribute=n,this.property=t}}Ie.prototype.attribute="",Ie.prototype.booleanish=!1,Ie.prototype.boolean=!1,Ie.prototype.commaOrSpaceSeparated=!1,Ie.prototype.commaSeparated=!1,Ie.prototype.defined=!1,Ie.prototype.mustUseProperty=!1,Ie.prototype.number=!1,Ie.prototype.overloadedBoolean=!1,Ie.prototype.property="",Ie.prototype.spaceSeparated=!1,Ie.prototype.space=void 0;let Ho=0;const W=et(),fe=et(),en=et(),C=et(),ie=et(),at=et(),Le=et();function et(){return 2**++Ho}const tn=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:fe,commaOrSpaceSeparated:Le,commaSeparated:at,number:C,overloadedBoolean:en,spaceSeparated:ie},Symbol.toStringTag,{value:"Module"})),nn=Object.keys(tn);class rn extends Ie{constructor(t,n,r,i){let o=-1;if(super(t,n),fr(this,"space",i),typeof r=="number")for(;++o<nn.length;){const l=nn[o];fr(this,nn[o],(r&tn[l])===tn[l])}}}rn.prototype.defined=!0;function fr(e,t,n){n&&(e[t]=n)}function st(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[$t(r)]=r,n[$t(o.attribute)]=r}return new bt(t,n,e.space)}const pr=st({properties:{ariaActiveDescendant:null,ariaAtomic:fe,ariaAutoComplete:null,ariaBusy:fe,ariaChecked:fe,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:ie,ariaCurrent:null,ariaDescribedBy:ie,ariaDetails:null,ariaDisabled:fe,ariaDropEffect:ie,ariaErrorMessage:null,ariaExpanded:fe,ariaFlowTo:ie,ariaGrabbed:fe,ariaHasPopup:null,ariaHidden:fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ie,ariaLevel:C,ariaLive:null,ariaModal:fe,ariaMultiLine:fe,ariaMultiSelectable:fe,ariaOrientation:null,ariaOwns:ie,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:fe,ariaReadOnly:fe,ariaRelevant:null,ariaRequired:fe,ariaRoleDescription:ie,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:fe,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hr(e,t){return t in e?e[t]:t}function dr(e,t){return hr(e,t.toLowerCase())}const Vo=st({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:at,acceptCharset:ie,accessKey:ie,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:ie,autoFocus:W,autoPlay:W,blocking:ie,capture:null,charSet:null,checked:W,cite:null,className:ie,cols:C,colSpan:null,content:null,contentEditable:fe,controls:W,controlsList:ie,coords:C|at,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:en,draggable:fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:ie,height:C,hidden:en,high:C,href:null,hrefLang:null,htmlFor:ie,httpEquiv:ie,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:ie,itemRef:ie,itemScope:W,itemType:ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,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:W,optimum:C,pattern:null,ping:ie,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:ie,required:W,reversed:W,rows:C,rowSpan:C,sandbox:ie,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:fe,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ie,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:fe,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:dr}),Wo=st({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:Le,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:ie,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:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,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:at,g2:at,glyphName:at,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,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:C,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:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,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:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hr}),mr=st({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),gr=st({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dr}),yr=st({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Yo={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"},Ko=/[A-Z]/g,xr=/-[a-z]/g,qo=/^data[-\w.:]+$/i;function Go(e,t){const n=$t(t);let r=t,i=Ie;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qo.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(xr,Qo);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!xr.test(o)){let l=o.replace(Ko,Xo);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=rn}return new i(r,t)}function Xo(e){return"-"+e.toLowerCase()}function Qo(e){return e.charAt(1).toUpperCase()}const Jo=cr([pr,Vo,mr,gr,yr],"html"),on=cr([pr,Wo,mr,gr,yr],"svg");function Zo(e){return e.join(" ").trim()}var ln={},br=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$o=/\n/g,el=/^\s*/,tl=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,nl=/^:\s*/,rl=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,il=/^[;\s]*/,ol=/^\s+|\s+$/g,ll=`
144
+ `,wr="/",kr="*",tt="",al="comment",sl="declaration",ul=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var x=y.match($o);x&&(n+=x.length);var T=y.lastIndexOf(ll);r=~T?y.length-T:r+y.length}function o(){var y={line:n,column:r};return function(x){return x.position=new l(y),f(),x}}function l(y){this.start=y,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(y){var x=new Error(t.source+":"+n+":"+r+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(y){var x=y.exec(e);if(x){var T=x[0];return i(T),e=e.slice(T.length),x}}function f(){u(el)}function s(y){var x;for(y=y||[];x=c();)x!==!1&&y.push(x);return y}function c(){var y=o();if(!(wr!=e.charAt(0)||kr!=e.charAt(1))){for(var x=2;tt!=e.charAt(x)&&(kr!=e.charAt(x)||wr!=e.charAt(x+1));)++x;if(x+=2,tt===e.charAt(x-1))return a("End of comment missing");var T=e.slice(2,x-2);return r+=2,i(T),e=e.slice(x),r+=2,y({type:al,comment:T})}}function h(){var y=o(),x=u(tl);if(x){if(c(),!u(nl))return a("property missing ':'");var T=u(rl),k=y({type:sl,property:Sr(x[0].replace(br,tt)),value:T?Sr(T[0].replace(br,tt)):tt});return u(il),k}}function p(){var y=[];s(y);for(var x;x=h();)x!==!1&&(y.push(x),s(y));return y}return f(),p()};function Sr(e){return e?e.replace(ol,tt):tt}var cl=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=pl;var fl=cl(ul);function pl(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,fl.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var l=o.property,a=o.value;i?t(l,a,o):a&&(n=n||{},n[l]=a)}}),n}var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.camelCase=void 0;var hl=/^--[a-zA-Z0-9_-]+$/,dl=/-([a-z])/g,ml=/^[^-]+$/,gl=/^-(webkit|moz|ms|o|khtml)-/,yl=/^-(ms)-/,xl=function(e){return!e||ml.test(e)||hl.test(e)},bl=function(e,t){return t.toUpperCase()},vr=function(e,t){return"".concat(t,"-")},wl=function(e,t){return t===void 0&&(t={}),xl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(yl,vr):e=e.replace(gl,vr),e.replace(dl,bl))};Pt.camelCase=wl;var kl=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sl=kl(ln),vl=Pt;function an(e,t){var n={};return!e||typeof e!="string"||(0,Sl.default)(e,function(r,i){r&&i&&(n[(0,vl.camelCase)(r,t)]=i)}),n}an.default=an;var El=an;const Cl=Wt(El),Er=Cr("end"),sn=Cr("start");function Cr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function _l(e){const t=sn(e),n=Er(e);if(t&&n)return{start:t,end:n}}function wt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_r(e.position):"start"in e||"end"in e?_r(e):"line"in e||"column"in e?un(e):""}function un(e){return Tr(e&&e.line)+":"+Tr(e&&e.column)}function _r(e){return un(e&&e.start)+"-"+un(e&&e.end)}function Tr(e){return e&&typeof e=="number"?e:1}class ke extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=wt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}ke.prototype.file="",ke.prototype.name="",ke.prototype.reason="",ke.prototype.message="",ke.prototype.stack="",ke.prototype.column=void 0,ke.prototype.line=void 0,ke.prototype.ancestors=void 0,ke.prototype.cause=void 0,ke.prototype.fatal=void 0,ke.prototype.place=void 0,ke.prototype.ruleId=void 0,ke.prototype.source=void 0;const cn={}.hasOwnProperty,Tl=new Map,Il=/[A-Z]/g,Al=new Set(["table","tbody","thead","tfoot","tr"]),Rl=new Set(["td","th"]),Ir="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ol(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Fl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?on:Jo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Ar(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ar(e,t,n){if(t.type==="element")return Pl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ll(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Nl(e,t,n);if(t.type==="mdxjsEsm")return jl(e,t);if(t.type==="root")return Dl(e,t,n);if(t.type==="text")return Ml(e,t)}function Pl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=on,e.schema=i),e.ancestors.push(t);const o=Or(e,t.tagName,!1),l=Bl(e,t);let a=pn(e,t);return Al.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Uo(u):!0})),Rr(e,l,o,t),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Ll(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}kt(e,t.position)}function jl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);kt(e,t.position)}function Nl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=on,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Or(e,t.name,!0),l=Ul(e,t),a=pn(e,t);return Rr(e,l,o,t),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Dl(e,t,n){const r={};return fn(r,pn(e,t)),e.create(t,e.Fragment,r,n)}function Ml(e,t){return t.value}function Rr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Fl(e,t,n){return r;function r(i,o,l,a){const f=Array.isArray(l.children)?n:t;return a?f(o,l,a):f(o,l)}}function zl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=sn(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Bl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&cn.call(t.properties,i)){const o=Hl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Rl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ul(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else kt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else kt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function pn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Tl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const f=i.get(u)||0;l=u+"-"+f,i.set(u,f+1)}}const a=Ar(e,o,l);a!==void 0&&n.push(a)}return n}function Hl(e,t,n){const r=Go(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Do(n):Zo(n)),r.property==="style"){let i=typeof n=="object"?n:Vl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Wl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Yo[r.property]||r.property:r.attribute,n]}}function Vl(e,t){try{return Cl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ke("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ir+"#cannot-parse-style-attribute",i}}function Or(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=sr(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=sr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return cn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);kt(e)}function kt(e,t){const n=new ke("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=Ir+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wl(e){const t={};let n;for(n in e)cn.call(e,n)&&(t[Yl(n)]=e[n]);return t}function Yl(e){let t=e.replace(Il,Kl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Kl(e){return"-"+e.toLowerCase()}const hn={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"]},ql={};function Gl(e,t){const n=ql,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pr(e,r,i)}function Pr(e,t,n){if(Xl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Lr(e.children,t,n)}return Array.isArray(e)?Lr(e,t,n):""}function Lr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Pr(e[i],t,n);return r.join("")}function Xl(e){return!!(e&&typeof e=="object")}const jr=document.createElement("i");function dn(e){const t="&"+e+";";jr.innerHTML=t;const n=jr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function He(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function Me(e,t){return e.length>0?(He(e,e.length,0,t),e):t}const Nr={}.hasOwnProperty;function Ql(e){const t={};let n=-1;for(;++n<e.length;)Jl(t,e[n]);return t}function Jl(e,t){let n;for(n in t){const i=(Nr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Nr.call(i,l)||(i[l]=[]);const a=o[l];Zl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Zl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);He(e,0,0,r)}function Dr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ut(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ve=Xe(/[A-Za-z]/),je=Xe(/[\dA-Za-z]/),$l=Xe(/[#-'*+\--9=?A-Z^-~]/);function mn(e){return e!==null&&(e<32||e===127)}const gn=Xe(/\d/),ea=Xe(/[\dA-Fa-f]/),ta=Xe(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function Ae(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const na=Xe(new RegExp("\\p{P}|\\p{S}","u")),ra=Xe(/\s/);function Xe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ct(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&je(e.charCodeAt(n+1))&&je(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function oe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return Z(u)?(e.enter(n),a(u)):t(u)}function a(u){return Z(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const ia={tokenize:oa};function oa(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),oe(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return D(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const la={tokenize:aa},Mr={tokenize:sa};function aa(e){const t=this,n=[];let r=0,i,o,l;return a;function a(S){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,u,f)(S)}return f(S)}function u(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const z=t.events.length;let U=z,w;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){w=t.events[U][1].end;break}k(r);let L=z;for(;L<t.events.length;)t.events[L][1].end={...w},L++;return He(t.events,U+1,0,t.events.slice(z)),t.events.length=L,f(S)}return a(S)}function f(S){if(r===n.length){if(!i)return h(S);if(i.currentConstruct&&i.currentConstruct.concrete)return y(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mr,s,c)(S)}function s(S){return i&&A(),k(r),h(S)}function c(S){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,y(S)}function h(S){return t.containerState={},e.attempt(Mr,p,y)(S)}function p(S){return r++,n.push([t.currentConstruct,t.containerState]),h(S)}function y(S){if(S===null){i&&A(),k(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(S)}function x(S){if(S===null){T(e.exit("chunkFlow"),!0),k(0),e.consume(S);return}return D(S)?(e.consume(S),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(S),x)}function T(S,z){const U=t.sliceStream(S);if(z&&U.push(null),S.previous=o,o&&(o.next=S),o=S,i.defineSkip(S.start),i.write(U),t.parser.lazy[S.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const L=t.events.length;let Y=L,M,K;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(M){K=t.events[Y][1].end;break}M=!0}for(k(r),w=L;w<t.events.length;)t.events[w][1].end={...K},w++;He(t.events,Y+1,0,t.events.slice(L)),t.events.length=w}}function k(S){let z=n.length;for(;z-- >S;){const U=n[z];t.containerState=U[1],U[0].exit.call(t,e)}n.length=S}function A(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sa(e,t,n){return oe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fr(e){if(e===null||Ae(e)||ra(e))return 1;if(na(e))return 2}function yn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const xn={name:"attention",resolveAll:ua,tokenize:ca};function ua(e,t){let n=-1,r,i,o,l,a,u,f,s;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};zr(c,-u),zr(h,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Me(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Me(f,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),f=Me(f,yn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Me(f,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(s=2,f=Me(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):s=0,He(e,r-1,n-r+3,f),n=r+f.length-s-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ca(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fr(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const f=e.exit("attentionSequence"),s=Fr(u),c=!s||s===2&&i||n.includes(u),h=!i||i===2&&s||n.includes(r);return f._open=!!(o===42?c:c&&(i||!h)),f._close=!!(o===42?h:h&&(s||!c)),t(u)}}function zr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fa={name:"autolink",tokenize:pa};function pa(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Ve(p)?(e.consume(p),l):p===64?n(p):f(p)}function l(p){return p===43||p===45||p===46||je(p)?(r=1,a(p)):f(p)}function a(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||je(p))&&r++<32?(e.consume(p),a):(r=0,f(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||mn(p)?n(p):(e.consume(p),u)}function f(p){return p===64?(e.consume(p),s):$l(p)?(e.consume(p),f):n(p)}function s(p){return je(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,s):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||je(p))&&r++<63){const y=p===45?h:c;return e.consume(p),y}return n(p)}}const Lt={partial:!0,tokenize:ha};function ha(e,t,n){return r;function r(o){return Z(o)?oe(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||D(o)?t(o):n(o)}}const Br={continuation:{tokenize:ma},exit:ga,name:"blockQuote",tokenize:da};function da(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return Z(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ma(e,t,n){const r=this;return i;function i(l){return Z(l)?oe(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Br,t,n)(l)}}function ga(e){e.exit("blockQuote")}const Ur={name:"characterEscape",tokenize:ya};function ya(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ta(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Hr={name:"characterReference",tokenize:xa};function xa(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,l=je,s(c))}function f(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=ea,s):(e.enter("characterReferenceValue"),o=7,l=gn,s(c))}function s(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===je&&!dn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),s):n(c)}}const Vr={partial:!0,tokenize:wa},Wr={concrete:!0,name:"codeFenced",tokenize:ba};function ba(e,t,n){const r=this,i={partial:!0,tokenize:U};let o=0,l=0,a;return u;function u(w){return f(w)}function f(w){const L=r.events[r.events.length-1];return o=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(w)}function s(w){return w===a?(l++,e.consume(w),s):l<3?n(w):(e.exit("codeFencedFenceSequence"),Z(w)?oe(e,c,"whitespace")(w):c(w))}function c(w){return w===null||D(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Vr,x,z)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||D(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):Z(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),oe(e,p,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),h)}function p(w){return w===null||D(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===null||D(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),y)}function x(w){return e.attempt(i,z,T)(w)}function T(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),k}function k(w){return o>0&&Z(w)?oe(e,A,"linePrefix",o+1)(w):A(w)}function A(w){return w===null||D(w)?e.check(Vr,x,z)(w):(e.enter("codeFlowValue"),S(w))}function S(w){return w===null||D(w)?(e.exit("codeFlowValue"),A(w)):(e.consume(w),S)}function z(w){return e.exit("codeFenced"),t(w)}function U(w,L,Y){let M=0;return K;function K(H){return w.enter("lineEnding"),w.consume(H),w.exit("lineEnding"),O}function O(H){return w.enter("codeFencedFence"),Z(H)?oe(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):P(H)}function P(H){return H===a?(w.enter("codeFencedFenceSequence"),$(H)):Y(H)}function $(H){return H===a?(M++,w.consume(H),$):M>=l?(w.exit("codeFencedFenceSequence"),Z(H)?oe(w,G,"whitespace")(H):G(H)):Y(H)}function G(H){return H===null||D(H)?(w.exit("codeFencedFence"),L(H)):Y(H)}}}function wa(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const bn={name:"codeIndented",tokenize:Sa},ka={partial:!0,tokenize:va};function Sa(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),oe(e,o,"linePrefix",5)(f)}function o(f){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?u(f):D(f)?e.attempt(ka,l,u)(f):(e.enter("codeFlowValue"),a(f))}function a(f){return f===null||D(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),a)}function u(f){return e.exit("codeIndented"),t(f)}}function va(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):oe(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):D(l)?i(l):n(l)}}const Ea={name:"codeText",previous:_a,resolve:Ca,tokenize:Ta};function Ca(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function _a(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ta(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,s(c)):D(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),f(c))}function f(c){return c===null||c===32||c===96||D(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),f)}function s(c){return c===96?(e.consume(c),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",f(c))}}class Ia{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&St(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),St(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),St(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);St(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);St(this.left,n.reverse())}}}function St(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 Yr(e){const t={};let n=-1,r,i,o,l,a,u,f;const s=new Ia(e);for(;++n<s.length;){for(;n in t;)n=t[n];if(r=s.get(n),n&&r[1].type==="chunkFlow"&&s.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Aa(s,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=s.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},a=s.slice(i,n),a.unshift(r),s.splice(i,n-i+1,a))}}return He(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!f}function Aa(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],f={};let s,c,h=-1,p=n,y=0,x=0;const T=[x];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(s=r.sliceStream(p),p.next||s.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(s),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(x=h+1,T.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),h=T.length;h--;){const k=a.slice(T[h],T[h+1]),A=o.pop();u.push([A,A+k.length-1]),e.splice(A,2,k)}for(u.reverse(),h=-1;++h<u.length;)f[y+u[h][0]]=y+u[h][1],y+=u[h][1]-u[h][0]-1;return f}const Ra={resolve:Pa,tokenize:La},Oa={partial:!0,tokenize:ja};function Pa(e){return Yr(e),e}function La(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):D(a)?e.check(Oa,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ja(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),oe(e,o,"linePrefix")}function o(l){if(l===null||D(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Kr(e,t,n,r,i,o,l,a,u){const f=u||Number.POSITIVE_INFINITY;let s=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),h):k===null||k===32||k===41||mn(k)?n(k):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(k))}function h(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(a),h(k)):k===null||k===60||D(k)?n(k):(e.consume(k),k===92?y:p)}function y(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function x(k){return!s&&(k===null||k===41||Ae(k))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(k)):s<f&&k===40?(e.consume(k),s++,x):k===41?(e.consume(k),s--,x):k===null||k===32||k===40||mn(k)?n(k):(e.consume(k),k===92?T:x)}function T(k){return k===40||k===41||k===92?(e.consume(k),x):x(k)}}function qr(e,t,n,r,i,o){const l=this;let a=0,u;return f;function f(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),s}function s(p){return a>999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):D(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||D(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),u||(u=!Z(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function Gr(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,u):n(h)}function u(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),f(h))}function f(h){return h===l?(e.exit(o),u(l)):h===null?n(h):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),oe(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(h))}function s(h){return h===l||h===null||D(h)?(e.exit("chunkString"),f(h)):(e.consume(h),h===92?c:s)}function c(h){return h===l||h===92?(e.consume(h),s):s(h)}}function vt(e,t){let n;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?oe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Na={name:"definition",tokenize:Ma},Da={partial:!0,tokenize:Fa};function Ma(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return qr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Ae(p)?vt(e,f)(p):f(p)}function f(p){return Kr(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Da,c,c)(p)}function c(p){return Z(p)?oe(e,h,"whitespace")(p):h(p)}function h(p){return p===null||D(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Fa(e,t,n){return r;function r(a){return Ae(a)?vt(e,i)(a):n(a)}function i(a){return Gr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Z(a)?oe(e,l,"whitespace")(a):l(a)}function l(a){return a===null||D(a)?t(a):n(a)}}const za={name:"hardBreakEscape",tokenize:Ba};function Ba(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return D(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ua={name:"headingAtx",resolve:Ha,tokenize:Va};function Ha(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},He(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Va(e,t,n){let r=0;return i;function i(s){return e.enter("atxHeading"),o(s)}function o(s){return e.enter("atxHeadingSequence"),l(s)}function l(s){return s===35&&r++<6?(e.consume(s),l):s===null||Ae(s)?(e.exit("atxHeadingSequence"),a(s)):n(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),u(s)):s===null||D(s)?(e.exit("atxHeading"),t(s)):Z(s)?oe(e,a,"whitespace")(s):(e.enter("atxHeadingText"),f(s))}function u(s){return s===35?(e.consume(s),u):(e.exit("atxHeadingSequence"),a(s))}function f(s){return s===null||s===35||Ae(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),f)}}const Wa=["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"],Xr=["pre","script","style","textarea"],Ya={concrete:!0,name:"htmlFlow",resolveTo:Ga,tokenize:Xa},Ka={partial:!0,tokenize:Ja},qa={partial:!0,tokenize:Qa};function Ga(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Xa(e,t,n){const r=this;let i,o,l,a,u;return f;function f(g){return s(g)}function s(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),o=!0,x):g===63?(e.consume(g),i=3,r.interrupt?t:d):Ve(g)?(e.consume(g),l=String.fromCharCode(g),T):n(g)}function h(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,y):Ve(g)?(e.consume(g),i=4,r.interrupt?t:d):n(g)}function p(g){return g===45?(e.consume(g),r.interrupt?t:d):n(g)}function y(g){const ye="CDATA[";return g===ye.charCodeAt(a++)?(e.consume(g),a===ye.length?r.interrupt?t:P:y):n(g)}function x(g){return Ve(g)?(e.consume(g),l=String.fromCharCode(g),T):n(g)}function T(g){if(g===null||g===47||g===62||Ae(g)){const ye=g===47,Fe=l.toLowerCase();return!ye&&!o&&Xr.includes(Fe)?(i=1,r.interrupt?t(g):P(g)):Wa.includes(l.toLowerCase())?(i=6,ye?(e.consume(g),k):r.interrupt?t(g):P(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?A(g):S(g))}return g===45||je(g)?(e.consume(g),l+=String.fromCharCode(g),T):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:P):n(g)}function A(g){return Z(g)?(e.consume(g),A):K(g)}function S(g){return g===47?(e.consume(g),K):g===58||g===95||Ve(g)?(e.consume(g),z):Z(g)?(e.consume(g),S):K(g)}function z(g){return g===45||g===46||g===58||g===95||je(g)?(e.consume(g),z):U(g)}function U(g){return g===61?(e.consume(g),w):Z(g)?(e.consume(g),U):S(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,L):Z(g)?(e.consume(g),w):Y(g)}function L(g){return g===u?(e.consume(g),u=null,M):g===null||D(g)?n(g):(e.consume(g),L)}function Y(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Ae(g)?U(g):(e.consume(g),Y)}function M(g){return g===47||g===62||Z(g)?S(g):n(g)}function K(g){return g===62?(e.consume(g),O):n(g)}function O(g){return g===null||D(g)?P(g):Z(g)?(e.consume(g),O):n(g)}function P(g){return g===45&&i===2?(e.consume(g),le):g===60&&i===1?(e.consume(g),te):g===62&&i===4?(e.consume(g),ae):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),B):D(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ka,ve,$)(g)):g===null||D(g)?(e.exit("htmlFlowData"),$(g)):(e.consume(g),P)}function $(g){return e.check(qa,G,ve)(g)}function G(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),H}function H(g){return g===null||D(g)?$(g):(e.enter("htmlFlowData"),P(g))}function le(g){return g===45?(e.consume(g),d):P(g)}function te(g){return g===47?(e.consume(g),l="",ge):P(g)}function ge(g){if(g===62){const ye=l.toLowerCase();return Xr.includes(ye)?(e.consume(g),ae):P(g)}return Ve(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),ge):P(g)}function B(g){return g===93?(e.consume(g),d):P(g)}function d(g){return g===62?(e.consume(g),ae):g===45&&i===2?(e.consume(g),d):P(g)}function ae(g){return g===null||D(g)?(e.exit("htmlFlowData"),ve(g)):(e.consume(g),ae)}function ve(g){return e.exit("htmlFlow"),t(g)}}function Qa(e,t,n){const r=this;return i;function i(l){return D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Ja(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Lt,t,n)}}const Za={name:"htmlText",tokenize:$a};function $a(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),f):d===47?(e.consume(d),U):d===63?(e.consume(d),S):Ve(d)?(e.consume(d),Y):n(d)}function f(d){return d===45?(e.consume(d),s):d===91?(e.consume(d),o=0,y):Ve(d)?(e.consume(d),A):n(d)}function s(d){return d===45?(e.consume(d),p):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),h):D(d)?(l=c,te(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?le(d):d===45?h(d):c(d)}function y(d){const ae="CDATA[";return d===ae.charCodeAt(o++)?(e.consume(d),o===ae.length?x:y):n(d)}function x(d){return d===null?n(d):d===93?(e.consume(d),T):D(d)?(l=x,te(d)):(e.consume(d),x)}function T(d){return d===93?(e.consume(d),k):x(d)}function k(d){return d===62?le(d):d===93?(e.consume(d),k):x(d)}function A(d){return d===null||d===62?le(d):D(d)?(l=A,te(d)):(e.consume(d),A)}function S(d){return d===null?n(d):d===63?(e.consume(d),z):D(d)?(l=S,te(d)):(e.consume(d),S)}function z(d){return d===62?le(d):S(d)}function U(d){return Ve(d)?(e.consume(d),w):n(d)}function w(d){return d===45||je(d)?(e.consume(d),w):L(d)}function L(d){return D(d)?(l=L,te(d)):Z(d)?(e.consume(d),L):le(d)}function Y(d){return d===45||je(d)?(e.consume(d),Y):d===47||d===62||Ae(d)?M(d):n(d)}function M(d){return d===47?(e.consume(d),le):d===58||d===95||Ve(d)?(e.consume(d),K):D(d)?(l=M,te(d)):Z(d)?(e.consume(d),M):le(d)}function K(d){return d===45||d===46||d===58||d===95||je(d)?(e.consume(d),K):O(d)}function O(d){return d===61?(e.consume(d),P):D(d)?(l=O,te(d)):Z(d)?(e.consume(d),O):M(d)}function P(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,$):D(d)?(l=P,te(d)):Z(d)?(e.consume(d),P):(e.consume(d),G)}function $(d){return d===i?(e.consume(d),i=void 0,H):d===null?n(d):D(d)?(l=$,te(d)):(e.consume(d),$)}function G(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||Ae(d)?M(d):(e.consume(d),G)}function H(d){return d===47||d===62||Ae(d)?M(d):n(d)}function le(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function te(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ge}function ge(d){return Z(d)?oe(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):B(d)}function B(d){return e.enter("htmlTextData"),l(d)}}const wn={name:"labelEnd",resolveAll:rs,resolveTo:is,tokenize:os},es={tokenize:ls},ts={tokenize:as},ns={tokenize:ss};function rs(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&He(e,0,e.length,n),e}function is(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},s={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,t],["enter",f,t]],a=Me(a,e.slice(o+1,o+r+3)),a=Me(a,[["enter",s,t]]),a=Me(a,yn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=Me(a,[["exit",s,t],e[l-2],e[l-1],["exit",f,t]]),a=Me(a,e.slice(l+1)),a=Me(a,[["exit",u,t]]),He(e,o,e.length,a),e}function os(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(l=r.parser.defined.includes(ut(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(es,s,l?s:c)(h):h===91?e.attempt(ts,s,l?f:c)(h):l?s(h):c(h)}function f(h){return e.attempt(ns,s,c)(h)}function s(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function ls(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Ae(c)?vt(e,o)(c):o(c)}function o(c){return c===41?s(c):Kr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return Ae(c)?vt(e,u)(c):s(c)}function a(c){return n(c)}function u(c){return c===34||c===39||c===40?Gr(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):s(c)}function f(c){return Ae(c)?vt(e,s)(c):s(c)}function s(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function as(e,t,n){const r=this;return i;function i(a){return qr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function ss(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const us={name:"labelStartImage",resolveAll:wn.resolveAll,tokenize:cs};function cs(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const fs={name:"labelStartLink",resolveAll:wn.resolveAll,tokenize:ps};function ps(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const kn={name:"lineEnding",tokenize:hs};function hs(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),oe(e,t,"linePrefix")}}const jt={name:"thematicBreak",tokenize:ds};function ds(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),l(f)}function l(f){return i=f,a(f)}function a(f){return f===i?(e.enter("thematicBreakSequence"),u(f)):r>=3&&(f===null||D(f))?(e.exit("thematicBreak"),t(f)):n(f)}function u(f){return f===i?(e.consume(f),r++,u):(e.exit("thematicBreakSequence"),Z(f)?oe(e,a,"whitespace")(f):a(f))}}const Re={continuation:{tokenize:xs},exit:ws,name:"list",tokenize:ys},ms={partial:!0,tokenize:ks},gs={partial:!0,tokenize:bs};function ys(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:gn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(jt,n,f)(p):f(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return gn(p)&&++l<10?(e.consume(p),u):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),f(p)):n(p)}function f(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Lt,r.interrupt?n:s,e.attempt(ms,h,c))}function s(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function xs(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Lt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,oe(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Z(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gs,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,oe(e,e.attempt(Re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function bs(e,t,n){const r=this;return oe(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ws(e){e.exit(this.containerState.type)}function ks(e,t,n){const r=this;return oe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!Z(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Qr={name:"setextUnderline",resolveTo:Ss,tokenize:vs};function Ss(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function vs(e,t,n){const r=this;let i;return o;function o(f){let s=r.events.length,c;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){c=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),a(f)}function a(f){return f===i?(e.consume(f),a):(e.exit("setextHeadingLineSequence"),Z(f)?oe(e,u,"lineSuffix")(f):u(f))}function u(f){return f===null||D(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Es={tokenize:Cs};function Cs(e){const t=this,n=e.attempt(Lt,r,e.attempt(this.parser.constructs.flowInitial,i,oe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ra,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _s={resolveAll:Zr()},Ts=Jr("string"),Is=Jr("text");function Jr(e){return{resolveAll:Zr(e==="text"?As:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(s){return f(s)?o(s):a(s)}function a(s){if(s===null){n.consume(s);return}return n.enter("data"),n.consume(s),u}function u(s){return f(s)?(n.exit("data"),o(s)):(n.consume(s),u)}function f(s){if(s===null)return!0;const c=i[s];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Zr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function As(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const f=i[o];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(f===-2)u=!0,a++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const f={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const Rs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Na},disable:{null:[]},document:{42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:Br},flow:{35:Ua,42:jt,45:[Qr,jt],60:Ya,61:Qr,95:jt,96:Wr,126:Wr},flowInitial:{[-2]:bn,[-1]:bn,32:bn},insideSpan:{null:[xn,_s]},string:{38:Hr,92:Ur},text:{[-5]:kn,[-4]:kn,[-3]:kn,33:us,38:Hr,42:xn,60:[fa,Za],91:fs,92:[za,Ur],93:wn,95:xn,96:Ea}},Symbol.toStringTag,{value:"Module"}));function Os(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:L(U),check:L(w),consume:A,enter:S,exit:z,interrupt:L(w,{interrupt:!0})},f={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let s=t.tokenize.call(f,u);return t.resolveAll&&o.push(t),f;function c(O){return l=Me(l,O),T(),l[l.length-1]!==null?[]:(Y(t,0),f.events=yn(o,f.events,f),f.events)}function h(O,P){return Ls(p(O),P)}function p(O){return Ps(l,O)}function y(){const{_bufferIndex:O,_index:P,line:$,column:G,offset:H}=r;return{_bufferIndex:O,_index:P,line:$,column:G,offset:H}}function x(O){i[O.line]=O.column,K()}function T(){let O;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<P.length;)k(P.charCodeAt(r._bufferIndex));else k(P)}}function k(O){s=s(O)}function A(O){D(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,K()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=O}function S(O,P){const $=P||{};return $.type=O,$.start=y(),f.events.push(["enter",$,f]),a.push($),$}function z(O){const P=a.pop();return P.end=y(),f.events.push(["exit",P,f]),P}function U(O,P){Y(O,P.from)}function w(O,P){P.restore()}function L(O,P){return $;function $(G,H,le){let te,ge,B,d;return Array.isArray(G)?ve(G):"tokenize"in G?ve([G]):ae(G);function ae(se){return Be;function Be(Ee){const Ne=Ee!==null&&se[Ee],de=Ee!==null&&se.null,De=[...Array.isArray(Ne)?Ne:Ne?[Ne]:[],...Array.isArray(de)?de:de?[de]:[]];return ve(De)(Ee)}}function ve(se){return te=se,ge=0,se.length===0?le:g(se[ge])}function g(se){return Be;function Be(Ee){return d=M(),B=se,se.partial||(f.currentConstruct=se),se.name&&f.parser.constructs.disable.null.includes(se.name)?Fe():se.tokenize.call(P?Object.assign(Object.create(f),P):f,u,ye,Fe)(Ee)}}function ye(se){return O(B,d),H}function Fe(se){return d.restore(),++ge<te.length?g(te[ge]):le}}}function Y(O,P){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&He(f.events,P,f.events.length-P,O.resolve(f.events.slice(P),f)),O.resolveTo&&(f.events=O.resolveTo(f.events,f))}function M(){const O=y(),P=f.previous,$=f.currentConstruct,G=f.events.length,H=Array.from(a);return{from:G,restore:le};function le(){r=O,f.previous=P,f.currentConstruct=$,f.events.length=G,a=H,K()}}function K(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ps(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ls(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
145
145
  `;break}case-3:{l=`\r
146
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function js(e){const r={constructs:Ql([Rs,...(e||{}).extensions||[]]),content:i(ia),defined:[],document:i(la),flow:i(Es),lazy:{},string:i(Ts),text:i(Is)};return r;function i(o){return l;function l(a){return Os(r,o,a)}}}function Ds(e){for(;!Yr(e););return e}const $r=/[\0\t\n\r]/g;function Ns(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const u=[];let f,s,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if($r.lastIndex=c,f=$r.exec(o),h=f&&f.index!==void 0?f.index:o.length,p=o.charCodeAt(h),!f){t=o.slice(c);break}if(p===10&&c===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<h&&(u.push(o.slice(c,h)),e+=h-c),p){case 0:{u.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,u.push(-2);e++<s;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Fs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ms(e){return e.replace(Fs,zs)}function zs(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Nr(n.slice(o?2:1),o?16:10)}return gn(n)||e}const ei={}.hasOwnProperty;function Bs(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Us(n)(Ds(js(n).document().write(Ns()(e,t,!0))))}function Us(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ue),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(it),blockQuote:o(de),characterEscape:F,characterReference:F,codeFenced:o(Ne),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ne,l),codeText:o(It,l),codeTextData:F,data:F,codeFlowValue:F,definition:o(ht),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(At),hardBreakEscape:o(qe),hardBreakTrailing:o(qe),htmlFlow:o(R,l),htmlFlowData:F,htmlText:o(R,l),htmlTextData:F,image:o(X),label:l,link:o(ue),listItem:o(Oe),listItemValue:h,listOrdered:o(ve,c),listUnordered:o(ve),paragraph:o(Ce),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(it),strong:o(ot),thematicBreak:o(Ze)},exit:{atxHeading:u(),atxHeadingSequence:U,autolink:u(),autolinkEmail:De,autolinkProtocol:Ee,blockQuote:u(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:se,characterReference:Be,codeFenced:u(T),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:K,codeIndented:u(k),codeText:u(H),codeTextData:K,data:K,definition:u(),definitionDestinationString:z,definitionLabelString:A,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u($),htmlFlowData:K,htmlText:u(G),htmlTextData:K,image:u(te),label:B,labelText:ge,lineEnding:O,link:u(le),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ye,resourceDestinationString:d,resourceTitleString:ae,resource:Se,setextHeading:u(Y),setextHeadingLineSequence:L,setextHeadingText:w,strong:u(),thematicBreak:u()}};ti(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(b){let _={type:"root",children:[]};const D={stack:[_],tokenStack:[],config:t,enter:a,exit:f,buffer:l,resume:s,data:n},V=[];let J=-1;for(;++J<b.length;)if(b[J][1].type==="listOrdered"||b[J][1].type==="listUnordered")if(b[J][0]==="enter")V.push(J);else{const xe=V.pop();J=i(b,xe,J)}for(J=-1;++J<b.length;){const xe=t[b[J][0]];ei.call(xe,b[J][1].type)&&xe[b[J][1].type].call(Object.assign({sliceSerialize:b[J][2].sliceSerialize},D),b[J][1])}if(D.tokenStack.length>0){const xe=D.tokenStack[D.tokenStack.length-1];(xe[1]||ni).call(D,void 0,xe[0])}for(_.position={start:Qe(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:Qe(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)_=t.transforms[J](_)||_;return _}function i(b,_,D){let V=_-1,J=-1,xe=!1,ne,he,Ye,Ke;for(;++V<=D;){const be=b[V];switch(be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{be[0]==="enter"?J++:J--,Ke=void 0;break}case"lineEndingBlank":{be[0]==="enter"&&(ne&&!Ke&&!J&&!Ye&&(Ye=V),Ke=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ke=void 0}if(!J&&be[0]==="enter"&&be[1].type==="listItemPrefix"||J===-1&&be[0]==="exit"&&(be[1].type==="listUnordered"||be[1].type==="listOrdered")){if(ne){let $e=V;for(he=void 0;$e--;){const Ue=b[$e];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]==="exit")continue;he&&(b[he][1].type="lineEndingBlank",xe=!0),Ue[1].type="lineEnding",he=$e}else if(!(Ue[1].type==="linePrefix"||Ue[1].type==="blockQuotePrefix"||Ue[1].type==="blockQuotePrefixWhitespace"||Ue[1].type==="blockQuoteMarker"||Ue[1].type==="listItemIndent"))break}Ye&&(!he||Ye<he)&&(ne._spread=!0),ne.end=Object.assign({},he?b[he][1].start:be[1].end),b.splice(he||V,0,["exit",ne,be[2]]),V++,D++}if(be[1].type==="listItemPrefix"){const $e={type:"listItem",_spread:!1,start:Object.assign({},be[1].start),end:void 0};ne=$e,b.splice(V,0,["enter",$e,be[2]]),V++,D++,Ye=void 0,Ke=!0}}}return b[_][1]._spread=xe,D}function o(b,_){return D;function D(V){a.call(this,b(V),V),_&&_.call(this,V)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(b,_,D){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([_,D||void 0]),b.position={start:Qe(_.start),end:void 0}}function u(b){return _;function _(D){b&&b.call(this,D),f.call(this,D)}}function f(b,_){const D=this.stack.pop(),V=this.tokenStack.pop();if(V)V[0].type!==b.type&&(_?_.call(this,b,V[0]):(V[1]||ni).call(this,b,V[0]));else throw new Error("Cannot close `"+b.type+"` ("+bt({start:b.start,end:b.end})+"): it’s not open");D.position.end=Qe(b.end)}function s(){return Gl(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(b){if(this.data.expectingFirstListItemValue){const _=this.stack[this.stack.length-2];_.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),_=this.stack[this.stack.length-1];_.lang=b}function y(){const b=this.resume(),_=this.stack[this.stack.length-1];_.meta=b}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b.replace(/(\r?\n|\r)$/g,"")}function A(b){const _=this.resume(),D=this.stack[this.stack.length-1];D.label=_,D.identifier=ut(this.sliceSerialize(b)).toLowerCase()}function v(){const b=this.resume(),_=this.stack[this.stack.length-1];_.title=b}function z(){const b=this.resume(),_=this.stack[this.stack.length-1];_.url=b}function U(b){const _=this.stack[this.stack.length-1];if(!_.depth){const D=this.sliceSerialize(b).length;_.depth=D}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function L(b){const _=this.stack[this.stack.length-1];_.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function F(b){const D=this.stack[this.stack.length-1].children;let V=D[D.length-1];(!V||V.type!=="text")&&(V=Ge(),V.position={start:Qe(b.start),end:void 0},D.push(V)),this.stack.push(V)}function K(b){const _=this.stack.pop();_.value+=this.sliceSerialize(b),_.position.end=Qe(b.end)}function O(b){const _=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=_.children[_.children.length-1];D.position.end=Qe(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_.type)&&(F.call(this,b),K.call(this,b))}function P(){this.data.atHardBreak=!0}function $(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b}function G(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b}function H(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b}function le(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const _=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=_,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function te(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const _=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=_,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function ge(b){const _=this.sliceSerialize(b),D=this.stack[this.stack.length-2];D.label=Ms(_),D.identifier=ut(_).toLowerCase()}function B(){const b=this.stack[this.stack.length-1],_=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const V=b.children;D.children=V}else D.alt=_}function d(){const b=this.resume(),_=this.stack[this.stack.length-1];_.url=b}function ae(){const b=this.resume(),_=this.stack[this.stack.length-1];_.title=b}function Se(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ye(b){const _=this.resume(),D=this.stack[this.stack.length-1];D.label=_,D.identifier=ut(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function Me(b){this.data.characterReferenceType=b.type}function se(b){const _=this.sliceSerialize(b),D=this.data.characterReferenceType;let V;D?(V=Nr(_,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):V=gn(_);const J=this.stack[this.stack.length-1];J.value+=V}function Be(b){const _=this.stack.pop();_.position.end=Qe(b.end)}function Ee(b){K.call(this,b);const _=this.stack[this.stack.length-1];_.url=this.sliceSerialize(b)}function De(b){K.call(this,b);const _=this.stack[this.stack.length-1];_.url="mailto:"+this.sliceSerialize(b)}function de(){return{type:"blockquote",children:[]}}function Ne(){return{type:"code",lang:null,meta:null,value:""}}function It(){return{type:"inlineCode",value:""}}function ht(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function At(){return{type:"emphasis",children:[]}}function it(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function R(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function ue(){return{type:"link",title:null,url:"",children:[]}}function ve(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function Oe(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function Ce(){return{type:"paragraph",children:[]}}function ot(){return{type:"strong",children:[]}}function Ge(){return{type:"text",value:""}}function Ze(){return{type:"thematicBreak"}}}function Qe(e){return{line:e.line,column:e.column,offset:e.offset}}function ti(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ti(e,r):Hs(e,r)}}function Hs(e,t){let n;for(n in t)if(ei.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ni(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+bt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+") is still open")}function Vs(e){const t=this;t.parser=n;function n(r){return Bs(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ws(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ys(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
146
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function js(e){const r={constructs:Ql([Rs,...(e||{}).extensions||[]]),content:i(ia),defined:[],document:i(la),flow:i(Es),lazy:{},string:i(Ts),text:i(Is)};return r;function i(o){return l;function l(a){return Os(r,o,a)}}}function Ns(e){for(;!Yr(e););return e}const $r=/[\0\t\n\r]/g;function Ds(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const u=[];let f,s,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if($r.lastIndex=c,f=$r.exec(o),h=f&&f.index!==void 0?f.index:o.length,p=o.charCodeAt(h),!f){t=o.slice(c);break}if(p===10&&c===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<h&&(u.push(o.slice(c,h)),e+=h-c),p){case 0:{u.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,u.push(-2);e++<s;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Ms=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Fs(e){return e.replace(Ms,zs)}function zs(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Dr(n.slice(o?2:1),o?16:10)}return dn(n)||e}const ei={}.hasOwnProperty;function Bs(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Us(n)(Ns(js(n).document().write(Ds()(e,t,!0))))}function Us(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ue),autolinkProtocol:M,autolinkEmail:M,atxHeading:o(it),blockQuote:o(de),characterEscape:M,characterReference:M,codeFenced:o(De),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(De,l),codeText:o(It,l),codeTextData:M,data:M,codeFlowValue:M,definition:o(dt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(At),hardBreakEscape:o(qe),hardBreakTrailing:o(qe),htmlFlow:o(R,l),htmlFlowData:M,htmlText:o(R,l),htmlTextData:M,image:o(X),label:l,link:o(ue),listItem:o(Oe),listItemValue:h,listOrdered:o(Se,c),listUnordered:o(Se),paragraph:o(Ce),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(it),strong:o(ot),thematicBreak:o(Ze)},exit:{atxHeading:u(),atxHeadingSequence:U,autolink:u(),autolinkEmail:Ne,autolinkProtocol:Ee,blockQuote:u(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:Fe,characterReferenceMarkerNumeric:Fe,characterReferenceValue:se,characterReference:Be,codeFenced:u(T),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:K,codeIndented:u(k),codeText:u(H),codeTextData:K,data:K,definition:u(),definitionDestinationString:z,definitionLabelString:A,definitionTitleString:S,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u($),htmlFlowData:K,htmlText:u(G),htmlTextData:K,image:u(te),label:B,labelText:ge,lineEnding:O,link:u(le),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ye,resourceDestinationString:d,resourceTitleString:ae,resource:ve,setextHeading:u(Y),setextHeadingLineSequence:L,setextHeadingText:w,strong:u(),thematicBreak:u()}};ti(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(b){let _={type:"root",children:[]};const N={stack:[_],tokenStack:[],config:t,enter:a,exit:f,buffer:l,resume:s,data:n},V=[];let J=-1;for(;++J<b.length;)if(b[J][1].type==="listOrdered"||b[J][1].type==="listUnordered")if(b[J][0]==="enter")V.push(J);else{const xe=V.pop();J=i(b,xe,J)}for(J=-1;++J<b.length;){const xe=t[b[J][0]];ei.call(xe,b[J][1].type)&&xe[b[J][1].type].call(Object.assign({sliceSerialize:b[J][2].sliceSerialize},N),b[J][1])}if(N.tokenStack.length>0){const xe=N.tokenStack[N.tokenStack.length-1];(xe[1]||ni).call(N,void 0,xe[0])}for(_.position={start:Qe(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:Qe(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)_=t.transforms[J](_)||_;return _}function i(b,_,N){let V=_-1,J=-1,xe=!1,ne,he,Ye,Ke;for(;++V<=N;){const be=b[V];switch(be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{be[0]==="enter"?J++:J--,Ke=void 0;break}case"lineEndingBlank":{be[0]==="enter"&&(ne&&!Ke&&!J&&!Ye&&(Ye=V),Ke=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ke=void 0}if(!J&&be[0]==="enter"&&be[1].type==="listItemPrefix"||J===-1&&be[0]==="exit"&&(be[1].type==="listUnordered"||be[1].type==="listOrdered")){if(ne){let $e=V;for(he=void 0;$e--;){const Ue=b[$e];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]==="exit")continue;he&&(b[he][1].type="lineEndingBlank",xe=!0),Ue[1].type="lineEnding",he=$e}else if(!(Ue[1].type==="linePrefix"||Ue[1].type==="blockQuotePrefix"||Ue[1].type==="blockQuotePrefixWhitespace"||Ue[1].type==="blockQuoteMarker"||Ue[1].type==="listItemIndent"))break}Ye&&(!he||Ye<he)&&(ne._spread=!0),ne.end=Object.assign({},he?b[he][1].start:be[1].end),b.splice(he||V,0,["exit",ne,be[2]]),V++,N++}if(be[1].type==="listItemPrefix"){const $e={type:"listItem",_spread:!1,start:Object.assign({},be[1].start),end:void 0};ne=$e,b.splice(V,0,["enter",$e,be[2]]),V++,N++,Ye=void 0,Ke=!0}}}return b[_][1]._spread=xe,N}function o(b,_){return N;function N(V){a.call(this,b(V),V),_&&_.call(this,V)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(b,_,N){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([_,N||void 0]),b.position={start:Qe(_.start),end:void 0}}function u(b){return _;function _(N){b&&b.call(this,N),f.call(this,N)}}function f(b,_){const N=this.stack.pop(),V=this.tokenStack.pop();if(V)V[0].type!==b.type&&(_?_.call(this,b,V[0]):(V[1]||ni).call(this,b,V[0]));else throw new Error("Cannot close `"+b.type+"` ("+wt({start:b.start,end:b.end})+"): it’s not open");N.position.end=Qe(b.end)}function s(){return Gl(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(b){if(this.data.expectingFirstListItemValue){const _=this.stack[this.stack.length-2];_.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),_=this.stack[this.stack.length-1];_.lang=b}function y(){const b=this.resume(),_=this.stack[this.stack.length-1];_.meta=b}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b.replace(/(\r?\n|\r)$/g,"")}function A(b){const _=this.resume(),N=this.stack[this.stack.length-1];N.label=_,N.identifier=ut(this.sliceSerialize(b)).toLowerCase()}function S(){const b=this.resume(),_=this.stack[this.stack.length-1];_.title=b}function z(){const b=this.resume(),_=this.stack[this.stack.length-1];_.url=b}function U(b){const _=this.stack[this.stack.length-1];if(!_.depth){const N=this.sliceSerialize(b).length;_.depth=N}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function L(b){const _=this.stack[this.stack.length-1];_.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function M(b){const N=this.stack[this.stack.length-1].children;let V=N[N.length-1];(!V||V.type!=="text")&&(V=Ge(),V.position={start:Qe(b.start),end:void 0},N.push(V)),this.stack.push(V)}function K(b){const _=this.stack.pop();_.value+=this.sliceSerialize(b),_.position.end=Qe(b.end)}function O(b){const _=this.stack[this.stack.length-1];if(this.data.atHardBreak){const N=_.children[_.children.length-1];N.position.end=Qe(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_.type)&&(M.call(this,b),K.call(this,b))}function P(){this.data.atHardBreak=!0}function $(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b}function G(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b}function H(){const b=this.resume(),_=this.stack[this.stack.length-1];_.value=b}function le(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const _=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=_,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function te(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const _=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=_,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function ge(b){const _=this.sliceSerialize(b),N=this.stack[this.stack.length-2];N.label=Fs(_),N.identifier=ut(_).toLowerCase()}function B(){const b=this.stack[this.stack.length-1],_=this.resume(),N=this.stack[this.stack.length-1];if(this.data.inReference=!0,N.type==="link"){const V=b.children;N.children=V}else N.alt=_}function d(){const b=this.resume(),_=this.stack[this.stack.length-1];_.url=b}function ae(){const b=this.resume(),_=this.stack[this.stack.length-1];_.title=b}function ve(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ye(b){const _=this.resume(),N=this.stack[this.stack.length-1];N.label=_,N.identifier=ut(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function Fe(b){this.data.characterReferenceType=b.type}function se(b){const _=this.sliceSerialize(b),N=this.data.characterReferenceType;let V;N?(V=Dr(_,N==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):V=dn(_);const J=this.stack[this.stack.length-1];J.value+=V}function Be(b){const _=this.stack.pop();_.position.end=Qe(b.end)}function Ee(b){K.call(this,b);const _=this.stack[this.stack.length-1];_.url=this.sliceSerialize(b)}function Ne(b){K.call(this,b);const _=this.stack[this.stack.length-1];_.url="mailto:"+this.sliceSerialize(b)}function de(){return{type:"blockquote",children:[]}}function De(){return{type:"code",lang:null,meta:null,value:""}}function It(){return{type:"inlineCode",value:""}}function dt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function At(){return{type:"emphasis",children:[]}}function it(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function R(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function ue(){return{type:"link",title:null,url:"",children:[]}}function Se(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function Oe(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function Ce(){return{type:"paragraph",children:[]}}function ot(){return{type:"strong",children:[]}}function Ge(){return{type:"text",value:""}}function Ze(){return{type:"thematicBreak"}}}function Qe(e){return{line:e.line,column:e.column,offset:e.offset}}function ti(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ti(e,r):Hs(e,r)}}function Hs(e,t){let n;for(n in t)if(ei.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ni(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wt({start:t.start,end:t.end})+") is still open")}function Vs(e){const t=this;t.parser=n;function n(r){return Bs(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ws(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ys(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
147
147
  `}]}function Ks(e,t){const n=t.value?t.value+`
148
148
  `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function qs(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gs(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xs(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ct(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,u);const f={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,f),e.applyData(t,f)}function Qs(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Js(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ri(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Zs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ri(e,t);const i={src:ct(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function $s(e,t){const n={src:ct(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function eu(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function tu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ri(e,t);const i={href:ct(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function nu(e,t){const n={href:ct(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ru(e,t,n){const r=e.all(t),i=n?iu(n):ii(t),o={},l=[];if(typeof t.checked=="boolean"){const s=r[0];let c;s&&s.type==="element"&&s.tagName==="p"?c=s:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.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<r.length;){const s=r[a];(i||a!==0||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
149
149
  `}),s.type==="element"&&s.tagName==="p"&&!i?l.push(...s.children):l.push(s)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
150
- `});const f={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,f),e.applyData(t,f)}function iu(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ii(n[r])}return t}function ii(e){const t=e.spread;return t??e.children.length>1}function ou(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.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(r,!0)};return e.patch(t,o),e.applyData(t,o)}function lu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function au(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function su(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=cn(t.children[1]),u=Er(t.children[t.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function cu(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let u=-1;const f=[];for(;++u<a;){const c=t.children[u],h={},p=l?l[u]:void 0;p&&(h.align=p);let y={type:"element",tagName:o,properties:h,children:[]};c&&(y.children=e.all(c),e.patch(c,y),y=e.applyData(c,y)),f.push(y)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,s),e.applyData(t,s)}function fu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const oi=9,li=32;function pu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(ai(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(ai(t.slice(i),i>0,!1)),o.join("")}function ai(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===oi||o===li;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===oi||o===li;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function hu(e,t){const n={type:"text",value:pu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function du(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const mu={blockquote:Ws,break:Ys,code:Ks,delete:qs,emphasis:Gs,footnoteReference:Xs,heading:Qs,html:Js,imageReference:Zs,image:$s,inlineCode:eu,linkReference:tu,link:nu,listItem:ru,list:ou,paragraph:lu,root:au,strong:su,table:uu,tableCell:fu,tableRow:cu,text:hu,thematicBreak:du,toml:Dt,yaml:Dt,definition:Dt,footnoteDefinition:Dt};function Dt(){}const si=-1,Nt=0,St=1,Ft=2,En=3,Cn=4,_n=5,Tn=6,ui=7,ci=8,fi=typeof self=="object"?self:globalThis,gu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case Nt:case si:return n(l,i);case St:{const a=n([],i);for(const u of l)a.push(r(u));return a}case Ft:{const a=n({},i);for(const[u,f]of l)a[r(u)]=r(f);return a}case En:return n(new Date(l),i);case Cn:{const{source:a,flags:u}=l;return n(new RegExp(a,u),i)}case _n:{const a=n(new Map,i);for(const[u,f]of l)a.set(r(u),r(f));return a}case Tn:{const a=n(new Set,i);for(const u of l)a.add(r(u));return a}case ui:{const{name:a,message:u}=l;return n(new fi[a](u),i)}case ci:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new fi[o](l),i)};return r},pi=e=>gu(new Map,e)(0),ft="",{toString:yu}={},{keys:xu}=Object,Et=e=>{const t=typeof e;if(t!=="object"||!e)return[Nt,t];const n=yu.call(e).slice(8,-1);switch(n){case"Array":return[St,ft];case"Object":return[Ft,ft];case"Date":return[En,ft];case"RegExp":return[Cn,ft];case"Map":return[_n,ft];case"Set":return[Tn,ft];case"DataView":return[St,n]}return n.includes("Array")?[St,n]:n.includes("Error")?[ui,n]:[Ft,n]},Mt=([e,t])=>e===Nt&&(t==="function"||t==="symbol"),bu=(e,t,n,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return n.set(a,u),u},o=l=>{if(n.has(l))return n.get(l);let[a,u]=Et(l);switch(a){case Nt:{let s=l;switch(u){case"bigint":a=ci,s=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);s=null;break;case"undefined":return i([si],l)}return i([a,s],l)}case St:{if(u){let h=l;return u==="DataView"?h=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(l)),i([u,[...h]],l)}const s=[],c=i([a,s],l);for(const h of l)s.push(o(h));return c}case Ft:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const s=[],c=i([a,s],l);for(const h of xu(l))(e||!Mt(Et(l[h])))&&s.push([o(h),o(l[h])]);return c}case En:return i([a,l.toISOString()],l);case Cn:{const{source:s,flags:c}=l;return i([a,{source:s,flags:c}],l)}case _n:{const s=[],c=i([a,s],l);for(const[h,p]of l)(e||!(Mt(Et(h))||Mt(Et(p))))&&s.push([o(h),o(p)]);return c}case Tn:{const s=[],c=i([a,s],l);for(const h of l)(e||!Mt(Et(h)))&&s.push(o(h));return c}}const{message:f}=l;return i([a,{name:u,message:f}],l)};return o},hi=(e,{json:t,lossy:n}={})=>{const r=[];return bu(!(t||n),!!t,new Map,r)(e),r},zt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pi(hi(e,t)):structuredClone(e):(e,t)=>pi(hi(e,t));function wu(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 ku(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function vu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||wu,r=e.options.footnoteBackLabel||ku,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[u]);if(!f)continue;const s=e.all(f),c=String(f.identifier).toUpperCase(),h=ct(c.toLowerCase());let p=0;const y=[],x=e.footnoteCounts.get(c);for(;x!==void 0&&++p<=x;){y.length>0&&y.push({type:"text",value:" "});let A=typeof n=="string"?n:n(u,p);typeof A=="string"&&(A={type:"text",value:A}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const T=s[s.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const A=T.children[T.children.length-1];A&&A.type==="text"?A.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...y)}else s.push(...y);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(s,!0)};e.patch(f,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...zt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
150
+ `});const f={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,f),e.applyData(t,f)}function iu(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ii(n[r])}return t}function ii(e){const t=e.spread;return t??e.children.length>1}function ou(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.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(r,!0)};return e.patch(t,o),e.applyData(t,o)}function lu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function au(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function su(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=sn(t.children[1]),u=Er(t.children[t.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function cu(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let u=-1;const f=[];for(;++u<a;){const c=t.children[u],h={},p=l?l[u]:void 0;p&&(h.align=p);let y={type:"element",tagName:o,properties:h,children:[]};c&&(y.children=e.all(c),e.patch(c,y),y=e.applyData(c,y)),f.push(y)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,s),e.applyData(t,s)}function fu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const oi=9,li=32;function pu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(ai(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(ai(t.slice(i),i>0,!1)),o.join("")}function ai(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===oi||o===li;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===oi||o===li;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function hu(e,t){const n={type:"text",value:pu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function du(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const mu={blockquote:Ws,break:Ys,code:Ks,delete:qs,emphasis:Gs,footnoteReference:Xs,heading:Qs,html:Js,imageReference:Zs,image:$s,inlineCode:eu,linkReference:tu,link:nu,listItem:ru,list:ou,paragraph:lu,root:au,strong:su,table:uu,tableCell:fu,tableRow:cu,text:hu,thematicBreak:du,toml:Nt,yaml:Nt,definition:Nt,footnoteDefinition:Nt};function Nt(){}const si=-1,Dt=0,Et=1,Mt=2,Sn=3,vn=4,En=5,Cn=6,ui=7,ci=8,fi=typeof self=="object"?self:globalThis,gu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case Dt:case si:return n(l,i);case Et:{const a=n([],i);for(const u of l)a.push(r(u));return a}case Mt:{const a=n({},i);for(const[u,f]of l)a[r(u)]=r(f);return a}case Sn:return n(new Date(l),i);case vn:{const{source:a,flags:u}=l;return n(new RegExp(a,u),i)}case En:{const a=n(new Map,i);for(const[u,f]of l)a.set(r(u),r(f));return a}case Cn:{const a=n(new Set,i);for(const u of l)a.add(r(u));return a}case ui:{const{name:a,message:u}=l;return n(new fi[a](u),i)}case ci:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new fi[o](l),i)};return r},pi=e=>gu(new Map,e)(0),ft="",{toString:yu}={},{keys:xu}=Object,Ct=e=>{const t=typeof e;if(t!=="object"||!e)return[Dt,t];const n=yu.call(e).slice(8,-1);switch(n){case"Array":return[Et,ft];case"Object":return[Mt,ft];case"Date":return[Sn,ft];case"RegExp":return[vn,ft];case"Map":return[En,ft];case"Set":return[Cn,ft];case"DataView":return[Et,n]}return n.includes("Array")?[Et,n]:n.includes("Error")?[ui,n]:[Mt,n]},Ft=([e,t])=>e===Dt&&(t==="function"||t==="symbol"),bu=(e,t,n,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return n.set(a,u),u},o=l=>{if(n.has(l))return n.get(l);let[a,u]=Ct(l);switch(a){case Dt:{let s=l;switch(u){case"bigint":a=ci,s=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);s=null;break;case"undefined":return i([si],l)}return i([a,s],l)}case Et:{if(u){let h=l;return u==="DataView"?h=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(l)),i([u,[...h]],l)}const s=[],c=i([a,s],l);for(const h of l)s.push(o(h));return c}case Mt:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const s=[],c=i([a,s],l);for(const h of xu(l))(e||!Ft(Ct(l[h])))&&s.push([o(h),o(l[h])]);return c}case Sn:return i([a,l.toISOString()],l);case vn:{const{source:s,flags:c}=l;return i([a,{source:s,flags:c}],l)}case En:{const s=[],c=i([a,s],l);for(const[h,p]of l)(e||!(Ft(Ct(h))||Ft(Ct(p))))&&s.push([o(h),o(p)]);return c}case Cn:{const s=[],c=i([a,s],l);for(const h of l)(e||!Ft(Ct(h)))&&s.push(o(h));return c}}const{message:f}=l;return i([a,{name:u,message:f}],l)};return o},hi=(e,{json:t,lossy:n}={})=>{const r=[];return bu(!(t||n),!!t,new Map,r)(e),r},zt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pi(hi(e,t)):structuredClone(e):(e,t)=>pi(hi(e,t));function wu(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 ku(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Su(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||wu,r=e.options.footnoteBackLabel||ku,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[u]);if(!f)continue;const s=e.all(f),c=String(f.identifier).toUpperCase(),h=ct(c.toLowerCase());let p=0;const y=[],x=e.footnoteCounts.get(c);for(;x!==void 0&&++p<=x;){y.length>0&&y.push({type:"text",value:" "});let A=typeof n=="string"?n:n(u,p);typeof A=="string"&&(A={type:"text",value:A}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const T=s[s.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const A=T.children[T.children.length-1];A&&A.type==="text"?A.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...y)}else s.push(...y);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(s,!0)};e.patch(f,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...zt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
151
151
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
152
- `}]}}const di=function(e){if(e==null)return _u;if(typeof e=="function")return Bt(e);if(typeof e=="object")return Array.isArray(e)?Su(e):Eu(e);if(typeof e=="string")return Cu(e);throw new Error("Expected function, string, or object as test")};function Su(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=di(e[n]);return Bt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Eu(e){const t=e;return Bt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Cu(e){return Bt(t);function t(n){return n&&n.type===e}}function Bt(e){return t;function t(n,r,i){return!!(Tu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function _u(){return!0}function Tu(e){return e!==null&&typeof e=="object"&&"type"in e}function Lc(e){return e}const mi=[],Iu=!0,gi=!1,Au="skip";function Ru(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=di(i),l=r?-1:1;a(e,void 0,[])();function a(u,f,s){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=mi,y,x,T;if((!t||o(u,f,s[s.length-1]||void 0))&&(p=Ou(n(u,s)),p[0]===gi))return p;if("children"in u&&u.children){const k=u;if(k.children&&p[0]!==Au)for(x=(r?k.children.length:-1)+l,T=s.concat(k);x>-1&&x<k.children.length;){const A=k.children[x];if(y=a(A,x,T)(),y[0]===gi)return y;x=typeof y[1]=="number"?y[1]:x+l}}return p}}}function Ou(e){return Array.isArray(e)?e:typeof e=="number"?[Iu,e]:e==null?mi:[e]}function yi(e,t,n,r){let i,o,l;typeof t=="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Ru(e,o,a,i);function a(u,f){const s=f[f.length-1],c=s?s.children.indexOf(u):void 0;return l(u,c,s)}}const In={}.hasOwnProperty,Pu={};function Lu(e,t){const n=t||Pu,r=new Map,i=new Map,o=new Map,l={...mu,...n.handlers},a={all:f,applyData:Du,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:n,patch:ju,wrap:Fu};return yi(e,function(s){if(s.type==="definition"||s.type==="footnoteDefinition"){const c=s.type==="definition"?r:i,h=String(s.identifier).toUpperCase();c.has(h)||c.set(h,s)}}),a;function u(s,c){const h=s.type,p=a.handlers[h];if(In.call(a.handlers,h)&&p)return p(a,s,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in s){const{children:x,...T}=s,k=zt(T);return k.children=a.all(s),k}return zt(s)}return(a.options.unknownHandler||Nu)(a,s,c)}function f(s){const c=[];if("children"in s){const h=s.children;let p=-1;for(;++p<h.length;){const y=a.one(h[p],s);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=xi(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=xi(x.value))}Array.isArray(y)?c.push(...y):c.push(y)}}}return c}}function ju(e,t){e.position&&(t.position=_l(e))}function Du(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,zt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Nu(e,t){const n=t.data||{},r="value"in t&&!(In.call(n,"hProperties")||In.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Fu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
152
+ `}]}}const di=function(e){if(e==null)return _u;if(typeof e=="function")return Bt(e);if(typeof e=="object")return Array.isArray(e)?vu(e):Eu(e);if(typeof e=="string")return Cu(e);throw new Error("Expected function, string, or object as test")};function vu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=di(e[n]);return Bt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Eu(e){const t=e;return Bt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Cu(e){return Bt(t);function t(n){return n&&n.type===e}}function Bt(e){return t;function t(n,r,i){return!!(Tu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function _u(){return!0}function Tu(e){return e!==null&&typeof e=="object"&&"type"in e}function Nc(e){return e}const mi=[],Iu=!0,gi=!1,Au="skip";function Ru(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=di(i),l=r?-1:1;a(e,void 0,[])();function a(u,f,s){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=mi,y,x,T;if((!t||o(u,f,s[s.length-1]||void 0))&&(p=Ou(n(u,s)),p[0]===gi))return p;if("children"in u&&u.children){const k=u;if(k.children&&p[0]!==Au)for(x=(r?k.children.length:-1)+l,T=s.concat(k);x>-1&&x<k.children.length;){const A=k.children[x];if(y=a(A,x,T)(),y[0]===gi)return y;x=typeof y[1]=="number"?y[1]:x+l}}return p}}}function Ou(e){return Array.isArray(e)?e:typeof e=="number"?[Iu,e]:e==null?mi:[e]}function yi(e,t,n,r){let i,o,l;typeof t=="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Ru(e,o,a,i);function a(u,f){const s=f[f.length-1],c=s?s.children.indexOf(u):void 0;return l(u,c,s)}}const _n={}.hasOwnProperty,Pu={};function Lu(e,t){const n=t||Pu,r=new Map,i=new Map,o=new Map,l={...mu,...n.handlers},a={all:f,applyData:Nu,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:n,patch:ju,wrap:Mu};return yi(e,function(s){if(s.type==="definition"||s.type==="footnoteDefinition"){const c=s.type==="definition"?r:i,h=String(s.identifier).toUpperCase();c.has(h)||c.set(h,s)}}),a;function u(s,c){const h=s.type,p=a.handlers[h];if(_n.call(a.handlers,h)&&p)return p(a,s,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in s){const{children:x,...T}=s,k=zt(T);return k.children=a.all(s),k}return zt(s)}return(a.options.unknownHandler||Du)(a,s,c)}function f(s){const c=[];if("children"in s){const h=s.children;let p=-1;for(;++p<h.length;){const y=a.one(h[p],s);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=xi(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=xi(x.value))}Array.isArray(y)?c.push(...y):c.push(y)}}}return c}}function ju(e,t){e.position&&(t.position=_l(e))}function Nu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,zt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Du(e,t){const n=t.data||{},r="value"in t&&!(_n.call(n,"hProperties")||_n.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Mu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
153
153
  `});++r<e.length;)r&&n.push({type:"text",value:`
154
154
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
155
- `}),n}function xi(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bi(e,t){const n=Lu(e,t),r=n.one(e,void 0),i=vu(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
156
- `},i),o}function Mu(e,t){return e&&"run"in e?async function(n,r){const i=bi(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bi(n,{file:r,...e||t})}}function wi(e){if(e)throw e}var Ut=Object.prototype.hasOwnProperty,ki=Object.prototype.toString,vi=Object.defineProperty,Si=Object.getOwnPropertyDescriptor,Ei=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ki.call(t)==="[object Array]"},Ci=function(t){if(!t||ki.call(t)!=="[object Object]")return!1;var n=Ut.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ut.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ut.call(t,i)},_i=function(t,n){vi&&n.name==="__proto__"?vi(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Ti=function(t,n){if(n==="__proto__")if(Ut.call(t,n)){if(Si)return Si(t,n).value}else return;return t[n]},zu=function e(){var t,n,r,i,o,l,a=arguments[0],u=1,f=arguments.length,s=!1;for(typeof a=="boolean"&&(s=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<f;++u)if(t=arguments[u],t!=null)for(n in t)r=Ti(a,n),i=Ti(t,n),a!==i&&(s&&i&&(Ci(i)||(o=Ei(i)))?(o?(o=!1,l=r&&Ei(r)?r:[]):l=r&&Ci(r)?r:{},_i(a,{name:n,newValue:e(s,l,i)})):typeof i<"u"&&_i(a,{name:n,newValue:i}));return a};const An=Wt(zu);function Rn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Bu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...f){const s=e[++o];let c=-1;if(u){l(u);return}for(;++c<i.length;)(f[c]===null||f[c]===void 0)&&(f[c]=i[c]);i=f,s?Uu(s,a)(...f):l(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Uu(e,t){let n;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(f){const s=f;if(a&&n)throw s;return i(s)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const We={basename:Hu,dirname:Vu,extname:Wu,join:Yu,sep:"/"};function Hu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ct(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Vu(e){if(Ct(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Wu(e){Ct(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Yu(...e){let t=-1,n;for(;++t<e.length;)Ct(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ku(n)}function Ku(e){Ct(e);const t=e.codePointAt(0)===47;let n=qu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function qu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Ct(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Gu={cwd:Xu};function Xu(){return"/"}function On(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Qu(e){if(typeof e=="string")e=new URL(e);else if(!On(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ju(e)}function Ju(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pn=["history","path","basename","stem","extname","dirname"];class Ii{constructor(t){let n;t?On(t)?n={path:t}:typeof t=="string"||Zu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Gu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pn.length;){const o=Pn[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Pn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?We.basename(this.path):void 0}set basename(t){jn(t,"basename"),Ln(t,"basename"),this.path=We.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?We.dirname(this.path):void 0}set dirname(t){Ai(this.basename,"dirname"),this.path=We.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?We.extname(this.path):void 0}set extname(t){if(Ln(t,"extname"),Ai(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=We.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){On(t)&&(t=Qu(t)),jn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?We.basename(this.path,this.extname):void 0}set stem(t){jn(t,"stem"),Ln(t,"stem"),this.path=We.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ke(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ln(e,t){if(e&&e.includes(We.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+We.sep+"`")}function jn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ai(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Zu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $u=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},ec={}.hasOwnProperty;class Dn extends $u{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=Bu()}copy(){const t=new Dn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(An(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Mn("data",this.frozen),this.namespace[t]=n,this):ec.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Mn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ht(t),r=this.parser||this.Parser;return Nn("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Nn("process",this.parser||this.Parser),Fn("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=Ht(t),u=r.parse(a);r.run(u,a,function(s,c,h){if(s||!c||!h)return f(s);const p=c,y=r.stringify(p,h);rc(y)?h.value=y:h.result=y,f(s,h)});function f(s,c){s||!c?l(s):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Nn("processSync",this.parser||this.Parser),Fn("processSync",this.compiler||this.Compiler),this.process(t,i),Oi("processSync","process",n),r;function i(o,l){n=!0,wi(o),r=l}}run(t,n,r){Ri(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=Ht(n);i.run(t,u,f);function f(s,c,h){const p=c||t;s?a(s):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Oi("runSync","run",r),i;function o(l,a){wi(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=Ht(n),i=this.compiler||this.Compiler;return Fn("stringify",i),Ri(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Mn("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")u(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[s,...c]=f;u(s,c)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))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");a(f.plugins),f.settings&&(i.settings=An(!0,i.settings,f.settings))}function a(f){let s=-1;if(f!=null)if(Array.isArray(f))for(;++s<f.length;){const c=f[s];o(c)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function u(f,s){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===f){h=c;break}if(h===-1)r.push([f,...s]);else if(s.length>0){let[p,...y]=s;const x=r[h][1];Rn(x)&&Rn(p)&&(p=An(!0,x,p)),r[h]=[f,p,...y]}}}}const tc=new Dn().freeze();function Nn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Fn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Mn(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 Ri(e){if(!Rn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Oi(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ht(e){return nc(e)?e:new Ii(e)}function nc(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function rc(e){return typeof e=="string"||ic(e)}function ic(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Pi=[],Li={allowDangerousHtml:!0},lc=/^(https?|ircs?|mailto|xmpp)$/i,ac=[{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:"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 ji(e){const t=sc(e),n=uc(e);return cc(t.runSync(t.parse(n),n),e)}function sc(e){const t=e.rehypePlugins||Pi,n=e.remarkPlugins||Pi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Li}:Li;return tc().use(Vs).use(n).use(Mu,r).use(t)}function uc(e){const t=e.children||"",n=new Ii;return typeof t=="string"&&(n.value=t),n}function cc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||fc;for(const s of ac)Object.hasOwn(t,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+oc+s.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),yi(e,f),Ol(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function f(s,c,h){if(s.type==="raw"&&h&&typeof c=="number")return l?h.children.splice(c,1):h.children[c]={type:"text",value:s.value},c;if(s.type==="element"){let p;for(p in mn)if(Object.hasOwn(mn,p)&&Object.hasOwn(s.properties,p)){const y=s.properties[p],x=mn[p];(x===null||x.includes(s.tagName))&&(s.properties[p]=u(String(y||""),p,s))}}if(s.type==="element"){let p=n?!n.includes(s.tagName):o?o.includes(s.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(s,c,h)),p&&h&&typeof c=="number")return a&&s.children?h.children.splice(c,1,...s.children):h.children.splice(c,1),c}}}function fc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||lc.test(e.slice(0,t))?e:""}function Di(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Di(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Di(e))&&(r&&(r+=" "),r+=t);return r}const Ni={primary:"#EC994B",secondary:"#1E3A8A",background:"#FFFFFF",text:{primary:"#1F2937",inverse:"#FFFFFF"},input:{background:"#F9FAFB",border:"#E5E7EB"},message:{user:"#1E3A8A",userText:"#FFFFFF",assistant:"#FFFFFF"},suggestedQuestions:{background:"#F3F4F6",text:"#1F2937",hoverBackground:"#E5E7EB"},iconColor:"#EC994B"},Je=()=>({header:{title:"AI Assistant"},theme:Ni,welcome:{title:"Hello! How can I help you today?",description:"I'm your AI assistant, ready to help with any questions you might have."},suggestedQuestions:[{text:"What can you help me with?",query:"What can you help me with?"},{text:"Tell me about your features",query:"Tell me about your features"},{text:"How do I get started?",query:"How do I get started?"}],icon:"sparkles"}),_t=(e,t,n)=>{if(!e||typeof e!="string")throw new Error("API URL must be a valid string");if(!t||typeof t!="string")throw new Error("API key must be a valid string");if(!n||typeof n!="string")throw new Error("Session ID must be a valid string")},Fi=e=>E.jsx("a",{...e,target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-700 underline",children:e.children}),zn=({iconName:e,size:t,className:n,style:r})=>{switch(e){case"heart":return E.jsx(lo,{size:t,className:n,style:r});case"message-circle":return E.jsx(Gn,{size:t,className:n,style:r});case"help-circle":return E.jsx(ao,{size:t,className:n,style:r});case"info":return E.jsx(so,{size:t,className:n,style:r});case"bot":return E.jsx(to,{size:t,className:n,style:r});case"sparkles":return E.jsx(fo,{size:t,className:n,style:r});case"message-square":default:return E.jsx(uo,{size:t,className:n,style:r})}},Vt=e=>{const[t,n]=j.useState(!1),[r,i]=j.useState(""),[o,l]=j.useState(!1),[a,u]=j.useState(!1),f=j.useRef(null),s=j.useRef(null),c=250,h=j.useRef(null),[p,y]=j.useState(!1),[x,T]=j.useState(!1),[k,A]=j.useState(!1),[v,z]=j.useState(!1),U=j.useRef(new Set),w=j.useRef(!0),L=j.useRef(),Y=j.useRef(null),F=j.useRef(!1),[K,O]=j.useState(!1),[P,$]=j.useState(null),[G,H]=j.useState(window.innerWidth);j.useEffect(()=>{const R=()=>H(window.innerWidth);return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);const le=Je(),[te,ge]=j.useState({...le,...e}),B=te.theme||Ni;j.useEffect(()=>{e.apiUrl&&e.apiKey&&e.sessionId&&_t(e.apiUrl,e.apiKey,e.sessionId)},[e.apiUrl,e.apiKey,e.sessionId]),j.useEffect(()=>{const R=X=>{ge(X.detail)};return window.addEventListener("chatbot-config-update",R),()=>{window.removeEventListener("chatbot-config-update",R)}},[]),j.useEffect(()=>{e&&ge(R=>({...R,...e}))},[e]);const{messages:d,isLoading:ae,sendMessage:Se,clearMessages:g}=en();j.useEffect(()=>{d.length===0&&U.current.clear()},[d.length]);const ye=()=>{n(!t),t||(l(!1),setTimeout(()=>de(!0),100))},Me=()=>{r.trim()&&!ae&&(w.current=!0,Se(r),i(""),setTimeout(()=>de(!0),100))},se=R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),Me())},Be=async(R,X)=>{try{await navigator.clipboard.writeText(R),$(X),setTimeout(()=>{$(null)},2e3)}catch(ue){console.error("Failed to copy text: ",ue)}},Ee=R=>{const X=/(https?:\/\/[^\s]+?)([.,;:!?)]*)(?=\s|$)/g;return R.replace(X,(ve,Oe,Ce)=>`[${Oe}](${Oe})${Ce}`).replace(/\n{3,}/g,`
157
-
158
- `)},De=R=>R.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),de=(R=!1)=>{if(h.current){const{scrollHeight:X}=h.current;h.current.scrollTo({top:X,behavior:R?"auto":"smooth"}),setTimeout(()=>{Ne()},R?0:300)}},Ne=()=>{if(h.current&&!K){const{scrollTop:R,scrollHeight:X,clientHeight:ue}=h.current,ve=Math.abs(X-R-ue)<10,Oe=R<10;y(!Oe&&R>200),T(!ve)}},It=()=>{h.current&&(z(!0),h.current.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{z(!1),Ne()},300))},ht=R=>{const X=R.target.value;X.length<=c&&i(X)},At=R=>{U.current.add(R),R===d.length-1&&(O(!1),setTimeout(()=>de(),50))},it=R=>U.current.has(R);j.useEffect(()=>{(ae||d.length===0)&&de(!0)},[d,ae]),j.useEffect(()=>{t&&s.current&&s.current.focus()},[t]),j.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const qe=({content:R,onComplete:X,messageIndex:ue,inputRef:ve})=>{const[Oe,Ce]=j.useState(""),[ot,Ge]=j.useState(!0),Ze=j.useRef(0),b=j.useRef(!1),_=j.useRef(),D=j.useRef(!1),V=j.useRef(R);j.useEffect(()=>{if(it(ue)){Ce(R),Ge(!1),X();return}if(!D.current)return D.current=!0,V.current=R,J(),()=>{_.current&&cancelAnimationFrame(_.current)}},[ue]);const J=()=>{if(b.current)return;b.current=!0,F.current=!0,O(!0);let ne=Ze.current,he=0;Ge(ne===0);const Ye=Ke=>{if(ne<V.current.length){const be=V.current.slice(0,ne+1);Ce(be),ne===0&&Ge(!1),Ke-he>100&&(de(),he=Ke),ne++,Ze.current=ne,_.current=requestAnimationFrame(Ye)}else xe()};_.current=requestAnimationFrame(Ye)},xe=()=>{F.current=!1,X(),b.current=!1,O(!1),de()};return j.useEffect(()=>{const ne=()=>{b.current&&(_.current&&cancelAnimationFrame(_.current),Ce(V.current),Ge(!1),xe())},he=ve.current;return he&&he.addEventListener("input",ne),()=>{he&&he.removeEventListener("input",ne)}},[ve,X]),j.useEffect(()=>{const ne=()=>{document.hidden?_.current&&(cancelAnimationFrame(_.current),b.current=!1):D.current&&!b.current&&Ze.current>0&&Ze.current<V.current.length&&J()};return document.addEventListener("visibilitychange",ne),()=>{document.removeEventListener("visibilitychange",ne)}},[]),E.jsxs(E.Fragment,{children:[Oe&&E.jsx("div",{className:"prose prose-base max-w-full whitespace-pre-wrap",style:{overflowWrap:"anywhere",wordBreak:"break-word",width:"100%",maxWidth:"100%",fontSize:"16px"},children:E.jsx(ji,{components:{a:ne=>E.jsx(Fi,{...ne}),p:ne=>E.jsx("p",{style:{overflowWrap:"anywhere",wordBreak:"break-word"},...ne}),code:ne=>E.jsx("code",{style:{display:"block",whiteSpace:"pre-wrap",overflowX:"auto",overflowWrap:"anywhere"},...ne})},children:Ee(Oe)})}),ot&&E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]})]})};return E.jsxs("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col items-end font-sans",style:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[t&&E.jsxs("div",{className:"mb-4 w-full sm:w-[500px] md:w-[650px] lg:w-[700px] rounded-xl shadow-xl flex flex-col overflow-hidden border border-gray-200 transition-all duration-300 ease-in-out",style:{background:B.background,height:"650px",maxHeight:"calc(100vh - 100px)",width:G<640?"100%":G<768?"500px":G<1024?"650px":"700px",minWidth:G<640?"100%":"500px"},children:[E.jsxs("div",{className:"p-4 flex justify-between items-center shrink-0",style:{background:B.primary,color:B.text.inverse},children:[E.jsxs("div",{className:"flex items-center",children:[E.jsx(zn,{iconName:te.icon,size:32,className:"mr-3",style:{color:B.secondary}}),E.jsx("h3",{className:"text-xl font-medium",children:te.header.title})]}),E.jsxs("div",{className:"flex items-center space-x-3",children:[E.jsx("button",{onClick:()=>{g(),U.current.clear()},className:"transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:B.text.inverse},"aria-label":"Clear conversation",title:"Clear conversation",children:E.jsx(po,{size:20})}),E.jsx("button",{onClick:ye,className:"transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:B.text.inverse},"aria-label":"Minimize chat",children:E.jsx(Xn,{size:20})})]})]}),E.jsxs("div",{ref:h,className:"flex-1 p-4 overflow-y-auto scroll-smooth relative messages-container",style:{background:B.input.background,overflowY:"auto"},onScroll:Ne,children:[p&&E.jsx("button",{onClick:It,className:"sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:B.primary,color:B.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:E.jsx(io,{size:20})}),x&&!K&&E.jsx("button",{onClick:()=>de(),className:"sticky bottom-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:B.primary,color:B.text.inverse},"aria-label":"Scroll to bottom",title:"Scroll to bottom",children:E.jsx(ro,{size:20})}),d.length===0?E.jsxs("div",{className:"text-center py-16",children:[E.jsx(zn,{iconName:te.icon,size:56,className:"mx-auto mb-4",style:{color:B.iconColor}}),E.jsx("h4",{className:"font-medium text-xl text-[#2C3E50] mb-2",children:te.welcome.title}),E.jsx("p",{className:"text-lg text-gray-600 mb-6",children:te.welcome.description}),E.jsx("div",{className:"w-full px-4",children:te.suggestedQuestions.map((R,X)=>E.jsxs("button",{onClick:()=>{Se(R.query),setTimeout(()=>{s.current&&s.current.focus()},100)},className:"w-full text-left text-base p-3 rounded-lg transition-colors mb-3 flex items-center",style:{backgroundColor:B.suggestedQuestions.background,color:B.suggestedQuestions.text},onMouseEnter:ue=>{ue.currentTarget.style.backgroundColor=B.suggestedQuestions.hoverBackground},onMouseLeave:ue=>{ue.currentTarget.style.backgroundColor=B.suggestedQuestions.background},children:[E.jsx(Gn,{size:20,className:"mr-2 flex-shrink-0"}),E.jsx("span",{children:R.text})]},X))})]}):E.jsxs("div",{className:"space-y-5",children:[d.map((R,X)=>{const ue=new Date;ue.setMinutes(ue.getMinutes()-(d.length-X));const ve=R.role==="assistant"&&X===d.length-1,Oe=ve&&ae;return E.jsx("div",{className:pt("flex",R.role==="user"?"justify-end":"justify-start"),ref:X===d.length-1?Y:null,children:E.jsxs("div",{className:pt("max-w-[85%] rounded-xl p-4 shadow-sm",R.role==="user"?"rounded-tr-none":"rounded-tl-none"),style:{background:R.role==="user"?B.message.user:B.message.assistant,color:R.role==="user"?B.message.userText:B.text.primary,border:R.role==="assistant"?`1px solid ${B.input.border}`:"none",width:"100%",maxWidth:"85%",wordWrap:"break-word",overflowWrap:"anywhere"},children:[R.role==="assistant"?Oe?E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]}):!it(X)&&ve?E.jsx(qe,{content:R.content,onComplete:()=>At(X),messageIndex:X,inputRef:s}):E.jsx("div",{className:"prose prose-base max-w-full whitespace-pre-wrap",style:{overflowWrap:"anywhere",wordBreak:"break-word",width:"100%",maxWidth:"100%",fontSize:"16px"},children:E.jsx(ji,{components:{a:Ce=>E.jsx(Fi,{...Ce}),p:Ce=>E.jsx("p",{style:{overflowWrap:"anywhere",wordBreak:"break-word"},...Ce}),code:Ce=>E.jsx("code",{style:{display:"block",whiteSpace:"pre-wrap",overflowX:"auto",overflowWrap:"anywhere"},...Ce})},children:Ee(R.content)})}):E.jsx("p",{className:"text-base",style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap",width:"100%"},children:R.content}),E.jsxs("div",{className:pt("flex text-xs mt-2",R.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[E.jsx("span",{children:De(ue)}),R.role==="assistant"&&!Oe&&E.jsxs("div",{className:"relative",children:[E.jsx("button",{onClick:()=>Be(R.content,X),className:"text-gray-400 hover:text-gray-600 transition-colors ml-2 p-1 rounded-full hover:bg-gray-100","aria-label":"Copy to clipboard",children:P===X?E.jsx(no,{size:16}):E.jsx(oo,{size:16})}),P===X&&E.jsx("div",{className:"absolute bottom-full right-0 mb-1 px-2 py-1 text-xs rounded-md shadow-sm animate-fade-in-out whitespace-nowrap",style:{backgroundColor:B.secondary,color:B.text.inverse},children:"Copied!"})]})]})]})},X)}),ae&&d.length===0&&E.jsx("div",{className:"flex justify-start",children:E.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-4 shadow-sm",children:E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]})})}),E.jsx("div",{ref:f})]})]}),E.jsx("div",{className:"p-4 border-t shrink-0",style:{borderColor:B.input.border,background:B.background,boxShadow:"0 -2px 10px rgba(0,0,0,0.05)"},children:E.jsxs("div",{className:"flex items-end gap-3",children:[E.jsxs("div",{className:pt("flex-1 relative rounded-xl transition-all duration-200 overflow-hidden",k?"ring-2":"ring-0"),style:{borderColor:B.input.border,border:"1px solid",boxShadow:k?"0 0 0 2px rgba(236, 153, 75, 0.2)":"none","--tw-ring-color":B.secondary,background:B.input.background},children:[E.jsx("textarea",{ref:s,value:r,onChange:ht,onKeyDown:se,onFocus:()=>A(!0),onBlur:()=>A(!1),placeholder:"Type your message...",maxLength:c,className:"w-full resize-none outline-none p-3 pr-12 text-base custom-scrollbar",style:{background:"transparent",color:B.text.primary,height:"48px",minHeight:"48px",maxHeight:"96px",overflow:"auto",lineHeight:"1.5",boxSizing:"border-box"}}),r.length>0&&E.jsxs("div",{className:"absolute bottom-2 right-3 text-xs px-2 py-1 rounded-full",style:{color:r.length>=c*.9?"#ef4444":"#6b7280",backgroundColor:r.length>=c*.9?"rgba(239, 68, 68, 0.1)":"rgba(107, 114, 128, 0.1)",fontSize:"0.7rem"},children:[r.length,"/",c]})]}),E.jsx("button",{onClick:Me,disabled:!r.trim()||ae,className:pt("rounded-full transition-all duration-200 flex items-center justify-center shrink-0",r.trim()&&!ae?"hover:shadow-md transform hover:-translate-y-0.5":"bg-gray-200 text-gray-400 cursor-not-allowed"),style:{backgroundColor:r.trim()&&!ae?B.secondary:void 0,color:r.trim()&&!ae?"white":void 0,width:"48px",height:"48px",padding:"12px"},"aria-label":"Send message",children:E.jsx(co,{size:24})})]})})]}),E.jsxs("div",{className:"relative",children:[o&&!t&&E.jsx("span",{className:"absolute -top-1 -right-1 h-4 w-4 bg-orange-500 rounded-full animate-pulse z-10"}),E.jsx("button",{onClick:ye,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:pt("rounded-full shadow-lg flex items-center justify-center transition-all duration-300",a&&!t&&"animate-pulse",!t&&"animate-bounce-gentle"),style:{backgroundColor:B.primary,color:B.text.inverse,width:"80px",height:"80px"},"aria-label":t?"Close chat":"Open chat",children:t?E.jsx(Xn,{size:40,className:"text-white",style:{opacity:.9}}):E.jsx(zn,{iconName:"message-square",size:40,className:"text-white"})})]}),E.jsx("style",{children:`
155
+ `}),n}function xi(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bi(e,t){const n=Lu(e,t),r=n.one(e,void 0),i=Su(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
156
+ `},i),o}function Fu(e,t){return e&&"run"in e?async function(n,r){const i=bi(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bi(n,{file:r,...e||t})}}function wi(e){if(e)throw e}var Ut=Object.prototype.hasOwnProperty,ki=Object.prototype.toString,Si=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,Ei=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ki.call(t)==="[object Array]"},Ci=function(t){if(!t||ki.call(t)!=="[object Object]")return!1;var n=Ut.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ut.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ut.call(t,i)},_i=function(t,n){Si&&n.name==="__proto__"?Si(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Ti=function(t,n){if(n==="__proto__")if(Ut.call(t,n)){if(vi)return vi(t,n).value}else return;return t[n]},zu=function e(){var t,n,r,i,o,l,a=arguments[0],u=1,f=arguments.length,s=!1;for(typeof a=="boolean"&&(s=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<f;++u)if(t=arguments[u],t!=null)for(n in t)r=Ti(a,n),i=Ti(t,n),a!==i&&(s&&i&&(Ci(i)||(o=Ei(i)))?(o?(o=!1,l=r&&Ei(r)?r:[]):l=r&&Ci(r)?r:{},_i(a,{name:n,newValue:e(s,l,i)})):typeof i<"u"&&_i(a,{name:n,newValue:i}));return a};const Tn=Wt(zu);function In(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Bu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...f){const s=e[++o];let c=-1;if(u){l(u);return}for(;++c<i.length;)(f[c]===null||f[c]===void 0)&&(f[c]=i[c]);i=f,s?Uu(s,a)(...f):l(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Uu(e,t){let n;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(f){const s=f;if(a&&n)throw s;return i(s)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const We={basename:Hu,dirname:Vu,extname:Wu,join:Yu,sep:"/"};function Hu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_t(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Vu(e){if(_t(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Wu(e){_t(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Yu(...e){let t=-1,n;for(;++t<e.length;)_t(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ku(n)}function Ku(e){_t(e);const t=e.codePointAt(0)===47;let n=qu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function qu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function _t(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Gu={cwd:Xu};function Xu(){return"/"}function An(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Qu(e){if(typeof e=="string")e=new URL(e);else if(!An(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ju(e)}function Ju(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Rn=["history","path","basename","stem","extname","dirname"];class Ii{constructor(t){let n;t?An(t)?n={path:t}:typeof t=="string"||Zu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Gu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Rn.length;){const o=Rn[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Rn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?We.basename(this.path):void 0}set basename(t){Pn(t,"basename"),On(t,"basename"),this.path=We.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?We.dirname(this.path):void 0}set dirname(t){Ai(this.basename,"dirname"),this.path=We.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?We.extname(this.path):void 0}set extname(t){if(On(t,"extname"),Ai(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=We.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){An(t)&&(t=Qu(t)),Pn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?We.basename(this.path,this.extname):void 0}set stem(t){Pn(t,"stem"),On(t,"stem"),this.path=We.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ke(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function On(e,t){if(e&&e.includes(We.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+We.sep+"`")}function Pn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ai(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Zu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $u=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},ec={}.hasOwnProperty;class Ln extends $u{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=Bu()}copy(){const t=new Ln;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Tn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Dn("data",this.frozen),this.namespace[t]=n,this):ec.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Dn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ht(t),r=this.parser||this.Parser;return jn("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),jn("process",this.parser||this.Parser),Nn("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=Ht(t),u=r.parse(a);r.run(u,a,function(s,c,h){if(s||!c||!h)return f(s);const p=c,y=r.stringify(p,h);rc(y)?h.value=y:h.result=y,f(s,h)});function f(s,c){s||!c?l(s):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),jn("processSync",this.parser||this.Parser),Nn("processSync",this.compiler||this.Compiler),this.process(t,i),Oi("processSync","process",n),r;function i(o,l){n=!0,wi(o),r=l}}run(t,n,r){Ri(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=Ht(n);i.run(t,u,f);function f(s,c,h){const p=c||t;s?a(s):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Oi("runSync","run",r),i;function o(l,a){wi(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=Ht(n),i=this.compiler||this.Compiler;return Nn("stringify",i),Ri(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Dn("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")u(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[s,...c]=f;u(s,c)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))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");a(f.plugins),f.settings&&(i.settings=Tn(!0,i.settings,f.settings))}function a(f){let s=-1;if(f!=null)if(Array.isArray(f))for(;++s<f.length;){const c=f[s];o(c)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function u(f,s){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===f){h=c;break}if(h===-1)r.push([f,...s]);else if(s.length>0){let[p,...y]=s;const x=r[h][1];In(x)&&In(p)&&(p=Tn(!0,x,p)),r[h]=[f,p,...y]}}}}const tc=new Ln().freeze();function jn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Dn(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 Ri(e){if(!In(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Oi(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ht(e){return nc(e)?e:new Ii(e)}function nc(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function rc(e){return typeof e=="string"||ic(e)}function ic(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Pi=[],Li={allowDangerousHtml:!0},lc=/^(https?|ircs?|mailto|xmpp)$/i,ac=[{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:"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 ji(e){const t=sc(e),n=uc(e);return cc(t.runSync(t.parse(n),n),e)}function sc(e){const t=e.rehypePlugins||Pi,n=e.remarkPlugins||Pi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Li}:Li;return tc().use(Vs).use(n).use(Fu,r).use(t)}function uc(e){const t=e.children||"",n=new Ii;return typeof t=="string"&&(n.value=t),n}function cc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||fc;for(const s of ac)Object.hasOwn(t,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+oc+s.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),yi(e,f),Ol(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function f(s,c,h){if(s.type==="raw"&&h&&typeof c=="number")return l?h.children.splice(c,1):h.children[c]={type:"text",value:s.value},c;if(s.type==="element"){let p;for(p in hn)if(Object.hasOwn(hn,p)&&Object.hasOwn(s.properties,p)){const y=s.properties[p],x=hn[p];(x===null||x.includes(s.tagName))&&(s.properties[p]=u(String(y||""),p,s))}}if(s.type==="element"){let p=n?!n.includes(s.tagName):o?o.includes(s.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(s,c,h)),p&&h&&typeof c=="number")return a&&s.children?h.children.splice(c,1,...s.children):h.children.splice(c,1),c}}}function fc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||lc.test(e.slice(0,t))?e:""}function Ni(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ni(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ni(e))&&(r&&(r+=" "),r+=t);return r}const Di={primary:"#EC994B",secondary:"#1E3A8A",background:"#FFFFFF",text:{primary:"#1F2937",inverse:"#FFFFFF"},input:{background:"#F9FAFB",border:"#E5E7EB"},message:{user:"#1E3A8A",userText:"#FFFFFF",assistant:"#FFFFFF"},suggestedQuestions:{background:"#F3F4F6",text:"#1F2937",hoverBackground:"#E5E7EB"},iconColor:"#EC994B"},Je=()=>({header:{title:"AI Assistant"},theme:Di,welcome:{title:"Hello! How can I help you today?",description:"I'm your AI assistant, ready to help with any questions you might have."},suggestedQuestions:[{text:"What can you help me with?",query:"What can you help me with?"},{text:"Tell me about your features",query:"Tell me about your features"},{text:"How do I get started?",query:"How do I get started?"}],icon:"sparkles"}),Tt=(e,t=null,n=null)=>{if(!e||typeof e!="string")throw new Error("API URL must be a valid string");if(t!==null&&typeof t!="string")throw new Error("API key must be a valid string or null");if(n!==null&&typeof n!="string")throw new Error("Session ID must be a valid string or null")},Mi=e=>E.jsx("a",{...e,target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-700 underline",children:e.children}),Mn=({iconName:e,size:t,className:n,style:r})=>{switch(e){case"heart":return E.jsx(lo,{size:t,className:n,style:r});case"message-circle":return E.jsx(Kn,{size:t,className:n,style:r});case"help-circle":return E.jsx(ao,{size:t,className:n,style:r});case"info":return E.jsx(so,{size:t,className:n,style:r});case"bot":return E.jsx(to,{size:t,className:n,style:r});case"sparkles":return E.jsx(fo,{size:t,className:n,style:r});case"message-square":default:return E.jsx(uo,{size:t,className:n,style:r})}},Vt=e=>{const[t,n]=j.useState(!1),[r,i]=j.useState(""),[o,l]=j.useState(!1),[a,u]=j.useState(!1),f=j.useRef(null),s=j.useRef(null),c=250,h=j.useRef(null),[p,y]=j.useState(!1),[x,T]=j.useState(!1),[k,A]=j.useState(!1),[S,z]=j.useState(!1),U=j.useRef(new Set),w=j.useRef(!0),L=j.useRef(),Y=j.useRef(null),M=j.useRef(!1),[K,O]=j.useState(!1),[P,$]=j.useState(null),[G,H]=j.useState(window.innerWidth);j.useEffect(()=>{const R=()=>H(window.innerWidth);return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);const le=Je(),[te,ge]=j.useState({...le,...e}),B=te.theme||Di;j.useEffect(()=>{e.apiUrl&&e.apiKey&&e.sessionId&&Tt(e.apiUrl,e.apiKey,e.sessionId)},[e.apiUrl,e.apiKey,e.sessionId]),j.useEffect(()=>{const R=X=>{ge(X.detail)};return window.addEventListener("chatbot-config-update",R),()=>{window.removeEventListener("chatbot-config-update",R)}},[]),j.useEffect(()=>{e&&ge(R=>({...R,...e}))},[e]);const{messages:d,isLoading:ae,sendMessage:ve,clearMessages:g}=Zt();j.useEffect(()=>{d.length===0&&U.current.clear()},[d.length]);const ye=()=>{n(!t),t||(l(!1),setTimeout(()=>de(!0),100))},Fe=()=>{r.trim()&&!ae&&(w.current=!0,ve(r),i(""),setTimeout(()=>de(!0),100))},se=R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),Fe())},Be=async(R,X)=>{try{await navigator.clipboard.writeText(R),$(X),setTimeout(()=>{$(null)},2e3)}catch(ue){console.error("Failed to copy text: ",ue)}},Ee=R=>{const X=/(https?:\/\/[^\s]+?)([.,;:!?)]*)(?=\s|$)/g;return R.replace(X,(Se,Oe,Ce)=>`[${Oe}](${Oe})${Ce}`)},Ne=R=>R.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),de=(R=!1)=>{if(h.current){const{scrollHeight:X}=h.current;h.current.scrollTo({top:X,behavior:R?"auto":"smooth"}),setTimeout(()=>{De()},R?0:300)}},De=()=>{if(h.current&&!K){const{scrollTop:R,scrollHeight:X,clientHeight:ue}=h.current,Se=Math.abs(X-R-ue)<10,Oe=R<10;y(!Oe&&R>200),T(!Se)}},It=()=>{h.current&&(z(!0),h.current.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{z(!1),De()},300))},dt=R=>{const X=R.target.value;X.length<=c&&i(X)},At=R=>{U.current.add(R),R===d.length-1&&(O(!1),setTimeout(()=>de(),50))},it=R=>U.current.has(R);j.useEffect(()=>{(ae||d.length===0)&&de(!0)},[d,ae]),j.useEffect(()=>{t&&s.current&&s.current.focus()},[t]),j.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const qe=({content:R,onComplete:X,messageIndex:ue,inputRef:Se})=>{const[Oe,Ce]=j.useState(""),[ot,Ge]=j.useState(!0),Ze=j.useRef(0),b=j.useRef(!1),_=j.useRef(),N=j.useRef(!1),V=j.useRef(R);j.useEffect(()=>{if(it(ue)){Ce(R),Ge(!1),X();return}if(!N.current)return N.current=!0,V.current=R,J(),()=>{_.current&&cancelAnimationFrame(_.current)}},[ue]);const J=()=>{if(b.current)return;b.current=!0,M.current=!0,O(!0);let ne=Ze.current,he=0;Ge(ne===0);const Ye=Ke=>{if(ne<V.current.length){const be=V.current.slice(0,ne+1);Ce(be),ne===0&&Ge(!1),Ke-he>100&&(de(),he=Ke),ne++,Ze.current=ne,_.current=requestAnimationFrame(Ye)}else xe()};_.current=requestAnimationFrame(Ye)},xe=()=>{M.current=!1,X(),b.current=!1,O(!1),de()};return j.useEffect(()=>{const ne=()=>{b.current&&(_.current&&cancelAnimationFrame(_.current),Ce(V.current),Ge(!1),xe())},he=Se.current;return he&&he.addEventListener("input",ne),()=>{he&&he.removeEventListener("input",ne)}},[Se,X]),j.useEffect(()=>{const ne=()=>{document.hidden?_.current&&(cancelAnimationFrame(_.current),b.current=!1):N.current&&!b.current&&Ze.current>0&&Ze.current<V.current.length&&J()};return document.addEventListener("visibilitychange",ne),()=>{document.removeEventListener("visibilitychange",ne)}},[]),E.jsxs(E.Fragment,{children:[Oe&&E.jsx("div",{className:"prose prose-base max-w-full whitespace-pre-wrap",style:{overflowWrap:"anywhere",wordBreak:"break-word",width:"100%",maxWidth:"100%",fontSize:"16px"},children:E.jsx(ji,{components:{a:ne=>E.jsx(Mi,{...ne}),p:ne=>E.jsx("p",{style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-line",margin:"0 0 0.5em 0"},...ne}),code:ne=>E.jsx("code",{style:{display:"block",whiteSpace:"pre-wrap",overflowX:"auto",overflowWrap:"anywhere"},...ne})},children:Ee(Oe)})}),ot&&E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]})]})};return E.jsxs("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col items-end font-sans",style:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[t&&E.jsxs("div",{className:"mb-4 w-full sm:w-[500px] md:w-[650px] lg:w-[700px] rounded-xl shadow-xl flex flex-col overflow-hidden border border-gray-200 transition-all duration-300 ease-in-out",style:{background:B.background,height:"650px",maxHeight:"calc(100vh - 100px)",width:G<640?"100%":G<768?"500px":G<1024?"650px":"700px",minWidth:G<640?"100%":"500px"},children:[E.jsxs("div",{className:"p-4 flex justify-between items-center shrink-0",style:{background:B.primary,color:B.text.inverse},children:[E.jsxs("div",{className:"flex items-center",children:[E.jsx(Mn,{iconName:te.icon,size:32,className:"mr-3",style:{color:B.secondary}}),E.jsx("h3",{className:"text-xl font-medium",children:te.header.title})]}),E.jsxs("div",{className:"flex items-center space-x-3",children:[E.jsx("button",{onClick:()=>{g(),U.current.clear()},className:"transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:B.text.inverse},"aria-label":"Clear conversation",title:"Clear conversation",children:E.jsx(po,{size:20})}),E.jsx("button",{onClick:ye,className:"transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:B.text.inverse},"aria-label":"Minimize chat",children:E.jsx(qn,{size:20})})]})]}),E.jsxs("div",{ref:h,className:"flex-1 p-4 overflow-y-auto scroll-smooth relative messages-container",style:{background:B.input.background,overflowY:"auto"},onScroll:De,children:[p&&E.jsx("button",{onClick:It,className:"sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:B.primary,color:B.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:E.jsx(io,{size:20})}),x&&!K&&E.jsx("button",{onClick:()=>de(),className:"sticky bottom-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:B.primary,color:B.text.inverse},"aria-label":"Scroll to bottom",title:"Scroll to bottom",children:E.jsx(ro,{size:20})}),d.length===0?E.jsxs("div",{className:"text-center py-16",children:[E.jsx(Mn,{iconName:te.icon,size:56,className:"mx-auto mb-4",style:{color:B.iconColor}}),E.jsx("h4",{className:"font-medium text-xl text-[#2C3E50] mb-2",children:te.welcome.title}),E.jsx("p",{className:"text-lg text-gray-600 mb-6",children:te.welcome.description}),E.jsx("div",{className:"w-full px-4",children:te.suggestedQuestions.map((R,X)=>E.jsxs("button",{onClick:()=>{ve(R.query),setTimeout(()=>{s.current&&s.current.focus()},100)},className:"w-full text-left text-base p-3 rounded-lg transition-colors mb-3 flex items-center",style:{backgroundColor:B.suggestedQuestions.background,color:B.suggestedQuestions.text},onMouseEnter:ue=>{ue.currentTarget.style.backgroundColor=B.suggestedQuestions.hoverBackground},onMouseLeave:ue=>{ue.currentTarget.style.backgroundColor=B.suggestedQuestions.background},children:[E.jsx(Kn,{size:20,className:"mr-2 flex-shrink-0"}),E.jsx("span",{children:R.text})]},X))})]}):E.jsxs("div",{className:"space-y-5",children:[d.map((R,X)=>{const ue=new Date;ue.setMinutes(ue.getMinutes()-(d.length-X));const Se=R.role==="assistant"&&X===d.length-1,Oe=Se&&ae;return E.jsx("div",{className:pt("flex",R.role==="user"?"justify-end":"justify-start"),ref:X===d.length-1?Y:null,children:E.jsxs("div",{className:pt("max-w-[85%] rounded-xl p-4 shadow-sm",R.role==="user"?"rounded-tr-none":"rounded-tl-none"),style:{background:R.role==="user"?B.message.user:B.message.assistant,color:R.role==="user"?B.message.userText:B.text.primary,border:R.role==="assistant"?`1px solid ${B.input.border}`:"none",width:"100%",maxWidth:"85%",wordWrap:"break-word",overflowWrap:"anywhere"},children:[R.role==="assistant"?Oe?E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]}):!it(X)&&Se?E.jsx(qe,{content:R.content,onComplete:()=>At(X),messageIndex:X,inputRef:s}):E.jsx("div",{className:"prose prose-base max-w-full whitespace-pre-wrap",style:{overflowWrap:"anywhere",wordBreak:"break-word",width:"100%",maxWidth:"100%",fontSize:"16px"},children:E.jsx(ji,{components:{a:Ce=>E.jsx(Mi,{...Ce}),p:Ce=>E.jsx("p",{style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-line",margin:"0 0 0.5em 0"},...Ce}),code:Ce=>E.jsx("code",{style:{display:"block",whiteSpace:"pre-wrap",overflowX:"auto",overflowWrap:"anywhere"},...Ce})},children:Ee(R.content)})}):E.jsx("p",{className:"text-base",style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap",width:"100%"},children:R.content}),E.jsxs("div",{className:pt("flex text-xs mt-2",R.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[E.jsx("span",{children:Ne(ue)}),R.role==="assistant"&&!Oe&&E.jsxs("div",{className:"relative",children:[E.jsx("button",{onClick:()=>Be(R.content,X),className:"text-gray-400 hover:text-gray-600 transition-colors ml-2 p-1 rounded-full hover:bg-gray-100","aria-label":"Copy to clipboard",children:P===X?E.jsx(no,{size:16}):E.jsx(oo,{size:16})}),P===X&&E.jsx("div",{className:"absolute bottom-full right-0 mb-1 px-2 py-1 text-xs rounded-md shadow-sm animate-fade-in-out whitespace-nowrap",style:{backgroundColor:B.secondary,color:B.text.inverse},children:"Copied!"})]})]})]})},X)}),ae&&d.length===0&&E.jsx("div",{className:"flex justify-start",children:E.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-4 shadow-sm",children:E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]})})}),E.jsx("div",{ref:f})]})]}),E.jsx("div",{className:"p-4 border-t shrink-0",style:{borderColor:B.input.border,background:B.background,boxShadow:"0 -2px 10px rgba(0,0,0,0.05)"},children:E.jsxs("div",{className:"flex items-end gap-3",children:[E.jsxs("div",{className:pt("flex-1 relative rounded-xl transition-all duration-200 overflow-hidden",k?"ring-2":"ring-0"),style:{borderColor:B.input.border,border:"1px solid",boxShadow:k?"0 0 0 2px rgba(236, 153, 75, 0.2)":"none","--tw-ring-color":B.secondary,background:B.input.background},children:[E.jsx("textarea",{ref:s,value:r,onChange:dt,onKeyDown:se,onFocus:()=>A(!0),onBlur:()=>A(!1),placeholder:"Type your message...",maxLength:c,className:"w-full resize-none outline-none p-3 pr-12 text-base custom-scrollbar",style:{background:"transparent",color:B.text.primary,height:"48px",minHeight:"48px",maxHeight:"96px",overflow:"auto",lineHeight:"1.5",boxSizing:"border-box"}}),r.length>0&&E.jsxs("div",{className:"absolute bottom-2 right-3 text-xs px-2 py-1 rounded-full",style:{color:r.length>=c*.9?"#ef4444":"#6b7280",backgroundColor:r.length>=c*.9?"rgba(239, 68, 68, 0.1)":"rgba(107, 114, 128, 0.1)",fontSize:"0.7rem"},children:[r.length,"/",c]})]}),E.jsx("button",{onClick:Fe,disabled:!r.trim()||ae,className:pt("rounded-full transition-all duration-200 flex items-center justify-center shrink-0",r.trim()&&!ae?"hover:shadow-md transform hover:-translate-y-0.5":"bg-gray-200 text-gray-400 cursor-not-allowed"),style:{backgroundColor:r.trim()&&!ae?B.secondary:void 0,color:r.trim()&&!ae?"white":void 0,width:"48px",height:"48px",padding:"12px"},"aria-label":"Send message",children:E.jsx(co,{size:24})})]})})]}),E.jsxs("div",{className:"relative",children:[o&&!t&&E.jsx("span",{className:"absolute -top-1 -right-1 h-4 w-4 bg-orange-500 rounded-full animate-pulse z-10"}),E.jsx("button",{onClick:ye,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:pt("rounded-full shadow-lg flex items-center justify-center transition-all duration-300",a&&!t&&"animate-pulse",!t&&"animate-bounce-gentle"),style:{backgroundColor:B.primary,color:B.text.inverse,width:"80px",height:"80px"},"aria-label":t?"Close chat":"Open chat",children:t?E.jsx(qn,{size:40,className:"text-white",style:{opacity:.9}}):E.jsx(Mn,{iconName:"message-square",size:40,className:"text-white"})})]}),E.jsx("style",{children:`
159
157
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
160
158
 
161
159
  body, button, input, textarea {
@@ -216,6 +214,7 @@ React keys must be passed directly to JSX without using spread:
216
214
  margin: 0 0 0.5em 0 !important;
217
215
  padding: 0;
218
216
  line-height: 1.5;
217
+ white-space: pre-line;
219
218
  }
220
219
 
221
220
  .prose p:last-child {
@@ -237,4 +236,4 @@ React keys must be passed directly to JSX without using spread:
237
236
  textarea, button {
238
237
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
239
238
  }
240
- `})]})};let nt=null,rt=null,Tt=null,me=null;function Mi(){if(!nt)if(typeof window<"u"&&window.CHATBOT_API_URL)nt=window.CHATBOT_API_URL;else throw new Error("API URL not set. Call setApiUrl or use injectChatWidget to configure the API URL.");return nt}function zi(){if(!rt)if(typeof window<"u"&&window.CHATBOT_API_KEY)rt=window.CHATBOT_API_KEY;else throw new Error("API key not set. Call setApiKey or use injectChatWidget to configure the API key.");return rt}function Bi(e){nt=e,typeof window<"u"&&(window.CHATBOT_API_URL=e,rt&&Tt&&_t(e,rt,Tt))}function Ui(e){rt=e,typeof window<"u"&&(window.CHATBOT_API_KEY=e,nt&&Tt&&_t(nt,e,Tt))}function Hi(e){typeof window>"u"||(me={...Je(),...me,...e,header:{...Je().header,...me==null?void 0:me.header,...e.header},welcome:{...Je().welcome,...me==null?void 0:me.welcome,...e.welcome},suggestedQuestions:e.suggestedQuestions||(me==null?void 0:me.suggestedQuestions)||Je().suggestedQuestions,theme:{...Je().theme,...me==null?void 0:me.theme,...e.theme}},window.dispatchEvent(new CustomEvent("chatbot-config-update",{detail:me})))}function Bn(e){if(typeof window>"u")return;nt=e.apiUrl,rt=e.apiKey,Tt=e.sessionId,_t(e.apiUrl,e.apiKey,e.sessionId),e.widgetConfig&&(me={...Je(),...e.widgetConfig});function t(){try{if(!window.React||!window.ReactDOM){console.log("React or ReactDOM not available yet, retrying in 100ms..."),setTimeout(t,100);return}const n=e.containerSelector?document.querySelector(e.containerSelector):document.createElement("div");if(!n){console.error(`Container with selector "${e.containerSelector}" not found`);return}e.containerSelector||(n.id="chatbot-widget-container",document.body.appendChild(n)),window.ReactDOM.createRoot(n).render(window.React.createElement(Vt,me)),console.log("Chatbot widget initialized successfully!")}catch(n){console.error("Error initializing chatbot widget:",n)}}setTimeout(t,100)}typeof window<"u"&&(window.initChatbotWidget=Bn,window.ChatbotWidget={ChatWidget:Vt,useChatStore:en,injectChatWidget:Bn,setApiUrl:Bi,getApiUrl:Mi,setApiKey:Ui,getApiKey:zi,updateWidgetConfig:Hi,configureApi:_t},console.log("Chatbot widget loaded.")),we.ChatWidget=Vt,we.default=Vt,we.getApiKey=zi,we.getApiUrl=Mi,we.getChatConfig=Je,we.injectChatWidget=Bn,we.setApiKey=Ui,we.setApiUrl=Bi,we.updateWidgetConfig=Hi,we.useChatStore=en,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
239
+ `})]})};function pc(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function hc(){const e="orbit_session_id";let t=sessionStorage.getItem(e);return t||(t=pc(),sessionStorage.setItem(e,t)),t}let nt=null,rt=null,ht=null,me=null;function Fi(){if(!nt)if(typeof window<"u"&&window.CHATBOT_API_URL)nt=window.CHATBOT_API_URL;else throw new Error("API URL not set. Call setApiUrl or use injectChatWidget to configure the API URL.");return nt}function zi(){if(!rt)if(typeof window<"u"&&window.CHATBOT_API_KEY)rt=window.CHATBOT_API_KEY;else throw new Error("API key not set. Call setApiKey or use injectChatWidget to configure the API key.");return rt}function Bi(e){nt=e,typeof window<"u"&&(window.CHATBOT_API_URL=e,rt&&ht&&Tt(e,rt,ht))}function Ui(e){rt=e,typeof window<"u"&&(window.CHATBOT_API_KEY=e,nt&&ht&&Tt(nt,e,ht))}function Hi(e){typeof window>"u"||(me={...Je(),...me,...e,header:{...Je().header,...me==null?void 0:me.header,...e.header},welcome:{...Je().welcome,...me==null?void 0:me.welcome,...e.welcome},suggestedQuestions:e.suggestedQuestions||(me==null?void 0:me.suggestedQuestions)||Je().suggestedQuestions,theme:{...Je().theme,...me==null?void 0:me.theme,...e.theme}},window.dispatchEvent(new CustomEvent("chatbot-config-update",{detail:me})))}function Fn(e){if(typeof window>"u")return;nt=e.apiUrl,rt=e.apiKey,ht=e.sessionId||hc(),Tt(e.apiUrl,e.apiKey,ht),e.widgetConfig&&(me={...Je(),...e.widgetConfig});function t(){try{if(!window.React||!window.ReactDOM){console.log("React or ReactDOM not available yet, retrying in 100ms..."),setTimeout(t,100);return}const n=e.containerSelector?document.querySelector(e.containerSelector):document.createElement("div");if(!n){console.error(`Container with selector "${e.containerSelector}" not found`);return}e.containerSelector||(n.id="chatbot-widget-container",document.body.appendChild(n)),window.ReactDOM.createRoot(n).render(window.React.createElement(Vt,me)),console.log("Chatbot widget initialized successfully!")}catch(n){console.error("Error initializing chatbot widget:",n)}}setTimeout(t,100)}typeof window<"u"&&(window.initChatbotWidget=Fn,window.ChatbotWidget={ChatWidget:Vt,useChatStore:Zt,injectChatWidget:Fn,setApiUrl:Bi,getApiUrl:Fi,setApiKey:Ui,getApiKey:zi,updateWidgetConfig:Hi,configureApi:Tt},console.log("Chatbot widget loaded.")),we.ChatWidget=Vt,we.default=Vt,we.getApiKey=zi,we.getApiUrl=Fi,we.getChatConfig=Je,we.injectChatWidget=Fn,we.setApiKey=Ui,we.setApiUrl=Bi,we.updateWidgetConfig=Hi,we.useChatStore=Zt,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});