meshy-node 0.6.4 → 0.6.5
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.
- package/README.md +1 -1
- package/dashboard/assets/DashboardPage-DWXbz1IY.css +1 -0
- package/dashboard/assets/DashboardPage-aKttgI42.js +139 -0
- package/dashboard/assets/DashboardShared-CTPyyRmo.js +83 -0
- package/dashboard/assets/{DiffTab-COHFrirB.js → DiffTab-DrabKy83.js} +1 -1
- package/dashboard/assets/{FilesTab-CbAyNkqV.js → FilesTab-BnDrsKON.js} +1 -1
- package/dashboard/assets/{PreviewTab-DfpJt0_L.js → PreviewTab-D37EkfYZ.js} +1 -1
- package/dashboard/assets/{SharedConversationPage-GIVshodB.js → SharedConversationPage-DK3kNOJn.js} +3 -3
- package/dashboard/assets/{file-BQIg747t.js → file-DGPntQ15.js} +1 -1
- package/dashboard/assets/{folder-bif_P7Bd.js → folder-4s83uDUg.js} +1 -1
- package/dashboard/assets/{index-DN5st9yl.js → index-DRZPNGjF.js} +3 -3
- package/dashboard/assets/index-DfAVj5ZJ.css +1 -0
- package/dashboard/assets/{play-DQsrWPv1.js → play-CwRlqpr6.js} +1 -1
- package/dashboard/index.html +2 -2
- package/package.json +1 -1
- package/runtime-metadata.json +5 -5
- package/dashboard/assets/DashboardPage-bvnSOEOR.js +0 -139
- package/dashboard/assets/DashboardShared-GLcSNGlq.js +0 -83
- package/dashboard/assets/index-CtsPt3oz.css +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import{c as ye,j as m,H as hl,bb as Fr,T as Or,k as mn,bc as Rr,r as ce,B as bt,C as Re,b as wt,X as Br,bd as ml,s as dl,A as $r,K as gl}from"./index-DRZPNGjF.js";/**
|
|
2
|
+
* @license lucide-react v1.7.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const xl=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],yl=ye("brain",xl);/**
|
|
7
|
+
* @license lucide-react v1.7.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const kl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],bl=ye("circle-question-mark",kl);/**
|
|
12
|
+
* @license lucide-react v1.7.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const wl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ur=ye("circle",wl);/**
|
|
17
|
+
* @license lucide-react v1.7.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Sl=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Cl=ye("list-checks",Sl);/**
|
|
22
|
+
* @license lucide-react v1.7.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const vl=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],El=ye("loader-circle",vl);/**
|
|
27
|
+
* @license lucide-react v1.7.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const Al=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Il=ye("shield-alert",Al);/**
|
|
32
|
+
* @license lucide-react v1.7.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const jl=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Tl=ye("shield-check",jl);/**
|
|
37
|
+
* @license lucide-react v1.7.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const Nl=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],_l=ye("user",Nl);/**
|
|
42
|
+
* @license lucide-react v1.7.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const Pl=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],dn=ye("wrench",Pl);function St(e){return typeof e=="object"&&e!==null}function zl(e){if(!St(e))return null;if(e.type==="text"&&typeof e.text=="string"){const t=e.text.trim();return t?{type:"text",text:t}:null}if(e.type==="image"&&typeof e.mediaType=="string"&&typeof e.data=="string"){const t=e.mediaType.trim(),n=e.data;return!t||!n?null:{type:"image",mediaType:t,data:n,...typeof e.filename=="string"&&e.filename.trim()?{filename:e.filename.trim()}:{}}}if(e.type==="tool_result"&&typeof e.toolUseId=="string"&&typeof e.content=="string"){const t=e.toolUseId.trim(),n=e.content.trim();return!t||!n?null:{type:"tool_result",toolUseId:t,content:n,...typeof e.isError=="boolean"?{isError:e.isError}:{}}}return null}function Ll(e){if(!St(e))return null;if(e.type==="text"&&typeof e.text=="string"){const r=e.text.trim();return r?{type:"text",text:r}:null}if(e.type!=="image"||!St(e.source)){if(e.type==="tool_result"&&typeof e.tool_use_id=="string"&&typeof e.content=="string"){const r=e.tool_use_id.trim(),i=e.content.trim();return!r||!i?null:{type:"tool_result",toolUseId:r,content:i,...typeof e.is_error=="boolean"?{isError:e.is_error}:{}}}return null}const t=typeof e.source.media_type=="string"?e.source.media_type.trim():"",n=typeof e.source.data=="string"?e.source.data:"";return!t||!n?null:{type:"image",mediaType:t,data:n}}function xt(e){if(typeof e=="string"){const t=e.trim();return t?[{type:"text",text:t}]:[]}return Array.isArray(e)?e.map(t=>zl(t)??Ll(t)).filter(t=>t!==null):[]}function Kp(e,t){const n=e.trim();return[...n?[{type:"text",text:n}]:[],...t]}function Dl(e){return{role:"user",content:e.map(t=>t.type==="text"?{type:"text",text:t.text}:t.type==="tool_result"?{type:"tool_result",tool_use_id:t.toolUseId,content:t.content,...typeof t.isError=="boolean"?{is_error:t.isError}:{}}:{type:"image",source:{type:"base64",media_type:t.mediaType,data:t.data}})}}function Zp(e,t=new Date().toISOString()){return{type:"user",message:Dl(e),timestamp:t}}function Be(e){if(e.type!=="user"||e.isSynthetic===!0)return null;if(typeof e.message=="string"){const t=xt(e.message);return t.length>0?t:null}if(St(e.message)&&Array.isArray(e.message.content)){const t=xt(e.message.content);return t.length>0?t:null}if(Array.isArray(e.content)){const t=xt(e.content);return t.length>0?t:null}return null}function Qp(e){return xt(e.payload.initialMessage)}function Ce(e){return e.map(t=>{if(t.type==="text")return`t:${t.text}`;if(t.type==="tool_result")return`r:${t.toolUseId}:${t.isError===!0?"1":"0"}:${t.content}`;const n=t.data.slice(0,32),r=t.data.slice(-32);return`i:${t.mediaType}:${t.data.length}:${n}:${r}`}).join("|")}function Ml(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool_result"?t.content:"").filter(Boolean).join(`
|
|
47
|
+
`)}function Fl(e){return`data:${e.mediaType};base64,${e.data}`}function eh(e){var i,o;if(!e)return[];const t=[],n=e.items;if(n)for(const l of Array.from(n)){if((l==null?void 0:l.kind)!=="file"||!((i=l.type)!=null&&i.startsWith("image/")))continue;const a=(o=l.getAsFile)==null?void 0:o.call(l);a&&a.type.startsWith("image/")&&t.push(a)}if(t.length>0)return t;const r=e.files;return r?Array.from(r).filter(l=>l.type.startsWith("image/")):[]}function Ol(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"){n(new Error(`Failed to read ${e.name}`));return}t(r.result)},r.onerror=()=>n(r.error??new Error(`Failed to read ${e.name}`)),r.readAsDataURL(e)})}async function th(e){return Promise.all(Array.from(e).map(async t=>{if(!t.type.startsWith("image/"))throw new Error(`${t.name} is not an image`);const n=await Ol(t),r=n.indexOf(",");if(r===-1)throw new Error(`Failed to parse ${t.name}`);return{type:"image",mediaType:t.type||"image/png",data:n.slice(r+1),filename:t.name}}))}function ot(e){return typeof e=="object"&&e!==null}function Rl(e){return ot(e)&&typeof e.name=="string"&&e.name.toLowerCase()==="askuserquestion"}function Bl(e){return!ot(e)||typeof e.label!="string"||!e.label.trim()?null:{label:e.label.trim(),description:typeof e.description=="string"?e.description.trim():""}}function $l(e){if(!ot(e)||typeof e.question!="string"||!e.question.trim())return null;const t=Array.isArray(e.options)?e.options.map(Bl).filter(n=>n!==null):[];return t.length===0?null:{header:typeof e.header=="string"&&e.header.trim()?e.header.trim():void 0,question:e.question.trim(),multiSelect:e.multiSelect===!0,options:t}}function Gt(e){if(!ot(e)||!Array.isArray(e.questions))return null;const t=e.questions.map($l).filter(n=>n!==null);return t.length===0?null:{questions:t}}function $e(e){return JSON.stringify({questions:e.questions})}function at(e){const t=Gt(e);if(t)return t;if(Rl(e)){const n=ot(e.input)?e.input:void 0,r=Gt(n);return r?{...r,...typeof e.id=="string"&&e.id.trim()?{toolUseId:e.id.trim()}:{}}:null}return null}function Ul(e){var i;const t=e.trim();if(!t)return[];const n=[t],r=t.matchAll(/```(?:json)?\s*([\s\S]*?)```/gi);for(const o of r){const l=(i=o[1])==null?void 0:i.trim();l&&n.push(l)}return n}function st(e){for(const t of Ul(e))try{const n=JSON.parse(t),r=Gt(n);if(r)return r}catch{}return null}function ql(e){return e.questions.map(t=>t.options.length>0?[0]:[])}function Hl(e,t){return e.questions.every((n,r)=>(t[r]??[]).length>0)}function Vl(e,t){const r=e.questions.map((i,o)=>{const l=[...new Set(t[o]??[])].sort((a,s)=>a-s).filter(a=>i.options[a]!==void 0);return{header:i.header??null,question:i.question,multiSelect:i.multiSelect,selectedOptions:l.map(a=>i.options[a]).filter(a=>a!==void 0)}}).map(i=>{const o=i.header??i.question,l=i.selectedOptions.map(a=>a.label).join(i.multiSelect?", ":"");return`${o}: ${l}`}).join(`
|
|
48
|
+
`);return e.toolUseId?[{type:"tool_result",toolUseId:e.toolUseId,content:r,isError:!1}]:[{type:"text",text:r}]}function nt(e){return typeof e=="object"&&e!==null}function Wl(e){if(!e)return;const t=["file_path","path","command"].map(n=>e[n]).find(n=>typeof n=="string"&&n.trim().length>0);return t==null?void 0:t.trim()}function Jl(e){const t=e.toLowerCase();return t.includes(" permission to write ")?"Write":t.includes(" permission to edit ")?"Edit":t.includes(" permission to run ")||t.includes(" permission to execute ")?"Bash":"Action"}function Kt(e){const t=e.trim();if(!t.startsWith("Awaiting your permission to "))return null;const n=t.match(/`([^`]+)`/);return{requests:[{toolName:Jl(t),target:n==null?void 0:n[1],summary:t}]}}function Yl(e){if(!Array.isArray(e.permission_denials))return null;const t=[];for(const n of e.permission_denials){if(!nt(n)||typeof n.tool_name!="string")continue;const r=nt(n.tool_input)?n.tool_input:void 0,i=Wl(r),o=typeof e.result=="string"&&e.result.trim().length>0?e.result.trim():`Awaiting your permission to use ${n.tool_name}${i?` on \`${i}\``:""}.`;t.push({toolName:n.tool_name,...typeof n.tool_use_id=="string"?{toolUseId:n.tool_use_id}:{},...i?{target:i}:{},summary:o})}return t.length>0?{requests:t}:null}function Hn(e){if(!Array.isArray(e))return null;for(const t of e){if(!nt(t)||t.type!=="text"||typeof t.text!="string")continue;const n=Kt(t.text);if(n)return n}return null}function gn(e){if(!nt(e))return null;const t=Yl(e);if(t)return t;if(typeof e.result=="string"){const r=Kt(e.result);if(r)return r}if(typeof e.message=="string"){const r=Kt(e.message);if(r)return r}if(nt(e.message)){const r=gn(e.message);if(r)return r;const i=Hn(e.message.content);if(i)return i}const n=Hn(e.content);return n||null}function Xl(e){return JSON.stringify(e.requests.map(t=>({toolName:t.toolName,target:t.target??null,summary:t.summary})))}function Gl(e,t){return e.requests.map(n=>{const r=n.target?` for \`${n.target}\``:"",i=t==="approve"?`Approved. Proceed with the requested ${n.toolName} action${r}.`:`Denied. Do not proceed with the requested ${n.toolName} action${r}. Ask for another approach if needed.`;return n.toolUseId?{type:"tool_result",toolUseId:n.toolUseId,content:i,isError:t==="deny"}:t==="approve"?{type:"text",text:i}:{type:"text",text:i}})}function Kl(e){return Be(e)!==null}function Zt(e){return typeof e=="object"&&e!==null}function Vn(e){if(e.type==="user"){const t=Be(e),n=typeof e.timestamp=="string"?e.timestamp:"";if(t)return`user:${n}:${Ce(t)}`}return JSON.stringify(e)}function je(e){return Array.isArray(e)?e.map(t=>je(t)):Zt(e)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,je(n)])):e}function Zl(e,t){return e.length!==t.length?!1:e.every((n,r)=>JSON.stringify(je(n))===JSON.stringify(je(t[r])))}function Qt(e){const t=Be(e);if(t)return`user:${Ce(t)}`;if(e.type==="assistant"){if(typeof e.message=="string")return`assistant:${JSON.stringify(e.message)}`;if(Zt(e.message)&&"content"in e.message)return`assistant:${JSON.stringify(je(e.message.content))}`;if(Array.isArray(e.content))return`assistant:${JSON.stringify(je(e.content))}`;if(Zt(e.message))return`assistant:${JSON.stringify(je(e.message))}`}return JSON.stringify(e)}function Ql(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Wn(e){if(typeof e.timestamp!="string")return null;const t=Date.parse(e.timestamp);return Number.isNaN(t)?null:t}function en(e){const t=at(e);return t?`question:${$e(t)}`:null}function eo(e){const t=gn(e);return t?`permission:${Xl(t)}`:null}function Jn(e){if(!Array.isArray(e))return null;const t=new Set;for(const n of e){const r=en(n);if(r){t.add(r);continue}if(typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"){const i=st(n.text);i&&t.add($e(i))}}return t.size===0?null:Array.from(t).sort().join("|")}function to(e){const t=en(e);if(t)return t;if(typeof e.message=="string"){const n=st(e.message);return n?$e(n):null}if(typeof e.message=="object"&&e.message!==null){const n=en(e.message);return n||Jn(e.message.content)}return Jn(e.content)}function no(e){return eo(e)}function nh(e,t){const n=new Map;return t.map(r=>{const i=Qt(r),o=n.get(i)??0;return n.set(i,o+1),`${e}-${Ql(i)}-${o}`})}function rh(e,t){const n=new Map;for(const o of t){const l=Qt(o);n.set(l,(n.get(l)??0)+1)}const r=[];for(let o=e.length-1;o>=0;o-=1){const l=e[o];if(!l)continue;const a=Qt(l),s=n.get(a)??0;if(s>0){n.set(a,s-1);continue}r.push({...l})}const i=[...r.reverse(),...t.map(o=>({...o}))].map((o,l)=>({event:o,order:l})).sort((o,l)=>{const a=Wn(o.event),s=Wn(l.event);return a!==null&&s!==null&&a!==s?a-s:o.order-l.order}).map(o=>o.event);return Zl(e,i)?e:i}function ih(e,t){const n=Vn(t);return e.some(r=>Vn(r)===n)?e:[...e,{...t}]}function lh(e,t){const n=new Map;for(const r of t){const i=Be(r);if(!i)continue;const o=Ce(i);n.set(o,(n.get(o)??0)+1)}return e.filter(r=>{const i=Ce(r.content),o=n.get(i)??0;return o<=0?!0:(n.set(i,o-1),!1)})}function oh(e,t){const n=Ce(t),r=e.findIndex(i=>Ce(i.content)===n);return r===-1?e:e.filter((i,o)=>o!==r)}function ah(e,t){const n=Ce(t);return e.some(r=>{const i=Be(r);return i!==null&&Ce(i)===n})}function sh(e){const t=[];let n=null;for(const r of e){if(Kl(r)){n=null,t.push(r);continue}const i=no(r)??to(r);i&&i===n||(t.push(r),i&&(n=i))}return t}const ro=["codex","claudecode","copilot"];function qr({agent:e,className:t="h-3.5 w-3.5 shrink-0"}){const n=t;return e==="claudecode"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"butt",strokeLinejoin:"miter",className:n,"data-agent-icon":"claudecode","data-agent-shape":"pixel-bot","aria-hidden":"true",children:[m.jsx("path",{d:"M5 9V6h14v3h2v6h-3v3H6v-3H3V9z"}),m.jsx("path",{d:"M8 7v4"}),m.jsx("path",{d:"M16 7v4"}),m.jsx("path",{d:"M7 18v3"}),m.jsx("path",{d:"M11 18v3"}),m.jsx("path",{d:"M15 18v3"})]}):e==="codex"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"codex","data-agent-shape":"command-cloud","aria-hidden":"true",children:[m.jsx("path",{d:"M6.85 18.05h9.65a4.35 4.35 0 0 0 .65-8.65 5.45 5.45 0 0 0-10.2-1.65 5.1 5.1 0 0 0-.1 10.3z"}),m.jsx("path",{d:"M9.25 8.9 12 12l-2.75 3.1"}),m.jsx("path",{d:"M14.15 15.1h3.25"})]}):e==="copilot"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"copilot","data-agent-shape":"pixel-face","aria-hidden":"true",children:[m.jsx("path",{d:"M5.2 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55H5.2a1.55 1.55 0 0 1-1.55-1.55V5.65A1.55 1.55 0 0 1 5.2 4.1z"}),m.jsx("path",{d:"M14.15 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55h-4.65a1.55 1.55 0 0 1-1.55-1.55V5.65a1.55 1.55 0 0 1 1.55-1.55z"}),m.jsx("path",{d:"M4.5 14.7v3.85h15v-3.85"}),m.jsx("path",{d:"M8.4 14.7v1.9"}),m.jsx("path",{d:"M12 14.7v1.9"}),m.jsx("path",{d:"M15.6 14.7v1.9"}),m.jsx("path",{d:"M7.65 20.25h8.7"})]}):m.jsx(hl,{className:n,"data-agent-icon":"generic","aria-hidden":"true"})}function Hr({value:e,label:t,description:n}){return m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx(qr,{agent:e}),m.jsx("span",{children:t}),n&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:n})]})}function uh(){return Fr.map(e=>m.jsx(mn,{value:e.value,disabled:e.disabled,children:m.jsx(Hr,{value:e.value,label:e.label,description:e.description})},e.value))}function ch(){return ro.map(e=>m.jsx(mn,{value:e,children:m.jsx(Hr,{value:e,label:Vr(e)})},e))}function fh(){return Or.map(e=>m.jsx(mn,{value:e.value,children:m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{children:e.label}),e.description&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:e.description})]})},e.value))}function Vr(e){var t;return((t=Fr.find(n=>n.value===e))==null?void 0:t.label)??e}function ph(e){var t;return((t=Or.find(n=>n.value===e))==null?void 0:t.label)??e}function io(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const lo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ao={};function Yn(e,t){return(ao.jsx?oo:lo).test(e)}const so=/[ \t\n\f\r]/g;function uo(e){return typeof e=="object"?e.type==="text"?Xn(e.value):!1:Xn(e)}function Xn(e){return e.replace(so,"")===""}class ut{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ut.prototype.normal={};ut.prototype.property={};ut.prototype.space=void 0;function Wr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ut(n,r,t)}function tn(e){return e.toLowerCase()}class te{constructor(t,n){this.attribute=n,this.property=t}}te.prototype.attribute="";te.prototype.booleanish=!1;te.prototype.boolean=!1;te.prototype.commaOrSpaceSeparated=!1;te.prototype.commaSeparated=!1;te.prototype.defined=!1;te.prototype.mustUseProperty=!1;te.prototype.number=!1;te.prototype.overloadedBoolean=!1;te.prototype.property="";te.prototype.spaceSeparated=!1;te.prototype.space=void 0;let co=0;const M=Ne(),Y=Ne(),nn=Ne(),A=Ne(),J=Ne(),Fe=Ne(),re=Ne();function Ne(){return 2**++co}const rn=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:Y,commaOrSpaceSeparated:re,commaSeparated:Fe,number:A,overloadedBoolean:nn,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),Pt=Object.keys(rn);class xn extends te{constructor(t,n,r,i){let o=-1;if(super(t,n),Gn(this,"space",i),typeof r=="number")for(;++o<Pt.length;){const l=Pt[o];Gn(this,Pt[o],(r&rn[l])===rn[l])}}}xn.prototype.defined=!0;function Gn(e,t,n){n&&(e[t]=n)}function Ue(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new xn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[tn(r)]=r,n[tn(o.attribute)]=r}return new ut(t,n,e.space)}const Jr=Ue({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:J,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:A,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:J,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:Y,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Yr(e,t){return t in e?e[t]:t}function Xr(e,t){return Yr(e,t.toLowerCase())}const fo=Ue({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fe,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:J,autoFocus:M,autoPlay:M,blocking:J,capture:null,charSet:null,checked:M,cite:null,className:J,cols:A,colSpan:null,content:null,contentEditable:Y,controls:M,controlsList:J,coords:A|Fe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:nn,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:J,height:A,hidden:nn,high:A,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:J,itemRef:J,itemScope:M,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:M,muted:M,name:null,nonce:null,noModule:M,noValidate:M,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:M,optimum:A,pattern:null,ping:J,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:J,required:M,reversed:M,rows:A,rowSpan:A,sandbox:J,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:Y,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M,declare:M,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:M,disableRemotePlayback:M,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Xr}),po=Ue({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:re,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:J,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:Fe,g2:Fe,glyphName:Fe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,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:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Yr}),Gr=Ue({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Kr=Ue({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xr}),Zr=Ue({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ho={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"},mo=/[A-Z]/g,Kn=/-[a-z]/g,go=/^data[-\w.:]+$/i;function xo(e,t){const n=tn(t);let r=t,i=te;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&go.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Kn,ko);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Kn.test(o)){let l=o.replace(mo,yo);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=xn}return new i(r,t)}function yo(e){return"-"+e.toLowerCase()}function ko(e){return e.charAt(1).toUpperCase()}const bo=Wr([Jr,fo,Gr,Kr,Zr],"html"),yn=Wr([Jr,po,Gr,Kr,Zr],"svg");function wo(e){return e.join(" ").trim()}var Le={},zt,Zn;function So(){if(Zn)return zt;Zn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
|
|
49
|
+
`,u="/",f="*",c="",h="comment",p="declaration";function x(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var S=1,E=1;function z(P){var j=P.match(t);j&&(S+=j.length);var H=P.lastIndexOf(s);E=~H?P.length-H:E+P.length}function L(){var P={line:S,column:E};return function(j){return j.position=new C(P),$(),j}}function C(P){this.start=P,this.end={line:S,column:E},this.source=y.source}C.prototype.content=v;function O(P){var j=new Error(y.source+":"+S+":"+E+": "+P);if(j.reason=P,j.filename=y.source,j.line=S,j.column=E,j.source=v,!y.silent)throw j}function U(P){var j=P.exec(v);if(j){var H=j[0];return z(H),v=v.slice(H.length),j}}function $(){U(n)}function k(P){var j;for(P=P||[];j=T();)j!==!1&&P.push(j);return P}function T(){var P=L();if(!(u!=v.charAt(0)||f!=v.charAt(1))){for(var j=2;c!=v.charAt(j)&&(f!=v.charAt(j)||u!=v.charAt(j+1));)++j;if(j+=2,c===v.charAt(j-1))return O("End of comment missing");var H=v.slice(2,j-2);return E+=2,z(H),v=v.slice(j),E+=2,P({type:h,comment:H})}}function N(){var P=L(),j=U(r);if(j){if(T(),!U(i))return O("property missing ':'");var H=U(o),X=P({type:p,property:b(j[0].replace(e,c)),value:H?b(H[0].replace(e,c)):c});return U(l),X}}function q(){var P=[];k(P);for(var j;j=N();)j!==!1&&(P.push(j),k(P));return P}return $(),q()}function b(v){return v?v.replace(a,c):c}return zt=x,zt}var Qn;function Co(){if(Qn)return Le;Qn=1;var e=Le&&Le.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.default=n;const t=e(So());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return Le}var Je={},er;function vo(){if(er)return Je;er=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Je.camelCase=s,Je}var Ye,tr;function Eo(){if(tr)return Ye;tr=1;var e=Ye&&Ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Co()),n=vo();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Ye=r,Ye}var Ao=Eo();const Io=Rr(Ao),Qr=ei("end"),kn=ei("start");function ei(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function jo(e){const t=kn(e),n=Qr(e);if(t&&n)return{start:t,end:n}}function Ze(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nr(e.position):"start"in e||"end"in e?nr(e):"line"in e||"column"in e?ln(e):""}function ln(e){return rr(e&&e.line)+":"+rr(e&&e.column)}function nr(e){return ln(e&&e.start)+"-"+ln(e&&e.end)}function rr(e){return e&&typeof e=="number"?e:1}class Z extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ze(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Z.prototype.file="";Z.prototype.name="";Z.prototype.reason="";Z.prototype.message="";Z.prototype.stack="";Z.prototype.column=void 0;Z.prototype.line=void 0;Z.prototype.ancestors=void 0;Z.prototype.cause=void 0;Z.prototype.fatal=void 0;Z.prototype.place=void 0;Z.prototype.ruleId=void 0;Z.prototype.source=void 0;const bn={}.hasOwnProperty,To=new Map,No=/[A-Z]/g,_o=new Set(["table","tbody","thead","tfoot","tr"]),Po=new Set(["td","th"]),ti="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zo(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=$o(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Bo(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?yn:bo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=ni(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function ni(e,t,n){if(t.type==="element")return Lo(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Do(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Fo(e,t,n);if(t.type==="mdxjsEsm")return Mo(e,t);if(t.type==="root")return Oo(e,t,n);if(t.type==="text")return Ro(e,t)}function Lo(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=yn,e.schema=i),e.ancestors.push(t);const o=ii(e,t.tagName,!1),l=Uo(e,t);let a=Sn(e,t);return _o.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!uo(s):!0})),ri(e,l,o,t),wn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Do(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rt(e,t.position)}function Mo(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rt(e,t.position)}function Fo(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=yn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:ii(e,t.name,!0),l=qo(e,t),a=Sn(e,t);return ri(e,l,o,t),wn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Oo(e,t,n){const r={};return wn(r,Sn(e,t)),e.create(t,e.Fragment,r,n)}function Ro(e,t){return t.value}function ri(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Bo(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function $o(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=kn(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Uo(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&bn.call(t.properties,i)){const o=Ho(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Po.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function qo(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else rt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else rt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Sn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:To;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=ni(e,o,l);a!==void 0&&n.push(a)}return n}function Ho(e,t,n){const r=xo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?io(n):wo(n)),r.property==="style"){let i=typeof n=="object"?n:Vo(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Wo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ho[r.property]||r.property:r.attribute,n]}}function Vo(e,t){try{return Io(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Z("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ti+"#cannot-parse-style-attribute",i}}function ii(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=Yn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=Yn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return bn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rt(e)}function rt(e,t){const n=new Z("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=ti+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wo(e){const t={};let n;for(n in e)bn.call(e,n)&&(t[Jo(n)]=e[n]);return t}function Jo(e){let t=e.replace(No,Yo);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Yo(e){return"-"+e.toLowerCase()}const Lt={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"]},Xo={};function Cn(e,t){const n=Xo,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return li(e,r,i)}function li(e,t,n){if(Go(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ir(e.children,t,n)}return Array.isArray(e)?ir(e,t,n):""}function ir(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=li(e[i],t,n);return r.join("")}function Go(e){return!!(e&&typeof e=="object")}const lr=document.createElement("i");function vn(e){const t="&"+e+";";lr.innerHTML=t;const n=lr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ie(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const or={}.hasOwnProperty;function oi(e){const t={};let n=-1;for(;++n<e.length;)Ko(t,e[n]);return t}function Ko(e,t){let n;for(n in t){const i=(or.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){or.call(i,l)||(i[l]=[]);const a=o[l];Zo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Zo(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ie(e,0,0,r)}function ai(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Q=ve(/[A-Za-z]/),K=ve(/[\dA-Za-z]/),Qo=ve(/[#-'*+\--9=?A-Z^-~]/);function Ct(e){return e!==null&&(e<32||e===127)}const on=ve(/\d/),ea=ve(/[\dA-Fa-f]/),ta=ve(/[!-/:-@[-`{-~]/);function _(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function F(e){return e===-2||e===-1||e===32}const It=ve(new RegExp("\\p{P}|\\p{S}","u")),Te=ve(/\s/);function ve(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function B(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return F(s)?(e.enter(n),a(s)):t(s)}function a(s){return F(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const na={tokenize:ra};function ra(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),B(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return _(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const ia={tokenize:la},ar={tokenize:oa};function la(e){const t=this,n=[];let r=0,i,o,l;return a;function a(E){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,s,u)(E)}return u(E)}function s(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const z=t.events.length;let L=z,C;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){C=t.events[L][1].end;break}y(r);let O=z;for(;O<t.events.length;)t.events[O][1].end={...C},O++;return ie(t.events,L+1,0,t.events.slice(z)),t.events.length=O,u(E)}return a(E)}function u(E){if(r===n.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return x(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ar,f,c)(E)}function f(E){return i&&S(),y(r),h(E)}function c(E){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,x(E)}function h(E){return t.containerState={},e.attempt(ar,p,x)(E)}function p(E){return r++,n.push([t.currentConstruct,t.containerState]),h(E)}function x(E){if(E===null){i&&S(),y(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(E)}function b(E){if(E===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(E);return}return _(E)?(e.consume(E),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(E),b)}function v(E,z){const L=t.sliceStream(E);if(z&&L.push(null),E.previous=o,o&&(o.next=E),o=E,i.defineSkip(E.start),i.write(L),t.parser.lazy[E.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<l&&(!i.events[C][1].end||i.events[C][1].end.offset>l))return;const O=t.events.length;let U=O,$,k;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if($){k=t.events[U][1].end;break}$=!0}for(y(r),C=O;C<t.events.length;)t.events[C][1].end={...k},C++;ie(t.events,U+1,0,t.events.slice(O)),t.events.length=C}}function y(E){let z=n.length;for(;z-- >E;){const L=n[z];t.containerState=L[1],L[0].exit.call(t,e)}n.length=E}function S(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function oa(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Oe(e){if(e===null||W(e)||Te(e))return 1;if(It(e))return 2}function jt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const an={name:"attention",resolveAll:aa,tokenize:sa};function aa(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};sr(c,-s),sr(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=le(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=le(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=le(u,jt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=le(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=le(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ie(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function sa(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oe(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=Oe(s),c=!f||f===2&&i||n.includes(s),h=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(f||!c)),t(s)}}function sr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ua={name:"autolink",tokenize:ca};function ca(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Q(p)?(e.consume(p),l):p===64?n(p):u(p)}function l(p){return p===43||p===45||p===46||K(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,s):(p===43||p===45||p===46||K(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Ct(p)?n(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):Qo(p)?(e.consume(p),u):n(p)}function f(p){return K(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||K(p))&&r++<63){const x=p===45?h:c;return e.consume(p),x}return n(p)}}const ct={partial:!0,tokenize:fa};function fa(e,t,n){return r;function r(o){return F(o)?B(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||_(o)?t(o):n(o)}}const si={continuation:{tokenize:ha},exit:ma,name:"blockQuote",tokenize:pa};function pa(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return F(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ha(e,t,n){const r=this;return i;function i(l){return F(l)?B(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(si,t,n)(l)}}function ma(e){e.exit("blockQuote")}const ui={name:"characterEscape",tokenize:da};function da(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ta(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const ci={name:"characterReference",tokenize:ga};function ga(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=K,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=ea,f):(e.enter("characterReferenceValue"),o=7,l=on,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===K&&!vn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const ur={partial:!0,tokenize:ya},cr={concrete:!0,name:"codeFenced",tokenize:xa};function xa(e,t,n){const r=this,i={partial:!0,tokenize:L};let o=0,l=0,a;return s;function s(C){return u(C)}function u(C){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===a?(l++,e.consume(C),f):l<3?n(C):(e.exit("codeFencedFenceSequence"),F(C)?B(e,c,"whitespace")(C):c(C))}function c(C){return C===null||_(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(ur,b,z)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||_(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):F(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),B(e,p,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),h)}function p(C){return C===null||_(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===null||_(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===a?n(C):(e.consume(C),x)}function b(C){return e.attempt(i,z,v)(C)}function v(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return o>0&&F(C)?B(e,S,"linePrefix",o+1)(C):S(C)}function S(C){return C===null||_(C)?e.check(ur,b,z)(C):(e.enter("codeFlowValue"),E(C))}function E(C){return C===null||_(C)?(e.exit("codeFlowValue"),S(C)):(e.consume(C),E)}function z(C){return e.exit("codeFenced"),t(C)}function L(C,O,U){let $=0;return k;function k(j){return C.enter("lineEnding"),C.consume(j),C.exit("lineEnding"),T}function T(j){return C.enter("codeFencedFence"),F(j)?B(C,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):N(j)}function N(j){return j===a?(C.enter("codeFencedFenceSequence"),q(j)):U(j)}function q(j){return j===a?($++,C.consume(j),q):$>=l?(C.exit("codeFencedFenceSequence"),F(j)?B(C,P,"whitespace")(j):P(j)):U(j)}function P(j){return j===null||_(j)?(C.exit("codeFencedFence"),O(j)):U(j)}}}function ya(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Dt={name:"codeIndented",tokenize:ba},ka={partial:!0,tokenize:wa};function ba(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),B(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):_(u)?e.attempt(ka,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||_(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function wa(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):_(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):B(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):_(l)?i(l):n(l)}}const Sa={name:"codeText",previous:va,resolve:Ca,tokenize:Ea};function Ca(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function va(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ea(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):_(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||_(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class Aa{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xe(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xe(this.left,n.reverse())}}}function Xe(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 fi(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new Aa(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ia(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Ia(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=n,x=0,b=0;const v=[b];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(b=h+1,v.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),h=v.length;h--;){const y=a.slice(v[h],v[h+1]),S=o.pop();s.push([S,S+y.length-1]),e.splice(S,2,y)}for(s.reverse(),h=-1;++h<s.length;)u[x+s[h][0]]=x+s[h][1],x+=s[h][1]-s[h][0]-1;return u}const ja={resolve:Na,tokenize:_a},Ta={partial:!0,tokenize:Pa};function Na(e){return fi(e),e}function _a(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):_(a)?e.check(Ta,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Pa(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),B(e,o,"linePrefix")}function o(l){if(l===null||_(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function pi(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||Ct(y)?n(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||_(y)?n(y):(e.consume(y),y===92?x:p)}function x(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function b(y){return!f&&(y===null||y===41||W(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,b):y===41?(e.consume(y),f--,b):y===null||y===32||y===40||Ct(y)?n(y):(e.consume(y),y===92?v:b)}function v(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function hi(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):_(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||_(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!F(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function mi(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,s):n(h)}function s(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===l?(e.exit(o),s(l)):h===null?n(h):_(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),B(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===l||h===null||_(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===l||h===92?(e.consume(h),f):f(h)}}function Qe(e,t){let n;return r;function r(i){return _(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):F(i)?B(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const za={name:"definition",tokenize:Da},La={partial:!0,tokenize:Ma};function Da(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return hi.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):n(p)}function s(p){return W(p)?Qe(e,u)(p):u(p)}function u(p){return pi(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(La,c,c)(p)}function c(p){return F(p)?B(e,h,"whitespace")(p):h(p)}function h(p){return p===null||_(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Ma(e,t,n){return r;function r(a){return W(a)?Qe(e,i)(a):n(a)}function i(a){return mi(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return F(a)?B(e,l,"whitespace")(a):l(a)}function l(a){return a===null||_(a)?t(a):n(a)}}const Fa={name:"hardBreakEscape",tokenize:Oa};function Oa(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return _(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ra={name:"headingAtx",resolve:Ba,tokenize:$a};function Ba(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function $a(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||W(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||_(f)?(e.exit("atxHeading"),t(f)):F(f)?B(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||W(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Ua=["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"],fr=["pre","script","style","textarea"],qa={concrete:!0,name:"htmlFlow",resolveTo:Wa,tokenize:Ja},Ha={partial:!0,tokenize:Xa},Va={partial:!0,tokenize:Ya};function Wa(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ja(e,t,n){const r=this;let i,o,l,a,s;return u;function u(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),o=!0,b):g===63?(e.consume(g),i=3,r.interrupt?t:d):Q(g)?(e.consume(g),l=String.fromCharCode(g),v):n(g)}function h(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,x):Q(g)?(e.consume(g),i=4,r.interrupt?t:d):n(g)}function p(g){return g===45?(e.consume(g),r.interrupt?t:d):n(g)}function x(g){const se="CDATA[";return g===se.charCodeAt(a++)?(e.consume(g),a===se.length?r.interrupt?t:N:x):n(g)}function b(g){return Q(g)?(e.consume(g),l=String.fromCharCode(g),v):n(g)}function v(g){if(g===null||g===47||g===62||W(g)){const se=g===47,Ee=l.toLowerCase();return!se&&!o&&fr.includes(Ee)?(i=1,r.interrupt?t(g):N(g)):Ua.includes(l.toLowerCase())?(i=6,se?(e.consume(g),y):r.interrupt?t(g):N(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?S(g):E(g))}return g===45||K(g)?(e.consume(g),l+=String.fromCharCode(g),v):n(g)}function y(g){return g===62?(e.consume(g),r.interrupt?t:N):n(g)}function S(g){return F(g)?(e.consume(g),S):k(g)}function E(g){return g===47?(e.consume(g),k):g===58||g===95||Q(g)?(e.consume(g),z):F(g)?(e.consume(g),E):k(g)}function z(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),z):L(g)}function L(g){return g===61?(e.consume(g),C):F(g)?(e.consume(g),L):E(g)}function C(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),s=g,O):F(g)?(e.consume(g),C):U(g)}function O(g){return g===s?(e.consume(g),s=null,$):g===null||_(g)?n(g):(e.consume(g),O)}function U(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||W(g)?L(g):(e.consume(g),U)}function $(g){return g===47||g===62||F(g)?E(g):n(g)}function k(g){return g===62?(e.consume(g),T):n(g)}function T(g){return g===null||_(g)?N(g):F(g)?(e.consume(g),T):n(g)}function N(g){return g===45&&i===2?(e.consume(g),H):g===60&&i===1?(e.consume(g),X):g===62&&i===4?(e.consume(g),ae):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),me):_(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ha,de,q)(g)):g===null||_(g)?(e.exit("htmlFlowData"),q(g)):(e.consume(g),N)}function q(g){return e.check(Va,P,de)(g)}function P(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),j}function j(g){return g===null||_(g)?q(g):(e.enter("htmlFlowData"),N(g))}function H(g){return g===45?(e.consume(g),d):N(g)}function X(g){return g===47?(e.consume(g),l="",oe):N(g)}function oe(g){if(g===62){const se=l.toLowerCase();return fr.includes(se)?(e.consume(g),ae):N(g)}return Q(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),oe):N(g)}function me(g){return g===93?(e.consume(g),d):N(g)}function d(g){return g===62?(e.consume(g),ae):g===45&&i===2?(e.consume(g),d):N(g)}function ae(g){return g===null||_(g)?(e.exit("htmlFlowData"),de(g)):(e.consume(g),ae)}function de(g){return e.exit("htmlFlow"),t(g)}}function Ya(e,t,n){const r=this;return i;function i(l){return _(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Xa(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ct,t,n)}}const Ga={name:"htmlText",tokenize:Ka};function Ka(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),L):d===63?(e.consume(d),E):Q(d)?(e.consume(d),U):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,x):Q(d)?(e.consume(d),S):n(d)}function f(d){return d===45?(e.consume(d),p):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),h):_(d)?(l=c,X(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?H(d):d===45?h(d):c(d)}function x(d){const ae="CDATA[";return d===ae.charCodeAt(o++)?(e.consume(d),o===ae.length?b:x):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),v):_(d)?(l=b,X(d)):(e.consume(d),b)}function v(d){return d===93?(e.consume(d),y):b(d)}function y(d){return d===62?H(d):d===93?(e.consume(d),y):b(d)}function S(d){return d===null||d===62?H(d):_(d)?(l=S,X(d)):(e.consume(d),S)}function E(d){return d===null?n(d):d===63?(e.consume(d),z):_(d)?(l=E,X(d)):(e.consume(d),E)}function z(d){return d===62?H(d):E(d)}function L(d){return Q(d)?(e.consume(d),C):n(d)}function C(d){return d===45||K(d)?(e.consume(d),C):O(d)}function O(d){return _(d)?(l=O,X(d)):F(d)?(e.consume(d),O):H(d)}function U(d){return d===45||K(d)?(e.consume(d),U):d===47||d===62||W(d)?$(d):n(d)}function $(d){return d===47?(e.consume(d),H):d===58||d===95||Q(d)?(e.consume(d),k):_(d)?(l=$,X(d)):F(d)?(e.consume(d),$):H(d)}function k(d){return d===45||d===46||d===58||d===95||K(d)?(e.consume(d),k):T(d)}function T(d){return d===61?(e.consume(d),N):_(d)?(l=T,X(d)):F(d)?(e.consume(d),T):$(d)}function N(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,q):_(d)?(l=N,X(d)):F(d)?(e.consume(d),N):(e.consume(d),P)}function q(d){return d===i?(e.consume(d),i=void 0,j):d===null?n(d):_(d)?(l=q,X(d)):(e.consume(d),q)}function P(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||W(d)?$(d):(e.consume(d),P)}function j(d){return d===47||d===62||W(d)?$(d):n(d)}function H(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function X(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),oe}function oe(d){return F(d)?B(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):me(d)}function me(d){return e.enter("htmlTextData"),l(d)}}const En={name:"labelEnd",resolveAll:ts,resolveTo:ns,tokenize:rs},Za={tokenize:is},Qa={tokenize:ls},es={tokenize:os};function ts(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ie(e,0,e.length,n),e}function ns(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=le(a,e.slice(o+1,o+r+3)),a=le(a,[["enter",f,t]]),a=le(a,jt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=le(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=le(a,e.slice(l+1)),a=le(a,[["exit",s,t]]),ie(e,o,e.length,a),e}function rs(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(l=r.parser.defined.includes(fe(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):n(h)}function s(h){return h===40?e.attempt(Za,f,l?f:c)(h):h===91?e.attempt(Qa,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(es,f,c)(h)}function f(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function is(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return W(c)?Qe(e,o)(c):o(c)}function o(c){return c===41?f(c):pi(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return W(c)?Qe(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?mi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return W(c)?Qe(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function ls(e,t,n){const r=this;return i;function i(a){return hi.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function os(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const as={name:"labelStartImage",resolveAll:En.resolveAll,tokenize:ss};function ss(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const us={name:"labelStartLink",resolveAll:En.resolveAll,tokenize:cs};function cs(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Mt={name:"lineEnding",tokenize:fs};function fs(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,t,"linePrefix")}}const yt={name:"thematicBreak",tokenize:ps};function ps(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||_(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),F(u)?B(e,a,"whitespace")(u):a(u))}}const ee={continuation:{tokenize:gs},exit:ys,name:"list",tokenize:ds},hs={partial:!0,tokenize:ks},ms={partial:!0,tokenize:xs};function ds(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const x=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:on(p)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(yt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return n(p)}function s(p){return on(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ct,r.interrupt?n:f,e.attempt(hs,h,c))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return F(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function gs(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ct,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!F(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ms,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function xs(e,t,n){const r=this;return B(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ys(e){e.exit(this.containerState.type)}function ks(e,t,n){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!F(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const pr={name:"setextUnderline",resolveTo:bs,tokenize:ws};function bs(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function ws(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),F(u)?B(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||_(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Ss={tokenize:Cs};function Cs(e){const t=this,n=e.attempt(ct,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ja,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const vs={resolveAll:gi()},Es=di("string"),As=di("text");function di(e){return{resolveAll:gi(e==="text"?Is:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function gi(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Is(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const js={42:ee,43:ee,45:ee,48:ee,49:ee,50:ee,51:ee,52:ee,53:ee,54:ee,55:ee,56:ee,57:ee,62:si},Ts={91:za},Ns={[-2]:Dt,[-1]:Dt,32:Dt},_s={35:Ra,42:yt,45:[pr,yt],60:qa,61:pr,95:yt,96:cr,126:cr},Ps={38:ci,92:ui},zs={[-5]:Mt,[-4]:Mt,[-3]:Mt,33:as,38:ci,42:an,60:[ua,Ga],91:us,92:[Fa,ui],93:En,95:an,96:Sa},Ls={null:[an,vs]},Ds={null:[42,95]},Ms={null:[]},Fs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ds,contentInitial:Ts,disable:Ms,document:js,flow:_s,flowInitial:Ns,insideSpan:Ls,string:Ps,text:zs},Symbol.toStringTag,{value:"Module"}));function Os(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:O(L),check:O(C),consume:S,enter:E,exit:z,interrupt:O(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:x,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(T){return l=le(l,T),v(),l[l.length-1]!==null?[]:(U(t,0),u.events=jt(o,u.events,u),u.events)}function h(T,N){return Bs(p(T),N)}function p(T){return Rs(l,T)}function x(){const{_bufferIndex:T,_index:N,line:q,column:P,offset:j}=r;return{_bufferIndex:T,_index:N,line:q,column:P,offset:j}}function b(T){i[T.line]=T.column,k()}function v(){let T;for(;r._index<l.length;){const N=l[r._index];if(typeof N=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<N.length;)y(N.charCodeAt(r._bufferIndex));else y(N)}}function y(T){f=f(T)}function S(T){_(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,k()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=T}function E(T,N){const q=N||{};return q.type=T,q.start=x(),u.events.push(["enter",q,u]),a.push(q),q}function z(T){const N=a.pop();return N.end=x(),u.events.push(["exit",N,u]),N}function L(T,N){U(T,N.from)}function C(T,N){N.restore()}function O(T,N){return q;function q(P,j,H){let X,oe,me,d;return Array.isArray(P)?de(P):"tokenize"in P?de([P]):ae(P);function ae(G){return He;function He(be){const _e=be!==null&&G[be],Pe=be!==null&&G.null,pt=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return de(pt)(be)}}function de(G){return X=G,oe=0,G.length===0?H:g(G[oe])}function g(G){return He;function He(be){return d=$(),me=G,G.partial||(u.currentConstruct=G),G.name&&u.parser.constructs.disable.null.includes(G.name)?Ee():G.tokenize.call(N?Object.assign(Object.create(u),N):u,s,se,Ee)(be)}}function se(G){return T(me,d),j}function Ee(G){return d.restore(),++oe<X.length?g(X[oe]):H}}}function U(T,N){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&ie(u.events,N,u.events.length-N,T.resolve(u.events.slice(N),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function $(){const T=x(),N=u.previous,q=u.currentConstruct,P=u.events.length,j=Array.from(a);return{from:P,restore:H};function H(){r=T,u.previous=N,u.currentConstruct=q,u.events.length=P,a=j,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Rs(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Bs(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
50
|
+
`;break}case-3:{l=`\r
|
|
51
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function $s(e){const r={constructs:oi([Fs,...(e||{}).extensions||[]]),content:i(na),defined:[],document:i(ia),flow:i(Ss),lazy:{},string:i(Es),text:i(As)};return r;function i(o){return l;function l(a){return Os(r,o,a)}}}function Us(e){for(;!fi(e););return e}const hr=/[\0\t\n\r]/g;function qs(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(hr.lastIndex=c,u=hr.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(c);break}if(p===10&&c===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<h&&(s.push(o.slice(c,h)),e+=h-c),p){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const Hs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vs(e){return e.replace(Hs,Ws)}function Ws(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return ai(n.slice(o?2:1),o?16:10)}return vn(n)||e}const xi={}.hasOwnProperty;function Js(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ys(n)(Us($s(n).document().write(qs()(e,t,!0))))}function Ys(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Un),autolinkProtocol:$,autolinkEmail:$,atxHeading:o(Rn),blockQuote:o(Pe),characterEscape:$,characterReference:$,codeFenced:o(pt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(pt,l),codeText:o(il,l),codeTextData:$,data:$,codeFlowValue:$,definition:o(ll),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(ol),hardBreakEscape:o(Bn),hardBreakTrailing:o(Bn),htmlFlow:o($n,l),htmlFlowData:$,htmlText:o($n,l),htmlTextData:$,image:o(al),label:l,link:o(Un),listItem:o(sl),listItemValue:h,listOrdered:o(qn,c),listUnordered:o(qn),paragraph:o(ul),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Rn),strong:o(cl),thematicBreak:o(pl)},exit:{atxHeading:s(),atxHeadingSequence:L,autolink:s(),autolinkEmail:_e,autolinkProtocol:be,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:G,characterReference:He,codeFenced:s(v),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:k,codeIndented:s(y),codeText:s(j),codeTextData:k,data:k,definition:s(),definitionDestinationString:z,definitionLabelString:S,definitionTitleString:E,emphasis:s(),hardBreakEscape:s(N),hardBreakTrailing:s(N),htmlFlow:s(q),htmlFlowData:k,htmlText:s(P),htmlTextData:k,image:s(X),label:me,labelText:oe,lineEnding:T,link:s(H),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:se,resourceDestinationString:d,resourceTitleString:ae,resource:de,setextHeading:s(U),setextHeadingLineSequence:O,setextHeadingText:C,strong:s(),thematicBreak:s()}};yi(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let I={type:"root",children:[]};const D={stack:[I],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},R=[];let V=-1;for(;++V<w.length;)if(w[V][1].type==="listOrdered"||w[V][1].type==="listUnordered")if(w[V][0]==="enter")R.push(V);else{const ue=R.pop();V=i(w,ue,V)}for(V=-1;++V<w.length;){const ue=t[w[V][0]];xi.call(ue,w[V][1].type)&&ue[w[V][1].type].call(Object.assign({sliceSerialize:w[V][2].sliceSerialize},D),w[V][1])}if(D.tokenStack.length>0){const ue=D.tokenStack[D.tokenStack.length-1];(ue[1]||mr).call(D,void 0,ue[0])}for(I.position={start:we(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:we(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)I=t.transforms[V](I)||I;return I}function i(w,I,D){let R=I-1,V=-1,ue=!1,Ae,ge,Ve,We;for(;++R<=D;){const ne=w[R];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,We=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Ae&&!We&&!V&&!Ve&&(Ve=R),We=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:We=void 0}if(!V&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||V===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(Ae){let ze=R;for(ge=void 0;ze--;){const xe=w[ze];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;ge&&(w[ge][1].type="lineEndingBlank",ue=!0),xe[1].type="lineEnding",ge=ze}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}Ve&&(!ge||Ve<ge)&&(Ae._spread=!0),Ae.end=Object.assign({},ge?w[ge][1].start:ne[1].end),w.splice(ge||R,0,["exit",Ae,ne[2]]),R++,D++}if(ne[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Ae=ze,w.splice(R,0,["enter",ze,ne[2]]),R++,D++,Ve=void 0,We=!0}}}return w[I][1]._spread=ue,D}function o(w,I){return D;function D(R){a.call(this,w(R),R),I&&I.call(this,R)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,I,D){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([I,D||void 0]),w.position={start:we(I.start),end:void 0}}function s(w){return I;function I(D){w&&w.call(this,D),u.call(this,D)}}function u(w,I){const D=this.stack.pop(),R=this.tokenStack.pop();if(R)R[0].type!==w.type&&(I?I.call(this,w,R[0]):(R[1]||mr).call(this,w,R[0]));else throw new Error("Cannot close `"+w.type+"` ("+Ze({start:w.start,end:w.end})+"): it’s not open");D.position.end=we(w.end)}function f(){return Cn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(w){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function p(){const w=this.resume(),I=this.stack[this.stack.length-1];I.lang=w}function x(){const w=this.resume(),I=this.stack[this.stack.length-1];I.meta=w}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/(\r?\n|\r)$/g,"")}function S(w){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(w)).toLowerCase()}function E(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function z(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function L(w){const I=this.stack[this.stack.length-1];if(!I.depth){const D=this.sliceSerialize(w).length;I.depth=D}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function O(w){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function $(w){const D=this.stack[this.stack.length-1].children;let R=D[D.length-1];(!R||R.type!=="text")&&(R=fl(),R.position={start:we(w.start),end:void 0},D.push(R)),this.stack.push(R)}function k(w){const I=this.stack.pop();I.value+=this.sliceSerialize(w),I.position.end=we(w.end)}function T(w){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=I.children[I.children.length-1];D.position.end=we(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&($.call(this,w),k.call(this,w))}function N(){this.data.atHardBreak=!0}function q(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function P(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function j(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function H(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function X(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function oe(w){const I=this.sliceSerialize(w),D=this.stack[this.stack.length-2];D.label=Vs(I),D.identifier=fe(I).toLowerCase()}function me(){const w=this.stack[this.stack.length-1],I=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const R=w.children;D.children=R}else D.alt=I}function d(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function ae(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function de(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function se(w){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Ee(w){this.data.characterReferenceType=w.type}function G(w){const I=this.sliceSerialize(w),D=this.data.characterReferenceType;let R;D?(R=ai(I,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):R=vn(I);const V=this.stack[this.stack.length-1];V.value+=R}function He(w){const I=this.stack.pop();I.position.end=we(w.end)}function be(w){k.call(this,w);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(w)}function _e(w){k.call(this,w);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(w)}function Pe(){return{type:"blockquote",children:[]}}function pt(){return{type:"code",lang:null,meta:null,value:""}}function il(){return{type:"inlineCode",value:""}}function ll(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ol(){return{type:"emphasis",children:[]}}function Rn(){return{type:"heading",depth:0,children:[]}}function Bn(){return{type:"break"}}function $n(){return{type:"html",value:""}}function al(){return{type:"image",title:null,url:"",alt:null}}function Un(){return{type:"link",title:null,url:"",children:[]}}function qn(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function sl(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function ul(){return{type:"paragraph",children:[]}}function cl(){return{type:"strong",children:[]}}function fl(){return{type:"text",value:""}}function pl(){return{type:"thematicBreak"}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function yi(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?yi(e,r):Xs(e,r)}}function Xs(e,t){let n;for(n in t)if(xi.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 mr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ze({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is still open")}function Gs(e){const t=this;t.parser=n;function n(r){return Js(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ks(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Zs(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
52
|
+
`}]}function Qs(e,t){const n=t.value?t.value+`
|
|
53
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function eu(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tu(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nu(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qe(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function ru(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iu(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ki(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function lu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ki(e,t);const i={src:qe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function ou(e,t){const n={src:qe(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function au(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function su(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ki(e,t);const i={href:qe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function uu(e,t){const n={href:qe(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cu(e,t,n){const r=e.all(t),i=n?fu(n):bi(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
54
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
|
|
55
|
+
`});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function fu(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=bi(n[r])}return t}function bi(e){const t=e.spread;return t??e.children.length>1}function pu(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function hu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mu(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function du(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=kn(t.children[1]),s=Qr(t.children[t.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function xu(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<a;){const c=t.children[s],h={},p=l?l[s]:void 0;p&&(h.align=p);let x={type:"element",tagName:o,properties:h,children:[]};c&&(x.children=e.all(c),e.patch(c,x),x=e.applyData(c,x)),u.push(x)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function yu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const dr=9,gr=32;function ku(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(xr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(xr(t.slice(i),i>0,!1)),o.join("")}function xr(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===dr||o===gr;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===dr||o===gr;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function bu(e,t){const n={type:"text",value:ku(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Su={blockquote:Ks,break:Zs,code:Qs,delete:eu,emphasis:tu,footnoteReference:nu,heading:ru,html:iu,imageReference:lu,image:ou,inlineCode:au,linkReference:su,link:uu,listItem:cu,list:pu,paragraph:hu,root:mu,strong:du,table:gu,tableCell:yu,tableRow:xu,text:bu,thematicBreak:wu,toml:ht,yaml:ht,definition:ht,footnoteDefinition:ht};function ht(){}const wi=-1,Tt=0,et=1,vt=2,An=3,In=4,jn=5,Tn=6,Si=7,Ci=8,yr=typeof self=="object"?self:globalThis,Cu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case Tt:case wi:return n(l,i);case et:{const a=n([],i);for(const s of l)a.push(r(s));return a}case vt:{const a=n({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case An:return n(new Date(l),i);case In:{const{source:a,flags:s}=l;return n(new RegExp(a,s),i)}case jn:{const a=n(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case Tn:{const a=n(new Set,i);for(const s of l)a.add(r(s));return a}case Si:{const{name:a,message:s}=l;return n(new yr[a](s),i)}case Ci:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new yr[o](l),i)};return r},kr=e=>Cu(new Map,e)(0),De="",{toString:vu}={},{keys:Eu}=Object,Ge=e=>{const t=typeof e;if(t!=="object"||!e)return[Tt,t];const n=vu.call(e).slice(8,-1);switch(n){case"Array":return[et,De];case"Object":return[vt,De];case"Date":return[An,De];case"RegExp":return[In,De];case"Map":return[jn,De];case"Set":return[Tn,De];case"DataView":return[et,n]}return n.includes("Array")?[et,n]:n.includes("Error")?[Si,n]:[vt,n]},mt=([e,t])=>e===Tt&&(t==="function"||t==="symbol"),Au=(e,t,n,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return n.set(a,s),s},o=l=>{if(n.has(l))return n.get(l);let[a,s]=Ge(l);switch(a){case Tt:{let f=l;switch(s){case"bigint":a=Ci,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([wi],l)}return i([a,f],l)}case et:{if(s){let h=l;return s==="DataView"?h=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(l)),i([s,[...h]],l)}const f=[],c=i([a,f],l);for(const h of l)f.push(o(h));return c}case vt:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const h of Eu(l))(e||!mt(Ge(l[h])))&&f.push([o(h),o(l[h])]);return c}case An:return i([a,l.toISOString()],l);case In:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case jn:{const f=[],c=i([a,f],l);for(const[h,p]of l)(e||!(mt(Ge(h))||mt(Ge(p))))&&f.push([o(h),o(p)]);return c}case Tn:{const f=[],c=i([a,f],l);for(const h of l)(e||!mt(Ge(h)))&&f.push(o(h));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},br=(e,{json:t,lossy:n}={})=>{const r=[];return Au(!(t||n),!!t,new Map,r)(e),r},Et=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?kr(br(e,t)):structuredClone(e):(e,t)=>kr(br(e,t));function Iu(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 ju(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Tu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Iu,r=e.options.footnoteBackLabel||ju,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=qe(c.toLowerCase());let p=0;const x=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){x.length>0&&x.push({type:"text",value:" "});let S=typeof n=="string"?n:n(s,p);typeof S=="string"&&(S={type:"text",value:S}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const v=f[f.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const S=v.children[v.children.length-1];S&&S.type==="text"?S.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else f.push(...x);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Et(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
56
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
57
|
+
`}]}}const Nt=(function(e){if(e==null)return zu;if(typeof e=="function")return _t(e);if(typeof e=="object")return Array.isArray(e)?Nu(e):_u(e);if(typeof e=="string")return Pu(e);throw new Error("Expected function, string, or object as test")});function Nu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nt(e[n]);return _t(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function _u(e){const t=e;return _t(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Pu(e){return _t(t);function t(n){return n&&n.type===e}}function _t(e){return t;function t(n,r,i){return!!(Lu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function zu(){return!0}function Lu(e){return e!==null&&typeof e=="object"&&"type"in e}const vi=[],Du=!0,sn=!1,Mu="skip";function Ei(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Nt(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=vi,x,b,v;if((!t||o(s,u,f[f.length-1]||void 0))&&(p=Fu(n(s,f)),p[0]===sn))return p;if("children"in s&&s.children){const y=s;if(y.children&&p[0]!==Mu)for(b=(r?y.children.length:-1)+l,v=f.concat(y);b>-1&&b<y.children.length;){const S=y.children[b];if(x=a(S,b,v)(),x[0]===sn)return x;b=typeof x[1]=="number"?x[1]:b+l}}return p}}}function Fu(e){return Array.isArray(e)?e:typeof e=="number"?[Du,e]:e==null?vi:[e]}function Nn(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Ei(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const un={}.hasOwnProperty,Ou={};function Ru(e,t){const n=t||Ou,r=new Map,i=new Map,o=new Map,l={...Su,...n.handlers},a={all:u,applyData:$u,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:n,patch:Bu,wrap:qu};return Nn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,h=String(f.identifier).toUpperCase();c.has(h)||c.set(h,f)}}),a;function s(f,c){const h=f.type,p=a.handlers[h];if(un.call(a.handlers,h)&&p)return p(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in f){const{children:b,...v}=f,y=Et(v);return y.children=a.all(f),y}return Et(f)}return(a.options.unknownHandler||Uu)(a,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const x=a.one(h[p],f);if(x){if(p&&h[p-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=wr(x.value)),!Array.isArray(x)&&x.type==="element")){const b=x.children[0];b&&b.type==="text"&&(b.value=wr(b.value))}Array.isArray(x)?c.push(...x):c.push(x)}}}return c}}function Bu(e,t){e.position&&(t.position=jo(e))}function $u(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Et(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Uu(e,t){const n=t.data||{},r="value"in t&&!(un.call(n,"hProperties")||un.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
58
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
59
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
60
|
+
`}),n}function wr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Sr(e,t){const n=Ru(e,t),r=n.one(e,void 0),i=Tu(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
61
|
+
`},i),o}function Hu(e,t){return e&&"run"in e?async function(n,r){const i=Sr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Sr(n,{file:r,...e||t})}}function Cr(e){if(e)throw e}var Ft,vr;function Vu(){if(vr)return Ft;vr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Ft=function s(){var u,f,c,h,p,x,b=arguments[0],v=1,y=arguments.length,S=!1;for(typeof b=="boolean"&&(S=b,b=arguments[1]||{},v=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});v<y;++v)if(u=arguments[v],u!=null)for(f in u)c=a(b,f),h=a(u,f),b!==h&&(S&&h&&(o(h)||(p=i(h)))?(p?(p=!1,x=c&&i(c)?c:[]):x=c&&o(c)?c:{},l(b,{name:f,newValue:s(S,x,h)})):typeof h<"u"&&l(b,{name:f,newValue:h}));return b},Ft}var Wu=Vu();const Ot=Rr(Wu);function cn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ju(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Yu(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Yu(e,t){let n;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const pe={basename:Xu,dirname:Gu,extname:Ku,join:Zu,sep:"/"};function Xu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ft(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Gu(e){if(ft(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ku(e){ft(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Zu(...e){let t=-1,n;for(;++t<e.length;)ft(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Qu(n)}function Qu(e){ft(e);const t=e.codePointAt(0)===47;let n=ec(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ec(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function ft(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tc={cwd:nc};function nc(){return"/"}function fn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rc(e){if(typeof e=="string")e=new URL(e);else if(!fn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ic(e)}function ic(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Rt=["history","path","basename","stem","extname","dirname"];class Ai{constructor(t){let n;t?fn(t)?n={path:t}:typeof t=="string"||lc(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Rt.length;){const o=Rt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Rt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?pe.basename(this.path):void 0}set basename(t){$t(t,"basename"),Bt(t,"basename"),this.path=pe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pe.dirname(this.path):void 0}set dirname(t){Er(this.basename,"dirname"),this.path=pe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pe.extname(this.path):void 0}set extname(t){if(Bt(t,"extname"),Er(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){fn(t)&&(t=rc(t)),$t(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pe.basename(this.path,this.extname):void 0}set stem(t){$t(t,"stem"),Bt(t,"stem"),this.path=pe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Z(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Bt(e,t){if(e&&e.includes(pe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pe.sep+"`")}function $t(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Er(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function lc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oc=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),ac={}.hasOwnProperty;class _n extends oc{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=Ju()}copy(){const t=new _n;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ot(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ht("data",this.frozen),this.namespace[t]=n,this):ac.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ht("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=dt(t),r=this.parser||this.Parser;return Ut("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ut("process",this.parser||this.Parser),qt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=dt(t),s=r.parse(a);r.run(s,a,function(f,c,h){if(f||!c||!h)return u(f);const p=c,x=r.stringify(p,h);cc(x)?h.value=x:h.result=x,u(f,h)});function u(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Ut("processSync",this.parser||this.Parser),qt("processSync",this.compiler||this.Compiler),this.process(t,i),Ir("processSync","process",n),r;function i(o,l){n=!0,Cr(o),r=l}}run(t,n,r){Ar(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=dt(n);i.run(t,s,u);function u(f,c,h){const p=c||t;f?a(f):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Ir("runSync","run",r),i;function o(l,a){Cr(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=dt(n),i=this.compiler||this.Compiler;return qt("stringify",i),Ar(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ht("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))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(u.plugins),u.settings&&(i.settings=Ot(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...f]);else if(f.length>0){let[p,...x]=f;const b=r[h][1];cn(b)&&cn(p)&&(p=Ot(!0,b,p)),r[h]=[u,p,...x]}}}}const sc=new _n().freeze();function Ut(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ht(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 Ar(e){if(!cn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ir(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function dt(e){return uc(e)?e:new Ai(e)}function uc(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cc(e){return typeof e=="string"||fc(e)}function fc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",jr=[],Tr={allowDangerousHtml:!0},hc=/^(https?|ircs?|mailto|xmpp)$/i,mc=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function dc(e){const t=gc(e),n=xc(e);return yc(t.runSync(t.parse(n),n),e)}function gc(e){const t=e.rehypePlugins||jr,n=e.remarkPlugins||jr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Tr}:Tr;return sc().use(Gs).use(n).use(Hu,r).use(t)}function xc(e){const t=e.children||"",n=new Ai;return typeof t=="string"&&(n.value=t),n}function yc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||kc;for(const f of mc)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+pc+f.id,void 0);return Nn(e,u),zo(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return l?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Lt)if(Object.hasOwn(Lt,p)&&Object.hasOwn(f.properties,p)){const x=f.properties[p],b=Lt[p];(b===null||b.includes(f.tagName))&&(f.properties[p]=s(String(x||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return a&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function kc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||hc.test(e.slice(0,t))?e:""}function bc(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ii(e,t,n){const i=Nt((n||{}).ignore||[]),o=wc(t);let l=-1;for(;++l<o.length;)Ei(e,"text",a);function a(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],x=h?h.children:void 0;if(i(p,x?x.indexOf(p):void 0,h))return;h=p}if(h)return s(u,f)}function s(u,f){const c=f[f.length-1],h=o[l][0],p=o[l][1];let x=0;const v=c.children.indexOf(u);let y=!1,S=[];h.lastIndex=0;let E=h.exec(u.value);for(;E;){const z=E.index,L={index:E.index,input:E.input,stack:[...f,u]};let C=p(...E,L);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=z+1:(x!==z&&S.push({type:"text",value:u.value.slice(x,z)}),Array.isArray(C)?S.push(...C):C&&S.push(C),x=z+E[0].length,y=!0),!h.global)break;E=h.exec(u.value)}return y?(x<u.value.length&&S.push({type:"text",value:u.value.slice(x)}),c.children.splice(v,1,...S)):S=[u],v+S.length}}function wc(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 i=n[r];t.push([Sc(i[0]),Cc(i[1])])}return t}function Sc(e){return typeof e=="string"?new RegExp(bc(e),"g"):e}function Cc(e){return typeof e=="function"?e:function(){return e}}function vc(e){Ii(e,[/\r?\n|\r/g,Ec])}function Ec(){return{type:"break"}}function Ac(){return function(e){vc(e)}}function Nr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Vt="phrasing",Wt=["autolink","link","image","label"];function Ic(){return{transforms:[Lc],enter:{literalAutolink:Tc,literalAutolinkEmail:Jt,literalAutolinkHttp:Jt,literalAutolinkWww:Jt},exit:{literalAutolink:zc,literalAutolinkEmail:Pc,literalAutolinkHttp:Nc,literalAutolinkWww:_c}}}function jc(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Vt,notInConstruct:Wt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Vt,notInConstruct:Wt},{character:":",before:"[ps]",after:"\\/",inConstruct:Vt,notInConstruct:Wt}]}}function Tc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jt(e){this.config.enter.autolinkProtocol.call(this,e)}function Nc(e){this.config.exit.autolinkProtocol.call(this,e)}function _c(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 Pc(e){this.config.exit.autolinkEmail.call(this,e)}function zc(e){this.exit(e)}function Lc(e){Ii(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Dc],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Mc]],{ignore:["link","linkReference"]})}function Dc(e,t,n,r,i){let o="";if(!ji(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Fc(n)))return!1;const l=Oc(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Mc(e,t,n,r){return!ji(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Fc(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Oc(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Nr(e,"(");let o=Nr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ji(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Te(n)||It(n))&&(!t||n!==47)}Ti.peek=Jc;function Rc(){this.buffer()}function Bc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $c(){this.buffer()}function Uc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function qc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Hc(e){this.exit(e)}function Vc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Wc(e){this.exit(e)}function Jc(){return"["}function Ti(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Yc(){return{enter:{gfmFootnoteCallString:Rc,gfmFootnoteCall:Bc,gfmFootnoteDefinitionLabelString:$c,gfmFootnoteDefinition:Uc},exit:{gfmFootnoteCallString:qc,gfmFootnoteCall:Hc,gfmFootnoteDefinitionLabelString:Vc,gfmFootnoteDefinition:Wc}}}function Xc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ti},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((t?`
|
|
62
|
+
`:" ")+o.indentLines(o.containerFlow(r,a.current()),t?Ni:Gc))),u(),s}}function Gc(e,t,n){return t===0?e:Ni(e,t,n)}function Ni(e,t,n){return(n?"":" ")+e}const Kc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];_i.peek=nf;function Zc(){return{canContainEols:["delete"],enter:{strikethrough:ef},exit:{strikethrough:tf}}}function Qc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Kc}],handlers:{delete:_i}}}function ef(e){this.enter({type:"delete",children:[]},e)}function tf(e){this.exit(e)}function _i(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function nf(){return"~"}function rf(e){return e.length}function lf(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||rf,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const b=[],v=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const S=of(e[f][y]);if(n.alignDelimiters!==!1){const E=i(S);v[y]=E,(s[y]===void 0||E>s[y])&&(s[y]=E)}b.push(S)}l[f]=b,a[f]=v}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=_r(r[c]);else{const b=_r(r);for(;++c<u;)o[c]=b}c=-1;const h=[],p=[];for(;++c<u;){const b=o[c];let v="",y="";b===99?(v=":",y=":"):b===108?v=":":b===114&&(y=":");let S=n.alignDelimiters===!1?1:Math.max(1,s[c]-v.length-y.length);const E=v+"-".repeat(S)+y;n.alignDelimiters!==!1&&(S=v.length+S+y.length,S>s[c]&&(s[c]=S),p[c]=S),h[c]=E}l.splice(1,0,h),a.splice(1,0,p),f=-1;const x=[];for(;++f<l.length;){const b=l[f],v=a[f];c=-1;const y=[];for(;++c<u;){const S=b[c]||"";let E="",z="";if(n.alignDelimiters!==!1){const L=s[c]-(v[c]||0),C=o[c];C===114?E=" ".repeat(L):C===99?L%2?(E=" ".repeat(L/2+.5),z=" ".repeat(L/2-.5)):(E=" ".repeat(L/2),z=E):z=" ".repeat(L)}n.delimiterStart!==!1&&!c&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||c)&&y.push(" "),n.alignDelimiters!==!1&&y.push(E),y.push(S),n.alignDelimiters!==!1&&y.push(z),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&y.push("|")}x.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return x.join(`
|
|
63
|
+
`)}function of(e){return e==null?"":String(e)}function _r(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function af(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),sf);return i(),l}function sf(e,t,n){return">"+(n?"":" ")+e}function uf(e,t){return Pr(e,t.inConstruct,!0)&&!Pr(e,t.notInConstruct,!1)}function Pr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function zr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
64
|
+
`&&uf(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
65
|
+
`}function cf(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function ff(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function pf(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function hf(e,t,n,r){const i=pf(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(ff(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(o,mf);return c(),h}const a=n.createTracker(r),s=i.repeat(Math.max(cf(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(s);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
|
|
66
|
+
`,encode:["`"],...a.current()})),c()}return f+=a.move(`
|
|
67
|
+
`),o&&(f+=a.move(o+`
|
|
68
|
+
`)),f+=a.move(s),u(),f}function mf(e,t,n){return(n?"":" ")+e}function Pn(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 df(e,t,n,r){const i=Pn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("[");return u+=s.move(n.safe(n.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
69
|
+
`,...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function gf(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function it(e){return"&#x"+e.toString(16).toUpperCase()+";"}function At(e,t,n){const r=Oe(e),i=Oe(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Pi.peek=xf;function Pi(e,t,n,r){const i=gf(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=At(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=At(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+it(c));const p=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function xf(e,t,n){return n.options.emphasis||"*"}function yf(e,t){let n=!1;return Nn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,sn}),!!((!e.depth||e.depth<3)&&Cn(e)&&(t.options.setext||n))}function kf(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(yf(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
|
|
70
|
+
`,after:`
|
|
71
|
+
`});return c(),f(),h+`
|
|
72
|
+
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
73
|
+
`))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),s=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
74
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u=it(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u}zi.peek=bf;function zi(e){return e.value||""}function bf(){return"<"}Li.peek=wf;function Li(e,t,n,r){const i=Pn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");return u+=s.move(n.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function wf(){return"!"}Di.peek=Sf;function Di(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Sf(){return"!"}Mi.peek=Cf;function Mi(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function Cf(){return"`"}function Fi(e,t){const n=Cn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Oi.peek=vf;function Oi(e,t,n,r){const i=Pn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(Fi(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),s=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function vf(e,t,n){return Fi(e,n)?"<":"["}Ri.peek=Ef;function Ri(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Ef(){return"["}function zn(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 Af(e){const t=zn(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}function If(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Bi(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}function jf(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?If(n):zn(n);const a=e.ordered?l==="."?")":".":Af(n);let s=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),Bi(n)===l&&f){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function Tf(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Nf(e,t,n,r){const i=Tf(n);let o=n.bulletCurrent||zn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return s(),u;function f(c,h,p){return h?(p?"":" ".repeat(l))+c:(p?o:o+" ".repeat(l-o.length))+c}}function _f(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Pf=Nt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zf(e,t,n,r){return(e.children.some(function(l){return Pf(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Lf(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$i.peek=Df;function $i(e,t,n,r){const i=Lf(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=At(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=At(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+it(c));const p=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Df(e,t,n){return n.options.strong||"*"}function Mf(e,t,n,r){return n.safe(e.value,r)}function Ff(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}function Of(e,t,n){const r=(Bi(n)+(n.options.ruleSpaces?" ":"")).repeat(Ff(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ui={blockquote:af,break:zr,code:hf,definition:df,emphasis:Pi,hardBreak:zr,heading:kf,html:zi,image:Li,imageReference:Di,inlineCode:Mi,link:Oi,linkReference:Ri,list:jf,listItem:Nf,paragraph:_f,root:zf,strong:$i,text:Mf,thematicBreak:Of};function Rf(){return{enter:{table:Bf,tableData:Lr,tableHeader:Lr,tableRow:Uf},exit:{codeText:qf,table:$f,tableData:Yt,tableHeader:Yt,tableRow:Yt}}}function Bf(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $f(e){this.exit(e),this.data.inTable=void 0}function Uf(e){this.enter({type:"tableRow",children:[]},e)}function Yt(e){this.exit(e)}function Lr(e){this.enter({type:"tableCell",children:[]},e)}function qf(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Hf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Hf(e,t){return t==="|"?t:e}function Vf(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
75
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:l,tableCell:s,tableRow:a}};function l(p,x,b,v){return u(f(p,b,v),p.align)}function a(p,x,b,v){const y=c(p,b,v),S=u([y]);return S.slice(0,S.indexOf(`
|
|
76
|
+
`))}function s(p,x,b,v){const y=b.enter("tableCell"),S=b.enter("phrasing"),E=b.containerPhrasing(p,{...v,before:o,after:o});return S(),y(),E}function u(p,x){return lf(p,{align:x,alignDelimiters:r,padding:n,stringLength:i})}function f(p,x,b){const v=p.children;let y=-1;const S=[],E=x.enter("table");for(;++y<v.length;)S[y]=c(v[y],x,b);return E(),S}function c(p,x,b){const v=p.children;let y=-1;const S=[],E=x.enter("tableRow");for(;++y<v.length;)S[y]=s(v[y],p,x,b);return E(),S}function h(p,x,b){let v=Ui.inlineCode(p,x,b);return b.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function Wf(){return{exit:{taskListCheckValueChecked:Dr,taskListCheckValueUnchecked:Dr,paragraph:Yf}}}function Jf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Xf}}}function Dr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Yf(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Xf(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=Ui.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function Gf(){return[Ic(),Yc(),Zc(),Rf(),Wf()]}function Kf(e){return{extensions:[jc(),Xc(e),Qc(),Vf(e),Jf()]}}const Zf={tokenize:ip,partial:!0},qi={tokenize:lp,partial:!0},Hi={tokenize:op,partial:!0},Vi={tokenize:ap,partial:!0},Qf={tokenize:sp,partial:!0},Wi={name:"wwwAutolink",tokenize:np,previous:Yi},Ji={name:"protocolAutolink",tokenize:rp,previous:Xi},ke={name:"emailAutolink",tokenize:tp,previous:Gi},he={};function ep(){return{text:he}}let Ie=48;for(;Ie<123;)he[Ie]=ke,Ie++,Ie===58?Ie=65:Ie===91&&(Ie=97);he[43]=ke;he[45]=ke;he[46]=ke;he[95]=ke;he[72]=[ke,Ji];he[104]=[ke,Ji];he[87]=[ke,Wi];he[119]=[ke,Wi];function tp(e,t,n){const r=this;let i,o;return l;function l(c){return!pn(c)||!Gi.call(r,r.previous)||Ln(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return pn(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(Qf,f,u)(c):c===45||c===95||K(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&Q(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function np(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Yi.call(r,r.previous)||Ln(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Zf,e.attempt(qi,e.attempt(Hi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function rp(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Xi.call(r,r.previous)&&!Ln(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(Q(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||Ct(c)||W(c)||Te(c)||It(c)?n(c):e.attempt(qi,e.attempt(Hi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function ip(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function lp(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(Vi,s,a)(u):u===null||W(u)||Te(u)||u!==45&&It(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function op(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Vi,t,o)(l):l===null||W(l)||Te(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function ap(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||W(a)||Te(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||W(a)||Te(a)?t(a):r(a)}function o(a){return Q(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):Q(a)?(e.consume(a),l):n(a)}}function sp(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return K(o)?n(o):t(o)}}function Yi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Xi(e){return!Q(e)}function Gi(e){return!(e===47||pn(e))}function pn(e){return e===43||e===45||e===46||e===95||K(e)}function Ln(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const up={tokenize:xp,partial:!0};function cp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mp,continuation:{tokenize:dp},exit:gp}},text:{91:{name:"gfmFootnoteCall",tokenize:hp},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fp,resolveTo:pp}}}}function fp(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=fe(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function pp(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function hp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||W(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(fe(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return W(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function mp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(x)}function f(x){if(l>999||x===93&&!a||x===null||x===91||W(x))return n(x);if(x===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=fe(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return W(x)||(a=!0),l++,e.consume(x),x===92?c:f}function c(x){return x===91||x===92||x===93?(e.consume(x),l++,f):f(x)}function h(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(o)||i.push(o),B(e,p,"gfmFootnoteDefinitionWhitespace")):n(x)}function p(x){return t(x)}}function dp(e,t,n){return e.check(ct,t,e.attempt(up,t,n))}function gp(e){e.exit("gfmFootnoteDefinition")}function xp(e,t,n){const r=this;return B(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function yp(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},h=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],p=a.parser.constructs.insideSpan.null;p&&ie(h,h.length,0,jt(p,l.slice(u+1,s),a)),ie(h,h.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ie(l,u-1,s-u+3,h),s=u+h.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return h;function h(x){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(x):(l.enter("strikethroughSequenceTemporary"),p(x))}function p(x){const b=Oe(u);if(x===126)return c>1?s(x):(l.consume(x),c++,p);if(c<2&&!n)return s(x);const v=l.exit("strikethroughSequenceTemporary"),y=Oe(x);return v._open=!y||y===2&&!!b,v._close=!b||b===2&&!!y,a(x)}}}class kp{constructor(){this.map=[]}add(t,n,r){bp(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function bp(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function wp(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Sp(){return{flow:{null:{name:"table",tokenize:Cp,resolveAll:vp}}}}function Cp(e,t,n){const r=this;let i=0,o=0,l;return a;function a(k){let T=r.events.length-1;for(;T>-1;){const P=r.events[T][1].type;if(P==="lineEnding"||P==="linePrefix")T--;else break}const N=T>-1?r.events[T][1].type:null,q=N==="tableHead"||N==="tableRow"?C:s;return q===C&&r.parser.lazy[r.now().line]?n(k):q(k)}function s(k){return e.enter("tableHead"),e.enter("tableRow"),u(k)}function u(k){return k===124||(l=!0,o+=1),f(k)}function f(k){return k===null?n(k):_(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):F(k)?B(e,f,"whitespace")(k):(o+=1,l&&(l=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||W(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?h:c)}function h(k){return k===92||k===124?(e.consume(k),c):c(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),l=!1,F(k)?B(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):x(k))}function x(k){return k===45||k===58?v(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),b):L(k)}function b(k){return F(k)?B(e,v,"whitespace")(k):v(k)}function v(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(o+=1,y(k)):k===null||_(k)?z(k):L(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),S(k)):L(k)}function S(k){return k===45?(e.consume(k),S):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(k))}function E(k){return F(k)?B(e,z,"whitespace")(k):z(k)}function z(k){return k===124?x(k):k===null||_(k)?!l||i!==o?L(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):L(k)}function L(k){return n(k)}function C(k){return e.enter("tableRow"),O(k)}function O(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),O):k===null||_(k)?(e.exit("tableRow"),t(k)):F(k)?B(e,O,"whitespace")(k):(e.enter("data"),U(k))}function U(k){return k===null||k===124||W(k)?(e.exit("data"),O(k)):(e.consume(k),k===92?$:U)}function $(k){return k===92||k===124?(e.consume(k),U):U(k)}}function vp(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const h=new kp;for(;++n<e.length;){const p=e[n],x=p[1];p[0]==="enter"?x.type==="tableHead"?(a=!1,s!==0&&(Mr(h,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(n,0,[["enter",u,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(n,0,[["enter",f,t]])),i=x.type==="tableDelimiterRow"?2:f?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=gt(h,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=gt(h,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):x.type==="tableHead"?(a=!0,s=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=gt(h,t,o,i,n,c)):l[1]!==0&&(c=gt(h,t,l,i,n,c)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&Mr(h,t,s,u,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=wp(t.events,n))}return e}function gt(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Me(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Me(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Me(t.events,n[2]),f=Me(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,b=n[3]-n[2]-1;e.add(x,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Me(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Mr(e,t,n,r,i){const o=[],l=Me(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Me(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Ep={name:"tasklistCheck",tokenize:Ip};function Ap(){return{text:{91:Ep}}}function Ip(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return W(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return _(s)?t(s):F(s)?e.check({tokenize:jp},t,n)(s):n(s)}}function jp(e,t,n){return B(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Tp(e){return oi([ep(),cp(),yp(e),Sp(),Ap()])}const Np={};function _p(e){const t=this,n=e||Np,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Tp(n)),o.push(Gf()),l.push(Kf(n))}function lt({payload:e,disabled:t=!1,bypassEnabled:n=!1,onBypassChange:r,onSubmit:i}){const[o,l]=ce.useState(()=>n?ql(e):e.questions.map(()=>[])),[a,s]=ce.useState(!1),[u,f]=ce.useState(!1);ce.useEffect(()=>{n&&l(x=>x.map((b,v)=>{var y;return b.length>0?b:(y=e.questions[v])!=null&&y.options.length?[0]:[]}))},[n,e]);const c=Hl(e,o)&&!t&&!a&&!u&&!!i,h=(x,b)=>{t||u||a||l(v=>v.map((y,S)=>{if(S!==x)return y;const E=e.questions[S];return E?E.multiSelect?y.includes(b)?y.filter(z=>z!==b):[...y,b].sort((z,L)=>z-L):[b]:y}))},p=async()=>{if(!c||!i)return;s(!0);const x=await i(Vl(e,o));s(!1),x&&f(!0)};return m.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-4 shadow-[0_24px_80px_-60px_hsl(var(--primary)/0.9)]",children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-primary/20 bg-primary/10 text-primary shadow-sm",children:m.jsx(bl,{className:"h-4 w-4"})}),m.jsxs("div",{children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-primary/80",children:"Ask User Question"}),m.jsx("div",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:"Select the answer you want to send back to the agent."})]})]}),m.jsxs(bt,{type:"button",variant:n?"secondary":"outline",size:"sm",onClick:()=>r==null?void 0:r(!n),className:"rounded-sm",children:[m.jsx(Tl,{className:"h-4 w-4"}),n?"Bypass on":"Bypass future questions"]})]}),m.jsx("div",{className:"mt-4 space-y-4",children:e.questions.map((x,b)=>{const v=o[b]??[];return m.jsxs("div",{className:"space-y-3 rounded-lg border border-border/60 bg-background/75 p-4",children:[m.jsxs("div",{children:[x.header&&m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:x.header}),m.jsx("div",{className:"mt-1 text-sm font-medium leading-6 text-foreground",children:x.question}),m.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:x.multiSelect?"Select one or more options.":"Select one option."})]}),m.jsx("div",{className:"space-y-2",children:x.options.map((y,S)=>{const E=v.includes(S);return m.jsxs("button",{type:"button",onClick:()=>h(b,S),disabled:t||a||u,"aria-pressed":E,className:wt("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors",E?"border-primary/50 bg-primary/10 text-foreground":"border-border/60 bg-background/80 text-foreground hover:border-primary/30 hover:bg-primary/5"),children:[m.jsx("span",{className:wt("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",E?"border-primary bg-primary text-primary-foreground":"border-border/70 bg-background text-transparent"),children:m.jsx(Re,{className:"h-3.5 w-3.5"})}),m.jsxs("span",{className:"min-w-0",children:[m.jsx("span",{className:"block text-sm font-medium leading-5",children:y.label}),y.description&&m.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:y.description})]})]},`${y.label}-${S}`)})})]},`${x.header??"question"}-${b}`)})}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[m.jsx("div",{className:"text-xs text-muted-foreground",children:n?"Bypass is enabled. New question cards will default to the first option.":"Enable bypass if you want future question cards to preselect the first option."}),m.jsx(bt,{type:"button",onClick:()=>void p(),disabled:!c,className:"rounded-sm px-5",children:u?"Sent":a?"Sending...":e.questions.length>1?"Send answers":"Send answer"})]})]})}function Pp({payload:e,disabled:t=!1,onSubmit:n}){const[r,i]=ce.useState(null),[o,l]=ce.useState(!1),a=!t&&!o&&!!n,s=async u=>{if(!a||!n)return;i(u);const f=await n(Gl(e,u));i(null),f&&l(!0)};return m.jsxs("div",{className:"rounded-xl border border-amber-500/25 bg-amber-500/5 p-4 shadow-[0_24px_80px_-60px_rgba(245,158,11,0.8)]",children:[m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-amber-500/25 bg-amber-500/10 text-amber-600 shadow-sm dark:text-amber-400",children:m.jsx(Il,{className:"h-4 w-4"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-amber-700/80 dark:text-amber-300/80",children:"Permission Request"}),m.jsx("div",{className:"mt-1 space-y-3",children:e.requests.map((u,f)=>m.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/75 px-4 py-3",children:[m.jsx("div",{className:"text-sm font-medium leading-6 text-foreground",children:u.summary}),(u.toolName||u.target)&&m.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:[m.jsx("span",{children:u.toolName}),u.target&&m.jsx("span",{className:"font-mono normal-case tracking-normal",children:u.target})]})]},`${u.toolUseId??u.toolName}-${f}`))})]})]}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-end gap-2",children:[m.jsxs(bt,{type:"button",variant:"outline",onClick:()=>void s("deny"),disabled:!a||r!==null,className:"rounded-sm",children:[m.jsx(Br,{className:"h-4 w-4"}),o?"Sent":r==="deny"?"Sending...":"Deny"]}),m.jsxs(bt,{type:"button",onClick:()=>void s("approve"),disabled:!a||r!==null,className:"rounded-sm",children:[m.jsx(Re,{className:"h-4 w-4"}),o?"Sent":r==="approve"?"Sending...":"Approve"]})]})]})}const Ke=6;function zp(e){return e.replace(/\s+/g," ").trim()}function Se(e,t=132){const n=zp(e);return n?n.length>t?`${n.slice(0,t-3)}...`:n:""}function hn(e,t=84){if(typeof e=="string")return Se(e,t);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){const n=e.slice(0,3).map(r=>hn(r,28)).filter(Boolean).join(", ");return Se(n||JSON.stringify(e),t)}if(typeof e=="object"&&e!==null){const n=Object.entries(e).slice(0,3).map(([r,i])=>`${r}: ${hn(i,32)}`).join(" · ");return Se(n||JSON.stringify(e),t)}return""}function Ki(e){if(!e)return"No input";const t=Object.entries(e).slice(0,4).map(([n,r])=>`${n}: ${hn(r,40)}`).filter(n=>n.trim().length>0).join(" · ");return Se(t||JSON.stringify(e),156)||"No input"}function Zi({expanded:e}){return m.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-sm px-1 py-0.5 text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground/70 transition-colors group-hover/activity:text-muted-foreground",children:[e?"Less":"More",e?m.jsx(ml,{className:"h-2.5 w-2.5"}):m.jsx(dl,{className:"h-2.5 w-2.5"})]})}function Dn({status:e}){const t=e==="failed"?"border-destructive/22 bg-destructive/9 text-destructive":e==="success"?"border-emerald-500/24 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300":"border-border/35 bg-muted/30 text-muted-foreground/58";return m.jsx("span",{className:`agent-activity-status-icon mt-0.5 inline-flex h-3 w-3 shrink-0 items-center justify-center rounded-full border ${t}`,"data-agent-activity-status":e,"aria-hidden":"true",children:e==="failed"?m.jsx(Br,{className:"h-2 w-2"}):e==="success"?m.jsx(Re,{className:"h-2 w-2"}):m.jsx(Ur,{className:"h-1 w-1 fill-current"})})}function Qi(e){const t=typeof e.status=="string"?e.status.toLowerCase():"";if(e.is_error===!0||e.isError===!0||t==="failed"||t==="error")return"failed";const n=On(e).slice(0,160);return/\b(error|failed|exception|traceback)\b/i.test(n)?"failed":"success"}function Mn({title:e,preview:t,icon:n,children:r,accentClassName:i,status:o="success",previewClassName:l="font-mono text-[9px] leading-3 text-muted-foreground/78"}){const[a,s]=ce.useState(!1);return m.jsxs("div",{className:`overflow-hidden rounded-sm border border-border/18 shadow-none ${i}`,children:[m.jsxs("button",{type:"button",onClick:()=>s(u=>!u),className:"flex w-full items-start gap-1.5 px-2 py-1 text-left transition-colors hover:bg-background/24",children:[m.jsx(Dn,{status:o}),m.jsx("div",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:n}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:m.jsx("span",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:e})}),m.jsx("div",{className:`mt-0.5 whitespace-pre-wrap break-words ${l}`,children:t})]}),m.jsx(Zi,{expanded:a})]}),a&&m.jsx("div",{className:"border-t border-border/18 px-2 py-1.5",children:r})]})}function el({text:e,status:t="success"}){const n=Se(e,156);return m.jsx(Mn,{title:"Thinking",preview:n,icon:m.jsx(yl,{className:"h-3 w-3"}),accentClassName:"bg-muted/22",status:t,previewClassName:"text-[9px] leading-3 text-muted-foreground/78",children:m.jsx("div",{className:"whitespace-pre-wrap text-[10px] leading-4 text-muted-foreground/82",children:e})})}function tl({block:e,status:t="success",renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l}){const a=String(e.name??"tool"),s=e.input,u=at(e);if(u){const c=$e(u);return n!=null&&n.has(c)?null:(n==null||n.add(c),m.jsx(lt,{payload:u,bypassEnabled:r,onBypassChange:i,onSubmit:o,disabled:l}))}const f=Ki(s);if(a==="TodoWrite"){const c=Fp(s==null?void 0:s.todos);if(c.length>0)return m.jsx(Op,{todos:c,status:t})}return m.jsx(Mn,{title:`Tool: ${a}`,preview:f,icon:m.jsx(dn,{className:"h-3 w-3"}),accentClassName:"bg-muted/18",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:JSON.stringify(s??{},null,2)})})}function Fn({block:e,status:t=Qi(e),renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l}){const a=On(e);if(!a)return null;const s=st(a);if(s){const f=$e(s);return n!=null&&n.has(f)?null:(n==null||n.add(f),m.jsx(lt,{payload:s,bypassEnabled:r,onBypassChange:i,onSubmit:o,disabled:l}))}const u=Se(a,156);return m.jsx(Mn,{title:"Result",preview:u,icon:m.jsx(dn,{className:"h-3 w-3"}),accentClassName:"bg-background/45",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:a})})}function On(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>String(n.text??"")).join(`
|
|
77
|
+
`):""}function Lp(e){const t=e.message;return typeof t=="object"&&t!==null&&Array.isArray(t.content)?t.content:Array.isArray(e.content)?e.content:[]}function Dp(e){return e.flatMap(t=>Lp(t).flatMap(n=>{if(n.type==="thinking"){const r=String(n.thinking??"").trim();return r?[{title:"Thinking",preview:Se(r,112),block:n,kind:"thinking",status:"success"}]:[]}if(n.type==="tool_use")return[{title:`Tool: ${String(n.name??"tool")}`,preview:Ki(n.input),block:n,kind:"tool_use",status:"success"}];if(n.type==="tool_result"){const r=Se(On(n),112);return r?[{title:"Result",preview:r,block:n,kind:"tool_result",status:Qi(n)}]:[]}return[]}))}function Mp({events:e,...t}){const[n,r]=ce.useState(!1),[i,o]=ce.useState(Ke),l=Dp(e);if(l.length===0)return null;const a=l.slice(0,i),s=l.length-a.length;function u(){r(f=>{const c=!f;return c&&o(Ke),c})}return m.jsxs("div",{className:"animate-agent-activity group/activity overflow-hidden py-0.5 text-muted-foreground","data-agent-activity-page-size":Ke,children:[m.jsxs("button",{type:"button",onClick:u,"aria-expanded":n,className:"flex w-full items-start gap-1.5 rounded-sm px-1 py-1 text-left transition-colors hover:bg-muted/18",children:[m.jsx("div",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground/55 transition-colors group-hover/activity:text-muted-foreground/80",children:m.jsx(dn,{className:"h-3 w-3"})}),m.jsxs("div",{className:"min-w-0 flex-1 space-y-0.5",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[m.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/80",children:"Agent activity"}),m.jsxs("span",{className:"font-mono text-[9px] leading-4 text-muted-foreground/55",children:[l.length," ",l.length===1?"item":"items"]})]}),m.jsx("div",{className:"divide-y divide-dashed divide-border/18",children:l.slice(0,4).map((f,c)=>m.jsxs("div",{className:"grid gap-1 py-0.5 text-[9px] leading-3 sm:grid-cols-[0.875rem_4.75rem_minmax(0,1fr)]",children:[m.jsx(Dn,{status:f.status}),m.jsx("span",{className:"truncate font-medium text-muted-foreground/75",children:f.title}),m.jsx("span",{className:"truncate font-mono text-muted-foreground/60",children:f.preview})]},`${f.kind}-${c}`))})]}),m.jsx(Zi,{expanded:n})]}),n&&m.jsxs("div",{className:"animate-agent-activity-expand divide-y divide-dashed divide-border/18 px-3 pb-1 pt-0.5",children:[a.map((f,c)=>{const h=`${f.kind}-${c}`;return f.kind==="thinking"?m.jsx("div",{className:"py-0.5",children:m.jsx(el,{text:String(f.block.thinking??""),status:f.status})},h):f.kind==="tool_use"?m.jsx("div",{className:"py-0.5",children:m.jsx(tl,{block:f.block,status:f.status,...t})},h):m.jsx("div",{className:"py-0.5",children:m.jsx(Fn,{block:f.block,status:f.status,...t})},h)}),s>0&&m.jsxs("button",{type:"button",onClick:()=>o(f=>f+Ke),className:"ml-5 inline-flex rounded-sm px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.14em] text-muted-foreground/62 transition-colors hover:bg-muted/20 hover:text-muted-foreground",children:["Load more ",Math.min(s,Ke)]})]})]})}function Fp(e){return Array.isArray(e)?e.map(t=>{if(typeof t!="object"||t===null)return null;const n=t,r=typeof n.content=="string"?n.content:"";if(!r)return null;const i=typeof n.activeForm=="string"?n.activeForm:r,o=typeof n.status=="string"?n.status:"pending";return{content:r,activeForm:i,status:o==="completed"||o==="in_progress"?o:"pending"}}).filter(t=>t!==null):[]}function Op({todos:e,status:t="success"}){const n=e.filter(o=>o.status==="completed").length,r=e.length,i=e.find(o=>o.status==="in_progress");return m.jsxs("div",{className:"overflow-hidden rounded-sm border border-border/18 bg-muted/16 shadow-none",children:[m.jsxs("div",{className:"flex items-center gap-1.5 border-b border-border/18 px-2 py-1",children:[m.jsx(Dn,{status:t}),m.jsx("div",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:m.jsx(Cl,{className:"h-3 w-3"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:"Todos"}),m.jsx("div",{className:"mt-0.5 truncate text-[9px] leading-3 text-muted-foreground/78",children:i?i.activeForm:r===0?"No items":n===r?"All complete":"Up next"})]}),m.jsxs("div",{className:"shrink-0 rounded-sm border border-border/20 bg-background/36 px-1.5 py-0.5 font-mono text-[8px] tracking-wide text-muted-foreground/72",children:[n,"/",r]})]}),m.jsx("ul",{className:"divide-y divide-border/18",children:e.map((o,l)=>m.jsxs("li",{className:"flex items-start gap-1.5 px-2 py-1",children:[m.jsx(Rp,{status:o.status}),m.jsx("span",{className:o.status==="completed"?"text-[11px] leading-4 text-muted-foreground line-through decoration-muted-foreground/60":o.status==="in_progress"?"text-[11px] font-medium leading-4 text-foreground":"text-[11px] leading-4 text-foreground/85",children:o.status==="in_progress"?o.activeForm:o.content})]},`${l}-${o.content}`))})]})}function Rp({status:e}){return e==="completed"?m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-500 dark:text-emerald-400",children:m.jsx(Re,{className:"h-2.5 w-2.5"})}):e==="in_progress"?m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-primary",children:m.jsx(El,{className:"h-3 w-3 animate-spin"})}):m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground/60",children:m.jsx(Ur,{className:"h-2.5 w-2.5"})})}function hh({event:e,agent:t,subItems:n=[],questionBypassEnabled:r=!1,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l=!1}){const a=e.type,s=gn(e),u=at(e);if(s)return m.jsx(tt,{agent:t,children:m.jsx(Pp,{payload:s,onSubmit:o,disabled:l})});if(u)return m.jsx(tt,{agent:t,children:m.jsx(lt,{payload:u,bypassEnabled:r,onBypassChange:i,onSubmit:o,disabled:l})});if(a==="user"){if(e.isMeta===!0||e.isSidechain===!0)return null;const f=Bp(e),c=f.filter(p=>p.type==="tool_result");if(c.length>0&&f.every(p=>p.type==="tool_result"))return m.jsx(tt,{agent:t,children:c.map((p,x)=>m.jsx(Fn,{block:p,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l},x))});const h=Be(e);return h?m.jsx(Hp,{content:h}):null}return a==="assistant"?m.jsx(Vp,{event:e,agent:t,subItems:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l}):null}function Bp(e){const t=e.message,n=t==null?void 0:t.content;if(Array.isArray(n))return n.filter(i=>typeof i=="object"&&i!==null);const r=e.content;return Array.isArray(r)?r.filter(i=>typeof i=="object"&&i!==null):[]}function Xt(e){var n;const t=e.replace(/\r\n/g,`
|
|
78
|
+
`).split(`
|
|
79
|
+
`);for(;t.length>0&&((n=t[0])==null?void 0:n.trim())==="";)t.shift();return t.join(`
|
|
80
|
+
`)}function nl({text:e,tone:t="default",className:n=""}){const r=t==="inverted",i=r?"underline decoration-current/45 underline-offset-2 hover:decoration-current":"underline decoration-current/35 underline-offset-2 hover:decoration-current",o=r?"rounded-sm bg-black/15 px-1 py-0.5 font-mono text-[10px] text-primary-foreground":"rounded-sm bg-muted/80 px-1 py-0.5 font-mono text-[10px] text-foreground",l=r?"overflow-x-auto rounded-md border border-primary-foreground/12 bg-black/15 px-3 py-2 font-mono text-[10px] leading-4 text-primary-foreground":"overflow-x-auto rounded-md border border-border/45 bg-muted/50 px-3 py-2 font-mono text-[10px] leading-4 text-foreground",a=r?"w-full border-collapse text-left text-[11px] text-primary-foreground":"w-full border-collapse text-left text-[11px] text-foreground",s=r?"border border-primary-foreground/20 px-2 py-1 align-top":"border border-border/60 px-2 py-1 align-top",u=r?"border-l-2 border-primary-foreground/30 pl-3 italic text-primary-foreground/90":"border-l-2 border-border pl-3 italic text-muted-foreground";return m.jsx("div",{className:["max-w-none break-words text-[11px] leading-[17px] [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&>*+*]:mt-2 [&_li>p]:my-0",n].filter(Boolean).join(" "),children:m.jsx(dc,{remarkPlugins:[_p,Ac],components:{a:({node:f,...c})=>m.jsx("a",{...c,target:"_blank",rel:"noreferrer noopener",className:i}),blockquote:({node:f,...c})=>m.jsx("blockquote",{...c,className:u}),code:({node:f,className:c,children:h,...p})=>c?m.jsx("code",{...p,className:c,children:h}):m.jsx("code",{...p,className:o,children:h}),h1:({node:f,...c})=>m.jsx("h1",{...c,className:"text-[14px] font-semibold leading-5"}),h2:({node:f,...c})=>m.jsx("h2",{...c,className:"text-[13px] font-semibold leading-5"}),h3:({node:f,...c})=>m.jsx("h3",{...c,className:"text-[12px] font-semibold leading-5"}),h4:({node:f,...c})=>m.jsx("h4",{...c,className:"text-[11px] font-semibold leading-4"}),hr:({node:f,...c})=>m.jsx("hr",{...c,className:r?"border-primary-foreground/20":"border-border"}),img:({node:f,alt:c,src:h})=>h?m.jsx("a",{href:h,target:"_blank",rel:"noreferrer noopener",className:i,children:(c==null?void 0:c.trim())||h}):m.jsx("span",{children:(c==null?void 0:c.trim())||"Image"}),ol:({node:f,...c})=>m.jsx("ol",{...c,className:"list-decimal space-y-0.5 pl-5"}),p:({node:f,...c})=>m.jsx("p",{...c,className:"my-0"}),pre:({node:f,...c})=>m.jsx("pre",{...c,className:l}),table:({node:f,...c})=>m.jsx("table",{...c,className:a}),td:({node:f,...c})=>m.jsx("td",{...c,className:s}),th:({node:f,...c})=>m.jsx("th",{...c,className:`${s} font-semibold`}),ul:({node:f,...c})=>m.jsx("ul",{...c,className:"list-disc space-y-0.5 pl-5"})},children:e})})}function rl({text:e,className:t=""}){const[n,r]=ce.useState(!1);if(!e)return null;const i=async o=>{o.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1500)}catch{}};return m.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy message",className:`flex h-6 w-6 items-center justify-center rounded-sm border border-border/60 bg-background/86 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-all hover:-translate-y-px hover:text-foreground group-hover:opacity-100 focus-visible:opacity-100 ${t}`,children:n?m.jsx(Re,{className:"h-3 w-3 text-emerald-500"}):m.jsx($r,{className:"h-3 w-3"})})}async function $p(e){let n=await(await fetch(e)).blob();n.type!=="image/png"&&(n=await Up(n)),await navigator.clipboard.write([new ClipboardItem({[n.type]:n})])}async function Up(e){const t=await createImageBitmap(e),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");if(!r)throw new Error("canvas 2d context unavailable");return r.drawImage(t,0,0),await new Promise((i,o)=>{n.toBlob(l=>l?i(l):o(new Error("toBlob failed")),"image/png")})}function qp({dataUrl:e,className:t=""}){const[n,r]=ce.useState(!1),i=async o=>{o.stopPropagation();try{await $p(e),r(!0),setTimeout(()=>r(!1),1500)}catch(l){console.error("copy image failed",l)}};return m.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy image",className:`flex h-6 w-6 items-center justify-center rounded-sm border border-border/60 bg-background/86 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-all hover:-translate-y-px hover:text-foreground group-hover:opacity-100 focus-visible:opacity-100 ${t}`,children:n?m.jsx(Re,{className:"h-3 w-3 text-emerald-500"}):m.jsx($r,{className:"h-3 w-3"})})}function Hp({content:e}){const t=Ml(e),n=e.filter(r=>r.type==="image");return m.jsx("div",{className:"animate-message-rise flex w-full max-w-full min-w-0 justify-end",children:m.jsxs("div",{className:"group relative flex min-w-0 max-w-[88%] items-start gap-2",children:[m.jsx(rl,{text:t,className:"absolute -left-8 top-5"}),m.jsxs("div",{className:"flex min-w-0 max-w-full flex-col items-end gap-0.5",children:[m.jsx("div",{className:"pr-0.5 text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72",children:"You"}),m.jsxs("div",{className:"max-w-full space-y-1 overflow-hidden rounded-lg rounded-br-md bg-primary px-3 py-2 text-[11px] leading-[17px] text-primary-foreground shadow-[0_16px_52px_-38px_hsl(var(--primary)/0.9)]",children:[t&&m.jsx(nl,{text:t,tone:"inverted"}),n.length>0&&m.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:n.map((r,i)=>{const o=Fl(r);return m.jsxs("div",{className:"relative",children:[m.jsx("img",{src:o,alt:r.filename??`attachment ${i+1}`,className:"max-h-72 w-full rounded-2xl border border-primary-foreground/15 object-cover"}),m.jsx(qp,{dataUrl:o,className:"absolute right-2 top-2"})]},`${r.filename??"image"}-${i}`)})})]})]}),m.jsx("div",{className:"mt-4 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-primary/8 text-primary",children:m.jsx(_l,{className:"h-3.5 w-3.5"})})]})})}function tt({agent:e,children:t}){const n=e?Vr(e):"Agent";return m.jsx("div",{className:"animate-message-rise flex w-full max-w-full min-w-0 justify-start",children:m.jsxs("div",{className:"flex min-w-0 max-w-[92%] items-start gap-2",children:[m.jsx("div",{className:"mt-4 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-muted/45 text-muted-foreground/82",children:m.jsx(qr,{agent:e??"",className:"h-3.5 w-3.5"})}),m.jsxs("div",{className:"min-w-0 max-w-full space-y-1",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72","data-agent-speaker-label":n,children:n}),t]})]})})}function Vp({event:e,agent:t,subItems:n=[],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l}){const a=e.message;if(!a)return null;const s=at(a);if(s)return m.jsx(tt,{agent:t,children:m.jsx(lt,{payload:s,bypassEnabled:r,onBypassChange:i,onSubmit:o,disabled:l})});const u=a.content;if(!u||!Array.isArray(u))return null;const f=new Set,c=u.filter(S=>S.type==="text").map(S=>({...S,text:Xt(String(S.text??"")),questionPayload:st(Xt(String(S.text??"")))})).filter(S=>S.text.length>0||S.questionPayload),h=u.filter(S=>S.type==="thinking").map(S=>Xt(String(S.thinking??""))).filter(Boolean).join(`
|
|
81
|
+
|
|
82
|
+
`),p=u.filter(S=>S.type==="tool_use"),x=u.filter(S=>S.type==="tool_result"),b=c.length>0,v=b&&(h.length>0||p.length>0||x.length>0)?[{type:"assistant",message:{content:[...h.length>0?[{type:"thinking",thinking:h}]:[],...p,...x]}}]:[];return c.length>0||h.length>0||p.length>0||x.length>0||n.length>0?m.jsxs(tt,{agent:t,children:[c.map((S,E)=>{if(S.questionPayload){const z=$e(S.questionPayload);return f.has(z)?null:(f.add(z),m.jsx(lt,{payload:S.questionPayload,bypassEnabled:r,onBypassChange:i,onSubmit:o,disabled:l},E))}return m.jsxs("div",{className:"group relative max-w-full overflow-hidden rounded-lg rounded-bl-md bg-card/72 px-3 py-2 text-[11px] leading-[17px] text-foreground shadow-[0_14px_48px_-42px_rgba(15,23,42,0.65)] backdrop-blur-sm dark:bg-card/68 dark:shadow-[0_14px_48px_-42px_rgba(0,0,0,0.9)]",children:[m.jsx(rl,{text:S.text,className:"absolute right-2 top-2"}),m.jsx(nl,{text:S.text})]},E)}),(n.length>0||v.length>0)&&m.jsx(Mp,{events:[...v,...n],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l}),h.length>0&&!b&&m.jsx(el,{text:h}),!b&&p.map((S,E)=>m.jsx(tl,{block:S,renderedQuestionSignatures:f,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l},E)),!b&&x.map((S,E)=>m.jsx(Fn,{block:S,renderedQuestionSignatures:f,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:o,questionResponseDisabled:l},E))]}):null}function kt(e){return typeof e=="object"&&e!==null}function Wp(e){const t=e.message;return kt(t)&&Array.isArray(t.content)?t.content.filter(kt):Array.isArray(e.content)?e.content.filter(kt):[]}function Jp(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.filter(kt).map(n=>String(n.text??"")).join(`
|
|
83
|
+
`):""}function Yp(e){return at(e)?!0:e.type==="tool_result"&&st(Jp(e))!==null}function Xp(e){const t=Wp(e);return t.length===0||t.some(Yp)?!1:e.type==="assistant"?t.every(n=>n.type==="thinking"||n.type==="tool_use"||n.type==="tool_result"):e.type==="user"?t.every(n=>n.type==="tool_result"):!1}function mh(e){const t=[];let n=[];const r=()=>{var o;if(n.length===0)return;const i=typeof((o=n[0])==null?void 0:o.timestamp)=="string"?n[0].timestamp:void 0;t.push({event:{type:"assistant",message:{role:"assistant",content:[]},...i?{timestamp:i}:{}},subItems:n}),n=[]};for(const i of e){if(Xp(i)){n.push(i);continue}r(),t.push({event:i,subItems:[]})}return r(),t}function dh({label:e,value:t}){return m.jsxs("div",{className:"min-w-[4.75rem] flex-1 rounded-sm bg-background/58 px-2 py-1.5 shadow-sm",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:"mt-0.5 text-[12px] font-semibold leading-4 tracking-tight text-foreground",children:t})]})}function gh({label:e}){return m.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-muted-foreground",children:e})}function xh({label:e,value:t,mono:n,action:r}){return m.jsxs("div",{className:"grid grid-cols-[3.75rem,minmax(0,1fr)] items-start gap-1.5",children:[m.jsx("span",{className:"pt-px text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground",children:e}),m.jsxs("div",{className:"flex min-w-0 items-start gap-1",children:[m.jsx("span",{className:wt("min-w-0 flex-1 break-all text-[10px] leading-4 text-foreground",n&&"font-mono text-[10px]"),children:t}),r]})]})}function yh({label:e,value:t,mono:n}){return m.jsxs("div",{className:"rounded-sm bg-background/62 px-2 py-1.5 shadow-sm",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:wt("mt-0.5 text-[10px] font-medium leading-4 text-foreground",n&&"font-mono"),children:t})]})}function kh({capabilities:e,action:t}){return m.jsxs("div",{className:"flex flex-col gap-1.5 sm:flex-row sm:items-start sm:justify-between sm:gap-2",children:[m.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:"Capabilities"}),m.jsx("div",{className:"flex flex-wrap items-center gap-1 text-[10px]",children:e.length>0?e.map(n=>m.jsx(gl,{variant:"secondary",className:"rounded-sm px-1.5 py-0 text-[9px] leading-4",children:n},n)):m.jsx("span",{className:"text-[10px] text-muted-foreground",children:"None declared"})})]}),t&&m.jsx("div",{className:"shrink-0 self-start",children:t})]})}export{qr as A,hh as C,dh as D,xh as I,El as L,yh as M,gh as T,ch as a,Kp as b,ph as c,uh as d,eh as e,fh as f,Vr as g,mh as h,nh as i,kh as j,lh as k,ih as l,rh as m,Be as n,oh as o,sh as p,Zp as q,th as r,Qp as s,Fl as t,xt as u,ah as v,dc as w};
|