dhi-copilot-ai 3.0.1 → 3.0.2

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.
@@ -17,4 +17,4 @@ var jl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
- */const gc=e=>{const t=(e=>e?hc(e):hc)(e),n=e=>function(e,t=mc){const n=d.useSyncExternalStore(e.subscribe,d.useCallback(()=>t(e.getState()),[e,t]),d.useCallback(()=>t(e.getInitialState()),[e,t]));return d.useDebugValue(n),n}(t,e);return Object.assign(n,t),n};function yc(e,t){return function(){return e.apply(t,arguments)}}const{toString:vc}=Object.prototype,{getPrototypeOf:bc}=Object,{iterator:xc,toStringTag:wc}=Symbol,kc=(e=>t=>{const n=vc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sc=e=>(e=e.toLowerCase(),t=>kc(t)===e),Ec=e=>t=>typeof t===e,{isArray:Cc}=Array,Tc=Ec("undefined");function Pc(e){return null!==e&&!Tc(e)&&null!==e.constructor&&!Tc(e.constructor)&&Nc(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ac=Sc("ArrayBuffer");const Rc=Ec("string"),Nc=Ec("function"),jc=Ec("number"),Oc=e=>null!==e&&"object"==typeof e,Lc=e=>{if("object"!==kc(e))return!1;const t=bc(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||wc in e||xc in e)},Dc=Sc("Date"),_c=Sc("File"),Mc=Sc("Blob"),zc=Sc("FileList");const Fc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Ic=void 0!==Fc.FormData?Fc.FormData:void 0,Bc=Sc("URLSearchParams"),[Vc,Uc,Hc,$c]=["ReadableStream","Request","Response","Headers"].map(Sc);function qc(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Cc(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Pc(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Wc(e,t){if(Pc(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Kc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Yc=e=>!Tc(e)&&e!==Kc;const Qc=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&bc(Uint8Array)),Xc=Sc("HTMLFormElement"),Gc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jc=Sc("RegExp"),Zc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};qc(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const eu=Sc("AsyncFunction"),tu=(nu="function"==typeof setImmediate,ru=Nc(Kc.postMessage),nu?setImmediate:ru?(ou=`axios@${Math.random()}`,iu=[],Kc.addEventListener("message",({source:e,data:t})=>{e===Kc&&t===ou&&iu.length&&iu.shift()()},!1),e=>{iu.push(e),Kc.postMessage(ou,"*")}):e=>setTimeout(e));var nu,ru,ou,iu;const au="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Kc):"undefined"!=typeof process&&process.nextTick||tu,su={isArray:Cc,isArrayBuffer:Ac,isBuffer:Pc,isFormData:e=>{if(!e)return!1;if(Ic&&e instanceof Ic)return!0;const t=bc(e);if(!t||t===Object.prototype)return!1;if(!Nc(e.append))return!1;const n=kc(e);return"formdata"===n||"object"===n&&Nc(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Ac(e.buffer),t},isString:Rc,isNumber:jc,isBoolean:e=>!0===e||!1===e,isObject:Oc,isPlainObject:Lc,isEmptyObject:e=>{if(!Oc(e)||Pc(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Vc,isRequest:Uc,isResponse:Hc,isHeaders:$c,isUndefined:Tc,isDate:Dc,isFile:_c,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Mc,isRegExp:Jc,isFunction:Nc,isStream:e=>Oc(e)&&Nc(e.pipe),isURLSearchParams:Bc,isTypedArray:Qc,isFileList:zc,forEach:qc,merge:function e(...t){const{caseless:n,skipUndefined:r}=Yc(this)&&this||{},o={},i=(t,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const a=n&&Wc(o,i)||i,s=Gc(o,a)?o[a]:void 0;Lc(s)&&Lc(t)?o[a]=e(s,t):Lc(t)?o[a]=e({},t):Cc(t)?o[a]=t.slice():r&&Tc(t)||(o[a]=t)};for(let a=0,s=t.length;a<s;a++)t[a]&&qc(t[a],i);return o},extend:(e,t,n,{allOwnKeys:r}={})=>(qc(t,(t,r)=>{n&&Nc(t)?Object.defineProperty(e,r,{__proto__:null,value:yc(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&bc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:kc,kindOfTest:Sc,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Cc(e))return e;let t=e.length;if(!jc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[xc]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Xc,hasOwnProperty:Gc,hasOwnProp:Gc,reduceDescriptors:Zc,freezeMethods:e=>{Zc(e,(t,n)=>{if(Nc(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];Nc(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Cc(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Wc,global:Kc,isContextDefined:Yc,isSpecCompliantForm:function(e){return!!(e&&Nc(e.append)&&"FormData"===e[wc]&&e[xc])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Oc(e)){if(t.indexOf(e)>=0)return;if(Pc(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Cc(e)?[]:{};return qc(e,(e,t)=>{const i=n(e,r+1);!Tc(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:eu,isThenable:e=>e&&(Oc(e)||Nc(e))&&Nc(e.then)&&Nc(e.catch),setImmediate:tu,asap:au,isIterable:e=>null!=e&&Nc(e[xc])},lu=su.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cu=Symbol("internals"),uu=/[^\x09\x20-\x7E\x80-\xFF]/g;function du(e){return e&&String(e).trim().toLowerCase()}function fu(e){return!1===e||null==e?e:su.isArray(e)?e.map(fu):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(uu,""))}function pu(e,t,n,r,o){return su.isFunction(r)?r.call(this,t,n):(o&&(t=n),su.isString(t)?su.isString(r)?-1!==t.indexOf(r):su.isRegExp(r)?r.test(t):void 0:void 0)}let hu=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=du(t);if(!o)throw new Error("header name must be a non-empty string");const i=su.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=fu(e))}const i=(e,t)=>su.forEach(e,(e,n)=>o(e,n,t));if(su.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(su.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&lu[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(su.isObject(e)&&su.isIterable(e)){let n,r,o={};for(const t of e){if(!su.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?su.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=du(e)){const n=su.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(su.isFunction(t))return t.call(this,e,n);if(su.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=du(e)){const n=su.findKey(this,e);return!(!n||void 0===this[n]||t&&!pu(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=du(e)){const o=su.findKey(n,e);!o||t&&!pu(0,n[o],o,t)||(delete n[o],r=!0)}}return su.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!pu(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return su.forEach(this,(r,o)=>{const i=su.findKey(n,o);if(i)return t[i]=fu(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=fu(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return su.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&su.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[cu]=this[cu]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=du(e);t[r]||(!function(e,t){const n=su.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return su.isArray(e)?e.forEach(r):r(e),this}};hu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),su.reduceDescriptors(hu.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),su.freezeMethods(hu);function mu(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(su.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof hu&&(e=e.toJSON()),r.push(e),su.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);su.isUndefined(r)||(t[n]=r)});else{if(!su.isPlainObject(e)&&function(e){if(su.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(su.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,i]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":o(i);su.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}let gu=class e extends Error{static from(t,n,r,o,i,a){const s=new e(t.message,n||t.code,r,o,i);return s.cause=t,s.name=t.name,null!=t.status&&null==s.status&&(s.status=t.status),a&&Object.assign(s,a),s}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&su.hasOwnProp(e,"redact")?e.redact:void 0,n=su.isArray(t)&&t.length>0?mu(e,t):su.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};gu.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",gu.ERR_BAD_OPTION="ERR_BAD_OPTION",gu.ECONNABORTED="ECONNABORTED",gu.ETIMEDOUT="ETIMEDOUT",gu.ECONNREFUSED="ECONNREFUSED",gu.ERR_NETWORK="ERR_NETWORK",gu.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",gu.ERR_DEPRECATED="ERR_DEPRECATED",gu.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",gu.ERR_BAD_REQUEST="ERR_BAD_REQUEST",gu.ERR_CANCELED="ERR_CANCELED",gu.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",gu.ERR_INVALID_URL="ERR_INVALID_URL",gu.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function yu(e){return su.isPlainObject(e)||su.isArray(e)}function vu(e){return su.endsWith(e,"[]")?e.slice(0,-2):e}function bu(e,t,n){return e?e.concat(t).map(function(e,t){return e=vu(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const xu=su.toFlatObject(su,{},null,function(e){return/^is[A-Z]/.test(e)});function wu(e,t,n){if(!su.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=su.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!su.isUndefined(t[e])})).metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,s=n.Blob||"undefined"!=typeof Blob&&Blob,l=void 0===n.maxDepth?100:n.maxDepth,c=s&&su.isSpecCompliantForm(t);if(!su.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(su.isDate(e))return e.toISOString();if(su.isBoolean(e))return e.toString();if(!c&&su.isBlob(e))throw new gu("Blob is not supported. Use a Buffer instead.");return su.isArrayBuffer(e)||su.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,o){let s=e;if(su.isReactNative(t)&&su.isReactNativeBlob(e))return t.append(bu(o,n,i),u(e)),!1;if(e&&!o&&"object"==typeof e)if(su.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(su.isArray(e)&&function(e){return su.isArray(e)&&!e.some(yu)}(e)||(su.isFileList(e)||su.endsWith(n,"[]"))&&(s=su.toArray(e)))return n=vu(n),s.forEach(function(e,r){!su.isUndefined(e)&&null!==e&&t.append(!0===a?bu([n],r,i):null===a?n:n+"[]",u(e))}),!1;return!!yu(e)||(t.append(bu(o,n,i),u(e)),!1)}const f=[],p=Object.assign(xu,{defaultVisitor:d,convertValue:u,isVisitable:yu});if(!su.isObject(e))throw new TypeError("data must be an object");return function e(n,r,i=0){if(!su.isUndefined(n)){if(i>l)throw new gu("Object is too deeply nested ("+i+" levels). Max depth: "+l,gu.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==f.indexOf(n))throw Error("Circular reference detected in "+r.join("."));f.push(n),su.forEach(n,function(n,a){!0===(!(su.isUndefined(n)||null===n)&&o.call(t,n,su.isString(a)?a.trim():a,r,p))&&e(n,r?r.concat(a):[a],i+1)}),f.pop()}}(e),t}function ku(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Su(e,t){this._pairs=[],e&&wu(e,this,t)}const Eu=Su.prototype;function Cu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tu(e,t,n){if(!t)return e;const r=n&&n.encode||Cu,o=su.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let a;if(a=i?i(t,o):su.isURLSearchParams(t)?t.toString():new Su(t,o).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Eu.append=function(e,t){this._pairs.push([e,t])},Eu.toString=function(e){const t=e?function(t){return e.call(this,t,ku)}:ku;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Pu{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){su.forEach(this.handlers,function(t){null!==t&&e(t)})}}const Au={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Ru={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Su,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Nu="undefined"!=typeof window&&"undefined"!=typeof document,ju="object"==typeof navigator&&navigator||void 0,Ou=Nu&&(!ju||["ReactNative","NativeScript","NS"].indexOf(ju.product)<0),Lu="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Du=Nu&&window.location.href||"http://localhost",_u={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Nu,hasStandardBrowserEnv:Ou,hasStandardBrowserWebWorkerEnv:Lu,navigator:ju,origin:Du},Symbol.toStringTag,{value:"Module"})),...Ru};function Mu(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&su.isArray(r)?r.length:i,s)return su.hasOwnProp(r,i)?r[i]=su.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!a;r[i]&&su.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&su.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(su.isFormData(e)&&su.isFunction(e.entries)){const n={};return su.forEachEntry(e,(e,r)=>{t(function(e){return su.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const zu=(e,t)=>null!=e&&su.hasOwnProp(e,t)?e[t]:void 0;const Fu={transitional:Au,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=su.isObject(e);o&&su.isHTMLForm(e)&&(e=new FormData(e));if(su.isFormData(e))return r?JSON.stringify(Mu(e)):e;if(su.isArrayBuffer(e)||su.isBuffer(e)||su.isStream(e)||su.isFile(e)||su.isBlob(e)||su.isReadableStream(e))return e;if(su.isArrayBufferView(e))return e.buffer;if(su.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){const t=zu(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return wu(e,new _u.classes.URLSearchParams,{visitor:function(e,t,n,r){return _u.isNode&&su.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((i=su.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=zu(this,"env"),r=n&&n.FormData;return wu(i?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(su.isString(e))try{return(t||JSON.parse)(e),su.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=zu(this,"transitional")||Fu.transitional,n=t&&t.forcedJSONParsing,r=zu(this,"responseType"),o="json"===r;if(su.isResponse(e)||su.isReadableStream(e))return e;if(e&&su.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,zu(this,"parseReviver"))}catch(i){if(n){if("SyntaxError"===i.name)throw gu.from(i,gu.ERR_BAD_RESPONSE,this,null,zu(this,"response"));throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_u.classes.FormData,Blob:_u.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Iu(e,t){const n=this||Fu,r=t||n,o=hu.from(r.headers);let i=r.data;return su.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Bu(e){return!(!e||!e.__CANCEL__)}su.forEach(["delete","get","head","post","put","patch","query"],e=>{Fu.headers[e]={}});let Vu=class extends gu{constructor(e,t,n){super(null==e?"canceled":e,gu.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Uu(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new gu("Request failed with status code "+n.status,n.status>=400&&n.status<500?gu.ERR_BAD_REQUEST:gu.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Hu=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=null!=a?Math.min(i,a):i,l=Math.max(0,s-r),c=o(l);r=Math.max(r,s);e({loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a?(a-s)/c:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},$u=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qu=e=>(...t)=>su.asap(()=>e(...t)),Wu=_u.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,_u.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(_u.origin),_u.navigator&&/(msie|trident)/i.test(_u.navigator.userAgent)):()=>!0,Ku=_u.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];su.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),su.isString(r)&&s.push(`path=${r}`),su.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),su.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Yu(e,t,n){let r=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(r||!1===n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Qu=e=>e instanceof hu?{...e}:e;function Xu(e,t){t=t||{};const n=Object.create(null);function r(e,t,n,r){return su.isPlainObject(e)&&su.isPlainObject(t)?su.merge.call({caseless:r},e,t):su.isPlainObject(t)?su.merge({},t):su.isArray(t)?t.slice():t}function o(e,t,n,o){return su.isUndefined(t)?su.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!su.isUndefined(t))return r(void 0,t)}function a(e,t){return su.isUndefined(t)?su.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return su.hasOwnProp(t,i)?r(n,o):su.hasOwnProp(e,i)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Qu(e),Qu(t),0,!0)};return su.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const i=su.hasOwnProp(l,r)?l[r]:o,a=i(su.hasOwnProp(e,r)?e[r]:void 0,su.hasOwnProp(t,r)?t[r]:void 0,r);su.isUndefined(a)&&i!==s||(n[r]=a)}),n}const Gu=["content-type","content-length"];const Ju=e=>{const t=Xu({},e),n=e=>su.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const l=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");var f;if(t.headers=s=hu.from(s),t.url=Tu(Yu(c,d,u),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?(f=l.password,encodeURIComponent(f).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))):""))),su.isFormData(r)&&(_u.hasStandardBrowserEnv||_u.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):su.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t).forEach(([t,n])=>{Gu.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(s,r.getHeaders(),n("formDataHeaderPolicy"))),_u.hasStandardBrowserEnv){su.isFunction(o)&&(o=o(t));if(!0===o||null==o&&Wu(t.url)){const e=i&&a&&Ku.read(a);e&&s.set(i,e)}}return t},Zu="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Ju(e);let o=r.data;const i=hu.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=hu.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Uu(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new gu("Request aborted",gu.ECONNABORTED,e,m)),h(),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new gu(r,gu.ERR_NETWORK,e,m);o.event=t||null,n(o),h(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Au;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new gu(t,o.clarifyTimeoutError?gu.ETIMEDOUT:gu.ECONNABORTED,e,m)),h(),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&su.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),su.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=Hu(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=Hu(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Vu(null,e,m):t),m.abort(),h(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);!y||_u.protocols.includes(y)?m.send(o||null):n(new gu("Unsupported protocol "+y+":",gu.ERR_BAD_REQUEST,e))})},ed=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof gu?t:new Vu(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new gu(`timeout of ${t}ms exceeded`,gu.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>su.asap(a),s}},td=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},nd=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},rd=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of nd(e))yield*td(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})};const od="1.16.0",{isFunction:id}=su,ad=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},sd=e=>{const t=su.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=su.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:a}=e,s=o?id(o):"function"==typeof fetch,l=id(i),c=id(a);if(!s)return!1;const u=s&&id(n),d=s&&("function"==typeof r?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new i(e).arrayBuffer())),f=l&&u&&ad(()=>{let e=!1;const t=new i(_u.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),p=c&&u&&ad(()=>su.isReadableStream(new a("").body)),h={stream:p&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new gu(`Response type '${e}' is not supported`,gu.ERR_NOT_SUPPORT,n)})});const m=async(e,t)=>{const n=su.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(su.isBlob(e))return e.size;if(su.isSpecCompliantForm(e)){const t=new i(_u.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return su.isArrayBufferView(e)||su.isArrayBuffer(e)?e.byteLength:(su.isURLSearchParams(e)&&(e+=""),su.isString(e)?(await d(e)).byteLength:void 0)})(t):n};return async e=>{let{url:t,method:n,data:s,signal:c,cancelToken:u,timeout:d,onDownloadProgress:g,onUploadProgress:y,responseType:v,headers:b,withCredentials:x="same-origin",fetchOptions:w,maxContentLength:k,maxBodyLength:S}=Ju(e);const E=su.isNumber(k)&&k>-1,C=su.isNumber(S)&&S>-1;let T=o||fetch;v=v?(v+"").toLowerCase():"text";let P=ed([c,u&&u.toAbortSignal()],d),A=null;const R=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let N;try{if(E&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let s=0;s<t;s++)if(37===r.charCodeAt(s)&&s+2<t){const t=r.charCodeAt(s+1),n=r.charCodeAt(s+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102)&&(e-=2,s+=2)}let n=0,o=t-1;const i=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));o>=0&&(61===r.charCodeAt(o)?(n++,o--):i(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||i(o))&&n++;const a=3*Math.floor(e/4)-(n||0);return a>0?a:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(r,"utf8");let o=0;for(let i=0,a=r.length;i<a;i++){const e=r.charCodeAt(i);if(e<128)o+=1;else if(e<2048)o+=2;else if(e>=55296&&e<=56319&&i+1<a){const e=r.charCodeAt(i+1);e>=56320&&e<=57343?(o+=4,i++):o+=3}else o+=3}return o}(t);if(n>k)throw new gu("maxContentLength size of "+k+" exceeded",gu.ERR_BAD_RESPONSE,e,A)}if(C&&"get"!==n&&"head"!==n){const t=await m(b,s);if("number"==typeof t&&isFinite(t)&&t>S)throw new gu("Request body larger than maxBodyLength limit",gu.ERR_BAD_REQUEST,e,A)}if(y&&f&&"get"!==n&&"head"!==n&&0!==(N=await m(b,s))){let e,n=new i(t,{method:"POST",body:s,duplex:"half"});if(su.isFormData(s)&&(e=n.headers.get("content-type"))&&b.setContentType(e),n.body){const[e,t]=$u(N,Hu(qu(y)));s=rd(n.body,65536,e,t)}}su.isString(x)||(x=x?"include":"omit");const o=l&&"credentials"in i.prototype;if(su.isFormData(s)){const e=b.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&b.delete("content-type")}b.set("User-Agent","axios/"+od,!1);const c={...w,signal:P,method:n.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:o?x:void 0};A=l&&new i(t,c);let u=await(l?T(A,w):T(t,c));if(E){const t=su.toFiniteNumber(u.headers.get("content-length"));if(null!=t&&t>k)throw new gu("maxContentLength size of "+k+" exceeded",gu.ERR_BAD_RESPONSE,e,A)}const d=p&&("stream"===v||"response"===v);if(p&&u.body&&(g||E||d&&R)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=u[e]});const n=su.toFiniteNumber(u.headers.get("content-length")),[r,o]=g&&$u(n,Hu(qu(g),!0))||[];let i=0;const s=t=>{if(E&&(i=t,i>k))throw new gu("maxContentLength size of "+k+" exceeded",gu.ERR_BAD_RESPONSE,e,A);r&&r(t)};u=new a(rd(u.body,65536,s,()=>{o&&o(),R&&R()}),t)}v=v||"text";let j=await h[su.findKey(h,v)||"text"](u,e);if(E&&!p&&!d){let t;if(null!=j&&("number"==typeof j.byteLength?t=j.byteLength:"number"==typeof j.size?t=j.size:"string"==typeof j&&(t="function"==typeof r?(new r).encode(j).byteLength:j.length)),"number"==typeof t&&t>k)throw new gu("maxContentLength size of "+k+" exceeded",gu.ERR_BAD_RESPONSE,e,A)}return!d&&R&&R(),await new Promise((t,n)=>{Uu(t,n,{data:j,headers:hu.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:A})})}catch(j){if(R&&R(),P&&P.aborted&&P.reason instanceof gu){const t=P.reason;throw t.config=e,A&&(t.request=A),j!==t&&(t.cause=j),t}if(j&&"TypeError"===j.name&&/Load failed|fetch/i.test(j.message))throw Object.assign(new gu("Network Error",gu.ERR_NETWORK,e,A,j&&j.response),{cause:j.cause||j});throw gu.from(j,j&&j.code,e,A,j&&j.response)}}},ld=new Map,cd=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,l=i.length,c=ld;for(;l--;)a=i[l],s=c.get(a),void 0===s&&c.set(a,s=l?new Map:sd(t)),c=s;return s};cd();const ud={http:null,xhr:Zu,fetch:{get:cd}};su.forEach(ud,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const dd=e=>`- ${e}`,fd=e=>su.isFunction(e)||null===e||!1===e;const pd={getAdapter:function(e,t){e=su.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!fd(r)&&(o=ud[(n=String(r)).toLowerCase()],void 0===o))throw new gu(`Unknown adapter '${n}'`);if(o&&(su.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(dd).join("\n"):" "+dd(e[0]):"as no adapter specified";throw new gu("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:ud};function hd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vu(null,e)}function md(e){hd(e),e.headers=hu.from(e.headers),e.data=Iu.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return pd.getAdapter(e.adapter||Fu.adapter,e)(e).then(function(t){hd(e),e.response=t;try{t.data=Iu.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=hu.from(t.headers),t},function(t){if(!Bu(t)&&(hd(e),t&&t.response)){e.response=t.response;try{t.response.data=Iu.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=hu.from(t.response.headers)}return Promise.reject(t)})}const gd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const yd={};gd.transitional=function(e,t,n){function r(e,t){return"[Axios v"+od+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new gu(r(o," has been removed"+(t?" in "+t:"")),gu.ERR_DEPRECATED);return t&&!yd[o]&&(yd[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},gd.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const vd={assertOptions:function(e,t,n){if("object"!=typeof e)throw new gu("options must be an object",gu.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new gu("option "+i+" must be "+n,gu.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new gu("Unknown option "+i,gu.ERR_BAD_OPTION)}},validators:gd},bd=vd.validators;let xd=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Pu,response:new Pu}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=(()=>{if(!e.stack)return"";const t=e.stack.indexOf("\n");return-1===t?"":e.stack.slice(t+1)})();try{if(n.stack){if(t){const e=t.indexOf("\n"),r=-1===e?-1:t.indexOf("\n",e+1),o=-1===r?"":t.slice(r+1);String(n.stack).endsWith(o)||(n.stack+="\n"+t)}}else n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Xu(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&vd.assertOptions(n,{silentJSONParsing:bd.transitional(bd.boolean),forcedJSONParsing:bd.transitional(bd.boolean),clarifyTimeoutError:bd.transitional(bd.boolean),legacyInterceptorReqResOrdering:bd.transitional(bd.boolean)},!1),null!=r&&(su.isFunction(r)?t.paramsSerializer={serialize:r}:vd.assertOptions(r,{encode:bd.function,serialize:bd.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),vd.assertOptions(t,{baseUrl:bd.spelling("baseURL"),withXsrfToken:bd.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&su.merge(o.common,o[t.method]);o&&su.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=hu.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;s=s&&e.synchronous;const n=t.transitional||Au;n&&n.legacyInterceptorReqResOrdering?a.unshift(e.fulfilled,e.rejected):a.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!s){const e=[md.bind(this),void 0];for(e.unshift(...a),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{c=md.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Tu(Yu((e=Xu(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};su.forEach(["delete","get","head","options"],function(e){xd.prototype[e]=function(t,n){return this.request(Xu(n||{},{method:e,url:t,data:(n||{}).data}))}}),su.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(Xu(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}xd.prototype[e]=t(),"query"!==e&&(xd.prototype[e+"Form"]=t(!0))});const wd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(wd).forEach(([e,t])=>{wd[t]=e});const kd=function e(t){const n=new xd(t),r=yc(xd.prototype.request,n);return su.extend(r,xd.prototype,n,{allOwnKeys:!0}),su.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Xu(t,n))},r}(Fu);kd.Axios=xd,kd.CanceledError=Vu,kd.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Vu(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},kd.isCancel=Bu,kd.VERSION=od,kd.toFormData=wu,kd.AxiosError=gu,kd.Cancel=kd.CanceledError,kd.all=function(e){return Promise.all(e)},kd.spread=function(e){return function(t){return e.apply(null,t)}},kd.isAxiosError=function(e){return su.isObject(e)&&!0===e.isAxiosError},kd.mergeConfig=Xu,kd.AxiosHeaders=hu,kd.formToJSON=e=>Mu(su.isHTMLForm(e)?new FormData(e):e),kd.getAdapter=pd.getAdapter,kd.HttpStatusCode=wd,kd.default=kd;const{Axios:Sd,AxiosError:Ed,CanceledError:Cd,isCancel:Td,CancelToken:Pd,VERSION:Ad,all:Rd,Cancel:Nd,isAxiosError:jd,spread:Od,toFormData:Ld,AxiosHeaders:Dd,HttpStatusCode:_d,formToJSON:Md,getAdapter:zd,mergeConfig:Fd,create:Id}=kd,Bd=(e,t)=>{const n=kd.create({baseURL:e,timeout:3e5,headers:{Authorization:t?`Bearer ${t}`:"","Content-Type":"application/json"}});return n.interceptors.response.use(e=>e,e=>{var t,n;return console.error("DHI Copilot API Error:",(null==(n=null==(t=e.response)?void 0:t.data)?void 0:n.detail)||e.message),Promise.reject(e)}),n},Vd=async(e,t,n)=>{const r=Bd(e,t);return(await r.post("/chat",n)).data},Ud=async(e,t)=>{const n=Bd(e,t);return(await n.get("/chat/threads")).data},Hd=async(e,t,n)=>{const r=Bd(e,t),o=(await r.get(`/chat/history/${n}`)).data,i=[];let a=[];return o.forEach(e=>{if("tool"===e.role){const t=e.content.match(/SOURCE:\s*([^\n]+)/g);if(t){const e=t.map(e=>e.replace("SOURCE:","").trim().split("/").pop()||"");a=[...new Set([...a,...e])]}}else"assistant"===e.role?""!==e.content.trim()&&(i.push({id:`hist-${Math.random()}`,role:"assistant",content:e.content,timestamp:new Date,sources:[...a]}),a=[]):"user"===e.role&&i.push({id:`hist-${Math.random()}`,role:"user",content:e.content,timestamp:new Date})}),i},$d=async(e,t)=>{const n=Bd(e,t);return(await n.get("/settings/connectors")).data},qd=async(e,t,n)=>{const r=Bd(e,t);return(await r.post("/connectors",n)).data},Wd=async(e,t,n)=>{const r=Bd(e,t);return(await r.post(`/documents/sync/${n}`)).data},Kd=async(e,t,n)=>{const r=Bd(e,t);await r.delete(`/connectors/${n}`)},Yd=async(e,t,n)=>{const r=Bd(e,t),o=new FormData;n.forEach(e=>o.append("files",e));return(await r.post("/upload",o)).data},Qd=(Xd=(e,t)=>({config:{},messages:[],threads:[],connectors:[],isSyncing:!1,showAddForm:!1,isLoading:!1,activeThreadId:null,activeView:"chat",setConfig:t=>e({config:t}),setView:t=>e({activeView:t}),setLoading:t=>e({isLoading:t}),setShowAddForm:t=>e({showAddForm:t}),setThreadId:t=>e({activeThreadId:t}),clearChat:()=>e({messages:[],activeThreadId:null}),addMessage:t=>e(e=>({messages:[...e.messages,t]})),fetchThreads:async()=>{const{config:n}=t();if(n.apiUrl)try{const t=await Ud(n.apiUrl,n.userToken);e({threads:t})}catch(r){console.error("Erreur threads:",r)}},loadThread:async n=>{const{config:r}=t();if(n){e({isLoading:!0,activeThreadId:n,activeView:"chat"});try{const t=await Hd(r.apiUrl,r.userToken,n);e({messages:t,isLoading:!1})}catch(o){console.error("Erreur historique:",o),e({isLoading:!1})}}else e({activeThreadId:null,messages:[],activeView:"chat"})},fetchConnectors:async()=>{const{config:n}=t();if(n.apiUrl)try{const t=await $d(n.apiUrl,n.userToken);e({connectors:t})}catch(r){console.error("Erreur connecteurs:",r)}},syncSource:async n=>{const{config:r}=t();e({isSyncing:!0});try{await Wd(r.apiUrl,r.userToken,n),await t().fetchConnectors()}catch(o){console.error("Erreur sync:",o)}finally{e({isSyncing:!1})}},removeSource:async n=>{const{config:r}=t();try{await Kd(r.apiUrl,r.userToken,n),e(e=>({connectors:e.connectors.filter(e=>e.source_id!==n)}))}catch(o){console.error("Erreur suppression source:",o)}}}))?gc(Xd):gc;var Xd;function Gd(){}function Jd(){}const Zd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ef=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tf={};function nf(e,t){return(tf.jsx?ef:Zd).test(e)}const rf=/[ \t\n\f\r]/g;function of(e){return""===e.replace(rf,"")}class af{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function sf(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new af(n,r,t)}function lf(e){return e.toLowerCase()}af.prototype.normal={},af.prototype.property={},af.prototype.space=void 0;class cf{constructor(e,t){this.attribute=t,this.property=e}}cf.prototype.attribute="",cf.prototype.booleanish=!1,cf.prototype.boolean=!1,cf.prototype.commaOrSpaceSeparated=!1,cf.prototype.commaSeparated=!1,cf.prototype.defined=!1,cf.prototype.mustUseProperty=!1,cf.prototype.number=!1,cf.prototype.overloadedBoolean=!1,cf.prototype.property="",cf.prototype.spaceSeparated=!1,cf.prototype.space=void 0;let uf=0;const df=vf(),ff=vf(),pf=vf(),hf=vf(),mf=vf(),gf=vf(),yf=vf();function vf(){return 2**++uf}const bf=Object.freeze(Object.defineProperty({__proto__:null,boolean:df,booleanish:ff,commaOrSpaceSeparated:yf,commaSeparated:gf,number:hf,overloadedBoolean:pf,spaceSeparated:mf},Symbol.toStringTag,{value:"Module"})),xf=Object.keys(bf);class wf extends cf{constructor(e,t,n,r){let o=-1;if(super(e,t),kf(this,"space",r),"number"==typeof n)for(;++o<xf.length;){const e=xf[o];kf(this,xf[o],(n&bf[e])===bf[e])}}}function kf(e,t,n){n&&(e[t]=n)}function Sf(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new wf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[lf(r)]=r,n[lf(i.attribute)]=r}return new af(t,n,e.space)}wf.prototype.defined=!0;const Ef=Sf({properties:{ariaActiveDescendant:null,ariaAtomic:ff,ariaAutoComplete:null,ariaBusy:ff,ariaChecked:ff,ariaColCount:hf,ariaColIndex:hf,ariaColSpan:hf,ariaControls:mf,ariaCurrent:null,ariaDescribedBy:mf,ariaDetails:null,ariaDisabled:ff,ariaDropEffect:mf,ariaErrorMessage:null,ariaExpanded:ff,ariaFlowTo:mf,ariaGrabbed:ff,ariaHasPopup:null,ariaHidden:ff,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mf,ariaLevel:hf,ariaLive:null,ariaModal:ff,ariaMultiLine:ff,ariaMultiSelectable:ff,ariaOrientation:null,ariaOwns:mf,ariaPlaceholder:null,ariaPosInSet:hf,ariaPressed:ff,ariaReadOnly:ff,ariaRelevant:null,ariaRequired:ff,ariaRoleDescription:mf,ariaRowCount:hf,ariaRowIndex:hf,ariaRowSpan:hf,ariaSelected:ff,ariaSetSize:hf,ariaSort:null,ariaValueMax:hf,ariaValueMin:hf,ariaValueNow:hf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Cf(e,t){return t in e?e[t]:t}function Tf(e,t){return Cf(e,t.toLowerCase())}const Pf=Sf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gf,acceptCharset:mf,accessKey:mf,action:null,allow:null,allowFullScreen:df,allowPaymentRequest:df,allowUserMedia:df,alt:null,as:null,async:df,autoCapitalize:null,autoComplete:mf,autoFocus:df,autoPlay:df,blocking:mf,capture:null,charSet:null,checked:df,cite:null,className:mf,cols:hf,colSpan:null,content:null,contentEditable:ff,controls:df,controlsList:mf,coords:hf|gf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:df,defer:df,dir:null,dirName:null,disabled:df,download:pf,draggable:ff,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:df,formTarget:null,headers:mf,height:hf,hidden:pf,high:hf,href:null,hrefLang:null,htmlFor:mf,httpEquiv:mf,id:null,imageSizes:null,imageSrcSet:null,inert:df,inputMode:null,integrity:null,is:null,isMap:df,itemId:null,itemProp:mf,itemRef:mf,itemScope:df,itemType:mf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:df,low:hf,manifest:null,max:null,maxLength:hf,media:null,method:null,min:null,minLength:hf,multiple:df,muted:df,name:null,nonce:null,noModule:df,noValidate:df,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:df,optimum:hf,pattern:null,ping:mf,placeholder:null,playsInline:df,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:df,referrerPolicy:null,rel:mf,required:df,reversed:df,rows:hf,rowSpan:hf,sandbox:mf,scope:null,scoped:df,seamless:df,selected:df,shadowRootClonable:df,shadowRootDelegatesFocus:df,shadowRootMode:null,shape:null,size:hf,sizes:null,slot:null,span:hf,spellCheck:ff,src:null,srcDoc:null,srcLang:null,srcSet:null,start:hf,step:null,style:null,tabIndex:hf,target:null,title:null,translate:null,type:null,typeMustMatch:df,useMap:null,value:ff,width:hf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mf,axis:null,background:null,bgColor:null,border:hf,borderColor:null,bottomMargin:hf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:df,declare:df,event:null,face:null,frame:null,frameBorder:null,hSpace:hf,leftMargin:hf,link:null,longDesc:null,lowSrc:null,marginHeight:hf,marginWidth:hf,noResize:df,noHref:df,noShade:df,noWrap:df,object:null,profile:null,prompt:null,rev:null,rightMargin:hf,rules:null,scheme:null,scrolling:ff,standby:null,summary:null,text:null,topMargin:hf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:hf,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:df,disableRemotePlayback:df,prefix:null,property:null,results:hf,security:null,unselectable:null},space:"html",transform:Tf}),Af=Sf({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:yf,accentHeight:hf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:hf,amplitude:hf,arabicForm:null,ascent:hf,attributeName:null,attributeType:null,azimuth:hf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:hf,by:null,calcMode:null,capHeight:hf,className:mf,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:hf,diffuseConstant:hf,direction:null,display:null,dur:null,divisor:hf,dominantBaseline:null,download:df,dx:null,dy:null,edgeMode:null,editable:null,elevation:hf,enableBackground:null,end:null,event:null,exponent:hf,externalResourcesRequired:null,fill:null,fillOpacity:hf,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:gf,g2:gf,glyphName:gf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:hf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:hf,horizOriginX:hf,horizOriginY:hf,id:null,ideographic:hf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:hf,k:hf,k1:hf,k2:hf,k3:hf,k4:hf,kernelMatrix:yf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:hf,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:hf,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:hf,overlineThickness:hf,paintOrder:null,panose1:null,path:null,pathLength:hf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:hf,pointsAtY:hf,pointsAtZ:hf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yf,rev:yf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yf,requiredFeatures:yf,requiredFonts:yf,requiredFormats:yf,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:hf,specularExponent:hf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:hf,strikethroughThickness:hf,string:null,stroke:null,strokeDashArray:yf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:hf,strokeOpacity:hf,strokeWidth:null,style:null,surfaceScale:hf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yf,tabIndex:hf,tableValues:null,target:null,targetX:hf,targetY:hf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:hf,underlineThickness:hf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:hf,values:null,vAlphabetic:hf,vMathematical:hf,vectorEffect:null,vHanging:hf,vIdeographic:hf,version:null,vertAdvY:hf,vertOriginX:hf,vertOriginY:hf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:hf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Cf}),Rf=Sf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Nf=Sf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tf}),jf=Sf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Of={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"},Lf=/[A-Z]/g,Df=/-[a-z]/g,_f=/^data[-\w.:]+$/i;function Mf(e){return"-"+e.toLowerCase()}function zf(e){return e.charAt(1).toUpperCase()}const Ff=sf([Ef,Pf,Rf,Nf,jf],"html"),If=sf([Ef,Af,Rf,Nf,jf],"svg");var Bf,Vf,Uf,Hf={};function $f(){if(Uf)return Hf;Uf=1;var e=Hf&&Hf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.default=function(e,n){let r=null;if(!e||"string"!=typeof e)return r;const o=(0,t.default)(e),i="function"==typeof n;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:o}=e;i?n(t,o,e):o&&(r=r||{},r[t]=o)}),r};const t=e(function(){if(Vf)return Bf;Vf=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return Bf=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return f+=2,p(n),s=s.slice(t),f+=2,e({type:"comment",comment:n})}}function w(){var t=h(),n=y(r);if(n){if(x(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,v(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}}());return Hf}var qf,Wf,Kf,Yf={};function Qf(){if(qf)return Yf;qf=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};return Yf.camelCase=function(s,l){return void 0===l&&(l={}),function(t){return!t||n.test(t)||e.test(t)}(s)?s:(s=s.toLowerCase(),(s=l.reactCompat?s.replace(o,a):s.replace(r,a)).replace(t,i))},Yf}const Xf=r(function(){if(Kf)return Wf;Kf=1;var e=(Wf&&Wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})($f()),t=Qf();function n(n,r){var o={};return n&&"string"==typeof n?((0,e.default)(n,function(e,n){e&&n&&(o[(0,t.camelCase)(e,r)]=n)}),o):o}return n.default=n,Wf=n}()),Gf=Zf("end"),Jf=Zf("start");function Zf(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ep(e){return e&&"object"==typeof e?"position"in e||"type"in e?np(e.position):"start"in e||"end"in e?np(e):"line"in e||"column"in e?tp(e):"":""}function tp(e){return rp(e&&e.line)+":"+rp(e&&e.column)}function np(e){return tp(e&&e.start)+"-"+tp(e&&e.end)}function rp(e){return e&&"number"==typeof e?e:1}class op extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.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=r,this.line=a?a.line:void 0,this.name=ep(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=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}op.prototype.file="",op.prototype.name="",op.prototype.reason="",op.prototype.message="",op.prototype.stack="",op.prototype.column=void 0,op.prototype.line=void 0,op.prototype.ancestors=void 0,op.prototype.cause=void 0,op.prototype.fatal=void 0,op.prototype.place=void 0,op.prototype.ruleId=void 0,op.prototype.source=void 0;const ip={}.hasOwnProperty,ap=new Map,sp=/[A-Z]/g,lp=new Set(["table","tbody","thead","tfoot","tr"]),cp=new Set(["td","th"]),up="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dp(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=Jf(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?If:Ff,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=fp(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function fp(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=If,e.schema=o);e.ancestors.push(t);const i=yp(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&ip.call(t.properties,o)){const i=gp(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&cp.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=mp(e,t);lp.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&of(t.value):of(t));var t}));return pp(e,a,i,t),hp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}vp(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=If,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:yp(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];Gd(t.type);const o=t.expression;Gd(o.type);const i=o.properties[0];Gd(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else vp(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Gd(t.type),i=e.evaluater.evaluateExpression(t.expression)}else vp(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=mp(e,t);return pp(e,a,i,t),hp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vp(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return hp(r,mp(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function pp(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mp(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:ap;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=fp(e,i,a);void 0!==s&&n.push(s)}return n}function gp(e,t,n){const r=function(e,t){const n=lf(t);let r=t,o=cf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&_f.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Df,zf);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Df.test(e)){let n=e.replace(Lf,Mf);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=wf}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Xf(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new op("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=up+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)ip.call(e,n)&&(t[bp(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Of[r.property]||r.property:r.attribute,n]}}function yp(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=nf(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=nf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return ip.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);vp(e)}function vp(e,t){const n=new op("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=up+"#cannot-handle-mdx-estrees-without-createevaluater",n}function bp(e){let t=e.replace(sp,xp);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function xp(e){return"-"+e.toLowerCase()}const wp={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"]},kp={};function Sp(e,t){return Ep(e,"boolean"!=typeof kp.includeImageAlt||kp.includeImageAlt,"boolean"!=typeof kp.includeHtml||kp.includeHtml)}function Ep(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cp(e.children,t,n)}return Array.isArray(e)?Cp(e,t,n):""}function Cp(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ep(e[o],t,n);return r.join("")}const Tp=document.createElement("i");function Pp(e){const t="&"+e+";";Tp.innerHTML=t;const n=Tp.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Ap(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Rp(e,t){return e.length>0?(Ap(e,e.length,0,t),e):t}const Np={}.hasOwnProperty;function jp(e){const t={};let n=-1;for(;++n<e.length;)Op(t,e[n]);return t}function Op(e,t){let n;for(n in t){const r=(Np.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Np.call(r,i)||(r[i]=[]);const e=o[i];Lp(r[i],Array.isArray(e)?e:e?[e]:[])}}}function Lp(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Ap(e,0,0,r)}function Dp(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function _p(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mp=Yp(/[A-Za-z]/),zp=Yp(/[\dA-Za-z]/),Fp=Yp(/[#-'*+\--9=?A-Z^-~]/);function Ip(e){return null!==e&&(e<32||127===e)}const Bp=Yp(/\d/),Vp=Yp(/[\dA-Fa-f]/),Up=Yp(/[!-/:-@[-`{-~]/);function Hp(e){return null!==e&&e<-2}function $p(e){return null!==e&&(e<0||32===e)}function qp(e){return-2===e||-1===e||32===e}const Wp=Yp(new RegExp("\\p{P}|\\p{S}","u")),Kp=Yp(/\s/);function Yp(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Qp(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&zp(e.charCodeAt(n+1))&&zp(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xp(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(qp(r))return e.enter(n),a(r);return t(r)};function a(r){return qp(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const Gp={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Xp(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Hp(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Jp={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Ap(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zp,u,d)(o)}function u(e){return r&&v(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(Zp,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Hp(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Ap(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Zp={tokenize:function(e,t,n){return Xp(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function eh(e){return null===e||$p(e)||Kp(e)?1:Wp(e)?2:void 0}function th(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const nh={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[u][1].start};rh(d,-s),rh(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Rp(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Rp(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=Rp(l,th(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Rp(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Rp(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Ap(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=eh(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=eh(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function rh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const oh={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return Mp(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||zp(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||zp(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Ip(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):Fp(t)?(e.consume(t),l):n(t)}function c(e){return zp(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||zp(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const ih={partial:!0,tokenize:function(e,t,n){return function(t){return qp(t)?Xp(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Hp(e)?t(e):n(e)}}};const ah={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(qp(t))return Xp(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(ah,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return qp(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const sh={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Up(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const lh={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=zp,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Vp,c):(e.enter("characterReferenceValue"),o=7,i=Bp,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==zp||Pp(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const ch={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},uh={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),qp(t)?Xp(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),qp(t)?Xp(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Hp(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),qp(t)?Xp(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Hp(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(ch,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Hp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):qp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xp(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||Hp(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||Hp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&qp(t)?Xp(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||Hp(t)?e.check(ch,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Hp(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const dh={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Xp(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):Hp(t)?e.attempt(fh,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||Hp(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},fh={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Hp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Xp(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):Hp(e)?o(e):n(e)}}};const ph={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):Hp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Hp(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class hh{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&mh(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),mh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),mh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);mh(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);mh(this.left,t.reverse())}}}function mh(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 gh(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new hh(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,yh(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return Ap(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function yh(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=s.slice(g[f],g[f+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const vh={resolve:function(e){return gh(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Hp(t)?e.check(bh,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},bh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Xp(e,o,"linePrefix")};function o(o){if(null===o||Hp(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function xh(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||Ip(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Hp(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!$p(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||Ip(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function wh(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):Hp(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Hp(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!qp(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function kh(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):Hp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Xp(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||Hp(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function Sh(e,t){let n;return function r(o){if(Hp(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(qp(o))return Xp(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Eh={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return wh.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=_p(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return $p(t)?Sh(e,s)(t):s(t)}function s(t){return xh(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ch,c,c)(t)}function c(t){return qp(t)?Xp(e,u,"whitespace")(t):u(t)}function u(i){return null===i||Hp(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Ch={partial:!0,tokenize:function(e,t,n){return function(t){return $p(t)?Sh(e,r)(t):n(t)};function r(t){return kh(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return qp(t)?Xp(e,i,"whitespace")(t):i(t)}function i(e){return null===e||Hp(e)?t(e):n(e)}}};const Th={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Hp(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Ph={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},Ap(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||$p(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||Hp(n)?(e.exit("atxHeading"),t(n)):qp(n)?Xp(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||$p(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Ah=["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"],Rh=["pre","script","style","textarea"],Nh={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:D):Mp(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):Mp(i)?(e.consume(i),o=4,r.interrupt?t:D):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:D):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:T:f):n(o)}function p(t){return Mp(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||$p(s)){const l=47===s,c=a.toLowerCase();return l||i||!Rh.includes(c)?Ah.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):T(s))}return 45===s||zp(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:T):n(o)}function g(t){return qp(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||Mp(t)?(e.consume(t),v):qp(t)?(e.consume(t),y):E(t)}function v(t){return 45===t||46===t||58===t||95===t||zp(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),x):qp(t)?(e.consume(t),b):y(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):qp(t)?(e.consume(t),x):k(t)}function w(t){return t===l?(e.consume(t),l=null,S):null===t||Hp(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||$p(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||qp(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||Hp(t)?T(t):qp(t)?(e.consume(t),C):n(t)}function T(t){return 45===t&&2===o?(e.consume(t),N):60===t&&1===o?(e.consume(t),j):62===t&&4===o?(e.consume(t),_):63===t&&3===o?(e.consume(t),D):93===t&&5===o?(e.consume(t),L):!Hp(t)||6!==o&&7!==o?null===t||Hp(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(jh,M,P)(t))}function P(t){return e.check(Oh,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),R}function R(t){return null===t||Hp(t)?P(t):(e.enter("htmlFlowData"),T(t))}function N(t){return 45===t?(e.consume(t),D):T(t)}function j(t){return 47===t?(e.consume(t),a="",O):T(t)}function O(t){if(62===t){const n=a.toLowerCase();return Rh.includes(n)?(e.consume(t),_):T(t)}return Mp(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),O):T(t)}function L(t){return 93===t?(e.consume(t),D):T(t)}function D(t){return 62===t?(e.consume(t),_):45===t&&2===o?(e.consume(t),D):T(t)}function _(t){return null===t||Hp(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),_)}function M(n){return e.exit("htmlFlow"),t(n)}}},jh={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(ih,t,n)}}},Oh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Hp(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const Lh={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),v):Mp(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):Mp(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Hp(t)?(a=u,O(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?j(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Hp(t)?(a=h,O(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?j(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?j(t):Hp(t)?(a=y,O(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):Hp(t)?(a=v,O(t)):(e.consume(t),v)}function b(e){return 62===e?j(e):v(e)}function x(t){return Mp(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||zp(t)?(e.consume(t),w):k(t)}function k(t){return Hp(t)?(a=k,O(t)):qp(t)?(e.consume(t),k):j(t)}function S(t){return 45===t||zp(t)?(e.consume(t),S):47===t||62===t||$p(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),j):58===t||95===t||Mp(t)?(e.consume(t),C):Hp(t)?(a=E,O(t)):qp(t)?(e.consume(t),E):j(t)}function C(t){return 45===t||46===t||58===t||95===t||zp(t)?(e.consume(t),C):T(t)}function T(t){return 61===t?(e.consume(t),P):Hp(t)?(a=T,O(t)):qp(t)?(e.consume(t),T):E(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):Hp(t)?(a=P,O(t)):qp(t)?(e.consume(t),P):(e.consume(t),R)}function A(t){return t===o?(e.consume(t),o=void 0,N):null===t?n(t):Hp(t)?(a=A,O(t)):(e.consume(t),A)}function R(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||$p(t)?E(t):(e.consume(t),R)}function N(e){return 47===e||62===e||$p(e)?E(e):n(e)}function j(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return qp(t)?Xp(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),a(t)}}};const Dh={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Ap(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=Rp(i,e.slice(r+1,r+s+3)),i=Rp(i,[["enter",u,t]]),i=Rp(i,th(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Rp(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=Rp(i,e.slice(o+1)),i=Rp(i,[["exit",l,t]]),Ap(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(_p(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(_h,c,i?c:u)(t):91===t?e.attempt(Mh,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(zh,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},_h={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return $p(t)?Sh(e,o)(t):o(t)}function o(t){return 41===t?c(t):xh(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return $p(t)?Sh(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?kh(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return $p(t)?Sh(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Mh={tokenize:function(e,t,n){const r=this;return function(t){return wh.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(_p(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},zh={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Fh={name:"labelStartImage",resolveAll:Dh.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Ih={name:"labelStartLink",resolveAll:Dh.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Bh={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Xp(e,t,"linePrefix")}}};const Vh={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||Hp(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),qp(t)?Xp(e,i,"whitespace")(t):i(t))}}};const Uh={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ih,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xp(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!qp(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($h,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xp(e,e.attempt(Uh,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:Bp(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Vh,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Bp(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(ih,r.interrupt?n:c,e.attempt(Hh,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return qp(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Hh={partial:!0,tokenize:function(e,t,n){const r=this;return Xp(e,function(e){const o=r.events[r.events.length-1];return!qp(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},$h={partial:!0,tokenize:function(e,t,n){const r=this;return Xp(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const qh={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),qp(t)?Xp(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||Hp(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Wh={tokenize:function(e){const t=this,n=e.attempt(ih,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,Xp(e,e.attempt(this.parser.constructs.flow,r,e.attempt(vh,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Kh={resolveAll:Gh()},Yh=Xh("string"),Qh=Xh("text");function Xh(e){return{resolveAll:Gh("text"===e?Jh:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Gh(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Jh(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Zh={42:Uh,43:Uh,45:Uh,48:Uh,49:Uh,50:Uh,51:Uh,52:Uh,53:Uh,54:Uh,55:Uh,56:Uh,57:Uh,62:ah},em={91:Eh},tm={[-2]:dh,[-1]:dh,32:dh},nm={35:Ph,42:Vh,45:[qh,Vh],60:Nh,61:qh,95:Vh,96:uh,126:uh},rm={38:lh,92:sh},om={[-5]:Bh,[-4]:Bh,[-3]:Bh,33:Fh,38:lh,42:nh,60:[oh,Lh],91:Ih,92:[Th,sh],93:Dh,95:nh,96:ph},im={null:[nh,Kh]},am=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:em,disable:{null:[]},document:Zh,flow:nm,flowInitial:tm,insideSpan:im,string:rm,text:om},Symbol.toStringTag,{value:"Module"}));function sm(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 o={},i=[];let a=[],s=[];const l={attempt:g(function(e,t){y(e,t.from)}),check:g(m),consume:function(e){Hp(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=Rp(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=th(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,v()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Ap(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const lm=/[\0\t\n\r]/g;const cm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function um(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Dp(n.slice(t?2:1),t?16:10)}return Pp(n)||e}const dm={}.hasOwnProperty;function fm(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:C,autolinkEmail:C,atxHeading:i(G),blockQuote:i(W),characterEscape:C,characterReference:C,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(Y,a),codeTextData:C,data:C,codeFlowValue:C,definition:i(Q),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(X),hardBreakEscape:i(J),hardBreakTrailing:i(J),htmlFlow:i(Z,a),htmlFlowData:C,htmlText:i(Z,a),htmlTextData:C,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:I,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(G),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:q,autolinkProtocol:$,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:U,characterReference:H,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(j),codeTextData:T,data:T,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(R),htmlFlowData:T,htmlText:l(N),htmlTextData:T,image:l(L),label:_,labelText:D,lineEnding:P,link:l(O),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:z,resource:F,setextHeading:l(E),setextHeadingLineSequence:S,setextHeadingText:k,strong:l(),thematicBreak:l()}};hm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];dm.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||gm).call(i,void 0,e[0])}for(r.position={start:pm(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:pm(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:pm(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+ep({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||gm).call(this,e,r[0])}n.position.end=pm(e.end)}function u(){return Sp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_p(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function C(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:pm(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=pm(e.end)}function P(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=pm(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(cm,um)}(t),n.identifier=_p(t).toLowerCase()}function _(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_p(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function V(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Dp(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Pp(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=pm(e.end)}function $(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function Q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function G(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!gh(e););return e}(function(e){const t={constructs:jp([am,...(e||{}).extensions||[]]),content:n(Gp),defined:[],document:n(Jp),flow:n(Wh),lazy:{},string:n(Yh),text:n(Qh)};return t;function n(e){return function(n){return sm(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(lm.lastIndex=u,l=lm.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===f&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),f){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function pm(e){return{line:e.line,column:e.column,offset:e.offset}}function hm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?hm(e,r):mm(e,r)}}function mm(e,t){let n;for(n in t)if(dm.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 gm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ep({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ep({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ep({start:t.start,end:t.end})+") is still open")}function ym(e){const t=this;t.parser=function(n){return fm(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vm(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function bm(e){const t=e.spread;return null==t?e.children.length>1:t}function xm(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(wm(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(wm(t.slice(o),o>0,!1)),i.join("")}function wm(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const km={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Qp(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vm(e,t);const o={src:Qp(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Qp(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vm(e,t);const o={href:Qp(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:Qp(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=bm(n[r])}return t}(n):bm(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Jf(t.children[1]),a=Gf(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:xm(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Sm,yaml:Sm,definition:Sm,footnoteDefinition:Sm};function Sm(){}const Em="object"==typeof self?self:globalThis,Cm=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Em[e](t)},Tm=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(Cm(e,t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(Cm(i,a),o)};return r})(new Map,e)(0),Pm="",{toString:Am}={},{keys:Rm}=Object,Nm=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Am.call(e).slice(8,-1);switch(n){case"Array":return[1,Pm];case"Object":return[2,Pm];case"Date":return[3,Pm];case"RegExp":return[4,Pm];case"Map":return[5,Pm];case"Set":return[6,Pm];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},jm=([e,t])=>0===e&&("function"===t||"symbol"===t),Om=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=Nm(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const n of r)e.push(i(n));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of Rm(r))!e&&jm(Nm(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[o,a]of r)(e||!jm(Nm(o))&&!jm(Nm(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&jm(Nm(o))||t.push(i(o));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},Lm="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Tm(Om(e,t)):structuredClone(e):(e,t)=>Tm(Om(e,t));function Dm(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 _m(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Mm=function(e){if(null==e)return Fm;if("function"==typeof e)return zm(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Mm(e[n]);return zm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return zm(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return zm(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function zm(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Fm(){return!0}const Im=[],Bm=!0,Vm=!1;function Um(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Mm(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,f=Im;if((!t||i(o,s,l[l.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Bm,e];return null==e?Im:[e]}(n(o,l)),f[0]===Vm))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Vm)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function Hm(e,t,n,r){let o,i,a;"function"==typeof t&&"function"!=typeof n?(i=void 0,a=t,o=n):(i=t,a=n,o=r),Um(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const $m={}.hasOwnProperty,qm={};function Wm(e,t){e.position&&(t.position=function(e){const t=Jf(e),n=Gf(e);if(t&&n)return{start:t,end:n}}(e))}function Km(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,Lm(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Ym(e,t){const n=t.data||{},r=!("value"in t)||$m.call(n,"hProperties")||$m.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Qm(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Xm(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gm(e,t){const n=function(e,t){const n=t||qm,r=new Map,o=new Map,i=new Map,a={...km,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Xm(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Xm(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Km,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if($m.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Lm(n);return r.children=s.all(e),r}return Lm(e)}return(s.options.unknownHandler||Ym)(s,e,t)},options:n,patch:Wm,wrap:Qm};return Hm(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Dm,r=e.options.footnoteBackLabel||_m,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=Qp(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Lm(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Jm(e,t){return e&&"run"in e?async function(n,r){const o=Gm(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Gm(n,{file:r,...e||t})}}function Zm(e){if(e)throw e}var eg,tg;var ng=function(){if(tg)return eg;tg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return eg=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},eg}();const rg=r(ng);function og(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function ig(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(o);try{s=e.apply(this,t)}catch(i){if(r&&n)throw i;return o(i)}r||(s&&s.then&&"function"==typeof s.then?s.then(a,o):s instanceof Error?o(s):a(s))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const ag={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');sg(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(sg(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){sg(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)sg(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){sg(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function sg(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lg={cwd:function(){return"/"}};function cg(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function ug(e){if("string"==typeof e)e=new URL(e);else if(!cg(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const dg=["history","path","basename","stem","extname","dirname"];class fg{constructor(e){let t;t=e?cg(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":lg.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<dg.length;){const e=dg[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)dg.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?ag.basename(this.path):void 0}set basename(e){hg(e,"basename"),pg(e,"basename"),this.path=ag.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ag.dirname(this.path):void 0}set dirname(e){mg(this.basename,"dirname"),this.path=ag.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ag.extname(this.path):void 0}set extname(e){if(pg(e,"extname"),mg(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ag.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){cg(e)&&(e=ug(e)),hg(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ag.basename(this.path,this.extname):void 0}set stem(e){hg(e,"stem"),pg(e,"stem"),this.path=ag.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new op(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function pg(e,t){if(e&&e.includes(ag.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ag.sep+"`")}function hg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function mg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const gg=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},yg={}.hasOwnProperty;class vg extends gg{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=ig()}copy(){const e=new vg;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(rg(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(kg("data",this.frozen),this.namespace[e]=t,this):yg.call(this.namespace,e)&&this.namespace[e]||void 0:e?(kg("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Cg(e),n=this.parser||this.Parser;return xg("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),xg("process",this.parser||this.Parser),wg("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=Cg(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),xg("processSync",this.parser||this.Parser),wg("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Zm(e),t=r}),Eg("processSync","process",n),t}run(e,t,n){Sg(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=Cg(t);r.run(e,a,function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Zm(e),n=t,r=!0}),Eg("runSync","run",r),n}stringify(e,t){this.freeze();const n=Cg(t),r=this.compiler||this.Compiler;return wg("stringify",r),Sg(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(kg("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=rg(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];og(a)&&og(r)&&(r=rg(!0,a,r)),n[o]=[e,r,...i]}}}}const bg=(new vg).freeze();function xg(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function wg(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function kg(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 Sg(e){if(!og(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Eg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cg(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new fg(e)}const Tg=[],Pg={allowDangerousHtml:!0},Ag=/^(https?|ircs?|mailto|xmpp)$/i,Rg=[{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 Ng(e){const t=function(e){const t=e.rehypePlugins||Tg,n=e.remarkPlugins||Tg,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Pg}:Pg,o=bg().use(ym).use(n).use(Jm,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new fg;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||jg;for(const u of Rg)Object.hasOwn(t,u.from)&&Jd((u.from,u.to&&u.to,u.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Hm(e,c),dp(e,{Fragment:$.Fragment,components:o,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function c(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return a?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in wp)if(Object.hasOwn(wp,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=wp[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,o)),a&&o&&"number"==typeof t)return s&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function jg(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Ag.test(e.slice(0,t))?e:""}function Og(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function Lg(e,t,n){const r=Mm((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Dg(e[0]),_g(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)Um(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Dg(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function _g(e){return"function"==typeof e?e:function(){return e}}const Mg="phrasing",zg=["autolink","link","image","label"];function Fg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ig(e){this.config.enter.autolinkProtocol.call(this,e)}function Bg(e){this.config.exit.autolinkProtocol.call(this,e)}function Vg(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ug(e){this.config.exit.autolinkEmail.call(this,e)}function Hg(e){this.exit(e)}function $g(e){Lg(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qg],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Wg]],{ignore:["link","linkReference"]})}function qg(e,t,n,r,o){let i="";if(!Kg(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Og(e,"(");let i=Og(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Wg(e,t,n,r){return!(!Kg(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Kg(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Kp(n)||Wp(n))&&(!t||47!==n)}function Yg(){this.buffer()}function Qg(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Xg(){this.buffer()}function Gg(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Jg(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_p(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zg(e){this.exit(e)}function ey(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_p(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ty(e){this.exit(e)}function ny(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function ry(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?iy:oy)));return s(),a},footnoteReference:ny},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function oy(e,t,n){return 0===t?e:iy(e,t,n)}function iy(e,t,n){return(n?"":" ")+e}ny.peek=function(){return"["};const ay=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sy(e){this.enter({type:"delete",children:[]},e)}function ly(e){this.exit(e)}function cy(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function uy(e){return e.length}function dy(e){return null==e?"":String(e)}function fy(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function py(e,t,n){return">"+(n?"":" ")+e}function hy(e,t){return my(e,t.inConstruct,!0)&&!my(e,t.notInConstruct,!1)}function my(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function gy(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&hy(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function yy(e,t,n){return(n?"":" ")+e}function vy(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function by(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xy(e,t,n){const r=eh(e),o=eh(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function wy(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=xy(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=by(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=xy(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+by(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function ky(e){return e.value||""}function Sy(e,t,n,r){const o=vy(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function Ey(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Cy(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function Ty(e,t){const n=Sp(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Py(e,t,n,r){const o=vy(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Ty(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function Ay(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ry(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ny(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}cy.peek=function(){return"~"},wy.peek=function(e,t,n){return n.options.emphasis||"*"},ky.peek=function(){return"<"},Sy.peek=function(){return"!"},Ey.peek=function(){return"!"},Cy.peek=function(){return"`"},Py.peek=function(e,t,n){return Ty(e,n)?"<":"["},Ay.peek=function(){return"["};const jy=Mm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Oy(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=xy(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=by(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=xy(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+by(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}Oy.peek=function(e,t,n){return n.options.strong||"*"};const Ly={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),py);return o(),a},break:gy,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,yy);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=vy(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:wy,hardBreak:gy,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return Hm(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Vm}),Boolean((!e.depth||e.depth<3)&&Sp(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=by(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:ky,image:Sy,imageReference:Ey,inlineCode:Cy,link:Py,linkReference:Ay,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Ry(n);const s=e.ordered?"."===a?")":".":function(e){const t=Ry(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ny(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||Ry(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e});return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some(function(e){return jy(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Oy,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ny(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Dy(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function _y(e){this.exit(e),this.data.inTable=void 0}function My(e){this.enter({type:"tableRow",children:[]},e)}function zy(e){this.exit(e)}function Fy(e){this.enter({type:"tableCell",children:[]},e)}function Iy(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,By));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function By(e,t){return"|"===t?t:e}function Vy(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Ly.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s([l(e,n,r)]);return o.slice(0,o.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||uy,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=dy(e[u][i]);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)i[d]=fy(r[d]);else{const e=fy(r);for(;++d<c;)i[d]=e}d=-1;const f=[],p=[];for(;++d<c;){const e=i[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[d]&&(l[d]=o),p[d]=o),f[d]=a}a.splice(1,0,f),s.splice(1,0,p),u=-1;const h=[];for(;++u<a.length;){const e=a[u],t=s[u];d=-1;const r=[];for(;++d<c;){const o=e[d]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=i[d];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function Uy(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Hy(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function $y(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=Ly.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const qy={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Wy={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(Yy,l,s)(t):null===t||$p(t)||Kp(t)||45!==t&&Wp(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},Ky={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(Yy,t,i)(a):null===a||$p(a)||Kp(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Yy={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||$p(a)||Kp(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||$p(e)||Kp(e)?t(e):r(e)}function i(e){return Mp(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):Mp(t)?(e.consume(t),a):n(t)}},partial:!0},Qy={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return zp(e)?n(e):t(e)}},partial:!0},Xy={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!tv.call(r,r.previous)||iv(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(qy,e.attempt(Wy,e.attempt(Ky,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:tv},Gy={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&nv.call(r,r.previous)&&!iv(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(Mp(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||Ip(t)||$p(t)||Kp(t)||Wp(t)?n(t):e.attempt(Wy,e.attempt(Ky,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:nv},Jy={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!ov(t)||!rv.call(r,r.previous)||iv(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return ov(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Qy,c,l)(t):45===t||95===t||zp(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&Mp(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:rv},Zy={};let ev=48;for(;ev<123;)Zy[ev]=Jy,ev++,58===ev?ev=65:91===ev&&(ev=97);function tv(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||$p(e)}function nv(e){return!Mp(e)}function rv(e){return!(47===e||ov(e))}function ov(e){return 43===e||45===e||46===e||95===e||zp(e)}function iv(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Zy[43]=Jy,Zy[45]=Jy,Zy[46]=Jy,Zy[95]=Jy,Zy[72]=[Jy,Gy],Zy[104]=[Jy,Gy],Zy[87]=[Jy,Xy],Zy[119]=[Jy,Xy];const av={tokenize:function(e,t,n){const r=this;return Xp(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function sv(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=_p(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function lv(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function cv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||$p(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(_p(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return $p(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function uv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||$p(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=_p(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return $p(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),Xp(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function dv(e,t,n){return e.check(ih,t,e.attempt(av,t,n))}function fv(e){e.exit("gfmFootnoteDefinition")}function pv(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=eh(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=eh(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&Ap(a,a.length,0,th(s,e.slice(r+1,n),t)),Ap(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),Ap(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class hv{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function mv(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function gv(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?x:s;if(i===x&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):Hp(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):qp(t)?Xp(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||$p(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,qp(t)?Xp(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return qp(t)?Xp(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||Hp(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return qp(t)?Xp(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||Hp(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function x(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||Hp(n)?(e.exit("tableRow"),t(n)):qp(n)?Xp(e,w,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||$p(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function yv(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new hv;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(bv(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=vv(f,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=vv(f,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=vv(f,t,l,s,i,o)):0!==c[1]&&(o=vv(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&bv(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=mv(t.events,i))}return e}function vv(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},xv(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=xv(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=xv(t.events,n[2]),i=xv(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},xv(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function bv(e,t,n,r,o){const i=[],a=xv(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function xv(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const wv={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return $p(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return Hp(r)?t(r):qp(r)?e.check({tokenize:kv},t,n)(r):n(r)}}};function kv(e,t,n){return Xp(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Sv={};function Ev(e){const t=e||Sv,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return jp([{text:Zy},{document:{91:{name:"gfmFootnoteDefinition",tokenize:uv,continuation:{tokenize:dv},exit:fv}},text:{91:{name:"gfmFootnoteCall",tokenize:cv},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sv,resolveTo:lv}}},pv(e),{flow:{null:{name:"table",tokenize:gv,resolveAll:yv}}},{text:{91:wv}}])}(t)),o.push([{transforms:[$g],enter:{literalAutolink:Fg,literalAutolinkEmail:Ig,literalAutolinkHttp:Ig,literalAutolinkWww:Ig},exit:{literalAutolink:Hg,literalAutolinkEmail:Ug,literalAutolinkHttp:Bg,literalAutolinkWww:Vg}},{enter:{gfmFootnoteCallString:Yg,gfmFootnoteCall:Qg,gfmFootnoteDefinitionLabelString:Xg,gfmFootnoteDefinition:Gg},exit:{gfmFootnoteCallString:Jg,gfmFootnoteCall:Zg,gfmFootnoteDefinitionLabelString:ey,gfmFootnoteDefinition:ty}},{canContainEols:["delete"],enter:{strikethrough:sy},exit:{strikethrough:ly}},{enter:{table:Dy,tableData:Fy,tableHeader:Fy,tableRow:My},exit:{codeText:Iy,table:_y,tableData:zy,tableHeader:zy,tableRow:zy}},{exit:{taskListCheckValueChecked:Uy,taskListCheckValueUnchecked:Uy,paragraph:Hy}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mg,notInConstruct:zg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mg,notInConstruct:zg},{character:":",before:"[ps]",after:"\\/",inConstruct:Mg,notInConstruct:zg}]},ry(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ay}],handlers:{delete:cy}},Vy(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$y}}]}}(t))}const Cv=({content:e})=>$.jsx("div",{className:"prose-custom",children:$.jsx(Ng,{remarkPlugins:[Ev],children:e})}),Tv=({message:e})=>{const t="assistant"===e.role,{config:n}=Qd();return $.jsx("div",{className:`flex w-full ${t?"justify-start":"justify-end"} mb-6 animate-in fade-in slide-in-from-bottom-2 duration-300`,children:$.jsxs("div",{className:`flex max-w-[88%] ${t?"flex-row":"flex-row-reverse"} gap-3`,children:[$.jsx("div",{className:`\n h-8 w-8 rounded-full flex items-center justify-center shrink-0 shadow-sm border \n ${t?"bg-white border-slate-100":"border-transparent text-white"}\n `,style:t?{}:{backgroundColor:n.primaryColor},children:t?$.jsx(Dl,{size:16,style:{color:n.primaryColor},strokeWidth:2.5}):$.jsx(cc,{size:16,strokeWidth:2.5})}),$.jsxs("div",{className:"flex flex-col gap-2 "+(t?"items-start":"items-end"),children:[$.jsx("div",{className:"\n px-4 py-3 rounded-2xl shadow-[0_2px_10px_rgba(0,0,0,0.02)] transition-all\n "+(t?"bg-white/90 backdrop-blur-md border border-white/50 text-slate-800 rounded-tl-none":"text-white rounded-tr-none shadow-md"),style:t?{}:{backgroundColor:n.primaryColor},children:$.jsx(Cv,{content:e.content})}),t&&e.sources&&e.sources.length>0&&$.jsxs("div",{className:"mt-2 w-full animate-in fade-in slide-in-from-top-1 duration-500",children:[$.jsxs("div",{className:"flex items-center gap-1.5 mb-2 ml-1",children:[$.jsx(oc,{size:10,className:"text-slate-400"}),$.jsx("span",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"Sources consultées"})]}),$.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.sources.map((e,t)=>$.jsxs("div",{title:e,className:"\r\n flex items-center gap-1.5 px-2.5 py-1 \r\n bg-slate-100/50 border border-slate-200/60 rounded-full \r\n text-[10px] font-bold text-slate-500 \r\n hover:bg-white hover:border-blue-300 hover:text-blue-600 \r\n transition-all cursor-help max-w-[160px]\r\n ",children:[$.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-blue-400 shrink-0 shadow-sm"}),$.jsx("span",{className:"truncate",children:e.split("/").pop()})]},t))})]})]})]})})},Pv=({file:e,onRemove:t})=>$.jsxs(Rl.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},className:"flex items-center gap-2 px-3 py-1.5 bg-blue-50 border border-blue-100 rounded-xl text-[11px] text-blue-600 font-bold shadow-sm",children:[$.jsx($l,{size:12}),$.jsx("span",{className:"truncate max-w-[100px]",children:e.name}),$.jsx("button",{onClick:t,className:"hover:text-red-500 transition-colors border-none bg-transparent cursor-pointer",children:$.jsx(uc,{size:12})})]}),Av=({onSend:e,disabled:t})=>{const[n,r]=u.useState(""),[o,i]=u.useState([]),{config:a}=Qd(),s=u.useRef(null),l=()=>{(n.trim()||o.length>0)&&!t&&(e(n,o),r(""),i([]))};return $.jsxs("div",{className:"space-y-3",children:[$.jsx(ds,{children:o.length>0&&$.jsx("div",{className:"flex flex-wrap gap-2 animate-in fade-in slide-in-from-bottom-2",children:o.map((e,t)=>$.jsx(Pv,{file:e,onRemove:()=>{return e=t,void i(o.filter((t,n)=>n!==e));var e}},t))})}),$.jsxs("div",{className:"relative flex items-end gap-2 bg-white/70 backdrop-blur-md border border-slate-200 rounded-2xl p-2 focus-within:border-blue-400 transition-all shadow-sm",children:[$.jsx("input",{type:"file",multiple:!0,ref:s,onChange:e=>{e.target.files&&i([...o,...Array.from(e.target.files)])},className:"hidden"}),$.jsx("button",{onClick:()=>{var e;return null==(e=s.current)?void 0:e.click()},className:"p-2 text-slate-400 hover:text-blue-600 transition-colors border-none bg-transparent cursor-pointer",children:$.jsx(Jl,{size:20})}),$.jsx("textarea",{rows:1,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),l()),placeholder:"Envoyez un message ou un fichier...",className:"w-full bg-transparent border-none focus:ring-0 resize-none py-2 text-[14px] text-slate-700 max-h-32 outline-none"}),$.jsx("button",{onClick:l,disabled:!n.trim()&&0===o.length||t,className:"p-2 rounded-xl text-white disabled:opacity-30 transition-all border-none cursor-pointer",style:{backgroundColor:a.primaryColor},children:t?$.jsx(Yl,{size:20,className:"animate-spin"}):$.jsx(tc,{size:20})})]})]})},Rv=({onSuggestion:e})=>{const{botName:t,logoUrl:n,primaryColor:r}=pc(),o=[{label:"Quelles sont les dernières actualités ?",icon:sc},{label:"Comment configurer mon profil ?",icon:Xl},{label:"Résume-moi le dernier document RH",icon:$l}];return $.jsxs("div",{className:"flex flex-col items-center justify-center p-8 text-center animate-in fade-in zoom-in duration-500",children:[$.jsxs("div",{className:"relative mb-6",children:[$.jsx("div",{className:"h-20 w-20 rounded-[24px] bg-white shadow-xl flex items-center justify-center p-4 border border-slate-50",children:$.jsx("img",{src:n,alt:t,className:"h-full w-full object-contain"})}),$.jsx("div",{style:{backgroundColor:r},className:"absolute -bottom-2 -right-2 h-8 w-8 rounded-xl border-4 border-white flex items-center justify-center text-white",children:$.jsx(Dl,{size:16,strokeWidth:3})})]}),$.jsxs("h1",{className:"text-xl font-black text-slate-800 mb-2 tracking-tight",children:["Bonjour, je suis ",t]}),$.jsx("p",{className:"text-sm text-slate-400 mb-10 max-w-[240px] leading-relaxed",children:"Votre assistant intelligent. Je peux analyser vos documents et répondre à vos questions."}),$.jsxs("div",{className:"w-full space-y-2",children:[$.jsx("p",{className:"text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] mb-4",children:"Suggestions"}),o.map((t,n)=>$.jsxs("button",{onClick:()=>e(t.label),className:"w-full flex items-center gap-3 p-3 bg-white border border-slate-100 rounded-2xl text-xs font-bold text-slate-600 hover:border-blue-200 hover:shadow-md transition-all cursor-pointer text-left",children:[$.jsx("div",{className:"p-1.5 bg-slate-50 rounded-lg text-slate-400",children:$.jsx(t.icon,{size:14})}),t.label]},n))]})]})},Nv=()=>$.jsxs("div",{className:"flex gap-3 mb-4 animate-in fade-in",children:[$.jsx("div",{className:"h-8 w-8 rounded-full bg-white border border-slate-100 flex items-center justify-center",children:$.jsx("div",{className:"flex gap-1",children:[0,1,2].map(e=>$.jsx(Rl.div,{animate:{opacity:[.3,1,.3]},transition:{duration:1,repeat:1/0,delay:.2*e},className:"h-1.5 w-1.5 bg-blue-500 rounded-full"},e))})}),$.jsx("div",{className:"bg-white/50 backdrop-blur-md border border-white/50 px-4 py-3 rounded-2xl rounded-tl-none shadow-sm",children:$.jsx("span",{className:"text-xs text-slate-400 font-medium italic",children:"Recherche dans vos documents..."})})]}),jv=()=>{const{messages:e,addMessage:t,setLoading:n,isLoading:r,activeThreadId:o,setThreadId:i}=Qd(),{initialMessage:a,botName:s,userName:l,apiUrl:c,userToken:d}=pc(),f=u.useRef(null);u.useEffect(()=>{f.current&&f.current.scrollTo({top:f.current.scrollHeight,behavior:"smooth"})},[e,r]);const p=async(e,a=[])=>{if(!e.trim()&&0===a.length||r)return;let s=e.trim();if(a.length>0){s+=`\n\n**Fichiers joints :**\n${a.map(e=>`📄 ${e.name}`).join("\n")}`}t({id:Date.now().toString(),role:"user",content:s,timestamp:new Date}),n(!0);try{a.length>0&&await Yd(c,d,a);const n=a.map(e=>e.name).join(", ");let r=e.trim();a.length>0&&(r=r?`${r}\n\n(Contexte : L'utilisateur a joint les fichiers suivants pour analyse : ${n})`:`Analyse les documents suivants que je viens de t'envoyer : ${n}.`);const s=await Vd(c,d,{message:r,thread_id:o||""});!o&&s.thread_id&&i(s.thread_id),t({id:(Date.now()+1).toString(),role:"assistant",content:s.response,sources:s.sources||[],timestamp:new Date})}catch(l){console.error("Chat Error:",l),t({id:"err-"+Date.now(),role:"assistant",content:"⚠️ Désolé, je n'ai pas pu obtenir de réponse. Veuillez vérifier la connexion au serveur DHI.",timestamp:new Date})}finally{n(!1)}},h=a.replace("{botName}",s).replace("{name}",l);return $.jsxs("div",{className:"flex flex-col h-full bg-transparent overflow-hidden",children:[$.jsx("div",{ref:f,className:"flex-1 overflow-y-auto px-4 py-6 space-y-6 custom-scrollbar scroll-smooth",children:0!==e.length||r?$.jsxs("div",{className:"flex flex-col min-h-full",children:[e.map(e=>$.jsx(Tv,{message:e},e.id)),r&&$.jsx("div",{className:"mt-2",children:$.jsx(Nv,{})})]}):$.jsxs("div",{className:"flex flex-col gap-6 animate-in fade-in duration-700",children:[$.jsx(Tv,{message:{id:"virtual-intro",role:"assistant",content:h,timestamp:new Date}}),$.jsx(Rv,{onSuggestion:e=>p(e)})]})}),$.jsx("div",{className:"p-4 bg-white/40 backdrop-blur-xl border-t border-black/[0.03] shadow-[0_-10px_30px_rgba(0,0,0,0.02)]",children:$.jsxs("div",{className:"max-w-[480px] mx-auto",children:[" ",$.jsx(Av,{onSend:p,disabled:r}),$.jsxs("div",{className:"flex justify-center items-center gap-4 mt-3",children:[$.jsxs("span",{className:"text-[9px] text-slate-400 font-bold uppercase tracking-widest flex items-center gap-1",children:[$.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-500"}),"RAG Active"]}),$.jsx("span",{className:"text-[9px] text-slate-300 font-medium italic",children:"Vérifiez les sources citées."})]})]})})]})},Ov=({onSelectThread:e})=>{const{config:t,threads:n,fetchThreads:r,loadThread:o,isLoading:i,activeThreadId:a}=Qd();u.useEffect(()=>{r()},[]);return $.jsxs("div",{className:"flex flex-col h-full p-6 animate-in fade-in slide-in-from-right-4 overflow-hidden",children:[$.jsxs("button",{onClick:()=>{o(null),e()},style:{backgroundColor:`${t.primaryColor}10`,color:t.primaryColor,borderColor:`${t.primaryColor}30`},className:"flex items-center justify-center gap-2 w-full py-4 rounded-2xl border-2 border-dashed font-bold text-sm mb-8 hover:scale-[1.01] active:scale-[0.98] transition-all cursor-pointer",children:[$.jsx(Zl,{size:18,strokeWidth:3}),"Nouvelle discussion"]}),$.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[$.jsx("h3",{className:"text-[10px] font-black text-slate-400 uppercase tracking-[0.2em]",children:"Conversations récentes"}),$.jsx(Vl,{size:12,className:"text-slate-300"})]}),$.jsx("div",{className:"flex-1 space-y-3 overflow-y-auto custom-scrollbar pr-2 pb-6",children:i&&0===n.length?$.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-3",children:[$.jsx(Yl,{size:24,className:"animate-spin text-slate-300"}),$.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Récupération de l'historique..."})]}):0===n.length?$.jsx("div",{className:"text-center py-12 px-6 border border-dashed border-slate-100 rounded-3xl bg-slate-50/50",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucune discussion trouvée."})}):n.map(n=>$.jsxs("div",{onClick:()=>(async t=>{await o(t),e()})(n.id),className:`\n group relative flex items-center justify-between p-4 rounded-2xl transition-all cursor-pointer border\n ${a===n.id?"bg-white border-blue-100 shadow-md ring-1 ring-blue-50":"bg-white border-slate-100 hover:border-blue-200 hover:shadow-sm"}\n `,children:[a===n.id&&$.jsx("div",{className:"absolute left-0 top-4 bottom-4 w-1 rounded-r-full",style:{backgroundColor:t.primaryColor}}),$.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[$.jsx("div",{className:`\n p-2.5 rounded-xl transition-colors\n ${a===n.id?"bg-blue-50 text-blue-600":"bg-slate-50 text-slate-400 group-hover:text-blue-500 group-hover:bg-blue-50/50"}\n `,children:$.jsx(Xl,{size:18})}),$.jsxs("div",{className:"overflow-hidden",children:[$.jsx("p",{className:"text-sm font-bold text-slate-700 truncate group-hover:text-slate-900 transition-colors",children:n.title||"Discussion sans titre"}),$.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[$.jsxs("span",{className:"text-[9px] font-bold text-slate-400 uppercase tracking-tight group-hover:text-blue-400 transition-colors",children:["ID: ",n.id.slice(-4)]}),n.date&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"text-slate-200 text-[10px]",children:"•"}),$.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-slate-400",children:[$.jsx(_l,{size:10}),$.jsx("span",{children:n.date})]})]})]})]})]}),$.jsx(Il,{size:16,className:"transition-all "+(a===n.id?"text-blue-400 translate-x-0":"text-slate-300 translate-x-[-4px] opacity-0 group-hover:opacity-100 group-hover:translate-x-0")})]},n.id))})]})},Lv=({connector:e})=>{var t,n;const{removeSource:r,syncSource:o,config:i}=Qd(),[a,s]=u.useState(!1),[l,c]=u.useState(!1),d="active"===e.status,f="indexing"===e.status||l,p=e.last_indexed_at?new Date(e.last_indexed_at).toLocaleDateString("fr-FR",{day:"numeric",month:"short"}):null;return $.jsxs("div",{className:`\n group bg-white border rounded-2xl transition-all duration-300 overflow-hidden\n ${a?"shadow-xl border-blue-200":"border-slate-100 hover:border-blue-100 hover:shadow-sm"}\n `,children:[$.jsxs("div",{onClick:()=>s(!a),className:"p-4 flex items-center justify-between cursor-pointer select-none",children:[$.jsxs("div",{className:"flex items-center gap-4 overflow-hidden",children:[$.jsx("div",{className:`\n p-3 rounded-xl transition-colors\n ${f?"bg-amber-50 text-amber-600":d?"bg-blue-50 text-blue-600":"bg-slate-50 text-slate-400"}\n `,children:f?$.jsx(ec,{size:18,className:"animate-spin"}):(e=>{const t={size:18,strokeWidth:2.5};switch(e){case"WEB":return $.jsx(Wl,{...t});case"AWS_S3":return $.jsx(Ul,{...t});case"AZURE_BLOB":return $.jsx(Hl,{...t});case"SFTP":return $.jsx(nc,{...t});default:return $.jsx(Kl,{...t})}})(e.storage_type)}),$.jsxs("div",{className:"overflow-hidden",children:[$.jsx("h3",{className:"text-sm font-bold text-slate-800 truncate group-hover:text-slate-900",children:e.source_id}),$.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[$.jsx("span",{className:"w-1.5 h-1.5 rounded-full "+(f?"bg-amber-500 animate-pulse":d?"bg-emerald-500":"bg-red-500")}),$.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest text-slate-400",children:f?"Synchronisation...":e.status}),p&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"text-slate-200 text-[10px]",children:"•"}),$.jsxs("div",{className:"flex items-center gap-1 text-[9px] text-slate-400 font-bold",children:[$.jsx(_l,{size:10})," ",p]})]})]})]})]}),$.jsxs("div",{className:"flex items-center gap-1",children:[$.jsx("button",{onClick:async t=>{t.stopPropagation(),c(!0);try{await o(e.source_id)}finally{c(!1)}},disabled:f,className:"p-2 text-slate-300 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all",title:"Relancer l'indexation",children:$.jsx(ec,{size:16})}),$.jsx("button",{onClick:async t=>{t.stopPropagation(),window.confirm(`Supprimer la source "${e.source_id}" ?`)&&await r(e.source_id)},className:"p-2 text-slate-300 hover:text-red-500 hover:bg-red-50 rounded-lg transition-all",title:"Supprimer",children:$.jsx(lc,{size:16})}),$.jsx("div",{className:"p-1 text-slate-300 transition-transform duration-300 "+(a?"rotate-180 text-blue-500":""),children:$.jsx(zl,{size:20})})]})]}),$.jsx(ds,{children:a&&$.jsx(Rl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},className:"border-t border-slate-50 bg-slate-50/50",children:$.jsxs("div",{className:"p-4 space-y-3",children:[$.jsx("div",{className:"flex items-center justify-between",children:$.jsxs("p",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest flex items-center gap-2",children:[$.jsx($l,{size:12}),"Documents Indexés (",(null==(t=e.indexed_files)?void 0:t.length)||0,")"]})}),$.jsx("div",{className:`\n space-y-1.5 overflow-y-auto custom-scrollbar pr-1\n ${(null==(n=e.indexed_files)?void 0:n.length)>5?"max-h-48":"h-auto"}\n `,children:e.indexed_files&&e.indexed_files.length>0?e.indexed_files.map((e,t)=>$.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-slate-600 py-2 px-3 bg-white border border-black/[0.03] rounded-xl hover:border-blue-200 transition-colors shadow-sm",children:[$.jsx(Bl,{className:"w-3.5 h-3.5 text-emerald-500 shrink-0"}),$.jsx("span",{className:"truncate flex-1 font-medium",children:e.replace("✅ Indexé:","").replace("✅ Indexé :","").trim()})]},t)):$.jsx("div",{className:"py-6 text-center",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucun document n'a encore été indexé pour cette source."})})})]})})})]})},Dv=({children:e,required:t})=>$.jsxs("label",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5 block ml-1",children:[e," ",t&&$.jsx("span",{className:"text-red-500",children:"*"})]}),_v=({error:e,...t})=>$.jsxs("div",{className:"w-full",children:[$.jsx("input",{...t,className:`w-full p-3 bg-slate-50 border ${e?"border-red-400 bg-red-50":"border-slate-100"} rounded-xl text-sm focus:ring-2 focus:ring-blue-500/20 outline-none transition-all placeholder:text-slate-300`}),e&&$.jsx("p",{className:"text-[9px] text-red-500 font-bold mt-1 ml-1",children:e})]}),Mv=({title:e,children:t,description:n})=>$.jsxs("div",{className:"p-4 bg-slate-50/50 border border-slate-100 rounded-2xl space-y-4",children:[$.jsxs("div",{className:"border-b border-blue-100 pb-2 mb-3",children:[$.jsx("h4",{className:"text-[10px] font-black text-blue-600 uppercase tracking-wider",children:e}),n&&$.jsx("p",{className:"text-[9px] text-slate-400 font-medium",children:n})]}),$.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:t})]}),zv=[{id:"WEB",label:"Web",icon:Wl,color:"text-indigo-500"},{id:"AZURE_BLOB",label:"Azure",icon:Hl,color:"text-blue-500"},{id:"AWS_S3",label:"AWS S3",icon:Ul,color:"text-amber-500"},{id:"SFTP",label:"SFTP",icon:nc,color:"text-violet-500"},{id:"GOOGLE_DRIVE",label:"G-Drive",icon:Kl,color:"text-emerald-500"},{id:"LOCAL",label:"Local",icon:ql,color:"text-slate-500"}],Fv=()=>{const{config:e,fetchConnectors:t,setShowAddForm:n}=Qd(),[r,o]=u.useState(!1),[i,a]=u.useState("WEB"),[s,l]=u.useState(""),[c,d]=u.useState(""),[f,p]=u.useState(!0),[h,m]=u.useState({port:"22",protocol:"https",suffix:"core.windows.net",username:"",password:"",host:""}),[g,y]=u.useState({}),v=(e,t)=>{m({...h,[e]:t}),g[e]&&y({...g,[e]:null})};return $.jsxs("form",{onSubmit:async r=>{if(r.preventDefault(),"WEB"===i)return void alert("ℹ️ Information : La fonctionnalité d'indexation WEB n'est pas encore disponible dans cette version.");if(!(()=>{let e={};return s||(e.source_id="L'identifiant est requis"),c||(e.path="Ce champ est requis"),"SFTP"===i&&(h.host||(e.host="Hôte requis"),h.username||(e.username="User requis")),"AZURE_BLOB"!==i||h.account_name&&h.account_key||(e.azure="Informations Azure incomplètes"),"GOOGLE_DRIVE"!==i||h.service_account_json||(e.service_account_json="JSON Requis"),y(e),0===Object.keys(e).length})())return;o(!0);let a={};switch(i){case"AZURE_BLOB":a={connection_string:`DefaultEndpointsProtocol=${h.protocol};AccountName=${h.account_name};AccountKey=${h.account_key};EndpointSuffix=${h.suffix}`,container:h.container||c};break;case"AWS_S3":a={aws_access_key_id:h.aws_access_key_id,aws_secret_access_key:h.aws_secret_access_key,region_name:h.region_name};break;case"SFTP":a={host:h.host,port:parseInt(h.port)||22,username:h.username,password:h.password||""};break;case"GOOGLE_DRIVE":try{a=JSON.parse(h.service_account_json)}catch(l){return alert("Format JSON invalide pour Google Drive"),void o(!1)}break;default:a={}}try{await qd(e.apiUrl,e.userToken,{source_id:s,storage_type:i,path:c,recursive:f,credentials:a}),await t(),n(!1)}catch(l){console.error(l)}finally{o(!1)}},className:"space-y-6 animate-in slide-in-from-bottom-4 duration-500 pb-10",children:[$.jsx("div",{className:"grid grid-cols-3 gap-2",children:zv.map(e=>$.jsxs("button",{type:"button",onClick:()=>{a(e.id),y({})},className:"flex flex-col items-center gap-2 p-3 rounded-2xl border transition-all "+(i===e.id?"border-blue-500 bg-blue-50 text-blue-600 shadow-sm":"border-slate-100 bg-white text-slate-400 hover:border-slate-200"),children:[$.jsx(e.icon,{size:18,className:i===e.id?e.color:""}),$.jsx("span",{className:"text-[9px] font-black uppercase tracking-tighter",children:e.label})]},e.id))}),$.jsxs("div",{className:"space-y-4 bg-white/50 p-4 rounded-2xl border border-slate-100",children:[$.jsxs("div",{children:[$.jsx(Dv,{required:!0,children:"Identifiant Unique de la Source"}),$.jsx(_v,{placeholder:"Ex: Archives_RH_S3",value:s,onChange:e=>l(e.target.value),error:g.source_id})]}),$.jsxs("div",{children:[$.jsx(Dv,{required:!0,children:"AWS_S3"===i?"Nom du Bucket":"GOOGLE_DRIVE"===i?"ID du Dossier (Folder ID)":"WEB"===i?"URL Racine":"Chemin d'accès (Path)"}),$.jsx(_v,{placeholder:"AWS_S3"===i?"Ex: mon-bucket-rh":"GOOGLE_DRIVE"===i?"Ex: 1A2b3C4d5E...":"WEB"===i?"https://docs.entreprise.com":"Ex: /var/www/documents",value:c,onChange:e=>d(e.target.value),error:g.path})]})]}),"AZURE_BLOB"===i&&$.jsxs(Mv,{title:"Azure Storage Access",description:"Clés de votre compte Azure",children:[$.jsx(_v,{placeholder:"Account Name",onChange:e=>v("account_name",e.target.value)}),$.jsx(_v,{type:"password",placeholder:"Account Key",onChange:e=>v("account_key",e.target.value)}),$.jsx("div",{className:"md:col-span-2",children:$.jsx(_v,{placeholder:"Conteneur spécifique (optionnel)",onChange:e=>v("container",e.target.value)})})]}),"AWS_S3"===i&&$.jsxs(Mv,{title:"AWS IAM Credentials",description:"Identifiants S3 sécurisés",children:[$.jsx(_v,{placeholder:"Access Key ID",onChange:e=>v("aws_access_key_id",e.target.value)}),$.jsx(_v,{type:"password",placeholder:"Secret Access Key",onChange:e=>v("aws_secret_access_key",e.target.value)}),$.jsx("div",{className:"md:col-span-2",children:$.jsx(_v,{placeholder:"Région (ex: us-east-1)",onChange:e=>v("region_name",e.target.value)})})]}),"SFTP"===i&&$.jsxs(Mv,{title:"Connexion SFTP",description:"Accès au serveur de fichiers",children:[$.jsx(_v,{placeholder:"Hôte (ex: sftp.site.com)",onChange:e=>v("host",e.target.value),error:g.host}),$.jsx(_v,{placeholder:"Port (Défaut: 22)",value:h.port,onChange:e=>v("port",e.target.value)}),$.jsx(_v,{placeholder:"Nom d'utilisateur",onChange:e=>v("username",e.target.value),error:g.username}),$.jsx(_v,{type:"password",placeholder:"Mot de passe",onChange:e=>v("password",e.target.value)})]}),"GOOGLE_DRIVE"===i&&$.jsxs("div",{className:"space-y-3 p-4 bg-slate-900 rounded-2xl border border-slate-800",children:[$.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[$.jsx(Ql,{size:14,className:"text-emerald-500"}),$.jsx(Dv,{required:!0,children:$.jsx("span",{className:"text-white",children:"Service Account JSON"})})]}),$.jsx("textarea",{className:"w-full h-40 p-3 bg-slate-950 text-emerald-400 font-mono text-[10px] rounded-xl border-none outline-none focus:ring-1 focus:ring-emerald-500/50 resize-none shadow-inner",placeholder:"Collez le contenu de votre fichier .json ici...",onChange:e=>v("service_account_json",e.target.value)}),$.jsx("p",{className:"text-[9px] text-slate-500 italic",children:"L'email du Service Account doit avoir accès au dossier."})]}),"WEB"===i&&$.jsxs("div",{className:"p-4 bg-amber-50 border border-amber-100 rounded-2xl flex items-start gap-3",children:[$.jsx(ic,{className:"text-amber-500 shrink-0",size:18}),$.jsx("p",{className:"text-[10px] text-amber-800 font-medium leading-relaxed uppercase tracking-tighter",children:"Le crawling Web n'est pas encore disponible. Cette fonctionnalité est en cours de développement et sera bientôt accessible pour enrichir vos connaissances IA à partir de sources en ligne."})]}),$.jsx("div",{className:"pt-4",children:$.jsx("button",{type:"submit",disabled:r,style:{backgroundColor:e.primaryColor},className:`\n w-full py-4 rounded-2xl text-white font-bold text-sm shadow-xl flex items-center justify-center gap-2 \n transition-all border-none cursor-pointer\n ${r?"opacity-70 cursor-not-allowed":"hover:scale-[1.02] active:scale-[0.98]"}\n `,children:r?$.jsxs($.Fragment,{children:[$.jsx(Yl,{size:18,className:"animate-spin"}),$.jsx("span",{children:"Traitement en cours..."})]}):$.jsxs($.Fragment,{children:[$.jsx(Ml,{size:18,strokeWidth:3}),$.jsx("span",{children:"Enregistrer la source"})]})})})]})},Iv=()=>{const{connectors:e,fetchConnectors:t,showAddForm:n,setShowAddForm:r,config:o}=Qd();return u.useEffect(()=>{t()},[]),$.jsx("div",{className:"h-full flex flex-col bg-transparent",children:$.jsx(ds,{mode:"wait",children:n?$.jsxs(Rl.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-6 space-y-6",children:[$.jsxs("button",{onClick:()=>r(!1),className:"flex items-center gap-2 text-xs font-bold text-slate-400 hover:text-slate-600 border-none bg-transparent cursor-pointer",children:[$.jsx(Fl,{size:14})," Retour à la liste"]}),$.jsx(Fv,{})]},"form"):$.jsxs(Rl.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-6 space-y-6",children:[$.jsxs("header",{className:"flex justify-between items-end",children:[$.jsxs("div",{children:[$.jsx("h2",{className:"text-lg font-black text-slate-800 tracking-tight",children:"Sources"}),$.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Connaissances de l'IA"})]}),$.jsx("button",{onClick:()=>r(!0),style:{backgroundColor:o.primaryColor},className:"p-2 rounded-xl text-white shadow-lg hover:scale-110 transition-transform border-none cursor-pointer",children:$.jsx(Zl,{size:20})})]}),$.jsx("div",{className:"space-y-3",children:0===e.length?$.jsx("div",{className:"py-10 text-center border-2 border-dashed border-slate-100 rounded-3xl",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucune source connectée."})}):e.map(e=>$.jsx(Lv,{connector:e},e.source_id))}),$.jsxs("div",{className:"p-4 bg-emerald-50/50 border border-emerald-100 rounded-2xl flex gap-3",children:[$.jsx(ac,{className:"text-emerald-600 shrink-0",size:18}),$.jsx("p",{className:"text-[10px] text-emerald-800 leading-relaxed font-medium",children:"Isolation RAG active : vos documents sont chiffrés et accessibles uniquement par ce Copilot."})]})]},"list")})})},Bv=({activeView:e,setView:t,onClose:n})=>{const{config:r}=Qd(),o=[{id:"chat",icon:Gl,label:"Chat"},{id:"history",icon:Vl,label:"Historique"},{id:"settings",icon:rc,label:"Sources"}];return $.jsxs("nav",{className:"flex items-center justify-between px-5 py-4 bg-white/40 backdrop-blur-xl border-b border-black/[0.03] shrink-0",children:[$.jsx("div",{className:"flex bg-slate-200/50 p-1 rounded-xl gap-1",children:o.map(n=>{const o=e===n.id;return $.jsxs("button",{onClick:()=>t(n.id),className:`\n flex items-center gap-2 px-3 py-1.5 rounded-lg transition-all duration-300 \n text-xs font-bold select-none border-none cursor-pointer\n ${o?"bg-white shadow-md":"text-slate-400 hover:text-slate-600"}\n `,children:[$.jsx(n.icon,{size:14,style:o?{color:r.primaryColor}:{},strokeWidth:o?2.5:2}),o&&$.jsx("span",{className:"animate-in fade-in zoom-in duration-300 text-slate-900",children:n.label})]},n.id)})}),$.jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-red-50 hover:text-red-500 text-slate-400 transition-all border-none cursor-pointer",children:$.jsx(uc,{size:20})})]})},Vv=({close:e})=>{const[t,n]=u.useState("chat");return $.jsxs("div",{className:"flex flex-col h-full bg-transparent overflow-hidden",children:[$.jsx(Bv,{activeView:t,setView:n,onClose:e}),$.jsx("div",{className:"flex-1 overflow-hidden relative",children:$.jsx(ds,{mode:"wait",children:$.jsxs(Rl.div,{initial:{opacity:0,x:15},animate:{opacity:1,x:0},exit:{opacity:0,x:-15},transition:{duration:.3,ease:[.23,1,.32,1]},className:"h-full w-full",children:["chat"===t&&$.jsx("div",{className:"h-full",children:$.jsx(jv,{})}),"history"===t&&$.jsx("div",{className:"h-full",children:$.jsx(Ov,{onSelectThread:()=>n("chat")})}),"settings"===t&&$.jsx("div",{className:"h-full overflow-y-auto custom-scrollbar",children:$.jsx(Iv,{})})]},t)})}),$.jsx("footer",{className:"px-6 py-4 border-t border-black/[0.03] bg-white/20 backdrop-blur-sm",children:$.jsxs("div",{className:"flex items-center justify-between",children:[$.jsxs("div",{className:"flex items-center gap-2",children:[$.jsxs("span",{className:"relative flex h-2 w-2",children:[$.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),$.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),$.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest select-none",children:"Copilot AI • v1.0"})]}),$.jsx("span",{className:"text-[9px] font-medium text-slate-300 italic",children:"Sécure & Chiffré"})]})})]})},Uv=({isOpen:e,setIsOpen:t})=>{const{primaryColor:n,position:r,logoUrl:o,botName:i}=pc(),a="right"===r;return $.jsxs("div",{className:`dhi-copilot-wrapper fixed bottom-0 ${a?"right-0":"left-0"} z-[999999] p-6`,dir:"ltr",children:[$.jsx(Rl.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>t(!e),className:"relative h-16 w-16 flex items-center justify-center cursor-pointer border-none outline-none z-50 bg-transparent",children:$.jsx(ds,{mode:"wait",children:e?$.jsx(Rl.div,{initial:{rotate:-90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:90,opacity:0},children:$.jsx(uc,{size:32})},"close"):$.jsxs(Rl.div,{initial:{scale:0},animate:{scale:1},className:"relative flex items-center justify-center",children:[$.jsx("div",{className:"h-10 w-10 bg-white rounded-lg p-1 shadow-inner overflow-hidden",children:$.jsx("img",{src:o,alt:i,className:"h-full w-full object-contain"})}),$.jsx("div",{style:{backgroundColor:n},className:"absolute -top-1 -right-1 h-6 w-6 rounded-lg shadow-md flex items-center justify-center text-white border-2 border-white",children:$.jsx(Dl,{size:14,strokeWidth:3})})]},"open")})}),$.jsx(ds,{children:e&&$.jsx(Rl.div,{initial:{opacity:0,x:a?100:-100},animate:{opacity:1,x:0},exit:{opacity:0,x:a?100:-100},transition:{type:"spring",damping:28,stiffness:200},className:`\n fixed top-0 ${a?"right-0":"left-0"} \n h-full w-full md:w-[520px] \n bg-white/85 backdrop-blur-3xl \n shadow-[-30px_0_80px_rgba(0,0,0,0.1)] \n border-l border-white/40 \n overflow-hidden z-40\n `,children:$.jsx(Vv,{close:()=>t(!1)})})})]})},Hv=()=>{const{primaryColor:e}=pc();return $.jsx("style",{children:`\n /* 1. Injection de tout Tailwind v4 */\n /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-800:oklch(47.3% .137 46.201);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-500:oklch(60.6% .25 292.717);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:calc(var(--spacing) * 0)}.top-4{top:calc(var(--spacing) * 4)}.-right-1{right:calc(var(--spacing) * -1)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0{left:calc(var(--spacing) * 0)}.z-40{z-index:40}.z-50{z-index:50}.z-\\[999999\\]{z-index:999999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-1{margin-left:calc(var(--spacing) * 1)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-auto{height:auto}.h-full{height:100%}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.min-h-full{min-height:100%}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-full{width:100%}.max-w-\\[88\\%\\]{max-width:88%}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[160px\\]{max-width:160px}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[480px\\]{max-width:480px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[-4px\\]{--tw-translate-x:-4px;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[24px\\]{border-radius:24px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-tl-none{border-top-left-radius:0}.rounded-r-full{border-top-right-radius:3.40282e38px;border-bottom-right-radius:3.40282e38px}.rounded-tr-none{border-top-right-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-amber-100{border-color:var(--color-amber-100)}.border-black\\/\\[0\\.03\\]{border-color:#00000008}@supports (color:color-mix(in lab,red,red)){.border-black\\/\\[0\\.03\\]{border-color:color-mix(in oklab,var(--color-black) 3%,transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-red-400{border-color:var(--color-red-400)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/60{border-color:#e2e8f099}@supports (color:color-mix(in lab,red,red)){.border-slate-200\\/60{border-color:color-mix(in oklab,var(--color-slate-200) 60%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-white\\/50{border-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.border-white\\/50{border-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-emerald-50\\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\\/50{background-color:color-mix(in oklab,var(--color-emerald-50) 50%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\\/50{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-100\\/50{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/50{background-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.bg-slate-200\\/50{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.bg-slate-200\\/50{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/70{background-color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.bg-white\\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.bg-white\\/85{background-color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.object-contain{object-fit:contain}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[14px\\]{font-size:14px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-800{color:var(--color-amber-800)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-indigo-500{color:var(--color-indigo-500)}.text-red-500{color:var(--color-red-500)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-violet-500{color:var(--color-violet-500)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[-30px_0_80px_rgba\\(0\\,0\\,0\\,0\\.1\\)\\]{--tw-shadow:-30px 0 80px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_-10px_30px_rgba\\(0\\,0\\,0\\,0\\.02\\)\\]{--tw-shadow:0 -10px 30px var(--tw-shadow-color,#00000005);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_10px_rgba\\(0\\,0\\,0\\,0\\.02\\)\\]{--tw-shadow:0 2px 10px var(--tw-shadow-color,#00000005);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-blue-50{--tw-ring-color:var(--color-blue-50)}.backdrop-blur-3xl{--tw-backdrop-blur:blur(var(--blur-3xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:translate-x-0:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:bg-blue-50\\/50:is(:where(.group):hover *){background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-blue-50\\/50:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.group-hover\\:text-blue-400:is(:where(.group):hover *){color:var(--color-blue-400)}.group-hover\\:text-blue-500:is(:where(.group):hover *){color:var(--color-blue-500)}.group-hover\\:text-slate-900:is(:where(.group):hover *){color:var(--color-slate-900)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-slate-300::placeholder{color:var(--color-slate-300)}.focus-within\\:border-blue-400:focus-within{border-color:var(--color-blue-400)}@media(hover:hover){.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-\\[1\\.01\\]:hover{scale:1.01}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-100:hover{border-color:var(--color-blue-100)}.hover\\:border-blue-200:hover{border-color:var(--color-blue-200)}.hover\\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/20:focus{--tw-ring-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.focus\\:ring-emerald-500\\/50:focus{--tw-ring-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-emerald-500\\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 50%, transparent)}}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:opacity-30:disabled{opacity:.3}@media(min-width:48rem){.md\\:col-span-2{grid-column:span 2/span 2}.md\\:w-\\[520px\\]{width:520px}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}\n\n /* 2. Variables dynamiques basées sur la config */\n :host {\n --dhi-primary: ${e};\n --dhi-primary-soft: ${e}15;\n font-family: 'Inter', system-ui, sans-serif;\n display: block;\n position: relative;\n z-index: 999999;\n }\n\n /* Forcer la taille du conteneur pour que la bulle fixed soit visible */\n .dhi-copilot-wrapper {\n position: fixed;\n bottom: 0;\n right: 0;\n pointer-events: none; /* Laisse passer les clics sur le site hôte */\n }\n\n .dhi-copilot-wrapper > * {\n pointer-events: auto; /* Mais capture les clics sur la bulle et le tiroir */\n }\n \n /* 3. Overrides et helpers personnalisés */\n .bg-primary { background-color: var(--dhi-primary) !important; }\n .text-primary { color: var(--dhi-primary) !important; }\n .border-primary { border-color: var(--dhi-primary) !important; }\n \n .custom-scrollbar::-webkit-scrollbar { width: 4px; }\n .custom-scrollbar::-webkit-scrollbar-thumb {\n background: rgba(0,0,0,0.1);\n border-radius: 10px;\n }\n\n .glass {\n background: rgba(255, 255, 255, 0.7);\n backdrop-filter: blur(20px);\n -webkit-backdrop-filter: blur(20px);\n border: 1px solid rgba(255, 255, 255, 0.3);\n }\n\n /* Styles pour le rendu Markdown */\n .prose-custom { font-size: 14px; line-height: 1.6; color: #334155; }\n .prose-custom p { margin-bottom: 0.8em; }\n .prose-custom code {\n background: rgba(0,0,0,0.05);\n padding: 2px 4px;\n border-radius: 4px;\n font-family: monospace;\n }\n .prose-custom pre {\n background: #1e293b;\n color: #f8fafc;\n padding: 12px;\n border-radius: 8px;\n overflow-x: auto;\n }\n `})},$v=function(e,t={}){return function(e,t,r){var o,i,a;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const s=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),l=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),c={},u={},d={},f={};for(const n of s){c[n]=Array.isArray(t.props)?"string":t.props[n];const e=N(n);d[n]=e,f[e]=n}for(const n of l)u[n]=Array.isArray(t.events)?{}:t.events[n];class p extends HTMLElement{constructor(){super(),n(this,a,!0),n(this,i),n(this,o,{}),n(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[M].container=this.container;for(const e of s){const t=d[e],n=this.getAttribute(t),r=c[e],o=r?O[r]:null;(null==o?void 0:o.parse)&&(n||"method"===r)&&(this[M][e]=o.parse(n,t,this))}for(const e of l)this[M][e]=t=>{const n=e.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(n,{detail:t,...u[e]}))}}static get observedAttributes(){return Object.keys(f)}connectedCallback(){this[D]=!0,this[L]()}disconnectedCallback(){this[D]=!1,this[_]&&r.unmount(this[_]),delete this[_]}attributeChangedCallback(e,t,n){const r=f[e],o=c[r],i=o?O[o]:null;r in c&&(null==i?void 0:i.parse)&&(n||"method"===o)&&(this[M][r]=i.parse(n,e,this),this[L]())}[(a=D,i=_,o=M,L)](){this[D]&&(this[_]?r.update(this[_],this[M]):this[_]=r.mount(this.container,e,this[M]))}}for(const n of s){const e=d[n],t=c[n];Object.defineProperty(p.prototype,n,{enumerable:!0,configurable:!0,get(){return this[M][n]},set(r){this[M][n]=r;const o=t?O[t]:null;if(null==o?void 0:o.stringify){const t=o.stringify(r,e,this);this.getAttribute(e)!==t&&(null==t?this.removeAttribute(e):this.setAttribute(e,t))}else n in c&&(null==o?void 0:o.parse)&&(r||"method"===t)&&(this[M][n]=o.parse(r,e,this)),this[L]()}})}return p}(e,t,{mount:z,update:F,unmount:I})}(({config:e})=>{const[t,n]=u.useState(!1),r=Qd(e=>e.setConfig);return u.useEffect(()=>{if(e){const t="string"==typeof e?JSON.parse(e):e;r(t)}},[e,r]),u.useEffect(()=>(t&&window.innerWidth<768?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),e?$.jsxs(fc,{value:e,children:[$.jsx(Hv,{}),$.jsx(Uv,{isOpen:t,setIsOpen:n})]}):null},{props:{config:"json"},shadow:"open"});customElements.get("dhi-copilot-ai")||customElements.define("dhi-copilot-ai",$v)});
20
+ */const gc=e=>{const t=(e=>e?hc(e):hc)(e),n=e=>function(e,t=mc){const n=d.useSyncExternalStore(e.subscribe,d.useCallback(()=>t(e.getState()),[e,t]),d.useCallback(()=>t(e.getInitialState()),[e,t]));return d.useDebugValue(n),n}(t,e);return Object.assign(n,t),n};function yc(e,t){return function(){return e.apply(t,arguments)}}const{toString:vc}=Object.prototype,{getPrototypeOf:bc}=Object,{iterator:xc,toStringTag:wc}=Symbol,kc=(e=>t=>{const n=vc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Sc=e=>(e=e.toLowerCase(),t=>kc(t)===e),Ec=e=>t=>typeof t===e,{isArray:Cc}=Array,Tc=Ec("undefined");function Pc(e){return null!==e&&!Tc(e)&&null!==e.constructor&&!Tc(e.constructor)&&Nc(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ac=Sc("ArrayBuffer");const Rc=Ec("string"),Nc=Ec("function"),jc=Ec("number"),Oc=e=>null!==e&&"object"==typeof e,Lc=e=>{if("object"!==kc(e))return!1;const t=bc(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||wc in e||xc in e)},Dc=Sc("Date"),_c=Sc("File"),Mc=Sc("Blob"),zc=Sc("FileList");const Fc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Ic=void 0!==Fc.FormData?Fc.FormData:void 0,Bc=Sc("URLSearchParams"),[Vc,Uc,Hc,$c]=["ReadableStream","Request","Response","Headers"].map(Sc);function qc(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Cc(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Pc(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Wc(e,t){if(Pc(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Kc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Yc=e=>!Tc(e)&&e!==Kc;const Qc=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&bc(Uint8Array)),Xc=Sc("HTMLFormElement"),Gc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jc=Sc("RegExp"),Zc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};qc(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const eu=Sc("AsyncFunction"),tu=(nu="function"==typeof setImmediate,ru=Nc(Kc.postMessage),nu?setImmediate:ru?(ou=`axios@${Math.random()}`,iu=[],Kc.addEventListener("message",({source:e,data:t})=>{e===Kc&&t===ou&&iu.length&&iu.shift()()},!1),e=>{iu.push(e),Kc.postMessage(ou,"*")}):e=>setTimeout(e));var nu,ru,ou,iu;const au="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Kc):"undefined"!=typeof process&&process.nextTick||tu,su={isArray:Cc,isArrayBuffer:Ac,isBuffer:Pc,isFormData:e=>{if(!e)return!1;if(Ic&&e instanceof Ic)return!0;const t=bc(e);if(!t||t===Object.prototype)return!1;if(!Nc(e.append))return!1;const n=kc(e);return"formdata"===n||"object"===n&&Nc(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Ac(e.buffer),t},isString:Rc,isNumber:jc,isBoolean:e=>!0===e||!1===e,isObject:Oc,isPlainObject:Lc,isEmptyObject:e=>{if(!Oc(e)||Pc(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Vc,isRequest:Uc,isResponse:Hc,isHeaders:$c,isUndefined:Tc,isDate:Dc,isFile:_c,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Mc,isRegExp:Jc,isFunction:Nc,isStream:e=>Oc(e)&&Nc(e.pipe),isURLSearchParams:Bc,isTypedArray:Qc,isFileList:zc,forEach:qc,merge:function e(...t){const{caseless:n,skipUndefined:r}=Yc(this)&&this||{},o={},i=(t,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const a=n&&Wc(o,i)||i,s=Gc(o,a)?o[a]:void 0;Lc(s)&&Lc(t)?o[a]=e(s,t):Lc(t)?o[a]=e({},t):Cc(t)?o[a]=t.slice():r&&Tc(t)||(o[a]=t)};for(let a=0,s=t.length;a<s;a++)t[a]&&qc(t[a],i);return o},extend:(e,t,n,{allOwnKeys:r}={})=>(qc(t,(t,r)=>{n&&Nc(t)?Object.defineProperty(e,r,{__proto__:null,value:yc(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&bc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:kc,kindOfTest:Sc,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Cc(e))return e;let t=e.length;if(!jc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[xc]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Xc,hasOwnProperty:Gc,hasOwnProp:Gc,reduceDescriptors:Zc,freezeMethods:e=>{Zc(e,(t,n)=>{if(Nc(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];Nc(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Cc(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Wc,global:Kc,isContextDefined:Yc,isSpecCompliantForm:function(e){return!!(e&&Nc(e.append)&&"FormData"===e[wc]&&e[xc])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Oc(e)){if(t.indexOf(e)>=0)return;if(Pc(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Cc(e)?[]:{};return qc(e,(e,t)=>{const i=n(e,r+1);!Tc(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:eu,isThenable:e=>e&&(Oc(e)||Nc(e))&&Nc(e.then)&&Nc(e.catch),setImmediate:tu,asap:au,isIterable:e=>null!=e&&Nc(e[xc])},lu=su.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cu=Symbol("internals"),uu=/[^\x09\x20-\x7E\x80-\xFF]/g;function du(e){return e&&String(e).trim().toLowerCase()}function fu(e){return!1===e||null==e?e:su.isArray(e)?e.map(fu):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(uu,""))}function pu(e,t,n,r,o){return su.isFunction(r)?r.call(this,t,n):(o&&(t=n),su.isString(t)?su.isString(r)?-1!==t.indexOf(r):su.isRegExp(r)?r.test(t):void 0:void 0)}let hu=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=du(t);if(!o)throw new Error("header name must be a non-empty string");const i=su.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=fu(e))}const i=(e,t)=>su.forEach(e,(e,n)=>o(e,n,t));if(su.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(su.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&lu[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(su.isObject(e)&&su.isIterable(e)){let n,r,o={};for(const t of e){if(!su.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?su.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=du(e)){const n=su.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(su.isFunction(t))return t.call(this,e,n);if(su.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=du(e)){const n=su.findKey(this,e);return!(!n||void 0===this[n]||t&&!pu(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=du(e)){const o=su.findKey(n,e);!o||t&&!pu(0,n[o],o,t)||(delete n[o],r=!0)}}return su.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!pu(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return su.forEach(this,(r,o)=>{const i=su.findKey(n,o);if(i)return t[i]=fu(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=fu(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return su.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&su.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[cu]=this[cu]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=du(e);t[r]||(!function(e,t){const n=su.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return su.isArray(e)?e.forEach(r):r(e),this}};hu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),su.reduceDescriptors(hu.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),su.freezeMethods(hu);function mu(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(su.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof hu&&(e=e.toJSON()),r.push(e),su.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);su.isUndefined(r)||(t[n]=r)});else{if(!su.isPlainObject(e)&&function(e){if(su.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(su.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,i]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":o(i);su.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}let gu=class e extends Error{static from(t,n,r,o,i,a){const s=new e(t.message,n||t.code,r,o,i);return s.cause=t,s.name=t.name,null!=t.status&&null==s.status&&(s.status=t.status),a&&Object.assign(s,a),s}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&su.hasOwnProp(e,"redact")?e.redact:void 0,n=su.isArray(t)&&t.length>0?mu(e,t):su.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};gu.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",gu.ERR_BAD_OPTION="ERR_BAD_OPTION",gu.ECONNABORTED="ECONNABORTED",gu.ETIMEDOUT="ETIMEDOUT",gu.ECONNREFUSED="ECONNREFUSED",gu.ERR_NETWORK="ERR_NETWORK",gu.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",gu.ERR_DEPRECATED="ERR_DEPRECATED",gu.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",gu.ERR_BAD_REQUEST="ERR_BAD_REQUEST",gu.ERR_CANCELED="ERR_CANCELED",gu.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",gu.ERR_INVALID_URL="ERR_INVALID_URL",gu.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function yu(e){return su.isPlainObject(e)||su.isArray(e)}function vu(e){return su.endsWith(e,"[]")?e.slice(0,-2):e}function bu(e,t,n){return e?e.concat(t).map(function(e,t){return e=vu(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const xu=su.toFlatObject(su,{},null,function(e){return/^is[A-Z]/.test(e)});function wu(e,t,n){if(!su.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=su.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!su.isUndefined(t[e])})).metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,s=n.Blob||"undefined"!=typeof Blob&&Blob,l=void 0===n.maxDepth?100:n.maxDepth,c=s&&su.isSpecCompliantForm(t);if(!su.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(su.isDate(e))return e.toISOString();if(su.isBoolean(e))return e.toString();if(!c&&su.isBlob(e))throw new gu("Blob is not supported. Use a Buffer instead.");return su.isArrayBuffer(e)||su.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,o){let s=e;if(su.isReactNative(t)&&su.isReactNativeBlob(e))return t.append(bu(o,n,i),u(e)),!1;if(e&&!o&&"object"==typeof e)if(su.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(su.isArray(e)&&function(e){return su.isArray(e)&&!e.some(yu)}(e)||(su.isFileList(e)||su.endsWith(n,"[]"))&&(s=su.toArray(e)))return n=vu(n),s.forEach(function(e,r){!su.isUndefined(e)&&null!==e&&t.append(!0===a?bu([n],r,i):null===a?n:n+"[]",u(e))}),!1;return!!yu(e)||(t.append(bu(o,n,i),u(e)),!1)}const f=[],p=Object.assign(xu,{defaultVisitor:d,convertValue:u,isVisitable:yu});if(!su.isObject(e))throw new TypeError("data must be an object");return function e(n,r,i=0){if(!su.isUndefined(n)){if(i>l)throw new gu("Object is too deeply nested ("+i+" levels). Max depth: "+l,gu.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==f.indexOf(n))throw Error("Circular reference detected in "+r.join("."));f.push(n),su.forEach(n,function(n,a){!0===(!(su.isUndefined(n)||null===n)&&o.call(t,n,su.isString(a)?a.trim():a,r,p))&&e(n,r?r.concat(a):[a],i+1)}),f.pop()}}(e),t}function ku(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Su(e,t){this._pairs=[],e&&wu(e,this,t)}const Eu=Su.prototype;function Cu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tu(e,t,n){if(!t)return e;const r=n&&n.encode||Cu,o=su.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let a;if(a=i?i(t,o):su.isURLSearchParams(t)?t.toString():new Su(t,o).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Eu.append=function(e,t){this._pairs.push([e,t])},Eu.toString=function(e){const t=e?function(t){return e.call(this,t,ku)}:ku;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Pu{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){su.forEach(this.handlers,function(t){null!==t&&e(t)})}}const Au={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Ru={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Su,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Nu="undefined"!=typeof window&&"undefined"!=typeof document,ju="object"==typeof navigator&&navigator||void 0,Ou=Nu&&(!ju||["ReactNative","NativeScript","NS"].indexOf(ju.product)<0),Lu="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Du=Nu&&window.location.href||"http://localhost",_u={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Nu,hasStandardBrowserEnv:Ou,hasStandardBrowserWebWorkerEnv:Lu,navigator:ju,origin:Du},Symbol.toStringTag,{value:"Module"})),...Ru};function Mu(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&su.isArray(r)?r.length:i,s)return su.hasOwnProp(r,i)?r[i]=su.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!a;r[i]&&su.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&su.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(su.isFormData(e)&&su.isFunction(e.entries)){const n={};return su.forEachEntry(e,(e,r)=>{t(function(e){return su.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const zu=(e,t)=>null!=e&&su.hasOwnProp(e,t)?e[t]:void 0;const Fu={transitional:Au,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=su.isObject(e);o&&su.isHTMLForm(e)&&(e=new FormData(e));if(su.isFormData(e))return r?JSON.stringify(Mu(e)):e;if(su.isArrayBuffer(e)||su.isBuffer(e)||su.isStream(e)||su.isFile(e)||su.isBlob(e)||su.isReadableStream(e))return e;if(su.isArrayBufferView(e))return e.buffer;if(su.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){const t=zu(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return wu(e,new _u.classes.URLSearchParams,{visitor:function(e,t,n,r){return _u.isNode&&su.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((i=su.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=zu(this,"env"),r=n&&n.FormData;return wu(i?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(su.isString(e))try{return(t||JSON.parse)(e),su.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=zu(this,"transitional")||Fu.transitional,n=t&&t.forcedJSONParsing,r=zu(this,"responseType"),o="json"===r;if(su.isResponse(e)||su.isReadableStream(e))return e;if(e&&su.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,zu(this,"parseReviver"))}catch(i){if(n){if("SyntaxError"===i.name)throw gu.from(i,gu.ERR_BAD_RESPONSE,this,null,zu(this,"response"));throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_u.classes.FormData,Blob:_u.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Iu(e,t){const n=this||Fu,r=t||n,o=hu.from(r.headers);let i=r.data;return su.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Bu(e){return!(!e||!e.__CANCEL__)}su.forEach(["delete","get","head","post","put","patch","query"],e=>{Fu.headers[e]={}});let Vu=class extends gu{constructor(e,t,n){super(null==e?"canceled":e,gu.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Uu(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new gu("Request failed with status code "+n.status,n.status>=400&&n.status<500?gu.ERR_BAD_REQUEST:gu.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Hu=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=null!=a?Math.min(i,a):i,l=Math.max(0,s-r),c=o(l);r=Math.max(r,s);e({loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a?(a-s)/c:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},$u=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qu=e=>(...t)=>su.asap(()=>e(...t)),Wu=_u.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,_u.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(_u.origin),_u.navigator&&/(msie|trident)/i.test(_u.navigator.userAgent)):()=>!0,Ku=_u.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];su.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),su.isString(r)&&s.push(`path=${r}`),su.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),su.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Yu(e,t,n){let r=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(r||!1===n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Qu=e=>e instanceof hu?{...e}:e;function Xu(e,t){t=t||{};const n=Object.create(null);function r(e,t,n,r){return su.isPlainObject(e)&&su.isPlainObject(t)?su.merge.call({caseless:r},e,t):su.isPlainObject(t)?su.merge({},t):su.isArray(t)?t.slice():t}function o(e,t,n,o){return su.isUndefined(t)?su.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!su.isUndefined(t))return r(void 0,t)}function a(e,t){return su.isUndefined(t)?su.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return su.hasOwnProp(t,i)?r(n,o):su.hasOwnProp(e,i)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Qu(e),Qu(t),0,!0)};return su.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const i=su.hasOwnProp(l,r)?l[r]:o,a=i(su.hasOwnProp(e,r)?e[r]:void 0,su.hasOwnProp(t,r)?t[r]:void 0,r);su.isUndefined(a)&&i!==s||(n[r]=a)}),n}const Gu=["content-type","content-length"];const Ju=e=>{const t=Xu({},e),n=e=>su.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const l=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");var f;if(t.headers=s=hu.from(s),t.url=Tu(Yu(c,d,u),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?(f=l.password,encodeURIComponent(f).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))):""))),su.isFormData(r)&&(_u.hasStandardBrowserEnv||_u.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):su.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t).forEach(([t,n])=>{Gu.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(s,r.getHeaders(),n("formDataHeaderPolicy"))),_u.hasStandardBrowserEnv){su.isFunction(o)&&(o=o(t));if(!0===o||null==o&&Wu(t.url)){const e=i&&a&&Ku.read(a);e&&s.set(i,e)}}return t},Zu="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Ju(e);let o=r.data;const i=hu.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=hu.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Uu(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new gu("Request aborted",gu.ECONNABORTED,e,m)),h(),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new gu(r,gu.ERR_NETWORK,e,m);o.event=t||null,n(o),h(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Au;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new gu(t,o.clarifyTimeoutError?gu.ETIMEDOUT:gu.ECONNABORTED,e,m)),h(),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&su.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),su.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=Hu(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=Hu(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Vu(null,e,m):t),m.abort(),h(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);!y||_u.protocols.includes(y)?m.send(o||null):n(new gu("Unsupported protocol "+y+":",gu.ERR_BAD_REQUEST,e))})},ed=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof gu?t:new Vu(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new gu(`timeout of ${t}ms exceeded`,gu.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>su.asap(a),s}},td=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},nd=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},rd=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of nd(e))yield*td(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})};const od="1.16.0",{isFunction:id}=su,ad=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},sd=e=>{const t=su.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=su.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:a}=e,s=o?id(o):"function"==typeof fetch,l=id(i),c=id(a);if(!s)return!1;const u=s&&id(n),d=s&&("function"==typeof r?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new i(e).arrayBuffer())),f=l&&u&&ad(()=>{let e=!1;const t=new i(_u.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),p=c&&u&&ad(()=>su.isReadableStream(new a("").body)),h={stream:p&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new gu(`Response type '${e}' is not supported`,gu.ERR_NOT_SUPPORT,n)})});const m=async(e,t)=>{const n=su.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(su.isBlob(e))return e.size;if(su.isSpecCompliantForm(e)){const t=new i(_u.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return su.isArrayBufferView(e)||su.isArrayBuffer(e)?e.byteLength:(su.isURLSearchParams(e)&&(e+=""),su.isString(e)?(await d(e)).byteLength:void 0)})(t):n};return async e=>{let{url:t,method:n,data:s,signal:c,cancelToken:u,timeout:d,onDownloadProgress:g,onUploadProgress:y,responseType:v,headers:b,withCredentials:x="same-origin",fetchOptions:w,maxContentLength:k,maxBodyLength:S}=Ju(e);const E=su.isNumber(k)&&k>-1,C=su.isNumber(S)&&S>-1;let T=o||fetch;v=v?(v+"").toLowerCase():"text";let P=ed([c,u&&u.toAbortSignal()],d),A=null;const R=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let N;try{if(E&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let s=0;s<t;s++)if(37===r.charCodeAt(s)&&s+2<t){const t=r.charCodeAt(s+1),n=r.charCodeAt(s+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102)&&(e-=2,s+=2)}let n=0,o=t-1;const i=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));o>=0&&(61===r.charCodeAt(o)?(n++,o--):i(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||i(o))&&n++;const a=3*Math.floor(e/4)-(n||0);return a>0?a:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(r,"utf8");let o=0;for(let i=0,a=r.length;i<a;i++){const e=r.charCodeAt(i);if(e<128)o+=1;else if(e<2048)o+=2;else if(e>=55296&&e<=56319&&i+1<a){const e=r.charCodeAt(i+1);e>=56320&&e<=57343?(o+=4,i++):o+=3}else o+=3}return o}(t);if(n>k)throw new gu("maxContentLength size of "+k+" exceeded",gu.ERR_BAD_RESPONSE,e,A)}if(C&&"get"!==n&&"head"!==n){const t=await m(b,s);if("number"==typeof t&&isFinite(t)&&t>S)throw new gu("Request body larger than maxBodyLength limit",gu.ERR_BAD_REQUEST,e,A)}if(y&&f&&"get"!==n&&"head"!==n&&0!==(N=await m(b,s))){let e,n=new i(t,{method:"POST",body:s,duplex:"half"});if(su.isFormData(s)&&(e=n.headers.get("content-type"))&&b.setContentType(e),n.body){const[e,t]=$u(N,Hu(qu(y)));s=rd(n.body,65536,e,t)}}su.isString(x)||(x=x?"include":"omit");const o=l&&"credentials"in i.prototype;if(su.isFormData(s)){const e=b.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&b.delete("content-type")}b.set("User-Agent","axios/"+od,!1);const c={...w,signal:P,method:n.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:o?x:void 0};A=l&&new i(t,c);let u=await(l?T(A,w):T(t,c));if(E){const t=su.toFiniteNumber(u.headers.get("content-length"));if(null!=t&&t>k)throw new gu("maxContentLength size of "+k+" exceeded",gu.ERR_BAD_RESPONSE,e,A)}const d=p&&("stream"===v||"response"===v);if(p&&u.body&&(g||E||d&&R)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=u[e]});const n=su.toFiniteNumber(u.headers.get("content-length")),[r,o]=g&&$u(n,Hu(qu(g),!0))||[];let i=0;const s=t=>{if(E&&(i=t,i>k))throw new gu("maxContentLength size of "+k+" exceeded",gu.ERR_BAD_RESPONSE,e,A);r&&r(t)};u=new a(rd(u.body,65536,s,()=>{o&&o(),R&&R()}),t)}v=v||"text";let j=await h[su.findKey(h,v)||"text"](u,e);if(E&&!p&&!d){let t;if(null!=j&&("number"==typeof j.byteLength?t=j.byteLength:"number"==typeof j.size?t=j.size:"string"==typeof j&&(t="function"==typeof r?(new r).encode(j).byteLength:j.length)),"number"==typeof t&&t>k)throw new gu("maxContentLength size of "+k+" exceeded",gu.ERR_BAD_RESPONSE,e,A)}return!d&&R&&R(),await new Promise((t,n)=>{Uu(t,n,{data:j,headers:hu.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:A})})}catch(j){if(R&&R(),P&&P.aborted&&P.reason instanceof gu){const t=P.reason;throw t.config=e,A&&(t.request=A),j!==t&&(t.cause=j),t}if(j&&"TypeError"===j.name&&/Load failed|fetch/i.test(j.message))throw Object.assign(new gu("Network Error",gu.ERR_NETWORK,e,A,j&&j.response),{cause:j.cause||j});throw gu.from(j,j&&j.code,e,A,j&&j.response)}}},ld=new Map,cd=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,l=i.length,c=ld;for(;l--;)a=i[l],s=c.get(a),void 0===s&&c.set(a,s=l?new Map:sd(t)),c=s;return s};cd();const ud={http:null,xhr:Zu,fetch:{get:cd}};su.forEach(ud,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const dd=e=>`- ${e}`,fd=e=>su.isFunction(e)||null===e||!1===e;const pd={getAdapter:function(e,t){e=su.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!fd(r)&&(o=ud[(n=String(r)).toLowerCase()],void 0===o))throw new gu(`Unknown adapter '${n}'`);if(o&&(su.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(dd).join("\n"):" "+dd(e[0]):"as no adapter specified";throw new gu("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:ud};function hd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vu(null,e)}function md(e){hd(e),e.headers=hu.from(e.headers),e.data=Iu.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return pd.getAdapter(e.adapter||Fu.adapter,e)(e).then(function(t){hd(e),e.response=t;try{t.data=Iu.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=hu.from(t.headers),t},function(t){if(!Bu(t)&&(hd(e),t&&t.response)){e.response=t.response;try{t.response.data=Iu.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=hu.from(t.response.headers)}return Promise.reject(t)})}const gd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const yd={};gd.transitional=function(e,t,n){function r(e,t){return"[Axios v"+od+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new gu(r(o," has been removed"+(t?" in "+t:"")),gu.ERR_DEPRECATED);return t&&!yd[o]&&(yd[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},gd.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const vd={assertOptions:function(e,t,n){if("object"!=typeof e)throw new gu("options must be an object",gu.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new gu("option "+i+" must be "+n,gu.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new gu("Unknown option "+i,gu.ERR_BAD_OPTION)}},validators:gd},bd=vd.validators;let xd=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Pu,response:new Pu}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=(()=>{if(!e.stack)return"";const t=e.stack.indexOf("\n");return-1===t?"":e.stack.slice(t+1)})();try{if(n.stack){if(t){const e=t.indexOf("\n"),r=-1===e?-1:t.indexOf("\n",e+1),o=-1===r?"":t.slice(r+1);String(n.stack).endsWith(o)||(n.stack+="\n"+t)}}else n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Xu(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&vd.assertOptions(n,{silentJSONParsing:bd.transitional(bd.boolean),forcedJSONParsing:bd.transitional(bd.boolean),clarifyTimeoutError:bd.transitional(bd.boolean),legacyInterceptorReqResOrdering:bd.transitional(bd.boolean)},!1),null!=r&&(su.isFunction(r)?t.paramsSerializer={serialize:r}:vd.assertOptions(r,{encode:bd.function,serialize:bd.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),vd.assertOptions(t,{baseUrl:bd.spelling("baseURL"),withXsrfToken:bd.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&su.merge(o.common,o[t.method]);o&&su.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=hu.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;s=s&&e.synchronous;const n=t.transitional||Au;n&&n.legacyInterceptorReqResOrdering?a.unshift(e.fulfilled,e.rejected):a.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!s){const e=[md.bind(this),void 0];for(e.unshift(...a),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{c=md.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Tu(Yu((e=Xu(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};su.forEach(["delete","get","head","options"],function(e){xd.prototype[e]=function(t,n){return this.request(Xu(n||{},{method:e,url:t,data:(n||{}).data}))}}),su.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(Xu(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}xd.prototype[e]=t(),"query"!==e&&(xd.prototype[e+"Form"]=t(!0))});const wd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(wd).forEach(([e,t])=>{wd[t]=e});const kd=function e(t){const n=new xd(t),r=yc(xd.prototype.request,n);return su.extend(r,xd.prototype,n,{allOwnKeys:!0}),su.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Xu(t,n))},r}(Fu);kd.Axios=xd,kd.CanceledError=Vu,kd.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Vu(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},kd.isCancel=Bu,kd.VERSION=od,kd.toFormData=wu,kd.AxiosError=gu,kd.Cancel=kd.CanceledError,kd.all=function(e){return Promise.all(e)},kd.spread=function(e){return function(t){return e.apply(null,t)}},kd.isAxiosError=function(e){return su.isObject(e)&&!0===e.isAxiosError},kd.mergeConfig=Xu,kd.AxiosHeaders=hu,kd.formToJSON=e=>Mu(su.isHTMLForm(e)?new FormData(e):e),kd.getAdapter=pd.getAdapter,kd.HttpStatusCode=wd,kd.default=kd;const{Axios:Sd,AxiosError:Ed,CanceledError:Cd,isCancel:Td,CancelToken:Pd,VERSION:Ad,all:Rd,Cancel:Nd,isAxiosError:jd,spread:Od,toFormData:Ld,AxiosHeaders:Dd,HttpStatusCode:_d,formToJSON:Md,getAdapter:zd,mergeConfig:Fd,create:Id}=kd,Bd=(e,t)=>{const n=kd.create({baseURL:e,timeout:3e5,headers:{Authorization:t?`Bearer ${t}`:"","Content-Type":"application/json"}});return n.interceptors.response.use(e=>e,e=>{var t,n;return console.error("DHI Copilot API Error:",(null==(n=null==(t=e.response)?void 0:t.data)?void 0:n.detail)||e.message),Promise.reject(e)}),n},Vd=async(e,t,n)=>{const r=Bd(e,t);return(await r.post("/chat",n)).data},Ud=async(e,t)=>{const n=Bd(e,t);return(await n.get("/chat/threads")).data},Hd=async(e,t,n)=>{const r=Bd(e,t),o=(await r.get(`/chat/history/${n}`)).data,i=[];let a=[];return o.forEach(e=>{if("tool"===e.role){const t=e.content.match(/SOURCE:\s*([^\n]+)/g);if(t){const e=t.map(e=>e.replace("SOURCE:","").trim().split("/").pop()||"");a=[...new Set([...a,...e])]}}else"assistant"===e.role?""!==e.content.trim()&&(i.push({id:`hist-${Math.random()}`,role:"assistant",content:e.content,timestamp:new Date,sources:[...a]}),a=[]):"user"===e.role&&i.push({id:`hist-${Math.random()}`,role:"user",content:e.content,timestamp:new Date})}),i},$d=async(e,t)=>{const n=Bd(e,t);return(await n.get("/settings/connectors")).data},qd=async(e,t,n)=>{const r=Bd(e,t);return(await r.post("/connectors",n)).data},Wd=async(e,t,n)=>{const r=Bd(e,t);return(await r.post(`/documents/sync/${n}`)).data},Kd=async(e,t,n)=>{const r=Bd(e,t);await r.delete(`/connectors/${n}`)},Yd=async(e,t,n)=>{const r=Bd(e,t),o=new FormData;n.forEach(e=>o.append("files",e));return(await r.post("/upload",o)).data},Qd=(Xd=(e,t)=>({config:{},messages:[],threads:[],connectors:[],isSyncing:!1,showAddForm:!1,isLoading:!1,activeThreadId:null,activeView:"chat",setConfig:t=>e({config:t}),setView:t=>e({activeView:t}),setLoading:t=>e({isLoading:t}),setShowAddForm:t=>e({showAddForm:t}),setThreadId:t=>e({activeThreadId:t}),clearChat:()=>e({messages:[],activeThreadId:null}),addMessage:t=>e(e=>({messages:[...e.messages,t]})),fetchThreads:async()=>{const{config:n}=t();if(n.apiUrl)try{const t=await Ud(n.apiUrl,n.userToken);e({threads:t})}catch(r){console.error("Erreur threads:",r)}},loadThread:async n=>{const{config:r}=t();if(n){e({isLoading:!0,activeThreadId:n,activeView:"chat"});try{const t=await Hd(r.apiUrl,r.userToken,n);e({messages:t,isLoading:!1})}catch(o){console.error("Erreur historique:",o),e({isLoading:!1})}}else e({activeThreadId:null,messages:[],activeView:"chat"})},fetchConnectors:async()=>{const{config:n}=t();if(n.apiUrl)try{const t=await $d(n.apiUrl,n.userToken);e({connectors:t})}catch(r){console.error("Erreur connecteurs:",r)}},syncSource:async n=>{const{config:r}=t();e({isSyncing:!0});try{await Wd(r.apiUrl,r.userToken,n),await t().fetchConnectors()}catch(o){console.error("Erreur sync:",o)}finally{e({isSyncing:!1})}},removeSource:async n=>{const{config:r}=t();try{await Kd(r.apiUrl,r.userToken,n),e(e=>({connectors:e.connectors.filter(e=>e.source_id!==n)}))}catch(o){console.error("Erreur suppression source:",o)}}}))?gc(Xd):gc;var Xd;function Gd(){}function Jd(){}const Zd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ef=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tf={};function nf(e,t){return(tf.jsx?ef:Zd).test(e)}const rf=/[ \t\n\f\r]/g;function of(e){return""===e.replace(rf,"")}class af{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function sf(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new af(n,r,t)}function lf(e){return e.toLowerCase()}af.prototype.normal={},af.prototype.property={},af.prototype.space=void 0;class cf{constructor(e,t){this.attribute=t,this.property=e}}cf.prototype.attribute="",cf.prototype.booleanish=!1,cf.prototype.boolean=!1,cf.prototype.commaOrSpaceSeparated=!1,cf.prototype.commaSeparated=!1,cf.prototype.defined=!1,cf.prototype.mustUseProperty=!1,cf.prototype.number=!1,cf.prototype.overloadedBoolean=!1,cf.prototype.property="",cf.prototype.spaceSeparated=!1,cf.prototype.space=void 0;let uf=0;const df=vf(),ff=vf(),pf=vf(),hf=vf(),mf=vf(),gf=vf(),yf=vf();function vf(){return 2**++uf}const bf=Object.freeze(Object.defineProperty({__proto__:null,boolean:df,booleanish:ff,commaOrSpaceSeparated:yf,commaSeparated:gf,number:hf,overloadedBoolean:pf,spaceSeparated:mf},Symbol.toStringTag,{value:"Module"})),xf=Object.keys(bf);class wf extends cf{constructor(e,t,n,r){let o=-1;if(super(e,t),kf(this,"space",r),"number"==typeof n)for(;++o<xf.length;){const e=xf[o];kf(this,xf[o],(n&bf[e])===bf[e])}}}function kf(e,t,n){n&&(e[t]=n)}function Sf(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new wf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[lf(r)]=r,n[lf(i.attribute)]=r}return new af(t,n,e.space)}wf.prototype.defined=!0;const Ef=Sf({properties:{ariaActiveDescendant:null,ariaAtomic:ff,ariaAutoComplete:null,ariaBusy:ff,ariaChecked:ff,ariaColCount:hf,ariaColIndex:hf,ariaColSpan:hf,ariaControls:mf,ariaCurrent:null,ariaDescribedBy:mf,ariaDetails:null,ariaDisabled:ff,ariaDropEffect:mf,ariaErrorMessage:null,ariaExpanded:ff,ariaFlowTo:mf,ariaGrabbed:ff,ariaHasPopup:null,ariaHidden:ff,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mf,ariaLevel:hf,ariaLive:null,ariaModal:ff,ariaMultiLine:ff,ariaMultiSelectable:ff,ariaOrientation:null,ariaOwns:mf,ariaPlaceholder:null,ariaPosInSet:hf,ariaPressed:ff,ariaReadOnly:ff,ariaRelevant:null,ariaRequired:ff,ariaRoleDescription:mf,ariaRowCount:hf,ariaRowIndex:hf,ariaRowSpan:hf,ariaSelected:ff,ariaSetSize:hf,ariaSort:null,ariaValueMax:hf,ariaValueMin:hf,ariaValueNow:hf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Cf(e,t){return t in e?e[t]:t}function Tf(e,t){return Cf(e,t.toLowerCase())}const Pf=Sf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gf,acceptCharset:mf,accessKey:mf,action:null,allow:null,allowFullScreen:df,allowPaymentRequest:df,allowUserMedia:df,alt:null,as:null,async:df,autoCapitalize:null,autoComplete:mf,autoFocus:df,autoPlay:df,blocking:mf,capture:null,charSet:null,checked:df,cite:null,className:mf,cols:hf,colSpan:null,content:null,contentEditable:ff,controls:df,controlsList:mf,coords:hf|gf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:df,defer:df,dir:null,dirName:null,disabled:df,download:pf,draggable:ff,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:df,formTarget:null,headers:mf,height:hf,hidden:pf,high:hf,href:null,hrefLang:null,htmlFor:mf,httpEquiv:mf,id:null,imageSizes:null,imageSrcSet:null,inert:df,inputMode:null,integrity:null,is:null,isMap:df,itemId:null,itemProp:mf,itemRef:mf,itemScope:df,itemType:mf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:df,low:hf,manifest:null,max:null,maxLength:hf,media:null,method:null,min:null,minLength:hf,multiple:df,muted:df,name:null,nonce:null,noModule:df,noValidate:df,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:df,optimum:hf,pattern:null,ping:mf,placeholder:null,playsInline:df,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:df,referrerPolicy:null,rel:mf,required:df,reversed:df,rows:hf,rowSpan:hf,sandbox:mf,scope:null,scoped:df,seamless:df,selected:df,shadowRootClonable:df,shadowRootDelegatesFocus:df,shadowRootMode:null,shape:null,size:hf,sizes:null,slot:null,span:hf,spellCheck:ff,src:null,srcDoc:null,srcLang:null,srcSet:null,start:hf,step:null,style:null,tabIndex:hf,target:null,title:null,translate:null,type:null,typeMustMatch:df,useMap:null,value:ff,width:hf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mf,axis:null,background:null,bgColor:null,border:hf,borderColor:null,bottomMargin:hf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:df,declare:df,event:null,face:null,frame:null,frameBorder:null,hSpace:hf,leftMargin:hf,link:null,longDesc:null,lowSrc:null,marginHeight:hf,marginWidth:hf,noResize:df,noHref:df,noShade:df,noWrap:df,object:null,profile:null,prompt:null,rev:null,rightMargin:hf,rules:null,scheme:null,scrolling:ff,standby:null,summary:null,text:null,topMargin:hf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:hf,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:df,disableRemotePlayback:df,prefix:null,property:null,results:hf,security:null,unselectable:null},space:"html",transform:Tf}),Af=Sf({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:yf,accentHeight:hf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:hf,amplitude:hf,arabicForm:null,ascent:hf,attributeName:null,attributeType:null,azimuth:hf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:hf,by:null,calcMode:null,capHeight:hf,className:mf,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:hf,diffuseConstant:hf,direction:null,display:null,dur:null,divisor:hf,dominantBaseline:null,download:df,dx:null,dy:null,edgeMode:null,editable:null,elevation:hf,enableBackground:null,end:null,event:null,exponent:hf,externalResourcesRequired:null,fill:null,fillOpacity:hf,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:gf,g2:gf,glyphName:gf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:hf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:hf,horizOriginX:hf,horizOriginY:hf,id:null,ideographic:hf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:hf,k:hf,k1:hf,k2:hf,k3:hf,k4:hf,kernelMatrix:yf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:hf,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:hf,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:hf,overlineThickness:hf,paintOrder:null,panose1:null,path:null,pathLength:hf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:hf,pointsAtY:hf,pointsAtZ:hf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yf,rev:yf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yf,requiredFeatures:yf,requiredFonts:yf,requiredFormats:yf,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:hf,specularExponent:hf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:hf,strikethroughThickness:hf,string:null,stroke:null,strokeDashArray:yf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:hf,strokeOpacity:hf,strokeWidth:null,style:null,surfaceScale:hf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yf,tabIndex:hf,tableValues:null,target:null,targetX:hf,targetY:hf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:hf,underlineThickness:hf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:hf,values:null,vAlphabetic:hf,vMathematical:hf,vectorEffect:null,vHanging:hf,vIdeographic:hf,version:null,vertAdvY:hf,vertOriginX:hf,vertOriginY:hf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:hf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Cf}),Rf=Sf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Nf=Sf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tf}),jf=Sf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Of={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"},Lf=/[A-Z]/g,Df=/-[a-z]/g,_f=/^data[-\w.:]+$/i;function Mf(e){return"-"+e.toLowerCase()}function zf(e){return e.charAt(1).toUpperCase()}const Ff=sf([Ef,Pf,Rf,Nf,jf],"html"),If=sf([Ef,Af,Rf,Nf,jf],"svg");var Bf,Vf,Uf,Hf={};function $f(){if(Uf)return Hf;Uf=1;var e=Hf&&Hf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.default=function(e,n){let r=null;if(!e||"string"!=typeof e)return r;const o=(0,t.default)(e),i="function"==typeof n;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:o}=e;i?n(t,o,e):o&&(r=r||{},r[t]=o)}),r};const t=e(function(){if(Vf)return Bf;Vf=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return Bf=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return f+=2,p(n),s=s.slice(t),f+=2,e({type:"comment",comment:n})}}function w(){var t=h(),n=y(r);if(n){if(x(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,v(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}}());return Hf}var qf,Wf,Kf,Yf={};function Qf(){if(qf)return Yf;qf=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};return Yf.camelCase=function(s,l){return void 0===l&&(l={}),function(t){return!t||n.test(t)||e.test(t)}(s)?s:(s=s.toLowerCase(),(s=l.reactCompat?s.replace(o,a):s.replace(r,a)).replace(t,i))},Yf}const Xf=r(function(){if(Kf)return Wf;Kf=1;var e=(Wf&&Wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})($f()),t=Qf();function n(n,r){var o={};return n&&"string"==typeof n?((0,e.default)(n,function(e,n){e&&n&&(o[(0,t.camelCase)(e,r)]=n)}),o):o}return n.default=n,Wf=n}()),Gf=Zf("end"),Jf=Zf("start");function Zf(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ep(e){return e&&"object"==typeof e?"position"in e||"type"in e?np(e.position):"start"in e||"end"in e?np(e):"line"in e||"column"in e?tp(e):"":""}function tp(e){return rp(e&&e.line)+":"+rp(e&&e.column)}function np(e){return tp(e&&e.start)+"-"+tp(e&&e.end)}function rp(e){return e&&"number"==typeof e?e:1}class op extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.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=r,this.line=a?a.line:void 0,this.name=ep(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=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}op.prototype.file="",op.prototype.name="",op.prototype.reason="",op.prototype.message="",op.prototype.stack="",op.prototype.column=void 0,op.prototype.line=void 0,op.prototype.ancestors=void 0,op.prototype.cause=void 0,op.prototype.fatal=void 0,op.prototype.place=void 0,op.prototype.ruleId=void 0,op.prototype.source=void 0;const ip={}.hasOwnProperty,ap=new Map,sp=/[A-Z]/g,lp=new Set(["table","tbody","thead","tfoot","tr"]),cp=new Set(["td","th"]),up="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dp(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=Jf(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?If:Ff,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=fp(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function fp(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=If,e.schema=o);e.ancestors.push(t);const i=yp(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&ip.call(t.properties,o)){const i=gp(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&cp.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=mp(e,t);lp.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&of(t.value):of(t));var t}));return pp(e,a,i,t),hp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}vp(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=If,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:yp(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];Gd(t.type);const o=t.expression;Gd(o.type);const i=o.properties[0];Gd(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else vp(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Gd(t.type),i=e.evaluater.evaluateExpression(t.expression)}else vp(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=mp(e,t);return pp(e,a,i,t),hp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vp(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return hp(r,mp(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function pp(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mp(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:ap;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=fp(e,i,a);void 0!==s&&n.push(s)}return n}function gp(e,t,n){const r=function(e,t){const n=lf(t);let r=t,o=cf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&_f.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Df,zf);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Df.test(e)){let n=e.replace(Lf,Mf);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=wf}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Xf(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new op("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=up+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)ip.call(e,n)&&(t[bp(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Of[r.property]||r.property:r.attribute,n]}}function yp(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=nf(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=nf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return ip.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);vp(e)}function vp(e,t){const n=new op("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=up+"#cannot-handle-mdx-estrees-without-createevaluater",n}function bp(e){let t=e.replace(sp,xp);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function xp(e){return"-"+e.toLowerCase()}const wp={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"]},kp={};function Sp(e,t){return Ep(e,"boolean"!=typeof kp.includeImageAlt||kp.includeImageAlt,"boolean"!=typeof kp.includeHtml||kp.includeHtml)}function Ep(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cp(e.children,t,n)}return Array.isArray(e)?Cp(e,t,n):""}function Cp(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ep(e[o],t,n);return r.join("")}const Tp=document.createElement("i");function Pp(e){const t="&"+e+";";Tp.innerHTML=t;const n=Tp.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Ap(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Rp(e,t){return e.length>0?(Ap(e,e.length,0,t),e):t}const Np={}.hasOwnProperty;function jp(e){const t={};let n=-1;for(;++n<e.length;)Op(t,e[n]);return t}function Op(e,t){let n;for(n in t){const r=(Np.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Np.call(r,i)||(r[i]=[]);const e=o[i];Lp(r[i],Array.isArray(e)?e:e?[e]:[])}}}function Lp(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Ap(e,0,0,r)}function Dp(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function _p(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mp=Yp(/[A-Za-z]/),zp=Yp(/[\dA-Za-z]/),Fp=Yp(/[#-'*+\--9=?A-Z^-~]/);function Ip(e){return null!==e&&(e<32||127===e)}const Bp=Yp(/\d/),Vp=Yp(/[\dA-Fa-f]/),Up=Yp(/[!-/:-@[-`{-~]/);function Hp(e){return null!==e&&e<-2}function $p(e){return null!==e&&(e<0||32===e)}function qp(e){return-2===e||-1===e||32===e}const Wp=Yp(new RegExp("\\p{P}|\\p{S}","u")),Kp=Yp(/\s/);function Yp(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Qp(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&zp(e.charCodeAt(n+1))&&zp(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xp(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(qp(r))return e.enter(n),a(r);return t(r)};function a(r){return qp(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const Gp={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Xp(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Hp(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Jp={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Ap(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zp,u,d)(o)}function u(e){return r&&v(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(Zp,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Hp(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Ap(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Zp={tokenize:function(e,t,n){return Xp(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function eh(e){return null===e||$p(e)||Kp(e)?1:Wp(e)?2:void 0}function th(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const nh={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[u][1].start};rh(d,-s),rh(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Rp(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Rp(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=Rp(l,th(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Rp(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Rp(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Ap(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=eh(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=eh(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function rh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const oh={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return Mp(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||zp(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||zp(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Ip(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):Fp(t)?(e.consume(t),l):n(t)}function c(e){return zp(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||zp(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const ih={partial:!0,tokenize:function(e,t,n){return function(t){return qp(t)?Xp(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Hp(e)?t(e):n(e)}}};const ah={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(qp(t))return Xp(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(ah,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return qp(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const sh={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Up(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const lh={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=zp,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Vp,c):(e.enter("characterReferenceValue"),o=7,i=Bp,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==zp||Pp(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const ch={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},uh={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),qp(t)?Xp(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),qp(t)?Xp(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Hp(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),qp(t)?Xp(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Hp(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(ch,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Hp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):qp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xp(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||Hp(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||Hp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&qp(t)?Xp(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||Hp(t)?e.check(ch,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Hp(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const dh={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Xp(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):Hp(t)?e.attempt(fh,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||Hp(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},fh={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Hp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Xp(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):Hp(e)?o(e):n(e)}}};const ph={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):Hp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Hp(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class hh{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&mh(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),mh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),mh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);mh(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);mh(this.left,t.reverse())}}}function mh(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 gh(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new hh(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,yh(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return Ap(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function yh(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=s.slice(g[f],g[f+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const vh={resolve:function(e){return gh(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Hp(t)?e.check(bh,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},bh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Xp(e,o,"linePrefix")};function o(o){if(null===o||Hp(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function xh(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||Ip(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Hp(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!$p(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||Ip(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function wh(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):Hp(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Hp(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!qp(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function kh(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):Hp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Xp(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||Hp(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function Sh(e,t){let n;return function r(o){if(Hp(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(qp(o))return Xp(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Eh={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return wh.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=_p(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return $p(t)?Sh(e,s)(t):s(t)}function s(t){return xh(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ch,c,c)(t)}function c(t){return qp(t)?Xp(e,u,"whitespace")(t):u(t)}function u(i){return null===i||Hp(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Ch={partial:!0,tokenize:function(e,t,n){return function(t){return $p(t)?Sh(e,r)(t):n(t)};function r(t){return kh(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return qp(t)?Xp(e,i,"whitespace")(t):i(t)}function i(e){return null===e||Hp(e)?t(e):n(e)}}};const Th={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Hp(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Ph={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},Ap(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||$p(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||Hp(n)?(e.exit("atxHeading"),t(n)):qp(n)?Xp(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||$p(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Ah=["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"],Rh=["pre","script","style","textarea"],Nh={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:D):Mp(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):Mp(i)?(e.consume(i),o=4,r.interrupt?t:D):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:D):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:T:f):n(o)}function p(t){return Mp(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||$p(s)){const l=47===s,c=a.toLowerCase();return l||i||!Rh.includes(c)?Ah.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):T(s))}return 45===s||zp(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:T):n(o)}function g(t){return qp(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||Mp(t)?(e.consume(t),v):qp(t)?(e.consume(t),y):E(t)}function v(t){return 45===t||46===t||58===t||95===t||zp(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),x):qp(t)?(e.consume(t),b):y(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):qp(t)?(e.consume(t),x):k(t)}function w(t){return t===l?(e.consume(t),l=null,S):null===t||Hp(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||$p(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||qp(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||Hp(t)?T(t):qp(t)?(e.consume(t),C):n(t)}function T(t){return 45===t&&2===o?(e.consume(t),N):60===t&&1===o?(e.consume(t),j):62===t&&4===o?(e.consume(t),_):63===t&&3===o?(e.consume(t),D):93===t&&5===o?(e.consume(t),L):!Hp(t)||6!==o&&7!==o?null===t||Hp(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(jh,M,P)(t))}function P(t){return e.check(Oh,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),R}function R(t){return null===t||Hp(t)?P(t):(e.enter("htmlFlowData"),T(t))}function N(t){return 45===t?(e.consume(t),D):T(t)}function j(t){return 47===t?(e.consume(t),a="",O):T(t)}function O(t){if(62===t){const n=a.toLowerCase();return Rh.includes(n)?(e.consume(t),_):T(t)}return Mp(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),O):T(t)}function L(t){return 93===t?(e.consume(t),D):T(t)}function D(t){return 62===t?(e.consume(t),_):45===t&&2===o?(e.consume(t),D):T(t)}function _(t){return null===t||Hp(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),_)}function M(n){return e.exit("htmlFlow"),t(n)}}},jh={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(ih,t,n)}}},Oh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Hp(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const Lh={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),v):Mp(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):Mp(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Hp(t)?(a=u,O(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?j(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Hp(t)?(a=h,O(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?j(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?j(t):Hp(t)?(a=y,O(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):Hp(t)?(a=v,O(t)):(e.consume(t),v)}function b(e){return 62===e?j(e):v(e)}function x(t){return Mp(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||zp(t)?(e.consume(t),w):k(t)}function k(t){return Hp(t)?(a=k,O(t)):qp(t)?(e.consume(t),k):j(t)}function S(t){return 45===t||zp(t)?(e.consume(t),S):47===t||62===t||$p(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),j):58===t||95===t||Mp(t)?(e.consume(t),C):Hp(t)?(a=E,O(t)):qp(t)?(e.consume(t),E):j(t)}function C(t){return 45===t||46===t||58===t||95===t||zp(t)?(e.consume(t),C):T(t)}function T(t){return 61===t?(e.consume(t),P):Hp(t)?(a=T,O(t)):qp(t)?(e.consume(t),T):E(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):Hp(t)?(a=P,O(t)):qp(t)?(e.consume(t),P):(e.consume(t),R)}function A(t){return t===o?(e.consume(t),o=void 0,N):null===t?n(t):Hp(t)?(a=A,O(t)):(e.consume(t),A)}function R(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||$p(t)?E(t):(e.consume(t),R)}function N(e){return 47===e||62===e||$p(e)?E(e):n(e)}function j(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return qp(t)?Xp(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),a(t)}}};const Dh={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Ap(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=Rp(i,e.slice(r+1,r+s+3)),i=Rp(i,[["enter",u,t]]),i=Rp(i,th(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Rp(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=Rp(i,e.slice(o+1)),i=Rp(i,[["exit",l,t]]),Ap(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(_p(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(_h,c,i?c:u)(t):91===t?e.attempt(Mh,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(zh,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},_h={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return $p(t)?Sh(e,o)(t):o(t)}function o(t){return 41===t?c(t):xh(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return $p(t)?Sh(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?kh(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return $p(t)?Sh(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Mh={tokenize:function(e,t,n){const r=this;return function(t){return wh.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(_p(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},zh={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Fh={name:"labelStartImage",resolveAll:Dh.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Ih={name:"labelStartLink",resolveAll:Dh.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Bh={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Xp(e,t,"linePrefix")}}};const Vh={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||Hp(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),qp(t)?Xp(e,i,"whitespace")(t):i(t))}}};const Uh={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ih,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xp(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!qp(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($h,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xp(e,e.attempt(Uh,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:Bp(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Vh,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Bp(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(ih,r.interrupt?n:c,e.attempt(Hh,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return qp(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Hh={partial:!0,tokenize:function(e,t,n){const r=this;return Xp(e,function(e){const o=r.events[r.events.length-1];return!qp(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},$h={partial:!0,tokenize:function(e,t,n){const r=this;return Xp(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const qh={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),qp(t)?Xp(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||Hp(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Wh={tokenize:function(e){const t=this,n=e.attempt(ih,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,Xp(e,e.attempt(this.parser.constructs.flow,r,e.attempt(vh,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Kh={resolveAll:Gh()},Yh=Xh("string"),Qh=Xh("text");function Xh(e){return{resolveAll:Gh("text"===e?Jh:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Gh(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Jh(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Zh={42:Uh,43:Uh,45:Uh,48:Uh,49:Uh,50:Uh,51:Uh,52:Uh,53:Uh,54:Uh,55:Uh,56:Uh,57:Uh,62:ah},em={91:Eh},tm={[-2]:dh,[-1]:dh,32:dh},nm={35:Ph,42:Vh,45:[qh,Vh],60:Nh,61:qh,95:Vh,96:uh,126:uh},rm={38:lh,92:sh},om={[-5]:Bh,[-4]:Bh,[-3]:Bh,33:Fh,38:lh,42:nh,60:[oh,Lh],91:Ih,92:[Th,sh],93:Dh,95:nh,96:ph},im={null:[nh,Kh]},am=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:em,disable:{null:[]},document:Zh,flow:nm,flowInitial:tm,insideSpan:im,string:rm,text:om},Symbol.toStringTag,{value:"Module"}));function sm(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 o={},i=[];let a=[],s=[];const l={attempt:g(function(e,t){y(e,t.from)}),check:g(m),consume:function(e){Hp(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=Rp(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=th(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,v()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Ap(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const lm=/[\0\t\n\r]/g;const cm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function um(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Dp(n.slice(t?2:1),t?16:10)}return Pp(n)||e}const dm={}.hasOwnProperty;function fm(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:C,autolinkEmail:C,atxHeading:i(G),blockQuote:i(W),characterEscape:C,characterReference:C,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(Y,a),codeTextData:C,data:C,codeFlowValue:C,definition:i(Q),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(X),hardBreakEscape:i(J),hardBreakTrailing:i(J),htmlFlow:i(Z,a),htmlFlowData:C,htmlText:i(Z,a),htmlTextData:C,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:I,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(G),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:q,autolinkProtocol:$,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:U,characterReference:H,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(j),codeTextData:T,data:T,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(R),htmlFlowData:T,htmlText:l(N),htmlTextData:T,image:l(L),label:_,labelText:D,lineEnding:P,link:l(O),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:z,resource:F,setextHeading:l(E),setextHeadingLineSequence:S,setextHeadingText:k,strong:l(),thematicBreak:l()}};hm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];dm.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||gm).call(i,void 0,e[0])}for(r.position={start:pm(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:pm(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:pm(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+ep({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||gm).call(this,e,r[0])}n.position.end=pm(e.end)}function u(){return Sp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_p(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function C(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:pm(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=pm(e.end)}function P(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=pm(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(cm,um)}(t),n.identifier=_p(t).toLowerCase()}function _(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_p(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function V(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Dp(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Pp(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=pm(e.end)}function $(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function Q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function G(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!gh(e););return e}(function(e){const t={constructs:jp([am,...(e||{}).extensions||[]]),content:n(Gp),defined:[],document:n(Jp),flow:n(Wh),lazy:{},string:n(Yh),text:n(Qh)};return t;function n(e){return function(n){return sm(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(lm.lastIndex=u,l=lm.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===f&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),f){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function pm(e){return{line:e.line,column:e.column,offset:e.offset}}function hm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?hm(e,r):mm(e,r)}}function mm(e,t){let n;for(n in t)if(dm.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 gm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ep({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ep({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ep({start:t.start,end:t.end})+") is still open")}function ym(e){const t=this;t.parser=function(n){return fm(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vm(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function bm(e){const t=e.spread;return null==t?e.children.length>1:t}function xm(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(wm(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(wm(t.slice(o),o>0,!1)),i.join("")}function wm(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const km={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Qp(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vm(e,t);const o={src:Qp(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Qp(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vm(e,t);const o={href:Qp(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:Qp(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=bm(n[r])}return t}(n):bm(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Jf(t.children[1]),a=Gf(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:xm(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Sm,yaml:Sm,definition:Sm,footnoteDefinition:Sm};function Sm(){}const Em="object"==typeof self?self:globalThis,Cm=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Em[e](t)},Tm=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(Cm(e,t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(Cm(i,a),o)};return r})(new Map,e)(0),Pm="",{toString:Am}={},{keys:Rm}=Object,Nm=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Am.call(e).slice(8,-1);switch(n){case"Array":return[1,Pm];case"Object":return[2,Pm];case"Date":return[3,Pm];case"RegExp":return[4,Pm];case"Map":return[5,Pm];case"Set":return[6,Pm];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},jm=([e,t])=>0===e&&("function"===t||"symbol"===t),Om=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=Nm(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const n of r)e.push(i(n));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of Rm(r))!e&&jm(Nm(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[o,a]of r)(e||!jm(Nm(o))&&!jm(Nm(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&jm(Nm(o))||t.push(i(o));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},Lm="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Tm(Om(e,t)):structuredClone(e):(e,t)=>Tm(Om(e,t));function Dm(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 _m(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Mm=function(e){if(null==e)return Fm;if("function"==typeof e)return zm(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Mm(e[n]);return zm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return zm(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return zm(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function zm(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Fm(){return!0}const Im=[],Bm=!0,Vm=!1;function Um(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Mm(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,f=Im;if((!t||i(o,s,l[l.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Bm,e];return null==e?Im:[e]}(n(o,l)),f[0]===Vm))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Vm)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function Hm(e,t,n,r){let o,i,a;"function"==typeof t&&"function"!=typeof n?(i=void 0,a=t,o=n):(i=t,a=n,o=r),Um(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const $m={}.hasOwnProperty,qm={};function Wm(e,t){e.position&&(t.position=function(e){const t=Jf(e),n=Gf(e);if(t&&n)return{start:t,end:n}}(e))}function Km(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,Lm(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Ym(e,t){const n=t.data||{},r=!("value"in t)||$m.call(n,"hProperties")||$m.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Qm(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Xm(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gm(e,t){const n=function(e,t){const n=t||qm,r=new Map,o=new Map,i=new Map,a={...km,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Xm(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Xm(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Km,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if($m.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Lm(n);return r.children=s.all(e),r}return Lm(e)}return(s.options.unknownHandler||Ym)(s,e,t)},options:n,patch:Wm,wrap:Qm};return Hm(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Dm,r=e.options.footnoteBackLabel||_m,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=Qp(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Lm(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Jm(e,t){return e&&"run"in e?async function(n,r){const o=Gm(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Gm(n,{file:r,...e||t})}}function Zm(e){if(e)throw e}var eg,tg;var ng=function(){if(tg)return eg;tg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return eg=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},eg}();const rg=r(ng);function og(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function ig(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(o);try{s=e.apply(this,t)}catch(i){if(r&&n)throw i;return o(i)}r||(s&&s.then&&"function"==typeof s.then?s.then(a,o):s instanceof Error?o(s):a(s))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const ag={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');sg(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(sg(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){sg(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)sg(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){sg(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function sg(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lg={cwd:function(){return"/"}};function cg(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function ug(e){if("string"==typeof e)e=new URL(e);else if(!cg(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const dg=["history","path","basename","stem","extname","dirname"];class fg{constructor(e){let t;t=e?cg(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":lg.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<dg.length;){const e=dg[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)dg.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?ag.basename(this.path):void 0}set basename(e){hg(e,"basename"),pg(e,"basename"),this.path=ag.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ag.dirname(this.path):void 0}set dirname(e){mg(this.basename,"dirname"),this.path=ag.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ag.extname(this.path):void 0}set extname(e){if(pg(e,"extname"),mg(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ag.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){cg(e)&&(e=ug(e)),hg(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ag.basename(this.path,this.extname):void 0}set stem(e){hg(e,"stem"),pg(e,"stem"),this.path=ag.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new op(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function pg(e,t){if(e&&e.includes(ag.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ag.sep+"`")}function hg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function mg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const gg=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},yg={}.hasOwnProperty;class vg extends gg{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=ig()}copy(){const e=new vg;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(rg(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(kg("data",this.frozen),this.namespace[e]=t,this):yg.call(this.namespace,e)&&this.namespace[e]||void 0:e?(kg("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Cg(e),n=this.parser||this.Parser;return xg("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),xg("process",this.parser||this.Parser),wg("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=Cg(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),xg("processSync",this.parser||this.Parser),wg("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Zm(e),t=r}),Eg("processSync","process",n),t}run(e,t,n){Sg(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=Cg(t);r.run(e,a,function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Zm(e),n=t,r=!0}),Eg("runSync","run",r),n}stringify(e,t){this.freeze();const n=Cg(t),r=this.compiler||this.Compiler;return wg("stringify",r),Sg(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(kg("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=rg(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];og(a)&&og(r)&&(r=rg(!0,a,r)),n[o]=[e,r,...i]}}}}const bg=(new vg).freeze();function xg(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function wg(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function kg(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 Sg(e){if(!og(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Eg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cg(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new fg(e)}const Tg=[],Pg={allowDangerousHtml:!0},Ag=/^(https?|ircs?|mailto|xmpp)$/i,Rg=[{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 Ng(e){const t=function(e){const t=e.rehypePlugins||Tg,n=e.remarkPlugins||Tg,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Pg}:Pg,o=bg().use(ym).use(n).use(Jm,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new fg;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||jg;for(const u of Rg)Object.hasOwn(t,u.from)&&Jd((u.from,u.to&&u.to,u.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Hm(e,c),dp(e,{Fragment:$.Fragment,components:o,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function c(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return a?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in wp)if(Object.hasOwn(wp,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=wp[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,o)),a&&o&&"number"==typeof t)return s&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function jg(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Ag.test(e.slice(0,t))?e:""}function Og(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function Lg(e,t,n){const r=Mm((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Dg(e[0]),_g(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)Um(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Dg(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function _g(e){return"function"==typeof e?e:function(){return e}}const Mg="phrasing",zg=["autolink","link","image","label"];function Fg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ig(e){this.config.enter.autolinkProtocol.call(this,e)}function Bg(e){this.config.exit.autolinkProtocol.call(this,e)}function Vg(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ug(e){this.config.exit.autolinkEmail.call(this,e)}function Hg(e){this.exit(e)}function $g(e){Lg(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qg],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Wg]],{ignore:["link","linkReference"]})}function qg(e,t,n,r,o){let i="";if(!Kg(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Og(e,"(");let i=Og(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Wg(e,t,n,r){return!(!Kg(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Kg(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Kp(n)||Wp(n))&&(!t||47!==n)}function Yg(){this.buffer()}function Qg(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Xg(){this.buffer()}function Gg(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Jg(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_p(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zg(e){this.exit(e)}function ey(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_p(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ty(e){this.exit(e)}function ny(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function ry(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?iy:oy)));return s(),a},footnoteReference:ny},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function oy(e,t,n){return 0===t?e:iy(e,t,n)}function iy(e,t,n){return(n?"":" ")+e}ny.peek=function(){return"["};const ay=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sy(e){this.enter({type:"delete",children:[]},e)}function ly(e){this.exit(e)}function cy(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function uy(e){return e.length}function dy(e){return null==e?"":String(e)}function fy(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function py(e,t,n){return">"+(n?"":" ")+e}function hy(e,t){return my(e,t.inConstruct,!0)&&!my(e,t.notInConstruct,!1)}function my(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function gy(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&hy(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function yy(e,t,n){return(n?"":" ")+e}function vy(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function by(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xy(e,t,n){const r=eh(e),o=eh(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function wy(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=xy(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=by(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=xy(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+by(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function ky(e){return e.value||""}function Sy(e,t,n,r){const o=vy(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function Ey(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Cy(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function Ty(e,t){const n=Sp(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Py(e,t,n,r){const o=vy(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Ty(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function Ay(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ry(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ny(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}cy.peek=function(){return"~"},wy.peek=function(e,t,n){return n.options.emphasis||"*"},ky.peek=function(){return"<"},Sy.peek=function(){return"!"},Ey.peek=function(){return"!"},Cy.peek=function(){return"`"},Py.peek=function(e,t,n){return Ty(e,n)?"<":"["},Ay.peek=function(){return"["};const jy=Mm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Oy(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=xy(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=by(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=xy(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+by(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}Oy.peek=function(e,t,n){return n.options.strong||"*"};const Ly={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),py);return o(),a},break:gy,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,yy);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=vy(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:wy,hardBreak:gy,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return Hm(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Vm}),Boolean((!e.depth||e.depth<3)&&Sp(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=by(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:ky,image:Sy,imageReference:Ey,inlineCode:Cy,link:Py,linkReference:Ay,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Ry(n);const s=e.ordered?"."===a?")":".":function(e){const t=Ry(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ny(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||Ry(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e});return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some(function(e){return jy(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Oy,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ny(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Dy(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function _y(e){this.exit(e),this.data.inTable=void 0}function My(e){this.enter({type:"tableRow",children:[]},e)}function zy(e){this.exit(e)}function Fy(e){this.enter({type:"tableCell",children:[]},e)}function Iy(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,By));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function By(e,t){return"|"===t?t:e}function Vy(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Ly.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s([l(e,n,r)]);return o.slice(0,o.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||uy,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=dy(e[u][i]);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)i[d]=fy(r[d]);else{const e=fy(r);for(;++d<c;)i[d]=e}d=-1;const f=[],p=[];for(;++d<c;){const e=i[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[d]&&(l[d]=o),p[d]=o),f[d]=a}a.splice(1,0,f),s.splice(1,0,p),u=-1;const h=[];for(;++u<a.length;){const e=a[u],t=s[u];d=-1;const r=[];for(;++d<c;){const o=e[d]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=i[d];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function Uy(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Hy(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function $y(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=Ly.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const qy={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Wy={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(Yy,l,s)(t):null===t||$p(t)||Kp(t)||45!==t&&Wp(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},Ky={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(Yy,t,i)(a):null===a||$p(a)||Kp(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Yy={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||$p(a)||Kp(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||$p(e)||Kp(e)?t(e):r(e)}function i(e){return Mp(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):Mp(t)?(e.consume(t),a):n(t)}},partial:!0},Qy={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return zp(e)?n(e):t(e)}},partial:!0},Xy={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!tv.call(r,r.previous)||iv(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(qy,e.attempt(Wy,e.attempt(Ky,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:tv},Gy={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&nv.call(r,r.previous)&&!iv(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(Mp(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||Ip(t)||$p(t)||Kp(t)||Wp(t)?n(t):e.attempt(Wy,e.attempt(Ky,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:nv},Jy={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!ov(t)||!rv.call(r,r.previous)||iv(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return ov(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Qy,c,l)(t):45===t||95===t||zp(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&Mp(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:rv},Zy={};let ev=48;for(;ev<123;)Zy[ev]=Jy,ev++,58===ev?ev=65:91===ev&&(ev=97);function tv(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||$p(e)}function nv(e){return!Mp(e)}function rv(e){return!(47===e||ov(e))}function ov(e){return 43===e||45===e||46===e||95===e||zp(e)}function iv(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Zy[43]=Jy,Zy[45]=Jy,Zy[46]=Jy,Zy[95]=Jy,Zy[72]=[Jy,Gy],Zy[104]=[Jy,Gy],Zy[87]=[Jy,Xy],Zy[119]=[Jy,Xy];const av={tokenize:function(e,t,n){const r=this;return Xp(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function sv(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=_p(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function lv(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function cv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||$p(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(_p(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return $p(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function uv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||$p(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=_p(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return $p(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),Xp(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function dv(e,t,n){return e.check(ih,t,e.attempt(av,t,n))}function fv(e){e.exit("gfmFootnoteDefinition")}function pv(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=eh(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=eh(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&Ap(a,a.length,0,th(s,e.slice(r+1,n),t)),Ap(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),Ap(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class hv{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function mv(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function gv(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?x:s;if(i===x&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):Hp(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):qp(t)?Xp(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||$p(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,qp(t)?Xp(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return qp(t)?Xp(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||Hp(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return qp(t)?Xp(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||Hp(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function x(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||Hp(n)?(e.exit("tableRow"),t(n)):qp(n)?Xp(e,w,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||$p(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function yv(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new hv;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(bv(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=vv(f,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=vv(f,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=vv(f,t,l,s,i,o)):0!==c[1]&&(o=vv(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&bv(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=mv(t.events,i))}return e}function vv(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},xv(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=xv(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=xv(t.events,n[2]),i=xv(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},xv(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function bv(e,t,n,r,o){const i=[],a=xv(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function xv(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const wv={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return $p(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return Hp(r)?t(r):qp(r)?e.check({tokenize:kv},t,n)(r):n(r)}}};function kv(e,t,n){return Xp(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Sv={};function Ev(e){const t=e||Sv,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return jp([{text:Zy},{document:{91:{name:"gfmFootnoteDefinition",tokenize:uv,continuation:{tokenize:dv},exit:fv}},text:{91:{name:"gfmFootnoteCall",tokenize:cv},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sv,resolveTo:lv}}},pv(e),{flow:{null:{name:"table",tokenize:gv,resolveAll:yv}}},{text:{91:wv}}])}(t)),o.push([{transforms:[$g],enter:{literalAutolink:Fg,literalAutolinkEmail:Ig,literalAutolinkHttp:Ig,literalAutolinkWww:Ig},exit:{literalAutolink:Hg,literalAutolinkEmail:Ug,literalAutolinkHttp:Bg,literalAutolinkWww:Vg}},{enter:{gfmFootnoteCallString:Yg,gfmFootnoteCall:Qg,gfmFootnoteDefinitionLabelString:Xg,gfmFootnoteDefinition:Gg},exit:{gfmFootnoteCallString:Jg,gfmFootnoteCall:Zg,gfmFootnoteDefinitionLabelString:ey,gfmFootnoteDefinition:ty}},{canContainEols:["delete"],enter:{strikethrough:sy},exit:{strikethrough:ly}},{enter:{table:Dy,tableData:Fy,tableHeader:Fy,tableRow:My},exit:{codeText:Iy,table:_y,tableData:zy,tableHeader:zy,tableRow:zy}},{exit:{taskListCheckValueChecked:Uy,taskListCheckValueUnchecked:Uy,paragraph:Hy}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mg,notInConstruct:zg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mg,notInConstruct:zg},{character:":",before:"[ps]",after:"\\/",inConstruct:Mg,notInConstruct:zg}]},ry(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ay}],handlers:{delete:cy}},Vy(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$y}}]}}(t))}const Cv=({content:e})=>$.jsx("div",{className:"prose-custom",children:$.jsx(Ng,{remarkPlugins:[Ev],children:e})}),Tv=({message:e})=>{const t="assistant"===e.role,{config:n}=Qd();return $.jsx("div",{className:`flex w-full ${t?"justify-start":"justify-end"} mb-6 animate-in fade-in slide-in-from-bottom-2 duration-300`,children:$.jsxs("div",{className:`flex max-w-[88%] ${t?"flex-row":"flex-row-reverse"} gap-3`,children:[$.jsx("div",{className:`\n h-8 w-8 rounded-full flex items-center justify-center shrink-0 shadow-sm border \n ${t?"bg-white border-slate-100":"border-transparent text-white"}\n `,style:t?{}:{backgroundColor:n.primaryColor},children:t?$.jsx(Dl,{size:16,style:{color:n.primaryColor},strokeWidth:2.5}):$.jsx(cc,{size:16,strokeWidth:2.5})}),$.jsxs("div",{className:"flex flex-col gap-2 "+(t?"items-start":"items-end"),children:[$.jsx("div",{className:"\n px-4 py-3 rounded-2xl shadow-[0_2px_10px_rgba(0,0,0,0.02)] transition-all\n "+(t?"bg-white/90 backdrop-blur-md border border-white/50 text-slate-800 rounded-tl-none":"text-white rounded-tr-none shadow-md"),style:t?{}:{backgroundColor:n.primaryColor},children:$.jsx(Cv,{content:e.content})}),t&&e.sources&&e.sources.length>0&&$.jsxs("div",{className:"mt-2 w-full animate-in fade-in slide-in-from-top-1 duration-500",children:[$.jsxs("div",{className:"flex items-center gap-1.5 mb-2 ml-1",children:[$.jsx(oc,{size:10,className:"text-slate-400"}),$.jsx("span",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"Sources consultées"})]}),$.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.sources.map((e,t)=>$.jsxs("div",{title:e,className:"\r\n flex items-center gap-1.5 px-2.5 py-1 \r\n bg-slate-100/50 border border-slate-200/60 rounded-full \r\n text-[10px] font-bold text-slate-500 \r\n hover:bg-white hover:border-blue-300 hover:text-blue-600 \r\n transition-all cursor-help max-w-[160px]\r\n ",children:[$.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-blue-400 shrink-0 shadow-sm"}),$.jsx("span",{className:"truncate",children:e.split("/").pop()})]},t))})]})]})]})})},Pv=({file:e,onRemove:t})=>$.jsxs(Rl.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},className:"flex items-center gap-2 px-3 py-1.5 bg-blue-50 border border-blue-100 rounded-xl text-[11px] text-blue-600 font-bold shadow-sm",children:[$.jsx($l,{size:12}),$.jsx("span",{className:"truncate max-w-[100px]",children:e.name}),$.jsx("button",{onClick:t,className:"hover:text-red-500 transition-colors border-none bg-transparent cursor-pointer",children:$.jsx(uc,{size:12})})]}),Av=({onSend:e,disabled:t})=>{const[n,r]=u.useState(""),[o,i]=u.useState([]),{config:a}=Qd(),s=u.useRef(null),l=()=>{(n.trim()||o.length>0)&&!t&&(e(n,o),r(""),i([]))};return $.jsxs("div",{className:"space-y-3",children:[$.jsx(ds,{children:o.length>0&&$.jsx("div",{className:"flex flex-wrap gap-2 animate-in fade-in slide-in-from-bottom-2",children:o.map((e,t)=>$.jsx(Pv,{file:e,onRemove:()=>{return e=t,void i(o.filter((t,n)=>n!==e));var e}},t))})}),$.jsxs("div",{className:"relative flex items-end gap-2 bg-white/70 backdrop-blur-md border border-slate-200 rounded-2xl p-2 focus-within:border-blue-400 transition-all shadow-sm",children:[$.jsx("input",{type:"file",multiple:!0,ref:s,onChange:e=>{e.target.files&&i([...o,...Array.from(e.target.files)])},className:"hidden"}),$.jsx("button",{onClick:()=>{var e;return null==(e=s.current)?void 0:e.click()},className:"p-2 text-slate-400 hover:text-blue-600 transition-colors border-none bg-transparent cursor-pointer",children:$.jsx(Jl,{size:20})}),$.jsx("textarea",{rows:1,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),l()),placeholder:"Envoyez un message ou un fichier...",className:"w-full bg-transparent border-none focus:ring-0 resize-none py-2 text-[14px] text-slate-700 max-h-32 outline-none"}),$.jsx("button",{onClick:l,disabled:!n.trim()&&0===o.length||t,className:"p-2 rounded-xl text-white disabled:opacity-30 transition-all border-none cursor-pointer",style:{backgroundColor:a.primaryColor},children:t?$.jsx(Yl,{size:20,className:"animate-spin"}):$.jsx(tc,{size:20})})]})]})},Rv=({onSuggestion:e})=>{const{botName:t,logoUrl:n,primaryColor:r}=pc(),o=[{label:"Je veux une liste des employés ?",icon:sc},{label:"Quelles sont les ressources de l'entreprise disponibles ?",icon:Xl},{label:"Résume-moi le dernier document RH",icon:$l}];return $.jsxs("div",{className:"flex flex-col items-center justify-center p-8 text-center animate-in fade-in zoom-in duration-500",children:[$.jsxs("div",{className:"relative mb-6",children:[$.jsx("div",{className:"h-20 w-20 rounded-[24px] bg-white shadow-xl flex items-center justify-center p-4 border border-slate-50",children:$.jsx("img",{src:n,alt:t,className:"h-full w-full object-contain"})}),$.jsx("div",{style:{backgroundColor:r},className:"absolute -bottom-2 -right-2 h-8 w-8 rounded-xl border-4 border-white flex items-center justify-center text-white",children:$.jsx(Dl,{size:16,strokeWidth:3})})]}),$.jsxs("h1",{className:"text-xl font-black text-slate-800 mb-2 tracking-tight",children:["Bonjour, je suis ",t]}),$.jsx("p",{className:"text-sm text-slate-400 mb-10 max-w-[240px] leading-relaxed",children:"Votre assistant intelligent. Je peux analyser vos documents et répondre à vos questions."}),$.jsxs("div",{className:"w-full space-y-2",children:[$.jsx("p",{className:"text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] mb-4",children:"Suggestions"}),o.map((t,n)=>$.jsxs("button",{onClick:()=>e(t.label),className:"w-full flex items-center gap-3 p-3 bg-white border border-slate-100 rounded-2xl text-xs font-bold text-slate-600 hover:border-blue-200 hover:shadow-md transition-all cursor-pointer text-left",children:[$.jsx("div",{className:"p-1.5 bg-slate-50 rounded-lg text-slate-400",children:$.jsx(t.icon,{size:14})}),t.label]},n))]})]})},Nv=()=>$.jsxs("div",{className:"flex gap-3 mb-4 animate-in fade-in",children:[$.jsx("div",{className:"h-8 w-8 rounded-full bg-white border border-slate-100 flex items-center justify-center",children:$.jsx("div",{className:"flex gap-1",children:[0,1,2].map(e=>$.jsx(Rl.div,{animate:{opacity:[.3,1,.3]},transition:{duration:1,repeat:1/0,delay:.2*e},className:"h-1.5 w-1.5 bg-blue-500 rounded-full"},e))})}),$.jsx("div",{className:"bg-white/50 backdrop-blur-md border border-white/50 px-4 py-3 rounded-2xl rounded-tl-none shadow-sm",children:$.jsx("span",{className:"text-xs text-slate-400 font-medium italic",children:"Recherche dans vos documents..."})})]}),jv=()=>{const{messages:e,addMessage:t,setLoading:n,isLoading:r,activeThreadId:o,setThreadId:i}=Qd(),{initialMessage:a,botName:s,userName:l,apiUrl:c,userToken:d}=pc(),f=u.useRef(null);u.useEffect(()=>{f.current&&f.current.scrollTo({top:f.current.scrollHeight,behavior:"smooth"})},[e,r]);const p=async(e,a=[])=>{if(!e.trim()&&0===a.length||r)return;let s=e.trim();if(a.length>0){s+=`\n\n**Fichiers joints :**\n${a.map(e=>`📄 ${e.name}`).join("\n")}`}t({id:Date.now().toString(),role:"user",content:s,timestamp:new Date}),n(!0);try{a.length>0&&await Yd(c,d,a);const n=a.map(e=>e.name).join(", ");let r=e.trim();a.length>0&&(r=r?`${r}\n\n(Contexte : L'utilisateur a joint les fichiers suivants pour analyse : ${n})`:`Analyse les documents suivants que je viens de t'envoyer : ${n}.`);const s=await Vd(c,d,{message:r,thread_id:o||""});!o&&s.thread_id&&i(s.thread_id),t({id:(Date.now()+1).toString(),role:"assistant",content:s.response,sources:s.sources||[],timestamp:new Date})}catch(l){console.error("Chat Error:",l),t({id:"err-"+Date.now(),role:"assistant",content:"⚠️ Désolé, je n'ai pas pu obtenir de réponse. Veuillez vérifier la connexion au serveur DHI.",timestamp:new Date})}finally{n(!1)}},h=a.replace("{botName}",s).replace("{name}",l);return $.jsxs("div",{className:"flex flex-col h-full bg-transparent overflow-hidden",children:[$.jsx("div",{ref:f,className:"flex-1 overflow-y-auto px-4 py-6 space-y-6 custom-scrollbar scroll-smooth",children:0!==e.length||r?$.jsxs("div",{className:"flex flex-col min-h-full",children:[e.map(e=>$.jsx(Tv,{message:e},e.id)),r&&$.jsx("div",{className:"mt-2",children:$.jsx(Nv,{})})]}):$.jsxs("div",{className:"flex flex-col gap-6 animate-in fade-in duration-700",children:[$.jsx(Tv,{message:{id:"virtual-intro",role:"assistant",content:h,timestamp:new Date}}),$.jsx(Rv,{onSuggestion:e=>p(e)})]})}),$.jsx("div",{className:"p-4 bg-white/40 backdrop-blur-xl border-t border-black/[0.03] shadow-[0_-10px_30px_rgba(0,0,0,0.02)]",children:$.jsxs("div",{className:"max-w-[480px] mx-auto",children:[" ",$.jsx(Av,{onSend:p,disabled:r}),$.jsxs("div",{className:"flex justify-center items-center gap-4 mt-3",children:[$.jsxs("span",{className:"text-[9px] text-slate-400 font-bold uppercase tracking-widest flex items-center gap-1",children:[$.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-500"}),"RAG Active"]}),$.jsx("span",{className:"text-[9px] text-slate-300 font-medium italic",children:"Vérifiez les sources citées."})]})]})})]})},Ov=({onSelectThread:e})=>{const{config:t,threads:n,fetchThreads:r,loadThread:o,isLoading:i,activeThreadId:a}=Qd();u.useEffect(()=>{r()},[]);return $.jsxs("div",{className:"flex flex-col h-full p-6 animate-in fade-in slide-in-from-right-4 overflow-hidden",children:[$.jsxs("button",{onClick:()=>{o(null),e()},style:{backgroundColor:`${t.primaryColor}10`,color:t.primaryColor,borderColor:`${t.primaryColor}30`},className:"flex items-center justify-center gap-2 w-full py-4 rounded-2xl border-2 border-dashed font-bold text-sm mb-8 hover:scale-[1.01] active:scale-[0.98] transition-all cursor-pointer",children:[$.jsx(Zl,{size:18,strokeWidth:3}),"Nouvelle discussion"]}),$.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[$.jsx("h3",{className:"text-[10px] font-black text-slate-400 uppercase tracking-[0.2em]",children:"Conversations récentes"}),$.jsx(Vl,{size:12,className:"text-slate-300"})]}),$.jsx("div",{className:"flex-1 space-y-3 overflow-y-auto custom-scrollbar pr-2 pb-6",children:i&&0===n.length?$.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-3",children:[$.jsx(Yl,{size:24,className:"animate-spin text-slate-300"}),$.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Récupération de l'historique..."})]}):0===n.length?$.jsx("div",{className:"text-center py-12 px-6 border border-dashed border-slate-100 rounded-3xl bg-slate-50/50",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucune discussion trouvée."})}):n.map(n=>$.jsxs("div",{onClick:()=>(async t=>{await o(t),e()})(n.id),className:`\n group relative flex items-center justify-between p-4 rounded-2xl transition-all cursor-pointer border\n ${a===n.id?"bg-white border-blue-100 shadow-md ring-1 ring-blue-50":"bg-white border-slate-100 hover:border-blue-200 hover:shadow-sm"}\n `,children:[a===n.id&&$.jsx("div",{className:"absolute left-0 top-4 bottom-4 w-1 rounded-r-full",style:{backgroundColor:t.primaryColor}}),$.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[$.jsx("div",{className:`\n p-2.5 rounded-xl transition-colors\n ${a===n.id?"bg-blue-50 text-blue-600":"bg-slate-50 text-slate-400 group-hover:text-blue-500 group-hover:bg-blue-50/50"}\n `,children:$.jsx(Xl,{size:18})}),$.jsxs("div",{className:"overflow-hidden",children:[$.jsx("p",{className:"text-sm font-bold text-slate-700 truncate group-hover:text-slate-900 transition-colors",children:n.title||"Discussion sans titre"}),$.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[$.jsxs("span",{className:"text-[9px] font-bold text-slate-400 uppercase tracking-tight group-hover:text-blue-400 transition-colors",children:["ID: ",n.id.slice(-4)]}),n.date&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"text-slate-200 text-[10px]",children:"•"}),$.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-slate-400",children:[$.jsx(_l,{size:10}),$.jsx("span",{children:n.date})]})]})]})]})]}),$.jsx(Il,{size:16,className:"transition-all "+(a===n.id?"text-blue-400 translate-x-0":"text-slate-300 translate-x-[-4px] opacity-0 group-hover:opacity-100 group-hover:translate-x-0")})]},n.id))})]})},Lv=({connector:e})=>{var t,n;const{removeSource:r,syncSource:o,config:i}=Qd(),[a,s]=u.useState(!1),[l,c]=u.useState(!1),d="active"===e.status,f="indexing"===e.status||l,p=e.last_indexed_at?new Date(e.last_indexed_at).toLocaleDateString("fr-FR",{day:"numeric",month:"short"}):null;return $.jsxs("div",{className:`\n group bg-white border rounded-2xl transition-all duration-300 overflow-hidden\n ${a?"shadow-xl border-blue-200":"border-slate-100 hover:border-blue-100 hover:shadow-sm"}\n `,children:[$.jsxs("div",{onClick:()=>s(!a),className:"p-4 flex items-center justify-between cursor-pointer select-none",children:[$.jsxs("div",{className:"flex items-center gap-4 overflow-hidden",children:[$.jsx("div",{className:`\n p-3 rounded-xl transition-colors\n ${f?"bg-amber-50 text-amber-600":d?"bg-blue-50 text-blue-600":"bg-slate-50 text-slate-400"}\n `,children:f?$.jsx(ec,{size:18,className:"animate-spin"}):(e=>{const t={size:18,strokeWidth:2.5};switch(e){case"WEB":return $.jsx(Wl,{...t});case"AWS_S3":return $.jsx(Ul,{...t});case"AZURE_BLOB":return $.jsx(Hl,{...t});case"SFTP":return $.jsx(nc,{...t});default:return $.jsx(Kl,{...t})}})(e.storage_type)}),$.jsxs("div",{className:"overflow-hidden",children:[$.jsx("h3",{className:"text-sm font-bold text-slate-800 truncate group-hover:text-slate-900",children:e.source_id}),$.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[$.jsx("span",{className:"w-1.5 h-1.5 rounded-full "+(f?"bg-amber-500 animate-pulse":d?"bg-emerald-500":"bg-red-500")}),$.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest text-slate-400",children:f?"Synchronisation...":e.status}),p&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"text-slate-200 text-[10px]",children:"•"}),$.jsxs("div",{className:"flex items-center gap-1 text-[9px] text-slate-400 font-bold",children:[$.jsx(_l,{size:10})," ",p]})]})]})]})]}),$.jsxs("div",{className:"flex items-center gap-1",children:[$.jsx("button",{onClick:async t=>{t.stopPropagation(),c(!0);try{await o(e.source_id)}finally{c(!1)}},disabled:f,className:"p-2 text-slate-300 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all",title:"Relancer l'indexation",children:$.jsx(ec,{size:16})}),$.jsx("button",{onClick:async t=>{t.stopPropagation(),window.confirm(`Supprimer la source "${e.source_id}" ?`)&&await r(e.source_id)},className:"p-2 text-slate-300 hover:text-red-500 hover:bg-red-50 rounded-lg transition-all",title:"Supprimer",children:$.jsx(lc,{size:16})}),$.jsx("div",{className:"p-1 text-slate-300 transition-transform duration-300 "+(a?"rotate-180 text-blue-500":""),children:$.jsx(zl,{size:20})})]})]}),$.jsx(ds,{children:a&&$.jsx(Rl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},className:"border-t border-slate-50 bg-slate-50/50",children:$.jsxs("div",{className:"p-4 space-y-3",children:[$.jsx("div",{className:"flex items-center justify-between",children:$.jsxs("p",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest flex items-center gap-2",children:[$.jsx($l,{size:12}),"Documents Indexés (",(null==(t=e.indexed_files)?void 0:t.length)||0,")"]})}),$.jsx("div",{className:`\n space-y-1.5 overflow-y-auto custom-scrollbar pr-1\n ${(null==(n=e.indexed_files)?void 0:n.length)>5?"max-h-48":"h-auto"}\n `,children:e.indexed_files&&e.indexed_files.length>0?e.indexed_files.map((e,t)=>$.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-slate-600 py-2 px-3 bg-white border border-black/[0.03] rounded-xl hover:border-blue-200 transition-colors shadow-sm",children:[$.jsx(Bl,{className:"w-3.5 h-3.5 text-emerald-500 shrink-0"}),$.jsx("span",{className:"truncate flex-1 font-medium",children:e.replace("✅ Indexé:","").replace("✅ Indexé :","").trim()})]},t)):$.jsx("div",{className:"py-6 text-center",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucun document n'a encore été indexé pour cette source."})})})]})})})]})},Dv=({children:e,required:t})=>$.jsxs("label",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5 block ml-1",children:[e," ",t&&$.jsx("span",{className:"text-red-500",children:"*"})]}),_v=({error:e,...t})=>$.jsxs("div",{className:"w-full",children:[$.jsx("input",{...t,className:`w-full p-3 bg-slate-50 border ${e?"border-red-400 bg-red-50":"border-slate-100"} rounded-xl text-sm focus:ring-2 focus:ring-blue-500/20 outline-none transition-all placeholder:text-slate-300`}),e&&$.jsx("p",{className:"text-[9px] text-red-500 font-bold mt-1 ml-1",children:e})]}),Mv=({title:e,children:t,description:n})=>$.jsxs("div",{className:"p-4 bg-slate-50/50 border border-slate-100 rounded-2xl space-y-4",children:[$.jsxs("div",{className:"border-b border-blue-100 pb-2 mb-3",children:[$.jsx("h4",{className:"text-[10px] font-black text-blue-600 uppercase tracking-wider",children:e}),n&&$.jsx("p",{className:"text-[9px] text-slate-400 font-medium",children:n})]}),$.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:t})]}),zv=[{id:"WEB",label:"Web",icon:Wl,color:"text-indigo-500"},{id:"AZURE_BLOB",label:"Azure",icon:Hl,color:"text-blue-500"},{id:"AWS_S3",label:"AWS S3",icon:Ul,color:"text-amber-500"},{id:"SFTP",label:"SFTP",icon:nc,color:"text-violet-500"},{id:"GOOGLE_DRIVE",label:"G-Drive",icon:Kl,color:"text-emerald-500"},{id:"LOCAL",label:"Local",icon:ql,color:"text-slate-500"}],Fv=()=>{const{config:e,fetchConnectors:t,setShowAddForm:n}=Qd(),[r,o]=u.useState(!1),[i,a]=u.useState("WEB"),[s,l]=u.useState(""),[c,d]=u.useState(""),[f,p]=u.useState(!0),[h,m]=u.useState({port:"22",protocol:"https",suffix:"core.windows.net",username:"",password:"",host:""}),[g,y]=u.useState({}),v=(e,t)=>{m({...h,[e]:t}),g[e]&&y({...g,[e]:null})};return $.jsxs("form",{onSubmit:async r=>{if(r.preventDefault(),"WEB"===i)return void alert("ℹ️ Information : La fonctionnalité d'indexation WEB n'est pas encore disponible dans cette version.");if(!(()=>{let e={};return s||(e.source_id="L'identifiant est requis"),c||(e.path="Ce champ est requis"),"SFTP"===i&&(h.host||(e.host="Hôte requis"),h.username||(e.username="User requis")),"AZURE_BLOB"!==i||h.account_name&&h.account_key||(e.azure="Informations Azure incomplètes"),"GOOGLE_DRIVE"!==i||h.service_account_json||(e.service_account_json="JSON Requis"),y(e),0===Object.keys(e).length})())return;o(!0);let a={};switch(i){case"AZURE_BLOB":a={connection_string:`DefaultEndpointsProtocol=${h.protocol};AccountName=${h.account_name};AccountKey=${h.account_key};EndpointSuffix=${h.suffix}`,container:h.container||c};break;case"AWS_S3":a={aws_access_key_id:h.aws_access_key_id,aws_secret_access_key:h.aws_secret_access_key,region_name:h.region_name};break;case"SFTP":a={host:h.host,port:parseInt(h.port)||22,username:h.username,password:h.password||""};break;case"GOOGLE_DRIVE":try{a=JSON.parse(h.service_account_json)}catch(l){return alert("Format JSON invalide pour Google Drive"),void o(!1)}break;default:a={}}try{await qd(e.apiUrl,e.userToken,{source_id:s,storage_type:i,path:c,recursive:f,credentials:a}),await t(),n(!1)}catch(l){console.error(l)}finally{o(!1)}},className:"space-y-6 animate-in slide-in-from-bottom-4 duration-500 pb-10",children:[$.jsx("div",{className:"grid grid-cols-3 gap-2",children:zv.map(e=>$.jsxs("button",{type:"button",onClick:()=>{a(e.id),y({})},className:"flex flex-col items-center gap-2 p-3 rounded-2xl border transition-all "+(i===e.id?"border-blue-500 bg-blue-50 text-blue-600 shadow-sm":"border-slate-100 bg-white text-slate-400 hover:border-slate-200"),children:[$.jsx(e.icon,{size:18,className:i===e.id?e.color:""}),$.jsx("span",{className:"text-[9px] font-black uppercase tracking-tighter",children:e.label})]},e.id))}),$.jsxs("div",{className:"space-y-4 bg-white/50 p-4 rounded-2xl border border-slate-100",children:[$.jsxs("div",{children:[$.jsx(Dv,{required:!0,children:"Identifiant Unique de la Source"}),$.jsx(_v,{placeholder:"Ex: Archives_RH_S3",value:s,onChange:e=>l(e.target.value),error:g.source_id})]}),$.jsxs("div",{children:[$.jsx(Dv,{required:!0,children:"AWS_S3"===i?"Nom du Bucket":"GOOGLE_DRIVE"===i?"ID du Dossier (Folder ID)":"WEB"===i?"URL Racine":"Chemin d'accès (Path)"}),$.jsx(_v,{placeholder:"AWS_S3"===i?"Ex: mon-bucket-rh":"GOOGLE_DRIVE"===i?"Ex: 1A2b3C4d5E...":"WEB"===i?"https://docs.entreprise.com":"Ex: /var/www/documents",value:c,onChange:e=>d(e.target.value),error:g.path})]})]}),"AZURE_BLOB"===i&&$.jsxs(Mv,{title:"Azure Storage Access",description:"Clés de votre compte Azure",children:[$.jsx(_v,{placeholder:"Account Name",onChange:e=>v("account_name",e.target.value)}),$.jsx(_v,{type:"password",placeholder:"Account Key",onChange:e=>v("account_key",e.target.value)}),$.jsx("div",{className:"md:col-span-2",children:$.jsx(_v,{placeholder:"Conteneur spécifique (optionnel)",onChange:e=>v("container",e.target.value)})})]}),"AWS_S3"===i&&$.jsxs(Mv,{title:"AWS IAM Credentials",description:"Identifiants S3 sécurisés",children:[$.jsx(_v,{placeholder:"Access Key ID",onChange:e=>v("aws_access_key_id",e.target.value)}),$.jsx(_v,{type:"password",placeholder:"Secret Access Key",onChange:e=>v("aws_secret_access_key",e.target.value)}),$.jsx("div",{className:"md:col-span-2",children:$.jsx(_v,{placeholder:"Région (ex: us-east-1)",onChange:e=>v("region_name",e.target.value)})})]}),"SFTP"===i&&$.jsxs(Mv,{title:"Connexion SFTP",description:"Accès au serveur de fichiers",children:[$.jsx(_v,{placeholder:"Hôte (ex: sftp.site.com)",onChange:e=>v("host",e.target.value),error:g.host}),$.jsx(_v,{placeholder:"Port (Défaut: 22)",value:h.port,onChange:e=>v("port",e.target.value)}),$.jsx(_v,{placeholder:"Nom d'utilisateur",onChange:e=>v("username",e.target.value),error:g.username}),$.jsx(_v,{type:"password",placeholder:"Mot de passe",onChange:e=>v("password",e.target.value)})]}),"GOOGLE_DRIVE"===i&&$.jsxs("div",{className:"space-y-3 p-4 bg-slate-900 rounded-2xl border border-slate-800",children:[$.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[$.jsx(Ql,{size:14,className:"text-emerald-500"}),$.jsx(Dv,{required:!0,children:$.jsx("span",{className:"text-white",children:"Service Account JSON"})})]}),$.jsx("textarea",{className:"w-full h-40 p-3 bg-slate-950 text-emerald-400 font-mono text-[10px] rounded-xl border-none outline-none focus:ring-1 focus:ring-emerald-500/50 resize-none shadow-inner",placeholder:"Collez le contenu de votre fichier .json ici...",onChange:e=>v("service_account_json",e.target.value)}),$.jsx("p",{className:"text-[9px] text-slate-500 italic",children:"L'email du Service Account doit avoir accès au dossier."})]}),"WEB"===i&&$.jsxs("div",{className:"p-4 bg-amber-50 border border-amber-100 rounded-2xl flex items-start gap-3",children:[$.jsx(ic,{className:"text-amber-500 shrink-0",size:18}),$.jsx("p",{className:"text-[10px] text-amber-800 font-medium leading-relaxed uppercase tracking-tighter",children:"Le crawling Web n'est pas encore disponible. Cette fonctionnalité est en cours de développement et sera bientôt accessible pour enrichir vos connaissances IA à partir de sources en ligne."})]}),$.jsx("div",{className:"pt-4",children:$.jsx("button",{type:"submit",disabled:r,style:{backgroundColor:e.primaryColor},className:`\n w-full py-4 rounded-2xl text-white font-bold text-sm shadow-xl flex items-center justify-center gap-2 \n transition-all border-none cursor-pointer\n ${r?"opacity-70 cursor-not-allowed":"hover:scale-[1.02] active:scale-[0.98]"}\n `,children:r?$.jsxs($.Fragment,{children:[$.jsx(Yl,{size:18,className:"animate-spin"}),$.jsx("span",{children:"Traitement en cours..."})]}):$.jsxs($.Fragment,{children:[$.jsx(Ml,{size:18,strokeWidth:3}),$.jsx("span",{children:"Enregistrer la source"})]})})})]})},Iv=()=>{const{connectors:e,fetchConnectors:t,showAddForm:n,setShowAddForm:r,config:o}=Qd();return u.useEffect(()=>{t()},[]),$.jsx("div",{className:"h-full flex flex-col bg-transparent",children:$.jsx(ds,{mode:"wait",children:n?$.jsxs(Rl.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-6 space-y-6",children:[$.jsxs("button",{onClick:()=>r(!1),className:"flex items-center gap-2 text-xs font-bold text-slate-400 hover:text-slate-600 border-none bg-transparent cursor-pointer",children:[$.jsx(Fl,{size:14})," Retour à la liste"]}),$.jsx(Fv,{})]},"form"):$.jsxs(Rl.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-6 space-y-6",children:[$.jsxs("header",{className:"flex justify-between items-end",children:[$.jsxs("div",{children:[$.jsx("h2",{className:"text-lg font-black text-slate-800 tracking-tight",children:"Sources"}),$.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Connaissances de l'IA"})]}),$.jsx("button",{onClick:()=>r(!0),style:{backgroundColor:o.primaryColor},className:"p-2 rounded-xl text-white shadow-lg hover:scale-110 transition-transform border-none cursor-pointer",children:$.jsx(Zl,{size:20})})]}),$.jsx("div",{className:"space-y-3",children:0===e.length?$.jsx("div",{className:"py-10 text-center border-2 border-dashed border-slate-100 rounded-3xl",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucune source connectée."})}):e.map(e=>$.jsx(Lv,{connector:e},e.source_id))}),$.jsxs("div",{className:"p-4 bg-emerald-50/50 border border-emerald-100 rounded-2xl flex gap-3",children:[$.jsx(ac,{className:"text-emerald-600 shrink-0",size:18}),$.jsx("p",{className:"text-[10px] text-emerald-800 leading-relaxed font-medium",children:"Isolation RAG active : vos documents sont chiffrés et accessibles uniquement par ce Copilot."})]})]},"list")})})},Bv=({activeView:e,setView:t,onClose:n})=>{const{config:r}=Qd(),o=[{id:"chat",icon:Gl,label:"Chat"},{id:"history",icon:Vl,label:"Historique"},{id:"settings",icon:rc,label:"Sources"}];return $.jsxs("nav",{className:"flex items-center justify-between px-5 py-4 bg-white/40 backdrop-blur-xl border-b border-black/[0.03] shrink-0",children:[$.jsx("div",{className:"flex bg-slate-200/50 p-1 rounded-xl gap-1",children:o.map(n=>{const o=e===n.id;return $.jsxs("button",{onClick:()=>t(n.id),className:`\n flex items-center gap-2 px-3 py-1.5 rounded-lg transition-all duration-300 \n text-xs font-bold select-none border-none cursor-pointer\n ${o?"bg-white shadow-md":"text-slate-400 hover:text-slate-600"}\n `,children:[$.jsx(n.icon,{size:14,style:o?{color:r.primaryColor}:{},strokeWidth:o?2.5:2}),o&&$.jsx("span",{className:"animate-in fade-in zoom-in duration-300 text-slate-900",children:n.label})]},n.id)})}),$.jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-red-50 hover:text-red-500 text-slate-400 transition-all border-none cursor-pointer",children:$.jsx(uc,{size:20})})]})},Vv=({close:e})=>{const[t,n]=u.useState("chat");return $.jsxs("div",{className:"flex flex-col h-full bg-transparent overflow-hidden",children:[$.jsx(Bv,{activeView:t,setView:n,onClose:e}),$.jsx("div",{className:"flex-1 overflow-hidden relative",children:$.jsx(ds,{mode:"wait",children:$.jsxs(Rl.div,{initial:{opacity:0,x:15},animate:{opacity:1,x:0},exit:{opacity:0,x:-15},transition:{duration:.3,ease:[.23,1,.32,1]},className:"h-full w-full",children:["chat"===t&&$.jsx("div",{className:"h-full",children:$.jsx(jv,{})}),"history"===t&&$.jsx("div",{className:"h-full",children:$.jsx(Ov,{onSelectThread:()=>n("chat")})}),"settings"===t&&$.jsx("div",{className:"h-full overflow-y-auto custom-scrollbar",children:$.jsx(Iv,{})})]},t)})}),$.jsx("footer",{className:"px-6 py-4 border-t border-black/[0.03] bg-white/20 backdrop-blur-sm",children:$.jsxs("div",{className:"flex items-center justify-between",children:[$.jsxs("div",{className:"flex items-center gap-2",children:[$.jsxs("span",{className:"relative flex h-2 w-2",children:[$.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),$.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),$.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest select-none",children:"Copilot AI • v1.0"})]}),$.jsx("span",{className:"text-[9px] font-medium text-slate-300 italic",children:"Sécure & Chiffré"})]})})]})},Uv=({isOpen:e,setIsOpen:t})=>{const{primaryColor:n,position:r,logoUrl:o,botName:i}=pc(),a="right"===r,s=n.startsWith("#")?`${n}80`:n;return $.jsxs("div",{className:`dhi-copilot-wrapper fixed bottom-0 ${a?"right-0":"left-0"} z-[999999] p-6 font-sans`,dir:"ltr",children:[$.jsx(Rl.button,{whileHover:{scale:1.05,boxShadow:"0 10px 40px rgba(0,0,0,0.2)"},whileTap:{scale:.95},onClick:()=>t(!e),style:{backgroundColor:s,border:"1px solid rgba(255, 255, 255, 0.2)"},className:"relative h-16 w-16 rounded-2xl shadow-[0_8px_32px_rgba(0,0,0,0.15)] flex items-center justify-center text-white cursor-pointer outline-none z-50 backdrop-blur-md transition-shadow",children:$.jsx(ds,{mode:"wait",children:e?$.jsx(Rl.div,{initial:{rotate:-90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:90,opacity:0},className:"flex items-center justify-center",children:$.jsx(uc,{size:32,strokeWidth:2.5})},"close"):$.jsxs(Rl.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},className:"relative flex items-center justify-center",children:[$.jsx("div",{className:"h-10 w-10 bg-white/90 rounded-xl p-1.5 shadow-inner flex items-center justify-center overflow-hidden",children:$.jsx("img",{src:o,alt:i,className:"h-full w-full object-contain"})}),$.jsx("div",{style:{backgroundColor:n},className:"absolute -top-3 -right-3 h-7 w-7 rounded-lg shadow-lg flex items-center justify-center text-white border-2 border-white",children:$.jsx(Dl,{size:14,strokeWidth:2.5})})]},"open")})}),$.jsx(ds,{children:e&&$.jsx(Rl.div,{initial:{opacity:0,x:a?120:-120},animate:{opacity:1,x:0},exit:{opacity:0,x:a?120:-120},transition:{type:"spring",damping:28,stiffness:200},className:`\n fixed top-0 ${a?"right-0":"left-0"} \n h-full w-full md:w-[520px] \n bg-white/85 backdrop-blur-3xl \n shadow-[-30px_0_80px_rgba(0,0,0,0.15)] \n border-l border-white/40 \n overflow-hidden z-40\n `,children:$.jsx(Vv,{close:()=>t(!1)})})})]})},Hv=()=>{const{primaryColor:e}=pc();return $.jsx("style",{children:`\n /* 1. Injection de tout Tailwind v4 */\n /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-800:oklch(47.3% .137 46.201);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-500:oklch(60.6% .25 292.717);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-3{top:calc(var(--spacing) * -3)}.top-0{top:calc(var(--spacing) * 0)}.top-4{top:calc(var(--spacing) * 4)}.-right-2{right:calc(var(--spacing) * -2)}.-right-3{right:calc(var(--spacing) * -3)}.right-0{right:calc(var(--spacing) * 0)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0{left:calc(var(--spacing) * 0)}.z-40{z-index:40}.z-50{z-index:50}.z-\\[999999\\]{z-index:999999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-1{margin-left:calc(var(--spacing) * 1)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-auto{height:auto}.h-full{height:100%}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.min-h-full{min-height:100%}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-full{width:100%}.max-w-\\[88\\%\\]{max-width:88%}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[160px\\]{max-width:160px}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[480px\\]{max-width:480px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[-4px\\]{--tw-translate-x:-4px;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[24px\\]{border-radius:24px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-tl-none{border-top-left-radius:0}.rounded-r-full{border-top-right-radius:3.40282e38px;border-bottom-right-radius:3.40282e38px}.rounded-tr-none{border-top-right-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-amber-100{border-color:var(--color-amber-100)}.border-black\\/\\[0\\.03\\]{border-color:#00000008}@supports (color:color-mix(in lab,red,red)){.border-black\\/\\[0\\.03\\]{border-color:color-mix(in oklab,var(--color-black) 3%,transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-red-400{border-color:var(--color-red-400)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/60{border-color:#e2e8f099}@supports (color:color-mix(in lab,red,red)){.border-slate-200\\/60{border-color:color-mix(in oklab,var(--color-slate-200) 60%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-white\\/50{border-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.border-white\\/50{border-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-emerald-50\\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\\/50{background-color:color-mix(in oklab,var(--color-emerald-50) 50%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\\/50{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-100\\/50{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/50{background-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.bg-slate-200\\/50{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.bg-slate-200\\/50{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/70{background-color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.bg-white\\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.bg-white\\/85{background-color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.object-contain{object-fit:contain}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[14px\\]{font-size:14px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-800{color:var(--color-amber-800)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-indigo-500{color:var(--color-indigo-500)}.text-red-500{color:var(--color-red-500)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-violet-500{color:var(--color-violet-500)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[-30px_0_80px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:-30px 0 80px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_-10px_30px_rgba\\(0\\,0\\,0\\,0\\.02\\)\\]{--tw-shadow:0 -10px 30px var(--tw-shadow-color,#00000005);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_10px_rgba\\(0\\,0\\,0\\,0\\.02\\)\\]{--tw-shadow:0 2px 10px var(--tw-shadow-color,#00000005);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_8px_32px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 8px 32px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-blue-50{--tw-ring-color:var(--color-blue-50)}.backdrop-blur-3xl{--tw-backdrop-blur:blur(var(--blur-3xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:translate-x-0:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:bg-blue-50\\/50:is(:where(.group):hover *){background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-blue-50\\/50:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.group-hover\\:text-blue-400:is(:where(.group):hover *){color:var(--color-blue-400)}.group-hover\\:text-blue-500:is(:where(.group):hover *){color:var(--color-blue-500)}.group-hover\\:text-slate-900:is(:where(.group):hover *){color:var(--color-slate-900)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-slate-300::placeholder{color:var(--color-slate-300)}.focus-within\\:border-blue-400:focus-within{border-color:var(--color-blue-400)}@media(hover:hover){.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-\\[1\\.01\\]:hover{scale:1.01}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-100:hover{border-color:var(--color-blue-100)}.hover\\:border-blue-200:hover{border-color:var(--color-blue-200)}.hover\\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/20:focus{--tw-ring-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.focus\\:ring-emerald-500\\/50:focus{--tw-ring-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-emerald-500\\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 50%, transparent)}}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:opacity-30:disabled{opacity:.3}@media(min-width:48rem){.md\\:col-span-2{grid-column:span 2/span 2}.md\\:w-\\[520px\\]{width:520px}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}\n\n /* 2. Variables dynamiques basées sur la config */\n :host {\n --dhi-primary: ${e};\n --dhi-primary-soft: ${e}15;\n font-family: 'Inter', system-ui, sans-serif;\n display: block;\n position: relative;\n z-index: 999999;\n }\n\n /* Forcer la taille du conteneur pour que la bulle fixed soit visible */\n .dhi-copilot-wrapper {\n position: fixed;\n bottom: 0;\n right: 0;\n pointer-events: none; /* Laisse passer les clics sur le site hôte */\n }\n\n .dhi-copilot-wrapper > * {\n pointer-events: auto; /* Mais capture les clics sur la bulle et le tiroir */\n }\n \n /* 3. Overrides et helpers personnalisés */\n .bg-primary { background-color: var(--dhi-primary) !important; }\n .text-primary { color: var(--dhi-primary) !important; }\n .border-primary { border-color: var(--dhi-primary) !important; }\n \n .custom-scrollbar::-webkit-scrollbar { width: 4px; }\n .custom-scrollbar::-webkit-scrollbar-thumb {\n background: rgba(0,0,0,0.1);\n border-radius: 10px;\n }\n\n .glass {\n background: rgba(255, 255, 255, 0.7);\n backdrop-filter: blur(20px);\n -webkit-backdrop-filter: blur(20px);\n border: 1px solid rgba(255, 255, 255, 0.3);\n }\n\n /* Styles pour le rendu Markdown */\n .prose-custom { font-size: 14px; line-height: 1.6; color: #334155; }\n .prose-custom p { margin-bottom: 0.8em; }\n .prose-custom code {\n background: rgba(0,0,0,0.05);\n padding: 2px 4px;\n border-radius: 4px;\n font-family: monospace;\n }\n .prose-custom pre {\n background: #1e293b;\n color: #f8fafc;\n padding: 12px;\n border-radius: 8px;\n overflow-x: auto;\n }\n `})},$v=function(e,t={}){return function(e,t,r){var o,i,a;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const s=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),l=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),c={},u={},d={},f={};for(const n of s){c[n]=Array.isArray(t.props)?"string":t.props[n];const e=N(n);d[n]=e,f[e]=n}for(const n of l)u[n]=Array.isArray(t.events)?{}:t.events[n];class p extends HTMLElement{constructor(){super(),n(this,a,!0),n(this,i),n(this,o,{}),n(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[M].container=this.container;for(const e of s){const t=d[e],n=this.getAttribute(t),r=c[e],o=r?O[r]:null;(null==o?void 0:o.parse)&&(n||"method"===r)&&(this[M][e]=o.parse(n,t,this))}for(const e of l)this[M][e]=t=>{const n=e.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(n,{detail:t,...u[e]}))}}static get observedAttributes(){return Object.keys(f)}connectedCallback(){this[D]=!0,this[L]()}disconnectedCallback(){this[D]=!1,this[_]&&r.unmount(this[_]),delete this[_]}attributeChangedCallback(e,t,n){const r=f[e],o=c[r],i=o?O[o]:null;r in c&&(null==i?void 0:i.parse)&&(n||"method"===o)&&(this[M][r]=i.parse(n,e,this),this[L]())}[(a=D,i=_,o=M,L)](){this[D]&&(this[_]?r.update(this[_],this[M]):this[_]=r.mount(this.container,e,this[M]))}}for(const n of s){const e=d[n],t=c[n];Object.defineProperty(p.prototype,n,{enumerable:!0,configurable:!0,get(){return this[M][n]},set(r){this[M][n]=r;const o=t?O[t]:null;if(null==o?void 0:o.stringify){const t=o.stringify(r,e,this);this.getAttribute(e)!==t&&(null==t?this.removeAttribute(e):this.setAttribute(e,t))}else n in c&&(null==o?void 0:o.parse)&&(r||"method"===t)&&(this[M][n]=o.parse(r,e,this)),this[L]()}})}return p}(e,t,{mount:z,update:F,unmount:I})}(({config:e})=>{const[t,n]=u.useState(!1),r=Qd(e=>e.setConfig);return u.useEffect(()=>{if(e){const t="string"==typeof e?JSON.parse(e):e;r(t)}},[e,r]),u.useEffect(()=>(t&&window.innerWidth<768?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),e?$.jsxs(fc,{value:e,children:[$.jsx(Hv,{}),$.jsx(Uv,{isOpen:t,setIsOpen:n})]}):null},{props:{config:"json"},shadow:"open"});customElements.get("dhi-copilot-ai")||customElements.define("dhi-copilot-ai",$v)});