meshy-node 0.8.9 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dashboard/assets/DashboardPage-BEJz4B6m.js +149 -0
- package/dashboard/assets/{DashboardShared-BhuvZY0B.js → DashboardShared-D5zRg1DH.js} +32 -32
- package/dashboard/assets/DiffTab-Bk6XCZ1f.js +18 -0
- package/dashboard/assets/FilesTab-D4a4VWo7.js +11 -0
- package/dashboard/assets/MarkdownPreviewFrame-seQq3fqR.js +12 -0
- package/dashboard/assets/{PreviewTab-hE7s4Tq6.js → PreviewTab-DHrdBIKz.js} +2 -2
- package/dashboard/assets/SharedConversationPage-DRlegEAt.js +7 -0
- package/dashboard/assets/{file-BBv9tDe9.js → file-CgCiQmib.js} +1 -1
- package/dashboard/assets/index-B9lzgZph.css +1 -0
- package/dashboard/assets/{index-CR3C-F8v.js → index-D6P0Gdhs.js} +2 -2
- package/dashboard/assets/{play-D8zhWxnK.js → play-runCtxZu.js} +1 -1
- package/dashboard/index.html +2 -2
- package/main.cjs +553 -412
- package/package.json +1 -1
- package/runtime-metadata.json +4 -4
- package/dashboard/assets/DashboardPage-1YfzxMX4.js +0 -144
- package/dashboard/assets/DiffTab-DrsxsCTo.js +0 -4
- package/dashboard/assets/FilesTab-2p61JxFR.js +0 -22
- package/dashboard/assets/SharedConversationPage-FDJRMTJV.js +0 -7
- package/dashboard/assets/index-Df0Lew9J.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ye,j as m,L as wl,bv as $r,T as Ur,l as dn,bw as Hr,r as ce,B as wt,C as Re,b as St,X as qr,bx as Sl,v as Cl,H as Vr
|
|
1
|
+
import{c as ye,j as m,L as wl,bv as $r,T as Ur,l as dn,bw as Hr,r as ce,B as wt,C as Re,b as St,X as qr,bx as Sl,v as Cl,H as Vr}from"./index-D6P0Gdhs.js";/**
|
|
2
2
|
* @license lucide-react v1.7.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -8,76 +8,76 @@ import{c as ye,j as m,L as wl,bv as $r,T as Ur,l as dn,bw as Hr,r as ce,B as wt,
|
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const
|
|
11
|
+
*/const vl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Il=ye("circle-question-mark",vl);/**
|
|
12
12
|
* @license lucide-react v1.7.0 - ISC
|
|
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
|
|
16
|
+
*/const Tl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Wr=ye("circle",Tl);/**
|
|
17
17
|
* @license lucide-react v1.7.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const jl=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Nl=ye("list-checks",jl);/**
|
|
22
22
|
* @license lucide-react v1.7.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const _l=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Pl=ye("loader-circle",_l);/**
|
|
27
27
|
* @license lucide-react v1.7.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const zl=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Ll=ye("shield-alert",zl);/**
|
|
32
32
|
* @license lucide-react v1.7.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const Dl=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Fl=ye("shield-check",Dl);/**
|
|
37
37
|
* @license lucide-react v1.7.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const Ml=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ol=ye("user",Ml);/**
|
|
42
42
|
* @license lucide-react v1.7.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
47
|
-
`)}function
|
|
48
|
-
`);return e.toolUseId?[{type:"tool_result",toolUseId:e.toolUseId,content:r,isError:!1}]:[{type:"text",text:r}]}function nt(e){return typeof e=="object"&&e!==null}function eo(e){if(!e)return;const t=["file_path","path","command"].map(n=>e[n]).find(n=>typeof n=="string"&&n.trim().length>0);return t==null?void 0:t.trim()}function to(e){const t=e.toLowerCase();return t.includes(" permission to write ")?"Write":t.includes(" permission to edit ")?"Edit":t.includes(" permission to run ")||t.includes(" permission to execute ")?"Bash":"Action"}function Zt(e){const t=e.trim();if(!t.startsWith("Awaiting your permission to "))return null;const n=t.match(/`([^`]+)`/);return{requests:[{toolName:to(t),target:n==null?void 0:n[1],summary:t}]}}function no(e){if(!Array.isArray(e.permission_denials))return null;const t=[];for(const n of e.permission_denials){if(!nt(n)||typeof n.tool_name!="string")continue;const r=nt(n.tool_input)?n.tool_input:void 0,i=eo(r),l=typeof e.result=="string"&&e.result.trim().length>0?e.result.trim():`Awaiting your permission to use ${n.tool_name}${i?` on \`${i}\``:""}.`;t.push({toolName:n.tool_name,...typeof n.tool_use_id=="string"?{toolUseId:n.tool_use_id}:{},...i?{target:i}:{},summary:l})}return t.length>0?{requests:t}:null}function Wn(e){if(!Array.isArray(e))return null;for(const t of e){if(!nt(t)||t.type!=="text"||typeof t.text!="string")continue;const n=Zt(t.text);if(n)return n}return null}function xn(e){if(!nt(e))return null;const t=no(e);if(t)return t;if(typeof e.result=="string"){const r=Zt(e.result);if(r)return r}if(typeof e.message=="string"){const r=Zt(e.message);if(r)return r}if(nt(e.message)){const r=xn(e.message);if(r)return r;const i=Wn(e.message.content);if(i)return i}const n=Wn(e.content);return n||null}function ro(e){return JSON.stringify(e.requests.map(t=>({toolName:t.toolName,target:t.target??null,summary:t.summary})))}function io(e,t){return e.requests.map(n=>{const r=n.target?` for \`${n.target}\``:"",i=t==="approve"?`Approved. Proceed with the requested ${n.toolName} action${r}.`:`Denied. Do not proceed with the requested ${n.toolName} action${r}. Ask for another approach if needed.`;return n.toolUseId?{type:"tool_result",toolUseId:n.toolUseId,content:i,isError:t==="deny"}:t==="approve"?{type:"text",text:i}:{type:"text",text:i}})}function lo(e){return Be(e)!==null}function Qt(e){return typeof e=="object"&&e!==null}function Jn(e){if(e.type==="user"){const t=Be(e),n=typeof e.timestamp=="string"?e.timestamp:"";if(t)return`user:${n}:${Ce(t)}`}return JSON.stringify(e)}function Te(e){return Array.isArray(e)?e.map(t=>Te(t)):Qt(e)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,Te(n)])):e}function oo(e,t){return e.length!==t.length?!1:e.every((n,r)=>JSON.stringify(Te(n))===JSON.stringify(Te(t[r])))}function en(e){const t=Be(e);if(t)return`user:${Ce(t)}`;if(e.type==="assistant"){if(typeof e.message=="string")return`assistant:${JSON.stringify(e.message)}`;if(Qt(e.message)&&"content"in e.message)return`assistant:${JSON.stringify(Te(e.message.content))}`;if(Array.isArray(e.content))return`assistant:${JSON.stringify(Te(e.content))}`;if(Qt(e.message))return`assistant:${JSON.stringify(Te(e.message))}`}return JSON.stringify(e)}function so(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Yn(e){if(typeof e.timestamp!="string")return null;const t=Date.parse(e.timestamp);return Number.isNaN(t)?null:t}function tn(e){const t=at(e);return t?`question:${$e(t)}`:null}function ao(e){const t=xn(e);return t?`permission:${ro(t)}`:null}function Xn(e){if(!Array.isArray(e))return null;const t=new Set;for(const n of e){const r=tn(n);if(r){t.add(r);continue}if(typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"){const i=ut(n.text);i&&t.add($e(i))}}return t.size===0?null:Array.from(t).sort().join("|")}function uo(e){const t=tn(e);if(t)return t;if(typeof e.message=="string"){const n=ut(e.message);return n?$e(n):null}if(typeof e.message=="object"&&e.message!==null){const n=tn(e.message);return n||Xn(e.message.content)}return Xn(e.content)}function co(e){return ao(e)}function Sh(e,t){const n=new Map;return t.map(r=>{const i=en(r),l=n.get(i)??0;return n.set(i,l+1),`${e}-${so(i)}-${l}`})}function Ch(e,t){const n=new Map;for(const l of t){const o=en(l);n.set(o,(n.get(o)??0)+1)}const r=[];for(let l=e.length-1;l>=0;l-=1){const o=e[l];if(!o)continue;const s=en(o),a=n.get(s)??0;if(a>0){n.set(s,a-1);continue}r.push({...o})}const i=[...r.reverse(),...t.map(l=>({...l}))].map((l,o)=>({event:l,order:o})).sort((l,o)=>{const s=Yn(l.event),a=Yn(o.event);return s!==null&&a!==null&&s!==a?s-a:l.order-o.order}).map(l=>l.event);return oo(e,i)?e:i}function vh(e,t){const n=Jn(t);return e.some(r=>Jn(r)===n)?e:[...e,{...t}]}function Eh(e,t){const n=new Map;for(const r of t){const i=Be(r);if(!i)continue;const l=Ce(i);n.set(l,(n.get(l)??0)+1)}return e.filter(r=>{const i=Ce(r.content),l=n.get(i)??0;return l<=0?!0:(n.set(i,l-1),!1)})}function Ah(e,t){const n=Ce(t),r=e.findIndex(i=>Ce(i.content)===n);return r===-1?e:e.filter((i,l)=>l!==r)}function Ih(e,t){const n=Ce(t);return e.some(r=>{const i=Be(r);return i!==null&&Ce(i)===n})}function Th(e){const t=[];let n=null;for(const r of e){if(lo(r)){n=null,t.push(r);continue}const i=co(r)??uo(r);i&&i===n||(t.push(r),i&&(n=i))}return t}const fo=["codex","claudecode","copilot"];function Jr({agent:e,className:t="h-3.5 w-3.5 shrink-0"}){const n=t;return e==="claudecode"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"butt",strokeLinejoin:"miter",className:n,"data-agent-icon":"claudecode","data-agent-shape":"pixel-bot","aria-hidden":"true",children:[m.jsx("path",{d:"M5 9V6h14v3h2v6h-3v3H6v-3H3V9z"}),m.jsx("path",{d:"M8 7v4"}),m.jsx("path",{d:"M16 7v4"}),m.jsx("path",{d:"M7 18v3"}),m.jsx("path",{d:"M11 18v3"}),m.jsx("path",{d:"M15 18v3"})]}):e==="codex"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"codex","data-agent-shape":"command-cloud","aria-hidden":"true",children:[m.jsx("path",{d:"M6.85 18.05h9.65a4.35 4.35 0 0 0 .65-8.65 5.45 5.45 0 0 0-10.2-1.65 5.1 5.1 0 0 0-.1 10.3z"}),m.jsx("path",{d:"M9.25 8.9 12 12l-2.75 3.1"}),m.jsx("path",{d:"M14.15 15.1h3.25"})]}):e==="copilot"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"copilot","data-agent-shape":"pixel-face","aria-hidden":"true",children:[m.jsx("path",{d:"M5.2 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55H5.2a1.55 1.55 0 0 1-1.55-1.55V5.65A1.55 1.55 0 0 1 5.2 4.1z"}),m.jsx("path",{d:"M14.15 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55h-4.65a1.55 1.55 0 0 1-1.55-1.55V5.65a1.55 1.55 0 0 1 1.55-1.55z"}),m.jsx("path",{d:"M4.5 14.7v3.85h15v-3.85"}),m.jsx("path",{d:"M8.4 14.7v1.9"}),m.jsx("path",{d:"M12 14.7v1.9"}),m.jsx("path",{d:"M15.6 14.7v1.9"}),m.jsx("path",{d:"M7.65 20.25h8.7"})]}):m.jsx(wl,{className:n,"data-agent-icon":"generic","aria-hidden":"true"})}function Yr({value:e,label:t,description:n}){return m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx(Jr,{agent:e}),m.jsx("span",{children:t}),n&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:n})]})}function jh(){return $r.map(e=>m.jsx(dn,{value:e.value,disabled:e.disabled,children:m.jsx(Yr,{value:e.value,label:e.label,description:e.description})},e.value))}function Nh(){return fo.map(e=>m.jsx(dn,{value:e,children:m.jsx(Yr,{value:e,label:Xr(e)})},e))}function _h(){return Ur.map(e=>m.jsx(dn,{value:e.value,children:m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{children:e.label}),e.description&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:e.description})]})},e.value))}function Xr(e){var t;return((t=$r.find(n=>n.value===e))==null?void 0:t.label)??e}function Ph(e){var t;return((t=Ur.find(n=>n.value===e))==null?void 0:t.label)??e}function po(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ho=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,go={};function Gn(e,t){return(go.jsx?mo:ho).test(e)}const xo=/[ \t\n\f\r]/g;function yo(e){return typeof e=="object"?e.type==="text"?Kn(e.value):!1:Kn(e)}function Kn(e){return e.replace(xo,"")===""}class ct{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ct.prototype.normal={};ct.prototype.property={};ct.prototype.space=void 0;function Gr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ct(n,r,t)}function nn(e){return e.toLowerCase()}class te{constructor(t,n){this.attribute=n,this.property=t}}te.prototype.attribute="";te.prototype.booleanish=!1;te.prototype.boolean=!1;te.prototype.commaOrSpaceSeparated=!1;te.prototype.commaSeparated=!1;te.prototype.defined=!1;te.prototype.mustUseProperty=!1;te.prototype.number=!1;te.prototype.overloadedBoolean=!1;te.prototype.property="";te.prototype.spaceSeparated=!1;te.prototype.space=void 0;let ko=0;const F=Ne(),Y=Ne(),rn=Ne(),A=Ne(),J=Ne(),Me=Ne(),re=Ne();function Ne(){return 2**++ko}const ln=Object.freeze(Object.defineProperty({__proto__:null,boolean:F,booleanish:Y,commaOrSpaceSeparated:re,commaSeparated:Me,number:A,overloadedBoolean:rn,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),zt=Object.keys(ln);class yn extends te{constructor(t,n,r,i){let l=-1;if(super(t,n),Zn(this,"space",i),typeof r=="number")for(;++l<zt.length;){const o=zt[l];Zn(this,zt[l],(r&ln[o])===ln[o])}}}yn.prototype.defined=!0;function Zn(e,t,n){n&&(e[t]=n)}function Ue(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new yn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[nn(r)]=r,n[nn(l.attribute)]=r}return new ct(t,n,e.space)}const Kr=Ue({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:J,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:A,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:J,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:Y,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zr(e,t){return t in e?e[t]:t}function Qr(e,t){return Zr(e,t.toLowerCase())}const bo=Ue({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Me,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:F,allowPaymentRequest:F,allowUserMedia:F,alt:null,as:null,async:F,autoCapitalize:null,autoComplete:J,autoFocus:F,autoPlay:F,blocking:J,capture:null,charSet:null,checked:F,cite:null,className:J,cols:A,colSpan:null,content:null,contentEditable:Y,controls:F,controlsList:J,coords:A|Me,crossOrigin:null,data:null,dateTime:null,decoding:null,default:F,defer:F,dir:null,dirName:null,disabled:F,download:rn,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:F,formTarget:null,headers:J,height:A,hidden:rn,high:A,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:F,inputMode:null,integrity:null,is:null,isMap:F,itemId:null,itemProp:J,itemRef:J,itemScope:F,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:F,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:F,muted:F,name:null,nonce:null,noModule:F,noValidate:F,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:F,optimum:A,pattern:null,ping:J,placeholder:null,playsInline:F,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:F,referrerPolicy:null,rel:J,required:F,reversed:F,rows:A,rowSpan:A,sandbox:J,scope:null,scoped:F,seamless:F,selected:F,shadowRootClonable:F,shadowRootDelegatesFocus:F,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:F,useMap:null,value:Y,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:F,declare:F,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:F,noHref:F,noShade:F,noWrap:F,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:F,disableRemotePlayback:F,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Qr}),wo=Ue({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:re,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:J,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:F,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Me,g2:Me,glyphName:Me,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zr}),ei=Ue({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ti=Ue({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Qr}),ni=Ue({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),So={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"},Co=/[A-Z]/g,Qn=/-[a-z]/g,vo=/^data[-\w.:]+$/i;function Eo(e,t){const n=nn(t);let r=t,i=te;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vo.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Qn,Io);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Qn.test(l)){let o=l.replace(Co,Ao);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=yn}return new i(r,t)}function Ao(e){return"-"+e.toLowerCase()}function Io(e){return e.charAt(1).toUpperCase()}const To=Gr([Kr,bo,ei,ti,ni],"html"),kn=Gr([Kr,wo,ei,ti,ni],"svg");function jo(e){return e.join(" ").trim()}var Le={},Lt,er;function No(){if(er)return Lt;er=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,a=`
|
|
49
|
-
`,u="/",f="*",c="",h="comment",p="declaration";function d(w,k){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];k=k||{};var E=1,v=1;function T(z){var j=z.match(t);j&&(E+=j.length);var q=z.lastIndexOf(a);v=~q?z.length-q:v+z.length}function L(){var z={line:E,column:v};return function(j){return j.position=new S(z),$(),j}}function S(z){this.start=z,this.end={line:E,column:v},this.source=k.source}S.prototype.content=w;function O(z){var j=new Error(k.source+":"+E+":"+v+": "+z);if(j.reason=z,j.filename=k.source,j.line=E,j.column=v,j.source=w,!k.silent)throw j}function U(z){var j=z.exec(w);if(j){var q=j[0];return T(q),w=w.slice(q.length),j}}function $(){U(n)}function b(z){var j;for(z=z||[];j=N();)j!==!1&&z.push(j);return z}function N(){var z=L();if(!(u!=w.charAt(0)||f!=w.charAt(1))){for(var j=2;c!=w.charAt(j)&&(f!=w.charAt(j)||u!=w.charAt(j+1));)++j;if(j+=2,c===w.charAt(j-1))return O("End of comment missing");var q=w.slice(2,j-2);return v+=2,T(q),w=w.slice(j),v+=2,z({type:h,comment:q})}}function _(){var z=L(),j=U(r);if(j){if(N(),!U(i))return O("property missing ':'");var q=U(l),X=z({type:p,property:y(j[0].replace(e,c)),value:q?y(q[0].replace(e,c)):c});return U(o),X}}function H(){var z=[];b(z);for(var j;j=_();)j!==!1&&(z.push(j),b(z));return z}return $(),H()}function y(w){return w?w.replace(s,c):c}return Lt=d,Lt}var tr;function _o(){if(tr)return Le;tr=1;var e=Le&&Le.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.default=n;const t=e(No());function n(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,t.default)(r),s=typeof i=="function";return o.forEach(a=>{if(a.type!=="declaration")return;const{property:u,value:f}=a;s?i(u,f,a):f&&(l=l||{},l[u]=f)}),l}return Le}var Je={},nr;function Po(){if(nr)return Je;nr=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},o=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},a=function(u,f){return f===void 0&&(f={}),l(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(t,o))};return Je.camelCase=a,Je}var Ye,rr;function zo(){if(rr)return Ye;rr=1;var e=Ye&&Ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(_o()),n=Po();function r(i,l){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,a){s&&a&&(o[(0,n.camelCase)(s,l)]=a)}),o}return r.default=r,Ye=r,Ye}var Lo=zo();const Do=Hr(Lo),ri=ii("end"),bn=ii("start");function ii(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 Fo(e){const t=bn(e),n=ri(e);if(t&&n)return{start:t,end:n}}function Ze(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ir(e.position):"start"in e||"end"in e?ir(e):"line"in e||"column"in e?on(e):""}function on(e){return lr(e&&e.line)+":"+lr(e&&e.column)}function ir(e){return on(e&&e.start)+"-"+on(e&&e.end)}function lr(e){return e&&typeof e=="number"?e:1}class Z extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Ze(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Z.prototype.file="";Z.prototype.name="";Z.prototype.reason="";Z.prototype.message="";Z.prototype.stack="";Z.prototype.column=void 0;Z.prototype.line=void 0;Z.prototype.ancestors=void 0;Z.prototype.cause=void 0;Z.prototype.fatal=void 0;Z.prototype.place=void 0;Z.prototype.ruleId=void 0;Z.prototype.source=void 0;const wn={}.hasOwnProperty,Mo=new Map,Oo=/[A-Z]/g,Ro=new Set(["table","tbody","thead","tfoot","tr"]),Bo=new Set(["td","th"]),li="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $o(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=Xo(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=Yo(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?kn:To,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=oi(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function oi(e,t,n){if(t.type==="element")return Uo(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ho(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Vo(e,t,n);if(t.type==="mdxjsEsm")return qo(e,t);if(t.type==="root")return Wo(e,t,n);if(t.type==="text")return Jo(e,t)}function Uo(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=kn,e.schema=i),e.ancestors.push(t);const l=ai(e,t.tagName,!1),o=Go(e,t);let s=Cn(e,t);return Ro.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!yo(a):!0})),si(e,o,l,t),Sn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Ho(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rt(e,t.position)}function qo(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rt(e,t.position)}function Vo(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=kn,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:ai(e,t.name,!0),o=Ko(e,t),s=Cn(e,t);return si(e,o,l,t),Sn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Wo(e,t,n){const r={};return Sn(r,Cn(e,t)),e.create(t,e.Fragment,r,n)}function Jo(e,t){return t.value}function si(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Sn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Yo(e,t,n){return r;function r(i,l,o,s){const u=Array.isArray(o.children)?n:t;return s?u(l,o,s):u(l,o)}}function Xo(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=bn(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function Go(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&wn.call(t.properties,i)){const l=Zo(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Bo.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ko(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else rt(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else rt(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Cn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Mo;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;o=a+"-"+u,i.set(a,u+1)}}const s=oi(e,l,o);s!==void 0&&n.push(s)}return n}function Zo(e,t,n){const r=Eo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?po(n):jo(n)),r.property==="style"){let i=typeof n=="object"?n:Qo(e,String(n));return e.stylePropertyNameCase==="css"&&(i=es(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?So[r.property]||r.property:r.attribute,n]}}function Qo(e,t){try{return Do(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Z("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=li+"#cannot-parse-style-attribute",i}}function ai(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=Gn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=Gn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return wn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rt(e)}function rt(e,t){const n=new Z("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=li+"#cannot-handle-mdx-estrees-without-createevaluater",n}function es(e){const t={};let n;for(n in e)wn.call(e,n)&&(t[ts(n)]=e[n]);return t}function ts(e){let t=e.replace(Oo,ns);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ns(e){return"-"+e.toLowerCase()}const Dt={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"]},rs={};function vn(e,t){const n=rs,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ui(e,r,i)}function ui(e,t,n){if(is(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 or(e.children,t,n)}return Array.isArray(e)?or(e,t,n):""}function or(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ui(e[i],t,n);return r.join("")}function is(e){return!!(e&&typeof e=="object")}const sr=document.createElement("i");function En(e){const t="&"+e+";";sr.innerHTML=t;const n=sr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ie(e,t,n,r){const i=e.length;let l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const ar={}.hasOwnProperty;function ci(e){const t={};let n=-1;for(;++n<e.length;)ls(t,e[n]);return t}function ls(e,t){let n;for(n in t){const i=(ar.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){ar.call(i,o)||(i[o]=[]);const s=l[o];os(i[o],Array.isArray(s)?s:s?[s]:[])}}}function os(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 fi(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Q=ve(/[A-Za-z]/),K=ve(/[\dA-Za-z]/),ss=ve(/[#-'*+\--9=?A-Z^-~]/);function vt(e){return e!==null&&(e<32||e===127)}const sn=ve(/\d/),as=ve(/[\dA-Fa-f]/),us=ve(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function M(e){return e===-2||e===-1||e===32}const Tt=ve(new RegExp("\\p{P}|\\p{S}","u")),je=ve(/\s/);function ve(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function He(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function B(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(a){return M(a)?(e.enter(n),s(a)):t(a)}function s(a){return M(a)&&l++<i?(e.consume(a),s):(e.exit(n),t(a))}}const cs={tokenize:fs};function fs(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),B(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return P(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}const ps={tokenize:hs},ur={tokenize:ms};function hs(e){const t=this,n=[];let r=0,i,l,o;return s;function s(v){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,a,u)(v)}return u(v)}function a(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const T=t.events.length;let L=T,S;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){S=t.events[L][1].end;break}k(r);let O=T;for(;O<t.events.length;)t.events[O][1].end={...S},O++;return ie(t.events,L+1,0,t.events.slice(T)),t.events.length=O,u(v)}return s(v)}function u(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return d(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ur,f,c)(v)}function f(v){return i&&E(),k(r),h(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,d(v)}function h(v){return t.containerState={},e.attempt(ur,p,d)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function d(v){if(v===null){i&&E(),k(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),y(v)}function y(v){if(v===null){w(e.exit("chunkFlow"),!0),k(0),e.consume(v);return}return P(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(v),y)}function w(v,T){const L=t.sliceStream(v);if(T&&L.push(null),v.previous=l,l&&(l.next=v),l=v,i.defineSkip(v.start),i.write(L),t.parser.lazy[v.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const O=t.events.length;let U=O,$,b;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if($){b=t.events[U][1].end;break}$=!0}for(k(r),S=O;S<t.events.length;)t.events[S][1].end={...b},S++;ie(t.events,U+1,0,t.events.slice(O)),t.events.length=S}}function k(v){let T=n.length;for(;T-- >v;){const L=n[T];t.containerState=L[1],L[0].exit.call(t,e)}n.length=v}function E(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ms(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Oe(e){if(e===null||W(e)||je(e))return 1;if(Tt(e))return 2}function jt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const an={name:"attention",resolveAll:ds,tokenize:gs};function ds(e,t){let n=-1,r,i,l,o,s,a,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};cr(c,-a),cr(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=le(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=le(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",l,t]]),u=le(u,jt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=le(u,[["exit",l,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=le(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ie(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function gs(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oe(r);let l;return o;function o(a){return l=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===l)return e.consume(a),s;const u=e.exit("attentionSequence"),f=Oe(a),c=!f||f===2&&i||n.includes(a),h=!i||i===2&&f||n.includes(r);return u._open=!!(l===42?c:c&&(i||!h)),u._close=!!(l===42?h:h&&(f||!c)),t(a)}}function cr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const xs={name:"autolink",tokenize:ys};function ys(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return Q(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||K(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||K(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||vt(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),f):ss(p)?(e.consume(p),u):n(p)}function f(p){return K(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||K(p))&&r++<63){const d=p===45?h:c;return e.consume(p),d}return n(p)}}const ft={partial:!0,tokenize:ks};function ks(e,t,n){return r;function r(l){return M(l)?B(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||P(l)?t(l):n(l)}}const pi={continuation:{tokenize:ws},exit:Ss,name:"blockQuote",tokenize:bs};function bs(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return M(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function ws(e,t,n){const r=this;return i;function i(o){return M(o)?B(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(pi,t,n)(o)}}function Ss(e){e.exit("blockQuote")}const hi={name:"characterEscape",tokenize:Cs};function Cs(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return us(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const mi={name:"characterReference",tokenize:vs};function vs(e,t,n){const r=this;let i=0,l,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a}function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=K,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=as,f):(e.enter("characterReferenceValue"),l=7,o=sn,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return o===K&&!En(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),f):n(c)}}const fr={partial:!0,tokenize:As},pr={concrete:!0,name:"codeFenced",tokenize:Es};function Es(e,t,n){const r=this,i={partial:!0,tokenize:L};let l=0,o=0,s;return a;function a(S){return u(S)}function u(S){const O=r.events[r.events.length-1];return l=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===s?(o++,e.consume(S),f):o<3?n(S):(e.exit("codeFencedFenceSequence"),M(S)?B(e,c,"whitespace")(S):c(S))}function c(S){return S===null||P(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(fr,y,T)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||P(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(S)):M(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),B(e,p,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),h)}function p(S){return S===null||P(S)?c(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===null||P(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(S)):S===96&&S===s?n(S):(e.consume(S),d)}function y(S){return e.attempt(i,T,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),k}function k(S){return l>0&&M(S)?B(e,E,"linePrefix",l+1)(S):E(S)}function E(S){return S===null||P(S)?e.check(fr,y,T)(S):(e.enter("codeFlowValue"),v(S))}function v(S){return S===null||P(S)?(e.exit("codeFlowValue"),E(S)):(e.consume(S),v)}function T(S){return e.exit("codeFenced"),t(S)}function L(S,O,U){let $=0;return b;function b(j){return S.enter("lineEnding"),S.consume(j),S.exit("lineEnding"),N}function N(j){return S.enter("codeFencedFence"),M(j)?B(S,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):_(j)}function _(j){return j===s?(S.enter("codeFencedFenceSequence"),H(j)):U(j)}function H(j){return j===s?($++,S.consume(j),H):$>=o?(S.exit("codeFencedFenceSequence"),M(j)?B(S,z,"whitespace")(j):z(j)):U(j)}function z(j){return j===null||P(j)?(S.exit("codeFencedFence"),O(j)):U(j)}}}function As(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Ft={name:"codeIndented",tokenize:Ts},Is={partial:!0,tokenize:js};function Ts(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),B(e,l,"linePrefix",5)(u)}function l(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?a(u):P(u)?e.attempt(Is,o,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||P(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function js(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):B(e,l,"linePrefix",5)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):P(o)?i(o):n(o)}}const Ns={name:"codeText",previous:Ps,resolve:_s,tokenize:zs};function _s(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ps(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zs(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):P(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||P(c)?(e.exit("codeTextData"),a(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(l.type="codeTextData",u(c))}}class Ls{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xe(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xe(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xe(this.left,n.reverse())}}}function Xe(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function di(e){const t={};let n=-1,r,i,l,o,s,a,u;const f=new Ls(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ds(f,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Ds(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,a=[],u={};let f,c,h=-1,p=n,d=0,y=0;const w=[y];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(y=h+1,w.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const k=s.slice(w[h],w[h+1]),E=l.pop();a.push([E,E+k.length-1]),e.splice(E,2,k)}for(a.reverse(),h=-1;++h<a.length;)u[d+a[h][0]]=d+a[h][1],d+=a[h][1]-a[h][0]-1;return u}const Fs={resolve:Os,tokenize:Rs},Ms={partial:!0,tokenize:Bs};function Os(e){return di(e),e}function Rs(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):P(s)?e.check(Ms,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Bs(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),B(e,l,"linePrefix")}function l(o){if(o===null||P(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function gi(e,t,n,r,i,l,o,s,a){const u=a||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(k),e.exit(l),h):k===null||k===32||k===41||vt(k)?n(k):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(k))}function h(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(s),h(k)):k===null||k===60||P(k)?n(k):(e.consume(k),k===92?d:p)}function d(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function y(k){return!f&&(k===null||k===41||W(k))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(k)):f<u&&k===40?(e.consume(k),f++,y):k===41?(e.consume(k),f--,y):k===null||k===32||k===40||vt(k)?n(k):(e.consume(k),k===92?w:y)}function w(k){return k===40||k===41||k===92?(e.consume(k),y):y(k)}}function xi(e,t,n,r,i,l){const o=this;let s=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):P(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||P(p)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),a||(a=!M(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function yi(e,t,n,r,i,l){let o;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,a):n(h)}function a(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),a(o)):h===null?n(h):P(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),B(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||P(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===o||h===92?(e.consume(h),f):f(h)}}function Qe(e,t){let n;return r;function r(i){return P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):M(i)?B(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const $s={name:"definition",tokenize:Hs},Us={partial:!0,tokenize:qs};function Hs(e,t,n){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return xi.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return W(p)?Qe(e,u)(p):u(p)}function u(p){return gi(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Us,c,c)(p)}function c(p){return M(p)?B(e,h,"whitespace")(p):h(p)}function h(p){return p===null||P(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function qs(e,t,n){return r;function r(s){return W(s)?Qe(e,i)(s):n(s)}function i(s){return yi(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return M(s)?B(e,o,"whitespace")(s):o(s)}function o(s){return s===null||P(s)?t(s):n(s)}}const Vs={name:"hardBreakEscape",tokenize:Ws};function Ws(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return P(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const Js={name:"headingAtx",resolve:Ys,tokenize:Xs};function Ys(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function Xs(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||W(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||P(f)?(e.exit("atxHeading"),t(f)):M(f)?B(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||W(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const Gs=["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"],hr=["pre","script","style","textarea"],Ks={concrete:!0,name:"htmlFlow",resolveTo:ea,tokenize:ta},Zs={partial:!0,tokenize:ra},Qs={partial:!0,tokenize:na};function ea(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 ta(e,t,n){const r=this;let i,l,o,s,a;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),h):x===47?(e.consume(x),l=!0,y):x===63?(e.consume(x),i=3,r.interrupt?t:g):Q(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function h(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,d):Q(x)?(e.consume(x),i=4,r.interrupt?t:g):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:g):n(x)}function d(x){const ae="CDATA[";return x===ae.charCodeAt(s++)?(e.consume(x),s===ae.length?r.interrupt?t:_:d):n(x)}function y(x){return Q(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function w(x){if(x===null||x===47||x===62||W(x)){const ae=x===47,Ee=o.toLowerCase();return!ae&&!l&&hr.includes(Ee)?(i=1,r.interrupt?t(x):_(x)):Gs.includes(o.toLowerCase())?(i=6,ae?(e.consume(x),k):r.interrupt?t(x):_(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):l?E(x):v(x))}return x===45||K(x)?(e.consume(x),o+=String.fromCharCode(x),w):n(x)}function k(x){return x===62?(e.consume(x),r.interrupt?t:_):n(x)}function E(x){return M(x)?(e.consume(x),E):b(x)}function v(x){return x===47?(e.consume(x),b):x===58||x===95||Q(x)?(e.consume(x),T):M(x)?(e.consume(x),v):b(x)}function T(x){return x===45||x===46||x===58||x===95||K(x)?(e.consume(x),T):L(x)}function L(x){return x===61?(e.consume(x),S):M(x)?(e.consume(x),L):v(x)}function S(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),a=x,O):M(x)?(e.consume(x),S):U(x)}function O(x){return x===a?(e.consume(x),a=null,$):x===null||P(x)?n(x):(e.consume(x),O)}function U(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||W(x)?L(x):(e.consume(x),U)}function $(x){return x===47||x===62||M(x)?v(x):n(x)}function b(x){return x===62?(e.consume(x),N):n(x)}function N(x){return x===null||P(x)?_(x):M(x)?(e.consume(x),N):n(x)}function _(x){return x===45&&i===2?(e.consume(x),q):x===60&&i===1?(e.consume(x),X):x===62&&i===4?(e.consume(x),se):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),me):P(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Zs,de,H)(x)):x===null||P(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),_)}function H(x){return e.check(Qs,z,de)(x)}function z(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),j}function j(x){return x===null||P(x)?H(x):(e.enter("htmlFlowData"),_(x))}function q(x){return x===45?(e.consume(x),g):_(x)}function X(x){return x===47?(e.consume(x),o="",oe):_(x)}function oe(x){if(x===62){const ae=o.toLowerCase();return hr.includes(ae)?(e.consume(x),se):_(x)}return Q(x)&&o.length<8?(e.consume(x),o+=String.fromCharCode(x),oe):_(x)}function me(x){return x===93?(e.consume(x),g):_(x)}function g(x){return x===62?(e.consume(x),se):x===45&&i===2?(e.consume(x),g):_(x)}function se(x){return x===null||P(x)?(e.exit("htmlFlowData"),de(x)):(e.consume(x),se)}function de(x){return e.exit("htmlFlow"),t(x)}}function na(e,t,n){const r=this;return i;function i(o){return P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function ra(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ft,t,n)}}const ia={name:"htmlText",tokenize:la};function la(e,t,n){const r=this;let i,l,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),a}function a(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),L):g===63?(e.consume(g),v):Q(g)?(e.consume(g),U):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),l=0,d):Q(g)?(e.consume(g),E):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function c(g){return g===null?n(g):g===45?(e.consume(g),h):P(g)?(o=c,X(g)):(e.consume(g),c)}function h(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?q(g):g===45?h(g):c(g)}function d(g){const se="CDATA[";return g===se.charCodeAt(l++)?(e.consume(g),l===se.length?y:d):n(g)}function y(g){return g===null?n(g):g===93?(e.consume(g),w):P(g)?(o=y,X(g)):(e.consume(g),y)}function w(g){return g===93?(e.consume(g),k):y(g)}function k(g){return g===62?q(g):g===93?(e.consume(g),k):y(g)}function E(g){return g===null||g===62?q(g):P(g)?(o=E,X(g)):(e.consume(g),E)}function v(g){return g===null?n(g):g===63?(e.consume(g),T):P(g)?(o=v,X(g)):(e.consume(g),v)}function T(g){return g===62?q(g):v(g)}function L(g){return Q(g)?(e.consume(g),S):n(g)}function S(g){return g===45||K(g)?(e.consume(g),S):O(g)}function O(g){return P(g)?(o=O,X(g)):M(g)?(e.consume(g),O):q(g)}function U(g){return g===45||K(g)?(e.consume(g),U):g===47||g===62||W(g)?$(g):n(g)}function $(g){return g===47?(e.consume(g),q):g===58||g===95||Q(g)?(e.consume(g),b):P(g)?(o=$,X(g)):M(g)?(e.consume(g),$):q(g)}function b(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),b):N(g)}function N(g){return g===61?(e.consume(g),_):P(g)?(o=N,X(g)):M(g)?(e.consume(g),N):$(g)}function _(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,H):P(g)?(o=_,X(g)):M(g)?(e.consume(g),_):(e.consume(g),z)}function H(g){return g===i?(e.consume(g),i=void 0,j):g===null?n(g):P(g)?(o=H,X(g)):(e.consume(g),H)}function z(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||W(g)?$(g):(e.consume(g),z)}function j(g){return g===47||g===62||W(g)?$(g):n(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function X(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),oe}function oe(g){return M(g)?B(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):me(g)}function me(g){return e.enter("htmlTextData"),o(g)}}const An={name:"labelEnd",resolveAll:ua,resolveTo:ca,tokenize:fa},oa={tokenize:pa},sa={tokenize:ha},aa={tokenize:ma};function ua(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ie(e,0,e.length,n),e}function ca(e,t){let n=e.length,r=0,i,l,o,s;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,t],["enter",u,t]],s=le(s,e.slice(l+1,l+r+3)),s=le(s,[["enter",f,t]]),s=le(s,jt(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),s=le(s,[["exit",f,t],e[o-2],e[o-1],["exit",u,t]]),s=le(s,e.slice(o+1)),s=le(s,[["exit",a,t]]),ie(e,l,e.length,s),e}function fa(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return s;function s(h){return l?l._inactive?c(h):(o=r.parser.defined.includes(fe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(oa,f,o?f:c)(h):h===91?e.attempt(sa,f,o?u:c)(h):o?f(h):c(h)}function u(h){return e.attempt(aa,f,c)(h)}function f(h){return t(h)}function c(h){return l._balanced=!0,n(h)}}function pa(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return W(c)?Qe(e,l)(c):l(c)}function l(c){return c===41?f(c):gi(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return W(c)?Qe(e,a)(c):f(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?yi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return W(c)?Qe(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function ha(e,t,n){const r=this;return i;function i(s){return xi.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function ma(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const da={name:"labelStartImage",resolveAll:An.resolveAll,tokenize:ga};function ga(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),l}function l(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const xa={name:"labelStartLink",resolveAll:An.resolveAll,tokenize:ya};function ya(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Mt={name:"lineEnding",tokenize:ka};function ka(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,t,"linePrefix")}}const kt={name:"thematicBreak",tokenize:ba};function ba(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||P(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),M(u)?B(e,s,"whitespace")(u):s(u))}}const ee={continuation:{tokenize:va},exit:Aa,name:"list",tokenize:Ca},wa={partial:!0,tokenize:Ia},Sa={partial:!0,tokenize:Ea};function Ca(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const d=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:sn(p)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(kt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return sn(p)&&++o<10?(e.consume(p),a):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ft,r.interrupt?n:f,e.attempt(wa,h,c))}function f(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function c(p){return M(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function va(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ft,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!M(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Sa,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Ea(e,t,n){const r=this;return B(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function Aa(e){e.exit(this.containerState.type)}function Ia(e,t,n){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!M(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const mr={name:"setextUnderline",resolveTo:Ta,tokenize:ja};function Ta(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function ja(e,t,n){const r=this;let i;return l;function l(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),M(u)?B(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||P(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Na={tokenize:_a};function _a(e){const t=this,n=e.attempt(ft,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Fs,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Pa={resolveAll:bi()},za=ki("string"),La=ki("text");function ki(e){return{resolveAll:bi(e==="text"?Da:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(f){return u(f)?l(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),a}function a(f){return u(f)?(n.exit("data"),l(f)):(n.consume(f),a)}function u(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function bi(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function Da(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let l=i.length,o=-1,s=0,a;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)a=!0,s++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||a||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Fa={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:pi},Ma={91:$s},Oa={[-2]:Ft,[-1]:Ft,32:Ft},Ra={35:Js,42:kt,45:[mr,kt],60:Ks,61:mr,95:kt,96:pr,126:pr},Ba={38:mi,92:hi},$a={[-5]:Mt,[-4]:Mt,[-3]:Mt,33:da,38:mi,42:an,60:[xs,ia],91:xa,92:[Vs,hi],93:An,95:an,96:Ns},Ua={null:[an,Pa]},Ha={null:[42,95]},qa={null:[]},Va=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ha,contentInitial:Ma,disable:qa,document:Fa,flow:Ra,flowInitial:Oa,insideSpan:Ua,string:Ba,text:$a},Symbol.toStringTag,{value:"Module"}));function Wa(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let o=[],s=[];const a={attempt:O(L),check:O(S),consume:E,enter:v,exit:T,interrupt:O(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:d,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function c(N){return o=le(o,N),w(),o[o.length-1]!==null?[]:(U(t,0),u.events=jt(l,u.events,u),u.events)}function h(N,_){return Ya(p(N),_)}function p(N){return Ja(o,N)}function d(){const{_bufferIndex:N,_index:_,line:H,column:z,offset:j}=r;return{_bufferIndex:N,_index:_,line:H,column:z,offset:j}}function y(N){i[N.line]=N.column,b()}function w(){let N;for(;r._index<o.length;){const _=o[r._index];if(typeof _=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<_.length;)k(_.charCodeAt(r._bufferIndex));else k(_)}}function k(N){f=f(N)}function E(N){P(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,b()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function v(N,_){const H=_||{};return H.type=N,H.start=d(),u.events.push(["enter",H,u]),s.push(H),H}function T(N){const _=s.pop();return _.end=d(),u.events.push(["exit",_,u]),_}function L(N,_){U(N,_.from)}function S(N,_){_.restore()}function O(N,_){return H;function H(z,j,q){let X,oe,me,g;return Array.isArray(z)?de(z):"tokenize"in z?de([z]):se(z);function se(G){return qe;function qe(be){const _e=be!==null&&G[be],Pe=be!==null&&G.null,ht=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return de(ht)(be)}}function de(G){return X=G,oe=0,G.length===0?q:x(G[oe])}function x(G){return qe;function qe(be){return g=$(),me=G,G.partial||(u.currentConstruct=G),G.name&&u.parser.constructs.disable.null.includes(G.name)?Ee():G.tokenize.call(_?Object.assign(Object.create(u),_):u,a,ae,Ee)(be)}}function ae(G){return N(me,g),j}function Ee(G){return g.restore(),++oe<X.length?x(X[oe]):q}}}function U(N,_){N.resolveAll&&!l.includes(N)&&l.push(N),N.resolve&&ie(u.events,_,u.events.length-_,N.resolve(u.events.slice(_),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function $(){const N=d(),_=u.previous,H=u.currentConstruct,z=u.events.length,j=Array.from(s);return{from:z,restore:q};function q(){r=N,u.previous=_,u.currentConstruct=H,u.events.length=z,s=j,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ja(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Ya(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
46
|
+
*/const Rl=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],gn=ye("wrench",Rl);function Ct(e){return typeof e=="object"&&e!==null}function Bl(e){if(!Ct(e))return null;if(e.type==="text"&&typeof e.text=="string"){const t=e.text.trim();return t?{type:"text",text:t}:null}if(e.type==="image"&&typeof e.mediaType=="string"&&typeof e.data=="string"){const t=e.mediaType.trim(),n=e.data;return!t||!n?null:{type:"image",mediaType:t,data:n,...typeof e.filename=="string"&&e.filename.trim()?{filename:e.filename.trim()}:{}}}if(e.type==="tool_result"&&typeof e.toolUseId=="string"&&typeof e.content=="string"){const t=e.toolUseId.trim(),n=e.content.trim();return!t||!n?null:{type:"tool_result",toolUseId:t,content:n,...typeof e.isError=="boolean"?{isError:e.isError}:{}}}return null}function $l(e){if(!Ct(e))return null;if(e.type==="text"&&typeof e.text=="string"){const r=e.text.trim();return r?{type:"text",text:r}:null}if(e.type!=="image"||!Ct(e.source)){if(e.type==="tool_result"&&typeof e.tool_use_id=="string"&&typeof e.content=="string"){const r=e.tool_use_id.trim(),i=e.content.trim();return!r||!i?null:{type:"tool_result",toolUseId:r,content:i,...typeof e.is_error=="boolean"?{isError:e.is_error}:{}}}return null}const t=typeof e.source.media_type=="string"?e.source.media_type.trim():"",n=typeof e.source.data=="string"?e.source.data:"";return!t||!n?null:{type:"image",mediaType:t,data:n}}function yt(e){if(typeof e=="string"){const t=e.trim();return t?[{type:"text",text:t}]:[]}return Array.isArray(e)?e.map(t=>Bl(t)??$l(t)).filter(t=>t!==null):[]}function gh(e,t){const n=e.trim();return[...n?[{type:"text",text:n}]:[],...t]}function Ul(e){return{role:"user",content:e.map(t=>t.type==="text"?{type:"text",text:t.text}:t.type==="tool_result"?{type:"tool_result",tool_use_id:t.toolUseId,content:t.content,...typeof t.isError=="boolean"?{is_error:t.isError}:{}}:{type:"image",source:{type:"base64",media_type:t.mediaType,data:t.data}})}}function xh(e,t=new Date().toISOString()){return{type:"user",message:Ul(e),timestamp:t}}function Be(e){if(e.type!=="user"||e.isSynthetic===!0)return null;if(typeof e.message=="string"){const t=yt(e.message);return t.length>0?t:null}if(Ct(e.message)&&Array.isArray(e.message.content)){const t=yt(e.message.content);return t.length>0?t:null}if(Array.isArray(e.content)){const t=yt(e.content);return t.length>0?t:null}return null}function yh(e){return yt(e.payload.initialMessage)}function Ce(e){return e.map(t=>{if(t.type==="text")return`t:${t.text}`;if(t.type==="tool_result")return`r:${t.toolUseId}:${t.isError===!0?"1":"0"}:${t.content}`;const n=t.data.slice(0,32),r=t.data.slice(-32);return`i:${t.mediaType}:${t.data.length}:${n}:${r}`}).join("|")}function Hl(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool_result"?t.content:"").filter(Boolean).join(`
|
|
47
|
+
`)}function ql(e){return`data:${e.mediaType};base64,${e.data}`}function kh(e){var i,l;if(!e)return[];const t=[],n=e.items;if(n)for(const o of Array.from(n)){if((o==null?void 0:o.kind)!=="file"||!((i=o.type)!=null&&i.startsWith("image/")))continue;const s=(l=o.getAsFile)==null?void 0:l.call(o);s&&s.type.startsWith("image/")&&t.push(s)}if(t.length>0)return t;const r=e.files;return r?Array.from(r).filter(o=>o.type.startsWith("image/")):[]}function Vl(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"){n(new Error(`Failed to read ${e.name}`));return}t(r.result)},r.onerror=()=>n(r.error??new Error(`Failed to read ${e.name}`)),r.readAsDataURL(e)})}async function bh(e){return Promise.all(Array.from(e).map(async t=>{if(!t.type.startsWith("image/"))throw new Error(`${t.name} is not an image`);const n=await Vl(t),r=n.indexOf(",");if(r===-1)throw new Error(`Failed to parse ${t.name}`);return{type:"image",mediaType:t.type||"image/png",data:n.slice(r+1),filename:t.name}}))}function st(e){return typeof e=="object"&&e!==null}function Wl(e){return st(e)&&typeof e.name=="string"&&e.name.toLowerCase()==="askuserquestion"}function Jl(e){return!st(e)||typeof e.label!="string"||!e.label.trim()?null:{label:e.label.trim(),description:typeof e.description=="string"?e.description.trim():""}}function Yl(e){if(!st(e)||typeof e.question!="string"||!e.question.trim())return null;const t=Array.isArray(e.options)?e.options.map(Jl).filter(n=>n!==null):[];return t.length===0?null:{header:typeof e.header=="string"&&e.header.trim()?e.header.trim():void 0,question:e.question.trim(),multiSelect:e.multiSelect===!0,options:t}}function Kt(e){if(!st(e)||!Array.isArray(e.questions))return null;const t=e.questions.map(Yl).filter(n=>n!==null);return t.length===0?null:{questions:t}}function $e(e){return JSON.stringify({questions:e.questions})}function at(e){const t=Kt(e);if(t)return t;if(Wl(e)){const n=st(e.input)?e.input:void 0,r=Kt(n);return r?{...r,...typeof e.id=="string"&&e.id.trim()?{toolUseId:e.id.trim()}:{}}:null}return null}function Xl(e){var i;const t=e.trim();if(!t)return[];const n=[t],r=t.matchAll(/```(?:json)?\s*([\s\S]*?)```/gi);for(const l of r){const o=(i=l[1])==null?void 0:i.trim();o&&n.push(o)}return n}function ut(e){for(const t of Xl(e))try{const n=JSON.parse(t),r=Kt(n);if(r)return r}catch{}return null}function Gl(e){return e.questions.map(t=>t.options.length>0?[0]:[])}function Kl(e,t){return e.questions.every((n,r)=>(t[r]??[]).length>0)}function Zl(e,t){const r=e.questions.map((i,l)=>{const o=[...new Set(t[l]??[])].sort((s,a)=>s-a).filter(s=>i.options[s]!==void 0);return{header:i.header??null,question:i.question,multiSelect:i.multiSelect,selectedOptions:o.map(s=>i.options[s]).filter(s=>s!==void 0)}}).map(i=>{const l=i.header??i.question,o=i.selectedOptions.map(s=>s.label).join(i.multiSelect?", ":"");return`${l}: ${o}`}).join(`
|
|
48
|
+
`);return e.toolUseId?[{type:"tool_result",toolUseId:e.toolUseId,content:r,isError:!1}]:[{type:"text",text:r}]}function nt(e){return typeof e=="object"&&e!==null}function Ql(e){if(!e)return;const t=["file_path","path","command"].map(n=>e[n]).find(n=>typeof n=="string"&&n.trim().length>0);return t==null?void 0:t.trim()}function eo(e){const t=e.toLowerCase();return t.includes(" permission to write ")?"Write":t.includes(" permission to edit ")?"Edit":t.includes(" permission to run ")||t.includes(" permission to execute ")?"Bash":"Action"}function Zt(e){const t=e.trim();if(!t.startsWith("Awaiting your permission to "))return null;const n=t.match(/`([^`]+)`/);return{requests:[{toolName:eo(t),target:n==null?void 0:n[1],summary:t}]}}function to(e){if(!Array.isArray(e.permission_denials))return null;const t=[];for(const n of e.permission_denials){if(!nt(n)||typeof n.tool_name!="string")continue;const r=nt(n.tool_input)?n.tool_input:void 0,i=Ql(r),l=typeof e.result=="string"&&e.result.trim().length>0?e.result.trim():`Awaiting your permission to use ${n.tool_name}${i?` on \`${i}\``:""}.`;t.push({toolName:n.tool_name,...typeof n.tool_use_id=="string"?{toolUseId:n.tool_use_id}:{},...i?{target:i}:{},summary:l})}return t.length>0?{requests:t}:null}function Wn(e){if(!Array.isArray(e))return null;for(const t of e){if(!nt(t)||t.type!=="text"||typeof t.text!="string")continue;const n=Zt(t.text);if(n)return n}return null}function xn(e){if(!nt(e))return null;const t=to(e);if(t)return t;if(typeof e.result=="string"){const r=Zt(e.result);if(r)return r}if(typeof e.message=="string"){const r=Zt(e.message);if(r)return r}if(nt(e.message)){const r=xn(e.message);if(r)return r;const i=Wn(e.message.content);if(i)return i}const n=Wn(e.content);return n||null}function no(e){return JSON.stringify(e.requests.map(t=>({toolName:t.toolName,target:t.target??null,summary:t.summary})))}function ro(e,t){return e.requests.map(n=>{const r=n.target?` for \`${n.target}\``:"",i=t==="approve"?`Approved. Proceed with the requested ${n.toolName} action${r}.`:`Denied. Do not proceed with the requested ${n.toolName} action${r}. Ask for another approach if needed.`;return n.toolUseId?{type:"tool_result",toolUseId:n.toolUseId,content:i,isError:t==="deny"}:t==="approve"?{type:"text",text:i}:{type:"text",text:i}})}function io(e){return Be(e)!==null}function Qt(e){return typeof e=="object"&&e!==null}function Jn(e){if(e.type==="user"){const t=Be(e),n=typeof e.timestamp=="string"?e.timestamp:"";if(t)return`user:${n}:${Ce(t)}`}return JSON.stringify(e)}function Te(e){return Array.isArray(e)?e.map(t=>Te(t)):Qt(e)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,Te(n)])):e}function lo(e,t){return e.length!==t.length?!1:e.every((n,r)=>JSON.stringify(Te(n))===JSON.stringify(Te(t[r])))}function en(e){const t=Be(e);if(t)return`user:${Ce(t)}`;if(e.type==="assistant"){if(typeof e.message=="string")return`assistant:${JSON.stringify(e.message)}`;if(Qt(e.message)&&"content"in e.message)return`assistant:${JSON.stringify(Te(e.message.content))}`;if(Array.isArray(e.content))return`assistant:${JSON.stringify(Te(e.content))}`;if(Qt(e.message))return`assistant:${JSON.stringify(Te(e.message))}`}return JSON.stringify(e)}function oo(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Yn(e){if(typeof e.timestamp!="string")return null;const t=Date.parse(e.timestamp);return Number.isNaN(t)?null:t}function tn(e){const t=at(e);return t?`question:${$e(t)}`:null}function so(e){const t=xn(e);return t?`permission:${no(t)}`:null}function Xn(e){if(!Array.isArray(e))return null;const t=new Set;for(const n of e){const r=tn(n);if(r){t.add(r);continue}if(typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"){const i=ut(n.text);i&&t.add($e(i))}}return t.size===0?null:Array.from(t).sort().join("|")}function ao(e){const t=tn(e);if(t)return t;if(typeof e.message=="string"){const n=ut(e.message);return n?$e(n):null}if(typeof e.message=="object"&&e.message!==null){const n=tn(e.message);return n||Xn(e.message.content)}return Xn(e.content)}function uo(e){return so(e)}function wh(e,t){const n=new Map;return t.map(r=>{const i=en(r),l=n.get(i)??0;return n.set(i,l+1),`${e}-${oo(i)}-${l}`})}function Sh(e,t){const n=new Map;for(const l of t){const o=en(l);n.set(o,(n.get(o)??0)+1)}const r=[];for(let l=e.length-1;l>=0;l-=1){const o=e[l];if(!o)continue;const s=en(o),a=n.get(s)??0;if(a>0){n.set(s,a-1);continue}r.push({...o})}const i=[...r.reverse(),...t.map(l=>({...l}))].map((l,o)=>({event:l,order:o})).sort((l,o)=>{const s=Yn(l.event),a=Yn(o.event);return s!==null&&a!==null&&s!==a?s-a:l.order-o.order}).map(l=>l.event);return lo(e,i)?e:i}function Ch(e,t){const n=Jn(t);return e.some(r=>Jn(r)===n)?e:[...e,{...t}]}function Eh(e,t){const n=new Map;for(const r of t){const i=Be(r);if(!i)continue;const l=Ce(i);n.set(l,(n.get(l)??0)+1)}return e.filter(r=>{const i=Ce(r.content),l=n.get(i)??0;return l<=0?!0:(n.set(i,l-1),!1)})}function Ah(e,t){const n=Ce(t),r=e.findIndex(i=>Ce(i.content)===n);return r===-1?e:e.filter((i,l)=>l!==r)}function vh(e,t){const n=Ce(t);return e.some(r=>{const i=Be(r);return i!==null&&Ce(i)===n})}function Ih(e){const t=[];let n=null;for(const r of e){if(io(r)){n=null,t.push(r);continue}const i=uo(r)??ao(r);i&&i===n||(t.push(r),i&&(n=i))}return t}const co=["codex","claudecode","copilot"];function Jr({agent:e,className:t="h-3.5 w-3.5 shrink-0"}){const n=t;return e==="claudecode"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"butt",strokeLinejoin:"miter",className:n,"data-agent-icon":"claudecode","data-agent-shape":"pixel-bot","aria-hidden":"true",children:[m.jsx("path",{d:"M5 9V6h14v3h2v6h-3v3H6v-3H3V9z"}),m.jsx("path",{d:"M8 7v4"}),m.jsx("path",{d:"M16 7v4"}),m.jsx("path",{d:"M7 18v3"}),m.jsx("path",{d:"M11 18v3"}),m.jsx("path",{d:"M15 18v3"})]}):e==="codex"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"codex","data-agent-shape":"command-cloud","aria-hidden":"true",children:[m.jsx("path",{d:"M6.85 18.05h9.65a4.35 4.35 0 0 0 .65-8.65 5.45 5.45 0 0 0-10.2-1.65 5.1 5.1 0 0 0-.1 10.3z"}),m.jsx("path",{d:"M9.25 8.9 12 12l-2.75 3.1"}),m.jsx("path",{d:"M14.15 15.1h3.25"})]}):e==="copilot"?m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:n,"data-agent-icon":"copilot","data-agent-shape":"pixel-face","aria-hidden":"true",children:[m.jsx("path",{d:"M5.2 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55H5.2a1.55 1.55 0 0 1-1.55-1.55V5.65A1.55 1.55 0 0 1 5.2 4.1z"}),m.jsx("path",{d:"M14.15 4.1h4.65a1.55 1.55 0 0 1 1.55 1.55v4.65a1.55 1.55 0 0 1-1.55 1.55h-4.65a1.55 1.55 0 0 1-1.55-1.55V5.65a1.55 1.55 0 0 1 1.55-1.55z"}),m.jsx("path",{d:"M4.5 14.7v3.85h15v-3.85"}),m.jsx("path",{d:"M8.4 14.7v1.9"}),m.jsx("path",{d:"M12 14.7v1.9"}),m.jsx("path",{d:"M15.6 14.7v1.9"}),m.jsx("path",{d:"M7.65 20.25h8.7"})]}):m.jsx(wl,{className:n,"data-agent-icon":"generic","aria-hidden":"true"})}function Yr({value:e,label:t,description:n}){return m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx(Jr,{agent:e}),m.jsx("span",{children:t}),n&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:n})]})}function Th(){return $r.map(e=>m.jsx(dn,{value:e.value,disabled:e.disabled,children:m.jsx(Yr,{value:e.value,label:e.label,description:e.description})},e.value))}function jh(){return co.map(e=>m.jsx(dn,{value:e,children:m.jsx(Yr,{value:e,label:Xr(e)})},e))}function Nh(){return Ur.map(e=>m.jsx(dn,{value:e.value,children:m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{children:e.label}),e.description&&m.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground",children:e.description})]})},e.value))}function Xr(e){var t;return((t=$r.find(n=>n.value===e))==null?void 0:t.label)??e}function _h(e){var t;return((t=Ur.find(n=>n.value===e))==null?void 0:t.label)??e}function fo(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const po=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ho=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mo={};function Gn(e,t){return(mo.jsx?ho:po).test(e)}const go=/[ \t\n\f\r]/g;function xo(e){return typeof e=="object"?e.type==="text"?Kn(e.value):!1:Kn(e)}function Kn(e){return e.replace(go,"")===""}class ct{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ct.prototype.normal={};ct.prototype.property={};ct.prototype.space=void 0;function Gr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ct(n,r,t)}function nn(e){return e.toLowerCase()}class te{constructor(t,n){this.attribute=n,this.property=t}}te.prototype.attribute="";te.prototype.booleanish=!1;te.prototype.boolean=!1;te.prototype.commaOrSpaceSeparated=!1;te.prototype.commaSeparated=!1;te.prototype.defined=!1;te.prototype.mustUseProperty=!1;te.prototype.number=!1;te.prototype.overloadedBoolean=!1;te.prototype.property="";te.prototype.spaceSeparated=!1;te.prototype.space=void 0;let yo=0;const F=Ne(),Y=Ne(),rn=Ne(),v=Ne(),J=Ne(),Me=Ne(),re=Ne();function Ne(){return 2**++yo}const ln=Object.freeze(Object.defineProperty({__proto__:null,boolean:F,booleanish:Y,commaOrSpaceSeparated:re,commaSeparated:Me,number:v,overloadedBoolean:rn,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),zt=Object.keys(ln);class yn extends te{constructor(t,n,r,i){let l=-1;if(super(t,n),Zn(this,"space",i),typeof r=="number")for(;++l<zt.length;){const o=zt[l];Zn(this,zt[l],(r&ln[o])===ln[o])}}}yn.prototype.defined=!0;function Zn(e,t,n){n&&(e[t]=n)}function Ue(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new yn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[nn(r)]=r,n[nn(l.attribute)]=r}return new ct(t,n,e.space)}const Kr=Ue({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:J,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:v,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:J,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:Y,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zr(e,t){return t in e?e[t]:t}function Qr(e,t){return Zr(e,t.toLowerCase())}const ko=Ue({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Me,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:F,allowPaymentRequest:F,allowUserMedia:F,alt:null,as:null,async:F,autoCapitalize:null,autoComplete:J,autoFocus:F,autoPlay:F,blocking:J,capture:null,charSet:null,checked:F,cite:null,className:J,cols:v,colSpan:null,content:null,contentEditable:Y,controls:F,controlsList:J,coords:v|Me,crossOrigin:null,data:null,dateTime:null,decoding:null,default:F,defer:F,dir:null,dirName:null,disabled:F,download:rn,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:F,formTarget:null,headers:J,height:v,hidden:rn,high:v,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:F,inputMode:null,integrity:null,is:null,isMap:F,itemId:null,itemProp:J,itemRef:J,itemScope:F,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:F,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:F,muted:F,name:null,nonce:null,noModule:F,noValidate:F,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:F,optimum:v,pattern:null,ping:J,placeholder:null,playsInline:F,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:F,referrerPolicy:null,rel:J,required:F,reversed:F,rows:v,rowSpan:v,sandbox:J,scope:null,scoped:F,seamless:F,selected:F,shadowRootClonable:F,shadowRootDelegatesFocus:F,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:F,useMap:null,value:Y,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:F,declare:F,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:F,noHref:F,noShade:F,noWrap:F,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:F,disableRemotePlayback:F,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:Qr}),bo=Ue({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:re,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:J,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:F,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:Me,g2:Me,glyphName:Me,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,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:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zr}),ei=Ue({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ti=Ue({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Qr}),ni=Ue({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),wo={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"},So=/[A-Z]/g,Qn=/-[a-z]/g,Co=/^data[-\w.:]+$/i;function Eo(e,t){const n=nn(t);let r=t,i=te;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Co.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Qn,vo);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Qn.test(l)){let o=l.replace(So,Ao);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=yn}return new i(r,t)}function Ao(e){return"-"+e.toLowerCase()}function vo(e){return e.charAt(1).toUpperCase()}const Io=Gr([Kr,ko,ei,ti,ni],"html"),kn=Gr([Kr,bo,ei,ti,ni],"svg");function To(e){return e.join(" ").trim()}var Le={},Lt,er;function jo(){if(er)return Lt;er=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,a=`
|
|
49
|
+
`,u="/",f="*",c="",h="comment",p="declaration";function d(w,k){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];k=k||{};var A=1,E=1;function T(z){var j=z.match(t);j&&(A+=j.length);var q=z.lastIndexOf(a);E=~q?z.length-q:E+z.length}function L(){var z={line:A,column:E};return function(j){return j.position=new S(z),$(),j}}function S(z){this.start=z,this.end={line:A,column:E},this.source=k.source}S.prototype.content=w;function O(z){var j=new Error(k.source+":"+A+":"+E+": "+z);if(j.reason=z,j.filename=k.source,j.line=A,j.column=E,j.source=w,!k.silent)throw j}function U(z){var j=z.exec(w);if(j){var q=j[0];return T(q),w=w.slice(q.length),j}}function $(){U(n)}function b(z){var j;for(z=z||[];j=N();)j!==!1&&z.push(j);return z}function N(){var z=L();if(!(u!=w.charAt(0)||f!=w.charAt(1))){for(var j=2;c!=w.charAt(j)&&(f!=w.charAt(j)||u!=w.charAt(j+1));)++j;if(j+=2,c===w.charAt(j-1))return O("End of comment missing");var q=w.slice(2,j-2);return E+=2,T(q),w=w.slice(j),E+=2,z({type:h,comment:q})}}function _(){var z=L(),j=U(r);if(j){if(N(),!U(i))return O("property missing ':'");var q=U(l),X=z({type:p,property:y(j[0].replace(e,c)),value:q?y(q[0].replace(e,c)):c});return U(o),X}}function H(){var z=[];b(z);for(var j;j=_();)j!==!1&&(z.push(j),b(z));return z}return $(),H()}function y(w){return w?w.replace(s,c):c}return Lt=d,Lt}var tr;function No(){if(tr)return Le;tr=1;var e=Le&&Le.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.default=n;const t=e(jo());function n(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,t.default)(r),s=typeof i=="function";return o.forEach(a=>{if(a.type!=="declaration")return;const{property:u,value:f}=a;s?i(u,f,a):f&&(l=l||{},l[u]=f)}),l}return Le}var Je={},nr;function _o(){if(nr)return Je;nr=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},o=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},a=function(u,f){return f===void 0&&(f={}),l(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(t,o))};return Je.camelCase=a,Je}var Ye,rr;function Po(){if(rr)return Ye;rr=1;var e=Ye&&Ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(No()),n=_o();function r(i,l){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,a){s&&a&&(o[(0,n.camelCase)(s,l)]=a)}),o}return r.default=r,Ye=r,Ye}var zo=Po();const Lo=Hr(zo),ri=ii("end"),bn=ii("start");function ii(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 Do(e){const t=bn(e),n=ri(e);if(t&&n)return{start:t,end:n}}function Ze(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ir(e.position):"start"in e||"end"in e?ir(e):"line"in e||"column"in e?on(e):""}function on(e){return lr(e&&e.line)+":"+lr(e&&e.column)}function ir(e){return on(e&&e.start)+"-"+on(e&&e.end)}function lr(e){return e&&typeof e=="number"?e:1}class Z extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Ze(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Z.prototype.file="";Z.prototype.name="";Z.prototype.reason="";Z.prototype.message="";Z.prototype.stack="";Z.prototype.column=void 0;Z.prototype.line=void 0;Z.prototype.ancestors=void 0;Z.prototype.cause=void 0;Z.prototype.fatal=void 0;Z.prototype.place=void 0;Z.prototype.ruleId=void 0;Z.prototype.source=void 0;const wn={}.hasOwnProperty,Fo=new Map,Mo=/[A-Z]/g,Oo=new Set(["table","tbody","thead","tfoot","tr"]),Ro=new Set(["td","th"]),li="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Bo(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=Yo(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=Jo(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?kn:Io,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=oi(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function oi(e,t,n){if(t.type==="element")return $o(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Uo(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return qo(e,t,n);if(t.type==="mdxjsEsm")return Ho(e,t);if(t.type==="root")return Vo(e,t,n);if(t.type==="text")return Wo(e,t)}function $o(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=kn,e.schema=i),e.ancestors.push(t);const l=ai(e,t.tagName,!1),o=Xo(e,t);let s=Cn(e,t);return Oo.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!xo(a):!0})),si(e,o,l,t),Sn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Uo(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rt(e,t.position)}function Ho(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rt(e,t.position)}function qo(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=kn,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:ai(e,t.name,!0),o=Go(e,t),s=Cn(e,t);return si(e,o,l,t),Sn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Vo(e,t,n){const r={};return Sn(r,Cn(e,t)),e.create(t,e.Fragment,r,n)}function Wo(e,t){return t.value}function si(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Sn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Jo(e,t,n){return r;function r(i,l,o,s){const u=Array.isArray(o.children)?n:t;return s?u(l,o,s):u(l,o)}}function Yo(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=bn(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function Xo(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&wn.call(t.properties,i)){const l=Ko(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Ro.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Go(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else rt(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else rt(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Cn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Fo;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;o=a+"-"+u,i.set(a,u+1)}}const s=oi(e,l,o);s!==void 0&&n.push(s)}return n}function Ko(e,t,n){const r=Eo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fo(n):To(n)),r.property==="style"){let i=typeof n=="object"?n:Zo(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Qo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?wo[r.property]||r.property:r.attribute,n]}}function Zo(e,t){try{return Lo(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Z("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=li+"#cannot-parse-style-attribute",i}}function ai(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=Gn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=Gn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return wn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rt(e)}function rt(e,t){const n=new Z("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=li+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Qo(e){const t={};let n;for(n in e)wn.call(e,n)&&(t[es(n)]=e[n]);return t}function es(e){let t=e.replace(Mo,ts);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ts(e){return"-"+e.toLowerCase()}const Dt={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"]},ns={};function En(e,t){const n=ns,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ui(e,r,i)}function ui(e,t,n){if(rs(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 or(e.children,t,n)}return Array.isArray(e)?or(e,t,n):""}function or(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ui(e[i],t,n);return r.join("")}function rs(e){return!!(e&&typeof e=="object")}const sr=document.createElement("i");function An(e){const t="&"+e+";";sr.innerHTML=t;const n=sr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ie(e,t,n,r){const i=e.length;let l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const ar={}.hasOwnProperty;function ci(e){const t={};let n=-1;for(;++n<e.length;)is(t,e[n]);return t}function is(e,t){let n;for(n in t){const i=(ar.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){ar.call(i,o)||(i[o]=[]);const s=l[o];ls(i[o],Array.isArray(s)?s:s?[s]:[])}}}function ls(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ie(e,0,0,r)}function fi(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Q=Ee(/[A-Za-z]/),K=Ee(/[\dA-Za-z]/),os=Ee(/[#-'*+\--9=?A-Z^-~]/);function Et(e){return e!==null&&(e<32||e===127)}const sn=Ee(/\d/),ss=Ee(/[\dA-Fa-f]/),as=Ee(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function M(e){return e===-2||e===-1||e===32}const Tt=Ee(new RegExp("\\p{P}|\\p{S}","u")),je=Ee(/\s/);function Ee(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function He(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function B(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(a){return M(a)?(e.enter(n),s(a)):t(a)}function s(a){return M(a)&&l++<i?(e.consume(a),s):(e.exit(n),t(a))}}const us={tokenize:cs};function cs(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),B(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return P(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}const fs={tokenize:ps},ur={tokenize:hs};function ps(e){const t=this,n=[];let r=0,i,l,o;return s;function s(E){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,a,u)(E)}return u(E)}function a(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const T=t.events.length;let L=T,S;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){S=t.events[L][1].end;break}k(r);let O=T;for(;O<t.events.length;)t.events[O][1].end={...S},O++;return ie(t.events,L+1,0,t.events.slice(T)),t.events.length=O,u(E)}return s(E)}function u(E){if(r===n.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return d(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ur,f,c)(E)}function f(E){return i&&A(),k(r),h(E)}function c(E){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,d(E)}function h(E){return t.containerState={},e.attempt(ur,p,d)(E)}function p(E){return r++,n.push([t.currentConstruct,t.containerState]),h(E)}function d(E){if(E===null){i&&A(),k(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),y(E)}function y(E){if(E===null){w(e.exit("chunkFlow"),!0),k(0),e.consume(E);return}return P(E)?(e.consume(E),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(E),y)}function w(E,T){const L=t.sliceStream(E);if(T&&L.push(null),E.previous=l,l&&(l.next=E),l=E,i.defineSkip(E.start),i.write(L),t.parser.lazy[E.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const O=t.events.length;let U=O,$,b;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if($){b=t.events[U][1].end;break}$=!0}for(k(r),S=O;S<t.events.length;)t.events[S][1].end={...b},S++;ie(t.events,U+1,0,t.events.slice(O)),t.events.length=S}}function k(E){let T=n.length;for(;T-- >E;){const L=n[T];t.containerState=L[1],L[0].exit.call(t,e)}n.length=E}function A(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hs(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Oe(e){if(e===null||W(e)||je(e))return 1;if(Tt(e))return 2}function jt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const an={name:"attention",resolveAll:ms,tokenize:ds};function ms(e,t){let n=-1,r,i,l,o,s,a,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[n][1].start};cr(c,-a),cr(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=le(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=le(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",l,t]]),u=le(u,jt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=le(u,[["exit",l,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=le(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ie(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ds(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oe(r);let l;return o;function o(a){return l=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===l)return e.consume(a),s;const u=e.exit("attentionSequence"),f=Oe(a),c=!f||f===2&&i||n.includes(a),h=!i||i===2&&f||n.includes(r);return u._open=!!(l===42?c:c&&(i||!h)),u._close=!!(l===42?h:h&&(f||!c)),t(a)}}function cr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gs={name:"autolink",tokenize:xs};function xs(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return Q(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||K(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||K(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Et(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),f):os(p)?(e.consume(p),u):n(p)}function f(p){return K(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||K(p))&&r++<63){const d=p===45?h:c;return e.consume(p),d}return n(p)}}const ft={partial:!0,tokenize:ys};function ys(e,t,n){return r;function r(l){return M(l)?B(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||P(l)?t(l):n(l)}}const pi={continuation:{tokenize:bs},exit:ws,name:"blockQuote",tokenize:ks};function ks(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return M(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function bs(e,t,n){const r=this;return i;function i(o){return M(o)?B(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(pi,t,n)(o)}}function ws(e){e.exit("blockQuote")}const hi={name:"characterEscape",tokenize:Ss};function Ss(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return as(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const mi={name:"characterReference",tokenize:Cs};function Cs(e,t,n){const r=this;let i=0,l,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a}function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=K,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=ss,f):(e.enter("characterReferenceValue"),l=7,o=sn,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return o===K&&!An(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),f):n(c)}}const fr={partial:!0,tokenize:As},pr={concrete:!0,name:"codeFenced",tokenize:Es};function Es(e,t,n){const r=this,i={partial:!0,tokenize:L};let l=0,o=0,s;return a;function a(S){return u(S)}function u(S){const O=r.events[r.events.length-1];return l=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===s?(o++,e.consume(S),f):o<3?n(S):(e.exit("codeFencedFenceSequence"),M(S)?B(e,c,"whitespace")(S):c(S))}function c(S){return S===null||P(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(fr,y,T)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||P(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(S)):M(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),B(e,p,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),h)}function p(S){return S===null||P(S)?c(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===null||P(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(S)):S===96&&S===s?n(S):(e.consume(S),d)}function y(S){return e.attempt(i,T,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),k}function k(S){return l>0&&M(S)?B(e,A,"linePrefix",l+1)(S):A(S)}function A(S){return S===null||P(S)?e.check(fr,y,T)(S):(e.enter("codeFlowValue"),E(S))}function E(S){return S===null||P(S)?(e.exit("codeFlowValue"),A(S)):(e.consume(S),E)}function T(S){return e.exit("codeFenced"),t(S)}function L(S,O,U){let $=0;return b;function b(j){return S.enter("lineEnding"),S.consume(j),S.exit("lineEnding"),N}function N(j){return S.enter("codeFencedFence"),M(j)?B(S,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):_(j)}function _(j){return j===s?(S.enter("codeFencedFenceSequence"),H(j)):U(j)}function H(j){return j===s?($++,S.consume(j),H):$>=o?(S.exit("codeFencedFenceSequence"),M(j)?B(S,z,"whitespace")(j):z(j)):U(j)}function z(j){return j===null||P(j)?(S.exit("codeFencedFence"),O(j)):U(j)}}}function As(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Ft={name:"codeIndented",tokenize:Is},vs={partial:!0,tokenize:Ts};function Is(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),B(e,l,"linePrefix",5)(u)}function l(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?a(u):P(u)?e.attempt(vs,o,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||P(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function Ts(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):B(e,l,"linePrefix",5)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):P(o)?i(o):n(o)}}const js={name:"codeText",previous:_s,resolve:Ns,tokenize:Ps};function Ns(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function _s(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ps(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):P(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||P(c)?(e.exit("codeTextData"),a(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(l.type="codeTextData",u(c))}}class zs{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Xe(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xe(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xe(this.left,n.reverse())}}}function Xe(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function di(e){const t={};let n=-1,r,i,l,o,s,a,u;const f=new zs(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ls(f,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Ls(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,a=[],u={};let f,c,h=-1,p=n,d=0,y=0;const w=[y];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(y=h+1,w.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),h=w.length;h--;){const k=s.slice(w[h],w[h+1]),A=l.pop();a.push([A,A+k.length-1]),e.splice(A,2,k)}for(a.reverse(),h=-1;++h<a.length;)u[d+a[h][0]]=d+a[h][1],d+=a[h][1]-a[h][0]-1;return u}const Ds={resolve:Ms,tokenize:Os},Fs={partial:!0,tokenize:Rs};function Ms(e){return di(e),e}function Os(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):P(s)?e.check(Fs,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Rs(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),B(e,l,"linePrefix")}function l(o){if(o===null||P(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function gi(e,t,n,r,i,l,o,s,a){const u=a||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(k),e.exit(l),h):k===null||k===32||k===41||Et(k)?n(k):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(k))}function h(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(s),h(k)):k===null||k===60||P(k)?n(k):(e.consume(k),k===92?d:p)}function d(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function y(k){return!f&&(k===null||k===41||W(k))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(k)):f<u&&k===40?(e.consume(k),f++,y):k===41?(e.consume(k),f--,y):k===null||k===32||k===40||Et(k)?n(k):(e.consume(k),k===92?w:y)}function w(k){return k===40||k===41||k===92?(e.consume(k),y):y(k)}}function xi(e,t,n,r,i,l){const o=this;let s=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):P(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||P(p)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),a||(a=!M(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function yi(e,t,n,r,i,l){let o;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,a):n(h)}function a(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),a(o)):h===null?n(h):P(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),B(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||P(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===o||h===92?(e.consume(h),f):f(h)}}function Qe(e,t){let n;return r;function r(i){return P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):M(i)?B(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Bs={name:"definition",tokenize:Us},$s={partial:!0,tokenize:Hs};function Us(e,t,n){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return xi.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return W(p)?Qe(e,u)(p):u(p)}function u(p){return gi(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt($s,c,c)(p)}function c(p){return M(p)?B(e,h,"whitespace")(p):h(p)}function h(p){return p===null||P(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Hs(e,t,n){return r;function r(s){return W(s)?Qe(e,i)(s):n(s)}function i(s){return yi(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return M(s)?B(e,o,"whitespace")(s):o(s)}function o(s){return s===null||P(s)?t(s):n(s)}}const qs={name:"hardBreakEscape",tokenize:Vs};function Vs(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return P(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const Ws={name:"headingAtx",resolve:Js,tokenize:Ys};function Js(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function Ys(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||W(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||P(f)?(e.exit("atxHeading"),t(f)):M(f)?B(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||W(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const Xs=["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"],hr=["pre","script","style","textarea"],Gs={concrete:!0,name:"htmlFlow",resolveTo:Qs,tokenize:ea},Ks={partial:!0,tokenize:na},Zs={partial:!0,tokenize:ta};function Qs(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 ea(e,t,n){const r=this;let i,l,o,s,a;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),h):x===47?(e.consume(x),l=!0,y):x===63?(e.consume(x),i=3,r.interrupt?t:g):Q(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function h(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,d):Q(x)?(e.consume(x),i=4,r.interrupt?t:g):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:g):n(x)}function d(x){const ae="CDATA[";return x===ae.charCodeAt(s++)?(e.consume(x),s===ae.length?r.interrupt?t:_:d):n(x)}function y(x){return Q(x)?(e.consume(x),o=String.fromCharCode(x),w):n(x)}function w(x){if(x===null||x===47||x===62||W(x)){const ae=x===47,Ae=o.toLowerCase();return!ae&&!l&&hr.includes(Ae)?(i=1,r.interrupt?t(x):_(x)):Xs.includes(o.toLowerCase())?(i=6,ae?(e.consume(x),k):r.interrupt?t(x):_(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):l?A(x):E(x))}return x===45||K(x)?(e.consume(x),o+=String.fromCharCode(x),w):n(x)}function k(x){return x===62?(e.consume(x),r.interrupt?t:_):n(x)}function A(x){return M(x)?(e.consume(x),A):b(x)}function E(x){return x===47?(e.consume(x),b):x===58||x===95||Q(x)?(e.consume(x),T):M(x)?(e.consume(x),E):b(x)}function T(x){return x===45||x===46||x===58||x===95||K(x)?(e.consume(x),T):L(x)}function L(x){return x===61?(e.consume(x),S):M(x)?(e.consume(x),L):E(x)}function S(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),a=x,O):M(x)?(e.consume(x),S):U(x)}function O(x){return x===a?(e.consume(x),a=null,$):x===null||P(x)?n(x):(e.consume(x),O)}function U(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||W(x)?L(x):(e.consume(x),U)}function $(x){return x===47||x===62||M(x)?E(x):n(x)}function b(x){return x===62?(e.consume(x),N):n(x)}function N(x){return x===null||P(x)?_(x):M(x)?(e.consume(x),N):n(x)}function _(x){return x===45&&i===2?(e.consume(x),q):x===60&&i===1?(e.consume(x),X):x===62&&i===4?(e.consume(x),se):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),me):P(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ks,de,H)(x)):x===null||P(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),_)}function H(x){return e.check(Zs,z,de)(x)}function z(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),j}function j(x){return x===null||P(x)?H(x):(e.enter("htmlFlowData"),_(x))}function q(x){return x===45?(e.consume(x),g):_(x)}function X(x){return x===47?(e.consume(x),o="",oe):_(x)}function oe(x){if(x===62){const ae=o.toLowerCase();return hr.includes(ae)?(e.consume(x),se):_(x)}return Q(x)&&o.length<8?(e.consume(x),o+=String.fromCharCode(x),oe):_(x)}function me(x){return x===93?(e.consume(x),g):_(x)}function g(x){return x===62?(e.consume(x),se):x===45&&i===2?(e.consume(x),g):_(x)}function se(x){return x===null||P(x)?(e.exit("htmlFlowData"),de(x)):(e.consume(x),se)}function de(x){return e.exit("htmlFlow"),t(x)}}function ta(e,t,n){const r=this;return i;function i(o){return P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function na(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ft,t,n)}}const ra={name:"htmlText",tokenize:ia};function ia(e,t,n){const r=this;let i,l,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),a}function a(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),L):g===63?(e.consume(g),E):Q(g)?(e.consume(g),U):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),l=0,d):Q(g)?(e.consume(g),A):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function c(g){return g===null?n(g):g===45?(e.consume(g),h):P(g)?(o=c,X(g)):(e.consume(g),c)}function h(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?q(g):g===45?h(g):c(g)}function d(g){const se="CDATA[";return g===se.charCodeAt(l++)?(e.consume(g),l===se.length?y:d):n(g)}function y(g){return g===null?n(g):g===93?(e.consume(g),w):P(g)?(o=y,X(g)):(e.consume(g),y)}function w(g){return g===93?(e.consume(g),k):y(g)}function k(g){return g===62?q(g):g===93?(e.consume(g),k):y(g)}function A(g){return g===null||g===62?q(g):P(g)?(o=A,X(g)):(e.consume(g),A)}function E(g){return g===null?n(g):g===63?(e.consume(g),T):P(g)?(o=E,X(g)):(e.consume(g),E)}function T(g){return g===62?q(g):E(g)}function L(g){return Q(g)?(e.consume(g),S):n(g)}function S(g){return g===45||K(g)?(e.consume(g),S):O(g)}function O(g){return P(g)?(o=O,X(g)):M(g)?(e.consume(g),O):q(g)}function U(g){return g===45||K(g)?(e.consume(g),U):g===47||g===62||W(g)?$(g):n(g)}function $(g){return g===47?(e.consume(g),q):g===58||g===95||Q(g)?(e.consume(g),b):P(g)?(o=$,X(g)):M(g)?(e.consume(g),$):q(g)}function b(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),b):N(g)}function N(g){return g===61?(e.consume(g),_):P(g)?(o=N,X(g)):M(g)?(e.consume(g),N):$(g)}function _(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,H):P(g)?(o=_,X(g)):M(g)?(e.consume(g),_):(e.consume(g),z)}function H(g){return g===i?(e.consume(g),i=void 0,j):g===null?n(g):P(g)?(o=H,X(g)):(e.consume(g),H)}function z(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||W(g)?$(g):(e.consume(g),z)}function j(g){return g===47||g===62||W(g)?$(g):n(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function X(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),oe}function oe(g){return M(g)?B(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):me(g)}function me(g){return e.enter("htmlTextData"),o(g)}}const vn={name:"labelEnd",resolveAll:aa,resolveTo:ua,tokenize:ca},la={tokenize:fa},oa={tokenize:pa},sa={tokenize:ha};function aa(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ie(e,0,e.length,n),e}function ua(e,t){let n=e.length,r=0,i,l,o,s;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,t],["enter",u,t]],s=le(s,e.slice(l+1,l+r+3)),s=le(s,[["enter",f,t]]),s=le(s,jt(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),s=le(s,[["exit",f,t],e[o-2],e[o-1],["exit",u,t]]),s=le(s,e.slice(o+1)),s=le(s,[["exit",a,t]]),ie(e,l,e.length,s),e}function ca(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return s;function s(h){return l?l._inactive?c(h):(o=r.parser.defined.includes(fe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(la,f,o?f:c)(h):h===91?e.attempt(oa,f,o?u:c)(h):o?f(h):c(h)}function u(h){return e.attempt(sa,f,c)(h)}function f(h){return t(h)}function c(h){return l._balanced=!0,n(h)}}function fa(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return W(c)?Qe(e,l)(c):l(c)}function l(c){return c===41?f(c):gi(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return W(c)?Qe(e,a)(c):f(c)}function s(c){return n(c)}function a(c){return c===34||c===39||c===40?yi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return W(c)?Qe(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function pa(e,t,n){const r=this;return i;function i(s){return xi.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function ha(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const ma={name:"labelStartImage",resolveAll:vn.resolveAll,tokenize:da};function da(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),l}function l(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ga={name:"labelStartLink",resolveAll:vn.resolveAll,tokenize:xa};function xa(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Mt={name:"lineEnding",tokenize:ya};function ya(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,t,"linePrefix")}}const kt={name:"thematicBreak",tokenize:ka};function ka(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||P(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),M(u)?B(e,s,"whitespace")(u):s(u))}}const ee={continuation:{tokenize:Ca},exit:Aa,name:"list",tokenize:Sa},ba={partial:!0,tokenize:va},wa={partial:!0,tokenize:Ea};function Sa(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const d=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:sn(p)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(kt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return sn(p)&&++o<10?(e.consume(p),a):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ft,r.interrupt?n:f,e.attempt(ba,h,c))}function f(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function c(p){return M(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ca(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ft,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!M(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wa,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Ea(e,t,n){const r=this;return B(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function Aa(e){e.exit(this.containerState.type)}function va(e,t,n){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!M(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const mr={name:"setextUnderline",resolveTo:Ia,tokenize:Ta};function Ia(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function Ta(e,t,n){const r=this;let i;return l;function l(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),M(u)?B(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||P(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const ja={tokenize:Na};function Na(e){const t=this,n=e.attempt(ft,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ds,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _a={resolveAll:bi()},Pa=ki("string"),za=ki("text");function ki(e){return{resolveAll:bi(e==="text"?La:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(f){return u(f)?l(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),a}function a(f){return u(f)?(n.exit("data"),l(f)):(n.consume(f),a)}function u(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function bi(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function La(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let l=i.length,o=-1,s=0,a;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)a=!0,s++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||a||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Da={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:pi},Fa={91:Bs},Ma={[-2]:Ft,[-1]:Ft,32:Ft},Oa={35:Ws,42:kt,45:[mr,kt],60:Gs,61:mr,95:kt,96:pr,126:pr},Ra={38:mi,92:hi},Ba={[-5]:Mt,[-4]:Mt,[-3]:Mt,33:ma,38:mi,42:an,60:[gs,ra],91:ga,92:[qs,hi],93:vn,95:an,96:js},$a={null:[an,_a]},Ua={null:[42,95]},Ha={null:[]},qa=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ua,contentInitial:Fa,disable:Ha,document:Da,flow:Oa,flowInitial:Ma,insideSpan:$a,string:Ra,text:Ba},Symbol.toStringTag,{value:"Module"}));function Va(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let o=[],s=[];const a={attempt:O(L),check:O(S),consume:A,enter:E,exit:T,interrupt:O(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:d,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function c(N){return o=le(o,N),w(),o[o.length-1]!==null?[]:(U(t,0),u.events=jt(l,u.events,u),u.events)}function h(N,_){return Ja(p(N),_)}function p(N){return Wa(o,N)}function d(){const{_bufferIndex:N,_index:_,line:H,column:z,offset:j}=r;return{_bufferIndex:N,_index:_,line:H,column:z,offset:j}}function y(N){i[N.line]=N.column,b()}function w(){let N;for(;r._index<o.length;){const _=o[r._index];if(typeof _=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<_.length;)k(_.charCodeAt(r._bufferIndex));else k(_)}}function k(N){f=f(N)}function A(N){P(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,b()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function E(N,_){const H=_||{};return H.type=N,H.start=d(),u.events.push(["enter",H,u]),s.push(H),H}function T(N){const _=s.pop();return _.end=d(),u.events.push(["exit",_,u]),_}function L(N,_){U(N,_.from)}function S(N,_){_.restore()}function O(N,_){return H;function H(z,j,q){let X,oe,me,g;return Array.isArray(z)?de(z):"tokenize"in z?de([z]):se(z);function se(G){return qe;function qe(be){const _e=be!==null&&G[be],Pe=be!==null&&G.null,ht=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return de(ht)(be)}}function de(G){return X=G,oe=0,G.length===0?q:x(G[oe])}function x(G){return qe;function qe(be){return g=$(),me=G,G.partial||(u.currentConstruct=G),G.name&&u.parser.constructs.disable.null.includes(G.name)?Ae():G.tokenize.call(_?Object.assign(Object.create(u),_):u,a,ae,Ae)(be)}}function ae(G){return N(me,g),j}function Ae(G){return g.restore(),++oe<X.length?x(X[oe]):q}}}function U(N,_){N.resolveAll&&!l.includes(N)&&l.push(N),N.resolve&&ie(u.events,_,u.events.length-_,N.resolve(u.events.slice(_),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function $(){const N=d(),_=u.previous,H=u.currentConstruct,z=u.events.length,j=Array.from(s);return{from:z,restore:q};function q(){r=N,u.previous=_,u.currentConstruct=H,u.events.length=z,s=j,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Wa(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Ja(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
50
50
|
`;break}case-3:{o=`\r
|
|
51
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function Xa(e){const r={constructs:ci([Va,...(e||{}).extensions||[]]),content:i(cs),defined:[],document:i(ps),flow:i(Na),lazy:{},string:i(za),text:i(La)};return r;function i(l){return o;function o(s){return Wa(r,l,s)}}}function Ga(e){for(;!di(e););return e}const dr=/[\0\t\n\r]/g;function Ka(){let e=1,t="",n=!0,r;return i;function i(l,o,s){const a=[];let u,f,c,h,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(dr.lastIndex=c,u=dr.exec(l),h=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(h),!u){t=l.slice(c);break}if(p===10&&c===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<h&&(a.push(l.slice(c,h)),e+=h-c),p){case 0:{a.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,a.push(-2);e++<f;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const Za=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qa(e){return e.replace(Za,eu)}function eu(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return fi(n.slice(l?2:1),l?16:10)}return En(n)||e}const wi={}.hasOwnProperty;function tu(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),nu(n)(Ga(Xa(n).document().write(Ka()(e,t,!0))))}function nu(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(qn),autolinkProtocol:$,autolinkEmail:$,atxHeading:l($n),blockQuote:l(Pe),characterEscape:$,characterReference:$,codeFenced:l(ht),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(ht,o),codeText:l(pl,o),codeTextData:$,data:$,codeFlowValue:$,definition:l(hl),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(ml),hardBreakEscape:l(Un),hardBreakTrailing:l(Un),htmlFlow:l(Hn,o),htmlFlowData:$,htmlText:l(Hn,o),htmlTextData:$,image:l(dl),label:o,link:l(qn),listItem:l(gl),listItemValue:h,listOrdered:l(Vn,c),listUnordered:l(Vn),paragraph:l(xl),reference:x,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l($n),strong:l(yl),thematicBreak:l(bl)},exit:{atxHeading:a(),atxHeadingSequence:L,autolink:a(),autolinkEmail:_e,autolinkProtocol:be,blockQuote:a(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:G,characterReference:qe,codeFenced:a(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:b,codeIndented:a(k),codeText:a(j),codeTextData:b,data:b,definition:a(),definitionDestinationString:T,definitionLabelString:E,definitionTitleString:v,emphasis:a(),hardBreakEscape:a(_),hardBreakTrailing:a(_),htmlFlow:a(H),htmlFlowData:b,htmlText:a(z),htmlTextData:b,image:a(X),label:me,labelText:oe,lineEnding:N,link:a(q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ae,resourceDestinationString:g,resourceTitleString:se,resource:de,setextHeading:a(U),setextHeadingLineSequence:O,setextHeadingText:S,strong:a(),thematicBreak:a()}};Si(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(C){let I={type:"root",children:[]};const D={stack:[I],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:f,data:n},R=[];let V=-1;for(;++V<C.length;)if(C[V][1].type==="listOrdered"||C[V][1].type==="listUnordered")if(C[V][0]==="enter")R.push(V);else{const ue=R.pop();V=i(C,ue,V)}for(V=-1;++V<C.length;){const ue=t[C[V][0]];wi.call(ue,C[V][1].type)&&ue[C[V][1].type].call(Object.assign({sliceSerialize:C[V][2].sliceSerialize},D),C[V][1])}if(D.tokenStack.length>0){const ue=D.tokenStack[D.tokenStack.length-1];(ue[1]||gr).call(D,void 0,ue[0])}for(I.position={start:we(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:we(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)I=t.transforms[V](I)||I;return I}function i(C,I,D){let R=I-1,V=-1,ue=!1,Ae,ge,Ve,We;for(;++R<=D;){const ne=C[R];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,We=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Ae&&!We&&!V&&!Ve&&(Ve=R),We=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:We=void 0}if(!V&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||V===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(Ae){let ze=R;for(ge=void 0;ze--;){const xe=C[ze];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;ge&&(C[ge][1].type="lineEndingBlank",ue=!0),xe[1].type="lineEnding",ge=ze}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}Ve&&(!ge||Ve<ge)&&(Ae._spread=!0),Ae.end=Object.assign({},ge?C[ge][1].start:ne[1].end),C.splice(ge||R,0,["exit",Ae,ne[2]]),R++,D++}if(ne[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Ae=ze,C.splice(R,0,["enter",ze,ne[2]]),R++,D++,Ve=void 0,We=!0}}}return C[I][1]._spread=ue,D}function l(C,I){return D;function D(R){s.call(this,C(R),R),I&&I.call(this,R)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(C,I,D){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([I,D||void 0]),C.position={start:we(I.start),end:void 0}}function a(C){return I;function I(D){C&&C.call(this,D),u.call(this,D)}}function u(C,I){const D=this.stack.pop(),R=this.tokenStack.pop();if(R)R[0].type!==C.type&&(I?I.call(this,C,R[0]):(R[1]||gr).call(this,C,R[0]));else throw new Error("Cannot close `"+C.type+"` ("+Ze({start:C.start,end:C.end})+"): it’s not open");D.position.end=we(C.end)}function f(){return vn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(C){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),I=this.stack[this.stack.length-1];I.lang=C}function d(){const C=this.resume(),I=this.stack[this.stack.length-1];I.meta=C}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C.replace(/(\r?\n|\r)$/g,"")}function E(C){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(C)).toLowerCase()}function v(){const C=this.resume(),I=this.stack[this.stack.length-1];I.title=C}function T(){const C=this.resume(),I=this.stack[this.stack.length-1];I.url=C}function L(C){const I=this.stack[this.stack.length-1];if(!I.depth){const D=this.sliceSerialize(C).length;I.depth=D}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function O(C){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function $(C){const D=this.stack[this.stack.length-1].children;let R=D[D.length-1];(!R||R.type!=="text")&&(R=kl(),R.position={start:we(C.start),end:void 0},D.push(R)),this.stack.push(R)}function b(C){const I=this.stack.pop();I.value+=this.sliceSerialize(C),I.position.end=we(C.end)}function N(C){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=I.children[I.children.length-1];D.position.end=we(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&($.call(this,C),b.call(this,C))}function _(){this.data.atHardBreak=!0}function H(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function z(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function j(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function q(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=I,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function X(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=I,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function oe(C){const I=this.sliceSerialize(C),D=this.stack[this.stack.length-2];D.label=Qa(I),D.identifier=fe(I).toLowerCase()}function me(){const C=this.stack[this.stack.length-1],I=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const R=C.children;D.children=R}else D.alt=I}function g(){const C=this.resume(),I=this.stack[this.stack.length-1];I.url=C}function se(){const C=this.resume(),I=this.stack[this.stack.length-1];I.title=C}function de(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ae(C){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function Ee(C){this.data.characterReferenceType=C.type}function G(C){const I=this.sliceSerialize(C),D=this.data.characterReferenceType;let R;D?(R=fi(I,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):R=En(I);const V=this.stack[this.stack.length-1];V.value+=R}function qe(C){const I=this.stack.pop();I.position.end=we(C.end)}function be(C){b.call(this,C);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(C)}function _e(C){b.call(this,C);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(C)}function Pe(){return{type:"blockquote",children:[]}}function ht(){return{type:"code",lang:null,meta:null,value:""}}function pl(){return{type:"inlineCode",value:""}}function hl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ml(){return{type:"emphasis",children:[]}}function $n(){return{type:"heading",depth:0,children:[]}}function Un(){return{type:"break"}}function Hn(){return{type:"html",value:""}}function dl(){return{type:"image",title:null,url:"",alt:null}}function qn(){return{type:"link",title:null,url:"",children:[]}}function Vn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function gl(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function xl(){return{type:"paragraph",children:[]}}function yl(){return{type:"strong",children:[]}}function kl(){return{type:"text",value:""}}function bl(){return{type:"thematicBreak"}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function Si(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Si(e,r):ru(e,r)}}function ru(e,t){let n;for(n in t)if(wi.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 gr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ze({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is still open")}function iu(e){const t=this;t.parser=n;function n(r){return tu(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function lu(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 ou(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
52
|
-
`}]}function
|
|
53
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function
|
|
51
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function Ya(e){const r={constructs:ci([qa,...(e||{}).extensions||[]]),content:i(us),defined:[],document:i(fs),flow:i(ja),lazy:{},string:i(Pa),text:i(za)};return r;function i(l){return o;function o(s){return Va(r,l,s)}}}function Xa(e){for(;!di(e););return e}const dr=/[\0\t\n\r]/g;function Ga(){let e=1,t="",n=!0,r;return i;function i(l,o,s){const a=[];let u,f,c,h,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(dr.lastIndex=c,u=dr.exec(l),h=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(h),!u){t=l.slice(c);break}if(p===10&&c===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<h&&(a.push(l.slice(c,h)),e+=h-c),p){case 0:{a.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,a.push(-2);e++<f;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const Ka=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Za(e){return e.replace(Ka,Qa)}function Qa(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return fi(n.slice(l?2:1),l?16:10)}return An(n)||e}const wi={}.hasOwnProperty;function eu(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),tu(n)(Xa(Ya(n).document().write(Ga()(e,t,!0))))}function tu(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(qn),autolinkProtocol:$,autolinkEmail:$,atxHeading:l($n),blockQuote:l(Pe),characterEscape:$,characterReference:$,codeFenced:l(ht),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(ht,o),codeText:l(pl,o),codeTextData:$,data:$,codeFlowValue:$,definition:l(hl),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(ml),hardBreakEscape:l(Un),hardBreakTrailing:l(Un),htmlFlow:l(Hn,o),htmlFlowData:$,htmlText:l(Hn,o),htmlTextData:$,image:l(dl),label:o,link:l(qn),listItem:l(gl),listItemValue:h,listOrdered:l(Vn,c),listUnordered:l(Vn),paragraph:l(xl),reference:x,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l($n),strong:l(yl),thematicBreak:l(bl)},exit:{atxHeading:a(),atxHeadingSequence:L,autolink:a(),autolinkEmail:_e,autolinkProtocol:be,blockQuote:a(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:Ae,characterReferenceMarkerNumeric:Ae,characterReferenceValue:G,characterReference:qe,codeFenced:a(w),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:b,codeIndented:a(k),codeText:a(j),codeTextData:b,data:b,definition:a(),definitionDestinationString:T,definitionLabelString:A,definitionTitleString:E,emphasis:a(),hardBreakEscape:a(_),hardBreakTrailing:a(_),htmlFlow:a(H),htmlFlowData:b,htmlText:a(z),htmlTextData:b,image:a(X),label:me,labelText:oe,lineEnding:N,link:a(q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ae,resourceDestinationString:g,resourceTitleString:se,resource:de,setextHeading:a(U),setextHeadingLineSequence:O,setextHeadingText:S,strong:a(),thematicBreak:a()}};Si(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(C){let I={type:"root",children:[]};const D={stack:[I],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:f,data:n},R=[];let V=-1;for(;++V<C.length;)if(C[V][1].type==="listOrdered"||C[V][1].type==="listUnordered")if(C[V][0]==="enter")R.push(V);else{const ue=R.pop();V=i(C,ue,V)}for(V=-1;++V<C.length;){const ue=t[C[V][0]];wi.call(ue,C[V][1].type)&&ue[C[V][1].type].call(Object.assign({sliceSerialize:C[V][2].sliceSerialize},D),C[V][1])}if(D.tokenStack.length>0){const ue=D.tokenStack[D.tokenStack.length-1];(ue[1]||gr).call(D,void 0,ue[0])}for(I.position={start:we(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:we(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<t.transforms.length;)I=t.transforms[V](I)||I;return I}function i(C,I,D){let R=I-1,V=-1,ue=!1,ve,ge,Ve,We;for(;++R<=D;){const ne=C[R];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,We=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(ve&&!We&&!V&&!Ve&&(Ve=R),We=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:We=void 0}if(!V&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||V===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(ve){let ze=R;for(ge=void 0;ze--;){const xe=C[ze];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;ge&&(C[ge][1].type="lineEndingBlank",ue=!0),xe[1].type="lineEnding",ge=ze}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}Ve&&(!ge||Ve<ge)&&(ve._spread=!0),ve.end=Object.assign({},ge?C[ge][1].start:ne[1].end),C.splice(ge||R,0,["exit",ve,ne[2]]),R++,D++}if(ne[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};ve=ze,C.splice(R,0,["enter",ze,ne[2]]),R++,D++,Ve=void 0,We=!0}}}return C[I][1]._spread=ue,D}function l(C,I){return D;function D(R){s.call(this,C(R),R),I&&I.call(this,R)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(C,I,D){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([I,D||void 0]),C.position={start:we(I.start),end:void 0}}function a(C){return I;function I(D){C&&C.call(this,D),u.call(this,D)}}function u(C,I){const D=this.stack.pop(),R=this.tokenStack.pop();if(R)R[0].type!==C.type&&(I?I.call(this,C,R[0]):(R[1]||gr).call(this,C,R[0]));else throw new Error("Cannot close `"+C.type+"` ("+Ze({start:C.start,end:C.end})+"): it’s not open");D.position.end=we(C.end)}function f(){return En(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(C){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),I=this.stack[this.stack.length-1];I.lang=C}function d(){const C=this.resume(),I=this.stack[this.stack.length-1];I.meta=C}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C.replace(/(\r?\n|\r)$/g,"")}function A(C){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(C)).toLowerCase()}function E(){const C=this.resume(),I=this.stack[this.stack.length-1];I.title=C}function T(){const C=this.resume(),I=this.stack[this.stack.length-1];I.url=C}function L(C){const I=this.stack[this.stack.length-1];if(!I.depth){const D=this.sliceSerialize(C).length;I.depth=D}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function O(C){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function $(C){const D=this.stack[this.stack.length-1].children;let R=D[D.length-1];(!R||R.type!=="text")&&(R=kl(),R.position={start:we(C.start),end:void 0},D.push(R)),this.stack.push(R)}function b(C){const I=this.stack.pop();I.value+=this.sliceSerialize(C),I.position.end=we(C.end)}function N(C){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=I.children[I.children.length-1];D.position.end=we(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&($.call(this,C),b.call(this,C))}function _(){this.data.atHardBreak=!0}function H(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function z(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function j(){const C=this.resume(),I=this.stack[this.stack.length-1];I.value=C}function q(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=I,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function X(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=I,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function oe(C){const I=this.sliceSerialize(C),D=this.stack[this.stack.length-2];D.label=Za(I),D.identifier=fe(I).toLowerCase()}function me(){const C=this.stack[this.stack.length-1],I=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const R=C.children;D.children=R}else D.alt=I}function g(){const C=this.resume(),I=this.stack[this.stack.length-1];I.url=C}function se(){const C=this.resume(),I=this.stack[this.stack.length-1];I.title=C}function de(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ae(C){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=fe(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function Ae(C){this.data.characterReferenceType=C.type}function G(C){const I=this.sliceSerialize(C),D=this.data.characterReferenceType;let R;D?(R=fi(I,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):R=An(I);const V=this.stack[this.stack.length-1];V.value+=R}function qe(C){const I=this.stack.pop();I.position.end=we(C.end)}function be(C){b.call(this,C);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(C)}function _e(C){b.call(this,C);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(C)}function Pe(){return{type:"blockquote",children:[]}}function ht(){return{type:"code",lang:null,meta:null,value:""}}function pl(){return{type:"inlineCode",value:""}}function hl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ml(){return{type:"emphasis",children:[]}}function $n(){return{type:"heading",depth:0,children:[]}}function Un(){return{type:"break"}}function Hn(){return{type:"html",value:""}}function dl(){return{type:"image",title:null,url:"",alt:null}}function qn(){return{type:"link",title:null,url:"",children:[]}}function Vn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function gl(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function xl(){return{type:"paragraph",children:[]}}function yl(){return{type:"strong",children:[]}}function kl(){return{type:"text",value:""}}function bl(){return{type:"thematicBreak"}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function Si(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Si(e,r):nu(e,r)}}function nu(e,t){let n;for(n in t)if(wi.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 gr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ze({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is still open")}function ru(e){const t=this;t.parser=n;function n(r){return eu(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function iu(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function lu(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
52
|
+
`}]}function ou(e,t){const n=t.value?t.value+`
|
|
53
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function su(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function au(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uu(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=He(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function cu(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fu(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ci(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function pu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ci(e,t);const i={src:He(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function hu(e,t){const n={src:He(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function mu(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function du(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ci(e,t);const i={href:He(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function gu(e,t){const n={href:He(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xu(e,t,n){const r=e.all(t),i=n?yu(n):Ei(t),l={},o=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
|
|
54
54
|
`}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&o.push({type:"text",value:`
|
|
55
|
-
`});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)}function
|
|
55
|
+
`});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)}function yu(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ei(n[r])}return t}function Ei(e){const t=e.spread;return t??e.children.length>1}function ku(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function bu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wu(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Su(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=bn(t.children[1]),a=ri(t.children[t.children.length-1]);s&&a&&(o.position={start:s,end:a}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Eu(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const c=t.children[a],h={},p=o?o[a]:void 0;p&&(h.align=p);let d={type:"element",tagName:l,properties:h,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),u.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Au(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const xr=9,yr=32;function vu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(kr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(kr(t.slice(i),i>0,!1)),l.join("")}function kr(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===xr||l===yr;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===xr||l===yr;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Iu(e,t){const n={type:"text",value:vu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Tu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ju={blockquote:iu,break:lu,code:ou,delete:su,emphasis:au,footnoteReference:uu,heading:cu,html:fu,imageReference:pu,image:hu,inlineCode:mu,linkReference:du,link:gu,listItem:xu,list:ku,paragraph:bu,root:wu,strong:Su,table:Cu,tableCell:Au,tableRow:Eu,text:Iu,thematicBreak:Tu,toml:mt,yaml:mt,definition:mt,footnoteDefinition:mt};function mt(){}const Ai=-1,Nt=0,et=1,At=2,In=3,Tn=4,jn=5,Nn=6,vi=7,Ii=8,br=typeof self=="object"?self:globalThis,Nu=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case Nt:case Ai:return n(o,i);case et:{const s=n([],i);for(const a of o)s.push(r(a));return s}case At:{const s=n({},i);for(const[a,u]of o)s[r(a)]=r(u);return s}case In:return n(new Date(o),i);case Tn:{const{source:s,flags:a}=o;return n(new RegExp(s,a),i)}case jn:{const s=n(new Map,i);for(const[a,u]of o)s.set(r(a),r(u));return s}case Nn:{const s=n(new Set,i);for(const a of o)s.add(r(a));return s}case vi:{const{name:s,message:a}=o;return n(new br[s](a),i)}case Ii:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}}return n(new br[l](o),i)};return r},wr=e=>Nu(new Map,e)(0),De="",{toString:_u}={},{keys:Pu}=Object,Ge=e=>{const t=typeof e;if(t!=="object"||!e)return[Nt,t];const n=_u.call(e).slice(8,-1);switch(n){case"Array":return[et,De];case"Object":return[At,De];case"Date":return[In,De];case"RegExp":return[Tn,De];case"Map":return[jn,De];case"Set":return[Nn,De];case"DataView":return[et,n]}return n.includes("Array")?[et,n]:n.includes("Error")?[vi,n]:[At,n]},dt=([e,t])=>e===Nt&&(t==="function"||t==="symbol"),zu=(e,t,n,r)=>{const i=(o,s)=>{const a=r.push(o)-1;return n.set(s,a),a},l=o=>{if(n.has(o))return n.get(o);let[s,a]=Ge(o);switch(s){case Nt:{let f=o;switch(a){case"bigint":s=Ii,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([Ai],o)}return i([s,f],o)}case et:{if(a){let h=o;return a==="DataView"?h=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(o)),i([a,[...h]],o)}const f=[],c=i([s,f],o);for(const h of o)f.push(l(h));return c}case At:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const f=[],c=i([s,f],o);for(const h of Pu(o))(e||!dt(Ge(o[h])))&&f.push([l(h),l(o[h])]);return c}case In:return i([s,o.toISOString()],o);case Tn:{const{source:f,flags:c}=o;return i([s,{source:f,flags:c}],o)}case jn:{const f=[],c=i([s,f],o);for(const[h,p]of o)(e||!(dt(Ge(h))||dt(Ge(p))))&&f.push([l(h),l(p)]);return c}case Nn:{const f=[],c=i([s,f],o);for(const h of o)(e||!dt(Ge(h)))&&f.push(l(h));return c}}const{message:u}=o;return i([s,{name:a,message:u}],o)};return l},Sr=(e,{json:t,lossy:n}={})=>{const r=[];return zu(!(t||n),!!t,new Map,r)(e),r},vt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?wr(Sr(e,t)):structuredClone(e):(e,t)=>wr(Sr(e,t));function Lu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Du(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Fu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Lu,r=e.options.footnoteBackLabel||Du,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[a]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=He(c.toLowerCase());let p=0;const d=[],y=e.footnoteCounts.get(c);for(;y!==void 0&&++p<=y;){d.length>0&&d.push({type:"text",value:" "});let A=typeof n=="string"?n:n(a,p);typeof A=="string"&&(A={type:"text",value:A}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const A=w.children[w.children.length-1];A&&A.type==="text"?A.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...d)}else f.push(...d);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...vt(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
56
56
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
57
|
-
`}]}}const _t=(function(e){if(e==null)return
|
|
57
|
+
`}]}}const _t=(function(e){if(e==null)return Bu;if(typeof e=="function")return Pt(e);if(typeof e=="object")return Array.isArray(e)?Mu(e):Ou(e);if(typeof e=="string")return Ru(e);throw new Error("Expected function, string, or object as test")});function Mu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_t(e[n]);return Pt(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Ou(e){const t=e;return Pt(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Ru(e){return Pt(t);function t(n){return n&&n.type===e}}function Pt(e){return t;function t(n,r,i){return!!($u(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Bu(){return!0}function $u(e){return e!==null&&typeof e=="object"&&"type"in e}const Ti=[],Uu=!0,un=!1,Hu="skip";function ji(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=_t(i),o=r?-1:1;s(e,void 0,[])();function s(a,u,f){const c=a&&typeof a=="object"?a:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(a.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Ti,d,y,w;if((!t||l(a,u,f[f.length-1]||void 0))&&(p=qu(n(a,f)),p[0]===un))return p;if("children"in a&&a.children){const k=a;if(k.children&&p[0]!==Hu)for(y=(r?k.children.length:-1)+o,w=f.concat(k);y>-1&&y<k.children.length;){const A=k.children[y];if(d=s(A,y,w)(),d[0]===un)return d;y=typeof d[1]=="number"?d[1]:y+o}}return p}}}function qu(e){return Array.isArray(e)?e:typeof e=="number"?[Uu,e]:e==null?Ti:[e]}function _n(e,t,n,r){let i,l,o;typeof t=="function"&&typeof n!="function"?(l=void 0,o=t,i=n):(l=t,o=n,i=r),ji(e,l,s,i);function s(a,u){const f=u[u.length-1],c=f?f.children.indexOf(a):void 0;return o(a,c,f)}}const cn={}.hasOwnProperty,Vu={};function Wu(e,t){const n=t||Vu,r=new Map,i=new Map,l=new Map,o={...ju,...n.handlers},s={all:u,applyData:Yu,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:a,options:n,patch:Ju,wrap:Gu};return _n(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,h=String(f.identifier).toUpperCase();c.has(h)||c.set(h,f)}}),s;function a(f,c){const h=f.type,p=s.handlers[h];if(cn.call(s.handlers,h)&&p)return p(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in f){const{children:y,...w}=f,k=vt(w);return k.children=s.all(f),k}return vt(f)}return(s.options.unknownHandler||Xu)(s,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const d=s.one(h[p],f);if(d){if(p&&h[p-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=Cr(d.value)),!Array.isArray(d)&&d.type==="element")){const y=d.children[0];y&&y.type==="text"&&(y.value=Cr(y.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c}}function Ju(e,t){e.position&&(t.position=Do(e))}function Yu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,vt(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Xu(e,t){const n=t.data||{},r="value"in t&&!(cn.call(n,"hProperties")||cn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Gu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
58
58
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
59
59
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
60
|
-
`}),n}function Cr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function
|
|
61
|
-
`},i),l}function Zu(e,t){return e&&"run"in e?async function(n,r){const i=vr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return vr(n,{file:r,...e||t})}}function Er(e){if(e)throw e}var Ot,Ar;function Qu(){if(Ar)return Ot;Ar=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},l=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},o=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Ot=function a(){var u,f,c,h,p,d,y=arguments[0],w=1,k=arguments.length,E=!1;for(typeof y=="boolean"&&(E=y,y=arguments[1]||{},w=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});w<k;++w)if(u=arguments[w],u!=null)for(f in u)c=s(y,f),h=s(u,f),y!==h&&(E&&h&&(l(h)||(p=i(h)))?(p?(p=!1,d=c&&i(c)?c:[]):d=c&&l(c)?c:{},o(y,{name:f,newValue:a(E,d,h)})):typeof h<"u"&&o(y,{name:f,newValue:h}));return y},Ot}var ec=Qu();const Rt=Hr(ec);function fn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function tc(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(a,...u){const f=e[++l];let c=-1;if(a){o(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?nc(f,s)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function nc(e,t){let n;return r;function r(...o){const s=e.length>o.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const pe={basename:rc,dirname:ic,extname:lc,join:oc,sep:"/"};function rc(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pt(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ic(e){if(pt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function lc(e){pt(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function oc(...e){let t=-1,n;for(;++t<e.length;)pt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":sc(n)}function sc(e){pt(e);const t=e.codePointAt(0)===47;let n=ac(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ac(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const uc={cwd:cc};function cc(){return"/"}function pn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function fc(e){if(typeof e=="string")e=new URL(e);else if(!pn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return pc(e)}function pc(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Bt=["history","path","basename","stem","extname","dirname"];class Ni{constructor(t){let n;t?pn(t)?n={path:t}:typeof t=="string"||hc(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":uc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Bt.length;){const l=Bt[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Bt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?pe.basename(this.path):void 0}set basename(t){Ut(t,"basename"),$t(t,"basename"),this.path=pe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pe.dirname(this.path):void 0}set dirname(t){Ir(this.basename,"dirname"),this.path=pe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pe.extname(this.path):void 0}set extname(t){if($t(t,"extname"),Ir(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pn(t)&&(t=fc(t)),Ut(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pe.basename(this.path,this.extname):void 0}set stem(t){Ut(t,"stem"),$t(t,"stem"),this.path=pe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Z(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function $t(e,t){if(e&&e.includes(pe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pe.sep+"`")}function Ut(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ir(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function hc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const mc=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),dc={}.hasOwnProperty;class Pn extends mc{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=tc()}copy(){const t=new Pn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Vt("data",this.frozen),this.namespace[t]=n,this):dc.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Vt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=gt(t),r=this.parser||this.Parser;return Ht("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ht("process",this.parser||this.Parser),qt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=gt(t),a=r.parse(s);r.run(a,s,function(f,c,h){if(f||!c||!h)return u(f);const p=c,d=r.stringify(p,h);yc(d)?h.value=d:h.result=d,u(f,h)});function u(f,c){f||!c?o(f):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Ht("processSync",this.parser||this.Parser),qt("processSync",this.compiler||this.Compiler),this.process(t,i),jr("processSync","process",n),r;function i(l,o){n=!0,Er(l),r=o}}run(t,n,r){Tr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const a=gt(n);i.run(t,a,u);function u(f,c,h){const p=c||t;f?s(f):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),jr("runSync","run",r),i;function l(o,s){Er(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=gt(n),i=this.compiler||this.Compiler;return qt("stringify",i),Tr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Vt("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;a(f,c)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Rt(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];l(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,f){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...f]);else if(f.length>0){let[p,...d]=f;const y=r[h][1];fn(y)&&fn(p)&&(p=Rt(!0,y,p)),r[h]=[u,p,...d]}}}}const gc=new Pn().freeze();function Ht(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Vt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tr(e){if(!fn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gt(e){return xc(e)?e:new Ni(e)}function xc(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yc(e){return typeof e=="string"||kc(e)}function kc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Nr=[],_r={allowDangerousHtml:!0},wc=/^(https?|ircs?|mailto|xmpp)$/i,Sc=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Cc(e){const t=vc(e),n=Ec(e);return Ac(t.runSync(t.parse(n),n),e)}function vc(e){const t=e.rehypePlugins||Nr,n=e.remarkPlugins||Nr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._r}:_r;return gc().use(iu).use(n).use(Zu,r).use(t)}function Ec(e){const t=e.children||"",n=new Ni;return typeof t=="string"&&(n.value=t),n}function Ac(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||Ic;for(const f of Sc)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+bc+f.id,void 0);return _n(e,u),$o(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return o?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Dt)if(Object.hasOwn(Dt,p)&&Object.hasOwn(f.properties,p)){const d=f.properties[p],y=Dt[p];(y===null||y.includes(f.tagName))&&(f.properties[p]=a(String(d||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return s&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function Ic(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||wc.test(e.slice(0,t))?e:""}function Tc(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _i(e,t,n){const i=_t((n||{}).ignore||[]),l=jc(t);let o=-1;for(;++o<l.length;)ji(e,"text",s);function s(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],d=h?h.children:void 0;if(i(p,d?d.indexOf(p):void 0,h))return;h=p}if(h)return a(u,f)}function a(u,f){const c=f[f.length-1],h=l[o][0],p=l[o][1];let d=0;const w=c.children.indexOf(u);let k=!1,E=[];h.lastIndex=0;let v=h.exec(u.value);for(;v;){const T=v.index,L={index:v.index,input:v.input,stack:[...f,u]};let S=p(...v,L);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?h.lastIndex=T+1:(d!==T&&E.push({type:"text",value:u.value.slice(d,T)}),Array.isArray(S)?E.push(...S):S&&E.push(S),d=T+v[0].length,k=!0),!h.global)break;v=h.exec(u.value)}return k?(d<u.value.length&&E.push({type:"text",value:u.value.slice(d)}),c.children.splice(w,1,...E)):E=[u],w+E.length}}function jc(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Nc(i[0]),_c(i[1])])}return t}function Nc(e){return typeof e=="string"?new RegExp(Tc(e),"g"):e}function _c(e){return typeof e=="function"?e:function(){return e}}function Pc(e){_i(e,[/\r?\n|\r/g,zc])}function zc(){return{type:"break"}}function Lc(){return function(e){Pc(e)}}function Pr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Wt="phrasing",Jt=["autolink","link","image","label"];function Dc(){return{transforms:[Uc],enter:{literalAutolink:Mc,literalAutolinkEmail:Yt,literalAutolinkHttp:Yt,literalAutolinkWww:Yt},exit:{literalAutolink:$c,literalAutolinkEmail:Bc,literalAutolinkHttp:Oc,literalAutolinkWww:Rc}}}function Fc(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Wt,notInConstruct:Jt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Wt,notInConstruct:Jt},{character:":",before:"[ps]",after:"\\/",inConstruct:Wt,notInConstruct:Jt}]}}function Mc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yt(e){this.config.enter.autolinkProtocol.call(this,e)}function Oc(e){this.config.exit.autolinkProtocol.call(this,e)}function Rc(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Bc(e){this.config.exit.autolinkEmail.call(this,e)}function $c(e){this.exit(e)}function Uc(e){_i(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Hc],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qc]],{ignore:["link","linkReference"]})}function Hc(e,t,n,r,i){let l="";if(!Pi(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!Vc(n)))return!1;const o=Wc(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function qc(e,t,n,r){return!Pi(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Vc(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Wc(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Pr(e,"(");let l=Pr(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Pi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||je(n)||Tt(n))&&(!t||n!==47)}zi.peek=tf;function Jc(){this.buffer()}function Yc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Xc(){this.buffer()}function Gc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Kc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Zc(e){this.exit(e)}function Qc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ef(e){this.exit(e)}function tf(){return"["}function zi(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function nf(){return{enter:{gfmFootnoteCallString:Jc,gfmFootnoteCall:Yc,gfmFootnoteDefinitionLabelString:Xc,gfmFootnoteDefinition:Gc},exit:{gfmFootnoteCallString:Kc,gfmFootnoteCall:Zc,gfmFootnoteDefinitionLabelString:Qc,gfmFootnoteDefinition:ef}}}function rf(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:zi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let a=s.move("[^");const u=l.enter("footnoteDefinition"),f=l.enter("label");return a+=s.move(l.safe(l.associationId(r),{before:a,after:"]"})),f(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
|
|
62
|
-
`:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Li:
|
|
63
|
-
`)}function
|
|
64
|
-
`&&
|
|
65
|
-
`}function
|
|
60
|
+
`}),n}function Cr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Er(e,t){const n=Wu(e,t),r=n.one(e,void 0),i=Fu(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
61
|
+
`},i),l}function Ku(e,t){return e&&"run"in e?async function(n,r){const i=Er(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Er(n,{file:r,...e||t})}}function Ar(e){if(e)throw e}var Ot,vr;function Zu(){if(vr)return Ot;vr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},l=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},o=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Ot=function a(){var u,f,c,h,p,d,y=arguments[0],w=1,k=arguments.length,A=!1;for(typeof y=="boolean"&&(A=y,y=arguments[1]||{},w=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});w<k;++w)if(u=arguments[w],u!=null)for(f in u)c=s(y,f),h=s(u,f),y!==h&&(A&&h&&(l(h)||(p=i(h)))?(p?(p=!1,d=c&&i(c)?c:[]):d=c&&l(c)?c:{},o(y,{name:f,newValue:a(A,d,h)})):typeof h<"u"&&o(y,{name:f,newValue:h}));return y},Ot}var Qu=Zu();const Rt=Hr(Qu);function fn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ec(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(a,...u){const f=e[++l];let c=-1;if(a){o(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?tc(f,s)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function tc(e,t){let n;return r;function r(...o){const s=e.length>o.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const pe={basename:nc,dirname:rc,extname:ic,join:lc,sep:"/"};function nc(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pt(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function rc(e){if(pt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function ic(e){pt(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function lc(...e){let t=-1,n;for(;++t<e.length;)pt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":oc(n)}function oc(e){pt(e);const t=e.codePointAt(0)===47;let n=sc(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function sc(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ac={cwd:uc};function uc(){return"/"}function pn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function cc(e){if(typeof e=="string")e=new URL(e);else if(!pn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return fc(e)}function fc(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Bt=["history","path","basename","stem","extname","dirname"];class Ni{constructor(t){let n;t?pn(t)?n={path:t}:typeof t=="string"||pc(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ac.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Bt.length;){const l=Bt[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Bt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?pe.basename(this.path):void 0}set basename(t){Ut(t,"basename"),$t(t,"basename"),this.path=pe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pe.dirname(this.path):void 0}set dirname(t){Ir(this.basename,"dirname"),this.path=pe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pe.extname(this.path):void 0}set extname(t){if($t(t,"extname"),Ir(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pn(t)&&(t=cc(t)),Ut(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pe.basename(this.path,this.extname):void 0}set stem(t){Ut(t,"stem"),$t(t,"stem"),this.path=pe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Z(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function $t(e,t){if(e&&e.includes(pe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pe.sep+"`")}function Ut(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ir(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function pc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hc=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),mc={}.hasOwnProperty;class Pn extends hc{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ec()}copy(){const t=new Pn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Vt("data",this.frozen),this.namespace[t]=n,this):mc.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Vt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=gt(t),r=this.parser||this.Parser;return Ht("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ht("process",this.parser||this.Parser),qt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=gt(t),a=r.parse(s);r.run(a,s,function(f,c,h){if(f||!c||!h)return u(f);const p=c,d=r.stringify(p,h);xc(d)?h.value=d:h.result=d,u(f,h)});function u(f,c){f||!c?o(f):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Ht("processSync",this.parser||this.Parser),qt("processSync",this.compiler||this.Compiler),this.process(t,i),jr("processSync","process",n),r;function i(l,o){n=!0,Ar(l),r=o}}run(t,n,r){Tr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const a=gt(n);i.run(t,a,u);function u(f,c,h){const p=c||t;f?s(f):o?o(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),jr("runSync","run",r),i;function l(o,s){Ar(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=gt(n),i=this.compiler||this.Compiler;return qt("stringify",i),Tr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Vt("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;a(f,c)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Rt(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];l(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,f){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...f]);else if(f.length>0){let[p,...d]=f;const y=r[h][1];fn(y)&&fn(p)&&(p=Rt(!0,y,p)),r[h]=[u,p,...d]}}}}const dc=new Pn().freeze();function Ht(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Vt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tr(e){if(!fn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gt(e){return gc(e)?e:new Ni(e)}function gc(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function xc(e){return typeof e=="string"||yc(e)}function yc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Nr=[],_r={allowDangerousHtml:!0},bc=/^(https?|ircs?|mailto|xmpp)$/i,wc=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Sc(e){const t=Cc(e),n=Ec(e);return Ac(t.runSync(t.parse(n),n),e)}function Cc(e){const t=e.rehypePlugins||Nr,n=e.remarkPlugins||Nr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._r}:_r;return dc().use(ru).use(n).use(Ku,r).use(t)}function Ec(e){const t=e.children||"",n=new Ni;return typeof t=="string"&&(n.value=t),n}function Ac(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||vc;for(const f of wc)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+kc+f.id,void 0);return _n(e,u),Bo(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return o?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Dt)if(Object.hasOwn(Dt,p)&&Object.hasOwn(f.properties,p)){const d=f.properties[p],y=Dt[p];(y===null||y.includes(f.tagName))&&(f.properties[p]=a(String(d||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,h)),p&&h&&typeof c=="number")return s&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function vc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||bc.test(e.slice(0,t))?e:""}function Ic(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _i(e,t,n){const i=_t((n||{}).ignore||[]),l=Tc(t);let o=-1;for(;++o<l.length;)ji(e,"text",s);function s(u,f){let c=-1,h;for(;++c<f.length;){const p=f[c],d=h?h.children:void 0;if(i(p,d?d.indexOf(p):void 0,h))return;h=p}if(h)return a(u,f)}function a(u,f){const c=f[f.length-1],h=l[o][0],p=l[o][1];let d=0;const w=c.children.indexOf(u);let k=!1,A=[];h.lastIndex=0;let E=h.exec(u.value);for(;E;){const T=E.index,L={index:E.index,input:E.input,stack:[...f,u]};let S=p(...E,L);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?h.lastIndex=T+1:(d!==T&&A.push({type:"text",value:u.value.slice(d,T)}),Array.isArray(S)?A.push(...S):S&&A.push(S),d=T+E[0].length,k=!0),!h.global)break;E=h.exec(u.value)}return k?(d<u.value.length&&A.push({type:"text",value:u.value.slice(d)}),c.children.splice(w,1,...A)):A=[u],w+A.length}}function Tc(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([jc(i[0]),Nc(i[1])])}return t}function jc(e){return typeof e=="string"?new RegExp(Ic(e),"g"):e}function Nc(e){return typeof e=="function"?e:function(){return e}}function _c(e){_i(e,[/\r?\n|\r/g,Pc])}function Pc(){return{type:"break"}}function zc(){return function(e){_c(e)}}function Pr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Wt="phrasing",Jt=["autolink","link","image","label"];function Lc(){return{transforms:[$c],enter:{literalAutolink:Fc,literalAutolinkEmail:Yt,literalAutolinkHttp:Yt,literalAutolinkWww:Yt},exit:{literalAutolink:Bc,literalAutolinkEmail:Rc,literalAutolinkHttp:Mc,literalAutolinkWww:Oc}}}function Dc(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Wt,notInConstruct:Jt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Wt,notInConstruct:Jt},{character:":",before:"[ps]",after:"\\/",inConstruct:Wt,notInConstruct:Jt}]}}function Fc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yt(e){this.config.enter.autolinkProtocol.call(this,e)}function Mc(e){this.config.exit.autolinkProtocol.call(this,e)}function Oc(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Rc(e){this.config.exit.autolinkEmail.call(this,e)}function Bc(e){this.exit(e)}function $c(e){_i(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Uc],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Hc]],{ignore:["link","linkReference"]})}function Uc(e,t,n,r,i){let l="";if(!Pi(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!qc(n)))return!1;const o=Vc(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function Hc(e,t,n,r){return!Pi(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function qc(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Vc(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Pr(e,"(");let l=Pr(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Pi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||je(n)||Tt(n))&&(!t||n!==47)}zi.peek=ef;function Wc(){this.buffer()}function Jc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Yc(){this.buffer()}function Xc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Gc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Kc(e){this.exit(e)}function Zc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qc(e){this.exit(e)}function ef(){return"["}function zi(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function tf(){return{enter:{gfmFootnoteCallString:Wc,gfmFootnoteCall:Jc,gfmFootnoteDefinitionLabelString:Yc,gfmFootnoteDefinition:Xc},exit:{gfmFootnoteCallString:Gc,gfmFootnoteCall:Kc,gfmFootnoteDefinitionLabelString:Zc,gfmFootnoteDefinition:Qc}}}function nf(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:zi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let a=s.move("[^");const u=l.enter("footnoteDefinition"),f=l.enter("label");return a+=s.move(l.safe(l.associationId(r),{before:a,after:"]"})),f(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
|
|
62
|
+
`:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Li:rf))),u(),a}}function rf(e,t,n){return t===0?e:Li(e,t,n)}function Li(e,t,n){return(n?"":" ")+e}const lf=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Di.peek=cf;function of(){return{canContainEols:["delete"],enter:{strikethrough:af},exit:{strikethrough:uf}}}function sf(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lf}],handlers:{delete:Di}}}function af(e){this.enter({type:"delete",children:[]},e)}function uf(e){this.exit(e)}function Di(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function cf(){return"~"}function ff(e){return e.length}function pf(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ff,l=[],o=[],s=[],a=[];let u=0,f=-1;for(;++f<e.length;){const y=[],w=[];let k=-1;for(e[f].length>u&&(u=e[f].length);++k<e[f].length;){const A=hf(e[f][k]);if(n.alignDelimiters!==!1){const E=i(A);w[k]=E,(a[k]===void 0||E>a[k])&&(a[k]=E)}y.push(A)}o[f]=y,s[f]=w}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)l[c]=zr(r[c]);else{const y=zr(r);for(;++c<u;)l[c]=y}c=-1;const h=[],p=[];for(;++c<u;){const y=l[c];let w="",k="";y===99?(w=":",k=":"):y===108?w=":":y===114&&(k=":");let A=n.alignDelimiters===!1?1:Math.max(1,a[c]-w.length-k.length);const E=w+"-".repeat(A)+k;n.alignDelimiters!==!1&&(A=w.length+A+k.length,A>a[c]&&(a[c]=A),p[c]=A),h[c]=E}o.splice(1,0,h),s.splice(1,0,p),f=-1;const d=[];for(;++f<o.length;){const y=o[f],w=s[f];c=-1;const k=[];for(;++c<u;){const A=y[c]||"";let E="",T="";if(n.alignDelimiters!==!1){const L=a[c]-(w[c]||0),S=l[c];S===114?E=" ".repeat(L):S===99?L%2?(E=" ".repeat(L/2+.5),T=" ".repeat(L/2-.5)):(E=" ".repeat(L/2),T=E):T=" ".repeat(L)}n.delimiterStart!==!1&&!c&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||c)&&k.push(" "),n.alignDelimiters!==!1&&k.push(E),k.push(A),n.alignDelimiters!==!1&&k.push(T),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&k.push("|")}d.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return d.join(`
|
|
63
|
+
`)}function hf(e){return e==null?"":String(e)}function zr(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function mf(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),df);return i(),o}function df(e,t,n){return">"+(n?"":" ")+e}function gf(e,t){return Lr(e,t.inConstruct,!0)&&!Lr(e,t.notInConstruct,!1)}function Lr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Dr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
64
|
+
`&&gf(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
65
|
+
`}function xf(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>o&&(o=l):l=1,i=r+t.length,r=n.indexOf(t,i);return o}function yf(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function kf(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function bf(e,t,n,r){const i=kf(n),l=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(yf(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(l,wf);return c(),h}const s=n.createTracker(r),a=i.repeat(Math.max(xf(l,i)+1,3)),u=n.enter("codeFenced");let f=s.move(a);if(e.lang){const c=n.enter(`codeFencedLang${o}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${o}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
|
|
66
66
|
`,encode:["`"],...s.current()})),c()}return f+=s.move(`
|
|
67
67
|
`),l&&(f+=s.move(l+`
|
|
68
|
-
`)),f+=s.move(a),u(),f}function
|
|
69
|
-
`,...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),o(),u}function
|
|
68
|
+
`)),f+=s.move(a),u(),f}function wf(e,t,n){return(n?"":" ")+e}function zn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Sf(e,t,n,r){const i=zn(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
69
|
+
`,...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),o(),u}function Cf(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function it(e){return"&#x"+e.toString(16).toUpperCase()+";"}function It(e,t,n){const r=Oe(e),i=Oe(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Fi.peek=Ef;function Fi(e,t,n,r){const i=Cf(n),l=n.enter("emphasis"),o=n.createTracker(r),s=o.move(i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),f=It(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=it(u)+a.slice(1));const c=a.charCodeAt(a.length-1),h=It(r.after.charCodeAt(0),c,i);h.inside&&(a=a.slice(0,-1)+it(c));const p=o.move(i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},s+a+p}function Ef(e,t,n){return n.options.emphasis||"*"}function Af(e,t){let n=!1;return _n(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,un}),!!((!e.depth||e.depth<3)&&En(e)&&(t.options.setext||n))}function vf(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(Af(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...l.current(),before:`
|
|
70
70
|
`,after:`
|
|
71
71
|
`});return c(),f(),h+`
|
|
72
72
|
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
73
73
|
`))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),a=n.enter("phrasing");l.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
74
|
-
`,...l.current()});return/^[\t ]/.test(u)&&(u=it(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),a(),s(),u}Mi.peek=
|
|
75
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:a,tableRow:s}};function o(p,d,y,w){return u(f(p,y,w),p.align)}function s(p,d,y,w){const k=c(p,y,w),
|
|
76
|
-
`))}function a(p,d,y,w){const k=y.enter("tableCell"),E=y.enter("phrasing"),v=y.containerPhrasing(p,{...w,before:l,after:l});return E(),k(),v}function u(p,d){return hf(p,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function f(p,d,y){const w=p.children;let k=-1;const E=[],v=d.enter("table");for(;++k<w.length;)E[k]=c(w[k],d,y);return v(),E}function c(p,d,y){const w=p.children;let k=-1;const E=[],v=d.enter("tableRow");for(;++k<w.length;)E[k]=a(w[k],p,d,y);return v(),E}function h(p,d,y){let w=Wi.inlineCode(p,d,y);return y.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function ep(){return{exit:{taskListCheckValueChecked:Mr,taskListCheckValueUnchecked:Mr,paragraph:np}}}function tp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rp}}}function Mr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function np(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function rp(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let a=Wi.listItem(e,t,n,{...r,...s.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(f){return f+o}}function ip(){return[Dc(),nf(),sf(),Jf(),ep()]}function lp(e){return{extensions:[Fc(),rf(e),af(),Qf(e),tp()]}}const op={tokenize:pp,partial:!0},Ji={tokenize:hp,partial:!0},Yi={tokenize:mp,partial:!0},Xi={tokenize:dp,partial:!0},sp={tokenize:gp,partial:!0},Gi={name:"wwwAutolink",tokenize:cp,previous:Zi},Ki={name:"protocolAutolink",tokenize:fp,previous:Qi},ke={name:"emailAutolink",tokenize:up,previous:el},he={};function ap(){return{text:he}}let Ie=48;for(;Ie<123;)he[Ie]=ke,Ie++,Ie===58?Ie=65:Ie===91&&(Ie=97);he[43]=ke;he[45]=ke;he[46]=ke;he[95]=ke;he[72]=[ke,Ki];he[104]=[ke,Ki];he[87]=[ke,Gi];he[119]=[ke,Gi];function up(e,t,n){const r=this;let i,l;return o;function o(c){return!hn(c)||!el.call(r,r.previous)||Dn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return hn(c)?(e.consume(c),s):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(sp,f,u)(c):c===45||c===95||K(c)?(l=!0,e.consume(c),a):f(c)}function u(c){return e.consume(c),i=!0,a}function f(c){return l&&i&&Q(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function cp(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Zi.call(r,r.previous)||Dn(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(op,e.attempt(Ji,e.attempt(Yi,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function fp(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&Qi.call(r,r.previous)&&!Dn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Q(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),l?u:(l=!0,a)):n(c)}function u(c){return c===null||vt(c)||W(c)||je(c)||Tt(c)?n(c):e.attempt(Ji,e.attempt(Yi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function pp(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function hp(e,t,n){let r,i,l;return o;function o(u){return u===46||u===95?e.check(Xi,a,s)(u):u===null||W(u)||je(u)||u!==45&&Tt(u)?a(u):(l=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function a(u){return i||r||!l?n(u):t(u)}}function mp(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Xi,t,l)(o):o===null||W(o)||je(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function dp(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||W(s)||je(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||W(s)||je(s)?t(s):r(s)}function l(s){return Q(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Q(s)?(e.consume(s),o):n(s)}}function gp(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return K(l)?n(l):t(l)}}function Zi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Qi(e){return!Q(e)}function el(e){return!(e===47||hn(e))}function hn(e){return e===43||e===45||e===46||e===95||K(e)}function Dn(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 xp={tokenize:Ep,partial:!0};function yp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Sp,continuation:{tokenize:Cp},exit:vp}},text:{91:{name:"gfmFootnoteCall",tokenize:wp},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kp,resolveTo:bp}}}}function kp(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){o=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!o||!o._balanced)return n(a);const u=fe(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function bp(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function wp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a}function a(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(l>999||c===93&&!o||c===null||c===91||W(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(fe(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return W(c)||(o=!0),l++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,u):u(c)}}function Sp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return a;function a(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(o>999||d===93&&!s||d===null||d===91||W(d))return n(d);if(d===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return l=fe(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return W(d)||(s=!0),o++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,f):f(d)}function h(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(l)||i.push(l),B(e,p,"gfmFootnoteDefinitionWhitespace")):n(d)}function p(d){return t(d)}}function Cp(e,t,n){return e.check(ft,t,e.attempt(xp,t,n))}function vp(e){e.exit("gfmFootnoteDefinition")}function Ep(e,t,n){const r=this;return B(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function Ap(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let u=a;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[a][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[a][1].end)},c={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ie(h,h.length,0,jt(p,o.slice(u+1,a),s)),ie(h,h.length,0,[["exit",c,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",f,s]]),ie(o,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function l(o,s,a){const u=this.previous,f=this.events;let c=0;return h;function h(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?a(d):(o.enter("strikethroughSequenceTemporary"),p(d))}function p(d){const y=Oe(u);if(d===126)return c>1?a(d):(o.consume(d),c++,p);if(c<2&&!n)return a(d);const w=o.exit("strikethroughSequenceTemporary"),k=Oe(d);return w._open=!k||k===2&&!!y,w._close=!y||y===2&&!!k,s(d)}}}class Ip{constructor(){this.map=[]}add(t,n,r){Tp(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function Tp(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function jp(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Np(){return{flow:{null:{name:"table",tokenize:_p,resolveAll:Pp}}}}function _p(e,t,n){const r=this;let i=0,l=0,o;return s;function s(b){let N=r.events.length-1;for(;N>-1;){const z=r.events[N][1].type;if(z==="lineEnding"||z==="linePrefix")N--;else break}const _=N>-1?r.events[N][1].type:null,H=_==="tableHead"||_==="tableRow"?S:a;return H===S&&r.parser.lazy[r.now().line]?n(b):H(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(o=!0,l+=1),f(b)}function f(b){return b===null?n(b):P(b)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):M(b)?B(e,f,"whitespace")(b):(l+=1,o&&(o=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(b)))}function c(b){return b===null||b===124||W(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?h:c)}function h(b){return b===92||b===124?(e.consume(b),c):c(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),o=!1,M(b)?B(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):d(b))}function d(b){return b===45||b===58?w(b):b===124?(o=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),y):L(b)}function y(b){return M(b)?B(e,w,"whitespace")(b):w(b)}function w(b){return b===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),k):b===45?(l+=1,k(b)):b===null||P(b)?T(b):L(b)}function k(b){return b===45?(e.enter("tableDelimiterFiller"),E(b)):L(b)}function E(b){return b===45?(e.consume(b),E):b===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(b))}function v(b){return M(b)?B(e,T,"whitespace")(b):T(b)}function T(b){return b===124?d(b):b===null||P(b)?!o||i!==l?L(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):L(b)}function L(b){return n(b)}function S(b){return e.enter("tableRow"),O(b)}function O(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),O):b===null||P(b)?(e.exit("tableRow"),t(b)):M(b)?B(e,O,"whitespace")(b):(e.enter("data"),U(b))}function U(b){return b===null||b===124||W(b)?(e.exit("data"),O(b)):(e.consume(b),b===92?$:U)}function $(b){return b===92||b===124?(e.consume(b),U):U(b)}}function Pp(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,a=0,u,f,c;const h=new Ip;for(;++n<e.length;){const p=e[n],d=p[1];p[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Or(h,t,a,u,f),f=void 0,a=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",u,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",f,t]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=xt(h,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=xt(h,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):d.type==="tableHead"?(s=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,l[1]!==0?(o[0]=o[1],c=xt(h,t,l,i,n,c)):o[1]!==0&&(c=xt(h,t,o,i,n,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&Or(h,t,a,u,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=jp(t.events,n))}return e}function xt(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},Fe(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=Fe(t.events,n[1]);if(l={type:o,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=Fe(t.events,n[2]),f=Fe(t.events,n[3]),c={type:s,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,y=n[3]-n[2]-1;e.add(d,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},Fe(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Or(e,t,n,r,i){const l=[],o=Fe(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function Fe(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const zp={name:"tasklistCheck",tokenize:Dp};function Lp(){return{text:{91:zp}}}function Dp(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return W(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return P(a)?t(a):M(a)?e.check({tokenize:Fp},t,n)(a):n(a)}}function Fp(e,t,n){return B(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Mp(e){return ci([ap(),yp(),Ap(e),Np(),Lp()])}const Op={};function Rp(e){const t=this,n=e||Op,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Mp(n)),l.push(ip()),o.push(lp(n))}function lt({payload:e,disabled:t=!1,bypassEnabled:n=!1,onBypassChange:r,onSubmit:i}){const[l,o]=ce.useState(()=>n?Kl(e):e.questions.map(()=>[])),[s,a]=ce.useState(!1),[u,f]=ce.useState(!1);ce.useEffect(()=>{n&&o(d=>d.map((y,w)=>{var k;return y.length>0?y:(k=e.questions[w])!=null&&k.options.length?[0]:[]}))},[n,e]);const c=Zl(e,l)&&!t&&!s&&!u&&!!i,h=(d,y)=>{t||u||s||o(w=>w.map((k,E)=>{if(E!==d)return k;const v=e.questions[E];return v?v.multiSelect?k.includes(y)?k.filter(T=>T!==y):[...k,y].sort((T,L)=>T-L):[y]:k}))},p=async()=>{if(!c||!i)return;a(!0);const d=await i(Ql(e,l));a(!1),d&&f(!0)};return m.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-4 shadow-[0_24px_80px_-60px_hsl(var(--primary)/0.9)]",children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-primary/20 bg-primary/10 text-primary shadow-sm",children:m.jsx(Tl,{className:"h-4 w-4"})}),m.jsxs("div",{children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-primary/80",children:"Ask User Question"}),m.jsx("div",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:"Select the answer you want to send back to the agent."})]})]}),m.jsxs(wt,{type:"button",variant:n?"secondary":"outline",size:"sm",onClick:()=>r==null?void 0:r(!n),className:"rounded-sm",children:[m.jsx(Ml,{className:"h-4 w-4"}),n?"Bypass on":"Bypass future questions"]})]}),m.jsx("div",{className:"mt-4 space-y-4",children:e.questions.map((d,y)=>{const w=l[y]??[];return m.jsxs("div",{className:"space-y-3 rounded-lg border border-border/60 bg-background/75 p-4",children:[m.jsxs("div",{children:[d.header&&m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:d.header}),m.jsx("div",{className:"mt-1 text-sm font-medium leading-6 text-foreground",children:d.question}),m.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:d.multiSelect?"Select one or more options.":"Select one option."})]}),m.jsx("div",{className:"space-y-2",children:d.options.map((k,E)=>{const v=w.includes(E);return m.jsxs("button",{type:"button",onClick:()=>h(y,E),disabled:t||s||u,"aria-pressed":v,className:St("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors",v?"border-primary/50 bg-primary/10 text-foreground":"border-border/60 bg-background/80 text-foreground hover:border-primary/30 hover:bg-primary/5"),children:[m.jsx("span",{className:St("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",v?"border-primary bg-primary text-primary-foreground":"border-border/70 bg-background text-transparent"),children:m.jsx(Re,{className:"h-3.5 w-3.5"})}),m.jsxs("span",{className:"min-w-0",children:[m.jsx("span",{className:"block text-sm font-medium leading-5",children:k.label}),k.description&&m.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:k.description})]})]},`${k.label}-${E}`)})})]},`${d.header??"question"}-${y}`)})}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[m.jsx("div",{className:"text-xs text-muted-foreground",children:n?"Bypass is enabled. New question cards will default to the first option.":"Enable bypass if you want future question cards to preselect the first option."}),m.jsx(wt,{type:"button",onClick:()=>void p(),disabled:!c,className:"rounded-sm px-5",children:u?"Sent":s?"Sending...":e.questions.length>1?"Send answers":"Send answer"})]})]})}function Bp({payload:e,disabled:t=!1,onSubmit:n}){const[r,i]=ce.useState(null),[l,o]=ce.useState(!1),s=!t&&!l&&!!n,a=async u=>{if(!s||!n)return;i(u);const f=await n(io(e,u));i(null),f&&o(!0)};return m.jsxs("div",{className:"rounded-xl border border-amber-500/25 bg-amber-500/5 p-4 shadow-[0_24px_80px_-60px_rgba(245,158,11,0.8)]",children:[m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-amber-500/25 bg-amber-500/10 text-amber-600 shadow-sm dark:text-amber-400",children:m.jsx(Dl,{className:"h-4 w-4"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-amber-700/80 dark:text-amber-300/80",children:"Permission Request"}),m.jsx("div",{className:"mt-1 space-y-3",children:e.requests.map((u,f)=>m.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/75 px-4 py-3",children:[m.jsx("div",{className:"text-sm font-medium leading-6 text-foreground",children:u.summary}),(u.toolName||u.target)&&m.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:[m.jsx("span",{children:u.toolName}),u.target&&m.jsx("span",{className:"font-mono normal-case tracking-normal",children:u.target})]})]},`${u.toolUseId??u.toolName}-${f}`))})]})]}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-end gap-2",children:[m.jsxs(wt,{type:"button",variant:"outline",onClick:()=>void a("deny"),disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(qr,{className:"h-4 w-4"}),l?"Sent":r==="deny"?"Sending...":"Deny"]}),m.jsxs(wt,{type:"button",onClick:()=>void a("approve"),disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(Re,{className:"h-4 w-4"}),l?"Sent":r==="approve"?"Sending...":"Approve"]})]})]})}const Ke=6;function $p(e){return e.replace(/\s+/g," ").trim()}function Se(e,t=132){const n=$p(e);return n?n.length>t?`${n.slice(0,t-3)}...`:n:""}function mn(e,t=84){if(typeof e=="string")return Se(e,t);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){const n=e.slice(0,3).map(r=>mn(r,28)).filter(Boolean).join(", ");return Se(n||JSON.stringify(e),t)}if(typeof e=="object"&&e!==null){const n=Object.entries(e).slice(0,3).map(([r,i])=>`${r}: ${mn(i,32)}`).join(" · ");return Se(n||JSON.stringify(e),t)}return""}function tl(e){if(!e)return"No input";const t=Object.entries(e).slice(0,4).map(([n,r])=>`${n}: ${mn(r,40)}`).filter(n=>n.trim().length>0).join(" · ");return Se(t||JSON.stringify(e),156)||"No input"}function nl({expanded:e}){return m.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-sm px-1 py-0.5 text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground/70 transition-colors group-hover/activity:text-muted-foreground",children:[e?"Less":"More",e?m.jsx(Sl,{className:"h-2.5 w-2.5"}):m.jsx(Cl,{className:"h-2.5 w-2.5"})]})}function Fn({status:e}){const t=e==="failed"?"border-destructive/22 bg-destructive/9 text-destructive":e==="success"?"border-emerald-500/24 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300":"border-border/35 bg-muted/30 text-muted-foreground/58";return m.jsx("span",{className:`agent-activity-status-icon mt-0.5 inline-flex h-3 w-3 shrink-0 items-center justify-center rounded-full border ${t}`,"data-agent-activity-status":e,"aria-hidden":"true",children:e==="failed"?m.jsx(qr,{className:"h-2 w-2"}):e==="success"?m.jsx(Re,{className:"h-2 w-2"}):m.jsx(Wr,{className:"h-1 w-1 fill-current"})})}function rl(e){const t=typeof e.status=="string"?e.status.toLowerCase():"";if(e.is_error===!0||e.isError===!0||t==="failed"||t==="error")return"failed";const n=Rn(e).slice(0,160);return/\b(error|failed|exception|traceback)\b/i.test(n)?"failed":"success"}function Mn({title:e,preview:t,icon:n,children:r,accentClassName:i,status:l="success",previewClassName:o="font-mono text-[9px] leading-3 text-muted-foreground/78"}){const[s,a]=ce.useState(!1);return m.jsxs("div",{className:`overflow-hidden rounded-sm border border-border/18 shadow-none ${i}`,children:[m.jsxs("button",{type:"button",onClick:()=>a(u=>!u),className:"flex w-full items-start gap-1.5 px-2 py-1 text-left transition-colors hover:bg-background/24",children:[m.jsx(Fn,{status:l}),m.jsx("div",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:n}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:m.jsx("span",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:e})}),m.jsx("div",{className:`mt-0.5 whitespace-pre-wrap break-words ${o}`,children:t})]}),m.jsx(nl,{expanded:s})]}),s&&m.jsx("div",{className:"border-t border-border/18 px-2 py-1.5",children:r})]})}function il({text:e,status:t="success"}){const n=Se(e,156);return m.jsx(Mn,{title:"Thinking",preview:n,icon:m.jsx(Al,{className:"h-3 w-3"}),accentClassName:"bg-muted/22",status:t,previewClassName:"text-[9px] leading-3 text-muted-foreground/78",children:m.jsx("div",{className:"whitespace-pre-wrap text-[10px] leading-4 text-muted-foreground/82",children:e})})}function ll({block:e,status:t="success",renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=String(e.name??"tool"),a=e.input,u=at(e);if(u){const c=$e(u);return n!=null&&n.has(c)?null:(n==null||n.add(c),m.jsx(lt,{payload:u,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const f=tl(a);if(s==="TodoWrite"){const c=Vp(a==null?void 0:a.todos);if(c.length>0)return m.jsx(Wp,{todos:c,status:t})}return m.jsx(Mn,{title:`Tool: ${s}`,preview:f,icon:m.jsx(gn,{className:"h-3 w-3"}),accentClassName:"bg-muted/18",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:JSON.stringify(a??{},null,2)})})}function On({block:e,status:t=rl(e),renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=Rn(e);if(!s)return null;const a=ut(s);if(a){const f=$e(a);return n!=null&&n.has(f)?null:(n==null||n.add(f),m.jsx(lt,{payload:a,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const u=Se(s,156);return m.jsx(Mn,{title:"Result",preview:u,icon:m.jsx(gn,{className:"h-3 w-3"}),accentClassName:"bg-background/45",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:s})})}function Rn(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>String(n.text??"")).join(`
|
|
77
|
-
`):""}function
|
|
74
|
+
`,...l.current()});return/^[\t ]/.test(u)&&(u=it(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),a(),s(),u}Mi.peek=If;function Mi(e){return e.value||""}function If(){return"<"}Oi.peek=Tf;function Oi(e,t,n,r){const i=zn(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),u+=a.move(")"),o(),u}function Tf(){return"!"}Ri.peek=jf;function Ri(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const u=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function jf(){return"!"}Bi.peek=Nf;function Bi(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const o=n.unsafe[l],s=n.compilePattern(o);let a;if(o.atBreak)for(;a=s.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function Nf(){return"`"}function $i(e,t){const n=En(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))}Ui.peek=_f;function Ui(e,t,n,r){const i=zn(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,a;if($i(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let c=o.move("<");return c+=o.move(n.containerPhrasing(e,{before:c,after:">",...o.current()})),c+=o.move(">"),s(),n.stack=f,c}s=n.enter("link"),a=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${l}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),s(),u}function _f(e,t,n){return $i(e,n)?"<":"["}Hi.peek=Pf;function Hi(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=f,l(),i==="full"||!u||u!==c?a+=s.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Pf(){return"["}function Ln(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 zf(e){const t=Ln(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 Lf(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 qi(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 Df(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?Lf(n):Ln(n);const s=e.ordered?o==="."?")":".":zf(n);let a=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),qi(n)===o&&f){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(o=s),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),u}function Ff(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 Mf(e,t,n,r){const i=Ff(n);let l=n.bulletCurrent||Ln(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(o-l.length)),s.shift(o);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),f);return a(),u;function f(c,h,p){return h?(p?"":" ".repeat(o))+c:(p?l:l+" ".repeat(o-l.length))+c}}function Of(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}const Rf=_t(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Bf(e,t,n,r){return(e.children.some(function(o){return Rf(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function $f(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Vi.peek=Uf;function Vi(e,t,n,r){const i=$f(n),l=n.enter("strong"),o=n.createTracker(r),s=o.move(i+i);let a=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()}));const u=a.charCodeAt(0),f=It(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=it(u)+a.slice(1));const c=a.charCodeAt(a.length-1),h=It(r.after.charCodeAt(0),c,i);h.inside&&(a=a.slice(0,-1)+it(c));const p=o.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},s+a+p}function Uf(e,t,n){return n.options.strong||"*"}function Hf(e,t,n,r){return n.safe(e.value,r)}function qf(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 Vf(e,t,n){const r=(qi(n)+(n.options.ruleSpaces?" ":"")).repeat(qf(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wi={blockquote:mf,break:Dr,code:bf,definition:Sf,emphasis:Fi,hardBreak:Dr,heading:vf,html:Mi,image:Oi,imageReference:Ri,inlineCode:Bi,link:Ui,linkReference:Hi,list:Df,listItem:Mf,paragraph:Of,root:Bf,strong:Vi,text:Hf,thematicBreak:Vf};function Wf(){return{enter:{table:Jf,tableData:Fr,tableHeader:Fr,tableRow:Xf},exit:{codeText:Gf,table:Yf,tableData:Xt,tableHeader:Xt,tableRow:Xt}}}function Jf(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 Yf(e){this.exit(e),this.data.inTable=void 0}function Xf(e){this.enter({type:"tableRow",children:[]},e)}function Xt(e){this.exit(e)}function Fr(e){this.enter({type:"tableCell",children:[]},e)}function Gf(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Kf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Kf(e,t){return t==="|"?t:e}function Zf(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
75
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:a,tableRow:s}};function o(p,d,y,w){return u(f(p,y,w),p.align)}function s(p,d,y,w){const k=c(p,y,w),A=u([k]);return A.slice(0,A.indexOf(`
|
|
76
|
+
`))}function a(p,d,y,w){const k=y.enter("tableCell"),A=y.enter("phrasing"),E=y.containerPhrasing(p,{...w,before:l,after:l});return A(),k(),E}function u(p,d){return pf(p,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function f(p,d,y){const w=p.children;let k=-1;const A=[],E=d.enter("table");for(;++k<w.length;)A[k]=c(w[k],d,y);return E(),A}function c(p,d,y){const w=p.children;let k=-1;const A=[],E=d.enter("tableRow");for(;++k<w.length;)A[k]=a(w[k],p,d,y);return E(),A}function h(p,d,y){let w=Wi.inlineCode(p,d,y);return y.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function Qf(){return{exit:{taskListCheckValueChecked:Mr,taskListCheckValueUnchecked:Mr,paragraph:tp}}}function ep(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:np}}}function Mr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function tp(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function np(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);l&&s.move(o);let a=Wi.listItem(e,t,n,{...r,...s.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(f){return f+o}}function rp(){return[Lc(),tf(),of(),Wf(),Qf()]}function ip(e){return{extensions:[Dc(),nf(e),sf(),Zf(e),ep()]}}const lp={tokenize:fp,partial:!0},Ji={tokenize:pp,partial:!0},Yi={tokenize:hp,partial:!0},Xi={tokenize:mp,partial:!0},op={tokenize:dp,partial:!0},Gi={name:"wwwAutolink",tokenize:up,previous:Zi},Ki={name:"protocolAutolink",tokenize:cp,previous:Qi},ke={name:"emailAutolink",tokenize:ap,previous:el},he={};function sp(){return{text:he}}let Ie=48;for(;Ie<123;)he[Ie]=ke,Ie++,Ie===58?Ie=65:Ie===91&&(Ie=97);he[43]=ke;he[45]=ke;he[46]=ke;he[95]=ke;he[72]=[ke,Ki];he[104]=[ke,Ki];he[87]=[ke,Gi];he[119]=[ke,Gi];function ap(e,t,n){const r=this;let i,l;return o;function o(c){return!hn(c)||!el.call(r,r.previous)||Dn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return hn(c)?(e.consume(c),s):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(op,f,u)(c):c===45||c===95||K(c)?(l=!0,e.consume(c),a):f(c)}function u(c){return e.consume(c),i=!0,a}function f(c){return l&&i&&Q(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function up(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Zi.call(r,r.previous)||Dn(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(lp,e.attempt(Ji,e.attempt(Yi,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function cp(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&Qi.call(r,r.previous)&&!Dn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):n(c)}function s(c){if(Q(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),l?u:(l=!0,a)):n(c)}function u(c){return c===null||Et(c)||W(c)||je(c)||Tt(c)?n(c):e.attempt(Ji,e.attempt(Yi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function fp(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function pp(e,t,n){let r,i,l;return o;function o(u){return u===46||u===95?e.check(Xi,a,s)(u):u===null||W(u)||je(u)||u!==45&&Tt(u)?a(u):(l=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function a(u){return i||r||!l?n(u):t(u)}}function hp(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Xi,t,l)(o):o===null||W(o)||je(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function mp(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||W(s)||je(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||W(s)||je(s)?t(s):r(s)}function l(s){return Q(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Q(s)?(e.consume(s),o):n(s)}}function dp(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return K(l)?n(l):t(l)}}function Zi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Qi(e){return!Q(e)}function el(e){return!(e===47||hn(e))}function hn(e){return e===43||e===45||e===46||e===95||K(e)}function Dn(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 gp={tokenize:Ep,partial:!0};function xp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:wp,continuation:{tokenize:Sp},exit:Cp}},text:{91:{name:"gfmFootnoteCall",tokenize:bp},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yp,resolveTo:kp}}}}function yp(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){o=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!o||!o._balanced)return n(a);const u=fe(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function kp(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function bp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a}function a(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(l>999||c===93&&!o||c===null||c===91||W(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(fe(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return W(c)||(o=!0),l++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,u):u(c)}}function wp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return a;function a(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(o>999||d===93&&!s||d===null||d===91||W(d))return n(d);if(d===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return l=fe(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return W(d)||(s=!0),o++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,f):f(d)}function h(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(l)||i.push(l),B(e,p,"gfmFootnoteDefinitionWhitespace")):n(d)}function p(d){return t(d)}}function Sp(e,t,n){return e.check(ft,t,e.attempt(gp,t,n))}function Cp(e){e.exit("gfmFootnoteDefinition")}function Ep(e,t,n){const r=this;return B(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function Ap(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let u=a;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[a][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[a][1].end)},c={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ie(h,h.length,0,jt(p,o.slice(u+1,a),s)),ie(h,h.length,0,[["exit",c,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",f,s]]),ie(o,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function l(o,s,a){const u=this.previous,f=this.events;let c=0;return h;function h(d){return u===126&&f[f.length-1][1].type!=="characterEscape"?a(d):(o.enter("strikethroughSequenceTemporary"),p(d))}function p(d){const y=Oe(u);if(d===126)return c>1?a(d):(o.consume(d),c++,p);if(c<2&&!n)return a(d);const w=o.exit("strikethroughSequenceTemporary"),k=Oe(d);return w._open=!k||k===2&&!!y,w._close=!y||y===2&&!!k,s(d)}}}class vp{constructor(){this.map=[]}add(t,n,r){Ip(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function Ip(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Tp(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function jp(){return{flow:{null:{name:"table",tokenize:Np,resolveAll:_p}}}}function Np(e,t,n){const r=this;let i=0,l=0,o;return s;function s(b){let N=r.events.length-1;for(;N>-1;){const z=r.events[N][1].type;if(z==="lineEnding"||z==="linePrefix")N--;else break}const _=N>-1?r.events[N][1].type:null,H=_==="tableHead"||_==="tableRow"?S:a;return H===S&&r.parser.lazy[r.now().line]?n(b):H(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(o=!0,l+=1),f(b)}function f(b){return b===null?n(b):P(b)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):M(b)?B(e,f,"whitespace")(b):(l+=1,o&&(o=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(b)))}function c(b){return b===null||b===124||W(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?h:c)}function h(b){return b===92||b===124?(e.consume(b),c):c(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),o=!1,M(b)?B(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):d(b))}function d(b){return b===45||b===58?w(b):b===124?(o=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),y):L(b)}function y(b){return M(b)?B(e,w,"whitespace")(b):w(b)}function w(b){return b===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),k):b===45?(l+=1,k(b)):b===null||P(b)?T(b):L(b)}function k(b){return b===45?(e.enter("tableDelimiterFiller"),A(b)):L(b)}function A(b){return b===45?(e.consume(b),A):b===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(b))}function E(b){return M(b)?B(e,T,"whitespace")(b):T(b)}function T(b){return b===124?d(b):b===null||P(b)?!o||i!==l?L(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):L(b)}function L(b){return n(b)}function S(b){return e.enter("tableRow"),O(b)}function O(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),O):b===null||P(b)?(e.exit("tableRow"),t(b)):M(b)?B(e,O,"whitespace")(b):(e.enter("data"),U(b))}function U(b){return b===null||b===124||W(b)?(e.exit("data"),O(b)):(e.consume(b),b===92?$:U)}function $(b){return b===92||b===124?(e.consume(b),U):U(b)}}function _p(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,a=0,u,f,c;const h=new vp;for(;++n<e.length;){const p=e[n],d=p[1];p[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Or(h,t,a,u,f),f=void 0,a=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",u,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",f,t]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=xt(h,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=xt(h,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):d.type==="tableHead"?(s=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,l[1]!==0?(o[0]=o[1],c=xt(h,t,l,i,n,c)):o[1]!==0&&(c=xt(h,t,o,i,n,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&Or(h,t,a,u,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Tp(t.events,n))}return e}function xt(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},Fe(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=Fe(t.events,n[1]);if(l={type:o,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=Fe(t.events,n[2]),f=Fe(t.events,n[3]),c={type:s,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,y=n[3]-n[2]-1;e.add(d,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},Fe(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Or(e,t,n,r,i){const l=[],o=Fe(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function Fe(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Pp={name:"tasklistCheck",tokenize:Lp};function zp(){return{text:{91:Pp}}}function Lp(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return W(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return P(a)?t(a):M(a)?e.check({tokenize:Dp},t,n)(a):n(a)}}function Dp(e,t,n){return B(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Fp(e){return ci([sp(),xp(),Ap(e),jp(),zp()])}const Mp={};function Op(e){const t=this,n=e||Mp,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Fp(n)),l.push(rp()),o.push(ip(n))}function lt({payload:e,disabled:t=!1,bypassEnabled:n=!1,onBypassChange:r,onSubmit:i}){const[l,o]=ce.useState(()=>n?Gl(e):e.questions.map(()=>[])),[s,a]=ce.useState(!1),[u,f]=ce.useState(!1);ce.useEffect(()=>{n&&o(d=>d.map((y,w)=>{var k;return y.length>0?y:(k=e.questions[w])!=null&&k.options.length?[0]:[]}))},[n,e]);const c=Kl(e,l)&&!t&&!s&&!u&&!!i,h=(d,y)=>{t||u||s||o(w=>w.map((k,A)=>{if(A!==d)return k;const E=e.questions[A];return E?E.multiSelect?k.includes(y)?k.filter(T=>T!==y):[...k,y].sort((T,L)=>T-L):[y]:k}))},p=async()=>{if(!c||!i)return;a(!0);const d=await i(Zl(e,l));a(!1),d&&f(!0)};return m.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-4 shadow-[0_24px_80px_-60px_hsl(var(--primary)/0.9)]",children:[m.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-primary/20 bg-primary/10 text-primary shadow-sm",children:m.jsx(Il,{className:"h-4 w-4"})}),m.jsxs("div",{children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-primary/80",children:"Ask User Question"}),m.jsx("div",{className:"mt-1 text-sm leading-6 text-muted-foreground",children:"Select the answer you want to send back to the agent."})]})]}),m.jsxs(wt,{type:"button",variant:n?"secondary":"outline",size:"sm",onClick:()=>r==null?void 0:r(!n),className:"rounded-sm",children:[m.jsx(Fl,{className:"h-4 w-4"}),n?"Bypass on":"Bypass future questions"]})]}),m.jsx("div",{className:"mt-4 space-y-4",children:e.questions.map((d,y)=>{const w=l[y]??[];return m.jsxs("div",{className:"space-y-3 rounded-lg border border-border/60 bg-background/75 p-4",children:[m.jsxs("div",{children:[d.header&&m.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:d.header}),m.jsx("div",{className:"mt-1 text-sm font-medium leading-6 text-foreground",children:d.question}),m.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:d.multiSelect?"Select one or more options.":"Select one option."})]}),m.jsx("div",{className:"space-y-2",children:d.options.map((k,A)=>{const E=w.includes(A);return m.jsxs("button",{type:"button",onClick:()=>h(y,A),disabled:t||s||u,"aria-pressed":E,className:St("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors",E?"border-primary/50 bg-primary/10 text-foreground":"border-border/60 bg-background/80 text-foreground hover:border-primary/30 hover:bg-primary/5"),children:[m.jsx("span",{className:St("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",E?"border-primary bg-primary text-primary-foreground":"border-border/70 bg-background text-transparent"),children:m.jsx(Re,{className:"h-3.5 w-3.5"})}),m.jsxs("span",{className:"min-w-0",children:[m.jsx("span",{className:"block text-sm font-medium leading-5",children:k.label}),k.description&&m.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:k.description})]})]},`${k.label}-${A}`)})})]},`${d.header??"question"}-${y}`)})}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[m.jsx("div",{className:"text-xs text-muted-foreground",children:n?"Bypass is enabled. New question cards will default to the first option.":"Enable bypass if you want future question cards to preselect the first option."}),m.jsx(wt,{type:"button",onClick:()=>void p(),disabled:!c,className:"rounded-sm px-5",children:u?"Sent":s?"Sending...":e.questions.length>1?"Send answers":"Send answer"})]})]})}function Rp({payload:e,disabled:t=!1,onSubmit:n}){const[r,i]=ce.useState(null),[l,o]=ce.useState(!1),s=!t&&!l&&!!n,a=async u=>{if(!s||!n)return;i(u);const f=await n(ro(e,u));i(null),f&&o(!0)};return m.jsxs("div",{className:"rounded-xl border border-amber-500/25 bg-amber-500/5 p-4 shadow-[0_24px_80px_-60px_rgba(245,158,11,0.8)]",children:[m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-amber-500/25 bg-amber-500/10 text-amber-600 shadow-sm dark:text-amber-400",children:m.jsx(Ll,{className:"h-4 w-4"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-amber-700/80 dark:text-amber-300/80",children:"Permission Request"}),m.jsx("div",{className:"mt-1 space-y-3",children:e.requests.map((u,f)=>m.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/75 px-4 py-3",children:[m.jsx("div",{className:"text-sm font-medium leading-6 text-foreground",children:u.summary}),(u.toolName||u.target)&&m.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:[m.jsx("span",{children:u.toolName}),u.target&&m.jsx("span",{className:"font-mono normal-case tracking-normal",children:u.target})]})]},`${u.toolUseId??u.toolName}-${f}`))})]})]}),m.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-end gap-2",children:[m.jsxs(wt,{type:"button",variant:"outline",onClick:()=>void a("deny"),disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(qr,{className:"h-4 w-4"}),l?"Sent":r==="deny"?"Sending...":"Deny"]}),m.jsxs(wt,{type:"button",onClick:()=>void a("approve"),disabled:!s||r!==null,className:"rounded-sm",children:[m.jsx(Re,{className:"h-4 w-4"}),l?"Sent":r==="approve"?"Sending...":"Approve"]})]})]})}const Ke=6;function Bp(e){return e.replace(/\s+/g," ").trim()}function Se(e,t=132){const n=Bp(e);return n?n.length>t?`${n.slice(0,t-3)}...`:n:""}function mn(e,t=84){if(typeof e=="string")return Se(e,t);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){const n=e.slice(0,3).map(r=>mn(r,28)).filter(Boolean).join(", ");return Se(n||JSON.stringify(e),t)}if(typeof e=="object"&&e!==null){const n=Object.entries(e).slice(0,3).map(([r,i])=>`${r}: ${mn(i,32)}`).join(" · ");return Se(n||JSON.stringify(e),t)}return""}function tl(e){if(!e)return"No input";const t=Object.entries(e).slice(0,4).map(([n,r])=>`${n}: ${mn(r,40)}`).filter(n=>n.trim().length>0).join(" · ");return Se(t||JSON.stringify(e),156)||"No input"}function nl({expanded:e}){return m.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-sm px-1 py-0.5 text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground/70 transition-colors group-hover/activity:text-muted-foreground",children:[e?"Less":"More",e?m.jsx(Sl,{className:"h-2.5 w-2.5"}):m.jsx(Cl,{className:"h-2.5 w-2.5"})]})}function Fn({status:e}){const t=e==="failed"?"border-destructive/22 bg-destructive/9 text-destructive":e==="success"?"border-emerald-500/24 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300":"border-border/35 bg-muted/30 text-muted-foreground/58";return m.jsx("span",{className:`agent-activity-status-icon mt-0.5 inline-flex h-3 w-3 shrink-0 items-center justify-center rounded-full border ${t}`,"data-agent-activity-status":e,"aria-hidden":"true",children:e==="failed"?m.jsx(qr,{className:"h-2 w-2"}):e==="success"?m.jsx(Re,{className:"h-2 w-2"}):m.jsx(Wr,{className:"h-1 w-1 fill-current"})})}function rl(e){const t=typeof e.status=="string"?e.status.toLowerCase():"";if(e.is_error===!0||e.isError===!0||t==="failed"||t==="error")return"failed";const n=Rn(e).slice(0,160);return/\b(error|failed|exception|traceback)\b/i.test(n)?"failed":"success"}function Mn({title:e,preview:t,icon:n,children:r,accentClassName:i,status:l="success",previewClassName:o="font-mono text-[9px] leading-3 text-muted-foreground/78"}){const[s,a]=ce.useState(!1);return m.jsxs("div",{className:`overflow-hidden rounded-sm border border-border/18 shadow-none ${i}`,children:[m.jsxs("button",{type:"button",onClick:()=>a(u=>!u),className:"flex w-full items-start gap-1.5 px-2 py-1 text-left transition-colors hover:bg-background/24",children:[m.jsx(Fn,{status:l}),m.jsx("div",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:n}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:m.jsx("span",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:e})}),m.jsx("div",{className:`mt-0.5 whitespace-pre-wrap break-words ${o}`,children:t})]}),m.jsx(nl,{expanded:s})]}),s&&m.jsx("div",{className:"border-t border-border/18 px-2 py-1.5",children:r})]})}function il({text:e,status:t="success"}){const n=Se(e,156);return m.jsx(Mn,{title:"Thinking",preview:n,icon:m.jsx(Al,{className:"h-3 w-3"}),accentClassName:"bg-muted/22",status:t,previewClassName:"text-[9px] leading-3 text-muted-foreground/78",children:m.jsx("div",{className:"whitespace-pre-wrap text-[10px] leading-4 text-muted-foreground/82",children:e})})}function ll({block:e,status:t="success",renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=String(e.name??"tool"),a=e.input,u=at(e);if(u){const c=$e(u);return n!=null&&n.has(c)?null:(n==null||n.add(c),m.jsx(lt,{payload:u,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const f=tl(a);if(s==="TodoWrite"){const c=qp(a==null?void 0:a.todos);if(c.length>0)return m.jsx(Vp,{todos:c,status:t})}return m.jsx(Mn,{title:`Tool: ${s}`,preview:f,icon:m.jsx(gn,{className:"h-3 w-3"}),accentClassName:"bg-muted/18",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:JSON.stringify(a??{},null,2)})})}function On({block:e,status:t=rl(e),renderedQuestionSignatures:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}){const s=Rn(e);if(!s)return null;const a=ut(s);if(a){const f=$e(a);return n!=null&&n.has(f)?null:(n==null||n.add(f),m.jsx(lt,{payload:a,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o}))}const u=Se(s,156);return m.jsx(Mn,{title:"Result",preview:u,icon:m.jsx(gn,{className:"h-3 w-3"}),accentClassName:"bg-background/45",status:t,children:m.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap text-[9px] leading-4 text-muted-foreground/82",children:s})})}function Rn(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>String(n.text??"")).join(`
|
|
77
|
+
`):""}function $p(e){const t=e.message;return typeof t=="object"&&t!==null&&Array.isArray(t.content)?t.content:Array.isArray(e.content)?e.content:[]}function Up(e){return e.flatMap(t=>$p(t).flatMap(n=>{if(n.type==="thinking"){const r=String(n.thinking??"").trim();return r?[{title:"Thinking",preview:Se(r,112),block:n,kind:"thinking",status:"success"}]:[]}if(n.type==="tool_use")return[{title:`Tool: ${String(n.name??"tool")}`,preview:tl(n.input),block:n,kind:"tool_use",status:"success"}];if(n.type==="tool_result"){const r=Se(Rn(n),112);return r?[{title:"Result",preview:r,block:n,kind:"tool_result",status:rl(n)}]:[]}return[]}))}function Hp({events:e,...t}){const[n,r]=ce.useState(!1),[i,l]=ce.useState(Ke),o=Up(e);if(o.length===0)return null;const s=o.slice(0,i),a=o.length-s.length;function u(){r(f=>{const c=!f;return c&&l(Ke),c})}return m.jsxs("div",{className:"animate-agent-activity group/activity overflow-hidden py-0.5 text-muted-foreground","data-agent-activity-page-size":Ke,children:[m.jsxs("button",{type:"button",onClick:u,"aria-expanded":n,className:"flex w-full items-start gap-1.5 rounded-sm px-1 py-1 text-left transition-colors hover:bg-muted/18",children:[m.jsx("div",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground/55 transition-colors group-hover/activity:text-muted-foreground/80",children:m.jsx(gn,{className:"h-3 w-3"})}),m.jsxs("div",{className:"min-w-0 flex-1 space-y-0.5",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[m.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/80",children:"Agent activity"}),m.jsxs("span",{className:"font-mono text-[9px] leading-4 text-muted-foreground/55",children:[o.length," ",o.length===1?"item":"items"]})]}),m.jsx("div",{className:"divide-y divide-dashed divide-border/18",children:o.slice(0,4).map((f,c)=>m.jsxs("div",{className:"grid gap-1 py-0.5 text-[9px] leading-3 sm:grid-cols-[0.875rem_4.75rem_minmax(0,1fr)]",children:[m.jsx(Fn,{status:f.status}),m.jsx("span",{className:"truncate font-medium text-muted-foreground/75",children:f.title}),m.jsx("span",{className:"truncate font-mono text-muted-foreground/60",children:f.preview})]},`${f.kind}-${c}`))})]}),m.jsx(nl,{expanded:n})]}),n&&m.jsxs("div",{className:"animate-agent-activity-expand divide-y divide-dashed divide-border/18 px-3 pb-1 pt-0.5",children:[s.map((f,c)=>{const h=`${f.kind}-${c}`;return f.kind==="thinking"?m.jsx("div",{className:"py-0.5",children:m.jsx(il,{text:String(f.block.thinking??""),status:f.status})},h):f.kind==="tool_use"?m.jsx("div",{className:"py-0.5",children:m.jsx(ll,{block:f.block,status:f.status,...t})},h):m.jsx("div",{className:"py-0.5",children:m.jsx(On,{block:f.block,status:f.status,...t})},h)}),a>0&&m.jsxs("button",{type:"button",onClick:()=>l(f=>f+Ke),className:"ml-5 inline-flex rounded-sm px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.14em] text-muted-foreground/62 transition-colors hover:bg-muted/20 hover:text-muted-foreground",children:["Load more ",Math.min(a,Ke)]})]})]})}function qp(e){return Array.isArray(e)?e.map(t=>{if(typeof t!="object"||t===null)return null;const n=t,r=typeof n.content=="string"?n.content:"";if(!r)return null;const i=typeof n.activeForm=="string"?n.activeForm:r,l=typeof n.status=="string"?n.status:"pending";return{content:r,activeForm:i,status:l==="completed"||l==="in_progress"?l:"pending"}}).filter(t=>t!==null):[]}function Vp({todos:e,status:t="success"}){const n=e.filter(l=>l.status==="completed").length,r=e.length,i=e.find(l=>l.status==="in_progress");return m.jsxs("div",{className:"overflow-hidden rounded-sm border border-border/18 bg-muted/16 shadow-none",children:[m.jsxs("div",{className:"flex items-center gap-1.5 border-b border-border/18 px-2 py-1",children:[m.jsx(Fn,{status:t}),m.jsx("div",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-border/20 bg-background/36 text-muted-foreground/72",children:m.jsx(Nl,{className:"h-3 w-3"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/78",children:"Todos"}),m.jsx("div",{className:"mt-0.5 truncate text-[9px] leading-3 text-muted-foreground/78",children:i?i.activeForm:r===0?"No items":n===r?"All complete":"Up next"})]}),m.jsxs("div",{className:"shrink-0 rounded-sm border border-border/20 bg-background/36 px-1.5 py-0.5 font-mono text-[8px] tracking-wide text-muted-foreground/72",children:[n,"/",r]})]}),m.jsx("ul",{className:"divide-y divide-border/18",children:e.map((l,o)=>m.jsxs("li",{className:"flex items-start gap-1.5 px-2 py-1",children:[m.jsx(Wp,{status:l.status}),m.jsx("span",{className:l.status==="completed"?"text-[11px] leading-4 text-muted-foreground line-through decoration-muted-foreground/60":l.status==="in_progress"?"text-[11px] font-medium leading-4 text-foreground":"text-[11px] leading-4 text-foreground/85",children:l.status==="in_progress"?l.activeForm:l.content})]},`${o}-${l.content}`))})]})}function Wp({status:e}){return e==="completed"?m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-500 dark:text-emerald-400",children:m.jsx(Re,{className:"h-2.5 w-2.5"})}):e==="in_progress"?m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-primary",children:m.jsx(Pl,{className:"h-3 w-3 animate-spin"})}):m.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground/60",children:m.jsx(Wr,{className:"h-2.5 w-2.5"})})}const ol=/^[A-Za-z]:[\\/]/,Jp=/^[A-Za-z][A-Za-z\d+.-]*:/,Yp=/^\/(?:api|preview|preview-open|shared|tasks)(?:\/|$)/;function Xp(e,t){const n=sl(e);if(!n||n.startsWith("#")||Yp.test(n)||Jp.test(n)&&!n.toLowerCase().startsWith("file:")&&!ol.test(n))return null;const r=Gp(n,t);return!r||r==="."?null:ul(r)?r:null}function Gp(e,t){let n=sl(e);if(!n)return null;n=Zp(n),n=Qp(n),n=eh(n),n=ot(n),n=th(n);const r=t?Rr(ot(t)):null;if(nh(n)){if(!r)return null;const i=Rr(n);if(i===r)return".";if(!i.startsWith(`${r}/`))return null;n=i.slice(r.length+1)}return n=Bn(n),al(n)?null:n||"."}function Kp(e){const t=Bn(ot(e)),n=t.lastIndexOf("/");return n<=0?".":t.slice(0,n)}function Ph(e,t,n,r=new Set){const i=[],l=(o,s)=>{for(const a of o){const u=a.type==="directory"&&n.has(a.path);i.push({entry:a,depth:s,expanded:u,loading:a.type==="directory"&&r.has(a.path)}),u&&l(t[a.path]??[],s+1)}};return l(e,0),i}function zh(e){const t=Kp(e);if(t===".")return[];const n=t.split("/").filter(Boolean);return n.map((r,i)=>n.slice(0,i+1).join("/"))}function Lh(e){const t=Bn(ot(e));return!t||t==="."?0:Math.max(0,t.split("/").filter(Boolean).length-1)}function Dh(e,t){const n=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?e:e.filter(r=>{const i=`${r.name} ${r.path}`.toLowerCase();return n.every(l=>i.includes(l))})}function sl(e){const t=(e==null?void 0:e.trim())??"";if(!t)return"";try{return decodeURIComponent(t)}catch{return t}}function Zp(e){if(!e.toLowerCase().startsWith("file:"))return e;try{return new URL(e).pathname}catch{return e.replace(/^file:\/\//i,"")}}function Qp(e){const t=e.indexOf("#"),n=e.indexOf("?"),r=[t,n].filter(i=>i>=0).sort((i,l)=>i-l)[0];return r===void 0?e:e.slice(0,r)}function eh(e){const t=e.match(/^(.*):\d+(?::\d+)?$/);return t!=null&&t[1]&&ul(t[1])?t[1]:e}function ot(e){return e.replace(/\\/g,"/")}function Rr(e){return e.replace(/\/+$/,"")}function th(e){return e.replace(/^\/([A-Za-z]:\/)/,"$1")}function Bn(e){let t=e;for(;t.startsWith("./");)t=t.slice(2);return t}function al(e){return e.split("/").includes("..")}function nh(e){return e.startsWith("/")||ol.test(e)}function ul(e){const t=ot(e);if(!t||t==="."||al(t))return!1;const n=t.split("/").pop()??t;return n.startsWith(".")||/\.[A-Za-z0-9][A-Za-z0-9_-]*$/.test(n)?!0:t.split("/").some(r=>r.startsWith(".")&&r.length>1)}function rh(e){return/^(https?:\/\/|mailto:|tel:)/i.test((e==null?void 0:e.trim())??"")}function ih(e){var i,l,o,s;const t=typeof window>"u"?void 0:window,n=(l=(i=t==null?void 0:t.__TAURI__)==null?void 0:i.core)==null?void 0:l.invoke;if(typeof n=="function")return a=>n("plugin:opener|open_url",{url:a,with:void 0});const r=(s=(o=t==null?void 0:t.__TAURI__)==null?void 0:o.opener)==null?void 0:s.openUrl;return typeof r=="function"?r:null}function Br(e,t){const n=ih(),r=t==null?void 0:t.trim();!n||!rh(r)||(e.preventDefault(),Promise.resolve(n(r)).catch(()=>{window.open(r,"_blank","noopener,noreferrer")}))}function Fh({event:e,agent:t,subItems:n=[],questionBypassEnabled:r=!1,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o=!1,taskRootPath:s,onOpenFilePath:a}){const u=e.type,f=xn(e),c=at(e);if(f)return m.jsx(tt,{agent:t,children:m.jsx(Rp,{payload:f,onSubmit:l,disabled:o})});if(c)return m.jsx(tt,{agent:t,children:m.jsx(lt,{payload:c,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});if(u==="user"){if(e.isMeta===!0||e.isSidechain===!0)return null;const h=lh(e),p=h.filter(y=>y.type==="tool_result");if(p.length>0&&h.every(y=>y.type==="tool_result"))return m.jsx(tt,{agent:t,children:p.map((y,w)=>m.jsx(On,{block:y,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},w))});const d=Be(e);return d?m.jsx(uh,{content:d,taskRootPath:s,onOpenFilePath:a}):null}return u==="assistant"?m.jsx(ch,{event:e,agent:t,subItems:n,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}):null}function lh(e){const t=e.message,n=t==null?void 0:t.content;if(Array.isArray(n))return n.filter(i=>typeof i=="object"&&i!==null);const r=e.content;return Array.isArray(r)?r.filter(i=>typeof i=="object"&&i!==null):[]}function Gt(e){var n;const t=e.replace(/\r\n/g,`
|
|
78
78
|
`).split(`
|
|
79
79
|
`);for(;t.length>0&&((n=t[0])==null?void 0:n.trim())==="";)t.shift();return t.join(`
|
|
80
|
-
`)}function cl({text:e,tone:t="default",size:n="default",className:r="",taskRootPath:i,onOpenFilePath:l}){const o=t==="inverted",s=n==="compact"?"text-[10px] leading-4":"text-[11px] leading-[17px]",a=o?"underline decoration-current/45 underline-offset-2 hover:decoration-current":"underline decoration-current/35 underline-offset-2 hover:decoration-current",u=o?"rounded-sm bg-black/15 px-1 py-0.5 font-mono text-[10px] text-primary-foreground":"rounded-sm bg-muted/80 px-1 py-0.5 font-mono text-[10px] text-foreground",f=o?"overflow-x-auto rounded-md border border-primary-foreground/12 bg-black/15 px-3 py-2 font-mono text-[10px] leading-4 text-primary-foreground":"overflow-x-auto rounded-md border border-border/45 bg-muted/50 px-3 py-2 font-mono text-[10px] leading-4 text-foreground",c=o?"w-full border-collapse text-left text-[11px] text-primary-foreground":"w-full border-collapse text-left text-[11px] text-foreground",h=o?"border border-primary-foreground/20 px-2 py-1 align-top":"border border-border/60 px-2 py-1 align-top",p=o?"border-l-2 border-primary-foreground/30 pl-3 italic text-primary-foreground/90":"border-l-2 border-border pl-3 italic text-muted-foreground";return m.jsx("div",{className:[`max-w-none break-words ${s} [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&>*+*]:mt-2 [&_li>p]:my-0`,r].filter(Boolean).join(" "),children:m.jsx(
|
|
80
|
+
`)}function cl({text:e,tone:t="default",size:n="default",className:r="",taskRootPath:i,onOpenFilePath:l}){const o=t==="inverted",s=n==="compact"?"text-[10px] leading-4":"text-[11px] leading-[17px]",a=o?"underline decoration-current/45 underline-offset-2 hover:decoration-current":"underline decoration-current/35 underline-offset-2 hover:decoration-current",u=o?"rounded-sm bg-black/15 px-1 py-0.5 font-mono text-[10px] text-primary-foreground":"rounded-sm bg-muted/80 px-1 py-0.5 font-mono text-[10px] text-foreground",f=o?"overflow-x-auto rounded-md border border-primary-foreground/12 bg-black/15 px-3 py-2 font-mono text-[10px] leading-4 text-primary-foreground":"overflow-x-auto rounded-md border border-border/45 bg-muted/50 px-3 py-2 font-mono text-[10px] leading-4 text-foreground",c=o?"w-full border-collapse text-left text-[11px] text-primary-foreground":"w-full border-collapse text-left text-[11px] text-foreground",h=o?"border border-primary-foreground/20 px-2 py-1 align-top":"border border-border/60 px-2 py-1 align-top",p=o?"border-l-2 border-primary-foreground/30 pl-3 italic text-primary-foreground/90":"border-l-2 border-border pl-3 italic text-muted-foreground";return m.jsx("div",{className:[`max-w-none break-words ${s} [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&>*+*]:mt-2 [&_li>p]:my-0`,r].filter(Boolean).join(" "),children:m.jsx(Sc,{remarkPlugins:[Op,zc],components:{a:({node:d,href:y,...w})=>{const k=l?Xp(y,i):null;return k?m.jsx("a",{...w,href:y,"data-task-file-link":k,className:a,onClick:A=>{A.preventDefault(),l==null||l(k)}}):m.jsx("a",{...w,href:y,target:"_blank",rel:"noreferrer noopener",className:a,onClick:A=>Br(A,y)})},blockquote:({node:d,...y})=>m.jsx("blockquote",{...y,className:p}),code:({node:d,className:y,children:w,...k})=>y?m.jsx("code",{...k,className:y,children:w}):m.jsx("code",{...k,className:u,children:w}),h1:({node:d,...y})=>m.jsx("h1",{...y,className:"text-[14px] font-semibold leading-5"}),h2:({node:d,...y})=>m.jsx("h2",{...y,className:"text-[13px] font-semibold leading-5"}),h3:({node:d,...y})=>m.jsx("h3",{...y,className:"text-[12px] font-semibold leading-5"}),h4:({node:d,...y})=>m.jsx("h4",{...y,className:"text-[11px] font-semibold leading-4"}),hr:({node:d,...y})=>m.jsx("hr",{...y,className:o?"border-primary-foreground/20":"border-border"}),img:({node:d,alt:y,src:w})=>w?m.jsx("a",{href:w,target:"_blank",rel:"noreferrer noopener",className:a,onClick:k=>Br(k,w),children:(y==null?void 0:y.trim())||w}):m.jsx("span",{children:(y==null?void 0:y.trim())||"Image"}),ol:({node:d,...y})=>m.jsx("ol",{...y,className:"list-decimal space-y-0.5 pl-5"}),p:({node:d,...y})=>m.jsx("p",{...y,className:"my-0"}),pre:({node:d,...y})=>m.jsx("pre",{...y,className:f}),table:({node:d,...y})=>m.jsx("table",{...y,className:c}),td:({node:d,...y})=>m.jsx("td",{...y,className:h}),th:({node:d,...y})=>m.jsx("th",{...y,className:`${h} font-semibold`}),ul:({node:d,...y})=>m.jsx("ul",{...y,className:"list-disc space-y-0.5 pl-5"})},children:e})})}function fl({text:e,className:t=""}){const[n,r]=ce.useState(!1);if(!e)return null;const i=async l=>{l.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1500)}catch{}};return m.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy message",className:`flex h-6 w-6 items-center justify-center rounded-sm border border-border/60 bg-background/86 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-all hover:-translate-y-px hover:text-foreground group-hover:opacity-100 focus-visible:opacity-100 ${t}`,children:n?m.jsx(Re,{className:"h-3 w-3 text-emerald-500"}):m.jsx(Vr,{className:"h-3 w-3"})})}async function oh(e){let n=await(await fetch(e)).blob();n.type!=="image/png"&&(n=await sh(n)),await navigator.clipboard.write([new ClipboardItem({[n.type]:n})])}async function sh(e){const t=await createImageBitmap(e),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");if(!r)throw new Error("canvas 2d context unavailable");return r.drawImage(t,0,0),await new Promise((i,l)=>{n.toBlob(o=>o?i(o):l(new Error("toBlob failed")),"image/png")})}function ah({dataUrl:e,className:t=""}){const[n,r]=ce.useState(!1),i=async l=>{l.stopPropagation();try{await oh(e),r(!0),setTimeout(()=>r(!1),1500)}catch(o){console.error("copy image failed",o)}};return m.jsx("button",{type:"button",onClick:i,"aria-label":n?"Copied":"Copy image",className:`flex h-6 w-6 items-center justify-center rounded-sm border border-border/60 bg-background/86 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-all hover:-translate-y-px hover:text-foreground group-hover:opacity-100 focus-visible:opacity-100 ${t}`,children:n?m.jsx(Re,{className:"h-3 w-3 text-emerald-500"}):m.jsx(Vr,{className:"h-3 w-3"})})}function uh({content:e,taskRootPath:t,onOpenFilePath:n}){const r=Hl(e),i=e.filter(l=>l.type==="image");return m.jsx("div",{className:"animate-message-send flex w-full max-w-full min-w-0 justify-end",children:m.jsxs("div",{className:"group relative flex min-w-0 max-w-[88%] items-start gap-2",children:[m.jsx(fl,{text:r,className:"absolute -left-8 top-5"}),m.jsxs("div",{className:"flex min-w-0 max-w-full flex-col items-end gap-0.5",children:[m.jsx("div",{className:"pr-0.5 text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72",children:"You"}),m.jsxs("div",{className:"max-w-full space-y-1 overflow-hidden rounded-lg rounded-br-md bg-primary px-3 py-2 text-[10px] leading-4 text-primary-foreground shadow-[0_16px_52px_-38px_hsl(var(--primary)/0.9)]",children:[r&&m.jsx(cl,{text:r,tone:"inverted",size:"compact",taskRootPath:t,onOpenFilePath:n}),i.length>0&&m.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:i.map((l,o)=>{const s=ql(l);return m.jsxs("div",{className:"relative",children:[m.jsx("img",{src:s,alt:l.filename??`attachment ${o+1}`,className:"max-h-72 w-full rounded-2xl border border-primary-foreground/15 object-cover"}),m.jsx(ah,{dataUrl:s,className:"absolute right-2 top-2"})]},`${l.filename??"image"}-${o}`)})})]})]}),m.jsx("div",{className:"mt-4 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-primary/8 text-primary",children:m.jsx(Ol,{className:"h-3.5 w-3.5"})})]})})}function tt({agent:e,children:t}){const n=e?Xr(e):"Agent";return m.jsx("div",{className:"animate-message-receive flex w-full max-w-full min-w-0 justify-start",children:m.jsxs("div",{className:"flex min-w-0 max-w-[92%] items-start gap-2",children:[m.jsx("div",{className:"mt-4 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm bg-muted/45 text-muted-foreground/82",children:m.jsx(Jr,{agent:e??"",className:"h-3.5 w-3.5"})}),m.jsxs("div",{className:"min-w-0 max-w-full space-y-1",children:[m.jsx("div",{className:"text-[8px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/72","data-agent-speaker-label":n,children:n}),t]})]})})}function ch({event:e,agent:t,subItems:n=[],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o,taskRootPath:s,onOpenFilePath:a}){const u=e.message;if(!u)return null;const f=at(u);if(f)return m.jsx(tt,{agent:t,children:m.jsx(lt,{payload:f,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o})});const c=u.content;if(!c||!Array.isArray(c))return null;const h=new Set,p=c.filter(T=>T.type==="text").map(T=>({...T,text:Gt(String(T.text??"")),questionPayload:ut(Gt(String(T.text??"")))})).filter(T=>T.text.length>0||T.questionPayload),d=c.filter(T=>T.type==="thinking").map(T=>Gt(String(T.thinking??""))).filter(Boolean).join(`
|
|
81
81
|
|
|
82
|
-
`),y=c.filter(T=>T.type==="tool_use"),w=c.filter(T=>T.type==="tool_result"),k=p.length>0,
|
|
83
|
-
`):""}function
|
|
82
|
+
`),y=c.filter(T=>T.type==="tool_use"),w=c.filter(T=>T.type==="tool_result"),k=p.length>0,A=k&&(d.length>0||y.length>0||w.length>0)?[{type:"assistant",message:{content:[...d.length>0?[{type:"thinking",thinking:d}]:[],...y,...w]}}]:[];return p.length>0||d.length>0||y.length>0||w.length>0||n.length>0?m.jsxs(tt,{agent:t,children:[p.map((T,L)=>{if(T.questionPayload){const S=$e(T.questionPayload);return h.has(S)?null:(h.add(S),m.jsx(lt,{payload:T.questionPayload,bypassEnabled:r,onBypassChange:i,onSubmit:l,disabled:o},L))}return m.jsxs("div",{className:"group relative max-w-full overflow-hidden rounded-lg rounded-bl-md bg-card/72 px-3 py-2 text-[11px] leading-[17px] text-foreground shadow-[0_14px_48px_-42px_rgba(15,23,42,0.65)] backdrop-blur-sm dark:bg-card/68 dark:shadow-[0_14px_48px_-42px_rgba(0,0,0,0.9)]",children:[m.jsx(fl,{text:T.text,className:"absolute right-2 top-2"}),m.jsx(cl,{text:T.text,taskRootPath:s,onOpenFilePath:a})]},L)}),(n.length>0||A.length>0)&&m.jsx(Hp,{events:[...A,...n],questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o}),d.length>0&&!k&&m.jsx(il,{text:d}),!k&&y.map((T,L)=>m.jsx(ll,{block:T,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},L)),!k&&w.map((T,L)=>m.jsx(On,{block:T,renderedQuestionSignatures:h,questionBypassEnabled:r,onQuestionBypassChange:i,onSubmitQuestionResponse:l,questionResponseDisabled:o},L))]}):null}function bt(e){return typeof e=="object"&&e!==null}function fh(e){const t=e.message;return bt(t)&&Array.isArray(t.content)?t.content.filter(bt):Array.isArray(e.content)?e.content.filter(bt):[]}function ph(e){const t=e.content;return typeof t=="string"?t:Array.isArray(t)?t.filter(bt).map(n=>String(n.text??"")).join(`
|
|
83
|
+
`):""}function hh(e){return at(e)?!0:e.type==="tool_result"&&ut(ph(e))!==null}function mh(e){const t=fh(e);return t.length===0||t.some(hh)?!1:e.type==="assistant"?t.every(n=>n.type==="thinking"||n.type==="tool_use"||n.type==="tool_result"):e.type==="user"?t.every(n=>n.type==="tool_result"):!1}function Mh(e){const t=[];let n=[];const r=()=>{var l;if(n.length===0)return;const i=typeof((l=n[0])==null?void 0:l.timestamp)=="string"?n[0].timestamp:void 0;t.push({event:{type:"assistant",message:{role:"assistant",content:[]},...i?{timestamp:i}:{}},subItems:n}),n=[]};for(const i of e){if(mh(i)){n.push(i);continue}r(),t.push({event:i,subItems:[]})}return r(),t}function Oh({label:e,value:t}){return m.jsxs("div",{className:"min-w-[4.75rem] flex-1 rounded-sm bg-muted/45 px-2 py-1.5 shadow-none",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:"mt-0.5 text-[11px] font-semibold leading-4 tracking-tight text-foreground",children:t})]})}function Rh({label:e}){return m.jsx("div",{className:"flex h-64 items-center justify-center text-sm text-muted-foreground",children:e})}function Bh({label:e,value:t,mono:n,action:r}){return m.jsxs("div",{className:"grid grid-cols-[3.75rem,minmax(0,1fr)] items-start gap-1.5",children:[m.jsx("span",{className:"pt-px text-[8px] font-medium uppercase tracking-[0.16em] text-muted-foreground",children:e}),m.jsxs("div",{className:"flex min-w-0 items-start gap-1",children:[m.jsx("span",{className:St("min-w-0 flex-1 break-all text-[9px] leading-[0.95rem] text-foreground",n&&"font-mono"),children:t}),r]})]})}function $h({label:e,value:t,mono:n}){return m.jsxs("div",{className:"rounded-sm bg-muted/45 px-2 py-1.5 shadow-none",children:[m.jsx("div",{className:"text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground",children:e}),m.jsx("div",{className:St("mt-0.5 text-[9px] font-medium leading-[0.95rem] text-foreground",n&&"font-mono"),children:t})]})}export{Jr as A,Lh as B,Fh as C,Oh as D,Dh as E,Sc as F,Bh as I,Pl as L,$h as M,Rh as T,jh as a,gh as b,_h as c,Th as d,kh as e,Nh as f,Xr as g,Mh as h,wh as i,Nl as j,Eh as k,Ch as l,Sh as m,Be as n,Ah as o,Ih as p,xh as q,bh as r,yh as s,ql as t,yt as u,vh as v,Gp as w,Kp as x,zh as y,Ph as z};
|