juneau 0.6.0 → 0.6.1
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 +16 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/types.d.ts +3 -2
- package/dist/server/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),k=require("react/jsx-runtime");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),k=require("react/jsx-runtime");function Sr(e){return e.map(n=>n.role!=="assistant"||n.parts.some(t=>t.type==="text")?n:{...n,parts:[{type:"text",text:""}]})}const Z=e=>new Promise(n=>setTimeout(n,e));function vr(e){return e.parts.filter(n=>n.type==="text").map(n=>n.text).join("")}async function Wt(e,n,t){for await(const r of e)if(t?.aborted||(n(r),r.type==="done"||r.type==="error"))break}function ln(e){return e.type==="proposal"}const tl=1;function nl(e){return e.map(n=>({...n,v:tl,createdAt:n.createdAt.toISOString(),parts:n.parts.filter(t=>!(t.type==="activity"&&t.status==="running")).map(rl)}))}function rl(e){return ln(e)&&!e.proposal.resolved?{...e,proposal:{...e.proposal,resolved:"expired"}}:e}function il(e){return e.map(({v:n,...t})=>({...t,createdAt:new Date(t.createdAt)}))}function Ar(e,n){if(n<=0||e.length<=n)return e;let t=e.length-n;for(;t<e.length&&e[t].role==="assistant";)t++;return e.slice(t)}function ll(e,n){return n<=0||e.length<=n?[...e].sort(Pn):[...e].sort(Pn).slice(0,n)}const Pn=(e,n)=>n.updatedAt.getTime()-e.updatedAt.getTime(),ol={async*sendMessage(e){const n=[...e.messages].reverse().find(r=>r.role==="user"),t=n?vr(n).toLowerCase():"";t.includes("activity")||t.includes("progress")||t.includes("document")||t.includes("dokument")?yield*al():t.includes("table")||t.includes("data")||t.includes("list")||t.includes("show")?yield*sl():t.includes("proposal")||t.includes("suggest")||t.includes("recommend")?yield*ul():t.includes("help")||t.includes("what can")||t.includes("how do")?yield*cl():t.includes("error")||t.includes("fail")||t.includes("break")?yield*fl():yield*pl(t)}};async function*al(){yield{type:"part",part:{type:"activity",id:"select-skill",title:"Selecting skill",description:"Looking for the best skill for this request.",status:"running"}},await Z(700),yield{type:"part",part:{type:"activity",id:"select-skill",title:"Skill selected",description:"Using Document Search.",status:"done"}},await Z(300),yield{type:"part",part:{type:"activity",id:"search-document",title:"Searching document",description:"Looking up document by ID.",status:"running"}},await Z(900),yield{type:"part",part:{type:"activity",id:"search-document",title:"Document found",description:"Found document INV-2024-0894.",status:"done"}},await Z(300),yield*re(`
|
|
2
2
|
Found document **INV-2024-0894** from **DataSys a.s.** for **CZK 390 000**.`,25),yield{type:"done"}}async function*sl(){yield*re(`Here is a summary of the data you requested:
|
|
3
3
|
|
|
4
4
|
`,30),await Z(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 Z(300),yield*re(`
|
|
@@ -18,35 +18,35 @@ Try asking: *"Show me the data"* or *"Can you suggest something?"*`,25),yield{ty
|
|
|
18
18
|
`,22),await Z(150),yield*re(`- Say **"suggest"**, **"recommend"**, or **"proposal"** → renders a proposal card
|
|
19
19
|
`,22),await Z(150),yield*re(`- Say **"help"** or **"what can you do"** → shows capabilities
|
|
20
20
|
`,22),await Z(150),yield*re(`- Say **"error"** or **"fail"** → simulates an error response
|
|
21
|
-
`,22),yield{type:"done"}}async function*re(e,n){for(let r=0;r<e.length;r+=3)yield{type:"text",text:e.slice(r,r+3)},await Z(n)}function
|
|
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=n(f);for(const h of c)if(yield h,h.type==="done"||h.type==="error")return}}}}finally{t.releaseLock()}yield{type:"done"}}const ml=e=>{if(!e||e==="[DONE]")return[];const n=
|
|
23
|
-
`);i=a.pop()??"";for(const s of a){const u=s.trim();if(!u)continue;const f=n(u);for(const c of f)if(yield c,c.type==="done"||c.type==="error")return}}if(i.trim()){const o=n(i.trim());for(const l of o)if(yield l,l.type==="done"||l.type==="error")return}}finally{t.releaseLock()}yield{type:"done"}}const xl=e=>{const n=Ar(e);return n.length>0?n:e?[{type:"text",text:e}]:[]};let kl=0;const ct=()=>`msg-${++kl}-${Date.now()}`,Pn=Cr;function _r({adapter:e,context:n,onProposalConfirm:t,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l}){const[a,s]=$.useState(i??[]),[u,f]=$.useState(""),[c,h]=$.useState(!1),[p,g]=$.useState(!1),[C,S]=$.useState(null),y=$.useRef(null),E=$.useRef(!1),A=$.useRef(l);$.useEffect(()=>{A.current=l}),$.useEffect(()=>{!E.current||c||(E.current=!1,A.current?.(a))},[a,c]);const L=$.useCallback(v=>{s(M=>{const O=M[M.length-1];if(!O||O.role!=="assistant")return M;if(v.type==="activity"&&v.id){const Y=[...O.parts],Q=Y.findIndex(d=>d.type==="activity"&&d.id===v.id);if(Q!==-1)return Y[Q]=v,[...M.slice(0,-1),{...O,parts:Y}]}return[...M.slice(0,-1),{...O,parts:[...O.parts,v]}]})},[]),D=$.useCallback(v=>{s(M=>{const O=M[M.length-1];if(!O||O.role!=="assistant")return M;const Y=[...O.parts],Q=Y[Y.length-1];return Q?.type==="text"?Y[Y.length-1]={type:"text",text:Q.text+v}:Y.push({type:"text",text:v}),[...M.slice(0,-1),{...O,parts:Y}]})},[]),b=$.useCallback(async(v,M)=>{S(null);const O={id:ct(),role:"user",parts:[{type:"text",text:v}],createdAt:new Date},Y=ct();let Q=!1;const d=()=>{if(Q)return;Q=!0;const ee={id:Y,role:"assistant",parts:[],createdAt:new Date};s(m=>[...m,ee])};s(ee=>[...ee,O]),h(!0),g(!0),y.current?.abort();const ae=new AbortController;y.current=ae;try{const ee=vr([...M,O],o??Number.POSITIVE_INFINITY),m=e.sendMessage({messages:Pn(ee),context:n});await Wt(m,te=>{switch(g(!1),te.type){case"text":d(),D(te.text);break;case"part":d(),L(te.part);break;case"error":d(),L({type:"error",message:te.message}),S(te.message);break;case"done":break}},ae.signal)}catch(ee){const m=ee instanceof Error?ee.message:"Unknown error occurred";S(m),d(),L({type:"error",message:m})}finally{E.current=!0,h(!1),g(!1)}},[e,n,o,D,L]),N=$.useCallback(async()=>{const v=u.trim();!v||c||(f(""),await b(v,a))},[u,c,a,b]),U=$.useCallback(async v=>{!v.trim()||c||await b(v,a)},[c,a,b]),H=$.useCallback(async v=>{if(c)return;S(null),h(!0),g(!0);const M={id:ct(),role:"assistant",parts:[],createdAt:new Date};s(Q=>[...Q,M]),y.current?.abort();const O=new AbortController;y.current=O;const Y={id:ct(),role:"system",parts:[{type:"text",text:v}],createdAt:new Date};try{const Q=e.sendMessage({messages:Pn([Y]),context:n});await Wt(Q,d=>{switch(g(!1),d.type){case"text":D(d.text);break;case"part":L(d.part);break;case"error":L({type:"error",message:d.message}),S(d.message);break;case"done":break}},O.signal)}catch(Q){const d=Q instanceof Error?Q.message:"Unknown error occurred";S(d),L({type:"error",message:d})}finally{E.current=!0,h(!1),g(!1)}},[c,e,n,D,L]),x=$.useCallback(()=>{y.current?.abort(),h(!1),g(!1)},[]),T=$.useCallback(v=>{y.current?.abort(),E.current=!0,s(v??[]),f(""),S(null),h(!1),g(!1)},[]),z=$.useCallback((v,M)=>{E.current=!0,s(O=>O.map(Y=>({...Y,parts:Y.parts.map(Q=>ln(Q)&&Q.proposal.id===v?{...Q,proposal:{...Q.proposal,resolved:M}}:Q)})))},[]),W=$.useCallback((v,M)=>{z(v,"confirmed"),t?.(v,M)},[t,z]),P=$.useCallback(v=>{z(v,"cancelled"),r?.(v)},[r,z]);return $.useMemo(()=>({messages:a,input:u,setInput:f,sendMessage:N,sendMessageWithText:U,sendGreeting:H,stop:x,isLoading:c,isConnecting:p,error:C,reset:T,confirmProposal:W,cancelProposal:P}),[a,u,N,U,H,x,c,p,C,T,W,P])}const on={sidebarTitle:"AI Assistant",clearConversation:"Clear conversation",resetConversation:"Reset 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",proposalConfirmed:"Confirmed",proposalCancelled:"Cancelled",proposalExpired:"No longer available",errorDismiss:"Dismiss",actionAddFile:"Add file",actionQuickActions:"Quick actions",actionNew:"New",actionHistory:"History",actionRules:"Rules",historyEmpty:"No previous chats",historyDeleteChat:"Delete chat"},Er=$.createContext(on);function _e(){return $.useContext(Er)}const bl="_root_1etc2_1",wl={root:bl};function Cl({children:e,theme:n,labels:t,defaultTitle:r,className:i,style:o}){const l={...on,...r?{sidebarTitle:r}:{},...t},a=n?Sl(n):void 0;return k.jsx(Er.Provider,{value:l,children:k.jsx("div",{className:[wl.root,i].filter(Boolean).join(" "),style:{...a,...o},children:e})})}function Sl(e){const n={"--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(n).filter(([,t])=>t!==void 0))}const St=$.createContext(null);function Ir(){const e=$.useContext(St);if(!e)throw new Error("useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>.");return e}function vl(){return $.useContext(St)}function Al({adapter:e,context:n,onProposalConfirm:t,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l,children:a}){const[s,u]=$.useState(n),f=$.useCallback(p=>{u(typeof p=="function"?g=>p(g):p)},[]),c=_r({adapter:e,context:s,onProposalConfirm:t,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l}),h=$.useMemo(()=>({...c,setContext:f}),[c,f]);return k.jsx(St.Provider,{value:h,children:a})}const _l={sidebarTitle:"AI Asistent",clearConversation:"Vymazat konverzaci",resetConversation:"Resetovat 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",proposalConfirmed:"Potvrzeno",proposalCancelled:"Zrušeno",proposalExpired:"Již není k dispozici",errorDismiss:"Zavřít",actionAddFile:"Přidat soubor",actionQuickActions:"Rychlé akce",actionNew:"Nový",actionHistory:"Historie",actionRules:"Pravidla",historyEmpty:"Žádné předchozí konverzace",historyDeleteChat:"Smazat konverzaci"};function Tr({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 El({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Il({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Tl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 zl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Pl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Ll({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 jl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Dl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Ml({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Rl(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Fl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ol={};function Ln(e,n){return(Ol.jsx?Nl:Fl).test(e)}const Bl=/[ \t\n\f\r]/g;function $l(e){return typeof e=="object"?e.type==="text"?jn(e.value):!1:jn(e)}function jn(e){return e.replace(Bl,"")===""}class ot{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}ot.prototype.normal={};ot.prototype.property={};ot.prototype.space=void 0;function zr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new ot(t,r,n)}function Qt(e){return e.toLowerCase()}class ue{constructor(n,t){this.attribute=t,this.property=n}}ue.prototype.attribute="";ue.prototype.booleanish=!1;ue.prototype.boolean=!1;ue.prototype.commaOrSpaceSeparated=!1;ue.prototype.commaSeparated=!1;ue.prototype.defined=!1;ue.prototype.mustUseProperty=!1;ue.prototype.number=!1;ue.prototype.overloadedBoolean=!1;ue.prototype.property="";ue.prototype.spaceSeparated=!1;ue.prototype.space=void 0;let Hl=0;const R=Re(),K=Re(),Yt=Re(),_=Re(),J=Re(),De=Re(),fe=Re();function Re(){return 2**++Hl}const Xt=Object.freeze(Object.defineProperty({__proto__:null,boolean:R,booleanish:K,commaOrSpaceSeparated:fe,commaSeparated:De,number:_,overloadedBoolean:Yt,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),Tt=Object.keys(Xt);class an extends ue{constructor(n,t,r,i){let o=-1;if(super(n,t),Dn(this,"space",i),typeof r=="number")for(;++o<Tt.length;){const l=Tt[o];Dn(this,Tt[o],(r&Xt[l])===Xt[l])}}}an.prototype.defined=!0;function Dn(e,n,t){t&&(e[n]=t)}function Ve(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new an(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[Qt(r)]=r,t[Qt(o.attribute)]=r}return new ot(n,t,e.space)}const Pr=Ve({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:_,ariaColIndex:_,ariaColSpan:_,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:K,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:J,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:_,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:_,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:J,ariaRowCount:_,ariaRowIndex:_,ariaRowSpan:_,ariaSelected:K,ariaSetSize:_,ariaSort:null,ariaValueMax:_,ariaValueMin:_,ariaValueNow:_,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Lr(e,n){return n in e?e[n]:n}function jr(e,n){return Lr(e,n.toLowerCase())}const Vl=Ve({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:De,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alpha:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:J,autoFocus:R,autoPlay:R,blocking:J,capture:null,charSet:null,checked:R,cite:null,className:J,closedBy:null,colorSpace:null,cols:_,colSpan:_,command:null,commandFor:null,content:null,contentEditable:K,controls:R,controlsList:J,coords:_|De,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Yt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:J,height:_,hidden:Yt,high:_,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:J,itemRef:J,itemScope:R,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:_,manifest:null,max:null,maxLength:_,media:null,method:null,min:null,minLength:_,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,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:R,optimum:_,pattern:null,ping:J,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:J,required:R,reversed:R,rows:_,rowSpan:_,sandbox:J,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootCustomElementRegistry:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shadowRootSerializable:R,shape:null,size:_,sizes:null,slot:null,span:_,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_,step:null,style:null,tabIndex:_,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:K,width:_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:_,borderColor:null,bottomMargin:_,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:_,leftMargin:_,link:null,longDesc:null,lowSrc:null,marginHeight:_,marginWidth:_,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:_,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:R,disablePictureInPicture:R,disableRemotePlayback:R,exportParts:De,part:J,prefix:null,property:null,results:_,security:null,unselectable:null},space:"html",transform:jr}),Ul=Ve({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:fe,accentHeight:_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_,amplitude:_,arabicForm:null,ascent:_,attributeName:null,attributeType:null,azimuth:_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_,by:null,calcMode:null,capHeight:_,className:J,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:_,diffuseConstant:_,direction:null,display:null,dur:null,divisor:_,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:_,enableBackground:null,end:null,event:null,exponent:_,externalResourcesRequired:null,fill:null,fillOpacity:_,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:De,g2:De,glyphName:De,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_,horizOriginX:_,horizOriginY:_,id:null,ideographic:_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_,k:_,k1:_,k2:_,k3:_,k4:_,kernelMatrix:fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_,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:_,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:_,overlineThickness:_,paintOrder:null,panose1:null,path:null,pathLength:_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_,pointsAtY:_,pointsAtZ:_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fe,rev:fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fe,requiredFeatures:fe,requiredFonts:fe,requiredFormats:fe,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:_,specularExponent:_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_,strikethroughThickness:_,string:null,stroke:null,strokeDashArray:fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_,strokeOpacity:_,strokeWidth:null,style:null,surfaceScale:_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fe,tabIndex:_,tableValues:null,target:null,targetX:_,targetY:_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_,underlineThickness:_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_,values:null,vAlphabetic:_,vMathematical:_,vectorEffect:null,vHanging:_,vIdeographic:_,version:null,vertAdvY:_,vertOriginX:_,vertOriginY:_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Lr}),Dr=Ve({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Mr=Ve({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jr}),Rr=Ve({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),ql={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"},Wl=/[A-Z]/g,Mn=/-[a-z]/g,Ql=/^data[-\w.:]+$/i;function Yl(e,n){const t=Qt(n);let r=n,i=ue;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Ql.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Mn,Jl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Mn.test(o)){let l=o.replace(Wl,Xl);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=an}return new i(r,n)}function Xl(e){return"-"+e.toLowerCase()}function Jl(e){return e.charAt(1).toUpperCase()}const Gl=zr([Pr,Vl,Dr,Mr,Rr],"html"),sn=zr([Pr,Ul,Dr,Mr,Rr],"svg");function Kl(e){return e.join(" ").trim()}function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Be={},zt,Rn;function Zl(){if(Rn)return zt;Rn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\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,y){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];y=y||{};var E=1,A=1;function L(P){var v=P.match(n);v&&(E+=v.length);var M=P.lastIndexOf(s);A=~M?P.length-M:A+P.length}function D(){var P={line:E,column:A};return function(v){return v.position=new b(P),H(),v}}function b(P){this.start=P,this.end={line:E,column:A},this.source=y.source}b.prototype.content=S;function N(P){var v=new Error(y.source+":"+E+":"+A+": "+P);if(v.reason=P,v.filename=y.source,v.line=E,v.column=A,v.source=S,!y.silent)throw v}function U(P){var v=P.exec(S);if(v){var M=v[0];return L(M),S=S.slice(M.length),v}}function H(){U(t)}function x(P){var v;for(P=P||[];v=T();)v!==!1&&P.push(v);return P}function T(){var P=D();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var v=2;c!=S.charAt(v)&&(f!=S.charAt(v)||u!=S.charAt(v+1));)++v;if(v+=2,c===S.charAt(v-1))return N("End of comment missing");var M=S.slice(2,v-2);return A+=2,L(M),S=S.slice(v),A+=2,P({type:h,comment:M})}}function z(){var P=D(),v=U(r);if(v){if(T(),!U(i))return N("property missing ':'");var M=U(o),O=P({type:p,property:C(v[0].replace(e,c)),value:M?C(M[0].replace(e,c)):c});return U(l),O}}function W(){var P=[];x(P);for(var v;v=z();)v!==!1&&(P.push(v),x(P));return P}return H(),W()}function C(S){return S?S.replace(a,c):c}return zt=g,zt}var Fn;function eo(){if(Fn)return Be;Fn=1;var e=Be&&Be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Be,"__esModule",{value:!0}),Be.default=t;const n=e(Zl());function t(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,n.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 Be}var Ye={},Nn;function to(){if(Nn)return Ye;Nn=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||t.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(n,l))};return Ye.camelCase=s,Ye}var Xe,On;function no(){if(On)return Xe;On=1;var e=Xe&&Xe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(eo()),t=to();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,s){a&&s&&(l[(0,t.camelCase)(a,o)]=s)}),l}return r.default=r,Xe=r,Xe}var ro=no();const io=Fr(ro),Nr=Or("end"),un=Or("start");function Or(e){return n;function n(t){const r=t&&t.position&&t.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 lo(e){const n=un(e),t=Nr(e);if(n&&t)return{start:n,end:t}}function tt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Bn(e.position):"start"in e||"end"in e?Bn(e):"line"in e||"column"in e?Jt(e):""}function Jt(e){return $n(e&&e.line)+":"+$n(e&&e.column)}function Bn(e){return Jt(e&&e.start)+"-"+Jt(e&&e.end)}function $n(e){return e&&typeof e=="number"?e:1}class le extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!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=tt(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}}le.prototype.file="";le.prototype.name="";le.prototype.reason="";le.prototype.message="";le.prototype.stack="";le.prototype.column=void 0;le.prototype.line=void 0;le.prototype.ancestors=void 0;le.prototype.cause=void 0;le.prototype.fatal=void 0;le.prototype.place=void 0;le.prototype.ruleId=void 0;le.prototype.source=void 0;const cn={}.hasOwnProperty,oo=new Map,ao=/[A-Z]/g,so=new Set(["table","tbody","thead","tfoot","tr"]),uo=new Set(["td","th"]),Br="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function co(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ko(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=xo(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?sn:Gl,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=$r(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function $r(e,n,t){if(n.type==="element")return fo(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return po(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return mo(e,n,t);if(n.type==="mdxjsEsm")return ho(e,n);if(n.type==="root")return go(e,n,t);if(n.type==="text")return yo(e,n)}function fo(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=sn,e.schema=i),e.ancestors.push(n);const o=Vr(e,n.tagName,!1),l=bo(e,n);let a=pn(e,n);return so.has(n.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!$l(s):!0})),Hr(e,l,o,n),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function po(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}it(e,n.position)}function ho(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);it(e,n.position)}function mo(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=sn,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Vr(e,n.name,!0),l=wo(e,n),a=pn(e,n);return Hr(e,l,o,n),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function go(e,n,t){const r={};return fn(r,pn(e,n)),e.create(n,e.Fragment,r,t)}function yo(e,n){return n.value}function Hr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function fn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function xo(e,n,t){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?t:n;return a?u(o,l,a):u(o,l)}}function ko(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),s=un(r);return n(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function bo(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&cn.call(n.properties,i)){const o=Co(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&uo.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function wo(e,n){const t={};for(const r of n.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(t,e.evaluater.evaluateExpression(a.argument))}else it(e,n.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 it(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function pn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:oo;for(;++r<n.children.length;){const o=n.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=$r(e,o,l);a!==void 0&&t.push(a)}return t}function Co(e,n,t){const r=Yl(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Rl(t):Kl(t)),r.property==="style"){let i=typeof t=="object"?t:So(e,String(t));return e.stylePropertyNameCase==="css"&&(i=vo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ql[r.property]||r.property:r.attribute,t]}}function So(e,n){try{return io(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new le("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=Br+"#cannot-parse-style-attribute",i}}function Vr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=Ln(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=Ln(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return cn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);it(e)}function it(e,n){const t=new le("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Br+"#cannot-handle-mdx-estrees-without-createevaluater",t}function vo(e){const n={};let t;for(t in e)cn.call(e,t)&&(n[Ao(t)]=e[t]);return n}function Ao(e){let n=e.replace(ao,_o);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function _o(e){return"-"+e.toLowerCase()}const Pt={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"]},Eo={};function hn(e,n){const t=Eo,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ur(e,r,i)}function Ur(e,n,t){if(Io(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Hn(e.children,n,t)}return Array.isArray(e)?Hn(e,n,t):""}function Hn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ur(e[i],n,t);return r.join("")}function Io(e){return!!(e&&typeof e=="object")}const Vn=document.createElement("i");function dn(e){const n="&"+e+";";Vn.innerHTML=n;const t=Vn.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function pe(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function he(e,n){return e.length>0?(pe(e,e.length,0,n),e):n}const Un={}.hasOwnProperty;function qr(e){const n={};let t=-1;for(;++t<e.length;)To(n,e[t]);return n}function To(e,n){let t;for(t in n){const i=(Un.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){Un.call(i,l)||(i[l]=[]);const a=o[l];zo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function zo(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);pe(e,0,0,r)}function Wr(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const oe=Ee(/[A-Za-z]/),ie=Ee(/[\dA-Za-z]/),Po=Ee(/[#-'*+\--9=?A-Z^-~]/);function kt(e){return e!==null&&(e<32||e===127)}const Gt=Ee(/\d/),Lo=Ee(/[\dA-Fa-f]/),jo=Ee(/[!-/:-@[-`{-~]/);function j(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function B(e){return e===-2||e===-1||e===32}const vt=Ee(/\p{P}|\p{S}/u),Me=Ee(/\s/);function Ee(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ue(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&ie(e.charCodeAt(t+1))&&ie(e.charCodeAt(t+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(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function q(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return B(s)?(e.enter(t),a(s)):n(s)}function a(s){return B(s)&&o++<i?(e.consume(s),a):(e.exit(t),n(s))}}const Do={tokenize:Mo};function Mo(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=s),t=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return j(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Ro={tokenize:Fo},qn={tokenize:No};function Fo(e){const n=this,t=[];let r=0,i,o,l;return a;function a(A){if(r<t.length){const L=t[r];return n.containerState=L[1],e.attempt(L[0].continuation,s,u)(A)}return u(A)}function s(A){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&E();const L=n.events.length;let D=L,b;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){b=n.events[D][1].end;break}y(r);let N=L;for(;N<n.events.length;)n.events[N][1].end={...b},N++;return pe(n.events,D+1,0,n.events.slice(L)),n.events.length=N,u(A)}return a(A)}function u(A){if(r===t.length){if(!i)return h(A);if(i.currentConstruct&&i.currentConstruct.concrete)return g(A);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(qn,f,c)(A)}function f(A){return i&&E(),y(r),h(A)}function c(A){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,g(A)}function h(A){return n.containerState={},e.attempt(qn,p,g)(A)}function p(A){return r++,t.push([n.currentConstruct,n.containerState]),h(A)}function g(A){if(A===null){i&&E(),y(0),e.consume(A);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),C(A)}function C(A){if(A===null){S(e.exit("chunkFlow"),!0),y(0),e.consume(A);return}return j(A)?(e.consume(A),S(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(A),C)}function S(A,L){const D=n.sliceStream(A);if(L&&D.push(null),A.previous=o,o&&(o.next=A),o=A,i.defineSkip(A.start),i.write(D),n.parser.lazy[A.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const N=n.events.length;let U=N,H,x;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){if(H){x=n.events[U][1].end;break}H=!0}for(y(r),b=N;b<n.events.length;)n.events[b][1].end={...x},b++;pe(n.events,U+1,0,n.events.slice(N)),n.events.length=b}}function y(A){let L=t.length;for(;L-- >A;){const D=t[L];n.containerState=D[1],D[0].exit.call(n,e)}t.length=A}function E(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function No(e,n,t){return q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function He(e){if(e===null||G(e)||Me(e))return 1;if(vt(e))return 2}function At(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const Kt={name:"attention",resolveAll:Oo,tokenize:Bo};function Oo(e,n){let t=-1,r,i,o,l,a,s,u,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[t][1].start};Wn(c,-s),Wn(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=he(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=he(u,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),u=he(u,At(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=he(u,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=he(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,pe(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Bo(e,n){const t=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||t.includes(s),h=!i||i===2&&f||t.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(f||!c)),n(s)}}function Wn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const $o={name:"autolink",tokenize:Ho};function Ho(e,n,t){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 oe(p)?(e.consume(p),l):p===64?t(p):u(p)}function l(p){return p===43||p===45||p===46||ie(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||ie(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"),n):p===null||p===32||p===60||kt(p)?t(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):Po(p)?(e.consume(p),u):t(p)}function f(p){return ie(p)?c(p):t(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"),n):h(p)}function h(p){if((p===45||ie(p))&&r++<63){const g=p===45?h:c;return e.consume(p),g}return t(p)}}const at={partial:!0,tokenize:Vo};function Vo(e,n,t){return r;function r(o){return B(o)?q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||j(o)?n(o):t(o)}}const Qr={continuation:{tokenize:qo},exit:Wo,name:"blockQuote",tokenize:Uo};function Uo(e,n,t){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 t(l)}function o(l){return B(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function qo(e,n,t){const r=this;return i;function i(l){return B(l)?q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Qr,n,t)(l)}}function Wo(e){e.exit("blockQuote")}const Yr={name:"characterEscape",tokenize:Qo};function Qo(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return jo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const Xr={name:"characterReference",tokenize:Yo};function Yo(e,n,t){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=ie,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=Lo,f):(e.enter("characterReferenceValue"),o=7,l=Gt,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===ie&&!dn(r.sliceSerialize(h))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<o?(e.consume(c),f):t(c)}}const Qn={partial:!0,tokenize:Jo},Yn={concrete:!0,name:"codeFenced",tokenize:Xo};function Xo(e,n,t){const r=this,i={partial:!0,tokenize:D};let o=0,l=0,a;return s;function s(b){return u(b)}function u(b){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?t(b):(e.exit("codeFencedFenceSequence"),B(b)?q(e,c,"whitespace")(b):c(b))}function c(b){return b===null||j(b)?(e.exit("codeFencedFence"),r.interrupt?n(b):e.check(Qn,C,L)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===null||j(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):B(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,p,"whitespace")(b)):b===96&&b===a?t(b):(e.consume(b),h)}function p(b){return b===null||j(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||j(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===a?t(b):(e.consume(b),g)}function C(b){return e.attempt(i,L,S)(b)}function S(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&B(b)?q(e,E,"linePrefix",o+1)(b):E(b)}function E(b){return b===null||j(b)?e.check(Qn,C,L)(b):(e.enter("codeFlowValue"),A(b))}function A(b){return b===null||j(b)?(e.exit("codeFlowValue"),E(b)):(e.consume(b),A)}function L(b){return e.exit("codeFenced"),n(b)}function D(b,N,U){let H=0;return x;function x(v){return b.enter("lineEnding"),b.consume(v),b.exit("lineEnding"),T}function T(v){return b.enter("codeFencedFence"),B(v)?q(b,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):z(v)}function z(v){return v===a?(b.enter("codeFencedFenceSequence"),W(v)):U(v)}function W(v){return v===a?(H++,b.consume(v),W):H>=l?(b.exit("codeFencedFenceSequence"),B(v)?q(b,P,"whitespace")(v):P(v)):U(v)}function P(v){return v===null||j(v)?(b.exit("codeFencedFence"),N(v)):U(v)}}}function Jo(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const Lt={name:"codeIndented",tokenize:Ko},Go={partial:!0,tokenize:Zo};function Ko(e,n,t){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):t(u)}function l(u){return u===null?s(u):j(u)?e.attempt(Go,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||j(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),n(u)}}function Zo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):j(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?n(l):j(l)?i(l):t(l)}}const ea={name:"codeText",previous:na,resolve:ta,tokenize:ra};function ta(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function na(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ra(e,n,t){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?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):j(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||j(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"),n(c)):(o.type="codeTextData",u(c))}}class ia{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Je(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Je(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Je(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Je(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Je(this.left,t.reverse())}}}function Je(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Jr(e){const n={};let t=-1,r,i,o,l,a,s,u;const f=new ia(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-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(n,la(f,t)),t=n[t],u=!0);else if(r[1]._container){for(o=t,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,t),a.unshift(r),f.splice(i,t-i+1,a))}}return pe(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function la(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=t,g=0,C=0;const S=[C];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=t;++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&&(C=h+1,S.push(C),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 y=a.slice(S[h],S[h+1]),E=o.pop();s.push([E,E+y.length-1]),e.splice(E,2,y)}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 oa={resolve:sa,tokenize:ua},aa={partial:!0,tokenize:ca};function sa(e){return Jr(e),e}function ua(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):j(a)?e.check(aa,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function ca(e,n,t){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||j(l))return t(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?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Gr(e,n,t,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||kt(y)?t(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),C(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||j(y)?t(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function C(y){return!f&&(y===null||y===41||G(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(y)):f<u&&y===40?(e.consume(y),f++,C):y===41?(e.consume(y),f--,C):y===null||y===32||y===40||kt(y)?t(y):(e.consume(y),y===92?S:C)}function S(y){return y===40||y===41||y===92?(e.consume(y),C):C(y)}}function Kr(e,n,t,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?t(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):j(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||j(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!B(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function Zr(e,n,t,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):t(h)}function s(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):(e.enter(o),u(h))}function u(h){return h===l?(e.exit(o),s(l)):h===null?t(h):j(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||j(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 nt(e,n){let t;return r;function r(i){return j(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):B(i)?q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const fa={name:"definition",tokenize:ha},pa={partial:!0,tokenize:da};function ha(e,n,t){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Kr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):t(p)}function s(p){return G(p)?nt(e,u)(p):u(p)}function u(p){return Gr(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(pa,c,c)(p)}function c(p){return B(p)?q(e,h,"whitespace")(p):h(p)}function h(p){return p===null||j(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function da(e,n,t){return r;function r(a){return G(a)?nt(e,i)(a):t(a)}function i(a){return Zr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return B(a)?q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||j(a)?n(a):t(a)}}const ma={name:"hardBreakEscape",tokenize:ga};function ga(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return j(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const ya={name:"headingAtx",resolve:xa,tokenize:ka};function xa(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},pe(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function ka(e,n,t){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||G(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||j(f)?(e.exit("atxHeading"),n(f)):B(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||G(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const ba=["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"],Xn=["pre","script","style","textarea"],wa={concrete:!0,name:"htmlFlow",resolveTo:va,tokenize:Aa},Ca={partial:!0,tokenize:Ea},Sa={partial:!0,tokenize:_a};function va(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Aa(e,n,t){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,C):m===63?(e.consume(m),i=3,r.interrupt?n:d):oe(m)?(e.consume(m),l=String.fromCharCode(m),S):t(m)}function h(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,g):oe(m)?(e.consume(m),i=4,r.interrupt?n:d):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:d):t(m)}function g(m){const te="CDATA[";return m===te.charCodeAt(a++)?(e.consume(m),a===te.length?r.interrupt?n:z:g):t(m)}function C(m){return oe(m)?(e.consume(m),l=String.fromCharCode(m),S):t(m)}function S(m){if(m===null||m===47||m===62||G(m)){const te=m===47,Ie=l.toLowerCase();return!te&&!o&&Xn.includes(Ie)?(i=1,r.interrupt?n(m):z(m)):ba.includes(l.toLowerCase())?(i=6,te?(e.consume(m),y):r.interrupt?n(m):z(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):o?E(m):A(m))}return m===45||ie(m)?(e.consume(m),l+=String.fromCharCode(m),S):t(m)}function y(m){return m===62?(e.consume(m),r.interrupt?n:z):t(m)}function E(m){return B(m)?(e.consume(m),E):x(m)}function A(m){return m===47?(e.consume(m),x):m===58||m===95||oe(m)?(e.consume(m),L):B(m)?(e.consume(m),A):x(m)}function L(m){return m===45||m===46||m===58||m===95||ie(m)?(e.consume(m),L):D(m)}function D(m){return m===61?(e.consume(m),b):B(m)?(e.consume(m),D):A(m)}function b(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),s=m,N):B(m)?(e.consume(m),b):U(m)}function N(m){return m===s?(e.consume(m),s=null,H):m===null||j(m)?t(m):(e.consume(m),N)}function U(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||G(m)?D(m):(e.consume(m),U)}function H(m){return m===47||m===62||B(m)?A(m):t(m)}function x(m){return m===62?(e.consume(m),T):t(m)}function T(m){return m===null||j(m)?z(m):B(m)?(e.consume(m),T):t(m)}function z(m){return m===45&&i===2?(e.consume(m),M):m===60&&i===1?(e.consume(m),O):m===62&&i===4?(e.consume(m),ae):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),Q):j(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ca,ee,W)(m)):m===null||j(m)?(e.exit("htmlFlowData"),W(m)):(e.consume(m),z)}function W(m){return e.check(Sa,P,ee)(m)}function P(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),v}function v(m){return m===null||j(m)?W(m):(e.enter("htmlFlowData"),z(m))}function M(m){return m===45?(e.consume(m),d):z(m)}function O(m){return m===47?(e.consume(m),l="",Y):z(m)}function Y(m){if(m===62){const te=l.toLowerCase();return Xn.includes(te)?(e.consume(m),ae):z(m)}return oe(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),Y):z(m)}function Q(m){return m===93?(e.consume(m),d):z(m)}function d(m){return m===62?(e.consume(m),ae):m===45&&i===2?(e.consume(m),d):z(m)}function ae(m){return m===null||j(m)?(e.exit("htmlFlowData"),ee(m)):(e.consume(m),ae)}function ee(m){return e.exit("htmlFlow"),n(m)}}function _a(e,n,t){const r=this;return i;function i(l){return j(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Ea(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(at,n,t)}}const Ia={name:"htmlText",tokenize:Ta};function Ta(e,n,t){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),D):d===63?(e.consume(d),A):oe(d)?(e.consume(d),U):t(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):oe(d)?(e.consume(d),E):t(d)}function f(d){return d===45?(e.consume(d),p):t(d)}function c(d){return d===null?t(d):d===45?(e.consume(d),h):j(d)?(l=c,O(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?M(d):d===45?h(d):c(d)}function g(d){const ae="CDATA[";return d===ae.charCodeAt(o++)?(e.consume(d),o===ae.length?C:g):t(d)}function C(d){return d===null?t(d):d===93?(e.consume(d),S):j(d)?(l=C,O(d)):(e.consume(d),C)}function S(d){return d===93?(e.consume(d),y):C(d)}function y(d){return d===62?M(d):d===93?(e.consume(d),y):C(d)}function E(d){return d===null||d===62?M(d):j(d)?(l=E,O(d)):(e.consume(d),E)}function A(d){return d===null?t(d):d===63?(e.consume(d),L):j(d)?(l=A,O(d)):(e.consume(d),A)}function L(d){return d===62?M(d):A(d)}function D(d){return oe(d)?(e.consume(d),b):t(d)}function b(d){return d===45||ie(d)?(e.consume(d),b):N(d)}function N(d){return j(d)?(l=N,O(d)):B(d)?(e.consume(d),N):M(d)}function U(d){return d===45||ie(d)?(e.consume(d),U):d===47||d===62||G(d)?H(d):t(d)}function H(d){return d===47?(e.consume(d),M):d===58||d===95||oe(d)?(e.consume(d),x):j(d)?(l=H,O(d)):B(d)?(e.consume(d),H):M(d)}function x(d){return d===45||d===46||d===58||d===95||ie(d)?(e.consume(d),x):T(d)}function T(d){return d===61?(e.consume(d),z):j(d)?(l=T,O(d)):B(d)?(e.consume(d),T):H(d)}function z(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),i=d,W):j(d)?(l=z,O(d)):B(d)?(e.consume(d),z):(e.consume(d),P)}function W(d){return d===i?(e.consume(d),i=void 0,v):d===null?t(d):j(d)?(l=W,O(d)):(e.consume(d),W)}function P(d){return d===null||d===34||d===39||d===60||d===61||d===96?t(d):d===47||d===62||G(d)?H(d):(e.consume(d),P)}function v(d){return d===47||d===62||G(d)?H(d):t(d)}function M(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),n):t(d)}function O(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Y}function Y(d){return B(d)?q(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):Q(d)}function Q(d){return e.enter("htmlTextData"),l(d)}}const mn={name:"labelEnd",resolveAll:ja,resolveTo:Da,tokenize:Ma},za={tokenize:Ra},Pa={tokenize:Fa},La={tokenize:Na};function ja(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&pe(e,0,e.length,t),e}function Da(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);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,n],["enter",u,n]],a=he(a,e.slice(o+1,o+r+3)),a=he(a,[["enter",f,n]]),a=he(a,At(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=he(a,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),a=he(a,e.slice(l+1)),a=he(a,[["exit",s,n]]),pe(e,o,e.length,a),e}function Ma(e,n,t){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(ge(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):t(h)}function s(h){return h===40?e.attempt(za,f,l?f:c)(h):h===91?e.attempt(Pa,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(La,f,c)(h)}function f(h){return n(h)}function c(h){return o._balanced=!0,t(h)}}function Ra(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return G(c)?nt(e,o)(c):o(c)}function o(c){return c===41?f(c):Gr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return G(c)?nt(e,s)(c):f(c)}function a(c){return t(c)}function s(c){return c===34||c===39||c===40?Zr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return G(c)?nt(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function Fa(e,n,t){const r=this;return i;function i(a){return Kr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function Na(e,n,t){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"),n):t(o)}}const Oa={name:"labelStartImage",resolveAll:mn.resolveAll,tokenize:Ba};function Ba(e,n,t){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):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const $a={name:"labelStartLink",resolveAll:mn.resolveAll,tokenize:Ha};function Ha(e,n,t){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?t(l):n(l)}}const jt={name:"lineEnding",tokenize:Va};function Va(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,n,"linePrefix")}}const xt={name:"thematicBreak",tokenize:Ua};function Ua(e,n,t){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||j(u))?(e.exit("thematicBreak"),n(u)):t(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),B(u)?q(e,a,"whitespace")(u):a(u))}}const se={continuation:{tokenize:Ya},exit:Ja,name:"list",tokenize:Qa},qa={partial:!0,tokenize:Ga},Wa={partial:!0,tokenize:Xa};function Qa(e,n,t){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:Gt(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(xt,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return t(p)}function s(p){return Gt(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)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(at,r.interrupt?t:f,e.attempt(qa,h,c))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return B(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):t(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Ya(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(at,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!B(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(Wa,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(se,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Xa(e,n,t){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?n(o):t(o)}}function Ja(e){e.exit(this.containerState.type)}function Ga(e,n,t){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!B(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const Jn={name:"setextUnderline",resolveTo:Ka,tokenize:Za};function Ka(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);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,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function Za(e,n,t){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)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),B(u)?q(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||j(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const es={tokenize:ts};function ts(e){const n=this,t=e.attempt(at,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oa,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ns={resolveAll:ti()},rs=ei("string"),is=ei("text");function ei(e){return{resolveAll:ti(e==="text"?ls:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),s}function s(f){return u(f)?(t.exit("data"),o(f)):(t.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 ti(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function ls(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.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(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===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(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const os={42:se,43:se,45:se,48:se,49:se,50:se,51:se,52:se,53:se,54:se,55:se,56:se,57:se,62:Qr},as={91:fa},ss={[-2]:Lt,[-1]:Lt,32:Lt},us={35:ya,42:xt,45:[Jn,xt],60:wa,61:Jn,95:xt,96:Yn,126:Yn},cs={38:Xr,92:Yr},fs={[-5]:jt,[-4]:jt,[-3]:jt,33:Oa,38:Xr,42:Kt,60:[$o,Ia],91:$a,92:[ma,Yr],93:mn,95:Kt,96:ea},ps={null:[Kt,ns]},hs={null:[42,95]},ds={null:[]},ms=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:hs,contentInitial:as,disable:ds,document:os,flow:us,flowInitial:ss,insideSpan:ps,string:cs,text:fs},Symbol.toStringTag,{value:"Module"}));function gs(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:N(D),check:N(b),consume:E,enter:A,exit:L,interrupt:N(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:C,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=n.tokenize.call(u,s);return n.resolveAll&&o.push(n),u;function c(T){return l=he(l,T),S(),l[l.length-1]!==null?[]:(U(n,0),u.events=At(o,u.events,u),u.events)}function h(T,z){return xs(p(T),z)}function p(T){return ys(l,T)}function g(){const{_bufferIndex:T,_index:z,line:W,column:P,offset:v}=r;return{_bufferIndex:T,_index:z,line:W,column:P,offset:v}}function C(T){i[T.line]=T.column,x()}function S(){let T;for(;r._index<l.length;){const z=l[r._index];if(typeof z=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<z.length;)y(z.charCodeAt(r._bufferIndex));else y(z)}}function y(T){f=f(T)}function E(T){j(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,x()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=T}function A(T,z){const W=z||{};return W.type=T,W.start=g(),u.events.push(["enter",W,u]),a.push(W),W}function L(T){const z=a.pop();return z.end=g(),u.events.push(["exit",z,u]),z}function D(T,z){U(T,z.from)}function b(T,z){z.restore()}function N(T,z){return W;function W(P,v,M){let O,Y,Q,d;return Array.isArray(P)?ee(P):"tokenize"in P?ee([P]):ae(P);function ae(ne){return qe;function qe(ve){const Fe=ve!==null&&ne[ve],Ne=ve!==null&&ne.null,ut=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return ee(ut)(ve)}}function ee(ne){return O=ne,Y=0,ne.length===0?M:m(ne[Y])}function m(ne){return qe;function qe(ve){return d=H(),Q=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?Ie():ne.tokenize.call(z?Object.assign(Object.create(u),z):u,s,te,Ie)(ve)}}function te(ne){return T(Q,d),v}function Ie(ne){return d.restore(),++Y<O.length?m(O[Y]):M}}}function U(T,z){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&pe(u.events,z,u.events.length-z,T.resolve(u.events.slice(z),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function H(){const T=g(),z=u.previous,W=u.currentConstruct,P=u.events.length,v=Array.from(a);return{from:P,restore:M};function M(){r=T,u.previous=z,u.currentConstruct=W,u.events.length=P,a=v,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ys(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,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 xs(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];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*re(e,n){for(let r=0;r<e.length;r+=3)yield{type:"text",text:e.slice(r,r+3)},await Z(n)}function on(e){if(!e||e==="[DONE]")return[];let n;try{n=JSON.parse(e)}catch{return[]}switch(n.type){case"text":return n.text?[{type:"text",text:n.text}]:[];case"activity":return[{type:"part",part:{type:"activity",id:n.id,title:n.title,description:n.description,status:n.status,metadata:n.metadata}}];case"part":return[{type:"part",part:n.part}];case"done":return[{type:"done"}];case"error":return[{type:"error",message:n.message}];default:return[]}}function hl(e,n={}){const{method:t="POST",headers:r={},getHeaders:i,getBody:o,getMessages:l,parseEvent:a=ml,credentials:s}=n;return{async*sendMessage(u){const f=i?await i(u):{},c=l?await l(u.messages):u.messages,h={...u,messages:c},p=o?o(h):{messages:h.messages,context:h.context},g=await fetch(e,{method:t,credentials:s,headers:{"Content-Type":"application/json",...r,...f},body:JSON.stringify(p)});if(!g.ok){const C=await g.text().catch(()=>`HTTP ${g.status}`);yield{type:"error",message:`Request failed (${g.status}): ${C}`};return}if(!g.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*dl(g.body,a)}}}async function*dl(e,n){const t=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await t.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=n(f);for(const h of c)if(yield h,h.type==="done"||h.type==="error")return}}}}finally{t.releaseLock()}yield{type:"done"}}const ml=e=>{if(!e||e==="[DONE]")return[];const n=on(e);if(n.length>0)return n;try{const t=JSON.parse(e);if(t.error?.message)return[{type:"error",message:t.error.message}];const r=t.choices?.[0]?.delta;return t.choices?.[0]?.finish_reason==="stop"?[{type:"done"}]:r?.content?[{type:"text",text:r.content}]:[]}catch{return[]}};function gl(e,n={}){const{method:t="POST",headers:r={},getHeaders:i,getBody:o,parseChunk:l=xl,credentials:a}=n;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:t,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*yl(c.body,l)}}}async function*yl(e,n){const t=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await t.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=n(u);for(const c of f)if(yield c,c.type==="done"||c.type==="error")return}}if(i.trim()){const o=n(i.trim());for(const l of o)if(yield l,l.type==="done"||l.type==="error")return}}finally{t.releaseLock()}yield{type:"done"}}const xl=e=>{const n=on(e);return n.length>0?n:e?[{type:"text",text:e}]:[]};let kl=0;const ct=()=>`msg-${++kl}-${Date.now()}`,Ln=Sr;function _r({adapter:e,context:n,onProposalConfirm:t,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l}){const[a,s]=$.useState(i??[]),[u,f]=$.useState(""),[c,h]=$.useState(!1),[p,g]=$.useState(!1),[C,S]=$.useState(null),y=$.useRef(null),E=$.useRef(!1),A=$.useRef(l);$.useEffect(()=>{A.current=l}),$.useEffect(()=>{!E.current||c||(E.current=!1,A.current?.(a))},[a,c]);const L=$.useCallback(v=>{s(M=>{const O=M[M.length-1];if(!O||O.role!=="assistant")return M;if(v.type==="activity"&&v.id){const Y=[...O.parts],Q=Y.findIndex(d=>d.type==="activity"&&d.id===v.id);if(Q!==-1)return Y[Q]=v,[...M.slice(0,-1),{...O,parts:Y}]}return[...M.slice(0,-1),{...O,parts:[...O.parts,v]}]})},[]),D=$.useCallback(v=>{s(M=>{const O=M[M.length-1];if(!O||O.role!=="assistant")return M;const Y=[...O.parts],Q=Y[Y.length-1];return Q?.type==="text"?Y[Y.length-1]={type:"text",text:Q.text+v}:Y.push({type:"text",text:v}),[...M.slice(0,-1),{...O,parts:Y}]})},[]),b=$.useCallback(async(v,M)=>{S(null);const O={id:ct(),role:"user",parts:[{type:"text",text:v}],createdAt:new Date},Y=ct();let Q=!1;const d=()=>{if(Q)return;Q=!0;const ee={id:Y,role:"assistant",parts:[],createdAt:new Date};s(m=>[...m,ee])};s(ee=>[...ee,O]),h(!0),g(!0),y.current?.abort();const ae=new AbortController;y.current=ae;try{const ee=Ar([...M,O],o??Number.POSITIVE_INFINITY),m=e.sendMessage({messages:Ln(ee),context:n});await Wt(m,te=>{switch(g(!1),te.type){case"text":d(),D(te.text);break;case"part":d(),L(te.part);break;case"error":d(),L({type:"error",message:te.message}),S(te.message);break;case"done":break}},ae.signal)}catch(ee){const m=ee instanceof Error?ee.message:"Unknown error occurred";S(m),d(),L({type:"error",message:m})}finally{E.current=!0,h(!1),g(!1)}},[e,n,o,D,L]),N=$.useCallback(async()=>{const v=u.trim();!v||c||(f(""),await b(v,a))},[u,c,a,b]),U=$.useCallback(async v=>{!v.trim()||c||await b(v,a)},[c,a,b]),H=$.useCallback(async v=>{if(c)return;S(null),h(!0),g(!0);const M={id:ct(),role:"assistant",parts:[],createdAt:new Date};s(Q=>[...Q,M]),y.current?.abort();const O=new AbortController;y.current=O;const Y={id:ct(),role:"system",parts:[{type:"text",text:v}],createdAt:new Date};try{const Q=e.sendMessage({messages:Ln([Y]),context:n});await Wt(Q,d=>{switch(g(!1),d.type){case"text":D(d.text);break;case"part":L(d.part);break;case"error":L({type:"error",message:d.message}),S(d.message);break;case"done":break}},O.signal)}catch(Q){const d=Q instanceof Error?Q.message:"Unknown error occurred";S(d),L({type:"error",message:d})}finally{E.current=!0,h(!1),g(!1)}},[c,e,n,D,L]),x=$.useCallback(()=>{y.current?.abort(),h(!1),g(!1)},[]),T=$.useCallback(v=>{y.current?.abort(),E.current=!0,s(v??[]),f(""),S(null),h(!1),g(!1)},[]),z=$.useCallback((v,M)=>{E.current=!0,s(O=>O.map(Y=>({...Y,parts:Y.parts.map(Q=>ln(Q)&&Q.proposal.id===v?{...Q,proposal:{...Q.proposal,resolved:M}}:Q)})))},[]),W=$.useCallback((v,M)=>{z(v,"confirmed"),t?.(v,M)},[t,z]),P=$.useCallback(v=>{z(v,"cancelled"),r?.(v)},[r,z]);return $.useMemo(()=>({messages:a,input:u,setInput:f,sendMessage:N,sendMessageWithText:U,sendGreeting:H,stop:x,isLoading:c,isConnecting:p,error:C,reset:T,confirmProposal:W,cancelProposal:P}),[a,u,N,U,H,x,c,p,C,T,W,P])}const an={sidebarTitle:"AI Assistant",clearConversation:"Clear conversation",resetConversation:"Reset 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",proposalConfirmed:"Confirmed",proposalCancelled:"Cancelled",proposalExpired:"No longer available",errorDismiss:"Dismiss",actionAddFile:"Add file",actionQuickActions:"Quick actions",actionNew:"New",actionHistory:"History",actionRules:"Rules",historyEmpty:"No previous chats",historyDeleteChat:"Delete chat"},Er=$.createContext(an);function _e(){return $.useContext(Er)}const bl="_root_1etc2_1",wl={root:bl};function Cl({children:e,theme:n,labels:t,defaultTitle:r,className:i,style:o}){const l={...an,...r?{sidebarTitle:r}:{},...t},a=n?Sl(n):void 0;return k.jsx(Er.Provider,{value:l,children:k.jsx("div",{className:[wl.root,i].filter(Boolean).join(" "),style:{...a,...o},children:e})})}function Sl(e){const n={"--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(n).filter(([,t])=>t!==void 0))}const St=$.createContext(null);function Ir(){const e=$.useContext(St);if(!e)throw new Error("useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>.");return e}function vl(){return $.useContext(St)}function Al({adapter:e,context:n,onProposalConfirm:t,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l,children:a}){const[s,u]=$.useState(n),f=$.useCallback(p=>{u(typeof p=="function"?g=>p(g):p)},[]),c=_r({adapter:e,context:s,onProposalConfirm:t,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l}),h=$.useMemo(()=>({...c,setContext:f}),[c,f]);return k.jsx(St.Provider,{value:h,children:a})}const _l={sidebarTitle:"AI Asistent",clearConversation:"Vymazat konverzaci",resetConversation:"Resetovat 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",proposalConfirmed:"Potvrzeno",proposalCancelled:"Zrušeno",proposalExpired:"Již není k dispozici",errorDismiss:"Zavřít",actionAddFile:"Přidat soubor",actionQuickActions:"Rychlé akce",actionNew:"Nový",actionHistory:"Historie",actionRules:"Pravidla",historyEmpty:"Žádné předchozí konverzace",historyDeleteChat:"Smazat konverzaci"};function Tr({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 El({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Il({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Tl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 zl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Pl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Ll({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 jl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Dl({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Ml({className:e,style:n,"aria-hidden":t=!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:n,"aria-hidden":t,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 Rl(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Fl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ol={};function jn(e,n){return(Ol.jsx?Nl:Fl).test(e)}const Bl=/[ \t\n\f\r]/g;function $l(e){return typeof e=="object"?e.type==="text"?Dn(e.value):!1:Dn(e)}function Dn(e){return e.replace(Bl,"")===""}class ot{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}ot.prototype.normal={};ot.prototype.property={};ot.prototype.space=void 0;function zr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new ot(t,r,n)}function Qt(e){return e.toLowerCase()}class ue{constructor(n,t){this.attribute=t,this.property=n}}ue.prototype.attribute="";ue.prototype.booleanish=!1;ue.prototype.boolean=!1;ue.prototype.commaOrSpaceSeparated=!1;ue.prototype.commaSeparated=!1;ue.prototype.defined=!1;ue.prototype.mustUseProperty=!1;ue.prototype.number=!1;ue.prototype.overloadedBoolean=!1;ue.prototype.property="";ue.prototype.spaceSeparated=!1;ue.prototype.space=void 0;let Hl=0;const R=Re(),K=Re(),Yt=Re(),_=Re(),X=Re(),De=Re(),fe=Re();function Re(){return 2**++Hl}const Jt=Object.freeze(Object.defineProperty({__proto__:null,boolean:R,booleanish:K,commaOrSpaceSeparated:fe,commaSeparated:De,number:_,overloadedBoolean:Yt,spaceSeparated:X},Symbol.toStringTag,{value:"Module"})),Tt=Object.keys(Jt);class sn extends ue{constructor(n,t,r,i){let o=-1;if(super(n,t),Mn(this,"space",i),typeof r=="number")for(;++o<Tt.length;){const l=Tt[o];Mn(this,Tt[o],(r&Jt[l])===Jt[l])}}}sn.prototype.defined=!0;function Mn(e,n,t){t&&(e[n]=t)}function Ve(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new sn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[Qt(r)]=r,t[Qt(o.attribute)]=r}return new ot(n,t,e.space)}const Pr=Ve({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:_,ariaColIndex:_,ariaColSpan:_,ariaControls:X,ariaCurrent:null,ariaDescribedBy:X,ariaDetails:null,ariaDisabled:K,ariaDropEffect:X,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:X,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:X,ariaLevel:_,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:X,ariaPlaceholder:null,ariaPosInSet:_,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:X,ariaRowCount:_,ariaRowIndex:_,ariaRowSpan:_,ariaSelected:K,ariaSetSize:_,ariaSort:null,ariaValueMax:_,ariaValueMin:_,ariaValueNow:_,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Lr(e,n){return n in e?e[n]:n}function jr(e,n){return Lr(e,n.toLowerCase())}const Vl=Ve({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:De,acceptCharset:X,accessKey:X,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alpha:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:X,autoFocus:R,autoPlay:R,blocking:X,capture:null,charSet:null,checked:R,cite:null,className:X,closedBy:null,colorSpace:null,cols:_,colSpan:_,command:null,commandFor:null,content:null,contentEditable:K,controls:R,controlsList:X,coords:_|De,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Yt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:X,height:_,hidden:Yt,high:_,href:null,hrefLang:null,htmlFor:X,httpEquiv:X,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:X,itemRef:X,itemScope:R,itemType:X,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:_,manifest:null,max:null,maxLength:_,media:null,method:null,min:null,minLength:_,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,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:R,optimum:_,pattern:null,ping:X,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:X,required:R,reversed:R,rows:_,rowSpan:_,sandbox:X,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootCustomElementRegistry:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shadowRootSerializable:R,shape:null,size:_,sizes:null,slot:null,span:_,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_,step:null,style:null,tabIndex:_,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:K,width:_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:X,axis:null,background:null,bgColor:null,border:_,borderColor:null,bottomMargin:_,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:_,leftMargin:_,link:null,longDesc:null,lowSrc:null,marginHeight:_,marginWidth:_,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:_,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:R,disablePictureInPicture:R,disableRemotePlayback:R,exportParts:De,part:X,prefix:null,property:null,results:_,security:null,unselectable:null},space:"html",transform:jr}),Ul=Ve({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:fe,accentHeight:_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_,amplitude:_,arabicForm:null,ascent:_,attributeName:null,attributeType:null,azimuth:_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_,by:null,calcMode:null,capHeight:_,className:X,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:_,diffuseConstant:_,direction:null,display:null,dur:null,divisor:_,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:_,enableBackground:null,end:null,event:null,exponent:_,externalResourcesRequired:null,fill:null,fillOpacity:_,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:De,g2:De,glyphName:De,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_,horizOriginX:_,horizOriginY:_,id:null,ideographic:_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_,k:_,k1:_,k2:_,k3:_,k4:_,kernelMatrix:fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_,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:_,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:_,overlineThickness:_,paintOrder:null,panose1:null,path:null,pathLength:_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:X,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_,pointsAtY:_,pointsAtZ:_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fe,rev:fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fe,requiredFeatures:fe,requiredFonts:fe,requiredFormats:fe,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:_,specularExponent:_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_,strikethroughThickness:_,string:null,stroke:null,strokeDashArray:fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_,strokeOpacity:_,strokeWidth:null,style:null,surfaceScale:_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fe,tabIndex:_,tableValues:null,target:null,targetX:_,targetY:_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_,underlineThickness:_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_,values:null,vAlphabetic:_,vMathematical:_,vectorEffect:null,vHanging:_,vIdeographic:_,version:null,vertAdvY:_,vertOriginX:_,vertOriginY:_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Lr}),Dr=Ve({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Mr=Ve({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jr}),Rr=Ve({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),ql={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"},Wl=/[A-Z]/g,Rn=/-[a-z]/g,Ql=/^data[-\w.:]+$/i;function Yl(e,n){const t=Qt(n);let r=n,i=ue;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Ql.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Rn,Xl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Rn.test(o)){let l=o.replace(Wl,Jl);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=sn}return new i(r,n)}function Jl(e){return"-"+e.toLowerCase()}function Xl(e){return e.charAt(1).toUpperCase()}const Gl=zr([Pr,Vl,Dr,Mr,Rr],"html"),un=zr([Pr,Ul,Dr,Mr,Rr],"svg");function Kl(e){return e.join(" ").trim()}function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Be={},zt,Fn;function Zl(){if(Fn)return zt;Fn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\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,y){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];y=y||{};var E=1,A=1;function L(P){var v=P.match(n);v&&(E+=v.length);var M=P.lastIndexOf(s);A=~M?P.length-M:A+P.length}function D(){var P={line:E,column:A};return function(v){return v.position=new b(P),H(),v}}function b(P){this.start=P,this.end={line:E,column:A},this.source=y.source}b.prototype.content=S;function N(P){var v=new Error(y.source+":"+E+":"+A+": "+P);if(v.reason=P,v.filename=y.source,v.line=E,v.column=A,v.source=S,!y.silent)throw v}function U(P){var v=P.exec(S);if(v){var M=v[0];return L(M),S=S.slice(M.length),v}}function H(){U(t)}function x(P){var v;for(P=P||[];v=T();)v!==!1&&P.push(v);return P}function T(){var P=D();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var v=2;c!=S.charAt(v)&&(f!=S.charAt(v)||u!=S.charAt(v+1));)++v;if(v+=2,c===S.charAt(v-1))return N("End of comment missing");var M=S.slice(2,v-2);return A+=2,L(M),S=S.slice(v),A+=2,P({type:h,comment:M})}}function z(){var P=D(),v=U(r);if(v){if(T(),!U(i))return N("property missing ':'");var M=U(o),O=P({type:p,property:C(v[0].replace(e,c)),value:M?C(M[0].replace(e,c)):c});return U(l),O}}function W(){var P=[];x(P);for(var v;v=z();)v!==!1&&(P.push(v),x(P));return P}return H(),W()}function C(S){return S?S.replace(a,c):c}return zt=g,zt}var Nn;function eo(){if(Nn)return Be;Nn=1;var e=Be&&Be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Be,"__esModule",{value:!0}),Be.default=t;const n=e(Zl());function t(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,n.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 Be}var Ye={},On;function to(){if(On)return Ye;On=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||t.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(n,l))};return Ye.camelCase=s,Ye}var Je,Bn;function no(){if(Bn)return Je;Bn=1;var e=Je&&Je.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(eo()),t=to();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,s){a&&s&&(l[(0,t.camelCase)(a,o)]=s)}),l}return r.default=r,Je=r,Je}var ro=no();const io=Fr(ro),Nr=Or("end"),cn=Or("start");function Or(e){return n;function n(t){const r=t&&t.position&&t.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 lo(e){const n=cn(e),t=Nr(e);if(n&&t)return{start:n,end:t}}function tt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?$n(e.position):"start"in e||"end"in e?$n(e):"line"in e||"column"in e?Xt(e):""}function Xt(e){return Hn(e&&e.line)+":"+Hn(e&&e.column)}function $n(e){return Xt(e&&e.start)+"-"+Xt(e&&e.end)}function Hn(e){return e&&typeof e=="number"?e:1}class le extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!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=tt(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}}le.prototype.file="";le.prototype.name="";le.prototype.reason="";le.prototype.message="";le.prototype.stack="";le.prototype.column=void 0;le.prototype.line=void 0;le.prototype.ancestors=void 0;le.prototype.cause=void 0;le.prototype.fatal=void 0;le.prototype.place=void 0;le.prototype.ruleId=void 0;le.prototype.source=void 0;const fn={}.hasOwnProperty,oo=new Map,ao=/[A-Z]/g,so=new Set(["table","tbody","thead","tfoot","tr"]),uo=new Set(["td","th"]),Br="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function co(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ko(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=xo(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?un:Gl,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=$r(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function $r(e,n,t){if(n.type==="element")return fo(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return po(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return mo(e,n,t);if(n.type==="mdxjsEsm")return ho(e,n);if(n.type==="root")return go(e,n,t);if(n.type==="text")return yo(e,n)}function fo(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=un,e.schema=i),e.ancestors.push(n);const o=Vr(e,n.tagName,!1),l=bo(e,n);let a=hn(e,n);return so.has(n.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!$l(s):!0})),Hr(e,l,o,n),pn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function po(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}it(e,n.position)}function ho(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);it(e,n.position)}function mo(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=un,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Vr(e,n.name,!0),l=wo(e,n),a=hn(e,n);return Hr(e,l,o,n),pn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function go(e,n,t){const r={};return pn(r,hn(e,n)),e.create(n,e.Fragment,r,t)}function yo(e,n){return n.value}function Hr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function pn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function xo(e,n,t){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?t:n;return a?u(o,l,a):u(o,l)}}function ko(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),s=cn(r);return n(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function bo(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&fn.call(n.properties,i)){const o=Co(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&uo.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function wo(e,n){const t={};for(const r of n.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(t,e.evaluater.evaluateExpression(a.argument))}else it(e,n.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 it(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function hn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:oo;for(;++r<n.children.length;){const o=n.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=$r(e,o,l);a!==void 0&&t.push(a)}return t}function Co(e,n,t){const r=Yl(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Rl(t):Kl(t)),r.property==="style"){let i=typeof t=="object"?t:So(e,String(t));return e.stylePropertyNameCase==="css"&&(i=vo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ql[r.property]||r.property:r.attribute,t]}}function So(e,n){try{return io(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new le("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=Br+"#cannot-parse-style-attribute",i}}function Vr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=jn(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=jn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return fn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);it(e)}function it(e,n){const t=new le("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Br+"#cannot-handle-mdx-estrees-without-createevaluater",t}function vo(e){const n={};let t;for(t in e)fn.call(e,t)&&(n[Ao(t)]=e[t]);return n}function Ao(e){let n=e.replace(ao,_o);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function _o(e){return"-"+e.toLowerCase()}const Pt={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"]},Eo={};function dn(e,n){const t=Eo,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ur(e,r,i)}function Ur(e,n,t){if(Io(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Vn(e.children,n,t)}return Array.isArray(e)?Vn(e,n,t):""}function Vn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ur(e[i],n,t);return r.join("")}function Io(e){return!!(e&&typeof e=="object")}const Un=document.createElement("i");function mn(e){const n="&"+e+";";Un.innerHTML=n;const t=Un.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function pe(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function he(e,n){return e.length>0?(pe(e,e.length,0,n),e):n}const qn={}.hasOwnProperty;function qr(e){const n={};let t=-1;for(;++t<e.length;)To(n,e[t]);return n}function To(e,n){let t;for(t in n){const i=(qn.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){qn.call(i,l)||(i[l]=[]);const a=o[l];zo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function zo(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);pe(e,0,0,r)}function Wr(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const oe=Ee(/[A-Za-z]/),ie=Ee(/[\dA-Za-z]/),Po=Ee(/[#-'*+\--9=?A-Z^-~]/);function kt(e){return e!==null&&(e<32||e===127)}const Gt=Ee(/\d/),Lo=Ee(/[\dA-Fa-f]/),jo=Ee(/[!-/:-@[-`{-~]/);function j(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function B(e){return e===-2||e===-1||e===32}const vt=Ee(/\p{P}|\p{S}/u),Me=Ee(/\s/);function Ee(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ue(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&ie(e.charCodeAt(t+1))&&ie(e.charCodeAt(t+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(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function q(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return B(s)?(e.enter(t),a(s)):n(s)}function a(s){return B(s)&&o++<i?(e.consume(s),a):(e.exit(t),n(s))}}const Do={tokenize:Mo};function Mo(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=s),t=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return j(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Ro={tokenize:Fo},Wn={tokenize:No};function Fo(e){const n=this,t=[];let r=0,i,o,l;return a;function a(A){if(r<t.length){const L=t[r];return n.containerState=L[1],e.attempt(L[0].continuation,s,u)(A)}return u(A)}function s(A){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&E();const L=n.events.length;let D=L,b;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){b=n.events[D][1].end;break}y(r);let N=L;for(;N<n.events.length;)n.events[N][1].end={...b},N++;return pe(n.events,D+1,0,n.events.slice(L)),n.events.length=N,u(A)}return a(A)}function u(A){if(r===t.length){if(!i)return h(A);if(i.currentConstruct&&i.currentConstruct.concrete)return g(A);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Wn,f,c)(A)}function f(A){return i&&E(),y(r),h(A)}function c(A){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,g(A)}function h(A){return n.containerState={},e.attempt(Wn,p,g)(A)}function p(A){return r++,t.push([n.currentConstruct,n.containerState]),h(A)}function g(A){if(A===null){i&&E(),y(0),e.consume(A);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),C(A)}function C(A){if(A===null){S(e.exit("chunkFlow"),!0),y(0),e.consume(A);return}return j(A)?(e.consume(A),S(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(A),C)}function S(A,L){const D=n.sliceStream(A);if(L&&D.push(null),A.previous=o,o&&(o.next=A),o=A,i.defineSkip(A.start),i.write(D),n.parser.lazy[A.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const N=n.events.length;let U=N,H,x;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){if(H){x=n.events[U][1].end;break}H=!0}for(y(r),b=N;b<n.events.length;)n.events[b][1].end={...x},b++;pe(n.events,U+1,0,n.events.slice(N)),n.events.length=b}}function y(A){let L=t.length;for(;L-- >A;){const D=t[L];n.containerState=D[1],D[0].exit.call(n,e)}t.length=A}function E(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function No(e,n,t){return q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function He(e){if(e===null||G(e)||Me(e))return 1;if(vt(e))return 2}function At(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const Kt={name:"attention",resolveAll:Oo,tokenize:Bo};function Oo(e,n){let t=-1,r,i,o,l,a,s,u,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[t][1].start};Qn(c,-s),Qn(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=he(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=he(u,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),u=he(u,At(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=he(u,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=he(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,pe(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Bo(e,n){const t=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||t.includes(s),h=!i||i===2&&f||t.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(f||!c)),n(s)}}function Qn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const $o={name:"autolink",tokenize:Ho};function Ho(e,n,t){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 oe(p)?(e.consume(p),l):p===64?t(p):u(p)}function l(p){return p===43||p===45||p===46||ie(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||ie(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"),n):p===null||p===32||p===60||kt(p)?t(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):Po(p)?(e.consume(p),u):t(p)}function f(p){return ie(p)?c(p):t(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"),n):h(p)}function h(p){if((p===45||ie(p))&&r++<63){const g=p===45?h:c;return e.consume(p),g}return t(p)}}const at={partial:!0,tokenize:Vo};function Vo(e,n,t){return r;function r(o){return B(o)?q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||j(o)?n(o):t(o)}}const Qr={continuation:{tokenize:qo},exit:Wo,name:"blockQuote",tokenize:Uo};function Uo(e,n,t){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 t(l)}function o(l){return B(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function qo(e,n,t){const r=this;return i;function i(l){return B(l)?q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Qr,n,t)(l)}}function Wo(e){e.exit("blockQuote")}const Yr={name:"characterEscape",tokenize:Qo};function Qo(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return jo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const Jr={name:"characterReference",tokenize:Yo};function Yo(e,n,t){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=ie,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=Lo,f):(e.enter("characterReferenceValue"),o=7,l=Gt,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===ie&&!mn(r.sliceSerialize(h))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<o?(e.consume(c),f):t(c)}}const Yn={partial:!0,tokenize:Xo},Jn={concrete:!0,name:"codeFenced",tokenize:Jo};function Jo(e,n,t){const r=this,i={partial:!0,tokenize:D};let o=0,l=0,a;return s;function s(b){return u(b)}function u(b){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?t(b):(e.exit("codeFencedFenceSequence"),B(b)?q(e,c,"whitespace")(b):c(b))}function c(b){return b===null||j(b)?(e.exit("codeFencedFence"),r.interrupt?n(b):e.check(Yn,C,L)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===null||j(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):B(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,p,"whitespace")(b)):b===96&&b===a?t(b):(e.consume(b),h)}function p(b){return b===null||j(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||j(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===a?t(b):(e.consume(b),g)}function C(b){return e.attempt(i,L,S)(b)}function S(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&B(b)?q(e,E,"linePrefix",o+1)(b):E(b)}function E(b){return b===null||j(b)?e.check(Yn,C,L)(b):(e.enter("codeFlowValue"),A(b))}function A(b){return b===null||j(b)?(e.exit("codeFlowValue"),E(b)):(e.consume(b),A)}function L(b){return e.exit("codeFenced"),n(b)}function D(b,N,U){let H=0;return x;function x(v){return b.enter("lineEnding"),b.consume(v),b.exit("lineEnding"),T}function T(v){return b.enter("codeFencedFence"),B(v)?q(b,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):z(v)}function z(v){return v===a?(b.enter("codeFencedFenceSequence"),W(v)):U(v)}function W(v){return v===a?(H++,b.consume(v),W):H>=l?(b.exit("codeFencedFenceSequence"),B(v)?q(b,P,"whitespace")(v):P(v)):U(v)}function P(v){return v===null||j(v)?(b.exit("codeFencedFence"),N(v)):U(v)}}}function Xo(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const Lt={name:"codeIndented",tokenize:Ko},Go={partial:!0,tokenize:Zo};function Ko(e,n,t){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):t(u)}function l(u){return u===null?s(u):j(u)?e.attempt(Go,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||j(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),n(u)}}function Zo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):j(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?n(l):j(l)?i(l):t(l)}}const ea={name:"codeText",previous:na,resolve:ta,tokenize:ra};function ta(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function na(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ra(e,n,t){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?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):j(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||j(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"),n(c)):(o.type="codeTextData",u(c))}}class ia{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));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(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Xe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Xe(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Xe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Xe(this.left,t.reverse())}}}function Xe(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Xr(e){const n={};let t=-1,r,i,o,l,a,s,u;const f=new ia(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-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(n,la(f,t)),t=n[t],u=!0);else if(r[1]._container){for(o=t,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,t),a.unshift(r),f.splice(i,t-i+1,a))}}return pe(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function la(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=t,g=0,C=0;const S=[C];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=t;++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&&(C=h+1,S.push(C),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 y=a.slice(S[h],S[h+1]),E=o.pop();s.push([E,E+y.length-1]),e.splice(E,2,y)}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 oa={resolve:sa,tokenize:ua},aa={partial:!0,tokenize:ca};function sa(e){return Xr(e),e}function ua(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):j(a)?e.check(aa,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function ca(e,n,t){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||j(l))return t(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?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Gr(e,n,t,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||kt(y)?t(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),C(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||j(y)?t(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function C(y){return!f&&(y===null||y===41||G(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(y)):f<u&&y===40?(e.consume(y),f++,C):y===41?(e.consume(y),f--,C):y===null||y===32||y===40||kt(y)?t(y):(e.consume(y),y===92?S:C)}function S(y){return y===40||y===41||y===92?(e.consume(y),C):C(y)}}function Kr(e,n,t,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?t(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):j(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||j(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!B(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function Zr(e,n,t,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):t(h)}function s(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):(e.enter(o),u(h))}function u(h){return h===l?(e.exit(o),s(l)):h===null?t(h):j(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||j(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 nt(e,n){let t;return r;function r(i){return j(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):B(i)?q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const fa={name:"definition",tokenize:ha},pa={partial:!0,tokenize:da};function ha(e,n,t){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Kr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):t(p)}function s(p){return G(p)?nt(e,u)(p):u(p)}function u(p){return Gr(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(pa,c,c)(p)}function c(p){return B(p)?q(e,h,"whitespace")(p):h(p)}function h(p){return p===null||j(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function da(e,n,t){return r;function r(a){return G(a)?nt(e,i)(a):t(a)}function i(a){return Zr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return B(a)?q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||j(a)?n(a):t(a)}}const ma={name:"hardBreakEscape",tokenize:ga};function ga(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return j(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const ya={name:"headingAtx",resolve:xa,tokenize:ka};function xa(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},pe(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function ka(e,n,t){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||G(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||j(f)?(e.exit("atxHeading"),n(f)):B(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||G(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const ba=["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"],Xn=["pre","script","style","textarea"],wa={concrete:!0,name:"htmlFlow",resolveTo:va,tokenize:Aa},Ca={partial:!0,tokenize:Ea},Sa={partial:!0,tokenize:_a};function va(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Aa(e,n,t){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,C):m===63?(e.consume(m),i=3,r.interrupt?n:d):oe(m)?(e.consume(m),l=String.fromCharCode(m),S):t(m)}function h(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,g):oe(m)?(e.consume(m),i=4,r.interrupt?n:d):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:d):t(m)}function g(m){const te="CDATA[";return m===te.charCodeAt(a++)?(e.consume(m),a===te.length?r.interrupt?n:z:g):t(m)}function C(m){return oe(m)?(e.consume(m),l=String.fromCharCode(m),S):t(m)}function S(m){if(m===null||m===47||m===62||G(m)){const te=m===47,Ie=l.toLowerCase();return!te&&!o&&Xn.includes(Ie)?(i=1,r.interrupt?n(m):z(m)):ba.includes(l.toLowerCase())?(i=6,te?(e.consume(m),y):r.interrupt?n(m):z(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):o?E(m):A(m))}return m===45||ie(m)?(e.consume(m),l+=String.fromCharCode(m),S):t(m)}function y(m){return m===62?(e.consume(m),r.interrupt?n:z):t(m)}function E(m){return B(m)?(e.consume(m),E):x(m)}function A(m){return m===47?(e.consume(m),x):m===58||m===95||oe(m)?(e.consume(m),L):B(m)?(e.consume(m),A):x(m)}function L(m){return m===45||m===46||m===58||m===95||ie(m)?(e.consume(m),L):D(m)}function D(m){return m===61?(e.consume(m),b):B(m)?(e.consume(m),D):A(m)}function b(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),s=m,N):B(m)?(e.consume(m),b):U(m)}function N(m){return m===s?(e.consume(m),s=null,H):m===null||j(m)?t(m):(e.consume(m),N)}function U(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||G(m)?D(m):(e.consume(m),U)}function H(m){return m===47||m===62||B(m)?A(m):t(m)}function x(m){return m===62?(e.consume(m),T):t(m)}function T(m){return m===null||j(m)?z(m):B(m)?(e.consume(m),T):t(m)}function z(m){return m===45&&i===2?(e.consume(m),M):m===60&&i===1?(e.consume(m),O):m===62&&i===4?(e.consume(m),ae):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),Q):j(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ca,ee,W)(m)):m===null||j(m)?(e.exit("htmlFlowData"),W(m)):(e.consume(m),z)}function W(m){return e.check(Sa,P,ee)(m)}function P(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),v}function v(m){return m===null||j(m)?W(m):(e.enter("htmlFlowData"),z(m))}function M(m){return m===45?(e.consume(m),d):z(m)}function O(m){return m===47?(e.consume(m),l="",Y):z(m)}function Y(m){if(m===62){const te=l.toLowerCase();return Xn.includes(te)?(e.consume(m),ae):z(m)}return oe(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),Y):z(m)}function Q(m){return m===93?(e.consume(m),d):z(m)}function d(m){return m===62?(e.consume(m),ae):m===45&&i===2?(e.consume(m),d):z(m)}function ae(m){return m===null||j(m)?(e.exit("htmlFlowData"),ee(m)):(e.consume(m),ae)}function ee(m){return e.exit("htmlFlow"),n(m)}}function _a(e,n,t){const r=this;return i;function i(l){return j(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Ea(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(at,n,t)}}const Ia={name:"htmlText",tokenize:Ta};function Ta(e,n,t){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),D):d===63?(e.consume(d),A):oe(d)?(e.consume(d),U):t(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):oe(d)?(e.consume(d),E):t(d)}function f(d){return d===45?(e.consume(d),p):t(d)}function c(d){return d===null?t(d):d===45?(e.consume(d),h):j(d)?(l=c,O(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?M(d):d===45?h(d):c(d)}function g(d){const ae="CDATA[";return d===ae.charCodeAt(o++)?(e.consume(d),o===ae.length?C:g):t(d)}function C(d){return d===null?t(d):d===93?(e.consume(d),S):j(d)?(l=C,O(d)):(e.consume(d),C)}function S(d){return d===93?(e.consume(d),y):C(d)}function y(d){return d===62?M(d):d===93?(e.consume(d),y):C(d)}function E(d){return d===null||d===62?M(d):j(d)?(l=E,O(d)):(e.consume(d),E)}function A(d){return d===null?t(d):d===63?(e.consume(d),L):j(d)?(l=A,O(d)):(e.consume(d),A)}function L(d){return d===62?M(d):A(d)}function D(d){return oe(d)?(e.consume(d),b):t(d)}function b(d){return d===45||ie(d)?(e.consume(d),b):N(d)}function N(d){return j(d)?(l=N,O(d)):B(d)?(e.consume(d),N):M(d)}function U(d){return d===45||ie(d)?(e.consume(d),U):d===47||d===62||G(d)?H(d):t(d)}function H(d){return d===47?(e.consume(d),M):d===58||d===95||oe(d)?(e.consume(d),x):j(d)?(l=H,O(d)):B(d)?(e.consume(d),H):M(d)}function x(d){return d===45||d===46||d===58||d===95||ie(d)?(e.consume(d),x):T(d)}function T(d){return d===61?(e.consume(d),z):j(d)?(l=T,O(d)):B(d)?(e.consume(d),T):H(d)}function z(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),i=d,W):j(d)?(l=z,O(d)):B(d)?(e.consume(d),z):(e.consume(d),P)}function W(d){return d===i?(e.consume(d),i=void 0,v):d===null?t(d):j(d)?(l=W,O(d)):(e.consume(d),W)}function P(d){return d===null||d===34||d===39||d===60||d===61||d===96?t(d):d===47||d===62||G(d)?H(d):(e.consume(d),P)}function v(d){return d===47||d===62||G(d)?H(d):t(d)}function M(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),n):t(d)}function O(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Y}function Y(d){return B(d)?q(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):Q(d)}function Q(d){return e.enter("htmlTextData"),l(d)}}const gn={name:"labelEnd",resolveAll:ja,resolveTo:Da,tokenize:Ma},za={tokenize:Ra},Pa={tokenize:Fa},La={tokenize:Na};function ja(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&pe(e,0,e.length,t),e}function Da(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);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,n],["enter",u,n]],a=he(a,e.slice(o+1,o+r+3)),a=he(a,[["enter",f,n]]),a=he(a,At(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=he(a,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),a=he(a,e.slice(l+1)),a=he(a,[["exit",s,n]]),pe(e,o,e.length,a),e}function Ma(e,n,t){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(ge(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):t(h)}function s(h){return h===40?e.attempt(za,f,l?f:c)(h):h===91?e.attempt(Pa,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(La,f,c)(h)}function f(h){return n(h)}function c(h){return o._balanced=!0,t(h)}}function Ra(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return G(c)?nt(e,o)(c):o(c)}function o(c){return c===41?f(c):Gr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return G(c)?nt(e,s)(c):f(c)}function a(c){return t(c)}function s(c){return c===34||c===39||c===40?Zr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return G(c)?nt(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function Fa(e,n,t){const r=this;return i;function i(a){return Kr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function Na(e,n,t){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"),n):t(o)}}const Oa={name:"labelStartImage",resolveAll:gn.resolveAll,tokenize:Ba};function Ba(e,n,t){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):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const $a={name:"labelStartLink",resolveAll:gn.resolveAll,tokenize:Ha};function Ha(e,n,t){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?t(l):n(l)}}const jt={name:"lineEnding",tokenize:Va};function Va(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,n,"linePrefix")}}const xt={name:"thematicBreak",tokenize:Ua};function Ua(e,n,t){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||j(u))?(e.exit("thematicBreak"),n(u)):t(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),B(u)?q(e,a,"whitespace")(u):a(u))}}const se={continuation:{tokenize:Ya},exit:Xa,name:"list",tokenize:Qa},qa={partial:!0,tokenize:Ga},Wa={partial:!0,tokenize:Ja};function Qa(e,n,t){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:Gt(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(xt,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return t(p)}function s(p){return Gt(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)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(at,r.interrupt?t:f,e.attempt(qa,h,c))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return B(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):t(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Ya(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(at,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!B(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(Wa,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(se,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Ja(e,n,t){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?n(o):t(o)}}function Xa(e){e.exit(this.containerState.type)}function Ga(e,n,t){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!B(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const Gn={name:"setextUnderline",resolveTo:Ka,tokenize:Za};function Ka(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);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,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function Za(e,n,t){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)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),B(u)?q(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||j(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const es={tokenize:ts};function ts(e){const n=this,t=e.attempt(at,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oa,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ns={resolveAll:ti()},rs=ei("string"),is=ei("text");function ei(e){return{resolveAll:ti(e==="text"?ls:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),s}function s(f){return u(f)?(t.exit("data"),o(f)):(t.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 ti(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function ls(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.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(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===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(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const os={42:se,43:se,45:se,48:se,49:se,50:se,51:se,52:se,53:se,54:se,55:se,56:se,57:se,62:Qr},as={91:fa},ss={[-2]:Lt,[-1]:Lt,32:Lt},us={35:ya,42:xt,45:[Gn,xt],60:wa,61:Gn,95:xt,96:Jn,126:Jn},cs={38:Jr,92:Yr},fs={[-5]:jt,[-4]:jt,[-3]:jt,33:Oa,38:Jr,42:Kt,60:[$o,Ia],91:$a,92:[ma,Yr],93:gn,95:Kt,96:ea},ps={null:[Kt,ns]},hs={null:[42,95]},ds={null:[]},ms=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:hs,contentInitial:as,disable:ds,document:os,flow:us,flowInitial:ss,insideSpan:ps,string:cs,text:fs},Symbol.toStringTag,{value:"Module"}));function gs(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:N(D),check:N(b),consume:E,enter:A,exit:L,interrupt:N(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:C,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=n.tokenize.call(u,s);return n.resolveAll&&o.push(n),u;function c(T){return l=he(l,T),S(),l[l.length-1]!==null?[]:(U(n,0),u.events=At(o,u.events,u),u.events)}function h(T,z){return xs(p(T),z)}function p(T){return ys(l,T)}function g(){const{_bufferIndex:T,_index:z,line:W,column:P,offset:v}=r;return{_bufferIndex:T,_index:z,line:W,column:P,offset:v}}function C(T){i[T.line]=T.column,x()}function S(){let T;for(;r._index<l.length;){const z=l[r._index];if(typeof z=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<z.length;)y(z.charCodeAt(r._bufferIndex));else y(z)}}function y(T){f=f(T)}function E(T){j(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,x()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=T}function A(T,z){const W=z||{};return W.type=T,W.start=g(),u.events.push(["enter",W,u]),a.push(W),W}function L(T){const z=a.pop();return z.end=g(),u.events.push(["exit",z,u]),z}function D(T,z){U(T,z.from)}function b(T,z){z.restore()}function N(T,z){return W;function W(P,v,M){let O,Y,Q,d;return Array.isArray(P)?ee(P):"tokenize"in P?ee([P]):ae(P);function ae(ne){return qe;function qe(ve){const Fe=ve!==null&&ne[ve],Ne=ve!==null&&ne.null,ut=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return ee(ut)(ve)}}function ee(ne){return O=ne,Y=0,ne.length===0?M:m(ne[Y])}function m(ne){return qe;function qe(ve){return d=H(),Q=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?Ie():ne.tokenize.call(z?Object.assign(Object.create(u),z):u,s,te,Ie)(ve)}}function te(ne){return T(Q,d),v}function Ie(ne){return d.restore(),++Y<O.length?m(O[Y]):M}}}function U(T,z){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&pe(u.events,z,u.events.length-z,T.resolve(u.events.slice(z),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function H(){const T=g(),z=u.previous,W=u.currentConstruct,P=u.events.length,v=Array.from(a);return{from:P,restore:M};function M(){r=T,u.previous=z,u.currentConstruct=W,u.events.length=P,a=v,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ys(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,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 xs(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];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=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function ks(e){const r={constructs:qr([ms,...(e||{}).extensions||[]]),content:i(Do),defined:[],document:i(Ro),flow:i(es),lazy:{},string:i(rs),text:i(is)};return r;function i(o){return l;function l(a){return gs(r,o,a)}}}function bs(e){for(;!Jr(e););return e}const Gn=/[\0\t\n\r]/g;function ws(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,h,p;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,n="",t&&(o.charCodeAt(0)===65279&&c++,t=void 0);c<o.length;){if(Gn.lastIndex=c,u=Gn.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){n=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),n&&s.push(n),s.push(null)),s}}const Cs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ss(e){return e.replace(Cs,vs)}function vs(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Wr(t.slice(o?2:1),o?16:10)}return dn(t)||e}const ni={}.hasOwnProperty;function As(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),_s(t)(bs(ks(t).document().write(ws()(e,n,!0))))}function _s(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(In),autolinkProtocol:H,autolinkEmail:H,atxHeading:o(An),blockQuote:o(Ne),characterEscape:H,characterReference:H,codeFenced:o(ut),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(ut,l),codeText:o(Wi,l),codeTextData:H,data:H,codeFlowValue:H,definition:o(Qi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Yi),hardBreakEscape:o(_n),hardBreakTrailing:o(_n),htmlFlow:o(En,l),htmlFlowData:H,htmlText:o(En,l),htmlTextData:H,image:o(Xi),label:l,link:o(In),listItem:o(Ji),listItemValue:h,listOrdered:o(Tn,c),listUnordered:o(Tn),paragraph:o(Gi),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(An),strong:o(Ki),thematicBreak:o(el)},exit:{atxHeading:s(),atxHeadingSequence:D,autolink:s(),autolinkEmail:Fe,autolinkProtocol:ve,blockQuote:s(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:ne,characterReference:qe,codeFenced:s(S),codeFencedFence:C,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:x,codeIndented:s(y),codeText:s(v),codeTextData:x,data:x,definition:s(),definitionDestinationString:L,definitionLabelString:E,definitionTitleString:A,emphasis:s(),hardBreakEscape:s(z),hardBreakTrailing:s(z),htmlFlow:s(W),htmlFlowData:x,htmlText:s(P),htmlTextData:x,image:s(O),label:Q,labelText:Y,lineEnding:T,link:s(M),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:te,resourceDestinationString:d,resourceTitleString:ae,resource:ee,setextHeading:s(U),setextHeadingLineSequence:N,setextHeadingText:b,strong:s(),thematicBreak:s()}};ri(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(w){let I={type:"root",children:[]};const F={stack:[I],tokenStack:[],config:n,enter:a,exit:u,buffer:l,resume:f,data:t},V=[];let X=-1;for(;++X<w.length;)if(w[X][1].type==="listOrdered"||w[X][1].type==="listUnordered")if(w[X][0]==="enter")V.push(X);else{const de=V.pop();X=i(w,de,X)}for(X=-1;++X<w.length;){const de=n[w[X][0]];ni.call(de,w[X][1].type)&&de[w[X][1].type].call(Object.assign({sliceSerialize:w[X][2].sliceSerialize},F),w[X][1])}if(F.tokenStack.length>0){const de=F.tokenStack[F.tokenStack.length-1];(de[1]||Kn).call(F,void 0,de[0])}for(I.position={start:Ae(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:Ae(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},X=-1;++X<n.transforms.length;)I=n.transforms[X](I)||I;return I}function i(w,I,F){let V=I-1,X=-1,de=!1,Te,ke,We,Qe;for(;++V<=F;){const ce=w[V];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?X++:X--,Qe=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&(Te&&!Qe&&!X&&!We&&(We=V),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!X&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||X===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if(Te){let Oe=V;for(ke=void 0;Oe--;){const be=w[Oe];if(be[1].type==="lineEnding"||be[1].type==="lineEndingBlank"){if(be[0]==="exit")continue;ke&&(w[ke][1].type="lineEndingBlank",de=!0),be[1].type="lineEnding",ke=Oe}else if(!(be[1].type==="linePrefix"||be[1].type==="blockQuotePrefix"||be[1].type==="blockQuotePrefixWhitespace"||be[1].type==="blockQuoteMarker"||be[1].type==="listItemIndent"))break}We&&(!ke||We<ke)&&(Te._spread=!0),Te.end=Object.assign({},ke?w[ke][1].start:ce[1].end),w.splice(ke||V,0,["exit",Te,ce[2]]),V++,F++}if(ce[1].type==="listItemPrefix"){const Oe={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};Te=Oe,w.splice(V,0,["enter",Oe,ce[2]]),V++,F++,We=void 0,Qe=!0}}}return w[I][1]._spread=de,F}function o(w,I){return F;function F(V){a.call(this,w(V),V),I&&I.call(this,V)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,I,F){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([I,F||void 0]),w.position={start:Ae(I.start),end:void 0}}function s(w){return I;function I(F){w&&w.call(this,F),u.call(this,F)}}function u(w,I){const F=this.stack.pop(),V=this.tokenStack.pop();if(V)V[0].type!==w.type&&(I?I.call(this,w,V[0]):(V[1]||Kn).call(this,w,V[0]));else throw new Error("Cannot close `"+w.type+"` ("+tt({start:w.start,end:w.end})+"): it’s not open");F.position.end=Ae(w.end)}function f(){return hn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(w){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function p(){const w=this.resume(),I=this.stack[this.stack.length-1];I.lang=w}function g(){const w=this.resume(),I=this.stack[this.stack.length-1];I.meta=w}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/(\r?\n|\r)$/g,"")}function E(w){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(w)).toLowerCase()}function A(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function L(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function D(w){const I=this.stack[this.stack.length-1];if(!I.depth){const F=this.sliceSerialize(w).length;I.depth=F}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function N(w){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function H(w){const F=this.stack[this.stack.length-1].children;let V=F[F.length-1];(!V||V.type!=="text")&&(V=Zi(),V.position={start:Ae(w.start),end:void 0},F.push(V)),this.stack.push(V)}function x(w){const I=this.stack.pop();I.value+=this.sliceSerialize(w),I.position.end=Ae(w.end)}function T(w){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=I.children[I.children.length-1];F.position.end=Ae(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(H.call(this,w),x.call(this,w))}function z(){this.data.atHardBreak=!0}function W(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function P(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function v(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function M(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function O(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function Y(w){const I=this.sliceSerialize(w),F=this.stack[this.stack.length-2];F.label=Ss(I),F.identifier=ge(I).toLowerCase()}function Q(){const w=this.stack[this.stack.length-1],I=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const V=w.children;F.children=V}else F.alt=I}function d(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function ae(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function ee(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function te(w){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Ie(w){this.data.characterReferenceType=w.type}function ne(w){const I=this.sliceSerialize(w),F=this.data.characterReferenceType;let V;F?(V=Wr(I,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):V=dn(I);const X=this.stack[this.stack.length-1];X.value+=V}function qe(w){const I=this.stack.pop();I.position.end=Ae(w.end)}function ve(w){x.call(this,w);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(w)}function Fe(w){x.call(this,w);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(w)}function Ne(){return{type:"blockquote",children:[]}}function ut(){return{type:"code",lang:null,meta:null,value:""}}function Wi(){return{type:"inlineCode",value:""}}function Qi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Yi(){return{type:"emphasis",children:[]}}function An(){return{type:"heading",depth:0,children:[]}}function _n(){return{type:"break"}}function En(){return{type:"html",value:""}}function Xi(){return{type:"image",title:null,url:"",alt:null}}function In(){return{type:"link",title:null,url:"",children:[]}}function Tn(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Ji(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Gi(){return{type:"paragraph",children:[]}}function Ki(){return{type:"strong",children:[]}}function Zi(){return{type:"text",value:""}}function el(){return{type:"thematicBreak"}}}function Ae(e){return{line:e.line,column:e.column,offset:e.offset}}function ri(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ri(e,r):Es(e,r)}}function Es(e,n){let t;for(t in n)if(ni.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Kn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+tt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+tt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+tt({start:n.start,end:n.end})+") is still open")}function Is(e){const n=this;n.parser=t;function t(r){return As(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ts(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function zs(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
26
|
+
`;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function ks(e){const r={constructs:qr([ms,...(e||{}).extensions||[]]),content:i(Do),defined:[],document:i(Ro),flow:i(es),lazy:{},string:i(rs),text:i(is)};return r;function i(o){return l;function l(a){return gs(r,o,a)}}}function bs(e){for(;!Xr(e););return e}const Kn=/[\0\t\n\r]/g;function ws(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,h,p;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,n="",t&&(o.charCodeAt(0)===65279&&c++,t=void 0);c<o.length;){if(Kn.lastIndex=c,u=Kn.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){n=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),n&&s.push(n),s.push(null)),s}}const Cs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ss(e){return e.replace(Cs,vs)}function vs(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Wr(t.slice(o?2:1),o?16:10)}return mn(t)||e}const ni={}.hasOwnProperty;function As(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),_s(t)(bs(ks(t).document().write(ws()(e,n,!0))))}function _s(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Tn),autolinkProtocol:H,autolinkEmail:H,atxHeading:o(_n),blockQuote:o(Ne),characterEscape:H,characterReference:H,codeFenced:o(ut),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(ut,l),codeText:o(Wi,l),codeTextData:H,data:H,codeFlowValue:H,definition:o(Qi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Yi),hardBreakEscape:o(En),hardBreakTrailing:o(En),htmlFlow:o(In,l),htmlFlowData:H,htmlText:o(In,l),htmlTextData:H,image:o(Ji),label:l,link:o(Tn),listItem:o(Xi),listItemValue:h,listOrdered:o(zn,c),listUnordered:o(zn),paragraph:o(Gi),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(_n),strong:o(Ki),thematicBreak:o(el)},exit:{atxHeading:s(),atxHeadingSequence:D,autolink:s(),autolinkEmail:Fe,autolinkProtocol:ve,blockQuote:s(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:ne,characterReference:qe,codeFenced:s(S),codeFencedFence:C,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:x,codeIndented:s(y),codeText:s(v),codeTextData:x,data:x,definition:s(),definitionDestinationString:L,definitionLabelString:E,definitionTitleString:A,emphasis:s(),hardBreakEscape:s(z),hardBreakTrailing:s(z),htmlFlow:s(W),htmlFlowData:x,htmlText:s(P),htmlTextData:x,image:s(O),label:Q,labelText:Y,lineEnding:T,link:s(M),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:te,resourceDestinationString:d,resourceTitleString:ae,resource:ee,setextHeading:s(U),setextHeadingLineSequence:N,setextHeadingText:b,strong:s(),thematicBreak:s()}};ri(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(w){let I={type:"root",children:[]};const F={stack:[I],tokenStack:[],config:n,enter:a,exit:u,buffer:l,resume:f,data:t},V=[];let J=-1;for(;++J<w.length;)if(w[J][1].type==="listOrdered"||w[J][1].type==="listUnordered")if(w[J][0]==="enter")V.push(J);else{const de=V.pop();J=i(w,de,J)}for(J=-1;++J<w.length;){const de=n[w[J][0]];ni.call(de,w[J][1].type)&&de[w[J][1].type].call(Object.assign({sliceSerialize:w[J][2].sliceSerialize},F),w[J][1])}if(F.tokenStack.length>0){const de=F.tokenStack[F.tokenStack.length-1];(de[1]||Zn).call(F,void 0,de[0])}for(I.position={start:Ae(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:Ae(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<n.transforms.length;)I=n.transforms[J](I)||I;return I}function i(w,I,F){let V=I-1,J=-1,de=!1,Te,ke,We,Qe;for(;++V<=F;){const ce=w[V];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?J++:J--,Qe=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&(Te&&!Qe&&!J&&!We&&(We=V),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!J&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||J===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if(Te){let Oe=V;for(ke=void 0;Oe--;){const be=w[Oe];if(be[1].type==="lineEnding"||be[1].type==="lineEndingBlank"){if(be[0]==="exit")continue;ke&&(w[ke][1].type="lineEndingBlank",de=!0),be[1].type="lineEnding",ke=Oe}else if(!(be[1].type==="linePrefix"||be[1].type==="blockQuotePrefix"||be[1].type==="blockQuotePrefixWhitespace"||be[1].type==="blockQuoteMarker"||be[1].type==="listItemIndent"))break}We&&(!ke||We<ke)&&(Te._spread=!0),Te.end=Object.assign({},ke?w[ke][1].start:ce[1].end),w.splice(ke||V,0,["exit",Te,ce[2]]),V++,F++}if(ce[1].type==="listItemPrefix"){const Oe={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};Te=Oe,w.splice(V,0,["enter",Oe,ce[2]]),V++,F++,We=void 0,Qe=!0}}}return w[I][1]._spread=de,F}function o(w,I){return F;function F(V){a.call(this,w(V),V),I&&I.call(this,V)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,I,F){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([I,F||void 0]),w.position={start:Ae(I.start),end:void 0}}function s(w){return I;function I(F){w&&w.call(this,F),u.call(this,F)}}function u(w,I){const F=this.stack.pop(),V=this.tokenStack.pop();if(V)V[0].type!==w.type&&(I?I.call(this,w,V[0]):(V[1]||Zn).call(this,w,V[0]));else throw new Error("Cannot close `"+w.type+"` ("+tt({start:w.start,end:w.end})+"): it’s not open");F.position.end=Ae(w.end)}function f(){return dn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(w){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function p(){const w=this.resume(),I=this.stack[this.stack.length-1];I.lang=w}function g(){const w=this.resume(),I=this.stack[this.stack.length-1];I.meta=w}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/(\r?\n|\r)$/g,"")}function E(w){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(w)).toLowerCase()}function A(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function L(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function D(w){const I=this.stack[this.stack.length-1];if(!I.depth){const F=this.sliceSerialize(w).length;I.depth=F}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function N(w){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function H(w){const F=this.stack[this.stack.length-1].children;let V=F[F.length-1];(!V||V.type!=="text")&&(V=Zi(),V.position={start:Ae(w.start),end:void 0},F.push(V)),this.stack.push(V)}function x(w){const I=this.stack.pop();I.value+=this.sliceSerialize(w),I.position.end=Ae(w.end)}function T(w){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=I.children[I.children.length-1];F.position.end=Ae(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(H.call(this,w),x.call(this,w))}function z(){this.data.atHardBreak=!0}function W(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function P(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function v(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function M(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function O(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function Y(w){const I=this.sliceSerialize(w),F=this.stack[this.stack.length-2];F.label=Ss(I),F.identifier=ge(I).toLowerCase()}function Q(){const w=this.stack[this.stack.length-1],I=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const V=w.children;F.children=V}else F.alt=I}function d(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function ae(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function ee(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function te(w){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Ie(w){this.data.characterReferenceType=w.type}function ne(w){const I=this.sliceSerialize(w),F=this.data.characterReferenceType;let V;F?(V=Wr(I,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):V=mn(I);const J=this.stack[this.stack.length-1];J.value+=V}function qe(w){const I=this.stack.pop();I.position.end=Ae(w.end)}function ve(w){x.call(this,w);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(w)}function Fe(w){x.call(this,w);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(w)}function Ne(){return{type:"blockquote",children:[]}}function ut(){return{type:"code",lang:null,meta:null,value:""}}function Wi(){return{type:"inlineCode",value:""}}function Qi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Yi(){return{type:"emphasis",children:[]}}function _n(){return{type:"heading",depth:0,children:[]}}function En(){return{type:"break"}}function In(){return{type:"html",value:""}}function Ji(){return{type:"image",title:null,url:"",alt:null}}function Tn(){return{type:"link",title:null,url:"",children:[]}}function zn(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Xi(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Gi(){return{type:"paragraph",children:[]}}function Ki(){return{type:"strong",children:[]}}function Zi(){return{type:"text",value:""}}function el(){return{type:"thematicBreak"}}}function Ae(e){return{line:e.line,column:e.column,offset:e.offset}}function ri(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ri(e,r):Es(e,r)}}function Es(e,n){let t;for(t in n)if(ni.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Zn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+tt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+tt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+tt({start:n.start,end:n.end})+") is still open")}function Is(e){const n=this;n.parser=t;function t(r){return As(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ts(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function zs(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
27
27
|
`}]}function Ps(e,n){const t=n.value?n.value+`
|
|
28
28
|
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function Ls(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function js(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ds(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Ue(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:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,u),e.applyData(n,u)}function Ms(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Rs(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function ii(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),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 Fs(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return ii(e,n);const i={src:Ue(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function Ns(e,n){const t={src:Ue(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Os(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Bs(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return ii(e,n);const i={href:Ue(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function $s(e,n){const t={href:Ue(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Hs(e,n,t){const r=e.all(n),i=t?Vs(t):li(n),o={},l=[];if(typeof n.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:n.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(n,u),e.applyData(n,u)}function Vs(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=li(t[r])}return n}function li(e){const n=e.spread;return n??e.children.length>1}function Us(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.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")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function qs(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ws(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Qs(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ys(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=
|
|
30
|
+
`});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(n,u),e.applyData(n,u)}function Vs(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=li(t[r])}return n}function li(e){const n=e.spread;return n??e.children.length>1}function Us(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.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")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function qs(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ws(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Qs(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ys(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=cn(n.children[1]),s=Nr(n.children[n.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(n,o),e.applyData(n,o)}function Js(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let s=-1;const u=[];for(;++s<a;){const c=n.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(n,f),e.applyData(n,f)}function Xs(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const er=9,tr=32;function Gs(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const o=[];for(;r;)o.push(nr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(nr(n.slice(i),i>0,!1)),o.join("")}function nr(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===er||o===tr;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===er||o===tr;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ks(e,n){const t={type:"text",value:Gs(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Zs(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const eu={blockquote:Ts,break:zs,code:Ps,delete:Ls,emphasis:js,footnoteReference:Ds,heading:Ms,html:Rs,imageReference:Fs,image:Ns,inlineCode:Os,linkReference:Bs,link:$s,listItem:Hs,list:Us,paragraph:qs,root:Ws,strong:Qs,table:Ys,tableCell:Xs,tableRow:Js,text:Ks,thematicBreak:Zs,toml:ft,yaml:ft,definition:ft,footnoteDefinition:ft};function ft(){}const oi=-1,_t=0,rt=1,bt=2,yn=3,xn=4,kn=5,bn=6,ai=7,si=8,ui=typeof self=="object"?self:globalThis,rr=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ui[e](n)},tu=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case _t:case oi:return t(l,i);case rt:{const a=t([],i);for(const s of l)a.push(r(s));return a}case bt:{const a=t({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case yn:return t(new Date(l),i);case xn:{const{source:a,flags:s}=l;return t(new RegExp(a,s),i)}case kn:{const a=t(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case bn:{const a=t(new Set,i);for(const s of l)a.add(r(s));return a}case ai:{const{name:a,message:s}=l;return t(typeof ui[a]=="function"?rr(a,s):new Error(s),i)}case si:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(rr(o,l),i)};return r},ir=e=>tu(new Map,e)(0),je="",{toString:nu}={},{keys:ru}=Object,Ge=e=>{const n=typeof e;if(n!=="object"||!e)return[_t,n];const t=nu.call(e).slice(8,-1);switch(t){case"Array":return[rt,je];case"Object":return[bt,je];case"Date":return[yn,je];case"RegExp":return[xn,je];case"Map":return[kn,je];case"Set":return[bn,je];case"DataView":return[rt,t]}return t.includes("Array")?[rt,t]:e instanceof Error?[ai,e.name||"Error"]:[bt,t]},pt=([e,n])=>e===_t&&(n==="function"||n==="symbol"),iu=(e,n,t,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return t.set(a,s),s},o=l=>{if(t.has(l))return t.get(l);let[a,s]=Ge(l);switch(a){case _t:{let f=l;switch(s){case"bigint":a=si,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([oi],l)}return i([a,f],l)}case rt:{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 bt:{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(n&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const h of ru(l))(e||!pt(Ge(l[h])))&&f.push([o(h),o(l[h])]);return c}case yn:return i([a,isNaN(l.getTime())?je:l.toISOString()],l);case xn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case kn:{const f=[],c=i([a,f],l);for(const[h,p]of l)(e||!(pt(Ge(h))||pt(Ge(p))))&&f.push([o(h),o(p)]);return c}case bn:{const f=[],c=i([a,f],l);for(const h of l)(e||!pt(Ge(h)))&&f.push(o(h));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},lr=(e,{json:n,lossy:t}={})=>{const r=[];return iu(!(n||t),!!n,new Map,r)(e),r},wt=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?ir(lr(e,n)):structuredClone(e):(e,n)=>ir(lr(e,n));function lu(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function ou(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function au(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||lu,r=e.options.footnoteBackLabel||ou,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=Ue(c.toLowerCase());let p=0;const g=[],C=e.footnoteCounts.get(c);for(;C!==void 0&&++p<=C;){g.length>0&&g.push({type:"text",value:" "});let E=typeof t=="string"?t:t(s,p);typeof E=="string"&&(E={type:"text",value:E}),g.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const E=S.children[S.children.length-1];E&&E.type==="text"?E.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else f.push(...g);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...wt(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 Et=(function(e){if(e==null)return fu;if(typeof e=="function")return It(e);if(typeof e=="object")return Array.isArray(e)?su(e):uu(e);if(typeof e=="string")return cu(e);throw new Error("Expected function, string, or object as test")});function su(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Et(e[t]);return It(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function uu(e){const n=e;return It(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function cu(e){return It(n);function n(t){return t&&t.type===e}}function It(e){return n;function n(t,r,i){return!!(pu(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function fu(){return!0}function pu(e){return e!==null&&typeof e=="object"&&"type"in e}const ci=[],hu=!0,Zt=!1,du="skip";function fi(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=Et(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=ci,g,C,S;if((!n||o(s,u,f[f.length-1]||void 0))&&(p=mu(t(s,f)),p[0]===Zt))return p;if("children"in s&&s.children){const y=s;if(y.children&&p[0]!==du)for(C=(r?y.children.length:-1)+l,S=f.concat(y);C>-1&&C<y.children.length;){const E=y.children[C];if(g=a(E,C,S)(),g[0]===Zt)return g;C=typeof g[1]=="number"?g[1]:C+l}}return p}}}function mu(e){return Array.isArray(e)?e:typeof e=="number"?[hu,e]:e==null?ci:[e]}function
|
|
32
|
+
`}]}}const Et=(function(e){if(e==null)return fu;if(typeof e=="function")return It(e);if(typeof e=="object")return Array.isArray(e)?su(e):uu(e);if(typeof e=="string")return cu(e);throw new Error("Expected function, string, or object as test")});function su(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Et(e[t]);return It(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function uu(e){const n=e;return It(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function cu(e){return It(n);function n(t){return t&&t.type===e}}function It(e){return n;function n(t,r,i){return!!(pu(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function fu(){return!0}function pu(e){return e!==null&&typeof e=="object"&&"type"in e}const ci=[],hu=!0,Zt=!1,du="skip";function fi(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=Et(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=ci,g,C,S;if((!n||o(s,u,f[f.length-1]||void 0))&&(p=mu(t(s,f)),p[0]===Zt))return p;if("children"in s&&s.children){const y=s;if(y.children&&p[0]!==du)for(C=(r?y.children.length:-1)+l,S=f.concat(y);C>-1&&C<y.children.length;){const E=y.children[C];if(g=a(E,C,S)(),g[0]===Zt)return g;C=typeof g[1]=="number"?g[1]:C+l}}return p}}}function mu(e){return Array.isArray(e)?e:typeof e=="number"?[hu,e]:e==null?ci:[e]}function wn(e,n,t,r){let i,o,l;typeof n=="function"&&typeof t!="function"?(o=void 0,l=n,i=t):(o=n,l=t,i=r),fi(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 en={}.hasOwnProperty,gu={};function yu(e,n){const t=n||gu,r=new Map,i=new Map,o=new Map,l={...eu,...t.handlers},a={all:u,applyData:ku,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:t,patch:xu,wrap:wu};return wn(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(en.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:C,...S}=f,y=wt(S);return y.children=a.all(f),y}return wt(f)}return(a.options.unknownHandler||bu)(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=or(g.value)),!Array.isArray(g)&&g.type==="element")){const C=g.children[0];C&&C.type==="text"&&(C.value=or(C.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function xu(e,n){e.position&&(n.position=lo(e))}function ku(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&o&&Object.assign(t.properties,wt(o)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function bu(e,n){const t=n.data||{},r="value"in n&&!(en.call(t,"hProperties")||en.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function wu(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
33
33
|
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
34
34
|
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
35
|
-
`}),t}function
|
|
36
|
-
`},i),o}function Cu(e,n){return e&&"run"in e?async function(t,r){const i=or(t,{file:r,...n});await e.run(i,r)}:function(t,r){return or(t,{file:r,...e||n})}}function ar(e){if(e)throw e}var Dt,sr;function Su(){if(sr)return Dt;sr=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},o=function(u){if(!u||n.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){t&&f.name==="__proto__"?t(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 Dt=function s(){var u,f,c,h,p,g,C=arguments[0],S=1,y=arguments.length,E=!1;for(typeof C=="boolean"&&(E=C,C=arguments[1]||{},S=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});S<y;++S)if(u=arguments[S],u!=null)for(f in u)c=a(C,f),h=a(u,f),C!==h&&(E&&h&&(o(h)||(p=i(h)))?(p?(p=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(C,{name:f,newValue:s(E,g,h)})):typeof h<"u"&&l(C,{name:f,newValue:h}));return C},Dt}var vu=Su();const Mt=Fr(vu);function tn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Au(){const e=[],n={run:t,use:r};return n;function t(...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?_u(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),n}}function _u(e,n){let t;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&&t)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){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const ye={basename:Eu,dirname:Iu,extname:Tu,join:zu,sep:"/"};function Eu(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');st(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Iu(e){if(st(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Tu(e){st(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function zu(...e){let n=-1,t;for(;++n<e.length;)st(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Pu(t)}function Pu(e){st(e);const n=e.codePointAt(0)===47;let t=Lu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Lu(e,n){let t="",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(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function st(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ju={cwd:Du};function Du(){return"/"}function nn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Mu(e){if(typeof e=="string")e=new URL(e);else if(!nn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Ru(e)}function Ru(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const Rt=["history","path","basename","stem","extname","dirname"];class pi{constructor(n){let t;n?nn(n)?t={path:n}:typeof n=="string"||Fu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":ju.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Rt.length;){const o=Rt[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Rt.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ye.basename(this.path):void 0}set basename(n){Nt(n,"basename"),Ft(n,"basename"),this.path=ye.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ye.dirname(this.path):void 0}set dirname(n){ur(this.basename,"dirname"),this.path=ye.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ye.extname(this.path):void 0}set extname(n){if(Ft(n,"extname"),ur(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ye.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){nn(n)&&(n=Mu(n)),Nt(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ye.basename(this.path,this.extname):void 0}set stem(n){Nt(n,"stem"),Ft(n,"stem"),this.path=ye.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new le(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Ft(e,n){if(e&&e.includes(ye.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ye.sep+"`")}function Nt(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function ur(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Fu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Nu=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Ou={}.hasOwnProperty;class wn extends Nu{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=Au()}copy(){const n=new wn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Mt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?($t("data",this.frozen),this.namespace[n]=t,this):Ou.call(this.namespace,n)&&this.namespace[n]||void 0:n?($t("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=ht(n),r=this.parser||this.Parser;return Ot("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Ot("process",this.parser||this.Parser),Bt("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=ht(n),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);Hu(g)?h.value=g:h.result=g,u(f,h)});function u(f,c){f||!c?l(f):o?o(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),Ot("processSync",this.parser||this.Parser),Bt("processSync",this.compiler||this.Compiler),this.process(n,i),fr("processSync","process",t),r;function i(o,l){t=!0,ar(o),r=l}}run(n,t,r){cr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=ht(t);i.run(n,s,u);function u(f,c,h){const p=c||n;f?a(f):l?l(p):r(void 0,p,h)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),fr("runSync","run",r),i;function o(l,a){ar(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=ht(t),i=this.compiler||this.Compiler;return Bt("stringify",i),cr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if($t("use",this.frozen),n!=null)if(typeof n=="function")s(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");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=Mt(!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 C=r[h][1];tn(C)&&tn(p)&&(p=Mt(!0,C,p)),r[h]=[u,p,...g]}}}}const Bu=new wn().freeze();function Ot(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $t(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cr(e){if(!tn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ht(e){return $u(e)?e:new pi(e)}function $u(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Hu(e){return typeof e=="string"||Vu(e)}function Vu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Uu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",pr=[],hr={allowDangerousHtml:!0},qu=/^(https?|ircs?|mailto|xmpp)$/i,Wu=[{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 Qu(e){const n=Yu(e),t=Xu(e);return Ju(n.runSync(n.parse(t),t),e)}function Yu(e){const n=e.rehypePlugins||pr,t=e.remarkPlugins||pr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...hr}:hr;return Bu().use(Is).use(t).use(Cu,r).use(n)}function Xu(e){const n=e.children||"",t=new pi;return typeof n=="string"&&(t.value=n),t}function Ju(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,s=n.urlTransform||Gu;for(const f of Wu)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Uu+f.id,void 0);return bn(e,u),co(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 Pt)if(Object.hasOwn(Pt,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],C=Pt[p];(C===null||C.includes(f.tagName))&&(f.properties[p]=s(String(g||""),p,f))}}if(f.type==="element"){let p=t?!t.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 Gu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||qu.test(e.slice(0,n))?e:""}function dr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function Ku(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Zu(e,n,t){const i=Et((t||{}).ignore||[]),o=ec(n);let l=-1;for(;++l<o.length;)fi(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 y=!1,E=[];h.lastIndex=0;let A=h.exec(u.value);for(;A;){const L=A.index,D={index:A.index,input:A.input,stack:[...f,u]};let b=p(...A,D);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?h.lastIndex=L+1:(g!==L&&E.push({type:"text",value:u.value.slice(g,L)}),Array.isArray(b)?E.push(...b):b&&E.push(b),g=L+A[0].length,y=!0),!h.global)break;A=h.exec(u.value)}return y?(g<u.value.length&&E.push({type:"text",value:u.value.slice(g)}),c.children.splice(S,1,...E)):E=[u],S+E.length}}function ec(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([tc(i[0]),nc(i[1])])}return n}function tc(e){return typeof e=="string"?new RegExp(Ku(e),"g"):e}function nc(e){return typeof e=="function"?e:function(){return e}}const Ht="phrasing",Vt=["autolink","link","image","label"];function rc(){return{transforms:[cc],enter:{literalAutolink:lc,literalAutolinkEmail:Ut,literalAutolinkHttp:Ut,literalAutolinkWww:Ut},exit:{literalAutolink:uc,literalAutolinkEmail:sc,literalAutolinkHttp:oc,literalAutolinkWww:ac}}}function ic(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ht,notInConstruct:Vt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ht,notInConstruct:Vt},{character:":",before:"[ps]",after:"\\/",inConstruct:Ht,notInConstruct:Vt}]}}function lc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ut(e){this.config.enter.autolinkProtocol.call(this,e)}function oc(e){this.config.exit.autolinkProtocol.call(this,e)}function ac(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function sc(e){this.config.exit.autolinkEmail.call(this,e)}function uc(e){this.exit(e)}function cc(e){Zu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,pc]],{ignore:["link","linkReference"]})}function fc(e,n,t,r,i){let o="";if(!hi(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!hc(t)))return!1;const l=dc(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function pc(e,n,t,r){return!hi(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function hc(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function dc(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=dr(e,"(");let o=dr(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function hi(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Me(t)||vt(t))&&(!n||t!==47)}di.peek=Sc;function mc(){this.buffer()}function gc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yc(){this.buffer()}function xc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kc(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ge(this.sliceSerialize(e)).toLowerCase(),t.label=n}function bc(e){this.exit(e)}function wc(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ge(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Cc(e){this.exit(e)}function Sc(){return"["}function di(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function vc(){return{enter:{gfmFootnoteCallString:mc,gfmFootnoteCall:gc,gfmFootnoteDefinitionLabelString:yc,gfmFootnoteDefinition:xc},exit:{gfmFootnoteCallString:kc,gfmFootnoteCall:bc,gfmFootnoteDefinitionLabelString:wc,gfmFootnoteDefinition:Cc}}}function Ac(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:di},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(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((n?`
|
|
37
|
-
`:" ")+o.indentLines(o.containerFlow(r,a.current()),n?mi:_c))),u(),s}}function _c(e,n,t){return n===0?e:mi(e,n,t)}function mi(e,n,t){return(t?"":" ")+e}const Ec=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gi.peek=Lc;function Ic(){return{canContainEols:["delete"],enter:{strikethrough:zc},exit:{strikethrough:Pc}}}function Tc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ec}],handlers:{delete:gi}}}function zc(e){this.enter({type:"delete",children:[]},e)}function Pc(e){this.exit(e)}function gi(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Lc(){return"~"}function jc(e){return e.length}function Dc(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||jc,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const C=[],S=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const E=Mc(e[f][y]);if(t.alignDelimiters!==!1){const A=i(E);S[y]=A,(s[y]===void 0||A>s[y])&&(s[y]=A)}C.push(E)}l[f]=C,a[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=
|
|
38
|
-
`)}function Mc(e){return e==null?"":String(e)}function
|
|
35
|
+
`}),t}function or(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function ar(e,n){const t=yu(e,n),r=t.one(e,void 0),i=au(t),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,n){return e&&"run"in e?async function(t,r){const i=ar(t,{file:r,...n});await e.run(i,r)}:function(t,r){return ar(t,{file:r,...e||n})}}function sr(e){if(e)throw e}var Dt,ur;function Su(){if(ur)return Dt;ur=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},o=function(u){if(!u||n.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){t&&f.name==="__proto__"?t(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 Dt=function s(){var u,f,c,h,p,g,C=arguments[0],S=1,y=arguments.length,E=!1;for(typeof C=="boolean"&&(E=C,C=arguments[1]||{},S=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});S<y;++S)if(u=arguments[S],u!=null)for(f in u)c=a(C,f),h=a(u,f),C!==h&&(E&&h&&(o(h)||(p=i(h)))?(p?(p=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(C,{name:f,newValue:s(E,g,h)})):typeof h<"u"&&l(C,{name:f,newValue:h}));return C},Dt}var vu=Su();const Mt=Fr(vu);function tn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Au(){const e=[],n={run:t,use:r};return n;function t(...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?_u(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),n}}function _u(e,n){let t;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&&t)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){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const ye={basename:Eu,dirname:Iu,extname:Tu,join:zu,sep:"/"};function Eu(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');st(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Iu(e){if(st(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Tu(e){st(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function zu(...e){let n=-1,t;for(;++n<e.length;)st(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Pu(t)}function Pu(e){st(e);const n=e.codePointAt(0)===47;let t=Lu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Lu(e,n){let t="",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(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function st(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ju={cwd:Du};function Du(){return"/"}function nn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Mu(e){if(typeof e=="string")e=new URL(e);else if(!nn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Ru(e)}function Ru(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const Rt=["history","path","basename","stem","extname","dirname"];class pi{constructor(n){let t;n?nn(n)?t={path:n}:typeof n=="string"||Fu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":ju.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Rt.length;){const o=Rt[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Rt.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ye.basename(this.path):void 0}set basename(n){Nt(n,"basename"),Ft(n,"basename"),this.path=ye.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ye.dirname(this.path):void 0}set dirname(n){cr(this.basename,"dirname"),this.path=ye.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ye.extname(this.path):void 0}set extname(n){if(Ft(n,"extname"),cr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ye.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){nn(n)&&(n=Mu(n)),Nt(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ye.basename(this.path,this.extname):void 0}set stem(n){Nt(n,"stem"),Ft(n,"stem"),this.path=ye.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new le(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Ft(e,n){if(e&&e.includes(ye.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ye.sep+"`")}function Nt(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function cr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Fu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Nu=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Ou={}.hasOwnProperty;class Cn extends Nu{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=Au()}copy(){const n=new Cn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Mt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?($t("data",this.frozen),this.namespace[n]=t,this):Ou.call(this.namespace,n)&&this.namespace[n]||void 0:n?($t("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=ht(n),r=this.parser||this.Parser;return Ot("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Ot("process",this.parser||this.Parser),Bt("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=ht(n),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);Hu(g)?h.value=g:h.result=g,u(f,h)});function u(f,c){f||!c?l(f):o?o(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),Ot("processSync",this.parser||this.Parser),Bt("processSync",this.compiler||this.Compiler),this.process(n,i),pr("processSync","process",t),r;function i(o,l){t=!0,sr(o),r=l}}run(n,t,r){fr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=ht(t);i.run(n,s,u);function u(f,c,h){const p=c||n;f?a(f):l?l(p):r(void 0,p,h)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),pr("runSync","run",r),i;function o(l,a){sr(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=ht(t),i=this.compiler||this.Compiler;return Bt("stringify",i),fr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if($t("use",this.frozen),n!=null)if(typeof n=="function")s(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");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=Mt(!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 C=r[h][1];tn(C)&&tn(p)&&(p=Mt(!0,C,p)),r[h]=[u,p,...g]}}}}const Bu=new Cn().freeze();function Ot(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $t(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fr(e){if(!tn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function pr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ht(e){return $u(e)?e:new pi(e)}function $u(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Hu(e){return typeof e=="string"||Vu(e)}function Vu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Uu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hr=[],dr={allowDangerousHtml:!0},qu=/^(https?|ircs?|mailto|xmpp)$/i,Wu=[{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 Qu(e){const n=Yu(e),t=Ju(e);return Xu(n.runSync(n.parse(t),t),e)}function Yu(e){const n=e.rehypePlugins||hr,t=e.remarkPlugins||hr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...dr}:dr;return Bu().use(Is).use(t).use(Cu,r).use(n)}function Ju(e){const n=e.children||"",t=new pi;return typeof n=="string"&&(t.value=n),t}function Xu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,s=n.urlTransform||Gu;for(const f of Wu)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Uu+f.id,void 0);return wn(e,u),co(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 Pt)if(Object.hasOwn(Pt,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],C=Pt[p];(C===null||C.includes(f.tagName))&&(f.properties[p]=s(String(g||""),p,f))}}if(f.type==="element"){let p=t?!t.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 Gu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||qu.test(e.slice(0,n))?e:""}function mr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function Ku(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Zu(e,n,t){const i=Et((t||{}).ignore||[]),o=ec(n);let l=-1;for(;++l<o.length;)fi(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 y=!1,E=[];h.lastIndex=0;let A=h.exec(u.value);for(;A;){const L=A.index,D={index:A.index,input:A.input,stack:[...f,u]};let b=p(...A,D);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?h.lastIndex=L+1:(g!==L&&E.push({type:"text",value:u.value.slice(g,L)}),Array.isArray(b)?E.push(...b):b&&E.push(b),g=L+A[0].length,y=!0),!h.global)break;A=h.exec(u.value)}return y?(g<u.value.length&&E.push({type:"text",value:u.value.slice(g)}),c.children.splice(S,1,...E)):E=[u],S+E.length}}function ec(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([tc(i[0]),nc(i[1])])}return n}function tc(e){return typeof e=="string"?new RegExp(Ku(e),"g"):e}function nc(e){return typeof e=="function"?e:function(){return e}}const Ht="phrasing",Vt=["autolink","link","image","label"];function rc(){return{transforms:[cc],enter:{literalAutolink:lc,literalAutolinkEmail:Ut,literalAutolinkHttp:Ut,literalAutolinkWww:Ut},exit:{literalAutolink:uc,literalAutolinkEmail:sc,literalAutolinkHttp:oc,literalAutolinkWww:ac}}}function ic(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ht,notInConstruct:Vt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ht,notInConstruct:Vt},{character:":",before:"[ps]",after:"\\/",inConstruct:Ht,notInConstruct:Vt}]}}function lc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ut(e){this.config.enter.autolinkProtocol.call(this,e)}function oc(e){this.config.exit.autolinkProtocol.call(this,e)}function ac(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function sc(e){this.config.exit.autolinkEmail.call(this,e)}function uc(e){this.exit(e)}function cc(e){Zu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,pc]],{ignore:["link","linkReference"]})}function fc(e,n,t,r,i){let o="";if(!hi(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!hc(t)))return!1;const l=dc(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function pc(e,n,t,r){return!hi(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function hc(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function dc(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=mr(e,"(");let o=mr(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function hi(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Me(t)||vt(t))&&(!n||t!==47)}di.peek=Sc;function mc(){this.buffer()}function gc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yc(){this.buffer()}function xc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kc(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ge(this.sliceSerialize(e)).toLowerCase(),t.label=n}function bc(e){this.exit(e)}function wc(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ge(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Cc(e){this.exit(e)}function Sc(){return"["}function di(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function vc(){return{enter:{gfmFootnoteCallString:mc,gfmFootnoteCall:gc,gfmFootnoteDefinitionLabelString:yc,gfmFootnoteDefinition:xc},exit:{gfmFootnoteCallString:kc,gfmFootnoteCall:bc,gfmFootnoteDefinitionLabelString:wc,gfmFootnoteDefinition:Cc}}}function Ac(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:di},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(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((n?`
|
|
37
|
+
`:" ")+o.indentLines(o.containerFlow(r,a.current()),n?mi:_c))),u(),s}}function _c(e,n,t){return n===0?e:mi(e,n,t)}function mi(e,n,t){return(t?"":" ")+e}const Ec=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gi.peek=Lc;function Ic(){return{canContainEols:["delete"],enter:{strikethrough:zc},exit:{strikethrough:Pc}}}function Tc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ec}],handlers:{delete:gi}}}function zc(e){this.enter({type:"delete",children:[]},e)}function Pc(e){this.exit(e)}function gi(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Lc(){return"~"}function jc(e){return e.length}function Dc(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||jc,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const C=[],S=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const E=Mc(e[f][y]);if(t.alignDelimiters!==!1){const A=i(E);S[y]=A,(s[y]===void 0||A>s[y])&&(s[y]=A)}C.push(E)}l[f]=C,a[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=gr(r[c]);else{const C=gr(r);for(;++c<u;)o[c]=C}c=-1;const h=[],p=[];for(;++c<u;){const C=o[c];let S="",y="";C===99?(S=":",y=":"):C===108?S=":":C===114&&(y=":");let E=t.alignDelimiters===!1?1:Math.max(1,s[c]-S.length-y.length);const A=S+"-".repeat(E)+y;t.alignDelimiters!==!1&&(E=S.length+E+y.length,E>s[c]&&(s[c]=E),p[c]=E),h[c]=A}l.splice(1,0,h),a.splice(1,0,p),f=-1;const g=[];for(;++f<l.length;){const C=l[f],S=a[f];c=-1;const y=[];for(;++c<u;){const E=C[c]||"";let A="",L="";if(t.alignDelimiters!==!1){const D=s[c]-(S[c]||0),b=o[c];b===114?A=" ".repeat(D):b===99?D%2?(A=" ".repeat(D/2+.5),L=" ".repeat(D/2-.5)):(A=" ".repeat(D/2),L=A):L=" ".repeat(D)}t.delimiterStart!==!1&&!c&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&E==="")&&(t.delimiterStart!==!1||c)&&y.push(" "),t.alignDelimiters!==!1&&y.push(A),y.push(E),t.alignDelimiters!==!1&&y.push(L),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&y.push("|")}g.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
|
|
38
|
+
`)}function Mc(e){return e==null?"":String(e)}function gr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Rc(e,n,t,r){const i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const l=t.indentLines(t.containerFlow(e,o.current()),Fc);return i(),l}function Fc(e,n,t){return">"+(t?"":" ")+e}function Nc(e,n){return yr(e,n.inConstruct,!0)&&!yr(e,n.notInConstruct,!1)}function yr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function xr(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
|
|
39
39
|
`&&Nc(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
40
40
|
`}function Oc(e,n){const t=String(e);let r=t.indexOf(n),i=r,o=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+n.length,r=t.indexOf(n,i);return l}function Bc(e,n){return!!(n.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 n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Hc(e,n,t,r){const i=$c(t),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Bc(e,t)){const c=t.enter("codeIndented"),h=t.indentLines(o,Vc);return c(),h}const a=t.createTracker(r),s=i.repeat(Math.max(Oc(o,i)+1,3)),u=t.enter("codeFenced");let f=a.move(s);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(t.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 Vc(e,n,t){return(t?"":" ")+e}function
|
|
44
|
-
`,...s.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function qc(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function lt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ct(e,n,t){const r=He(e),i=He(n);return r===void 0?i===void 0?t==="_"?{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}}yi.peek=Wc;function yi(e,n,t,r){const i=qc(t),o=t.enter("emphasis"),l=t.createTracker(r),a=l.move(i);let s=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=Ct(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=lt(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=Ct(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+lt(c));const p=l.move(i);return o(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Wc(e,n,t){return t.options.emphasis||"*"}function Qc(e,n){let t=!1;return
|
|
43
|
+
`)),f+=a.move(s),u(),f}function Vc(e,n,t){return(t?"":" ")+e}function Sn(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Uc(e,n,t,r){const i=Sn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("[");return u+=s.move(t.safe(t.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":`
|
|
44
|
+
`,...s.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function qc(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function lt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ct(e,n,t){const r=He(e),i=He(n);return r===void 0?i===void 0?t==="_"?{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}}yi.peek=Wc;function yi(e,n,t,r){const i=qc(t),o=t.enter("emphasis"),l=t.createTracker(r),a=l.move(i);let s=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=Ct(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=lt(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=Ct(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+lt(c));const p=l.move(i);return o(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Wc(e,n,t){return t.options.emphasis||"*"}function Qc(e,n){let t=!1;return wn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Zt}),!!((!e.depth||e.depth<3)&&dn(e)&&(n.options.setext||t))}function Yc(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(Qc(e,t)){const f=t.enter("headingSetext"),c=t.enter("phrasing"),h=t.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=t.enter("headingAtx"),s=t.enter("phrasing");o.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
|
|
49
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=lt(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),s(),a(),u}xi.peek=
|
|
49
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u=lt(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),s(),a(),u}xi.peek=Jc;function xi(e){return e.value||""}function Jc(){return"<"}ki.peek=Xc;function ki(e,n,t,r){const i=Sn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("![");return u+=s.move(t.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function Xc(){return"!"}bi.peek=Gc;function bi(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("![");const u=t.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Gc(){return"!"}wi.peek=Kc;function wi(e,n,t){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<t.unsafe.length;){const l=t.unsafe[o],a=t.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 Kc(){return"`"}function Ci(e,n){const t=dn(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Si.peek=Zc;function Si(e,n,t,r){const i=Sn(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,s;if(Ci(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),t.stack=f,c}a=t.enter("link"),s=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function Zc(e,n,t){return Ci(e,t)?"<":"["}vi.peek=ef;function vi(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("[");const u=t.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function ef(){return"["}function vn(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function tf(e){const n=vn(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function nf(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Ai(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function rf(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?nf(t):vn(t);const a=e.ordered?l==="."?")":".":tf(t);let s=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(s=!0),Ai(t)===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),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=o,i(),u}function lf(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function of(e,n,t,r){const i=lf(t);let o=t.bulletCurrent||vn(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=t.enter("listItem"),u=t.indentLines(t.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 af(e,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),i(),l}const sf=Et(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uf(e,n,t,r){return(e.children.some(function(l){return sf(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function cf(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}_i.peek=ff;function _i(e,n,t,r){const i=cf(t),o=t.enter("strong"),l=t.createTracker(r),a=l.move(i+i);let s=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=Ct(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=lt(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=Ct(r.after.charCodeAt(0),c,i);h.inside&&(s=s.slice(0,-1)+lt(c));const p=l.move(i+i);return o(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function ff(e,n,t){return t.options.strong||"*"}function pf(e,n,t,r){return t.safe(e.value,r)}function hf(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function df(e,n,t){const r=(Ai(t)+(t.options.ruleSpaces?" ":"")).repeat(hf(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Ei={blockquote:Rc,break:xr,code:Hc,definition:Uc,emphasis:yi,hardBreak:xr,heading:Yc,html:xi,image:ki,imageReference:bi,inlineCode:wi,link:Si,linkReference:vi,list:rf,listItem:of,paragraph:af,root:uf,strong:_i,text:pf,thematicBreak:df};function mf(){return{enter:{table:gf,tableData:kr,tableHeader:kr,tableRow:xf},exit:{codeText:kf,table:yf,tableData:qt,tableHeader:qt,tableRow:qt}}}function gf(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function yf(e){this.exit(e),this.data.inTable=void 0}function xf(e){this.enter({type:"tableRow",children:[]},e)}function qt(e){this.exit(e)}function kr(e){this.enter({type:"tableCell",children:[]},e)}function kf(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,bf));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function bf(e,n){return n==="|"?n:e}function wf(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";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,C,S){return u(f(p,C,S),p.align)}function a(p,g,C,S){const y=c(p,C,S),E=u([y]);return E.slice(0,E.indexOf(`
|
|
51
|
-
`))}function s(p,g,C,S){const y=C.enter("tableCell"),E=C.enter("phrasing"),A=C.containerPhrasing(p,{...S,before:o,after:o});return E(),y(),A}function u(p,g){return Dc(p,{align:g,alignDelimiters:r,padding:t,stringLength:i})}function f(p,g,C){const S=p.children;let y=-1;const E=[],A=g.enter("table");for(;++y<S.length;)E[y]=c(S[y],g,C);return A(),E}function c(p,g,C){const S=p.children;let y=-1;const E=[],A=g.enter("tableRow");for(;++y<S.length;)E[y]=s(S[y],p,g,C);return A(),E}function h(p,g,C){let S=Ei.inlineCode(p,g,C);return C.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Cf(){return{exit:{taskListCheckValueChecked:kr,taskListCheckValueUnchecked:kr,paragraph:vf}}}function Sf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Af}}}function kr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function vf(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Af(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let s=Ei.listItem(e,n,t,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function _f(){return[rc(),vc(),Ic(),mf(),Cf()]}function Ef(e){return{extensions:[ic(),Ac(e),Tc(),wf(e),Sf()]}}const If={tokenize:Df,partial:!0},Ii={tokenize:Mf,partial:!0},Ti={tokenize:Rf,partial:!0},zi={tokenize:Ff,partial:!0},Tf={tokenize:Nf,partial:!0},Pi={name:"wwwAutolink",tokenize:Lf,previous:ji},Li={name:"protocolAutolink",tokenize:jf,previous:Di},Se={name:"emailAutolink",tokenize:Pf,previous:Mi},xe={};function zf(){return{text:xe}}let ze=48;for(;ze<123;)xe[ze]=Se,ze++,ze===58?ze=65:ze===91&&(ze=97);xe[43]=Se;xe[45]=Se;xe[46]=Se;xe[95]=Se;xe[72]=[Se,Li];xe[104]=[Se,Li];xe[87]=[Se,Pi];xe[119]=[Se,Pi];function Pf(e,n,t){const r=this;let i,o;return l;function l(c){return!rn(c)||!Mi.call(r,r.previous)||vn(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return rn(c)?(e.consume(c),a):c===64?(e.consume(c),s):t(c)}function s(c){return c===46?e.check(Tf,f,u)(c):c===45||c===95||ie(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&&oe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function Lf(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!ji.call(r,r.previous)||vn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(If,e.attempt(Ii,e.attempt(Ti,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function jf(e,n,t){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Di.call(r,r.previous)&&!vn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):t(c)}function a(c){if(oe(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 t(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):t(c)}function u(c){return c===null||kt(c)||G(c)||Me(c)||vt(c)?t(c):e.attempt(Ii,e.attempt(Ti,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function Df(e,n,t){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):t(l)}function o(l){return l===null?t(l):n(l)}}function Mf(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(zi,s,a)(u):u===null||G(u)||Me(u)||u!==45&&vt(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?t(u):n(u)}}function Rf(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?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(zi,n,o)(l):l===null||G(l)||Me(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Ff(e,n,t){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||G(a)||Me(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||G(a)||Me(a)?n(a):r(a)}function o(a){return oe(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):oe(a)?(e.consume(a),l):t(a)}}function Nf(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return ie(o)?t(o):n(o)}}function ji(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||G(e)}function Di(e){return!oe(e)}function Mi(e){return!(e===47||rn(e))}function rn(e){return e===43||e===45||e===46||e===95||ie(e)}function vn(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Of={tokenize:Qf,partial:!0};function Bf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Uf,continuation:{tokenize:qf},exit:Wf}},text:{91:{name:"gfmFootnoteCall",tokenize:Vf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$f,resolveTo:Hf}}}}function $f(e,n,t){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 t(s);const u=ge(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),n(s))}}function Hf(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+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[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function Vf(e,n,t){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?t(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||G(c))return t(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(ge(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return G(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 Uf(e,n,t){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):t(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||G(g))return t(g);if(g===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return o=ge(r.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return G(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")):t(g)}function p(g){return n(g)}}function qf(e,n,t){return e.check(at,n,e.attempt(Of,n,t))}function Wf(e){e.exit("gfmFootnoteDefinition")}function Qf(e,n,t){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?n(o):t(o)}}function Yf(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!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&&pe(h,h.length,0,At(p,l.slice(u+1,s),a)),pe(h,h.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),pe(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 C=He(u);if(g===126)return c>1?s(g):(l.consume(g),c++,p);if(c<2&&!t)return s(g);const S=l.exit("strikethroughSequenceTemporary"),y=He(g);return S._open=!y||y===2&&!!C,S._close=!C||C===2&&!!y,a(g)}}}class Xf{constructor(){this.map=[]}add(n,t,r){Jf(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0}}function Jf(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function Gf(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-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"&&(t=!0);n+=1}return r}function Kf(){return{flow:{null:{name:"table",tokenize:Zf,resolveAll:ep}}}}function Zf(e,n,t){const r=this;let i=0,o=0,l;return a;function a(x){let T=r.events.length-1;for(;T>-1;){const P=r.events[T][1].type;if(P==="lineEnding"||P==="linePrefix")T--;else break}const z=T>-1?r.events[T][1].type:null,W=z==="tableHead"||z==="tableRow"?b:s;return W===b&&r.parser.lazy[r.now().line]?t(x):W(x)}function s(x){return e.enter("tableHead"),e.enter("tableRow"),u(x)}function u(x){return x===124||(l=!0,o+=1),f(x)}function f(x){return x===null?t(x):j(x)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):t(x):B(x)?q(e,f,"whitespace")(x):(o+=1,l&&(l=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(x)))}function c(x){return x===null||x===124||G(x)?(e.exit("data"),f(x)):(e.consume(x),x===92?h:c)}function h(x){return x===92||x===124?(e.consume(x),c):c(x)}function p(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(x):(e.enter("tableDelimiterRow"),l=!1,B(x)?q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):g(x))}function g(x){return x===45||x===58?S(x):x===124?(l=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),C):D(x)}function C(x){return B(x)?q(e,S,"whitespace")(x):S(x)}function S(x){return x===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),y):x===45?(o+=1,y(x)):x===null||j(x)?L(x):D(x)}function y(x){return x===45?(e.enter("tableDelimiterFiller"),E(x)):D(x)}function E(x){return x===45?(e.consume(x),E):x===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(x))}function A(x){return B(x)?q(e,L,"whitespace")(x):L(x)}function L(x){return x===124?g(x):x===null||j(x)?!l||i!==o?D(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(x)):D(x)}function D(x){return t(x)}function b(x){return e.enter("tableRow"),N(x)}function N(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),N):x===null||j(x)?(e.exit("tableRow"),n(x)):B(x)?q(e,N,"whitespace")(x):(e.enter("data"),U(x))}function U(x){return x===null||x===124||G(x)?(e.exit("data"),N(x)):(e.consume(x),x===92?H:U)}function H(x){return x===92||x===124?(e.consume(x),U):U(x)}}function ep(e,n){let t=-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 Xf;for(;++t<e.length;){const p=e[t],g=p[1];p[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(br(h,n,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(t,0,[["enter",u,n]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(t,0,[["enter",f,n]])),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=dt(h,n,o,i,void 0,c),o=[0,0,0,0]),l[2]=t)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=dt(h,n,o,i,void 0,c)),o=l,l=[o[1],t,0,0])):g.type==="tableHead"?(a=!0,s=t):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=t,o[1]!==0?(l[0]=l[1],c=dt(h,n,o,i,t,c)):l[1]!==0&&(c=dt(h,n,l,i,t,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=t)}for(s!==0&&br(h,n,s,u,f),h.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Gf(n.events,t))}return e}function dt(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},$e(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const s=$e(n.events,t[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const u=$e(n.events,t[2]),f=$e(n.events,t[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const h=n.events[t[2]],p=n.events[t[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){const g=t[2]+1,C=t[3]-t[2]-1;e.add(g,C,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(o.end=Object.assign({},$e(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function br(e,n,t,r,i){const o=[],l=$e(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function $e(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const tp={name:"tasklistCheck",tokenize:rp};function np(){return{text:{91:tp}}}function rp(e,n,t){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return G(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):t(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(s)}function a(s){return j(s)?n(s):B(s)?e.check({tokenize:ip},n,t)(s):t(s)}}function ip(e,n,t){return q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function lp(e){return qr([zf(),Bf(),Yf(e),Kf(),np()])}const op={};function ap(e){const n=this,t=e||op,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(lp(t)),o.push(_f()),l.push(Ef(t))}const sp="_wrapper_izvjy_1",up="_table_izvjy_15",cp="_th_izvjy_27",fp="_tr_izvjy_47",pp="_td_izvjy_63",Ke={wrapper:sp,table:up,th:cp,tr:fp,td:pp};function Ri({part:e}){return k.jsx("div",{className:Ke.wrapper,children:k.jsxs("table",{className:Ke.table,children:[k.jsx("thead",{children:k.jsx("tr",{children:e.columns.map(n=>k.jsx("th",{className:Ke.th,children:n},n))})}),k.jsx("tbody",{children:e.rows.map((n,t)=>k.jsx("tr",{className:Ke.tr,children:e.columns.map(r=>k.jsx("td",{className:Ke.td,children:String(n[r]??"")},r))},t))})]})})}const hp="_card_1gzm6_1",dp="_header_1gzm6_17",mp="_icon_1gzm6_31",gp="_title_1gzm6_45",yp="_description_1gzm6_57",xp="_cardResolved_1gzm6_71",kp="_resolvedBadge_1gzm6_79",bp="_actions_1gzm6_101",wp="_confirm_1gzm6_111",Cp="_cancel_1gzm6_143",me={card:hp,header:dp,icon:mp,title:gp,description:yp,cardResolved:xp,resolvedBadge:kp,actions:bp,confirm:wp,cancel:Cp};function Fi({part:e,onConfirm:n,onCancel:t}){const r=_e(),{proposal:i}=e,o=i.resolved==="confirmed"?r.proposalConfirmed:i.resolved==="cancelled"?r.proposalCancelled:i.resolved==="expired"?r.proposalExpired:null;return k.jsxs("div",{className:i.resolved?`${me.card} ${me.cardResolved}`:me.card,children:[k.jsxs("div",{className:me.header,children:[k.jsx("svg",{className:me.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:me.title,children:i.title})]}),i.description&&k.jsx("p",{className:me.description,children:i.description}),o?k.jsx("span",{className:me.resolvedBadge,children:o}):k.jsxs("div",{className:me.actions,children:[k.jsx("button",{className:me.confirm,onClick:()=>n(i.id,i.payload),children:i.confirmLabel??r.proposalConfirm}),k.jsx("button",{className:me.cancel,onClick:()=>t(i.id),children:i.cancelLabel??r.proposalCancel})]})]})}const Sp="_activity_1661l_1",vp="_indicator_1661l_25",Ap="_content_1661l_71",_p="_title_1661l_79",Ep="_description_1661l_89",Ze={activity:Sp,indicator:vp,content:Ap,title:_p,description:Ep};function Ni({part:e}){return k.jsxs("div",{className:Ze.activity,"data-status":e.status,children:[k.jsx("span",{className:Ze.indicator,"aria-hidden":"true"}),k.jsxs("div",{className:Ze.content,children:[k.jsx("div",{className:Ze.title,children:e.title}),e.description&&k.jsx("div",{className:Ze.description,children:e.description})]})]})}const Ip="_markdown_sznoh_1",Tp="_unknownPart_sznoh_167",zp="_errorText_sznoh_195",Pp="_errorIcon_sznoh_211",mt={markdown:Ip,unknownPart:Tp,errorText:zp,errorIcon:Pp};function Oi({part:e,onProposalConfirm:n,onProposalCancel:t,renderPart:r}){if(r){const i=r(e);if(i!=null)return k.jsx(k.Fragment,{children:i})}switch(e.type){case"text":return k.jsx("div",{className:mt.markdown,children:k.jsx(Qu,{remarkPlugins:[ap],children:e.text})});case"table":return k.jsx(Ri,{part:e});case"activity":return k.jsx(Ni,{part:e});case"proposal":return k.jsx(Fi,{part:e,onConfirm:n,onCancel:t});case"error":return k.jsxs("span",{className:mt.errorText,children:[k.jsx(Ml,{className:mt.errorIcon}),e.message]});default:return globalThis.process?.env?.NODE_ENV!=="production"?k.jsxs("div",{className:mt.unknownPart,children:["Unhandled part type: ",k.jsx("code",{children:e.type})," — pass a"," ",k.jsx("code",{children:"renderPart"})," prop to render it."]}):null}}const Lp="_wrapper_1jkxo_1",jp="_user_1jkxo_15",Dp="_assistant_1jkxo_23",Mp="_avatar_1jkxo_31",Rp="_bubble_1jkxo_77",Fp="_empty_1jkxo_121",Pe={wrapper:Lp,user:jp,assistant:Dp,avatar:Mp,bubble:Rp,empty:Fp};function Bi({message:e,onProposalConfirm:n,onProposalCancel:t,assistantIcon:r,renderPart:i}){const o=_e(),l=e.role==="user";return k.jsxs("div",{className:`${Pe.wrapper} ${l?Pe.user:Pe.assistant}`,children:[!l&&k.jsx("div",{className:Pe.avatar,"aria-hidden":"true",children:r??k.jsx(Tr,{})}),k.jsxs("div",{className:Pe.bubble,children:[e.parts.map((a,s)=>k.jsx(Oi,{part:a,onProposalConfirm:n,onProposalCancel:t,renderPart:i},s)),e.parts.length===0&&k.jsx("span",{className:Pe.empty})]}),l&&k.jsx("div",{className:Pe.avatar,children:o.userLabel})]})}const Np="_wrapper_1oco7_1",Op="_dot_1oco7_15",Bp="_connectingLabel_1oco7_37",et={wrapper:Np,dot:Op,connectingLabel:Bp};function $i({connecting:e=!1}){const n=_e();return k.jsxs("div",{className:et.wrapper,"aria-label":e?n.connectingMessage:n.typingMessage,children:[k.jsx("span",{className:et.dot}),k.jsx("span",{className:et.dot}),k.jsx("span",{className:et.dot}),e&&k.jsx("span",{className:et.connectingLabel,children:n.connectingMessage})]})}const $p="_list_ixto8_1",Hp="_empty_ixto8_21",Vp="_hint_ixto8_47",Up="_typing_ixto8_61",gt={list:$p,empty:Hp,hint:Vp,typing:Up};function Hi({messages:e,isLoading:n,isConnecting:t,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o,renderPart:l}){const a=_e(),s=$.useRef(null);return $.useEffect(()=>{s.current?.scrollIntoView({behavior:"smooth"})},[e,n]),k.jsxs("div",{className:gt.list,children:[e.length===0&&k.jsxs("div",{className:gt.empty,children:[k.jsx("p",{children:a.emptyStateText}),k.jsx("p",{className:gt.hint,children:k.jsx("em",{children:a.emptyStateHint})})]}),e.map(u=>k.jsx(Bi,{message:u,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o,renderPart:l},u.id)),n&&k.jsx("div",{className:gt.typing,children:k.jsx($i,{connecting:t})}),k.jsx("div",{ref:s})]})}const qp="_wrapper_ehrkb_1",Wp="_textarea_ehrkb_21",Qp="_toolbar_ehrkb_69",Yp="_actions_ehrkb_89",Xp="_actionBtn_ehrkb_103",Jp="_sendBtn_ehrkb_169",Gp="_spinnerIcon_ehrkb_231",Kp="_stopBtn_ehrkb_251",Zp="_stopIcon_ehrkb_297",we={wrapper:qp,textarea:Wp,toolbar:Qp,actions:Yp,actionBtn:Xp,sendBtn:Jp,spinnerIcon:Gp,stopBtn:Kp,stopIcon:Zp};function Vi({value:e,onChange:n,onSend:t,onStop:r,isLoading:i,placeholder:o,actions:l,sendIcon:a}){const s=_e(),u=$.useRef(null),f=$.useRef(!1);$.useEffect(()=>{f.current&&!i&&u.current?.focus(),f.current=i},[i]);const c=[{icon:k.jsx(Il,{}),label:s.actionAddFile},{icon:k.jsx(Tl,{}),label:s.actionQuickActions},{icon:k.jsx(zl,{}),label:s.actionNew},{icon:k.jsx(Pl,{}),label:s.actionHistory},{icon:k.jsx(Ll,{}),label:s.actionRules}],h=l??c,p=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),i||t())};return k.jsxs("div",{className:we.wrapper,children:[k.jsx("textarea",{ref:u,className:we.textarea,value:e,onChange:g=>n(g.target.value),onKeyDown:p,placeholder:o??s.inputPlaceholder,rows:3,"aria-label":s.sendMessage}),k.jsxs("div",{className:we.toolbar,children:[h.length>0&&k.jsx("div",{className:we.actions,children:h.map((g,C)=>k.jsxs("button",{className:we.actionBtn,type:"button",disabled:i,"aria-label":g.label,onClick:g.onClick,children:[g.icon,k.jsx("span",{children:g.label})]},C))}),i&&r?k.jsxs("button",{className:we.stopBtn,onClick:r,"aria-label":s.stopMessage,type:"button",children:[k.jsx("svg",{className:we.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:we.sendBtn,onClick:t,disabled:i||!e.trim(),"aria-label":s.sendMessage,type:"button",children:[i?k.jsx("svg",{className:we.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(El,{}),k.jsx("span",{children:s.sendMessage})]})]})]})}const eh="_wrapper_1e3w5_1",th="_icon_1e3w5_27",nh="_message_1e3w5_39",rh="_dismiss_1e3w5_47",yt={wrapper:eh,icon:th,message:nh,dismiss:rh};function Ui({message:e,onDismiss:n}){const t=_e();return k.jsxs("div",{className:yt.wrapper,role:"alert",children:[k.jsx("svg",{className:yt.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:yt.message,children:e}),n&&k.jsx("button",{className:yt.dismiss,onClick:n,"aria-label":t.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 ih="_chat_13051_1",lh={chat:ih};function qi({messages:e,input:n,isLoading:t,isConnecting:r,error:i,onInputChange:o,onSend:l,onStop:a,onProposalConfirm:s,onProposalCancel:u,placeholder:f,assistantIcon:c,actions:h,sendIcon:p,renderPart:g,className:C,style:S}){return k.jsxs("div",{className:[lh.chat,C].filter(Boolean).join(" "),style:S,children:[k.jsx(Hi,{messages:e,isLoading:t,isConnecting:r,onProposalConfirm:s,onProposalCancel:u,assistantIcon:c,renderPart:g}),i&&k.jsx(Ui,{message:i}),k.jsx(Vi,{value:n,onChange:o,onSend:l,onStop:a,isLoading:t,placeholder:f,actions:h,sendIcon:p})]})}const oh="_header_1saak_1",ah="_left_1saak_23",sh="_icon_1saak_35",uh="_title_1saak_45",ch="_resetBtn_1saak_57",fh="_actions_1saak_99",Le={header:oh,left:ah,icon:sh,title:uh,resetBtn:ch,actions:fh};function ph({title:e,onMinimize:n,isMinimized:t,icon:r,onReset:i}){const o=_e();return k.jsxs("div",{className:Le.header,children:[k.jsxs("div",{className:Le.left,children:[k.jsx("span",{className:Le.icon,"aria-hidden":"true",children:r??k.jsx(Tr,{})}),k.jsx("span",{className:Le.title,children:e??o.sidebarTitle})]}),(n||i)&&k.jsxs("div",{className:Le.actions,children:[i&&k.jsx("button",{className:Le.resetBtn,onClick:i,title:o.resetConversation,"aria-label":o.resetConversation,children:"↺"}),n&&k.jsx("button",{className:Le.resetBtn,onClick:n,title:t?o.expandSidebar:o.minimizeSidebar,"aria-label":t?o.expandSidebar:o.minimizeSidebar,children:t?k.jsx(Dl,{}):k.jsx(jl,{})})]})]})}const hh="_sidebar_u9ybt_1",dh="_minimized_u9ybt_39",wr={sidebar:hh,minimized:dh};function mh({title:e,icon:n,actions:t,sendIcon:r,height:i="60vh",className:o,style:l,onReset:a,renderPart:s}){const[u,f]=$.useState(!1),{messages:c,input:h,setInput:p,sendMessage:g,stop:C,isLoading:S,isConnecting:y,error:E,reset:A,confirmProposal:L,cancelProposal:D}=Ir(),b=a?()=>{A(),a()}:void 0;return k.jsxs("aside",{className:[wr.sidebar,u?wr.minimized:"",o].filter(Boolean).join(" "),style:{height:u?void 0:i,...l},children:[k.jsx(ph,{title:e,icon:n,onMinimize:()=>f(N=>!N),isMinimized:u,onReset:b}),!u&&k.jsx(qi,{messages:c,input:h,isLoading:S,isConnecting:y,error:E,onInputChange:p,onSend:g,onStop:C,onProposalConfirm:L,onProposalCancel:D,assistantIcon:n,actions:t,sendIcon:r,renderPart:s})]})}const gh="_list_j7fvh_1",yh="_item_j7fvh_19",xh="_chat_j7fvh_31",kh="_chatActive_j7fvh_71",bh="_title_j7fvh_79",wh="_date_j7fvh_99",Ch="_empty_j7fvh_163",Ce={list:gh,item:yh,chat:xh,chatActive:kh,title:bh,date:wh,delete:"_delete_j7fvh_111",empty:Ch};function Sh({chats:e,onSelect:n,activeChatId:t,onDelete:r}){const i=_e();return e.length===0?k.jsx("p",{className:Ce.empty,children:i.historyEmpty}):k.jsx("ul",{className:Ce.list,children:e.map(o=>k.jsxs("li",{className:Ce.item,children:[k.jsxs("button",{className:o.id===t?`${Ce.chat} ${Ce.chatActive}`:Ce.chat,onClick:()=>n(o.id),children:[k.jsx("span",{className:Ce.title,children:o.title}),k.jsx("span",{className:Ce.date,children:o.updatedAt.toLocaleDateString(void 0,{day:"numeric",month:"short"})})]}),r&&k.jsx("button",{className:Ce.delete,onClick:()=>r(o.id),"aria-label":i.historyDeleteChat,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"})})})]},o.id))})}exports.AiActivityPart=Ni;exports.AiChat=qi;exports.AiChatContext=St;exports.AiChatHistoryList=Sh;exports.AiChatProvider=Al;exports.AiError=Ui;exports.AiInput=Vi;exports.AiMessageBubble=Bi;exports.AiMessageList=Hi;exports.AiMessagePartRenderer=Oi;exports.AiProposalCard=Fi;exports.AiSidebar=mh;exports.AiTablePart=Ri;exports.AiTypingIndicator=$i;exports.JuneauProvider=Cl;exports.consumeStream=Wt;exports.createFetchStreamAdapter=gl;exports.createSseAdapter=hl;exports.delay=Z;exports.deserializeMessages=il;exports.getMessageText=Sr;exports.isProposalPart=ln;exports.juneauCs=_l;exports.juneauEn=on;exports.mockAdapter=ol;exports.serializeForStorage=nl;exports.serializeMessages=Cr;exports.trimChats=ll;exports.trimHistory=vr;exports.useAiChat=_r;exports.useAiChatContext=Ir;exports.useAiChatContextSafe=vl;
|
|
51
|
+
`))}function s(p,g,C,S){const y=C.enter("tableCell"),E=C.enter("phrasing"),A=C.containerPhrasing(p,{...S,before:o,after:o});return E(),y(),A}function u(p,g){return Dc(p,{align:g,alignDelimiters:r,padding:t,stringLength:i})}function f(p,g,C){const S=p.children;let y=-1;const E=[],A=g.enter("table");for(;++y<S.length;)E[y]=c(S[y],g,C);return A(),E}function c(p,g,C){const S=p.children;let y=-1;const E=[],A=g.enter("tableRow");for(;++y<S.length;)E[y]=s(S[y],p,g,C);return A(),E}function h(p,g,C){let S=Ei.inlineCode(p,g,C);return C.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Cf(){return{exit:{taskListCheckValueChecked:br,taskListCheckValueUnchecked:br,paragraph:vf}}}function Sf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Af}}}function br(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function vf(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Af(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let s=Ei.listItem(e,n,t,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function _f(){return[rc(),vc(),Ic(),mf(),Cf()]}function Ef(e){return{extensions:[ic(),Ac(e),Tc(),wf(e),Sf()]}}const If={tokenize:Df,partial:!0},Ii={tokenize:Mf,partial:!0},Ti={tokenize:Rf,partial:!0},zi={tokenize:Ff,partial:!0},Tf={tokenize:Nf,partial:!0},Pi={name:"wwwAutolink",tokenize:Lf,previous:ji},Li={name:"protocolAutolink",tokenize:jf,previous:Di},Se={name:"emailAutolink",tokenize:Pf,previous:Mi},xe={};function zf(){return{text:xe}}let ze=48;for(;ze<123;)xe[ze]=Se,ze++,ze===58?ze=65:ze===91&&(ze=97);xe[43]=Se;xe[45]=Se;xe[46]=Se;xe[95]=Se;xe[72]=[Se,Li];xe[104]=[Se,Li];xe[87]=[Se,Pi];xe[119]=[Se,Pi];function Pf(e,n,t){const r=this;let i,o;return l;function l(c){return!rn(c)||!Mi.call(r,r.previous)||An(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return rn(c)?(e.consume(c),a):c===64?(e.consume(c),s):t(c)}function s(c){return c===46?e.check(Tf,f,u)(c):c===45||c===95||ie(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&&oe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function Lf(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!ji.call(r,r.previous)||An(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(If,e.attempt(Ii,e.attempt(Ti,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function jf(e,n,t){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Di.call(r,r.previous)&&!An(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):t(c)}function a(c){if(oe(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 t(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):t(c)}function u(c){return c===null||kt(c)||G(c)||Me(c)||vt(c)?t(c):e.attempt(Ii,e.attempt(Ti,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function Df(e,n,t){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):t(l)}function o(l){return l===null?t(l):n(l)}}function Mf(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(zi,s,a)(u):u===null||G(u)||Me(u)||u!==45&&vt(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?t(u):n(u)}}function Rf(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?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(zi,n,o)(l):l===null||G(l)||Me(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Ff(e,n,t){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||G(a)||Me(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||G(a)||Me(a)?n(a):r(a)}function o(a){return oe(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):oe(a)?(e.consume(a),l):t(a)}}function Nf(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return ie(o)?t(o):n(o)}}function ji(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||G(e)}function Di(e){return!oe(e)}function Mi(e){return!(e===47||rn(e))}function rn(e){return e===43||e===45||e===46||e===95||ie(e)}function An(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Of={tokenize:Qf,partial:!0};function Bf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Uf,continuation:{tokenize:qf},exit:Wf}},text:{91:{name:"gfmFootnoteCall",tokenize:Vf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$f,resolveTo:Hf}}}}function $f(e,n,t){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 t(s);const u=ge(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),n(s))}}function Hf(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+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[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function Vf(e,n,t){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?t(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||G(c))return t(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(ge(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return G(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 Uf(e,n,t){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):t(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||G(g))return t(g);if(g===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return o=ge(r.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return G(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")):t(g)}function p(g){return n(g)}}function qf(e,n,t){return e.check(at,n,e.attempt(Of,n,t))}function Wf(e){e.exit("gfmFootnoteDefinition")}function Qf(e,n,t){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?n(o):t(o)}}function Yf(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!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&&pe(h,h.length,0,At(p,l.slice(u+1,s),a)),pe(h,h.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),pe(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 C=He(u);if(g===126)return c>1?s(g):(l.consume(g),c++,p);if(c<2&&!t)return s(g);const S=l.exit("strikethroughSequenceTemporary"),y=He(g);return S._open=!y||y===2&&!!C,S._close=!C||C===2&&!!y,a(g)}}}class Jf{constructor(){this.map=[]}add(n,t,r){Xf(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0}}function Xf(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function Gf(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-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"&&(t=!0);n+=1}return r}function Kf(){return{flow:{null:{name:"table",tokenize:Zf,resolveAll:ep}}}}function Zf(e,n,t){const r=this;let i=0,o=0,l;return a;function a(x){let T=r.events.length-1;for(;T>-1;){const P=r.events[T][1].type;if(P==="lineEnding"||P==="linePrefix")T--;else break}const z=T>-1?r.events[T][1].type:null,W=z==="tableHead"||z==="tableRow"?b:s;return W===b&&r.parser.lazy[r.now().line]?t(x):W(x)}function s(x){return e.enter("tableHead"),e.enter("tableRow"),u(x)}function u(x){return x===124||(l=!0,o+=1),f(x)}function f(x){return x===null?t(x):j(x)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):t(x):B(x)?q(e,f,"whitespace")(x):(o+=1,l&&(l=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(x)))}function c(x){return x===null||x===124||G(x)?(e.exit("data"),f(x)):(e.consume(x),x===92?h:c)}function h(x){return x===92||x===124?(e.consume(x),c):c(x)}function p(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(x):(e.enter("tableDelimiterRow"),l=!1,B(x)?q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):g(x))}function g(x){return x===45||x===58?S(x):x===124?(l=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),C):D(x)}function C(x){return B(x)?q(e,S,"whitespace")(x):S(x)}function S(x){return x===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),y):x===45?(o+=1,y(x)):x===null||j(x)?L(x):D(x)}function y(x){return x===45?(e.enter("tableDelimiterFiller"),E(x)):D(x)}function E(x){return x===45?(e.consume(x),E):x===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(x))}function A(x){return B(x)?q(e,L,"whitespace")(x):L(x)}function L(x){return x===124?g(x):x===null||j(x)?!l||i!==o?D(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(x)):D(x)}function D(x){return t(x)}function b(x){return e.enter("tableRow"),N(x)}function N(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),N):x===null||j(x)?(e.exit("tableRow"),n(x)):B(x)?q(e,N,"whitespace")(x):(e.enter("data"),U(x))}function U(x){return x===null||x===124||G(x)?(e.exit("data"),N(x)):(e.consume(x),x===92?H:U)}function H(x){return x===92||x===124?(e.consume(x),U):U(x)}}function ep(e,n){let t=-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 Jf;for(;++t<e.length;){const p=e[t],g=p[1];p[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(wr(h,n,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(t,0,[["enter",u,n]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(t,0,[["enter",f,n]])),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=dt(h,n,o,i,void 0,c),o=[0,0,0,0]),l[2]=t)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=dt(h,n,o,i,void 0,c)),o=l,l=[o[1],t,0,0])):g.type==="tableHead"?(a=!0,s=t):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=t,o[1]!==0?(l[0]=l[1],c=dt(h,n,o,i,t,c)):l[1]!==0&&(c=dt(h,n,l,i,t,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=t)}for(s!==0&&wr(h,n,s,u,f),h.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Gf(n.events,t))}return e}function dt(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},$e(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const s=$e(n.events,t[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const u=$e(n.events,t[2]),f=$e(n.events,t[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const h=n.events[t[2]],p=n.events[t[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){const g=t[2]+1,C=t[3]-t[2]-1;e.add(g,C,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(o.end=Object.assign({},$e(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function wr(e,n,t,r,i){const o=[],l=$e(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function $e(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const tp={name:"tasklistCheck",tokenize:rp};function np(){return{text:{91:tp}}}function rp(e,n,t){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return G(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):t(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(s)}function a(s){return j(s)?n(s):B(s)?e.check({tokenize:ip},n,t)(s):t(s)}}function ip(e,n,t){return q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function lp(e){return qr([zf(),Bf(),Yf(e),Kf(),np()])}const op={};function ap(e){const n=this,t=e||op,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(lp(t)),o.push(_f()),l.push(Ef(t))}const sp="_wrapper_izvjy_1",up="_table_izvjy_15",cp="_th_izvjy_27",fp="_tr_izvjy_47",pp="_td_izvjy_63",Ke={wrapper:sp,table:up,th:cp,tr:fp,td:pp};function Ri({part:e}){return k.jsx("div",{className:Ke.wrapper,children:k.jsxs("table",{className:Ke.table,children:[k.jsx("thead",{children:k.jsx("tr",{children:e.columns.map(n=>k.jsx("th",{className:Ke.th,children:n},n))})}),k.jsx("tbody",{children:e.rows.map((n,t)=>k.jsx("tr",{className:Ke.tr,children:e.columns.map(r=>k.jsx("td",{className:Ke.td,children:String(n[r]??"")},r))},t))})]})})}const hp="_card_1gzm6_1",dp="_header_1gzm6_17",mp="_icon_1gzm6_31",gp="_title_1gzm6_45",yp="_description_1gzm6_57",xp="_cardResolved_1gzm6_71",kp="_resolvedBadge_1gzm6_79",bp="_actions_1gzm6_101",wp="_confirm_1gzm6_111",Cp="_cancel_1gzm6_143",me={card:hp,header:dp,icon:mp,title:gp,description:yp,cardResolved:xp,resolvedBadge:kp,actions:bp,confirm:wp,cancel:Cp};function Fi({part:e,onConfirm:n,onCancel:t}){const r=_e(),{proposal:i}=e,o=i.resolved==="confirmed"?r.proposalConfirmed:i.resolved==="cancelled"?r.proposalCancelled:i.resolved==="expired"?r.proposalExpired:null;return k.jsxs("div",{className:i.resolved?`${me.card} ${me.cardResolved}`:me.card,children:[k.jsxs("div",{className:me.header,children:[k.jsx("svg",{className:me.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:me.title,children:i.title})]}),i.description&&k.jsx("p",{className:me.description,children:i.description}),o?k.jsx("span",{className:me.resolvedBadge,children:o}):k.jsxs("div",{className:me.actions,children:[k.jsx("button",{className:me.confirm,onClick:()=>n(i.id,i.payload),children:i.confirmLabel??r.proposalConfirm}),k.jsx("button",{className:me.cancel,onClick:()=>t(i.id),children:i.cancelLabel??r.proposalCancel})]})]})}const Sp="_activity_1661l_1",vp="_indicator_1661l_25",Ap="_content_1661l_71",_p="_title_1661l_79",Ep="_description_1661l_89",Ze={activity:Sp,indicator:vp,content:Ap,title:_p,description:Ep};function Ni({part:e}){return k.jsxs("div",{className:Ze.activity,"data-status":e.status,children:[k.jsx("span",{className:Ze.indicator,"aria-hidden":"true"}),k.jsxs("div",{className:Ze.content,children:[k.jsx("div",{className:Ze.title,children:e.title}),e.description&&k.jsx("div",{className:Ze.description,children:e.description})]})]})}const Ip="_markdown_sznoh_1",Tp="_unknownPart_sznoh_167",zp="_errorText_sznoh_195",Pp="_errorIcon_sznoh_211",mt={markdown:Ip,unknownPart:Tp,errorText:zp,errorIcon:Pp};function Oi({part:e,onProposalConfirm:n,onProposalCancel:t,renderPart:r}){if(r){const i=r(e);if(i!=null)return k.jsx(k.Fragment,{children:i})}switch(e.type){case"text":return k.jsx("div",{className:mt.markdown,children:k.jsx(Qu,{remarkPlugins:[ap],children:e.text})});case"table":return k.jsx(Ri,{part:e});case"activity":return k.jsx(Ni,{part:e});case"proposal":return k.jsx(Fi,{part:e,onConfirm:n,onCancel:t});case"error":return k.jsxs("span",{className:mt.errorText,children:[k.jsx(Ml,{className:mt.errorIcon}),e.message]});default:return globalThis.process?.env?.NODE_ENV!=="production"?k.jsxs("div",{className:mt.unknownPart,children:["Unhandled part type: ",k.jsx("code",{children:e.type})," — pass a"," ",k.jsx("code",{children:"renderPart"})," prop to render it."]}):null}}const Lp="_wrapper_1jkxo_1",jp="_user_1jkxo_15",Dp="_assistant_1jkxo_23",Mp="_avatar_1jkxo_31",Rp="_bubble_1jkxo_77",Fp="_empty_1jkxo_121",Pe={wrapper:Lp,user:jp,assistant:Dp,avatar:Mp,bubble:Rp,empty:Fp};function Bi({message:e,onProposalConfirm:n,onProposalCancel:t,assistantIcon:r,renderPart:i}){const o=_e(),l=e.role==="user";return k.jsxs("div",{className:`${Pe.wrapper} ${l?Pe.user:Pe.assistant}`,children:[!l&&k.jsx("div",{className:Pe.avatar,"aria-hidden":"true",children:r??k.jsx(Tr,{})}),k.jsxs("div",{className:Pe.bubble,children:[e.parts.map((a,s)=>k.jsx(Oi,{part:a,onProposalConfirm:n,onProposalCancel:t,renderPart:i},s)),e.parts.length===0&&k.jsx("span",{className:Pe.empty})]}),l&&k.jsx("div",{className:Pe.avatar,children:o.userLabel})]})}const Np="_wrapper_1oco7_1",Op="_dot_1oco7_15",Bp="_connectingLabel_1oco7_37",et={wrapper:Np,dot:Op,connectingLabel:Bp};function $i({connecting:e=!1}){const n=_e();return k.jsxs("div",{className:et.wrapper,"aria-label":e?n.connectingMessage:n.typingMessage,children:[k.jsx("span",{className:et.dot}),k.jsx("span",{className:et.dot}),k.jsx("span",{className:et.dot}),e&&k.jsx("span",{className:et.connectingLabel,children:n.connectingMessage})]})}const $p="_list_ixto8_1",Hp="_empty_ixto8_21",Vp="_hint_ixto8_47",Up="_typing_ixto8_61",gt={list:$p,empty:Hp,hint:Vp,typing:Up};function Hi({messages:e,isLoading:n,isConnecting:t,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o,renderPart:l}){const a=_e(),s=$.useRef(null);return $.useEffect(()=>{s.current?.scrollIntoView({behavior:"smooth"})},[e,n]),k.jsxs("div",{className:gt.list,children:[e.length===0&&k.jsxs("div",{className:gt.empty,children:[k.jsx("p",{children:a.emptyStateText}),k.jsx("p",{className:gt.hint,children:k.jsx("em",{children:a.emptyStateHint})})]}),e.map(u=>k.jsx(Bi,{message:u,onProposalConfirm:r,onProposalCancel:i,assistantIcon:o,renderPart:l},u.id)),n&&k.jsx("div",{className:gt.typing,children:k.jsx($i,{connecting:t})}),k.jsx("div",{ref:s})]})}const qp="_wrapper_ehrkb_1",Wp="_textarea_ehrkb_21",Qp="_toolbar_ehrkb_69",Yp="_actions_ehrkb_89",Jp="_actionBtn_ehrkb_103",Xp="_sendBtn_ehrkb_169",Gp="_spinnerIcon_ehrkb_231",Kp="_stopBtn_ehrkb_251",Zp="_stopIcon_ehrkb_297",we={wrapper:qp,textarea:Wp,toolbar:Qp,actions:Yp,actionBtn:Jp,sendBtn:Xp,spinnerIcon:Gp,stopBtn:Kp,stopIcon:Zp};function Vi({value:e,onChange:n,onSend:t,onStop:r,isLoading:i,placeholder:o,actions:l,sendIcon:a}){const s=_e(),u=$.useRef(null),f=$.useRef(!1);$.useEffect(()=>{f.current&&!i&&u.current?.focus(),f.current=i},[i]);const c=[{icon:k.jsx(Il,{}),label:s.actionAddFile},{icon:k.jsx(Tl,{}),label:s.actionQuickActions},{icon:k.jsx(zl,{}),label:s.actionNew},{icon:k.jsx(Pl,{}),label:s.actionHistory},{icon:k.jsx(Ll,{}),label:s.actionRules}],h=l??c,p=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),i||t())};return k.jsxs("div",{className:we.wrapper,children:[k.jsx("textarea",{ref:u,className:we.textarea,value:e,onChange:g=>n(g.target.value),onKeyDown:p,placeholder:o??s.inputPlaceholder,rows:3,"aria-label":s.sendMessage}),k.jsxs("div",{className:we.toolbar,children:[h.length>0&&k.jsx("div",{className:we.actions,children:h.map((g,C)=>k.jsxs("button",{className:we.actionBtn,type:"button",disabled:i,"aria-label":g.label,onClick:g.onClick,children:[g.icon,k.jsx("span",{children:g.label})]},C))}),i&&r?k.jsxs("button",{className:we.stopBtn,onClick:r,"aria-label":s.stopMessage,type:"button",children:[k.jsx("svg",{className:we.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:we.sendBtn,onClick:t,disabled:i||!e.trim(),"aria-label":s.sendMessage,type:"button",children:[i?k.jsx("svg",{className:we.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(El,{}),k.jsx("span",{children:s.sendMessage})]})]})]})}const eh="_wrapper_1e3w5_1",th="_icon_1e3w5_27",nh="_message_1e3w5_39",rh="_dismiss_1e3w5_47",yt={wrapper:eh,icon:th,message:nh,dismiss:rh};function Ui({message:e,onDismiss:n}){const t=_e();return k.jsxs("div",{className:yt.wrapper,role:"alert",children:[k.jsx("svg",{className:yt.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:yt.message,children:e}),n&&k.jsx("button",{className:yt.dismiss,onClick:n,"aria-label":t.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 ih="_chat_13051_1",lh={chat:ih};function qi({messages:e,input:n,isLoading:t,isConnecting:r,error:i,onInputChange:o,onSend:l,onStop:a,onProposalConfirm:s,onProposalCancel:u,placeholder:f,assistantIcon:c,actions:h,sendIcon:p,renderPart:g,className:C,style:S}){return k.jsxs("div",{className:[lh.chat,C].filter(Boolean).join(" "),style:S,children:[k.jsx(Hi,{messages:e,isLoading:t,isConnecting:r,onProposalConfirm:s,onProposalCancel:u,assistantIcon:c,renderPart:g}),i&&k.jsx(Ui,{message:i}),k.jsx(Vi,{value:n,onChange:o,onSend:l,onStop:a,isLoading:t,placeholder:f,actions:h,sendIcon:p})]})}const oh="_header_1saak_1",ah="_left_1saak_23",sh="_icon_1saak_35",uh="_title_1saak_45",ch="_resetBtn_1saak_57",fh="_actions_1saak_99",Le={header:oh,left:ah,icon:sh,title:uh,resetBtn:ch,actions:fh};function ph({title:e,onMinimize:n,isMinimized:t,icon:r,onReset:i}){const o=_e();return k.jsxs("div",{className:Le.header,children:[k.jsxs("div",{className:Le.left,children:[k.jsx("span",{className:Le.icon,"aria-hidden":"true",children:r??k.jsx(Tr,{})}),k.jsx("span",{className:Le.title,children:e??o.sidebarTitle})]}),(n||i)&&k.jsxs("div",{className:Le.actions,children:[i&&k.jsx("button",{className:Le.resetBtn,onClick:i,title:o.resetConversation,"aria-label":o.resetConversation,children:"↺"}),n&&k.jsx("button",{className:Le.resetBtn,onClick:n,title:t?o.expandSidebar:o.minimizeSidebar,"aria-label":t?o.expandSidebar:o.minimizeSidebar,children:t?k.jsx(Dl,{}):k.jsx(jl,{})})]})]})}const hh="_sidebar_u9ybt_1",dh="_minimized_u9ybt_39",Cr={sidebar:hh,minimized:dh};function mh({title:e,icon:n,actions:t,sendIcon:r,height:i="60vh",className:o,style:l,onReset:a,renderPart:s}){const[u,f]=$.useState(!1),{messages:c,input:h,setInput:p,sendMessage:g,stop:C,isLoading:S,isConnecting:y,error:E,reset:A,confirmProposal:L,cancelProposal:D}=Ir(),b=a?()=>{A(),a()}:void 0;return k.jsxs("aside",{className:[Cr.sidebar,u?Cr.minimized:"",o].filter(Boolean).join(" "),style:{height:u?void 0:i,...l},children:[k.jsx(ph,{title:e,icon:n,onMinimize:()=>f(N=>!N),isMinimized:u,onReset:b}),!u&&k.jsx(qi,{messages:c,input:h,isLoading:S,isConnecting:y,error:E,onInputChange:p,onSend:g,onStop:C,onProposalConfirm:L,onProposalCancel:D,assistantIcon:n,actions:t,sendIcon:r,renderPart:s})]})}const gh="_list_j7fvh_1",yh="_item_j7fvh_19",xh="_chat_j7fvh_31",kh="_chatActive_j7fvh_71",bh="_title_j7fvh_79",wh="_date_j7fvh_99",Ch="_empty_j7fvh_163",Ce={list:gh,item:yh,chat:xh,chatActive:kh,title:bh,date:wh,delete:"_delete_j7fvh_111",empty:Ch};function Sh({chats:e,onSelect:n,activeChatId:t,onDelete:r}){const i=_e();return e.length===0?k.jsx("p",{className:Ce.empty,children:i.historyEmpty}):k.jsx("ul",{className:Ce.list,children:e.map(o=>k.jsxs("li",{className:Ce.item,children:[k.jsxs("button",{className:o.id===t?`${Ce.chat} ${Ce.chatActive}`:Ce.chat,onClick:()=>n(o.id),children:[k.jsx("span",{className:Ce.title,children:o.title}),k.jsx("span",{className:Ce.date,children:o.updatedAt.toLocaleDateString(void 0,{day:"numeric",month:"short"})})]}),r&&k.jsx("button",{className:Ce.delete,onClick:()=>r(o.id),"aria-label":i.historyDeleteChat,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"})})})]},o.id))})}exports.AiActivityPart=Ni;exports.AiChat=qi;exports.AiChatContext=St;exports.AiChatHistoryList=Sh;exports.AiChatProvider=Al;exports.AiError=Ui;exports.AiInput=Vi;exports.AiMessageBubble=Bi;exports.AiMessageList=Hi;exports.AiMessagePartRenderer=Oi;exports.AiProposalCard=Fi;exports.AiSidebar=mh;exports.AiTablePart=Ri;exports.AiTypingIndicator=$i;exports.JuneauProvider=Cl;exports.consumeStream=Wt;exports.createFetchStreamAdapter=gl;exports.createSseAdapter=hl;exports.delay=Z;exports.deserializeMessages=il;exports.getMessageText=vr;exports.isProposalPart=ln;exports.juneauCs=_l;exports.juneauEn=an;exports.mockAdapter=ol;exports.parseJuneauWire=on;exports.serializeForStorage=nl;exports.serializeMessages=Sr;exports.trimChats=ll;exports.trimHistory=Ar;exports.useAiChat=_r;exports.useAiChatContext=Ir;exports.useAiChatContextSafe=vl;
|
|
52
52
|
//# sourceMappingURL=index.cjs.map
|