juneau 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,16 +1,16 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),k=require("react/jsx-runtime"),G=e=>new Promise(t=>setTimeout(t,e));function Qi(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}async function Ut(e,t,n){for await(const r of e)if(n?.aborted||(t(r),r.type==="done"||r.type==="error"))break}const Yi={async*sendMessage(e){const n=[...e.messages].reverse().find(i=>i.role==="user")?.parts.find(i=>i.type==="text"),r=n?.type==="text"?n.text.toLowerCase():"";r.includes("activity")||r.includes("progress")||r.includes("document")||r.includes("dokument")?yield*Xi():r.includes("table")||r.includes("data")||r.includes("list")||r.includes("show")?yield*Ji():r.includes("proposal")||r.includes("suggest")||r.includes("recommend")?yield*Gi():r.includes("help")||r.includes("what can")||r.includes("how do")?yield*Ki():r.includes("error")||r.includes("fail")||r.includes("break")?yield*Zi():yield*el(r)}};async function*Xi(){yield{type:"part",part:{type:"activity",id:"select-skill",title:"Selecting skill",description:"Looking for the best skill for this request.",status:"running"}},await G(700),yield{type:"part",part:{type:"activity",id:"select-skill",title:"Skill selected",description:"Using Document Search.",status:"done"}},await G(300),yield{type:"part",part:{type:"activity",id:"search-document",title:"Searching document",description:"Looking up document by ID.",status:"running"}},await G(900),yield{type:"part",part:{type:"activity",id:"search-document",title:"Document found",description:"Found document INV-2024-0894.",status:"done"}},await G(300),yield*Z(`
2
- Found document **INV-2024-0894** from **DataSys a.s.** for **CZK 390 000**.`,25),yield{type:"done"}}async function*Ji(){yield*Z(`Here is a summary of the data you requested:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),k=require("react/jsx-runtime"),G=e=>new Promise(t=>setTimeout(t,e));function Yi(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}async function Ut(e,t,n){for await(const r of e)if(n?.aborted||(t(r),r.type==="done"||r.type==="error"))break}const Xi={async*sendMessage(e){const n=[...e.messages].reverse().find(i=>i.role==="user")?.parts.find(i=>i.type==="text"),r=n?.type==="text"?n.text.toLowerCase():"";r.includes("activity")||r.includes("progress")||r.includes("document")||r.includes("dokument")?yield*Ji():r.includes("table")||r.includes("data")||r.includes("list")||r.includes("show")?yield*Gi():r.includes("proposal")||r.includes("suggest")||r.includes("recommend")?yield*Ki():r.includes("help")||r.includes("what can")||r.includes("how do")?yield*Zi():r.includes("error")||r.includes("fail")||r.includes("break")?yield*el():yield*tl(r)}};async function*Ji(){yield{type:"part",part:{type:"activity",id:"select-skill",title:"Selecting skill",description:"Looking for the best skill for this request.",status:"running"}},await G(700),yield{type:"part",part:{type:"activity",id:"select-skill",title:"Skill selected",description:"Using Document Search.",status:"done"}},await G(300),yield{type:"part",part:{type:"activity",id:"search-document",title:"Searching document",description:"Looking up document by ID.",status:"running"}},await G(900),yield{type:"part",part:{type:"activity",id:"search-document",title:"Document found",description:"Found document INV-2024-0894.",status:"done"}},await G(300),yield*Z(`
2
+ Found document **INV-2024-0894** from **DataSys a.s.** for **CZK 390 000**.`,25),yield{type:"done"}}async function*Gi(){yield*Z(`Here is a summary of the data you requested:
3
3
 
4
4
  `,30),await G(400),yield{type:"part",part:{type:"table",columns:["Name","Category","Value","Status"],rows:[{Name:"Item Alpha",Category:"Type A",Value:"1,200",Status:"Active"},{Name:"Item Beta",Category:"Type B",Value:"840",Status:"Active"},{Name:"Item Gamma",Category:"Type A",Value:"3,050",Status:"Pending"},{Name:"Item Delta",Category:"Type C",Value:"610",Status:"Inactive"},{Name:"Item Epsilon",Category:"Type B",Value:"2,200",Status:"Active"}]}},await G(300),yield*Z(`
5
- Total across all entries: **7,900** — Type A accounts for the largest share at 53%.`,25),yield{type:"done"}}async function*Gi(){yield*Z(`Based on the current data, I have a suggestion for you:
5
+ Total across all entries: **7,900** — Type A accounts for the largest share at 53%.`,25),yield{type:"done"}}async function*Ki(){yield*Z(`Based on the current data, I have a suggestion for you:
6
6
 
7
- `,30),await G(500),yield{type:"part",part:{type:"proposal",proposal:{id:"mock-proposal-1",title:"Save this as a recurring report",description:"This summary can be automatically generated on a schedule so you always have up-to-date insights.",confirmLabel:"Save report",cancelLabel:"Dismiss",payload:{reportType:"summary",schedule:"weekly"}}}},yield{type:"done"}}async function*Ki(){yield*Z(`I'm a general-purpose AI assistant. Here's what I can help with:
7
+ `,30),await G(500),yield{type:"part",part:{type:"proposal",proposal:{id:"mock-proposal-1",title:"Save this as a recurring report",description:"This summary can be automatically generated on a schedule so you always have up-to-date insights.",confirmLabel:"Save report",cancelLabel:"Dismiss",payload:{reportType:"summary",schedule:"weekly"}}}},yield{type:"done"}}async function*Zi(){yield*Z(`I'm a general-purpose AI assistant. Here's what I can help with:
8
8
 
9
9
  `,30),await G(200),yield*Z(`- **Summarise data** — ask me to show, list, or summarise information
10
10
  `,22),await G(150),yield*Z(`- **Make suggestions** — ask me to recommend or propose something
11
11
  `,22),await G(150),yield*Z(`- **Answer questions** — ask me anything and I'll do my best
12
12
  `,22),await G(200),yield*Z(`
13
- Try asking: *"Show me the data"* or *"Can you suggest something?"*`,25),yield{type:"done"}}async function*Zi(){yield*Z("Attempting to process your request…",30),await G(800),yield{type:"error",message:"Simulated error: the upstream service returned an unexpected response."}}async function*el(e){yield*Z(`Got it — you asked about *"${e||"your request"}"*.
13
+ Try asking: *"Show me the data"* or *"Can you suggest something?"*`,25),yield{type:"done"}}async function*el(){yield*Z("Attempting to process your request…",30),await G(800),yield{type:"error",message:"Simulated error: the upstream service returned an unexpected response."}}async function*tl(e){yield*Z(`Got it — you asked about *"${e||"your request"}"*.
14
14
 
15
15
  `,30),await G(400),yield*Z(`I'm a **mock adapter** used for development. I respond to a few trigger words:
16
16
 
@@ -18,35 +18,35 @@ Try asking: *"Show me the data"* or *"Can you suggest something?"*`,25),yield{ty
18
18
  `,22),await G(150),yield*Z(`- Say **"suggest"**, **"recommend"**, or **"proposal"** → renders a proposal card
19
19
  `,22),await G(150),yield*Z(`- Say **"help"** or **"what can you do"** → shows capabilities
20
20
  `,22),await G(150),yield*Z(`- Say **"error"** or **"fail"** → simulates an error response
21
- `,22),yield{type:"done"}}async function*Z(e,t){for(let r=0;r<e.length;r+=3)yield{type:"text",text:e.slice(r,r+3)},await G(t)}function yr(e){if(!e||e==="[DONE]")return[];let t;try{t=JSON.parse(e)}catch{return[]}switch(t.type){case"text":return t.text?[{type:"text",text:t.text}]:[];case"activity":return[{type:"part",part:{type:"activity",id:t.id,title:t.title,description:t.description,status:t.status,metadata:t.metadata}}];case"part":return[{type:"part",part:t.part}];case"done":return[{type:"done"}];case"error":return[{type:"error",message:t.message}];default:return[]}}function tl(e,t={}){const{method:n="POST",headers:r={},getHeaders:i,getBody:o,parseEvent:l=rl,credentials:a}=t;return{async*sendMessage(s){const u=i?await i(s):{},f=o?o(s):{messages:s.messages,context:s.context},c=await fetch(e,{method:n,credentials:a,headers:{"Content-Type":"application/json",...r,...u},body:JSON.stringify(f)});if(!c.ok){const h=await c.text().catch(()=>`HTTP ${c.status}`);yield{type:"error",message:`Request failed (${c.status}): ${h}`};return}if(!c.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*nl(c.body,l)}}}async function*nl(e,t){const n=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await n.read();if(o)break;i+=r.decode(l,{stream:!0});const a=i.split(`
22
- `);i=a.pop()??"";for(const s of a){const u=s.trim();if(!(!u||u.startsWith(":"))&&u.startsWith("data: ")){const f=u.slice(6);if(f==="[DONE]"){yield{type:"done"};return}const c=t(f);for(const h of c)if(yield h,h.type==="done"||h.type==="error")return}}}}finally{n.releaseLock()}yield{type:"done"}}const rl=e=>{if(!e||e==="[DONE]")return[];const t=yr(e);if(t.length>0)return t;try{const n=JSON.parse(e);if(n.error?.message)return[{type:"error",message:n.error.message}];const r=n.choices?.[0]?.delta;return n.choices?.[0]?.finish_reason==="stop"?[{type:"done"}]:r?.content?[{type:"text",text:r.content}]:[]}catch{return[]}};function il(e,t={}){const{method:n="POST",headers:r={},getHeaders:i,getBody:o,parseChunk:l=ol,credentials:a}=t;return{async*sendMessage(s){const u=i?await i(s):{},f=o?o(s):{messages:s.messages,context:s.context},c=await fetch(e,{method:n,credentials:a,headers:{"Content-Type":"application/json",...r,...u},body:JSON.stringify(f)});if(!c.ok){const h=await c.text().catch(()=>`HTTP ${c.status}`);yield{type:"error",message:`Request failed (${c.status}): ${h}`};return}if(!c.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*ll(c.body,l)}}}async function*ll(e,t){const n=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await n.read();if(o)break;i+=r.decode(l,{stream:!0});const a=i.split(`
23
- `);i=a.pop()??"";for(const s of a){const u=s.trim();if(!u)continue;const f=t(u);for(const c of f)if(yield c,c.type==="done"||c.type==="error")return}}if(i.trim()){const o=t(i.trim());for(const l of o)if(yield l,l.type==="done"||l.type==="error")return}}finally{n.releaseLock()}yield{type:"done"}}const ol=e=>{const t=yr(e);return t.length>0?t:e?[{type:"text",text:e}]:[]};let al=0;const ut=()=>`msg-${++al}-${Date.now()}`;function xr({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r}){const[i,o]=X.useState([]),[l,a]=X.useState(""),[s,u]=X.useState(!1),[f,c]=X.useState(!1),[h,p]=X.useState(null),g=X.useRef(null),b=X.useCallback(L=>{o(y=>{const _=y[y.length-1];if(!_||_.role!=="assistant")return y;if(L.type==="activity"&&L.id){const P=[..._.parts],j=P.findIndex(z=>z.type==="activity"&&z.id===L.id);if(j!==-1)return P[j]=L,[...y.slice(0,-1),{..._,parts:P}]}return[...y.slice(0,-1),{..._,parts:[..._.parts,L]}]})},[]),S=X.useCallback(L=>{o(y=>{const _=y[y.length-1];if(!_||_.role!=="assistant")return y;const P=[..._.parts],j=P[P.length-1];return j?.type==="text"?P[P.length-1]={type:"text",text:j.text+L}:P.push({type:"text",text:L}),[...y.slice(0,-1),{..._,parts:P}]})},[]),x=X.useCallback(async(L,y)=>{p(null);const _={id:ut(),role:"user",parts:[{type:"text",text:L}],createdAt:new Date},P=ut();let j=!1;const z=()=>{if(j)return;j=!0;const B={id:P,role:"assistant",parts:[],createdAt:new Date};o(U=>[...U,B])};o(B=>[...B,_]),u(!0),c(!0),g.current?.abort();const T=new AbortController;g.current=T;try{const B=e.sendMessage({messages:[...y,_],context:t});await Ut(B,U=>{switch(c(!1),U.type){case"text":z(),S(U.text);break;case"part":z(),b(U.part);break;case"error":z(),b({type:"error",message:U.message}),p(U.message);break;case"done":break}},T.signal)}catch(B){const U=B instanceof Error?B.message:"Unknown error occurred";p(U),z(),b({type:"error",message:U})}finally{u(!1),c(!1)}},[e,t,S,b]),I=X.useCallback(async()=>{const L=l.trim();!L||s||(a(""),await x(L,i))},[l,s,i,x]),v=X.useCallback(async L=>{!L.trim()||s||await x(L,i)},[s,i,x]),F=X.useCallback(async L=>{if(s)return;p(null),u(!0),c(!0);const y={id:ut(),role:"assistant",parts:[],createdAt:new Date};o(j=>[...j,y]),g.current?.abort();const _=new AbortController;g.current=_;const P={id:ut(),role:"system",parts:[{type:"text",text:L}],createdAt:new Date};try{const j=e.sendMessage({messages:[P],context:t});await Ut(j,z=>{switch(c(!1),z.type){case"text":S(z.text);break;case"part":b(z.part);break;case"error":b({type:"error",message:z.message}),p(z.message);break;case"done":break}},_.signal)}catch(j){const z=j instanceof Error?j.message:"Unknown error occurred";p(z),b({type:"error",message:z})}finally{u(!1),c(!1)}},[s,e,t,S,b]),R=X.useCallback(()=>{g.current?.abort(),u(!1),c(!1)},[]),C=X.useCallback(()=>{g.current?.abort(),o([]),a(""),p(null),u(!1),c(!1)},[]),O=X.useCallback((L,y)=>{n?.(L,y)},[n]),V=X.useCallback(L=>{r?.(L)},[r]);return{messages:i,input:l,setInput:a,sendMessage:I,sendMessageWithText:v,sendGreeting:F,stop:R,isLoading:s,isConnecting:f,error:h,reset:C,confirmProposal:O,cancelProposal:V}}const yt={sidebarTitle:"AI Assistant",clearConversation:"Clear conversation",minimizeSidebar:"Minimize",expandSidebar:"Expand",userLabel:"You",inputPlaceholder:"Ask a question… (Enter to send)",sendMessage:"Send message",stopMessage:"Stop",typingMessage:"Assistant is typing",connectingMessage:"Connecting…",emptyStateText:"How can I help you today?",emptyStateHint:'Try: "Show me the data" or "Can you suggest something?"',proposalConfirm:"Confirm",proposalCancel:"Cancel",errorDismiss:"Dismiss",actionAddFile:"Add file",actionQuickActions:"Quick actions",actionNew:"New",actionHistory:"History",actionRules:"Rules"},kr=X.createContext(yt);function De(){return X.useContext(kr)}const sl="_root_14q8g_1",ul={root:sl};function cl({children:e,theme:t,labels:n,className:r,style:i}){const o=n?{...yt,...n}:yt,l=t?fl(t):void 0;return k.jsx(kr.Provider,{value:o,children:k.jsx("div",{className:[ul.root,r].filter(Boolean).join(" "),style:{...l,...i},children:e})})}function fl(e){const t={"--juneau-color-primary":e.colorPrimary,"--juneau-color-primary-dark":e.colorPrimaryDark,"--juneau-color-primary-light":e.colorPrimaryLight,"--juneau-color-primary-border":e.colorPrimaryBorder,"--juneau-color-accent":e.colorAccent,"--juneau-color-accent-dark":e.colorAccentDark,"--juneau-color-accent-light":e.colorAccentLight,"--juneau-color-accent-border":e.colorAccentBorder,"--juneau-color-surface":e.colorSurface,"--juneau-color-surface-raised":e.colorSurfaceRaised,"--juneau-color-surface-hover":e.colorSurfaceHover,"--juneau-color-border":e.colorBorder,"--juneau-color-border-subtle":e.colorBorderSubtle,"--juneau-color-text-primary":e.colorTextPrimary,"--juneau-color-text-secondary":e.colorTextSecondary,"--juneau-color-text-muted":e.colorTextMuted,"--juneau-color-text-faint":e.colorTextFaint,"--juneau-color-text-inverse":e.colorTextInverse,"--juneau-color-assistant-avatar":e.colorAssistantAvatar,"--juneau-radius-sm":e.radiusSm,"--juneau-radius-md":e.radiusMd,"--juneau-radius-lg":e.radiusLg,"--juneau-font-family":e.fontFamily};return Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0))}const br=X.createContext(null);function wr(){const e=X.useContext(br);if(!e)throw new Error("useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>.");return e}function pl({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r,children:i}){const[o,l]=X.useState(t),a=X.useCallback(u=>{l(u)},[]),s=xr({adapter:e,context:o,onProposalConfirm:n,onProposalCancel:r});return k.jsx(br.Provider,{value:{...s,setContext:a},children:i})}const hl={sidebarTitle:"AI Asistent",clearConversation:"Vymazat konverzaci",minimizeSidebar:"Minimalizovat",expandSidebar:"Rozbalit",userLabel:"Vy",inputPlaceholder:"Zeptejte se na cokoliv… (Enter pro odeslání)",sendMessage:"Odeslat zprávu",stopMessage:"Zastavit",typingMessage:"Asistent píše",connectingMessage:"Připojování…",emptyStateText:"Jak vám mohu dnes pomoci?",emptyStateHint:'Zkuste: „Ukáž mi data" nebo „Máš nějaký návrh?"',proposalConfirm:"Potvrdit",proposalCancel:"Zrušit",errorDismiss:"Zavřít",actionAddFile:"Přidat soubor",actionQuickActions:"Rychlé akce",actionNew:"Nový",actionHistory:"Historie",actionRules:"Pravidla"};function Cr({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})})}function dl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s6.2-22.8 16.4-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})})}function ml({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"})})}function gl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"})})}function yl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"})})}function xl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-31.8-31.8C143.9 83.5 196.2 64 252.6 64C370.8 64 464 157.8 464 276c0 77.5-40.8 145.4-102 182.9c-15.1 9.2-19.9 29-10.7 44.1s29 19.9 44.1 10.7C471 467.5 528 378.4 528 276C528 124.1 404.5 0 252.6 0C186 0 125.3 26.4 80 70.2L75 75zM256 152c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z"})})}function kl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-26.6 0c-25.8 50.9-72.7 88.5-129.4 99.8L384 416l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-72.2C135.3 332.5 88.4 294.9 62.6 244L48 244c-26.5 0-48-21.5-48-48L0 80zM128 240c0 70.7 57.3 128 128 128s128-57.3 128-128l0-128L128 112l0 128zM512 176l0-64-64 0 0 64-48 0 0 16c0 8.8-.7 17.4-2 25.8c3.3 .1 6.6 .2 9.9 .2l56 0c26.5 0 48-21.5 48-48l0-64zM48 176c0 26.5 21.5 48 48 48l56 0c3.4 0 6.7-.1 9.9-.2c-1.3-8.4-2-17-2-25.8l0-16-48 0 0-64-64 0 0 58z"})})}function bl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z"})})}function wl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z"})})}function Cl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})})}function Sl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Al=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Il={};function En(e,t){return(Il.jsx?Al:vl).test(e)}const El=/[ \t\n\f\r]/g;function _l(e){return typeof e=="object"?e.type==="text"?_n(e.value):!1:_n(e)}function _n(e){return e.replace(El,"")===""}class lt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}lt.prototype.normal={};lt.prototype.property={};lt.prototype.space=void 0;function Sr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new lt(n,r,t)}function Wt(e){return e.toLowerCase()}class ie{constructor(t,n){this.attribute=n,this.property=t}}ie.prototype.attribute="";ie.prototype.booleanish=!1;ie.prototype.boolean=!1;ie.prototype.commaOrSpaceSeparated=!1;ie.prototype.commaSeparated=!1;ie.prototype.defined=!1;ie.prototype.mustUseProperty=!1;ie.prototype.number=!1;ie.prototype.overloadedBoolean=!1;ie.prototype.property="";ie.prototype.spaceSeparated=!1;ie.prototype.space=void 0;let Tl=0;const M=je(),J=je(),Qt=je(),A=je(),Q=je(),ze=je(),oe=je();function je(){return 2**++Tl}const Yt=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:J,commaOrSpaceSeparated:oe,commaSeparated:ze,number:A,overloadedBoolean:Qt,spaceSeparated:Q},Symbol.toStringTag,{value:"Module"})),Et=Object.keys(Yt);class rn extends ie{constructor(t,n,r,i){let o=-1;if(super(t,n),Tn(this,"space",i),typeof r=="number")for(;++o<Et.length;){const l=Et[o];Tn(this,Et[o],(r&Yt[l])===Yt[l])}}}rn.prototype.defined=!0;function Tn(e,t,n){n&&(e[t]=n)}function $e(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Wt(r)]=r,n[Wt(o.attribute)]=r}return new lt(t,n,e.space)}const vr=$e({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:Q,ariaCurrent:null,ariaDescribedBy:Q,ariaDetails:null,ariaDisabled:J,ariaDropEffect:Q,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:Q,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Q,ariaLevel:A,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:Q,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:Q,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:J,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ar(e,t){return t in e?e[t]:t}function Ir(e,t){return Ar(e,t.toLowerCase())}const Pl=$e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ze,acceptCharset:Q,accessKey:Q,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alpha:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:Q,autoFocus:M,autoPlay:M,blocking:Q,capture:null,charSet:null,checked:M,cite:null,className:Q,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:J,controls:M,controlsList:Q,coords:A|ze,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:Qt,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:Q,height:A,hidden:Qt,high:A,href:null,hrefLang:null,htmlFor:Q,httpEquiv:Q,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:Q,itemRef:Q,itemScope:M,itemType:Q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:M,muted:M,name:null,nonce:null,noModule:M,noValidate:M,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:M,optimum:A,pattern:null,ping:Q,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:Q,required:M,reversed:M,rows:A,rowSpan:A,sandbox:Q,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootCustomElementRegistry:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shadowRootSerializable:M,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:J,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Q,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M,declare:M,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:M,disablePictureInPicture:M,disableRemotePlayback:M,exportParts:ze,part:Q,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Ir}),zl=$e({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",maskType:"mask-type",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:oe,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:Q,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ze,g2:ze,glyphName:ze,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oe,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ar}),Er=$e({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()}}),_r=$e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ir}),Tr=$e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ll={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"},Dl=/[A-Z]/g,Pn=/-[a-z]/g,jl=/^data[-\w.:]+$/i;function Ml(e,t){const n=Wt(t);let r=t,i=ie;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Pn,Rl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Pn.test(o)){let l=o.replace(Dl,Fl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=rn}return new i(r,t)}function Fl(e){return"-"+e.toLowerCase()}function Rl(e){return e.charAt(1).toUpperCase()}const Nl=Sr([vr,Pl,Er,_r,Tr],"html"),ln=Sr([vr,zl,Er,_r,Tr],"svg");function Ol(e){return e.join(" ").trim()}function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ne={},_t,zn;function Bl(){if(zn)return _t;zn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
24
- `,u="/",f="*",c="",h="comment",p="declaration";function g(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var I=1,v=1;function F(z){var T=z.match(t);T&&(I+=T.length);var B=z.lastIndexOf(s);v=~B?z.length-B:v+z.length}function R(){var z={line:I,column:v};return function(T){return T.position=new C(z),L(),T}}function C(z){this.start=z,this.end={line:I,column:v},this.source=x.source}C.prototype.content=S;function O(z){var T=new Error(x.source+":"+I+":"+v+": "+z);if(T.reason=z,T.filename=x.source,T.line=I,T.column=v,T.source=S,!x.silent)throw T}function V(z){var T=z.exec(S);if(T){var B=T[0];return F(B),S=S.slice(B.length),T}}function L(){V(n)}function y(z){var T;for(z=z||[];T=_();)T!==!1&&z.push(T);return z}function _(){var z=R();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var T=2;c!=S.charAt(T)&&(f!=S.charAt(T)||u!=S.charAt(T+1));)++T;if(T+=2,c===S.charAt(T-1))return O("End of comment missing");var B=S.slice(2,T-2);return v+=2,F(B),S=S.slice(T),v+=2,z({type:h,comment:B})}}function P(){var z=R(),T=V(r);if(T){if(_(),!V(i))return O("property missing ':'");var B=V(o),U=z({type:p,property:b(T[0].replace(e,c)),value:B?b(B[0].replace(e,c)):c});return V(l),U}}function j(){var z=[];y(z);for(var T;T=P();)T!==!1&&(z.push(T),y(z));return z}return L(),j()}function b(S){return S?S.replace(a,c):c}return _t=g,_t}var Ln;function Hl(){if(Ln)return Ne;Ln=1;var e=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.default=n;const t=e(Bl());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return Ne}var Qe={},Dn;function $l(){if(Dn)return Qe;Dn=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)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Qe.camelCase=s,Qe}var Ye,jn;function ql(){if(jn)return Ye;jn=1;var e=Ye&&Ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Hl()),n=$l();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Ye=r,Ye}var Vl=ql();const Ul=Pr(Vl),zr=Lr("end"),on=Lr("start");function Lr(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 Wl(e){const t=on(e),n=zr(e);if(t&&n)return{start:t,end:n}}function et(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Mn(e.position):"start"in e||"end"in e?Mn(e):"line"in e||"column"in e?Xt(e):""}function Xt(e){return Fn(e&&e.line)+":"+Fn(e&&e.column)}function Mn(e){return Xt(e&&e.start)+"-"+Xt(e&&e.end)}function Fn(e){return e&&typeof e=="number"?e:1}class te extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=et(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}te.prototype.file="";te.prototype.name="";te.prototype.reason="";te.prototype.message="";te.prototype.stack="";te.prototype.column=void 0;te.prototype.line=void 0;te.prototype.ancestors=void 0;te.prototype.cause=void 0;te.prototype.fatal=void 0;te.prototype.place=void 0;te.prototype.ruleId=void 0;te.prototype.source=void 0;const an={}.hasOwnProperty,Ql=new Map,Yl=/[A-Z]/g,Xl=new Set(["table","tbody","thead","tfoot","tr"]),Jl=new Set(["td","th"]),Dr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gl(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=lo(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=io(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"?ln:Nl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=jr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function jr(e,t,n){if(t.type==="element")return Kl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Zl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return to(e,t,n);if(t.type==="mdxjsEsm")return eo(e,t);if(t.type==="root")return no(e,t,n);if(t.type==="text")return ro(e,t)}function Kl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ln,e.schema=i),e.ancestors.push(t);const o=Fr(e,t.tagName,!1),l=oo(e,t);let a=un(e,t);return Xl.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!_l(s):!0})),Mr(e,l,o,t),sn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Zl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rt(e,t.position)}function eo(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rt(e,t.position)}function to(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ln,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Fr(e,t.name,!0),l=ao(e,t),a=un(e,t);return Mr(e,l,o,t),sn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function no(e,t,n){const r={};return sn(r,un(e,t)),e.create(t,e.Fragment,r,n)}function ro(e,t){return t.value}function Mr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function io(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function lo(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=on(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function oo(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&an.call(t.properties,i)){const o=so(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Jl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ao(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else rt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else rt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function un(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ql;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=jr(e,o,l);a!==void 0&&n.push(a)}return n}function so(e,t,n){const r=Ml(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Sl(n):Ol(n)),r.property==="style"){let i=typeof n=="object"?n:uo(e,String(n));return e.stylePropertyNameCase==="css"&&(i=co(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ll[r.property]||r.property:r.attribute,n]}}function uo(e,t){try{return Ul(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new te("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=Dr+"#cannot-parse-style-attribute",i}}function Fr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=En(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=En(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return an.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rt(e)}function rt(e,t){const n=new te("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=Dr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function co(e){const t={};let n;for(n in e)an.call(e,n)&&(t[fo(n)]=e[n]);return t}function fo(e){let t=e.replace(Yl,po);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function po(e){return"-"+e.toLowerCase()}const Tt={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"]},ho={};function cn(e,t){const n=ho,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Rr(e,r,i)}function Rr(e,t,n){if(mo(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 Rn(e.children,t,n)}return Array.isArray(e)?Rn(e,t,n):""}function Rn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Rr(e[i],t,n);return r.join("")}function mo(e){return!!(e&&typeof e=="object")}const Nn=document.createElement("i");function fn(e){const t="&"+e+";";Nn.innerHTML=t;const n=Nn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ae(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function se(e,t){return e.length>0?(ae(e,e.length,0,t),e):t}const On={}.hasOwnProperty;function Nr(e){const t={};let n=-1;for(;++n<e.length;)go(t,e[n]);return t}function go(e,t){let n;for(n in t){const i=(On.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){On.call(i,l)||(i[l]=[]);const a=o[l];yo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function yo(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ae(e,0,0,r)}function Or(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 he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ne=Ae(/[A-Za-z]/),ee=Ae(/[\dA-Za-z]/),xo=Ae(/[#-'*+\--9=?A-Z^-~]/);function xt(e){return e!==null&&(e<32||e===127)}const Jt=Ae(/\d/),ko=Ae(/[\dA-Fa-f]/),bo=Ae(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}const Ct=Ae(/\p{P}|\p{S}/u),Le=Ae(/\s/);function Ae(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&ee(e.charCodeAt(n+1))&&ee(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function q(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return H(s)?(e.enter(n),a(s)):t(s)}function a(s){return H(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const wo={tokenize:Co};function Co(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),q(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return D(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const So={tokenize:vo},Bn={tokenize:Ao};function vo(e){const t=this,n=[];let r=0,i,o,l;return a;function a(v){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,s,u)(v)}return u(v)}function s(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const F=t.events.length;let R=F,C;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){C=t.events[R][1].end;break}x(r);let O=F;for(;O<t.events.length;)t.events[O][1].end={...C},O++;return ae(t.events,R+1,0,t.events.slice(F)),t.events.length=O,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bn,f,c)(v)}function f(v){return i&&I(),x(r),h(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(v)}function h(v){return t.containerState={},e.attempt(Bn,p,g)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function g(v){if(v===null){i&&I(),x(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return D(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),b)}function S(v,F){const R=t.sliceStream(v);if(F&&R.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(R),t.parser.lazy[v.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<l&&(!i.events[C][1].end||i.events[C][1].end.offset>l))return;const O=t.events.length;let V=O,L,y;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(L){y=t.events[V][1].end;break}L=!0}for(x(r),C=O;C<t.events.length;)t.events[C][1].end={...y},C++;ae(t.events,V+1,0,t.events.slice(O)),t.events.length=C}}function x(v){let F=n.length;for(;F-- >v;){const R=n[F];t.containerState=R[1],R[0].exit.call(t,e)}n.length=v}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ao(e,t,n){return q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function He(e){if(e===null||Y(e)||Le(e))return 1;if(Ct(e))return 2}function St(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Gt={name:"attention",resolveAll:Io,tokenize:Eo};function Io(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};Hn(c,-s),Hn(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=se(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=se(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=se(u,St(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=se(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=se(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ae(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 Eo(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=He(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=He(s),c=!f||f===2&&i||n.includes(s),h=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(f||!c)),t(s)}}function Hn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _o={name:"autolink",tokenize:To};function To(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return ne(p)?(e.consume(p),l):p===64?n(p):u(p)}function l(p){return p===43||p===45||p===46||ee(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,s):(p===43||p===45||p===46||ee(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||xt(p)?n(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):xo(p)?(e.consume(p),u):n(p)}function f(p){return ee(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||ee(p))&&r++<63){const g=p===45?h:c;return e.consume(p),g}return n(p)}}const ot={partial:!0,tokenize:Po};function Po(e,t,n){return r;function r(o){return H(o)?q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||D(o)?t(o):n(o)}}const Br={continuation:{tokenize:Lo},exit:Do,name:"blockQuote",tokenize:zo};function zo(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return H(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Lo(e,t,n){const r=this;return i;function i(l){return H(l)?q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Br,t,n)(l)}}function Do(e){e.exit("blockQuote")}const Hr={name:"characterEscape",tokenize:jo};function jo(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return bo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const $r={name:"characterReference",tokenize:Mo};function Mo(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=ee,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=ko,f):(e.enter("characterReferenceValue"),o=7,l=Jt,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===ee&&!fn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const $n={partial:!0,tokenize:Ro},qn={concrete:!0,name:"codeFenced",tokenize:Fo};function Fo(e,t,n){const r=this,i={partial:!0,tokenize:R};let o=0,l=0,a;return s;function s(C){return u(C)}function u(C){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===a?(l++,e.consume(C),f):l<3?n(C):(e.exit("codeFencedFenceSequence"),H(C)?q(e,c,"whitespace")(C):c(C))}function c(C){return C===null||D(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check($n,b,F)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||D(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):H(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,p,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),h)}function p(C){return C===null||D(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||D(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===a?n(C):(e.consume(C),g)}function b(C){return e.attempt(i,F,S)(C)}function S(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),x}function x(C){return o>0&&H(C)?q(e,I,"linePrefix",o+1)(C):I(C)}function I(C){return C===null||D(C)?e.check($n,b,F)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||D(C)?(e.exit("codeFlowValue"),I(C)):(e.consume(C),v)}function F(C){return e.exit("codeFenced"),t(C)}function R(C,O,V){let L=0;return y;function y(T){return C.enter("lineEnding"),C.consume(T),C.exit("lineEnding"),_}function _(T){return C.enter("codeFencedFence"),H(T)?q(C,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):P(T)}function P(T){return T===a?(C.enter("codeFencedFenceSequence"),j(T)):V(T)}function j(T){return T===a?(L++,C.consume(T),j):L>=l?(C.exit("codeFencedFenceSequence"),H(T)?q(C,z,"whitespace")(T):z(T)):V(T)}function z(T){return T===null||D(T)?(C.exit("codeFencedFence"),O(T)):V(T)}}}function Ro(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Pt={name:"codeIndented",tokenize:Oo},No={partial:!0,tokenize:Bo};function Oo(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),q(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):D(u)?e.attempt(No,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||D(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function Bo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):q(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):D(l)?i(l):n(l)}}const Ho={name:"codeText",previous:qo,resolve:$o,tokenize:Vo};function $o(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 qo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Vo(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):D(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||D(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class Uo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xe(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xe(this.left,n.reverse())}}}function Xe(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function qr(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new Uo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Wo(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ae(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Wo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=n,g=0,b=0;const S=[b];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(b=h+1,S.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const x=a.slice(S[h],S[h+1]),I=o.pop();s.push([I,I+x.length-1]),e.splice(I,2,x)}for(s.reverse(),h=-1;++h<s.length;)u[g+s[h][0]]=g+s[h][1],g+=s[h][1]-s[h][0]-1;return u}const Qo={resolve:Xo,tokenize:Jo},Yo={partial:!0,tokenize:Go};function Xo(e){return qr(e),e}function Jo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):D(a)?e.check(Yo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Go(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),q(e,o,"linePrefix")}function o(l){if(l===null||D(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Vr(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),h):x===null||x===32||x===41||xt(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(x))}function h(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(a),h(x)):x===null||x===60||D(x)?n(x):(e.consume(x),x===92?g:p)}function g(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function b(x){return!f&&(x===null||x===41||Y(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f<u&&x===40?(e.consume(x),f++,b):x===41?(e.consume(x),f--,b):x===null||x===32||x===40||xt(x)?n(x):(e.consume(x),x===92?S:b)}function S(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Ur(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):D(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||D(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!H(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function Wr(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,s):n(h)}function s(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===l?(e.exit(o),s(l)):h===null?n(h):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===l||h===null||D(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===l||h===92?(e.consume(h),f):f(h)}}function tt(e,t){let n;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):H(i)?q(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Ko={name:"definition",tokenize:ea},Zo={partial:!0,tokenize:ta};function ea(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Ur.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):n(p)}function s(p){return Y(p)?tt(e,u)(p):u(p)}function u(p){return Vr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Zo,c,c)(p)}function c(p){return H(p)?q(e,h,"whitespace")(p):h(p)}function h(p){return p===null||D(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function ta(e,t,n){return r;function r(a){return Y(a)?tt(e,i)(a):n(a)}function i(a){return Wr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return H(a)?q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||D(a)?t(a):n(a)}}const na={name:"hardBreakEscape",tokenize:ra};function ra(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return D(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const ia={name:"headingAtx",resolve:la,tokenize:oa};function la(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ae(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function oa(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Y(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||D(f)?(e.exit("atxHeading"),t(f)):H(f)?q(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||Y(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const aa=["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"],Vn=["pre","script","style","textarea"],sa={concrete:!0,name:"htmlFlow",resolveTo:fa,tokenize:pa},ua={partial:!0,tokenize:da},ca={partial:!0,tokenize:ha};function fa(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 pa(e,t,n){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),h):m===47?(e.consume(m),o=!0,b):m===63?(e.consume(m),i=3,r.interrupt?t:d):ne(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function h(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,g):ne(m)?(e.consume(m),i=4,r.interrupt?t:d):n(m)}function p(m){return m===45?(e.consume(m),r.interrupt?t:d):n(m)}function g(m){const fe="CDATA[";return m===fe.charCodeAt(a++)?(e.consume(m),a===fe.length?r.interrupt?t:P:g):n(m)}function b(m){return ne(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function S(m){if(m===null||m===47||m===62||Y(m)){const fe=m===47,Ie=l.toLowerCase();return!fe&&!o&&Vn.includes(Ie)?(i=1,r.interrupt?t(m):P(m)):aa.includes(l.toLowerCase())?(i=6,fe?(e.consume(m),x):r.interrupt?t(m):P(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?I(m):v(m))}return m===45||ee(m)?(e.consume(m),l+=String.fromCharCode(m),S):n(m)}function x(m){return m===62?(e.consume(m),r.interrupt?t:P):n(m)}function I(m){return H(m)?(e.consume(m),I):y(m)}function v(m){return m===47?(e.consume(m),y):m===58||m===95||ne(m)?(e.consume(m),F):H(m)?(e.consume(m),v):y(m)}function F(m){return m===45||m===46||m===58||m===95||ee(m)?(e.consume(m),F):R(m)}function R(m){return m===61?(e.consume(m),C):H(m)?(e.consume(m),R):v(m)}function C(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),s=m,O):H(m)?(e.consume(m),C):V(m)}function O(m){return m===s?(e.consume(m),s=null,L):m===null||D(m)?n(m):(e.consume(m),O)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||Y(m)?R(m):(e.consume(m),V)}function L(m){return m===47||m===62||H(m)?v(m):n(m)}function y(m){return m===62?(e.consume(m),_):n(m)}function _(m){return m===null||D(m)?P(m):H(m)?(e.consume(m),_):n(m)}function P(m){return m===45&&i===2?(e.consume(m),B):m===60&&i===1?(e.consume(m),U):m===62&&i===4?(e.consume(m),ce):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),ge):D(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ua,ye,j)(m)):m===null||D(m)?(e.exit("htmlFlowData"),j(m)):(e.consume(m),P)}function j(m){return e.check(ca,z,ye)(m)}function z(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),T}function T(m){return m===null||D(m)?j(m):(e.enter("htmlFlowData"),P(m))}function B(m){return m===45?(e.consume(m),d):P(m)}function U(m){return m===47?(e.consume(m),l="",ue):P(m)}function ue(m){if(m===62){const fe=l.toLowerCase();return Vn.includes(fe)?(e.consume(m),ce):P(m)}return ne(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),ue):P(m)}function ge(m){return m===93?(e.consume(m),d):P(m)}function d(m){return m===62?(e.consume(m),ce):m===45&&i===2?(e.consume(m),d):P(m)}function ce(m){return m===null||D(m)?(e.exit("htmlFlowData"),ye(m)):(e.consume(m),ce)}function ye(m){return e.exit("htmlFlow"),t(m)}}function ha(e,t,n){const r=this;return i;function i(l){return D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function da(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ot,t,n)}}const ma={name:"htmlText",tokenize:ga};function ga(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),R):d===63?(e.consume(d),v):ne(d)?(e.consume(d),V):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):ne(d)?(e.consume(d),I):n(d)}function f(d){return d===45?(e.consume(d),p):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),h):D(d)?(l=c,U(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?B(d):d===45?h(d):c(d)}function g(d){const ce="CDATA[";return d===ce.charCodeAt(o++)?(e.consume(d),o===ce.length?b:g):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),S):D(d)?(l=b,U(d)):(e.consume(d),b)}function S(d){return d===93?(e.consume(d),x):b(d)}function x(d){return d===62?B(d):d===93?(e.consume(d),x):b(d)}function I(d){return d===null||d===62?B(d):D(d)?(l=I,U(d)):(e.consume(d),I)}function v(d){return d===null?n(d):d===63?(e.consume(d),F):D(d)?(l=v,U(d)):(e.consume(d),v)}function F(d){return d===62?B(d):v(d)}function R(d){return ne(d)?(e.consume(d),C):n(d)}function C(d){return d===45||ee(d)?(e.consume(d),C):O(d)}function O(d){return D(d)?(l=O,U(d)):H(d)?(e.consume(d),O):B(d)}function V(d){return d===45||ee(d)?(e.consume(d),V):d===47||d===62||Y(d)?L(d):n(d)}function L(d){return d===47?(e.consume(d),B):d===58||d===95||ne(d)?(e.consume(d),y):D(d)?(l=L,U(d)):H(d)?(e.consume(d),L):B(d)}function y(d){return d===45||d===46||d===58||d===95||ee(d)?(e.consume(d),y):_(d)}function _(d){return d===61?(e.consume(d),P):D(d)?(l=_,U(d)):H(d)?(e.consume(d),_):L(d)}function P(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,j):D(d)?(l=P,U(d)):H(d)?(e.consume(d),P):(e.consume(d),z)}function j(d){return d===i?(e.consume(d),i=void 0,T):d===null?n(d):D(d)?(l=j,U(d)):(e.consume(d),j)}function z(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||Y(d)?L(d):(e.consume(d),z)}function T(d){return d===47||d===62||Y(d)?L(d):n(d)}function B(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function U(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ue}function ue(d){return H(d)?q(e,ge,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):ge(d)}function ge(d){return e.enter("htmlTextData"),l(d)}}const pn={name:"labelEnd",resolveAll:ba,resolveTo:wa,tokenize:Ca},ya={tokenize:Sa},xa={tokenize:va},ka={tokenize:Aa};function ba(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&&ae(e,0,e.length,n),e}function wa(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=se(a,e.slice(o+1,o+r+3)),a=se(a,[["enter",f,t]]),a=se(a,St(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=se(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=se(a,e.slice(l+1)),a=se(a,[["exit",s,t]]),ae(e,o,e.length,a),e}function Ca(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(l=r.parser.defined.includes(he(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):n(h)}function s(h){return h===40?e.attempt(ya,f,l?f:c)(h):h===91?e.attempt(xa,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(ka,f,c)(h)}function f(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function Sa(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 Y(c)?tt(e,o)(c):o(c)}function o(c){return c===41?f(c):Vr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return Y(c)?tt(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?Wr(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return Y(c)?tt(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 va(e,t,n){const r=this;return i;function i(a){return Ur.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Aa(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Ia={name:"labelStartImage",resolveAll:pn.resolveAll,tokenize:Ea};function Ea(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const _a={name:"labelStartLink",resolveAll:pn.resolveAll,tokenize:Ta};function Ta(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const zt={name:"lineEnding",tokenize:Pa};function Pa(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,t,"linePrefix")}}const gt={name:"thematicBreak",tokenize:za};function za(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||D(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),H(u)?q(e,a,"whitespace")(u):a(u))}}const re={continuation:{tokenize:Ma},exit:Ra,name:"list",tokenize:ja},La={partial:!0,tokenize:Na},Da={partial:!0,tokenize:Fa};function ja(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Jt(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(gt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return n(p)}function s(p){return Jt(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ot,r.interrupt?n:f,e.attempt(La,h,c))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return H(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ma(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ot,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!H(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Da,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Fa(e,t,n){const r=this;return q(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Ra(e){e.exit(this.containerState.type)}function Na(e,t,n){const r=this;return q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!H(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Un={name:"setextUnderline",resolveTo:Oa,tokenize:Ba};function Oa(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Ba(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),H(u)?q(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||D(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Ha={tokenize:$a};function $a(e){const t=this,n=e.attempt(ot,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Qo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const qa={resolveAll:Yr()},Va=Qr("string"),Ua=Qr("text");function Qr(e){return{resolveAll:Yr(e==="text"?Wa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Yr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Wa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Qa={42:re,43:re,45:re,48:re,49:re,50:re,51:re,52:re,53:re,54:re,55:re,56:re,57:re,62:Br},Ya={91:Ko},Xa={[-2]:Pt,[-1]:Pt,32:Pt},Ja={35:ia,42:gt,45:[Un,gt],60:sa,61:Un,95:gt,96:qn,126:qn},Ga={38:$r,92:Hr},Ka={[-5]:zt,[-4]:zt,[-3]:zt,33:Ia,38:$r,42:Gt,60:[_o,ma],91:_a,92:[na,Hr],93:pn,95:Gt,96:Ho},Za={null:[Gt,qa]},es={null:[42,95]},ts={null:[]},ns=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:es,contentInitial:Ya,disable:ts,document:Qa,flow:Ja,flowInitial:Xa,insideSpan:Za,string:Ga,text:Ka},Symbol.toStringTag,{value:"Module"}));function rs(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:O(R),check:O(C),consume:I,enter:v,exit:F,interrupt:O(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(_){return l=se(l,_),S(),l[l.length-1]!==null?[]:(V(t,0),u.events=St(o,u.events,u),u.events)}function h(_,P){return ls(p(_),P)}function p(_){return is(l,_)}function g(){const{_bufferIndex:_,_index:P,line:j,column:z,offset:T}=r;return{_bufferIndex:_,_index:P,line:j,column:z,offset:T}}function b(_){i[_.line]=_.column,y()}function S(){let _;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<P.length;)x(P.charCodeAt(r._bufferIndex));else x(P)}}function x(_){f=f(_)}function I(_){D(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,y()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=_}function v(_,P){const j=P||{};return j.type=_,j.start=g(),u.events.push(["enter",j,u]),a.push(j),j}function F(_){const P=a.pop();return P.end=g(),u.events.push(["exit",P,u]),P}function R(_,P){V(_,P.from)}function C(_,P){P.restore()}function O(_,P){return j;function j(z,T,B){let U,ue,ge,d;return Array.isArray(z)?ye(z):"tokenize"in z?ye([z]):ce(z);function ce(K){return Ve;function Ve(Ce){const Me=Ce!==null&&K[Ce],Fe=Ce!==null&&K.null,st=[...Array.isArray(Me)?Me:Me?[Me]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return ye(st)(Ce)}}function ye(K){return U=K,ue=0,K.length===0?B:m(K[ue])}function m(K){return Ve;function Ve(Ce){return d=L(),ge=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?Ie():K.tokenize.call(P?Object.assign(Object.create(u),P):u,s,fe,Ie)(Ce)}}function fe(K){return _(ge,d),T}function Ie(K){return d.restore(),++ue<U.length?m(U[ue]):B}}}function V(_,P){_.resolveAll&&!o.includes(_)&&o.push(_),_.resolve&&ae(u.events,P,u.events.length-P,_.resolve(u.events.slice(P),u)),_.resolveTo&&(u.events=_.resolveTo(u.events,u))}function L(){const _=g(),P=u.previous,j=u.currentConstruct,z=u.events.length,T=Array.from(a);return{from:z,restore:B};function B(){r=_,u.previous=P,u.currentConstruct=j,u.events.length=z,a=T,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function is(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function ls(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
21
+ `,22),yield{type:"done"}}async function*Z(e,t){for(let r=0;r<e.length;r+=3)yield{type:"text",text:e.slice(r,r+3)},await G(t)}function xr(e){if(!e||e==="[DONE]")return[];let t;try{t=JSON.parse(e)}catch{return[]}switch(t.type){case"text":return t.text?[{type:"text",text:t.text}]:[];case"activity":return[{type:"part",part:{type:"activity",id:t.id,title:t.title,description:t.description,status:t.status,metadata:t.metadata}}];case"part":return[{type:"part",part:t.part}];case"done":return[{type:"done"}];case"error":return[{type:"error",message:t.message}];default:return[]}}function nl(e,t={}){const{method:n="POST",headers:r={},getHeaders:i,getBody:o,parseEvent:l=il,credentials:a}=t;return{async*sendMessage(s){const u=i?await i(s):{},f=o?o(s):{messages:s.messages,context:s.context},c=await fetch(e,{method:n,credentials:a,headers:{"Content-Type":"application/json",...r,...u},body:JSON.stringify(f)});if(!c.ok){const h=await c.text().catch(()=>`HTTP ${c.status}`);yield{type:"error",message:`Request failed (${c.status}): ${h}`};return}if(!c.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*rl(c.body,l)}}}async function*rl(e,t){const n=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await n.read();if(o)break;i+=r.decode(l,{stream:!0});const a=i.split(`
22
+ `);i=a.pop()??"";for(const s of a){const u=s.trim();if(!(!u||u.startsWith(":"))&&u.startsWith("data: ")){const f=u.slice(6);if(f==="[DONE]"){yield{type:"done"};return}const c=t(f);for(const h of c)if(yield h,h.type==="done"||h.type==="error")return}}}}finally{n.releaseLock()}yield{type:"done"}}const il=e=>{if(!e||e==="[DONE]")return[];const t=xr(e);if(t.length>0)return t;try{const n=JSON.parse(e);if(n.error?.message)return[{type:"error",message:n.error.message}];const r=n.choices?.[0]?.delta;return n.choices?.[0]?.finish_reason==="stop"?[{type:"done"}]:r?.content?[{type:"text",text:r.content}]:[]}catch{return[]}};function ll(e,t={}){const{method:n="POST",headers:r={},getHeaders:i,getBody:o,parseChunk:l=al,credentials:a}=t;return{async*sendMessage(s){const u=i?await i(s):{},f=o?o(s):{messages:s.messages,context:s.context},c=await fetch(e,{method:n,credentials:a,headers:{"Content-Type":"application/json",...r,...u},body:JSON.stringify(f)});if(!c.ok){const h=await c.text().catch(()=>`HTTP ${c.status}`);yield{type:"error",message:`Request failed (${c.status}): ${h}`};return}if(!c.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*ol(c.body,l)}}}async function*ol(e,t){const n=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await n.read();if(o)break;i+=r.decode(l,{stream:!0});const a=i.split(`
23
+ `);i=a.pop()??"";for(const s of a){const u=s.trim();if(!u)continue;const f=t(u);for(const c of f)if(yield c,c.type==="done"||c.type==="error")return}}if(i.trim()){const o=t(i.trim());for(const l of o)if(yield l,l.type==="done"||l.type==="error")return}}finally{n.releaseLock()}yield{type:"done"}}const al=e=>{const t=xr(e);return t.length>0?t:e?[{type:"text",text:e}]:[]};let sl=0;const ut=()=>`msg-${++sl}-${Date.now()}`;function En(e){return e.filter(t=>t.role!=="assistant"?!0:t.parts.some(n=>n.type==="text"))}function kr({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r}){const[i,o]=X.useState([]),[l,a]=X.useState(""),[s,u]=X.useState(!1),[f,c]=X.useState(!1),[h,p]=X.useState(null),g=X.useRef(null),b=X.useCallback(L=>{o(y=>{const _=y[y.length-1];if(!_||_.role!=="assistant")return y;if(L.type==="activity"&&L.id){const P=[..._.parts],j=P.findIndex(z=>z.type==="activity"&&z.id===L.id);if(j!==-1)return P[j]=L,[...y.slice(0,-1),{..._,parts:P}]}return[...y.slice(0,-1),{..._,parts:[..._.parts,L]}]})},[]),S=X.useCallback(L=>{o(y=>{const _=y[y.length-1];if(!_||_.role!=="assistant")return y;const P=[..._.parts],j=P[P.length-1];return j?.type==="text"?P[P.length-1]={type:"text",text:j.text+L}:P.push({type:"text",text:L}),[...y.slice(0,-1),{..._,parts:P}]})},[]),x=X.useCallback(async(L,y)=>{p(null);const _={id:ut(),role:"user",parts:[{type:"text",text:L}],createdAt:new Date},P=ut();let j=!1;const z=()=>{if(j)return;j=!0;const B={id:P,role:"assistant",parts:[],createdAt:new Date};o(U=>[...U,B])};o(B=>[...B,_]),u(!0),c(!0),g.current?.abort();const T=new AbortController;g.current=T;try{const B=e.sendMessage({messages:En([...y,_]),context:t});await Ut(B,U=>{switch(c(!1),U.type){case"text":z(),S(U.text);break;case"part":z(),b(U.part);break;case"error":z(),b({type:"error",message:U.message}),p(U.message);break;case"done":break}},T.signal)}catch(B){const U=B instanceof Error?B.message:"Unknown error occurred";p(U),z(),b({type:"error",message:U})}finally{u(!1),c(!1)}},[e,t,S,b]),I=X.useCallback(async()=>{const L=l.trim();!L||s||(a(""),await x(L,i))},[l,s,i,x]),v=X.useCallback(async L=>{!L.trim()||s||await x(L,i)},[s,i,x]),F=X.useCallback(async L=>{if(s)return;p(null),u(!0),c(!0);const y={id:ut(),role:"assistant",parts:[],createdAt:new Date};o(j=>[...j,y]),g.current?.abort();const _=new AbortController;g.current=_;const P={id:ut(),role:"system",parts:[{type:"text",text:L}],createdAt:new Date};try{const j=e.sendMessage({messages:En([P]),context:t});await Ut(j,z=>{switch(c(!1),z.type){case"text":S(z.text);break;case"part":b(z.part);break;case"error":b({type:"error",message:z.message}),p(z.message);break;case"done":break}},_.signal)}catch(j){const z=j instanceof Error?j.message:"Unknown error occurred";p(z),b({type:"error",message:z})}finally{u(!1),c(!1)}},[s,e,t,S,b]),R=X.useCallback(()=>{g.current?.abort(),u(!1),c(!1)},[]),C=X.useCallback(()=>{g.current?.abort(),o([]),a(""),p(null),u(!1),c(!1)},[]),O=X.useCallback((L,y)=>{n?.(L,y)},[n]),V=X.useCallback(L=>{r?.(L)},[r]);return{messages:i,input:l,setInput:a,sendMessage:I,sendMessageWithText:v,sendGreeting:F,stop:R,isLoading:s,isConnecting:f,error:h,reset:C,confirmProposal:O,cancelProposal:V}}const yt={sidebarTitle:"AI Assistant",clearConversation:"Clear conversation",minimizeSidebar:"Minimize",expandSidebar:"Expand",userLabel:"You",inputPlaceholder:"Ask a question… (Enter to send)",sendMessage:"Send message",stopMessage:"Stop",typingMessage:"Assistant is typing",connectingMessage:"Connecting…",emptyStateText:"How can I help you today?",emptyStateHint:'Try: "Show me the data" or "Can you suggest something?"',proposalConfirm:"Confirm",proposalCancel:"Cancel",errorDismiss:"Dismiss",actionAddFile:"Add file",actionQuickActions:"Quick actions",actionNew:"New",actionHistory:"History",actionRules:"Rules"},br=X.createContext(yt);function De(){return X.useContext(br)}const ul="_root_14q8g_1",cl={root:ul};function fl({children:e,theme:t,labels:n,className:r,style:i}){const o=n?{...yt,...n}:yt,l=t?pl(t):void 0;return k.jsx(br.Provider,{value:o,children:k.jsx("div",{className:[cl.root,r].filter(Boolean).join(" "),style:{...l,...i},children:e})})}function pl(e){const t={"--juneau-color-primary":e.colorPrimary,"--juneau-color-primary-dark":e.colorPrimaryDark,"--juneau-color-primary-light":e.colorPrimaryLight,"--juneau-color-primary-border":e.colorPrimaryBorder,"--juneau-color-accent":e.colorAccent,"--juneau-color-accent-dark":e.colorAccentDark,"--juneau-color-accent-light":e.colorAccentLight,"--juneau-color-accent-border":e.colorAccentBorder,"--juneau-color-surface":e.colorSurface,"--juneau-color-surface-raised":e.colorSurfaceRaised,"--juneau-color-surface-hover":e.colorSurfaceHover,"--juneau-color-border":e.colorBorder,"--juneau-color-border-subtle":e.colorBorderSubtle,"--juneau-color-text-primary":e.colorTextPrimary,"--juneau-color-text-secondary":e.colorTextSecondary,"--juneau-color-text-muted":e.colorTextMuted,"--juneau-color-text-faint":e.colorTextFaint,"--juneau-color-text-inverse":e.colorTextInverse,"--juneau-color-assistant-avatar":e.colorAssistantAvatar,"--juneau-radius-sm":e.radiusSm,"--juneau-radius-md":e.radiusMd,"--juneau-radius-lg":e.radiusLg,"--juneau-font-family":e.fontFamily};return Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0))}const wr=X.createContext(null);function Cr(){const e=X.useContext(wr);if(!e)throw new Error("useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>.");return e}function hl({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r,children:i}){const[o,l]=X.useState(t),a=X.useCallback(u=>{l(u)},[]),s=kr({adapter:e,context:o,onProposalConfirm:n,onProposalCancel:r});return k.jsx(wr.Provider,{value:{...s,setContext:a},children:i})}const dl={sidebarTitle:"AI Asistent",clearConversation:"Vymazat konverzaci",minimizeSidebar:"Minimalizovat",expandSidebar:"Rozbalit",userLabel:"Vy",inputPlaceholder:"Zeptejte se na cokoliv… (Enter pro odeslání)",sendMessage:"Odeslat zprávu",stopMessage:"Zastavit",typingMessage:"Asistent píše",connectingMessage:"Připojování…",emptyStateText:"Jak vám mohu dnes pomoci?",emptyStateHint:'Zkuste: „Ukáž mi data" nebo „Máš nějaký návrh?"',proposalConfirm:"Potvrdit",proposalCancel:"Zrušit",errorDismiss:"Zavřít",actionAddFile:"Přidat soubor",actionQuickActions:"Rychlé akce",actionNew:"Nový",actionHistory:"Historie",actionRules:"Pravidla"};function Sr({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})})}function ml({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s6.2-22.8 16.4-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})})}function gl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"})})}function yl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"})})}function xl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"})})}function kl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-31.8-31.8C143.9 83.5 196.2 64 252.6 64C370.8 64 464 157.8 464 276c0 77.5-40.8 145.4-102 182.9c-15.1 9.2-19.9 29-10.7 44.1s29 19.9 44.1 10.7C471 467.5 528 378.4 528 276C528 124.1 404.5 0 252.6 0C186 0 125.3 26.4 80 70.2L75 75zM256 152c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z"})})}function bl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-26.6 0c-25.8 50.9-72.7 88.5-129.4 99.8L384 416l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-72.2C135.3 332.5 88.4 294.9 62.6 244L48 244c-26.5 0-48-21.5-48-48L0 80zM128 240c0 70.7 57.3 128 128 128s128-57.3 128-128l0-128L128 112l0 128zM512 176l0-64-64 0 0 64-48 0 0 16c0 8.8-.7 17.4-2 25.8c3.3 .1 6.6 .2 9.9 .2l56 0c26.5 0 48-21.5 48-48l0-64zM48 176c0 26.5 21.5 48 48 48l56 0c3.4 0 6.7-.1 9.9-.2c-1.3-8.4-2-17-2-25.8l0-16-48 0 0-64-64 0 0 58z"})})}function wl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z"})})}function Cl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{d:"M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z"})})}function Sl({className:e,style:t,"aria-hidden":n=!0}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:k.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})})}function vl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Al=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Il=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,El={};function _n(e,t){return(El.jsx?Il:Al).test(e)}const _l=/[ \t\n\f\r]/g;function Tl(e){return typeof e=="object"?e.type==="text"?Tn(e.value):!1:Tn(e)}function Tn(e){return e.replace(_l,"")===""}class lt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}lt.prototype.normal={};lt.prototype.property={};lt.prototype.space=void 0;function vr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new lt(n,r,t)}function Wt(e){return e.toLowerCase()}class ie{constructor(t,n){this.attribute=n,this.property=t}}ie.prototype.attribute="";ie.prototype.booleanish=!1;ie.prototype.boolean=!1;ie.prototype.commaOrSpaceSeparated=!1;ie.prototype.commaSeparated=!1;ie.prototype.defined=!1;ie.prototype.mustUseProperty=!1;ie.prototype.number=!1;ie.prototype.overloadedBoolean=!1;ie.prototype.property="";ie.prototype.spaceSeparated=!1;ie.prototype.space=void 0;let Pl=0;const M=je(),J=je(),Qt=je(),A=je(),Q=je(),ze=je(),oe=je();function je(){return 2**++Pl}const Yt=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:J,commaOrSpaceSeparated:oe,commaSeparated:ze,number:A,overloadedBoolean:Qt,spaceSeparated:Q},Symbol.toStringTag,{value:"Module"})),Et=Object.keys(Yt);class rn extends ie{constructor(t,n,r,i){let o=-1;if(super(t,n),Pn(this,"space",i),typeof r=="number")for(;++o<Et.length;){const l=Et[o];Pn(this,Et[o],(r&Yt[l])===Yt[l])}}}rn.prototype.defined=!0;function Pn(e,t,n){n&&(e[t]=n)}function $e(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Wt(r)]=r,n[Wt(o.attribute)]=r}return new lt(t,n,e.space)}const Ar=$e({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:Q,ariaCurrent:null,ariaDescribedBy:Q,ariaDetails:null,ariaDisabled:J,ariaDropEffect:Q,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:Q,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Q,ariaLevel:A,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:Q,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:Q,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:J,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ir(e,t){return t in e?e[t]:t}function Er(e,t){return Ir(e,t.toLowerCase())}const zl=$e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ze,acceptCharset:Q,accessKey:Q,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alpha:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:Q,autoFocus:M,autoPlay:M,blocking:Q,capture:null,charSet:null,checked:M,cite:null,className:Q,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:J,controls:M,controlsList:Q,coords:A|ze,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:Qt,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:Q,height:A,hidden:Qt,high:A,href:null,hrefLang:null,htmlFor:Q,httpEquiv:Q,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:Q,itemRef:Q,itemScope:M,itemType:Q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:M,muted:M,name:null,nonce:null,noModule:M,noValidate:M,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:M,optimum:A,pattern:null,ping:Q,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:Q,required:M,reversed:M,rows:A,rowSpan:A,sandbox:Q,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootCustomElementRegistry:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shadowRootSerializable:M,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:J,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Q,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M,declare:M,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:M,disablePictureInPicture:M,disableRemotePlayback:M,exportParts:ze,part:Q,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Er}),Ll=$e({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",maskType:"mask-type",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:oe,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:Q,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ze,g2:ze,glyphName:ze,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oe,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ir}),_r=$e({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()}}),Tr=$e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Er}),Pr=$e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Dl={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"},jl=/[A-Z]/g,zn=/-[a-z]/g,Ml=/^data[-\w.:]+$/i;function Fl(e,t){const n=Wt(t);let r=t,i=ie;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ml.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(zn,Nl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!zn.test(o)){let l=o.replace(jl,Rl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=rn}return new i(r,t)}function Rl(e){return"-"+e.toLowerCase()}function Nl(e){return e.charAt(1).toUpperCase()}const Ol=vr([Ar,zl,_r,Tr,Pr],"html"),ln=vr([Ar,Ll,_r,Tr,Pr],"svg");function Bl(e){return e.join(" ").trim()}function zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ne={},_t,Ln;function Hl(){if(Ln)return _t;Ln=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
24
+ `,u="/",f="*",c="",h="comment",p="declaration";function g(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var I=1,v=1;function F(z){var T=z.match(t);T&&(I+=T.length);var B=z.lastIndexOf(s);v=~B?z.length-B:v+z.length}function R(){var z={line:I,column:v};return function(T){return T.position=new C(z),L(),T}}function C(z){this.start=z,this.end={line:I,column:v},this.source=x.source}C.prototype.content=S;function O(z){var T=new Error(x.source+":"+I+":"+v+": "+z);if(T.reason=z,T.filename=x.source,T.line=I,T.column=v,T.source=S,!x.silent)throw T}function V(z){var T=z.exec(S);if(T){var B=T[0];return F(B),S=S.slice(B.length),T}}function L(){V(n)}function y(z){var T;for(z=z||[];T=_();)T!==!1&&z.push(T);return z}function _(){var z=R();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var T=2;c!=S.charAt(T)&&(f!=S.charAt(T)||u!=S.charAt(T+1));)++T;if(T+=2,c===S.charAt(T-1))return O("End of comment missing");var B=S.slice(2,T-2);return v+=2,F(B),S=S.slice(T),v+=2,z({type:h,comment:B})}}function P(){var z=R(),T=V(r);if(T){if(_(),!V(i))return O("property missing ':'");var B=V(o),U=z({type:p,property:b(T[0].replace(e,c)),value:B?b(B[0].replace(e,c)):c});return V(l),U}}function j(){var z=[];y(z);for(var T;T=P();)T!==!1&&(z.push(T),y(z));return z}return L(),j()}function b(S){return S?S.replace(a,c):c}return _t=g,_t}var Dn;function $l(){if(Dn)return Ne;Dn=1;var e=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.default=n;const t=e(Hl());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return Ne}var Qe={},jn;function ql(){if(jn)return Qe;jn=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)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Qe.camelCase=s,Qe}var Ye,Mn;function Vl(){if(Mn)return Ye;Mn=1;var e=Ye&&Ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e($l()),n=ql();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Ye=r,Ye}var Ul=Vl();const Wl=zr(Ul),Lr=Dr("end"),on=Dr("start");function Dr(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 Ql(e){const t=on(e),n=Lr(e);if(t&&n)return{start:t,end:n}}function et(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fn(e.position):"start"in e||"end"in e?Fn(e):"line"in e||"column"in e?Xt(e):""}function Xt(e){return Rn(e&&e.line)+":"+Rn(e&&e.column)}function Fn(e){return Xt(e&&e.start)+"-"+Xt(e&&e.end)}function Rn(e){return e&&typeof e=="number"?e:1}class te extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=et(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}te.prototype.file="";te.prototype.name="";te.prototype.reason="";te.prototype.message="";te.prototype.stack="";te.prototype.column=void 0;te.prototype.line=void 0;te.prototype.ancestors=void 0;te.prototype.cause=void 0;te.prototype.fatal=void 0;te.prototype.place=void 0;te.prototype.ruleId=void 0;te.prototype.source=void 0;const an={}.hasOwnProperty,Yl=new Map,Xl=/[A-Z]/g,Jl=new Set(["table","tbody","thead","tfoot","tr"]),Gl=new Set(["td","th"]),jr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Kl(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=oo(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=lo(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"?ln:Ol,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Mr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Mr(e,t,n){if(t.type==="element")return Zl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return eo(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return no(e,t,n);if(t.type==="mdxjsEsm")return to(e,t);if(t.type==="root")return ro(e,t,n);if(t.type==="text")return io(e,t)}function Zl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ln,e.schema=i),e.ancestors.push(t);const o=Rr(e,t.tagName,!1),l=ao(e,t);let a=un(e,t);return Jl.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Tl(s):!0})),Fr(e,l,o,t),sn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function eo(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rt(e,t.position)}function to(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rt(e,t.position)}function no(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ln,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Rr(e,t.name,!0),l=so(e,t),a=un(e,t);return Fr(e,l,o,t),sn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function ro(e,t,n){const r={};return sn(r,un(e,t)),e.create(t,e.Fragment,r,n)}function io(e,t){return t.value}function Fr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lo(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function oo(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=on(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ao(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&an.call(t.properties,i)){const o=uo(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Gl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function so(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else rt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else rt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function un(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Yl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=Mr(e,o,l);a!==void 0&&n.push(a)}return n}function uo(e,t,n){const r=Fl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?vl(n):Bl(n)),r.property==="style"){let i=typeof n=="object"?n:co(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Dl[r.property]||r.property:r.attribute,n]}}function co(e,t){try{return Wl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new te("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=jr+"#cannot-parse-style-attribute",i}}function Rr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=_n(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=_n(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return an.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rt(e)}function rt(e,t){const n=new te("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=jr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fo(e){const t={};let n;for(n in e)an.call(e,n)&&(t[po(n)]=e[n]);return t}function po(e){let t=e.replace(Xl,ho);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ho(e){return"-"+e.toLowerCase()}const Tt={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"]},mo={};function cn(e,t){const n=mo,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Nr(e,r,i)}function Nr(e,t,n){if(go(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nn(e.children,t,n)}return Array.isArray(e)?Nn(e,t,n):""}function Nn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nr(e[i],t,n);return r.join("")}function go(e){return!!(e&&typeof e=="object")}const On=document.createElement("i");function fn(e){const t="&"+e+";";On.innerHTML=t;const n=On.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ae(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function se(e,t){return e.length>0?(ae(e,e.length,0,t),e):t}const Bn={}.hasOwnProperty;function Or(e){const t={};let n=-1;for(;++n<e.length;)yo(t,e[n]);return t}function yo(e,t){let n;for(n in t){const i=(Bn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Bn.call(i,l)||(i[l]=[]);const a=o[l];xo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function xo(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ae(e,0,0,r)}function Br(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 he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ne=Ae(/[A-Za-z]/),ee=Ae(/[\dA-Za-z]/),ko=Ae(/[#-'*+\--9=?A-Z^-~]/);function xt(e){return e!==null&&(e<32||e===127)}const Jt=Ae(/\d/),bo=Ae(/[\dA-Fa-f]/),wo=Ae(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}const Ct=Ae(/\p{P}|\p{S}/u),Le=Ae(/\s/);function Ae(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&ee(e.charCodeAt(n+1))&&ee(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function q(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return H(s)?(e.enter(n),a(s)):t(s)}function a(s){return H(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const Co={tokenize:So};function So(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),q(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return D(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const vo={tokenize:Ao},Hn={tokenize:Io};function Ao(e){const t=this,n=[];let r=0,i,o,l;return a;function a(v){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,s,u)(v)}return u(v)}function s(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const F=t.events.length;let R=F,C;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){C=t.events[R][1].end;break}x(r);let O=F;for(;O<t.events.length;)t.events[O][1].end={...C},O++;return ae(t.events,R+1,0,t.events.slice(F)),t.events.length=O,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Hn,f,c)(v)}function f(v){return i&&I(),x(r),h(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(v)}function h(v){return t.containerState={},e.attempt(Hn,p,g)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function g(v){if(v===null){i&&I(),x(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return D(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),b)}function S(v,F){const R=t.sliceStream(v);if(F&&R.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(R),t.parser.lazy[v.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<l&&(!i.events[C][1].end||i.events[C][1].end.offset>l))return;const O=t.events.length;let V=O,L,y;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(L){y=t.events[V][1].end;break}L=!0}for(x(r),C=O;C<t.events.length;)t.events[C][1].end={...y},C++;ae(t.events,V+1,0,t.events.slice(O)),t.events.length=C}}function x(v){let F=n.length;for(;F-- >v;){const R=n[F];t.containerState=R[1],R[0].exit.call(t,e)}n.length=v}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Io(e,t,n){return q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function He(e){if(e===null||Y(e)||Le(e))return 1;if(Ct(e))return 2}function St(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Gt={name:"attention",resolveAll:Eo,tokenize:_o};function Eo(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};$n(c,-s),$n(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=se(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=se(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=se(u,St(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=se(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=se(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ae(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 _o(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=He(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=He(s),c=!f||f===2&&i||n.includes(s),h=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(f||!c)),t(s)}}function $n(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const To={name:"autolink",tokenize:Po};function Po(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return ne(p)?(e.consume(p),l):p===64?n(p):u(p)}function l(p){return p===43||p===45||p===46||ee(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,s):(p===43||p===45||p===46||ee(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||xt(p)?n(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):ko(p)?(e.consume(p),u):n(p)}function f(p){return ee(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||ee(p))&&r++<63){const g=p===45?h:c;return e.consume(p),g}return n(p)}}const ot={partial:!0,tokenize:zo};function zo(e,t,n){return r;function r(o){return H(o)?q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||D(o)?t(o):n(o)}}const Hr={continuation:{tokenize:Do},exit:jo,name:"blockQuote",tokenize:Lo};function Lo(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return H(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Do(e,t,n){const r=this;return i;function i(l){return H(l)?q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Hr,t,n)(l)}}function jo(e){e.exit("blockQuote")}const $r={name:"characterEscape",tokenize:Mo};function Mo(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return wo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const qr={name:"characterReference",tokenize:Fo};function Fo(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=ee,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=bo,f):(e.enter("characterReferenceValue"),o=7,l=Jt,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===ee&&!fn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const qn={partial:!0,tokenize:No},Vn={concrete:!0,name:"codeFenced",tokenize:Ro};function Ro(e,t,n){const r=this,i={partial:!0,tokenize:R};let o=0,l=0,a;return s;function s(C){return u(C)}function u(C){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===a?(l++,e.consume(C),f):l<3?n(C):(e.exit("codeFencedFenceSequence"),H(C)?q(e,c,"whitespace")(C):c(C))}function c(C){return C===null||D(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(qn,b,F)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||D(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):H(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,p,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),h)}function p(C){return C===null||D(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||D(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===a?n(C):(e.consume(C),g)}function b(C){return e.attempt(i,F,S)(C)}function S(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),x}function x(C){return o>0&&H(C)?q(e,I,"linePrefix",o+1)(C):I(C)}function I(C){return C===null||D(C)?e.check(qn,b,F)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||D(C)?(e.exit("codeFlowValue"),I(C)):(e.consume(C),v)}function F(C){return e.exit("codeFenced"),t(C)}function R(C,O,V){let L=0;return y;function y(T){return C.enter("lineEnding"),C.consume(T),C.exit("lineEnding"),_}function _(T){return C.enter("codeFencedFence"),H(T)?q(C,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):P(T)}function P(T){return T===a?(C.enter("codeFencedFenceSequence"),j(T)):V(T)}function j(T){return T===a?(L++,C.consume(T),j):L>=l?(C.exit("codeFencedFenceSequence"),H(T)?q(C,z,"whitespace")(T):z(T)):V(T)}function z(T){return T===null||D(T)?(C.exit("codeFencedFence"),O(T)):V(T)}}}function No(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Pt={name:"codeIndented",tokenize:Bo},Oo={partial:!0,tokenize:Ho};function Bo(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),q(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):D(u)?e.attempt(Oo,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||D(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function Ho(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):q(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):D(l)?i(l):n(l)}}const $o={name:"codeText",previous:Vo,resolve:qo,tokenize:Uo};function qo(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 Vo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Uo(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):D(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||D(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class Wo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xe(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xe(this.left,n.reverse())}}}function Xe(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Vr(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new Wo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Qo(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ae(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Qo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=n,g=0,b=0;const S=[b];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(b=h+1,S.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const x=a.slice(S[h],S[h+1]),I=o.pop();s.push([I,I+x.length-1]),e.splice(I,2,x)}for(s.reverse(),h=-1;++h<s.length;)u[g+s[h][0]]=g+s[h][1],g+=s[h][1]-s[h][0]-1;return u}const Yo={resolve:Jo,tokenize:Go},Xo={partial:!0,tokenize:Ko};function Jo(e){return Vr(e),e}function Go(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):D(a)?e.check(Xo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ko(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),q(e,o,"linePrefix")}function o(l){if(l===null||D(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Ur(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),h):x===null||x===32||x===41||xt(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(x))}function h(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(a),h(x)):x===null||x===60||D(x)?n(x):(e.consume(x),x===92?g:p)}function g(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function b(x){return!f&&(x===null||x===41||Y(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f<u&&x===40?(e.consume(x),f++,b):x===41?(e.consume(x),f--,b):x===null||x===32||x===40||xt(x)?n(x):(e.consume(x),x===92?S:b)}function S(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Wr(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):D(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||D(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!H(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function Qr(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,s):n(h)}function s(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===l?(e.exit(o),s(l)):h===null?n(h):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===l||h===null||D(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===l||h===92?(e.consume(h),f):f(h)}}function tt(e,t){let n;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):H(i)?q(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Zo={name:"definition",tokenize:ta},ea={partial:!0,tokenize:na};function ta(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Wr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):n(p)}function s(p){return Y(p)?tt(e,u)(p):u(p)}function u(p){return Ur(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(ea,c,c)(p)}function c(p){return H(p)?q(e,h,"whitespace")(p):h(p)}function h(p){return p===null||D(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function na(e,t,n){return r;function r(a){return Y(a)?tt(e,i)(a):n(a)}function i(a){return Qr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return H(a)?q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||D(a)?t(a):n(a)}}const ra={name:"hardBreakEscape",tokenize:ia};function ia(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return D(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const la={name:"headingAtx",resolve:oa,tokenize:aa};function oa(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ae(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function aa(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Y(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||D(f)?(e.exit("atxHeading"),t(f)):H(f)?q(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||Y(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const sa=["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"],Un=["pre","script","style","textarea"],ua={concrete:!0,name:"htmlFlow",resolveTo:pa,tokenize:ha},ca={partial:!0,tokenize:ma},fa={partial:!0,tokenize:da};function pa(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 ha(e,t,n){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),h):m===47?(e.consume(m),o=!0,b):m===63?(e.consume(m),i=3,r.interrupt?t:d):ne(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function h(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,g):ne(m)?(e.consume(m),i=4,r.interrupt?t:d):n(m)}function p(m){return m===45?(e.consume(m),r.interrupt?t:d):n(m)}function g(m){const fe="CDATA[";return m===fe.charCodeAt(a++)?(e.consume(m),a===fe.length?r.interrupt?t:P:g):n(m)}function b(m){return ne(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function S(m){if(m===null||m===47||m===62||Y(m)){const fe=m===47,Ie=l.toLowerCase();return!fe&&!o&&Un.includes(Ie)?(i=1,r.interrupt?t(m):P(m)):sa.includes(l.toLowerCase())?(i=6,fe?(e.consume(m),x):r.interrupt?t(m):P(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?I(m):v(m))}return m===45||ee(m)?(e.consume(m),l+=String.fromCharCode(m),S):n(m)}function x(m){return m===62?(e.consume(m),r.interrupt?t:P):n(m)}function I(m){return H(m)?(e.consume(m),I):y(m)}function v(m){return m===47?(e.consume(m),y):m===58||m===95||ne(m)?(e.consume(m),F):H(m)?(e.consume(m),v):y(m)}function F(m){return m===45||m===46||m===58||m===95||ee(m)?(e.consume(m),F):R(m)}function R(m){return m===61?(e.consume(m),C):H(m)?(e.consume(m),R):v(m)}function C(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),s=m,O):H(m)?(e.consume(m),C):V(m)}function O(m){return m===s?(e.consume(m),s=null,L):m===null||D(m)?n(m):(e.consume(m),O)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||Y(m)?R(m):(e.consume(m),V)}function L(m){return m===47||m===62||H(m)?v(m):n(m)}function y(m){return m===62?(e.consume(m),_):n(m)}function _(m){return m===null||D(m)?P(m):H(m)?(e.consume(m),_):n(m)}function P(m){return m===45&&i===2?(e.consume(m),B):m===60&&i===1?(e.consume(m),U):m===62&&i===4?(e.consume(m),ce):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),ge):D(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ca,ye,j)(m)):m===null||D(m)?(e.exit("htmlFlowData"),j(m)):(e.consume(m),P)}function j(m){return e.check(fa,z,ye)(m)}function z(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),T}function T(m){return m===null||D(m)?j(m):(e.enter("htmlFlowData"),P(m))}function B(m){return m===45?(e.consume(m),d):P(m)}function U(m){return m===47?(e.consume(m),l="",ue):P(m)}function ue(m){if(m===62){const fe=l.toLowerCase();return Un.includes(fe)?(e.consume(m),ce):P(m)}return ne(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),ue):P(m)}function ge(m){return m===93?(e.consume(m),d):P(m)}function d(m){return m===62?(e.consume(m),ce):m===45&&i===2?(e.consume(m),d):P(m)}function ce(m){return m===null||D(m)?(e.exit("htmlFlowData"),ye(m)):(e.consume(m),ce)}function ye(m){return e.exit("htmlFlow"),t(m)}}function da(e,t,n){const r=this;return i;function i(l){return D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function ma(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ot,t,n)}}const ga={name:"htmlText",tokenize:ya};function ya(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),R):d===63?(e.consume(d),v):ne(d)?(e.consume(d),V):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):ne(d)?(e.consume(d),I):n(d)}function f(d){return d===45?(e.consume(d),p):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),h):D(d)?(l=c,U(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?B(d):d===45?h(d):c(d)}function g(d){const ce="CDATA[";return d===ce.charCodeAt(o++)?(e.consume(d),o===ce.length?b:g):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),S):D(d)?(l=b,U(d)):(e.consume(d),b)}function S(d){return d===93?(e.consume(d),x):b(d)}function x(d){return d===62?B(d):d===93?(e.consume(d),x):b(d)}function I(d){return d===null||d===62?B(d):D(d)?(l=I,U(d)):(e.consume(d),I)}function v(d){return d===null?n(d):d===63?(e.consume(d),F):D(d)?(l=v,U(d)):(e.consume(d),v)}function F(d){return d===62?B(d):v(d)}function R(d){return ne(d)?(e.consume(d),C):n(d)}function C(d){return d===45||ee(d)?(e.consume(d),C):O(d)}function O(d){return D(d)?(l=O,U(d)):H(d)?(e.consume(d),O):B(d)}function V(d){return d===45||ee(d)?(e.consume(d),V):d===47||d===62||Y(d)?L(d):n(d)}function L(d){return d===47?(e.consume(d),B):d===58||d===95||ne(d)?(e.consume(d),y):D(d)?(l=L,U(d)):H(d)?(e.consume(d),L):B(d)}function y(d){return d===45||d===46||d===58||d===95||ee(d)?(e.consume(d),y):_(d)}function _(d){return d===61?(e.consume(d),P):D(d)?(l=_,U(d)):H(d)?(e.consume(d),_):L(d)}function P(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,j):D(d)?(l=P,U(d)):H(d)?(e.consume(d),P):(e.consume(d),z)}function j(d){return d===i?(e.consume(d),i=void 0,T):d===null?n(d):D(d)?(l=j,U(d)):(e.consume(d),j)}function z(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||Y(d)?L(d):(e.consume(d),z)}function T(d){return d===47||d===62||Y(d)?L(d):n(d)}function B(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function U(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ue}function ue(d){return H(d)?q(e,ge,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):ge(d)}function ge(d){return e.enter("htmlTextData"),l(d)}}const pn={name:"labelEnd",resolveAll:wa,resolveTo:Ca,tokenize:Sa},xa={tokenize:va},ka={tokenize:Aa},ba={tokenize:Ia};function wa(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&&ae(e,0,e.length,n),e}function Ca(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=se(a,e.slice(o+1,o+r+3)),a=se(a,[["enter",f,t]]),a=se(a,St(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=se(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=se(a,e.slice(l+1)),a=se(a,[["exit",s,t]]),ae(e,o,e.length,a),e}function Sa(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(l=r.parser.defined.includes(he(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):n(h)}function s(h){return h===40?e.attempt(xa,f,l?f:c)(h):h===91?e.attempt(ka,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(ba,f,c)(h)}function f(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function va(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 Y(c)?tt(e,o)(c):o(c)}function o(c){return c===41?f(c):Ur(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return Y(c)?tt(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?Qr(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return Y(c)?tt(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 Aa(e,t,n){const r=this;return i;function i(a){return Wr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Ia(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Ea={name:"labelStartImage",resolveAll:pn.resolveAll,tokenize:_a};function _a(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Ta={name:"labelStartLink",resolveAll:pn.resolveAll,tokenize:Pa};function Pa(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const zt={name:"lineEnding",tokenize:za};function za(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,t,"linePrefix")}}const gt={name:"thematicBreak",tokenize:La};function La(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||D(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),H(u)?q(e,a,"whitespace")(u):a(u))}}const re={continuation:{tokenize:Fa},exit:Na,name:"list",tokenize:Ma},Da={partial:!0,tokenize:Oa},ja={partial:!0,tokenize:Ra};function Ma(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Jt(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(gt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return n(p)}function s(p){return Jt(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ot,r.interrupt?n:f,e.attempt(Da,h,c))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return H(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Fa(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ot,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!H(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ja,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(re,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Ra(e,t,n){const r=this;return q(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Na(e){e.exit(this.containerState.type)}function Oa(e,t,n){const r=this;return q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!H(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Wn={name:"setextUnderline",resolveTo:Ba,tokenize:Ha};function Ba(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Ha(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),H(u)?q(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||D(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const $a={tokenize:qa};function qa(e){const t=this,n=e.attempt(ot,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Yo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Va={resolveAll:Xr()},Ua=Yr("string"),Wa=Yr("text");function Yr(e){return{resolveAll:Xr(e==="text"?Qa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Xr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Qa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Ya={42:re,43:re,45:re,48:re,49:re,50:re,51:re,52:re,53:re,54:re,55:re,56:re,57:re,62:Hr},Xa={91:Zo},Ja={[-2]:Pt,[-1]:Pt,32:Pt},Ga={35:la,42:gt,45:[Wn,gt],60:ua,61:Wn,95:gt,96:Vn,126:Vn},Ka={38:qr,92:$r},Za={[-5]:zt,[-4]:zt,[-3]:zt,33:Ea,38:qr,42:Gt,60:[To,ga],91:Ta,92:[ra,$r],93:pn,95:Gt,96:$o},es={null:[Gt,Va]},ts={null:[42,95]},ns={null:[]},rs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ts,contentInitial:Xa,disable:ns,document:Ya,flow:Ga,flowInitial:Ja,insideSpan:es,string:Ka,text:Za},Symbol.toStringTag,{value:"Module"}));function is(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:O(R),check:O(C),consume:I,enter:v,exit:F,interrupt:O(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(_){return l=se(l,_),S(),l[l.length-1]!==null?[]:(V(t,0),u.events=St(o,u.events,u),u.events)}function h(_,P){return os(p(_),P)}function p(_){return ls(l,_)}function g(){const{_bufferIndex:_,_index:P,line:j,column:z,offset:T}=r;return{_bufferIndex:_,_index:P,line:j,column:z,offset:T}}function b(_){i[_.line]=_.column,y()}function S(){let _;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<P.length;)x(P.charCodeAt(r._bufferIndex));else x(P)}}function x(_){f=f(_)}function I(_){D(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,y()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=_}function v(_,P){const j=P||{};return j.type=_,j.start=g(),u.events.push(["enter",j,u]),a.push(j),j}function F(_){const P=a.pop();return P.end=g(),u.events.push(["exit",P,u]),P}function R(_,P){V(_,P.from)}function C(_,P){P.restore()}function O(_,P){return j;function j(z,T,B){let U,ue,ge,d;return Array.isArray(z)?ye(z):"tokenize"in z?ye([z]):ce(z);function ce(K){return Ve;function Ve(Ce){const Me=Ce!==null&&K[Ce],Fe=Ce!==null&&K.null,st=[...Array.isArray(Me)?Me:Me?[Me]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return ye(st)(Ce)}}function ye(K){return U=K,ue=0,K.length===0?B:m(K[ue])}function m(K){return Ve;function Ve(Ce){return d=L(),ge=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?Ie():K.tokenize.call(P?Object.assign(Object.create(u),P):u,s,fe,Ie)(Ce)}}function fe(K){return _(ge,d),T}function Ie(K){return d.restore(),++ue<U.length?m(U[ue]):B}}}function V(_,P){_.resolveAll&&!o.includes(_)&&o.push(_),_.resolve&&ae(u.events,P,u.events.length-P,_.resolve(u.events.slice(P),u)),_.resolveTo&&(u.events=_.resolveTo(u.events,u))}function L(){const _=g(),P=u.previous,j=u.currentConstruct,z=u.events.length,T=Array.from(a);return{from:z,restore:B};function B(){r=_,u.previous=P,u.currentConstruct=j,u.events.length=z,a=T,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ls(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function os(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
25
25
  `;break}case-3:{l=`\r
26
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function os(e){const r={constructs:Nr([ns,...(e||{}).extensions||[]]),content:i(wo),defined:[],document:i(So),flow:i(Ha),lazy:{},string:i(Va),text:i(Ua)};return r;function i(o){return l;function l(a){return rs(r,o,a)}}}function as(e){for(;!qr(e););return e}const Wn=/[\0\t\n\r]/g;function ss(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Wn.lastIndex=c,u=Wn.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(c);break}if(p===10&&c===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<h&&(s.push(o.slice(c,h)),e+=h-c),p){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const us=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cs(e){return e.replace(us,fs)}function fs(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Or(n.slice(o?2:1),o?16:10)}return fn(n)||e}const Xr={}.hasOwnProperty;function ps(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),hs(n)(as(os(n).document().write(ss()(e,t,!0))))}function hs(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(An),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(Cn),blockQuote:o(Fe),characterEscape:L,characterReference:L,codeFenced:o(st),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(st,l),codeText:o(Ni,l),codeTextData:L,data:L,codeFlowValue:L,definition:o(Oi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Bi),hardBreakEscape:o(Sn),hardBreakTrailing:o(Sn),htmlFlow:o(vn,l),htmlFlowData:L,htmlText:o(vn,l),htmlTextData:L,image:o(Hi),label:l,link:o(An),listItem:o($i),listItemValue:h,listOrdered:o(In,c),listUnordered:o(In),paragraph:o(qi),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Cn),strong:o(Vi),thematicBreak:o(Wi)},exit:{atxHeading:s(),atxHeadingSequence:R,autolink:s(),autolinkEmail:Me,autolinkProtocol:Ce,blockQuote:s(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:K,characterReference:Ve,codeFenced:s(S),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:y,codeIndented:s(x),codeText:s(T),codeTextData:y,data:y,definition:s(),definitionDestinationString:F,definitionLabelString:I,definitionTitleString:v,emphasis:s(),hardBreakEscape:s(P),hardBreakTrailing:s(P),htmlFlow:s(j),htmlFlowData:y,htmlText:s(z),htmlTextData:y,image:s(U),label:ge,labelText:ue,lineEnding:_,link:s(B),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:fe,resourceDestinationString:d,resourceTitleString:ce,resource:ye,setextHeading:s(V),setextHeadingLineSequence:O,setextHeadingText:C,strong:s(),thematicBreak:s()}};Jr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let E={type:"root",children:[]};const N={stack:[E],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},$=[];let W=-1;for(;++W<w.length;)if(w[W][1].type==="listOrdered"||w[W][1].type==="listUnordered")if(w[W][0]==="enter")$.push(W);else{const pe=$.pop();W=i(w,pe,W)}for(W=-1;++W<w.length;){const pe=t[w[W][0]];Xr.call(pe,w[W][1].type)&&pe[w[W][1].type].call(Object.assign({sliceSerialize:w[W][2].sliceSerialize},N),w[W][1])}if(N.tokenStack.length>0){const pe=N.tokenStack[N.tokenStack.length-1];(pe[1]||Qn).call(N,void 0,pe[0])}for(E.position={start:Se(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:Se(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<t.transforms.length;)E=t.transforms[W](E)||E;return E}function i(w,E,N){let $=E-1,W=-1,pe=!1,Ee,xe,Ue,We;for(;++$<=N;){const le=w[$];switch(le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{le[0]==="enter"?W++:W--,We=void 0;break}case"lineEndingBlank":{le[0]==="enter"&&(Ee&&!We&&!W&&!Ue&&(Ue=$),We=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:We=void 0}if(!W&&le[0]==="enter"&&le[1].type==="listItemPrefix"||W===-1&&le[0]==="exit"&&(le[1].type==="listUnordered"||le[1].type==="listOrdered")){if(Ee){let Re=$;for(xe=void 0;Re--;){const ke=w[Re];if(ke[1].type==="lineEnding"||ke[1].type==="lineEndingBlank"){if(ke[0]==="exit")continue;xe&&(w[xe][1].type="lineEndingBlank",pe=!0),ke[1].type="lineEnding",xe=Re}else if(!(ke[1].type==="linePrefix"||ke[1].type==="blockQuotePrefix"||ke[1].type==="blockQuotePrefixWhitespace"||ke[1].type==="blockQuoteMarker"||ke[1].type==="listItemIndent"))break}Ue&&(!xe||Ue<xe)&&(Ee._spread=!0),Ee.end=Object.assign({},xe?w[xe][1].start:le[1].end),w.splice(xe||$,0,["exit",Ee,le[2]]),$++,N++}if(le[1].type==="listItemPrefix"){const Re={type:"listItem",_spread:!1,start:Object.assign({},le[1].start),end:void 0};Ee=Re,w.splice($,0,["enter",Re,le[2]]),$++,N++,Ue=void 0,We=!0}}}return w[E][1]._spread=pe,N}function o(w,E){return N;function N($){a.call(this,w($),$),E&&E.call(this,$)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,E,N){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([E,N||void 0]),w.position={start:Se(E.start),end:void 0}}function s(w){return E;function E(N){w&&w.call(this,N),u.call(this,N)}}function u(w,E){const N=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==w.type&&(E?E.call(this,w,$[0]):($[1]||Qn).call(this,w,$[0]));else throw new Error("Cannot close `"+w.type+"` ("+et({start:w.start,end:w.end})+"): it’s not open");N.position.end=Se(w.end)}function f(){return cn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(w){if(this.data.expectingFirstListItemValue){const E=this.stack[this.stack.length-2];E.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function p(){const w=this.resume(),E=this.stack[this.stack.length-1];E.lang=w}function g(){const w=this.resume(),E=this.stack[this.stack.length-1];E.meta=w}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w.replace(/(\r?\n|\r)$/g,"")}function I(w){const E=this.resume(),N=this.stack[this.stack.length-1];N.label=E,N.identifier=he(this.sliceSerialize(w)).toLowerCase()}function v(){const w=this.resume(),E=this.stack[this.stack.length-1];E.title=w}function F(){const w=this.resume(),E=this.stack[this.stack.length-1];E.url=w}function R(w){const E=this.stack[this.stack.length-1];if(!E.depth){const N=this.sliceSerialize(w).length;E.depth=N}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function O(w){const E=this.stack[this.stack.length-1];E.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function L(w){const N=this.stack[this.stack.length-1].children;let $=N[N.length-1];(!$||$.type!=="text")&&($=Ui(),$.position={start:Se(w.start),end:void 0},N.push($)),this.stack.push($)}function y(w){const E=this.stack.pop();E.value+=this.sliceSerialize(w),E.position.end=Se(w.end)}function _(w){const E=this.stack[this.stack.length-1];if(this.data.atHardBreak){const N=E.children[E.children.length-1];N.position.end=Se(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(E.type)&&(L.call(this,w),y.call(this,w))}function P(){this.data.atHardBreak=!0}function j(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w}function z(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w}function T(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w}function B(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=E,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function U(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=E,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function ue(w){const E=this.sliceSerialize(w),N=this.stack[this.stack.length-2];N.label=cs(E),N.identifier=he(E).toLowerCase()}function ge(){const w=this.stack[this.stack.length-1],E=this.resume(),N=this.stack[this.stack.length-1];if(this.data.inReference=!0,N.type==="link"){const $=w.children;N.children=$}else N.alt=E}function d(){const w=this.resume(),E=this.stack[this.stack.length-1];E.url=w}function ce(){const w=this.resume(),E=this.stack[this.stack.length-1];E.title=w}function ye(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function fe(w){const E=this.resume(),N=this.stack[this.stack.length-1];N.label=E,N.identifier=he(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Ie(w){this.data.characterReferenceType=w.type}function K(w){const E=this.sliceSerialize(w),N=this.data.characterReferenceType;let $;N?($=Or(E,N==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=fn(E);const W=this.stack[this.stack.length-1];W.value+=$}function Ve(w){const E=this.stack.pop();E.position.end=Se(w.end)}function Ce(w){y.call(this,w);const E=this.stack[this.stack.length-1];E.url=this.sliceSerialize(w)}function Me(w){y.call(this,w);const E=this.stack[this.stack.length-1];E.url="mailto:"+this.sliceSerialize(w)}function Fe(){return{type:"blockquote",children:[]}}function st(){return{type:"code",lang:null,meta:null,value:""}}function Ni(){return{type:"inlineCode",value:""}}function Oi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Bi(){return{type:"emphasis",children:[]}}function Cn(){return{type:"heading",depth:0,children:[]}}function Sn(){return{type:"break"}}function vn(){return{type:"html",value:""}}function Hi(){return{type:"image",title:null,url:"",alt:null}}function An(){return{type:"link",title:null,url:"",children:[]}}function In(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function $i(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function qi(){return{type:"paragraph",children:[]}}function Vi(){return{type:"strong",children:[]}}function Ui(){return{type:"text",value:""}}function Wi(){return{type:"thematicBreak"}}}function Se(e){return{line:e.line,column:e.column,offset:e.offset}}function Jr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jr(e,r):ds(e,r)}}function ds(e,t){let n;for(n in t)if(Xr.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 Qn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+et({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+et({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+et({start:t.start,end:t.end})+") is still open")}function ms(e){const t=this;t.parser=n;function n(r){return ps(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gs(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ys(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
- `}]}function xs(e,t){const n=t.value?t.value+`
28
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function ks(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bs(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ws(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qe(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function Cs(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 Ss(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Gr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function vs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gr(e,t);const i={src:qe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function As(e,t){const n={src:qe(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Is(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 Es(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gr(e,t);const i={href:qe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function _s(e,t){const n={href:qe(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ts(e,t,n){const r=e.all(t),i=n?Ps(n):Kr(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
26
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function as(e){const r={constructs:Or([rs,...(e||{}).extensions||[]]),content:i(Co),defined:[],document:i(vo),flow:i($a),lazy:{},string:i(Ua),text:i(Wa)};return r;function i(o){return l;function l(a){return is(r,o,a)}}}function ss(e){for(;!Vr(e););return e}const Qn=/[\0\t\n\r]/g;function us(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Qn.lastIndex=c,u=Qn.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(c);break}if(p===10&&c===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<h&&(s.push(o.slice(c,h)),e+=h-c),p){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const cs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fs(e){return e.replace(cs,ps)}function ps(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Br(n.slice(o?2:1),o?16:10)}return fn(n)||e}const Jr={}.hasOwnProperty;function hs(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),ds(n)(ss(as(n).document().write(us()(e,t,!0))))}function ds(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(An),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(Cn),blockQuote:o(Fe),characterEscape:L,characterReference:L,codeFenced:o(st),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(st,l),codeText:o(Oi,l),codeTextData:L,data:L,codeFlowValue:L,definition:o(Bi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Hi),hardBreakEscape:o(Sn),hardBreakTrailing:o(Sn),htmlFlow:o(vn,l),htmlFlowData:L,htmlText:o(vn,l),htmlTextData:L,image:o($i),label:l,link:o(An),listItem:o(qi),listItemValue:h,listOrdered:o(In,c),listUnordered:o(In),paragraph:o(Vi),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Cn),strong:o(Ui),thematicBreak:o(Qi)},exit:{atxHeading:s(),atxHeadingSequence:R,autolink:s(),autolinkEmail:Me,autolinkProtocol:Ce,blockQuote:s(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:K,characterReference:Ve,codeFenced:s(S),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:y,codeIndented:s(x),codeText:s(T),codeTextData:y,data:y,definition:s(),definitionDestinationString:F,definitionLabelString:I,definitionTitleString:v,emphasis:s(),hardBreakEscape:s(P),hardBreakTrailing:s(P),htmlFlow:s(j),htmlFlowData:y,htmlText:s(z),htmlTextData:y,image:s(U),label:ge,labelText:ue,lineEnding:_,link:s(B),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:fe,resourceDestinationString:d,resourceTitleString:ce,resource:ye,setextHeading:s(V),setextHeadingLineSequence:O,setextHeadingText:C,strong:s(),thematicBreak:s()}};Gr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let E={type:"root",children:[]};const N={stack:[E],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},$=[];let W=-1;for(;++W<w.length;)if(w[W][1].type==="listOrdered"||w[W][1].type==="listUnordered")if(w[W][0]==="enter")$.push(W);else{const pe=$.pop();W=i(w,pe,W)}for(W=-1;++W<w.length;){const pe=t[w[W][0]];Jr.call(pe,w[W][1].type)&&pe[w[W][1].type].call(Object.assign({sliceSerialize:w[W][2].sliceSerialize},N),w[W][1])}if(N.tokenStack.length>0){const pe=N.tokenStack[N.tokenStack.length-1];(pe[1]||Yn).call(N,void 0,pe[0])}for(E.position={start:Se(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:Se(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<t.transforms.length;)E=t.transforms[W](E)||E;return E}function i(w,E,N){let $=E-1,W=-1,pe=!1,Ee,xe,Ue,We;for(;++$<=N;){const le=w[$];switch(le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{le[0]==="enter"?W++:W--,We=void 0;break}case"lineEndingBlank":{le[0]==="enter"&&(Ee&&!We&&!W&&!Ue&&(Ue=$),We=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:We=void 0}if(!W&&le[0]==="enter"&&le[1].type==="listItemPrefix"||W===-1&&le[0]==="exit"&&(le[1].type==="listUnordered"||le[1].type==="listOrdered")){if(Ee){let Re=$;for(xe=void 0;Re--;){const ke=w[Re];if(ke[1].type==="lineEnding"||ke[1].type==="lineEndingBlank"){if(ke[0]==="exit")continue;xe&&(w[xe][1].type="lineEndingBlank",pe=!0),ke[1].type="lineEnding",xe=Re}else if(!(ke[1].type==="linePrefix"||ke[1].type==="blockQuotePrefix"||ke[1].type==="blockQuotePrefixWhitespace"||ke[1].type==="blockQuoteMarker"||ke[1].type==="listItemIndent"))break}Ue&&(!xe||Ue<xe)&&(Ee._spread=!0),Ee.end=Object.assign({},xe?w[xe][1].start:le[1].end),w.splice(xe||$,0,["exit",Ee,le[2]]),$++,N++}if(le[1].type==="listItemPrefix"){const Re={type:"listItem",_spread:!1,start:Object.assign({},le[1].start),end:void 0};Ee=Re,w.splice($,0,["enter",Re,le[2]]),$++,N++,Ue=void 0,We=!0}}}return w[E][1]._spread=pe,N}function o(w,E){return N;function N($){a.call(this,w($),$),E&&E.call(this,$)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,E,N){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([E,N||void 0]),w.position={start:Se(E.start),end:void 0}}function s(w){return E;function E(N){w&&w.call(this,N),u.call(this,N)}}function u(w,E){const N=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==w.type&&(E?E.call(this,w,$[0]):($[1]||Yn).call(this,w,$[0]));else throw new Error("Cannot close `"+w.type+"` ("+et({start:w.start,end:w.end})+"): it’s not open");N.position.end=Se(w.end)}function f(){return cn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(w){if(this.data.expectingFirstListItemValue){const E=this.stack[this.stack.length-2];E.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function p(){const w=this.resume(),E=this.stack[this.stack.length-1];E.lang=w}function g(){const w=this.resume(),E=this.stack[this.stack.length-1];E.meta=w}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w.replace(/(\r?\n|\r)$/g,"")}function I(w){const E=this.resume(),N=this.stack[this.stack.length-1];N.label=E,N.identifier=he(this.sliceSerialize(w)).toLowerCase()}function v(){const w=this.resume(),E=this.stack[this.stack.length-1];E.title=w}function F(){const w=this.resume(),E=this.stack[this.stack.length-1];E.url=w}function R(w){const E=this.stack[this.stack.length-1];if(!E.depth){const N=this.sliceSerialize(w).length;E.depth=N}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function O(w){const E=this.stack[this.stack.length-1];E.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function L(w){const N=this.stack[this.stack.length-1].children;let $=N[N.length-1];(!$||$.type!=="text")&&($=Wi(),$.position={start:Se(w.start),end:void 0},N.push($)),this.stack.push($)}function y(w){const E=this.stack.pop();E.value+=this.sliceSerialize(w),E.position.end=Se(w.end)}function _(w){const E=this.stack[this.stack.length-1];if(this.data.atHardBreak){const N=E.children[E.children.length-1];N.position.end=Se(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(E.type)&&(L.call(this,w),y.call(this,w))}function P(){this.data.atHardBreak=!0}function j(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w}function z(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w}function T(){const w=this.resume(),E=this.stack[this.stack.length-1];E.value=w}function B(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=E,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function U(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=E,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function ue(w){const E=this.sliceSerialize(w),N=this.stack[this.stack.length-2];N.label=fs(E),N.identifier=he(E).toLowerCase()}function ge(){const w=this.stack[this.stack.length-1],E=this.resume(),N=this.stack[this.stack.length-1];if(this.data.inReference=!0,N.type==="link"){const $=w.children;N.children=$}else N.alt=E}function d(){const w=this.resume(),E=this.stack[this.stack.length-1];E.url=w}function ce(){const w=this.resume(),E=this.stack[this.stack.length-1];E.title=w}function ye(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function fe(w){const E=this.resume(),N=this.stack[this.stack.length-1];N.label=E,N.identifier=he(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Ie(w){this.data.characterReferenceType=w.type}function K(w){const E=this.sliceSerialize(w),N=this.data.characterReferenceType;let $;N?($=Br(E,N==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=fn(E);const W=this.stack[this.stack.length-1];W.value+=$}function Ve(w){const E=this.stack.pop();E.position.end=Se(w.end)}function Ce(w){y.call(this,w);const E=this.stack[this.stack.length-1];E.url=this.sliceSerialize(w)}function Me(w){y.call(this,w);const E=this.stack[this.stack.length-1];E.url="mailto:"+this.sliceSerialize(w)}function Fe(){return{type:"blockquote",children:[]}}function st(){return{type:"code",lang:null,meta:null,value:""}}function Oi(){return{type:"inlineCode",value:""}}function Bi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Hi(){return{type:"emphasis",children:[]}}function Cn(){return{type:"heading",depth:0,children:[]}}function Sn(){return{type:"break"}}function vn(){return{type:"html",value:""}}function $i(){return{type:"image",title:null,url:"",alt:null}}function An(){return{type:"link",title:null,url:"",children:[]}}function In(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function qi(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Vi(){return{type:"paragraph",children:[]}}function Ui(){return{type:"strong",children:[]}}function Wi(){return{type:"text",value:""}}function Qi(){return{type:"thematicBreak"}}}function Se(e){return{line:e.line,column:e.column,offset:e.offset}}function Gr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Gr(e,r):ms(e,r)}}function ms(e,t){let n;for(n in t)if(Jr.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 Yn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+et({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+et({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+et({start:t.start,end:t.end})+") is still open")}function gs(e){const t=this;t.parser=n;function n(r){return hs(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ys(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 xs(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
+ `}]}function ks(e,t){const n=t.value?t.value+`
28
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function bs(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ws(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cs(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qe(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function Ss(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 vs(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Kr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function As(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kr(e,t);const i={src:qe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Is(e,t){const n={src:qe(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Es(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 _s(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Kr(e,t);const i={href:qe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ts(e,t){const n={href:qe(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ps(e,t,n){const r=e.all(t),i=n?zs(n):Zr(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
29
29
  `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
30
- `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function Ps(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=Kr(n[r])}return t}function Kr(e){const t=e.spread;return t??e.children.length>1}function zs(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Ls(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ds(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function js(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ms(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=on(t.children[1]),s=zr(t.children[t.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Fs(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<a;){const c=t.children[s],h={},p=l?l[s]:void 0;p&&(h.align=p);let g={type:"element",tagName:o,properties:h,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),u.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Rs(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Yn=9,Xn=32;function Ns(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Jn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Jn(t.slice(i),i>0,!1)),o.join("")}function Jn(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Yn||o===Xn;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Yn||o===Xn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Os(e,t){const n={type:"text",value:Ns(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Bs(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Hs={blockquote:gs,break:ys,code:xs,delete:ks,emphasis:bs,footnoteReference:ws,heading:Cs,html:Ss,imageReference:vs,image:As,inlineCode:Is,linkReference:Es,link:_s,listItem:Ts,list:zs,paragraph:Ls,root:Ds,strong:js,table:Ms,tableCell:Rs,tableRow:Fs,text:Os,thematicBreak:Bs,toml:ct,yaml:ct,definition:ct,footnoteDefinition:ct};function ct(){}const Zr=-1,vt=0,nt=1,kt=2,hn=3,dn=4,mn=5,gn=6,ei=7,ti=8,ni=typeof self=="object"?self:globalThis,Gn=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ni[e](t)},$s=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case vt:case Zr:return n(l,i);case nt:{const a=n([],i);for(const s of l)a.push(r(s));return a}case kt:{const a=n({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case hn:return n(new Date(l),i);case dn:{const{source:a,flags:s}=l;return n(new RegExp(a,s),i)}case mn:{const a=n(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case gn:{const a=n(new Set,i);for(const s of l)a.add(r(s));return a}case ei:{const{name:a,message:s}=l;return n(typeof ni[a]=="function"?Gn(a,s):new Error(s),i)}case ti:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(Gn(o,l),i)};return r},Kn=e=>$s(new Map,e)(0),Pe="",{toString:qs}={},{keys:Vs}=Object,Je=e=>{const t=typeof e;if(t!=="object"||!e)return[vt,t];const n=qs.call(e).slice(8,-1);switch(n){case"Array":return[nt,Pe];case"Object":return[kt,Pe];case"Date":return[hn,Pe];case"RegExp":return[dn,Pe];case"Map":return[mn,Pe];case"Set":return[gn,Pe];case"DataView":return[nt,n]}return n.includes("Array")?[nt,n]:e instanceof Error?[ei,e.name||"Error"]:[kt,n]},ft=([e,t])=>e===vt&&(t==="function"||t==="symbol"),Us=(e,t,n,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return n.set(a,s),s},o=l=>{if(n.has(l))return n.get(l);let[a,s]=Je(l);switch(a){case vt:{let f=l;switch(s){case"bigint":a=ti,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([Zr],l)}return i([a,f],l)}case nt:{if(s){let h=l;return s==="DataView"?h=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(l)),i([s,[...h]],l)}const f=[],c=i([a,f],l);for(const h of l)f.push(o(h));return c}case kt:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const h of Vs(l))(e||!ft(Je(l[h])))&&f.push([o(h),o(l[h])]);return c}case hn:return i([a,isNaN(l.getTime())?Pe:l.toISOString()],l);case dn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case mn:{const f=[],c=i([a,f],l);for(const[h,p]of l)(e||!(ft(Je(h))||ft(Je(p))))&&f.push([o(h),o(p)]);return c}case gn:{const f=[],c=i([a,f],l);for(const h of l)(e||!ft(Je(h)))&&f.push(o(h));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},Zn=(e,{json:t,lossy:n}={})=>{const r=[];return Us(!(t||n),!!t,new Map,r)(e),r},bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kn(Zn(e,t)):structuredClone(e):(e,t)=>Kn(Zn(e,t));function Ws(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 Qs(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Ys(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Ws,r=e.options.footnoteBackLabel||Qs,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=qe(c.toLowerCase());let p=0;const g=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){g.length>0&&g.push({type:"text",value:" "});let I=typeof n=="string"?n:n(s,p);typeof I=="string"&&(I={type:"text",value:I}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const I=S.children[S.children.length-1];I&&I.type==="text"?I.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else f.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...bt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
30
+ `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function zs(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=Zr(n[r])}return t}function Zr(e){const t=e.spread;return t??e.children.length>1}function Ls(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Ds(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function js(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ms(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fs(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=on(t.children[1]),s=Lr(t.children[t.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Rs(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<a;){const c=t.children[s],h={},p=l?l[s]:void 0;p&&(h.align=p);let g={type:"element",tagName:o,properties:h,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),u.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Ns(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Xn=9,Jn=32;function Os(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Gn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Gn(t.slice(i),i>0,!1)),o.join("")}function Gn(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Xn||o===Jn;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Xn||o===Jn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Bs(e,t){const n={type:"text",value:Os(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Hs(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $s={blockquote:ys,break:xs,code:ks,delete:bs,emphasis:ws,footnoteReference:Cs,heading:Ss,html:vs,imageReference:As,image:Is,inlineCode:Es,linkReference:_s,link:Ts,listItem:Ps,list:Ls,paragraph:Ds,root:js,strong:Ms,table:Fs,tableCell:Ns,tableRow:Rs,text:Bs,thematicBreak:Hs,toml:ct,yaml:ct,definition:ct,footnoteDefinition:ct};function ct(){}const ei=-1,vt=0,nt=1,kt=2,hn=3,dn=4,mn=5,gn=6,ti=7,ni=8,ri=typeof self=="object"?self:globalThis,Kn=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ri[e](t)},qs=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case vt:case ei:return n(l,i);case nt:{const a=n([],i);for(const s of l)a.push(r(s));return a}case kt:{const a=n({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case hn:return n(new Date(l),i);case dn:{const{source:a,flags:s}=l;return n(new RegExp(a,s),i)}case mn:{const a=n(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case gn:{const a=n(new Set,i);for(const s of l)a.add(r(s));return a}case ti:{const{name:a,message:s}=l;return n(typeof ri[a]=="function"?Kn(a,s):new Error(s),i)}case ni:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(Kn(o,l),i)};return r},Zn=e=>qs(new Map,e)(0),Pe="",{toString:Vs}={},{keys:Us}=Object,Je=e=>{const t=typeof e;if(t!=="object"||!e)return[vt,t];const n=Vs.call(e).slice(8,-1);switch(n){case"Array":return[nt,Pe];case"Object":return[kt,Pe];case"Date":return[hn,Pe];case"RegExp":return[dn,Pe];case"Map":return[mn,Pe];case"Set":return[gn,Pe];case"DataView":return[nt,n]}return n.includes("Array")?[nt,n]:e instanceof Error?[ti,e.name||"Error"]:[kt,n]},ft=([e,t])=>e===vt&&(t==="function"||t==="symbol"),Ws=(e,t,n,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return n.set(a,s),s},o=l=>{if(n.has(l))return n.get(l);let[a,s]=Je(l);switch(a){case vt:{let f=l;switch(s){case"bigint":a=ni,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([ei],l)}return i([a,f],l)}case nt:{if(s){let h=l;return s==="DataView"?h=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(l)),i([s,[...h]],l)}const f=[],c=i([a,f],l);for(const h of l)f.push(o(h));return c}case kt:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const h of Us(l))(e||!ft(Je(l[h])))&&f.push([o(h),o(l[h])]);return c}case hn:return i([a,isNaN(l.getTime())?Pe:l.toISOString()],l);case dn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case mn:{const f=[],c=i([a,f],l);for(const[h,p]of l)(e||!(ft(Je(h))||ft(Je(p))))&&f.push([o(h),o(p)]);return c}case gn:{const f=[],c=i([a,f],l);for(const h of l)(e||!ft(Je(h)))&&f.push(o(h));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},er=(e,{json:t,lossy:n}={})=>{const r=[];return Ws(!(t||n),!!t,new Map,r)(e),r},bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Zn(er(e,t)):structuredClone(e):(e,t)=>Zn(er(e,t));function Qs(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 Ys(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Xs(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Qs,r=e.options.footnoteBackLabel||Ys,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=qe(c.toLowerCase());let p=0;const g=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){g.length>0&&g.push({type:"text",value:" "});let I=typeof n=="string"?n:n(s,p);typeof I=="string"&&(I={type:"text",value:I}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const I=S.children[S.children.length-1];I&&I.type==="text"?I.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else f.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...bt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
31
31
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
32
- `}]}}const At=(function(e){if(e==null)return Ks;if(typeof e=="function")return It(e);if(typeof e=="object")return Array.isArray(e)?Xs(e):Js(e);if(typeof e=="string")return Gs(e);throw new Error("Expected function, string, or object as test")});function Xs(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=At(e[n]);return It(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Js(e){const t=e;return It(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Gs(e){return It(t);function t(n){return n&&n.type===e}}function It(e){return t;function t(n,r,i){return!!(Zs(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ks(){return!0}function Zs(e){return e!==null&&typeof e=="object"&&"type"in e}const ri=[],eu=!0,Kt=!1,tu="skip";function ii(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=At(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=ri,g,b,S;if((!t||o(s,u,f[f.length-1]||void 0))&&(p=nu(n(s,f)),p[0]===Kt))return p;if("children"in s&&s.children){const x=s;if(x.children&&p[0]!==tu)for(b=(r?x.children.length:-1)+l,S=f.concat(x);b>-1&&b<x.children.length;){const I=x.children[b];if(g=a(I,b,S)(),g[0]===Kt)return g;b=typeof g[1]=="number"?g[1]:b+l}}return p}}}function nu(e){return Array.isArray(e)?e:typeof e=="number"?[eu,e]:e==null?ri:[e]}function yn(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),ii(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const Zt={}.hasOwnProperty,ru={};function iu(e,t){const n=t||ru,r=new Map,i=new Map,o=new Map,l={...Hs,...n.handlers},a={all:u,applyData:ou,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:n,patch:lu,wrap:su};return yn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,h=String(f.identifier).toUpperCase();c.has(h)||c.set(h,f)}}),a;function s(f,c){const h=f.type,p=a.handlers[h];if(Zt.call(a.handlers,h)&&p)return p(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in f){const{children:b,...S}=f,x=bt(S);return x.children=a.all(f),x}return bt(f)}return(a.options.unknownHandler||au)(a,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const g=a.one(h[p],f);if(g){if(p&&h[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=er(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=er(b.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function lu(e,t){e.position&&(t.position=Wl(e))}function ou(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,bt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function au(e,t){const n=t.data||{},r="value"in t&&!(Zt.call(n,"hProperties")||Zt.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 su(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
32
+ `}]}}const At=(function(e){if(e==null)return Zs;if(typeof e=="function")return It(e);if(typeof e=="object")return Array.isArray(e)?Js(e):Gs(e);if(typeof e=="string")return Ks(e);throw new Error("Expected function, string, or object as test")});function Js(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=At(e[n]);return It(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Gs(e){const t=e;return It(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Ks(e){return It(t);function t(n){return n&&n.type===e}}function It(e){return t;function t(n,r,i){return!!(eu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Zs(){return!0}function eu(e){return e!==null&&typeof e=="object"&&"type"in e}const ii=[],tu=!0,Kt=!1,nu="skip";function li(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=At(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=ii,g,b,S;if((!t||o(s,u,f[f.length-1]||void 0))&&(p=ru(n(s,f)),p[0]===Kt))return p;if("children"in s&&s.children){const x=s;if(x.children&&p[0]!==nu)for(b=(r?x.children.length:-1)+l,S=f.concat(x);b>-1&&b<x.children.length;){const I=x.children[b];if(g=a(I,b,S)(),g[0]===Kt)return g;b=typeof g[1]=="number"?g[1]:b+l}}return p}}}function ru(e){return Array.isArray(e)?e:typeof e=="number"?[tu,e]:e==null?ii:[e]}function yn(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),li(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const Zt={}.hasOwnProperty,iu={};function lu(e,t){const n=t||iu,r=new Map,i=new Map,o=new Map,l={...$s,...n.handlers},a={all:u,applyData:au,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:n,patch:ou,wrap:uu};return yn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,h=String(f.identifier).toUpperCase();c.has(h)||c.set(h,f)}}),a;function s(f,c){const h=f.type,p=a.handlers[h];if(Zt.call(a.handlers,h)&&p)return p(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in f){const{children:b,...S}=f,x=bt(S);return x.children=a.all(f),x}return bt(f)}return(a.options.unknownHandler||su)(a,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const g=a.one(h[p],f);if(g){if(p&&h[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=tr(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=tr(b.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function ou(e,t){e.position&&(t.position=Ql(e))}function au(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,bt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function su(e,t){const n=t.data||{},r="value"in t&&!(Zt.call(n,"hProperties")||Zt.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 uu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
33
33
  `});++r<e.length;)r&&n.push({type:"text",value:`
34
34
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
35
- `}),n}function er(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function tr(e,t){const n=iu(e,t),r=n.one(e,void 0),i=Ys(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
36
- `},i),o}function uu(e,t){return e&&"run"in e?async function(n,r){const i=tr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return tr(n,{file:r,...e||t})}}function nr(e){if(e)throw e}var Lt,rr;function cu(){if(rr)return Lt;rr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Lt=function s(){var u,f,c,h,p,g,b=arguments[0],S=1,x=arguments.length,I=!1;for(typeof b=="boolean"&&(I=b,b=arguments[1]||{},S=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});S<x;++S)if(u=arguments[S],u!=null)for(f in u)c=a(b,f),h=a(u,f),b!==h&&(I&&h&&(o(h)||(p=i(h)))?(p?(p=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(b,{name:f,newValue:s(I,g,h)})):typeof h<"u"&&l(b,{name:f,newValue:h}));return b},Lt}var fu=cu();const Dt=Pr(fu);function en(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 pu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?hu(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function hu(e,t){let n;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const de={basename:du,dirname:mu,extname:gu,join:yu,sep:"/"};function du(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');at(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function mu(e){if(at(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 gu(e){at(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function yu(...e){let t=-1,n;for(;++t<e.length;)at(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":xu(n)}function xu(e){at(e);const t=e.codePointAt(0)===47;let n=ku(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ku(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function at(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bu={cwd:wu};function wu(){return"/"}function tn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Cu(e){if(typeof e=="string")e=new URL(e);else if(!tn(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 Su(e)}function Su(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 jt=["history","path","basename","stem","extname","dirname"];class li{constructor(t){let n;t?tn(t)?n={path:t}:typeof t=="string"||vu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":bu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<jt.length;){const o=jt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)jt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?de.basename(this.path):void 0}set basename(t){Ft(t,"basename"),Mt(t,"basename"),this.path=de.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?de.dirname(this.path):void 0}set dirname(t){ir(this.basename,"dirname"),this.path=de.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?de.extname(this.path):void 0}set extname(t){if(Mt(t,"extname"),ir(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=de.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tn(t)&&(t=Cu(t)),Ft(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?de.basename(this.path,this.extname):void 0}set stem(t){Ft(t,"stem"),Mt(t,"stem"),this.path=de.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 te(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 Mt(e,t){if(e&&e.includes(de.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+de.sep+"`")}function Ft(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ir(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function vu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Au=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Iu={}.hasOwnProperty;class xn extends Au{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=pu()}copy(){const t=new xn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Dt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ot("data",this.frozen),this.namespace[t]=n,this):Iu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ot("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=pt(t),r=this.parser||this.Parser;return Rt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Rt("process",this.parser||this.Parser),Nt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=pt(t),s=r.parse(a);r.run(s,a,function(f,c,h){if(f||!c||!h)return u(f);const p=c,g=r.stringify(p,h);Tu(g)?h.value=g:h.result=g,u(f,h)});function u(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Rt("processSync",this.parser||this.Parser),Nt("processSync",this.compiler||this.Compiler),this.process(t,i),or("processSync","process",n),r;function i(o,l){n=!0,nr(o),r=l}}run(t,n,r){lr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=pt(n);i.run(t,s,u);function u(f,c,h){const p=c||t;f?a(f):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),or("runSync","run",r),i;function o(l,a){nr(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=pt(n),i=this.compiler||this.Compiler;return Nt("stringify",i),lr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ot("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Dt(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...f]);else if(f.length>0){let[p,...g]=f;const b=r[h][1];en(b)&&en(p)&&(p=Dt(!0,b,p)),r[h]=[u,p,...g]}}}}const Eu=new xn().freeze();function Rt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ot(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 lr(e){if(!en(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function or(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pt(e){return _u(e)?e:new li(e)}function _u(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Tu(e){return typeof e=="string"||Pu(e)}function Pu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ar=[],sr={allowDangerousHtml:!0},Lu=/^(https?|ircs?|mailto|xmpp)$/i,Du=[{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 ju(e){const t=Mu(e),n=Fu(e);return Ru(t.runSync(t.parse(n),n),e)}function Mu(e){const t=e.rehypePlugins||ar,n=e.remarkPlugins||ar,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...sr}:sr;return Eu().use(ms).use(n).use(uu,r).use(t)}function Fu(e){const t=e.children||"",n=new li;return typeof t=="string"&&(n.value=t),n}function Ru(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||Nu;for(const f of Du)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+zu+f.id,void 0);return yn(e,u),Gl(e,{Fragment:k.Fragment,components:i,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return l?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Tt)if(Object.hasOwn(Tt,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],b=Tt[p];(b===null||b.includes(f.tagName))&&(f.properties[p]=s(String(g||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return a&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function Nu(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||Lu.test(e.slice(0,t))?e:""}function ur(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}function Ou(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Bu(e,t,n){const i=At((n||{}).ignore||[]),o=Hu(t);let l=-1;for(;++l<o.length;)ii(e,"text",a);function a(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],g=h?h.children:void 0;if(i(p,g?g.indexOf(p):void 0,h))return;h=p}if(h)return s(u,f)}function s(u,f){const c=f[f.length-1],h=o[l][0],p=o[l][1];let g=0;const S=c.children.indexOf(u);let x=!1,I=[];h.lastIndex=0;let v=h.exec(u.value);for(;v;){const F=v.index,R={index:v.index,input:v.input,stack:[...f,u]};let C=p(...v,R);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=F+1:(g!==F&&I.push({type:"text",value:u.value.slice(g,F)}),Array.isArray(C)?I.push(...C):C&&I.push(C),g=F+v[0].length,x=!0),!h.global)break;v=h.exec(u.value)}return x?(g<u.value.length&&I.push({type:"text",value:u.value.slice(g)}),c.children.splice(S,1,...I)):I=[u],S+I.length}}function Hu(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([$u(i[0]),qu(i[1])])}return t}function $u(e){return typeof e=="string"?new RegExp(Ou(e),"g"):e}function qu(e){return typeof e=="function"?e:function(){return e}}const Bt="phrasing",Ht=["autolink","link","image","label"];function Vu(){return{transforms:[Gu],enter:{literalAutolink:Wu,literalAutolinkEmail:$t,literalAutolinkHttp:$t,literalAutolinkWww:$t},exit:{literalAutolink:Ju,literalAutolinkEmail:Xu,literalAutolinkHttp:Qu,literalAutolinkWww:Yu}}}function Uu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Bt,notInConstruct:Ht},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Bt,notInConstruct:Ht},{character:":",before:"[ps]",after:"\\/",inConstruct:Bt,notInConstruct:Ht}]}}function Wu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function $t(e){this.config.enter.autolinkProtocol.call(this,e)}function Qu(e){this.config.exit.autolinkProtocol.call(this,e)}function Yu(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 Xu(e){this.config.exit.autolinkEmail.call(this,e)}function Ju(e){this.exit(e)}function Gu(e){Bu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ku],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Zu]],{ignore:["link","linkReference"]})}function Ku(e,t,n,r,i){let o="";if(!oi(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!ec(n)))return!1;const l=tc(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Zu(e,t,n,r){return!oi(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ec(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 tc(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=ur(e,"(");let o=ur(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function oi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Le(n)||Ct(n))&&(!t||n!==47)}ai.peek=cc;function nc(){this.buffer()}function rc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ic(){this.buffer()}function lc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=he(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ac(e){this.exit(e)}function sc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=he(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uc(e){this.exit(e)}function cc(){return"["}function ai(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function fc(){return{enter:{gfmFootnoteCallString:nc,gfmFootnoteCall:rc,gfmFootnoteDefinitionLabelString:ic,gfmFootnoteDefinition:lc},exit:{gfmFootnoteCallString:oc,gfmFootnoteCall:ac,gfmFootnoteDefinitionLabelString:sc,gfmFootnoteDefinition:uc}}}function pc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ai},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((t?`
37
- `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?si:hc))),u(),s}}function hc(e,t,n){return t===0?e:si(e,t,n)}function si(e,t,n){return(n?"":" ")+e}const dc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ui.peek=kc;function mc(){return{canContainEols:["delete"],enter:{strikethrough:yc},exit:{strikethrough:xc}}}function gc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:dc}],handlers:{delete:ui}}}function yc(e){this.enter({type:"delete",children:[]},e)}function xc(e){this.exit(e)}function ui(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function kc(){return"~"}function bc(e){return e.length}function wc(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||bc,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const b=[],S=[];let x=-1;for(e[f].length>u&&(u=e[f].length);++x<e[f].length;){const I=Cc(e[f][x]);if(n.alignDelimiters!==!1){const v=i(I);S[x]=v,(s[x]===void 0||v>s[x])&&(s[x]=v)}b.push(I)}l[f]=b,a[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=cr(r[c]);else{const b=cr(r);for(;++c<u;)o[c]=b}c=-1;const h=[],p=[];for(;++c<u;){const b=o[c];let S="",x="";b===99?(S=":",x=":"):b===108?S=":":b===114&&(x=":");let I=n.alignDelimiters===!1?1:Math.max(1,s[c]-S.length-x.length);const v=S+"-".repeat(I)+x;n.alignDelimiters!==!1&&(I=S.length+I+x.length,I>s[c]&&(s[c]=I),p[c]=I),h[c]=v}l.splice(1,0,h),a.splice(1,0,p),f=-1;const g=[];for(;++f<l.length;){const b=l[f],S=a[f];c=-1;const x=[];for(;++c<u;){const I=b[c]||"";let v="",F="";if(n.alignDelimiters!==!1){const R=s[c]-(S[c]||0),C=o[c];C===114?v=" ".repeat(R):C===99?R%2?(v=" ".repeat(R/2+.5),F=" ".repeat(R/2-.5)):(v=" ".repeat(R/2),F=v):F=" ".repeat(R)}n.delimiterStart!==!1&&!c&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||c)&&x.push(" "),n.alignDelimiters!==!1&&x.push(v),x.push(I),n.alignDelimiters!==!1&&x.push(F),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&x.push("|")}g.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
38
- `)}function Cc(e){return e==null?"":String(e)}function cr(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 Sc(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),vc);return i(),l}function vc(e,t,n){return">"+(n?"":" ")+e}function Ac(e,t){return fr(e,t.inConstruct,!0)&&!fr(e,t.notInConstruct,!1)}function fr(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 pr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
39
- `&&Ac(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
40
- `}function Ic(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function Ec(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 _c(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 Tc(e,t,n,r){const i=_c(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Ec(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(o,Pc);return c(),h}const a=n.createTracker(r),s=i.repeat(Math.max(Ic(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(s);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
35
+ `}),n}function tr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function nr(e,t){const n=lu(e,t),r=n.one(e,void 0),i=Xs(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
36
+ `},i),o}function cu(e,t){return e&&"run"in e?async function(n,r){const i=nr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return nr(n,{file:r,...e||t})}}function rr(e){if(e)throw e}var Lt,ir;function fu(){if(ir)return Lt;ir=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Lt=function s(){var u,f,c,h,p,g,b=arguments[0],S=1,x=arguments.length,I=!1;for(typeof b=="boolean"&&(I=b,b=arguments[1]||{},S=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});S<x;++S)if(u=arguments[S],u!=null)for(f in u)c=a(b,f),h=a(u,f),b!==h&&(I&&h&&(o(h)||(p=i(h)))?(p?(p=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(b,{name:f,newValue:s(I,g,h)})):typeof h<"u"&&l(b,{name:f,newValue:h}));return b},Lt}var pu=fu();const Dt=zr(pu);function en(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 hu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?du(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function du(e,t){let n;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const de={basename:mu,dirname:gu,extname:yu,join:xu,sep:"/"};function mu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');at(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function gu(e){if(at(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 yu(e){at(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function xu(...e){let t=-1,n;for(;++t<e.length;)at(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ku(n)}function ku(e){at(e);const t=e.codePointAt(0)===47;let n=bu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function at(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wu={cwd:Cu};function Cu(){return"/"}function tn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Su(e){if(typeof e=="string")e=new URL(e);else if(!tn(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 vu(e)}function vu(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 jt=["history","path","basename","stem","extname","dirname"];class oi{constructor(t){let n;t?tn(t)?n={path:t}:typeof t=="string"||Au(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":wu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<jt.length;){const o=jt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)jt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?de.basename(this.path):void 0}set basename(t){Ft(t,"basename"),Mt(t,"basename"),this.path=de.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?de.dirname(this.path):void 0}set dirname(t){lr(this.basename,"dirname"),this.path=de.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?de.extname(this.path):void 0}set extname(t){if(Mt(t,"extname"),lr(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=de.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tn(t)&&(t=Su(t)),Ft(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?de.basename(this.path,this.extname):void 0}set stem(t){Ft(t,"stem"),Mt(t,"stem"),this.path=de.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 te(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 Mt(e,t){if(e&&e.includes(de.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+de.sep+"`")}function Ft(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Au(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Iu=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Eu={}.hasOwnProperty;class xn extends Iu{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=hu()}copy(){const t=new xn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Dt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ot("data",this.frozen),this.namespace[t]=n,this):Eu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ot("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=pt(t),r=this.parser||this.Parser;return Rt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Rt("process",this.parser||this.Parser),Nt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=pt(t),s=r.parse(a);r.run(s,a,function(f,c,h){if(f||!c||!h)return u(f);const p=c,g=r.stringify(p,h);Pu(g)?h.value=g:h.result=g,u(f,h)});function u(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Rt("processSync",this.parser||this.Parser),Nt("processSync",this.compiler||this.Compiler),this.process(t,i),ar("processSync","process",n),r;function i(o,l){n=!0,rr(o),r=l}}run(t,n,r){or(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=pt(n);i.run(t,s,u);function u(f,c,h){const p=c||t;f?a(f):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),ar("runSync","run",r),i;function o(l,a){rr(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=pt(n),i=this.compiler||this.Compiler;return Nt("stringify",i),or(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ot("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Dt(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...f]);else if(f.length>0){let[p,...g]=f;const b=r[h][1];en(b)&&en(p)&&(p=Dt(!0,b,p)),r[h]=[u,p,...g]}}}}const _u=new xn().freeze();function Rt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ot(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 or(e){if(!en(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ar(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pt(e){return Tu(e)?e:new oi(e)}function Tu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Pu(e){return typeof e=="string"||zu(e)}function zu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sr=[],ur={allowDangerousHtml:!0},Du=/^(https?|ircs?|mailto|xmpp)$/i,ju=[{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 Mu(e){const t=Fu(e),n=Ru(e);return Nu(t.runSync(t.parse(n),n),e)}function Fu(e){const t=e.rehypePlugins||sr,n=e.remarkPlugins||sr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ur}:ur;return _u().use(gs).use(n).use(cu,r).use(t)}function Ru(e){const t=e.children||"",n=new oi;return typeof t=="string"&&(n.value=t),n}function Nu(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||Ou;for(const f of ju)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Lu+f.id,void 0);return yn(e,u),Kl(e,{Fragment:k.Fragment,components:i,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return l?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Tt)if(Object.hasOwn(Tt,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],b=Tt[p];(b===null||b.includes(f.tagName))&&(f.properties[p]=s(String(g||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return a&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function Ou(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||Du.test(e.slice(0,t))?e:""}function cr(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}function Bu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Hu(e,t,n){const i=At((n||{}).ignore||[]),o=$u(t);let l=-1;for(;++l<o.length;)li(e,"text",a);function a(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],g=h?h.children:void 0;if(i(p,g?g.indexOf(p):void 0,h))return;h=p}if(h)return s(u,f)}function s(u,f){const c=f[f.length-1],h=o[l][0],p=o[l][1];let g=0;const S=c.children.indexOf(u);let x=!1,I=[];h.lastIndex=0;let v=h.exec(u.value);for(;v;){const F=v.index,R={index:v.index,input:v.input,stack:[...f,u]};let C=p(...v,R);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=F+1:(g!==F&&I.push({type:"text",value:u.value.slice(g,F)}),Array.isArray(C)?I.push(...C):C&&I.push(C),g=F+v[0].length,x=!0),!h.global)break;v=h.exec(u.value)}return x?(g<u.value.length&&I.push({type:"text",value:u.value.slice(g)}),c.children.splice(S,1,...I)):I=[u],S+I.length}}function $u(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([qu(i[0]),Vu(i[1])])}return t}function qu(e){return typeof e=="string"?new RegExp(Bu(e),"g"):e}function Vu(e){return typeof e=="function"?e:function(){return e}}const Bt="phrasing",Ht=["autolink","link","image","label"];function Uu(){return{transforms:[Ku],enter:{literalAutolink:Qu,literalAutolinkEmail:$t,literalAutolinkHttp:$t,literalAutolinkWww:$t},exit:{literalAutolink:Gu,literalAutolinkEmail:Ju,literalAutolinkHttp:Yu,literalAutolinkWww:Xu}}}function Wu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Bt,notInConstruct:Ht},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Bt,notInConstruct:Ht},{character:":",before:"[ps]",after:"\\/",inConstruct:Bt,notInConstruct:Ht}]}}function Qu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function $t(e){this.config.enter.autolinkProtocol.call(this,e)}function Yu(e){this.config.exit.autolinkProtocol.call(this,e)}function Xu(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 Ju(e){this.config.exit.autolinkEmail.call(this,e)}function Gu(e){this.exit(e)}function Ku(e){Hu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Zu],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ec]],{ignore:["link","linkReference"]})}function Zu(e,t,n,r,i){let o="";if(!ai(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!tc(n)))return!1;const l=nc(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function ec(e,t,n,r){return!ai(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function tc(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 nc(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=cr(e,"(");let o=cr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ai(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Le(n)||Ct(n))&&(!t||n!==47)}si.peek=fc;function rc(){this.buffer()}function ic(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lc(){this.buffer()}function oc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ac(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=he(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sc(e){this.exit(e)}function uc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=he(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cc(e){this.exit(e)}function fc(){return"["}function si(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function pc(){return{enter:{gfmFootnoteCallString:rc,gfmFootnoteCall:ic,gfmFootnoteDefinitionLabelString:lc,gfmFootnoteDefinition:oc},exit:{gfmFootnoteCallString:ac,gfmFootnoteCall:sc,gfmFootnoteDefinitionLabelString:uc,gfmFootnoteDefinition:cc}}}function hc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:si},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((t?`
37
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?ui:dc))),u(),s}}function dc(e,t,n){return t===0?e:ui(e,t,n)}function ui(e,t,n){return(n?"":" ")+e}const mc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ci.peek=bc;function gc(){return{canContainEols:["delete"],enter:{strikethrough:xc},exit:{strikethrough:kc}}}function yc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mc}],handlers:{delete:ci}}}function xc(e){this.enter({type:"delete",children:[]},e)}function kc(e){this.exit(e)}function ci(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function bc(){return"~"}function wc(e){return e.length}function Cc(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||wc,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const b=[],S=[];let x=-1;for(e[f].length>u&&(u=e[f].length);++x<e[f].length;){const I=Sc(e[f][x]);if(n.alignDelimiters!==!1){const v=i(I);S[x]=v,(s[x]===void 0||v>s[x])&&(s[x]=v)}b.push(I)}l[f]=b,a[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=fr(r[c]);else{const b=fr(r);for(;++c<u;)o[c]=b}c=-1;const h=[],p=[];for(;++c<u;){const b=o[c];let S="",x="";b===99?(S=":",x=":"):b===108?S=":":b===114&&(x=":");let I=n.alignDelimiters===!1?1:Math.max(1,s[c]-S.length-x.length);const v=S+"-".repeat(I)+x;n.alignDelimiters!==!1&&(I=S.length+I+x.length,I>s[c]&&(s[c]=I),p[c]=I),h[c]=v}l.splice(1,0,h),a.splice(1,0,p),f=-1;const g=[];for(;++f<l.length;){const b=l[f],S=a[f];c=-1;const x=[];for(;++c<u;){const I=b[c]||"";let v="",F="";if(n.alignDelimiters!==!1){const R=s[c]-(S[c]||0),C=o[c];C===114?v=" ".repeat(R):C===99?R%2?(v=" ".repeat(R/2+.5),F=" ".repeat(R/2-.5)):(v=" ".repeat(R/2),F=v):F=" ".repeat(R)}n.delimiterStart!==!1&&!c&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||c)&&x.push(" "),n.alignDelimiters!==!1&&x.push(v),x.push(I),n.alignDelimiters!==!1&&x.push(F),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&x.push("|")}g.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
38
+ `)}function Sc(e){return e==null?"":String(e)}function fr(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 vc(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),Ac);return i(),l}function Ac(e,t,n){return">"+(n?"":" ")+e}function Ic(e,t){return pr(e,t.inConstruct,!0)&&!pr(e,t.notInConstruct,!1)}function pr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function hr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
39
+ `&&Ic(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
40
+ `}function Ec(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function _c(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 Tc(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 Pc(e,t,n,r){const i=Tc(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(_c(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(o,zc);return c(),h}const a=n.createTracker(r),s=i.repeat(Math.max(Ec(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(s);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
41
41
  `,encode:["`"],...a.current()})),c()}return f+=a.move(`
42
42
  `),o&&(f+=a.move(o+`
43
- `)),f+=a.move(s),u(),f}function Pc(e,t,n){return(n?"":" ")+e}function kn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function zc(e,t,n,r){const i=kn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("[");return u+=s.move(n.safe(n.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":`
44
- `,...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function Lc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function it(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wt(e,t,n){const r=He(e),i=He(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ci.peek=Dc;function ci(e,t,n,r){const i=Lc(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=wt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=wt(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+it(c));const p=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Dc(e,t,n){return n.options.emphasis||"*"}function jc(e,t){let n=!1;return yn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Kt}),!!((!e.depth||e.depth<3)&&cn(e)&&(t.options.setext||n))}function Mc(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(jc(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
43
+ `)),f+=a.move(s),u(),f}function zc(e,t,n){return(n?"":" ")+e}function kn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Lc(e,t,n,r){const i=kn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("[");return u+=s.move(n.safe(n.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":`
44
+ `,...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function Dc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function it(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wt(e,t,n){const r=He(e),i=He(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}fi.peek=jc;function fi(e,t,n,r){const i=Dc(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=wt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=wt(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+it(c));const p=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function jc(e,t,n){return n.options.emphasis||"*"}function Mc(e,t){let n=!1;return yn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Kt}),!!((!e.depth||e.depth<3)&&cn(e)&&(t.options.setext||n))}function Fc(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Mc(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
45
45
  `,after:`
46
46
  `});return c(),f(),h+`
47
47
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
48
48
  `))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),s=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
49
- `,...o.current()});return/^[\t ]/.test(u)&&(u=it(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u}fi.peek=Fc;function fi(e){return e.value||""}function Fc(){return"<"}pi.peek=Rc;function pi(e,t,n,r){const i=kn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");return u+=s.move(n.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function Rc(){return"!"}hi.peek=Nc;function hi(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Nc(){return"!"}di.peek=Oc;function di(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function Oc(){return"`"}function mi(e,t){const n=cn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}gi.peek=Bc;function gi(e,t,n,r){const i=kn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(mi(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),s=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function Bc(e,t,n){return mi(e,n)?"<":"["}yi.peek=Hc;function yi(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Hc(){return"["}function bn(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 $c(e){const t=bn(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 qc(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 xi(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 Vc(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?qc(n):bn(n);const a=e.ordered?l==="."?")":".":$c(n);let s=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),xi(n)===l&&f){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function Uc(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 Wc(e,t,n,r){const i=Uc(n);let o=n.bulletCurrent||bn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return s(),u;function f(c,h,p){return h?(p?"":" ".repeat(l))+c:(p?o:o+" ".repeat(l-o.length))+c}}function Qc(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Yc=At(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Xc(e,t,n,r){return(e.children.some(function(l){return Yc(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Jc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ki.peek=Gc;function ki(e,t,n,r){const i=Jc(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=wt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=wt(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+it(c));const p=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Gc(e,t,n){return n.options.strong||"*"}function Kc(e,t,n,r){return n.safe(e.value,r)}function Zc(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 ef(e,t,n){const r=(xi(n)+(n.options.ruleSpaces?" ":"")).repeat(Zc(n));return n.options.ruleSpaces?r.slice(0,-1):r}const bi={blockquote:Sc,break:pr,code:Tc,definition:zc,emphasis:ci,hardBreak:pr,heading:Mc,html:fi,image:pi,imageReference:hi,inlineCode:di,link:gi,linkReference:yi,list:Vc,listItem:Wc,paragraph:Qc,root:Xc,strong:ki,text:Kc,thematicBreak:ef};function tf(){return{enter:{table:nf,tableData:hr,tableHeader:hr,tableRow:lf},exit:{codeText:of,table:rf,tableData:qt,tableHeader:qt,tableRow:qt}}}function nf(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 rf(e){this.exit(e),this.data.inTable=void 0}function lf(e){this.enter({type:"tableRow",children:[]},e)}function qt(e){this.exit(e)}function hr(e){this.enter({type:"tableCell",children:[]},e)}function of(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,af));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function af(e,t){return t==="|"?t:e}function sf(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
49
+ `,...o.current()});return/^[\t ]/.test(u)&&(u=it(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u}pi.peek=Rc;function pi(e){return e.value||""}function Rc(){return"<"}hi.peek=Nc;function hi(e,t,n,r){const i=kn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");return u+=s.move(n.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function Nc(){return"!"}di.peek=Oc;function di(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Oc(){return"!"}mi.peek=Bc;function mi(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function Bc(){return"`"}function gi(e,t){const n=cn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}yi.peek=Hc;function yi(e,t,n,r){const i=kn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(gi(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),s=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function Hc(e,t,n){return gi(e,n)?"<":"["}xi.peek=$c;function xi(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function $c(){return"["}function bn(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 qc(e){const t=bn(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 Vc(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 ki(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 Uc(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?Vc(n):bn(n);const a=e.ordered?l==="."?")":".":qc(n);let s=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),ki(n)===l&&f){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function Wc(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 Qc(e,t,n,r){const i=Wc(n);let o=n.bulletCurrent||bn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return s(),u;function f(c,h,p){return h?(p?"":" ".repeat(l))+c:(p?o:o+" ".repeat(l-o.length))+c}}function Yc(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Xc=At(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Jc(e,t,n,r){return(e.children.some(function(l){return Xc(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Gc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bi.peek=Kc;function bi(e,t,n,r){const i=Gc(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=wt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=wt(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+it(c));const p=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Kc(e,t,n){return n.options.strong||"*"}function Zc(e,t,n,r){return n.safe(e.value,r)}function ef(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 tf(e,t,n){const r=(ki(n)+(n.options.ruleSpaces?" ":"")).repeat(ef(n));return n.options.ruleSpaces?r.slice(0,-1):r}const wi={blockquote:vc,break:hr,code:Pc,definition:Lc,emphasis:fi,hardBreak:hr,heading:Fc,html:pi,image:hi,imageReference:di,inlineCode:mi,link:yi,linkReference:xi,list:Uc,listItem:Qc,paragraph:Yc,root:Jc,strong:bi,text:Zc,thematicBreak:tf};function nf(){return{enter:{table:rf,tableData:dr,tableHeader:dr,tableRow:of},exit:{codeText:af,table:lf,tableData:qt,tableHeader:qt,tableRow:qt}}}function rf(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 lf(e){this.exit(e),this.data.inTable=void 0}function of(e){this.enter({type:"tableRow",children:[]},e)}function qt(e){this.exit(e)}function dr(e){this.enter({type:"tableCell",children:[]},e)}function af(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function sf(e,t){return t==="|"?t:e}function uf(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
50
50
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:l,tableCell:s,tableRow:a}};function l(p,g,b,S){return u(f(p,b,S),p.align)}function a(p,g,b,S){const x=c(p,b,S),I=u([x]);return I.slice(0,I.indexOf(`
51
- `))}function s(p,g,b,S){const x=b.enter("tableCell"),I=b.enter("phrasing"),v=b.containerPhrasing(p,{...S,before:o,after:o});return I(),x(),v}function u(p,g){return wc(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(p,g,b){const S=p.children;let x=-1;const I=[],v=g.enter("table");for(;++x<S.length;)I[x]=c(S[x],g,b);return v(),I}function c(p,g,b){const S=p.children;let x=-1;const I=[],v=g.enter("tableRow");for(;++x<S.length;)I[x]=s(S[x],p,g,b);return v(),I}function h(p,g,b){let S=bi.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function uf(){return{exit:{taskListCheckValueChecked:dr,taskListCheckValueUnchecked:dr,paragraph:ff}}}function cf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pf}}}function dr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ff(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function pf(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=bi.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function hf(){return[Vu(),fc(),mc(),tf(),uf()]}function df(e){return{extensions:[Uu(),pc(e),gc(),sf(e),cf()]}}const mf={tokenize:wf,partial:!0},wi={tokenize:Cf,partial:!0},Ci={tokenize:Sf,partial:!0},Si={tokenize:vf,partial:!0},gf={tokenize:Af,partial:!0},vi={name:"wwwAutolink",tokenize:kf,previous:Ii},Ai={name:"protocolAutolink",tokenize:bf,previous:Ei},we={name:"emailAutolink",tokenize:xf,previous:_i},me={};function yf(){return{text:me}}let _e=48;for(;_e<123;)me[_e]=we,_e++,_e===58?_e=65:_e===91&&(_e=97);me[43]=we;me[45]=we;me[46]=we;me[95]=we;me[72]=[we,Ai];me[104]=[we,Ai];me[87]=[we,vi];me[119]=[we,vi];function xf(e,t,n){const r=this;let i,o;return l;function l(c){return!nn(c)||!_i.call(r,r.previous)||wn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return nn(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(gf,f,u)(c):c===45||c===95||ee(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function kf(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Ii.call(r,r.previous)||wn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mf,e.attempt(wi,e.attempt(Ci,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function bf(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Ei.call(r,r.previous)&&!wn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(ne(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||xt(c)||Y(c)||Le(c)||Ct(c)?n(c):e.attempt(wi,e.attempt(Ci,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function wf(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function Cf(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(Si,s,a)(u):u===null||Y(u)||Le(u)||u!==45&&Ct(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function Sf(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Si,t,o)(l):l===null||Y(l)||Le(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function vf(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||Y(a)||Le(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Y(a)||Le(a)?t(a):r(a)}function o(a){return ne(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):ne(a)?(e.consume(a),l):n(a)}}function Af(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ee(o)?n(o):t(o)}}function Ii(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Ei(e){return!ne(e)}function _i(e){return!(e===47||nn(e))}function nn(e){return e===43||e===45||e===46||e===95||ee(e)}function wn(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 If={tokenize:jf,partial:!0};function Ef(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zf,continuation:{tokenize:Lf},exit:Df}},text:{91:{name:"gfmFootnoteCall",tokenize:Pf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_f,resolveTo:Tf}}}}function _f(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=he(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Tf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Pf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||Y(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(he(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Y(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function zf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||Y(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=he(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Y(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),q(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function Lf(e,t,n){return e.check(ot,t,e.attempt(If,t,n))}function Df(e){e.exit("gfmFootnoteDefinition")}function jf(e,t,n){const r=this;return q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Mf(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},h=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],p=a.parser.constructs.insideSpan.null;p&&ae(h,h.length,0,St(p,l.slice(u+1,s),a)),ae(h,h.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ae(l,u-1,s-u+3,h),s=u+h.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return h;function h(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=He(u);if(g===126)return c>1?s(g):(l.consume(g),c++,p);if(c<2&&!n)return s(g);const S=l.exit("strikethroughSequenceTemporary"),x=He(g);return S._open=!x||x===2&&!!b,S._close=!b||b===2&&!!x,a(g)}}}class Ff{constructor(){this.map=[]}add(t,n,r){Rf(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Rf(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 Nf(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Of(){return{flow:{null:{name:"table",tokenize:Bf,resolveAll:Hf}}}}function Bf(e,t,n){const r=this;let i=0,o=0,l;return a;function a(y){let _=r.events.length-1;for(;_>-1;){const z=r.events[_][1].type;if(z==="lineEnding"||z==="linePrefix")_--;else break}const P=_>-1?r.events[_][1].type:null,j=P==="tableHead"||P==="tableRow"?C:s;return j===C&&r.parser.lazy[r.now().line]?n(y):j(y)}function s(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,o+=1),f(y)}function f(y){return y===null?n(y):D(y)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):n(y):H(y)?q(e,f,"whitespace")(y):(o+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||Y(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?h:c)}function h(y){return y===92||y===124?(e.consume(y),c):c(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),l=!1,H(y)?q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):g(y))}function g(y){return y===45||y===58?S(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),b):R(y)}function b(y){return H(y)?q(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),x):y===45?(o+=1,x(y)):y===null||D(y)?F(y):R(y)}function x(y){return y===45?(e.enter("tableDelimiterFiller"),I(y)):R(y)}function I(y){return y===45?(e.consume(y),I):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(y))}function v(y){return H(y)?q(e,F,"whitespace")(y):F(y)}function F(y){return y===124?g(y):y===null||D(y)?!l||i!==o?R(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):R(y)}function R(y){return n(y)}function C(y){return e.enter("tableRow"),O(y)}function O(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),O):y===null||D(y)?(e.exit("tableRow"),t(y)):H(y)?q(e,O,"whitespace")(y):(e.enter("data"),V(y))}function V(y){return y===null||y===124||Y(y)?(e.exit("data"),O(y)):(e.consume(y),y===92?L:V)}function L(y){return y===92||y===124?(e.consume(y),V):V(y)}}function Hf(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const h=new Ff;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(mr(h,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=ht(h,t,o,i,n,c)):l[1]!==0&&(c=ht(h,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&mr(h,t,s,u,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Nf(t.events,n))}return e}function ht(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Be(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Be(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Be(t.events,n[2]),f=Be(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Be(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function mr(e,t,n,r,i){const o=[],l=Be(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Be(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const $f={name:"tasklistCheck",tokenize:Vf};function qf(){return{text:{91:$f}}}function Vf(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return Y(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return D(s)?t(s):H(s)?e.check({tokenize:Uf},t,n)(s):n(s)}}function Uf(e,t,n){return q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Wf(e){return Nr([yf(),Ef(),Mf(e),Of(),qf()])}const Qf={};function Yf(e){const t=this,n=e||Qf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Wf(n)),o.push(hf()),l.push(df(n))}const Xf="_wrapper_v5oy7_1",Jf="_table_v5oy7_8",Gf="_th_v5oy7_14",Kf="_tr_v5oy7_24",Zf="_td_v5oy7_32",Ge={wrapper:Xf,table:Jf,th:Gf,tr:Kf,td:Zf};function Ti({part:e}){return k.jsx("div",{className:Ge.wrapper,children:k.jsxs("table",{className:Ge.table,children:[k.jsx("thead",{children:k.jsx("tr",{children:e.columns.map(t=>k.jsx("th",{className:Ge.th,children:t},t))})}),k.jsx("tbody",{children:e.rows.map((t,n)=>k.jsx("tr",{className:Ge.tr,children:e.columns.map(r=>k.jsx("td",{className:Ge.td,children:String(t[r]??"")},r))},n))})]})})}const ep="_card_q8nsq_1",tp="_header_q8nsq_9",np="_icon_q8nsq_16",rp="_title_q8nsq_23",ip="_description_q8nsq_29",lp="_actions_q8nsq_36",op="_confirm_q8nsq_41",ap="_cancel_q8nsq_57",ve={card:ep,header:tp,icon:np,title:rp,description:ip,actions:lp,confirm:op,cancel:ap};function Pi({part:e,onConfirm:t,onCancel:n}){const r=De(),{proposal:i}=e;return k.jsxs("div",{className:ve.card,children:[k.jsxs("div",{className:ve.header,children:[k.jsx("svg",{className:ve.icon,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{d:"M10 1a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 1zM5.05 3.05a.75.75 0 011.06 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06zm9.9 0a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zM10 6a4 4 0 100 8 4 4 0 000-8zm-9 4a.75.75 0 01.75-.75h1.5a.75.75 0 010 1.5h-1.5A.75.75 0 011 10zm15.75-.75a.75.75 0 000 1.5h1.5a.75.75 0 000-1.5h-1.5zM4.11 14.89a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm11.84 1.06a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 101.06 1.06l1.06-1.06zM10 17.25a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5a.75.75 0 01.75-.75z"})}),k.jsx("span",{className:ve.title,children:i.title})]}),i.description&&k.jsx("p",{className:ve.description,children:i.description}),k.jsxs("div",{className:ve.actions,children:[k.jsx("button",{className:ve.confirm,onClick:()=>t(i.id,i.payload),children:i.confirmLabel??r.proposalConfirm}),k.jsx("button",{className:ve.cancel,onClick:()=>n(i.id),children:i.cancelLabel??r.proposalCancel})]})]})}const sp="_activity_2jjfs_1",up="_indicator_2jjfs_13",cp="_content_2jjfs_36",fp="_title_2jjfs_40",pp="_description_2jjfs_45",Ke={activity:sp,indicator:up,content:cp,title:fp,description:pp};function zi({part:e}){return k.jsxs("div",{className:Ke.activity,"data-status":e.status,children:[k.jsx("span",{className:Ke.indicator,"aria-hidden":"true"}),k.jsxs("div",{className:Ke.content,children:[k.jsx("div",{className:Ke.title,children:e.title}),e.description&&k.jsx("div",{className:Ke.description,children:e.description})]})]})}const hp="_markdown_187bn_1",dp="_errorText_187bn_83",mp="_errorIcon_187bn_91",Vt={markdown:hp,errorText:dp,errorIcon:mp};function Li({part:e,onProposalConfirm:t,onProposalCancel:n}){switch(e.type){case"text":return k.jsx("div",{className:Vt.markdown,children:k.jsx(ju,{remarkPlugins:[Yf],children:e.text})});case"table":return k.jsx(Ti,{part:e});case"activity":return k.jsx(zi,{part:e});case"proposal":return k.jsx(Pi,{part:e,onConfirm:t,onCancel:n});case"error":return k.jsxs("span",{className:Vt.errorText,children:[k.jsx(Cl,{className:Vt.errorIcon}),e.message]})}}const gp="_wrapper_13l1e_1",yp="_user_13l1e_8",xp="_assistant_13l1e_12",kp="_avatar_13l1e_16",bp="_bubble_13l1e_39",wp="_empty_13l1e_61",Te={wrapper:gp,user:yp,assistant:xp,avatar:kp,bubble:bp,empty:wp};function Di({message:e,onProposalConfirm:t,onProposalCancel:n,assistantIcon:r}){const i=De(),o=e.role==="user";return k.jsxs("div",{className:`${Te.wrapper} ${o?Te.user:Te.assistant}`,children:[!o&&k.jsx("div",{className:Te.avatar,"aria-hidden":"true",children:r??k.jsx(Cr,{})}),k.jsxs("div",{className:Te.bubble,children:[e.parts.map((l,a)=>k.jsx(Li,{part:l,onProposalConfirm:t,onProposalCancel:n},a)),e.parts.length===0&&k.jsx("span",{className:Te.empty})]}),o&&k.jsx("div",{className:Te.avatar,children:i.userLabel})]})}const Cp="_wrapper_1dvvu_1",Sp="_dot_1dvvu_8",vp="_connectingLabel_1dvvu_19",Ze={wrapper:Cp,dot:Sp,connectingLabel:vp};function ji({connecting:e=!1}){const t=De();return k.jsxs("div",{className:Ze.wrapper,"aria-label":e?t.connectingMessage:t.typingMessage,children:[k.jsx("span",{className:Ze.dot}),k.jsx("span",{className:Ze.dot}),k.jsx("span",{className:Ze.dot}),e&&k.jsx("span",{className:Ze.connectingLabel,children:t.connectingMessage})]})}const Ap="_list_1f8gn_1",Ip="_empty_1f8gn_11",Ep="_hint_1f8gn_24",_p="_typing_1f8gn_31",dt={list:Ap,empty:Ip,hint:Ep,typing:_p};function Mi({messages:e,isLoading:t,isConnecting:n,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o}){const l=De(),a=X.useRef(null);return X.useEffect(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e,t]),k.jsxs("div",{className:dt.list,children:[e.length===0&&k.jsxs("div",{className:dt.empty,children:[k.jsx("p",{children:l.emptyStateText}),k.jsx("p",{className:dt.hint,children:k.jsx("em",{children:l.emptyStateHint})})]}),e.map(s=>k.jsx(Di,{message:s,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o},s.id)),t&&k.jsx("div",{className:dt.typing,children:k.jsx(ji,{connecting:n})}),k.jsx("div",{ref:a})]})}const Tp="_wrapper_v8iyr_1",Pp="_textarea_v8iyr_11",zp="_toolbar_v8iyr_35",Lp="_actions_v8iyr_45",Dp="_actionBtn_v8iyr_52",jp="_sendBtn_v8iyr_85",Mp="_spinnerIcon_v8iyr_116",Fp="_stopBtn_v8iyr_126",Rp="_stopIcon_v8iyr_149",be={wrapper:Tp,textarea:Pp,toolbar:zp,actions:Lp,actionBtn:Dp,sendBtn:jp,spinnerIcon:Mp,stopBtn:Fp,stopIcon:Rp};function Fi({value:e,onChange:t,onSend:n,onStop:r,isLoading:i,placeholder:o,actions:l,sendIcon:a}){const s=De(),u=[{icon:k.jsx(ml,{}),label:s.actionAddFile},{icon:k.jsx(gl,{}),label:s.actionQuickActions},{icon:k.jsx(yl,{}),label:s.actionNew},{icon:k.jsx(xl,{}),label:s.actionHistory},{icon:k.jsx(kl,{}),label:s.actionRules}],f=l??u,c=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),n())};return k.jsxs("div",{className:be.wrapper,children:[k.jsx("textarea",{className:be.textarea,value:e,onChange:h=>t(h.target.value),onKeyDown:c,placeholder:o??s.inputPlaceholder,rows:3,disabled:i,"aria-label":s.sendMessage}),k.jsxs("div",{className:be.toolbar,children:[f.length>0&&k.jsx("div",{className:be.actions,children:f.map((h,p)=>k.jsxs("button",{className:be.actionBtn,type:"button",disabled:i,"aria-label":h.label,onClick:h.onClick,children:[h.icon,k.jsx("span",{children:h.label})]},p))}),i&&r?k.jsxs("button",{className:be.stopBtn,onClick:r,"aria-label":s.stopMessage,type:"button",children:[k.jsx("svg",{className:be.stopIcon,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:k.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),k.jsx("span",{children:s.stopMessage})]}):k.jsxs("button",{className:be.sendBtn,onClick:n,disabled:i||!e.trim(),"aria-label":s.sendMessage,type:"button",children:[i?k.jsx("svg",{className:be.spinnerIcon,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:k.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"12"})}):a??k.jsx(dl,{}),k.jsx("span",{children:s.sendMessage})]})]})]})}const Np="_wrapper_1kefv_1",Op="_icon_1kefv_14",Bp="_message_1kefv_20",Hp="_dismiss_1kefv_24",mt={wrapper:Np,icon:Op,message:Bp,dismiss:Hp};function Ri({message:e,onDismiss:t}){const n=De();return k.jsxs("div",{className:mt.wrapper,role:"alert",children:[k.jsx("svg",{className:mt.icon,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),k.jsx("span",{className:mt.message,children:e}),t&&k.jsx("button",{className:mt.dismiss,onClick:t,"aria-label":n.errorDismiss,children:k.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})})})]})}const $p="_chat_1acbe_1",qp={chat:$p};function Vp({messages:e,input:t,isLoading:n,isConnecting:r,error:i,onInputChange:o,onSend:l,onStop:a,onProposalConfirm:s,onProposalCancel:u,placeholder:f,assistantIcon:c,actions:h,sendIcon:p,className:g,style:b}){return k.jsxs("div",{className:[qp.chat,g].filter(Boolean).join(" "),style:b,children:[k.jsx(Mi,{messages:e,isLoading:n,isConnecting:r,onProposalConfirm:s,onProposalCancel:u,assistantIcon:c}),i&&k.jsx(Ri,{message:i}),k.jsx(Fi,{value:t,onChange:o,onSend:l,onStop:a,isLoading:n,placeholder:f,actions:h,sendIcon:p})]})}const Up="_header_f9hy1_1",Wp="_left_f9hy1_12",Qp="_icon_f9hy1_18",Yp="_title_f9hy1_23",Xp="_resetBtn_f9hy1_29",Jp="_actions_f9hy1_50",Oe={header:Up,left:Wp,icon:Qp,title:Yp,resetBtn:Xp,actions:Jp};function Gp({title:e,onMinimize:t,isMinimized:n,icon:r}){const i=De();return k.jsxs("div",{className:Oe.header,children:[k.jsxs("div",{className:Oe.left,children:[k.jsx("span",{className:Oe.icon,"aria-hidden":"true",children:r??k.jsx(Cr,{})}),k.jsx("span",{className:Oe.title,children:e??i.sidebarTitle})]}),t&&k.jsx("div",{className:Oe.actions,children:k.jsx("button",{className:Oe.resetBtn,onClick:t,title:n?i.expandSidebar:i.minimizeSidebar,"aria-label":n?i.expandSidebar:i.minimizeSidebar,children:n?k.jsx(wl,{}):k.jsx(bl,{})})})]})}const Kp="_sidebar_17ski_1",Zp="_minimized_17ski_20",gr={sidebar:Kp,minimized:Zp};function eh({title:e,icon:t,actions:n,sendIcon:r,height:i="60vh",className:o,style:l}){const[a,s]=X.useState(!1),{messages:u,input:f,setInput:c,sendMessage:h,stop:p,isLoading:g,isConnecting:b,error:S,confirmProposal:x,cancelProposal:I}=wr();return k.jsxs("aside",{className:[gr.sidebar,a?gr.minimized:"",o].filter(Boolean).join(" "),style:{height:a?void 0:i,...l},children:[k.jsx(Gp,{title:e,icon:t,onMinimize:()=>s(v=>!v),isMinimized:a}),!a&&k.jsx(Vp,{messages:u,input:f,isLoading:g,isConnecting:b,error:S,onInputChange:c,onSend:h,onStop:p,onProposalConfirm:x,onProposalCancel:I,assistantIcon:t,actions:n,sendIcon:r})]})}exports.AiActivityPart=zi;exports.AiChatProvider=pl;exports.AiError=Ri;exports.AiInput=Fi;exports.AiMessageBubble=Di;exports.AiMessageList=Mi;exports.AiMessagePartRenderer=Li;exports.AiProposalCard=Pi;exports.AiSidebar=eh;exports.AiTablePart=Ti;exports.AiTypingIndicator=ji;exports.JuneauProvider=cl;exports.consumeStream=Ut;exports.createFetchStreamAdapter=il;exports.createSseAdapter=tl;exports.delay=G;exports.getMessageText=Qi;exports.juneauCs=hl;exports.juneauEn=yt;exports.mockAdapter=Yi;exports.useAiChat=xr;exports.useAiChatContext=wr;
51
+ `))}function s(p,g,b,S){const x=b.enter("tableCell"),I=b.enter("phrasing"),v=b.containerPhrasing(p,{...S,before:o,after:o});return I(),x(),v}function u(p,g){return Cc(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(p,g,b){const S=p.children;let x=-1;const I=[],v=g.enter("table");for(;++x<S.length;)I[x]=c(S[x],g,b);return v(),I}function c(p,g,b){const S=p.children;let x=-1;const I=[],v=g.enter("tableRow");for(;++x<S.length;)I[x]=s(S[x],p,g,b);return v(),I}function h(p,g,b){let S=wi.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function cf(){return{exit:{taskListCheckValueChecked:mr,taskListCheckValueUnchecked:mr,paragraph:pf}}}function ff(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hf}}}function mr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function pf(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function hf(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=wi.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function df(){return[Uu(),pc(),gc(),nf(),cf()]}function mf(e){return{extensions:[Wu(),hc(e),yc(),uf(e),ff()]}}const gf={tokenize:Cf,partial:!0},Ci={tokenize:Sf,partial:!0},Si={tokenize:vf,partial:!0},vi={tokenize:Af,partial:!0},yf={tokenize:If,partial:!0},Ai={name:"wwwAutolink",tokenize:bf,previous:Ei},Ii={name:"protocolAutolink",tokenize:wf,previous:_i},we={name:"emailAutolink",tokenize:kf,previous:Ti},me={};function xf(){return{text:me}}let _e=48;for(;_e<123;)me[_e]=we,_e++,_e===58?_e=65:_e===91&&(_e=97);me[43]=we;me[45]=we;me[46]=we;me[95]=we;me[72]=[we,Ii];me[104]=[we,Ii];me[87]=[we,Ai];me[119]=[we,Ai];function kf(e,t,n){const r=this;let i,o;return l;function l(c){return!nn(c)||!Ti.call(r,r.previous)||wn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return nn(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(yf,f,u)(c):c===45||c===95||ee(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function bf(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Ei.call(r,r.previous)||wn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gf,e.attempt(Ci,e.attempt(Si,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function wf(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&_i.call(r,r.previous)&&!wn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(ne(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||xt(c)||Y(c)||Le(c)||Ct(c)?n(c):e.attempt(Ci,e.attempt(Si,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Cf(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function Sf(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(vi,s,a)(u):u===null||Y(u)||Le(u)||u!==45&&Ct(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function vf(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(vi,t,o)(l):l===null||Y(l)||Le(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Af(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||Y(a)||Le(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Y(a)||Le(a)?t(a):r(a)}function o(a){return ne(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):ne(a)?(e.consume(a),l):n(a)}}function If(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ee(o)?n(o):t(o)}}function Ei(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function _i(e){return!ne(e)}function Ti(e){return!(e===47||nn(e))}function nn(e){return e===43||e===45||e===46||e===95||ee(e)}function wn(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 Ef={tokenize:Mf,partial:!0};function _f(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Lf,continuation:{tokenize:Df},exit:jf}},text:{91:{name:"gfmFootnoteCall",tokenize:zf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Tf,resolveTo:Pf}}}}function Tf(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=he(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Pf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function zf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||Y(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(he(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Y(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Lf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||Y(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=he(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Y(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),q(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function Df(e,t,n){return e.check(ot,t,e.attempt(Ef,t,n))}function jf(e){e.exit("gfmFootnoteDefinition")}function Mf(e,t,n){const r=this;return q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Ff(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},h=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],p=a.parser.constructs.insideSpan.null;p&&ae(h,h.length,0,St(p,l.slice(u+1,s),a)),ae(h,h.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ae(l,u-1,s-u+3,h),s=u+h.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return h;function h(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=He(u);if(g===126)return c>1?s(g):(l.consume(g),c++,p);if(c<2&&!n)return s(g);const S=l.exit("strikethroughSequenceTemporary"),x=He(g);return S._open=!x||x===2&&!!b,S._close=!b||b===2&&!!x,a(g)}}}class Rf{constructor(){this.map=[]}add(t,n,r){Nf(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Nf(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 Of(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Bf(){return{flow:{null:{name:"table",tokenize:Hf,resolveAll:$f}}}}function Hf(e,t,n){const r=this;let i=0,o=0,l;return a;function a(y){let _=r.events.length-1;for(;_>-1;){const z=r.events[_][1].type;if(z==="lineEnding"||z==="linePrefix")_--;else break}const P=_>-1?r.events[_][1].type:null,j=P==="tableHead"||P==="tableRow"?C:s;return j===C&&r.parser.lazy[r.now().line]?n(y):j(y)}function s(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,o+=1),f(y)}function f(y){return y===null?n(y):D(y)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):n(y):H(y)?q(e,f,"whitespace")(y):(o+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||Y(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?h:c)}function h(y){return y===92||y===124?(e.consume(y),c):c(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),l=!1,H(y)?q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):g(y))}function g(y){return y===45||y===58?S(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),b):R(y)}function b(y){return H(y)?q(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),x):y===45?(o+=1,x(y)):y===null||D(y)?F(y):R(y)}function x(y){return y===45?(e.enter("tableDelimiterFiller"),I(y)):R(y)}function I(y){return y===45?(e.consume(y),I):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(y))}function v(y){return H(y)?q(e,F,"whitespace")(y):F(y)}function F(y){return y===124?g(y):y===null||D(y)?!l||i!==o?R(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):R(y)}function R(y){return n(y)}function C(y){return e.enter("tableRow"),O(y)}function O(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),O):y===null||D(y)?(e.exit("tableRow"),t(y)):H(y)?q(e,O,"whitespace")(y):(e.enter("data"),V(y))}function V(y){return y===null||y===124||Y(y)?(e.exit("data"),O(y)):(e.consume(y),y===92?L:V)}function L(y){return y===92||y===124?(e.consume(y),V):V(y)}}function $f(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const h=new Rf;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(gr(h,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=ht(h,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=ht(h,t,o,i,n,c)):l[1]!==0&&(c=ht(h,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&gr(h,t,s,u,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Of(t.events,n))}return e}function ht(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Be(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Be(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Be(t.events,n[2]),f=Be(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Be(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function gr(e,t,n,r,i){const o=[],l=Be(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Be(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const qf={name:"tasklistCheck",tokenize:Uf};function Vf(){return{text:{91:qf}}}function Uf(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return Y(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return D(s)?t(s):H(s)?e.check({tokenize:Wf},t,n)(s):n(s)}}function Wf(e,t,n){return q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Qf(e){return Or([xf(),_f(),Ff(e),Bf(),Vf()])}const Yf={};function Xf(e){const t=this,n=e||Yf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Qf(n)),o.push(df()),l.push(mf(n))}const Jf="_wrapper_v5oy7_1",Gf="_table_v5oy7_8",Kf="_th_v5oy7_14",Zf="_tr_v5oy7_24",ep="_td_v5oy7_32",Ge={wrapper:Jf,table:Gf,th:Kf,tr:Zf,td:ep};function Pi({part:e}){return k.jsx("div",{className:Ge.wrapper,children:k.jsxs("table",{className:Ge.table,children:[k.jsx("thead",{children:k.jsx("tr",{children:e.columns.map(t=>k.jsx("th",{className:Ge.th,children:t},t))})}),k.jsx("tbody",{children:e.rows.map((t,n)=>k.jsx("tr",{className:Ge.tr,children:e.columns.map(r=>k.jsx("td",{className:Ge.td,children:String(t[r]??"")},r))},n))})]})})}const tp="_card_q8nsq_1",np="_header_q8nsq_9",rp="_icon_q8nsq_16",ip="_title_q8nsq_23",lp="_description_q8nsq_29",op="_actions_q8nsq_36",ap="_confirm_q8nsq_41",sp="_cancel_q8nsq_57",ve={card:tp,header:np,icon:rp,title:ip,description:lp,actions:op,confirm:ap,cancel:sp};function zi({part:e,onConfirm:t,onCancel:n}){const r=De(),{proposal:i}=e;return k.jsxs("div",{className:ve.card,children:[k.jsxs("div",{className:ve.header,children:[k.jsx("svg",{className:ve.icon,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{d:"M10 1a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 1zM5.05 3.05a.75.75 0 011.06 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06zm9.9 0a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zM10 6a4 4 0 100 8 4 4 0 000-8zm-9 4a.75.75 0 01.75-.75h1.5a.75.75 0 010 1.5h-1.5A.75.75 0 011 10zm15.75-.75a.75.75 0 000 1.5h1.5a.75.75 0 000-1.5h-1.5zM4.11 14.89a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm11.84 1.06a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 101.06 1.06l1.06-1.06zM10 17.25a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5a.75.75 0 01.75-.75z"})}),k.jsx("span",{className:ve.title,children:i.title})]}),i.description&&k.jsx("p",{className:ve.description,children:i.description}),k.jsxs("div",{className:ve.actions,children:[k.jsx("button",{className:ve.confirm,onClick:()=>t(i.id,i.payload),children:i.confirmLabel??r.proposalConfirm}),k.jsx("button",{className:ve.cancel,onClick:()=>n(i.id),children:i.cancelLabel??r.proposalCancel})]})]})}const up="_activity_2jjfs_1",cp="_indicator_2jjfs_13",fp="_content_2jjfs_36",pp="_title_2jjfs_40",hp="_description_2jjfs_45",Ke={activity:up,indicator:cp,content:fp,title:pp,description:hp};function Li({part:e}){return k.jsxs("div",{className:Ke.activity,"data-status":e.status,children:[k.jsx("span",{className:Ke.indicator,"aria-hidden":"true"}),k.jsxs("div",{className:Ke.content,children:[k.jsx("div",{className:Ke.title,children:e.title}),e.description&&k.jsx("div",{className:Ke.description,children:e.description})]})]})}const dp="_markdown_187bn_1",mp="_errorText_187bn_83",gp="_errorIcon_187bn_91",Vt={markdown:dp,errorText:mp,errorIcon:gp};function Di({part:e,onProposalConfirm:t,onProposalCancel:n}){switch(e.type){case"text":return k.jsx("div",{className:Vt.markdown,children:k.jsx(Mu,{remarkPlugins:[Xf],children:e.text})});case"table":return k.jsx(Pi,{part:e});case"activity":return k.jsx(Li,{part:e});case"proposal":return k.jsx(zi,{part:e,onConfirm:t,onCancel:n});case"error":return k.jsxs("span",{className:Vt.errorText,children:[k.jsx(Sl,{className:Vt.errorIcon}),e.message]})}}const yp="_wrapper_13l1e_1",xp="_user_13l1e_8",kp="_assistant_13l1e_12",bp="_avatar_13l1e_16",wp="_bubble_13l1e_39",Cp="_empty_13l1e_61",Te={wrapper:yp,user:xp,assistant:kp,avatar:bp,bubble:wp,empty:Cp};function ji({message:e,onProposalConfirm:t,onProposalCancel:n,assistantIcon:r}){const i=De(),o=e.role==="user";return k.jsxs("div",{className:`${Te.wrapper} ${o?Te.user:Te.assistant}`,children:[!o&&k.jsx("div",{className:Te.avatar,"aria-hidden":"true",children:r??k.jsx(Sr,{})}),k.jsxs("div",{className:Te.bubble,children:[e.parts.map((l,a)=>k.jsx(Di,{part:l,onProposalConfirm:t,onProposalCancel:n},a)),e.parts.length===0&&k.jsx("span",{className:Te.empty})]}),o&&k.jsx("div",{className:Te.avatar,children:i.userLabel})]})}const Sp="_wrapper_1dvvu_1",vp="_dot_1dvvu_8",Ap="_connectingLabel_1dvvu_19",Ze={wrapper:Sp,dot:vp,connectingLabel:Ap};function Mi({connecting:e=!1}){const t=De();return k.jsxs("div",{className:Ze.wrapper,"aria-label":e?t.connectingMessage:t.typingMessage,children:[k.jsx("span",{className:Ze.dot}),k.jsx("span",{className:Ze.dot}),k.jsx("span",{className:Ze.dot}),e&&k.jsx("span",{className:Ze.connectingLabel,children:t.connectingMessage})]})}const Ip="_list_1f8gn_1",Ep="_empty_1f8gn_11",_p="_hint_1f8gn_24",Tp="_typing_1f8gn_31",dt={list:Ip,empty:Ep,hint:_p,typing:Tp};function Fi({messages:e,isLoading:t,isConnecting:n,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o}){const l=De(),a=X.useRef(null);return X.useEffect(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e,t]),k.jsxs("div",{className:dt.list,children:[e.length===0&&k.jsxs("div",{className:dt.empty,children:[k.jsx("p",{children:l.emptyStateText}),k.jsx("p",{className:dt.hint,children:k.jsx("em",{children:l.emptyStateHint})})]}),e.map(s=>k.jsx(ji,{message:s,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o},s.id)),t&&k.jsx("div",{className:dt.typing,children:k.jsx(Mi,{connecting:n})}),k.jsx("div",{ref:a})]})}const Pp="_wrapper_v8iyr_1",zp="_textarea_v8iyr_11",Lp="_toolbar_v8iyr_35",Dp="_actions_v8iyr_45",jp="_actionBtn_v8iyr_52",Mp="_sendBtn_v8iyr_85",Fp="_spinnerIcon_v8iyr_116",Rp="_stopBtn_v8iyr_126",Np="_stopIcon_v8iyr_149",be={wrapper:Pp,textarea:zp,toolbar:Lp,actions:Dp,actionBtn:jp,sendBtn:Mp,spinnerIcon:Fp,stopBtn:Rp,stopIcon:Np};function Ri({value:e,onChange:t,onSend:n,onStop:r,isLoading:i,placeholder:o,actions:l,sendIcon:a}){const s=De(),u=[{icon:k.jsx(gl,{}),label:s.actionAddFile},{icon:k.jsx(yl,{}),label:s.actionQuickActions},{icon:k.jsx(xl,{}),label:s.actionNew},{icon:k.jsx(kl,{}),label:s.actionHistory},{icon:k.jsx(bl,{}),label:s.actionRules}],f=l??u,c=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),n())};return k.jsxs("div",{className:be.wrapper,children:[k.jsx("textarea",{className:be.textarea,value:e,onChange:h=>t(h.target.value),onKeyDown:c,placeholder:o??s.inputPlaceholder,rows:3,disabled:i,"aria-label":s.sendMessage}),k.jsxs("div",{className:be.toolbar,children:[f.length>0&&k.jsx("div",{className:be.actions,children:f.map((h,p)=>k.jsxs("button",{className:be.actionBtn,type:"button",disabled:i,"aria-label":h.label,onClick:h.onClick,children:[h.icon,k.jsx("span",{children:h.label})]},p))}),i&&r?k.jsxs("button",{className:be.stopBtn,onClick:r,"aria-label":s.stopMessage,type:"button",children:[k.jsx("svg",{className:be.stopIcon,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:k.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),k.jsx("span",{children:s.stopMessage})]}):k.jsxs("button",{className:be.sendBtn,onClick:n,disabled:i||!e.trim(),"aria-label":s.sendMessage,type:"button",children:[i?k.jsx("svg",{className:be.spinnerIcon,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:k.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"12"})}):a??k.jsx(ml,{}),k.jsx("span",{children:s.sendMessage})]})]})]})}const Op="_wrapper_1kefv_1",Bp="_icon_1kefv_14",Hp="_message_1kefv_20",$p="_dismiss_1kefv_24",mt={wrapper:Op,icon:Bp,message:Hp,dismiss:$p};function Ni({message:e,onDismiss:t}){const n=De();return k.jsxs("div",{className:mt.wrapper,role:"alert",children:[k.jsx("svg",{className:mt.icon,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),k.jsx("span",{className:mt.message,children:e}),t&&k.jsx("button",{className:mt.dismiss,onClick:t,"aria-label":n.errorDismiss,children:k.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:k.jsx("path",{d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})})})]})}const qp="_chat_1acbe_1",Vp={chat:qp};function Up({messages:e,input:t,isLoading:n,isConnecting:r,error:i,onInputChange:o,onSend:l,onStop:a,onProposalConfirm:s,onProposalCancel:u,placeholder:f,assistantIcon:c,actions:h,sendIcon:p,className:g,style:b}){return k.jsxs("div",{className:[Vp.chat,g].filter(Boolean).join(" "),style:b,children:[k.jsx(Fi,{messages:e,isLoading:n,isConnecting:r,onProposalConfirm:s,onProposalCancel:u,assistantIcon:c}),i&&k.jsx(Ni,{message:i}),k.jsx(Ri,{value:t,onChange:o,onSend:l,onStop:a,isLoading:n,placeholder:f,actions:h,sendIcon:p})]})}const Wp="_header_f9hy1_1",Qp="_left_f9hy1_12",Yp="_icon_f9hy1_18",Xp="_title_f9hy1_23",Jp="_resetBtn_f9hy1_29",Gp="_actions_f9hy1_50",Oe={header:Wp,left:Qp,icon:Yp,title:Xp,resetBtn:Jp,actions:Gp};function Kp({title:e,onMinimize:t,isMinimized:n,icon:r}){const i=De();return k.jsxs("div",{className:Oe.header,children:[k.jsxs("div",{className:Oe.left,children:[k.jsx("span",{className:Oe.icon,"aria-hidden":"true",children:r??k.jsx(Sr,{})}),k.jsx("span",{className:Oe.title,children:e??i.sidebarTitle})]}),t&&k.jsx("div",{className:Oe.actions,children:k.jsx("button",{className:Oe.resetBtn,onClick:t,title:n?i.expandSidebar:i.minimizeSidebar,"aria-label":n?i.expandSidebar:i.minimizeSidebar,children:n?k.jsx(Cl,{}):k.jsx(wl,{})})})]})}const Zp="_sidebar_17ski_1",eh="_minimized_17ski_20",yr={sidebar:Zp,minimized:eh};function th({title:e,icon:t,actions:n,sendIcon:r,height:i="60vh",className:o,style:l}){const[a,s]=X.useState(!1),{messages:u,input:f,setInput:c,sendMessage:h,stop:p,isLoading:g,isConnecting:b,error:S,confirmProposal:x,cancelProposal:I}=Cr();return k.jsxs("aside",{className:[yr.sidebar,a?yr.minimized:"",o].filter(Boolean).join(" "),style:{height:a?void 0:i,...l},children:[k.jsx(Kp,{title:e,icon:t,onMinimize:()=>s(v=>!v),isMinimized:a}),!a&&k.jsx(Up,{messages:u,input:f,isLoading:g,isConnecting:b,error:S,onInputChange:c,onSend:h,onStop:p,onProposalConfirm:x,onProposalCancel:I,assistantIcon:t,actions:n,sendIcon:r})]})}exports.AiActivityPart=Li;exports.AiChatProvider=hl;exports.AiError=Ni;exports.AiInput=Ri;exports.AiMessageBubble=ji;exports.AiMessageList=Fi;exports.AiMessagePartRenderer=Di;exports.AiProposalCard=zi;exports.AiSidebar=th;exports.AiTablePart=Pi;exports.AiTypingIndicator=Mi;exports.JuneauProvider=fl;exports.consumeStream=Ut;exports.createFetchStreamAdapter=ll;exports.createSseAdapter=nl;exports.delay=G;exports.getMessageText=Yi;exports.juneauCs=dl;exports.juneauEn=yt;exports.mockAdapter=Xi;exports.useAiChat=kr;exports.useAiChatContext=Cr;
52
52
  //# sourceMappingURL=index.cjs.map