meshy-node 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{c as be,j as m,E as Fl,aq as Ml,d as $e,G as Ol,H as Rl,ar as Bl,Y as $l,b$ as Kr,T as Zr,n as _t,c0 as Ul,c1 as Hl,c2 as ql,c3 as ei,r as fe,B as At,C as He,X as ti,U as Vl,x as Wl,L as Gl,K as ni}from"./index-AIObDwXI.js";/**
1
+ import{c as be,j as m,V as Fl,ax as Ml,n as $e,W as Ol,Y as Rl,ay as Bl,a5 as $l,c6 as Kr,T as Zr,y as Pt,c7 as Ul,c8 as Hl,c9 as ql,ca as ei,r as fe,B as At,C as He,X as ti,a2 as Vl,N as Wl,L as Gl,_ as ni}from"./index-Cw9E6sQy.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -45,22 +45,22 @@ import{c as be,j as m,E as Fl,aq as Ml,d as $e,G as Ol,H as Rl,ar as Bl,Y as $l,
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */const uo=[["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"}]],bn=be("wrench",uo);function Et(e){return typeof e=="object"&&e!==null}function co(e){if(!Et(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 fo(e){if(!Et(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"||!Et(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 wt(e){if(typeof e=="string"){const t=e.trim();return t?[{type:"text",text:t}]:[]}return Array.isArray(e)?e.map(t=>co(t)??fo(t)).filter(t=>t!==null):[]}function Vh(e,t){const n=e.trim();return[...n?[{type:"text",text:n}]:[],...t]}function po(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 Wh(e,t=new Date().toISOString()){return{type:"user",message:po(e),timestamp:t}}function qe(e){if(e.type!=="user"||e.isSynthetic===!0)return null;if(typeof e.message=="string"){const t=wt(e.message);return t.length>0?t:null}if(Et(e.message)&&Array.isArray(e.message.content)){const t=wt(e.message.content);return t.length>0?t:null}if(Array.isArray(e.content)){const t=wt(e.content);return t.length>0?t:null}return null}function Gh(e){return wt(e.payload.initialMessage)}function Ae(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 ho(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool_result"?t.content:"").filter(Boolean).join(`
47
47
  `)}function ii(e){return`data:${e.mediaType};base64,${e.data}`}function Jh(e){if(!e)return[];const t=[],n=e.items;if(n)for(const i of Array.from(n)){if(i?.kind!=="file"||!i.type?.startsWith("image/"))continue;const l=i.getAsFile?.();l&&l.type.startsWith("image/")&&t.push(l)}if(t.length>0)return t;const r=e.files;return r?Array.from(r).filter(i=>i.type.startsWith("image/")):[]}function mo(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 Yh(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 mo(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 ct(e){return typeof e=="object"&&e!==null}function go(e){return ct(e)&&typeof e.name=="string"&&e.name.toLowerCase()==="askuserquestion"}function xo(e){return!ct(e)||typeof e.label!="string"||!e.label.trim()?null:{label:e.label.trim(),description:typeof e.description=="string"?e.description.trim():""}}function yo(e){if(!ct(e)||typeof e.question!="string"||!e.question.trim())return null;const t=Array.isArray(e.options)?e.options.map(xo).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 rn(e){if(!ct(e)||!Array.isArray(e.questions))return null;const t=e.questions.map(yo).filter(n=>n!==null);return t.length===0?null:{questions:t}}function Ve(e){return JSON.stringify({questions:e.questions})}function ft(e){const t=rn(e);if(t)return t;if(go(e)){const n=ct(e.input)?e.input:void 0,r=rn(n);return r?{...r,...typeof e.id=="string"&&e.id.trim()?{toolUseId:e.id.trim()}:{}}:null}return null}function ko(e){const t=e.trim();if(!t)return[];const n=[t],r=t.matchAll(/```(?:json)?\s*([\s\S]*?)```/gi);for(const i of r){const l=i[1]?.trim();l&&n.push(l)}return n}function pt(e){for(const t of ko(e))try{const n=JSON.parse(t),r=rn(n);if(r)return r}catch{}return null}function bo(e){return e.questions.map(t=>t.options.length>0?[0]:[])}function wo(e,t){return e.questions.every((n,r)=>(t[r]??[]).length>0)}function So(e,t){const r=e.questions.map((i,l)=>{const o=[...new Set(t[l]??[])].sort((s,a)=>s-a).filter(s=>i.options[s]!==void 0);return{header:i.header??null,question:i.question,multiSelect:i.multiSelect,selectedOptions:o.map(s=>i.options[s]).filter(s=>s!==void 0)}}).map(i=>{const l=i.header??i.question,o=i.selectedOptions.map(s=>s.label).join(i.multiSelect?", ":"");return`${l}: ${o}`}).join(`
48
- `);return e.toolUseId?[{type:"tool_result",toolUseId:e.toolUseId,content:r,isError:!1}]:[{type:"text",text:r}]}function ot(e){return typeof e=="object"&&e!==null}function Co(e){return e?["file_path","path","command"].map(n=>e[n]).find(n=>typeof n=="string"&&n.trim().length>0)?.trim():void 0}function vo(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 ln(e){const t=e.trim();if(!t.startsWith("Awaiting your permission to "))return null;const n=t.match(/`([^`]+)`/);return{requests:[{toolName:vo(t),target:n?.[1],summary:t}]}}function Ao(e){if(!Array.isArray(e.permission_denials))return null;const t=[];for(const n of e.permission_denials){if(!ot(n)||typeof n.tool_name!="string")continue;const r=ot(n.tool_input)?n.tool_input:void 0,i=Co(r),l=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:l})}return t.length>0?{requests:t}:null}function ir(e){if(!Array.isArray(e))return null;for(const t of e){if(!ot(t)||t.type!=="text"||typeof t.text!="string")continue;const n=ln(t.text);if(n)return n}return null}function wn(e){if(!ot(e))return null;const t=Ao(e);if(t)return t;if(typeof e.result=="string"){const r=ln(e.result);if(r)return r}if(typeof e.message=="string"){const r=ln(e.message);if(r)return r}if(ot(e.message)){const r=wn(e.message);if(r)return r;const i=ir(e.message.content);if(i)return i}const n=ir(e.content);return n||null}function Eo(e){return JSON.stringify(e.requests.map(t=>({toolName:t.toolName,target:t.target??null,summary:t.summary})))}function To(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 jo(e){return qe(e)!==null}function Ee(e){return typeof e=="object"&&e!==null}function lr(e){if(e.type==="user"){const t=qe(e),n=typeof e.timestamp=="string"?e.timestamp:"";if(t)return`user:${n}:${Ae(t)}`}return JSON.stringify(e)}function Pe(e){return Array.isArray(e)?e.map(t=>Pe(t)):Ee(e)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,Pe(n)])):e}function Io(e,t){return e.length!==t.length?!1:e.every((n,r)=>JSON.stringify(Pe(n))===JSON.stringify(Pe(t[r])))}function on(e){const t=qe(e);if(t)return`user:${Ae(t)}`;if(e.type==="assistant"){if(typeof e.message=="string")return`assistant:${JSON.stringify(e.message)}`;if(Ee(e.message)&&"content"in e.message)return`assistant:${JSON.stringify(Pe(e.message.content))}`;if(Array.isArray(e.content))return`assistant:${JSON.stringify(Pe(e.content))}`;if(Ee(e.message))return`assistant:${JSON.stringify(Pe(e.message))}`}return JSON.stringify(e)}function ce(e,t){const n=e[t];return typeof n=="string"&&n.trim()?n.trim():null}function No(e){const t=e.message;let n=[];Ee(t)&&Array.isArray(t.content)?n=t.content:Array.isArray(e.content)&&(n=e.content);const r=n.filter(Ee).map(i=>{const l=typeof i.type=="string"?i.type:"block",o=ce(i,"id")??ce(i,"tool_use_id")??ce(i,"toolUseId");return o?`${l}:${o}`:l});return r.length>0?r.join(","):typeof e.message=="string"?"message":"event"}function Po(e){const t=ce(e,"id")??ce(e,"uuid")??ce(e,"eventId")??ce(e,"messageId");if(t)return`id:${t}`;const n=ce(e,"timestamp");if(!n)return on(e);const r=ce(e,"type")??"event",i=ce(e,"subtype"),l=Ee(e.message)?e.message:null,o=l?ce(l,"role"):null,s=No(e);return[r,i,n,o,s].filter(Boolean).join(":")}function _o(e){if(e.type!=="assistant"||!Ee(e.message))return null;const t=e.message.content;if(!Array.isArray(t)||t.length===0)return null;const n=[];let r;for(const o of t){if(!Ee(o)||o.type!=="text"&&o.type!=="commentary"||typeof o.text!="string")return null;n.push(o.text.trim()),typeof o.phase=="string"&&(r=o.phase)}const i=n.filter(Boolean).join(`
49
- `).trim();if(!i)return null;let l=0;return r==="final_answer"?l=2:typeof r=="string"&&(l=1),{key:`assistant:${i}`,rank:l}}function zo(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 or(e){if(typeof e.timestamp!="string")return null;const t=Date.parse(e.timestamp);return Number.isNaN(t)?null:t}function sn(e){const t=ft(e);return t?`question:${Ve(t)}`:null}function Lo(e){const t=wn(e);return t?`permission:${Eo(t)}`:null}function sr(e){if(!Array.isArray(e))return null;const t=new Set;for(const n of e){const r=sn(n);if(r){t.add(r);continue}if(typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"){const i=pt(n.text);i&&t.add(Ve(i))}}return t.size===0?null:Array.from(t).sort().join("|")}function Do(e){const t=sn(e);if(t)return t;if(typeof e.message=="string"){const n=pt(e.message);return n?Ve(n):null}if(typeof e.message=="object"&&e.message!==null){const n=sn(e.message);return n||sr(e.message.content)}return sr(e.content)}function Fo(e){return Lo(e)}function Xh(e,t){const n=new Map;return t.map(r=>{const i=Po(r),l=n.get(i)??0;return n.set(i,l+1),`${e}-${zo(i)}-${l}`})}function Qh(e,t){const n=new Map;for(const l of t){const o=on(l);n.set(o,(n.get(o)??0)+1)}const r=[];for(let l=e.length-1;l>=0;l-=1){const o=e[l];if(!o)continue;const s=on(o),a=n.get(s)??0;if(a>0){n.set(s,a-1);continue}r.push({...o})}const i=[...r.reverse(),...t.map(l=>({...l}))].map((l,o)=>({event:l,order:o})).sort((l,o)=>{const s=or(l.event),a=or(o.event);return s!==null&&a!==null&&s!==a?s-a:l.order-o.order}).map(l=>l.event);return Io(e,i)?e:i}function Kh(e,t){const n=lr(t);return e.some(r=>lr(r)===n)?e:[...e,{...t}]}function Zh(e,t){const n=new Map;for(const r of t){const i=qe(r);if(!i)continue;const l=Ae(i);n.set(l,(n.get(l)??0)+1)}return e.filter(r=>{const i=Ae(r.content),l=n.get(i)??0;return l<=0?!0:(n.set(i,l-1),!1)})}function em(e,t){const n=Ae(t),r=e.findIndex(i=>Ae(i.content)===n);return r===-1?e:e.filter((i,l)=>l!==r)}function tm(e,t){const n=Ae(t);return e.some(r=>{const i=qe(r);return i!==null&&Ae(i)===n})}function nm(e){const t=[];let n=null;const r=new Map;for(const i of e){if(jo(i)){n=null,r.clear(),t.push(i);continue}const l=_o(i);if(l){const s=r.get(l.key);if(s){l.rank>s.rank&&(t[s.index]=i,r.set(l.key,{...s,rank:l.rank}));continue}r.set(l.key,{index:t.length,rank:l.rank})}const o=Fo(i)??Do(i);o&&o===n||(t.push(i),o&&(n=o))}return t}function Mo({image:e,alt:t,thumbnailClassName:n,imageClassName:r}){const i=ii(e),l=e.filename?.trim()||t;return m.jsxs(Fl,{children:[m.jsx(Ml,{asChild:!0,children:m.jsx("button",{type:"button",className:$e("block max-w-full cursor-zoom-in overflow-hidden rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/55 focus-visible:ring-offset-2 focus-visible:ring-offset-background",n),title:`View ${l}`,"aria-label":`View ${l}`,children:m.jsx("img",{src:i,alt:t,className:$e("block max-w-full object-cover",r)})})}),m.jsxs(Ol,{className:"w-[92vw] max-w-[72rem] gap-2 border-border/70 bg-background/96 p-2 sm:p-3",children:[m.jsx(Rl,{className:"sr-only",children:l}),m.jsx(Bl,{className:"sr-only",children:"Full-size image preview"}),m.jsx("div",{className:"flex max-h-[82vh] min-h-0 items-center justify-center overflow-hidden rounded-sm bg-muted/25",children:m.jsx("img",{src:i,alt:t,className:"max-h-[82vh] max-w-full object-contain"})}),e.filename&&m.jsx("div",{className:"truncate px-1 text-[10px] leading-4 text-muted-foreground",title:e.filename,children:e.filename})]})]})}const li=["GPT","Anthropic","Google"],Oo=[{value:"gpt-5.4-mini",label:"GPT-5.4 Mini",provider:"GPT",status:"GA"},{value:"gpt-5.4",label:"GPT-5.4",provider:"GPT",status:"GA"},{value:"gpt-5.5",label:"GPT-5.5",provider:"GPT",status:"GA"},{value:"claude-opus-4-6[1m]",label:"Claude Opus 4.6 1M",provider:"Anthropic",status:"GA",agents:["claudecode"]},{value:"claude-opus-4-7[1m]",label:"Claude Opus 4.7 1M",provider:"Anthropic",status:"GA",agents:["claudecode"]},{value:"claude-opus-4-8[1m]",label:"Claude Opus 4.8 1M",provider:"Anthropic",status:"GA",agents:["claudecode"]},{value:"claude-opus-4.6",label:"Claude Opus 4.6",provider:"Anthropic",status:"GA",agents:["copilot"]},{value:"claude-opus-4.7",label:"Claude Opus 4.7",provider:"Anthropic",status:"GA",agents:["copilot"]},{value:"claude-opus-4.8",label:"Claude Opus 4.8",provider:"Anthropic",status:"GA",agents:["copilot"]},{value:"claude-sonnet-4.6",label:"Claude Sonnet 4.6",provider:"Anthropic",status:"GA",agents:["copilot"]},{value:"gemini-3.1-pro-preview",label:"Gemini 3.1 Pro Preview",provider:"Google",status:"Public preview"},{value:"gemini-3.5-flash",label:"Gemini 3.5 Flash",provider:"Google",status:"GA"}];function Ro(e){return e==="codex"?new Set(["GPT"]):e==="claudecode"?new Set(["Anthropic"]):e==="copilot"?new Set(li):new Set}function Sn(e){const t=Ro(e);return li.map(n=>({provider:n,models:Oo.filter(r=>r.provider===n&&t.has(r.provider)&&(!r.agents||r.agents.includes(e)))})).filter(n=>n.models.length>0)}function rm(e,t){return Sn(e).some(n=>n.models.some(r=>r.value===t))}function im(e,t){if(!t)return"Default";for(const n of Sn(e)){const r=n.models.find(i=>i.value===t);if(r)return r.label}return t}const Bo=["codex","claudecode","copilot"];function oi({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($l,{className:n,"data-agent-icon":"generic","aria-hidden":"true"})}function si({value:e,label:t,description:n}){return m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx(oi,{agent:e}),m.jsx("span",{children:t}),n&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:n})]})}function lm(){return Kr.map(e=>m.jsx(_t,{value:e.value,disabled:e.disabled,children:m.jsx(si,{value:e.value,label:e.label,description:e.description})},e.value))}function om(){return Bo.map(e=>m.jsx(_t,{value:e,children:m.jsx(si,{value:e,label:ai(e)})},e))}function sm(){return Zr.map(e=>m.jsx(_t,{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 am(e){return Sn(e).flatMap((n,r)=>[r>0?m.jsx(Ul,{},`${n.provider}-separator`):null,m.jsxs(Hl,{children:[m.jsx(ql,{className:"pl-2 pr-2 text-[9px] uppercase tracking-[0.18em] text-muted-foreground",children:n.provider}),n.models.map(i=>m.jsx(_t,{value:i.value,textValue:i.label,className:"py-1 pl-6 pr-2 text-[11px]",children:m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{className:"truncate",children:i.label}),i.status==="Public preview"&&m.jsx("span",{className:"shrink-0 text-[9px] uppercase tracking-[0.16em] text-amber-500",children:"preview"})]})},i.value))]},n.provider)])}function ai(e){return Kr.find(t=>t.value===e)?.label??e}function um(e){return Zr.find(t=>t.value===e)?.label??e}function cm(){}function fm(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=n.length,l=!0);const o=n.slice(i,r).trim();(o||!l)&&t.push(o),i=r+1,r=n.indexOf(",",i)}return t}function $o(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Uo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ho=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qo={};function ar(e,t){return(qo.jsx?Ho:Uo).test(e)}const Vo=/[ \t\n\f\r]/g;function Wo(e){return typeof e=="object"?e.type==="text"?ur(e.value):!1:ur(e)}function ur(e){return e.replace(Vo,"")===""}class ht{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ht.prototype.normal={};ht.prototype.property={};ht.prototype.space=void 0;function ui(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ht(n,r,t)}function an(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 Go=0;const M=ze(),J=ze(),un=ze(),E=ze(),G=ze(),Be=ze(),re=ze();function ze(){return 2**++Go}const cn=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:J,commaOrSpaceSeparated:re,commaSeparated:Be,number:E,overloadedBoolean:un,spaceSeparated:G},Symbol.toStringTag,{value:"Module"})),Rt=Object.keys(cn);class Cn extends te{constructor(t,n,r,i){let l=-1;if(super(t,n),cr(this,"space",i),typeof r=="number")for(;++l<Rt.length;){const o=Rt[l];cr(this,Rt[l],(r&cn[o])===cn[o])}}}Cn.prototype.defined=!0;function cr(e,t,n){n&&(e[t]=n)}function We(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Cn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[an(r)]=r,n[an(l.attribute)]=r}return new ht(t,n,e.space)}const ci=We({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:J,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:G,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:E,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:G,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:J,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function fi(e,t){return t in e?e[t]:t}function pi(e,t){return fi(e,t.toLowerCase())}const Jo=We({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Be,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:G,autoFocus:M,autoPlay:M,blocking:G,capture:null,charSet:null,checked:M,cite:null,className:G,cols:E,colSpan:null,content:null,contentEditable:J,controls:M,controlsList:G,coords:E|Be,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:un,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:G,height:E,hidden:un,high:E,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:G,itemRef:G,itemScope:M,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,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:E,pattern:null,ping:G,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:G,required:M,reversed:M,rows:E,rowSpan:E,sandbox:G,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:J,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,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:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:M,disableRemotePlayback:M,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:pi}),Yo=We({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:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:G,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:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,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:Be,g2:Be,glyphName:Be,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,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:E,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:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,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:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,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:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fi}),hi=We({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()}}),mi=We({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pi}),di=We({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Xo={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"},Qo=/[A-Z]/g,fr=/-[a-z]/g,Ko=/^data[-\w.:]+$/i;function Zo(e,t){const n=an(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"&&Ko.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(fr,ts);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!fr.test(l)){let o=l.replace(Qo,es);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Cn}return new i(r,t)}function es(e){return"-"+e.toLowerCase()}function ts(e){return e.charAt(1).toUpperCase()}const ns=ui([ci,Jo,hi,mi,di],"html"),vn=ui([ci,Yo,hi,mi,di],"svg");function pm(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function rs(e){return e.join(" ").trim()}var Me={},Bt,pr;function is(){if(pr)return Bt;pr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,a=`
50
- `,u="/",f="*",c="",h="comment",p="declaration";function d(w,y){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];y=y||{};var A=1,v=1;function _(L){var j=L.match(t);j&&(A+=j.length);var q=L.lastIndexOf(a);v=~q?L.length-q:v+L.length}function D(){var L={line:A,column:v};return function(j){return j.position=new C(L),B(),j}}function C(L){this.start=L,this.end={line:A,column:v},this.source=y.source}C.prototype.content=w;function I(L){var j=new Error(y.source+":"+A+":"+v+": "+L);if(j.reason=L,j.filename=y.source,j.line=A,j.column=v,j.source=w,!y.silent)throw j}function O(L){var j=L.exec(w);if(j){var q=j[0];return _(q),w=w.slice(q.length),j}}function B(){O(n)}function b(L){var j;for(L=L||[];j=N();)j!==!1&&L.push(j);return L}function N(){var L=D();if(!(u!=w.charAt(0)||f!=w.charAt(1))){for(var j=2;c!=w.charAt(j)&&(f!=w.charAt(j)||u!=w.charAt(j+1));)++j;if(j+=2,c===w.charAt(j-1))return I("End of comment missing");var q=w.slice(2,j-2);return v+=2,_(q),w=w.slice(j),v+=2,L({type:h,comment:q})}}function P(){var L=D(),j=O(r);if(j){if(N(),!O(i))return I("property missing ':'");var q=O(l),Y=L({type:p,property:k(j[0].replace(e,c)),value:q?k(q[0].replace(e,c)):c});return O(o),Y}}function H(){var L=[];b(L);for(var j;j=P();)j!==!1&&(L.push(j),b(L));return L}return B(),H()}function k(w){return w?w.replace(s,c):c}return Bt=d,Bt}var hr;function ls(){if(hr)return Me;hr=1;var e=Me&&Me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Me,"__esModule",{value:!0}),Me.default=n;const t=e(is());function n(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,t.default)(r),s=typeof i=="function";return o.forEach(a=>{if(a.type!=="declaration")return;const{property:u,value:f}=a;s?i(u,f,a):f&&(l=l||{},l[u]=f)}),l}return Me}var Qe={},mr;function os(){if(mr)return Qe;mr=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},o=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},a=function(u,f){return f===void 0&&(f={}),l(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(t,o))};return Qe.camelCase=a,Qe}var Ke,dr;function ss(){if(dr)return Ke;dr=1;var e=Ke&&Ke.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ls()),n=os();function r(i,l){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,a){s&&a&&(o[(0,n.camelCase)(s,l)]=a)}),o}return r.default=r,Ke=r,Ke}var as=ss();const us=ei(as),gi=xi("end"),An=xi("start");function xi(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 cs(e){const t=An(e),n=gi(e);if(t&&n)return{start:t,end:n}}function nt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gr(e.position):"start"in e||"end"in e?gr(e):"line"in e||"column"in e?fn(e):""}function fn(e){return xr(e&&e.line)+":"+xr(e&&e.column)}function gr(e){return fn(e&&e.start)+"-"+fn(e&&e.end)}function xr(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=nt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const En={}.hasOwnProperty,fs=new Map,ps=/[A-Z]/g,hs=new Set(["table","tbody","thead","tfoot","tr"]),ms=new Set(["td","th"]),yi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ds(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=Cs(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=Ss(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"?vn:ns,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=ki(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function ki(e,t,n){if(t.type==="element")return gs(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xs(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ks(e,t,n);if(t.type==="mdxjsEsm")return ys(e,t);if(t.type==="root")return bs(e,t,n);if(t.type==="text")return ws(e,t)}function gs(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=vn,e.schema=i),e.ancestors.push(t);const l=wi(e,t.tagName,!1),o=vs(e,t);let s=jn(e,t);return hs.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!Wo(a):!0})),bi(e,o,l,t),Tn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function xs(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)}st(e,t.position)}function ys(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);st(e,t.position)}function ks(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=vn,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:wi(e,t.name,!0),o=As(e,t),s=jn(e,t);return bi(e,o,l,t),Tn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function bs(e,t,n){const r={};return Tn(r,jn(e,t)),e.create(t,e.Fragment,r,n)}function ws(e,t){return t.value}function bi(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Tn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ss(e,t,n){return r;function r(i,l,o,s){const u=Array.isArray(o.children)?n:t;return s?u(l,o,s):u(l,o)}}function Cs(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=An(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function vs(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&En.call(t.properties,i)){const l=Es(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&ms.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function As(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else st(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else st(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function jn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:fs;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;o=a+"-"+u,i.set(a,u+1)}}const s=ki(e,l,o);s!==void 0&&n.push(s)}return n}function Es(e,t,n){const r=Zo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?$o(n):rs(n)),r.property==="style"){let i=typeof n=="object"?n:Ts(e,String(n));return e.stylePropertyNameCase==="css"&&(i=js(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Xo[r.property]||r.property:r.attribute,n]}}function Ts(e,t){try{return us(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new K("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=yi+"#cannot-parse-style-attribute",i}}function wi(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=ar(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=ar(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return En.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);st(e)}function st(e,t){const n=new K("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=yi+"#cannot-handle-mdx-estrees-without-createevaluater",n}function js(e){const t={};let n;for(n in e)En.call(e,n)&&(t[Is(n)]=e[n]);return t}function Is(e){let t=e.replace(ps,Ns);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ns(e){return"-"+e.toLowerCase()}const $t={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"]},Ps={};function In(e,t){const n=Ps,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Si(e,r,i)}function Si(e,t,n){if(_s(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 yr(e.children,t,n)}return Array.isArray(e)?yr(e,t,n):""}function yr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Si(e[i],t,n);return r.join("")}function _s(e){return!!(e&&typeof e=="object")}const kr=document.createElement("i");function Nn(e){const t="&"+e+";";kr.innerHTML=t;const n=kr.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 l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const br={}.hasOwnProperty;function Ci(e){const t={};let n=-1;for(;++n<e.length;)zs(t,e[n]);return t}function zs(e,t){let n;for(n in t){const i=(br.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){br.call(i,o)||(i[o]=[]);const s=l[o];Ls(i[o],Array.isArray(s)?s:s?[s]:[])}}}function Ls(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 vi(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 pe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Z=Te(/[A-Za-z]/),Q=Te(/[\dA-Za-z]/),Ds=Te(/[#-'*+\--9=?A-Z^-~]/);function Tt(e){return e!==null&&(e<32||e===127)}const pn=Te(/\d/),Fs=Te(/[\dA-Fa-f]/),Ms=Te(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}const zt=Te(/\p{P}|\p{S}/u),_e=Te(/\s/);function Te(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ge(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&Q(e.charCodeAt(n+1))&&Q(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function U(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(a){return R(a)?(e.enter(n),s(a)):t(a)}function s(a){return R(a)&&l++<i?(e.consume(a),s):(e.exit(n),t(a))}}const Os={tokenize:Rs};function Rs(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return z(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}const Bs={tokenize:$s},wr={tokenize:Us};function $s(e){const t=this,n=[];let r=0,i,l,o;return s;function s(v){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,a,u)(v)}return u(v)}function a(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const _=t.events.length;let D=_,C;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){C=t.events[D][1].end;break}y(r);let I=_;for(;I<t.events.length;)t.events[I][1].end={...C},I++;return ie(t.events,D+1,0,t.events.slice(_)),t.events.length=I,u(v)}return s(v)}function u(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return d(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(wr,f,c)(v)}function f(v){return i&&A(),y(r),h(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,d(v)}function h(v){return t.containerState={},e.attempt(wr,p,d)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function d(v){if(v===null){i&&A(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(v)}function k(v){if(v===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return z(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(v),k)}function w(v,_){const D=t.sliceStream(v);if(_&&D.push(null),v.previous=l,l&&(l.next=v),l=v,i.defineSkip(v.start),i.write(D),t.parser.lazy[v.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<o&&(!i.events[C][1].end||i.events[C][1].end.offset>o))return;const I=t.events.length;let O=I,B,b;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(B){b=t.events[O][1].end;break}B=!0}for(y(r),C=I;C<t.events.length;)t.events[C][1].end={...b},C++;ie(t.events,O+1,0,t.events.slice(I)),t.events.length=C}}function y(v){let _=n.length;for(;_-- >v;){const D=n[_];t.containerState=D[1],D[0].exit.call(t,e)}n.length=v}function A(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Us(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||W(e)||_e(e))return 1;if(zt(e))return 2}function Lt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const hn={name:"attention",resolveAll:Hs,tokenize:qs};function Hs(e,t){let n=-1,r,i,l,o,s,a,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;a=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,-a),Sr(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.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",o,t],["exit",o,t],["enter",l,t]]),u=le(u,Lt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=le(u,[["exit",l,t],["enter",s,t],["exit",s,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 qs(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ue(r);let l;return o;function o(a){return l=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===l)return e.consume(a),s;const u=e.exit("attentionSequence"),f=Ue(a),c=!f||f===2&&i||n.includes(a),h=!i||i===2&&f||n.includes(r);return u._open=!!(l===42?c:c&&(i||!h)),u._close=!!(l===42?h:h&&(f||!c)),t(a)}}function Sr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Vs={name:"autolink",tokenize:Ws};function Ws(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"),l}function l(p){return Z(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||Q(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||Q(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function a(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||Tt(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),f):Ds(p)?(e.consume(p),u):n(p)}function f(p){return Q(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||Q(p))&&r++<63){const d=p===45?h:c;return e.consume(p),d}return n(p)}}const mt={partial:!0,tokenize:Gs};function Gs(e,t,n){return r;function r(l){return R(l)?U(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||z(l)?t(l):n(l)}}const Ai={continuation:{tokenize:Ys},exit:Xs,name:"blockQuote",tokenize:Js};function Js(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return R(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Ys(e,t,n){const r=this;return i;function i(o){return R(o)?U(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Ai,t,n)(o)}}function Xs(e){e.exit("blockQuote")}const Ei={name:"characterEscape",tokenize:Qs};function Qs(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Ms(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Ti={name:"characterReference",tokenize:Ks};function Ks(e,t,n){const r=this;let i=0,l,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a}function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=Q,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Fs,f):(e.enter("characterReferenceValue"),l=7,o=pn,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return o===Q&&!Nn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),f):n(c)}}const Cr={partial:!0,tokenize:ea},vr={concrete:!0,name:"codeFenced",tokenize:Zs};function Zs(e,t,n){const r=this,i={partial:!0,tokenize:D};let l=0,o=0,s;return a;function a(C){return u(C)}function u(C){const I=r.events[r.events.length-1];return l=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===s?(o++,e.consume(C),f):o<3?n(C):(e.exit("codeFencedFenceSequence"),R(C)?U(e,c,"whitespace")(C):c(C))}function c(C){return C===null||z(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(Cr,k,_)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||z(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):R(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),h)}function p(C){return C===null||z(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(C))}function d(C){return C===null||z(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===s?n(C):(e.consume(C),d)}function k(C){return e.attempt(i,_,w)(C)}function w(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return l>0&&R(C)?U(e,A,"linePrefix",l+1)(C):A(C)}function A(C){return C===null||z(C)?e.check(Cr,k,_)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||z(C)?(e.exit("codeFlowValue"),A(C)):(e.consume(C),v)}function _(C){return e.exit("codeFenced"),t(C)}function D(C,I,O){let B=0;return b;function b(j){return C.enter("lineEnding"),C.consume(j),C.exit("lineEnding"),N}function N(j){return C.enter("codeFencedFence"),R(j)?U(C,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):P(j)}function P(j){return j===s?(C.enter("codeFencedFenceSequence"),H(j)):O(j)}function H(j){return j===s?(B++,C.consume(j),H):B>=o?(C.exit("codeFencedFenceSequence"),R(j)?U(C,L,"whitespace")(j):L(j)):O(j)}function L(j){return j===null||z(j)?(C.exit("codeFencedFence"),I(j)):O(j)}}}function ea(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Ut={name:"codeIndented",tokenize:na},ta={partial:!0,tokenize:ra};function na(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),U(e,l,"linePrefix",5)(u)}function l(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?a(u):z(u)?e.attempt(ta,o,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||z(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function ra(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):U(e,l,"linePrefix",5)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):z(o)?i(o):n(o)}}const ia={name:"codeText",previous:oa,resolve:la,tokenize:sa};function la(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 oa(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sa(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):z(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||z(c)?(e.exit("codeTextData"),a(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)):(l.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 l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ze(this.left,r),l.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),Ze(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ze(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);Ze(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ze(this.left,n.reverse())}}}function Ze(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 ji(e){const t={};let n=-1,r,i,l,o,s,a,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"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ua(f,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function ua(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,a=[],u={};let f,c,h=-1,p=n,d=0,k=0;const w=[k];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(k=h+1,w.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const y=s.slice(w[h],w[h+1]),A=l.pop();a.push([A,A+y.length-1]),e.splice(A,2,y)}for(a.reverse(),h=-1;++h<a.length;)u[d+a[h][0]]=d+a[h][1],d+=a[h][1]-a[h][0]-1;return u}const ca={resolve:pa,tokenize:ha},fa={partial:!0,tokenize:ma};function pa(e){return ji(e),e}function ha(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):z(s)?e.check(fa,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ma(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),U(e,l,"linePrefix")}function l(o){if(o===null||z(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Ii(e,t,n,r,i,l,o,s,a){const u=a||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(y),e.exit(l),h):y===null||y===32||y===41||Tt(y)?n(y):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),k(y))}function h(y){return y===62?(e.enter(l),e.consume(y),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(s),h(y)):y===null||y===60||z(y)?n(y):(e.consume(y),y===92?d:p)}function d(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function k(y){return!f&&(y===null||y===41||W(y))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,k):y===41?(e.consume(y),f--,k):y===null||y===32||y===40||Tt(y)?n(y):(e.consume(y),y===92?w:k)}function w(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function Ni(e,t,n,r,i,l){const o=this;let s=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):z(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||z(p)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),a||(a=!R(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function Pi(e,t,n,r,i,l){let o;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,a):n(h)}function a(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),a(o)):h===null?n(h):z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),U(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||z(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===o||h===92?(e.consume(h),f):f(h)}}function rt(e,t){let n;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):R(i)?U(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const da={name:"definition",tokenize:xa},ga={partial:!0,tokenize:ya};function xa(e,t,n){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return Ni.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return W(p)?rt(e,u)(p):u(p)}function u(p){return Ii(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(ga,c,c)(p)}function c(p){return R(p)?U(e,h,"whitespace")(p):h(p)}function h(p){return p===null||z(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function ya(e,t,n){return r;function r(s){return W(s)?rt(e,i)(s):n(s)}function i(s){return Pi(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return R(s)?U(e,o,"whitespace")(s):o(s)}function o(s){return s===null||z(s)?t(s):n(s)}}const ka={name:"hardBreakEscape",tokenize:ba};function ba(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return z(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const wa={name:"headingAtx",resolve:Sa,tokenize:Ca};function Sa(e,t){let n=e.length-2,r=3,i,l;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},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function Ca(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||W(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||z(f)?(e.exit("atxHeading"),t(f)):R(f)?U(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||W(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const va=["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"],Ar=["pre","script","style","textarea"],Aa={concrete:!0,name:"htmlFlow",resolveTo:ja,tokenize:Ia},Ea={partial:!0,tokenize:Pa},Ta={partial:!0,tokenize:Na};function ja(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 Ia(e,t,n){const r=this;let i,l,o,s,a;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),h):x===47?(e.consume(x),l=!0,k):x===63?(e.consume(x),i=3,r.interrupt?t:g):Z(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function h(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,d):Z(x)?(e.consume(x),i=4,r.interrupt?t:g):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:g):n(x)}function d(x){const ae="CDATA[";return x===ae.charCodeAt(s++)?(e.consume(x),s===ae.length?r.interrupt?t:P:d):n(x)}function k(x){return Z(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function w(x){if(x===null||x===47||x===62||W(x)){const ae=x===47,je=o.toLowerCase();return!ae&&!l&&Ar.includes(je)?(i=1,r.interrupt?t(x):P(x)):va.includes(o.toLowerCase())?(i=6,ae?(e.consume(x),y):r.interrupt?t(x):P(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):l?A(x):v(x))}return x===45||Q(x)?(e.consume(x),o+=String.fromCharCode(x),w):n(x)}function y(x){return x===62?(e.consume(x),r.interrupt?t:P):n(x)}function A(x){return R(x)?(e.consume(x),A):b(x)}function v(x){return x===47?(e.consume(x),b):x===58||x===95||Z(x)?(e.consume(x),_):R(x)?(e.consume(x),v):b(x)}function _(x){return x===45||x===46||x===58||x===95||Q(x)?(e.consume(x),_):D(x)}function D(x){return x===61?(e.consume(x),C):R(x)?(e.consume(x),D):v(x)}function C(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),a=x,I):R(x)?(e.consume(x),C):O(x)}function I(x){return x===a?(e.consume(x),a=null,B):x===null||z(x)?n(x):(e.consume(x),I)}function O(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||W(x)?D(x):(e.consume(x),O)}function B(x){return x===47||x===62||R(x)?v(x):n(x)}function b(x){return x===62?(e.consume(x),N):n(x)}function N(x){return x===null||z(x)?P(x):R(x)?(e.consume(x),N):n(x)}function P(x){return x===45&&i===2?(e.consume(x),q):x===60&&i===1?(e.consume(x),Y):x===62&&i===4?(e.consume(x),se):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),de):z(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ea,ge,H)(x)):x===null||z(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),P)}function H(x){return e.check(Ta,L,ge)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),j}function j(x){return x===null||z(x)?H(x):(e.enter("htmlFlowData"),P(x))}function q(x){return x===45?(e.consume(x),g):P(x)}function Y(x){return x===47?(e.consume(x),o="",oe):P(x)}function oe(x){if(x===62){const ae=o.toLowerCase();return Ar.includes(ae)?(e.consume(x),se):P(x)}return Z(x)&&o.length<8?(e.consume(x),o+=String.fromCharCode(x),oe):P(x)}function de(x){return x===93?(e.consume(x),g):P(x)}function g(x){return x===62?(e.consume(x),se):x===45&&i===2?(e.consume(x),g):P(x)}function se(x){return x===null||z(x)?(e.exit("htmlFlowData"),ge(x)):(e.consume(x),se)}function ge(x){return e.exit("htmlFlow"),t(x)}}function Na(e,t,n){const r=this;return i;function i(o){return z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Pa(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(mt,t,n)}}const _a={name:"htmlText",tokenize:za};function za(e,t,n){const r=this;let i,l,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),a}function a(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),D):g===63?(e.consume(g),v):Z(g)?(e.consume(g),O):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),l=0,d):Z(g)?(e.consume(g),A):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function c(g){return g===null?n(g):g===45?(e.consume(g),h):z(g)?(o=c,Y(g)):(e.consume(g),c)}function h(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?q(g):g===45?h(g):c(g)}function d(g){const se="CDATA[";return g===se.charCodeAt(l++)?(e.consume(g),l===se.length?k:d):n(g)}function k(g){return g===null?n(g):g===93?(e.consume(g),w):z(g)?(o=k,Y(g)):(e.consume(g),k)}function w(g){return g===93?(e.consume(g),y):k(g)}function y(g){return g===62?q(g):g===93?(e.consume(g),y):k(g)}function A(g){return g===null||g===62?q(g):z(g)?(o=A,Y(g)):(e.consume(g),A)}function v(g){return g===null?n(g):g===63?(e.consume(g),_):z(g)?(o=v,Y(g)):(e.consume(g),v)}function _(g){return g===62?q(g):v(g)}function D(g){return Z(g)?(e.consume(g),C):n(g)}function C(g){return g===45||Q(g)?(e.consume(g),C):I(g)}function I(g){return z(g)?(o=I,Y(g)):R(g)?(e.consume(g),I):q(g)}function O(g){return g===45||Q(g)?(e.consume(g),O):g===47||g===62||W(g)?B(g):n(g)}function B(g){return g===47?(e.consume(g),q):g===58||g===95||Z(g)?(e.consume(g),b):z(g)?(o=B,Y(g)):R(g)?(e.consume(g),B):q(g)}function b(g){return g===45||g===46||g===58||g===95||Q(g)?(e.consume(g),b):N(g)}function N(g){return g===61?(e.consume(g),P):z(g)?(o=N,Y(g)):R(g)?(e.consume(g),N):B(g)}function P(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,H):z(g)?(o=P,Y(g)):R(g)?(e.consume(g),P):(e.consume(g),L)}function H(g){return g===i?(e.consume(g),i=void 0,j):g===null?n(g):z(g)?(o=H,Y(g)):(e.consume(g),H)}function L(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||W(g)?B(g):(e.consume(g),L)}function j(g){return g===47||g===62||W(g)?B(g):n(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function Y(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),oe}function oe(g){return R(g)?U(e,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):de(g)}function de(g){return e.enter("htmlTextData"),o(g)}}const Pn={name:"labelEnd",resolveAll:Ma,resolveTo:Oa,tokenize:Ra},La={tokenize:Ba},Da={tokenize:$a},Fa={tokenize:Ua};function Ma(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 Oa(e,t){let n=e.length,r=0,i,l,o,s;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,t],["enter",u,t]],s=le(s,e.slice(l+1,l+r+3)),s=le(s,[["enter",f,t]]),s=le(s,Lt(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),s=le(s,[["exit",f,t],e[o-2],e[o-1],["exit",u,t]]),s=le(s,e.slice(o+1)),s=le(s,[["exit",a,t]]),ie(e,l,e.length,s),e}function Ra(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return s;function s(h){return l?l._inactive?c(h):(o=r.parser.defined.includes(pe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(La,f,o?f:c)(h):h===91?e.attempt(Da,f,o?u:c)(h):o?f(h):c(h)}function u(h){return e.attempt(Fa,f,c)(h)}function f(h){return t(h)}function c(h){return l._balanced=!0,n(h)}}function Ba(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)?rt(e,l)(c):l(c)}function l(c){return c===41?f(c):Ii(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return W(c)?rt(e,a)(c):f(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?Pi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return W(c)?rt(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 $a(e,t,n){const r=this;return i;function i(s){return Ni.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function Ua(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Ha={name:"labelStartImage",resolveAll:Pn.resolveAll,tokenize:qa};function qa(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),l}function l(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Va={name:"labelStartLink",resolveAll:Pn.resolveAll,tokenize:Wa};function Wa(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Ht={name:"lineEnding",tokenize:Ga};function Ga(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,t,"linePrefix")}}const St={name:"thematicBreak",tokenize:Ja};function Ja(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||z(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),R(u)?U(e,s,"whitespace")(u):s(u))}}const ee={continuation:{tokenize:Ka},exit:eu,name:"list",tokenize:Qa},Ya={partial:!0,tokenize:tu},Xa={partial:!0,tokenize:Za};function Qa(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const d=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:pn(p)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(St,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return pn(p)&&++o<10?(e.consume(p),a):(!r.interrupt||o<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(mt,r.interrupt?n:f,e.attempt(Ya,h,c))}function f(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function c(p){return R(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ka(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mt,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!R(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Xa,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Za(e,t,n){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function eu(e){e.exit(this.containerState.type)}function tu(e,t,n){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!R(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Er={name:"setextUnderline",resolveTo:nu,tokenize:ru};function nu(e,t){let n=e.length,r,i,l;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),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function ru(e,t,n){const r=this;let i;return l;function l(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,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),R(u)?U(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||z(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const iu={tokenize:lu};function lu(e){const t=this,n=e.attempt(mt,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ca,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ou={resolveAll:zi()},su=_i("string"),au=_i("text");function _i(e){return{resolveAll:zi(e==="text"?uu:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(f){return u(f)?l(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),a}function a(f){return u(f)?(n.exit("data"),l(f)):(n.consume(f),a)}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 zi(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function uu(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 l=i.length,o=-1,s=0,a;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)a=!0,s++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||a||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},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 cu={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:Ai},fu={91:da},pu={[-2]:Ut,[-1]:Ut,32:Ut},hu={35:wa,42:St,45:[Er,St],60:Aa,61:Er,95:St,96:vr,126:vr},mu={38:Ti,92:Ei},du={[-5]:Ht,[-4]:Ht,[-3]:Ht,33:Ha,38:Ti,42:hn,60:[Vs,_a],91:Va,92:[ka,Ei],93:Pn,95:hn,96:ia},gu={null:[hn,ou]},xu={null:[42,95]},yu={null:[]},ku=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:xu,contentInitial:fu,disable:yu,document:cu,flow:hu,flowInitial:pu,insideSpan:gu,string:mu,text:du},Symbol.toStringTag,{value:"Module"}));function bu(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={},l=[];let o=[],s=[];const a={attempt:I(D),check:I(C),consume:A,enter:v,exit:_,interrupt:I(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:d,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function c(N){return o=le(o,N),w(),o[o.length-1]!==null?[]:(O(t,0),u.events=Lt(l,u.events,u),u.events)}function h(N,P){return Su(p(N),P)}function p(N){return wu(o,N)}function d(){const{_bufferIndex:N,_index:P,line:H,column:L,offset:j}=r;return{_bufferIndex:N,_index:P,line:H,column:L,offset:j}}function k(N){i[N.line]=N.column,b()}function w(){let N;for(;r._index<o.length;){const P=o[r._index];if(typeof P=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<P.length;)y(P.charCodeAt(r._bufferIndex));else y(P)}}function y(N){f=f(N)}function A(N){z(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,b()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function v(N,P){const H=P||{};return H.type=N,H.start=d(),u.events.push(["enter",H,u]),s.push(H),H}function _(N){const P=s.pop();return P.end=d(),u.events.push(["exit",P,u]),P}function D(N,P){O(N,P.from)}function C(N,P){P.restore()}function I(N,P){return H;function H(L,j,q){let Y,oe,de,g;return Array.isArray(L)?ge(L):"tokenize"in L?ge([L]):se(L);function se(X){return Je;function Je(Se){const Le=Se!==null&&X[Se],De=Se!==null&&X.null,gt=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(De)?De:De?[De]:[]];return ge(gt)(Se)}}function ge(X){return Y=X,oe=0,X.length===0?q:x(X[oe])}function x(X){return Je;function Je(Se){return g=B(),de=X,X.partial||(u.currentConstruct=X),X.name&&u.parser.constructs.disable.null.includes(X.name)?je():X.tokenize.call(P?Object.assign(Object.create(u),P):u,a,ae,je)(Se)}}function ae(X){return N(de,g),j}function je(X){return g.restore(),++oe<Y.length?x(Y[oe]):q}}}function O(N,P){N.resolveAll&&!l.includes(N)&&l.push(N),N.resolve&&ie(u.events,P,u.events.length-P,N.resolve(u.events.slice(P),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function B(){const N=d(),P=u.previous,H=u.currentConstruct,L=u.events.length,j=Array.from(s);return{from:L,restore:q};function q(){r=N,u.previous=P,u.currentConstruct=H,u.events.length=L,s=j,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function wu(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Su(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
48
+ `);return e.toolUseId?[{type:"tool_result",toolUseId:e.toolUseId,content:r,isError:!1}]:[{type:"text",text:r}]}function ot(e){return typeof e=="object"&&e!==null}function Co(e){return e?["file_path","path","command"].map(n=>e[n]).find(n=>typeof n=="string"&&n.trim().length>0)?.trim():void 0}function vo(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 ln(e){const t=e.trim();if(!t.startsWith("Awaiting your permission to "))return null;const n=t.match(/`([^`]+)`/);return{requests:[{toolName:vo(t),target:n?.[1],summary:t}]}}function Ao(e){if(!Array.isArray(e.permission_denials))return null;const t=[];for(const n of e.permission_denials){if(!ot(n)||typeof n.tool_name!="string")continue;const r=ot(n.tool_input)?n.tool_input:void 0,i=Co(r),l=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:l})}return t.length>0?{requests:t}:null}function ir(e){if(!Array.isArray(e))return null;for(const t of e){if(!ot(t)||t.type!=="text"||typeof t.text!="string")continue;const n=ln(t.text);if(n)return n}return null}function wn(e){if(!ot(e))return null;const t=Ao(e);if(t)return t;if(typeof e.result=="string"){const r=ln(e.result);if(r)return r}if(typeof e.message=="string"){const r=ln(e.message);if(r)return r}if(ot(e.message)){const r=wn(e.message);if(r)return r;const i=ir(e.message.content);if(i)return i}const n=ir(e.content);return n||null}function Eo(e){return JSON.stringify(e.requests.map(t=>({toolName:t.toolName,target:t.target??null,summary:t.summary})))}function To(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 jo(e){return qe(e)!==null}function Ee(e){return typeof e=="object"&&e!==null}function lr(e){if(e.type==="user"){const t=qe(e),n=typeof e.timestamp=="string"?e.timestamp:"";if(t)return`user:${n}:${Ae(t)}`}return JSON.stringify(e)}function _e(e){return Array.isArray(e)?e.map(t=>_e(t)):Ee(e)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,_e(n)])):e}function Io(e,t){return e.length!==t.length?!1:e.every((n,r)=>JSON.stringify(_e(n))===JSON.stringify(_e(t[r])))}function on(e){const t=qe(e);if(t)return`user:${Ae(t)}`;if(e.type==="assistant"){if(typeof e.message=="string")return`assistant:${JSON.stringify(e.message)}`;if(Ee(e.message)&&"content"in e.message)return`assistant:${JSON.stringify(_e(e.message.content))}`;if(Array.isArray(e.content))return`assistant:${JSON.stringify(_e(e.content))}`;if(Ee(e.message))return`assistant:${JSON.stringify(_e(e.message))}`}return JSON.stringify(e)}function ce(e,t){const n=e[t];return typeof n=="string"&&n.trim()?n.trim():null}function No(e){const t=e.message;let n=[];Ee(t)&&Array.isArray(t.content)?n=t.content:Array.isArray(e.content)&&(n=e.content);const r=n.filter(Ee).map(i=>{const l=typeof i.type=="string"?i.type:"block",o=ce(i,"id")??ce(i,"tool_use_id")??ce(i,"toolUseId");return o?`${l}:${o}`:l});return r.length>0?r.join(","):typeof e.message=="string"?"message":"event"}function _o(e){const t=ce(e,"id")??ce(e,"uuid")??ce(e,"eventId")??ce(e,"messageId");if(t)return`id:${t}`;const n=ce(e,"timestamp");if(!n)return on(e);const r=ce(e,"type")??"event",i=ce(e,"subtype"),l=Ee(e.message)?e.message:null,o=l?ce(l,"role"):null,s=No(e);return[r,i,n,o,s].filter(Boolean).join(":")}function Po(e){if(e.type!=="assistant"||!Ee(e.message))return null;const t=e.message.content;if(!Array.isArray(t)||t.length===0)return null;const n=[];let r;for(const o of t){if(!Ee(o)||o.type!=="text"&&o.type!=="commentary"||typeof o.text!="string")return null;n.push(o.text.trim()),typeof o.phase=="string"&&(r=o.phase)}const i=n.filter(Boolean).join(`
49
+ `).trim();if(!i)return null;let l=0;return r==="final_answer"?l=2:typeof r=="string"&&(l=1),{key:`assistant:${i}`,rank:l}}function zo(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 or(e){if(typeof e.timestamp!="string")return null;const t=Date.parse(e.timestamp);return Number.isNaN(t)?null:t}function sn(e){const t=ft(e);return t?`question:${Ve(t)}`:null}function Lo(e){const t=wn(e);return t?`permission:${Eo(t)}`:null}function sr(e){if(!Array.isArray(e))return null;const t=new Set;for(const n of e){const r=sn(n);if(r){t.add(r);continue}if(typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"){const i=pt(n.text);i&&t.add(Ve(i))}}return t.size===0?null:Array.from(t).sort().join("|")}function Do(e){const t=sn(e);if(t)return t;if(typeof e.message=="string"){const n=pt(e.message);return n?Ve(n):null}if(typeof e.message=="object"&&e.message!==null){const n=sn(e.message);return n||sr(e.message.content)}return sr(e.content)}function Fo(e){return Lo(e)}function Xh(e,t){const n=new Map;return t.map(r=>{const i=_o(r),l=n.get(i)??0;return n.set(i,l+1),`${e}-${zo(i)}-${l}`})}function Qh(e,t){const n=new Map;for(const l of t){const o=on(l);n.set(o,(n.get(o)??0)+1)}const r=[];for(let l=e.length-1;l>=0;l-=1){const o=e[l];if(!o)continue;const s=on(o),a=n.get(s)??0;if(a>0){n.set(s,a-1);continue}r.push({...o})}const i=[...r.reverse(),...t.map(l=>({...l}))].map((l,o)=>({event:l,order:o})).sort((l,o)=>{const s=or(l.event),a=or(o.event);return s!==null&&a!==null&&s!==a?s-a:l.order-o.order}).map(l=>l.event);return Io(e,i)?e:i}function Kh(e,t){const n=lr(t);return e.some(r=>lr(r)===n)?e:[...e,{...t}]}function Zh(e,t){const n=new Map;for(const r of t){const i=qe(r);if(!i)continue;const l=Ae(i);n.set(l,(n.get(l)??0)+1)}return e.filter(r=>{const i=Ae(r.content),l=n.get(i)??0;return l<=0?!0:(n.set(i,l-1),!1)})}function em(e,t){const n=Ae(t),r=e.findIndex(i=>Ae(i.content)===n);return r===-1?e:e.filter((i,l)=>l!==r)}function tm(e,t){const n=Ae(t);return e.some(r=>{const i=qe(r);return i!==null&&Ae(i)===n})}function nm(e){const t=[];let n=null;const r=new Map;for(const i of e){if(jo(i)){n=null,r.clear(),t.push(i);continue}const l=Po(i);if(l){const s=r.get(l.key);if(s){l.rank>s.rank&&(t[s.index]=i,r.set(l.key,{...s,rank:l.rank}));continue}r.set(l.key,{index:t.length,rank:l.rank})}const o=Fo(i)??Do(i);o&&o===n||(t.push(i),o&&(n=o))}return t}function Mo({image:e,alt:t,thumbnailClassName:n,imageClassName:r}){const i=ii(e),l=e.filename?.trim()||t;return m.jsxs(Fl,{children:[m.jsx(Ml,{asChild:!0,children:m.jsx("button",{type:"button",className:$e("block max-w-full cursor-zoom-in overflow-hidden rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/55 focus-visible:ring-offset-2 focus-visible:ring-offset-background",n),title:`View ${l}`,"aria-label":`View ${l}`,children:m.jsx("img",{src:i,alt:t,className:$e("block max-w-full object-cover",r)})})}),m.jsxs(Ol,{className:"w-[92vw] max-w-[72rem] gap-2 border-border/70 bg-background/96 p-2 sm:p-3",children:[m.jsx(Rl,{className:"sr-only",children:l}),m.jsx(Bl,{className:"sr-only",children:"Full-size image preview"}),m.jsx("div",{className:"flex max-h-[82vh] min-h-0 items-center justify-center overflow-hidden rounded-sm bg-muted/25",children:m.jsx("img",{src:i,alt:t,className:"max-h-[82vh] max-w-full object-contain"})}),e.filename&&m.jsx("div",{className:"truncate px-1 text-[10px] leading-4 text-muted-foreground",title:e.filename,children:e.filename})]})]})}const li=["GPT","Anthropic","Google"],Oo=[{value:"gpt-5.4-mini",label:"GPT-5.4 Mini",provider:"GPT",status:"GA"},{value:"gpt-5.4",label:"GPT-5.4",provider:"GPT",status:"GA"},{value:"gpt-5.5",label:"GPT-5.5",provider:"GPT",status:"GA"},{value:"claude-opus-4-6[1m]",label:"Claude Opus 4.6 1M",provider:"Anthropic",status:"GA",agents:["claudecode"]},{value:"claude-opus-4-7[1m]",label:"Claude Opus 4.7 1M",provider:"Anthropic",status:"GA",agents:["claudecode"]},{value:"claude-opus-4-8[1m]",label:"Claude Opus 4.8 1M",provider:"Anthropic",status:"GA",agents:["claudecode"]},{value:"claude-opus-4.6",label:"Claude Opus 4.6",provider:"Anthropic",status:"GA",agents:["copilot"]},{value:"claude-opus-4.7",label:"Claude Opus 4.7",provider:"Anthropic",status:"GA",agents:["copilot"]},{value:"claude-opus-4.8",label:"Claude Opus 4.8",provider:"Anthropic",status:"GA",agents:["copilot"]},{value:"claude-sonnet-4.6",label:"Claude Sonnet 4.6",provider:"Anthropic",status:"GA",agents:["copilot"]},{value:"gemini-3.1-pro-preview",label:"Gemini 3.1 Pro Preview",provider:"Google",status:"Public preview"},{value:"gemini-3.5-flash",label:"Gemini 3.5 Flash",provider:"Google",status:"GA"}];function Ro(e){return e==="codex"?new Set(["GPT"]):e==="claudecode"?new Set(["Anthropic"]):e==="copilot"?new Set(li):new Set}function Sn(e){const t=Ro(e);return li.map(n=>({provider:n,models:Oo.filter(r=>r.provider===n&&t.has(r.provider)&&(!r.agents||r.agents.includes(e)))})).filter(n=>n.models.length>0)}function rm(e,t){return Sn(e).some(n=>n.models.some(r=>r.value===t))}function im(e,t){if(!t)return"Default";for(const n of Sn(e)){const r=n.models.find(i=>i.value===t);if(r)return r.label}return t}const Bo=["codex","claudecode","copilot"];function oi({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($l,{className:n,"data-agent-icon":"generic","aria-hidden":"true"})}function si({value:e,label:t,description:n}){return m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx(oi,{agent:e}),m.jsx("span",{children:t}),n&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:n})]})}function lm(){return Kr.map(e=>m.jsx(Pt,{value:e.value,disabled:e.disabled,children:m.jsx(si,{value:e.value,label:e.label,description:e.description})},e.value))}function om(){return Bo.map(e=>m.jsx(Pt,{value:e,children:m.jsx(si,{value:e,label:ai(e)})},e))}function sm(){return Zr.map(e=>m.jsx(Pt,{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 am(e){return Sn(e).flatMap((n,r)=>[r>0?m.jsx(Ul,{},`${n.provider}-separator`):null,m.jsxs(Hl,{children:[m.jsx(ql,{className:"pl-2 pr-2 text-[9px] uppercase tracking-[0.18em] text-muted-foreground",children:n.provider}),n.models.map(i=>m.jsx(Pt,{value:i.value,textValue:i.label,className:"py-1 pl-6 pr-2 text-[11px]",children:m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{className:"truncate",children:i.label}),i.status==="Public preview"&&m.jsx("span",{className:"shrink-0 text-[9px] uppercase tracking-[0.16em] text-amber-500",children:"preview"})]})},i.value))]},n.provider)])}function ai(e){return Kr.find(t=>t.value===e)?.label??e}function um(e){return Zr.find(t=>t.value===e)?.label??e}function cm(){}function fm(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=n.length,l=!0);const o=n.slice(i,r).trim();(o||!l)&&t.push(o),i=r+1,r=n.indexOf(",",i)}return t}function $o(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Uo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ho=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qo={};function ar(e,t){return(qo.jsx?Ho:Uo).test(e)}const Vo=/[ \t\n\f\r]/g;function Wo(e){return typeof e=="object"?e.type==="text"?ur(e.value):!1:ur(e)}function ur(e){return e.replace(Vo,"")===""}class ht{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ht.prototype.normal={};ht.prototype.property={};ht.prototype.space=void 0;function ui(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ht(n,r,t)}function an(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 Go=0;const M=ze(),J=ze(),un=ze(),E=ze(),G=ze(),Be=ze(),re=ze();function ze(){return 2**++Go}const cn=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:J,commaOrSpaceSeparated:re,commaSeparated:Be,number:E,overloadedBoolean:un,spaceSeparated:G},Symbol.toStringTag,{value:"Module"})),Rt=Object.keys(cn);class Cn extends te{constructor(t,n,r,i){let l=-1;if(super(t,n),cr(this,"space",i),typeof r=="number")for(;++l<Rt.length;){const o=Rt[l];cr(this,Rt[l],(r&cn[o])===cn[o])}}}Cn.prototype.defined=!0;function cr(e,t,n){n&&(e[t]=n)}function We(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Cn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[an(r)]=r,n[an(l.attribute)]=r}return new ht(t,n,e.space)}const ci=We({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:J,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:G,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:E,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:G,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:J,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function fi(e,t){return t in e?e[t]:t}function pi(e,t){return fi(e,t.toLowerCase())}const Jo=We({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Be,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:G,autoFocus:M,autoPlay:M,blocking:G,capture:null,charSet:null,checked:M,cite:null,className:G,cols:E,colSpan:null,content:null,contentEditable:J,controls:M,controlsList:G,coords:E|Be,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:un,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:G,height:E,hidden:un,high:E,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:G,itemRef:G,itemScope:M,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,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:E,pattern:null,ping:G,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:G,required:M,reversed:M,rows:E,rowSpan:E,sandbox:G,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:J,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,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:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:M,disableRemotePlayback:M,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:pi}),Yo=We({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:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:G,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:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,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:Be,g2:Be,glyphName:Be,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,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:E,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:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,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:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,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:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fi}),hi=We({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()}}),mi=We({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pi}),di=We({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Xo={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"},Qo=/[A-Z]/g,fr=/-[a-z]/g,Ko=/^data[-\w.:]+$/i;function Zo(e,t){const n=an(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"&&Ko.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(fr,ts);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!fr.test(l)){let o=l.replace(Qo,es);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Cn}return new i(r,t)}function es(e){return"-"+e.toLowerCase()}function ts(e){return e.charAt(1).toUpperCase()}const ns=ui([ci,Jo,hi,mi,di],"html"),vn=ui([ci,Yo,hi,mi,di],"svg");function pm(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function rs(e){return e.join(" ").trim()}var Me={},Bt,pr;function is(){if(pr)return Bt;pr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,a=`
50
+ `,u="/",f="*",c="",h="comment",p="declaration";function d(w,y){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];y=y||{};var A=1,v=1;function P(L){var j=L.match(t);j&&(A+=j.length);var q=L.lastIndexOf(a);v=~q?L.length-q:v+L.length}function D(){var L={line:A,column:v};return function(j){return j.position=new C(L),B(),j}}function C(L){this.start=L,this.end={line:A,column:v},this.source=y.source}C.prototype.content=w;function I(L){var j=new Error(y.source+":"+A+":"+v+": "+L);if(j.reason=L,j.filename=y.source,j.line=A,j.column=v,j.source=w,!y.silent)throw j}function O(L){var j=L.exec(w);if(j){var q=j[0];return P(q),w=w.slice(q.length),j}}function B(){O(n)}function b(L){var j;for(L=L||[];j=N();)j!==!1&&L.push(j);return L}function N(){var L=D();if(!(u!=w.charAt(0)||f!=w.charAt(1))){for(var j=2;c!=w.charAt(j)&&(f!=w.charAt(j)||u!=w.charAt(j+1));)++j;if(j+=2,c===w.charAt(j-1))return I("End of comment missing");var q=w.slice(2,j-2);return v+=2,P(q),w=w.slice(j),v+=2,L({type:h,comment:q})}}function _(){var L=D(),j=O(r);if(j){if(N(),!O(i))return I("property missing ':'");var q=O(l),Y=L({type:p,property:k(j[0].replace(e,c)),value:q?k(q[0].replace(e,c)):c});return O(o),Y}}function H(){var L=[];b(L);for(var j;j=_();)j!==!1&&(L.push(j),b(L));return L}return B(),H()}function k(w){return w?w.replace(s,c):c}return Bt=d,Bt}var hr;function ls(){if(hr)return Me;hr=1;var e=Me&&Me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Me,"__esModule",{value:!0}),Me.default=n;const t=e(is());function n(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,t.default)(r),s=typeof i=="function";return o.forEach(a=>{if(a.type!=="declaration")return;const{property:u,value:f}=a;s?i(u,f,a):f&&(l=l||{},l[u]=f)}),l}return Me}var Qe={},mr;function os(){if(mr)return Qe;mr=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},o=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},a=function(u,f){return f===void 0&&(f={}),l(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(t,o))};return Qe.camelCase=a,Qe}var Ke,dr;function ss(){if(dr)return Ke;dr=1;var e=Ke&&Ke.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ls()),n=os();function r(i,l){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,a){s&&a&&(o[(0,n.camelCase)(s,l)]=a)}),o}return r.default=r,Ke=r,Ke}var as=ss();const us=ei(as),gi=xi("end"),An=xi("start");function xi(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 cs(e){const t=An(e),n=gi(e);if(t&&n)return{start:t,end:n}}function nt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gr(e.position):"start"in e||"end"in e?gr(e):"line"in e||"column"in e?fn(e):""}function fn(e){return xr(e&&e.line)+":"+xr(e&&e.column)}function gr(e){return fn(e&&e.start)+"-"+fn(e&&e.end)}function xr(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=nt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const En={}.hasOwnProperty,fs=new Map,ps=/[A-Z]/g,hs=new Set(["table","tbody","thead","tfoot","tr"]),ms=new Set(["td","th"]),yi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ds(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=Cs(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=Ss(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"?vn:ns,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=ki(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function ki(e,t,n){if(t.type==="element")return gs(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xs(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ks(e,t,n);if(t.type==="mdxjsEsm")return ys(e,t);if(t.type==="root")return bs(e,t,n);if(t.type==="text")return ws(e,t)}function gs(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=vn,e.schema=i),e.ancestors.push(t);const l=wi(e,t.tagName,!1),o=vs(e,t);let s=jn(e,t);return hs.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!Wo(a):!0})),bi(e,o,l,t),Tn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function xs(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)}st(e,t.position)}function ys(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);st(e,t.position)}function ks(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=vn,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:wi(e,t.name,!0),o=As(e,t),s=jn(e,t);return bi(e,o,l,t),Tn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function bs(e,t,n){const r={};return Tn(r,jn(e,t)),e.create(t,e.Fragment,r,n)}function ws(e,t){return t.value}function bi(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Tn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ss(e,t,n){return r;function r(i,l,o,s){const u=Array.isArray(o.children)?n:t;return s?u(l,o,s):u(l,o)}}function Cs(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=An(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function vs(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&En.call(t.properties,i)){const l=Es(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&ms.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function As(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else st(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else st(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function jn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:fs;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;o=a+"-"+u,i.set(a,u+1)}}const s=ki(e,l,o);s!==void 0&&n.push(s)}return n}function Es(e,t,n){const r=Zo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?$o(n):rs(n)),r.property==="style"){let i=typeof n=="object"?n:Ts(e,String(n));return e.stylePropertyNameCase==="css"&&(i=js(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Xo[r.property]||r.property:r.attribute,n]}}function Ts(e,t){try{return us(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new K("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=yi+"#cannot-parse-style-attribute",i}}function wi(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=ar(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=ar(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return En.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);st(e)}function st(e,t){const n=new K("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=yi+"#cannot-handle-mdx-estrees-without-createevaluater",n}function js(e){const t={};let n;for(n in e)En.call(e,n)&&(t[Is(n)]=e[n]);return t}function Is(e){let t=e.replace(ps,Ns);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ns(e){return"-"+e.toLowerCase()}const $t={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"]},_s={};function In(e,t){const n=_s,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Si(e,r,i)}function Si(e,t,n){if(Ps(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 yr(e.children,t,n)}return Array.isArray(e)?yr(e,t,n):""}function yr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Si(e[i],t,n);return r.join("")}function Ps(e){return!!(e&&typeof e=="object")}const kr=document.createElement("i");function Nn(e){const t="&"+e+";";kr.innerHTML=t;const n=kr.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 l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const br={}.hasOwnProperty;function Ci(e){const t={};let n=-1;for(;++n<e.length;)zs(t,e[n]);return t}function zs(e,t){let n;for(n in t){const i=(br.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){br.call(i,o)||(i[o]=[]);const s=l[o];Ls(i[o],Array.isArray(s)?s:s?[s]:[])}}}function Ls(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 vi(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 pe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Z=Te(/[A-Za-z]/),Q=Te(/[\dA-Za-z]/),Ds=Te(/[#-'*+\--9=?A-Z^-~]/);function Tt(e){return e!==null&&(e<32||e===127)}const pn=Te(/\d/),Fs=Te(/[\dA-Fa-f]/),Ms=Te(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}const zt=Te(/\p{P}|\p{S}/u),Pe=Te(/\s/);function Te(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ge(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&Q(e.charCodeAt(n+1))&&Q(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function U(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(a){return R(a)?(e.enter(n),s(a)):t(a)}function s(a){return R(a)&&l++<i?(e.consume(a),s):(e.exit(n),t(a))}}const Os={tokenize:Rs};function Rs(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return z(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}const Bs={tokenize:$s},wr={tokenize:Us};function $s(e){const t=this,n=[];let r=0,i,l,o;return s;function s(v){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,a,u)(v)}return u(v)}function a(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const P=t.events.length;let D=P,C;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){C=t.events[D][1].end;break}y(r);let I=P;for(;I<t.events.length;)t.events[I][1].end={...C},I++;return ie(t.events,D+1,0,t.events.slice(P)),t.events.length=I,u(v)}return s(v)}function u(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return d(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(wr,f,c)(v)}function f(v){return i&&A(),y(r),h(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,d(v)}function h(v){return t.containerState={},e.attempt(wr,p,d)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function d(v){if(v===null){i&&A(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(v)}function k(v){if(v===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return z(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(v),k)}function w(v,P){const D=t.sliceStream(v);if(P&&D.push(null),v.previous=l,l&&(l.next=v),l=v,i.defineSkip(v.start),i.write(D),t.parser.lazy[v.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<o&&(!i.events[C][1].end||i.events[C][1].end.offset>o))return;const I=t.events.length;let O=I,B,b;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(B){b=t.events[O][1].end;break}B=!0}for(y(r),C=I;C<t.events.length;)t.events[C][1].end={...b},C++;ie(t.events,O+1,0,t.events.slice(I)),t.events.length=C}}function y(v){let P=n.length;for(;P-- >v;){const D=n[P];t.containerState=D[1],D[0].exit.call(t,e)}n.length=v}function A(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Us(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||W(e)||Pe(e))return 1;if(zt(e))return 2}function Lt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const hn={name:"attention",resolveAll:Hs,tokenize:qs};function Hs(e,t){let n=-1,r,i,l,o,s,a,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;a=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,-a),Sr(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.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",o,t],["exit",o,t],["enter",l,t]]),u=le(u,Lt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=le(u,[["exit",l,t],["enter",s,t],["exit",s,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 qs(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ue(r);let l;return o;function o(a){return l=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===l)return e.consume(a),s;const u=e.exit("attentionSequence"),f=Ue(a),c=!f||f===2&&i||n.includes(a),h=!i||i===2&&f||n.includes(r);return u._open=!!(l===42?c:c&&(i||!h)),u._close=!!(l===42?h:h&&(f||!c)),t(a)}}function Sr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Vs={name:"autolink",tokenize:Ws};function Ws(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"),l}function l(p){return Z(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||Q(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||Q(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function a(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||Tt(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),f):Ds(p)?(e.consume(p),u):n(p)}function f(p){return Q(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||Q(p))&&r++<63){const d=p===45?h:c;return e.consume(p),d}return n(p)}}const mt={partial:!0,tokenize:Gs};function Gs(e,t,n){return r;function r(l){return R(l)?U(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||z(l)?t(l):n(l)}}const Ai={continuation:{tokenize:Ys},exit:Xs,name:"blockQuote",tokenize:Js};function Js(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return R(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Ys(e,t,n){const r=this;return i;function i(o){return R(o)?U(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Ai,t,n)(o)}}function Xs(e){e.exit("blockQuote")}const Ei={name:"characterEscape",tokenize:Qs};function Qs(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Ms(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Ti={name:"characterReference",tokenize:Ks};function Ks(e,t,n){const r=this;let i=0,l,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a}function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=Q,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Fs,f):(e.enter("characterReferenceValue"),l=7,o=pn,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return o===Q&&!Nn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),f):n(c)}}const Cr={partial:!0,tokenize:ea},vr={concrete:!0,name:"codeFenced",tokenize:Zs};function Zs(e,t,n){const r=this,i={partial:!0,tokenize:D};let l=0,o=0,s;return a;function a(C){return u(C)}function u(C){const I=r.events[r.events.length-1];return l=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===s?(o++,e.consume(C),f):o<3?n(C):(e.exit("codeFencedFenceSequence"),R(C)?U(e,c,"whitespace")(C):c(C))}function c(C){return C===null||z(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(Cr,k,P)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||z(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):R(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),h)}function p(C){return C===null||z(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(C))}function d(C){return C===null||z(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===s?n(C):(e.consume(C),d)}function k(C){return e.attempt(i,P,w)(C)}function w(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return l>0&&R(C)?U(e,A,"linePrefix",l+1)(C):A(C)}function A(C){return C===null||z(C)?e.check(Cr,k,P)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||z(C)?(e.exit("codeFlowValue"),A(C)):(e.consume(C),v)}function P(C){return e.exit("codeFenced"),t(C)}function D(C,I,O){let B=0;return b;function b(j){return C.enter("lineEnding"),C.consume(j),C.exit("lineEnding"),N}function N(j){return C.enter("codeFencedFence"),R(j)?U(C,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):_(j)}function _(j){return j===s?(C.enter("codeFencedFenceSequence"),H(j)):O(j)}function H(j){return j===s?(B++,C.consume(j),H):B>=o?(C.exit("codeFencedFenceSequence"),R(j)?U(C,L,"whitespace")(j):L(j)):O(j)}function L(j){return j===null||z(j)?(C.exit("codeFencedFence"),I(j)):O(j)}}}function ea(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Ut={name:"codeIndented",tokenize:na},ta={partial:!0,tokenize:ra};function na(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),U(e,l,"linePrefix",5)(u)}function l(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?a(u):z(u)?e.attempt(ta,o,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||z(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function ra(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):U(e,l,"linePrefix",5)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):z(o)?i(o):n(o)}}const ia={name:"codeText",previous:oa,resolve:la,tokenize:sa};function la(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 oa(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sa(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):z(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||z(c)?(e.exit("codeTextData"),a(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)):(l.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 l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ze(this.left,r),l.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),Ze(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ze(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);Ze(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ze(this.left,n.reverse())}}}function Ze(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 ji(e){const t={};let n=-1,r,i,l,o,s,a,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"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ua(f,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function ua(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,a=[],u={};let f,c,h=-1,p=n,d=0,k=0;const w=[k];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(k=h+1,w.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const y=s.slice(w[h],w[h+1]),A=l.pop();a.push([A,A+y.length-1]),e.splice(A,2,y)}for(a.reverse(),h=-1;++h<a.length;)u[d+a[h][0]]=d+a[h][1],d+=a[h][1]-a[h][0]-1;return u}const ca={resolve:pa,tokenize:ha},fa={partial:!0,tokenize:ma};function pa(e){return ji(e),e}function ha(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):z(s)?e.check(fa,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ma(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),U(e,l,"linePrefix")}function l(o){if(o===null||z(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Ii(e,t,n,r,i,l,o,s,a){const u=a||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(y),e.exit(l),h):y===null||y===32||y===41||Tt(y)?n(y):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),k(y))}function h(y){return y===62?(e.enter(l),e.consume(y),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(s),h(y)):y===null||y===60||z(y)?n(y):(e.consume(y),y===92?d:p)}function d(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function k(y){return!f&&(y===null||y===41||W(y))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,k):y===41?(e.consume(y),f--,k):y===null||y===32||y===40||Tt(y)?n(y):(e.consume(y),y===92?w:k)}function w(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function Ni(e,t,n,r,i,l){const o=this;let s=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):z(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||z(p)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),a||(a=!R(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function _i(e,t,n,r,i,l){let o;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,a):n(h)}function a(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),a(o)):h===null?n(h):z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),U(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||z(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===o||h===92?(e.consume(h),f):f(h)}}function rt(e,t){let n;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):R(i)?U(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const da={name:"definition",tokenize:xa},ga={partial:!0,tokenize:ya};function xa(e,t,n){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return Ni.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return W(p)?rt(e,u)(p):u(p)}function u(p){return Ii(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(ga,c,c)(p)}function c(p){return R(p)?U(e,h,"whitespace")(p):h(p)}function h(p){return p===null||z(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function ya(e,t,n){return r;function r(s){return W(s)?rt(e,i)(s):n(s)}function i(s){return _i(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return R(s)?U(e,o,"whitespace")(s):o(s)}function o(s){return s===null||z(s)?t(s):n(s)}}const ka={name:"hardBreakEscape",tokenize:ba};function ba(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return z(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const wa={name:"headingAtx",resolve:Sa,tokenize:Ca};function Sa(e,t){let n=e.length-2,r=3,i,l;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},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function Ca(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||W(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||z(f)?(e.exit("atxHeading"),t(f)):R(f)?U(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||W(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const va=["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"],Ar=["pre","script","style","textarea"],Aa={concrete:!0,name:"htmlFlow",resolveTo:ja,tokenize:Ia},Ea={partial:!0,tokenize:_a},Ta={partial:!0,tokenize:Na};function ja(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 Ia(e,t,n){const r=this;let i,l,o,s,a;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),h):x===47?(e.consume(x),l=!0,k):x===63?(e.consume(x),i=3,r.interrupt?t:g):Z(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function h(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,d):Z(x)?(e.consume(x),i=4,r.interrupt?t:g):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:g):n(x)}function d(x){const ae="CDATA[";return x===ae.charCodeAt(s++)?(e.consume(x),s===ae.length?r.interrupt?t:_:d):n(x)}function k(x){return Z(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function w(x){if(x===null||x===47||x===62||W(x)){const ae=x===47,je=o.toLowerCase();return!ae&&!l&&Ar.includes(je)?(i=1,r.interrupt?t(x):_(x)):va.includes(o.toLowerCase())?(i=6,ae?(e.consume(x),y):r.interrupt?t(x):_(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):l?A(x):v(x))}return x===45||Q(x)?(e.consume(x),o+=String.fromCharCode(x),w):n(x)}function y(x){return x===62?(e.consume(x),r.interrupt?t:_):n(x)}function A(x){return R(x)?(e.consume(x),A):b(x)}function v(x){return x===47?(e.consume(x),b):x===58||x===95||Z(x)?(e.consume(x),P):R(x)?(e.consume(x),v):b(x)}function P(x){return x===45||x===46||x===58||x===95||Q(x)?(e.consume(x),P):D(x)}function D(x){return x===61?(e.consume(x),C):R(x)?(e.consume(x),D):v(x)}function C(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),a=x,I):R(x)?(e.consume(x),C):O(x)}function I(x){return x===a?(e.consume(x),a=null,B):x===null||z(x)?n(x):(e.consume(x),I)}function O(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||W(x)?D(x):(e.consume(x),O)}function B(x){return x===47||x===62||R(x)?v(x):n(x)}function b(x){return x===62?(e.consume(x),N):n(x)}function N(x){return x===null||z(x)?_(x):R(x)?(e.consume(x),N):n(x)}function _(x){return x===45&&i===2?(e.consume(x),q):x===60&&i===1?(e.consume(x),Y):x===62&&i===4?(e.consume(x),se):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),de):z(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ea,ge,H)(x)):x===null||z(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),_)}function H(x){return e.check(Ta,L,ge)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),j}function j(x){return x===null||z(x)?H(x):(e.enter("htmlFlowData"),_(x))}function q(x){return x===45?(e.consume(x),g):_(x)}function Y(x){return x===47?(e.consume(x),o="",oe):_(x)}function oe(x){if(x===62){const ae=o.toLowerCase();return Ar.includes(ae)?(e.consume(x),se):_(x)}return Z(x)&&o.length<8?(e.consume(x),o+=String.fromCharCode(x),oe):_(x)}function de(x){return x===93?(e.consume(x),g):_(x)}function g(x){return x===62?(e.consume(x),se):x===45&&i===2?(e.consume(x),g):_(x)}function se(x){return x===null||z(x)?(e.exit("htmlFlowData"),ge(x)):(e.consume(x),se)}function ge(x){return e.exit("htmlFlow"),t(x)}}function Na(e,t,n){const r=this;return i;function i(o){return z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function _a(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(mt,t,n)}}const Pa={name:"htmlText",tokenize:za};function za(e,t,n){const r=this;let i,l,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),a}function a(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),D):g===63?(e.consume(g),v):Z(g)?(e.consume(g),O):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),l=0,d):Z(g)?(e.consume(g),A):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function c(g){return g===null?n(g):g===45?(e.consume(g),h):z(g)?(o=c,Y(g)):(e.consume(g),c)}function h(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?q(g):g===45?h(g):c(g)}function d(g){const se="CDATA[";return g===se.charCodeAt(l++)?(e.consume(g),l===se.length?k:d):n(g)}function k(g){return g===null?n(g):g===93?(e.consume(g),w):z(g)?(o=k,Y(g)):(e.consume(g),k)}function w(g){return g===93?(e.consume(g),y):k(g)}function y(g){return g===62?q(g):g===93?(e.consume(g),y):k(g)}function A(g){return g===null||g===62?q(g):z(g)?(o=A,Y(g)):(e.consume(g),A)}function v(g){return g===null?n(g):g===63?(e.consume(g),P):z(g)?(o=v,Y(g)):(e.consume(g),v)}function P(g){return g===62?q(g):v(g)}function D(g){return Z(g)?(e.consume(g),C):n(g)}function C(g){return g===45||Q(g)?(e.consume(g),C):I(g)}function I(g){return z(g)?(o=I,Y(g)):R(g)?(e.consume(g),I):q(g)}function O(g){return g===45||Q(g)?(e.consume(g),O):g===47||g===62||W(g)?B(g):n(g)}function B(g){return g===47?(e.consume(g),q):g===58||g===95||Z(g)?(e.consume(g),b):z(g)?(o=B,Y(g)):R(g)?(e.consume(g),B):q(g)}function b(g){return g===45||g===46||g===58||g===95||Q(g)?(e.consume(g),b):N(g)}function N(g){return g===61?(e.consume(g),_):z(g)?(o=N,Y(g)):R(g)?(e.consume(g),N):B(g)}function _(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,H):z(g)?(o=_,Y(g)):R(g)?(e.consume(g),_):(e.consume(g),L)}function H(g){return g===i?(e.consume(g),i=void 0,j):g===null?n(g):z(g)?(o=H,Y(g)):(e.consume(g),H)}function L(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||W(g)?B(g):(e.consume(g),L)}function j(g){return g===47||g===62||W(g)?B(g):n(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function Y(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),oe}function oe(g){return R(g)?U(e,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):de(g)}function de(g){return e.enter("htmlTextData"),o(g)}}const _n={name:"labelEnd",resolveAll:Ma,resolveTo:Oa,tokenize:Ra},La={tokenize:Ba},Da={tokenize:$a},Fa={tokenize:Ua};function Ma(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 Oa(e,t){let n=e.length,r=0,i,l,o,s;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,t],["enter",u,t]],s=le(s,e.slice(l+1,l+r+3)),s=le(s,[["enter",f,t]]),s=le(s,Lt(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),s=le(s,[["exit",f,t],e[o-2],e[o-1],["exit",u,t]]),s=le(s,e.slice(o+1)),s=le(s,[["exit",a,t]]),ie(e,l,e.length,s),e}function Ra(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return s;function s(h){return l?l._inactive?c(h):(o=r.parser.defined.includes(pe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(La,f,o?f:c)(h):h===91?e.attempt(Da,f,o?u:c)(h):o?f(h):c(h)}function u(h){return e.attempt(Fa,f,c)(h)}function f(h){return t(h)}function c(h){return l._balanced=!0,n(h)}}function Ba(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)?rt(e,l)(c):l(c)}function l(c){return c===41?f(c):Ii(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return W(c)?rt(e,a)(c):f(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?_i(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return W(c)?rt(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 $a(e,t,n){const r=this;return i;function i(s){return Ni.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function Ua(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Ha={name:"labelStartImage",resolveAll:_n.resolveAll,tokenize:qa};function qa(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),l}function l(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Va={name:"labelStartLink",resolveAll:_n.resolveAll,tokenize:Wa};function Wa(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Ht={name:"lineEnding",tokenize:Ga};function Ga(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,t,"linePrefix")}}const St={name:"thematicBreak",tokenize:Ja};function Ja(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||z(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),R(u)?U(e,s,"whitespace")(u):s(u))}}const ee={continuation:{tokenize:Ka},exit:eu,name:"list",tokenize:Qa},Ya={partial:!0,tokenize:tu},Xa={partial:!0,tokenize:Za};function Qa(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const d=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:pn(p)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(St,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return pn(p)&&++o<10?(e.consume(p),a):(!r.interrupt||o<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(mt,r.interrupt?n:f,e.attempt(Ya,h,c))}function f(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function c(p){return R(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ka(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mt,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!R(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Xa,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Za(e,t,n){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function eu(e){e.exit(this.containerState.type)}function tu(e,t,n){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!R(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Er={name:"setextUnderline",resolveTo:nu,tokenize:ru};function nu(e,t){let n=e.length,r,i,l;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),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function ru(e,t,n){const r=this;let i;return l;function l(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,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),R(u)?U(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||z(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const iu={tokenize:lu};function lu(e){const t=this,n=e.attempt(mt,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ca,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ou={resolveAll:zi()},su=Pi("string"),au=Pi("text");function Pi(e){return{resolveAll:zi(e==="text"?uu:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(f){return u(f)?l(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),a}function a(f){return u(f)?(n.exit("data"),l(f)):(n.consume(f),a)}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 zi(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function uu(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 l=i.length,o=-1,s=0,a;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)a=!0,s++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||a||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},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 cu={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:Ai},fu={91:da},pu={[-2]:Ut,[-1]:Ut,32:Ut},hu={35:wa,42:St,45:[Er,St],60:Aa,61:Er,95:St,96:vr,126:vr},mu={38:Ti,92:Ei},du={[-5]:Ht,[-4]:Ht,[-3]:Ht,33:Ha,38:Ti,42:hn,60:[Vs,Pa],91:Va,92:[ka,Ei],93:_n,95:hn,96:ia},gu={null:[hn,ou]},xu={null:[42,95]},yu={null:[]},ku=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:xu,contentInitial:fu,disable:yu,document:cu,flow:hu,flowInitial:pu,insideSpan:gu,string:mu,text:du},Symbol.toStringTag,{value:"Module"}));function bu(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={},l=[];let o=[],s=[];const a={attempt:I(D),check:I(C),consume:A,enter:v,exit:P,interrupt:I(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:d,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function c(N){return o=le(o,N),w(),o[o.length-1]!==null?[]:(O(t,0),u.events=Lt(l,u.events,u),u.events)}function h(N,_){return Su(p(N),_)}function p(N){return wu(o,N)}function d(){const{_bufferIndex:N,_index:_,line:H,column:L,offset:j}=r;return{_bufferIndex:N,_index:_,line:H,column:L,offset:j}}function k(N){i[N.line]=N.column,b()}function w(){let N;for(;r._index<o.length;){const _=o[r._index];if(typeof _=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<_.length;)y(_.charCodeAt(r._bufferIndex));else y(_)}}function y(N){f=f(N)}function A(N){z(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,b()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function v(N,_){const H=_||{};return H.type=N,H.start=d(),u.events.push(["enter",H,u]),s.push(H),H}function P(N){const _=s.pop();return _.end=d(),u.events.push(["exit",_,u]),_}function D(N,_){O(N,_.from)}function C(N,_){_.restore()}function I(N,_){return H;function H(L,j,q){let Y,oe,de,g;return Array.isArray(L)?ge(L):"tokenize"in L?ge([L]):se(L);function se(X){return Je;function Je(Se){const Le=Se!==null&&X[Se],De=Se!==null&&X.null,gt=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(De)?De:De?[De]:[]];return ge(gt)(Se)}}function ge(X){return Y=X,oe=0,X.length===0?q:x(X[oe])}function x(X){return Je;function Je(Se){return g=B(),de=X,X.partial||(u.currentConstruct=X),X.name&&u.parser.constructs.disable.null.includes(X.name)?je():X.tokenize.call(_?Object.assign(Object.create(u),_):u,a,ae,je)(Se)}}function ae(X){return N(de,g),j}function je(X){return g.restore(),++oe<Y.length?x(Y[oe]):q}}}function O(N,_){N.resolveAll&&!l.includes(N)&&l.push(N),N.resolve&&ie(u.events,_,u.events.length-_,N.resolve(u.events.slice(_),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function B(){const N=d(),_=u.previous,H=u.currentConstruct,L=u.events.length,j=Array.from(s);return{from:L,restore:q};function q(){r=N,u.previous=_,u.currentConstruct=H,u.events.length=L,s=j,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function wu(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Su(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
51
51
  `;break}case-3:{o=`\r
52
- `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function Cu(e){const r={constructs:Ci([ku,...(e||{}).extensions||[]]),content:i(Os),defined:[],document:i(Bs),flow:i(iu),lazy:{},string:i(su),text:i(au)};return r;function i(l){return o;function o(s){return bu(r,l,s)}}}function vu(e){for(;!ji(e););return e}const Tr=/[\0\t\n\r]/g;function Au(){let e=1,t="",n=!0,r;return i;function i(l,o,s){const a=[];let u,f,c,h,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(Tr.lastIndex=c,u=Tr.exec(l),h=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(h),!u){t=l.slice(c);break}if(p===10&&c===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<h&&(a.push(l.slice(c,h)),e+=h-c),p){case 0:{a.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,a.push(-2);e++<f;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const Eu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Tu(e){return e.replace(Eu,ju)}function ju(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return vi(n.slice(l?2:1),l?16:10)}return Nn(n)||e}const Li={}.hasOwnProperty;function Iu(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Nu(n)(vu(Cu(n).document().write(Au()(e,t,!0))))}function Nu(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(nr),autolinkProtocol:B,autolinkEmail:B,atxHeading:l(Zn),blockQuote:l(De),characterEscape:B,characterReference:B,codeFenced:l(gt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(gt,o),codeText:l(Tl,o),codeTextData:B,data:B,codeFlowValue:B,definition:l(jl),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Il),hardBreakEscape:l(er),hardBreakTrailing:l(er),htmlFlow:l(tr,o),htmlFlowData:B,htmlText:l(tr,o),htmlTextData:B,image:l(Nl),label:o,link:l(nr),listItem:l(Pl),listItemValue:h,listOrdered:l(rr,c),listUnordered:l(rr),paragraph:l(_l),reference:x,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Zn),strong:l(zl),thematicBreak:l(Dl)},exit:{atxHeading:a(),atxHeadingSequence:D,autolink:a(),autolinkEmail:Le,autolinkProtocol:Se,blockQuote:a(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:je,characterReferenceMarkerNumeric:je,characterReferenceValue:X,characterReference:Je,codeFenced:a(w),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:b,codeIndented:a(y),codeText:a(j),codeTextData:b,data:b,definition:a(),definitionDestinationString:_,definitionLabelString:A,definitionTitleString:v,emphasis:a(),hardBreakEscape:a(P),hardBreakTrailing:a(P),htmlFlow:a(H),htmlFlowData:b,htmlText:a(L),htmlTextData:b,image:a(Y),label:de,labelText:oe,lineEnding:N,link:a(q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ae,resourceDestinationString:g,resourceTitleString:se,resource:ge,setextHeading:a(O),setextHeadingLineSequence:I,setextHeadingText:C,strong:a(),thematicBreak:a()}};Di(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(S){let T={type:"root",children:[]};const F={stack:[T],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:f,data:n},$=[];let V=-1;for(;++V<S.length;)if(S[V][1].type==="listOrdered"||S[V][1].type==="listUnordered")if(S[V][0]==="enter")$.push(V);else{const ue=$.pop();V=i(S,ue,V)}for(V=-1;++V<S.length;){const ue=t[S[V][0]];Li.call(ue,S[V][1].type)&&ue[S[V][1].type].call(Object.assign({sliceSerialize:S[V][2].sliceSerialize},F),S[V][1])}if(F.tokenStack.length>0){const ue=F.tokenStack[F.tokenStack.length-1];(ue[1]||jr).call(F,void 0,ue[0])}for(T.position={start:Ce(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:Ce(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)T=t.transforms[V](T)||T;return T}function i(S,T,F){let $=T-1,V=-1,ue=!1,Ie,xe,Ye,Xe;for(;++$<=F;){const ne=S[$];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,Xe=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Ie&&!Xe&&!V&&!Ye&&(Ye=$),Xe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xe=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(Ie){let Fe=$;for(xe=void 0;Fe--;){const ye=S[Fe];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;xe&&(S[xe][1].type="lineEndingBlank",ue=!0),ye[1].type="lineEnding",xe=Fe}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}Ye&&(!xe||Ye<xe)&&(Ie._spread=!0),Ie.end=Object.assign({},xe?S[xe][1].start:ne[1].end),S.splice(xe||$,0,["exit",Ie,ne[2]]),$++,F++}if(ne[1].type==="listItemPrefix"){const Fe={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Ie=Fe,S.splice($,0,["enter",Fe,ne[2]]),$++,F++,Ye=void 0,Xe=!0}}}return S[T][1]._spread=ue,F}function l(S,T){return F;function F($){s.call(this,S($),$),T&&T.call(this,$)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(S,T,F){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([T,F||void 0]),S.position={start:Ce(T.start),end:void 0}}function a(S){return T;function T(F){S&&S.call(this,F),u.call(this,F)}}function u(S,T){const F=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==S.type&&(T?T.call(this,S,$[0]):($[1]||jr).call(this,S,$[0]));else throw new Error("Cannot close `"+S.type+"` ("+nt({start:S.start,end:S.end})+"): it’s not open");F.position.end=Ce(S.end)}function f(){return In(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(S){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function p(){const S=this.resume(),T=this.stack[this.stack.length-1];T.lang=S}function d(){const S=this.resume(),T=this.stack[this.stack.length-1];T.meta=S}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S.replace(/(\r?\n|\r)$/g,"")}function A(S){const T=this.resume(),F=this.stack[this.stack.length-1];F.label=T,F.identifier=pe(this.sliceSerialize(S)).toLowerCase()}function v(){const S=this.resume(),T=this.stack[this.stack.length-1];T.title=S}function _(){const S=this.resume(),T=this.stack[this.stack.length-1];T.url=S}function D(S){const T=this.stack[this.stack.length-1];if(!T.depth){const F=this.sliceSerialize(S).length;T.depth=F}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function I(S){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function B(S){const F=this.stack[this.stack.length-1].children;let $=F[F.length-1];(!$||$.type!=="text")&&($=Ll(),$.position={start:Ce(S.start),end:void 0},F.push($)),this.stack.push($)}function b(S){const T=this.stack.pop();T.value+=this.sliceSerialize(S),T.position.end=Ce(S.end)}function N(S){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=T.children[T.children.length-1];F.position.end=Ce(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(T.type)&&(B.call(this,S),b.call(this,S))}function P(){this.data.atHardBreak=!0}function H(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function L(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function j(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function q(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=T,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function Y(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=T,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function oe(S){const T=this.sliceSerialize(S),F=this.stack[this.stack.length-2];F.label=Tu(T),F.identifier=pe(T).toLowerCase()}function de(){const S=this.stack[this.stack.length-1],T=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const $=S.children;F.children=$}else F.alt=T}function g(){const S=this.resume(),T=this.stack[this.stack.length-1];T.url=S}function se(){const S=this.resume(),T=this.stack[this.stack.length-1];T.title=S}function ge(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ae(S){const T=this.resume(),F=this.stack[this.stack.length-1];F.label=T,F.identifier=pe(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function je(S){this.data.characterReferenceType=S.type}function X(S){const T=this.sliceSerialize(S),F=this.data.characterReferenceType;let $;F?($=vi(T,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=Nn(T);const V=this.stack[this.stack.length-1];V.value+=$}function Je(S){const T=this.stack.pop();T.position.end=Ce(S.end)}function Se(S){b.call(this,S);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(S)}function Le(S){b.call(this,S);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(S)}function De(){return{type:"blockquote",children:[]}}function gt(){return{type:"code",lang:null,meta:null,value:""}}function Tl(){return{type:"inlineCode",value:""}}function jl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Il(){return{type:"emphasis",children:[]}}function Zn(){return{type:"heading",depth:0,children:[]}}function er(){return{type:"break"}}function tr(){return{type:"html",value:""}}function Nl(){return{type:"image",title:null,url:"",alt:null}}function nr(){return{type:"link",title:null,url:"",children:[]}}function rr(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function Pl(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function _l(){return{type:"paragraph",children:[]}}function zl(){return{type:"strong",children:[]}}function Ll(){return{type:"text",value:""}}function Dl(){return{type:"thematicBreak"}}}function Ce(e){return{line:e.line,column:e.column,offset:e.offset}}function Di(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Di(e,r):Pu(e,r)}}function Pu(e,t){let n;for(n in t)if(Li.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 jr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+nt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+nt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+nt({start:t.start,end:t.end})+") is still open")}function _u(e){const t=this;t.parser=n;function n(r){return Iu(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zu(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 Lu(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
52
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function Cu(e){const r={constructs:Ci([ku,...(e||{}).extensions||[]]),content:i(Os),defined:[],document:i(Bs),flow:i(iu),lazy:{},string:i(su),text:i(au)};return r;function i(l){return o;function o(s){return bu(r,l,s)}}}function vu(e){for(;!ji(e););return e}const Tr=/[\0\t\n\r]/g;function Au(){let e=1,t="",n=!0,r;return i;function i(l,o,s){const a=[];let u,f,c,h,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(Tr.lastIndex=c,u=Tr.exec(l),h=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(h),!u){t=l.slice(c);break}if(p===10&&c===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<h&&(a.push(l.slice(c,h)),e+=h-c),p){case 0:{a.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,a.push(-2);e++<f;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const Eu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Tu(e){return e.replace(Eu,ju)}function ju(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return vi(n.slice(l?2:1),l?16:10)}return Nn(n)||e}const Li={}.hasOwnProperty;function Iu(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Nu(n)(vu(Cu(n).document().write(Au()(e,t,!0))))}function Nu(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(nr),autolinkProtocol:B,autolinkEmail:B,atxHeading:l(Zn),blockQuote:l(De),characterEscape:B,characterReference:B,codeFenced:l(gt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(gt,o),codeText:l(Tl,o),codeTextData:B,data:B,codeFlowValue:B,definition:l(jl),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Il),hardBreakEscape:l(er),hardBreakTrailing:l(er),htmlFlow:l(tr,o),htmlFlowData:B,htmlText:l(tr,o),htmlTextData:B,image:l(Nl),label:o,link:l(nr),listItem:l(_l),listItemValue:h,listOrdered:l(rr,c),listUnordered:l(rr),paragraph:l(Pl),reference:x,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Zn),strong:l(zl),thematicBreak:l(Dl)},exit:{atxHeading:a(),atxHeadingSequence:D,autolink:a(),autolinkEmail:Le,autolinkProtocol:Se,blockQuote:a(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:je,characterReferenceMarkerNumeric:je,characterReferenceValue:X,characterReference:Je,codeFenced:a(w),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:b,codeIndented:a(y),codeText:a(j),codeTextData:b,data:b,definition:a(),definitionDestinationString:P,definitionLabelString:A,definitionTitleString:v,emphasis:a(),hardBreakEscape:a(_),hardBreakTrailing:a(_),htmlFlow:a(H),htmlFlowData:b,htmlText:a(L),htmlTextData:b,image:a(Y),label:de,labelText:oe,lineEnding:N,link:a(q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ae,resourceDestinationString:g,resourceTitleString:se,resource:ge,setextHeading:a(O),setextHeadingLineSequence:I,setextHeadingText:C,strong:a(),thematicBreak:a()}};Di(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(S){let T={type:"root",children:[]};const F={stack:[T],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:f,data:n},$=[];let V=-1;for(;++V<S.length;)if(S[V][1].type==="listOrdered"||S[V][1].type==="listUnordered")if(S[V][0]==="enter")$.push(V);else{const ue=$.pop();V=i(S,ue,V)}for(V=-1;++V<S.length;){const ue=t[S[V][0]];Li.call(ue,S[V][1].type)&&ue[S[V][1].type].call(Object.assign({sliceSerialize:S[V][2].sliceSerialize},F),S[V][1])}if(F.tokenStack.length>0){const ue=F.tokenStack[F.tokenStack.length-1];(ue[1]||jr).call(F,void 0,ue[0])}for(T.position={start:Ce(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:Ce(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)T=t.transforms[V](T)||T;return T}function i(S,T,F){let $=T-1,V=-1,ue=!1,Ie,xe,Ye,Xe;for(;++$<=F;){const ne=S[$];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,Xe=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Ie&&!Xe&&!V&&!Ye&&(Ye=$),Xe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xe=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(Ie){let Fe=$;for(xe=void 0;Fe--;){const ye=S[Fe];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;xe&&(S[xe][1].type="lineEndingBlank",ue=!0),ye[1].type="lineEnding",xe=Fe}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}Ye&&(!xe||Ye<xe)&&(Ie._spread=!0),Ie.end=Object.assign({},xe?S[xe][1].start:ne[1].end),S.splice(xe||$,0,["exit",Ie,ne[2]]),$++,F++}if(ne[1].type==="listItemPrefix"){const Fe={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Ie=Fe,S.splice($,0,["enter",Fe,ne[2]]),$++,F++,Ye=void 0,Xe=!0}}}return S[T][1]._spread=ue,F}function l(S,T){return F;function F($){s.call(this,S($),$),T&&T.call(this,$)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(S,T,F){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([T,F||void 0]),S.position={start:Ce(T.start),end:void 0}}function a(S){return T;function T(F){S&&S.call(this,F),u.call(this,F)}}function u(S,T){const F=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==S.type&&(T?T.call(this,S,$[0]):($[1]||jr).call(this,S,$[0]));else throw new Error("Cannot close `"+S.type+"` ("+nt({start:S.start,end:S.end})+"): it’s not open");F.position.end=Ce(S.end)}function f(){return In(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(S){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function p(){const S=this.resume(),T=this.stack[this.stack.length-1];T.lang=S}function d(){const S=this.resume(),T=this.stack[this.stack.length-1];T.meta=S}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S.replace(/(\r?\n|\r)$/g,"")}function A(S){const T=this.resume(),F=this.stack[this.stack.length-1];F.label=T,F.identifier=pe(this.sliceSerialize(S)).toLowerCase()}function v(){const S=this.resume(),T=this.stack[this.stack.length-1];T.title=S}function P(){const S=this.resume(),T=this.stack[this.stack.length-1];T.url=S}function D(S){const T=this.stack[this.stack.length-1];if(!T.depth){const F=this.sliceSerialize(S).length;T.depth=F}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function I(S){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function B(S){const F=this.stack[this.stack.length-1].children;let $=F[F.length-1];(!$||$.type!=="text")&&($=Ll(),$.position={start:Ce(S.start),end:void 0},F.push($)),this.stack.push($)}function b(S){const T=this.stack.pop();T.value+=this.sliceSerialize(S),T.position.end=Ce(S.end)}function N(S){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=T.children[T.children.length-1];F.position.end=Ce(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(T.type)&&(B.call(this,S),b.call(this,S))}function _(){this.data.atHardBreak=!0}function H(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function L(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function j(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function q(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=T,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function Y(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=T,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function oe(S){const T=this.sliceSerialize(S),F=this.stack[this.stack.length-2];F.label=Tu(T),F.identifier=pe(T).toLowerCase()}function de(){const S=this.stack[this.stack.length-1],T=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const $=S.children;F.children=$}else F.alt=T}function g(){const S=this.resume(),T=this.stack[this.stack.length-1];T.url=S}function se(){const S=this.resume(),T=this.stack[this.stack.length-1];T.title=S}function ge(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ae(S){const T=this.resume(),F=this.stack[this.stack.length-1];F.label=T,F.identifier=pe(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function je(S){this.data.characterReferenceType=S.type}function X(S){const T=this.sliceSerialize(S),F=this.data.characterReferenceType;let $;F?($=vi(T,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=Nn(T);const V=this.stack[this.stack.length-1];V.value+=$}function Je(S){const T=this.stack.pop();T.position.end=Ce(S.end)}function Se(S){b.call(this,S);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(S)}function Le(S){b.call(this,S);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(S)}function De(){return{type:"blockquote",children:[]}}function gt(){return{type:"code",lang:null,meta:null,value:""}}function Tl(){return{type:"inlineCode",value:""}}function jl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Il(){return{type:"emphasis",children:[]}}function Zn(){return{type:"heading",depth:0,children:[]}}function er(){return{type:"break"}}function tr(){return{type:"html",value:""}}function Nl(){return{type:"image",title:null,url:"",alt:null}}function nr(){return{type:"link",title:null,url:"",children:[]}}function rr(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function _l(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Pl(){return{type:"paragraph",children:[]}}function zl(){return{type:"strong",children:[]}}function Ll(){return{type:"text",value:""}}function Dl(){return{type:"thematicBreak"}}}function Ce(e){return{line:e.line,column:e.column,offset:e.offset}}function Di(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Di(e,r):_u(e,r)}}function _u(e,t){let n;for(n in t)if(Li.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 jr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+nt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+nt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+nt({start:t.start,end:t.end})+") is still open")}function Pu(e){const t=this;t.parser=n;function n(r){return Iu(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zu(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 Lu(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
53
53
  `}]}function Du(e,t){const n=t.value?t.value+`
54
54
  `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Fu(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mu(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ou(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ge(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};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 Bu(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Fi(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),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function $u(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fi(e,t);const i={src:Ge(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function Uu(e,t){const n={src:Ge(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 Hu(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 qu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fi(e,t);const i={href:Ge(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Vu(e,t){const n={href:Ge(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 Wu(e,t,n){const r=e.all(t),i=n?Gu(n):Mi(t),l={},o=[];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:[]}),l.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
55
55
  `}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&o.push({type:"text",value:`
56
- `});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)}function Gu(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=Mi(n[r])}return t}function Mi(e){const t=e.spread;return t??e.children.length>1}function Ju(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function Yu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xu(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Qu(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ku(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=An(t.children[1]),a=gi(t.children[t.children.length-1]);s&&a&&(o.position={start:s,end:a}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Zu(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const c=t.children[a],h={},p=o?o[a]:void 0;p&&(h.align=p);let d={type:"element",tagName:l,properties:h,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),u.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function ec(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ir=9,Nr=32;function tc(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(Pr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(Pr(t.slice(i),i>0,!1)),l.join("")}function Pr(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===Ir||l===Nr;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===Ir||l===Nr;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function nc(e,t){const n={type:"text",value:tc(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rc(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ic={blockquote:zu,break:Lu,code:Du,delete:Fu,emphasis:Mu,footnoteReference:Ou,heading:Ru,html:Bu,imageReference:$u,image:Uu,inlineCode:Hu,linkReference:qu,link:Vu,listItem:Wu,list:Ju,paragraph:Yu,root:Xu,strong:Qu,table:Ku,tableCell:ec,tableRow:Zu,text:nc,thematicBreak:rc,toml:xt,yaml:xt,definition:xt,footnoteDefinition:xt};function xt(){}const Oi=-1,Dt=0,it=1,jt=2,_n=3,zn=4,Ln=5,Dn=6,Ri=7,Bi=8,_r=typeof self=="object"?self:globalThis,lc=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case Dt:case Oi:return n(o,i);case it:{const s=n([],i);for(const a of o)s.push(r(a));return s}case jt:{const s=n({},i);for(const[a,u]of o)s[r(a)]=r(u);return s}case _n:return n(new Date(o),i);case zn:{const{source:s,flags:a}=o;return n(new RegExp(s,a),i)}case Ln:{const s=n(new Map,i);for(const[a,u]of o)s.set(r(a),r(u));return s}case Dn:{const s=n(new Set,i);for(const a of o)s.add(r(a));return s}case Ri:{const{name:s,message:a}=o;return n(new _r[s](a),i)}case Bi:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}}return n(new _r[l](o),i)};return r},zr=e=>lc(new Map,e)(0),Oe="",{toString:oc}={},{keys:sc}=Object,et=e=>{const t=typeof e;if(t!=="object"||!e)return[Dt,t];const n=oc.call(e).slice(8,-1);switch(n){case"Array":return[it,Oe];case"Object":return[jt,Oe];case"Date":return[_n,Oe];case"RegExp":return[zn,Oe];case"Map":return[Ln,Oe];case"Set":return[Dn,Oe];case"DataView":return[it,n]}return n.includes("Array")?[it,n]:n.includes("Error")?[Ri,n]:[jt,n]},yt=([e,t])=>e===Dt&&(t==="function"||t==="symbol"),ac=(e,t,n,r)=>{const i=(o,s)=>{const a=r.push(o)-1;return n.set(s,a),a},l=o=>{if(n.has(o))return n.get(o);let[s,a]=et(o);switch(s){case Dt:{let f=o;switch(a){case"bigint":s=Bi,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([Oi],o)}return i([s,f],o)}case it:{if(a){let h=o;return a==="DataView"?h=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(o)),i([a,[...h]],o)}const f=[],c=i([s,f],o);for(const h of o)f.push(l(h));return c}case jt:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const f=[],c=i([s,f],o);for(const h of sc(o))(e||!yt(et(o[h])))&&f.push([l(h),l(o[h])]);return c}case _n:return i([s,o.toISOString()],o);case zn:{const{source:f,flags:c}=o;return i([s,{source:f,flags:c}],o)}case Ln:{const f=[],c=i([s,f],o);for(const[h,p]of o)(e||!(yt(et(h))||yt(et(p))))&&f.push([l(h),l(p)]);return c}case Dn:{const f=[],c=i([s,f],o);for(const h of o)(e||!yt(et(h)))&&f.push(l(h));return c}}const{message:u}=o;return i([s,{name:a,message:u}],o)};return l},Lr=(e,{json:t,lossy:n}={})=>{const r=[];return ac(!(t||n),!!t,new Map,r)(e),r},It=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zr(Lr(e,t)):structuredClone(e):(e,t)=>zr(Lr(e,t));function uc(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 cc(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function fc(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||uc,r=e.options.footnoteBackLabel||cc,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[a]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=Ge(c.toLowerCase());let p=0;const d=[],k=e.footnoteCounts.get(c);for(;k!==void 0&&++p<=k;){d.length>0&&d.push({type:"text",value:" "});let A=typeof n=="string"?n:n(a,p);typeof A=="string"&&(A={type:"text",value:A}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const A=w.children[w.children.length-1];A&&A.type==="text"?A.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...d)}else f.push(...d);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...It(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
56
+ `});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)}function Gu(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=Mi(n[r])}return t}function Mi(e){const t=e.spread;return t??e.children.length>1}function Ju(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function Yu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xu(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Qu(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ku(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=An(t.children[1]),a=gi(t.children[t.children.length-1]);s&&a&&(o.position={start:s,end:a}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Zu(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const c=t.children[a],h={},p=o?o[a]:void 0;p&&(h.align=p);let d={type:"element",tagName:l,properties:h,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),u.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function ec(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ir=9,Nr=32;function tc(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(_r(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(_r(t.slice(i),i>0,!1)),l.join("")}function _r(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===Ir||l===Nr;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===Ir||l===Nr;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function nc(e,t){const n={type:"text",value:tc(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rc(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ic={blockquote:zu,break:Lu,code:Du,delete:Fu,emphasis:Mu,footnoteReference:Ou,heading:Ru,html:Bu,imageReference:$u,image:Uu,inlineCode:Hu,linkReference:qu,link:Vu,listItem:Wu,list:Ju,paragraph:Yu,root:Xu,strong:Qu,table:Ku,tableCell:ec,tableRow:Zu,text:nc,thematicBreak:rc,toml:xt,yaml:xt,definition:xt,footnoteDefinition:xt};function xt(){}const Oi=-1,Dt=0,it=1,jt=2,Pn=3,zn=4,Ln=5,Dn=6,Ri=7,Bi=8,Pr=typeof self=="object"?self:globalThis,lc=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case Dt:case Oi:return n(o,i);case it:{const s=n([],i);for(const a of o)s.push(r(a));return s}case jt:{const s=n({},i);for(const[a,u]of o)s[r(a)]=r(u);return s}case Pn:return n(new Date(o),i);case zn:{const{source:s,flags:a}=o;return n(new RegExp(s,a),i)}case Ln:{const s=n(new Map,i);for(const[a,u]of o)s.set(r(a),r(u));return s}case Dn:{const s=n(new Set,i);for(const a of o)s.add(r(a));return s}case Ri:{const{name:s,message:a}=o;return n(new Pr[s](a),i)}case Bi:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}}return n(new Pr[l](o),i)};return r},zr=e=>lc(new Map,e)(0),Oe="",{toString:oc}={},{keys:sc}=Object,et=e=>{const t=typeof e;if(t!=="object"||!e)return[Dt,t];const n=oc.call(e).slice(8,-1);switch(n){case"Array":return[it,Oe];case"Object":return[jt,Oe];case"Date":return[Pn,Oe];case"RegExp":return[zn,Oe];case"Map":return[Ln,Oe];case"Set":return[Dn,Oe];case"DataView":return[it,n]}return n.includes("Array")?[it,n]:n.includes("Error")?[Ri,n]:[jt,n]},yt=([e,t])=>e===Dt&&(t==="function"||t==="symbol"),ac=(e,t,n,r)=>{const i=(o,s)=>{const a=r.push(o)-1;return n.set(s,a),a},l=o=>{if(n.has(o))return n.get(o);let[s,a]=et(o);switch(s){case Dt:{let f=o;switch(a){case"bigint":s=Bi,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([Oi],o)}return i([s,f],o)}case it:{if(a){let h=o;return a==="DataView"?h=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(o)),i([a,[...h]],o)}const f=[],c=i([s,f],o);for(const h of o)f.push(l(h));return c}case jt:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const f=[],c=i([s,f],o);for(const h of sc(o))(e||!yt(et(o[h])))&&f.push([l(h),l(o[h])]);return c}case Pn:return i([s,o.toISOString()],o);case zn:{const{source:f,flags:c}=o;return i([s,{source:f,flags:c}],o)}case Ln:{const f=[],c=i([s,f],o);for(const[h,p]of o)(e||!(yt(et(h))||yt(et(p))))&&f.push([l(h),l(p)]);return c}case Dn:{const f=[],c=i([s,f],o);for(const h of o)(e||!yt(et(h)))&&f.push(l(h));return c}}const{message:u}=o;return i([s,{name:a,message:u}],o)};return l},Lr=(e,{json:t,lossy:n}={})=>{const r=[];return ac(!(t||n),!!t,new Map,r)(e),r},It=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zr(Lr(e,t)):structuredClone(e):(e,t)=>zr(Lr(e,t));function uc(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 cc(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function fc(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||uc,r=e.options.footnoteBackLabel||cc,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[a]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=Ge(c.toLowerCase());let p=0;const d=[],k=e.footnoteCounts.get(c);for(;k!==void 0&&++p<=k;){d.length>0&&d.push({type:"text",value:" "});let A=typeof n=="string"?n:n(a,p);typeof A=="string"&&(A={type:"text",value:A}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const A=w.children[w.children.length-1];A&&A.type==="text"?A.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...d)}else f.push(...d);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...It(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
57
57
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
58
58
  `}]}}const Ft=(function(e){if(e==null)return dc;if(typeof e=="function")return Mt(e);if(typeof e=="object")return Array.isArray(e)?pc(e):hc(e);if(typeof e=="string")return mc(e);throw new Error("Expected function, string, or object as test")});function pc(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ft(e[n]);return Mt(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function hc(e){const t=e;return Mt(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function mc(e){return Mt(t);function t(n){return n&&n.type===e}}function Mt(e){return t;function t(n,r,i){return!!(gc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function dc(){return!0}function gc(e){return e!==null&&typeof e=="object"&&"type"in e}const $i=[],xc=!0,mn=!1,yc="skip";function Ui(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=Ft(i),o=r?-1:1;s(e,void 0,[])();function s(a,u,f){const c=a&&typeof a=="object"?a:{};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 ("+(a.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=$i,d,k,w;if((!t||l(a,u,f[f.length-1]||void 0))&&(p=kc(n(a,f)),p[0]===mn))return p;if("children"in a&&a.children){const y=a;if(y.children&&p[0]!==yc)for(k=(r?y.children.length:-1)+o,w=f.concat(y);k>-1&&k<y.children.length;){const A=y.children[k];if(d=s(A,k,w)(),d[0]===mn)return d;k=typeof d[1]=="number"?d[1]:k+o}}return p}}}function kc(e){return Array.isArray(e)?e:typeof e=="number"?[xc,e]:e==null?$i:[e]}function Fn(e,t,n,r){let i,l,o;typeof t=="function"&&typeof n!="function"?(l=void 0,o=t,i=n):(l=t,o=n,i=r),Ui(e,l,s,i);function s(a,u){const f=u[u.length-1],c=f?f.children.indexOf(a):void 0;return o(a,c,f)}}const dn={}.hasOwnProperty,bc={};function wc(e,t){const n=t||bc,r=new Map,i=new Map,l=new Map,o={...ic,...n.handlers},s={all:u,applyData:Cc,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:a,options:n,patch:Sc,wrap:Ac};return Fn(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)}}),s;function a(f,c){const h=f.type,p=s.handlers[h];if(dn.call(s.handlers,h)&&p)return p(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in f){const{children:k,...w}=f,y=It(w);return y.children=s.all(f),y}return It(f)}return(s.options.unknownHandler||vc)(s,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const d=s.one(h[p],f);if(d){if(p&&h[p-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=Dr(d.value)),!Array.isArray(d)&&d.type==="element")){const k=d.children[0];k&&k.type==="text"&&(k.value=Dr(k.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c}}function Sc(e,t){e.position&&(t.position=cs(e))}function Cc(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,It(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function vc(e,t){const n=t.data||{},r="value"in t&&!(dn.call(n,"hProperties")||dn.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 Ac(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
59
59
  `});++r<e.length;)r&&n.push({type:"text",value:`
60
60
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
61
61
  `}),n}function Dr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Fr(e,t){const n=wc(e,t),r=n.one(e,void 0),i=fc(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
62
- `},i),l}function Ec(e,t){return e&&"run"in e?async function(n,r){const i=Fr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Fr(n,{file:r,...e||t})}}function Mr(e){if(e)throw e}var qt,Or;function Tc(){if(Or)return qt;Or=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]"},l=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)},o=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},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return qt=function a(){var u,f,c,h,p,d,k=arguments[0],w=1,y=arguments.length,A=!1;for(typeof k=="boolean"&&(A=k,k=arguments[1]||{},w=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});w<y;++w)if(u=arguments[w],u!=null)for(f in u)c=s(k,f),h=s(u,f),k!==h&&(A&&h&&(l(h)||(p=i(h)))?(p?(p=!1,d=c&&i(c)?c:[]):d=c&&l(c)?c:{},o(k,{name:f,newValue:a(A,d,h)})):typeof h<"u"&&o(k,{name:f,newValue:h}));return k},qt}var jc=Tc();const Vt=ei(jc);function gn(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 Ic(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(a,...u){const f=e[++l];let c=-1;if(a){o(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Nc(f,s)(...u):o(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 Nc(e,t){let n;return r;function r(...o){const s=e.length>o.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const he={basename:Pc,dirname:_c,extname:zc,join:Lc,sep:"/"};function Pc(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');dt(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function _c(e){if(dt(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 zc(e){dt(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Lc(...e){let t=-1,n;for(;++t<e.length;)dt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Dc(n)}function Dc(e){dt(e);const t=e.codePointAt(0)===47;let n=Fc(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Fc(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function dt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mc={cwd:Oc};function Oc(){return"/"}function xn(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(!xn(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 Bc(e)}function Bc(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 Wt=["history","path","basename","stem","extname","dirname"];class Hi{constructor(t){let n;t?xn(t)?n={path:t}:typeof t=="string"||$c(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Mc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Wt.length;){const l=Wt[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Wt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?he.basename(this.path):void 0}set basename(t){Jt(t,"basename"),Gt(t,"basename"),this.path=he.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?he.dirname(this.path):void 0}set dirname(t){Rr(this.basename,"dirname"),this.path=he.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?he.extname(this.path):void 0}set extname(t){if(Gt(t,"extname"),Rr(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=he.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){xn(t)&&(t=Rc(t)),Jt(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?he.basename(this.path,this.extname):void 0}set stem(t){Jt(t,"stem"),Gt(t,"stem"),this.path=he.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 K(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 Gt(e,t){if(e&&e.includes(he.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+he.sep+"`")}function Jt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Rr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $c(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Uc=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),Hc={}.hasOwnProperty;class Mn extends Uc{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=Ic()}copy(){const t=new Mn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Vt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Qt("data",this.frozen),this.namespace[t]=n,this):Hc.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Qt("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=kt(t),r=this.parser||this.Parser;return Yt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Yt("process",this.parser||this.Parser),Xt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=kt(t),a=r.parse(s);r.run(a,s,function(f,c,h){if(f||!c||!h)return u(f);const p=c,d=r.stringify(p,h);Wc(d)?h.value=d:h.result=d,u(f,h)});function u(f,c){f||!c?o(f):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Yt("processSync",this.parser||this.Parser),Xt("processSync",this.compiler||this.Compiler),this.process(t,i),$r("processSync","process",n),r;function i(l,o){n=!0,Mr(l),r=o}}run(t,n,r){Br(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const a=kt(n);i.run(t,a,u);function u(f,c,h){const p=c||t;f?s(f):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),$r("runSync","run",r),i;function l(o,s){Mr(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=kt(n),i=this.compiler||this.Compiler;return Xt("stringify",i),Br(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Qt("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;a(f,c)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(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");s(u.plugins),u.settings&&(i.settings=Vt(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];l(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(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,...d]=f;const k=r[h][1];gn(k)&&gn(p)&&(p=Vt(!0,k,p)),r[h]=[u,p,...d]}}}}const qc=new Mn().freeze();function Yt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qt(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 Br(e){if(!gn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $r(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kt(e){return Vc(e)?e:new Hi(e)}function Vc(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Wc(e){return typeof e=="string"||Gc(e)}function Gc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Jc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ur=[],Hr={allowDangerousHtml:!0},Yc=/^(https?|ircs?|mailto|xmpp)$/i,Xc=[{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 Qc(e){const t=Kc(e),n=Zc(e);return ef(t.runSync(t.parse(n),n),e)}function Kc(e){const t=e.rehypePlugins||Ur,n=e.remarkPlugins||Ur,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Hr}:Hr;return qc().use(_u).use(n).use(Ec,r).use(t)}function Zc(e){const t=e.children||"",n=new Hi;return typeof t=="string"&&(n.value=t),n}function ef(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||tf;for(const f of Xc)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Jc+f.id,void 0);return Fn(e,u),ds(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 o?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in $t)if(Object.hasOwn($t,p)&&Object.hasOwn(f.properties,p)){const d=f.properties[p],k=$t[p];(k===null||k.includes(f.tagName))&&(f.properties[p]=a(String(d||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return s&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function tf(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||Yc.test(e.slice(0,t))?e:""}function nf(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function qi(e,t,n){const i=Ft((n||{}).ignore||[]),l=rf(t);let o=-1;for(;++o<l.length;)Ui(e,"text",s);function s(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],d=h?h.children:void 0;if(i(p,d?d.indexOf(p):void 0,h))return;h=p}if(h)return a(u,f)}function a(u,f){const c=f[f.length-1],h=l[o][0],p=l[o][1];let d=0;const w=c.children.indexOf(u);let y=!1,A=[];h.lastIndex=0;let v=h.exec(u.value);for(;v;){const _=v.index,D={index:v.index,input:v.input,stack:[...f,u]};let C=p(...v,D);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=_+1:(d!==_&&A.push({type:"text",value:u.value.slice(d,_)}),Array.isArray(C)?A.push(...C):C&&A.push(C),d=_+v[0].length,y=!0),!h.global)break;v=h.exec(u.value)}return y?(d<u.value.length&&A.push({type:"text",value:u.value.slice(d)}),c.children.splice(w,1,...A)):A=[u],w+A.length}}function rf(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([lf(i[0]),of(i[1])])}return t}function lf(e){return typeof e=="string"?new RegExp(nf(e),"g"):e}function of(e){return typeof e=="function"?e:function(){return e}}function sf(e){qi(e,[/\r?\n|\r/g,af])}function af(){return{type:"break"}}function uf(){return function(e){sf(e)}}function qr(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 Kt="phrasing",Zt=["autolink","link","image","label"];function cf(){return{transforms:[xf],enter:{literalAutolink:pf,literalAutolinkEmail:en,literalAutolinkHttp:en,literalAutolinkWww:en},exit:{literalAutolink:gf,literalAutolinkEmail:df,literalAutolinkHttp:hf,literalAutolinkWww:mf}}}function ff(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Kt,notInConstruct:Zt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Kt,notInConstruct:Zt},{character:":",before:"[ps]",after:"\\/",inConstruct:Kt,notInConstruct:Zt}]}}function pf(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function en(e){this.config.enter.autolinkProtocol.call(this,e)}function hf(e){this.config.exit.autolinkProtocol.call(this,e)}function mf(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 df(e){this.config.exit.autolinkEmail.call(this,e)}function gf(e){this.exit(e)}function xf(e){qi(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yf],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,kf]],{ignore:["link","linkReference"]})}function yf(e,t,n,r,i){let l="";if(!Vi(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!bf(n)))return!1;const o=wf(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function kf(e,t,n,r){return!Vi(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function bf(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 wf(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=qr(e,"(");let l=qr(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Vi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||_e(n)||zt(n))&&(!t||n!==47)}Wi.peek=Nf;function Sf(){this.buffer()}function Cf(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vf(){this.buffer()}function Af(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ef(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Tf(e){this.exit(e)}function jf(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function If(e){this.exit(e)}function Nf(){return"["}function Wi(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function Pf(){return{enter:{gfmFootnoteCallString:Sf,gfmFootnoteCall:Cf,gfmFootnoteDefinitionLabelString:vf,gfmFootnoteDefinition:Af},exit:{gfmFootnoteCallString:Ef,gfmFootnoteCall:Tf,gfmFootnoteDefinitionLabelString:jf,gfmFootnoteDefinition:If}}}function _f(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Wi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let a=s.move("[^");const u=l.enter("footnoteDefinition"),f=l.enter("label");return a+=s.move(l.safe(l.associationId(r),{before:a,after:"]"})),f(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
63
- `:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Gi:zf))),u(),a}}function zf(e,t,n){return t===0?e:Gi(e,t,n)}function Gi(e,t,n){return(n?"":" ")+e}const Lf=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ji.peek=Rf;function Df(){return{canContainEols:["delete"],enter:{strikethrough:Mf},exit:{strikethrough:Of}}}function Ff(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Lf}],handlers:{delete:Ji}}}function Mf(e){this.enter({type:"delete",children:[]},e)}function Of(e){this.exit(e)}function Ji(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function Rf(){return"~"}function Bf(e){return e.length}function $f(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Bf,l=[],o=[],s=[],a=[];let u=0,f=-1;for(;++f<e.length;){const k=[],w=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const A=Uf(e[f][y]);if(n.alignDelimiters!==!1){const v=i(A);w[y]=v,(a[y]===void 0||v>a[y])&&(a[y]=v)}k.push(A)}o[f]=k,s[f]=w}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)l[c]=Vr(r[c]);else{const k=Vr(r);for(;++c<u;)l[c]=k}c=-1;const h=[],p=[];for(;++c<u;){const k=l[c];let w="",y="";k===99?(w=":",y=":"):k===108?w=":":k===114&&(y=":");let A=n.alignDelimiters===!1?1:Math.max(1,a[c]-w.length-y.length);const v=w+"-".repeat(A)+y;n.alignDelimiters!==!1&&(A=w.length+A+y.length,A>a[c]&&(a[c]=A),p[c]=A),h[c]=v}o.splice(1,0,h),s.splice(1,0,p),f=-1;const d=[];for(;++f<o.length;){const k=o[f],w=s[f];c=-1;const y=[];for(;++c<u;){const A=k[c]||"";let v="",_="";if(n.alignDelimiters!==!1){const D=a[c]-(w[c]||0),C=l[c];C===114?v=" ".repeat(D):C===99?D%2?(v=" ".repeat(D/2+.5),_=" ".repeat(D/2-.5)):(v=" ".repeat(D/2),_=v):_=" ".repeat(D)}n.delimiterStart!==!1&&!c&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||c)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(A),n.alignDelimiters!==!1&&y.push(_),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&y.push("|")}d.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return d.join(`
62
+ `},i),l}function Ec(e,t){return e&&"run"in e?async function(n,r){const i=Fr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Fr(n,{file:r,...e||t})}}function Mr(e){if(e)throw e}var qt,Or;function Tc(){if(Or)return qt;Or=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]"},l=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)},o=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},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return qt=function a(){var u,f,c,h,p,d,k=arguments[0],w=1,y=arguments.length,A=!1;for(typeof k=="boolean"&&(A=k,k=arguments[1]||{},w=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});w<y;++w)if(u=arguments[w],u!=null)for(f in u)c=s(k,f),h=s(u,f),k!==h&&(A&&h&&(l(h)||(p=i(h)))?(p?(p=!1,d=c&&i(c)?c:[]):d=c&&l(c)?c:{},o(k,{name:f,newValue:a(A,d,h)})):typeof h<"u"&&o(k,{name:f,newValue:h}));return k},qt}var jc=Tc();const Vt=ei(jc);function gn(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 Ic(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(a,...u){const f=e[++l];let c=-1;if(a){o(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Nc(f,s)(...u):o(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 Nc(e,t){let n;return r;function r(...o){const s=e.length>o.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const he={basename:_c,dirname:Pc,extname:zc,join:Lc,sep:"/"};function _c(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');dt(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Pc(e){if(dt(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 zc(e){dt(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Lc(...e){let t=-1,n;for(;++t<e.length;)dt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Dc(n)}function Dc(e){dt(e);const t=e.codePointAt(0)===47;let n=Fc(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Fc(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function dt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mc={cwd:Oc};function Oc(){return"/"}function xn(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(!xn(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 Bc(e)}function Bc(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 Wt=["history","path","basename","stem","extname","dirname"];class Hi{constructor(t){let n;t?xn(t)?n={path:t}:typeof t=="string"||$c(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Mc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Wt.length;){const l=Wt[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Wt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?he.basename(this.path):void 0}set basename(t){Jt(t,"basename"),Gt(t,"basename"),this.path=he.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?he.dirname(this.path):void 0}set dirname(t){Rr(this.basename,"dirname"),this.path=he.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?he.extname(this.path):void 0}set extname(t){if(Gt(t,"extname"),Rr(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=he.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){xn(t)&&(t=Rc(t)),Jt(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?he.basename(this.path,this.extname):void 0}set stem(t){Jt(t,"stem"),Gt(t,"stem"),this.path=he.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 K(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 Gt(e,t){if(e&&e.includes(he.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+he.sep+"`")}function Jt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Rr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $c(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Uc=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),Hc={}.hasOwnProperty;class Mn extends Uc{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=Ic()}copy(){const t=new Mn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Vt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Qt("data",this.frozen),this.namespace[t]=n,this):Hc.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Qt("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=kt(t),r=this.parser||this.Parser;return Yt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Yt("process",this.parser||this.Parser),Xt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=kt(t),a=r.parse(s);r.run(a,s,function(f,c,h){if(f||!c||!h)return u(f);const p=c,d=r.stringify(p,h);Wc(d)?h.value=d:h.result=d,u(f,h)});function u(f,c){f||!c?o(f):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Yt("processSync",this.parser||this.Parser),Xt("processSync",this.compiler||this.Compiler),this.process(t,i),$r("processSync","process",n),r;function i(l,o){n=!0,Mr(l),r=o}}run(t,n,r){Br(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const a=kt(n);i.run(t,a,u);function u(f,c,h){const p=c||t;f?s(f):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),$r("runSync","run",r),i;function l(o,s){Mr(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=kt(n),i=this.compiler||this.Compiler;return Xt("stringify",i),Br(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Qt("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;a(f,c)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(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");s(u.plugins),u.settings&&(i.settings=Vt(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];l(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(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,...d]=f;const k=r[h][1];gn(k)&&gn(p)&&(p=Vt(!0,k,p)),r[h]=[u,p,...d]}}}}const qc=new Mn().freeze();function Yt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qt(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 Br(e){if(!gn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $r(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kt(e){return Vc(e)?e:new Hi(e)}function Vc(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Wc(e){return typeof e=="string"||Gc(e)}function Gc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Jc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ur=[],Hr={allowDangerousHtml:!0},Yc=/^(https?|ircs?|mailto|xmpp)$/i,Xc=[{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 Qc(e){const t=Kc(e),n=Zc(e);return ef(t.runSync(t.parse(n),n),e)}function Kc(e){const t=e.rehypePlugins||Ur,n=e.remarkPlugins||Ur,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Hr}:Hr;return qc().use(Pu).use(n).use(Ec,r).use(t)}function Zc(e){const t=e.children||"",n=new Hi;return typeof t=="string"&&(n.value=t),n}function ef(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||tf;for(const f of Xc)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Jc+f.id,void 0);return Fn(e,u),ds(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 o?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in $t)if(Object.hasOwn($t,p)&&Object.hasOwn(f.properties,p)){const d=f.properties[p],k=$t[p];(k===null||k.includes(f.tagName))&&(f.properties[p]=a(String(d||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return s&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function tf(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||Yc.test(e.slice(0,t))?e:""}function nf(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function qi(e,t,n){const i=Ft((n||{}).ignore||[]),l=rf(t);let o=-1;for(;++o<l.length;)Ui(e,"text",s);function s(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],d=h?h.children:void 0;if(i(p,d?d.indexOf(p):void 0,h))return;h=p}if(h)return a(u,f)}function a(u,f){const c=f[f.length-1],h=l[o][0],p=l[o][1];let d=0;const w=c.children.indexOf(u);let y=!1,A=[];h.lastIndex=0;let v=h.exec(u.value);for(;v;){const P=v.index,D={index:v.index,input:v.input,stack:[...f,u]};let C=p(...v,D);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=P+1:(d!==P&&A.push({type:"text",value:u.value.slice(d,P)}),Array.isArray(C)?A.push(...C):C&&A.push(C),d=P+v[0].length,y=!0),!h.global)break;v=h.exec(u.value)}return y?(d<u.value.length&&A.push({type:"text",value:u.value.slice(d)}),c.children.splice(w,1,...A)):A=[u],w+A.length}}function rf(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([lf(i[0]),of(i[1])])}return t}function lf(e){return typeof e=="string"?new RegExp(nf(e),"g"):e}function of(e){return typeof e=="function"?e:function(){return e}}function sf(e){qi(e,[/\r?\n|\r/g,af])}function af(){return{type:"break"}}function uf(){return function(e){sf(e)}}function qr(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 Kt="phrasing",Zt=["autolink","link","image","label"];function cf(){return{transforms:[xf],enter:{literalAutolink:pf,literalAutolinkEmail:en,literalAutolinkHttp:en,literalAutolinkWww:en},exit:{literalAutolink:gf,literalAutolinkEmail:df,literalAutolinkHttp:hf,literalAutolinkWww:mf}}}function ff(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Kt,notInConstruct:Zt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Kt,notInConstruct:Zt},{character:":",before:"[ps]",after:"\\/",inConstruct:Kt,notInConstruct:Zt}]}}function pf(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function en(e){this.config.enter.autolinkProtocol.call(this,e)}function hf(e){this.config.exit.autolinkProtocol.call(this,e)}function mf(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 df(e){this.config.exit.autolinkEmail.call(this,e)}function gf(e){this.exit(e)}function xf(e){qi(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yf],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,kf]],{ignore:["link","linkReference"]})}function yf(e,t,n,r,i){let l="";if(!Vi(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!bf(n)))return!1;const o=wf(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function kf(e,t,n,r){return!Vi(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function bf(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 wf(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=qr(e,"(");let l=qr(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Vi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Pe(n)||zt(n))&&(!t||n!==47)}Wi.peek=Nf;function Sf(){this.buffer()}function Cf(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vf(){this.buffer()}function Af(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ef(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Tf(e){this.exit(e)}function jf(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function If(e){this.exit(e)}function Nf(){return"["}function Wi(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function _f(){return{enter:{gfmFootnoteCallString:Sf,gfmFootnoteCall:Cf,gfmFootnoteDefinitionLabelString:vf,gfmFootnoteDefinition:Af},exit:{gfmFootnoteCallString:Ef,gfmFootnoteCall:Tf,gfmFootnoteDefinitionLabelString:jf,gfmFootnoteDefinition:If}}}function Pf(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Wi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let a=s.move("[^");const u=l.enter("footnoteDefinition"),f=l.enter("label");return a+=s.move(l.safe(l.associationId(r),{before:a,after:"]"})),f(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
63
+ `:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Gi:zf))),u(),a}}function zf(e,t,n){return t===0?e:Gi(e,t,n)}function Gi(e,t,n){return(n?"":" ")+e}const Lf=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ji.peek=Rf;function Df(){return{canContainEols:["delete"],enter:{strikethrough:Mf},exit:{strikethrough:Of}}}function Ff(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Lf}],handlers:{delete:Ji}}}function Mf(e){this.enter({type:"delete",children:[]},e)}function Of(e){this.exit(e)}function Ji(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function Rf(){return"~"}function Bf(e){return e.length}function $f(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Bf,l=[],o=[],s=[],a=[];let u=0,f=-1;for(;++f<e.length;){const k=[],w=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const A=Uf(e[f][y]);if(n.alignDelimiters!==!1){const v=i(A);w[y]=v,(a[y]===void 0||v>a[y])&&(a[y]=v)}k.push(A)}o[f]=k,s[f]=w}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)l[c]=Vr(r[c]);else{const k=Vr(r);for(;++c<u;)l[c]=k}c=-1;const h=[],p=[];for(;++c<u;){const k=l[c];let w="",y="";k===99?(w=":",y=":"):k===108?w=":":k===114&&(y=":");let A=n.alignDelimiters===!1?1:Math.max(1,a[c]-w.length-y.length);const v=w+"-".repeat(A)+y;n.alignDelimiters!==!1&&(A=w.length+A+y.length,A>a[c]&&(a[c]=A),p[c]=A),h[c]=v}o.splice(1,0,h),s.splice(1,0,p),f=-1;const d=[];for(;++f<o.length;){const k=o[f],w=s[f];c=-1;const y=[];for(;++c<u;){const A=k[c]||"";let v="",P="";if(n.alignDelimiters!==!1){const D=a[c]-(w[c]||0),C=l[c];C===114?v=" ".repeat(D):C===99?D%2?(v=" ".repeat(D/2+.5),P=" ".repeat(D/2-.5)):(v=" ".repeat(D/2),P=v):P=" ".repeat(D)}n.delimiterStart!==!1&&!c&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||c)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(A),n.alignDelimiters!==!1&&y.push(P),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&y.push("|")}d.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return d.join(`
64
64
  `)}function Uf(e){return e==null?"":String(e)}function Vr(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 Hf(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),qf);return i(),o}function qf(e,t,n){return">"+(n?"":" ")+e}function Vf(e,t){return Wr(e,t.inConstruct,!0)&&!Wr(e,t.notInConstruct,!1)}function Wr(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 Gr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
65
65
  `&&Vf(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
66
66
  `}function Wf(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>o&&(o=l):l=1,i=r+t.length,r=n.indexOf(t,i);return o}function Gf(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 Jf(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 Yf(e,t,n,r){const i=Jf(n),l=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Gf(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(l,Xf);return c(),h}const s=n.createTracker(r),a=i.repeat(Math.max(Wf(l,i)+1,3)),u=n.enter("codeFenced");let f=s.move(a);if(e.lang){const c=n.enter(`codeFencedLang${o}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${o}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
@@ -74,11 +74,11 @@ import{c as be,j as m,E as Fl,aq as Ml,d as $e,G as Ol,H as Rl,ar as Bl,Y as $l,
74
74
  `))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),a=n.enter("phrasing");l.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
75
75
  `,...l.current()});return/^[\t ]/.test(u)&&(u=at(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),a(),s(),u}Xi.peek=np;function Xi(e){return e.value||""}function np(){return"<"}Qi.peek=rp;function Qi(e,t,n,r){const i=On(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),u+=a.move(")"),o(),u}function rp(){return"!"}Ki.peek=ip;function Ki(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const u=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function ip(){return"!"}Zi.peek=lp;function Zi(e,t,n){let r=e.value||"",i="`",l=-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+" ");++l<n.unsafe.length;){const o=n.unsafe[l],s=n.compilePattern(o);let a;if(o.atBreak)for(;a=s.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function lp(){return"`"}function el(e,t){const n=In(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))}tl.peek=op;function tl(e,t,n,r){const i=On(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,a;if(el(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let c=o.move("<");return c+=o.move(n.containerPhrasing(e,{before:c,after:">",...o.current()})),c+=o.move(">"),s(),n.stack=f,c}s=n.enter("link"),a=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${l}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),s(),u}function op(e,t,n){return el(e,n)?"<":"["}nl.peek=sp;function nl(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function sp(){return"["}function Rn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ap(e){const t=Rn(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 up(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 rl(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 cp(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?up(n):Rn(n);const s=e.ordered?o==="."?")":".":ap(n);let a=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&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&&(a=!0),rl(n)===o&&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"){a=!0;break}}}}a&&(o=s),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),u}function fp(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 pp(e,t,n,r){const i=fp(n);let l=n.bulletCurrent||Rn(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(o-l.length)),s.shift(o);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),f);return a(),u;function f(c,h,p){return h?(p?"":" ".repeat(o))+c:(p?l:l+" ".repeat(o-l.length))+c}}function hp(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}const mp=Ft(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dp(e,t,n,r){return(e.children.some(function(o){return mp(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gp(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}il.peek=xp;function il(e,t,n,r){const i=gp(n),l=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),f=Nt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=at(u)+a.slice(1));const c=a.charCodeAt(a.length-1),h=Nt(r.after.charCodeAt(0),c,i);h.inside&&(a=a.slice(0,-1)+at(c));const p=o.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},s+a+p}function xp(e,t,n){return n.options.strong||"*"}function yp(e,t,n,r){return n.safe(e.value,r)}function kp(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 bp(e,t,n){const r=(rl(n)+(n.options.ruleSpaces?" ":"")).repeat(kp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ll={blockquote:Hf,break:Gr,code:Yf,definition:Qf,emphasis:Yi,hardBreak:Gr,heading:tp,html:Xi,image:Qi,imageReference:Ki,inlineCode:Zi,link:tl,linkReference:nl,list:cp,listItem:pp,paragraph:hp,root:dp,strong:il,text:yp,thematicBreak:bp};function wp(){return{enter:{table:Sp,tableData:Jr,tableHeader:Jr,tableRow:vp},exit:{codeText:Ap,table:Cp,tableData:tn,tableHeader:tn,tableRow:tn}}}function Sp(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 Cp(e){this.exit(e),this.data.inTable=void 0}function vp(e){this.enter({type:"tableRow",children:[]},e)}function tn(e){this.exit(e)}function Jr(e){this.enter({type:"tableCell",children:[]},e)}function Ap(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ep));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ep(e,t){return t==="|"?t:e}function Tp(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
76
76
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:a,tableRow:s}};function o(p,d,k,w){return u(f(p,k,w),p.align)}function s(p,d,k,w){const y=c(p,k,w),A=u([y]);return A.slice(0,A.indexOf(`
77
- `))}function a(p,d,k,w){const y=k.enter("tableCell"),A=k.enter("phrasing"),v=k.containerPhrasing(p,{...w,before:l,after:l});return A(),y(),v}function u(p,d){return $f(p,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function f(p,d,k){const w=p.children;let y=-1;const A=[],v=d.enter("table");for(;++y<w.length;)A[y]=c(w[y],d,k);return v(),A}function c(p,d,k){const w=p.children;let y=-1;const A=[],v=d.enter("tableRow");for(;++y<w.length;)A[y]=a(w[y],p,d,k);return v(),A}function h(p,d,k){let w=ll.inlineCode(p,d,k);return k.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function jp(){return{exit:{taskListCheckValueChecked:Yr,taskListCheckValueUnchecked:Yr,paragraph:Np}}}function Ip(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Pp}}}function Yr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Np(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 l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===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 Pp(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let a=ll.listItem(e,t,n,{...r,...s.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(f){return f+o}}function _p(){return[cf(),Pf(),Df(),wp(),jp()]}function zp(e){return{extensions:[ff(),_f(e),Ff(),Tp(e),Ip()]}}const Lp={tokenize:Bp,partial:!0},ol={tokenize:$p,partial:!0},sl={tokenize:Up,partial:!0},al={tokenize:Hp,partial:!0},Dp={tokenize:qp,partial:!0},ul={name:"wwwAutolink",tokenize:Op,previous:fl},cl={name:"protocolAutolink",tokenize:Rp,previous:pl},we={name:"emailAutolink",tokenize:Mp,previous:hl},me={};function Fp(){return{text:me}}let Ne=48;for(;Ne<123;)me[Ne]=we,Ne++,Ne===58?Ne=65:Ne===91&&(Ne=97);me[43]=we;me[45]=we;me[46]=we;me[95]=we;me[72]=[we,cl];me[104]=[we,cl];me[87]=[we,ul];me[119]=[we,ul];function Mp(e,t,n){const r=this;let i,l;return o;function o(c){return!yn(c)||!hl.call(r,r.previous)||Bn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return yn(c)?(e.consume(c),s):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(Dp,f,u)(c):c===45||c===95||Q(c)?(l=!0,e.consume(c),a):f(c)}function u(c){return e.consume(c),i=!0,a}function f(c){return l&&i&&Z(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Op(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!fl.call(r,r.previous)||Bn(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lp,e.attempt(ol,e.attempt(sl,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Rp(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&pl.call(r,r.previous)&&!Bn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Z(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),l?u:(l=!0,a)):n(c)}function u(c){return c===null||Tt(c)||W(c)||_e(c)||zt(c)?n(c):e.attempt(ol,e.attempt(sl,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Bp(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function $p(e,t,n){let r,i,l;return o;function o(u){return u===46||u===95?e.check(al,a,s)(u):u===null||W(u)||_e(u)||u!==45&&zt(u)?a(u):(l=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function a(u){return i||r||!l?n(u):t(u)}}function Up(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(al,t,l)(o):o===null||W(o)||_e(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function Hp(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||W(s)||_e(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||W(s)||_e(s)?t(s):r(s)}function l(s){return Z(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Z(s)?(e.consume(s),o):n(s)}}function qp(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Q(l)?n(l):t(l)}}function fl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function pl(e){return!Z(e)}function hl(e){return!(e===47||yn(e))}function yn(e){return e===43||e===45||e===46||e===95||Q(e)}function Bn(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 Vp={tokenize:Zp,partial:!0};function Wp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Xp,continuation:{tokenize:Qp},exit:Kp}},text:{91:{name:"gfmFootnoteCall",tokenize:Yp},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Gp,resolveTo:Jp}}}}function Gp(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){o=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!o||!o._balanced)return n(a);const u=pe(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function Jp(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 l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Yp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a}function a(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(l>999||c===93&&!o||c===null||c===91||W(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(pe(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return W(c)||(o=!0),l++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,u):u(c)}}function Xp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return a;function a(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(o>999||d===93&&!s||d===null||d===91||W(d))return n(d);if(d===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=pe(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return W(d)||(s=!0),o++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,f):f(d)}function h(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(l)||i.push(l),U(e,p,"gfmFootnoteDefinitionWhitespace")):n(d)}function p(d){return t(d)}}function Qp(e,t,n){return e.check(mt,t,e.attempt(Vp,t,n))}function Kp(e){e.exit("gfmFootnoteDefinition")}function Zp(e,t,n){const r=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function eh(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let u=a;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[a][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[a][1].end)},c={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ie(h,h.length,0,Lt(p,o.slice(u+1,a),s)),ie(h,h.length,0,[["exit",c,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",f,s]]),ie(o,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function l(o,s,a){const u=this.previous,f=this.events;let c=0;return h;function h(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?a(d):(o.enter("strikethroughSequenceTemporary"),p(d))}function p(d){const k=Ue(u);if(d===126)return c>1?a(d):(o.consume(d),c++,p);if(c<2&&!n)return a(d);const w=o.exit("strikethroughSequenceTemporary"),y=Ue(d);return w._open=!y||y===2&&!!k,w._close=!k||k===2&&!!y,s(d)}}}class th{constructor(){this.map=[]}add(t,n,r){nh(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[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 l of i)t.push(l);i=r.pop()}this.map.length=0}}function nh(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 rh(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 l=r.length-1;r[l]=r[l]==="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 ih(){return{flow:{null:{name:"table",tokenize:lh,resolveAll:oh}}}}function lh(e,t,n){const r=this;let i=0,l=0,o;return s;function s(b){let N=r.events.length-1;for(;N>-1;){const L=r.events[N][1].type;if(L==="lineEnding"||L==="linePrefix")N--;else break}const P=N>-1?r.events[N][1].type:null,H=P==="tableHead"||P==="tableRow"?C:a;return H===C&&r.parser.lazy[r.now().line]?n(b):H(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(o=!0,l+=1),f(b)}function f(b){return b===null?n(b):z(b)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):R(b)?U(e,f,"whitespace")(b):(l+=1,o&&(o=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(b)))}function c(b){return b===null||b===124||W(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?h:c)}function h(b){return b===92||b===124?(e.consume(b),c):c(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),o=!1,R(b)?U(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):d(b))}function d(b){return b===45||b===58?w(b):b===124?(o=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),k):D(b)}function k(b){return R(b)?U(e,w,"whitespace")(b):w(b)}function w(b){return b===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):b===45?(l+=1,y(b)):b===null||z(b)?_(b):D(b)}function y(b){return b===45?(e.enter("tableDelimiterFiller"),A(b)):D(b)}function A(b){return b===45?(e.consume(b),A):b===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(b))}function v(b){return R(b)?U(e,_,"whitespace")(b):_(b)}function _(b){return b===124?d(b):b===null||z(b)?!o||i!==l?D(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):D(b)}function D(b){return n(b)}function C(b){return e.enter("tableRow"),I(b)}function I(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),I):b===null||z(b)?(e.exit("tableRow"),t(b)):R(b)?U(e,I,"whitespace")(b):(e.enter("data"),O(b))}function O(b){return b===null||b===124||W(b)?(e.exit("data"),I(b)):(e.consume(b),b===92?B:O)}function B(b){return b===92||b===124?(e.consume(b),O):O(b)}}function oh(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,a=0,u,f,c;const h=new th;for(;++n<e.length;){const p=e[n],d=p[1];p[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Xr(h,t,a,u,f),f=void 0,a=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",u,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",f,t]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=bt(h,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=bt(h,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):d.type==="tableHead"?(s=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,l[1]!==0?(o[0]=o[1],c=bt(h,t,l,i,n,c)):o[1]!==0&&(c=bt(h,t,o,i,n,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&Xr(h,t,a,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=rh(t.events,n))}return e}function bt(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},Re(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=Re(t.events,n[1]);if(l={type:o,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=Re(t.events,n[2]),f=Re(t.events,n[3]),c={type:s,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 d=n[2]+1,k=n[3]-n[2]-1;e.add(d,k,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},Re(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Xr(e,t,n,r,i){const l=[],o=Re(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function Re(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const sh={name:"tasklistCheck",tokenize:uh};function ah(){return{text:{91:sh}}}function uh(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return W(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return z(a)?t(a):R(a)?e.check({tokenize:ch},t,n)(a):n(a)}}function ch(e,t,n){return U(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fh(e){return Ci([Fp(),Wp(),eh(e),ih(),ah()])}const ph={};function hh(e){const t=this,n=e||ph,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fh(n)),l.push(_p()),o.push(zp(n))}function ut({payload:e,disabled:t=!1,bypassEnabled:n=!1,onBypassChange:r,onSubmit:i}){const[l,o]=fe.useState(()=>n?bo(e):e.questions.map(()=>[])),[s,a]=fe.useState(!1),[u,f]=fe.useState(!1);fe.useEffect(()=>{n&&o(d=>d.map((k,w)=>k.length>0?k:e.questions[w]?.options.length?[0]:[]))},[n,e]);const c=wo(e,l)&&!t&&!s&&!u&&!!i,h=(d,k)=>{t||u||s||o(w=>w.map((y,A)=>{if(A!==d)return y;const v=e.questions[A];return v?v.multiSelect?y.includes(k)?y.filter(_=>_!==k):[...y,k].sort((_,D)=>_-D):[k]:y}))},p=async()=>{if(!c||!i)return;a(!0);const d=await i(So(e,l));a(!1),d&&f(!0)};return m.jsxs("div",{className:"rounded-sm border border-primary/20 bg-primary/5 p-2.5 shadow-none",children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm border border-primary/20 bg-primary/10 text-primary shadow-none",children:m.jsx(Ql,{className:"h-3.5 w-3.5"})}),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-0.5 text-[11px] leading-5 text-muted-foreground",children:"Select the answer you want to send back to the agent."})]})]}),m.jsxs(At,{type:"button",variant:n?"secondary":"outline",size:"sm",onClick:()=>r?.(!n),className:"rounded-sm",children:[m.jsx(io,{className:"h-4 w-4"}),n?"Bypass on":"Bypass future questions"]})]}),m.jsx("div",{className:"mt-2.5 space-y-2.5",children:e.questions.map((d,k)=>{const w=l[k]??[];return m.jsxs("div",{className:"space-y-2 rounded-sm border border-border/60 bg-background/75 p-2.5",children:[m.jsxs("div",{children:[d.header&&m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:d.header}),m.jsx("div",{className:"mt-1 text-[12px] font-medium leading-5 text-foreground",children:d.question}),m.jsx("div",{className:"mt-1 text-[10px] text-muted-foreground",children:d.multiSelect?"Select one or more options.":"Select one option."})]}),m.jsx("div",{className:"space-y-1.5",children:d.options.map((y,A)=>{const v=w.includes(A);return m.jsxs("button",{type:"button",onClick:()=>h(k,A),disabled:t||s||u,"aria-pressed":v,className:$e("flex w-full items-start gap-2 rounded-sm border px-2.5 py-2 text-left transition-colors",v?"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:$e("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",v?"border-primary bg-primary text-primary-foreground":"border-border/70 bg-background text-transparent"),children:m.jsx(He,{className:"h-3.5 w-3.5"})}),m.jsxs("span",{className:"min-w-0",children:[m.jsx("span",{className:"block text-[12px] font-medium leading-5",children:y.label}),y.description&&m.jsx("span",{className:"mt-0.5 block text-[11px] leading-5 text-muted-foreground",children:y.description})]})]},`${y.label}-${A}`)})})]},`${d.header??"question"}-${k}`)})}),m.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center justify-between gap-2",children:[m.jsx("div",{className:"text-[11px] 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(At,{type:"button",onClick:()=>{p()},disabled:!c,className:"rounded-sm px-3",children:u?"Sent":s?"Sending...":e.questions.length>1?"Send answers":"Send answer"})]})]})}function mh({payload:e,disabled:t=!1,onSubmit:n}){const[r,i]=fe.useState(null),[l,o]=fe.useState(!1),s=!t&&!l&&!!n,a=async u=>{if(!s||!n)return;i(u);const f=await n(To(e,u));i(null),f&&o(!0)};return m.jsxs("div",{className:"rounded-sm border border-amber-500/25 bg-amber-500/5 p-2.5 shadow-none",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm border border-amber-500/25 bg-amber-500/10 text-amber-600 shadow-none dark:text-amber-400",children:m.jsx(no,{className:"h-3.5 w-3.5"})}),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-2",children:e.requests.map((u,f)=>m.jsxs("div",{className:"rounded-sm border border-border/60 bg-background/75 px-2.5 py-2",children:[m.jsx("div",{className:"text-[12px] font-medium leading-5 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-2.5 flex flex-wrap items-center justify-end gap-2",children:[m.jsxs(At,{type:"button",variant:"outline",onClick:()=>{a("deny")},disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(ti,{className:"h-4 w-4"}),l?"Sent":r==="deny"?"Sending...":"Deny"]}),m.jsxs(At,{type:"button",onClick:()=>{a("approve")},disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(He,{className:"h-4 w-4"}),l?"Sent":r==="approve"?"Sending...":"Approve"]})]})]})}const tt=6;function dh(e){return e.replace(/\s+/g," ").trim()}function ve(e,t=132){const n=dh(e);return n?n.length>t?`${n.slice(0,t-3)}...`:n:""}function kn(e,t=84){if(typeof e=="string")return ve(e,t);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){const n=e.slice(0,3).map(r=>kn(r,28)).filter(Boolean).join(", ");return ve(n||JSON.stringify(e),t)}if(typeof e=="object"&&e!==null){const n=Object.entries(e).slice(0,3).map(([r,i])=>`${r}: ${kn(i,32)}`).join(" · ");return ve(n||JSON.stringify(e),t)}return""}function ml(e){if(!e)return"No input";const t=Object.entries(e).slice(0,4).map(([n,r])=>`${n}: ${kn(r,40)}`).filter(n=>n.trim().length>0).join(" · ");return ve(t||JSON.stringify(e),156)||"No input"}function dl({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(Vl,{className:"h-2.5 w-2.5"}):m.jsx(Wl,{className:"h-2.5 w-2.5"})]})}function $n({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(ti,{className:"h-2 w-2"}):e==="success"?m.jsx(He,{className:"h-2 w-2"}):m.jsx(ri,{className:"h-1 w-1 fill-current"})})}function gl(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=qn(e).slice(0,160);return/\b(error|failed|exception|traceback)\b/i.test(n)?"failed":"success"}function Un({title:e,preview:t,icon:n,children:r,accentClassName:i,status:l="success",previewClassName:o="font-mono text-[9px] leading-3 text-muted-foreground/78"}){const[s,a]=fe.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:()=>a(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($n,{status:l}),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 ${o}`,children:t})]}),m.jsx(dl,{expanded:s})]}),s&&m.jsx("div",{className:"border-t border-border/18 px-2 py-1.5",children:r})]})}function xl({text:e,status:t="success"}){const n=ve(e,156);return m.jsx(Un,{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 yl({block:e,status:t="success",renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=String(e.name??"tool"),a=e.input,u=ft(e);if(u){const c=Ve(u);return n?.has(c)?null:(n?.add(c),m.jsx(ut,{payload:u,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const f=ml(a);if(s==="TodoWrite"){const c=kh(a?.todos);if(c.length>0)return m.jsx(bh,{todos:c,status:t})}return m.jsx(Un,{title:`Tool: ${s}`,preview:f,icon:m.jsx(bn,{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(a??{},null,2)})})}function Hn({block:e,status:t=gl(e),renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=qn(e);if(!s)return null;const a=pt(s);if(a){const f=Ve(a);return n?.has(f)?null:(n?.add(f),m.jsx(ut,{payload:a,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const u=ve(s,156);return m.jsx(Un,{title:"Result",preview:u,icon:m.jsx(bn,{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:s})})}function qn(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>String(n.text??"")).join(`
78
- `):""}function gh(e){const t=e.message;return typeof t=="object"&&t!==null&&Array.isArray(t.content)?t.content:Array.isArray(e.content)?e.content:[]}function kl(e){return e.flatMap(t=>gh(t).flatMap(n=>{if(n.type==="thinking"){const r=String(n.thinking??"").trim();return r?[{title:"Thinking",preview:ve(r,112),block:n,kind:"thinking",status:"success"}]:[]}if(n.type==="tool_use")return[{title:`Tool: ${String(n.name??"tool")}`,preview:ml(n.input),block:n,kind:"tool_use",status:"success"}];if(n.type==="tool_result"){const r=ve(qn(n),112);return r?[{title:"Result",preview:r,block:n,kind:"tool_result",status:gl(n)}]:[]}return[]}))}function xh(e){return kl(e).length>0}function yh({events:e,...t}){const[n,r]=fe.useState(!1),[i,l]=fe.useState(tt),o=kl(e);if(o.length===0)return null;const s=o.slice(0,i),a=o.length-s.length;function u(){r(f=>{const c=!f;return c&&l(tt),c})}return m.jsxs("div",{className:"animate-agent-activity group/activity overflow-hidden py-0.5 text-muted-foreground","data-agent-activity-page-size":tt,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(bn,{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:[o.length," ",o.length===1?"item":"items"]})]}),m.jsx("div",{className:"divide-y divide-dashed divide-border/18",children:o.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($n,{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(dl,{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:[s.map((f,c)=>{const h=`${f.kind}-${c}`;return f.kind==="thinking"?m.jsx("div",{className:"py-0.5",children:m.jsx(xl,{text:String(f.block.thinking??""),status:f.status})},h):f.kind==="tool_use"?m.jsx("div",{className:"py-0.5",children:m.jsx(yl,{block:f.block,status:f.status,...t})},h):m.jsx("div",{className:"py-0.5",children:m.jsx(Hn,{block:f.block,status:f.status,...t})},h)}),a>0&&m.jsxs("button",{type:"button",onClick:()=>l(f=>f+tt),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(a,tt)]})]})]})}function kh(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,l=typeof n.status=="string"?n.status:"pending";return{content:r,activeForm:i,status:l==="completed"||l==="in_progress"?l:"pending"}}).filter(t=>t!==null):[]}function bh({todos:e,status:t="success"}){const n=e.filter(l=>l.status==="completed").length,r=e.length,i=e.find(l=>l.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($n,{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(eo,{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((l,o)=>m.jsxs("li",{className:"flex items-start gap-1.5 px-2 py-1",children:[m.jsx(wh,{status:l.status}),m.jsx("span",{className:l.status==="completed"?"text-[11px] leading-4 text-muted-foreground line-through decoration-muted-foreground/60":l.status==="in_progress"?"text-[11px] font-medium leading-4 text-foreground":"text-[11px] leading-4 text-foreground/85",children:l.status==="in_progress"?l.activeForm:l.content})]},`${o}-${l.content}`))})]})}function wh({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(He,{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(Gl,{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(ri,{className:"h-2.5 w-2.5"})})}const Vn=/^[A-Za-z]:[\\/]/,bl=/^[A-Za-z][A-Za-z\d+.-]*:/,wl=/^\/(?:api|preview|preview-open|shared|tasks)(?:\/|$)/;function Sh(e){const t=Wn(e);if(!t||t.startsWith("#")||wl.test(t)||bl.test(t)&&!t.toLowerCase().startsWith("file:")&&!Vn.test(t))return!1;const n=Xn(ke(Yn(Jn(Gn(t)))));return!n||Qn(Ot(n))?!1:Kn(n)}function Ch(e,t,n={}){const r=Wn(e);if(!r||r.startsWith("#")||wl.test(r)||bl.test(r)&&!r.toLowerCase().startsWith("file:")&&!Vn.test(r))return null;const i=vh(r,t,n);if(!i)return null;const l=Sl(i,t);return!l||l==="."?null:Kn(l)?l:null}function Sl(e,t){let n=Wn(e);if(!n)return null;n=Gn(n),n=Jn(n),n=Yn(n),n=ke(n),n=Xn(n);const r=t?Pt(ke(t)):null;if(vl(n)){if(!r)return null;const i=Pt(n);if(i===r)return".";if(!i.startsWith(`${r}/`))return null;n=i.slice(r.length+1)}return n=Ot(n),Qn(n)?null:n||"."}function Cl(e){const t=Ot(ke(e)),n=t.lastIndexOf("/");return n<=0?".":t.slice(0,n)}function hm(e,t,n,r=new Set){const i=[],l=(o,s)=>{for(const a of o){const u=a.type==="directory"&&n.has(a.path);i.push({entry:a,depth:s,expanded:u,loading:a.type==="directory"&&r.has(a.path)}),u&&l(t[a.path]??[],s+1)}};return l(e,0),i}function mm(e){const t=Cl(e);if(t===".")return[];const n=t.split("/").filter(Boolean);return n.map((r,i)=>n.slice(0,i+1).join("/"))}function dm(e){const t=Ot(ke(e));return!t||t==="."?0:Math.max(0,t.split("/").filter(Boolean).length-1)}function gm(e,t){const n=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?e:e.filter(r=>{const i=`${r.name} ${r.path}`.toLowerCase();return n.every(l=>i.includes(l))})}function Wn(e){const t=e?.trim()??"";if(!t)return"";try{return decodeURIComponent(t)}catch{return t}}function Gn(e){if(!e.toLowerCase().startsWith("file:"))return e;try{return new URL(e).pathname}catch{return e.replace(/^file:\/\//i,"")}}function Jn(e){const t=e.indexOf("#"),n=e.indexOf("?"),r=[t,n].filter(i=>i>=0).sort((i,l)=>i-l)[0];return r===void 0?e:e.slice(0,r)}function Yn(e){const t=e.match(/^(.*):\d+(?::\d+)?$/);return t?.[1]&&Kn(t[1])?t[1]:e}function ke(e){return e.replace(/\\/g,"/")}function Pt(e){return e.replace(/\/+$/,"")}function Xn(e){return e.replace(/^\/([A-Za-z]:\/)/,"$1")}function Ot(e){let t=e;for(;t.startsWith("./");)t=t.slice(2);return t}function Qn(e){return e.split("/").includes("..")}function vl(e){return e.startsWith("/")||Vn.test(e)}function Kn(e){const t=ke(e);if(!t||t==="."||Qn(t))return!1;const n=t.split("/").pop()??t;return n.startsWith(".")||/\.[A-Za-z0-9][A-Za-z0-9_-]*$/.test(n)?!0:t.split("/").some(r=>r.startsWith(".")&&r.length>1)}function vh(e,t,n){const r=Xn(ke(Yn(Jn(Gn(e))))),i=t?Pt(ke(t)):null;if(n.allowRootRelative&&r.startsWith("/")){const s=Pt(r);if(!(i?s===i||s.startsWith(`${i}/`):!1))return r.replace(/^\/+/,"")}if(vl(r))return e;const l=Sl(n.baseFilePath,t);if(!l||l===".")return e;const o=Cl(l);return o==="."?e:Ah(`${o}/${r}`)}function Ah(e){const t=[];for(const n of ke(e).split("/"))if(!(!n||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n)}return t.join("/")||"."}const Ct="/goal",Eh="Goal",Th="Set a goal that Codex will keep working towards";function jh(e,t){if(e!=="codex")return{isGoal:!1,prompt:t,commandPrompt:t};const n=t.trimStart();if(!n.startsWith(Ct))return{isGoal:!1,prompt:t,commandPrompt:t};const r=n.charAt(Ct.length);return r&&!/\s/.test(r)?{isGoal:!1,prompt:t,commandPrompt:t}:{isGoal:!0,prompt:n.slice(Ct.length).trimStart(),commandPrompt:n}}function xm(e,t){if(e!=="codex")return null;const n=t.trimStart();if(!n.startsWith("/"))return null;const r=n.slice(1).toLowerCase();return/\s/.test(r)||!"goal".startsWith(r)?null:{label:Eh,description:Th,value:Ct+" "}}function Ih(e){let t=!1;return e.map(n=>{if(t||n.type!=="text")return n;const r=jh("codex",n.text);return r.isGoal?(t=!0,{...n,text:r.prompt}):n}).filter(n=>n.type!=="text"||n.text.trim().length>0)}function ym(e){return e?.agent==="codex"&&e.payload.goal===!0}function Nh(e){return/^(https?:\/\/|mailto:|tel:)/i.test(e?.trim()??"")}function Ph(e){const t=typeof window>"u"?void 0:window,n=t?.__TAURI__?.core?.invoke;if(typeof n=="function")return i=>n("plugin:opener|open_url",{url:i,with:void 0});const r=t?.__TAURI__?.opener?.openUrl;return typeof r=="function"?r:null}function Qr(e,t){const n=Ph(),r=t?.trim();!n||!Nh(r)||(e.preventDefault(),Promise.resolve(n(r)).catch(()=>{window.open(r,"_blank","noopener,noreferrer")}))}function km({event:e,agent:t,subItems:n=[],questionBypassEnabled:r=!1,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o=!1,taskRootPath:s,onOpenFilePath:a,sentAsGoal:u=!1}){const f=e.type,c=wn(e),h=ft(e);if(c)return m.jsx(lt,{agent:t,children:m.jsx(mh,{payload:c,onSubmit:l,disabled:o})});if(h)return m.jsx(lt,{agent:t,children:m.jsx(ut,{payload:h,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});if(f==="user"){if(e.isMeta===!0||e.isSidechain===!0)return null;const p=_h(e),d=p.filter(y=>y.type==="tool_result");if(d.length>0&&p.every(y=>y.type==="tool_result"))return m.jsx(lt,{agent:t,children:d.map((y,A)=>m.jsx(Hn,{block:y,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},A))});const k=qe(e);if(!k)return null;const w=u?Ih(k):k;return m.jsx(Oh,{content:w,sentAsGoal:u,taskRootPath:s,onOpenFilePath:a})}return f==="assistant"?m.jsx(Rh,{event:e,agent:t,subItems:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}):null}function _h(e){const n=e.message?.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 nn(e){const t=e.replace(/\r\n/g,`
77
+ `))}function a(p,d,k,w){const y=k.enter("tableCell"),A=k.enter("phrasing"),v=k.containerPhrasing(p,{...w,before:l,after:l});return A(),y(),v}function u(p,d){return $f(p,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function f(p,d,k){const w=p.children;let y=-1;const A=[],v=d.enter("table");for(;++y<w.length;)A[y]=c(w[y],d,k);return v(),A}function c(p,d,k){const w=p.children;let y=-1;const A=[],v=d.enter("tableRow");for(;++y<w.length;)A[y]=a(w[y],p,d,k);return v(),A}function h(p,d,k){let w=ll.inlineCode(p,d,k);return k.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function jp(){return{exit:{taskListCheckValueChecked:Yr,taskListCheckValueUnchecked:Yr,paragraph:Np}}}function Ip(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:_p}}}function Yr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Np(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 l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===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 _p(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let a=ll.listItem(e,t,n,{...r,...s.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(f){return f+o}}function Pp(){return[cf(),_f(),Df(),wp(),jp()]}function zp(e){return{extensions:[ff(),Pf(e),Ff(),Tp(e),Ip()]}}const Lp={tokenize:Bp,partial:!0},ol={tokenize:$p,partial:!0},sl={tokenize:Up,partial:!0},al={tokenize:Hp,partial:!0},Dp={tokenize:qp,partial:!0},ul={name:"wwwAutolink",tokenize:Op,previous:fl},cl={name:"protocolAutolink",tokenize:Rp,previous:pl},we={name:"emailAutolink",tokenize:Mp,previous:hl},me={};function Fp(){return{text:me}}let Ne=48;for(;Ne<123;)me[Ne]=we,Ne++,Ne===58?Ne=65:Ne===91&&(Ne=97);me[43]=we;me[45]=we;me[46]=we;me[95]=we;me[72]=[we,cl];me[104]=[we,cl];me[87]=[we,ul];me[119]=[we,ul];function Mp(e,t,n){const r=this;let i,l;return o;function o(c){return!yn(c)||!hl.call(r,r.previous)||Bn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return yn(c)?(e.consume(c),s):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(Dp,f,u)(c):c===45||c===95||Q(c)?(l=!0,e.consume(c),a):f(c)}function u(c){return e.consume(c),i=!0,a}function f(c){return l&&i&&Z(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Op(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!fl.call(r,r.previous)||Bn(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lp,e.attempt(ol,e.attempt(sl,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Rp(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&pl.call(r,r.previous)&&!Bn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Z(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),l?u:(l=!0,a)):n(c)}function u(c){return c===null||Tt(c)||W(c)||Pe(c)||zt(c)?n(c):e.attempt(ol,e.attempt(sl,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Bp(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function $p(e,t,n){let r,i,l;return o;function o(u){return u===46||u===95?e.check(al,a,s)(u):u===null||W(u)||Pe(u)||u!==45&&zt(u)?a(u):(l=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function a(u){return i||r||!l?n(u):t(u)}}function Up(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(al,t,l)(o):o===null||W(o)||Pe(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function Hp(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||W(s)||Pe(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||W(s)||Pe(s)?t(s):r(s)}function l(s){return Z(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Z(s)?(e.consume(s),o):n(s)}}function qp(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Q(l)?n(l):t(l)}}function fl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function pl(e){return!Z(e)}function hl(e){return!(e===47||yn(e))}function yn(e){return e===43||e===45||e===46||e===95||Q(e)}function Bn(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 Vp={tokenize:Zp,partial:!0};function Wp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Xp,continuation:{tokenize:Qp},exit:Kp}},text:{91:{name:"gfmFootnoteCall",tokenize:Yp},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Gp,resolveTo:Jp}}}}function Gp(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){o=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!o||!o._balanced)return n(a);const u=pe(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function Jp(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 l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Yp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a}function a(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(l>999||c===93&&!o||c===null||c===91||W(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(pe(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return W(c)||(o=!0),l++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,u):u(c)}}function Xp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return a;function a(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(o>999||d===93&&!s||d===null||d===91||W(d))return n(d);if(d===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=pe(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return W(d)||(s=!0),o++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,f):f(d)}function h(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(l)||i.push(l),U(e,p,"gfmFootnoteDefinitionWhitespace")):n(d)}function p(d){return t(d)}}function Qp(e,t,n){return e.check(mt,t,e.attempt(Vp,t,n))}function Kp(e){e.exit("gfmFootnoteDefinition")}function Zp(e,t,n){const r=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function eh(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let u=a;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[a][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[a][1].end)},c={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ie(h,h.length,0,Lt(p,o.slice(u+1,a),s)),ie(h,h.length,0,[["exit",c,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",f,s]]),ie(o,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function l(o,s,a){const u=this.previous,f=this.events;let c=0;return h;function h(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?a(d):(o.enter("strikethroughSequenceTemporary"),p(d))}function p(d){const k=Ue(u);if(d===126)return c>1?a(d):(o.consume(d),c++,p);if(c<2&&!n)return a(d);const w=o.exit("strikethroughSequenceTemporary"),y=Ue(d);return w._open=!y||y===2&&!!k,w._close=!k||k===2&&!!y,s(d)}}}class th{constructor(){this.map=[]}add(t,n,r){nh(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[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 l of i)t.push(l);i=r.pop()}this.map.length=0}}function nh(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 rh(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 l=r.length-1;r[l]=r[l]==="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 ih(){return{flow:{null:{name:"table",tokenize:lh,resolveAll:oh}}}}function lh(e,t,n){const r=this;let i=0,l=0,o;return s;function s(b){let N=r.events.length-1;for(;N>-1;){const L=r.events[N][1].type;if(L==="lineEnding"||L==="linePrefix")N--;else break}const _=N>-1?r.events[N][1].type:null,H=_==="tableHead"||_==="tableRow"?C:a;return H===C&&r.parser.lazy[r.now().line]?n(b):H(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(o=!0,l+=1),f(b)}function f(b){return b===null?n(b):z(b)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):R(b)?U(e,f,"whitespace")(b):(l+=1,o&&(o=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(b)))}function c(b){return b===null||b===124||W(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?h:c)}function h(b){return b===92||b===124?(e.consume(b),c):c(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),o=!1,R(b)?U(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):d(b))}function d(b){return b===45||b===58?w(b):b===124?(o=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),k):D(b)}function k(b){return R(b)?U(e,w,"whitespace")(b):w(b)}function w(b){return b===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):b===45?(l+=1,y(b)):b===null||z(b)?P(b):D(b)}function y(b){return b===45?(e.enter("tableDelimiterFiller"),A(b)):D(b)}function A(b){return b===45?(e.consume(b),A):b===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(b))}function v(b){return R(b)?U(e,P,"whitespace")(b):P(b)}function P(b){return b===124?d(b):b===null||z(b)?!o||i!==l?D(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):D(b)}function D(b){return n(b)}function C(b){return e.enter("tableRow"),I(b)}function I(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),I):b===null||z(b)?(e.exit("tableRow"),t(b)):R(b)?U(e,I,"whitespace")(b):(e.enter("data"),O(b))}function O(b){return b===null||b===124||W(b)?(e.exit("data"),I(b)):(e.consume(b),b===92?B:O)}function B(b){return b===92||b===124?(e.consume(b),O):O(b)}}function oh(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,a=0,u,f,c;const h=new th;for(;++n<e.length;){const p=e[n],d=p[1];p[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Xr(h,t,a,u,f),f=void 0,a=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",u,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",f,t]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=bt(h,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=bt(h,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):d.type==="tableHead"?(s=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,l[1]!==0?(o[0]=o[1],c=bt(h,t,l,i,n,c)):o[1]!==0&&(c=bt(h,t,o,i,n,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&Xr(h,t,a,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=rh(t.events,n))}return e}function bt(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},Re(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=Re(t.events,n[1]);if(l={type:o,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=Re(t.events,n[2]),f=Re(t.events,n[3]),c={type:s,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 d=n[2]+1,k=n[3]-n[2]-1;e.add(d,k,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},Re(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Xr(e,t,n,r,i){const l=[],o=Re(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function Re(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const sh={name:"tasklistCheck",tokenize:uh};function ah(){return{text:{91:sh}}}function uh(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return W(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return z(a)?t(a):R(a)?e.check({tokenize:ch},t,n)(a):n(a)}}function ch(e,t,n){return U(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fh(e){return Ci([Fp(),Wp(),eh(e),ih(),ah()])}const ph={};function hh(e){const t=this,n=e||ph,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fh(n)),l.push(Pp()),o.push(zp(n))}function ut({payload:e,disabled:t=!1,bypassEnabled:n=!1,onBypassChange:r,onSubmit:i}){const[l,o]=fe.useState(()=>n?bo(e):e.questions.map(()=>[])),[s,a]=fe.useState(!1),[u,f]=fe.useState(!1);fe.useEffect(()=>{n&&o(d=>d.map((k,w)=>k.length>0?k:e.questions[w]?.options.length?[0]:[]))},[n,e]);const c=wo(e,l)&&!t&&!s&&!u&&!!i,h=(d,k)=>{t||u||s||o(w=>w.map((y,A)=>{if(A!==d)return y;const v=e.questions[A];return v?v.multiSelect?y.includes(k)?y.filter(P=>P!==k):[...y,k].sort((P,D)=>P-D):[k]:y}))},p=async()=>{if(!c||!i)return;a(!0);const d=await i(So(e,l));a(!1),d&&f(!0)};return m.jsxs("div",{className:"rounded-sm border border-primary/20 bg-primary/5 p-2.5 shadow-none",children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm border border-primary/20 bg-primary/10 text-primary shadow-none",children:m.jsx(Ql,{className:"h-3.5 w-3.5"})}),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-0.5 text-[11px] leading-5 text-muted-foreground",children:"Select the answer you want to send back to the agent."})]})]}),m.jsxs(At,{type:"button",variant:n?"secondary":"outline",size:"sm",onClick:()=>r?.(!n),className:"rounded-sm",children:[m.jsx(io,{className:"h-4 w-4"}),n?"Bypass on":"Bypass future questions"]})]}),m.jsx("div",{className:"mt-2.5 space-y-2.5",children:e.questions.map((d,k)=>{const w=l[k]??[];return m.jsxs("div",{className:"space-y-2 rounded-sm border border-border/60 bg-background/75 p-2.5",children:[m.jsxs("div",{children:[d.header&&m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:d.header}),m.jsx("div",{className:"mt-1 text-[12px] font-medium leading-5 text-foreground",children:d.question}),m.jsx("div",{className:"mt-1 text-[10px] text-muted-foreground",children:d.multiSelect?"Select one or more options.":"Select one option."})]}),m.jsx("div",{className:"space-y-1.5",children:d.options.map((y,A)=>{const v=w.includes(A);return m.jsxs("button",{type:"button",onClick:()=>h(k,A),disabled:t||s||u,"aria-pressed":v,className:$e("flex w-full items-start gap-2 rounded-sm border px-2.5 py-2 text-left transition-colors",v?"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:$e("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",v?"border-primary bg-primary text-primary-foreground":"border-border/70 bg-background text-transparent"),children:m.jsx(He,{className:"h-3.5 w-3.5"})}),m.jsxs("span",{className:"min-w-0",children:[m.jsx("span",{className:"block text-[12px] font-medium leading-5",children:y.label}),y.description&&m.jsx("span",{className:"mt-0.5 block text-[11px] leading-5 text-muted-foreground",children:y.description})]})]},`${y.label}-${A}`)})})]},`${d.header??"question"}-${k}`)})}),m.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center justify-between gap-2",children:[m.jsx("div",{className:"text-[11px] 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(At,{type:"button",onClick:()=>{p()},disabled:!c,className:"rounded-sm px-3",children:u?"Sent":s?"Sending...":e.questions.length>1?"Send answers":"Send answer"})]})]})}function mh({payload:e,disabled:t=!1,onSubmit:n}){const[r,i]=fe.useState(null),[l,o]=fe.useState(!1),s=!t&&!l&&!!n,a=async u=>{if(!s||!n)return;i(u);const f=await n(To(e,u));i(null),f&&o(!0)};return m.jsxs("div",{className:"rounded-sm border border-amber-500/25 bg-amber-500/5 p-2.5 shadow-none",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm border border-amber-500/25 bg-amber-500/10 text-amber-600 shadow-none dark:text-amber-400",children:m.jsx(no,{className:"h-3.5 w-3.5"})}),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-2",children:e.requests.map((u,f)=>m.jsxs("div",{className:"rounded-sm border border-border/60 bg-background/75 px-2.5 py-2",children:[m.jsx("div",{className:"text-[12px] font-medium leading-5 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-2.5 flex flex-wrap items-center justify-end gap-2",children:[m.jsxs(At,{type:"button",variant:"outline",onClick:()=>{a("deny")},disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(ti,{className:"h-4 w-4"}),l?"Sent":r==="deny"?"Sending...":"Deny"]}),m.jsxs(At,{type:"button",onClick:()=>{a("approve")},disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(He,{className:"h-4 w-4"}),l?"Sent":r==="approve"?"Sending...":"Approve"]})]})]})}const tt=6;function dh(e){return e.replace(/\s+/g," ").trim()}function ve(e,t=132){const n=dh(e);return n?n.length>t?`${n.slice(0,t-3)}...`:n:""}function kn(e,t=84){if(typeof e=="string")return ve(e,t);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){const n=e.slice(0,3).map(r=>kn(r,28)).filter(Boolean).join(", ");return ve(n||JSON.stringify(e),t)}if(typeof e=="object"&&e!==null){const n=Object.entries(e).slice(0,3).map(([r,i])=>`${r}: ${kn(i,32)}`).join(" · ");return ve(n||JSON.stringify(e),t)}return""}function ml(e){if(!e)return"No input";const t=Object.entries(e).slice(0,4).map(([n,r])=>`${n}: ${kn(r,40)}`).filter(n=>n.trim().length>0).join(" · ");return ve(t||JSON.stringify(e),156)||"No input"}function dl({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(Vl,{className:"h-2.5 w-2.5"}):m.jsx(Wl,{className:"h-2.5 w-2.5"})]})}function $n({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(ti,{className:"h-2 w-2"}):e==="success"?m.jsx(He,{className:"h-2 w-2"}):m.jsx(ri,{className:"h-1 w-1 fill-current"})})}function gl(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=qn(e).slice(0,160);return/\b(error|failed|exception|traceback)\b/i.test(n)?"failed":"success"}function Un({title:e,preview:t,icon:n,children:r,accentClassName:i,status:l="success",previewClassName:o="font-mono text-[9px] leading-3 text-muted-foreground/78"}){const[s,a]=fe.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:()=>a(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($n,{status:l}),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 ${o}`,children:t})]}),m.jsx(dl,{expanded:s})]}),s&&m.jsx("div",{className:"border-t border-border/18 px-2 py-1.5",children:r})]})}function xl({text:e,status:t="success"}){const n=ve(e,156);return m.jsx(Un,{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 yl({block:e,status:t="success",renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=String(e.name??"tool"),a=e.input,u=ft(e);if(u){const c=Ve(u);return n?.has(c)?null:(n?.add(c),m.jsx(ut,{payload:u,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const f=ml(a);if(s==="TodoWrite"){const c=kh(a?.todos);if(c.length>0)return m.jsx(bh,{todos:c,status:t})}return m.jsx(Un,{title:`Tool: ${s}`,preview:f,icon:m.jsx(bn,{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(a??{},null,2)})})}function Hn({block:e,status:t=gl(e),renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=qn(e);if(!s)return null;const a=pt(s);if(a){const f=Ve(a);return n?.has(f)?null:(n?.add(f),m.jsx(ut,{payload:a,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const u=ve(s,156);return m.jsx(Un,{title:"Result",preview:u,icon:m.jsx(bn,{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:s})})}function qn(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>String(n.text??"")).join(`
78
+ `):""}function gh(e){const t=e.message;return typeof t=="object"&&t!==null&&Array.isArray(t.content)?t.content:Array.isArray(e.content)?e.content:[]}function kl(e){return e.flatMap(t=>gh(t).flatMap(n=>{if(n.type==="thinking"){const r=String(n.thinking??"").trim();return r?[{title:"Thinking",preview:ve(r,112),block:n,kind:"thinking",status:"success"}]:[]}if(n.type==="tool_use")return[{title:`Tool: ${String(n.name??"tool")}`,preview:ml(n.input),block:n,kind:"tool_use",status:"success"}];if(n.type==="tool_result"){const r=ve(qn(n),112);return r?[{title:"Result",preview:r,block:n,kind:"tool_result",status:gl(n)}]:[]}return[]}))}function xh(e){return kl(e).length>0}function yh({events:e,...t}){const[n,r]=fe.useState(!1),[i,l]=fe.useState(tt),o=kl(e);if(o.length===0)return null;const s=o.slice(0,i),a=o.length-s.length;function u(){r(f=>{const c=!f;return c&&l(tt),c})}return m.jsxs("div",{className:"animate-agent-activity group/activity overflow-hidden py-0.5 text-muted-foreground","data-agent-activity-page-size":tt,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(bn,{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:[o.length," ",o.length===1?"item":"items"]})]}),m.jsx("div",{className:"divide-y divide-dashed divide-border/18",children:o.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($n,{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(dl,{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:[s.map((f,c)=>{const h=`${f.kind}-${c}`;return f.kind==="thinking"?m.jsx("div",{className:"py-0.5",children:m.jsx(xl,{text:String(f.block.thinking??""),status:f.status})},h):f.kind==="tool_use"?m.jsx("div",{className:"py-0.5",children:m.jsx(yl,{block:f.block,status:f.status,...t})},h):m.jsx("div",{className:"py-0.5",children:m.jsx(Hn,{block:f.block,status:f.status,...t})},h)}),a>0&&m.jsxs("button",{type:"button",onClick:()=>l(f=>f+tt),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(a,tt)]})]})]})}function kh(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,l=typeof n.status=="string"?n.status:"pending";return{content:r,activeForm:i,status:l==="completed"||l==="in_progress"?l:"pending"}}).filter(t=>t!==null):[]}function bh({todos:e,status:t="success"}){const n=e.filter(l=>l.status==="completed").length,r=e.length,i=e.find(l=>l.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($n,{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(eo,{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((l,o)=>m.jsxs("li",{className:"flex items-start gap-1.5 px-2 py-1",children:[m.jsx(wh,{status:l.status}),m.jsx("span",{className:l.status==="completed"?"text-[11px] leading-4 text-muted-foreground line-through decoration-muted-foreground/60":l.status==="in_progress"?"text-[11px] font-medium leading-4 text-foreground":"text-[11px] leading-4 text-foreground/85",children:l.status==="in_progress"?l.activeForm:l.content})]},`${o}-${l.content}`))})]})}function wh({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(He,{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(Gl,{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(ri,{className:"h-2.5 w-2.5"})})}const Vn=/^[A-Za-z]:[\\/]/,bl=/^[A-Za-z][A-Za-z\d+.-]*:/,wl=/^\/(?:api|preview|preview-open|shared|tasks)(?:\/|$)/;function Sh(e){const t=Wn(e);if(!t||t.startsWith("#")||wl.test(t)||bl.test(t)&&!t.toLowerCase().startsWith("file:")&&!Vn.test(t))return!1;const n=Xn(ke(Yn(Jn(Gn(t)))));return!n||Qn(Ot(n))?!1:Kn(n)}function Ch(e,t,n={}){const r=Wn(e);if(!r||r.startsWith("#")||wl.test(r)||bl.test(r)&&!r.toLowerCase().startsWith("file:")&&!Vn.test(r))return null;const i=vh(r,t,n);if(!i)return null;const l=Sl(i,t);return!l||l==="."?null:Kn(l)?l:null}function Sl(e,t){let n=Wn(e);if(!n)return null;n=Gn(n),n=Jn(n),n=Yn(n),n=ke(n),n=Xn(n);const r=t?_t(ke(t)):null;if(vl(n)){if(!r)return null;const i=_t(n);if(i===r)return".";if(!i.startsWith(`${r}/`))return null;n=i.slice(r.length+1)}return n=Ot(n),Qn(n)?null:n||"."}function Cl(e){const t=Ot(ke(e)),n=t.lastIndexOf("/");return n<=0?".":t.slice(0,n)}function hm(e,t,n,r=new Set){const i=[],l=(o,s)=>{for(const a of o){const u=a.type==="directory"&&n.has(a.path);i.push({entry:a,depth:s,expanded:u,loading:a.type==="directory"&&r.has(a.path)}),u&&l(t[a.path]??[],s+1)}};return l(e,0),i}function mm(e){const t=Cl(e);if(t===".")return[];const n=t.split("/").filter(Boolean);return n.map((r,i)=>n.slice(0,i+1).join("/"))}function dm(e){const t=Ot(ke(e));return!t||t==="."?0:Math.max(0,t.split("/").filter(Boolean).length-1)}function gm(e,t){const n=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?e:e.filter(r=>{const i=`${r.name} ${r.path}`.toLowerCase();return n.every(l=>i.includes(l))})}function Wn(e){const t=e?.trim()??"";if(!t)return"";try{return decodeURIComponent(t)}catch{return t}}function Gn(e){if(!e.toLowerCase().startsWith("file:"))return e;try{return new URL(e).pathname}catch{return e.replace(/^file:\/\//i,"")}}function Jn(e){const t=e.indexOf("#"),n=e.indexOf("?"),r=[t,n].filter(i=>i>=0).sort((i,l)=>i-l)[0];return r===void 0?e:e.slice(0,r)}function Yn(e){const t=e.match(/^(.*):\d+(?::\d+)?$/);return t?.[1]&&Kn(t[1])?t[1]:e}function ke(e){return e.replace(/\\/g,"/")}function _t(e){return e.replace(/\/+$/,"")}function Xn(e){return e.replace(/^\/([A-Za-z]:\/)/,"$1")}function Ot(e){let t=e;for(;t.startsWith("./");)t=t.slice(2);return t}function Qn(e){return e.split("/").includes("..")}function vl(e){return e.startsWith("/")||Vn.test(e)}function Kn(e){const t=ke(e);if(!t||t==="."||Qn(t))return!1;const n=t.split("/").pop()??t;return n.startsWith(".")||/\.[A-Za-z0-9][A-Za-z0-9_-]*$/.test(n)?!0:t.split("/").some(r=>r.startsWith(".")&&r.length>1)}function vh(e,t,n){const r=Xn(ke(Yn(Jn(Gn(e))))),i=t?_t(ke(t)):null;if(n.allowRootRelative&&r.startsWith("/")){const s=_t(r);if(!(i?s===i||s.startsWith(`${i}/`):!1))return r.replace(/^\/+/,"")}if(vl(r))return e;const l=Sl(n.baseFilePath,t);if(!l||l===".")return e;const o=Cl(l);return o==="."?e:Ah(`${o}/${r}`)}function Ah(e){const t=[];for(const n of ke(e).split("/"))if(!(!n||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n)}return t.join("/")||"."}const Ct="/goal",Eh="Goal",Th="Set a goal that Codex will keep working towards";function jh(e,t){if(e!=="codex")return{isGoal:!1,prompt:t,commandPrompt:t};const n=t.trimStart();if(!n.startsWith(Ct))return{isGoal:!1,prompt:t,commandPrompt:t};const r=n.charAt(Ct.length);return r&&!/\s/.test(r)?{isGoal:!1,prompt:t,commandPrompt:t}:{isGoal:!0,prompt:n.slice(Ct.length).trimStart(),commandPrompt:n}}function xm(e,t){if(e!=="codex")return null;const n=t.trimStart();if(!n.startsWith("/"))return null;const r=n.slice(1).toLowerCase();return/\s/.test(r)||!"goal".startsWith(r)?null:{label:Eh,description:Th,value:Ct+" "}}function Ih(e){let t=!1;return e.map(n=>{if(t||n.type!=="text")return n;const r=jh("codex",n.text);return r.isGoal?(t=!0,{...n,text:r.prompt}):n}).filter(n=>n.type!=="text"||n.text.trim().length>0)}function ym(e){return e?.agent==="codex"&&e.payload.goal===!0}function Nh(e){return/^(https?:\/\/|mailto:|tel:)/i.test(e?.trim()??"")}function _h(e){const t=typeof window>"u"?void 0:window,n=t?.__TAURI__?.core?.invoke;if(typeof n=="function")return i=>n("plugin:opener|open_url",{url:i,with:void 0});const r=t?.__TAURI__?.opener?.openUrl;return typeof r=="function"?r:null}function Qr(e,t){const n=_h(),r=t?.trim();!n||!Nh(r)||(e.preventDefault(),Promise.resolve(n(r)).catch(()=>{window.open(r,"_blank","noopener,noreferrer")}))}function km({event:e,agent:t,subItems:n=[],questionBypassEnabled:r=!1,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o=!1,taskRootPath:s,onOpenFilePath:a,sentAsGoal:u=!1}){const f=e.type,c=wn(e),h=ft(e);if(c)return m.jsx(lt,{agent:t,children:m.jsx(mh,{payload:c,onSubmit:l,disabled:o})});if(h)return m.jsx(lt,{agent:t,children:m.jsx(ut,{payload:h,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});if(f==="user"){if(e.isMeta===!0||e.isSidechain===!0)return null;const p=Ph(e),d=p.filter(y=>y.type==="tool_result");if(d.length>0&&p.every(y=>y.type==="tool_result"))return m.jsx(lt,{agent:t,children:d.map((y,A)=>m.jsx(Hn,{block:y,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},A))});const k=qe(e);if(!k)return null;const w=u?Ih(k):k;return m.jsx(Oh,{content:w,sentAsGoal:u,taskRootPath:s,onOpenFilePath:a})}return f==="assistant"?m.jsx(Rh,{event:e,agent:t,subItems:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}):null}function Ph(e){const n=e.message?.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 nn(e){const t=e.replace(/\r\n/g,`
79
79
  `).split(`
80
80
  `);for(;t.length>0&&t[0]?.trim()==="";)t.shift();return t.join(`
81
- `)}function zh(e){if(typeof e=="number"&&Number.isFinite(e))return Number.isNaN(new Date(e).getTime())?null:{raw:String(e),time:e};if(typeof e=="string"&&e.trim().length>0){const t=Date.parse(e);return Number.isNaN(t)?null:{raw:e,time:t}}return null}function Lh(e){const t=new Date(e.time),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),s=String(t.getSeconds()).padStart(2,"0");return`${n}-${r}-${i} ${l}:${o}:${s}`}function Al({text:e,tone:t="default",size:n="default",className:r="",taskRootPath:i,onOpenFilePath:l}){const o=t==="inverted",s=n==="compact"?"text-[10px] leading-4":"text-[11px] leading-[17px]",a=o?"underline decoration-current/45 underline-offset-2 hover:decoration-current":"underline decoration-current/35 underline-offset-2 hover:decoration-current",u=o?"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",f=o?"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",c=o?"w-full border-collapse text-left text-[11px] text-primary-foreground":"w-full border-collapse text-left text-[11px] text-foreground",h=o?"border border-primary-foreground/20 px-2 py-1 align-top":"border border-border/60 px-2 py-1 align-top",p=o?"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 ${s} [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&>*+*]:mt-2 [&_li>p]:my-0`,r].filter(Boolean).join(" "),children:m.jsx(Qc,{remarkPlugins:[hh,uf],components:{a:({node:d,href:k,...w})=>{const y=l?Ch(k,i):null,A=l&&!y&&!i&&Sh(k)?k?.trim()??null:null,v=y??A;return v?m.jsx("a",{...w,href:k,"data-task-file-link":v,"data-task-file-link-unresolved":y?void 0:"true",className:a,onClick:_=>{_.preventDefault(),l?.(v)}}):m.jsx("a",{...w,href:k,target:"_blank",rel:"noreferrer noopener",className:a,onClick:_=>Qr(_,k)})},blockquote:({node:d,...k})=>m.jsx("blockquote",{...k,className:p}),code:({node:d,className:k,children:w,...y})=>k?m.jsx("code",{...y,className:k,children:w}):m.jsx("code",{...y,className:u,children:w}),h1:({node:d,...k})=>m.jsx("h1",{...k,className:"text-[14px] font-semibold leading-5"}),h2:({node:d,...k})=>m.jsx("h2",{...k,className:"text-[13px] font-semibold leading-5"}),h3:({node:d,...k})=>m.jsx("h3",{...k,className:"text-[12px] font-semibold leading-5"}),h4:({node:d,...k})=>m.jsx("h4",{...k,className:"text-[11px] font-semibold leading-4"}),hr:({node:d,...k})=>m.jsx("hr",{...k,className:o?"border-primary-foreground/20":"border-border"}),img:({node:d,alt:k,src:w})=>w?m.jsx("a",{href:w,target:"_blank",rel:"noreferrer noopener",className:a,onClick:y=>Qr(y,w),children:k?.trim()||w}):m.jsx("span",{children:k?.trim()||"Image"}),ol:({node:d,...k})=>m.jsx("ol",{...k,className:"list-decimal space-y-0.5 pl-5"}),p:({node:d,...k})=>m.jsx("p",{...k,className:"my-0"}),pre:({node:d,...k})=>m.jsx("pre",{...k,className:f}),table:({node:d,...k})=>m.jsx("table",{...k,className:c}),td:({node:d,...k})=>m.jsx("td",{...k,className:h}),th:({node:d,...k})=>m.jsx("th",{...k,className:`${h} font-semibold`}),ul:({node:d,...k})=>m.jsx("ul",{...k,className:"list-disc space-y-0.5 pl-5"})},children:e})})}function El({text:e,className:t=""}){const[n,r]=fe.useState(!1);if(!e)return null;const i=async l=>{l.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:`inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-muted-foreground/60 opacity-0 transition hover:bg-muted/50 hover:text-foreground group-hover/msg:opacity-100 focus-visible:opacity-100 ${t}`,children:n?m.jsx(He,{className:"h-3 w-3 text-emerald-500"}):m.jsx(ni,{className:"h-3 w-3"})})}async function Dh(e){let n=await(await fetch(e)).blob();n.type!=="image/png"&&(n=await Fh(n)),await navigator.clipboard.write([new ClipboardItem({[n.type]:n})])}async function Fh(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,l)=>{n.toBlob(o=>o?i(o):l(new Error("toBlob failed")),"image/png")})}function Mh({dataUrl:e,className:t=""}){const[n,r]=fe.useState(!1),i=async l=>{l.stopPropagation();try{await Dh(e),r(!0),setTimeout(()=>r(!1),1500)}catch(o){console.error("copy image failed",o)}};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/msg:opacity-100 focus-visible:opacity-100 ${t}`,children:n?m.jsx(He,{className:"h-3 w-3 text-emerald-500"}):m.jsx(ni,{className:"h-3 w-3"})})}function Oh({content:e,sentAsGoal:t=!1,taskRootPath:n,onOpenFilePath:r}){const i=ho(e),l=e.filter(o=>o.type==="image");return m.jsx("div",{className:"animate-message-send flex w-full max-w-full min-w-0 justify-end",children:m.jsxs("div",{className:"group/msg relative flex min-w-0 max-w-[88%] items-start gap-2",children:[m.jsx(El,{text:i,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.jsxs("div",{className:"flex max-w-full items-center justify-end gap-1.5 pr-0.5",children:[m.jsx("span",{className:"shrink-0 text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72",children:"You"}),t&&m.jsxs("span",{"data-message-goal-label":"true",title:"Sent as Codex goal",className:"inline-flex h-4 max-w-full items-center gap-1 rounded-sm border border-border/45 bg-background/85 px-1.5 text-[9px] font-medium leading-3 tracking-normal text-muted-foreground shadow-none",children:[m.jsx(oo,{className:"h-2.5 w-2.5 shrink-0","aria-hidden":"true"}),m.jsx("span",{className:"truncate",children:"Sent as goal"})]})]}),m.jsxs("div",{className:"max-w-full space-y-1 overflow-hidden rounded-lg rounded-br-md bg-primary px-3 py-2 text-[10px] leading-4 text-primary-foreground shadow-[0_16px_52px_-38px_hsl(var(--primary)/0.9)]",children:[i&&m.jsx(Al,{text:i,tone:"inverted",size:"compact",taskRootPath:n,onOpenFilePath:r}),l.length>0&&m.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:l.map((o,s)=>{const a=ii(o);return m.jsxs("div",{className:"relative",children:[m.jsx(Mo,{image:o,alt:o.filename??`attachment ${s+1}`,thumbnailClassName:"w-full border border-primary-foreground/15",imageClassName:"max-h-72 w-full"}),m.jsx(Mh,{dataUrl:a,className:"absolute right-2 top-2"})]},`${o.filename??"image"}-${s}`)})})]})]}),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(ao,{className:"h-3.5 w-3.5"})})]})})}function lt({agent:e,children:t,timestamp:n}){const r=e?ai(e):"Agent",i=zh(n);return m.jsx("div",{className:"animate-message-receive flex w-full max-w-full min-w-0 justify-start",children:m.jsxs("div",{className:"flex w-full 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(oi,{agent:e??"",className:"h-3.5 w-3.5"})}),m.jsxs("div",{className:"min-w-0 max-w-full flex-1 space-y-1",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72","data-agent-speaker-label":r,children:r}),i&&m.jsx("span",{className:"shrink-0 rounded-sm bg-muted/18 px-1 py-0.5 text-[8px] font-mono font-medium leading-3 tabular-nums text-muted-foreground/54","data-agent-message-timestamp":i.raw,children:Lh(i)})]}),t]})]})})}function Rh({event:e,agent:t,subItems:n=[],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}){const u=e.message;if(!u)return null;const f=ft(u);if(f)return m.jsx(lt,{agent:t,children:m.jsx(ut,{payload:f,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});const c=u.content;if(!c||!Array.isArray(c))return null;const h=new Set,p=c.filter(I=>I.type==="text"||I.type==="commentary").map(I=>({...I,text:nn(String(I.text??"")),questionPayload:pt(nn(String(I.text??"")))})).filter(I=>I.text.length>0||I.questionPayload),d=c.filter(I=>I.type==="thinking").map(I=>nn(String(I.thinking??""))).filter(Boolean).join(`
81
+ `)}function zh(e){if(typeof e=="number"&&Number.isFinite(e))return Number.isNaN(new Date(e).getTime())?null:{raw:String(e),time:e};if(typeof e=="string"&&e.trim().length>0){const t=Date.parse(e);return Number.isNaN(t)?null:{raw:e,time:t}}return null}function Lh(e){const t=new Date(e.time),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),s=String(t.getSeconds()).padStart(2,"0");return`${n}-${r}-${i} ${l}:${o}:${s}`}function Al({text:e,tone:t="default",size:n="default",className:r="",taskRootPath:i,onOpenFilePath:l}){const o=t==="inverted",s=n==="compact"?"text-[10px] leading-4":"text-[11px] leading-[17px]",a=o?"underline decoration-current/45 underline-offset-2 hover:decoration-current":"underline decoration-current/35 underline-offset-2 hover:decoration-current",u=o?"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",f=o?"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",c=o?"w-full border-collapse text-left text-[11px] text-primary-foreground":"w-full border-collapse text-left text-[11px] text-foreground",h=o?"border border-primary-foreground/20 px-2 py-1 align-top":"border border-border/60 px-2 py-1 align-top",p=o?"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 ${s} [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&>*+*]:mt-2 [&_li>p]:my-0`,r].filter(Boolean).join(" "),children:m.jsx(Qc,{remarkPlugins:[hh,uf],components:{a:({node:d,href:k,...w})=>{const y=l?Ch(k,i):null,A=l&&!y&&!i&&Sh(k)?k?.trim()??null:null,v=y??A;return v?m.jsx("a",{...w,href:k,"data-task-file-link":v,"data-task-file-link-unresolved":y?void 0:"true",className:a,onClick:P=>{P.preventDefault(),l?.(v)}}):m.jsx("a",{...w,href:k,target:"_blank",rel:"noreferrer noopener",className:a,onClick:P=>Qr(P,k)})},blockquote:({node:d,...k})=>m.jsx("blockquote",{...k,className:p}),code:({node:d,className:k,children:w,...y})=>k?m.jsx("code",{...y,className:k,children:w}):m.jsx("code",{...y,className:u,children:w}),h1:({node:d,...k})=>m.jsx("h1",{...k,className:"text-[14px] font-semibold leading-5"}),h2:({node:d,...k})=>m.jsx("h2",{...k,className:"text-[13px] font-semibold leading-5"}),h3:({node:d,...k})=>m.jsx("h3",{...k,className:"text-[12px] font-semibold leading-5"}),h4:({node:d,...k})=>m.jsx("h4",{...k,className:"text-[11px] font-semibold leading-4"}),hr:({node:d,...k})=>m.jsx("hr",{...k,className:o?"border-primary-foreground/20":"border-border"}),img:({node:d,alt:k,src:w})=>w?m.jsx("a",{href:w,target:"_blank",rel:"noreferrer noopener",className:a,onClick:y=>Qr(y,w),children:k?.trim()||w}):m.jsx("span",{children:k?.trim()||"Image"}),ol:({node:d,...k})=>m.jsx("ol",{...k,className:"list-decimal space-y-0.5 pl-5"}),p:({node:d,...k})=>m.jsx("p",{...k,className:"my-0"}),pre:({node:d,...k})=>m.jsx("pre",{...k,className:f}),table:({node:d,...k})=>m.jsx("table",{...k,className:c}),td:({node:d,...k})=>m.jsx("td",{...k,className:h}),th:({node:d,...k})=>m.jsx("th",{...k,className:`${h} font-semibold`}),ul:({node:d,...k})=>m.jsx("ul",{...k,className:"list-disc space-y-0.5 pl-5"})},children:e})})}function El({text:e,className:t=""}){const[n,r]=fe.useState(!1);if(!e)return null;const i=async l=>{l.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:`inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-muted-foreground/60 opacity-0 transition hover:bg-muted/50 hover:text-foreground group-hover/msg:opacity-100 focus-visible:opacity-100 ${t}`,children:n?m.jsx(He,{className:"h-3 w-3 text-emerald-500"}):m.jsx(ni,{className:"h-3 w-3"})})}async function Dh(e){let n=await(await fetch(e)).blob();n.type!=="image/png"&&(n=await Fh(n)),await navigator.clipboard.write([new ClipboardItem({[n.type]:n})])}async function Fh(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,l)=>{n.toBlob(o=>o?i(o):l(new Error("toBlob failed")),"image/png")})}function Mh({dataUrl:e,className:t=""}){const[n,r]=fe.useState(!1),i=async l=>{l.stopPropagation();try{await Dh(e),r(!0),setTimeout(()=>r(!1),1500)}catch(o){console.error("copy image failed",o)}};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/msg:opacity-100 focus-visible:opacity-100 ${t}`,children:n?m.jsx(He,{className:"h-3 w-3 text-emerald-500"}):m.jsx(ni,{className:"h-3 w-3"})})}function Oh({content:e,sentAsGoal:t=!1,taskRootPath:n,onOpenFilePath:r}){const i=ho(e),l=e.filter(o=>o.type==="image");return m.jsx("div",{className:"animate-message-send flex w-full max-w-full min-w-0 justify-end",children:m.jsxs("div",{className:"group/msg relative flex min-w-0 max-w-[88%] items-start gap-2",children:[m.jsx(El,{text:i,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.jsxs("div",{className:"flex max-w-full items-center justify-end gap-1.5 pr-0.5",children:[m.jsx("span",{className:"shrink-0 text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72",children:"You"}),t&&m.jsxs("span",{"data-message-goal-label":"true",title:"Sent as Codex goal",className:"inline-flex h-4 max-w-full items-center gap-1 rounded-sm border border-border/45 bg-background/85 px-1.5 text-[9px] font-medium leading-3 tracking-normal text-muted-foreground shadow-none",children:[m.jsx(oo,{className:"h-2.5 w-2.5 shrink-0","aria-hidden":"true"}),m.jsx("span",{className:"truncate",children:"Sent as goal"})]})]}),m.jsxs("div",{className:"max-w-full space-y-1 overflow-hidden rounded-lg rounded-br-md bg-primary px-3 py-2 text-[10px] leading-4 text-primary-foreground shadow-[0_16px_52px_-38px_hsl(var(--primary)/0.9)]",children:[i&&m.jsx(Al,{text:i,tone:"inverted",size:"compact",taskRootPath:n,onOpenFilePath:r}),l.length>0&&m.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:l.map((o,s)=>{const a=ii(o);return m.jsxs("div",{className:"relative",children:[m.jsx(Mo,{image:o,alt:o.filename??`attachment ${s+1}`,thumbnailClassName:"w-full border border-primary-foreground/15",imageClassName:"max-h-72 w-full"}),m.jsx(Mh,{dataUrl:a,className:"absolute right-2 top-2"})]},`${o.filename??"image"}-${s}`)})})]})]}),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(ao,{className:"h-3.5 w-3.5"})})]})})}function lt({agent:e,children:t,timestamp:n}){const r=e?ai(e):"Agent",i=zh(n);return m.jsx("div",{className:"animate-message-receive flex w-full max-w-full min-w-0 justify-start",children:m.jsxs("div",{className:"flex w-full 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(oi,{agent:e??"",className:"h-3.5 w-3.5"})}),m.jsxs("div",{className:"min-w-0 max-w-full flex-1 space-y-1",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72","data-agent-speaker-label":r,children:r}),i&&m.jsx("span",{className:"shrink-0 rounded-sm bg-muted/18 px-1 py-0.5 text-[8px] font-mono font-medium leading-3 tabular-nums text-muted-foreground/54","data-agent-message-timestamp":i.raw,children:Lh(i)})]}),t]})]})})}function Rh({event:e,agent:t,subItems:n=[],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}){const u=e.message;if(!u)return null;const f=ft(u);if(f)return m.jsx(lt,{agent:t,children:m.jsx(ut,{payload:f,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});const c=u.content;if(!c||!Array.isArray(c))return null;const h=new Set,p=c.filter(I=>I.type==="text"||I.type==="commentary").map(I=>({...I,text:nn(String(I.text??"")),questionPayload:pt(nn(String(I.text??"")))})).filter(I=>I.text.length>0||I.questionPayload),d=c.filter(I=>I.type==="thinking").map(I=>nn(String(I.thinking??""))).filter(Boolean).join(`
82
82
 
83
- `),k=c.filter(I=>I.type==="tool_use"),w=c.filter(I=>I.type==="tool_result"),y=typeof e.timestamp=="string"||typeof e.timestamp=="number"?e.timestamp:void 0,A=p.length>0,_=[...A&&(d.length>0||k.length>0||w.length>0)?[{type:"assistant",...y!==void 0?{timestamp:y}:{},message:{content:[...d.length>0?[{type:"thinking",thinking:d}]:[],...k,...w]}}]:[],...n],D=xh(_);return p.length>0||d.length>0||k.length>0||w.length>0||D?m.jsxs(lt,{agent:t,timestamp:y,children:[p.map((I,O)=>{if(I.questionPayload){const B=Ve(I.questionPayload);return h.has(B)?null:(h.add(B),m.jsx(ut,{payload:I.questionPayload,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o},O))}return m.jsx("div",{className:"group/msg 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.jsxs("div",{className:"flex items-start gap-1",children:[m.jsx(Al,{text:I.text,className:"min-w-0",taskRootPath:s,onOpenFilePath:a}),m.jsx(El,{text:I.text,className:"mt-px"})]})},O)}),D&&m.jsx(yh,{events:_,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}),d.length>0&&!A&&m.jsx(xl,{text:d}),!A&&k.map((I,O)=>m.jsx(yl,{block:I,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},O)),!A&&w.map((I,O)=>m.jsx(Hn,{block:I,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},O))]}):null}function vt(e){return typeof e=="object"&&e!==null}function Bh(e){const t=e.message;return vt(t)&&Array.isArray(t.content)?t.content.filter(vt):Array.isArray(e.content)?e.content.filter(vt):[]}function $h(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.filter(vt).map(n=>String(n.text??"")).join(`
83
+ `),k=c.filter(I=>I.type==="tool_use"),w=c.filter(I=>I.type==="tool_result"),y=typeof e.timestamp=="string"||typeof e.timestamp=="number"?e.timestamp:void 0,A=p.length>0,P=[...A&&(d.length>0||k.length>0||w.length>0)?[{type:"assistant",...y!==void 0?{timestamp:y}:{},message:{content:[...d.length>0?[{type:"thinking",thinking:d}]:[],...k,...w]}}]:[],...n],D=xh(P);return p.length>0||d.length>0||k.length>0||w.length>0||D?m.jsxs(lt,{agent:t,timestamp:y,children:[p.map((I,O)=>{if(I.questionPayload){const B=Ve(I.questionPayload);return h.has(B)?null:(h.add(B),m.jsx(ut,{payload:I.questionPayload,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o},O))}return m.jsx("div",{className:"group/msg 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.jsxs("div",{className:"flex items-start gap-1",children:[m.jsx(Al,{text:I.text,className:"min-w-0",taskRootPath:s,onOpenFilePath:a}),m.jsx(El,{text:I.text,className:"mt-px"})]})},O)}),D&&m.jsx(yh,{events:P,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}),d.length>0&&!A&&m.jsx(xl,{text:d}),!A&&k.map((I,O)=>m.jsx(yl,{block:I,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},O)),!A&&w.map((I,O)=>m.jsx(Hn,{block:I,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},O))]}):null}function vt(e){return typeof e=="object"&&e!==null}function Bh(e){const t=e.message;return vt(t)&&Array.isArray(t.content)?t.content.filter(vt):Array.isArray(e.content)?e.content.filter(vt):[]}function $h(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.filter(vt).map(n=>String(n.text??"")).join(`
84
84
  `):""}function Uh(e){return ft(e)?!0:e.type==="tool_result"&&pt($h(e))!==null}function Hh(e){const t=Bh(e);return t.length===0||t.some(Uh)?!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 bm(e){const t=[];let n=[];const r=()=>{if(n.length===0)return;const i=typeof n[0]?.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(Hh(i)){n.push(i);continue}r(),t.push({event:i,subItems:[]})}return r(),t}function wm({label:e,value:t}){return m.jsxs("div",{className:"min-w-[4.75rem] flex-1 rounded-sm bg-muted/45 px-2 py-1.5 shadow-none",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-[11px] font-semibold leading-4 tracking-tight text-foreground",children:t})]})}function Sm({label:e}){return m.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-muted-foreground",children:e})}function Cm({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:$e("min-w-0 flex-1 break-all text-[9px] leading-[0.95rem] text-foreground",n&&"font-mono"),children:t}),r]})]})}function vm({label:e,value:t,mono:n}){return m.jsxs("div",{className:"rounded-sm bg-muted/45 px-2 py-1.5 shadow-none",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:$e("mt-0.5 text-[9px] font-medium leading-[0.95rem] text-foreground",n&&"font-mono"),children:t})]})}export{gi as $,oi as A,wt as B,km as C,wm as D,tm as E,Sl as F,Cl as G,mm as H,Mo as I,hm as J,dm as K,eo as L,vm as M,gm as N,Ch as O,Zo as P,pm as Q,fm as R,an as S,oo as T,ns as U,vn as V,cm as W,$o as X,rs as Y,An as Z,Fn as _,ai as a,It as a0,cs as a1,Qc as a2,hh as a3,Vh as b,xm as c,om as d,Jh as e,am as f,im as g,um as h,rm as i,lm as j,sm as k,ym as l,bm as m,Xh as n,Sm as o,jh as p,qe as q,Yh as r,Cm as s,Kh as t,em as u,Qh as v,Zh as w,nm as x,Wh as y,Gh as z};