blade-code 0.10.160 → 0.10.162
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/blade.js +2 -2
- package/dist/{chunk-erhaedch.js → chunk-06hkf59s.js} +1 -1
- package/dist/chunk-0aya8d61.js +14 -0
- package/dist/{chunk-k3ne93k8.js → chunk-0mr8nexh.js} +2 -2
- package/dist/{chunk-tya95jej.js → chunk-0tzecdv3.js} +1 -1
- package/dist/chunk-1yq72zb7.js +8 -0
- package/dist/{chunk-jsv3e4k6.js → chunk-2f8d0km4.js} +1 -1
- package/dist/{chunk-5q4z0sfr.js → chunk-2mk914vk.js} +2 -2
- package/dist/{chunk-ht8epjz2.js → chunk-30x3mcsb.js} +2 -2
- package/dist/{chunk-6112ra8v.js → chunk-3aavhxe8.js} +1 -1
- package/dist/{chunk-ewwrss2w.js → chunk-3kszepm6.js} +1 -1
- package/dist/chunk-3xffezpc.js +1 -0
- package/dist/{chunk-28tzj187.js → chunk-3y2x6fb6.js} +1 -1
- package/dist/{chunk-7rjft1z9.js → chunk-46t79ek8.js} +2 -2
- package/dist/{chunk-9kj19a8t.js → chunk-4cdk4mds.js} +1 -1
- package/dist/chunk-4k7gvnth.js +1 -0
- package/dist/{chunk-7xtxvrh8.js → chunk-4wx5sya5.js} +1 -1
- package/dist/{chunk-7wcxjbyg.js → chunk-50vwafn5.js} +1 -1
- package/dist/{chunk-9xbwtjac.js → chunk-53fc0yrq.js} +1 -1
- package/dist/chunk-56ma2n3p.js +1 -0
- package/dist/chunk-5v0jcyea.js +2 -0
- package/dist/chunk-66wk3exc.js +1 -0
- package/dist/chunk-6c5z2b5s.js +1 -0
- package/dist/{chunk-5f40659e.js → chunk-6sedqj8r.js} +1 -1
- package/dist/{chunk-hs56jgkm.js → chunk-92ck72sg.js} +1 -1
- package/dist/{chunk-4c13mnh8.js → chunk-9cb1hv2z.js} +1 -1
- package/dist/chunk-9f6nyfcs.js +1 -0
- package/dist/{chunk-mt26v0vg.js → chunk-a6wkam4s.js} +1 -1
- package/dist/chunk-abc5bzqn.js +1 -0
- package/dist/{chunk-kr5w8q8v.js → chunk-ajtwwg2b.js} +1 -1
- package/dist/chunk-azn3qphf.js +1 -0
- package/dist/{chunk-gmmhpp0k.js → chunk-cvwcrr4h.js} +5 -5
- package/dist/{chunk-42y6ks44.js → chunk-d420fs8m.js} +1 -1
- package/dist/{chunk-n34qsnks.js → chunk-ddvdc2p0.js} +1 -1
- package/dist/chunk-e6tz8qrg.js +1 -0
- package/dist/{chunk-sdapqhj0.js → chunk-eg3ms291.js} +1 -1
- package/dist/{chunk-5xnht5vw.js → chunk-f194ct93.js} +2 -2
- package/dist/{chunk-zrgfvc4k.js → chunk-g01mth5d.js} +2 -2
- package/dist/{chunk-2ffyr4zh.js → chunk-hjrc4jdm.js} +1 -1
- package/dist/{chunk-y0vdq8h3.js → chunk-hs0fatm3.js} +1 -1
- package/dist/{chunk-0b67y4j1.js → chunk-j8hbddjp.js} +2 -2
- package/dist/chunk-j9fdpvq0.js +1 -0
- package/dist/{chunk-v1mamd1x.js → chunk-jj4ggb04.js} +2 -2
- package/dist/{chunk-f2y0gxyq.js → chunk-kqvzmnja.js} +2 -2
- package/dist/{chunk-sd9bze9x.js → chunk-kv458q06.js} +1 -1
- package/dist/{chunk-9tk6wq70.js → chunk-kvp523gt.js} +1 -1
- package/dist/{chunk-yh34b6z0.js → chunk-mg03ydep.js} +2 -2
- package/dist/{chunk-7bexc9c3.js → chunk-msx7ecb2.js} +2 -2
- package/dist/chunk-n6mv8p83.js +1 -0
- package/dist/chunk-n7kwrvvw.js +10 -0
- package/dist/{chunk-v67st2xb.js → chunk-nheny8xp.js} +2 -2
- package/dist/{chunk-4n0efk4n.js → chunk-nj2bggcj.js} +2 -2
- package/dist/{chunk-9q26ss92.js → chunk-psm2d7pr.js} +1 -1
- package/dist/chunk-pzqy0x7r.js +1 -0
- package/dist/{chunk-70hjk2jn.js → chunk-qjbn97e2.js} +2 -2
- package/dist/{chunk-sn2bqttf.js → chunk-qq8h5eag.js} +1 -1
- package/dist/{chunk-fhsvz4b1.js → chunk-rjbneaq0.js} +2 -2
- package/dist/{chunk-gm2yfq3r.js → chunk-rvs364rz.js} +2 -2
- package/dist/{chunk-g7pwwxvz.js → chunk-sspk1ah8.js} +3 -3
- package/dist/{chunk-xgyx1hwx.js → chunk-syq7j5b0.js} +2 -2
- package/dist/{chunk-qzxj1gvs.js → chunk-sz1jw89z.js} +1 -1
- package/dist/{chunk-7xhw74hk.js → chunk-t0gm0pn1.js} +1 -1
- package/dist/{chunk-erext256.js → chunk-t89f4way.js} +2 -2
- package/dist/{chunk-hv8nt7wj.js → chunk-vbjgcn49.js} +1 -1
- package/dist/{chunk-kenxyanc.js → chunk-vh5hxd2w.js} +1 -1
- package/dist/{chunk-n9819k4p.js → chunk-vw9paban.js} +1 -1
- package/dist/{chunk-fx9vm1n5.js → chunk-w33zjw8m.js} +2 -2
- package/dist/{chunk-e07acz8d.js → chunk-wbr9fc4k.js} +1 -1
- package/dist/{chunk-53vh6vpt.js → chunk-wcps5gjm.js} +1 -1
- package/dist/{chunk-jbpasjg9.js → chunk-xmymx75h.js} +1 -1
- package/dist/{chunk-a5r7c1n4.js → chunk-y54mge74.js} +3 -3
- package/dist/{chunk-vz13c7fr.js → chunk-y5wngtz0.js} +2 -2
- package/dist/{chunk-9zvxdc7t.js → chunk-yk62xvqm.js} +2 -2
- package/dist/{chunk-hj1c3k0m.js → chunk-za0frk62.js} +2 -2
- package/dist/chunk-zb6mn0dz.js +1 -0
- package/dist/{chunk-pv6cgfv1.js → chunk-zj1g4nbq.js} +1 -1
- package/dist/{chunk-wm896gnx.js → chunk-zzvs471p.js} +1 -1
- package/dist/web/assets/ChatView-er_sxPPR.js +70 -0
- package/dist/web/assets/{CodeBlockHighlighter-BpPOUcO7.js → CodeBlockHighlighter-y0h2qpHE.js} +1 -1
- package/dist/web/assets/{FilePreview-DXGkgNrQ.js → FilePreview-D3mhQ088.js} +14 -19
- package/dist/web/assets/{KanbanBoard-MYvqGgQH.js → KanbanBoard-CVg8k1mE.js} +2 -2
- package/dist/web/assets/{MarkdownRenderer-CXDrI3kX.js → MarkdownRenderer-CNBuegIp.js} +3 -3
- package/dist/web/assets/{ScrollArea-DocDa_rN.js → ScrollArea-nKClMHtv.js} +1 -1
- package/dist/web/assets/{SessionHistorySurface-D4Hxlpnr.js → SessionHistorySurface-DxS7TPaS.js} +1 -1
- package/dist/web/assets/{SettingsModal-ROSA92Eo.js → SettingsModal-CUn7pWF9.js} +1 -1
- package/dist/web/assets/{Sidebar-ByhqdRdj.js → Sidebar-CfxwNI2v.js} +1 -1
- package/dist/web/assets/TaskSwitcher-CSoJ4y5B.js +26 -0
- package/dist/web/assets/{TerminalPanel-czvVuMgl.js → TerminalPanel-BQuhnBca.js} +2 -2
- package/dist/web/assets/{archive-BwNnCDDQ.js → archive-BboAmbOv.js} +1 -1
- package/dist/web/assets/{arrow-left-Dc9lvaeD.js → arrow-left-DAUtSPbk.js} +1 -1
- package/dist/web/assets/{calendar-clock-o0GyQ0Np.js → calendar-clock-Vl0t-Nd3.js} +1 -1
- package/dist/web/assets/{chevron-right-CgHjrrmB.js → chevron-right-CF4tZJv_.js} +1 -1
- package/dist/web/assets/{clock-3-BB58ITKo.js → clock-3-UujBmwyg.js} +1 -1
- package/dist/web/assets/{copy-o_KiXkAh.js → copy-DqhAOOxU.js} +1 -1
- package/dist/web/assets/{download-BBtK3WHk.js → download-9K17cUAi.js} +1 -1
- package/dist/web/assets/{external-link-smSBd9oE.js → external-link-ZWYy4pMB.js} +1 -1
- package/dist/web/assets/{folder-BJP6kIlC.js → folder-CWkv_E0L.js} +1 -1
- package/dist/web/assets/index-C6zClU0B.js +211 -0
- package/dist/web/assets/index-CaCifsSK.css +1 -0
- package/dist/web/assets/message-square-plus-DOcUaurY.js +21 -0
- package/dist/web/assets/{pause-yqaK1hvk.js → pause-CvRQWY37.js} +1 -1
- package/dist/web/assets/{pencil-BZbDnyg2.js → pencil-CrKIc9az.js} +1 -1
- package/dist/web/assets/{play-WQ7288Ky.js → play-DN4KhXKM.js} +1 -1
- package/dist/web/assets/{plus-veQ2IAZx.js → plus-jGKGKGzn.js} +1 -1
- package/dist/web/assets/{session-events-Dwyp0AVI.js → session-events-aq2qdB3u.js} +25 -25
- package/dist/web/assets/{settings-B8xvrdSb.js → settings-DkVTw2qw.js} +1 -1
- package/dist/web/assets/{team-BrF46S7E.js → team-BBLJq3rO.js} +1 -1
- package/dist/web/assets/teamService-B6W5r_Z_.js +1 -0
- package/dist/web/assets/{terminal-BrqsCKf2.js → terminal-C30CbzhP.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-514va7ce.js +0 -2
- package/dist/chunk-6c7v7ny5.js +0 -1
- package/dist/chunk-6s037nx9.js +0 -14
- package/dist/chunk-7ss9htq0.js +0 -1
- package/dist/chunk-bz9e9hj8.js +0 -1
- package/dist/chunk-dav8ngkr.js +0 -1
- package/dist/chunk-enf0egke.js +0 -1
- package/dist/chunk-er7r2abv.js +0 -1
- package/dist/chunk-j7784bxm.js +0 -1
- package/dist/chunk-k1tfry97.js +0 -5
- package/dist/chunk-p2r4svss.js +0 -10
- package/dist/chunk-r95wa6vn.js +0 -1
- package/dist/chunk-wsa7g7vd.js +0 -1
- package/dist/chunk-yx6kf3s7.js +0 -1
- package/dist/chunk-zn9tdkrq.js +0 -1
- package/dist/chunk-zqjm9yd8.js +0 -1
- package/dist/chunk-zv01qe34.js +0 -1
- package/dist/web/assets/ChatView-DYpMrwtA.js +0 -63
- package/dist/web/assets/TaskSwitcher-Dbo20Tim.js +0 -26
- package/dist/web/assets/chevrons-up-down-zQ_UZWV9.js +0 -16
- package/dist/web/assets/index-RGoMvYl5.css +0 -1
- package/dist/web/assets/index-pqMcowCZ.js +0 -203
- package/dist/web/assets/teamService-fDnXqw4L.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as b}from"./vendor-react-DofNRwfy.js";import{c as J,u as U,b as j,d as
|
|
1
|
+
import{j as e,r as b}from"./vendor-react-DofNRwfy.js";import{c as J,u as U,b as j,d as q,K as ce,N as ve,j as P,L as E,R as ge,z as je,O as Ne,Q as ye,x as we,A as Se,D as Pe,e as Te,f as Ce,g as De,h as Ie,U as ie,i as Ae,V as ne,a as s,Y as _e,Z as Ke,$ as Ee,a0 as Me,W as Fe,t as Oe,a1 as Re}from"./index-C6zClU0B.js";import{N as Le,a0 as Q,$ as O}from"./session-events-aq2qdB3u.js";import{C as le}from"./calendar-clock-Vl0t-Nd3.js";import{P as ze}from"./pencil-CrKIc9az.js";import{A as qe}from"./archive-BboAmbOv.js";import{C as Be}from"./clock-3-UujBmwyg.js";import{P as Ve}from"./play-DN4KhXKM.js";import{P as Qe}from"./pause-CvRQWY37.js";import{P as Ue}from"./plus-jGKGKGzn.js";import"./vendor-radix-D6QrtXqd.js";/**
|
|
2
2
|
* @license lucide-react v0.300.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -13,4 +13,4 @@ import{j as e,r as b}from"./vendor-react-DofNRwfy.js";import{c as J,u as U,b as
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const We=J("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]),G=["waiting","active","blocked","review"],re={high:0,medium:1,low:2};function $e(t){return t.taskIsolation!==void 0||t.taskPromptSummary!==void 0||t.taskRetryAvailable===!0}function se(t){return t.taskSourceProjectPath||t.projectPath}function Ze(t){return t.pendingInteraction?"blocked":t.taskStatus==="queued"?"waiting":t.taskStatus==="running"?"active":t.taskStatus==="completed"?"review":"blocked"}function Ge(t,r){if(t.pendingInteraction!==r.pendingInteraction)return t.pendingInteraction?-1:1;const i=re[t.taskPriority??"medium"]-re[r.taskPriority??"medium"];if(i!==0)return i;const u=t.taskDueAt?Date.parse(t.taskDueAt):Number.POSITIVE_INFINITY,n=r.taskDueAt?Date.parse(r.taskDueAt):Number.POSITIVE_INFINITY;if(u!==n)return u-n;if(t.taskStatus==="queued"&&r.taskStatus==="queued"){const h=(t.taskQueuePosition??Number.POSITIVE_INFINITY)-(r.taskQueuePosition??Number.POSITIVE_INFINITY);if(h!==0)return h}return r.lastMessageTime.localeCompare(t.lastMessageTime)}function Je(t){const r={waiting:[],active:[],blocked:[],review:[]};for(const i of t)$e(i)&&r[Ze(i)].push(i);for(const i of G)r[i].sort(Ge);return r}function Xe(t){return`TASK-${t.replace(/^task-?/,"").slice(0,6).toUpperCase()}`}const ea={high:{label:"kanban.priority.high",className:"border-red-200 bg-red-50 text-red-700 dark:border-red-900/70 dark:bg-red-950/35 dark:text-red-300"},medium:{label:"kanban.priority.medium",className:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/70 dark:bg-amber-950/35 dark:text-amber-300"},low:{label:"kanban.priority.low",className:"border-zinc-200 bg-zinc-50 text-zinc-600 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-400"}},aa={feature:"kanban.kind.feature",bug:"kanban.kind.bug",maintenance:"kanban.kind.maintenance",research:"kanban.kind.research"};function ta(t){const r=new Date(t);return Number.isNaN(r.getTime())?"":new Intl.DateTimeFormat(ye()==="zh"?"zh-CN":"en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(r)}function K({label:t,onClick:r,disabled:i,tone:u="neutral",children:n}){return e.jsx("button",{type:"button","aria-label":t,title:t,disabled:i,onClick:r,className:P("flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:cursor-wait disabled:opacity-45",u==="danger"?"text-red-500 hover:bg-red-500/10 focus-visible:ring-red-500":u==="accent"?"text-[hsl(var(--deck-accent))] hover:bg-[hsl(var(--deck-accent-soft))] focus-visible:ring-[hsl(var(--deck-accent))]":"text-[hsl(var(--deck-ink-faint))] hover:bg-[hsl(var(--deck-surface-2))] hover:text-[hsl(var(--deck-ink))] focus-visible:ring-[hsl(var(--deck-accent))]"),children:n})}function na({session:t,unread:r,cancelling:i,retrying:u,updating:n,onOpen:h,onInspect:T,onEdit:C,onCancel:y,onRetry:c,onArchive:k}){const o=U(),w=j(t),f=z(w),v=ce(t,o),g=ea[t.taskPriority??"medium"],m=t.taskKind??"feature",x=ve(t,o),D=t.taskSourceProjectPath||t.projectPath,I=D.split("/").filter(Boolean).at(-1)||D,M=t.taskStatus==="queued"||t.taskStatus==="running",N=!!t.taskRetryAvailable&&["failed","interrupted","cancelled"].includes(t.taskStatus),A=!!t.pendingInteraction,S=t.taskStatus==="completed";return e.jsxs("article",{"data-kanban-task":f,className:P("group rounded-md border bg-[hsl(var(--deck-surface))] px-3 py-3 shadow-[0_1px_2px_hsl(var(--deck-ink)/0.04)] transition-[border-color,box-shadow,transform]","border-[hsl(var(--deck-border))] hover:-translate-y-px hover:border-[hsl(var(--deck-border-strong))] hover:shadow-[0_8px_24px_-16px_hsl(var(--deck-ink)/0.35)]",r&&"border-[hsl(var(--deck-accent)/0.55)]"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-mono text-[9.5px] uppercase text-[hsl(var(--deck-ink-faint))]",children:Xe(t.sessionId)}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[r&&e.jsx("span",{"aria-label":o("kanban.card.unread"),title:o("kanban.card.unread"),className:"h-1.5 w-1.5 rounded-full bg-[hsl(var(--deck-accent))] shadow-[0_0_6px_hsl(var(--deck-accent-glow)/0.8)]"}),e.jsx("span",{className:"truncate font-mono text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:I})]})]}),e.jsx("button",{type:"button",onClick:h,className:"mt-2 block w-full text-left text-[13px] font-medium leading-[1.45] text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:v}),x&&e.jsx("p",{title:x,className:P("mt-1.5 line-clamp-2 text-[10.5px] leading-[1.45]",A||t.taskStatus==="failed"?"text-red-600 dark:text-red-400":"text-[hsl(var(--deck-ink-faint))]"),children:x}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1",children:[e.jsx("span",{className:P("rounded-sm border px-1.5 py-0.5 font-mono text-[9px] font-medium",g.className),children:o(g.label)}),e.jsx("span",{className:"rounded-sm border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface-2))] px-1.5 py-0.5 font-mono text-[9px] text-[hsl(var(--deck-ink-muted))]",children:o(aa[m])}),t.taskDueAt&&e.jsxs("span",{className:P("inline-flex items-center gap-1 rounded-sm border px-1.5 py-0.5 font-mono text-[9px]",Date.parse(t.taskDueAt)<Date.now()&&!S?"border-red-200 bg-red-50 text-red-700 dark:border-red-900/70 dark:bg-red-950/35 dark:text-red-300":"border-[hsl(var(--deck-border))] text-[hsl(var(--deck-ink-faint))]"),children:[e.jsx(le,{className:"h-2.5 w-2.5"}),ta(t.taskDueAt)]})]}),t.taskStatus==="queued"&&t.taskQueuePosition&&e.jsx("div",{className:"mt-2 font-mono text-[9.5px] text-amber-700 dark:text-amber-400",children:o("kanban.card.queuePosition",{position:t.taskQueuePosition,depth:t.taskQueueDepth??t.taskQueuePosition})}),t.taskDiffStat&&e.jsx("div",{className:"mt-2 font-mono text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:o("kanban.card.diff",{files:t.taskDiffStat.changedFiles,additions:t.taskDiffStat.additions,deletions:t.taskDiffStat.deletions})}),e.jsxs("div",{className:"mt-3 flex items-center justify-end gap-0.5 border-t border-[hsl(var(--deck-hairline))] pt-2",children:[A&&e.jsx(K,{label:o("kanban.action.respond"),onClick:h,tone:"danger",children:e.jsx(Ye,{className:"h-3.5 w-3.5"})}),S&&e.jsx(K,{label:o("kanban.action.inspect"),onClick:T,tone:"accent",children:e.jsx(He,{className:"h-3.5 w-3.5"})}),N&&e.jsx(K,{label:o("kanban.action.retry"),onClick:c,disabled:u,tone:"accent",children:u?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ge,{className:"h-3.5 w-3.5"})}),M&&e.jsx(K,{label:o("kanban.action.cancel"),onClick:y,disabled:i,tone:"danger",children:i?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(je,{className:"h-3.5 w-3.5"})}),e.jsx(K,{label:o("kanban.action.edit"),onClick:C,disabled:n,children:n?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(qe,{className:"h-3.5 w-3.5"})}),S&&e.jsx(K,{label:o("kanban.action.archive"),onClick:k,children:e.jsx(ze,{className:"h-3.5 w-3.5"})}),e.jsx(K,{label:o("kanban.action.open"),onClick:h,children:e.jsx(Ne,{className:"h-3.5 w-3.5"})})]})]})}const ra={waiting:{title:"kanban.column.waiting",description:"kanban.column.waitingDescription",icon:Be,accent:"bg-amber-400",iconStyle:"text-amber-700 dark:text-amber-400"},active:{title:"kanban.column.active",description:"kanban.column.activeDescription",icon:E,accent:"bg-blue-500",iconStyle:"text-blue-700 dark:text-blue-400"},blocked:{title:"kanban.column.blocked",description:"kanban.column.blockedDescription",icon:Se,accent:"bg-red-500",iconStyle:"text-red-700 dark:text-red-400"},review:{title:"kanban.column.review",description:"kanban.column.reviewDescription",icon:we,accent:"bg-[hsl(var(--deck-accent))]",iconStyle:"text-[hsl(var(--deck-accent))]"}};function sa({id:t,sessions:r,unreadTaskKeys:i,cancellingTaskKeys:u,retryingTaskKeys:n,updatingTaskKeys:h,taskKey:T,onOpen:C,onInspect:y,onEdit:c,onCancel:k,onRetry:o,onArchive:w}){const f=U(),v=ra[t],g=v.icon;return e.jsxs("section",{"data-kanban-column":t,"aria-labelledby":`kanban-column-${t}`,className:"flex min-h-[180px] min-w-0 flex-col border-t-2 border-[hsl(var(--deck-hairline))] pt-3 md:min-h-[360px]",children:[e.jsxs("header",{className:"mb-3 flex min-h-12 items-start gap-2 px-0.5",children:[e.jsx(g,{className:P("mt-0.5 h-3.5 w-3.5 shrink-0",v.iconStyle,t==="active"&&"animate-spin")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{id:`kanban-column-${t}`,className:"font-mono text-[11px] font-semibold uppercase text-[hsl(var(--deck-ink))]",children:f(v.title)}),e.jsx("span",{className:"min-w-5 rounded-sm bg-[hsl(var(--deck-surface-2))] px-1.5 py-0.5 text-center font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:r.length})]}),e.jsx("p",{className:"mt-0.5 text-[10px] leading-4 text-[hsl(var(--deck-ink-faint))]",children:f(v.description)})]}),e.jsx("span",{className:P("mt-1 h-1.5 w-1.5 shrink-0 rounded-full",v.accent)})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-2.5",children:[r.map(m=>{const x=T(m);return e.jsx(na,{session:m,unread:i.includes(x),cancelling:u.includes(x),retrying:n.includes(x),updating:h.includes(x),onOpen:()=>C(m),onInspect:()=>y(m),onEdit:()=>c(m),onCancel:()=>k(m),onRetry:()=>o(m),onArchive:()=>w(m)},x)}),r.length===0&&e.jsx("div",{className:"flex min-h-28 items-center justify-center rounded-md border border-dashed border-[hsl(var(--deck-border))] px-4 text-center font-mono text-[10px] leading-4 text-[hsl(var(--deck-ink-faint))]",children:f("kanban.column.empty")})]})]})}function ca(t){if(!t)return"";const r=new Date(t);return Number.isNaN(r.getTime())?"":new Date(r.getTime()-r.getTimezoneOffset()*6e4).toISOString().slice(0,16)}function ia({open:t,onOpenChange:r,projects:i,defaultProjectPath:u,session:n,submitting:h,canCreate:T,onCreate:C,onUpdate:y}){const c=U(),k=!!n,[o,w]=b.useState(""),[f,v]=b.useState(""),[g,m]=b.useState(u??""),[x,D]=b.useState("medium"),[I,M]=b.useState("feature"),[N,A]=b.useState(""),[S,R]=b.useState(null);b.useEffect(()=>{var l;t&&(w((n==null?void 0:n.title)??""),v((n==null?void 0:n.taskPromptSummary)??""),m((n==null?void 0:n.taskSourceProjectPath)??(n==null?void 0:n.projectPath)??u??((l=i.find(p=>p.available))==null?void 0:l.path)??""),D((n==null?void 0:n.taskPriority)??"medium"),M((n==null?void 0:n.taskKind)??"feature"),A(ca(n==null?void 0:n.taskDueAt)),R(null))},[u,t,i,n]);const H=async l=>{l.preventDefault();const p=o.trim(),F=f.trim();if(!(!k&&(!F||!g))){R(null);try{k?await y({...p?{title:p}:{},taskPriority:x,taskKind:I,taskDueAt:N?new Date(N).toISOString():null}):await C({...p?{title:p}:{},prompt:F,projectPath:g,taskPriority:x,taskKind:I,...N?{taskDueAt:new Date(N).toISOString()}:{}}),r(!1)}catch(B){R(B instanceof Error?B.message:c("kanban.dialog.submitFailed"))}}};return e.jsx(Pe,{open:t,onOpenChange:r,children:e.jsxs(Te,{className:"max-w-[560px] gap-0 overflow-hidden border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] p-0",children:[e.jsxs(Ce,{className:"border-b border-[hsl(var(--deck-hairline))] px-5 py-4",children:[e.jsx(De,{className:"font-mono text-[15px] text-[hsl(var(--deck-ink))]",children:c(k?"kanban.dialog.editTitle":"kanban.dialog.createTitle")}),e.jsx(Ie,{className:"text-[11.5px] text-[hsl(var(--deck-ink-faint))]",children:c(k?"kanban.dialog.editDescription":"kanban.dialog.createDescription")})]}),e.jsxs("form",{onSubmit:H,children:[e.jsxs("div",{className:"grid gap-4 px-5 py-5",children:[e.jsxs("label",{className:"grid gap-1.5",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:c("kanban.field.title")}),e.jsx("input",{value:o,onChange:l=>w(l.target.value),maxLength:200,className:"field",placeholder:c("kanban.field.titlePlaceholder")})]}),!k&&e.jsxs("label",{className:"grid gap-1.5",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:c("kanban.field.prompt")}),e.jsx("textarea",{required:!0,value:f,onChange:l=>v(l.target.value),maxLength:32e3,rows:6,className:"min-h-32 w-full resize-y rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-canvas))] px-3 py-2.5 text-[13px] leading-5 text-[hsl(var(--deck-ink))] outline-none placeholder:text-[hsl(var(--deck-ink-faint))] focus:border-[hsl(var(--deck-accent)/0.6)] focus:ring-1 focus:ring-[hsl(var(--deck-accent)/0.35)]",placeholder:c("kanban.field.promptPlaceholder")})]}),!k&&e.jsxs("label",{className:"grid gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:[e.jsx(ie,{className:"h-3 w-3"}),c("kanban.field.project")]}),e.jsx("select",{required:!0,value:g,onChange:l=>m(l.target.value),className:"field",children:i.filter(l=>l.available).map(l=>e.jsx("option",{value:l.path,children:l.name},l.path))})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[e.jsxs("label",{className:"grid gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:[e.jsx(We,{className:"h-3 w-3"}),c("kanban.field.kind")]}),e.jsxs("select",{value:I,onChange:l=>M(l.target.value),className:"field",children:[e.jsx("option",{value:"feature",children:c("kanban.kind.feature")}),e.jsx("option",{value:"bug",children:c("kanban.kind.bug")}),e.jsx("option",{value:"maintenance",children:c("kanban.kind.maintenance")}),e.jsx("option",{value:"research",children:c("kanban.kind.research")})]})]}),e.jsxs("label",{className:"grid gap-1.5",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:c("kanban.field.priority")}),e.jsxs("select",{value:x,onChange:l=>D(l.target.value),className:"field",children:[e.jsx("option",{value:"high",children:c("kanban.priority.high")}),e.jsx("option",{value:"medium",children:c("kanban.priority.medium")}),e.jsx("option",{value:"low",children:c("kanban.priority.low")})]})]}),e.jsxs("label",{className:"grid gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:[e.jsx(le,{className:"h-3 w-3"}),c("kanban.field.dueAt")]}),e.jsx("input",{type:"datetime-local",value:N,onChange:l=>A(l.target.value),className:"field min-w-0"})]})]}),!k&&e.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface-2))] px-3 py-2 font-mono text-[10px] text-[hsl(var(--deck-ink-muted))]",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[hsl(var(--deck-accent))]"}),c("kanban.dialog.localExecution")]}),S&&e.jsx("div",{role:"alert",className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-[11px] text-red-700 dark:border-red-900/70 dark:bg-red-950/35 dark:text-red-300",children:S})]}),e.jsxs(Ae,{className:"border-t border-[hsl(var(--deck-hairline))] bg-[hsl(var(--deck-surface-2))]/60 px-5 py-3",children:[e.jsx(ne,{type:"button",variant:"ghost",onClick:()=>r(!1),disabled:h,children:c("kanban.dialog.cancel")}),e.jsxs(ne,{type:"submit",disabled:h||!k&&(!T||!f.trim()||!g),className:"gap-2",children:[h&&e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}),c(k?"kanban.dialog.save":"kanban.dialog.dispatch")]})]})]})]})})}function va(){var te;const t=U(),r=s(a=>a.sessions),i=s(a=>a.boundProjects),u=s(a=>a.selectedProjectPath),n=s(a=>a.taskWorkspaceInfo),h=s(a=>a.catalogLoadState),T=s(a=>a.taskEventConnectionState),C=s(a=>a.isDispatchingTask),y=s(a=>a.isUpdatingTaskAdmission),c=s(a=>a.cancellingTaskKeys),k=s(a=>a.retryingTaskKeys),o=s(a=>a.updatingTaskKeys),w=s(a=>a.unreadTaskKeys),f=s(a=>a.error),v=s(a=>Le(a.historySurfaceSelection)),g=s(a=>a.selectProject),m=s(a=>a.selectSession),x=s(a=>a.dispatchTask),D=s(a=>a.updateTask),I=s(a=>a.cancelTask),M=s(a=>a.retryTask),N=s(a=>a.archiveSession),A=s(a=>a.setTaskAdmissionPaused),S=s(a=>a.reconnectTaskEvents),R=s(a=>a.clearError),H=_e(a=>a.currentMode),l=Q(a=>a.setMainView),p=Q(a=>a.boardProjectPath),F=Q(a=>a.setBoardProjectPath),B=Q(a=>a.openFilePreview),[X,oe]=b.useState(""),[de,Y]=b.useState(!1),[ue,W]=b.useState(null),[me,$]=b.useState(!1);b.useEffect(()=>{p&&!i.some(a=>a.path===p&&a.available)&&F(null)},[p,i,F]);const L=r.find(a=>z(j(a))===ue)??null,Z=X.trim().toLowerCase(),ee=b.useMemo(()=>r.filter(a=>p&&se(a)!==p?!1:Z?[a.sessionId,ce(a,t),a.taskPromptSummary,se(a),a.taskPriority,a.taskKind].filter(Boolean).join(" ").toLowerCase().includes(Z):!0),[p,Z,r,t]),ae=b.useMemo(()=>Je(ee),[ee]),he=G.reduce((a,d)=>a+ae[d].length,0),_=n==null?void 0:n.taskAdmission,q=_?!_.paused:!0,V=i.filter(a=>a.available),ke=p??u??((te=V[0])==null?void 0:te.path)??null,xe=L?o.includes(z(j(L))):C,pe=async a=>{l("workspace"),await m(j(a))},be=async a=>{l("workspace"),await m(j(a)),B({tab:"diff"})},fe=async a=>{O(s.getState())||(g(a.projectPath),await x({...a,isolation:"local",permissionMode:H},{selectSession:!1}))};return v?null:e.jsxs("main",{"data-kanban-board":!0,className:"flex h-full min-w-0 flex-col overflow-hidden bg-[hsl(var(--deck-canvas))] text-[hsl(var(--deck-ink))]",children:[e.jsxs("div",{className:"border-b border-[hsl(var(--deck-hairline))] bg-[hsl(var(--deck-canvas))] px-4 py-3 sm:px-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"font-mono text-[15px] font-semibold",children:t("kanban.title")}),e.jsx("span",{className:"rounded-sm border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-1.5 py-0.5 font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:t("kanban.taskCount",{count:he})})]}),e.jsx("p",{className:"mt-0.5 text-[10.5px] text-[hsl(var(--deck-ink-faint))]",children:t("kanban.subtitle")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_&&e.jsx("div",{className:"hidden rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-2.5 py-1.5 lg:block",children:e.jsx(Ke,{inFlight:_.inFlight,queued:_.queued,maxConcurrent:_.maxConcurrent,compact:!0})}),e.jsxs("button",{type:"button",role:"switch","aria-checked":q,disabled:!_||y,onClick:()=>{O(s.getState())||A(q).catch(()=>{})},className:P("inline-flex h-8 items-center gap-2 rounded-md border px-2.5 font-mono text-[10.5px] transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] disabled:opacity-45",q?"border-[hsl(var(--deck-accent)/0.45)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-muted))]"),children:[y?e.jsx(E,{className:"h-3 w-3 animate-spin"}):q?e.jsx(Ve,{className:"h-3 w-3 fill-current"}):e.jsx(Qe,{className:"h-3 w-3"}),t(q?"kanban.autoClaim.running":"kanban.autoClaim.paused")]}),e.jsxs("button",{type:"button",onClick:()=>{if(V.length===0){$(!0);return}W(null),Y(!0)},className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-[hsl(var(--deck-ink))] px-3 font-mono text-[10.5px] font-medium text-[hsl(var(--deck-canvas))] transition-opacity hover:opacity-85 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--deck-accent))]",children:[e.jsx(Ue,{className:"h-3.5 w-3.5"}),t("kanban.action.newTask")]})]})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[e.jsxs("label",{className:"relative min-w-[180px] flex-1 sm:max-w-[320px]",children:[e.jsx(Ee,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[hsl(var(--deck-ink-faint))]"}),e.jsx("input",{type:"search",value:X,onChange:a=>oe(a.target.value),"aria-label":t("kanban.searchAria"),placeholder:t("kanban.searchPlaceholder"),className:"h-8 w-full rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] pl-8 pr-3 font-mono text-[10.5px] text-[hsl(var(--deck-ink))] outline-none placeholder:text-[hsl(var(--deck-ink-faint))] focus:border-[hsl(var(--deck-accent)/0.55)] focus:ring-1 focus:ring-[hsl(var(--deck-accent)/0.25)]"})]}),e.jsxs("label",{className:"relative",children:[e.jsx(ie,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[hsl(var(--deck-accent))]"}),e.jsxs("select",{value:p??"__all__",onChange:a=>{const d=a.target.value;F(d==="__all__"?null:d),d!=="__all__"&&g(d)},"aria-label":t("kanban.projectFilterAria"),className:"h-8 min-w-[160px] appearance-none rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] pl-8 pr-7 font-mono text-[10.5px] text-[hsl(var(--deck-ink-muted))] outline-none focus:border-[hsl(var(--deck-accent)/0.55)]",children:[e.jsx("option",{value:"__all__",children:t("kanban.projectAll")}),V.map(a=>e.jsx("option",{value:a.path,children:a.name},a.path))]})]}),e.jsx("button",{type:"button",onClick:()=>$(!0),"aria-label":t("projects.bind.action"),title:t("projects.bind.action"),className:"flex h-8 w-8 items-center justify-center rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-faint))] hover:text-[hsl(var(--deck-accent))]",children:e.jsx(Me,{className:"h-3.5 w-3.5"})}),h==="loading"||h==="hydrating"?e.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx(E,{className:"h-3 w-3 animate-spin"}),t("sidebar.catalog.syncing")]}):null]})]}),T==="offline"&&e.jsxs("div",{role:"alert",className:"flex items-center gap-2 border-b border-amber-300/60 bg-amber-50/80 px-4 py-2 text-[10.5px] text-amber-800 dark:border-amber-900/70 dark:bg-amber-950/30 dark:text-amber-300 sm:px-6",children:[e.jsx(Fe,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"flex-1",children:t("kanban.feed.offline")}),e.jsxs("button",{type:"button",onClick:()=>void S().catch(()=>{}),className:"inline-flex h-7 items-center gap-1 rounded-md px-2 font-mono hover:bg-amber-100 dark:hover:bg-amber-900/40",children:[e.jsx(Oe,{className:"h-3 w-3"}),t("taskHome.feed.retry")]})]}),f&&e.jsxs("div",{role:"alert",className:"flex items-center gap-3 border-b border-red-200 bg-red-50 px-4 py-2 text-[10.5px] text-red-700 dark:border-red-900/70 dark:bg-red-950/30 dark:text-red-300 sm:px-6",children:[e.jsx("span",{className:"flex-1",children:f}),e.jsx("button",{type:"button",onClick:R,className:"font-mono underline",children:t("taskHome.error.dismiss")})]}),e.jsx("div",{className:"flex-1 overflow-auto px-4 py-4 sm:px-6",children:e.jsx("div",{className:"grid min-w-0 grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4",children:G.map(a=>e.jsx(sa,{id:a,sessions:ae[a],unreadTaskKeys:w,cancellingTaskKeys:c,retryingTaskKeys:k,updatingTaskKeys:o,taskKey:d=>z(j(d)),onOpen:d=>{pe(d).catch(()=>{})},onInspect:d=>{be(d).catch(()=>{})},onEdit:d=>{W(z(j(d))),Y(!0)},onCancel:d=>{O(s.getState())||I(j(d)).catch(()=>{})},onRetry:d=>{O(s.getState())||M(j(d)).catch(()=>{})},onArchive:d=>{O(s.getState())||N(j(d))}},a))})}),e.jsx(ia,{open:de,onOpenChange:a=>{Y(a),a||W(null)},projects:i,defaultProjectPath:ke,session:L,submitting:xe,canCreate:V.length>0,onCreate:fe,onUpdate:async a=>{O(s.getState())||L&&await D(j(L),a)}}),e.jsx(Re,{open:me,onOpenChange:$})]})}export{va as KanbanBoard};
|
|
16
|
+
*/const $e=J("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]),G=["waiting","active","blocked","review"],re={high:0,medium:1,low:2};function We(t){return t.taskIsolation!==void 0||t.taskPromptSummary!==void 0||t.taskRetryAvailable===!0}function se(t){return t.taskSourceProjectPath||t.projectPath}function Ze(t){return t.pendingInteraction?"blocked":t.taskStatus==="queued"?"waiting":t.taskStatus==="running"?"active":t.taskStatus==="completed"?"review":"blocked"}function Ge(t,r){if(t.pendingInteraction!==r.pendingInteraction)return t.pendingInteraction?-1:1;const i=re[t.taskPriority??"medium"]-re[r.taskPriority??"medium"];if(i!==0)return i;const u=t.taskDueAt?Date.parse(t.taskDueAt):Number.POSITIVE_INFINITY,n=r.taskDueAt?Date.parse(r.taskDueAt):Number.POSITIVE_INFINITY;if(u!==n)return u-n;if(t.taskStatus==="queued"&&r.taskStatus==="queued"){const h=(t.taskQueuePosition??Number.POSITIVE_INFINITY)-(r.taskQueuePosition??Number.POSITIVE_INFINITY);if(h!==0)return h}return r.lastMessageTime.localeCompare(t.lastMessageTime)}function Je(t){const r={waiting:[],active:[],blocked:[],review:[]};for(const i of t)We(i)&&r[Ze(i)].push(i);for(const i of G)r[i].sort(Ge);return r}function Xe(t){return`TASK-${t.replace(/^task-?/,"").slice(0,6).toUpperCase()}`}const ea={high:{label:"kanban.priority.high",className:"border-red-200 bg-red-50 text-red-700 dark:border-red-900/70 dark:bg-red-950/35 dark:text-red-300"},medium:{label:"kanban.priority.medium",className:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/70 dark:bg-amber-950/35 dark:text-amber-300"},low:{label:"kanban.priority.low",className:"border-zinc-200 bg-zinc-50 text-zinc-600 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-400"}},aa={feature:"kanban.kind.feature",bug:"kanban.kind.bug",maintenance:"kanban.kind.maintenance",research:"kanban.kind.research"};function ta(t){const r=new Date(t);return Number.isNaN(r.getTime())?"":new Intl.DateTimeFormat(ye()==="zh"?"zh-CN":"en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(r)}function K({label:t,onClick:r,disabled:i,tone:u="neutral",children:n}){return e.jsx("button",{type:"button","aria-label":t,title:t,disabled:i,onClick:r,className:P("flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:cursor-wait disabled:opacity-45",u==="danger"?"text-red-500 hover:bg-red-500/10 focus-visible:ring-red-500":u==="accent"?"text-[hsl(var(--deck-accent))] hover:bg-[hsl(var(--deck-accent-soft))] focus-visible:ring-[hsl(var(--deck-accent))]":"text-[hsl(var(--deck-ink-faint))] hover:bg-[hsl(var(--deck-surface-2))] hover:text-[hsl(var(--deck-ink))] focus-visible:ring-[hsl(var(--deck-accent))]"),children:n})}function na({session:t,unread:r,cancelling:i,retrying:u,updating:n,onOpen:h,onInspect:T,onEdit:C,onCancel:y,onRetry:c,onArchive:k}){const o=U(),w=j(t),f=q(w),v=ce(t,o),g=ea[t.taskPriority??"medium"],m=t.taskKind??"feature",x=ve(t,o),D=t.taskSourceProjectPath||t.projectPath,I=D.split("/").filter(Boolean).at(-1)||D,M=t.taskStatus==="queued"||t.taskStatus==="running",N=!!t.taskRetryAvailable&&["failed","interrupted","cancelled"].includes(t.taskStatus),A=!!t.pendingInteraction,S=t.taskStatus==="completed";return e.jsxs("article",{"data-kanban-task":f,className:P("group rounded-md border bg-[hsl(var(--deck-surface))] px-3 py-3 shadow-[0_1px_2px_hsl(var(--deck-ink)/0.04)] transition-[border-color,box-shadow,transform]","border-[hsl(var(--deck-border))] hover:-translate-y-px hover:border-[hsl(var(--deck-border-strong))] hover:shadow-[0_8px_24px_-16px_hsl(var(--deck-ink)/0.35)]",r&&"border-[hsl(var(--deck-accent)/0.55)]"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-mono text-[9.5px] uppercase text-[hsl(var(--deck-ink-faint))]",children:Xe(t.sessionId)}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[r&&e.jsx("span",{"aria-label":o("kanban.card.unread"),title:o("kanban.card.unread"),className:"h-1.5 w-1.5 rounded-full bg-[hsl(var(--deck-accent))] shadow-[0_0_6px_hsl(var(--deck-accent-glow)/0.8)]"}),e.jsx("span",{className:"truncate font-mono text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:I})]})]}),e.jsx("button",{type:"button",onClick:h,className:"mt-2 block w-full text-left text-[13px] font-medium leading-[1.45] text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:v}),x&&e.jsx("p",{title:x,className:P("mt-1.5 line-clamp-2 text-[10.5px] leading-[1.45]",A||t.taskStatus==="failed"?"text-red-600 dark:text-red-400":"text-[hsl(var(--deck-ink-faint))]"),children:x}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1",children:[e.jsx("span",{className:P("rounded-sm border px-1.5 py-0.5 font-mono text-[9px] font-medium",g.className),children:o(g.label)}),e.jsx("span",{className:"rounded-sm border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface-2))] px-1.5 py-0.5 font-mono text-[9px] text-[hsl(var(--deck-ink-muted))]",children:o(aa[m])}),t.taskDueAt&&e.jsxs("span",{className:P("inline-flex items-center gap-1 rounded-sm border px-1.5 py-0.5 font-mono text-[9px]",Date.parse(t.taskDueAt)<Date.now()&&!S?"border-red-200 bg-red-50 text-red-700 dark:border-red-900/70 dark:bg-red-950/35 dark:text-red-300":"border-[hsl(var(--deck-border))] text-[hsl(var(--deck-ink-faint))]"),children:[e.jsx(le,{className:"h-2.5 w-2.5"}),ta(t.taskDueAt)]})]}),t.taskStatus==="queued"&&t.taskQueuePosition&&e.jsx("div",{className:"mt-2 font-mono text-[9.5px] text-amber-700 dark:text-amber-400",children:o("kanban.card.queuePosition",{position:t.taskQueuePosition,depth:t.taskQueueDepth??t.taskQueuePosition})}),t.taskDiffStat&&e.jsx("div",{className:"mt-2 font-mono text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:o("kanban.card.diff",{files:t.taskDiffStat.changedFiles,additions:t.taskDiffStat.additions,deletions:t.taskDiffStat.deletions})}),e.jsxs("div",{className:"mt-3 flex items-center justify-end gap-0.5 border-t border-[hsl(var(--deck-hairline))] pt-2",children:[A&&e.jsx(K,{label:o("kanban.action.respond"),onClick:h,tone:"danger",children:e.jsx(Ye,{className:"h-3.5 w-3.5"})}),S&&e.jsx(K,{label:o("kanban.action.inspect"),onClick:T,tone:"accent",children:e.jsx(He,{className:"h-3.5 w-3.5"})}),N&&e.jsx(K,{label:o("kanban.action.retry"),onClick:c,disabled:u,tone:"accent",children:u?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ge,{className:"h-3.5 w-3.5"})}),M&&e.jsx(K,{label:o("kanban.action.cancel"),onClick:y,disabled:i,tone:"danger",children:i?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(je,{className:"h-3.5 w-3.5"})}),e.jsx(K,{label:o("kanban.action.edit"),onClick:C,disabled:n,children:n?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ze,{className:"h-3.5 w-3.5"})}),S&&e.jsx(K,{label:o("kanban.action.archive"),onClick:k,children:e.jsx(qe,{className:"h-3.5 w-3.5"})}),e.jsx(K,{label:o("kanban.action.open"),onClick:h,children:e.jsx(Ne,{className:"h-3.5 w-3.5"})})]})]})}const ra={waiting:{title:"kanban.column.waiting",description:"kanban.column.waitingDescription",icon:Be,accent:"bg-amber-400",iconStyle:"text-amber-700 dark:text-amber-400"},active:{title:"kanban.column.active",description:"kanban.column.activeDescription",icon:E,accent:"bg-blue-500",iconStyle:"text-blue-700 dark:text-blue-400"},blocked:{title:"kanban.column.blocked",description:"kanban.column.blockedDescription",icon:Se,accent:"bg-red-500",iconStyle:"text-red-700 dark:text-red-400"},review:{title:"kanban.column.review",description:"kanban.column.reviewDescription",icon:we,accent:"bg-[hsl(var(--deck-accent))]",iconStyle:"text-[hsl(var(--deck-accent))]"}};function sa({id:t,sessions:r,unreadTaskKeys:i,cancellingTaskKeys:u,retryingTaskKeys:n,updatingTaskKeys:h,taskKey:T,onOpen:C,onInspect:y,onEdit:c,onCancel:k,onRetry:o,onArchive:w}){const f=U(),v=ra[t],g=v.icon;return e.jsxs("section",{"data-kanban-column":t,"aria-labelledby":`kanban-column-${t}`,className:"flex min-h-[180px] min-w-0 flex-col border-t-2 border-[hsl(var(--deck-hairline))] pt-3 md:min-h-[360px]",children:[e.jsxs("header",{className:"mb-3 flex min-h-12 items-start gap-2 px-0.5",children:[e.jsx(g,{className:P("mt-0.5 h-3.5 w-3.5 shrink-0",v.iconStyle,t==="active"&&"animate-spin")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{id:`kanban-column-${t}`,className:"font-mono text-[11px] font-semibold uppercase text-[hsl(var(--deck-ink))]",children:f(v.title)}),e.jsx("span",{className:"min-w-5 rounded-sm bg-[hsl(var(--deck-surface-2))] px-1.5 py-0.5 text-center font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:r.length})]}),e.jsx("p",{className:"mt-0.5 text-[10px] leading-4 text-[hsl(var(--deck-ink-faint))]",children:f(v.description)})]}),e.jsx("span",{className:P("mt-1 h-1.5 w-1.5 shrink-0 rounded-full",v.accent)})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-2.5",children:[r.map(m=>{const x=T(m);return e.jsx(na,{session:m,unread:i.includes(x),cancelling:u.includes(x),retrying:n.includes(x),updating:h.includes(x),onOpen:()=>C(m),onInspect:()=>y(m),onEdit:()=>c(m),onCancel:()=>k(m),onRetry:()=>o(m),onArchive:()=>w(m)},x)}),r.length===0&&e.jsx("div",{className:"flex min-h-28 items-center justify-center rounded-md border border-dashed border-[hsl(var(--deck-border))] px-4 text-center font-mono text-[10px] leading-4 text-[hsl(var(--deck-ink-faint))]",children:f("kanban.column.empty")})]})]})}function ca(t){if(!t)return"";const r=new Date(t);return Number.isNaN(r.getTime())?"":new Date(r.getTime()-r.getTimezoneOffset()*6e4).toISOString().slice(0,16)}function ia({open:t,onOpenChange:r,projects:i,defaultProjectPath:u,session:n,submitting:h,canCreate:T,onCreate:C,onUpdate:y}){const c=U(),k=!!n,[o,w]=b.useState(""),[f,v]=b.useState(""),[g,m]=b.useState(u??""),[x,D]=b.useState("medium"),[I,M]=b.useState("feature"),[N,A]=b.useState(""),[S,R]=b.useState(null);b.useEffect(()=>{var l;t&&(w((n==null?void 0:n.title)??""),v((n==null?void 0:n.taskPromptSummary)??""),m((n==null?void 0:n.taskSourceProjectPath)??(n==null?void 0:n.projectPath)??u??((l=i.find(p=>p.available))==null?void 0:l.path)??""),D((n==null?void 0:n.taskPriority)??"medium"),M((n==null?void 0:n.taskKind)??"feature"),A(ca(n==null?void 0:n.taskDueAt)),R(null))},[u,t,i,n]);const H=async l=>{l.preventDefault();const p=o.trim(),F=f.trim();if(!(!k&&(!F||!g))){R(null);try{k?await y({...p?{title:p}:{},taskPriority:x,taskKind:I,taskDueAt:N?new Date(N).toISOString():null}):await C({...p?{title:p}:{},prompt:F,projectPath:g,taskPriority:x,taskKind:I,...N?{taskDueAt:new Date(N).toISOString()}:{}}),r(!1)}catch(B){R(B instanceof Error?B.message:c("kanban.dialog.submitFailed"))}}};return e.jsx(Pe,{open:t,onOpenChange:r,children:e.jsxs(Te,{className:"max-w-[560px] gap-0 overflow-hidden border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] p-0",children:[e.jsxs(Ce,{className:"border-b border-[hsl(var(--deck-hairline))] px-5 py-4",children:[e.jsx(De,{className:"font-mono text-[15px] text-[hsl(var(--deck-ink))]",children:c(k?"kanban.dialog.editTitle":"kanban.dialog.createTitle")}),e.jsx(Ie,{className:"text-[11.5px] text-[hsl(var(--deck-ink-faint))]",children:c(k?"kanban.dialog.editDescription":"kanban.dialog.createDescription")})]}),e.jsxs("form",{onSubmit:H,children:[e.jsxs("div",{className:"grid gap-4 px-5 py-5",children:[e.jsxs("label",{className:"grid gap-1.5",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:c("kanban.field.title")}),e.jsx("input",{value:o,onChange:l=>w(l.target.value),maxLength:200,className:"field",placeholder:c("kanban.field.titlePlaceholder")})]}),!k&&e.jsxs("label",{className:"grid gap-1.5",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:c("kanban.field.prompt")}),e.jsx("textarea",{required:!0,value:f,onChange:l=>v(l.target.value),maxLength:32e3,rows:6,className:"min-h-32 w-full resize-y rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-canvas))] px-3 py-2.5 text-[13px] leading-5 text-[hsl(var(--deck-ink))] outline-none placeholder:text-[hsl(var(--deck-ink-faint))] focus:border-[hsl(var(--deck-accent)/0.6)] focus:ring-1 focus:ring-[hsl(var(--deck-accent)/0.35)]",placeholder:c("kanban.field.promptPlaceholder")})]}),!k&&e.jsxs("label",{className:"grid gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:[e.jsx(ie,{className:"h-3 w-3"}),c("kanban.field.project")]}),e.jsx("select",{required:!0,value:g,onChange:l=>m(l.target.value),className:"field",children:i.filter(l=>l.available).map(l=>e.jsx("option",{value:l.path,children:l.name},l.path))})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[e.jsxs("label",{className:"grid gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:[e.jsx($e,{className:"h-3 w-3"}),c("kanban.field.kind")]}),e.jsxs("select",{value:I,onChange:l=>M(l.target.value),className:"field",children:[e.jsx("option",{value:"feature",children:c("kanban.kind.feature")}),e.jsx("option",{value:"bug",children:c("kanban.kind.bug")}),e.jsx("option",{value:"maintenance",children:c("kanban.kind.maintenance")}),e.jsx("option",{value:"research",children:c("kanban.kind.research")})]})]}),e.jsxs("label",{className:"grid gap-1.5",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:c("kanban.field.priority")}),e.jsxs("select",{value:x,onChange:l=>D(l.target.value),className:"field",children:[e.jsx("option",{value:"high",children:c("kanban.priority.high")}),e.jsx("option",{value:"medium",children:c("kanban.priority.medium")}),e.jsx("option",{value:"low",children:c("kanban.priority.low")})]})]}),e.jsxs("label",{className:"grid gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[10px] uppercase text-[hsl(var(--deck-ink-muted))]",children:[e.jsx(le,{className:"h-3 w-3"}),c("kanban.field.dueAt")]}),e.jsx("input",{type:"datetime-local",value:N,onChange:l=>A(l.target.value),className:"field min-w-0"})]})]}),!k&&e.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface-2))] px-3 py-2 font-mono text-[10px] text-[hsl(var(--deck-ink-muted))]",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[hsl(var(--deck-accent))]"}),c("kanban.dialog.localExecution")]}),S&&e.jsx("div",{role:"alert",className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-[11px] text-red-700 dark:border-red-900/70 dark:bg-red-950/35 dark:text-red-300",children:S})]}),e.jsxs(Ae,{className:"border-t border-[hsl(var(--deck-hairline))] bg-[hsl(var(--deck-surface-2))]/60 px-5 py-3",children:[e.jsx(ne,{type:"button",variant:"ghost",onClick:()=>r(!1),disabled:h,children:c("kanban.dialog.cancel")}),e.jsxs(ne,{type:"submit",disabled:h||!k&&(!T||!f.trim()||!g),className:"gap-2",children:[h&&e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}),c(k?"kanban.dialog.save":"kanban.dialog.dispatch")]})]})]})]})})}function va(){var te;const t=U(),r=s(a=>a.sessions),i=s(a=>a.boundProjects),u=s(a=>a.selectedProjectPath),n=s(a=>a.taskWorkspaceInfo),h=s(a=>a.catalogLoadState),T=s(a=>a.taskEventConnectionState),C=s(a=>a.isDispatchingTask),y=s(a=>a.isUpdatingTaskAdmission),c=s(a=>a.cancellingTaskKeys),k=s(a=>a.retryingTaskKeys),o=s(a=>a.updatingTaskKeys),w=s(a=>a.unreadTaskKeys),f=s(a=>a.error),v=s(a=>Le(a.historySurfaceSelection)),g=s(a=>a.selectProject),m=s(a=>a.selectSession),x=s(a=>a.dispatchTask),D=s(a=>a.updateTask),I=s(a=>a.cancelTask),M=s(a=>a.retryTask),N=s(a=>a.archiveSession),A=s(a=>a.setTaskAdmissionPaused),S=s(a=>a.reconnectTaskEvents),R=s(a=>a.clearError),H=_e(a=>a.currentMode),l=Q(a=>a.setMainView),p=Q(a=>a.boardProjectPath),F=Q(a=>a.setBoardProjectPath),B=Q(a=>a.openFilePreview),[X,oe]=b.useState(""),[de,Y]=b.useState(!1),[ue,$]=b.useState(null),[me,W]=b.useState(!1);b.useEffect(()=>{p&&!i.some(a=>a.path===p&&a.available)&&F(null)},[p,i,F]);const L=r.find(a=>q(j(a))===ue)??null,Z=X.trim().toLowerCase(),ee=b.useMemo(()=>r.filter(a=>p&&se(a)!==p?!1:Z?[a.sessionId,ce(a,t),a.taskPromptSummary,se(a),a.taskPriority,a.taskKind].filter(Boolean).join(" ").toLowerCase().includes(Z):!0),[p,Z,r,t]),ae=b.useMemo(()=>Je(ee),[ee]),he=G.reduce((a,d)=>a+ae[d].length,0),_=n==null?void 0:n.taskAdmission,z=_?!_.paused:!0,V=i.filter(a=>a.available),ke=p??u??((te=V[0])==null?void 0:te.path)??null,xe=L?o.includes(q(j(L))):C,pe=async a=>{l("workspace"),await m(j(a))},be=async a=>{l("workspace"),await m(j(a)),B({tab:"diff"})},fe=async a=>{O(s.getState())||(g(a.projectPath),await x({...a,isolation:"local",permissionMode:H},{selectSession:!1}))};return v?null:e.jsxs("main",{"data-kanban-board":!0,className:"flex h-full min-w-0 flex-col overflow-hidden bg-[hsl(var(--deck-canvas))] text-[hsl(var(--deck-ink))]",children:[e.jsxs("div",{className:"border-b border-[hsl(var(--deck-hairline))] bg-[hsl(var(--deck-canvas))] px-4 py-3 sm:px-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"font-mono text-[15px] font-semibold",children:t("kanban.title")}),e.jsx("span",{className:"rounded-sm border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-1.5 py-0.5 font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:t("kanban.taskCount",{count:he})})]}),e.jsx("p",{className:"mt-0.5 text-[10.5px] text-[hsl(var(--deck-ink-faint))]",children:t("kanban.subtitle")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_&&e.jsx("div",{className:"hidden rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-2.5 py-1.5 lg:block",children:e.jsx(Ke,{inFlight:_.inFlight,queued:_.queued,maxConcurrent:_.maxConcurrent,compact:!0})}),e.jsxs("button",{type:"button",role:"switch","aria-checked":z,disabled:!_||y,onClick:()=>{O(s.getState())||A(z).catch(()=>{})},className:P("inline-flex h-8 items-center gap-2 rounded-md border px-2.5 font-mono text-[10.5px] transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] disabled:opacity-45",z?"border-[hsl(var(--deck-accent)/0.45)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-muted))]"),children:[y?e.jsx(E,{className:"h-3 w-3 animate-spin"}):z?e.jsx(Ve,{className:"h-3 w-3 fill-current"}):e.jsx(Qe,{className:"h-3 w-3"}),t(z?"kanban.autoClaim.running":"kanban.autoClaim.paused")]}),e.jsxs("button",{type:"button",onClick:()=>{if(V.length===0){W(!0);return}$(null),Y(!0)},className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-[hsl(var(--deck-ink))] px-3 font-mono text-[10.5px] font-medium text-[hsl(var(--deck-canvas))] transition-opacity hover:opacity-85 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--deck-accent))]",children:[e.jsx(Ue,{className:"h-3.5 w-3.5"}),t("kanban.action.newTask")]})]})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[e.jsxs("label",{className:"relative min-w-[180px] flex-1 sm:max-w-[320px]",children:[e.jsx(Ee,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[hsl(var(--deck-ink-faint))]"}),e.jsx("input",{type:"search",value:X,onChange:a=>oe(a.target.value),"aria-label":t("kanban.searchAria"),placeholder:t("kanban.searchPlaceholder"),className:"h-8 w-full rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] pl-8 pr-3 font-mono text-[10.5px] text-[hsl(var(--deck-ink))] outline-none placeholder:text-[hsl(var(--deck-ink-faint))] focus:border-[hsl(var(--deck-accent)/0.55)] focus:ring-1 focus:ring-[hsl(var(--deck-accent)/0.25)]"})]}),e.jsxs("label",{className:"relative",children:[e.jsx(ie,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[hsl(var(--deck-accent))]"}),e.jsxs("select",{value:p??"__all__",onChange:a=>{const d=a.target.value;F(d==="__all__"?null:d),d!=="__all__"&&g(d)},"aria-label":t("kanban.projectFilterAria"),className:"h-8 min-w-[160px] appearance-none rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] pl-8 pr-7 font-mono text-[10.5px] text-[hsl(var(--deck-ink-muted))] outline-none focus:border-[hsl(var(--deck-accent)/0.55)]",children:[e.jsx("option",{value:"__all__",children:t("kanban.projectAll")}),V.map(a=>e.jsx("option",{value:a.path,children:a.name},a.path))]})]}),e.jsx("button",{type:"button",onClick:()=>W(!0),"aria-label":t("projects.bind.action"),title:t("projects.bind.action"),className:"flex h-8 w-8 items-center justify-center rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-faint))] hover:text-[hsl(var(--deck-accent))]",children:e.jsx(Me,{className:"h-3.5 w-3.5"})}),h==="loading"||h==="hydrating"?e.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx(E,{className:"h-3 w-3 animate-spin"}),t("sidebar.catalog.syncing")]}):null]})]}),T==="offline"&&e.jsxs("div",{role:"alert",className:"flex items-center gap-2 border-b border-amber-300/60 bg-amber-50/80 px-4 py-2 text-[10.5px] text-amber-800 dark:border-amber-900/70 dark:bg-amber-950/30 dark:text-amber-300 sm:px-6",children:[e.jsx(Fe,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"flex-1",children:t("kanban.feed.offline")}),e.jsxs("button",{type:"button",onClick:()=>void S().catch(()=>{}),className:"inline-flex h-7 items-center gap-1 rounded-md px-2 font-mono hover:bg-amber-100 dark:hover:bg-amber-900/40",children:[e.jsx(Oe,{className:"h-3 w-3"}),t("taskHome.feed.retry")]})]}),f&&e.jsxs("div",{role:"alert",className:"flex items-center gap-3 border-b border-red-200 bg-red-50 px-4 py-2 text-[10.5px] text-red-700 dark:border-red-900/70 dark:bg-red-950/30 dark:text-red-300 sm:px-6",children:[e.jsx("span",{className:"flex-1",children:f}),e.jsx("button",{type:"button",onClick:R,className:"font-mono underline",children:t("taskHome.error.dismiss")})]}),e.jsx("div",{className:"flex-1 overflow-auto px-4 py-4 sm:px-6",children:e.jsx("div",{className:"grid min-w-0 grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4",children:G.map(a=>e.jsx(sa,{id:a,sessions:ae[a],unreadTaskKeys:w,cancellingTaskKeys:c,retryingTaskKeys:k,updatingTaskKeys:o,taskKey:d=>q(j(d)),onOpen:d=>{pe(d).catch(()=>{})},onInspect:d=>{be(d).catch(()=>{})},onEdit:d=>{$(q(j(d))),Y(!0)},onCancel:d=>{O(s.getState())||I(j(d)).catch(()=>{})},onRetry:d=>{O(s.getState())||M(j(d)).catch(()=>{})},onArchive:d=>{O(s.getState())||N(j(d))}},a))})}),e.jsx(ia,{open:de,onOpenChange:a=>{Y(a),a||$(null)},projects:i,defaultProjectPath:ke,session:L,submitting:xe,canCreate:V.length>0,onCreate:fe,onUpdate:async a=>{O(s.getState())||L&&await D(j(L),a)}}),e.jsx(Re,{open:me,onOpenChange:W})]})}export{va as KanbanBoard};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockHighlighter-
|
|
2
|
-
import{ak as Ei,j as ht,u as Ii,C as Ai,_ as Ti}from"./index-pqMcowCZ.js";import{e as rn,g as sr,j as R,r as He}from"./vendor-react-DofNRwfy.js";import{C as vi}from"./copy-o_KiXkAh.js";function Pf(e){const t=[],n=String(e||"");let r=n.indexOf(","),l=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const i=n.slice(l,r).trim();(i||!o)&&t.push(i),l=r+1,r=n.indexOf(",",l)}return t}function Pi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Di=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fi={};function pt(e,t){return(Fi.jsx?Di:zi).test(e)}const Li=/[ \t\n\f\r]/g;function _i(e){return typeof e=="object"?e.type==="text"?mt(e.value):!1:mt(e)}function mt(e){return e.replace(Li,"")===""}class Ye{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ye.prototype.normal={};Ye.prototype.property={};Ye.prototype.space=void 0;function cr(e,t){const n={},r={};for(const l of e)Object.assign(n,l.property),Object.assign(r,l.normal);return new Ye(n,r,t)}function zn(e){return e.toLowerCase()}class ne{constructor(t,n){this.attribute=n,this.property=t}}ne.prototype.attribute="";ne.prototype.booleanish=!1;ne.prototype.boolean=!1;ne.prototype.commaOrSpaceSeparated=!1;ne.prototype.commaSeparated=!1;ne.prototype.defined=!1;ne.prototype.mustUseProperty=!1;ne.prototype.number=!1;ne.prototype.overloadedBoolean=!1;ne.prototype.property="";ne.prototype.spaceSeparated=!1;ne.prototype.space=void 0;let Ri=0;const D=Ae(),Y=Ae(),Dn=Ae(),S=Ae(),$=Ae(),Fe=Ae(),re=Ae();function Ae(){return 2**++Ri}const Fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:Y,commaOrSpaceSeparated:re,commaSeparated:Fe,number:S,overloadedBoolean:Dn,spaceSeparated:$},Symbol.toStringTag,{value:"Module"})),gn=Object.keys(Fn);class Un extends ne{constructor(t,n,r,l){let o=-1;if(super(t,n),gt(this,"space",l),typeof r=="number")for(;++o<gn.length;){const i=gn[o];gt(this,gn[o],(r&Fn[i])===Fn[i])}}}Un.prototype.defined=!0;function gt(e,t,n){n&&(e[t]=n)}function _e(e){const t={},n={};for(const[r,l]of Object.entries(e.properties)){const o=new Un(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[zn(r)]=r,n[zn(o.attribute)]=r}return new Ye(t,n,e.space)}const fr=_e({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:$,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:S,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:$,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:Y,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hr(e,t){return t in e?e[t]:t}function pr(e,t){return hr(e,t.toLowerCase())}const Oi=_e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fe,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:$,autoFocus:D,autoPlay:D,blocking:$,capture:null,charSet:null,checked:D,cite:null,className:$,cols:S,colSpan:null,content:null,contentEditable:Y,controls:D,controlsList:$,coords:S|Fe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:Dn,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:$,height:S,hidden:Dn,high:S,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:$,itemRef:$,itemScope:D,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,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:D,optimum:S,pattern:null,ping:$,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:$,required:D,reversed:D,rows:S,rowSpan:S,sandbox:$,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:Y,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:D,disableRemotePlayback:D,prefix:null,property:null,results:S,security:null,unselectable:null},space:"html",transform:pr}),Mi=_e({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:re,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:$,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:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fe,g2:Fe,glyphName:Fe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:S,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:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hr}),mr=_e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),gr=_e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pr}),dr=_e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ni={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"},Bi=/[A-Z]/g,dt=/-[a-z]/g,ji=/^data[-\w.:]+$/i;function Hi(e,t){const n=zn(t);let r=t,l=ne;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ji.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(dt,Vi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!dt.test(o)){let i=o.replace(Bi,Ui);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}l=Un}return new l(r,t)}function Ui(e){return"-"+e.toLowerCase()}function Vi(e){return e.charAt(1).toUpperCase()}const $i=cr([fr,Oi,mr,gr,dr],"html"),Vn=cr([fr,Mi,mr,gr,dr],"svg");function zf(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function qi(e){return e.join(" ").trim()}var $n={},xt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wi=/\n/g,Yi=/^\s*/,Xi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Qi=/^:\s*/,Gi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ki=/^[;\s]*/,Ji=/^\s+|\s+$/g,Zi=`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockHighlighter-y0h2qpHE.js","assets/vendor-react-DofNRwfy.js","assets/index-C6zClU0B.js","assets/vendor-radix-D6QrtXqd.js","assets/session-events-aq2qdB3u.js","assets/index-CaCifsSK.css","assets/copy-DqhAOOxU.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{ao as Ei,j as ht,u as Ii,C as Ai,_ as Ti}from"./index-C6zClU0B.js";import{e as rn,g as sr,j as R,r as He}from"./vendor-react-DofNRwfy.js";import{C as vi}from"./copy-DqhAOOxU.js";function Pf(e){const t=[],n=String(e||"");let r=n.indexOf(","),l=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const i=n.slice(l,r).trim();(i||!o)&&t.push(i),l=r+1,r=n.indexOf(",",l)}return t}function Pi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Di=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fi={};function pt(e,t){return(Fi.jsx?Di:zi).test(e)}const Li=/[ \t\n\f\r]/g;function _i(e){return typeof e=="object"?e.type==="text"?mt(e.value):!1:mt(e)}function mt(e){return e.replace(Li,"")===""}class Ye{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ye.prototype.normal={};Ye.prototype.property={};Ye.prototype.space=void 0;function cr(e,t){const n={},r={};for(const l of e)Object.assign(n,l.property),Object.assign(r,l.normal);return new Ye(n,r,t)}function zn(e){return e.toLowerCase()}class ne{constructor(t,n){this.attribute=n,this.property=t}}ne.prototype.attribute="";ne.prototype.booleanish=!1;ne.prototype.boolean=!1;ne.prototype.commaOrSpaceSeparated=!1;ne.prototype.commaSeparated=!1;ne.prototype.defined=!1;ne.prototype.mustUseProperty=!1;ne.prototype.number=!1;ne.prototype.overloadedBoolean=!1;ne.prototype.property="";ne.prototype.spaceSeparated=!1;ne.prototype.space=void 0;let Ri=0;const D=Ae(),Y=Ae(),Dn=Ae(),S=Ae(),$=Ae(),Fe=Ae(),re=Ae();function Ae(){return 2**++Ri}const Fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:Y,commaOrSpaceSeparated:re,commaSeparated:Fe,number:S,overloadedBoolean:Dn,spaceSeparated:$},Symbol.toStringTag,{value:"Module"})),gn=Object.keys(Fn);class Un extends ne{constructor(t,n,r,l){let o=-1;if(super(t,n),gt(this,"space",l),typeof r=="number")for(;++o<gn.length;){const i=gn[o];gt(this,gn[o],(r&Fn[i])===Fn[i])}}}Un.prototype.defined=!0;function gt(e,t,n){n&&(e[t]=n)}function _e(e){const t={},n={};for(const[r,l]of Object.entries(e.properties)){const o=new Un(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[zn(r)]=r,n[zn(o.attribute)]=r}return new Ye(t,n,e.space)}const fr=_e({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:$,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:S,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:$,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:Y,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hr(e,t){return t in e?e[t]:t}function pr(e,t){return hr(e,t.toLowerCase())}const Oi=_e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fe,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:$,autoFocus:D,autoPlay:D,blocking:$,capture:null,charSet:null,checked:D,cite:null,className:$,cols:S,colSpan:null,content:null,contentEditable:Y,controls:D,controlsList:$,coords:S|Fe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:Dn,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:$,height:S,hidden:Dn,high:S,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:$,itemRef:$,itemScope:D,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,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:D,optimum:S,pattern:null,ping:$,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:$,required:D,reversed:D,rows:S,rowSpan:S,sandbox:$,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:Y,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:D,disableRemotePlayback:D,prefix:null,property:null,results:S,security:null,unselectable:null},space:"html",transform:pr}),Mi=_e({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:re,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:$,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:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fe,g2:Fe,glyphName:Fe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:S,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:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hr}),mr=_e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),gr=_e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pr}),dr=_e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ni={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"},Bi=/[A-Z]/g,dt=/-[a-z]/g,ji=/^data[-\w.:]+$/i;function Hi(e,t){const n=zn(t);let r=t,l=ne;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ji.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(dt,Vi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!dt.test(o)){let i=o.replace(Bi,Ui);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}l=Un}return new l(r,t)}function Ui(e){return"-"+e.toLowerCase()}function Vi(e){return e.charAt(1).toUpperCase()}const $i=cr([fr,Oi,mr,gr,dr],"html"),Vn=cr([fr,Mi,mr,gr,dr],"svg");function zf(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function qi(e){return e.join(" ").trim()}var $n={},xt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wi=/\n/g,Yi=/^\s*/,Xi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Qi=/^:\s*/,Gi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ki=/^[;\s]*/,Ji=/^\s+|\s+$/g,Zi=`
|
|
3
3
|
`,kt="/",yt="*",Ee="",el="comment",nl="declaration";function tl(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function l(d){var y=d.match(Wi);y&&(n+=y.length);var C=d.lastIndexOf(Zi);r=~C?d.length-C:r+d.length}function o(){var d={line:n,column:r};return function(y){return y.position=new i(d),s(),y}}function i(d){this.start=d,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;function a(d){var y=new Error(t.source+":"+n+":"+r+": "+d);if(y.reason=d,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function u(d){var y=d.exec(e);if(y){var C=y[0];return l(C),e=e.slice(C.length),y}}function s(){u(Yi)}function f(d){var y;for(d=d||[];y=c();)y!==!1&&d.push(y);return d}function c(){var d=o();if(!(kt!=e.charAt(0)||yt!=e.charAt(1))){for(var y=2;Ee!=e.charAt(y)&&(yt!=e.charAt(y)||kt!=e.charAt(y+1));)++y;if(y+=2,Ee===e.charAt(y-1))return a("End of comment missing");var C=e.slice(2,y-2);return r+=2,l(C),e=e.slice(y),r+=2,d({type:el,comment:C})}}function p(){var d=o(),y=u(Xi);if(y){if(c(),!u(Qi))return a("property missing ':'");var C=u(Gi),x=d({type:nl,property:bt(y[0].replace(xt,Ee)),value:C?bt(C[0].replace(xt,Ee)):Ee});return u(Ki),x}}function h(){var d=[];f(d);for(var y;y=p();)y!==!1&&(d.push(y),f(d));return d}return s(),h()}function bt(e){return e?e.replace(Ji,Ee):Ee}var rl=tl,il=rn&&rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($n,"__esModule",{value:!0});$n.default=ol;const ll=il(rl);function ol(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,ll.default)(e),l=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:i,value:a}=o;l?t(i,a,o):a&&(n=n||{},n[i]=a)}),n}var sn={};Object.defineProperty(sn,"__esModule",{value:!0});sn.camelCase=void 0;var al=/^--[a-zA-Z0-9_-]+$/,ul=/-([a-z])/g,sl=/^[^-]+$/,cl=/^-(webkit|moz|ms|o|khtml)-/,fl=/^-(ms)-/,hl=function(e){return!e||sl.test(e)||al.test(e)},pl=function(e,t){return t.toUpperCase()},wt=function(e,t){return"".concat(t,"-")},ml=function(e,t){return t===void 0&&(t={}),hl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(fl,wt):e=e.replace(cl,wt),e.replace(ul,pl))};sn.camelCase=ml;var gl=rn&&rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dl=gl($n),xl=sn;function Ln(e,t){var n={};return!e||typeof e!="string"||(0,dl.default)(e,function(r,l){r&&l&&(n[(0,xl.camelCase)(r,t)]=l)}),n}Ln.default=Ln;var kl=Ln;const yl=sr(kl),xr=kr("end"),qn=kr("start");function kr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function bl(e){const t=qn(e),n=xr(e);if(t&&n)return{start:t,end:n}}function Ue(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?St(e.position):"start"in e||"end"in e?St(e):"line"in e||"column"in e?_n(e):""}function _n(e){return Ct(e&&e.line)+":"+Ct(e&&e.column)}function St(e){return _n(e&&e.start)+"-"+_n(e&&e.end)}function Ct(e){return e&&typeof e=="number"?e:1}class J extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let l="",o={},i=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?l=t:!o.cause&&t&&(i=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.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=l,this.line=a?a.line:void 0,this.name=Ue(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}J.prototype.file="";J.prototype.name="";J.prototype.reason="";J.prototype.message="";J.prototype.stack="";J.prototype.column=void 0;J.prototype.line=void 0;J.prototype.ancestors=void 0;J.prototype.cause=void 0;J.prototype.fatal=void 0;J.prototype.place=void 0;J.prototype.ruleId=void 0;J.prototype.source=void 0;const Wn={}.hasOwnProperty,wl=new Map,Sl=/[A-Z]/g,Cl=new Set(["table","tbody","thead","tfoot","tr"]),El=new Set(["td","th"]),yr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Il(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ll(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Fl(n,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Vn:$i,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=br(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function br(e,t,n){if(t.type==="element")return Al(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Tl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Pl(e,t,n);if(t.type==="mdxjsEsm")return vl(e,t);if(t.type==="root")return zl(e,t,n);if(t.type==="text")return Dl(e,t)}function Al(e,t,n){const r=e.schema;let l=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(l=Vn,e.schema=l),e.ancestors.push(t);const o=Sr(e,t.tagName,!1),i=_l(e,t);let a=Xn(e,t);return Cl.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!_i(u):!0})),wr(e,i,o,t),Yn(i,a),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}function Tl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}qe(e,t.position)}function vl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qe(e,t.position)}function Pl(e,t,n){const r=e.schema;let l=r;t.name==="svg"&&r.space==="html"&&(l=Vn,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:Sr(e,t.name,!0),i=Rl(e,t),a=Xn(e,t);return wr(e,i,o,t),Yn(i,a),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}function zl(e,t,n){const r={};return Yn(r,Xn(e,t)),e.create(t,e.Fragment,r,n)}function Dl(e,t){return t.value}function wr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Fl(e,t,n){return r;function r(l,o,i,a){const s=Array.isArray(i.children)?n:t;return a?s(o,i,a):s(o,i)}}function Ll(e,t){return n;function n(r,l,o,i){const a=Array.isArray(o.children),u=qn(r);return t(l,o,i,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function _l(e,t){const n={};let r,l;for(l in t.properties)if(l!=="children"&&Wn.call(t.properties,l)){const o=Ol(e,l,t.properties[l]);if(o){const[i,a]=o;e.tableCellAlignToStyle&&i==="align"&&typeof a=="string"&&El.has(t.tagName)?r=a:n[i]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Rl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const i=o.expression;i.type;const a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else qe(e,t.position);else{const l=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 qe(e,t.position);else o=r.value===null?!0:r.value;n[l]=o}return n}function Xn(e,t){const n=[];let r=-1;const l=e.passKeys?new Map:wl;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const s=l.get(u)||0;i=u+"-"+s,l.set(u,s+1)}}const a=br(e,o,i);a!==void 0&&n.push(a)}return n}function Ol(e,t,n){const r=Hi(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Pi(n):qi(n)),r.property==="style"){let l=typeof n=="object"?n:Ml(e,String(n));return e.stylePropertyNameCase==="css"&&(l=Nl(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&r.space?Ni[r.property]||r.property:r.attribute,n]}}function Ml(e,t){try{return yl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,l=new J("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=yr+"#cannot-parse-style-attribute",l}}function Sr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,i;for(;++o<l.length;){const a=pt(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};i=i?{type:"MemberExpression",object:i,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=i}else r=pt(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const l=r.value;return Wn.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(r);qe(e)}function qe(e,t){const n=new J("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=yr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Nl(e){const t={};let n;for(n in e)Wn.call(e,n)&&(t[Bl(n)]=e[n]);return t}function Bl(e){let t=e.replace(Sl,jl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jl(e){return"-"+e.toLowerCase()}const dn={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"]},Hl={};function Qn(e,t){const n=Hl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Cr(e,r,l)}function Cr(e,t,n){if(Ul(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Et(e.children,t,n)}return Array.isArray(e)?Et(e,t,n):""}function Et(e,t,n){const r=[];let l=-1;for(;++l<e.length;)r[l]=Cr(e[l],t,n);return r.join("")}function Ul(e){return!!(e&&typeof e=="object")}const It=document.createElement("i");function Gn(e){const t="&"+e+";";It.innerHTML=t;const n=It.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ie(e,t,n,r){const l=e.length;let o=0,i;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)i=r.slice(o,o+1e4),i.unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const At={}.hasOwnProperty;function Er(e){const t={};let n=-1;for(;++n<e.length;)Vl(t,e[n]);return t}function Vl(e,t){let n;for(n in t){const l=(At.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){At.call(l,i)||(l[i]=[]);const a=o[i];$l(l[i],Array.isArray(a)?a:a?[a]:[])}}}function $l(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ie(e,0,0,r)}function Ir(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ce(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Z=be(/[A-Za-z]/),K=be(/[\dA-Za-z]/),ql=be(/[#-'*+\--9=?A-Z^-~]/);function ln(e){return e!==null&&(e<32||e===127)}const Rn=be(/\d/),Wl=be(/[\dA-Fa-f]/),Yl=be(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function _(e){return e===-2||e===-1||e===32}const cn=be(new RegExp("\\p{P}|\\p{S}","u")),Ie=be(/\s/);function be(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Re(e){const t=[];let n=-1,r=0,l=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(o===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(i=String.fromCharCode(o,a),l=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+l+1,i=""),l&&(n+=l,l=0)}return t.join("")+e.slice(r)}function M(e,t,n,r){const l=r?r-1:Number.POSITIVE_INFINITY;let o=0;return i;function i(u){return _(u)?(e.enter(n),a(u)):t(u)}function a(u){return _(u)&&o++<l?(e.consume(u),a):(e.exit(n),t(u))}}const Xl={tokenize:Ql};function Ql(e){const t=e.attempt(this.parser.constructs.contentInitial,r,l);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),M(e,t,"linePrefix")}function l(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,i(a)}function i(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return P(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),i)}}const Gl={tokenize:Kl},Tt={tokenize:Jl};function Kl(e){const t=this,n=[];let r=0,l,o,i;return a;function a(E){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,u,s)(E)}return s(E)}function u(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&A();const F=t.events.length;let L=F,w;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){w=t.events[L][1].end;break}x(r);let N=F;for(;N<t.events.length;)t.events[N][1].end={...w},N++;return ie(t.events,L+1,0,t.events.slice(F)),t.events.length=N,s(E)}return a(E)}function s(E){if(r===n.length){if(!l)return p(E);if(l.currentConstruct&&l.currentConstruct.concrete)return d(E);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Tt,f,c)(E)}function f(E){return l&&A(),x(r),p(E)}function c(E){return t.parser.lazy[t.now().line]=r!==n.length,i=t.now().offset,d(E)}function p(E){return t.containerState={},e.attempt(Tt,h,d)(E)}function h(E){return r++,n.push([t.currentConstruct,t.containerState]),p(E)}function d(E){if(E===null){l&&A(),x(0),e.consume(E);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),y(E)}function y(E){if(E===null){C(e.exit("chunkFlow"),!0),x(0),e.consume(E);return}return P(E)?(e.consume(E),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(E),y)}function C(E,F){const L=t.sliceStream(E);if(F&&L.push(null),E.previous=o,o&&(o.next=E),o=E,l.defineSkip(E.start),l.write(L),t.parser.lazy[E.start.line]){let w=l.events.length;for(;w--;)if(l.events[w][1].start.offset<i&&(!l.events[w][1].end||l.events[w][1].end.offset>i))return;const N=t.events.length;let q=N,j,k;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(j){k=t.events[q][1].end;break}j=!0}for(x(r),w=N;w<t.events.length;)t.events[w][1].end={...k},w++;ie(t.events,q+1,0,t.events.slice(N)),t.events.length=w}}function x(E){let F=n.length;for(;F-- >E;){const L=n[F];t.containerState=L[1],L[0].exit.call(t,e)}n.length=E}function A(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function Jl(e,t,n){return M(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Le(e){if(e===null||V(e)||Ie(e))return 1;if(cn(e))return 2}function fn(e,t,n){const r=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const On={name:"attention",resolveAll:Zl,tokenize:eo};function Zl(e,t){let n=-1,r,l,o,i,a,u,s,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};vt(c,-u),vt(p,u),i={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},l={type:u>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[r][1].end={...i.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=le(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=le(s,[["enter",l,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=le(s,fn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=le(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",l,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,s=le(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ie(e,r-1,n-r+3,s),n=r+s.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function eo(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,l=Le(r);let o;return i;function i(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=Le(u),c=!f||f===2&&l||n.includes(u),p=!l||l===2&&f||n.includes(r);return s._open=!!(o===42?c:c&&(l||!p)),s._close=!!(o===42?p:p&&(f||!c)),t(u)}}function vt(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const no={name:"autolink",tokenize:to};function to(e,t,n){let r=0;return l;function l(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Z(h)?(e.consume(h),i):h===64?n(h):s(h)}function i(h){return h===43||h===45||h===46||K(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||K(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||ln(h)?n(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):ql(h)?(e.consume(h),s):n(h)}function f(h){return K(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||K(h))&&r++<63){const d=h===45?p:c;return e.consume(h),d}return n(h)}}const Xe={partial:!0,tokenize:ro};function ro(e,t,n){return r;function r(o){return _(o)?M(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||P(o)?t(o):n(o)}}const Ar={continuation:{tokenize:lo},exit:oo,name:"blockQuote",tokenize:io};function io(e,t,n){const r=this;return l;function l(i){if(i===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),o}return n(i)}function o(i){return _(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function lo(e,t,n){const r=this;return l;function l(i){return _(i)?M(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):o(i)}function o(i){return e.attempt(Ar,t,n)(i)}}function oo(e){e.exit("blockQuote")}const Tr={name:"characterEscape",tokenize:ao};function ao(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return Yl(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const vr={name:"characterReference",tokenize:uo};function uo(e,t,n){const r=this;let l=0,o,i;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=K,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Wl,f):(e.enter("characterReferenceValue"),o=7,i=Rn,f(c))}function f(c){if(c===59&&l){const p=e.exit("characterReferenceValue");return i===K&&!Gn(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(c)&&l++<o?(e.consume(c),f):n(c)}}const Pt={partial:!0,tokenize:co},zt={concrete:!0,name:"codeFenced",tokenize:so};function so(e,t,n){const r=this,l={partial:!0,tokenize:L};let o=0,i=0,a;return u;function u(w){return s(w)}function s(w){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(i++,e.consume(w),f):i<3?n(w):(e.exit("codeFencedFenceSequence"),_(w)?M(e,c,"whitespace")(w):c(w))}function c(w){return w===null||P(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Pt,y,F)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||P(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):_(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),M(e,h,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),p)}function h(w){return w===null||P(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(w))}function d(w){return w===null||P(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),d)}function y(w){return e.attempt(l,F,C)(w)}function C(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x}function x(w){return o>0&&_(w)?M(e,A,"linePrefix",o+1)(w):A(w)}function A(w){return w===null||P(w)?e.check(Pt,y,F)(w):(e.enter("codeFlowValue"),E(w))}function E(w){return w===null||P(w)?(e.exit("codeFlowValue"),A(w)):(e.consume(w),E)}function F(w){return e.exit("codeFenced"),t(w)}function L(w,N,q){let j=0;return k;function k(B){return w.enter("lineEnding"),w.consume(B),w.exit("lineEnding"),T}function T(B){return w.enter("codeFencedFence"),_(B)?M(w,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):v(B)}function v(B){return B===a?(w.enter("codeFencedFenceSequence"),H(B)):q(B)}function H(B){return B===a?(j++,w.consume(B),H):j>=i?(w.exit("codeFencedFenceSequence"),_(B)?M(w,W,"whitespace")(B):W(B)):q(B)}function W(B){return B===null||P(B)?(w.exit("codeFencedFence"),N(B)):q(B)}}}function co(e,t,n){const r=this;return l;function l(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o)}function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}const xn={name:"codeIndented",tokenize:ho},fo={partial:!0,tokenize:po};function ho(e,t,n){const r=this;return l;function l(s){return e.enter("codeIndented"),M(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?i(s):n(s)}function i(s){return s===null?u(s):P(s)?e.attempt(fo,i,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||P(s)?(e.exit("codeFlowValue"),i(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function po(e,t,n){const r=this;return l;function l(i){return r.parser.lazy[r.now().line]?n(i):P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),l):M(e,o,"linePrefix",5)(i)}function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):P(i)?l(i):n(i)}}const mo={name:"codeText",previous:xo,resolve:go,tokenize:ko};function go(e){let t=e.length-4,n=3,r,l;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)l===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(l=r):(r===t||e[r][1].type==="lineEnding")&&(e[l][1].type="codeTextData",r!==l+2&&(e[l][1].end=e[r-1][1].end,e.splice(l+2,r-l-2),t-=r-l-2,r=l+2),l=void 0);return e}function xo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ko(e,t,n){let r=0,l,o;return i;function i(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),l=0,f(c)):P(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||P(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),l++,f):l===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",s(c))}}class yo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const l=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return r&&Be(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Be(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Be(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Be(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Be(this.left,n.reverse())}}}function Be(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Pr(e){const t={};let n=-1,r,l,o,i,a,u,s;const f=new yo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,bo(f,n)),n=t[n],s=!0);else if(r[1]._container){for(o=n,l=void 0;o--;)if(i=f.get(o),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(l&&(f.get(l)[1].type="lineEndingBlank"),i[1].type="lineEnding",l=o);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;l&&(r[1].end={...f.get(l)[1].start},a=f.slice(l,n),a.unshift(r),f.splice(l,n-l+1,a))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function bo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let l=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const a=i.events,u=[],s={};let f,c,p=-1,h=n,d=0,y=0;const C=[y];for(;h;){for(;e.get(++l)[1]!==h;);o.push(l),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&i.defineSkip(h.start),h._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(f),h._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(y=p+1,C.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(i.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),p=C.length;p--;){const x=a.slice(C[p],C[p+1]),A=o.pop();u.push([A,A+x.length-1]),e.splice(A,2,x)}for(u.reverse(),p=-1;++p<u.length;)s[d+u[p][0]]=d+u[p][1],d+=u[p][1]-u[p][0]-1;return s}const wo={resolve:Co,tokenize:Eo},So={partial:!0,tokenize:Io};function Co(e){return Pr(e),e}function Eo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),l(a)}function l(a){return a===null?o(a):P(a)?e.check(So,i,o)(a):(e.consume(a),l)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function i(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,l}}function Io(e,t,n){const r=this;return l;function l(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),M(e,o,"linePrefix")}function o(i){if(i===null||P(i))return n(i);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function zr(e,t,n,r,l,o,i,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(l),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||ln(x)?n(x):(e.enter(r),e.enter(i),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(l),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||P(x)?n(x):(e.consume(x),x===92?d:h)}function d(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function y(x){return!f&&(x===null||x===41||V(x))?(e.exit("chunkString"),e.exit(a),e.exit(i),e.exit(r),t(x)):f<s&&x===40?(e.consume(x),f++,y):x===41?(e.consume(x),f--,y):x===null||x===32||x===40||ln(x)?n(x):(e.consume(x),x===92?C:y)}function C(x){return x===40||x===41||x===92?(e.consume(x),y):y(x)}}function Dr(e,t,n,r,l,o){const i=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(l),e.consume(h),e.exit(l),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in i.parser.constructs?n(h):h===93?(e.exit(o),e.enter(l),e.consume(h),e.exit(l),e.exit(r),t):P(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||P(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!_(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Fr(e,t,n,r,l,o){let i;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(l),e.consume(p),e.exit(l),i=p===40?41:p,u):n(p)}function u(p){return p===i?(e.enter(l),e.consume(p),e.exit(l),e.exit(r),t):(e.enter(o),s(p))}function s(p){return p===i?(e.exit(o),u(i)):p===null?n(p):P(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),M(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===i||p===null||P(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===i||p===92?(e.consume(p),f):f(p)}}function Ve(e,t){let n;return r;function r(l){return P(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,r):_(l)?M(e,r,n?"linePrefix":"lineSuffix")(l):t(l)}}const Ao={name:"definition",tokenize:vo},To={partial:!0,tokenize:Po};function vo(e,t,n){const r=this;let l;return o;function o(h){return e.enter("definition"),i(h)}function i(h){return Dr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return l=ce(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return V(h)?Ve(e,s)(h):s(h)}function s(h){return zr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(To,c,c)(h)}function c(h){return _(h)?M(e,p,"whitespace")(h):p(h)}function p(h){return h===null||P(h)?(e.exit("definition"),r.parser.defined.push(l),t(h)):n(h)}}function Po(e,t,n){return r;function r(a){return V(a)?Ve(e,l)(a):n(a)}function l(a){return Fr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return _(a)?M(e,i,"whitespace")(a):i(a)}function i(a){return a===null||P(a)?t(a):n(a)}}const zo={name:"hardBreakEscape",tokenize:Do};function Do(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return P(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Fo={name:"headingAtx",resolve:Lo,tokenize:_o};function Lo(e,t){let n=e.length-2,r=3,l,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(l={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function _o(e,t,n){let r=0;return l;function l(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),i(f)}function i(f){return f===35&&r++<6?(e.consume(f),i):f===null||V(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||P(f)?(e.exit("atxHeading"),t(f)):_(f)?M(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||V(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const Ro=["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"],Dt=["pre","script","style","textarea"],Oo={concrete:!0,name:"htmlFlow",resolveTo:Bo,tokenize:jo},Mo={partial:!0,tokenize:Uo},No={partial:!0,tokenize:Ho};function Bo(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function jo(e,t,n){const r=this;let l,o,i,a,u;return s;function s(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,y):g===63?(e.consume(g),l=3,r.interrupt?t:m):Z(g)?(e.consume(g),i=String.fromCharCode(g),C):n(g)}function p(g){return g===45?(e.consume(g),l=2,h):g===91?(e.consume(g),l=5,a=0,d):Z(g)?(e.consume(g),l=4,r.interrupt?t:m):n(g)}function h(g){return g===45?(e.consume(g),r.interrupt?t:m):n(g)}function d(g){const ue="CDATA[";return g===ue.charCodeAt(a++)?(e.consume(g),a===ue.length?r.interrupt?t:v:d):n(g)}function y(g){return Z(g)?(e.consume(g),i=String.fromCharCode(g),C):n(g)}function C(g){if(g===null||g===47||g===62||V(g)){const ue=g===47,we=i.toLowerCase();return!ue&&!o&&Dt.includes(we)?(l=1,r.interrupt?t(g):v(g)):Ro.includes(i.toLowerCase())?(l=6,ue?(e.consume(g),x):r.interrupt?t(g):v(g)):(l=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?A(g):E(g))}return g===45||K(g)?(e.consume(g),i+=String.fromCharCode(g),C):n(g)}function x(g){return g===62?(e.consume(g),r.interrupt?t:v):n(g)}function A(g){return _(g)?(e.consume(g),A):k(g)}function E(g){return g===47?(e.consume(g),k):g===58||g===95||Z(g)?(e.consume(g),F):_(g)?(e.consume(g),E):k(g)}function F(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),F):L(g)}function L(g){return g===61?(e.consume(g),w):_(g)?(e.consume(g),L):E(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,N):_(g)?(e.consume(g),w):q(g)}function N(g){return g===u?(e.consume(g),u=null,j):g===null||P(g)?n(g):(e.consume(g),N)}function q(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||V(g)?L(g):(e.consume(g),q)}function j(g){return g===47||g===62||_(g)?E(g):n(g)}function k(g){return g===62?(e.consume(g),T):n(g)}function T(g){return g===null||P(g)?v(g):_(g)?(e.consume(g),T):n(g)}function v(g){return g===45&&l===2?(e.consume(g),G):g===60&&l===1?(e.consume(g),X):g===62&&l===4?(e.consume(g),ae):g===63&&l===3?(e.consume(g),m):g===93&&l===5?(e.consume(g),pe):P(g)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Mo,me,H)(g)):g===null||P(g)?(e.exit("htmlFlowData"),H(g)):(e.consume(g),v)}function H(g){return e.check(No,W,me)(g)}function W(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),B}function B(g){return g===null||P(g)?H(g):(e.enter("htmlFlowData"),v(g))}function G(g){return g===45?(e.consume(g),m):v(g)}function X(g){return g===47?(e.consume(g),i="",oe):v(g)}function oe(g){if(g===62){const ue=i.toLowerCase();return Dt.includes(ue)?(e.consume(g),ae):v(g)}return Z(g)&&i.length<8?(e.consume(g),i+=String.fromCharCode(g),oe):v(g)}function pe(g){return g===93?(e.consume(g),m):v(g)}function m(g){return g===62?(e.consume(g),ae):g===45&&l===2?(e.consume(g),m):v(g)}function ae(g){return g===null||P(g)?(e.exit("htmlFlowData"),me(g)):(e.consume(g),ae)}function me(g){return e.exit("htmlFlow"),t(g)}}function Ho(e,t,n){const r=this;return l;function l(i){return P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):n(i)}function o(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}function Uo(e,t,n){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Xe,t,n)}}const Vo={name:"htmlText",tokenize:$o};function $o(e,t,n){const r=this;let l,o,i;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),L):m===63?(e.consume(m),E):Z(m)?(e.consume(m),q):n(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,d):Z(m)?(e.consume(m),A):n(m)}function f(m){return m===45?(e.consume(m),h):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),p):P(m)?(i=c,X(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?G(m):m===45?p(m):c(m)}function d(m){const ae="CDATA[";return m===ae.charCodeAt(o++)?(e.consume(m),o===ae.length?y:d):n(m)}function y(m){return m===null?n(m):m===93?(e.consume(m),C):P(m)?(i=y,X(m)):(e.consume(m),y)}function C(m){return m===93?(e.consume(m),x):y(m)}function x(m){return m===62?G(m):m===93?(e.consume(m),x):y(m)}function A(m){return m===null||m===62?G(m):P(m)?(i=A,X(m)):(e.consume(m),A)}function E(m){return m===null?n(m):m===63?(e.consume(m),F):P(m)?(i=E,X(m)):(e.consume(m),E)}function F(m){return m===62?G(m):E(m)}function L(m){return Z(m)?(e.consume(m),w):n(m)}function w(m){return m===45||K(m)?(e.consume(m),w):N(m)}function N(m){return P(m)?(i=N,X(m)):_(m)?(e.consume(m),N):G(m)}function q(m){return m===45||K(m)?(e.consume(m),q):m===47||m===62||V(m)?j(m):n(m)}function j(m){return m===47?(e.consume(m),G):m===58||m===95||Z(m)?(e.consume(m),k):P(m)?(i=j,X(m)):_(m)?(e.consume(m),j):G(m)}function k(m){return m===45||m===46||m===58||m===95||K(m)?(e.consume(m),k):T(m)}function T(m){return m===61?(e.consume(m),v):P(m)?(i=T,X(m)):_(m)?(e.consume(m),T):j(m)}function v(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),l=m,H):P(m)?(i=v,X(m)):_(m)?(e.consume(m),v):(e.consume(m),W)}function H(m){return m===l?(e.consume(m),l=void 0,B):m===null?n(m):P(m)?(i=H,X(m)):(e.consume(m),H)}function W(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||V(m)?j(m):(e.consume(m),W)}function B(m){return m===47||m===62||V(m)?j(m):n(m)}function G(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function X(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),oe}function oe(m){return _(m)?M(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):pe(m)}function pe(m){return e.enter("htmlTextData"),i(m)}}const Kn={name:"labelEnd",resolveAll:Xo,resolveTo:Qo,tokenize:Go},qo={tokenize:Ko},Wo={tokenize:Jo},Yo={tokenize:Zo};function Xo(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const l=r.type==="labelImage"?4:2;r.type="data",t+=l}}return e.length!==n.length&&ie(e,0,e.length,n),e}function Qo(e,t){let n=e.length,r=0,l,o,i,a;for(;n--;)if(l=e[n][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[n][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=n,l.type!=="labelLink")){r=2;break}}else l.type==="labelEnd"&&(i=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[i][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[i-2][1].start}};return a=[["enter",u,t],["enter",s,t]],a=le(a,e.slice(o+1,o+r+3)),a=le(a,[["enter",f,t]]),a=le(a,fn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,i-3),t)),a=le(a,[["exit",f,t],e[i-2],e[i-1],["exit",s,t]]),a=le(a,e.slice(i+1)),a=le(a,[["exit",u,t]]),ie(e,o,e.length,a),e}function Go(e,t,n){const r=this;let l=r.events.length,o,i;for(;l--;)if((r.events[l][1].type==="labelImage"||r.events[l][1].type==="labelLink")&&!r.events[l][1]._balanced){o=r.events[l][1];break}return a;function a(p){return o?o._inactive?c(p):(i=r.parser.defined.includes(ce(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(qo,f,i?f:c)(p):p===91?e.attempt(Wo,f,i?s:c)(p):i?f(p):c(p)}function s(p){return e.attempt(Yo,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function Ko(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),l}function l(c){return V(c)?Ve(e,o)(c):o(c)}function o(c){return c===41?f(c):zr(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function i(c){return V(c)?Ve(e,u)(c):f(c)}function a(c){return n(c)}function u(c){return c===34||c===39||c===40?Fr(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return V(c)?Ve(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Jo(e,t,n){const r=this;return l;function l(a){return Dr.call(r,e,o,i,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ce(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function i(a){return n(a)}}function Zo(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const ea={name:"labelStartImage",resolveAll:Kn.resolveAll,tokenize:na};function na(e,t,n){const r=this;return l;function l(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"),i):n(a)}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ta={name:"labelStartLink",resolveAll:Kn.resolveAll,tokenize:ra};function ra(e,t,n){const r=this;return l;function l(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),o}function o(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}const kn={name:"lineEnding",tokenize:ia};function ia(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),M(e,t,"linePrefix")}}const nn={name:"thematicBreak",tokenize:la};function la(e,t,n){let r=0,l;return o;function o(s){return e.enter("thematicBreak"),i(s)}function i(s){return l=s,a(s)}function a(s){return s===l?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||P(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===l?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),_(s)?M(e,a,"whitespace")(s):a(s))}}const ee={continuation:{tokenize:sa},exit:fa,name:"list",tokenize:ua},oa={partial:!0,tokenize:ha},aa={partial:!0,tokenize:ca};function ua(e,t,n){const r=this,l=r.events[r.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,i=0;return a;function a(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Rn(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(nn,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Rn(h)&&++i<10?(e.consume(h),u):(!r.interrupt||i<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Xe,r.interrupt?n:f,e.attempt(oa,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return _(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function sa(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Xe,l,o);function l(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!_(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(aa,t,i)(a))}function i(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ca(e,t,n){const r=this;return M(e,l,"listItemIndent",r.containerState.size+1);function l(o){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(o):n(o)}}function fa(e){e.exit(this.containerState.type)}function ha(e,t,n){const r=this;return M(e,l,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const i=r.events[r.events.length-1];return!_(o)&&i&&i[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Ft={name:"setextUnderline",resolveTo:pa,tokenize:ma};function pa(e,t){let n=e.length,r,l,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(l=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",i,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=i,e.push(["exit",i,t]),e}function ma(e,t,n){const r=this;let l;return o;function o(s){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"),l=s,i(s)):n(s)}function i(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===l?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),_(s)?M(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||P(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const ga={tokenize:da};function da(e){const t=this,n=e.attempt(Xe,r,e.attempt(this.parser.constructs.flowInitial,l,M(e,e.attempt(this.parser.constructs.flow,l,e.attempt(wo,l)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const xa={resolveAll:_r()},ka=Lr("string"),ya=Lr("text");function Lr(e){return{resolveAll:_r(e==="text"?ba:void 0),tokenize:t};function t(n){const r=this,l=this.parser.constructs[e],o=n.attempt(l,i,a);return i;function i(f){return s(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;const c=l[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function _r(e){return t;function t(n,r){let l=-1,o;for(;++l<=n.length;)o===void 0?n[l]&&n[l][1].type==="data"&&(o=l,l++):(!n[l]||n[l][1].type!=="data")&&(l!==o+2&&(n[o][1].end=n[l-1][1].end,n.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(n,r):n}}function ba(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],l=t.sliceStream(r);let o=l.length,i=-1,a=0,u;for(;o--;){const s=l[o];if(typeof s=="string"){for(i=s.length;s.charCodeAt(i-1)===32;)a++,i--;if(i)break;i=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const s={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?i:r.start._bufferIndex+i,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(n,0,["enter",s,t],["exit",s,t]),n+=2)}n++}return e}const wa={42:ee,43:ee,45:ee,48:ee,49:ee,50:ee,51:ee,52:ee,53:ee,54:ee,55:ee,56:ee,57:ee,62:Ar},Sa={91:Ao},Ca={[-2]:xn,[-1]:xn,32:xn},Ea={35:Fo,42:nn,45:[Ft,nn],60:Oo,61:Ft,95:nn,96:zt,126:zt},Ia={38:vr,92:Tr},Aa={[-5]:kn,[-4]:kn,[-3]:kn,33:ea,38:vr,42:On,60:[no,Vo],91:ta,92:[zo,Tr],93:Kn,95:On,96:mo},Ta={null:[On,xa]},va={null:[42,95]},Pa={null:[]},za=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:va,contentInitial:Sa,disable:Pa,document:wa,flow:Ea,flowInitial:Ca,insideSpan:Ta,string:Ia,text:Aa},Symbol.toStringTag,{value:"Module"}));function Da(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const l={},o=[];let i=[],a=[];const u={attempt:N(L),check:N(w),consume:A,enter:E,exit:F,interrupt:N(w,{interrupt:!0})},s={code:null,containerState:{},defineSkip:y,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(s,u);return t.resolveAll&&o.push(t),s;function c(T){return i=le(i,T),C(),i[i.length-1]!==null?[]:(q(t,0),s.events=fn(o,s.events,s),s.events)}function p(T,v){return La(h(T),v)}function h(T){return Fa(i,T)}function d(){const{_bufferIndex:T,_index:v,line:H,column:W,offset:B}=r;return{_bufferIndex:T,_index:v,line:H,column:W,offset:B}}function y(T){l[T.line]=T.column,k()}function C(){let T;for(;r._index<i.length;){const v=i[r._index];if(typeof v=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<v.length;)x(v.charCodeAt(r._bufferIndex));else x(v)}}function x(T){f=f(T)}function A(T){P(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,k()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=T}function E(T,v){const H=v||{};return H.type=T,H.start=d(),s.events.push(["enter",H,s]),a.push(H),H}function F(T){const v=a.pop();return v.end=d(),s.events.push(["exit",v,s]),v}function L(T,v){q(T,v.from)}function w(T,v){v.restore()}function N(T,v){return H;function H(W,B,G){let X,oe,pe,m;return Array.isArray(W)?me(W):"tokenize"in W?me([W]):ae(W);function ae(Q){return Oe;function Oe(ke){const Te=ke!==null&&Q[ke],ve=ke!==null&&Q.null,Ge=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return me(Ge)(ke)}}function me(Q){return X=Q,oe=0,Q.length===0?G:g(Q[oe])}function g(Q){return Oe;function Oe(ke){return m=j(),pe=Q,Q.partial||(s.currentConstruct=Q),Q.name&&s.parser.constructs.disable.null.includes(Q.name)?we():Q.tokenize.call(v?Object.assign(Object.create(s),v):s,u,ue,we)(ke)}}function ue(Q){return T(pe,m),B}function we(Q){return m.restore(),++oe<X.length?g(X[oe]):G}}}function q(T,v){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&ie(s.events,v,s.events.length-v,T.resolve(s.events.slice(v),s)),T.resolveTo&&(s.events=T.resolveTo(s.events,s))}function j(){const T=d(),v=s.previous,H=s.currentConstruct,W=s.events.length,B=Array.from(a);return{from:W,restore:G};function G(){r=T,s.previous=v,s.currentConstruct=H,s.events.length=W,a=B,k()}}function k(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}function Fa(e,t){const n=t.start._index,r=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let i;if(n===l)i=[e[n].slice(r,o)];else{if(i=e.slice(n,l),r>-1){const a=i[0];typeof a=="string"?i[0]=a.slice(r):i.shift()}o>0&&i.push(e[l].slice(0,o))}return i}function La(e,t){let n=-1;const r=[];let l;for(;++n<e.length;){const o=e[n];let i;if(typeof o=="string")i=o;else switch(o){case-5:{i="\r";break}case-4:{i=`
|
|
4
4
|
`;break}case-3:{i=`\r
|
|
5
5
|
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&l)continue;i=" ";break}default:i=String.fromCharCode(o)}l=o===-2,r.push(i)}return r.join("")}function _a(e){const r={constructs:Er([za,...(e||{}).extensions||[]]),content:l(Xl),defined:[],document:l(Gl),flow:l(ga),lazy:{},string:l(ka),text:l(ya)};return r;function l(o){return i;function i(a){return Da(r,o,a)}}}function Ra(e){for(;!Pr(e););return e}const Lt=/[\0\t\n\r]/g;function Oa(){let e=1,t="",n=!0,r;return l;function l(o,i,a){const u=[];let s,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Lt.lastIndex=c,s=Lt.exec(o),p=s&&s.index!==void 0?s.index:o.length,h=o.charCodeAt(p),!s){t=o.slice(c);break}if(h===10&&c===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<p&&(u.push(o.slice(c,p)),e+=p-c),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Ma=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Na(e){return e.replace(Ma,Ba)}function Ba(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),o=l===120||l===88;return Ir(n.slice(o?2:1),o?16:10)}return Gn(n)||e}const Rr={}.hasOwnProperty;function ja(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ha(n)(Ra(_a(n).document().write(Oa()(e,t,!0))))}function Ha(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ct),autolinkProtocol:j,autolinkEmail:j,atxHeading:o(at),blockQuote:o(ve),characterEscape:j,characterReference:j,codeFenced:o(Ge),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(Ge,i),codeText:o(gi,i),codeTextData:j,data:j,codeFlowValue:j,definition:o(di),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(xi),hardBreakEscape:o(ut),hardBreakTrailing:o(ut),htmlFlow:o(st,i),htmlFlowData:j,htmlText:o(st,i),htmlTextData:j,image:o(ki),label:i,link:o(ct),listItem:o(yi),listItemValue:p,listOrdered:o(ft,c),listUnordered:o(ft),paragraph:o(bi),reference:g,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(at),strong:o(wi),thematicBreak:o(Ci)},exit:{atxHeading:u(),atxHeadingSequence:L,autolink:u(),autolinkEmail:Te,autolinkProtocol:ke,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:Q,characterReference:Oe,codeFenced:u(C),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:d,codeFlowValue:k,codeIndented:u(x),codeText:u(B),codeTextData:k,data:k,definition:u(),definitionDestinationString:F,definitionLabelString:A,definitionTitleString:E,emphasis:u(),hardBreakEscape:u(v),hardBreakTrailing:u(v),htmlFlow:u(H),htmlFlowData:k,htmlText:u(W),htmlTextData:k,image:u(X),label:pe,labelText:oe,lineEnding:T,link:u(G),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ue,resourceDestinationString:m,resourceTitleString:ae,resource:me,setextHeading:u(q),setextHeadingLineSequence:N,setextHeadingText:w,strong:u(),thematicBreak:u()}};Or(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(b){let I={type:"root",children:[]};const z={stack:[I],tokenStack:[],config:t,enter:a,exit:s,buffer:i,resume:f,data:n},O=[];let U=-1;for(;++U<b.length;)if(b[U][1].type==="listOrdered"||b[U][1].type==="listUnordered")if(b[U][0]==="enter")O.push(U);else{const se=O.pop();U=l(b,se,U)}for(U=-1;++U<b.length;){const se=t[b[U][0]];Rr.call(se,b[U][1].type)&&se[b[U][1].type].call(Object.assign({sliceSerialize:b[U][2].sliceSerialize},z),b[U][1])}if(z.tokenStack.length>0){const se=z.tokenStack[z.tokenStack.length-1];(se[1]||_t).call(z,void 0,se[0])}for(I.position={start:ye(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:ye(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)I=t.transforms[U](I)||I;return I}function l(b,I,z){let O=I-1,U=-1,se=!1,Se,ge,Me,Ne;for(;++O<=z;){const te=b[O];switch(te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{te[0]==="enter"?U++:U--,Ne=void 0;break}case"lineEndingBlank":{te[0]==="enter"&&(Se&&!Ne&&!U&&!Me&&(Me=O),Ne=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ne=void 0}if(!U&&te[0]==="enter"&&te[1].type==="listItemPrefix"||U===-1&&te[0]==="exit"&&(te[1].type==="listUnordered"||te[1].type==="listOrdered")){if(Se){let Pe=O;for(ge=void 0;Pe--;){const de=b[Pe];if(de[1].type==="lineEnding"||de[1].type==="lineEndingBlank"){if(de[0]==="exit")continue;ge&&(b[ge][1].type="lineEndingBlank",se=!0),de[1].type="lineEnding",ge=Pe}else if(!(de[1].type==="linePrefix"||de[1].type==="blockQuotePrefix"||de[1].type==="blockQuotePrefixWhitespace"||de[1].type==="blockQuoteMarker"||de[1].type==="listItemIndent"))break}Me&&(!ge||Me<ge)&&(Se._spread=!0),Se.end=Object.assign({},ge?b[ge][1].start:te[1].end),b.splice(ge||O,0,["exit",Se,te[2]]),O++,z++}if(te[1].type==="listItemPrefix"){const Pe={type:"listItem",_spread:!1,start:Object.assign({},te[1].start),end:void 0};Se=Pe,b.splice(O,0,["enter",Pe,te[2]]),O++,z++,Me=void 0,Ne=!0}}}return b[I][1]._spread=se,z}function o(b,I){return z;function z(O){a.call(this,b(O),O),I&&I.call(this,O)}}function i(){this.stack.push({type:"fragment",children:[]})}function a(b,I,z){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([I,z||void 0]),b.position={start:ye(I.start),end:void 0}}function u(b){return I;function I(z){b&&b.call(this,z),s.call(this,z)}}function s(b,I){const z=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==b.type&&(I?I.call(this,b,O[0]):(O[1]||_t).call(this,b,O[0]));else throw new Error("Cannot close `"+b.type+"` ("+Ue({start:b.start,end:b.end})+"): it’s not open");z.position.end=ye(b.end)}function f(){return Qn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(b){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function h(){const b=this.resume(),I=this.stack[this.stack.length-1];I.lang=b}function d(){const b=this.resume(),I=this.stack[this.stack.length-1];I.meta=b}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b.replace(/(\r?\n|\r)$/g,"")}function A(b){const I=this.resume(),z=this.stack[this.stack.length-1];z.label=I,z.identifier=ce(this.sliceSerialize(b)).toLowerCase()}function E(){const b=this.resume(),I=this.stack[this.stack.length-1];I.title=b}function F(){const b=this.resume(),I=this.stack[this.stack.length-1];I.url=b}function L(b){const I=this.stack[this.stack.length-1];if(!I.depth){const z=this.sliceSerialize(b).length;I.depth=z}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function N(b){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function j(b){const z=this.stack[this.stack.length-1].children;let O=z[z.length-1];(!O||O.type!=="text")&&(O=Si(),O.position={start:ye(b.start),end:void 0},z.push(O)),this.stack.push(O)}function k(b){const I=this.stack.pop();I.value+=this.sliceSerialize(b),I.position.end=ye(b.end)}function T(b){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const z=I.children[I.children.length-1];z.position.end=ye(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(j.call(this,b),k.call(this,b))}function v(){this.data.atHardBreak=!0}function H(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function W(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function B(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function G(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=I,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function X(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=I,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function oe(b){const I=this.sliceSerialize(b),z=this.stack[this.stack.length-2];z.label=Na(I),z.identifier=ce(I).toLowerCase()}function pe(){const b=this.stack[this.stack.length-1],I=this.resume(),z=this.stack[this.stack.length-1];if(this.data.inReference=!0,z.type==="link"){const O=b.children;z.children=O}else z.alt=I}function m(){const b=this.resume(),I=this.stack[this.stack.length-1];I.url=b}function ae(){const b=this.resume(),I=this.stack[this.stack.length-1];I.title=b}function me(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ue(b){const I=this.resume(),z=this.stack[this.stack.length-1];z.label=I,z.identifier=ce(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function we(b){this.data.characterReferenceType=b.type}function Q(b){const I=this.sliceSerialize(b),z=this.data.characterReferenceType;let O;z?(O=Ir(I,z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=Gn(I);const U=this.stack[this.stack.length-1];U.value+=O}function Oe(b){const I=this.stack.pop();I.position.end=ye(b.end)}function ke(b){k.call(this,b);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(b)}function Te(b){k.call(this,b);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(b)}function ve(){return{type:"blockquote",children:[]}}function Ge(){return{type:"code",lang:null,meta:null,value:""}}function gi(){return{type:"inlineCode",value:""}}function di(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xi(){return{type:"emphasis",children:[]}}function at(){return{type:"heading",depth:0,children:[]}}function ut(){return{type:"break"}}function st(){return{type:"html",value:""}}function ki(){return{type:"image",title:null,url:"",alt:null}}function ct(){return{type:"link",title:null,url:"",children:[]}}function ft(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function yi(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function bi(){return{type:"paragraph",children:[]}}function wi(){return{type:"strong",children:[]}}function Si(){return{type:"text",value:""}}function Ci(){return{type:"thematicBreak"}}}function ye(e){return{line:e.line,column:e.column,offset:e.offset}}function Or(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Or(e,r):Ua(e,r)}}function Ua(e,t){let n;for(n in t)if(Rr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function _t(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ue({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ue({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ue({start:t.start,end:t.end})+") is still open")}function Va(e){const t=this;t.parser=n;function n(r){return ja(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function $a(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function qa(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
@@ -27,4 +27,4 @@ import{ak as Ei,j as ht,u as Ii,C as Ai,_ as Ti}from"./index-pqMcowCZ.js";import
|
|
|
27
27
|
`))+1))}const i="#".repeat(l),a=n.enter("headingAtx"),u=n.enter("phrasing");o.move(i+" ");let s=n.containerPhrasing(e,{before:"# ",after:`
|
|
28
28
|
`,...o.current()});return/^[\t ]/.test(s)&&(s=We(s.charCodeAt(0))+s.slice(1)),s=s?i+" "+s:i,n.options.closeAtx&&(s+=" "+i),u(),a(),s}Kr.peek=sc;function Kr(e){return e.value||""}function sc(){return"<"}Jr.peek=cc;function Jr(e,t,n,r){const l=it(n),o=l==='"'?"Quote":"Apostrophe",i=n.enter("image");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("![");return s+=u.move(n.safe(e.alt,{before:s,after:"]",...u.current()})),s+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+l),s+=u.move(n.safe(e.title,{before:s,after:l,...u.current()})),s+=u.move(l),a()),s+=u.move(")"),i(),s}function cc(){return"!"}Zr.peek=fc;function Zr(e,t,n,r){const l=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const a=n.createTracker(r);let u=a.move("![");const s=n.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),i();const f=n.stack;n.stack=[],i=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return i(),n.stack=f,o(),l==="full"||!s||s!==c?u+=a.move(c+"]"):l==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function fc(){return"!"}ei.peek=hc;function ei(e,t,n){let r=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(r);)l+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const i=n.unsafe[o],a=n.compilePattern(i);let u;if(i.atBreak)for(;u=a.exec(r);){let s=u.index;r.charCodeAt(s)===10&&r.charCodeAt(s-1)===13&&s--,r=r.slice(0,s)+" "+r.slice(u.index+1)}}return l+r+l}function hc(){return"`"}function ni(e,t){const n=Qn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ti.peek=pc;function ti(e,t,n,r){const l=it(n),o=l==='"'?"Quote":"Apostrophe",i=n.createTracker(r);let a,u;if(ni(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=i.move("<");return c+=i.move(n.containerPhrasing(e,{before:c,after:">",...i.current()})),c+=i.move(">"),a(),n.stack=f,c}a=n.enter("link"),u=n.enter("label");let s=i.move("[");return s+=i.move(n.containerPhrasing(e,{before:s,after:"](",...i.current()})),s+=i.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),s+=i.move("<"),s+=i.move(n.safe(e.url,{before:s,after:">",...i.current()})),s+=i.move(">")):(u=n.enter("destinationRaw"),s+=i.move(n.safe(e.url,{before:s,after:e.title?" ":")",...i.current()}))),u(),e.title&&(u=n.enter(`title${o}`),s+=i.move(" "+l),s+=i.move(n.safe(e.title,{before:s,after:l,...i.current()})),s+=i.move(l),u()),s+=i.move(")"),a(),s}function pc(e,t,n){return ni(e,n)?"<":"["}ri.peek=mc;function ri(e,t,n,r){const l=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const a=n.createTracker(r);let u=a.move("[");const s=n.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),i();const f=n.stack;n.stack=[],i=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return i(),n.stack=f,o(),l==="full"||!s||s!==c?u+=a.move(c+"]"):l==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function mc(){return"["}function lt(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function gc(e){const t=lt(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function dc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ii(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function xc(e,t,n,r){const l=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?dc(n):lt(n);const a=e.ordered?i==="."?")":".":gc(n);let u=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),ii(n)===i&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(i=a),n.bulletCurrent=i;const s=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,l(),s}function kc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function yc(e,t,n,r){const l=kc(n);let o=n.bulletCurrent||lt(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let i=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(i-o.length)),a.shift(i);const u=n.enter("listItem"),s=n.indentLines(n.containerFlow(e,a.current()),f);return u(),s;function f(c,p,h){return p?(h?"":" ".repeat(i))+c:(h?o:o+" ".repeat(i-o.length))+c}}function bc(e,t,n,r){const l=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),l(),i}const wc=pn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Sc(e,t,n,r){return(e.children.some(function(i){return wc(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Cc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}li.peek=Ec;function li(e,t,n,r){const l=Cc(n),o=n.enter("strong"),i=n.createTracker(r),a=i.move(l+l);let u=i.move(n.containerPhrasing(e,{after:l,before:a,...i.current()}));const s=u.charCodeAt(0),f=un(r.before.charCodeAt(r.before.length-1),s,l);f.inside&&(u=We(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=un(r.after.charCodeAt(0),c,l);p.inside&&(u=u.slice(0,-1)+We(c));const h=i.move(l+l);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function Ec(e,t,n){return n.options.strong||"*"}function Ic(e,t,n,r){return n.safe(e.value,r)}function Ac(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Tc(e,t,n){const r=(ii(n)+(n.options.ruleSpaces?" ":"")).repeat(Ac(n));return n.options.ruleSpaces?r.slice(0,-1):r}const oi={blockquote:Gs,break:ir,code:tc,definition:ic,emphasis:Gr,hardBreak:ir,heading:uc,html:Kr,image:Jr,imageReference:Zr,inlineCode:ei,link:ti,linkReference:ri,list:xc,listItem:yc,paragraph:bc,root:Sc,strong:li,text:Ic,thematicBreak:Tc};function vc(){return{enter:{table:Pc,tableData:lr,tableHeader:lr,tableRow:Dc},exit:{codeText:Fc,table:zc,tableData:Pn,tableHeader:Pn,tableRow:Pn}}}function Pc(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function zc(e){this.exit(e),this.data.inTable=void 0}function Dc(e){this.enter({type:"tableRow",children:[]},e)}function Pn(e){this.exit(e)}function lr(e){this.enter({type:"tableCell",children:[]},e)}function Fc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Lc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Lc(e,t){return t==="|"?t:e}function _c(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,l=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
29
29
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:i,tableCell:u,tableRow:a}};function i(h,d,y,C){return s(f(h,y,C),h.align)}function a(h,d,y,C){const x=c(h,y,C),A=s([x]);return A.slice(0,A.indexOf(`
|
|
30
|
-
`))}function u(h,d,y,C){const x=y.enter("tableCell"),A=y.enter("phrasing"),E=y.containerPhrasing(h,{...C,before:o,after:o});return A(),x(),E}function s(h,d){return Xs(h,{align:d,alignDelimiters:r,padding:n,stringLength:l})}function f(h,d,y){const C=h.children;let x=-1;const A=[],E=d.enter("table");for(;++x<C.length;)A[x]=c(C[x],d,y);return E(),A}function c(h,d,y){const C=h.children;let x=-1;const A=[],E=d.enter("tableRow");for(;++x<C.length;)A[x]=u(C[x],h,d,y);return E(),A}function p(h,d,y){let C=oi.inlineCode(h,d,y);return y.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Rc(){return{exit:{taskListCheckValueChecked:or,taskListCheckValueUnchecked:or,paragraph:Mc}}}function Oc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Nc}}}function or(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Mc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const l=t.children;let o=-1,i;for(;++o<l.length;){const a=l[o];if(a.type==="paragraph"){i=a;break}}i===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Nc(e,t,n,r){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(i);let u=oi.listItem(e,t,n,{...r,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),u;function s(f){return f+i}}function Bc(){return[xs(),Ns(),Us(),vc(),Rc()]}function jc(e){return{extensions:[ks(),Bs(e),Vs(),_c(e),Oc()]}}const Hc={tokenize:Yc,partial:!0},ai={tokenize:Xc,partial:!0},ui={tokenize:Qc,partial:!0},si={tokenize:Gc,partial:!0},Uc={tokenize:Kc,partial:!0},ci={name:"wwwAutolink",tokenize:qc,previous:hi},fi={name:"protocolAutolink",tokenize:Wc,previous:pi},xe={name:"emailAutolink",tokenize:$c,previous:mi},he={};function Vc(){return{text:he}}let Ce=48;for(;Ce<123;)he[Ce]=xe,Ce++,Ce===58?Ce=65:Ce===91&&(Ce=97);he[43]=xe;he[45]=xe;he[46]=xe;he[95]=xe;he[72]=[xe,fi];he[104]=[xe,fi];he[87]=[xe,ci];he[119]=[xe,ci];function $c(e,t,n){const r=this;let l,o;return i;function i(c){return!Hn(c)||!mi.call(r,r.previous)||ot(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Hn(c)?(e.consume(c),a):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(Uc,f,s)(c):c===45||c===95||K(c)?(o=!0,e.consume(c),u):f(c)}function s(c){return e.consume(c),l=!0,u}function f(c){return o&&l&&Z(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function qc(e,t,n){const r=this;return l;function l(i){return i!==87&&i!==119||!hi.call(r,r.previous)||ot(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Hc,e.attempt(ai,e.attempt(ui,o),n),n)(i))}function o(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function Wc(e,t,n){const r=this;let l="",o=!1;return i;function i(c){return(c===72||c===104)&&pi.call(r,r.previous)&&!ot(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(Z(c)&&l.length<5)return l+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=l.toLowerCase();if(p==="http"||p==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),o?s:(o=!0,u)):n(c)}function s(c){return c===null||ln(c)||V(c)||Ie(c)||cn(c)?n(c):e.attempt(ai,e.attempt(ui,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Yc(e,t,n){let r=0;return l;function l(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),l):i===46&&r===3?(e.consume(i),o):n(i)}function o(i){return i===null?n(i):t(i)}}function Xc(e,t,n){let r,l,o;return i;function i(s){return s===46||s===95?e.check(si,u,a)(s):s===null||V(s)||Ie(s)||s!==45&&cn(s)?u(s):(o=!0,e.consume(s),i)}function a(s){return s===95?r=!0:(l=r,r=void 0),e.consume(s),i}function u(s){return l||r||!o?n(s):t(s)}}function Qc(e,t){let n=0,r=0;return l;function l(i){return i===40?(n++,e.consume(i),l):i===41&&r<n?o(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(si,t,o)(i):i===null||V(i)||Ie(i)?t(i):(e.consume(i),l)}function o(i){return i===41&&r++,e.consume(i),l}}function Gc(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),l):a===60||a===null||V(a)||Ie(a)?t(a):n(a)}function l(a){return a===null||a===40||a===91||V(a)||Ie(a)?t(a):r(a)}function o(a){return Z(a)?i(a):n(a)}function i(a){return a===59?(e.consume(a),r):Z(a)?(e.consume(a),i):n(a)}}function Kc(e,t,n){return r;function r(o){return e.consume(o),l}function l(o){return K(o)?n(o):t(o)}}function hi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function pi(e){return!Z(e)}function mi(e){return!(e===47||Hn(e))}function Hn(e){return e===43||e===45||e===46||e===95||K(e)}function ot(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Jc={tokenize:af,partial:!0};function Zc(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:rf,continuation:{tokenize:lf},exit:of}},text:{91:{name:"gfmFootnoteCall",tokenize:tf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ef,resolveTo:nf}}}}function ef(e,t,n){const r=this;let l=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;l--;){const u=r.events[l][1];if(u.type==="labelImage"){i=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!i||!i._balanced)return n(u);const s=ce(r.sliceSerialize({start:i.end,end:r.now()}));return s.codePointAt(0)!==94||!o.includes(s.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function nf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function tf(e,t,n){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,i;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(c){if(o>999||c===93&&!i||c===null||c===91||V(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return l.includes(ce(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return V(c)||(i=!0),o++,e.consume(c),c===92?f:s}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,s):s(c)}}function rf(e,t,n){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0,a;return u;function u(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(i>999||d===93&&!a||d===null||d===91||V(d))return n(d);if(d===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=ce(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return V(d)||(a=!0),i++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),i++,f):f(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l.includes(o)||l.push(o),M(e,h,"gfmFootnoteDefinitionWhitespace")):n(d)}function h(d){return t(d)}}function lf(e,t,n){return e.check(Xe,t,e.attempt(Jc,t,n))}function of(e){e.exit("gfmFootnoteDefinition")}function af(e,t,n){const r=this;return M(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(o):n(o)}}function uf(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:l};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function l(i,a){let u=-1;for(;++u<i.length;)if(i[u][0]==="enter"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._close){let s=u;for(;s--;)if(i[s][0]==="exit"&&i[s][1].type==="strikethroughSequenceTemporary"&&i[s][1]._open&&i[u][1].end.offset-i[u][1].start.offset===i[s][1].end.offset-i[s][1].start.offset){i[u][1].type="strikethroughSequence",i[s][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},i[s][1].start),end:Object.assign({},i[u][1].end)},c={type:"strikethroughText",start:Object.assign({},i[s][1].end),end:Object.assign({},i[u][1].start)},p=[["enter",f,a],["enter",i[s][1],a],["exit",i[s][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ie(p,p.length,0,fn(h,i.slice(s+1,u),a)),ie(p,p.length,0,[["exit",c,a],["enter",i[u][1],a],["exit",i[u][1],a],["exit",f,a]]),ie(i,s-1,u-s+3,p),u=s+p.length-2;break}}for(u=-1;++u<i.length;)i[u][1].type==="strikethroughSequenceTemporary"&&(i[u][1].type="data");return i}function o(i,a,u){const s=this.previous,f=this.events;let c=0;return p;function p(d){return s===126&&f[f.length-1][1].type!=="characterEscape"?u(d):(i.enter("strikethroughSequenceTemporary"),h(d))}function h(d){const y=Le(s);if(d===126)return c>1?u(d):(i.consume(d),c++,h);if(c<2&&!n)return u(d);const C=i.exit("strikethroughSequenceTemporary"),x=Le(d);return C._open=!x||x===2&&!!y,C._close=!y||y===2&&!!x,a(d)}}}class sf{constructor(){this.map=[]}add(t,n,r){cf(this,t,n,r)}consume(t){if(this.map.sort(function(o,i){return o[0]-i[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let l=r.pop();for(;l;){for(const o of l)t.push(o);l=r.pop()}this.map.length=0}}function cf(e,t,n,r){let l=0;if(!(n===0&&r.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=n,e.map[l][2].push(...r);return}l+=1}e.map.push([t,n,r])}}function ff(e,t){let n=!1;const r=[];for(;t<e.length;){const l=e[t];if(n){if(l[0]==="enter")l[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function hf(){return{flow:{null:{name:"table",tokenize:pf,resolveAll:mf}}}}function pf(e,t,n){const r=this;let l=0,o=0,i;return a;function a(k){let T=r.events.length-1;for(;T>-1;){const W=r.events[T][1].type;if(W==="lineEnding"||W==="linePrefix")T--;else break}const v=T>-1?r.events[T][1].type:null,H=v==="tableHead"||v==="tableRow"?w:u;return H===w&&r.parser.lazy[r.now().line]?n(k):H(k)}function u(k){return e.enter("tableHead"),e.enter("tableRow"),s(k)}function s(k){return k===124||(i=!0,o+=1),f(k)}function f(k){return k===null?n(k):P(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):_(k)?M(e,f,"whitespace")(k):(o+=1,i&&(i=!1,l+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),i=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||V(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?p:c)}function p(k){return k===92||k===124?(e.consume(k),c):c(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),i=!1,_(k)?M(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):d(k))}function d(k){return k===45||k===58?C(k):k===124?(i=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),y):L(k)}function y(k){return _(k)?M(e,C,"whitespace")(k):C(k)}function C(k){return k===58?(o+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):k===45?(o+=1,x(k)):k===null||P(k)?F(k):L(k)}function x(k){return k===45?(e.enter("tableDelimiterFiller"),A(k)):L(k)}function A(k){return k===45?(e.consume(k),A):k===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(k))}function E(k){return _(k)?M(e,F,"whitespace")(k):F(k)}function F(k){return k===124?d(k):k===null||P(k)?!i||l!==o?L(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):L(k)}function L(k){return n(k)}function w(k){return e.enter("tableRow"),N(k)}function N(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),N):k===null||P(k)?(e.exit("tableRow"),t(k)):_(k)?M(e,N,"whitespace")(k):(e.enter("data"),q(k))}function q(k){return k===null||k===124||V(k)?(e.exit("data"),N(k)):(e.consume(k),k===92?j:q)}function j(k){return k===92||k===124?(e.consume(k),q):q(k)}}function mf(e,t){let n=-1,r=!0,l=0,o=[0,0,0,0],i=[0,0,0,0],a=!1,u=0,s,f,c;const p=new sf;for(;++n<e.length;){const h=e[n],d=h[1];h[0]==="enter"?d.type==="tableHead"?(a=!1,u!==0&&(ar(p,t,u,s,f),f=void 0,u=0),s={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",s,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],i=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",f,t]])),l=d.type==="tableDelimiterRow"?2:f?3:1):l&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(o[1]!==0&&(i[0]=i[1],c=en(p,t,o,l,void 0,c),o=[0,0,0,0]),i[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(i[0]=i[1],c=en(p,t,o,l,void 0,c)),o=i,i=[o[1],n,0,0])):d.type==="tableHead"?(a=!0,u=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(u=n,o[1]!==0?(i[0]=i[1],c=en(p,t,o,l,n,c)):i[1]!==0&&(c=en(p,t,i,l,n,c)),l=0):l&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(i[3]=n)}for(u!==0&&ar(p,t,u,s,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=ff(t.events,n))}return e}function en(e,t,n,r,l,o){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},De(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=De(t.events,n[1]);if(o={type:i,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const s=De(t.events,n[2]),f=De(t.events,n[3]),c={type:a,start:Object.assign({},s),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,y=n[3]-n[2]-1;e.add(d,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return l!==void 0&&(o.end=Object.assign({},De(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function ar(e,t,n,r,l){const o=[],i=De(t.events,n);l&&(l.end=Object.assign({},i),o.push(["exit",l,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function De(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const gf={name:"tasklistCheck",tokenize:xf};function df(){return{text:{91:gf}}}function xf(e,t,n){const r=this;return l;function l(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return V(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),i):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),i):n(u)}function i(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(u)}function a(u){return P(u)?t(u):_(u)?e.check({tokenize:kf},t,n)(u):n(u)}}function kf(e,t,n){return M(e,r,"whitespace");function r(l){return l===null?n(l):t(l)}}function yf(e){return Er([Vc(),Zc(),uf(e),hf(),df()])}const bf={};function wf(e){const t=this,n=e||bf,r=t.data(),l=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);l.push(yf(n)),o.push(Bc()),i.push(jc(n))}const Sf=[wf],Cf=He.lazy(()=>Ti(()=>import("./CodeBlockHighlighter-BpPOUcO7.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.CodeBlockHighlighter}))),Ef=He.memo(function({content:t,className:n,syntaxHighlight:r=!0}){const l=Ei(),o=He.useMemo(()=>({code({className:i,children:a}){const u=/language-(\w+)/.exec(i||""),s=!u,f=u?u[1]:"",c=String(a).replace(/\n$/,"");return s?R.jsx("code",{className:ht("bg-[#F3F4F6] dark:bg-[#27272a] px-1.5 py-0.5 rounded text-[#111827] dark:text-[#E5E5E5] font-mono text-[13px]",i),children:a}):r?R.jsxs("div",{className:"relative my-4 rounded-lg overflow-hidden border border-[#E5E7EB] dark:border-[#27272a] bg-[#F9FAFB] dark:bg-[#1e1e1e]",children:[R.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-[#F3F4F6] dark:bg-[#27272a] border-b border-[#E5E7EB] dark:border-[#27272a]",children:[R.jsx("span",{className:"text-xs text-[#6B7280] dark:text-[#a1a1aa] font-mono",children:f||"text"}),R.jsx(If,{content:c})]}),R.jsx(He.Suspense,{fallback:R.jsx(ur,{className:i,code:c}),children:R.jsx(Cf,{code:c,language:f,isDark:l})})]}):R.jsx(ur,{className:i,code:c})},p({children:i}){return R.jsx("p",{className:"mb-4 leading-relaxed last:mb-0",children:i})},ul({children:i}){return R.jsx("ul",{className:"pl-4 mb-4 space-y-1 list-disc last:mb-0",children:i})},ol({children:i}){return R.jsx("ol",{className:"pl-4 mb-4 space-y-1 list-decimal last:mb-0",children:i})},li({children:i}){return R.jsx("li",{className:"leading-relaxed",children:i})},h1({children:i}){return R.jsx("h1",{className:"text-2xl font-bold mb-4 mt-6 text-[#111827] dark:text-[#E5E5E5]",children:i})},h2({children:i}){return R.jsx("h2",{className:"text-xl font-bold mb-3 mt-5 text-[#111827] dark:text-[#E5E5E5]",children:i})},h3({children:i}){return R.jsx("h3",{className:"text-lg font-bold mb-2 mt-4 text-[#111827] dark:text-[#E5E5E5]",children:i})},blockquote({children:i}){return R.jsx("blockquote",{className:"border-l-2 border-[#22C55E] pl-4 italic text-[#6B7280] dark:text-[#a1a1aa] mb-4",children:i})},a({href:i,children:a}){return R.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-[#22C55E] hover:underline transition-colors",children:a})},table({children:i}){return R.jsx("div",{className:"overflow-x-auto mb-4 border border-[#E5E7EB] dark:border-[#27272a] rounded-lg",children:R.jsx("table",{className:"w-full text-sm text-left",children:i})})},thead({children:i}){return R.jsx("thead",{className:"bg-[#F3F4F6] text-[#111827] dark:bg-[#27272a] dark:text-[#E5E5E5]",children:i})},tbody({children:i}){return R.jsx("tbody",{className:"divide-y divide-[#E5E7EB] dark:divide-[#27272a]",children:i})},tr({children:i}){return R.jsx("tr",{className:"hover:bg-[#F3F4F6] dark:hover:bg-[#27272a]/50 transition-colors",children:i})},th({children:i}){return R.jsx("th",{className:"px-4 py-3 font-medium whitespace-nowrap",children:i})},td({children:i}){return R.jsx("td",{className:"px-4 py-3 text-[#374151] dark:text-[#d4d4d8]",children:i})},hr(){return R.jsx("hr",{className:"my-6 border-[#E5E7EB] dark:border-[#27272a]"})}}),[l,r]);return R.jsx("div",{className:ht("text-[14px] text-[#111827] dark:text-[#E5E5E5] font-mono break-words min-w-0 w-full",n),children:R.jsx(as,{remarkPlugins:Sf,components:o,children:t})})});function ur({className:e,code:t}){return R.jsx("pre",{className:"my-4 overflow-x-auto rounded-lg border border-[#E5E7EB] dark:border-[#27272a] bg-[#F9FAFB] dark:bg-[#1e1e1e] p-4 text-[13px] leading-normal",children:R.jsx("code",{className:e,children:t})})}function If({content:e}){const t=Ii(),[n,r]=He.useState(!1),l=async()=>{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)};return R.jsx("button",{onClick:l,className:"p-1 hover:bg-[#E5E7EB] dark:hover:bg-[#3f3f46] rounded-md transition-colors text-[#9CA3AF] dark:text-[#a1a1aa] hover:text-[#111827] dark:hover:text-[#E5E5E5]",title:t("chat.markdown.copyCode"),children:n?R.jsx(Ai,{className:"h-3.5 w-3.5 text-[#22C55E]"}):R.jsx(vi,{className:"h-3.5 w-3.5"})})}const Df=Object.freeze(Object.defineProperty({__proto__:null,MarkdownRenderer:Ef},Symbol.toStringTag,{value:"Module"}));export{Df as M,Pf as a,Gn as d,Hi as f,$i as h,zn as n,zf as p,Vn as s};
|
|
30
|
+
`))}function u(h,d,y,C){const x=y.enter("tableCell"),A=y.enter("phrasing"),E=y.containerPhrasing(h,{...C,before:o,after:o});return A(),x(),E}function s(h,d){return Xs(h,{align:d,alignDelimiters:r,padding:n,stringLength:l})}function f(h,d,y){const C=h.children;let x=-1;const A=[],E=d.enter("table");for(;++x<C.length;)A[x]=c(C[x],d,y);return E(),A}function c(h,d,y){const C=h.children;let x=-1;const A=[],E=d.enter("tableRow");for(;++x<C.length;)A[x]=u(C[x],h,d,y);return E(),A}function p(h,d,y){let C=oi.inlineCode(h,d,y);return y.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Rc(){return{exit:{taskListCheckValueChecked:or,taskListCheckValueUnchecked:or,paragraph:Mc}}}function Oc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Nc}}}function or(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Mc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const l=t.children;let o=-1,i;for(;++o<l.length;){const a=l[o];if(a.type==="paragraph"){i=a;break}}i===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Nc(e,t,n,r){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(i);let u=oi.listItem(e,t,n,{...r,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),u;function s(f){return f+i}}function Bc(){return[xs(),Ns(),Us(),vc(),Rc()]}function jc(e){return{extensions:[ks(),Bs(e),Vs(),_c(e),Oc()]}}const Hc={tokenize:Yc,partial:!0},ai={tokenize:Xc,partial:!0},ui={tokenize:Qc,partial:!0},si={tokenize:Gc,partial:!0},Uc={tokenize:Kc,partial:!0},ci={name:"wwwAutolink",tokenize:qc,previous:hi},fi={name:"protocolAutolink",tokenize:Wc,previous:pi},xe={name:"emailAutolink",tokenize:$c,previous:mi},he={};function Vc(){return{text:he}}let Ce=48;for(;Ce<123;)he[Ce]=xe,Ce++,Ce===58?Ce=65:Ce===91&&(Ce=97);he[43]=xe;he[45]=xe;he[46]=xe;he[95]=xe;he[72]=[xe,fi];he[104]=[xe,fi];he[87]=[xe,ci];he[119]=[xe,ci];function $c(e,t,n){const r=this;let l,o;return i;function i(c){return!Hn(c)||!mi.call(r,r.previous)||ot(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Hn(c)?(e.consume(c),a):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(Uc,f,s)(c):c===45||c===95||K(c)?(o=!0,e.consume(c),u):f(c)}function s(c){return e.consume(c),l=!0,u}function f(c){return o&&l&&Z(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function qc(e,t,n){const r=this;return l;function l(i){return i!==87&&i!==119||!hi.call(r,r.previous)||ot(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Hc,e.attempt(ai,e.attempt(ui,o),n),n)(i))}function o(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function Wc(e,t,n){const r=this;let l="",o=!1;return i;function i(c){return(c===72||c===104)&&pi.call(r,r.previous)&&!ot(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(Z(c)&&l.length<5)return l+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=l.toLowerCase();if(p==="http"||p==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),o?s:(o=!0,u)):n(c)}function s(c){return c===null||ln(c)||V(c)||Ie(c)||cn(c)?n(c):e.attempt(ai,e.attempt(ui,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Yc(e,t,n){let r=0;return l;function l(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),l):i===46&&r===3?(e.consume(i),o):n(i)}function o(i){return i===null?n(i):t(i)}}function Xc(e,t,n){let r,l,o;return i;function i(s){return s===46||s===95?e.check(si,u,a)(s):s===null||V(s)||Ie(s)||s!==45&&cn(s)?u(s):(o=!0,e.consume(s),i)}function a(s){return s===95?r=!0:(l=r,r=void 0),e.consume(s),i}function u(s){return l||r||!o?n(s):t(s)}}function Qc(e,t){let n=0,r=0;return l;function l(i){return i===40?(n++,e.consume(i),l):i===41&&r<n?o(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(si,t,o)(i):i===null||V(i)||Ie(i)?t(i):(e.consume(i),l)}function o(i){return i===41&&r++,e.consume(i),l}}function Gc(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),l):a===60||a===null||V(a)||Ie(a)?t(a):n(a)}function l(a){return a===null||a===40||a===91||V(a)||Ie(a)?t(a):r(a)}function o(a){return Z(a)?i(a):n(a)}function i(a){return a===59?(e.consume(a),r):Z(a)?(e.consume(a),i):n(a)}}function Kc(e,t,n){return r;function r(o){return e.consume(o),l}function l(o){return K(o)?n(o):t(o)}}function hi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function pi(e){return!Z(e)}function mi(e){return!(e===47||Hn(e))}function Hn(e){return e===43||e===45||e===46||e===95||K(e)}function ot(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Jc={tokenize:af,partial:!0};function Zc(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:rf,continuation:{tokenize:lf},exit:of}},text:{91:{name:"gfmFootnoteCall",tokenize:tf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ef,resolveTo:nf}}}}function ef(e,t,n){const r=this;let l=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;l--;){const u=r.events[l][1];if(u.type==="labelImage"){i=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!i||!i._balanced)return n(u);const s=ce(r.sliceSerialize({start:i.end,end:r.now()}));return s.codePointAt(0)!==94||!o.includes(s.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function nf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function tf(e,t,n){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,i;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(c){if(o>999||c===93&&!i||c===null||c===91||V(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return l.includes(ce(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return V(c)||(i=!0),o++,e.consume(c),c===92?f:s}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,s):s(c)}}function rf(e,t,n){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0,a;return u;function u(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(i>999||d===93&&!a||d===null||d===91||V(d))return n(d);if(d===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=ce(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return V(d)||(a=!0),i++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),i++,f):f(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l.includes(o)||l.push(o),M(e,h,"gfmFootnoteDefinitionWhitespace")):n(d)}function h(d){return t(d)}}function lf(e,t,n){return e.check(Xe,t,e.attempt(Jc,t,n))}function of(e){e.exit("gfmFootnoteDefinition")}function af(e,t,n){const r=this;return M(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(o):n(o)}}function uf(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:l};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function l(i,a){let u=-1;for(;++u<i.length;)if(i[u][0]==="enter"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._close){let s=u;for(;s--;)if(i[s][0]==="exit"&&i[s][1].type==="strikethroughSequenceTemporary"&&i[s][1]._open&&i[u][1].end.offset-i[u][1].start.offset===i[s][1].end.offset-i[s][1].start.offset){i[u][1].type="strikethroughSequence",i[s][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},i[s][1].start),end:Object.assign({},i[u][1].end)},c={type:"strikethroughText",start:Object.assign({},i[s][1].end),end:Object.assign({},i[u][1].start)},p=[["enter",f,a],["enter",i[s][1],a],["exit",i[s][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ie(p,p.length,0,fn(h,i.slice(s+1,u),a)),ie(p,p.length,0,[["exit",c,a],["enter",i[u][1],a],["exit",i[u][1],a],["exit",f,a]]),ie(i,s-1,u-s+3,p),u=s+p.length-2;break}}for(u=-1;++u<i.length;)i[u][1].type==="strikethroughSequenceTemporary"&&(i[u][1].type="data");return i}function o(i,a,u){const s=this.previous,f=this.events;let c=0;return p;function p(d){return s===126&&f[f.length-1][1].type!=="characterEscape"?u(d):(i.enter("strikethroughSequenceTemporary"),h(d))}function h(d){const y=Le(s);if(d===126)return c>1?u(d):(i.consume(d),c++,h);if(c<2&&!n)return u(d);const C=i.exit("strikethroughSequenceTemporary"),x=Le(d);return C._open=!x||x===2&&!!y,C._close=!y||y===2&&!!x,a(d)}}}class sf{constructor(){this.map=[]}add(t,n,r){cf(this,t,n,r)}consume(t){if(this.map.sort(function(o,i){return o[0]-i[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let l=r.pop();for(;l;){for(const o of l)t.push(o);l=r.pop()}this.map.length=0}}function cf(e,t,n,r){let l=0;if(!(n===0&&r.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=n,e.map[l][2].push(...r);return}l+=1}e.map.push([t,n,r])}}function ff(e,t){let n=!1;const r=[];for(;t<e.length;){const l=e[t];if(n){if(l[0]==="enter")l[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function hf(){return{flow:{null:{name:"table",tokenize:pf,resolveAll:mf}}}}function pf(e,t,n){const r=this;let l=0,o=0,i;return a;function a(k){let T=r.events.length-1;for(;T>-1;){const W=r.events[T][1].type;if(W==="lineEnding"||W==="linePrefix")T--;else break}const v=T>-1?r.events[T][1].type:null,H=v==="tableHead"||v==="tableRow"?w:u;return H===w&&r.parser.lazy[r.now().line]?n(k):H(k)}function u(k){return e.enter("tableHead"),e.enter("tableRow"),s(k)}function s(k){return k===124||(i=!0,o+=1),f(k)}function f(k){return k===null?n(k):P(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):_(k)?M(e,f,"whitespace")(k):(o+=1,i&&(i=!1,l+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),i=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||V(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?p:c)}function p(k){return k===92||k===124?(e.consume(k),c):c(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),i=!1,_(k)?M(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):d(k))}function d(k){return k===45||k===58?C(k):k===124?(i=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),y):L(k)}function y(k){return _(k)?M(e,C,"whitespace")(k):C(k)}function C(k){return k===58?(o+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):k===45?(o+=1,x(k)):k===null||P(k)?F(k):L(k)}function x(k){return k===45?(e.enter("tableDelimiterFiller"),A(k)):L(k)}function A(k){return k===45?(e.consume(k),A):k===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(k))}function E(k){return _(k)?M(e,F,"whitespace")(k):F(k)}function F(k){return k===124?d(k):k===null||P(k)?!i||l!==o?L(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):L(k)}function L(k){return n(k)}function w(k){return e.enter("tableRow"),N(k)}function N(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),N):k===null||P(k)?(e.exit("tableRow"),t(k)):_(k)?M(e,N,"whitespace")(k):(e.enter("data"),q(k))}function q(k){return k===null||k===124||V(k)?(e.exit("data"),N(k)):(e.consume(k),k===92?j:q)}function j(k){return k===92||k===124?(e.consume(k),q):q(k)}}function mf(e,t){let n=-1,r=!0,l=0,o=[0,0,0,0],i=[0,0,0,0],a=!1,u=0,s,f,c;const p=new sf;for(;++n<e.length;){const h=e[n],d=h[1];h[0]==="enter"?d.type==="tableHead"?(a=!1,u!==0&&(ar(p,t,u,s,f),f=void 0,u=0),s={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",s,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],i=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",f,t]])),l=d.type==="tableDelimiterRow"?2:f?3:1):l&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(o[1]!==0&&(i[0]=i[1],c=en(p,t,o,l,void 0,c),o=[0,0,0,0]),i[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(i[0]=i[1],c=en(p,t,o,l,void 0,c)),o=i,i=[o[1],n,0,0])):d.type==="tableHead"?(a=!0,u=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(u=n,o[1]!==0?(i[0]=i[1],c=en(p,t,o,l,n,c)):i[1]!==0&&(c=en(p,t,i,l,n,c)),l=0):l&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(i[3]=n)}for(u!==0&&ar(p,t,u,s,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=ff(t.events,n))}return e}function en(e,t,n,r,l,o){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},De(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=De(t.events,n[1]);if(o={type:i,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const s=De(t.events,n[2]),f=De(t.events,n[3]),c={type:a,start:Object.assign({},s),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,y=n[3]-n[2]-1;e.add(d,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return l!==void 0&&(o.end=Object.assign({},De(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function ar(e,t,n,r,l){const o=[],i=De(t.events,n);l&&(l.end=Object.assign({},i),o.push(["exit",l,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function De(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const gf={name:"tasklistCheck",tokenize:xf};function df(){return{text:{91:gf}}}function xf(e,t,n){const r=this;return l;function l(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return V(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),i):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),i):n(u)}function i(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(u)}function a(u){return P(u)?t(u):_(u)?e.check({tokenize:kf},t,n)(u):n(u)}}function kf(e,t,n){return M(e,r,"whitespace");function r(l){return l===null?n(l):t(l)}}function yf(e){return Er([Vc(),Zc(),uf(e),hf(),df()])}const bf={};function wf(e){const t=this,n=e||bf,r=t.data(),l=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);l.push(yf(n)),o.push(Bc()),i.push(jc(n))}const Sf=[wf],Cf=He.lazy(()=>Ti(()=>import("./CodeBlockHighlighter-y0h2qpHE.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.CodeBlockHighlighter}))),Ef=He.memo(function({content:t,className:n,syntaxHighlight:r=!0}){const l=Ei(),o=He.useMemo(()=>({code({className:i,children:a}){const u=/language-(\w+)/.exec(i||""),s=!u,f=u?u[1]:"",c=String(a).replace(/\n$/,"");return s?R.jsx("code",{className:ht("bg-[#F3F4F6] dark:bg-[#27272a] px-1.5 py-0.5 rounded text-[#111827] dark:text-[#E5E5E5] font-mono text-[13px]",i),children:a}):r?R.jsxs("div",{className:"relative my-4 rounded-lg overflow-hidden border border-[#E5E7EB] dark:border-[#27272a] bg-[#F9FAFB] dark:bg-[#1e1e1e]",children:[R.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-[#F3F4F6] dark:bg-[#27272a] border-b border-[#E5E7EB] dark:border-[#27272a]",children:[R.jsx("span",{className:"text-xs text-[#6B7280] dark:text-[#a1a1aa] font-mono",children:f||"text"}),R.jsx(If,{content:c})]}),R.jsx(He.Suspense,{fallback:R.jsx(ur,{className:i,code:c}),children:R.jsx(Cf,{code:c,language:f,isDark:l})})]}):R.jsx(ur,{className:i,code:c})},p({children:i}){return R.jsx("p",{className:"mb-4 leading-relaxed last:mb-0",children:i})},ul({children:i}){return R.jsx("ul",{className:"pl-4 mb-4 space-y-1 list-disc last:mb-0",children:i})},ol({children:i}){return R.jsx("ol",{className:"pl-4 mb-4 space-y-1 list-decimal last:mb-0",children:i})},li({children:i}){return R.jsx("li",{className:"leading-relaxed",children:i})},h1({children:i}){return R.jsx("h1",{className:"text-2xl font-bold mb-4 mt-6 text-[#111827] dark:text-[#E5E5E5]",children:i})},h2({children:i}){return R.jsx("h2",{className:"text-xl font-bold mb-3 mt-5 text-[#111827] dark:text-[#E5E5E5]",children:i})},h3({children:i}){return R.jsx("h3",{className:"text-lg font-bold mb-2 mt-4 text-[#111827] dark:text-[#E5E5E5]",children:i})},blockquote({children:i}){return R.jsx("blockquote",{className:"border-l-2 border-[#22C55E] pl-4 italic text-[#6B7280] dark:text-[#a1a1aa] mb-4",children:i})},a({href:i,children:a}){return R.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-[#22C55E] hover:underline transition-colors",children:a})},table({children:i}){return R.jsx("div",{className:"overflow-x-auto mb-4 border border-[#E5E7EB] dark:border-[#27272a] rounded-lg",children:R.jsx("table",{className:"w-full text-sm text-left",children:i})})},thead({children:i}){return R.jsx("thead",{className:"bg-[#F3F4F6] text-[#111827] dark:bg-[#27272a] dark:text-[#E5E5E5]",children:i})},tbody({children:i}){return R.jsx("tbody",{className:"divide-y divide-[#E5E7EB] dark:divide-[#27272a]",children:i})},tr({children:i}){return R.jsx("tr",{className:"hover:bg-[#F3F4F6] dark:hover:bg-[#27272a]/50 transition-colors",children:i})},th({children:i}){return R.jsx("th",{className:"px-4 py-3 font-medium whitespace-nowrap",children:i})},td({children:i}){return R.jsx("td",{className:"px-4 py-3 text-[#374151] dark:text-[#d4d4d8]",children:i})},hr(){return R.jsx("hr",{className:"my-6 border-[#E5E7EB] dark:border-[#27272a]"})}}),[l,r]);return R.jsx("div",{className:ht("text-[14px] text-[#111827] dark:text-[#E5E5E5] font-mono break-words min-w-0 w-full",n),children:R.jsx(as,{remarkPlugins:Sf,components:o,children:t})})});function ur({className:e,code:t}){return R.jsx("pre",{className:"my-4 overflow-x-auto rounded-lg border border-[#E5E7EB] dark:border-[#27272a] bg-[#F9FAFB] dark:bg-[#1e1e1e] p-4 text-[13px] leading-normal",children:R.jsx("code",{className:e,children:t})})}function If({content:e}){const t=Ii(),[n,r]=He.useState(!1),l=async()=>{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)};return R.jsx("button",{onClick:l,className:"p-1 hover:bg-[#E5E7EB] dark:hover:bg-[#3f3f46] rounded-md transition-colors text-[#9CA3AF] dark:text-[#a1a1aa] hover:text-[#111827] dark:hover:text-[#E5E5E5]",title:t("chat.markdown.copyCode"),children:n?R.jsx(Ai,{className:"h-3.5 w-3.5 text-[#22C55E]"}):R.jsx(vi,{className:"h-3.5 w-3.5"})})}const Df=Object.freeze(Object.defineProperty({__proto__:null,MarkdownRenderer:Ef},Symbol.toStringTag,{value:"Module"}));export{Df as M,Pf as a,Gn as d,Hi as f,$i as h,zn as n,zf as p,Vn as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as r}from"./vendor-react-DofNRwfy.js";import{o as t,V as n,p,q as c,r as f}from"./vendor-radix-D6QrtXqd.js";import{j as d}from"./index-
|
|
1
|
+
import{r as s,j as r}from"./vendor-react-DofNRwfy.js";import{o as t,V as n,p,q as c,r as f}from"./vendor-radix-D6QrtXqd.js";import{j as d}from"./index-C6zClU0B.js";const m=s.forwardRef(({className:l,children:e,...a},o)=>r.jsxs(t,{ref:o,className:d("overflow-hidden relative",l),...a,children:[r.jsx(n,{className:"h-full w-full rounded-[inherit] [&>div]:!block !overflow-auto",children:e}),r.jsx(i,{}),r.jsx(p,{})]}));m.displayName=t.displayName;const i=s.forwardRef(({className:l,orientation:e="vertical",...a},o)=>r.jsx(c,{ref:o,orientation:e,className:d("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",l),...a,children:r.jsx(f,{className:"relative flex-1 rounded-full bg-border"})}));i.displayName=c.displayName;export{m as S};
|