@appsolutely-io/waypoint 0.1.1-next.0 → 0.1.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/{block-reply-DN4RiLL0.d.cts → block-reply-r8u-DNmZ.d.cts} +15 -3
- package/dist/{block-reply-Dtof9ild.d.ts → block-reply-z8El20nD.d.ts} +15 -3
- package/dist/{blocks-UJ7GUJHD.js → blocks-2ABWECKG.js} +1 -1
- package/dist/{blocks-25YOJ5SS.cjs → blocks-7453YTYJ.cjs} +1 -1
- package/dist/{chunk-W6Y7H56X.js → chunk-5Q3INHKA.js} +1 -1
- package/dist/chunk-A3YOSFLE.cjs +1 -0
- package/dist/{chunk-Q6BD2YL3.cjs → chunk-BRUQ75G3.cjs} +1 -1
- package/dist/{chunk-SD2KAIVE.js → chunk-D4Q46KWA.js} +1 -1
- package/dist/chunk-IPI4O4LP.js +1 -0
- package/dist/chunk-QFBAOEPD.js +1 -0
- package/dist/chunk-RZ3AGK3U.cjs +1 -0
- package/dist/{chunk-4ZGW4HM4.cjs → chunk-XTKUDSDK.cjs} +1 -1
- package/dist/{confirmation-view-OMWHUYVC.cjs → confirmation-view-5BZ2PP7J.cjs} +1 -1
- package/dist/{confirmation-view-CICNJJIO.js → confirmation-view-Z5JHY2F5.js} +1 -1
- package/dist/{flows-panel-YEJ36RTY.js → flows-panel-2SCPYZ3X.js} +1 -1
- package/dist/{flows-panel-AIULKYOS.cjs → flows-panel-HQYJMOP4.cjs} +1 -1
- package/dist/{form-extras-QYE32TUY.cjs → form-extras-RNMBCYV7.cjs} +1 -1
- package/dist/{form-extras-SBBOMJS2.js → form-extras-X3B3JCMH.js} +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.cts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.js +1 -1
- package/dist/{i18n-DPNfYTMG.d.cts → i18n-WC9f-h_q.d.cts} +3 -0
- package/dist/{i18n-DPNfYTMG.d.ts → i18n-WC9f-h_q.d.ts} +3 -0
- package/dist/markdown-5NUOCOGY.js +23 -0
- package/dist/{markdown-BSRKJFFE.cjs → markdown-CG7NXI7X.cjs} +17 -11
- package/dist/{message-actions-F6SPLTT7.cjs → message-actions-ORBVYGNE.cjs} +1 -1
- package/dist/{message-actions-3HGE6VTS.js → message-actions-XNBBFHGW.js} +1 -1
- package/dist/messages/en/index.cjs +1 -1
- package/dist/messages/en/index.js +1 -1
- package/dist/messages/index.d.cts +3 -3
- package/dist/messages/index.d.ts +3 -3
- package/dist/messages/zh-Hans/index.cjs +1 -1
- package/dist/messages/zh-Hans/index.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.cts +8 -6
- package/dist/react/index.d.ts +8 -6
- package/dist/react/index.js +1 -1
- package/dist/{recovery-panel-VOKVDDZD.js → recovery-panel-6EBUMANX.js} +1 -1
- package/dist/{recovery-panel-OWY2CWOH.cjs → recovery-panel-EQIIV7TT.cjs} +3 -3
- package/dist/{reply-controls-5CWIAKIG.js → reply-controls-HUYHUO3W.js} +1 -1
- package/dist/{reply-controls-CPWB4VBK.cjs → reply-controls-LGY2RKRJ.cjs} +1 -1
- package/dist/skin-antd/index.d.cts +3 -3
- package/dist/skin-antd/index.d.ts +3 -3
- package/dist/{step-name-BdkYnb5g.d.ts → step-name-BlgVvshf.d.ts} +1 -1
- package/dist/{step-name-3hQ6CCGr.d.cts → step-name-CB3d3kkP.d.cts} +1 -1
- package/dist/styles.css +15 -0
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.d.cts +3 -3
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +1 -1
- package/etc/hooks.api.md +9 -0
- package/etc/messages.api.md +3 -0
- package/etc/react.api.md +9 -0
- package/etc/skin-antd.api.md +9 -0
- package/etc/testing.api.md +9 -0
- package/package.json +2 -1
- package/dist/chunk-M3UENQ6L.cjs +0 -1
- package/dist/chunk-RHBDQGD4.js +0 -1
- package/dist/chunk-TGL3DR2K.js +0 -1
- package/dist/chunk-UYR3UEIW.cjs +0 -1
- package/dist/markdown-ETLB66BK.js +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ve}from"./chunk-MEKDQDSV.js";import{a as pe,b as ge}from"./chunk-PFR2J5BV.js";import{e as Y,q as ae,y as he}from"./chunk-TGL3DR2K.js";import"./chunk-FQSWQLRW.js";import"./chunk-OWT55N6J.js";import"./chunk-RHBDQGD4.js";import"./chunk-RZZDQWC2.js";import"./chunk-M63QOANE.js";import"./chunk-L4PFFRDE.js";import"./chunk-T5XF2R74.js";import"./chunk-K73VV7KA.js";import"./chunk-5TBO732O.js";import{useEffect as se,useId as U,useLayoutEffect as Ie,useRef as v,useState as B,useSyncExternalStore as de}from"react";var be={"form.generating":"Generating draft\u2026","form.ready":"Draft ready{choice, plural, =0 {} one {, # field needs your choice} other {, # fields need your choice}}{invalid, plural, =0 {} one {, # field needs attention} other {, # fields need attention}}","form.attention":"{count, plural, one {# field needs attention} other {# fields need attention}}","form.reverted":"Fill reverted.","form.revert":"Revert this fill ({fields})","form.revertWait":"Wait for the draft to finish.","form.suggested":"Suggested value for {field}","form.replaceIt":"Replace","form.keepMine":"Keep mine","form.attach":"Attach images","form.remove":"Remove {name}","form.uploading":"{count, plural, one {Uploading # image\u2026} other {Uploading # images\u2026}}","form.attached":"{count, plural, one {# image attached} other {# images attached}}","form.attachFailed":"{name} could not be attached.","form.removeFailed":"{name} could not be removed.","form.onlyImages":"Only images can be attached.","form.busy":"Wait for the current upload to finish.","form.unusable":"The draft could not be used."},ye={"form.generating":"\u6B63\u5728\u751F\u6210\u8349\u7A3F\u2026\u2026","form.ready":"\u8349\u7A3F\u5DF2\u5C31\u7EEA{choice, plural, =0 {} other {\uFF0C# \u4E2A\u5B57\u6BB5\u9700\u8981\u4F60\u9009\u62E9}}{invalid, plural, =0 {} other {\uFF0C# \u4E2A\u5B57\u6BB5\u9700\u8981\u5904\u7406}}","form.attention":"{count} \u4E2A\u5B57\u6BB5\u9700\u8981\u5904\u7406","form.reverted":"\u5DF2\u64A4\u9500\u672C\u6B21\u586B\u5145\u3002","form.revert":"\u64A4\u9500\u672C\u6B21\u586B\u5145\uFF08{fields}\uFF09","form.revertWait":"\u8BF7\u7B49\u5F85\u8349\u7A3F\u5B8C\u6210\u3002","form.suggested":"{field}\u7684\u5EFA\u8BAE\u503C","form.replaceIt":"\u66FF\u6362","form.keepMine":"\u4FDD\u7559\u6211\u7684","form.attach":"\u9644\u52A0\u56FE\u7247","form.remove":"\u79FB\u9664{name}","form.uploading":"\u6B63\u5728\u4E0A\u4F20 {count} \u5F20\u56FE\u7247\u2026\u2026","form.attached":"\u5DF2\u9644\u52A0 {count} \u5F20\u56FE\u7247","form.attachFailed":"\u65E0\u6CD5\u9644\u52A0{name}\u3002","form.removeFailed":"\u65E0\u6CD5\u79FB\u9664{name}\u3002","form.onlyImages":"\u53EA\u80FD\u9644\u52A0\u56FE\u7247\u3002","form.busy":"\u8BF7\u7B49\u5F85\u5F53\u524D\u4E0A\u4F20\u5B8C\u6210\u3002","form.unusable":"\u65E0\u6CD5\u4F7F\u7528\u6B64\u8349\u7A3F\u3002"};import{Fragment as Z,jsx as i,jsxs as P}from"react/jsx-runtime";ae(be,ye);ae(pe,ge);var xe=100,Se=new WeakMap;function Re(e){let n=Se.get(e);return n||(n=new Map,Se.set(e,n)),n}function ce(e){for(let[n,t]of e){if(e.size<=xe)break;t.inFlight===0&&e.delete(n)}}var Ce=e=>Object.values(e.fields).filter(n=>n.validation?.status==="invalid"||n.localInvalid).length;function $e({name:e,draft:n,session:t,t:c,primitives:l,onReplace:A}){let m=l.button,a=n.replacement,u=a.validation.status==="invalid",d=U();return P("div",{role:"group","aria-labelledby":d,"data-suggestion":"",children:[i("p",{id:d,children:c("form.suggested",{field:n.label})}),i("div",{children:i(ve,{value:a.value,t:c})}),a.validation.messages.length?P("div",{className:u?"wp-invalid":void 0,children:[u?i("strong",{children:c("form.invalid")}):null,a.validation.messages.map((r,s)=>i("p",{children:r},s))]}):null,P("div",{className:"wp-actions",children:[i(m,{onPress:()=>{t.replace(e,a.revision)&&A()},children:c("form.replaceIt")}),i(m,{onPress:()=>t.cancelReplacement(e),children:c("form.keepMine")})]})]})}function Ge({text:e}){return i("span",{role:"status",className:"wp-sr-only",children:e})}var Ue=(e,n)=>{let t=Ce(e);return t?n("form.attention",{count:t}):""};function Fe({B:e,reason:n,onPress:t,children:c}){let l=U();return P(Z,{children:[i(e,{"aria-disabled":n?!0:void 0,"aria-describedby":n?l:void 0,onPress:n?void 0:t,children:c}),n?i("span",{id:l,children:n}):null]})}var Te=(e,n)=>{let t=n;for(let c=2;e.some(l=>l.name===t);c++)t=`${n} (${c})`;return t};async function ke(e,n){let{t,attachments:c}=e;if(!n.length)return;let l=n.filter(r=>r.type.startsWith("image/")),A=l.length<n.length?t("form.onlyImages"):"",m=(...r)=>e.say([...r,A].filter(Boolean).join(" "));if(!l.length)return m();if(!c)return m(t("form.imagesHere"));if(!e.claim())return m(t("form.busy"));let a=e.scope();m(t("form.uploading",{count:l.length}));let u=[],d=[];for(let r of l)try{let s=await c.upload(r);u.push({reference:s,name:r.name||"image"})}catch{d.push(r.name||"image")}if(a!==e.scope()){await Promise.allSettled(u.map(r=>c.remove(r.reference)));return}e.setFiles(r=>{let s=[...r];for(let C of u)s.some(h=>h.reference===C.reference)||s.push({...C,name:Te(s,C.name)});return s}),e.release(),m(u.length?t("form.attached",{count:u.length}):"",...d.map(r=>t("form.attachFailed",{name:r})))}function je({control:e}){let{session:n,t,primitives:c,attachments:l,files:A,accepted:m,sent:a}=e,u=c.button,d=de(n.subscribe,n.getSnapshot,n.getSnapshot),r=U(),s=e.removalBlocked(),C=v(null),h=v(null),O=v(null),w=v(null),H=v(void 0);Ie(()=>{m&&m!==H.current&&e.say(t("form.generating")),H.current=m},[m,e,t]);let _=v(d.pending);Ie(()=>{let o=_.current&&!d.pending;if(_.current=d.pending,!o||!a)return;let p=d.fills?.some(M=>M.id===a),j=Object.values(d.fields).filter(M=>M.replacement?.fill===a).length;(p||j)&&e.say(t("form.ready",{choice:j,invalid:Ce(d)}))},[d,a,e,t]);let K=v(0),T=o=>{let p=o?.querySelectorAll("button")??[];return[p[K.current],p[K.current-1]]},L=o=>{K.current=[...o.currentTarget.querySelectorAll("button")].indexOf(o.target)},D=Y(()=>[...T(O.current),h.current?.querySelector("button")]),ee=Y(()=>[...T(w.current),e.messageField()]),z=Y(()=>[e.messageField()]),te=o=>o.map(p=>d.fields[p]?.label??p).join(", "),ne=o=>{if(!l)return;if(e.removalBlocked())return e.say(t("form.revertWait"));if(!e.claim())return e.say(t("form.busy"));let p=e.scope();l.remove(o.reference).then(()=>{p===e.scope()&&(e.setFiles(j=>j.filter(M=>M.reference!==o.reference)),e.release())},()=>{p===e.scope()&&(e.release(),e.say(t("form.removeFailed",{name:o.name})))})};return P(Z,{children:[i("p",{role:"status",className:"wp-form-status",children:e.status}),i("div",{onFocus:z,children:e.unusable&&e.unusable===a?P("p",{role:"alert",children:[t("form.unusable")," ",i(Fe,{B:u,reason:e.blocked,onPress:e.generate,children:t("chat.retry")})]}):null}),i("div",{ref:w,onFocus:o=>{L(o),ee(o)},children:(d.fills??[]).map(o=>i(Fe,{B:u,reason:d.pending?t("form.revertWait"):void 0,onPress:()=>{n.revert(o.id)&&e.say(t("form.reverted"))},children:t("form.revert",{fields:te(o.fields)})},o.id))}),l?P(Z,{children:[i("input",{ref:C,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:o=>{let p=[...o.target.files??[]];o.target.value="",ke(e,p)}}),i("div",{ref:h,children:i(u,{onPress:()=>C.current?.click(),children:t("form.attach")})}),s&&A.length?i("span",{id:r,className:"wp-sr-only",children:t("form.revertWait")}):null,i("ul",{ref:O,onFocus:o=>{L(o),D(o)},className:"wp-attachments",children:A.map(o=>P("li",{children:[i("span",{children:o.name}),i(u,{"aria-disabled":s||void 0,"aria-describedby":s?r:void 0,onPress:()=>ne(o),children:t("form.remove",{name:o.name})})]},o.reference))})]}):null]})}function _e({session:e,open:n,field:t,source:c,attachments:l,text:A,references:m,scope:a,upload:u,messageField:d}){let{client:r,format:s,primitives:C}=he(),h=de(r.subscribe,r.getSnapshot,r.getSnapshot),O=de(e.subscribe,e.getSnapshot,e.getSnapshot),{pending:w}=O,[H,_]=B([]),[K,T]=B(!1),[L,D]=B(!1),[ee,z]=B(!1),[te,ne]=B(""),[o,p]=B(void 0),[j,M]=B(void 0),[Pe,le]=B(void 0),$=v(!1),G=v(!1),b=Re(r),J=v(void 0),y=v(void 0),Ae=v(0),Be=U(),re=U(),we=()=>`${h.conversationId}:${Be}:${++Ae.current}`,ue=C.button;se(()=>($.current=!1,G.current=!1,T(!1),D(!1),()=>{y.current=void 0}),[n,e,t]),se(()=>{if(h.conversation?.mode==="form-fill"){for(let g of h.conversation.messages)for(let I of g.blocks)if(I.type==="form.fill"){let q=I.body?.requestId;!e.receive(I.body)&&q===y.current?.request.requestId&&e.getSnapshot().pending&&(e.failRequest(q),y.current=void 0,le(q))}}},[h.conversation,e]);let oe=async(g=!1)=>{if($.current||G.current||!n||e.getSnapshot().pending&&!g||g&&(!y.current?.failed||y.current.conversationId!==r.getSnapshot().conversationId))return;$.current=!0,D(!0),z(!1),le(void 0);let I=a.current,q,E;try{await r.ready;let S=r.getSnapshot();if(g&&y.current?.conversationId!==S.conversationId)return;let me=k=>k.field===t&&k.conversationId===S.conversationId,ie=t?[...b.values()].find(me)??(J.current&&me(J.current)?J.current:void 0):void 0,V=S.conversation?.subject??ie?.subject;if(S.protocol!=="1.1"||!S.capabilities.includes("form-fill")||(S.conversation?S.conversation.mode!=="form-fill":!ie)||!V)throw new Error("Form unavailable");if(I!==a.current)return;if(g&&(E=y.current?.creationAttempt,E&&(E.inFlight++,ce(b))),t&&!g){if(!c)throw new Error("Subthreads unavailable");let k=S.conversation?.parentConversationId??ie?.parent??S.conversationId,W=JSON.stringify([k,t]);q=W,b.has(W)||b.set(W,{id:we(),parent:k,field:t,subject:V,inFlight:0});let f=b.get(W);if(E=f,f.inFlight++,ce(b),!f.conversationId){let Q=await c.create({protocol:S.protocol,title:t,mode:"form-fill",subject:V,parentConversationId:k,field:t,clientCreationId:f.id});if(Q.mode!=="form-fill"||Q.parentConversationId!==k||Q.subject?.key!==V.key)throw new Error("Invalid child");f.conversationId=Q.id}if(I!==a.current||r.getSnapshot().conversationId!==S.conversationId)return;J.current=f;let N=r.getSnapshot(),R=N.conversationId===f.conversationId&&N.conversation?.id===f.conversationId&&N.status==="open"&&!N.conversationUnavailable&&N.problem?.id!=="conversation-read"?{kind:"loaded",conversationId:f.conversationId,conversation:N.conversation}:await r.switchConversation(f.conversationId);if(I!==a.current||r.getSnapshot().conversationId!==f.conversationId)return;if(R?.kind==="missing"&&R.conversationId===f.conversationId&&b.get(W)===f&&b.delete(W),R?.kind!=="loaded"||R.conversationId!==f.conversationId||R.conversation.id!==f.conversationId||R.conversation.mode!=="form-fill"||R.conversation.subject?.key!==f.subject.key)throw new Error("Child unavailable")}if(I!==a.current)return;let Me={text:A,field:t??r.getSnapshot().conversation?.field,references:m.split(/\r?\n/).filter(Boolean),attachments:H.map(k=>k.reference)};g||(y.current={request:e.begin(Me),conversationId:r.getSnapshot().conversationId,creationKey:q,creationAttempt:E});let x=y.current,X=x.request;x.failed=!1,p(X.requestId);let Ee=await r.reply({kind:"form-fill",clientReplyId:X.requestId,request:X});if(I!==a.current)return;if(!Ee)throw x.failed=!0,new Error("Form send failed");M(X.requestId),x.creationKey&&b.get(x.creationKey)===x.creationAttempt&&b.delete(x.creationKey)}catch{I===a.current&&z(!0)}finally{E&&(E.inFlight--,ce(b)),I===a.current&&($.current=!1,D(!1))}},F=Object.values(O.fields).some(g=>g.localInvalid)?s("form.fixFirst"):K?s("form.busy"):void 0,fe={session:e,t:s,primitives:C,attachments:l,files:H,setFiles:_,removalBlocked:()=>$.current||e.getSnapshot().pending,claim:()=>G.current?!1:(G.current=!0,T(!0),!0),release:()=>{G.current=!1,T(!1)},scope:()=>a.current,accepted:w?j:void 0,sent:o,generate:()=>{F||oe()},say:ne,status:te,unusable:Pe,blocked:F,messageField:d};return u.current=g=>{ke(fe,g)},se(()=>()=>u.current=void 0,[u]),P(Z,{children:[i(je,{control:fe}),w&&i("p",{children:s("form.closeHint")}),ee&&i("p",{role:"alert",children:s("chat.failure")}),w&&y.current?.failed&&i(ue,{disabled:L||y.current.conversationId!==h.conversationId,"aria-disabled":F?!0:void 0,"aria-describedby":F?re:void 0,onPress:()=>{F||oe(!0)},children:s("chat.retry")}),i(ue,{disabled:L||w||!h.capabilities.includes("form-fill"),"aria-disabled":F?!0:void 0,"aria-describedby":F?re:void 0,onPress:()=>{F||oe()},children:s("form.generate")}),F?i("span",{id:re,children:F}):null]})}export{Ge as FieldsStatus,_e as PopupBody,$e as Suggestion,ve as Value,Ue as attentionText};
|
|
1
|
+
import{a as ve}from"./chunk-MEKDQDSV.js";import{a as pe,b as ge}from"./chunk-PFR2J5BV.js";import{e as Y,q as ae,y as he}from"./chunk-IPI4O4LP.js";import"./chunk-FQSWQLRW.js";import"./chunk-OWT55N6J.js";import"./chunk-QFBAOEPD.js";import"./chunk-RZZDQWC2.js";import"./chunk-M63QOANE.js";import"./chunk-L4PFFRDE.js";import"./chunk-T5XF2R74.js";import"./chunk-K73VV7KA.js";import"./chunk-5TBO732O.js";import{useEffect as se,useId as U,useLayoutEffect as Ie,useRef as v,useState as B,useSyncExternalStore as de}from"react";var be={"form.generating":"Generating draft\u2026","form.ready":"Draft ready{choice, plural, =0 {} one {, # field needs your choice} other {, # fields need your choice}}{invalid, plural, =0 {} one {, # field needs attention} other {, # fields need attention}}","form.attention":"{count, plural, one {# field needs attention} other {# fields need attention}}","form.reverted":"Fill reverted.","form.revert":"Revert this fill ({fields})","form.revertWait":"Wait for the draft to finish.","form.suggested":"Suggested value for {field}","form.replaceIt":"Replace","form.keepMine":"Keep mine","form.attach":"Attach images","form.remove":"Remove {name}","form.uploading":"{count, plural, one {Uploading # image\u2026} other {Uploading # images\u2026}}","form.attached":"{count, plural, one {# image attached} other {# images attached}}","form.attachFailed":"{name} could not be attached.","form.removeFailed":"{name} could not be removed.","form.onlyImages":"Only images can be attached.","form.busy":"Wait for the current upload to finish.","form.unusable":"The draft could not be used."},ye={"form.generating":"\u6B63\u5728\u751F\u6210\u8349\u7A3F\u2026\u2026","form.ready":"\u8349\u7A3F\u5DF2\u5C31\u7EEA{choice, plural, =0 {} other {\uFF0C# \u4E2A\u5B57\u6BB5\u9700\u8981\u4F60\u9009\u62E9}}{invalid, plural, =0 {} other {\uFF0C# \u4E2A\u5B57\u6BB5\u9700\u8981\u5904\u7406}}","form.attention":"{count} \u4E2A\u5B57\u6BB5\u9700\u8981\u5904\u7406","form.reverted":"\u5DF2\u64A4\u9500\u672C\u6B21\u586B\u5145\u3002","form.revert":"\u64A4\u9500\u672C\u6B21\u586B\u5145\uFF08{fields}\uFF09","form.revertWait":"\u8BF7\u7B49\u5F85\u8349\u7A3F\u5B8C\u6210\u3002","form.suggested":"{field}\u7684\u5EFA\u8BAE\u503C","form.replaceIt":"\u66FF\u6362","form.keepMine":"\u4FDD\u7559\u6211\u7684","form.attach":"\u9644\u52A0\u56FE\u7247","form.remove":"\u79FB\u9664{name}","form.uploading":"\u6B63\u5728\u4E0A\u4F20 {count} \u5F20\u56FE\u7247\u2026\u2026","form.attached":"\u5DF2\u9644\u52A0 {count} \u5F20\u56FE\u7247","form.attachFailed":"\u65E0\u6CD5\u9644\u52A0{name}\u3002","form.removeFailed":"\u65E0\u6CD5\u79FB\u9664{name}\u3002","form.onlyImages":"\u53EA\u80FD\u9644\u52A0\u56FE\u7247\u3002","form.busy":"\u8BF7\u7B49\u5F85\u5F53\u524D\u4E0A\u4F20\u5B8C\u6210\u3002","form.unusable":"\u65E0\u6CD5\u4F7F\u7528\u6B64\u8349\u7A3F\u3002"};import{Fragment as Z,jsx as i,jsxs as P}from"react/jsx-runtime";ae(be,ye);ae(pe,ge);var xe=100,Se=new WeakMap;function Re(e){let n=Se.get(e);return n||(n=new Map,Se.set(e,n)),n}function ce(e){for(let[n,t]of e){if(e.size<=xe)break;t.inFlight===0&&e.delete(n)}}var Ce=e=>Object.values(e.fields).filter(n=>n.validation?.status==="invalid"||n.localInvalid).length;function $e({name:e,draft:n,session:t,t:c,primitives:l,onReplace:A}){let m=l.button,a=n.replacement,u=a.validation.status==="invalid",d=U();return P("div",{role:"group","aria-labelledby":d,"data-suggestion":"",children:[i("p",{id:d,children:c("form.suggested",{field:n.label})}),i("div",{children:i(ve,{value:a.value,t:c})}),a.validation.messages.length?P("div",{className:u?"wp-invalid":void 0,children:[u?i("strong",{children:c("form.invalid")}):null,a.validation.messages.map((r,s)=>i("p",{children:r},s))]}):null,P("div",{className:"wp-actions",children:[i(m,{onPress:()=>{t.replace(e,a.revision)&&A()},children:c("form.replaceIt")}),i(m,{onPress:()=>t.cancelReplacement(e),children:c("form.keepMine")})]})]})}function Ge({text:e}){return i("span",{role:"status",className:"wp-sr-only",children:e})}var Ue=(e,n)=>{let t=Ce(e);return t?n("form.attention",{count:t}):""};function Fe({B:e,reason:n,onPress:t,children:c}){let l=U();return P(Z,{children:[i(e,{"aria-disabled":n?!0:void 0,"aria-describedby":n?l:void 0,onPress:n?void 0:t,children:c}),n?i("span",{id:l,children:n}):null]})}var Te=(e,n)=>{let t=n;for(let c=2;e.some(l=>l.name===t);c++)t=`${n} (${c})`;return t};async function ke(e,n){let{t,attachments:c}=e;if(!n.length)return;let l=n.filter(r=>r.type.startsWith("image/")),A=l.length<n.length?t("form.onlyImages"):"",m=(...r)=>e.say([...r,A].filter(Boolean).join(" "));if(!l.length)return m();if(!c)return m(t("form.imagesHere"));if(!e.claim())return m(t("form.busy"));let a=e.scope();m(t("form.uploading",{count:l.length}));let u=[],d=[];for(let r of l)try{let s=await c.upload(r);u.push({reference:s,name:r.name||"image"})}catch{d.push(r.name||"image")}if(a!==e.scope()){await Promise.allSettled(u.map(r=>c.remove(r.reference)));return}e.setFiles(r=>{let s=[...r];for(let C of u)s.some(h=>h.reference===C.reference)||s.push({...C,name:Te(s,C.name)});return s}),e.release(),m(u.length?t("form.attached",{count:u.length}):"",...d.map(r=>t("form.attachFailed",{name:r})))}function je({control:e}){let{session:n,t,primitives:c,attachments:l,files:A,accepted:m,sent:a}=e,u=c.button,d=de(n.subscribe,n.getSnapshot,n.getSnapshot),r=U(),s=e.removalBlocked(),C=v(null),h=v(null),O=v(null),w=v(null),H=v(void 0);Ie(()=>{m&&m!==H.current&&e.say(t("form.generating")),H.current=m},[m,e,t]);let _=v(d.pending);Ie(()=>{let o=_.current&&!d.pending;if(_.current=d.pending,!o||!a)return;let p=d.fills?.some(M=>M.id===a),j=Object.values(d.fields).filter(M=>M.replacement?.fill===a).length;(p||j)&&e.say(t("form.ready",{choice:j,invalid:Ce(d)}))},[d,a,e,t]);let K=v(0),T=o=>{let p=o?.querySelectorAll("button")??[];return[p[K.current],p[K.current-1]]},L=o=>{K.current=[...o.currentTarget.querySelectorAll("button")].indexOf(o.target)},D=Y(()=>[...T(O.current),h.current?.querySelector("button")]),ee=Y(()=>[...T(w.current),e.messageField()]),z=Y(()=>[e.messageField()]),te=o=>o.map(p=>d.fields[p]?.label??p).join(", "),ne=o=>{if(!l)return;if(e.removalBlocked())return e.say(t("form.revertWait"));if(!e.claim())return e.say(t("form.busy"));let p=e.scope();l.remove(o.reference).then(()=>{p===e.scope()&&(e.setFiles(j=>j.filter(M=>M.reference!==o.reference)),e.release())},()=>{p===e.scope()&&(e.release(),e.say(t("form.removeFailed",{name:o.name})))})};return P(Z,{children:[i("p",{role:"status",className:"wp-form-status",children:e.status}),i("div",{onFocus:z,children:e.unusable&&e.unusable===a?P("p",{role:"alert",children:[t("form.unusable")," ",i(Fe,{B:u,reason:e.blocked,onPress:e.generate,children:t("chat.retry")})]}):null}),i("div",{ref:w,onFocus:o=>{L(o),ee(o)},children:(d.fills??[]).map(o=>i(Fe,{B:u,reason:d.pending?t("form.revertWait"):void 0,onPress:()=>{n.revert(o.id)&&e.say(t("form.reverted"))},children:t("form.revert",{fields:te(o.fields)})},o.id))}),l?P(Z,{children:[i("input",{ref:C,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:o=>{let p=[...o.target.files??[]];o.target.value="",ke(e,p)}}),i("div",{ref:h,children:i(u,{onPress:()=>C.current?.click(),children:t("form.attach")})}),s&&A.length?i("span",{id:r,className:"wp-sr-only",children:t("form.revertWait")}):null,i("ul",{ref:O,onFocus:o=>{L(o),D(o)},className:"wp-attachments",children:A.map(o=>P("li",{children:[i("span",{children:o.name}),i(u,{"aria-disabled":s||void 0,"aria-describedby":s?r:void 0,onPress:()=>ne(o),children:t("form.remove",{name:o.name})})]},o.reference))})]}):null]})}function _e({session:e,open:n,field:t,source:c,attachments:l,text:A,references:m,scope:a,upload:u,messageField:d}){let{client:r,format:s,primitives:C}=he(),h=de(r.subscribe,r.getSnapshot,r.getSnapshot),O=de(e.subscribe,e.getSnapshot,e.getSnapshot),{pending:w}=O,[H,_]=B([]),[K,T]=B(!1),[L,D]=B(!1),[ee,z]=B(!1),[te,ne]=B(""),[o,p]=B(void 0),[j,M]=B(void 0),[Pe,le]=B(void 0),$=v(!1),G=v(!1),b=Re(r),J=v(void 0),y=v(void 0),Ae=v(0),Be=U(),re=U(),we=()=>`${h.conversationId}:${Be}:${++Ae.current}`,ue=C.button;se(()=>($.current=!1,G.current=!1,T(!1),D(!1),()=>{y.current=void 0}),[n,e,t]),se(()=>{if(h.conversation?.mode==="form-fill"){for(let g of h.conversation.messages)for(let I of g.blocks)if(I.type==="form.fill"){let q=I.body?.requestId;!e.receive(I.body)&&q===y.current?.request.requestId&&e.getSnapshot().pending&&(e.failRequest(q),y.current=void 0,le(q))}}},[h.conversation,e]);let oe=async(g=!1)=>{if($.current||G.current||!n||e.getSnapshot().pending&&!g||g&&(!y.current?.failed||y.current.conversationId!==r.getSnapshot().conversationId))return;$.current=!0,D(!0),z(!1),le(void 0);let I=a.current,q,E;try{await r.ready;let S=r.getSnapshot();if(g&&y.current?.conversationId!==S.conversationId)return;let me=k=>k.field===t&&k.conversationId===S.conversationId,ie=t?[...b.values()].find(me)??(J.current&&me(J.current)?J.current:void 0):void 0,V=S.conversation?.subject??ie?.subject;if(S.protocol!=="1.1"||!S.capabilities.includes("form-fill")||(S.conversation?S.conversation.mode!=="form-fill":!ie)||!V)throw new Error("Form unavailable");if(I!==a.current)return;if(g&&(E=y.current?.creationAttempt,E&&(E.inFlight++,ce(b))),t&&!g){if(!c)throw new Error("Subthreads unavailable");let k=S.conversation?.parentConversationId??ie?.parent??S.conversationId,W=JSON.stringify([k,t]);q=W,b.has(W)||b.set(W,{id:we(),parent:k,field:t,subject:V,inFlight:0});let f=b.get(W);if(E=f,f.inFlight++,ce(b),!f.conversationId){let Q=await c.create({protocol:S.protocol,title:t,mode:"form-fill",subject:V,parentConversationId:k,field:t,clientCreationId:f.id});if(Q.mode!=="form-fill"||Q.parentConversationId!==k||Q.subject?.key!==V.key)throw new Error("Invalid child");f.conversationId=Q.id}if(I!==a.current||r.getSnapshot().conversationId!==S.conversationId)return;J.current=f;let N=r.getSnapshot(),R=N.conversationId===f.conversationId&&N.conversation?.id===f.conversationId&&N.status==="open"&&!N.conversationUnavailable&&N.problem?.id!=="conversation-read"?{kind:"loaded",conversationId:f.conversationId,conversation:N.conversation}:await r.switchConversation(f.conversationId);if(I!==a.current||r.getSnapshot().conversationId!==f.conversationId)return;if(R?.kind==="missing"&&R.conversationId===f.conversationId&&b.get(W)===f&&b.delete(W),R?.kind!=="loaded"||R.conversationId!==f.conversationId||R.conversation.id!==f.conversationId||R.conversation.mode!=="form-fill"||R.conversation.subject?.key!==f.subject.key)throw new Error("Child unavailable")}if(I!==a.current)return;let Me={text:A,field:t??r.getSnapshot().conversation?.field,references:m.split(/\r?\n/).filter(Boolean),attachments:H.map(k=>k.reference)};g||(y.current={request:e.begin(Me),conversationId:r.getSnapshot().conversationId,creationKey:q,creationAttempt:E});let x=y.current,X=x.request;x.failed=!1,p(X.requestId);let Ee=await r.reply({kind:"form-fill",clientReplyId:X.requestId,request:X});if(I!==a.current)return;if(!Ee)throw x.failed=!0,new Error("Form send failed");M(X.requestId),x.creationKey&&b.get(x.creationKey)===x.creationAttempt&&b.delete(x.creationKey)}catch{I===a.current&&z(!0)}finally{E&&(E.inFlight--,ce(b)),I===a.current&&($.current=!1,D(!1))}},F=Object.values(O.fields).some(g=>g.localInvalid)?s("form.fixFirst"):K?s("form.busy"):void 0,fe={session:e,t:s,primitives:C,attachments:l,files:H,setFiles:_,removalBlocked:()=>$.current||e.getSnapshot().pending,claim:()=>G.current?!1:(G.current=!0,T(!0),!0),release:()=>{G.current=!1,T(!1)},scope:()=>a.current,accepted:w?j:void 0,sent:o,generate:()=>{F||oe()},say:ne,status:te,unusable:Pe,blocked:F,messageField:d};return u.current=g=>{ke(fe,g)},se(()=>()=>u.current=void 0,[u]),P(Z,{children:[i(je,{control:fe}),w&&i("p",{children:s("form.closeHint")}),ee&&i("p",{role:"alert",children:s("chat.failure")}),w&&y.current?.failed&&i(ue,{disabled:L||y.current.conversationId!==h.conversationId,"aria-disabled":F?!0:void 0,"aria-describedby":F?re:void 0,onPress:()=>{F||oe(!0)},children:s("chat.retry")}),i(ue,{disabled:L||w||!h.capabilities.includes("form-fill"),"aria-disabled":F?!0:void 0,"aria-describedby":F?re:void 0,onPress:()=>{F||oe()},children:s("form.generate")}),F?i("span",{id:re,children:F}):null]})}export{Ge as FieldsStatus,_e as PopupBody,$e as Suggestion,ve as Value,Ue as attentionText};
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRZ3AGK3Ucjs = require('../chunk-RZ3AGK3U.cjs');require('../chunk-3KV7TDDR.cjs');require('../chunk-Q7BULGQG.cjs');require('../chunk-XSHOLIC7.cjs');require('../chunk-II26UWZM.cjs');exports.cardReplyId = _chunkRZ3AGK3Ucjs.j; exports.keepSheet = _chunkRZ3AGK3Ucjs.c; exports.planView = _chunkRZ3AGK3Ucjs.b; exports.problemAction = _chunkRZ3AGK3Ucjs.l; exports.problemView = _chunkRZ3AGK3Ucjs.m; exports.replyRowView = _chunkRZ3AGK3Ucjs.n; exports.useBlockReply = _chunkRZ3AGK3Ucjs.k; exports.usePlanView = _chunkRZ3AGK3Ucjs.i; exports.useWaypointMessage = _chunkRZ3AGK3Ucjs.g; exports.useWaypointSelector = _chunkRZ3AGK3Ucjs.f; exports.useWaypointSnapshot = _chunkRZ3AGK3Ucjs.e;
|
package/dist/hooks/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { A as ActionEntry, a as ActionId, B as BlockAnswer, b as BlockReply, K as KeepSheet, c as KeepSheetView, P as PlanView, d as PlanViewAlert, e as PlanViewInput, f as PlanViewStatus, S as StepStatus, T as Tone, V as ViewMessage, g as cardReplyId, k as keepSheet, p as planView, u as useBlockReply, h as usePlanView, i as useWaypointSnapshot } from '../block-reply-
|
|
1
|
+
export { A as ActionEntry, a as ActionId, B as BlockAnswer, b as BlockReply, K as KeepSheet, c as KeepSheetView, P as PlanView, d as PlanViewAlert, e as PlanViewInput, f as PlanViewStatus, S as StepStatus, T as Tone, V as ViewMessage, g as cardReplyId, k as keepSheet, p as planView, u as useBlockReply, h as usePlanView, i as useWaypointMessage, j as useWaypointSelector, l as useWaypointSnapshot } from '../block-reply-r8u-DNmZ.cjs';
|
|
2
2
|
import { g as ReplyState } from '../form-fill-C32AHxSr.cjs';
|
|
3
3
|
export { A as AttachmentPort, B as BuiltinFlowTab, h as CAPABILITIES, i as Capability, C as ClientConfig, b as ClientSnapshot, j as ComposerContribution, k as ConversationReadError, d as ConversationReadResult, l as ConversationSource, m as ConversationSummary, D as DEFAULT_FLOW_TABS, n as FORM_SESSION_UNAVAILABLE, o as FeedbackInput, p as FeedbackPort, q as FlowSource, r as FlowSummary, s as FlowTab, t as FormDraft, u as FormField, v as FormMaterial, a as FormSession, F as FormSessionConfig, w as FormSnapshot, K as KeepChangesReview, x as KeepChangesReviewResult, y as KeepDisabledReason, M as MaybePromise, z as MessageVersionInput, E as MessageVersionPort, N as NegotiationOffer, P as PendingSend, G as PlanReadRefused, H as PlanRunner, I as PlatformPorts, f as ReadPorts, J as ReaderRequestContext, e as ReplyDelivery, R as ReplyInput, L as ReplyOutcome, O as RestoredMessage, Q as RunnerPorts, S as StepContext, T as StoragePort, U as ToolStep, V as TransportEvent, X as TransportPort, W as WaypointClient, c as WaypointEvent, Y as asProblem, Z as canTransition, _ as confirmationOf, $ as createMemoryStorage, a0 as createPlanRunner, a1 as createWaypointClient, a2 as flowTabId, a3 as loadFormSession, a4 as readProblem, a5 as replyRow, a6 as versionWalk } from '../form-fill-C32AHxSr.cjs';
|
|
4
4
|
import { P as Problem } from '../generated-C9tbjwK0.cjs';
|
|
5
5
|
export { B as Block, b as BlockButtons, c as BlockCard, d as BlockChoice, e as BlockDetails, f as BlockDiff, g as BlockForm, h as BlockFormFill, i as BlockList, j as BlockMarkdown, k as BlockNotice, l as BlockPlan, m as BlockRouteLink, n as BlockTable, C as CanonicalRequest, o as CardAnswer, p as ConfirmationItem, q as ConfirmationRecord, r as ConfirmationSchedule, s as Conversation, t as CreateConversation, D as DecisionVersions, E as ExecutionAcceptance, u as ExtensionBlock, v as FinalHistory, a as Flow, w as FlowParameter, x as FormFillField, y as FormFillRequest, z as FormFillValue, A as FormSubject, G as FormValidation, F as Frame, H as FrameBlock, I as FrameMessageEnd, J as FrameMessageStart, K as FramePlanDraft, L as FramePlanFinal, N as FramePlanStep, O as FramePlanningRead, Q as FrameProblem, S as FrameStale, U as FrameTextDelta, V as FrameToolCall, W as ImmediateDraft, X as ImmediatePlan, Y as IntentCause, Z as IntentKind, _ as IntentRequest, $ as IntentTarget, a0 as IntentWinner, a1 as KeptFact, a2 as LeaveAcknowledgment, M as ManifestEntry, a3 as Message, a4 as Negotiated, a5 as Negotiation, a6 as NegotiationOfferWire, a7 as Outcome, a8 as PatchFlow, a9 as Plan, aa as PlanCommand, ab as PlanIntentReply, ac as PlanRecord, ad as PlanState, R as ReadTemplate, ae as RecoveryPhase, af as RecoveryView, ag as Reply, ah as ReplyAction, ai as ReplyConfirm, aj as ReplyDecline, ak as ReplyForm, al as ReplyFormFill, am as ReplyMessage, an as ReplyPlanValues, ao as ReplyStop, ap as ReplyToolResult, aq as RunFlow, ar as Source, as as Step, at as TimedPlan, T as ToolCall, au as WaypointProtocol, av as WinnerKind } from '../generated-C9tbjwK0.cjs';
|
|
6
|
-
import { M as MessageKey } from '../i18n-
|
|
7
|
-
export { B as BlockCatalogue, a as BlockMessageKey, C as ConfirmationCatalogue, b as ConfirmationMessageKey, F as FormCatalogue, c as FormMessageKey, d as FormatMessage, e as MessageValues, P as ProblemCatalogue, f as ProblemMessageKey, R as RecoveryCatalogue, g as RecoveryMessageKey, h as ReplyCatalogue, i as ReplyMessageKey, j as english } from '../i18n-
|
|
6
|
+
import { M as MessageKey } from '../i18n-WC9f-h_q.cjs';
|
|
7
|
+
export { B as BlockCatalogue, a as BlockMessageKey, C as ConfirmationCatalogue, b as ConfirmationMessageKey, F as FormCatalogue, c as FormMessageKey, d as FormatMessage, e as MessageValues, P as ProblemCatalogue, f as ProblemMessageKey, R as RecoveryCatalogue, g as RecoveryMessageKey, h as ReplyCatalogue, i as ReplyMessageKey, j as english } from '../i18n-WC9f-h_q.cjs';
|
|
8
8
|
export { I as IntentAlert, b as IntentFailure, c as IntentNotice, d as IntentOverlay, a as ScopeSignal } from '../intent-BQPPows1.cjs';
|
|
9
9
|
|
|
10
10
|
/** The one action a default problem text offers. */
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { A as ActionEntry, a as ActionId, B as BlockAnswer, b as BlockReply, K as KeepSheet, c as KeepSheetView, P as PlanView, d as PlanViewAlert, e as PlanViewInput, f as PlanViewStatus, S as StepStatus, T as Tone, V as ViewMessage, g as cardReplyId, k as keepSheet, p as planView, u as useBlockReply, h as usePlanView, i as useWaypointSnapshot } from '../block-reply-
|
|
1
|
+
export { A as ActionEntry, a as ActionId, B as BlockAnswer, b as BlockReply, K as KeepSheet, c as KeepSheetView, P as PlanView, d as PlanViewAlert, e as PlanViewInput, f as PlanViewStatus, S as StepStatus, T as Tone, V as ViewMessage, g as cardReplyId, k as keepSheet, p as planView, u as useBlockReply, h as usePlanView, i as useWaypointMessage, j as useWaypointSelector, l as useWaypointSnapshot } from '../block-reply-z8El20nD.js';
|
|
2
2
|
import { g as ReplyState } from '../form-fill-Dp3ut1_Y.js';
|
|
3
3
|
export { A as AttachmentPort, B as BuiltinFlowTab, h as CAPABILITIES, i as Capability, C as ClientConfig, b as ClientSnapshot, j as ComposerContribution, k as ConversationReadError, d as ConversationReadResult, l as ConversationSource, m as ConversationSummary, D as DEFAULT_FLOW_TABS, n as FORM_SESSION_UNAVAILABLE, o as FeedbackInput, p as FeedbackPort, q as FlowSource, r as FlowSummary, s as FlowTab, t as FormDraft, u as FormField, v as FormMaterial, a as FormSession, F as FormSessionConfig, w as FormSnapshot, K as KeepChangesReview, x as KeepChangesReviewResult, y as KeepDisabledReason, M as MaybePromise, z as MessageVersionInput, E as MessageVersionPort, N as NegotiationOffer, P as PendingSend, G as PlanReadRefused, H as PlanRunner, I as PlatformPorts, f as ReadPorts, J as ReaderRequestContext, e as ReplyDelivery, R as ReplyInput, L as ReplyOutcome, O as RestoredMessage, Q as RunnerPorts, S as StepContext, T as StoragePort, U as ToolStep, V as TransportEvent, X as TransportPort, W as WaypointClient, c as WaypointEvent, Y as asProblem, Z as canTransition, _ as confirmationOf, $ as createMemoryStorage, a0 as createPlanRunner, a1 as createWaypointClient, a2 as flowTabId, a3 as loadFormSession, a4 as readProblem, a5 as replyRow, a6 as versionWalk } from '../form-fill-Dp3ut1_Y.js';
|
|
4
4
|
import { P as Problem } from '../generated-C9tbjwK0.js';
|
|
5
5
|
export { B as Block, b as BlockButtons, c as BlockCard, d as BlockChoice, e as BlockDetails, f as BlockDiff, g as BlockForm, h as BlockFormFill, i as BlockList, j as BlockMarkdown, k as BlockNotice, l as BlockPlan, m as BlockRouteLink, n as BlockTable, C as CanonicalRequest, o as CardAnswer, p as ConfirmationItem, q as ConfirmationRecord, r as ConfirmationSchedule, s as Conversation, t as CreateConversation, D as DecisionVersions, E as ExecutionAcceptance, u as ExtensionBlock, v as FinalHistory, a as Flow, w as FlowParameter, x as FormFillField, y as FormFillRequest, z as FormFillValue, A as FormSubject, G as FormValidation, F as Frame, H as FrameBlock, I as FrameMessageEnd, J as FrameMessageStart, K as FramePlanDraft, L as FramePlanFinal, N as FramePlanStep, O as FramePlanningRead, Q as FrameProblem, S as FrameStale, U as FrameTextDelta, V as FrameToolCall, W as ImmediateDraft, X as ImmediatePlan, Y as IntentCause, Z as IntentKind, _ as IntentRequest, $ as IntentTarget, a0 as IntentWinner, a1 as KeptFact, a2 as LeaveAcknowledgment, M as ManifestEntry, a3 as Message, a4 as Negotiated, a5 as Negotiation, a6 as NegotiationOfferWire, a7 as Outcome, a8 as PatchFlow, a9 as Plan, aa as PlanCommand, ab as PlanIntentReply, ac as PlanRecord, ad as PlanState, R as ReadTemplate, ae as RecoveryPhase, af as RecoveryView, ag as Reply, ah as ReplyAction, ai as ReplyConfirm, aj as ReplyDecline, ak as ReplyForm, al as ReplyFormFill, am as ReplyMessage, an as ReplyPlanValues, ao as ReplyStop, ap as ReplyToolResult, aq as RunFlow, ar as Source, as as Step, at as TimedPlan, T as ToolCall, au as WaypointProtocol, av as WinnerKind } from '../generated-C9tbjwK0.js';
|
|
6
|
-
import { M as MessageKey } from '../i18n-
|
|
7
|
-
export { B as BlockCatalogue, a as BlockMessageKey, C as ConfirmationCatalogue, b as ConfirmationMessageKey, F as FormCatalogue, c as FormMessageKey, d as FormatMessage, e as MessageValues, P as ProblemCatalogue, f as ProblemMessageKey, R as RecoveryCatalogue, g as RecoveryMessageKey, h as ReplyCatalogue, i as ReplyMessageKey, j as english } from '../i18n-
|
|
6
|
+
import { M as MessageKey } from '../i18n-WC9f-h_q.js';
|
|
7
|
+
export { B as BlockCatalogue, a as BlockMessageKey, C as ConfirmationCatalogue, b as ConfirmationMessageKey, F as FormCatalogue, c as FormMessageKey, d as FormatMessage, e as MessageValues, P as ProblemCatalogue, f as ProblemMessageKey, R as RecoveryCatalogue, g as RecoveryMessageKey, h as ReplyCatalogue, i as ReplyMessageKey, j as english } from '../i18n-WC9f-h_q.js';
|
|
8
8
|
export { I as IntentAlert, b as IntentFailure, c as IntentNotice, d as IntentOverlay, a as ScopeSignal } from '../intent-BuvqEU3Q.js';
|
|
9
9
|
|
|
10
10
|
/** The one action a default problem text offers. */
|
package/dist/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,c as o,e as r,f as t,g as p,
|
|
1
|
+
import{b as e,c as o,e as r,f as t,g as p,i as a,j as s,k as l,l as m,m as y,n as c}from"../chunk-QFBAOEPD.js";import"../chunk-L4PFFRDE.js";import"../chunk-T5XF2R74.js";import"../chunk-K73VV7KA.js";import"../chunk-5TBO732O.js";export{s as cardReplyId,o as keepSheet,e as planView,m as problemAction,y as problemView,c as replyRowView,l as useBlockReply,a as usePlanView,p as useWaypointMessage,t as useWaypointSelector,r as useWaypointSnapshot};
|
|
@@ -83,6 +83,9 @@ declare const english: {
|
|
|
83
83
|
readonly "chat.latest": "Back to latest";
|
|
84
84
|
readonly "chat.latestNew": "{count, plural, one {Back to latest, # new reply} other {Back to latest, # new replies}}";
|
|
85
85
|
readonly "chat.outline": "Message outline";
|
|
86
|
+
readonly "chat.outlineFilter": "Filter messages";
|
|
87
|
+
readonly "chat.outlineMatches": "{count, plural, =0 {No messages match} one {# message matches} other {# messages match}}";
|
|
88
|
+
readonly "chat.outlineSearching": "Searching…";
|
|
86
89
|
readonly "chat.rail": "Conversations";
|
|
87
90
|
readonly "chat.close": "Close";
|
|
88
91
|
readonly "chat.quota": "Usage";
|
|
@@ -83,6 +83,9 @@ declare const english: {
|
|
|
83
83
|
readonly "chat.latest": "Back to latest";
|
|
84
84
|
readonly "chat.latestNew": "{count, plural, one {Back to latest, # new reply} other {Back to latest, # new replies}}";
|
|
85
85
|
readonly "chat.outline": "Message outline";
|
|
86
|
+
readonly "chat.outlineFilter": "Filter messages";
|
|
87
|
+
readonly "chat.outlineMatches": "{count, plural, =0 {No messages match} one {# message matches} other {# messages match}}";
|
|
88
|
+
readonly "chat.outlineSearching": "Searching…";
|
|
86
89
|
readonly "chat.rail": "Conversations";
|
|
87
90
|
readonly "chat.close": "Close";
|
|
88
91
|
readonly "chat.quota": "Usage";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import{a as at}from"./chunk-FQSWQLRW.js";import{a as lt,b as zr,c as Dr}from"./chunk-5TBO732O.js";var Wr=lt((_p,qr)=>{"use strict";var jr=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,kl=/\n/g,wl=/^\s*/,bl=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Sl=/^:\s*/,El=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Cl=/^[;\s]*/,Il=/^\s+|\s+$/g,Tl=`
|
|
2
|
+
`,Ur="/",Hr="*",Me="",Al="comment",Pl="declaration";function Ll(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var w=g.match(kl);w&&(n+=w.length);var T=g.lastIndexOf(Tl);r=~T?g.length-T:r+g.length}function l(){var g={line:n,column:r};return function(w){return w.position=new o(g),c(),w}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(g){var w=new Error(t.source+":"+n+":"+r+": "+g);if(w.reason=g,w.filename=t.source,w.line=n,w.column=r,w.source=e,!t.silent)throw w}function s(g){var w=g.exec(e);if(w){var T=w[0];return i(T),e=e.slice(T.length),w}}function c(){s(wl)}function u(g){var w;for(g=g||[];w=p();)w!==!1&&g.push(w);return g}function p(){var g=l();if(!(Ur!=e.charAt(0)||Hr!=e.charAt(1))){for(var w=2;Me!=e.charAt(w)&&(Hr!=e.charAt(w)||Ur!=e.charAt(w+1));)++w;if(w+=2,Me===e.charAt(w-1))return a("End of comment missing");var T=e.slice(2,w-2);return r+=2,i(T),e=e.slice(w),r+=2,g({type:Al,comment:T})}}function m(){var g=l(),w=s(bl);if(w){if(p(),!s(Sl))return a("property missing ':'");var T=s(El),b=g({type:Pl,property:Vr(w[0].replace(jr,Me)),value:T?Vr(T[0].replace(jr,Me)):Me});return s(Cl),b}}function f(){var g=[];u(g);for(var w;w=m();)w!==!1&&(g.push(w),u(g));return g}return c(),f()}function Vr(e){return e?e.replace(Il,Me):Me}qr.exports=Ll});var Xr=lt(ct=>{"use strict";var zl=ct&&ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ct,"__esModule",{value:!0});ct.default=Rl;var Dl=zl(Wr());function Rl(e,t){let n=null;if(!e||typeof e!="string")return n;let r=(0,Dl.default)(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;let{property:o,value:a}=l;i?t(o,a,l):a&&(n=n||{},n[o]=a)}),n}});var $r=lt(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.camelCase=void 0;var vl=/^--[a-zA-Z0-9_-]+$/,Ml=/-([a-z])/g,Nl=/^[^-]+$/,Ol=/^-(webkit|moz|ms|o|khtml)-/,_l=/^-(ms)-/,Fl=function(e){return!e||Nl.test(e)||vl.test(e)},Bl=function(e,t){return t.toUpperCase()},Yr=function(e,t){return"".concat(t,"-")},jl=function(e,t){return t===void 0&&(t={}),Fl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(_l,Yr):e=e.replace(Ol,Yr),e.replace(Ml,Bl))};Mt.camelCase=jl});var Kr=lt((wn,Qr)=>{"use strict";var Ul=wn&&wn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Hl=Ul(Xr()),Vl=$r();function kn(e,t){var n={};return!e||typeof e!="string"||(0,Hl.default)(e,function(r,i){r&&i&&(n[(0,Vl.camelCase)(r,t)]=i)}),n}kn.default=kn;Qr.exports=kn});var Co=lt((kx,Eo)=>{"use strict";var en=Object.prototype.hasOwnProperty,So=Object.prototype.toString,go=Object.defineProperty,xo=Object.getOwnPropertyDescriptor,yo=function(t){return typeof Array.isArray=="function"?Array.isArray(t):So.call(t)==="[object Array]"},ko=function(t){if(!t||So.call(t)!=="[object Object]")return!1;var n=en.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&en.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||en.call(t,i)},wo=function(t,n){go&&n.name==="__proto__"?go(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},bo=function(t,n){if(n==="__proto__")if(en.call(t,n)){if(xo)return xo(t,n).value}else return;return t[n]};Eo.exports=function e(){var t,n,r,i,l,o,a=arguments[0],s=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},s=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});s<c;++s)if(t=arguments[s],t!=null)for(n in t)r=bo(a,n),i=bo(t,n),a!==i&&(u&&i&&(ko(i)||(l=yo(i)))?(l?(l=!1,o=r&&yo(r)?r:[]):o=r&&ko(r)?r:{},wo(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&wo(a,{name:n,newValue:i}));return a}});import{createContext as sc,memo as cc,useContext as ln,useEffect as pc,useRef as Jo,useState as fc}from"react";function Rr(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var cl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fl={};function Lt(e,t){return((t||fl).jsx?pl:cl).test(e)}var ml=/[ \t\n\f\r]/g;function cn(e){return typeof e=="object"?e.type==="text"?vr(e.value):!1:vr(e)}function vr(e){return e.replace(ml,"")===""}var be=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};be.prototype.normal={};be.prototype.property={};be.prototype.space=void 0;function pn(e,t){let n={},r={};for(let i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new be(n,r,t)}function ut(e){return e.toLowerCase()}var J=class{constructor(t,n){this.attribute=n,this.property=t}};J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;var st={};zr(st,{boolean:()=>D,booleanish:()=>Y,commaOrSpaceSeparated:()=>le,commaSeparated:()=>Se,number:()=>S,overloadedBoolean:()=>zt,spaceSeparated:()=>U});var hl=0,D=Re(),Y=Re(),zt=Re(),S=Re(),U=Re(),Se=Re(),le=Re();function Re(){return 2**++hl}var fn=Object.keys(st),ve=class extends J{constructor(t,n,r,i){let l=-1;if(super(t,n),Mr(this,"space",i),typeof r=="number")for(;++l<fn.length;){let o=fn[l];Mr(this,fn[l],(r&st[o])===st[o])}}};ve.prototype.defined=!0;function Mr(e,t,n){n&&(e[t]=n)}function pe(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let l=new ve(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[ut(r)]=r,n[ut(l.attribute)]=r}return new be(t,n,e.space)}var mn=pe({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:U,ariaCurrent:null,ariaDescribedBy:U,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:U,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:U,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:U,ariaLevel:S,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:U,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:U,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:Y,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Dt(e,t){return t in e?e[t]:t}function Rt(e,t){return Dt(e,t.toLowerCase())}var Nr=pe({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Se,acceptCharset:U,accessKey:U,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alpha:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:U,autoFocus:D,autoPlay:D,blocking:U,capture:null,charSet:null,checked:D,cite:null,className:U,closedBy:null,colorSpace:null,cols:S,colSpan:S,command:null,commandFor:null,content:null,contentEditable:Y,controls:D,controlsList:U,coords:S|Se,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:zt,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:U,height:S,hidden:zt,high:S,href:null,hrefLang:null,htmlFor:U,httpEquiv:U,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:U,itemRef:U,itemScope:D,itemType:U,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:D,optimum:S,pattern:null,ping:U,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:U,required:D,reversed:D,rows:S,rowSpan:S,sandbox:U,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootCustomElementRegistry:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shadowRootSerializable:D,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:Y,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:U,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:D,disablePictureInPicture:D,disableRemotePlayback:D,exportParts:Se,part:U,prefix:null,property:null,results:S,security:null,unselectable:null},space:"html",transform:Rt});var Or=pe({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:le,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:U,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Se,g2:Se,glyphName:Se,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:S,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:U,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:le,rev:le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:le,requiredFeatures:le,requiredFonts:le,requiredFormats:le,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:le,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dt});var hn=pe({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()}});var dn=pe({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rt});var gn=pe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var xn={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"};var dl=/[A-Z]/g,_r=/-[a-z]/g,gl=/^data[-\w.:]+$/i;function yn(e,t){let n=ut(t),r=t,i=J;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&gl.test(t)){if(t.charAt(4)==="-"){let l=t.slice(5).replace(_r,yl);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{let l=t.slice(4);if(!_r.test(l)){let o=l.replace(dl,xl);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ve}return new i(r,t)}function xl(e){return"-"+e.toLowerCase()}function yl(e){return e.charAt(1).toUpperCase()}var Fr=pn([mn,Nr,hn,dn,gn],"html"),vt=pn([mn,Or,hn,dn,gn],"svg");function Br(e){return e.join(" ").trim()}var ei=Dr(Kr(),1);var Nt=Gr("end"),Ye=Gr("start");function Gr(e){return t;function t(n){let 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 bn(e){let t=Ye(e),n=Nt(e);if(t&&n)return{start:t,end:n}}function Te(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jr(e.position):"start"in e||"end"in e?Jr(e):"line"in e||"column"in e?Sn(e):""}function Sn(e){return Zr(e&&e.line)+":"+Zr(e&&e.column)}function Jr(e){return Sn(e&&e.start)+"-"+Sn(e&&e.end)}function Zr(e){return e&&typeof e=="number"?e:1}var Q=class 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"){let s=r.indexOf(":");s===-1?l.ruleId=r:(l.source=r.slice(0,s),l.ruleId=r.slice(s+1))}if(!l.place&&l.ancestors&&l.ancestors){let s=l.ancestors[l.ancestors.length-1];s&&(l.place=s.position)}let a=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=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Te(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}};Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;var En={}.hasOwnProperty,ql=new Map,Wl=/[A-Z]/g,Xl=new Set(["table","tbody","thead","tfoot","tr"]),Yl=new Set(["td","th"]),ti="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Cn(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ta(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=ea(n,t.jsx,t.jsxs)}let 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"?vt:Fr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=ni(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function ni(e,t,n){if(t.type==="element")return $l(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ql(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Gl(e,t,n);if(t.type==="mdxjsEsm")return Kl(e,t);if(t.type==="root")return Jl(e,t,n);if(t.type==="text")return Zl(e,t)}function $l(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=vt,e.schema=i),e.ancestors.push(t);let l=ii(e,t.tagName,!1),o=na(e,t),a=Tn(e,t);return Xl.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!cn(s):!0})),ri(e,o,l,t),In(o,a),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Ql(e,t){if(t.data&&t.data.estree&&e.evaluater){let r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}pt(e,t.position)}function Kl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);pt(e,t.position)}function Gl(e,t,n){let r=e.schema,i=r;t.name==="svg"&&r.space==="html"&&(i=vt,e.schema=i),e.ancestors.push(t);let l=t.name===null?e.Fragment:ii(e,t.name,!0),o=ra(e,t),a=Tn(e,t);return ri(e,o,l,t),In(o,a),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Jl(e,t,n){let r={};return In(r,Tn(e,t)),e.create(t,e.Fragment,r,n)}function Zl(e,t){return t.value}function ri(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function In(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ea(e,t,n){return r;function r(i,l,o,a){let c=Array.isArray(o.children)?n:t;return a?c(l,o,a):c(l,o)}}function ta(e,t){return n;function n(r,i,l,o){let a=Array.isArray(l.children),s=Ye(r);return t(i,l,o,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function na(e,t){let n={},r,i;for(i in t.properties)if(i!=="children"&&En.call(t.properties,i)){let l=ia(e,i,t.properties[i]);if(l){let[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Yl.has(t.tagName)?r=a:n[o]=a}}if(r){let l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ra(e,t){let n={};for(let r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){let l=r.data.estree.body[0];l.type;let o=l.expression;o.type;let a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else pt(e,t.position);else{let i=r.name,l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){let a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else pt(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Tn(e,t){let n=[],r=-1,i=e.passKeys?new Map:ql;for(;++r<t.children.length;){let l=t.children[r],o;if(e.passKeys){let s=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(s){let c=i.get(s)||0;o=s+"-"+c,i.set(s,c+1)}}let a=ni(e,l,o);a!==void 0&&n.push(a)}return n}function ia(e,t,n){let r=yn(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Rr(n):Br(n)),r.property==="style"){let i=typeof n=="object"?n:oa(e,String(n));return e.stylePropertyNameCase==="css"&&(i=la(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?xn[r.property]||r.property:r.attribute,n]}}function oa(e,t){try{return(0,ei.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let r=n,i=new Q("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=ti+"#cannot-parse-style-attribute",i}}function ii(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){let i=t.split("."),l=-1,o;for(;++l<i.length;){let a=Lt(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=Lt(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){let i=r.value;return En.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);pt(e)}function pt(e,t){let n=new Q("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=ti+"#cannot-handle-mdx-estrees-without-createevaluater",n}function la(e){let t={},n;for(n in e)En.call(e,n)&&(t[aa(n)]=e[n]);return t}function aa(e){let t=e.replace(Wl,ua);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ua(e){return"-"+e.toLowerCase()}var ft={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"]};import{Fragment as ds,jsx as gs,jsxs as xs}from"react/jsx-runtime";import{useEffect as Kx,useState as Gx}from"react";var sa={};function An(e,t){let n=t||sa,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return li(e,r,i)}function li(e,t,n){if(ca(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 oi(e.children,t,n)}return Array.isArray(e)?oi(e,t,n):""}function oi(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=li(e[i],t,n);return r.join("")}function ca(e){return!!(e&&typeof e=="object")}var ai=document.createElement("i");function $e(e){let t="&"+e+";";ai.innerHTML=t;let n=ai.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Z(e,t,n,r){let i=e.length,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 ne(e,t){return e.length>0?(Z(e,e.length,0,t),e):t}var ui={}.hasOwnProperty;function si(e){let t={},n=-1;for(;++n<e.length;)pa(t,e[n]);return t}function pa(e,t){let n;for(n in t){let i=(ui.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n],o;if(l)for(o in l){ui.call(i,o)||(i[o]=[]);let a=l[o];fa(i[o],Array.isArray(a)?a:a?[a]:[])}}}function fa(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Z(e,0,0,r)}function Ot(e,t){let 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?"\uFFFD":String.fromCodePoint(n)}function Ee(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var G=Ae(/[A-Za-z]/),$=Ae(/[\dA-Za-z]/),ci=Ae(/[#-'*+\--9=?A-Z^-~]/);function Ne(e){return e!==null&&(e<32||e===127)}var mt=Ae(/\d/),pi=Ae(/[\dA-Fa-f]/),fi=Ae(/[!-/:-@[-`{-~]/);function I(e){return e!==null&&e<-2}function B(e){return e!==null&&(e<0||e===32)}function P(e){return e===-2||e===-1||e===32}var Oe=Ae(/\p{P}|\p{S}/u),ge=Ae(/\s/);function Ae(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ae(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let l=e.charCodeAt(n),o="";if(l===37&&$(e.charCodeAt(n+1))&&$(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){let a=e.charCodeAt(n+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="\uFFFD"}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 z(e,t,n,r){let i=r?r-1:1/0,l=0;return o;function o(s){return P(s)?(e.enter(n),a(s)):t(s)}function a(s){return P(s)&&l++<i?(e.consume(s),a):(e.exit(n),t(s))}}function Pn(e,t,n,r,i,l){let o=0;return a;function a(u){return l>0&&P(u)?(e.enter(r),s(u)):c(u)}function s(u){return P(u)&&o<l?(e.consume(u),o++,s):(e.exit(r),c(u))}function c(u){return o>=i?t(u):n(u)}}var mi={tokenize:ma};function ma(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),z(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){let s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return I(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}var Ce=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){hi(this,t,n,r,!1)}addBefore(t,n,r){hi(this,t,n,r,!0)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length,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(let l of i)t.push(l);i=r.pop()}this.map.length=0,this.index.clear()}};function hi(e,t,n,r,i){if(n===0&&r.length===0)return;let l=e.index.get(t);if(l){l[1]+=n,i?(r.push(...l[2]),l[2]=r):l[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var gi={tokenize:ha},di={tokenize:da};function ha(e){let t=this,n=[],r=0,i,l,o;return a;function a(C){if(r<n.length){let R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,s,c)(C)}return c(C)}function s(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&L();let R=t.events.length,_=R,k;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){k=t.events[_][1].end;break}b(r);let M=R;for(;M<t.events.length;)t.events[M][1].end={...k},M++;let H=new Ce;return H.add(_+1,0,t.events.slice(R)),H.add(R,M-R,[]),H.consume(t.events),c(C)}return a(C)}function c(C){if(r===n.length){if(!i)return m(C);if(i.currentConstruct&&i.currentConstruct.concrete)return g(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(di,u,p)(C)}function u(C){return i&&L(),b(r),m(C)}function p(C){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(C)}function m(C){return t.containerState={},e.attempt(di,f,g)(C)}function f(C){return r++,n.push([t.currentConstruct,t.containerState]),m(C)}function g(C){if(C===null){i&&L(),b(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),w(C)}function w(C){if(C===null){T(e.exit("chunkFlow"),!0),b(0),e.consume(C);return}return I(C)?(e.consume(C),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(C),w)}function T(C,R){let _=t.sliceStream(C);if(R&&_.push(null),C.previous=l,l&&(l.next=C),l=C,i.defineSkip(C.start),i.write(_),t.parser.lazy[C.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<o&&(!i.events[k][1].end||i.events[k][1].end.offset>o))return;let M=t.events.length,H=M,W,x;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(W){x=t.events[H][1].end;break}W=!0}for(b(r),k=M;k<t.events.length;)t.events[k][1].end={...x},k++;let j=new Ce;j.add(H+1,0,t.events.slice(M)),j.add(M,k-M,[]),j.consume(t.events)}}function b(C){let R=n.length;for(;R-- >C;){let _=n[R];t.containerState=_[1],_[0].exit.call(t,e)}n.length=C}function L(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function da(e,t,n){return z(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qe(e){if(e===null||B(e)||ge(e))return 1;if(Oe(e))return 2}function Pe(e,t,n){let r=[],i=-1;for(;++i<e.length;){let l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}var ht={name:"attention",resolveAll:ga,tokenize:xa};function ga(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let l=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},a={...e[n][1].start};xi(o,-l),xi(a,l);let s={type:l>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},c={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:a},u={type:l>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},p={type:l>1?"strong":"emphasis",start:{...s.start},end:{...c.end}};e[i][1].end={...s.start},e[n][1].start={...c.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=ne(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=ne(r,[["enter",p,t],["enter",s,t],["exit",s,t],["enter",u,t]]),r=ne(r,Pe(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=ne(r,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",p,t]]);let m=0;e[n][1].end.offset-e[n][1].start.offset&&(m=2,r=ne(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),Z(e,i-1,n-i+3,r),n=i+r.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function xa(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Qe(r),l;return o;function o(s){return l=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===l)return e.consume(s),a;let c=e.exit("attentionSequence"),u=Qe(s),p=!u||u===2&&i||n.includes(s)&&s!==42&&s!==95,m=!i||i===2&&u||n.includes(r)&&r!==42&&r!==95;return c._open=!!(l===42?p:p&&(i||!m)),c._close=!!(l===42?m:m&&(u||!p)),t(s)}}function xi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ln={name:"autolink",tokenize:ya};function ya(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(f){return G(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||$(f)?(r=1,a(f)):c(f)}function a(f){return f===58?(e.consume(f),r=0,s):(f===43||f===45||f===46||$(f))&&r++<32?(e.consume(f),a):(r=0,c(f))}function s(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Ne(f)?n(f):(e.consume(f),s)}function c(f){return f===64?(e.consume(f),u):ci(f)?(e.consume(f),c):n(f)}function u(f){return $(f)?p(f):n(f)}function p(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):m(f)}function m(f){if((f===45||$(f))&&r++<63){let g=f===45?m:p;return e.consume(f),g}return n(f)}}var Le={partial:!0,tokenize:ka};function ka(e,t,n){return r;function r(l){return P(l)?z(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||I(l)?t(l):n(l)}}var _t={continuation:{tokenize:ba},exit:Sa,name:"blockQuote",tokenize:wa};function wa(e,t,n){let r=this;return i;function i(o){if(o===62){let a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return P(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function ba(e,t,n){let r=this;return i;function i(o){return P(o)?z(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(_t,t,n)(o)}}function Sa(e){e.exit("blockQuote")}var Ft={name:"characterEscape",tokenize:Ea};function Ea(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 fi(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}var Bt={name:"characterReference",tokenize:Ca};function Ca(e,t,n){let r=this,i=0,l,o;return a;function a(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),s}function s(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),l=31,o=$,u(p))}function c(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=pi,u):(e.enter("characterReferenceValue"),l=7,o=mt,u(p))}function u(p){if(p===59&&i){let m=e.exit("characterReferenceValue");return o===$&&!$e(r.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(p)&&i++<l?(e.consume(p),u):n(p)}}var dt={partial:!0,tokenize:Ia};function Ia(e,t,n){let 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)}}var jt={concrete:!0,name:"codeFenced",tokenize:Ta};function Ta(e,t,n){let r=this,i={partial:!0,tokenize:_},l=0,o=0,a;return s;function s(k){return c(k)}function c(k){let M=r.events[r.events.length-1];return l=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===a?(o++,e.consume(k),u):o<3?n(k):(e.exit("codeFencedFenceSequence"),P(k)?z(e,p,"whitespace")(k):p(k))}function p(k){return k===null||I(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(dt,w,R)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(k))}function m(k){return k===null||I(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(k)):P(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),z(e,f,"whitespace")(k)):k===96&&k===a?n(k):(e.consume(k),m)}function f(k){return k===null||I(k)?p(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||I(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(k)):k===96&&k===a?n(k):(e.consume(k),g)}function w(k){return e.attempt(i,R,T)(k)}function T(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),b}function b(k){return l>0&&P(k)?z(e,L,"linePrefix",l+1)(k):L(k)}function L(k){return k===null||I(k)?e.check(dt,w,R)(k):(e.enter("codeFlowValue"),C(k))}function C(k){return k===null||I(k)?(e.exit("codeFlowValue"),L(k)):(e.consume(k),C)}function R(k){return e.exit("codeFenced"),t(k)}function _(k,M,H){let W=0;return x;function x(O){return k.enter("lineEnding"),k.consume(O),k.exit("lineEnding"),j}function j(O){return k.enter("codeFencedFence"),P(O)?z(k,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):V(O)}function V(O){return O===a?(k.enter("codeFencedFenceSequence"),A(O)):H(O)}function A(O){return O===a?(W++,k.consume(O),A):W>=o?(k.exit("codeFencedFenceSequence"),P(O)?z(k,F,"whitespace")(O):F(O)):H(O)}function F(O){return O===null||I(O)?(k.exit("codeFencedFence"),M(O)):H(O)}}}var gt={name:"codeIndented",tokenize:Pa},Aa={partial:!0,tokenize:La};function Pa(e,t,n){return r;function r(a){return e.enter("codeIndented"),Pn(e,i,n,"linePrefix",4,4)(a)}function i(a){return a===null?o(a):I(a)?e.attempt(Aa,i,o)(a):(e.enter("codeFlowValue"),l(a))}function l(a){return a===null||I(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),l)}function o(a){return e.exit("codeIndented"),t(a)}}function La(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):I(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Pn(e,t,l,"linePrefix",4,4)(o)}function l(o){return I(o)?i(o):n(o)}}var zn={name:"codeText",previous:Da,resolve:za,tokenize:Ra};function za(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 Da(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ra(e,t,n){let r=this,i=0,l,o;return a;function a(m){return e.enter("codeText"),e.enter("codeTextSequence"),s(m)}function s(m){return m===96?(e.consume(m),i++,s):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(o=e.enter("codeTextSequence"),l=0,p(m)):I(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(m))}function u(m){return m===null||m===32||m===96||I(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),u)}function p(m){return m===96?(e.consume(m),l++,p):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",u(m))}}var Ut=class{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){let 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){let i=n||0;this.setCursor(Math.trunc(t));let l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xt(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),xt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xt(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){let n=this.left.splice(t,Number.POSITIVE_INFINITY);xt(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xt(this.left,n.reverse())}}};function xt(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 Ht(e){let t={},n=-1,r,i,l,o,a,s,c,u=new Ut(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,l=0,l<s.length&&s[l][1].type==="lineEndingBlank"&&(l+=2),l<s.length&&s[l][1].type==="content"))for(;++l<s.length&&s[l][1].type!=="content";)s[l][1].type==="chunkText"&&(s[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,va(u,n)),n=t[n],c=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=u.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.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={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return Z(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function va(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,l=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let a=o.events,s=[],c={},u,p,m=-1,f=n,g=0,w=0,T=[w];for(;f;){for(;e.get(++i)[1]!==f;);l.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),p&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=f,f=f.next}for(f=n;++m<a.length;)a[m][0]==="exit"&&a[m-1][0]==="enter"&&a[m][1].type===a[m-1][1].type&&a[m][1].start.line!==a[m][1].end.line&&(w=m+1,T.push(w),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):T.pop(),m=T.length;m--;){let b=a.slice(T[m],T[m+1]),L=l.pop();s.push([L,L+b.length-1]),e.splice(L,2,b)}for(s.reverse(),m=-1;++m<s.length;)c[g+s[m][0]]=g+s[m][1],g+=s[m][1]-s[m][0]-1;return c}var Dn={resolve:Na,tokenize:Oa},Ma={partial:!0,tokenize:_a};function Na(e){return Ht(e),e}function Oa(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):I(a)?e.check(Ma,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function _a(e,t,n){let r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),z(e,l,"linePrefix")}function l(o){if(o===null||I(o))return n(o);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Vt(e,t,n,r,i,l,o,a,s){let c=s||Number.POSITIVE_INFINITY,u=0;return p;function p(b){return b===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(b),e.exit(l),m):b===null||b===32||b===41||Ne(b)?n(b):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),w(b))}function m(b){return b===62?(e.enter(l),e.consume(b),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===62?(e.exit("chunkString"),e.exit(a),m(b)):b===null||b===60||I(b)?n(b):(e.consume(b),b===92?g:f)}function g(b){return b===60||b===62||b===92?(e.consume(b),f):f(b)}function w(b){return!u&&(b===null||b===41||B(b))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(b)):u<c&&b===40?(e.consume(b),u++,w):b===41?(e.consume(b),u--,w):b===null||b===32||b===40||Ne(b)?n(b):(e.consume(b),b===92?T:w)}function T(b){return b===40||b===41||b===92?(e.consume(b),w):w(b)}}function qt(e,t,n,r,i,l){let o=this,a=0,s;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(l),u}function u(f){return a>999||f===null||f===91||f===93&&!s||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(l),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):I(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||I(f)||a++>999?(e.exit("chunkString"),u(f)):(e.consume(f),s||(s=!P(f)),f===92?m:p)}function m(f){return f===91||f===92||f===93?(e.consume(f),a++,p):p(f)}}function Wt(e,t,n,r,i,l){let o;return a;function a(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,s):n(m)}function s(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(l),c(m))}function c(m){return m===o?(e.exit(l),s(o)):m===null?n(m):I(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),z(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===o||m===null||I(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?p:u)}function p(m){return m===o||m===92?(e.consume(m),u):u(m)}}function _e(e,t){let n;return r;function r(i){return I(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):P(i)?z(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var Rn={name:"definition",tokenize:Ba},Fa={partial:!0,tokenize:ja};function Ba(e,t,n){let r=this,i;return l;function l(f){return e.enter("definition"),o(f)}function o(f){return qt.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),s):n(f)}function s(f){return B(f)?_e(e,c)(f):c(f)}function c(f){return Vt(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(Fa,p,p)(f)}function p(f){return P(f)?z(e,m,"whitespace")(f):m(f)}function m(f){return f===null||I(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function ja(e,t,n){return r;function r(a){return B(a)?_e(e,i)(a):n(a)}function i(a){return Wt(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return P(a)?z(e,o,"whitespace")(a):o(a)}function o(a){return a===null||I(a)?t(a):n(a)}}var vn={name:"hardBreakEscape",tokenize:Ua};function Ua(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return I(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}var Mn={name:"headingAtx",resolve:Ha,tokenize:Va};function Ha(e,t){let n=e.length-2,r=3;if(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){let 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"};Z(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])}return e}function Va(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),l(u)}function l(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||B(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),s(u)):u===null||I(u)?(e.exit("atxHeading"),t(u)):P(u)?z(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function s(u){return u===35?(e.consume(u),s):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||B(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}var yi=["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"],Nn=["pre","script","style","textarea"];var On={concrete:!0,name:"htmlFlow",resolveTo:Wa,tokenize:Xa},qa={partial:!0,tokenize:Ya};function Wa(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 Xa(e,t,n){let r=this,i,l,o,a,s;return c;function c(d){return u(d)}function u(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),p}function p(d){return d===33?(e.consume(d),m):d===47?(e.consume(d),l=!0,w):d===63?(e.consume(d),i=3,r.interrupt?t:h):G(d)?(e.consume(d),o=String.fromCharCode(d),T):n(d)}function m(d){return d===45?(e.consume(d),i=2,f):d===91?(e.consume(d),i=5,a=0,g):G(d)?(e.consume(d),i=4,r.interrupt?t:h):n(d)}function f(d){return d===45?(e.consume(d),r.interrupt?t:h):n(d)}function g(d){let ue="CDATA[";return d===ue.charCodeAt(a++)?(e.consume(d),a===ue.length?r.interrupt?t:V:g):n(d)}function w(d){return G(d)?(e.consume(d),o=String.fromCharCode(d),T):n(d)}function T(d){if(d===null||d===47||d===62||B(d)){let ue=d===47,qe=o.toLowerCase();return!ue&&!l&&Nn.includes(qe)?(i=1,r.interrupt?t(d):V(d)):yi.includes(o.toLowerCase())?(i=6,ue?(e.consume(d),b):r.interrupt?t(d):V(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(d):l?L(d):C(d))}return d===45||$(d)?(e.consume(d),o+=String.fromCharCode(d),T):n(d)}function b(d){return d===62?(e.consume(d),r.interrupt?t:V):n(d)}function L(d){return P(d)?(e.consume(d),L):x(d)}function C(d){return d===47?(e.consume(d),x):d===58||d===95||G(d)?(e.consume(d),R):P(d)?(e.consume(d),C):x(d)}function R(d){return d===45||d===46||d===58||d===95||$(d)?(e.consume(d),R):_(d)}function _(d){return d===61?(e.consume(d),k):P(d)?(e.consume(d),_):C(d)}function k(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),s=d,M):P(d)?(e.consume(d),k):H(d)}function M(d){return d===s?(e.consume(d),s=null,W):d===null||I(d)?n(d):(e.consume(d),M)}function H(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||B(d)?_(d):(e.consume(d),H)}function W(d){return d===47||d===62||P(d)?C(d):n(d)}function x(d){return d===62?(e.consume(d),j):n(d)}function j(d){return d===null||I(d)?V(d):P(d)?(e.consume(d),j):n(d)}function V(d){return d===45&&i===2?(e.consume(d),X):d===60&&i===1?(e.consume(d),K):d===62&&i===4?(e.consume(d),ce):d===63&&i===3?(e.consume(d),h):d===93&&i===5?(e.consume(d),he):I(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(qa,ye,A)(d)):d===null||I(d)?(e.exit("htmlFlowData"),A(d)):(e.consume(d),V)}function A(d){return e.check(dt,F,ye)(d)}function F(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),O}function O(d){return d===null||I(d)?A(d):(e.enter("htmlFlowData"),V(d))}function X(d){return d===45?(e.consume(d),h):V(d)}function K(d){return d===47?(e.consume(d),o="",fe):V(d)}function fe(d){if(d===62){let ue=o.toLowerCase();return Nn.includes(ue)?(e.consume(d),ce):V(d)}return G(d)&&o.length<8?(e.consume(d),o+=String.fromCharCode(d),fe):V(d)}function he(d){return d===93?(e.consume(d),h):V(d)}function h(d){return d===62?(e.consume(d),ce):d===45&&i===2?(e.consume(d),h):V(d)}function ce(d){return d===null||I(d)?(e.exit("htmlFlowData"),ye(d)):(e.consume(d),ce)}function ye(d){return e.exit("htmlFlow"),t(d)}}function Ya(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Le,t,n)}}var _n={name:"htmlText",tokenize:$a};function $a(e,t,n){let r=this,i,l,o;return a;function a(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),s}function s(h){return h===33?(e.consume(h),c):h===47?(e.consume(h),_):h===63?(e.consume(h),C):G(h)?(e.consume(h),H):n(h)}function c(h){return h===45?(e.consume(h),u):h===91?(e.consume(h),l=0,g):G(h)?(e.consume(h),L):n(h)}function u(h){return h===45?(e.consume(h),f):n(h)}function p(h){return h===null?n(h):h===45?(e.consume(h),m):I(h)?(o=p,K(h)):(e.consume(h),p)}function m(h){return h===45?(e.consume(h),f):p(h)}function f(h){return h===62?X(h):h===45?m(h):p(h)}function g(h){let ce="CDATA[";return h===ce.charCodeAt(l++)?(e.consume(h),l===ce.length?w:g):n(h)}function w(h){return h===null?n(h):h===93?(e.consume(h),T):I(h)?(o=w,K(h)):(e.consume(h),w)}function T(h){return h===93?(e.consume(h),b):w(h)}function b(h){return h===62?X(h):h===93?(e.consume(h),b):w(h)}function L(h){return h===null||h===62?X(h):I(h)?(o=L,K(h)):(e.consume(h),L)}function C(h){return h===null?n(h):h===63?(e.consume(h),R):I(h)?(o=C,K(h)):(e.consume(h),C)}function R(h){return h===62?X(h):C(h)}function _(h){return G(h)?(e.consume(h),k):n(h)}function k(h){return h===45||$(h)?(e.consume(h),k):M(h)}function M(h){return I(h)?(o=M,K(h)):P(h)?(e.consume(h),M):X(h)}function H(h){return h===45||$(h)?(e.consume(h),H):h===47||h===62||B(h)?W(h):n(h)}function W(h){return h===47?(e.consume(h),X):h===58||h===95||G(h)?(e.consume(h),x):I(h)?(o=W,K(h)):P(h)?(e.consume(h),W):X(h)}function x(h){return h===45||h===46||h===58||h===95||$(h)?(e.consume(h),x):j(h)}function j(h){return h===61?(e.consume(h),V):I(h)?(o=j,K(h)):P(h)?(e.consume(h),j):W(h)}function V(h){return h===null||h===60||h===61||h===62||h===96?n(h):h===34||h===39?(e.consume(h),i=h,A):I(h)?(o=V,K(h)):P(h)?(e.consume(h),V):(e.consume(h),F)}function A(h){return h===i?(e.consume(h),i=void 0,O):h===null?n(h):I(h)?(o=A,K(h)):(e.consume(h),A)}function F(h){return h===null||h===34||h===39||h===60||h===61||h===96?n(h):h===47||h===62||B(h)?W(h):(e.consume(h),F)}function O(h){return h===47||h===62||B(h)?W(h):n(h)}function X(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),t):n(h)}function K(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),fe}function fe(h){return P(h)?z(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):he(h)}function he(h){return e.enter("htmlTextData"),o(h)}}var Fe={name:"labelEnd",resolveAll:Ja,resolveTo:Za,tokenize:eu},Qa={tokenize:tu},Ka={tokenize:nu},Ga={tokenize:ru};function Ja(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Z(e,0,e.length,n),e}function Za(e,t){let n=e.length,r=0,i,l,o;for(;n--;){let u=e[n][1];if(i){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[n][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(i=n,u.type!=="labelLink")){r=2;break}}else u.type==="labelEnd"&&(l=n)}let a={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[i][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[l-2][1].start}};return o=[["enter",a,t],["enter",s,t]],o=ne(o,e.slice(i+1,i+r+3)),o=ne(o,[["enter",c,t]]),o=ne(o,Pe(t.parser.constructs.insideSpan.null,e.slice(i+r+4,l-3),t)),o=ne(o,[["exit",c,t],e[l-2],e[l-1],["exit",s,t]]),o=ne(o,e.slice(l+1)),o=ne(o,[["exit",a,t]]),Z(e,i,e.length,o),e}function eu(e,t,n){let r=this,i=r._labelStarts,l,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();l=i[i.length-1]}return a;function a(m){return l?l._inactive?p(m):(o=r.parser.defined.includes(Ee(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),s):n(m)}function s(m){return m===40?e.attempt(Qa,u,o?u:p)(m):m===91?e.attempt(Ka,u,o?c:p)(m):o?u(m):p(m)}function c(m){return e.attempt(Ga,u,p)(m)}function u(m){return i.pop(),t(m)}function p(m){return l._balanced=!0,n(m)}}function tu(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return B(p)?_e(e,l)(p):l(p)}function l(p){return p===41?u(p):Vt(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return B(p)?_e(e,s)(p):u(p)}function a(p){return n(p)}function s(p){return p===34||p===39||p===40?Wt(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function c(p){return B(p)?_e(e,u)(p):u(p)}function u(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function nu(e,t,n){let r=this;return i;function i(a){return qt.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(Ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function ru(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)}}var Fn={name:"labelStartImage",resolveAll:Fe.resolveAll,tokenize:iu};function iu(e,t,n){let r=this,i;return l;function l(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),i=e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(s))}}var Bn={name:"labelStartLink",resolveAll:Fe.resolveAll,tokenize:ou};function ou(e,t,n){let r=this,i;return l;function l(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(a))}}var yt={name:"lineEnding",tokenize:lu};function lu(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),z(e,t,"linePrefix")}}var Be={name:"thematicBreak",tokenize:au};function au(e,t,n){let r=0,i;return l;function l(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),s(c)):r>=3&&(c===null||I(c))?(e.exit("thematicBreak"),t(c)):n(c)}function s(c){return c===i?(e.consume(c),r++,s):(e.exit("thematicBreakSequence"),P(c)?z(e,a,"whitespace")(c):a(c))}}var te={continuation:{tokenize:pu},exit:mu,name:"list",tokenize:cu},uu={partial:!0,tokenize:hu},su={partial:!0,tokenize:fu};function cu(e,t,n){let r=this,i=r.events[r.events.length-1],l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){let g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:mt(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Be,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(f)}return n(f)}function s(f){return mt(f)&&++o<10?(e.consume(f),s):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Le,r.interrupt?n:u,e.attempt(uu,m,p))}function u(f){return r.containerState.initialBlankLine=!0,l++,m(f)}function p(f){return P(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),m):n(f)}function m(f){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function pu(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Le,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,z(e,t,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!P(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(su,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,z(e,e.attempt(te,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function fu(e,t,n){let r=this;return z(e,i,"listItemIndent",r.containerState.size+1);function i(l){let 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 mu(e){e.exit(this.containerState.type)}function hu(e,t,n){let r=this;return z(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){let o=r.events[r.events.length-1];return!P(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}var Xt={name:"setextUnderline",resolveTo:du,tokenize:gu};function du(e,t){let n=new Ce,r=e.length,i,l,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!o&&e[r][1].type==="definition"&&(o=r);let a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(n.add(l,0,[["enter",a,t]]),n.add(o+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=a,n.add(e.length,0,[["exit",a,t]]),n.consume(e),e}function gu(e,t,n){let r=this,i;return l;function l(c){let u=r.events.length,p;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){p=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),P(c)?z(e,s,"lineSuffix")(c):s(c))}function s(c){return c===null||I(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}var ki={tokenize:xu};function xu(e){let t=this,n=e.attempt(Le,r,e.attempt(this.parser.constructs.flowInitial,i,z(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Dn,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}}var wi={resolveAll:Ci()},bi=Ei("string"),Si=Ei("text");function Ei(e){return{resolveAll:Ci(e==="text"?yu:void 0),tokenize:t};function t(n){let r=this,i=this.parser.constructs[e],l=n.attempt(i,o,a);return o;function o(u){return c(u)?l(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),s}function s(u){return c(u)?(n.exit("data"),l(u)):(n.consume(u),s)}function c(u){if(u===null)return!0;let p=i[u],m=-1;if(p)for(;++m<p.length;){let f=p[m];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Ci(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 yu(e,t){let n=new Ce,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let i=e[r-1][1],l=t.sliceStream(i),o=l.length,a=-1,s=0,c;for(;o--;){let u=l[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)c=!0,s++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){let u={type:r===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:i.start._bufferIndex+a,_index:i.start._index+o,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...u.start},i.start.offset===i.end.offset?Object.assign(i,u):n.add(r,0,[["enter",u,t],["exit",u,t]])}r++}return n.consume(e),e}var jn={};zr(jn,{attentionMarkers:()=>Tu,contentInitial:()=>wu,disable:()=>Au,document:()=>ku,flow:()=>Su,flowInitial:()=>bu,insideSpan:()=>Iu,string:()=>Eu,text:()=>Cu});var ku={42:te,43:te,45:te,48:te,49:te,50:te,51:te,52:te,53:te,54:te,55:te,56:te,57:te,62:_t},wu={91:Rn},bu={[-2]:gt,[-1]:gt,32:gt},Su={35:Mn,42:Be,45:[Xt,Be],60:On,61:Xt,95:Be,96:jt,126:jt},Eu={38:Bt,92:Ft},Cu={[-5]:yt,[-4]:yt,[-3]:yt,33:Fn,38:Bt,42:ht,60:[Ln,_n],91:Bn,92:[vn,Ft],93:Fe,95:ht,96:zn},Iu={null:[ht,wi]},Tu={null:[42,95]},Au={null:[]};function Ii(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},l=[],o=[],a=[],s=!0,c={attempt:W(M),check:W(H),consume:R,enter:_,exit:k,interrupt:W(H,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:T,parser:e,previous:null,sliceSerialize:g,sliceStream:w,write:f},p=t.tokenize.call(u,c),m;return t.resolveAll&&l.push(t),u;function f(A){return o=ne(o,A),L(),o[o.length-1]!==null?[]:(x(t,0),u.events=Pe(l,u.events,u),u.events)}function g(A,F){return Lu(w(A),F)}function w(A){return Pu(o,A)}function T(){let{_bufferIndex:A,_index:F,line:O,column:X,offset:K}=r;return{_bufferIndex:A,_index:F,line:O,column:X,offset:K}}function b(A){i[A.line]=A.column,V()}function L(){for(;r._index<o.length;){let A=o[r._index];if(typeof A=="string"){let F=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<A.length;)C(A.charCodeAt(r._bufferIndex))}else C(A)}}function C(A){s=void 0,m=A,p=p(A)}function R(A){I(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,V()):A!==-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=A,s=!0}function _(A,F){let O=F||{};return O.type=A,O.start=T(),u.events.push(["enter",O,u]),a.push(O),O}function k(A){let F=a.pop();return F.end=T(),u.events.push(["exit",F,u]),F}function M(A,F){x(A,F.from)}function H(A,F){F.restore()}function W(A,F){return O;function O(X,K,fe){let he,h,ce,ye;return Array.isArray(X)?ue(X):"tokenize"in X?ue([X]):d(X);function d(ee){return nt;function nt(ke){let We=ke!==null&&ee[ke],De=ke!==null&&ee.null,un=[...Array.isArray(We)?We:We?[We]:[],...Array.isArray(De)?De:De?[De]:[]];return ue(un)(ke)}}function ue(ee){return he=ee,h=0,ee.length===0?fe:qe(ee[h])}function qe(ee){return nt;function nt(ke){return ye=j(),ce=ee,ee.partial||(u.currentConstruct=ee),ee.name&&u.parser.constructs.disable.null.includes(ee.name)?Pt(ke):ee.tokenize.call(F?Object.assign(Object.create(u),F):u,c,At,Pt)(ke)}}function At(ee){return s=!0,A(ce,ye),K}function Pt(ee){return s=!0,ye.restore(),++h<he.length?qe(he[h]):fe}}}function x(A,F){A.resolveAll&&!l.includes(A)&&l.push(A),A.resolve&&Z(u.events,F,u.events.length-F,A.resolve(u.events.slice(F),u)),A.resolveTo&&(u.events=A.resolveTo(u.events,u))}function j(){let A=T(),F=u.previous,O=u.currentConstruct,X=u.events.length,K=Array.from(a);return{from:X,restore:fe};function fe(){r=A,u.previous=F,u.currentConstruct=O,u.events.length=X,a=K,V()}}function V(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pu(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){let a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Lu(e,t){let n=-1,r=[],i;for(;++n<e.length;){let l=e[n],o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
3
|
+
`;break}case-3:{o=`\r
|
|
4
|
+
`;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 Un(e){let r={constructs:si([jn,...(e||{}).extensions||[]]),content:i(mi),defined:[],document:i(gi),flow:i(ki),lazy:{},string:i(bi),text:i(Si)};return r;function i(l){return o;function o(a){return Ii(r,l,a)}}}function Hn(e){for(;!Ht(e););return e}var Ti=/[\0\t\n\r]/g;function Vn(){let e=1,t="",n=!0,r;return i;function i(l,o,a){l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l));let s=[],c=0;for(t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){Ti.lastIndex=c;let u=Ti.exec(l),p=u&&u.index!==void 0?u.index:l.length,m=l.charCodeAt(p);if(!u){t=l.slice(c);break}if(m===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(l.slice(c,p)),e+=p-c),m){case 0:{s.push(65533),e++;break}case 9:{let f=Math.ceil(e/4)*4;for(s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var zu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ai(e){return e.replace(zu,Du)}function Du(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),l=i===120||i===88;return Ot(n.slice(l?2:1),l?16:10)}return $e(n)||e}var Li={}.hasOwnProperty;function qn(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ru(n)(Hn(Un(n).document().write(Vn()(e,t,!0))))}function Ru(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ar),autolinkProtocol:x,autolinkEmail:x,atxHeading:o(Cr),blockQuote:o(We),characterEscape:x,characterReference:x,codeFenced:o(De),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(De,a),codeText:o(un,a),codeTextData:x,data:x,codeFlowValue:x,definition:o(nl),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(rl),hardBreakEscape:o(Ir),hardBreakTrailing:o(Ir),htmlFlow:o(Tr,a),htmlFlowData:x,htmlText:o(Tr,a),htmlTextData:x,image:o(il),label:a,link:o(Ar),listItem:o(ol),listItemValue:f,listOrdered:o(Pr,m),listUnordered:o(Pr),paragraph:o(ll),reference:ue,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Cr),strong:o(al),thematicBreak:o(sl)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:ke,autolinkProtocol:nt,blockQuote:c(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:At,characterReferenceMarkerNumeric:At,characterReferenceValue:Pt,characterReference:ee,codeFenced:c(b),codeFencedFence:T,codeFencedFenceInfo:g,codeFencedFenceMeta:w,codeFlowValue:j,codeIndented:c(L),codeText:c(X),codeTextData:j,data:j,definition:c(),definitionDestinationString:_,definitionLabelString:C,definitionTitleString:R,emphasis:c(),hardBreakEscape:c(A),hardBreakTrailing:c(A),htmlFlow:c(F),htmlFlowData:j,htmlText:c(O),htmlTextData:j,image:c(fe),label:h,labelText:he,lineEnding:V,link:c(K),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:qe,resourceDestinationString:ce,resourceTitleString:ye,resource:d,setextHeading:c(W),setextHeadingLineSequence:H,setextHeadingText:M,strong:c(),thematicBreak:c()}};zi(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(y){let E={type:"root",children:[],position:void 0},v={stack:[E],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:p,data:n},N=[],ie=[],q=-1;for(;++q<y.length;)if(ie.push(y[q]),y[q][1].type==="listOrdered"||y[q][1].type==="listUnordered")if(y[q][0]==="enter")N.push(ie.length-1);else{let oe=N.pop();l(ie,oe)}for(y=ie,q=-1;++q<y.length;){let oe=t[y[q][0]];y[q][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...v,sliceSerialize:y[q][2].sliceSerialize},y[q][1]),Li.call(oe,y[q][1].type)&&oe[y[q][1].type].call({...v,sliceSerialize:y[q][2].sliceSerialize},y[q][1]),y[q][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...v,sliceSerialize:y[q][2].sliceSerialize},y[q][1])}if(v.tokenStack.length>0){let oe=v.tokenStack[v.tokenStack.length-1];(oe[1]||Pi).call(v,void 0,oe[0])}for(E.position={start:ze(y.length>0?y[0][1].start:{line:1,column:1,offset:0}),end:ze(y.length>0?y[y.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<t.transforms.length;)E=t.transforms[q](E)||E;return E}function i(y,E,v){let N=-1;for(;++N<y.length;)y[N].call(E,v)}function l(y,E){let v=y.length-1,N=E-1,ie=-1,q=!1,oe,de,rt,it,ot=[];for(;++N<=v;){let se=y[N];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?ie++:ie--,it=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(oe&&!it&&!ie&&!rt&&(rt=N),it=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:it=void 0}if(!ie&&se[0]==="enter"&&se[1].type==="listItemPrefix"||ie===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(oe){let Xe=N;for(de=void 0;Xe--;){let we=y[Xe];if(we[1].type==="lineEnding"||we[1].type==="lineEndingBlank"){if(we[0]==="exit")continue;de&&(y[de][1].type="lineEndingBlank",q=!0),we[1].type="lineEnding",de=Xe}else if(!(we[1].type==="linePrefix"||we[1].type==="blockQuotePrefix"||we[1].type==="blockQuotePrefixWhitespace"||we[1].type==="blockQuoteMarker"||we[1].type==="listItemIndent"))break}rt&&(!de||rt<de)&&(oe._spread=!0),oe.end=Object.assign({},de?y[de][1].start:se[1].end),ot.push({at:de||N,event:["exit",oe,se[2]]})}if(se[1].type==="listItemPrefix"){let Xe={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};oe=Xe,ot.push({at:N,event:["enter",Xe,se[2]]}),rt=void 0,it=!0}}}let Lr=y.splice(E),sn=0;for(N=-1;++N<Lr.length;){for(;sn<ot.length&&ot[sn].at===E+N;)y.push(ot[sn++].event);y.push(Lr[N])}y[E][1]._spread=q}function o(y,E){return v;function v(N){s.call(this,y(N),N),E&&E.call(this,N)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(y,E,v){this.stack[this.stack.length-1].children.push(y),this.stack.push(y),this.tokenStack.push([E,v||void 0]),y.position={start:ze(E.start),end:void 0}}function c(y){return E;function E(v){y&&y.call(this,v),u.call(this,v)}}function u(y,E){let v=this.stack.pop(),N=this.tokenStack.pop();if(!N)throw new Error("Cannot close `"+y.type+"` ("+Te({start:y.start,end:y.end})+"): it\u2019s not open");N[0].type!==y.type&&(E?E.call(this,y,N[0]):(N[1]||Pi).call(this,y,N[0])),v.position.end=ze(y.end)}function p(){return An(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function f(y){if(this.data.expectingFirstListItemValue){let E=this.stack[this.stack.length-2];E.start=Number.parseInt(this.sliceSerialize(y),10),this.data.expectingFirstListItemValue=void 0}}function g(){let y=this.resume(),E=this.stack[this.stack.length-1];E.lang=y}function w(){let y=this.resume(),E=this.stack[this.stack.length-1];E.meta=y}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){let y=this.resume(),E=this.stack[this.stack.length-1];E.value=y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function L(){let y=this.resume(),E=this.stack[this.stack.length-1];E.value=y.replace(/(\r?\n|\r)$/g,"")}function C(y){let E=this.resume(),v=this.stack[this.stack.length-1];v.label=E,v.identifier=Ee(this.sliceSerialize(y)).toLowerCase()}function R(){let y=this.resume(),E=this.stack[this.stack.length-1];E.title=y}function _(){let y=this.resume(),E=this.stack[this.stack.length-1];E.url=y}function k(y){let E=this.stack[this.stack.length-1];if(!E.depth){let v=this.sliceSerialize(y).length;E.depth=v}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function H(y){let E=this.stack[this.stack.length-1];E.depth=this.sliceSerialize(y).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function x(y){let v=this.stack[this.stack.length-1].children,N=v[v.length-1];(!N||N.type!=="text")&&(N=ul(),N.position={start:ze(y.start),end:void 0},v.push(N)),this.stack.push(N)}function j(y){let E=this.stack.pop();E.value+=this.sliceSerialize(y),E.position.end=ze(y.end)}function V(y){let E=this.stack[this.stack.length-1];if(this.data.atHardBreak){let v=E.children[E.children.length-1];v.position.end=ze(y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(E.type)&&(x.call(this,y),j.call(this,y))}function A(){this.data.atHardBreak=!0}function F(){let y=this.resume(),E=this.stack[this.stack.length-1];E.value=y}function O(){let y=this.resume(),E=this.stack[this.stack.length-1];E.value=y}function X(){let y=this.resume(),E=this.stack[this.stack.length-1];E.value=y}function K(){let y=this.stack[this.stack.length-1];if(this.data.inReference){let E=this.data.referenceType||"shortcut";y.type+="Reference",y.referenceType=E,delete y.url,delete y.title}else delete y.identifier,delete y.label;this.data.referenceType=void 0}function fe(){let y=this.stack[this.stack.length-1];if(this.data.inReference){let E=this.data.referenceType||"shortcut";y.type+="Reference",y.referenceType=E,delete y.url,delete y.title}else delete y.identifier,delete y.label;this.data.referenceType=void 0}function he(y){let E=this.sliceSerialize(y),v=this.stack[this.stack.length-2];v.label=Ai(E),v.identifier=Ee(E).toLowerCase()}function h(){let y=this.stack[this.stack.length-1],E=this.resume(),v=this.stack[this.stack.length-1];if(this.data.inReference=!0,v.type==="link"){let N=y.children;v.children=N}else v.alt=E}function ce(){let y=this.resume(),E=this.stack[this.stack.length-1];E.url=y}function ye(){let y=this.resume(),E=this.stack[this.stack.length-1];E.title=y}function d(){this.data.inReference=void 0}function ue(){this.data.referenceType="collapsed"}function qe(y){let E=this.resume(),v=this.stack[this.stack.length-1];v.label=E,v.identifier=Ee(this.sliceSerialize(y)).toLowerCase(),this.data.referenceType="full"}function At(y){this.data.characterReferenceType=y.type}function Pt(y){let E=this.sliceSerialize(y),v=this.data.characterReferenceType,N;v?(N=Ot(E,v==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):N=$e(E);let ie=this.stack[this.stack.length-1];ie.value+=N}function ee(y){let E=this.stack.pop();E.position.end=ze(y.end)}function nt(y){j.call(this,y);let E=this.stack[this.stack.length-1];E.url=this.sliceSerialize(y)}function ke(y){j.call(this,y);let E=this.stack[this.stack.length-1];E.url="mailto:"+this.sliceSerialize(y)}function We(){return{type:"blockquote",children:[],position:void 0}}function De(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function un(){return{type:"inlineCode",value:"",position:void 0}}function nl(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function rl(){return{type:"emphasis",children:[],position:void 0}}function Cr(){return{type:"heading",depth:0,children:[],position:void 0}}function Ir(){return{type:"break",position:void 0}}function Tr(){return{type:"html",value:"",position:void 0}}function il(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Ar(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Pr(y){return{type:"list",ordered:y.type==="listOrdered",start:null,spread:y._spread,children:[],position:void 0}}function ol(y){return{type:"listItem",spread:y._spread,checked:null,children:[],position:void 0}}function ll(){return{type:"paragraph",children:[],position:void 0}}function al(){return{type:"strong",children:[],position:void 0}}function ul(){return{type:"text",value:"",position:void 0}}function sl(){return{type:"thematicBreak",position:void 0}}}function ze(e){return{line:e.line,column:e.column,offset:e.offset}}function zi(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?zi(e,r):vu(e,r)}}function vu(e,t){let n;for(n in t)if(Li.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{let r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r);break}}}function Pi(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Te({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Te({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Te({start:t.start,end:t.end})+") is still open")}function je(e){let t=this;t.parser=n;function n(r){return qn(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Di(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ri(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
+
`}]}function vi(e,t){let n=t.value?t.value+`
|
|
6
|
+
`:"",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 Mi(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ni(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oi(e,t){let n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ae(r.toLowerCase()),l=e.footnoteOrder.indexOf(r),o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);let s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);let c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)}function _i(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fi(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Yt(e,t){let n=t.referenceType,r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Bi(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Yt(e,t);let i={src:ae(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function ji(e,t){let n={src:ae(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ui(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Hi(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Yt(e,t);let i={href:ae(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);let l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Vi(e,t){let n={href:ae(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qi(e,t,n){let r=e.all(t),i=n?Mu(n):Wi(t),l={},o=[];if(typeof t.checked=="boolean"){let u=r[0],p;u&&u.type==="element"&&u.tagName==="p"?p=u:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
7
|
+
`}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}let s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
8
|
+
`});let c={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,c),e.applyData(t,c)}function Mu(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Wi(n[r])}return t}function Wi(e){let t=e.spread;return t??e.children.length>1}function Xi(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){let 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}}let 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 Yi(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $i(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Qi(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ki(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){let o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Ye(t.children[1]),s=Nt(t.children[t.children.length-1]);a&&s&&(o.position={start:a,end:s}),i.push(o)}let l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Gi(e,t,n){let r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length,s=-1,c=[];for(;++s<a;){let p=t.children[s],m={},f=o?o[s]:void 0;f&&(m.align=f);let g={type:"element",tagName:l,properties:m,children:[]};p&&(g.children=e.all(p),e.patch(p,g),g=e.applyData(p,g)),c.push(g)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function Ji(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eo(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,l=[];for(;r;)l.push(Zi(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(Zi(t.slice(i),i>0,!1)),l.join("")}function Zi(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===9||l===32;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===9||l===32;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function to(e,t){let n={type:"text",value:eo(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function no(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var ro={blockquote:Di,break:Ri,code:vi,delete:Mi,emphasis:Ni,footnoteReference:Oi,heading:_i,html:Fi,imageReference:Bi,image:ji,inlineCode:Ui,linkReference:Hi,link:Vi,listItem:qi,list:Xi,paragraph:Yi,root:$i,strong:Qi,table:Ki,tableCell:Ji,tableRow:Gi,text:to,thematicBreak:no,toml:$t,yaml:$t,definition:$t,footnoteDefinition:$t};function $t(){}var{defineProperty:Fu}=Object,so=typeof self=="object"?self:globalThis,io=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new so[e](t)},Bu=(e,t)=>{let n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);let[l,o]=t[i];switch(l){case 0:case-1:return n(o,i);case 1:{let a=n([],i);for(let s of o)a.push(r(s));return a}case 2:{let a=n({},i);for(let[s,c]of o){let u=r(s),p=r(c);u==="__proto__"?Fu(a,u,{value:p,configurable:!0,enumerable:!0,writable:!0}):a[u]=p}return a}case 3:return n(new Date(o),i);case 4:{let{source:a,flags:s}=o;return n(new RegExp(a,s),i)}case 5:{let a=n(new Map,i);for(let[s,c]of o)a.set(r(s),r(c));return a}case 6:{let a=n(new Set,i);for(let s of o)a.add(r(s));return a}case 7:{let{name:a,message:s}=o;return n(typeof so[a]=="function"?io(a,s):new Error(s),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}case"-0":return-0}return n(io(l,o),i)};return r},Yn=e=>Bu(new Map,e)(0);var Ue="",{toString:ju}={},{keys:Uu,is:Hu}=Object,kt=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let n=ju.call(e).slice(8,-1);switch(n){case"Array":return[1,Ue];case"Object":return[2,Ue];case"Date":return[3,Ue];case"RegExp":return[4,Ue];case"Map":return[5,Ue];case"Set":return[6,Ue];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:e instanceof Error?[7,e.name||"Error"]:[2,n]},Kt=([e,t])=>e===0&&(t==="function"||t==="symbol"),Vu=(e,t,n,r)=>{let i=(o,a)=>{let s=r.push(o)-1;return n.set(a,s),s},l=o=>{if(n.has(o))return n.get(o);let[a,s]=kt(o);switch(a){case 0:{let u=o;switch(s){case"bigint":a=8,u=o.toString();break;case"number":if(!o&&Hu(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);u=null;break;case"undefined":return i([-1],o)}return i([a,u],o)}case 1:{if(s){let m=o;return s==="DataView"?m=new Uint8Array(o.buffer):s==="ArrayBuffer"&&(m=new Uint8Array(o)),i([s,[...m]],o)}let u=[],p=i([a,u],o);for(let m of o)u.push(l(m));return p}case 2:{if(s)switch(s){case"BigInt":return i([s,o.toString()],o);case"Boolean":case"Number":case"String":return i([s,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());let u=[],p=i([a,u],o);for(let m of Uu(o))(e||!Kt(kt(o[m])))&&u.push([l(m),l(o[m])]);return p}case 3:return i([a,isNaN(o.getTime())?Ue:o.toISOString()],o);case 4:{let{source:u,flags:p}=o;return i([a,{source:u,flags:p}],o)}case 5:{let u=[],p=i([a,u],o);for(let[m,f]of o)(e||!(Kt(kt(m))||Kt(kt(f))))&&u.push([l(m),l(f)]);return p}case 6:{let u=[],p=i([a,u],o);for(let m of o)(e||!Kt(kt(m)))&&u.push(l(m));return p}}let{message:c}=o;return i([a,{name:s,message:c}],o)};return l},$n=(e,{json:t,lossy:n}={})=>{let r=[];return Vu(!(t||n),!!t,new Map,r)(e),r};var Ke=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Yn($n(e,t)):structuredClone(e):(e,t)=>Yn($n(e,t));function qu(e,t){let n=[{type:"text",value:"\u21A9"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Wu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function co(e){let t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||qu,r=e.options.footnoteBackLabel||Wu,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],s=-1;for(;++s<e.footnoteOrder.length;){let c=e.footnoteById.get(e.footnoteOrder[s]);if(!c)continue;let u=e.all(c),p=String(c.identifier).toUpperCase(),m=ae(p.toLowerCase()),f=0,g=[],w=e.footnoteCounts.get(p);for(;w!==void 0&&++f<=w;){g.length>0&&g.push({type:"text",value:" "});let L=typeof n=="string"?n:n(s,f);typeof L=="string"&&(L={type:"text",value:L}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,f),className:["data-footnote-backref"]},children:Array.isArray(L)?L:[L]})}let T=u[u.length-1];if(T&&T.type==="element"&&T.tagName==="p"){let L=T.children[T.children.length-1];L&&L.type==="text"?L.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...g)}else u.push(...g);let b={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(u,!0)};e.patch(c,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ke(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
9
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
10
|
+
`}]}}var Ge=(function(e){if(e==null)return Qu;if(typeof e=="function")return Gt(e);if(typeof e=="object")return Array.isArray(e)?Xu(e):Yu(e);if(typeof e=="string")return $u(e);throw new Error("Expected function, string, or object as test")});function Xu(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Ge(e[n]);return Gt(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Yu(e){let t=e;return Gt(n);function n(r){let i=r,l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function $u(e){return Gt(t);function t(n){return n&&n.type===e}}function Gt(e){return t;function t(n,r,i){return!!(Ku(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Qu(){return!0}function Ku(e){return e!==null&&typeof e=="object"&&"type"in e}var fo=[],Qn=!0,wt=!1,Je="skip";function bt(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,l,o,a,s;if(typeof n=="function"||n&&typeof n=="object"?(l=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o=="function")a=o;else if(o&&typeof o=="object"){if(!(o.enter===null||o.enter===void 0))if(typeof o.enter=="function")a=o.enter;else throw new Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor");if(typeof o.exit=="function")s=o.exit;else throw new Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let c=Ge(l),u=i?1:-1;p(e,void 0,[])();function p(m,f,g){let w=m&&typeof m=="object"?m:{};if(typeof w.type=="string"){let b=typeof w.tagName=="string"?w.tagName:typeof w.name=="string"?w.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return T;function T(){let b=!l||c(m,f,g[g.length-1]||void 0),L=fo;if(a&&b&&(L=po(a(m,g,f)),L[0]===wt))return L;if("children"in m&&m.children){let C=m;if(C.children&&L[0]!==Je){let R=(i?-1:C.children.length)+u,_=[...g,C];for(;R>-1&&R<C.children.length;){let k=C.children[R],M=p(k,R,_)();if(M[0]===wt)return M;R=typeof M[1]=="number"?M[1]:R+u}}}if(s&&b){let C=po(s(m,g,f));if(C[0]===Je)throw new Error("Unexpected value `"+C[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(C[0]===wt||typeof C[1]=="number")return C}return L}}}function po(e){return Array.isArray(e)?e:typeof e=="number"?[Qn,e]:e==null?fo:[e]}function St(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),bt(e,l,a,i);function a(s,c){let u=c[c.length-1],p=u?u.children.indexOf(s):void 0;return o(s,p,u)}}var Kn={}.hasOwnProperty,Gu={};function ho(e,t){let n=t||Gu,r=new Map,i=new Map,l=new Map,o={...ro,...n.handlers},a={all:c,applyData:Zu,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:s,options:n,patch:Ju,wrap:ts};return St(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){let p=u.type==="definition"?r:i,m=String(u.identifier).toUpperCase();p.has(m)||p.set(m,u)}}),a;function s(u,p){let m=u.type,f=a.handlers[m];if(Kn.call(a.handlers,m)&&f)return f(a,u,p);if(a.options.passThrough&&a.options.passThrough.includes(m)){if("children"in u){let{children:w,...T}=u,b=Ke(T);return b.children=a.all(u),b}return Ke(u)}return(a.options.unknownHandler||es)(a,u,p)}function c(u){let p=[];if("children"in u){let m=u.children,f=-1;for(;++f<m.length;){let g=a.one(m[f],u);if(g){if(f&&m[f-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=mo(g.value)),!Array.isArray(g)&&g.type==="element")){let w=g.children[0];w&&w.type==="text"&&(w.value=mo(w.value))}Array.isArray(g)?p.push(...g):p.push(g)}}}return p}}function Ju(e,t){e.position&&(t.position=bn(e))}function Zu(e,t){let n=t;if(e&&e.data){let r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{let o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,Ke(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function es(e,t){let n=t.data||{},r="value"in t&&!(Kn.call(n,"hProperties")||Kn.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 ts(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:`
|
|
11
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
12
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
13
|
+
`}),n}function mo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Jt(e,t){let n=ho(e,t),r=n.one(e,void 0),i=co(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&("children"in l,l.children.push({type:"text",value:`
|
|
14
|
+
`},i)),l}function Zt(e,t){return e&&"run"in e?async function(n,r){let i=Jt(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Jt(n,{file:r,...e||t})}}function Gn(e){if(e)throw e}var nn=Dr(Co(),1);function Et(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Jn(){let e=[],t={run:n,use:r};return t;function n(...i){let l=-1,o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(s,...c){let u=e[++l],p=-1;if(s){o(s);return}for(;++p<i.length;)(c[p]===null||c[p]===void 0)&&(c[p]=i[p]);i=c,u?Io(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Io(e,t){let n;return r;function r(...o){let a=e.length>o.length,s;a&&o.push(i);try{s=e.apply(this,o)}catch(c){let u=c;if(a&&n)throw u;return i(u)}a||(s&&s.then&&typeof s.then=="function"?s.then(l,i):s instanceof Error?i(s):l(s))}function i(o,...a){n||(n=!0,t(o,...a))}function l(o){i(null,o)}}var me={basename:ns,dirname:rs,extname:is,join:os,sep:"/"};function ns(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ct(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,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function rs(e){if(Ct(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 is(e){Ct(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){let a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===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 os(...e){let t=-1,n;for(;++t<e.length;)Ct(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ls(n)}function ls(e){Ct(e);let t=e.codePointAt(0)===47,n=as(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function as(e,t){let n="",r=0,i=-1,l=0,o=-1,a,s;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===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(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),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 a===46&&l>-1?l++:l=-1}return n}function Ct(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var To={cwd:us};function us(){return"/"}function Ze(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ao(e){if(typeof e=="string")e=new URL(e);else if(!Ze(e)){let 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:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ss(e)}function ss(e){if(e.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let r=t.codePointAt(n+2);if(r===70||r===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}var Zn=["history","path","basename","stem","extname","dirname"],He=class{constructor(t){let n;t?Ze(t)?n={path:t}:typeof t=="string"||cs(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":To.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Zn.length;){let l=Zn[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)Zn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?me.basename(this.path):void 0}set basename(t){tr(t,"basename"),er(t,"basename"),this.path=me.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?me.dirname(this.path):void 0}set dirname(t){Po(this.basename,"dirname"),this.path=me.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?me.extname(this.path):void 0}set extname(t){if(er(t,"extname"),Po(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=me.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ze(t)&&(t=Ao(t)),tr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?me.basename(this.path,this.extname):void 0}set stem(t){tr(t,"stem"),er(t,"stem"),this.path=me.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){let i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){let i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){let i=new Q(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 er(e,t){if(e&&e.includes(me.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+me.sep+"`")}function tr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Po(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cs(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Lo=(function(e){let r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l});var ps={}.hasOwnProperty,or=class e extends Lo{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=Jn()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let r=this.attachers[n];t.use(...r)}return t.data((0,nn.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ir("data",this.frozen),this.namespace[t]=n,this):ps.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ir("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let 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();let n=tn(t),r=this.parser||this.Parser;return nr("parse",r),r(String(n),n)}process(t,n){let r=this;return this.freeze(),nr("process",this.parser||this.Parser),rr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){let a=tn(t),s=r.parse(a);r.run(s,a,function(u,p,m){if(u||!p||!m)return c(u);let f=p,g=r.stringify(f,m);ms(g)?m.value=g:m.result=g,c(u,m)});function c(u,p){u||!p?o(u):l?l(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),nr("processSync",this.parser||this.Parser),rr("processSync",this.compiler||this.Compiler),this.process(t,i),Do("processSync","process",n),r;function i(l,o){n=!0,Gn(l),r=o}}run(t,n,r){zo(t),this.freeze();let i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,a){let s=tn(n);i.run(t,s,c);function c(u,p,m){let f=p||t;u?a(u):o?o(f):r(void 0,f,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),Do("runSync","run",r),i;function l(o,a){Gn(o),i=a,r=!0}}stringify(t,n){this.freeze();let r=tn(n),i=this.compiler||this.Compiler;return rr("stringify",i),zo(t),i(t,r)}use(t,...n){let r=this.attachers,i=this.namespace;if(ir("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(c){if(typeof c=="function")s(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[u,...p]=c;s(u,p)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=(0,nn.default)(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){let p=c[u];l(p)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function s(c,u){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===c){m=p;break}if(m===-1)r.push([c,...u]);else if(u.length>0){let[f,...g]=u,w=r[m][1];Et(w)&&Et(f)&&(f=(0,nn.default)(!0,w,f)),r[m]=[c,f,...g]}}}},et=new or().freeze();function nr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ir(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 zo(e){if(!Et(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Do(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function tn(e){return fs(e)?e:new He(e)}function fs(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ms(e){return typeof e=="string"||hs(e)}function hs(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var ys="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ro=[],vo={allowDangerousHtml:!0},ks=/^(https?|ircs?|mailto|xmpp)$/i,ws=[{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 lr(e){let t=bs(e),n=Ss(e);return Es(t.runSync(t.parse(n),n),e)}function bs(e){let t=e.rehypePlugins||Ro,n=e.remarkPlugins||Ro,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vo}:vo;return et().use(je).use(n).use(Zt,r).use(t)}function Ss(e){let t=e.children||"",n=new He;return typeof t=="string"?n.value=t:(""+t,void 0),n}function Es(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||Mo;for(let u of ws)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+ys+u.id,void 0);return n&&l&&void 0,St(e,c),Cn(e,{Fragment:ds,components:i,ignoreInvalidStyle:!0,jsx:gs,jsxs:xs,passKeys:!0,passNode:!0});function c(u,p,m){if(u.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:u.value},p;if(u.type==="element"){let f;for(f in ft)if(Object.hasOwn(ft,f)&&Object.hasOwn(u.properties,f)){let g=u.properties[f],w=ft[f];(w===null||w.includes(u.tagName))&&(u.properties[f]=s(String(g||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):l?l.includes(u.tagName):!1;if(!f&&r&&typeof p=="number"&&(f=!r(u,p,m)),f&&m&&typeof p=="number")return a&&u.children?m.children.splice(p,1,...u.children):m.children.splice(p,1),p}}}function Mo(e){let 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||ks.test(e.slice(0,t))?e:""}var Cs={tokenize:Ls,partial:!0},No={tokenize:zs,partial:!0},Oo={tokenize:Ds,partial:!0},_o={tokenize:Rs,partial:!0},Is={tokenize:vs,partial:!0},Fo={name:"wwwAutolink",tokenize:As,previous:jo},Bo={name:"protocolAutolink",tokenize:Ps,previous:Uo},Ie={name:"emailAutolink",tokenize:Ts,previous:Ho},xe={};function ur(){return{text:xe}}var Ve=48;for(;Ve<123;)xe[Ve]=Ie,Ve++,Ve===58?Ve=65:Ve===91&&(Ve=97);xe[43]=Ie;xe[45]=Ie;xe[46]=Ie;xe[95]=Ie;xe[72]=[Ie,Bo];xe[104]=[Ie,Bo];xe[87]=[Ie,Fo];xe[119]=[Ie,Fo];function Ts(e,t,n){let r=this,i,l;return o;function o(p){return!ar(p)||!Ho.call(r,r.previous)||sr(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(p))}function a(p){return ar(p)?(e.consume(p),a):p===64?(e.consume(p),s):n(p)}function s(p){return p===46?e.check(Is,u,c)(p):p===45||p===95||$(p)?(l=!0,e.consume(p),s):u(p)}function c(p){return e.consume(p),i=!0,s}function u(p){return l&&i&&G(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function As(e,t,n){let r=this;return i;function i(o){return o!==87&&o!==119||!jo.call(r,r.previous)||sr(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Cs,e.attempt(No,e.attempt(Oo,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Ps(e,t,n){let r=this,i="",l=!1;return o;function o(p){return(p===72||p===104)&&Uo.call(r,r.previous)&&!sr(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),a):n(p)}function a(p){if(G(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),a;if(p===58){let m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(p),s}return n(p)}function s(p){return p===47?(e.consume(p),l?c:(l=!0,s)):n(p)}function c(p){return p===null||Ne(p)||B(p)||ge(p)||Oe(p)?n(p):e.attempt(No,e.attempt(Oo,u),n)(p)}function u(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Ls(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 zs(e,t,n){let r,i,l;return o;function o(c){return c===46||c===95?e.check(_o,s,a)(c):c===null||B(c)||ge(c)||c!==45&&Oe(c)?s(c):(l=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function s(c){return i||r||!l?n(c):t(c)}}function Ds(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(_o,t,l)(o):o===null||B(o)||ge(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function Rs(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),l):a===93?(e.consume(a),i):a===60||a===null||B(a)||ge(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||B(a)||ge(a)?t(a):r(a)}function l(a){return G(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):G(a)?(e.consume(a),o):n(a)}}function vs(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return $(l)?n(l):t(l)}}function jo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||B(e)}function Uo(e){return!G(e)}function Ho(e){return!(e===47||ar(e))}function ar(e){return e===43||e===45||e===46||e===95||$(e)}function sr(e){let t=e.length,n=!1;for(;t--;){let 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}function cr(e){let n=(e||{}).singleTilde,r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let s=-1;for(;++s<o.length;)if(o[s][0]==="enter"&&o[s][1].type==="strikethroughSequenceTemporary"&&o[s][1]._close){let c=s;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[s][1].end.offset-o[s][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[s][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";let u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[s][1].end)},p={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[s][1].start)},m=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",p,a]],f=a.parser.constructs.insideSpan.null;f&&Z(m,m.length,0,Pe(f,o.slice(c+1,s),a)),Z(m,m.length,0,[["exit",p,a],["enter",o[s][1],a],["exit",o[s][1],a],["exit",u,a]]),Z(o,c-1,s-c+3,m),s=c+m.length-2;break}}for(s=-1;++s<o.length;)o[s][1].type==="strikethroughSequenceTemporary"&&(o[s][1].type="data");return o}function l(o,a,s){let c=this.previous,u=this.events,p=0;return m;function m(g){return c===126&&u[u.length-1][1].type!=="characterEscape"?s(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){let w=Qe(c);if(g===126)return p>1?s(g):(o.consume(g),p++,f);if(p<2&&!n)return s(g);let T=o.exit("strikethroughSequenceTemporary"),b=Qe(g);return T._open=!b||b===2&&!!w,T._close=!w||w===2&&!!b,a(g)}}}var rn=class{constructor(){this.map=[],this.index=new Map}add(t,n,r){Ms(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,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(let l of i)t.push(l);i=r.pop()}this.map.length=0,this.index.clear()}};function Ms(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let l=[t,n,r];e.map.push(l),e.index.set(t,l)}function Vo(e,t){let n=!1,r=[];for(;t<e.length;){let 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"){let 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 pr(){return{flow:{null:{name:"table",tokenize:Ns,resolveAll:Os}}}}function Ns(e,t,n){let r=this,i=0,l=0,o;return a;function a(x){let j=r.events.length-1;for(;j>-1;){let{type:F}=r.events[j][1];if(F==="lineEnding"||F==="linePrefix")j--;else break}let V=j>-1?r.events[j][1].type:null,A=V==="tableHead"||V==="tableRow"?k:s;return A===k&&r.parser.lazy[r.now().line]?n(x):A(x)}function s(x){return e.enter("tableHead"),e.enter("tableRow"),c(x)}function c(x){return x===124||(o=!0,l+=1),u(x)}function u(x){return x===null?n(x):I(x)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),f):n(x):P(x)?z(e,u,"whitespace")(x):(l+=1,o&&(o=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),p(x)))}function p(x){return x===null||x===124||B(x)?(e.exit("data"),u(x)):(e.consume(x),x===92?m:p)}function m(x){return x===92||x===124?(e.consume(x),p):p(x)}function f(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(x):(e.enter("tableDelimiterRow"),o=!1,P(x)?z(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):g(x))}function g(x){return x===45||x===58?T(x):x===124?(o=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),w):_(x)}function w(x){return P(x)?z(e,T,"whitespace")(x):T(x)}function T(x){return x===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),b):x===45?(l+=1,b(x)):x===null||I(x)?R(x):_(x)}function b(x){return x===45?(e.enter("tableDelimiterFiller"),L(x)):_(x)}function L(x){return x===45?(e.consume(x),L):x===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(x))}function C(x){return P(x)?z(e,R,"whitespace")(x):R(x)}function R(x){return x===124?g(x):x===null||I(x)?!o||i!==l?_(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(x)):_(x)}function _(x){return n(x)}function k(x){return e.enter("tableRow"),M(x)}function M(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),M):x===null||I(x)?(e.exit("tableRow"),t(x)):P(x)?z(e,M,"whitespace")(x):(e.enter("data"),H(x))}function H(x){return x===null||x===124||B(x)?(e.exit("data"),M(x)):(e.consume(x),x===92?W:H)}function W(x){return x===92||x===124?(e.consume(x),H):H(x)}}function Os(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],a=!1,s=0,c,u,p,m=new rn;for(;++n<e.length;){let f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(qo(m,t,s,c,u),u=void 0,s=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,p=void 0,l=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",u,t]])),i=g.type==="tableDelimiterRow"?2:u?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],p=on(m,t,l,i,void 0,p),l=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],p=on(m,t,l,i,void 0,p)),l=o,o=[l[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,l[1]!==0?(o[0]=o[1],p=on(m,t,l,i,n,p)):o[1]!==0&&(p=on(m,t,o,i,n,p)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(s!==0&&qo(m,t,s,c,u),m.consume(t.events),n=-1;++n<t.events.length;){let f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=Vo(t.events,n))}return e}function on(e,t,n,r,i,l){let o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(l.end=Object.assign({},tt(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));let s=tt(t.events,n[1]);if(l={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){let c=tt(t.events,n[2]),u=tt(t.events,n[3]),p={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){let m=t.events[n[2]],f=t.events[n[3]];if(m[1].end=Object.assign({},f[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){let g=n[2]+1,w=n[3]-n[2]-1;e.add(g,w,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(l.end=Object.assign({},tt(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function qo(e,t,n,r,i){let l=[],o=tt(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 tt(e,t){let n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var _s={name:"tasklistCheck",tokenize:Fs};function fr(){return{text:{91:_s}}}function Fs(e,t,n){let r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),l)}function l(s){return B(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),o):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),o):n(s)}function o(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return I(s)?t(s):P(s)?e.check({tokenize:Bs},t,n)(s):n(s)}}function Bs(e,t,n){return z(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function mr(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function hr(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function dr(e,t,n){let i=Ge((n||{}).ignore||[]),l=js(t),o=-1;for(;++o<l.length;)bt(e,a);function a(c,u,p){if(c.type==="text"&&typeof p=="number")return s(c,u,p);if(i(c,p,u[u.length-1]))return Je}function s(c,u,p){let m=u[u.length-1],f=l[o][0],g=l[o][1],w=0,T=!1,b=[];f.lastIndex=0;let L=f.exec(c.value);for(;L;){let R=L.index,_={index:L.index,input:L.input,stack:[...u,c]},k=g(...L,_);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1)f.lastIndex=R+1;else{if(w!==R&&C({type:"text",value:c.value.slice(w,R)}),Array.isArray(k))for(let M of k)C(M);else k&&C(k);w=R+L[0].length,T=!0}if(!f.global)break;L=f.exec(c.value)}return T?(w<c.value.length&&C({type:"text",value:c.value.slice(w)}),m.children.splice(p,1,...b)):b=[c],p+b.length;function C(R){let _=b[b.length-1];_&&_.type==="text"&&R.type==="text"?_.value+=R.value:b.push(R)}}}function js(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let i=n[r];t.push([Us(i[0]),Hs(i[1])])}return t}function Us(e){return typeof e=="string"?new RegExp(hr(e),"g"):e}function Hs(e){return typeof e=="function"?e:function(){return e}}function xr(){return{transforms:[$s],enter:{literalAutolink:Vs,literalAutolinkEmail:gr,literalAutolinkHttp:gr,literalAutolinkWww:gr},exit:{literalAutolink:Ys,literalAutolinkEmail:Xs,literalAutolinkHttp:qs,literalAutolinkWww:Ws}}}function Vs(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function gr(e){this.config.enter.autolinkProtocol.call(this,e)}function qs(e){this.config.exit.autolinkProtocol.call(this,e)}function Ws(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Xs(e){this.config.exit.autolinkEmail.call(this,e)}function Ys(e){this.exit(e)}function $s(e){dr(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Qs],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ks]],{ignore:["link","linkReference"]})}function Qs(e,t,n,r,i){let l="";if(!Wo(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!Gs(n)))return!1;let o=Js(n+r);if(!o[0])return!1;let a={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function Ks(e,t,n,r){return!Wo(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Gs(e){let 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 Js(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=mr(e,"("),l=mr(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 Wo(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||ge(n)||Oe(n))&&(!t||n!==47)}Xo.attention=tc;Xo.peek=nc;function yr(){return{canContainEols:["delete"],enter:{strikethrough:Zs},exit:{strikethrough:ec}}}function Zs(e){this.enter({type:"delete",children:[],position:void 0},e)}function ec(e){this.exit(e)}function Xo(e,t,n,r){let i=n.createTracker(r),l=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough"),a=i.move(l);return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move(l),o(),a}function tc(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function nc(){return"~"}function wr(){return{enter:{table:rc,tableData:Yo,tableHeader:Yo,tableRow:oc},exit:{codeText:lc,table:ic,tableData:kr,tableHeader:kr,tableRow:kr}}}function rc(e){let t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function ic(e){this.exit(e),this.data.inTable=void 0}function oc(e){this.enter({type:"tableRow",children:[]},e)}function kr(e){this.exit(e)}function Yo(e){this.enter({type:"tableCell",children:[]},e)}function lc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ac));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ac(e,t){return t==="|"?t:e}function br(){return{exit:{taskListCheckValueChecked:$o,taskListCheckValueUnchecked:$o,paragraph:uc}}}function $o(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function uc(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let n=this.stack[this.stack.length-1];n.type;let r=n.children[0];if(r&&r.type==="text"){let i=t.children,l=-1,o;for(;++l<i.length;){let a=i[l];if(a.type==="paragraph"){o=a;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 It(){let e=this.data();(e.micromarkExtensions??=[]).push(ur(),cr(),pr(),fr()),(e.fromMarkdownExtensions??=[]).push(xr(),yr(),wr(),br())}import{Fragment as vc,jsx as re,jsxs as Sr}from"react/jsx-runtime";function Zo(e,t,n){let r=!1;if(t?.origin)try{r=new URL(e,t.origin).origin===new URL(t.origin).origin}catch{r=!1}return at(e,n)&&(r||!!t?.allow?.(e))}var mc=new Set(["paragraph","heading","listItem","blockquote","tableCell","code"]);function bk(e,t={}){let n=et().use(je).use(It),r=n.runSync(n.parse(e)),i=new Map,l=c=>{c.type==="definition"&&c.identifier!==void 0&&!i.has(c.identifier)&&i.set(c.identifier,c.url??"");for(let u of c.children??[])l(u)};l(r);let o=(c,u)=>{let p=u?ae(u):void 0;(!p||!Zo(p,t.images,t.extraSchemes))&&a.push(c.alt??"")},a=[],s=c=>{switch(c.type){case"text":case"inlineCode":case"code":a.push(c.value??"");break;case"html":case"definition":case"footnoteDefinition":return;case"image":o(c,c.url);return;case"imageReference":o(c,i.get(c.identifier??""));return;case"break":a.push(" ");return;default:for(let u of c.children??[])s(u)}mc.has(c.type)&&a.push(" ")};return s(r),a.join("").replace(/\s+/g," ").trim()}var hc=/^ {0,3}(`{3,}|~{3,})(.*)$/;function dc(e){let t,n=0,r=0;for(let i of e.split(`
|
|
15
|
+
`)){r+=i.length+1;let l=hc.exec(i.replace(/\r$/,""));if(!l)continue;let o=l[1],a=l[2];t===void 0?(o[0]!=="`"||!a.includes("`"))&&(t=o):o[0]===t[0]&&o.length>=t.length&&/^[ \t]*$/.test(a)&&(t=void 0,n=r)}return{open:t,after:n}}function gc(e){let{open:t,after:n}=dc(e);if(t!==void 0)return`${e}
|
|
16
|
+
${t}`;let r=e.slice(Math.max(e.lastIndexOf(`
|
|
17
|
+
|
|
18
|
+
`)+1,n)).replace(/\\./g,"");if((r.match(/`/g)??[]).length%2)return`${e}\``;let i=r.replace(/`[^`]*`/g,""),l="";for(let o of["**","~~"])(i.split(o).length-1)%2&&(l=o+l);return e+l}var xc=4096,Qo=new Map;function Ko(e,t,n){if(t>=e.length)return e.length;let r=Qo.get(n??"");r||Qo.set(n??"",r=new Intl.Segmenter(n,{granularity:"word"}));let i=Math.min(e.length,t+xc),l=[...r.segment(e.slice(t,i))],o=l.filter(c=>c.isWordLike).length,a=Math.max(1,Math.floor(o/8)),s=t;for(let c of l)if(c.isWordLike){let u=t+c.index+c.segment.length;if(u===i)break;if(s=u,--a===0)return s}return s}var yc=400,kc=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function wc(e,t,n){let[r,i]=fc(()=>t?Ko(e,0,n):e.length),l=Jo(""),o=t?e.startsWith(l.current)?Math.min(r,e.length):0:e.length;return l.current=e.slice(0,o),pc(()=>{if(!t||o>=e.length)return;let a=Ko(e,o,n);if(a===o){let c=setTimeout(()=>i(e.length),yc);return()=>clearTimeout(c)}let s=requestAnimationFrame(()=>i(a));return()=>cancelAnimationFrame(s)},[t,o,e,n]),l.current}var el="dataWpCite",bc=new Set(["inlineCode","code","link","linkReference"]);function Sc(e){let{sources:t,safe:n}=e,r=l=>{let o=[],a=0;for(let s of l.matchAll(/\[(\d+)\]/g)){let c=Number(s[1]),u=t[c-1];!u||!n(u)||(s.index>a&&o.push({type:"text",value:l.slice(a,s.index)}),o.push({type:"link",url:u.url,children:[{type:"text",value:s[0]}],data:{hProperties:{[el]:c}}}),a=s.index+s[0].length)}return o.length?(a<l.length&&o.push({type:"text",value:l.slice(a)}),o):[{type:"text",value:l}]},i=l=>{bc.has(l.type)||!l.children||(l.children=l.children.flatMap(o=>o.type==="text"?r(o.value??""):(i(o),[o])))};return l=>{t.length&&i(l)}}var Tt=sc({text:""}),Ec={pre:function({children:t}){let{scrollLabel:n}=ln(Tt);return re("pre",{"data-scroll-region":"",tabIndex:0,"aria-label":n,children:t})},table:function({children:t}){let{scrollLabel:n}=ln(Tt);return re("div",{"data-scroll-region":"",tabIndex:0,role:"region","aria-label":n,children:re("table",{children:t})})},img:function({src:t,alt:n}){let{images:r,extraSchemes:i}=ln(Tt);return t?Zo(t,r,i)?re("img",{src:t,alt:n??""}):re("a",{href:t,rel:"noreferrer noopener",children:n||t}):re("span",{children:n})},a:function({href:t,children:n,node:r}){let{sources:i,sourceNames:l}=ln(Tt),o=Number(r?.properties?.[el]??0),a=o?i?.[o-1]:void 0;return a&&t?re("a",{href:t,rel:"noreferrer noopener",target:"_blank","data-wp-cite":"","aria-label":l?.item(o,a.title),children:n}):t?re("a",{href:t,rel:"noreferrer noopener",children:n}):re("span",{children:n})}};function an(e,t,n){return lr({skipHtml:!0,remarkPlugins:[It,[Sc,{sources:t,safe:i=>at(i.url,n)}]],urlTransform:i=>at(i,n)?i:void 0,components:Ec,children:e})}var Cc=cc(function(t){return an(tl(t.definitions,t.text),t.sources,t.extraSchemes)}),Ic=[],Tc;function Ac(){return et().use(je).use(It)}var Pc=e=>e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase().toLowerCase();function Lc(e){let t=(e.url??"").replace(/[\\<>&]/g,"\\$&"),n=e.title==null?"":` "${e.title.replace(/[\\"&]/g,"\\$&")}"`;return`[${e.identifier}]: <${t}>${n}`}var zc=e=>[...e.matchAll(/\[((?:\\.|[^[\]\\])*)\]/g)].map(t=>Pc(t[1].replace(/\n[ \t]*(?:>[ \t]?)*/g," "))),tl=(e,t)=>e?`${e}
|
|
19
|
+
|
|
20
|
+
${t}`:t;function Er(e,t){e.type==="definition"&&e.identifier!==void 0&&!t.has(e.identifier)&&t.set(e.identifier,Lc(e));for(let n of e.children??[])Er(n,t)}function Dc(e,t){let n=t&&e.startsWith(t.text)?{...t,text:e}:{text:e,starts:[0],read:0,kept:new Map,definitions:new Map},r=e.lastIndexOf(`
|
|
21
|
+
`)+1;if(r<=n.read)return n;n.read=r;let i=n.starts.at(-1),o=(Tc??=Ac()).parse(e.slice(i,r)),a=m=>e.lastIndexOf(`
|
|
22
|
+
`,i+m-1)+1,s=new Map(n.kept);o.children.forEach((m,f)=>{if(f===0)return;let g=a(m.position.start.offset);if(g>n.starts.at(-1)){for(let w of o.children.slice(0,f))a(w.position.start.offset)<g&&Er(w,s);n.starts.push(g)}});let c=n.starts.at(-1),u=new Map(s);for(let m of o.children)a(m.position.start.offset)>=c&&Er(m,u);return n.kept=s,u.size===n.definitions.size&&[...u].every(([m,f])=>n.definitions.get(m)===f)||(n.definitions=u),n}function Go(e,t){if(!t.size||!e.includes("]"))return"";let n=new Set;for(let r of zc(e)){let i=t.get(r);i!==void 0&&n.add(i)}return[...n].join(`
|
|
23
|
+
`)}function Rc(e){let{text:t,extraSchemes:n,sources:r=Ic}=e,i=c=>at(c.url,n),l=kc(),o=wc(t,!!e.writing&&!l,e.lang),a=Jo(void 0),s;if(e.writing){let c=a.current=Dc(o,a.current),u=c.starts.filter(f=>f<=o.length),p=u.at(-1),m=gc(o.slice(p));s=Sr(vc,{children:[u.slice(0,-1).map((f,g)=>{let w=o.slice(f,u[g+1]);return re(Cc,{text:w,definitions:Go(w,c.definitions),sources:r,extraSchemes:n},f)}),an(tl(Go(m,c.definitions),m),r,n)]})}else a.current=void 0,s=e.cached?e.cached(()=>an(t,r,n)):an(t,r,n);return Sr("div",{className:"wp-markdown","data-fade":e.writing&&l?"":void 0,children:[re(Tt.Provider,{value:e,children:s}),r.length?Sr("details",{"data-sources":"","aria-label":e.sourceNames?.list(r.length),children:[re("summary",{children:e.sourceNames?.list(r.length)}),re("ol",{children:r.map(c=>re("li",{children:i(c)?re("a",{href:c.url,rel:"noreferrer noopener",target:"_blank",children:c.title}):c.title},c.id))})]}):null]})}export{Dc as blockStarts,gc as closeOpenMarkdown,Rc as default,Go as definitionsFor,Ko as nextReveal,bk as visibleText};
|