adminizer 5.1.0-build.28 → 5.2.0-build.30
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/assets/{abnfDiagram-VCTEODGH-uWOVpoSR.js → abnfDiagram-VCTEODGH-BhZn7BLv.js} +1 -1
- package/assets/{add-A_fIlNKI.js → add-DDfJt70P.js} +1 -1
- package/assets/{add-group-C2x6K3tV.js → add-group-Cs3S9VVn.js} +1 -1
- package/assets/{add-user-u61kYlEm.js → add-user-DxI_sJLw.js} +1 -1
- package/assets/ai-assistant/agent.es.js +14736 -11737
- package/assets/app-DM8KzeFz.css +1 -0
- package/assets/app-DOMFUTFw.js +138 -0
- package/assets/{arc--ZX64bmY.js → arc-BRY7wCfa.js} +1 -1
- package/assets/{architectureDiagram-5GKGNRK7-W9AzLZvl.js → architectureDiagram-5GKGNRK7-DfBT7jAW.js} +1 -1
- package/assets/{blockDiagram-I7D4REHJ-BpK_yEa7.js → blockDiagram-I7D4REHJ-CW2mcR7Z.js} +1 -1
- package/assets/{c4Diagram-7LVT6UL2-DiQzU1s0.js → c4Diagram-7LVT6UL2-BGsyO-4Y.js} +1 -1
- package/assets/{catalog-dSCv3Szm.js → catalog-cyCZOCXs.js} +3 -3
- package/assets/channel-Bd-bsjgh.js +1 -0
- package/assets/{chunk-2Q5K7J3B-GPHETbCq.js → chunk-2Q5K7J3B-4EnjsYhG.js} +1 -1
- package/assets/{chunk-5VM5RSS4-bLovkogd.js → chunk-5VM5RSS4-BVzmz0IS.js} +1 -1
- package/assets/{chunk-F27PBJKO-DbkTY41z.js → chunk-F27PBJKO-Bkf9Z4lt.js} +1 -1
- package/assets/{chunk-IMKFNOWR-CL0VAxX7.js → chunk-IMKFNOWR-Dg6Y3xGC.js} +1 -1
- package/assets/{chunk-JWPE2WC7-d1Grk14b.js → chunk-JWPE2WC7-BdVNpqE2.js} +1 -1
- package/assets/{chunk-POPQ4Y6H-CAUhiiNt.js → chunk-POPQ4Y6H-0R-etdBM.js} +1 -1
- package/assets/{chunk-SVP7TREG-C8ADZUEr.js → chunk-SVP7TREG-CdABJwLU.js} +1 -1
- package/assets/{chunk-TICWLB2K-oRqFZabo.js → chunk-TICWLB2K-Da-oSw37.js} +1 -1
- package/assets/{chunk-XXDRQBXY-C3zo4c2P.js → chunk-XXDRQBXY-Ba8BsH2Z.js} +1 -1
- package/assets/classDiagram-ZZMXUADV-BftNBmvr.js +1 -0
- package/assets/classDiagram-v2-VYDZK3BY-BftNBmvr.js +1 -0
- package/assets/controls/ckeditor.es.js +10659 -10551
- package/assets/controls/handsontable.es.js +9053 -8479
- package/assets/controls/jsoneditor.es.js +641 -614
- package/assets/controls/leaflet.es.js +672 -663
- package/assets/controls/toast-ui.es.js +13696 -13676
- package/assets/{cose-bilkent-JH36ORCC-ZPvVaI6n.js → cose-bilkent-JH36ORCC-BYrWDdVx.js} +1 -1
- package/assets/{cynefin-OW5HDTMX-EEL4eqU7.js → cynefin-OW5HDTMX-CwHzXvDB.js} +1 -1
- package/assets/{cynefinDiagram-5FMLGOSQ-DpDFbbrn.js → cynefinDiagram-5FMLGOSQ-V6tH6arn.js} +1 -1
- package/assets/{dagre-GXQ25YYZ-Dtjy1xN1.js → dagre-GXQ25YYZ-CaBvafdG.js} +1 -1
- package/assets/{dashboard-DXs-vdJG.js → dashboard-C27hB1GI.js} +1 -1
- package/assets/{diagram-S7CK7UJ4-BhWisCOy.js → diagram-S7CK7UJ4-85jkE9hd.js} +1 -1
- package/assets/{diagram-UQ7AKVKN-BBH2Mm33.js → diagram-UQ7AKVKN-DHJRq1TM.js} +1 -1
- package/assets/{diagram-VSXAHHWV-B1Xc2cPz.js → diagram-VSXAHHWV-C74VLfSc.js} +1 -1
- package/assets/{diagram-VX7I27RA-CTTYzy1s.js → diagram-VX7I27RA-CVJcG5hn.js} +1 -1
- package/assets/{diagram-Z3DM3KII-DdH0yWH0.js → diagram-Z3DM3KII-B8ybg5RA.js} +1 -1
- package/assets/{docs-BZYlfOON.js → docs-CK6W0Jko.js} +1 -1
- package/assets/{ebnfDiagram-PWID7BFC-R9cSqf0y.js → ebnfDiagram-PWID7BFC-D_gz_iz6.js} +1 -1
- package/assets/{erDiagram-RLTQ6QDP-Bpu-Pm95.js → erDiagram-RLTQ6QDP-D3W95aGH.js} +1 -1
- package/assets/{flowDiagram-HODETNUW-NdXf-fRN.js → flowDiagram-HODETNUW-D2PTWIEg.js} +1 -1
- package/assets/{ganttDiagram-EL5Y4UJY-itQHv_dH.js → ganttDiagram-EL5Y4UJY-TFBUh0C6.js} +1 -1
- package/assets/{gitGraphDiagram-WWUBYQGX-DorHK4Wx.js → gitGraphDiagram-WWUBYQGX-BfFJzeqx.js} +1 -1
- package/assets/{history-DB48MCa8.js → history-DX6CEQqv.js} +1 -1
- package/assets/{infoDiagram-27XIBGKW-FgFATKk4.js → infoDiagram-27XIBGKW-esGmrWiw.js} +1 -1
- package/assets/{init-user-DAXb55S_.js → init-user-D1G_dbcZ.js} +1 -1
- package/assets/{ishikawaDiagram-5VMMS53U-Bjl1a496.js → ishikawaDiagram-5VMMS53U--aGHPnva.js} +1 -1
- package/assets/{journeyDiagram-3NMN7TZE-DU1TmnbI.js → journeyDiagram-3NMN7TZE-03BXeE8O.js} +1 -1
- package/assets/{kanban-definition-UXKFOSKX-BsrlKdcU.js → kanban-definition-UXKFOSKX-JdDv2WHg.js} +1 -1
- package/assets/{layout-C68duuC7.js → layout-Bz6WKClu.js} +1 -1
- package/assets/{linear-DdadsTLS.js → linear-Chzx_9mb.js} +1 -1
- package/assets/{list-D3R3q3Ti.js → list-BuSdZ2Ic.js} +1 -1
- package/assets/{login-DwxC2WD6.js → login-DFWfnrmE.js} +1 -1
- package/assets/manifest.json +277 -277
- package/assets/media-manager-CT4LZgo_.js +7 -0
- package/assets/mermaid.core-Dp-0i8FJ.js +310 -0
- package/assets/{mindmap-definition-YA3MSWOX-BfdP8hOy.js → mindmap-definition-YA3MSWOX-BJSEYobY.js} +1 -1
- package/assets/{module-DKdDlng0.js → module-Cgn-q5gZ.js} +1 -1
- package/assets/{notification-DDWbaooT.js → notification-BrfoqVVT.js} +1 -1
- package/assets/{pegDiagram-XKGWAZYB-BO9cFGCI.js → pegDiagram-XKGWAZYB-ccVsKwl1.js} +1 -1
- package/assets/{pieDiagram-E7YTZNPT-B4KrTpto.js → pieDiagram-E7YTZNPT-B1XZVgNq.js} +1 -1
- package/assets/{quadrantDiagram-AXDQQJYC-BumScZvv.js → quadrantDiagram-AXDQQJYC-CdABEYmF.js} +1 -1
- package/assets/{railroadDiagram-O6MQD6OU-DUDQQC-p.js → railroadDiagram-O6MQD6OU-OX83MXuO.js} +1 -1
- package/assets/{register-5rs1OSaq.js → register-Cxf3Pow-.js} +1 -1
- package/assets/{requirementDiagram-BXWQKSXE-BtNsxNt1.js → requirementDiagram-BXWQKSXE-CD7swf9u.js} +1 -1
- package/assets/{ru-Cf1WWSt0.js → ru-DxiFV21N.js} +1 -1
- package/assets/{sankeyDiagram-P5KCCOFB-xjPcSTcN.js → sankeyDiagram-P5KCCOFB-Cgwq2DVJ.js} +1 -1
- package/assets/{sequenceDiagram-WJ2MYXX4-BVOgA3-B.js → sequenceDiagram-WJ2MYXX4-BgjP07Zh.js} +1 -1
- package/assets/{sizeCapture-INFHLROL-BDI5FsKO.js → sizeCapture-INFHLROL-B-jQ1aKT.js} +1 -1
- package/assets/{stateDiagram-D77RDMKH-DreIJby8.js → stateDiagram-D77RDMKH-Drot14NK.js} +1 -1
- package/assets/stateDiagram-v2-MP3YSRHH-C5VLF0H1.js +1 -0
- package/assets/{swimlanes-42K2YHIH-J_CNnPZv.js → swimlanes-42K2YHIH-lCqHhK1l.js} +1 -1
- package/assets/swimlanesDiagram-VR7AAH4N-4yyX1ZbA.js +8 -0
- package/assets/{timeline-definition-24CTP7MA-BXGN0YmT.js → timeline-definition-24CTP7MA-B-QLcvwc.js} +1 -1
- package/assets/{use-appearance-B2YFalXG.js → use-appearance-B0ck1CR_.js} +1 -1
- package/assets/{user-filters-list-D8WohjvX.js → user-filters-list-ce2cmS5Z.js} +1 -1
- package/assets/{vennDiagram-4TSXK5OY-Mu0lMKUo.js → vennDiagram-4TSXK5OY-2DN2uspP.js} +1 -1
- package/assets/{wardleyDiagram-VM6X3IG4-CXFMI74r.js → wardleyDiagram-VM6X3IG4-C_GODc0p.js} +1 -1
- package/assets/{welcome-DHQx7R11.js → welcome-DaAj6jOI.js} +1 -1
- package/assets/with-app-layout-CwAECGwY.js +34 -0
- package/assets/{xychartDiagram-S5SC5T6Z-DCr7j1YG.js → xychartDiagram-S5SC5T6Z-Cq8htGoW.js} +1 -1
- package/controllers/catalog/FrontendCatalogAdapter.d.ts +5 -5
- package/controllers/catalog/FrontentCatalogAdapter.d.ts +5 -5
- package/controllers/initUser.js +1 -1
- package/helpers/inertiaAddHelper.js +10 -1
- package/helpers/inertiaMenuHelper.d.ts +3 -2
- package/helpers/inertiaMenuHelper.js +9 -4
- package/helpers/navigationAccessHelper.d.ts +5 -0
- package/helpers/navigationAccessHelper.js +13 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/interfaces/adminpanelConfig.d.ts +7 -0
- package/lib/Adminizer.d.ts +2 -0
- package/lib/Adminizer.js +3 -0
- package/lib/admin-links/AdminLinkHandler.js +5 -1
- package/lib/app-manager/AdminizerApp.d.ts +34 -0
- package/lib/app-manager/AppManager.js +35 -0
- package/lib/app-manager/ContextHandler.d.ts +240 -0
- package/lib/app-manager/ContextHandler.js +446 -0
- package/lib/app-manager/ControllerHandler.d.ts +2 -0
- package/lib/app-manager/ControllerHandler.js +7 -0
- package/lib/media-manager/helpers/MediaManagerHelper.d.ts +1 -1
- package/lib/notifications/AbstractNotificationService.d.ts +3 -3
- package/package.json +3 -2
- package/system/bindDocs.js +1 -1
- package/system/bindInertia.js +34 -9
- package/assets/app-CRa5Kokq.js +0 -138
- package/assets/app-TCCHARSx.css +0 -1
- package/assets/channel-DRO88SVn.js +0 -1
- package/assets/classDiagram-ZZMXUADV-Cb-leHEm.js +0 -1
- package/assets/classDiagram-v2-VYDZK3BY-Cb-leHEm.js +0 -1
- package/assets/media-manager-mt4Ykki7.js +0 -6
- package/assets/mermaid.core-DxLHD4PF.js +0 -310
- package/assets/stateDiagram-v2-MP3YSRHH-BNzSJJYe.js +0 -1
- package/assets/swimlanesDiagram-VR7AAH4N-DN5N1rG7.js +0 -8
- package/assets/with-app-layout-Cvg36gxr.js +0 -31
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-DxLHD4PF.js","./app-CRa5Kokq.js","./app-TCCHARSx.css","./isObject-DL-BuaBl.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as A,j as h,bX as bl,c as K,u as ge,bY as Ur,bZ as tn,b_ as kl,f as kt,b$ as wl,c0 as qe,c1 as Ne,aA as bn,aB as kn,c2 as Ae,aD as wn,aE as Vr,aF as Sn,c3 as Sl,c4 as Cl,c5 as jl,bk as wt,c6 as vl,c7 as nn,c8 as El,c9 as rn,ca as ln,cb as an,cc as Nl,p as ye,a as Je,b1 as Al,bW as Il,cd as Tl,bo as Pl,b2 as zl,b3 as Ll,b4 as Dl,ce as Ml,b5 as Fl,b6 as _l,L as _t,I as Rl,be as Ol,d as ie,cf as Bl,X as qr,bd as $l,o as ut,q as ee,cg as Hl,ch as Ul,ci as Vl,cj as ql,ck as Wl,cl as Wr,cm as Jl,cn as Gl,co as Kl,cp as Xl,cq as Wn,cr as Jn,cs as Gn,ct as Yl,cu as Ql,cv as Zl,cw as ea,cx as ta,cy as na,cz as ra,cA as ia,cB as la,cC as aa,cD as sa,cE as oa,cF as ua,H as ca,cG as fa,cH as ha,cI as pa,bn as da,cJ as ma,bj as ga,N as Nt,O as At,au as xa,Q as It,b as Tt,e as Jr,cK as Gr,S as ya,cL as ba,aY as ka,aZ as wa,a_ as Sa,a$ as Ca,b0 as ja,az as Kr,bL as va,cM as Ea,Z as Na,P as Aa,cN as Ia,cO as Ta,cP as Pa,bA as za,cQ as La,cR as Da,av as Ma,aw as Fa,ax as Kn,ay as Xn,F as _a,B as Ra,cS as Oa,cT as Ba,cU as $a,cV as Ha,T as Ua,i as Va,k as qa,l as Wa,m as Ja,n as Ga,cW as Ka}from"./app-CRa5Kokq.js";import{u as Xa}from"./use-appearance-B2YFalXG.js";const Ya=A.memo(({children:e,variant:n="header"})=>{const[t,r]=A.useState(()=>typeof window<"u"?localStorage.getItem("sidebar")!=="false":!0),i=a=>{r(a),typeof window<"u"&&localStorage.setItem("sidebar",String(a))};return n==="header"?h.jsx("div",{className:"flex min-h-screen w-full flex-col",children:e}):h.jsx(bl,{className:"h-svh overflow-hidden",defaultOpen:t,open:t,onOpenChange:i,children:e})});function Q({name:e,className:n,style:t}){return h.jsx("span",{className:K("material-icons-outlined",n),style:t,children:e})}const Qa="folder",Za="radio_button_checked",He=A.forwardRef(({entry:e,...n},t)=>{const r=h.jsxs(h.Fragment,{children:[e.icon&&h.jsx(Q,{name:e.icon,className:"!text-[18px]"}),h.jsx("span",{children:e.title})]});return e.type==="blank"?h.jsx("a",{...n,ref:t,href:e.link,target:"_blank",rel:"noopener noreferrer",children:r}):h.jsx(ye,{...n,ref:t,href:e.link,children:r})});He.displayName="EntryLink";function es({items:e=[]}){const n=ge(),{state:t,isMobile:r}=Ur(),i=t==="collapsed"&&!r,a=n.props.menuSections??{},l=N=>N.split("?")[0].replace(/\/$/,""),s=(N,j)=>a[N]?.icon||j.find(b=>b.icon)?.icon||Qa,o=e.reduce((N,j)=>{const b=j.section||"Platform";return N[b]||(N[b]=[]),N[b].push(j),N},{}),u=Object.keys(o).sort((N,j)=>{const b=a[N]?.order,L=a[j]?.order;return b!==void 0&&L!==void 0?b-L:b!==void 0?-1:L!==void 0?1:N==="Platform"?-1:j==="Platform"||N==="System"?1:j==="System"?-1:N.localeCompare(j)}),[f,c]=A.useState(()=>{const N={};return e.forEach(j=>{const b=j.section||"Platform";N[b]=!1}),N}),[d,p]=A.useState(()=>{const N={};return e.forEach(j=>{const b=j.section||"Platform";N[b]=!1}),N}),m=N=>{const j=l(n.url),b=l(N);return j===b||j.startsWith(`${b}/`)},w=A.useRef(f),S=A.useRef(d);w.current=f,S.current=d;const k=N=>{for(const j of N){const b=j.actions?.find(L=>m(L.link));if(b)return b}return N.find(j=>m(j.link))??null},E=({item:N})=>N.actions?.length>0?h.jsx(vl,{asChild:!0,defaultOpen:m(N.link),className:"group/collapsible",children:h.jsxs(Ne,{children:[h.jsx(nn,{asChild:!0,children:h.jsxs(Ae,{tooltip:N.title,children:[h.jsx(Q,{name:N.icon,className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:N.title}),h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),h.jsx(El,{children:h.jsx(rn,{children:N.actions?.map(j=>h.jsx(ln,{children:h.jsx(an,{asChild:!0,isActive:m(j.link),children:h.jsx(He,{entry:j})})},j.id))})})]})},N.title):h.jsxs(Ne,{children:[h.jsx(Ae,{asChild:!0,isActive:m(N.link),tooltip:{children:N.title},children:h.jsx(He,{entry:N})}),N.badge?h.jsx(Nl,{children:N.badge}):null]},N.title),v=({section:N,itemsInSection:j})=>{const b=k(j);return h.jsx(tn,{className:"px-2 py-0",children:h.jsxs(qe,{children:[h.jsx(Ne,{children:h.jsxs(bn,{children:[h.jsx(kn,{asChild:!0,children:h.jsxs(Ae,{isActive:!!b,"aria-label":N,children:[h.jsx(Q,{name:s(N,j),className:"!text-[18px]"}),h.jsx("span",{children:N})]})}),h.jsxs(wn,{side:"right",align:"start",className:"min-w-56 z-[1003]",children:[h.jsxs(Vr,{className:"flex items-center gap-2",children:[h.jsx(Q,{name:s(N,j),className:"!text-[18px]"}),h.jsx("span",{children:N})]}),h.jsx(Sn,{}),j.map(L=>L.actions?.length>0?h.jsxs(Sl,{children:[h.jsxs(Cl,{children:[L.icon&&h.jsx(Q,{name:L.icon,className:"!text-[18px]"}),h.jsx("span",{children:L.title})]}),h.jsx(jl,{className:"z-[1003]",children:L.actions?.map(M=>h.jsx(wt,{asChild:!0,children:h.jsx(He,{entry:M})},M.id||M.title))})]},L.id||L.title):h.jsx(wt,{asChild:!0,children:h.jsx(He,{entry:L})},L.id||L.title))]})]})}),b&&h.jsx(Ne,{children:h.jsx(Ae,{asChild:!0,isActive:!0,tooltip:b.title,children:h.jsx(He,{entry:{...b,icon:b.icon||Za}})})})]})})};return h.jsx(h.Fragment,{children:u.map(N=>{const j=o[N];if(i)return h.jsx(v,{section:N,itemsInSection:j},N);const b=j.some(M=>M.actions?.length>0?M.actions.some(F=>m(F.link)):m(M.link)),L=d[N]?f[N]:b;return h.jsxs(tn,{className:"px-2 py-0",children:[h.jsx(kl,{asChild:!0,className:"cursor-pointer",onClick:()=>{const y=!(S.current[N]?w.current[N]:b);p(T=>({...T,[N]:!0})),c(T=>({...T,[N]:y}))},children:h.jsxs("div",{className:"flex w-full items-center gap-2",children:[h.jsx(Q,{name:s(N,j),className:"!text-[16px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:N}),h.jsx(kt,{className:`ml-auto shrink-0 transform transition-transform duration-200 ${L?"rotate-90":""}`})]})}),L&&h.jsx(wl,{children:h.jsx(qe,{children:j.map(M=>h.jsx(E,{item:M},M.id||M.title))})})]},N)})})}const ts=5*1024*1024,ns=(e,n)=>{const t=e?.response?.data;if(!t)return n;if(typeof t=="string")try{const r=JSON.parse(t);return r.error??r.message??n}catch{return t||n}if(typeof t=="object"){const r=t;return r.error??r.message??n}return n},Xr=A.memo(({routePrefix:e,triggerLabel:n,placeholder:t,t:r,onClose:i})=>{const[a,l]=A.useState(""),[s,o]=A.useState(""),[u,f]=A.useState([]),[c,d]=A.useState({}),[p,m]=A.useState(!1),[w,S]=A.useState(!1),k=A.useRef(null),E=j=>{if(!j)return;const b={},L=[];Array.from(j).forEach(M=>{M.size>ts?b[M.name]=r("File size exceeds the 5 MB limit"):L.push(M)}),f(M=>[...M,...L]),Object.keys(b).length&&d(M=>({...M,...b}))},v=j=>f(b=>b.filter((L,M)=>M!==j)),N=async j=>{if(j.preventDefault(),!a.trim()){d({title:r("Title is required")});return}m(!0),d({});const b=new FormData;b.append("title",a.trim()),b.append("description",s.trim()),u.forEach(L=>b.append("files",L));try{await ee.post(`${e}/api/feedback`,b),S(!0)}catch(L){const M=ns(L,r("Internal server error"));d({_global:M}),m(!1)}};return A.useEffect(()=>{if(!w)return;const j=setTimeout(i,2e3);return()=>clearTimeout(j)},[w,i]),w?h.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-24 text-center",children:[h.jsx(Ml,{size:48,className:"text-green-500 dark:text-green-400"}),h.jsx("p",{className:"text-base font-medium",children:r("Feedback sent successfully")})]}):h.jsxs(h.Fragment,{children:[h.jsxs(Fl,{className:"mb-4",children:[h.jsx(_l,{children:n??r("Feedback")}),t&&h.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),h.jsxs("form",{onSubmit:N,className:"space-y-5",noValidate:!0,children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(_t,{htmlFor:"fb-title",children:r("Title")}),h.jsx(Rl,{id:"fb-title",value:a,onChange:j=>l(j.target.value),disabled:p,placeholder:r("Title"),className:c.title?"border-destructive":""}),c.title&&h.jsx("p",{className:"text-xs text-destructive",children:c.title})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(_t,{htmlFor:"fb-desc",children:r("Description")}),h.jsx(Ol,{id:"fb-desc",value:s,onChange:j=>o(j.target.value),disabled:p,placeholder:r("Description"),rows:5,className:"resize-none"})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(_t,{children:r("Attach files")}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(ie,{type:"button",variant:"outline",size:"sm",onClick:()=>k.current?.click(),disabled:p,children:[h.jsx(Bl,{size:14,className:"mr-1"}),r("Attach files")]}),h.jsx("span",{className:"text-xs text-muted-foreground",children:r("Max 5 MB per file")})]}),h.jsx("input",{ref:k,type:"file",multiple:!0,className:"hidden",onChange:j=>E(j.target.files),disabled:p}),u.length>0&&h.jsx("ul",{className:"mt-2 space-y-1",children:u.map((j,b)=>h.jsxs("li",{className:"flex items-center justify-between rounded-md border bg-muted/40 px-3 py-1.5 text-xs",children:[h.jsx("span",{className:"truncate max-w-[340px]",children:j.name}),h.jsx("button",{type:"button",onClick:()=>v(b),className:"ml-2 text-muted-foreground hover:text-destructive transition-colors","aria-label":r("Remove file"),disabled:p,children:h.jsx(qr,{size:13})})]},b))}),Object.entries(c).filter(([j])=>j!=="title"&&j!=="_global").map(([j,b])=>h.jsx("p",{className:"text-xs text-destructive",children:b},j))]}),c._global&&h.jsx("p",{className:"text-xs text-destructive",children:c._global}),h.jsx($l,{children:h.jsx(ie,{type:"submit",disabled:p,children:p?h.jsxs(h.Fragment,{children:[h.jsx(ut,{size:14,className:"mr-1.5 animate-spin"}),r("Sending...")]}):r("Send")})})]})]})});Xr.displayName="FeedbackForm";function rs(){const e=ge(),{t:n}=Je(),t=e.props.routePrefix??window.routePrefix??"",r=e.props.feedbackTriggerLabel??null,i=e.props.feedbackPlaceholder??null,[a,l]=A.useState(!1),[s,o]=A.useState(0),u=A.useCallback(()=>l(!1),[]),f=A.useCallback(c=>{l(c),c||o(d=>d+1)},[]);return h.jsxs(Al,{open:a,onOpenChange:f,children:[h.jsx(Il,{asChild:!0,children:h.jsxs("button",{className:"flex items-center gap-1.5 text-xs opacity-60 hover:opacity-100 transition-opacity cursor-pointer mt-1 mx-auto","aria-label":r??n("Send feedback"),children:[h.jsx(Tl,{size:13}),r??n("Send feedback")]})}),Pl.createPortal(h.jsx(zl,{}),document.body),h.jsx(Ll,{children:h.jsx(Dl,{children:h.jsx(Xr,{routePrefix:t,triggerLabel:r,placeholder:i,t:n,onClose:u},s)})})]})}function is(){const e=ge();return h.jsxs(Hl,{collapsible:"icon",variant:"inset",children:[h.jsx(Ul,{children:h.jsx(qe,{children:h.jsxs(Ne,{children:[h.jsx(Vl,{className:"p-0 shadow-none border-none bg-transparent hidden md:block",children:h.jsxs(ql,{children:[h.jsx(Wl,{asChild:!0,className:"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground rounded-md",children:h.jsx(Ae,{asChild:!0,children:h.jsx(ie,{variant:"ghost",asChild:!0,className:`w-full px-2! ${e.props.section?"":"pointer-events-none"}`,children:h.jsxs("div",{children:[h.jsx(Q,{name:"rocket_launch",className:"!text-[18px]"}),h.jsx("span",{className:"group-data-[state=collapsed]:hidden",children:e.props.brand}),e.props.section&&h.jsx(Wr,{className:"ml-auto group-data-[state=collapsed]:hidden"})]})})})}),e.props.section&&h.jsx(Jl,{side:"right",className:"z-[1003]",children:e.props.section.map(n=>h.jsx("div",{children:n.subItems?h.jsxs(Gl,{children:[h.jsxs(Kl,{className:"flex gap-2 items-center cursor-pointer",children:[h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}),h.jsx(Xl,{children:n.subItems.map(t=>h.jsx(Wn,{children:t.type==="blank"?h.jsxs("a",{href:t.link,target:"_blank",className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]},t.id):h.jsxs(ye,{href:t.link,className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]},t.id)},t.id))})]}):h.jsx(Wn,{children:n.type==="blank"?h.jsxs("a",{href:n.link,target:"_blank",className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}):h.jsxs(ye,{href:n.link,className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]})})},n.id))})]})}),h.jsx(tn,{className:"px-2 py-0 block md:hidden",children:h.jsx(qe,{children:h.jsx(Jn,{asChild:!0,className:"group/collapsible",children:h.jsxs(Ne,{children:[h.jsx(nn,{asChild:!0,children:h.jsxs(Ae,{children:[h.jsx(Q,{name:"rocket_launch",className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.props.brand}),e.props.section&&h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),e.props.section&&h.jsx(Gn,{children:h.jsx(rn,{children:e.props.section&&e.props.section.map(n=>n.subItems?h.jsx(qe,{children:h.jsx(Jn,{asChild:!0,className:"group/collapsible-sub",children:h.jsxs(Ne,{children:[h.jsx(nn,{asChild:!0,children:h.jsxs(Ae,{children:[h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.title}),h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible-sub:rotate-90"})]})}),h.jsx(Gn,{children:h.jsx(rn,{children:n.subItems.map(t=>h.jsx(ln,{children:h.jsx(an,{asChild:!0,children:t.type==="blank"?h.jsxs("a",{href:t.link,target:"_blank",className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]}):h.jsxs(ye,{href:t.link,className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]})})},t.id))})})]})})},n.id):h.jsx(ln,{children:h.jsx(an,{asChild:!0,children:n.type==="blank"?h.jsxs("a",{href:n.link,target:"_blank",className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}):h.jsxs(ye,{href:n.link,className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]})})},n.id))})})]})})})})]},e.props.brand)})}),h.jsx(Yl,{children:h.jsx(es,{items:e.props.menu})}),h.jsx(Ql,{children:h.jsxs("div",{className:"flex flex-col items-center",children:[e.props.version&&(()=>{const n=e.props.version,t=n.text||"5.1.0",r=new Date("2026-09-14T01:10:00.446Z").toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),i=n.text?`v.${t}`:`v.${t} · ${r}`,a="text-center opacity-70 hover:opacity-100 transition-opacity text-xs";return n.link?h.jsx("a",{href:n.link,target:"_blank",rel:"noreferrer",title:n.hint??void 0,className:a,children:i}):h.jsx("span",{title:n.hint??void 0,className:a,children:i})})(),e.props.showFeedback&&h.jsx(rs,{})]})})]})}function ls({breadcrumbs:e}){return h.jsx(h.Fragment,{children:e.length>0&&h.jsx(Zl,{children:h.jsx(ea,{children:e.map((n,t)=>{const r=t===e.length-1;return h.jsxs(A.Fragment,{children:[h.jsx(ta,{children:r||!n.href?h.jsx(na,{children:n.title}):h.jsx(ra,{asChild:!0,children:h.jsx(ye,{href:n.href,children:n.title})})}),!r&&h.jsx(ia,{})]},t)})})})})}function as(){return A.useCallback(n=>{const t=n.trim().split(" ");if(t.length===0)return"";if(t.length===1)return t[0].charAt(0).toUpperCase();const r=t[0].charAt(0),i=t[t.length-1].charAt(0);return`${r}${i}`.toUpperCase()},[])}function Yr({user:e,showEmail:n=!1}){const t=as();return h.jsxs(h.Fragment,{children:[h.jsxs(la,{className:"h-8 w-8 overflow-hidden rounded-full",children:[h.jsx(aa,{src:e.avatar,alt:e.login}),h.jsx(sa,{className:"rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:t(e.login)})]}),h.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[h.jsx("span",{className:"truncate font-medium",children:e.login}),n&&h.jsx("span",{className:"text-muted-foreground truncate text-xs",children:e.email})]})]})}function ss(){return A.useCallback(()=>{document.body.style.removeProperty("pointer-events")},[])}function os({user:e,logout:n,logoutBtn:t}){const r=ss();return h.jsxs(h.Fragment,{children:[h.jsx(Vr,{className:"p-0 font-normal",children:h.jsx("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:h.jsx(Yr,{user:e,showEmail:!0})})}),h.jsx(Sn,{}),h.jsx(wt,{asChild:!0,children:h.jsxs(ye,{className:"block w-full cursor-pointer",method:"get",href:n,as:"button",onClick:r,children:[h.jsx(oa,{className:"mr-2"}),t]})})]})}function us(){const{auth:e,logout:n,logoutBtn:t}=ge().props,{state:r}=Ur(),i=ua();return h.jsx(qe,{children:h.jsx(Ne,{children:h.jsxs(bn,{children:[h.jsx(kn,{asChild:!0,children:h.jsxs(Ae,{size:"lg",className:"text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent group focus-visible:ring-0 cursor-pointer",children:[h.jsx(Yr,{user:e.user}),h.jsx(Wr,{className:"ml-auto size-4"})]})}),h.jsx(wn,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg z-[1002]",align:"end",side:i?"bottom":r==="collapsed"?"left":"bottom",children:h.jsx(os,{user:e.user,logout:n,logoutBtn:t})})]})})})}function cs(){const{appearance:e,updateAppearance:n}=Xa(),t={light:"dark",dark:"system",system:"light"},r={light:pa,dark:ha,system:fa},i=()=>n(t[e]),a=r[e];return h.jsx(ie,{variant:"ghost",size:"icon",onClick:i,className:"shrink-0",children:h.jsx(ca,{iconNode:a})})}const Qr=A.createContext(void 0),fs=({children:e})=>{const[n,t]=A.useState([]),[r,i]=A.useState([]),[a,l]=A.useState([]),[s,o]=A.useState(!1),[u,f]=A.useState(null),[c,d]=A.useState(""),p=ge(),{t:m}=Je(),w=da.useMemo(()=>({"Make read":m("Make read"),"View All":m("View All"),Search:m("Search"),"Make all read":m("Make all read"),Title:m("Title"),Message:m("Message"),Date:m("Date"),Diff:m("Diff"),"No notifications":m("No notifications"),"No notifications found":m("No notifications found"),"The end of the list has been reached":m("The end of the list has been reached")}),[m]),S=[...r,...a],k=async()=>{try{const y=await ee.getJson(`${window.routePrefix}/notifications/api`,{params:{unreadOnly:!0,limit:4}});t(y.data)}catch(y){console.error("Error fetching bell notifications:",y)}},E=async()=>{await k()},v=async()=>{try{const y=await ee.getJson(`${window.routePrefix}/notifications/api/get-classes`);y.data&&(f(y.data.activeServices),d(y.data.initTab))}catch(y){console.error("Error fetching tabs:",y)}},N=async(y,T)=>{try{if(!y){await j(T);return}const z=await ee.postJson(`${window.routePrefix}/notifications/api/search`,{s:y,notificationClass:T});l(z.data)}catch(z){console.error("Error searching notifications:",z)}},j=async y=>{o(!0);try{const T=`${window.routePrefix}/notifications/api/${y}`,z=await ee.getJson(T,{params:{limit:20,skip:0,unreadOnly:!1}});return i([]),l(z.data),z.data}catch(T){return console.error("Error fetching all notifications:",T),[]}finally{o(!1)}},b=async(y,T)=>{try{const z=`${window.routePrefix}/notifications/api/${y}`,B=await ee.getJson(z,{params:{limit:20,skip:T,unreadOnly:!1}});return l(_=>[..._,...B.data]),B.data}catch(z){return console.error("Error paginating notifications:",z),[]}};A.useEffect(()=>{if(!p.props.notifications)return;k();const y=new EventSource(`${window.routePrefix}/notifications/api/stream`);return y.addEventListener("connected",T=>{v()}),y.addEventListener("notification",T=>{const z=JSON.parse(T.data);i(B=>[z,...B]),t(B=>[z,...B].slice(0,4))}),y.onerror=()=>{console.error("SSE connection error")},()=>y.close()},[]);const L=async(y,T)=>{try{await ee.putJson(`${window.routePrefix}/notifications/api/${y}/${T}/read`,{}),i(z=>z.map(B=>B.id===T?{...B,read:!0}:B)),l(z=>z.map(B=>B.id===T?{...B,read:!0}:B)),t([])}catch(z){console.error("Error marking as read:",z)}},M=async()=>{try{await ee.putJson(`${window.routePrefix}/notifications/api/read-all`,{}),i(y=>y.map(T=>({...T,read:!0}))),l(y=>y.map(T=>({...T,read:!0}))),await k()}catch(y){console.error("Error marking all as read:",y)}},F=n.filter(y=>!y.read).length;return h.jsx(Qr.Provider,{value:{bellNotifications:n,allNotifications:S,unreadCount:F,getTabs:v,tabs:u,initTab:c,search:N,markAsRead:L,markAllAsRead:M,messages:w,fetchAllNotifications:j,paginateNotifications:b,loading:s,refreshBellNotifications:E},children:e})},Zr=()=>{const e=A.useContext(Qr);if(e===void 0)throw new Error("useNotifications must be used within a NotificationProvider");return e};function hs(){const{bellNotifications:e,markAsRead:n,unreadCount:t,refreshBellNotifications:r,messages:i}=Zr(),[a,l]=A.useState(!1),s=async(u,f)=>{l(!0);try{await n(u,f),await r()}catch(c){console.error("Error marking as read:",c)}finally{l(!1)}},o=u=>{const f=new Date,c=new Date(u),d=f.getTime()-c.getTime(),p=Math.floor(d/1e3),m=new Intl.RelativeTimeFormat("en",{numeric:"auto"});if(p<60)return m.format(-p,"second");const w=Math.floor(p/60);if(w<60)return m.format(-w,"minute");const S=Math.floor(w/60);if(S<24)return m.format(-S,"hour");const k=Math.floor(S/24);if(k<30)return m.format(-k,"day");const E=Math.floor(k/30);if(E<12)return m.format(-E,"month");const v=Math.floor(E/12);return m.format(-v,"year")};return h.jsxs(bn,{children:[h.jsx(kn,{asChild:!0,className:"cursor-pointer data-[state=open]:bg-sidebar-accent",children:h.jsxs(ie,{variant:"ghost",className:"relative",children:[h.jsx(ma,{}),t>0&&h.jsx("div",{className:"absolute top-1.5 right-1.5 size-1.5 rounded-full bg-destructive"})]})}),h.jsxs(wn,{className:"z-[1002] p-2",align:"end",onCloseAutoFocus:u=>u.preventDefault(),children:[h.jsx(ga,{className:`${a?"opacity-50 pointer-events-none":""}`,children:e.length===0?h.jsx("div",{className:"p-4 text-center text-muted-foreground",children:i["No notifications"]}):e.map(u=>h.jsxs("div",{children:[h.jsx(wt,{asChild:!0,className:"cursor-pointer",onSelect:f=>{f.preventDefault(),Tt.visit(`${window.routePrefix}/notifications?type=${u.notificationClass}`)},children:h.jsxs("div",{className:"grid grid-cols-[32px_250px] grid-rows-[auto_1fr] items-start gap-x-4 gap-y-2",children:[u.icon?h.jsx(Q,{name:u.icon.icon,style:{color:u.icon.iconColor},className:"!text-[32px]"}):h.jsx("div",{}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"font-medium",children:u.title}),h.jsx("span",{className:"truncate",children:u.message})]}),h.jsxs("div",{className:"col-start-2 flex justify-between flex-nowrap items-center",children:[h.jsx("div",{className:"flex flex-nowrap gap-2 items-center",children:h.jsx("div",{children:o(u.createdAt)})}),h.jsxs(Nt,{children:[h.jsx(At,{asChild:!0,children:h.jsx(ie,{variant:"ghost",size:"icon",className:"size-4",onClick:f=>{f.stopPropagation(),s(u.notificationClass,u.id)},children:h.jsx(xa,{className:"text-primary"})})}),h.jsx(It,{side:"left",className:"z-[1003]",children:h.jsx("p",{children:i["Make read"]})})]})]})]})}),h.jsx(Sn,{})]},u.id))}),h.jsx(ie,{variant:"secondary",asChild:!0,children:h.jsxs(ye,{href:`${window.routePrefix}/notifications`,className:`w-full ${a?"opacity-50 pointer-events-none":""}`,children:[i["View All"],a&&h.jsx(ut,{className:"h-4 w-4 animate-spin"})]})})]})]})}const ei="adminizer.aiAssistant.state",ps=()=>{if(!(typeof window>"u")){try{const e=window.localStorage.getItem(ei);if(e){const n=JSON.parse(e);if(typeof n.isOpen=="boolean")return{isOpen:n.isOpen,activeModel:typeof n.activeModel=="string"?n.activeModel:void 0}}}catch{}return window.__adminizerAiAssistantState__??void 0}},ds=e=>{if(!(typeof window>"u")){window.__adminizerAiAssistantState__=e;try{window.localStorage.setItem(ei,JSON.stringify(e))}catch{}}},ti=A.createContext(void 0),ms=({children:e})=>{const t=ge().props.aiAssistant,r=A.useMemo(()=>ps(),[]),[i,a]=A.useState(()=>r?.isOpen??!1),[l,s]=A.useState([]),[o,u]=A.useState(()=>r?.activeModel??t?.defaultModel??void 0),[f,c]=A.useState(!1),[d,p]=A.useState(null),m=t?.enabled??!1,w=A.useCallback(async()=>{if(m)try{c(!0);const{data:j}=await ee.getJson(`${window.routePrefix}/api/ai-assistant/models`);s(j),u(b=>b&&j.some(M=>M.id===b)?b:t?.defaultModel&&j.some(M=>M.id===t.defaultModel)?t.defaultModel:j[0]?.id)}catch(j){console.error("Failed to load AI assistant models",j),p("Unable to load AI assistant models")}finally{c(!1)}},[t?.defaultModel,m]);A.useEffect(()=>{m&&w()},[w,m]);const S=A.useCallback(j=>{u(j)},[]),k=A.useCallback(()=>a(!0),[]),E=A.useCallback(()=>a(!1),[]),v=A.useCallback(()=>a(j=>!j),[]);A.useEffect(()=>{m||a(!1)},[m]),A.useEffect(()=>{ds({isOpen:i,activeModel:o})},[o,i]);const N=A.useMemo(()=>({isEnabled:m,isOpen:i,openChat:k,closeChat:E,toggleChat:v,models:l,activeModel:o,setActiveModel:S,loading:f,error:d}),[o,E,d,m,i,f,l,k,S,v]);return h.jsx(ti.Provider,{value:N,children:e})},Pt=()=>{const e=A.useContext(ti);if(!e)throw new Error("useAiAssistant must be used within an AiAssistantProvider");return e};function gs(){const{isEnabled:e,isOpen:n,toggleChat:t,models:r,loading:i}=Pt();if(!e)return null;const a=r.length>0;return h.jsx(h.Fragment,{children:h.jsxs(Nt,{children:[h.jsx(At,{asChild:!0,children:h.jsx(ie,{variant:"ghost",className:Gr("relative",{"text-primary":n}),onClick:t,"aria-expanded":n,"aria-haspopup":"true","aria-controls":"ai-assistant-panel",disabled:!a&&i,children:i&&!a?h.jsx(ut,{className:"size-4 animate-spin"}):h.jsx(Jr,{className:"size-4"})})}),h.jsx(It,{side:"bottom",className:"z-[1002]",children:h.jsx("span",{children:"AI assistant"})})]})})}const xs=200,Yn="adminizer:ai-search-admin-links";function ys(){const e=ge(),{t:n}=Je(),[t,r]=A.useState(!1),[i,a]=A.useState(""),[l,s]=A.useState([]),[o,u]=A.useState(!1);A.useEffect(()=>{const d=m=>{m.defaultPrevented||!(m.metaKey||m.ctrlKey)||m.key.toLowerCase()!=="k"||(m.preventDefault(),r(w=>!w))},p=m=>{const w=m.detail;a(typeof w?.query=="string"?w.query:""),r(!0)};return window.addEventListener("keydown",d),window.addEventListener(Yn,p),()=>{window.removeEventListener("keydown",d),window.removeEventListener(Yn,p)}},[]),A.useEffect(()=>{if(!t)return;let d=!1;u(!0);const p=window.setTimeout(async()=>{try{const{data:m}=await ee.getJson(`${window.routePrefix}/api/links/search?q=${encodeURIComponent(i)}`);d||s(m.results.filter(w=>w.link))}catch{d||s([])}finally{d||u(!1)}},xs);return()=>{d=!0,window.clearTimeout(p)}},[t,i]);const f=A.useMemo(()=>{const d=new Map;for(const p of l){const m=p.section||"Platform";d.has(m)||d.set(m,[]),d.get(m).push(p)}return[...d]},[l]),c=A.useCallback(d=>{r(!1),Tt.visit(d)},[]);return e.props.auth?.user?h.jsxs(h.Fragment,{children:[h.jsxs(Nt,{children:[h.jsx(At,{asChild:!0,children:h.jsx(ie,{variant:"ghost",size:"icon",className:"shrink-0",onClick:()=>r(!0),"aria-label":n("Search"),children:h.jsx(ya,{className:"size-4"})})}),h.jsx(It,{side:"bottom",className:"z-[1002]",children:h.jsxs("span",{children:[n("Search")," · Ctrl K"]})})]}),h.jsxs(ba,{open:t,onOpenChange:r,shouldFilter:!1,title:n("Search"),description:n("Search"),children:[h.jsx(ka,{value:i,onValueChange:a,placeholder:`${n("Search")}…`}),h.jsxs(wa,{children:[h.jsx(Sa,{children:o?"…":n("Nothing found","Nothing found")}),f.map(([d,p])=>h.jsx(Ca,{heading:d,children:p.map(m=>h.jsxs(ja,{value:m.id,onSelect:()=>c(m.link),children:[h.jsx("span",{className:"truncate",children:m.title}),m.description&&h.jsx("span",{className:"text-muted-foreground ml-2 truncate text-xs",children:m.description})]},m.id))},d))]})]})]}):null}function ni({fields:e,title:n,loading:t=!1,className:r}){const{t:i}=Je();return h.jsxs("div",{className:K("overflow-hidden rounded-xl border",r),children:[n&&h.jsx("div",{className:"bg-muted/50 border-b px-3 py-1.5 text-sm font-medium",children:n}),t||!e?h.jsx("div",{className:"text-muted-foreground p-3 text-sm",children:i("Loading...")}):e.length===0?h.jsx("div",{className:"text-muted-foreground p-3 text-sm",children:i("No fields to display")}):h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"bg-muted/30 text-muted-foreground",children:[h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Field")}),h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Type")}),h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Required")})]})}),h.jsx("tbody",{children:e.map(a=>h.jsxs("tr",{className:"border-t",children:[h.jsxs("td",{className:"px-3 py-1.5",children:[h.jsx("span",{className:"font-medium",children:a.title||a.name}),a.title&&a.title!==a.name&&h.jsx("span",{className:"text-muted-foreground ms-2 font-mono text-xs",children:a.name})]}),h.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:a.type}),h.jsx("td",{className:"px-3 py-1.5",children:a.required?i("Yes"):i("No")})]},a.name))})]})]})}function bs(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ks=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ws=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ss={};function Qn(e,n){return(Ss.jsx?ws:ks).test(e)}const Cs=/[ \t\n\f\r]/g;function js(e){return typeof e=="object"?e.type==="text"?Zn(e.value):!1:Zn(e)}function Zn(e){return e.replace(Cs,"")===""}class ct{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}ct.prototype.normal={};ct.prototype.property={};ct.prototype.space=void 0;function ri(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new ct(t,r,n)}function sn(e){return e.toLowerCase()}class ae{constructor(n,t){this.attribute=t,this.property=n}}ae.prototype.attribute="";ae.prototype.booleanish=!1;ae.prototype.boolean=!1;ae.prototype.commaOrSpaceSeparated=!1;ae.prototype.commaSeparated=!1;ae.prototype.defined=!1;ae.prototype.mustUseProperty=!1;ae.prototype.number=!1;ae.prototype.overloadedBoolean=!1;ae.prototype.property="";ae.prototype.spaceSeparated=!1;ae.prototype.space=void 0;let vs=0;const O=_e(),X=_e(),on=_e(),I=_e(),J=_e(),Me=_e(),oe=_e();function _e(){return 2**++vs}const un=Object.freeze(Object.defineProperty({__proto__:null,boolean:O,booleanish:X,commaOrSpaceSeparated:oe,commaSeparated:Me,number:I,overloadedBoolean:on,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),Rt=Object.keys(un);class Cn extends ae{constructor(n,t,r,i){let a=-1;if(super(n,t),er(this,"space",i),typeof r=="number")for(;++a<Rt.length;){const l=Rt[a];er(this,Rt[a],(r&un[l])===un[l])}}}Cn.prototype.defined=!0;function er(e,n,t){t&&(e[n]=t)}function Ge(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const a=new Cn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),n[r]=a,t[sn(r)]=r,t[sn(a.attribute)]=r}return new ct(n,t,e.space)}const ii=Ge({properties:{ariaActiveDescendant:null,ariaAtomic:X,ariaAutoComplete:null,ariaBusy:X,ariaChecked:X,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:X,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:X,ariaFlowTo:J,ariaGrabbed:X,ariaHasPopup:null,ariaHidden:X,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:I,ariaLive:null,ariaModal:X,ariaMultiLine:X,ariaMultiSelectable:X,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:X,ariaReadOnly:X,ariaRelevant:null,ariaRequired:X,ariaRoleDescription:J,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:X,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function li(e,n){return n in e?e[n]:n}function ai(e,n){return li(e,n.toLowerCase())}const Es=Ge({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Me,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:O,allowPaymentRequest:O,allowUserMedia:O,alpha:O,alt:null,as:null,async:O,autoCapitalize:null,autoComplete:J,autoFocus:O,autoPlay:O,blocking:J,capture:null,charSet:null,checked:O,cite:null,className:J,closedBy:null,colorSpace:null,cols:I,colSpan:I,command:null,commandFor:null,content:null,contentEditable:X,controls:O,controlsList:J,coords:I|Me,crossOrigin:null,data:null,dateTime:null,decoding:null,default:O,defer:O,dir:null,dirName:null,disabled:O,download:on,draggable:X,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:O,formTarget:null,headers:J,height:I,hidden:on,high:I,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:O,inputMode:null,integrity:null,is:null,isMap:O,itemId:null,itemProp:J,itemRef:J,itemScope:O,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:O,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:O,muted:O,name:null,nonce:null,noModule:O,noValidate:O,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:O,optimum:I,pattern:null,ping:J,placeholder:null,playsInline:O,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:O,referrerPolicy:null,rel:J,required:O,reversed:O,rows:I,rowSpan:I,sandbox:J,scope:null,scoped:O,seamless:O,selected:O,shadowRootClonable:O,shadowRootCustomElementRegistry:O,shadowRootDelegatesFocus:O,shadowRootMode:null,shadowRootSerializable:O,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:X,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:O,useMap:null,value:X,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:O,declare:O,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:O,noHref:O,noShade:O,noWrap:O,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:X,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:O,disablePictureInPicture:O,disableRemotePlayback:O,exportParts:Me,part:J,prefix:null,property:null,results:I,security:null,unselectable:null},space:"html",transform:ai}),Ns=Ge({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:oe,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:J,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:O,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Me,g2:Me,glyphName:Me,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,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:I,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:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oe,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:li}),si=Ge({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),oi=Ge({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ai}),ui=Ge({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),As={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"},Is=/[A-Z]/g,tr=/-[a-z]/g,Ts=/^data[-\w.:]+$/i;function Ps(e,n){const t=sn(n);let r=n,i=ae;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Ts.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(tr,Ls);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!tr.test(a)){let l=a.replace(Is,zs);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=Cn}return new i(r,n)}function zs(e){return"-"+e.toLowerCase()}function Ls(e){return e.charAt(1).toUpperCase()}const Ds=ri([ii,Es,si,oi,ui],"html"),jn=ri([ii,Ns,si,oi,ui],"svg");function Ms(e){return e.join(" ").trim()}var $e={},Ot,nr;function Fs(){if(nr)return Ot;nr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,s=/^\s+|\s+$/g,o=`
|
|
3
|
-
`,u="/",f="*",c="",d="comment",p="declaration";function m(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var E=1,v=1;function N(_){var D=_.match(n);D&&(E+=D.length);var q=_.lastIndexOf(o);v=~q?_.length-q:v+_.length}function j(){var _={line:E,column:v};return function(D){return D.position=new b(_),F(),D}}function b(_){this.start=_,this.end={line:E,column:v},this.source=k.source}b.prototype.content=S;function L(_){var D=new Error(k.source+":"+E+":"+v+": "+_);if(D.reason=_,D.filename=k.source,D.line=E,D.column=v,D.source=S,!k.silent)throw D}function M(_){var D=_.exec(S);if(D){var q=D[0];return N(q),S=S.slice(q.length),D}}function F(){M(t)}function y(_){var D;for(_=_||[];D=T();)D!==!1&&_.push(D);return _}function T(){var _=j();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var D=2;c!=S.charAt(D)&&(f!=S.charAt(D)||u!=S.charAt(D+1));)++D;if(D+=2,c===S.charAt(D-1))return L("End of comment missing");var q=S.slice(2,D-2);return v+=2,N(q),S=S.slice(D),v+=2,_({type:d,comment:q})}}function z(){var _=j(),D=M(r);if(D){if(T(),!M(i))return L("property missing ':'");var q=M(a),Y=_({type:p,property:w(D[0].replace(e,c)),value:q?w(q[0].replace(e,c)):c});return M(l),Y}}function B(){var _=[];y(_);for(var D;D=z();)D!==!1&&(_.push(D),y(_));return _}return F(),B()}function w(S){return S?S.replace(s,c):c}return Ot=m,Ot}var rr;function _s(){if(rr)return $e;rr=1;var e=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0}),$e.default=t;const n=e(Fs());function t(r,i){let a=null;if(!r||typeof r!="string")return a;const l=(0,n.default)(r),s=typeof i=="function";return l.forEach(o=>{if(o.type!=="declaration")return;const{property:u,value:f}=o;s?i(u,f,o):f&&(a=a||{},a[u]=f)}),a}return $e}var Ze={},ir;function Rs(){if(ir)return Ze;ir=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(u){return!u||t.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},o=function(u,f){return f===void 0&&(f={}),a(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(n,l))};return Ze.camelCase=o,Ze}var et,lr;function Os(){if(lr)return et;lr=1;var e=et&&et.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(_s()),t=Rs();function r(i,a){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(s,o){s&&o&&(l[(0,t.camelCase)(s,a)]=o)}),l}return r.default=r,et=r,et}var Bs=Os();const $s=Kr(Bs),ci=fi("end"),vn=fi("start");function fi(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Hs(e){const n=vn(e),t=ci(e);if(n&&t)return{start:n,end:t}}function rt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ar(e.position):"start"in e||"end"in e?ar(e):"line"in e||"column"in e?cn(e):""}function cn(e){return sr(e&&e.line)+":"+sr(e&&e.column)}function ar(e){return cn(e&&e.start)+"-"+cn(e&&e.end)}function sr(e){return e&&typeof e=="number"?e:1}class ne extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",a={},l=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?i=n:!a.cause&&n&&(l=!0,i=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=rt(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ne.prototype.file="";ne.prototype.name="";ne.prototype.reason="";ne.prototype.message="";ne.prototype.stack="";ne.prototype.column=void 0;ne.prototype.line=void 0;ne.prototype.ancestors=void 0;ne.prototype.cause=void 0;ne.prototype.fatal=void 0;ne.prototype.place=void 0;ne.prototype.ruleId=void 0;ne.prototype.source=void 0;const En={}.hasOwnProperty,Us=new Map,Vs=/[A-Z]/g,qs=new Set(["table","tbody","thead","tfoot","tr"]),Ws=new Set(["td","th"]),hi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Js(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=to(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=eo(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?jn:Ds,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=pi(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function pi(e,n,t){if(n.type==="element")return Gs(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Ks(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ys(e,n,t);if(n.type==="mdxjsEsm")return Xs(e,n);if(n.type==="root")return Qs(e,n,t);if(n.type==="text")return Zs(e,n)}function Gs(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=jn,e.schema=i),e.ancestors.push(n);const a=mi(e,n.tagName,!1),l=no(e,n);let s=An(e,n);return qs.has(n.tagName)&&(s=s.filter(function(o){return typeof o=="string"?!js(o):!0})),di(e,l,a,n),Nn(l,s),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function Ks(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}st(e,n.position)}function Xs(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);st(e,n.position)}function Ys(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=jn,e.schema=i),e.ancestors.push(n);const a=n.name===null?e.Fragment:mi(e,n.name,!0),l=ro(e,n),s=An(e,n);return di(e,l,a,n),Nn(l,s),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function Qs(e,n,t){const r={};return Nn(r,An(e,n)),e.create(n,e.Fragment,r,t)}function Zs(e,n){return n.value}function di(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Nn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function eo(e,n,t){return r;function r(i,a,l,s){const u=Array.isArray(l.children)?t:n;return s?u(a,l,s):u(a,l)}}function to(e,n){return t;function t(r,i,a,l){const s=Array.isArray(a.children),o=vn(r);return n(i,a,l,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function no(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&En.call(n.properties,i)){const a=io(e,i,n.properties[i]);if(a){const[l,s]=a;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&Ws.has(n.tagName)?r=s:t[l]=s}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function ro(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const s=l.properties[0];s.type,Object.assign(t,e.evaluater.evaluateExpression(s.argument))}else st(e,n.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else st(e,n.position);else a=r.value===null?!0:r.value;t[i]=a}return t}function An(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Us;for(;++r<n.children.length;){const a=n.children[r];let l;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const u=i.get(o)||0;l=o+"-"+u,i.set(o,u+1)}}const s=pi(e,a,l);s!==void 0&&t.push(s)}return t}function io(e,n,t){const r=Ps(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?bs(t):Ms(t)),r.property==="style"){let i=typeof t=="object"?t:lo(e,String(t));return e.stylePropertyNameCase==="css"&&(i=ao(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?As[r.property]||r.property:r.attribute,t]}}function lo(e,n){try{return $s(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ne("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=hi+"#cannot-parse-style-attribute",i}}function mi(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let a=-1,l;for(;++a<i.length;){const s=Qn(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};l=l?{type:"MemberExpression",object:l,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=l}else r=Qn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return En.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);st(e)}function st(e,n){const t=new ne("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=hi+"#cannot-handle-mdx-estrees-without-createevaluater",t}function ao(e){const n={};let t;for(t in e)En.call(e,t)&&(n[so(t)]=e[t]);return n}function so(e){let n=e.replace(Vs,oo);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function oo(e){return"-"+e.toLowerCase()}const Bt={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"]},uo={};function In(e,n){const t=uo,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return gi(e,r,i)}function gi(e,n,t){if(co(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return or(e.children,n,t)}return Array.isArray(e)?or(e,n,t):""}function or(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=gi(e[i],n,t);return r.join("")}function co(e){return!!(e&&typeof e=="object")}const ur=document.createElement("i");function Tn(e){const n="&"+e+";";ur.innerHTML=n;const t=ur.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function ue(e,n,t,r){const i=e.length;let a=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);a<r.length;)l=r.slice(a,a+1e4),l.unshift(n,0),e.splice(...l),a+=1e4,n+=1e4}function ce(e,n){return e.length>0?(ue(e,e.length,0,n),e):n}const cr={}.hasOwnProperty;function xi(e){const n={};let t=-1;for(;++t<e.length;)fo(n,e[t]);return n}function fo(e,n){let t;for(t in n){const i=(cr.call(e,t)?e[t]:void 0)||(e[t]={}),a=n[t];let l;if(a)for(l in a){cr.call(i,l)||(i[l]=[]);const s=a[l];ho(i[l],Array.isArray(s)?s:s?[s]:[])}}}function ho(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);ue(e,0,0,r)}function yi(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function me(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const re=Ie(/[A-Za-z]/),te=Ie(/[\dA-Za-z]/),po=Ie(/[#-'*+\--9=?A-Z^-~]/);function St(e){return e!==null&&(e<32||e===127)}const fn=Ie(/\d/),mo=Ie(/[\dA-Fa-f]/),go=Ie(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}const zt=Ie(new RegExp("\\p{P}|\\p{S}","u")),Fe=Ie(/\s/);function Ie(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ke(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const a=e.charCodeAt(t);let l="";if(a===37&&te(e.charCodeAt(t+1))&&te(e.charCodeAt(t+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(t+1);a<56320&&s>56319&&s<57344?(l=String.fromCharCode(a,s),i=1):l="�"}else l=String.fromCharCode(a);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function V(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(o){return H(o)?(e.enter(t),s(o)):n(o)}function s(o){return H(o)&&a++<i?(e.consume(o),s):(e.exit(t),n(o))}}const xo={tokenize:yo};function yo(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),V(e,n,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const o=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=o),t=o,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return R(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),l)}}const bo={tokenize:ko},fr={tokenize:wo};function ko(e){const n=this,t=[];let r=0,i,a,l;return s;function s(v){if(r<t.length){const N=t[r];return n.containerState=N[1],e.attempt(N[0].continuation,o,u)(v)}return u(v)}function o(v){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&E();const N=n.events.length;let j=N,b;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){b=n.events[j][1].end;break}k(r);let L=N;for(;L<n.events.length;)n.events[L][1].end={...b},L++;return ue(n.events,j+1,0,n.events.slice(N)),n.events.length=L,u(v)}return s(v)}function u(v){if(r===t.length){if(!i)return d(v);if(i.currentConstruct&&i.currentConstruct.concrete)return m(v);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(fr,f,c)(v)}function f(v){return i&&E(),k(r),d(v)}function c(v){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,m(v)}function d(v){return n.containerState={},e.attempt(fr,p,m)(v)}function p(v){return r++,t.push([n.currentConstruct,n.containerState]),d(v)}function m(v){if(v===null){i&&E(),k(0),e.consume(v);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),w(v)}function w(v){if(v===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(v);return}return R(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,n.interrupt=void 0,s):(e.consume(v),w)}function S(v,N){const j=n.sliceStream(v);if(N&&j.push(null),v.previous=a,a&&(a.next=v),a=v,i.defineSkip(v.start),i.write(j),n.parser.lazy[v.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const L=n.events.length;let M=L,F,y;for(;M--;)if(n.events[M][0]==="exit"&&n.events[M][1].type==="chunkFlow"){if(F){y=n.events[M][1].end;break}F=!0}for(k(r),b=L;b<n.events.length;)n.events[b][1].end={...y},b++;ue(n.events,M+1,0,n.events.slice(L)),n.events.length=b}}function k(v){let N=t.length;for(;N-- >v;){const j=t[N];n.containerState=j[1],j[0].exit.call(n,e)}t.length=v}function E(){i.write([null]),a=void 0,i=void 0,n.containerState._closeFlow=void 0}}function wo(e,n,t){return V(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function We(e){if(e===null||G(e)||Fe(e))return 1;if(zt(e))return 2}function Lt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(n=a(n,t),r.push(a))}return n}const hn={name:"attention",resolveAll:So,tokenize:Co};function So(e,n){let t=-1,r,i,a,l,s,o,u,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},d={...e[t][1].start};hr(c,-o),hr(d,o),l={type:o>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:o>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:o>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[r][1].end={...l.start},e[t][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ce(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ce(u,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",a,n]]),u=ce(u,Lt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ce(u,[["exit",a,n],["enter",s,n],["exit",s,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=ce(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,ue(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Co(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=We(r);let a;return l;function l(o){return a=o,e.enter("attentionSequence"),s(o)}function s(o){if(o===a)return e.consume(o),s;const u=e.exit("attentionSequence"),f=We(o),c=!f||f===2&&i||t.includes(o),d=!i||i===2&&f||t.includes(r);return u._open=!!(a===42?c:c&&(i||!d)),u._close=!!(a===42?d:d&&(f||!c)),n(o)}}function hr(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const jo={name:"autolink",tokenize:vo};function vo(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return re(p)?(e.consume(p),l):p===64?t(p):u(p)}function l(p){return p===43||p===45||p===46||te(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||te(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||St(p)?t(p):(e.consume(p),o)}function u(p){return p===64?(e.consume(p),f):po(p)?(e.consume(p),u):t(p)}function f(p){return te(p)?c(p):t(p)}function c(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):d(p)}function d(p){if((p===45||te(p))&&r++<63){const m=p===45?d:c;return e.consume(p),m}return t(p)}}const ft={partial:!0,tokenize:Eo};function Eo(e,n,t){return r;function r(a){return H(a)?V(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||R(a)?n(a):t(a)}}const bi={continuation:{tokenize:Ao},exit:Io,name:"blockQuote",tokenize:No};function No(e,n,t){const r=this;return i;function i(l){if(l===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return t(l)}function a(l){return H(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function Ao(e,n,t){const r=this;return i;function i(l){return H(l)?V(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(bi,n,t)(l)}}function Io(e){e.exit("blockQuote")}const ki={name:"characterEscape",tokenize:To};function To(e,n,t){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return go(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(a)}}const wi={name:"characterReference",tokenize:Po};function Po(e,n,t){const r=this;let i=0,a,l;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),o}function o(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,l=te,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=mo,f):(e.enter("characterReferenceValue"),a=7,l=fn,f(c))}function f(c){if(c===59&&i){const d=e.exit("characterReferenceValue");return l===te&&!Tn(r.sliceSerialize(d))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<a?(e.consume(c),f):t(c)}}const pr={partial:!0,tokenize:Lo},dr={concrete:!0,name:"codeFenced",tokenize:zo};function zo(e,n,t){const r=this,i={partial:!0,tokenize:j};let a=0,l=0,s;return o;function o(b){return u(b)}function u(b){const L=r.events[r.events.length-1];return a=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,s=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===s?(l++,e.consume(b),f):l<3?t(b):(e.exit("codeFencedFenceSequence"),H(b)?V(e,c,"whitespace")(b):c(b))}function c(b){return b===null||R(b)?(e.exit("codeFencedFence"),r.interrupt?n(b):e.check(pr,w,N)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||R(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):H(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),V(e,p,"whitespace")(b)):b===96&&b===s?t(b):(e.consume(b),d)}function p(b){return b===null||R(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||R(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===s?t(b):(e.consume(b),m)}function w(b){return e.attempt(i,N,S)(b)}function S(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),k}function k(b){return a>0&&H(b)?V(e,E,"linePrefix",a+1)(b):E(b)}function E(b){return b===null||R(b)?e.check(pr,w,N)(b):(e.enter("codeFlowValue"),v(b))}function v(b){return b===null||R(b)?(e.exit("codeFlowValue"),E(b)):(e.consume(b),v)}function N(b){return e.exit("codeFenced"),n(b)}function j(b,L,M){let F=0;return y;function y(D){return b.enter("lineEnding"),b.consume(D),b.exit("lineEnding"),T}function T(D){return b.enter("codeFencedFence"),H(D)?V(b,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):z(D)}function z(D){return D===s?(b.enter("codeFencedFenceSequence"),B(D)):M(D)}function B(D){return D===s?(F++,b.consume(D),B):F>=l?(b.exit("codeFencedFenceSequence"),H(D)?V(b,_,"whitespace")(D):_(D)):M(D)}function _(D){return D===null||R(D)?(b.exit("codeFencedFence"),L(D)):M(D)}}}function Lo(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const $t={name:"codeIndented",tokenize:Mo},Do={partial:!0,tokenize:Fo};function Mo(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),V(e,a,"linePrefix",5)(u)}function a(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):t(u)}function l(u){return u===null?o(u):R(u)?e.attempt(Do,l,o)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||R(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),s)}function o(u){return e.exit("codeIndented"),n(u)}}function Fo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):V(e,a,"linePrefix",5)(l)}function a(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(l):R(l)?i(l):t(l)}}const _o={name:"codeText",previous:Oo,resolve:Ro,tokenize:Bo};function Ro(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Oo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Bo(e,n,t){let r=0,i,a;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),o(c))}function o(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),o):c===96?(a=e.enter("codeTextSequence"),i=0,f(c)):R(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||R(c)?(e.exit("codeTextData"),o(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(a.type="codeTextData",u(c))}}class $o{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&tt(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),tt(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),tt(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);tt(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);tt(this.left,t.reverse())}}}function tt(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Si(e){const n={};let t=-1,r,i,a,l,s,o,u;const f=new $o(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Ho(f,t)),t=n[t],u=!0);else if(r[1]._container){for(a=t,i=void 0;a--;)if(l=f.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,t),s.unshift(r),f.splice(i,t-i+1,s))}}return ue(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Ho(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const a=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const s=l.events,o=[],u={};let f,c,d=-1,p=t,m=0,w=0;const S=[w];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=t;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(w=d+1,S.push(w),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),d=S.length;d--;){const k=s.slice(S[d],S[d+1]),E=a.pop();o.push([E,E+k.length-1]),e.splice(E,2,k)}for(o.reverse(),d=-1;++d<o.length;)u[m+o[d][0]]=m+o[d][1],m+=o[d][1]-o[d][0]-1;return u}const Uo={resolve:qo,tokenize:Wo},Vo={partial:!0,tokenize:Jo};function qo(e){return Si(e),e}function Wo(e,n){let t;return r;function r(s){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):R(s)?e.check(Vo,l,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),n(s)}function l(s){return e.consume(s),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Jo(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),V(e,a,"linePrefix")}function a(l){if(l===null||R(l))return t(l);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Ci(e,n,t,r,i,a,l,s,o){const u=o||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),d):k===null||k===32||k===41||St(k)?t(k):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),w(k))}function d(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(s),d(k)):k===null||k===60||R(k)?t(k):(e.consume(k),k===92?m:p)}function m(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function w(k){return!f&&(k===null||k===41||G(k))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),n(k)):f<u&&k===40?(e.consume(k),f++,w):k===41?(e.consume(k),f--,w):k===null||k===32||k===40||St(k)?t(k):(e.consume(k),k===92?S:w)}function S(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function ji(e,n,t,r,i,a){const l=this;let s=0,o;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),f}function f(p){return s>999||p===null||p===91||p===93&&!o||p===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?t(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||R(p)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),o||(o=!H(p)),p===92?d:c)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function vi(e,n,t,r,i,a){let l;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,o):t(d)}function o(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(a),u(d))}function u(d){return d===l?(e.exit(a),o(l)):d===null?t(d):R(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),V(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===l||d===null||R(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?c:f)}function c(d){return d===l||d===92?(e.consume(d),f):f(d)}}function it(e,n){let t;return r;function r(i){return R(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):H(i)?V(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Go={name:"definition",tokenize:Xo},Ko={partial:!0,tokenize:Yo};function Xo(e,n,t){const r=this;let i;return a;function a(p){return e.enter("definition"),l(p)}function l(p){return ji.call(r,e,s,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=me(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):t(p)}function o(p){return G(p)?it(e,u)(p):u(p)}function u(p){return Ci(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Ko,c,c)(p)}function c(p){return H(p)?V(e,d,"whitespace")(p):d(p)}function d(p){return p===null||R(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Yo(e,n,t){return r;function r(s){return G(s)?it(e,i)(s):t(s)}function i(s){return vi(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return H(s)?V(e,l,"whitespace")(s):l(s)}function l(s){return s===null||R(s)?n(s):t(s)}}const Qo={name:"hardBreakEscape",tokenize:Zo};function Zo(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return R(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const eu={name:"headingAtx",resolve:tu,tokenize:nu};function tu(e,n){let t=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},ue(e,r,t-r+1,[["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n]])),e}function nu(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||G(f)?(e.exit("atxHeadingSequence"),s(f)):t(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),o(f)):f===null||R(f)?(e.exit("atxHeading"),n(f)):H(f)?V(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||G(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const ru=["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"],mr=["pre","script","style","textarea"],iu={concrete:!0,name:"htmlFlow",resolveTo:su,tokenize:ou},lu={partial:!0,tokenize:cu},au={partial:!0,tokenize:uu};function su(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function ou(e,n,t){const r=this;let i,a,l,s,o;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),d):x===47?(e.consume(x),a=!0,w):x===63?(e.consume(x),i=3,r.interrupt?n:g):re(x)?(e.consume(x),l=String.fromCharCode(x),S):t(x)}function d(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,m):re(x)?(e.consume(x),i=4,r.interrupt?n:g):t(x)}function p(x){return x===45?(e.consume(x),r.interrupt?n:g):t(x)}function m(x){const pe="CDATA[";return x===pe.charCodeAt(s++)?(e.consume(x),s===pe.length?r.interrupt?n:z:m):t(x)}function w(x){return re(x)?(e.consume(x),l=String.fromCharCode(x),S):t(x)}function S(x){if(x===null||x===47||x===62||G(x)){const pe=x===47,Te=l.toLowerCase();return!pe&&!a&&mr.includes(Te)?(i=1,r.interrupt?n(x):z(x)):ru.includes(l.toLowerCase())?(i=6,pe?(e.consume(x),k):r.interrupt?n(x):z(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(x):a?E(x):v(x))}return x===45||te(x)?(e.consume(x),l+=String.fromCharCode(x),S):t(x)}function k(x){return x===62?(e.consume(x),r.interrupt?n:z):t(x)}function E(x){return H(x)?(e.consume(x),E):y(x)}function v(x){return x===47?(e.consume(x),y):x===58||x===95||re(x)?(e.consume(x),N):H(x)?(e.consume(x),v):y(x)}function N(x){return x===45||x===46||x===58||x===95||te(x)?(e.consume(x),N):j(x)}function j(x){return x===61?(e.consume(x),b):H(x)?(e.consume(x),j):v(x)}function b(x){return x===null||x===60||x===61||x===62||x===96?t(x):x===34||x===39?(e.consume(x),o=x,L):H(x)?(e.consume(x),b):M(x)}function L(x){return x===o?(e.consume(x),o=null,F):x===null||R(x)?t(x):(e.consume(x),L)}function M(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||G(x)?j(x):(e.consume(x),M)}function F(x){return x===47||x===62||H(x)?v(x):t(x)}function y(x){return x===62?(e.consume(x),T):t(x)}function T(x){return x===null||R(x)?z(x):H(x)?(e.consume(x),T):t(x)}function z(x){return x===45&&i===2?(e.consume(x),q):x===60&&i===1?(e.consume(x),Y):x===62&&i===4?(e.consume(x),he):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),ke):R(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(lu,we,B)(x)):x===null||R(x)?(e.exit("htmlFlowData"),B(x)):(e.consume(x),z)}function B(x){return e.check(au,_,we)(x)}function _(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),D}function D(x){return x===null||R(x)?B(x):(e.enter("htmlFlowData"),z(x))}function q(x){return x===45?(e.consume(x),g):z(x)}function Y(x){return x===47?(e.consume(x),l="",fe):z(x)}function fe(x){if(x===62){const pe=l.toLowerCase();return mr.includes(pe)?(e.consume(x),he):z(x)}return re(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),fe):z(x)}function ke(x){return x===93?(e.consume(x),g):z(x)}function g(x){return x===62?(e.consume(x),he):x===45&&i===2?(e.consume(x),g):z(x)}function he(x){return x===null||R(x)?(e.exit("htmlFlowData"),we(x)):(e.consume(x),he)}function we(x){return e.exit("htmlFlow"),n(x)}}function uu(e,n,t){const r=this;return i;function i(l){return R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):t(l)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function cu(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ft,n,t)}}const fu={name:"htmlText",tokenize:hu};function hu(e,n,t){const r=this;let i,a,l;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),o}function o(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),j):g===63?(e.consume(g),v):re(g)?(e.consume(g),M):t(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),a=0,m):re(g)?(e.consume(g),E):t(g)}function f(g){return g===45?(e.consume(g),p):t(g)}function c(g){return g===null?t(g):g===45?(e.consume(g),d):R(g)?(l=c,Y(g)):(e.consume(g),c)}function d(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?q(g):g===45?d(g):c(g)}function m(g){const he="CDATA[";return g===he.charCodeAt(a++)?(e.consume(g),a===he.length?w:m):t(g)}function w(g){return g===null?t(g):g===93?(e.consume(g),S):R(g)?(l=w,Y(g)):(e.consume(g),w)}function S(g){return g===93?(e.consume(g),k):w(g)}function k(g){return g===62?q(g):g===93?(e.consume(g),k):w(g)}function E(g){return g===null||g===62?q(g):R(g)?(l=E,Y(g)):(e.consume(g),E)}function v(g){return g===null?t(g):g===63?(e.consume(g),N):R(g)?(l=v,Y(g)):(e.consume(g),v)}function N(g){return g===62?q(g):v(g)}function j(g){return re(g)?(e.consume(g),b):t(g)}function b(g){return g===45||te(g)?(e.consume(g),b):L(g)}function L(g){return R(g)?(l=L,Y(g)):H(g)?(e.consume(g),L):q(g)}function M(g){return g===45||te(g)?(e.consume(g),M):g===47||g===62||G(g)?F(g):t(g)}function F(g){return g===47?(e.consume(g),q):g===58||g===95||re(g)?(e.consume(g),y):R(g)?(l=F,Y(g)):H(g)?(e.consume(g),F):q(g)}function y(g){return g===45||g===46||g===58||g===95||te(g)?(e.consume(g),y):T(g)}function T(g){return g===61?(e.consume(g),z):R(g)?(l=T,Y(g)):H(g)?(e.consume(g),T):F(g)}function z(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,B):R(g)?(l=z,Y(g)):H(g)?(e.consume(g),z):(e.consume(g),_)}function B(g){return g===i?(e.consume(g),i=void 0,D):g===null?t(g):R(g)?(l=B,Y(g)):(e.consume(g),B)}function _(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||G(g)?F(g):(e.consume(g),_)}function D(g){return g===47||g===62||G(g)?F(g):t(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function Y(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),fe}function fe(g){return H(g)?V(e,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):ke(g)}function ke(g){return e.enter("htmlTextData"),l(g)}}const Pn={name:"labelEnd",resolveAll:gu,resolveTo:xu,tokenize:yu},pu={tokenize:bu},du={tokenize:ku},mu={tokenize:wu};function gu(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&ue(e,0,e.length,t),e}function xu(e,n){let t=e.length,r=0,i,a,l,s;for(;t--;)if(i=e[t][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return s=[["enter",o,n],["enter",u,n]],s=ce(s,e.slice(a+1,a+r+3)),s=ce(s,[["enter",f,n]]),s=ce(s,Lt(n.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),n)),s=ce(s,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),s=ce(s,e.slice(l+1)),s=ce(s,[["exit",o,n]]),ue(e,a,e.length,s),e}function yu(e,n,t){const r=this;let i=r.events.length,a,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?c(d):(l=r.parser.defined.includes(me(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),o):t(d)}function o(d){return d===40?e.attempt(pu,f,l?f:c)(d):d===91?e.attempt(du,f,l?u:c)(d):l?f(d):c(d)}function u(d){return e.attempt(mu,f,c)(d)}function f(d){return n(d)}function c(d){return a._balanced=!0,t(d)}}function bu(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return G(c)?it(e,a)(c):a(c)}function a(c){return c===41?f(c):Ci(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return G(c)?it(e,o)(c):f(c)}function s(c){return t(c)}function o(c){return c===34||c===39||c===40?vi(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return G(c)?it(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function ku(e,n,t){const r=this;return i;function i(s){return ji.call(r,e,a,l,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(me(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function l(s){return t(s)}}function wu(e,n,t){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),n):t(a)}}const Su={name:"labelStartImage",resolveAll:Pn.resolveAll,tokenize:Cu};function Cu(e,n,t){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),l):t(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const ju={name:"labelStartLink",resolveAll:Pn.resolveAll,tokenize:vu};function vu(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const Ht={name:"lineEnding",tokenize:Eu};function Eu(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),V(e,n,"linePrefix")}}const yt={name:"thematicBreak",tokenize:Nu};function Nu(e,n,t){let r=0,i;return a;function a(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):r>=3&&(u===null||R(u))?(e.exit("thematicBreak"),n(u)):t(u)}function o(u){return u===i?(e.consume(u),r++,o):(e.exit("thematicBreakSequence"),H(u)?V(e,s,"whitespace")(u):s(u))}}const le={continuation:{tokenize:Pu},exit:Lu,name:"list",tokenize:Tu},Au={partial:!0,tokenize:Du},Iu={partial:!0,tokenize:zu};function Tu(e,n,t){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:fn(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(yt,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return t(p)}function o(p){return fn(p)&&++l<10?(e.consume(p),o):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ft,r.interrupt?t:f,e.attempt(Au,d,c))}function f(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function c(p){return H(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Pu(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(ft,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,V(e,n,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!H(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Iu,n,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,V(e,e.attempt(le,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function zu(e,n,t){const r=this;return V(e,i,"listItemIndent",r.containerState.size+1);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(a):t(a)}}function Lu(e){e.exit(this.containerState.type)}function Du(e,n,t){const r=this;return V(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=r.events[r.events.length-1];return!H(a)&&l&&l[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const gr={name:"setextUnderline",resolveTo:Mu,tokenize:Fu};function Mu(e,n){let t=e.length,r,i,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function Fu(e,n,t){const r=this;let i;return a;function a(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),H(u)?V(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||R(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const _u={tokenize:Ru};function Ru(e){const n=this,t=e.attempt(ft,r,e.attempt(this.parser.constructs.flowInitial,i,V(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Uo,i)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Ou={resolveAll:Ni()},Bu=Ei("string"),$u=Ei("text");function Ei(e){return{resolveAll:Ni(e==="text"?Hu:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],a=t.attempt(i,l,s);return l;function l(f){return u(f)?a(f):s(f)}function s(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),o}function o(f){return u(f)?(t.exit("data"),a(f)):(t.consume(f),o)}function u(f){if(f===null)return!0;const c=i[f];let d=-1;if(c)for(;++d<c.length;){const p=c[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Ni(e){return n;function n(t,r){let i=-1,a;for(;++i<=t.length;)a===void 0?t[i]&&t[i][1].type==="data"&&(a=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==a+2&&(t[a][1].end=t[i-1][1].end,t.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(t,r):t}}function Hu(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let a=i.length,l=-1,s=0,o;for(;a--;){const u=i[a];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(u===-2)o=!0,s++;else if(u!==-1){a++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(s=0),s){const u={type:t===e.length||o||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const Uu={42:le,43:le,45:le,48:le,49:le,50:le,51:le,52:le,53:le,54:le,55:le,56:le,57:le,62:bi},Vu={91:Go},qu={[-2]:$t,[-1]:$t,32:$t},Wu={35:eu,42:yt,45:[gr,yt],60:iu,61:gr,95:yt,96:dr,126:dr},Ju={38:wi,92:ki},Gu={[-5]:Ht,[-4]:Ht,[-3]:Ht,33:Su,38:wi,42:hn,60:[jo,fu],91:ju,92:[Qo,ki],93:Pn,95:hn,96:_o},Ku={null:[hn,Ou]},Xu={null:[42,95]},Yu={null:[]},Qu=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Xu,contentInitial:Vu,disable:Yu,document:Uu,flow:Wu,flowInitial:qu,insideSpan:Ku,string:Ju,text:Gu},Symbol.toStringTag,{value:"Module"}));function Zu(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},a=[];let l=[],s=[];const o={attempt:L(j),check:L(b),consume:E,enter:v,exit:N,interrupt:L(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:w,events:[],now:m,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:c};let f=n.tokenize.call(u,o);return n.resolveAll&&a.push(n),u;function c(T){return l=ce(l,T),S(),l[l.length-1]!==null?[]:(M(n,0),u.events=Lt(a,u.events,u),u.events)}function d(T,z){return tc(p(T),z)}function p(T){return ec(l,T)}function m(){const{_bufferIndex:T,_index:z,line:B,column:_,offset:D}=r;return{_bufferIndex:T,_index:z,line:B,column:_,offset:D}}function w(T){i[T.line]=T.column,y()}function S(){let T;for(;r._index<l.length;){const z=l[r._index];if(typeof z=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<z.length;)k(z.charCodeAt(r._bufferIndex));else k(z)}}function k(T){f=f(T)}function E(T){R(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,y()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=T}function v(T,z){const B=z||{};return B.type=T,B.start=m(),u.events.push(["enter",B,u]),s.push(B),B}function N(T){const z=s.pop();return z.end=m(),u.events.push(["exit",z,u]),z}function j(T,z){M(T,z.from)}function b(T,z){z.restore()}function L(T,z){return B;function B(_,D,q){let Y,fe,ke,g;return Array.isArray(_)?we(_):"tokenize"in _?we([_]):he(_);function he(Z){return Xe;function Xe(ve){const Re=ve!==null&&Z[ve],Oe=ve!==null&&Z.null,pt=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return we(pt)(ve)}}function we(Z){return Y=Z,fe=0,Z.length===0?q:x(Z[fe])}function x(Z){return Xe;function Xe(ve){return g=F(),ke=Z,Z.partial||(u.currentConstruct=Z),Z.name&&u.parser.constructs.disable.null.includes(Z.name)?Te():Z.tokenize.call(z?Object.assign(Object.create(u),z):u,o,pe,Te)(ve)}}function pe(Z){return T(ke,g),D}function Te(Z){return g.restore(),++fe<Y.length?x(Y[fe]):q}}}function M(T,z){T.resolveAll&&!a.includes(T)&&a.push(T),T.resolve&&ue(u.events,z,u.events.length-z,T.resolve(u.events.slice(z),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function F(){const T=m(),z=u.previous,B=u.currentConstruct,_=u.events.length,D=Array.from(s);return{from:_,restore:q};function q(){r=T,u.previous=z,u.currentConstruct=B,u.events.length=_,s=D,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ec(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,a=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,a)];else{if(l=e.slice(t,i),r>-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function tc(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const a=e[t];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
4
|
-
`;break}case-3:{l=`\r
|
|
5
|
-
`;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(a)}i=a===-2,r.push(l)}return r.join("")}function nc(e){const r={constructs:xi([Qu,...(e||{}).extensions||[]]),content:i(xo),defined:[],document:i(bo),flow:i(_u),lazy:{},string:i(Bu),text:i($u)};return r;function i(a){return l;function l(s){return Zu(r,a,s)}}}function rc(e){for(;!Si(e););return e}const xr=/[\0\t\n\r]/g;function ic(){let e=1,n="",t=!0,r;return i;function i(a,l,s){const o=[];let u,f,c,d,p;for(a=n+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),c=0,n="",t&&(a.charCodeAt(0)===65279&&c++,t=void 0);c<a.length;){if(xr.lastIndex=c,u=xr.exec(a),d=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(d),!u){n=a.slice(c);break}if(p===10&&c===d&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),c<d&&(o.push(a.slice(c,d)),e+=d-c),p){case 0:{o.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,o.push(-2);e++<f;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}c=d+1}return s&&(r&&o.push(-5),n&&o.push(n),o.push(null)),o}}const lc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ac(e){return e.replace(lc,sc)}function sc(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),a=i===120||i===88;return yi(t.slice(a?2:1),a?16:10)}return Tn(t)||e}const Ai={}.hasOwnProperty;function oc(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),uc(t)(rc(nc(t).document().write(ic()(e,n,!0))))}function uc(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Vn),autolinkProtocol:F,autolinkEmail:F,atxHeading:a($n),blockQuote:a(Oe),characterEscape:F,characterReference:F,codeFenced:a(pt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(pt,l),codeText:a(cl,l),codeTextData:F,data:F,codeFlowValue:F,definition:a(fl),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(hl),hardBreakEscape:a(Hn),hardBreakTrailing:a(Hn),htmlFlow:a(Un,l),htmlFlowData:F,htmlText:a(Un,l),htmlTextData:F,image:a(pl),label:l,link:a(Vn),listItem:a(dl),listItemValue:d,listOrdered:a(qn,c),listUnordered:a(qn),paragraph:a(ml),reference:x,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a($n),strong:a(gl),thematicBreak:a(yl)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:Re,autolinkProtocol:ve,blockQuote:o(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:Z,characterReference:Xe,codeFenced:o(S),codeFencedFence:w,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:y,codeIndented:o(k),codeText:o(D),codeTextData:y,data:y,definition:o(),definitionDestinationString:N,definitionLabelString:E,definitionTitleString:v,emphasis:o(),hardBreakEscape:o(z),hardBreakTrailing:o(z),htmlFlow:o(B),htmlFlowData:y,htmlText:o(_),htmlTextData:y,image:o(Y),label:ke,labelText:fe,lineEnding:T,link:o(q),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:pe,resourceDestinationString:g,resourceTitleString:he,resource:we,setextHeading:o(M),setextHeadingLineSequence:L,setextHeadingText:b,strong:o(),thematicBreak:o()}};Ii(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(C){let P={type:"root",children:[]};const $={stack:[P],tokenStack:[],config:n,enter:s,exit:u,buffer:l,resume:f,data:t},U=[];let W=-1;for(;++W<C.length;)if(C[W][1].type==="listOrdered"||C[W][1].type==="listUnordered")if(C[W][0]==="enter")U.push(W);else{const de=U.pop();W=i(C,de,W)}for(W=-1;++W<C.length;){const de=n[C[W][0]];Ai.call(de,C[W][1].type)&&de[C[W][1].type].call(Object.assign({sliceSerialize:C[W][2].sliceSerialize},$),C[W][1])}if($.tokenStack.length>0){const de=$.tokenStack[$.tokenStack.length-1];(de[1]||yr).call($,void 0,de[0])}for(P.position={start:Ee(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Ee(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<n.transforms.length;)P=n.transforms[W](P)||P;return P}function i(C,P,$){let U=P-1,W=-1,de=!1,Pe,Se,Ye,Qe;for(;++U<=$;){const se=C[U];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?W++:W--,Qe=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(Pe&&!Qe&&!W&&!Ye&&(Ye=U),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!W&&se[0]==="enter"&&se[1].type==="listItemPrefix"||W===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(Pe){let Be=U;for(Se=void 0;Be--;){const Ce=C[Be];if(Ce[1].type==="lineEnding"||Ce[1].type==="lineEndingBlank"){if(Ce[0]==="exit")continue;Se&&(C[Se][1].type="lineEndingBlank",de=!0),Ce[1].type="lineEnding",Se=Be}else if(!(Ce[1].type==="linePrefix"||Ce[1].type==="blockQuotePrefix"||Ce[1].type==="blockQuotePrefixWhitespace"||Ce[1].type==="blockQuoteMarker"||Ce[1].type==="listItemIndent"))break}Ye&&(!Se||Ye<Se)&&(Pe._spread=!0),Pe.end=Object.assign({},Se?C[Se][1].start:se[1].end),C.splice(Se||U,0,["exit",Pe,se[2]]),U++,$++}if(se[1].type==="listItemPrefix"){const Be={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};Pe=Be,C.splice(U,0,["enter",Be,se[2]]),U++,$++,Ye=void 0,Qe=!0}}}return C[P][1]._spread=de,$}function a(C,P){return $;function $(U){s.call(this,C(U),U),P&&P.call(this,U)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(C,P,$){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([P,$||void 0]),C.position={start:Ee(P.start),end:void 0}}function o(C){return P;function P($){C&&C.call(this,$),u.call(this,$)}}function u(C,P){const $=this.stack.pop(),U=this.tokenStack.pop();if(U)U[0].type!==C.type&&(P?P.call(this,C,U[0]):(U[1]||yr).call(this,C,U[0]));else throw new Error("Cannot close `"+C.type+"` ("+rt({start:C.start,end:C.end})+"): it’s not open");$.position.end=Ee(C.end)}function f(){return In(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function d(C){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),P=this.stack[this.stack.length-1];P.lang=C}function m(){const C=this.resume(),P=this.stack[this.stack.length-1];P.meta=C}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C.replace(/(\r?\n|\r)$/g,"")}function E(C){const P=this.resume(),$=this.stack[this.stack.length-1];$.label=P,$.identifier=me(this.sliceSerialize(C)).toLowerCase()}function v(){const C=this.resume(),P=this.stack[this.stack.length-1];P.title=C}function N(){const C=this.resume(),P=this.stack[this.stack.length-1];P.url=C}function j(C){const P=this.stack[this.stack.length-1];if(!P.depth){const $=this.sliceSerialize(C).length;P.depth=$}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function L(C){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function F(C){const $=this.stack[this.stack.length-1].children;let U=$[$.length-1];(!U||U.type!=="text")&&(U=xl(),U.position={start:Ee(C.start),end:void 0},$.push(U)),this.stack.push(U)}function y(C){const P=this.stack.pop();P.value+=this.sliceSerialize(C),P.position.end=Ee(C.end)}function T(C){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=P.children[P.children.length-1];$.position.end=Ee(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(P.type)&&(F.call(this,C),y.call(this,C))}function z(){this.data.atHardBreak=!0}function B(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C}function _(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C}function D(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C}function q(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=P,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function Y(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=P,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function fe(C){const P=this.sliceSerialize(C),$=this.stack[this.stack.length-2];$.label=ac(P),$.identifier=me(P).toLowerCase()}function ke(){const C=this.stack[this.stack.length-1],P=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const U=C.children;$.children=U}else $.alt=P}function g(){const C=this.resume(),P=this.stack[this.stack.length-1];P.url=C}function he(){const C=this.resume(),P=this.stack[this.stack.length-1];P.title=C}function we(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function pe(C){const P=this.resume(),$=this.stack[this.stack.length-1];$.label=P,$.identifier=me(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function Te(C){this.data.characterReferenceType=C.type}function Z(C){const P=this.sliceSerialize(C),$=this.data.characterReferenceType;let U;$?(U=yi(P,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):U=Tn(P);const W=this.stack[this.stack.length-1];W.value+=U}function Xe(C){const P=this.stack.pop();P.position.end=Ee(C.end)}function ve(C){y.call(this,C);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(C)}function Re(C){y.call(this,C);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(C)}function Oe(){return{type:"blockquote",children:[]}}function pt(){return{type:"code",lang:null,meta:null,value:""}}function cl(){return{type:"inlineCode",value:""}}function fl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function hl(){return{type:"emphasis",children:[]}}function $n(){return{type:"heading",depth:0,children:[]}}function Hn(){return{type:"break"}}function Un(){return{type:"html",value:""}}function pl(){return{type:"image",title:null,url:"",alt:null}}function Vn(){return{type:"link",title:null,url:"",children:[]}}function qn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function dl(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function ml(){return{type:"paragraph",children:[]}}function gl(){return{type:"strong",children:[]}}function xl(){return{type:"text",value:""}}function yl(){return{type:"thematicBreak"}}}function Ee(e){return{line:e.line,column:e.column,offset:e.offset}}function Ii(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Ii(e,r):cc(e,r)}}function cc(e,n){let t;for(t in n)if(Ai.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function yr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+rt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+rt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+rt({start:n.start,end:n.end})+") is still open")}function fc(e){const n=this;n.parser=t;function t(r){return oc(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function hc(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function pc(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
6
|
-
`}]}function dc(e,n){const t=n.value?n.value+`
|
|
7
|
-
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function mc(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function gc(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xc(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Ke(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,s+=1,e.footnoteCounts.set(r,s);const o={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(n,u),e.applyData(n,u)}function yc(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function bc(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Ti(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function kc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Ti(e,n);const i={src:Ke(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,a),e.applyData(n,a)}function wc(e,n){const t={src:Ke(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Sc(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Cc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Ti(e,n);const i={href:Ke(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function jc(e,n){const t={href:Ke(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function vc(e,n,t){const r=e.all(n),i=t?Ec(t):Pi(n),a={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
8
|
-
`}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&l.push({type:"text",value:`
|
|
9
|
-
`});const u={type:"element",tagName:"li",properties:a,children:l};return e.patch(n,u),e.applyData(n,u)}function Ec(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=Pi(t[r])}return n}function Pi(e){const n=e.spread;return n??e.children.length>1}function Nc(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const a={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function Ac(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ic(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Tc(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Pc(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},s=vn(n.children[1]),o=ci(n.children[n.children.length-1]);s&&o&&(l.position={start:s,end:o}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,a),e.applyData(n,a)}function zc(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,s=l?l.length:n.children.length;let o=-1;const u=[];for(;++o<s;){const c=n.children[o],d={},p=l?l[o]:void 0;p&&(d.align=p);let m={type:"element",tagName:a,properties:d,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),u.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,f),e.applyData(n,f)}function Lc(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const br=9,kr=32;function Dc(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const a=[];for(;r;)a.push(wr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return a.push(wr(n.slice(i),i>0,!1)),a.join("")}function wr(e,n,t){let r=0,i=e.length;if(n){let a=e.codePointAt(r);for(;a===br||a===kr;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(i-1);for(;a===br||a===kr;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Mc(e,n){const t={type:"text",value:Dc(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Fc(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const _c={blockquote:hc,break:pc,code:dc,delete:mc,emphasis:gc,footnoteReference:xc,heading:yc,html:bc,imageReference:kc,image:wc,inlineCode:Sc,linkReference:Cc,link:jc,listItem:vc,list:Nc,paragraph:Ac,root:Ic,strong:Tc,table:Pc,tableCell:Lc,tableRow:zc,text:Mc,thematicBreak:Fc,toml:dt,yaml:dt,definition:dt,footnoteDefinition:dt};function dt(){}const zi=-1,Dt=0,lt=1,Ct=2,zn=3,Ln=4,Dn=5,Mn=6,Li=7,Di=8,{defineProperty:Rc}=Object,Mi=typeof self=="object"?self:globalThis,Sr=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Mi[e](n)},Oc=(e,n)=>{const t=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,l]=n[i];switch(a){case Dt:case zi:return t(l,i);case lt:{const s=t([],i);for(const o of l)s.push(r(o));return s}case Ct:{const s=t({},i);for(const[o,u]of l){const f=r(o),c=r(u);f==="__proto__"?Rc(s,f,{value:c,configurable:!0,enumerable:!0,writable:!0}):s[f]=c}return s}case zn:return t(new Date(l),i);case Ln:{const{source:s,flags:o}=l;return t(new RegExp(s,o),i)}case Dn:{const s=t(new Map,i);for(const[o,u]of l)s.set(r(o),r(u));return s}case Mn:{const s=t(new Set,i);for(const o of l)s.add(r(o));return s}case Li:{const{name:s,message:o}=l;return t(typeof Mi[s]=="function"?Sr(s,o):new Error(o),i)}case Di:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:s}=new Uint8Array(l);return t(new DataView(s),l)}case"-0":return-0}return t(Sr(a,l),i)};return r},Cr=e=>Oc(new Map,e)(0),De="",{toString:Bc}={},{keys:$c,is:Hc}=Object,nt=e=>{const n=typeof e;if(n!=="object"||!e)return[Dt,n];const t=Bc.call(e).slice(8,-1);switch(t){case"Array":return[lt,De];case"Object":return[Ct,De];case"Date":return[zn,De];case"RegExp":return[Ln,De];case"Map":return[Dn,De];case"Set":return[Mn,De];case"DataView":return[lt,t]}return t.includes("Array")?[lt,t]:e instanceof Error?[Li,e.name||"Error"]:[Ct,t]},mt=([e,n])=>e===Dt&&(n==="function"||n==="symbol"),Uc=(e,n,t,r)=>{const i=(l,s)=>{const o=r.push(l)-1;return t.set(s,o),o},a=l=>{if(t.has(l))return t.get(l);let[s,o]=nt(l);switch(s){case Dt:{let f=l;switch(o){case"bigint":s=Di,f=l.toString();break;case"number":if(!l&&Hc(l,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([zi],l)}return i([s,f],l)}case lt:{if(o){let d=l;return o==="DataView"?d=new Uint8Array(l.buffer):o==="ArrayBuffer"&&(d=new Uint8Array(l)),i([o,[...d]],l)}const f=[],c=i([s,f],l);for(const d of l)f.push(a(d));return c}case Ct:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(n&&"toJSON"in l)return a(l.toJSON());const f=[],c=i([s,f],l);for(const d of $c(l))(e||!mt(nt(l[d])))&&f.push([a(d),a(l[d])]);return c}case zn:return i([s,isNaN(l.getTime())?De:l.toISOString()],l);case Ln:{const{source:f,flags:c}=l;return i([s,{source:f,flags:c}],l)}case Dn:{const f=[],c=i([s,f],l);for(const[d,p]of l)(e||!(mt(nt(d))||mt(nt(p))))&&f.push([a(d),a(p)]);return c}case Mn:{const f=[],c=i([s,f],l);for(const d of l)(e||!mt(nt(d)))&&f.push(a(d));return c}}const{message:u}=l;return i([s,{name:o,message:u}],l)};return a},jr=(e,{json:n,lossy:t}={})=>{const r=[];return Uc(!(n||t),!!n,new Map,r)(e),r},jt=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Cr(jr(e,n)):structuredClone(e):(e,n)=>Cr(jr(e,n));function Vc(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function qc(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Wc(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Vc,r=e.options.footnoteBackLabel||qc,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),d=Ke(c.toLowerCase());let p=0;const m=[],w=e.footnoteCounts.get(c);for(;w!==void 0&&++p<=w;){m.length>0&&m.push({type:"text",value:" "});let E=typeof t=="string"?t:t(o,p);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const E=S.children[S.children.length-1];E&&E.type==="text"?E.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...m)}else f.push(...m);const k={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(f,!0)};e.patch(u,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...jt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
10
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
11
|
-
`}]}}const Mt=(function(e){if(e==null)return Xc;if(typeof e=="function")return Ft(e);if(typeof e=="object")return Array.isArray(e)?Jc(e):Gc(e);if(typeof e=="string")return Kc(e);throw new Error("Expected function, string, or object as test")});function Jc(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Mt(e[t]);return Ft(r);function r(...i){let a=-1;for(;++a<n.length;)if(n[a].apply(this,i))return!0;return!1}}function Gc(e){const n=e;return Ft(t);function t(r){const i=r;let a;for(a in e)if(i[a]!==n[a])return!1;return!0}}function Kc(e){return Ft(n);function n(t){return t&&t.type===e}}function Ft(e){return n;function n(t,r,i){return!!(Yc(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Xc(){return!0}function Yc(e){return e!==null&&typeof e=="object"&&"type"in e}const Fi=[],Qc=!0,pn=!1,Zc="skip";function _i(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const a=Mt(i),l=r?-1:1;s(e,void 0,[])();function s(o,u,f){const c=o&&typeof o=="object"?o:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=Fi,m,w,S;if((!n||a(o,u,f[f.length-1]||void 0))&&(p=ef(t(o,f)),p[0]===pn))return p;if("children"in o&&o.children){const k=o;if(k.children&&p[0]!==Zc)for(w=(r?k.children.length:-1)+l,S=f.concat(k);w>-1&&w<k.children.length;){const E=k.children[w];if(m=s(E,w,S)(),m[0]===pn)return m;w=typeof m[1]=="number"?m[1]:w+l}}return p}}}function ef(e){return Array.isArray(e)?e:typeof e=="number"?[Qc,e]:e==null?Fi:[e]}function Fn(e,n,t,r){let i,a,l;typeof n=="function"&&typeof t!="function"?(a=void 0,l=n,i=t):(a=n,l=t,i=r),_i(e,a,s,i);function s(o,u){const f=u[u.length-1],c=f?f.children.indexOf(o):void 0;return l(o,c,f)}}const dn={}.hasOwnProperty,tf={};function nf(e,n){const t=n||tf,r=new Map,i=new Map,a=new Map,l={..._c,...t.handlers},s={all:u,applyData:lf,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:l,one:o,options:t,patch:rf,wrap:sf};return Fn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();c.has(d)||c.set(d,f)}}),s;function o(f,c){const d=f.type,p=s.handlers[d];if(dn.call(s.handlers,d)&&p)return p(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in f){const{children:w,...S}=f,k=jt(S);return k.children=s.all(f),k}return jt(f)}return(s.options.unknownHandler||af)(s,f,c)}function u(f){const c=[];if("children"in f){const d=f.children;let p=-1;for(;++p<d.length;){const m=s.one(d[p],f);if(m){if(p&&d[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=vr(m.value)),!Array.isArray(m)&&m.type==="element")){const w=m.children[0];w&&w.type==="text"&&(w.value=vr(w.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function rf(e,n){e.position&&(n.position=Hs(e))}function lf(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&a&&Object.assign(t.properties,jt(a)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function af(e,n){const t=n.data||{},r="value"in n&&!(dn.call(t,"hProperties")||dn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function sf(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
12
|
-
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
13
|
-
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
14
|
-
`}),t}function vr(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Er(e,n){const t=nf(e,n),r=t.one(e,void 0),i=Wc(t),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
15
|
-
`},i),a}function of(e,n){return e&&"run"in e?async function(t,r){const i=Er(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Er(t,{file:r,...e||n})}}function Nr(e){if(e)throw e}var Ut,Ar;function uf(){if(Ar)return Ut;Ar=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},a=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var d;for(d in u);return typeof d>"u"||e.call(u,d)},l=function(u,f){t&&f.name==="__proto__"?t(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Ut=function o(){var u,f,c,d,p,m,w=arguments[0],S=1,k=arguments.length,E=!1;for(typeof w=="boolean"&&(E=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<k;++S)if(u=arguments[S],u!=null)for(f in u)c=s(w,f),d=s(u,f),w!==d&&(E&&d&&(a(d)||(p=i(d)))?(p?(p=!1,m=c&&i(c)?c:[]):m=c&&a(c)?c:{},l(w,{name:f,newValue:o(E,m,d)})):typeof d<"u"&&l(w,{name:f,newValue:d}));return w},Ut}var cf=uf();const Vt=Kr(cf);function mn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ff(){const e=[],n={run:t,use:r};return n;function t(...i){let a=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...i);function s(o,...u){const f=e[++a];let c=-1;if(o){l(o);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?hf(f,s)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function hf(e,n){let t;return r;function r(...l){const s=e.length>l.length;let o;s&&l.push(i);try{o=e.apply(this,l)}catch(u){const f=u;if(s&&t)throw f;return i(f)}s||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(l,...s){t||(t=!0,n(l,...s))}function a(l){i(null,l)}}const xe={basename:pf,dirname:df,extname:mf,join:gf,sep:"/"};function pf(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ht(e);let t=0,r=-1,i=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){t=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,s=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){t=i+1;break}}else l<0&&(a=!0,l=i+1),s>-1&&(e.codePointAt(i)===n.codePointAt(s--)?s<0&&(r=i):(s=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function df(e){if(ht(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function mf(e){ht(e);let n=e.length,t=-1,r=0,i=-1,a=0,l;for(;n--;){const s=e.codePointAt(n);if(s===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),s===46?i<0?i=n:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||t<0||a===0||a===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function gf(...e){let n=-1,t;for(;++n<e.length;)ht(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":xf(t)}function xf(e){ht(e);const n=e.codePointAt(0)===47;let t=yf(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function yf(e,n){let t="",r=0,i=-1,a=0,l=-1,s,o;for(;++l<=e.length;){if(l<e.length)s=e.codePointAt(l);else{if(s===47)break;s=47}if(s===47){if(!(i===l-1||a===1))if(i!==l-1&&a===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(o=t.lastIndexOf("/"),o!==t.length-1){o<0?(t="",r=0):(t=t.slice(0,o),r=t.length-1-t.lastIndexOf("/")),i=l,a=0;continue}}else if(t.length>0){t="",r=0,i=l,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,a=0}else s===46&&a>-1?a++:a=-1}return t}function ht(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bf={cwd:kf};function kf(){return"/"}function gn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wf(e){if(typeof e=="string")e=new URL(e);else if(!gn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Sf(e)}function Sf(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const qt=["history","path","basename","stem","extname","dirname"];class Ri{constructor(n){let t;n?gn(n)?t={path:n}:typeof n=="string"||Cf(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":bf.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qt.length;){const a=qt[r];a in t&&t[a]!==void 0&&t[a]!==null&&(this[a]=a==="history"?[...t[a]]:t[a])}let i;for(i in t)qt.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?xe.basename(this.path):void 0}set basename(n){Jt(n,"basename"),Wt(n,"basename"),this.path=xe.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?xe.dirname(this.path):void 0}set dirname(n){Ir(this.basename,"dirname"),this.path=xe.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?xe.extname(this.path):void 0}set extname(n){if(Wt(n,"extname"),Ir(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=xe.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){gn(n)&&(n=wf(n)),Jt(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?xe.basename(this.path,this.extname):void 0}set stem(n){Jt(n,"stem"),Wt(n,"stem"),this.path=xe.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new ne(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Wt(e,n){if(e&&e.includes(xe.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+xe.sep+"`")}function Jt(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ir(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Cf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jf=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),vf={}.hasOwnProperty;class _n extends jf{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=ff()}copy(){const n=new _n;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Vt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Xt("data",this.frozen),this.namespace[n]=t,this):vf.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Xt("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=gt(n),r=this.parser||this.Parser;return Gt("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Gt("process",this.parser||this.Parser),Kt("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(a,l){const s=gt(n),o=r.parse(s);r.run(o,s,function(f,c,d){if(f||!c||!d)return u(f);const p=c,m=r.stringify(p,d);Af(m)?d.value=m:d.result=m,u(f,d)});function u(f,c){f||!c?l(f):a?a(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),Gt("processSync",this.parser||this.Parser),Kt("processSync",this.compiler||this.Compiler),this.process(n,i),Pr("processSync","process",t),r;function i(a,l){t=!0,Nr(a),r=l}}run(n,t,r){Tr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?a(void 0,r):new Promise(a);function a(l,s){const o=gt(t);i.run(n,o,u);function u(f,c,d){const p=c||n;f?s(f):l?l(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,a),Pr("runSync","run",r),i;function a(l,s){Nr(l),i=s,r=!0}}stringify(n,t){this.freeze();const r=gt(t),i=this.compiler||this.Compiler;return Kt("stringify",i),Tr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Xt("use",this.frozen),n!=null)if(typeof n=="function")o(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function a(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;o(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Vt(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];a(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,f){let c=-1,d=-1;for(;++c<r.length;)if(r[c][0]===u){d=c;break}if(d===-1)r.push([u,...f]);else if(f.length>0){let[p,...m]=f;const w=r[d][1];mn(w)&&mn(p)&&(p=Vt(!0,w,p)),r[d]=[u,p,...m]}}}}const Ef=new _n().freeze();function Gt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Kt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xt(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tr(e){if(!mn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Pr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function gt(e){return Nf(e)?e:new Ri(e)}function Nf(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Af(e){return typeof e=="string"||If(e)}function If(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Tf="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zr=[],Lr={allowDangerousHtml:!0},Pf=/^(https?|ircs?|mailto|xmpp)$/i,zf=[{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 Lf(e){const n=Df(e),t=Mf(e);return Ff(n.runSync(n.parse(t),t),e)}function Df(e){const n=e.rehypePlugins||zr,t=e.remarkPlugins||zr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Lr}:Lr;return Ef().use(fc).use(t).use(of,r).use(n)}function Mf(e){const n=e.children||"",t=new Ri;return typeof n=="string"&&(t.value=n),t}function Ff(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,a=n.disallowedElements,l=n.skipHtml,s=n.unwrapDisallowed,o=n.urlTransform||_f;for(const f of zf)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Tf+f.id,void 0);return Fn(e,u),Js(e,{Fragment:h.Fragment,components:i,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function u(f,c,d){if(f.type==="raw"&&d&&typeof c=="number")return l?d.children.splice(c,1):d.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Bt)if(Object.hasOwn(Bt,p)&&Object.hasOwn(f.properties,p)){const m=f.properties[p],w=Bt[p];(w===null||w.includes(f.tagName))&&(f.properties[p]=o(String(m||""),p,f))}}if(f.type==="element"){let p=t?!t.includes(f.tagName):a?a.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,d)),p&&d&&typeof c=="number")return s&&f.children?d.children.splice(c,1,...f.children):d.children.splice(c,1),c}}}function _f(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Pf.test(e.slice(0,n))?e:""}function Dr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function Rf(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Of(e,n,t){const i=Mt((t||{}).ignore||[]),a=Bf(n);let l=-1;for(;++l<a.length;)_i(e,"text",s);function s(u,f){let c=-1,d;for(;++c<f.length;){const p=f[c],m=d?d.children:void 0;if(i(p,m?m.indexOf(p):void 0,d))return;d=p}if(d)return o(u,f)}function o(u,f){const c=f[f.length-1],d=a[l][0],p=a[l][1];let m=0;const S=c.children.indexOf(u);let k=!1,E=[];d.lastIndex=0;let v=d.exec(u.value);for(;v;){const N=v.index,j={index:v.index,input:v.input,stack:[...f,u]};let b=p(...v,j);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?d.lastIndex=N+1:(m!==N&&E.push({type:"text",value:u.value.slice(m,N)}),Array.isArray(b)?E.push(...b):b&&E.push(b),m=N+v[0].length,k=!0),!d.global)break;v=d.exec(u.value)}return k?(m<u.value.length&&E.push({type:"text",value:u.value.slice(m)}),c.children.splice(S,1,...E)):E=[u],S+E.length}}function Bf(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([$f(i[0]),Hf(i[1])])}return n}function $f(e){return typeof e=="string"?new RegExp(Rf(e),"g"):e}function Hf(e){return typeof e=="function"?e:function(){return e}}const Yt="phrasing",Qt=["autolink","link","image","label"];function Uf(){return{transforms:[Xf],enter:{literalAutolink:qf,literalAutolinkEmail:Zt,literalAutolinkHttp:Zt,literalAutolinkWww:Zt},exit:{literalAutolink:Kf,literalAutolinkEmail:Gf,literalAutolinkHttp:Wf,literalAutolinkWww:Jf}}}function Vf(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Yt,notInConstruct:Qt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Yt,notInConstruct:Qt},{character:":",before:"[ps]",after:"\\/",inConstruct:Yt,notInConstruct:Qt}]}}function qf(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zt(e){this.config.enter.autolinkProtocol.call(this,e)}function Wf(e){this.config.exit.autolinkProtocol.call(this,e)}function Jf(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Gf(e){this.config.exit.autolinkEmail.call(this,e)}function Kf(e){this.exit(e)}function Xf(e){Of(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Yf],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Qf]],{ignore:["link","linkReference"]})}function Yf(e,n,t,r,i){let a="";if(!Oi(i)||(/^w/i.test(n)&&(t=n+t,n="",a="http://"),!Zf(t)))return!1;const l=eh(t+r);if(!l[0])return!1;const s={type:"link",title:null,url:a+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function Qf(e,n,t,r){return!Oi(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Zf(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function eh(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=Dr(e,"(");let a=Dr(e,")");for(;r!==-1&&i>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function Oi(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Fe(t)||zt(t))&&(!n||t!==47)}Bi.peek=uh;function th(){this.buffer()}function nh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function rh(){this.buffer()}function ih(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lh(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=me(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ah(e){this.exit(e)}function sh(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=me(this.sliceSerialize(e)).toLowerCase(),t.label=n}function oh(e){this.exit(e)}function uh(){return"["}function Bi(e,n,t,r){const i=t.createTracker(r);let a=i.move("[^");const l=t.enter("footnoteReference"),s=t.enter("reference");return a+=i.move(t.safe(t.associationId(e),{after:"]",before:a})),s(),l(),a+=i.move("]"),a}function ch(){return{enter:{gfmFootnoteCallString:th,gfmFootnoteCall:nh,gfmFootnoteDefinitionLabelString:rh,gfmFootnoteDefinition:ih},exit:{gfmFootnoteCallString:lh,gfmFootnoteCall:ah,gfmFootnoteDefinitionLabelString:sh,gfmFootnoteDefinition:oh}}}function fh(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Bi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,a,l){const s=a.createTracker(l);let o=s.move("[^");const u=a.enter("footnoteDefinition"),f=a.enter("label");return o+=s.move(a.safe(a.associationId(r),{before:o,after:"]"})),f(),o+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),o+=s.move((n?`
|
|
16
|
-
`:" ")+a.indentLines(a.containerFlow(r,s.current()),n?$i:hh))),u(),o}}function hh(e,n,t){return n===0?e:$i(e,n,t)}function $i(e,n,t){return(t?"":" ")+e}const ph=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Hi.peek=yh;function dh(){return{canContainEols:["delete"],enter:{strikethrough:gh},exit:{strikethrough:xh}}}function mh(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ph}],handlers:{delete:Hi}}}function gh(e){this.enter({type:"delete",children:[]},e)}function xh(e){this.exit(e)}function Hi(e,n,t,r){const i=t.createTracker(r),a=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),a(),l}function yh(){return"~"}function bh(e){return e.length}function kh(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||bh,a=[],l=[],s=[],o=[];let u=0,f=-1;for(;++f<e.length;){const w=[],S=[];let k=-1;for(e[f].length>u&&(u=e[f].length);++k<e[f].length;){const E=wh(e[f][k]);if(t.alignDelimiters!==!1){const v=i(E);S[k]=v,(o[k]===void 0||v>o[k])&&(o[k]=v)}w.push(E)}l[f]=w,s[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)a[c]=Mr(r[c]);else{const w=Mr(r);for(;++c<u;)a[c]=w}c=-1;const d=[],p=[];for(;++c<u;){const w=a[c];let S="",k="";w===99?(S=":",k=":"):w===108?S=":":w===114&&(k=":");let E=t.alignDelimiters===!1?1:Math.max(1,o[c]-S.length-k.length);const v=S+"-".repeat(E)+k;t.alignDelimiters!==!1&&(E=S.length+E+k.length,E>o[c]&&(o[c]=E),p[c]=E),d[c]=v}l.splice(1,0,d),s.splice(1,0,p),f=-1;const m=[];for(;++f<l.length;){const w=l[f],S=s[f];c=-1;const k=[];for(;++c<u;){const E=w[c]||"";let v="",N="";if(t.alignDelimiters!==!1){const j=o[c]-(S[c]||0),b=a[c];b===114?v=" ".repeat(j):b===99?j%2?(v=" ".repeat(j/2+.5),N=" ".repeat(j/2-.5)):(v=" ".repeat(j/2),N=v):N=" ".repeat(j)}t.delimiterStart!==!1&&!c&&k.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&E==="")&&(t.delimiterStart!==!1||c)&&k.push(" "),t.alignDelimiters!==!1&&k.push(v),k.push(E),t.alignDelimiters!==!1&&k.push(N),t.padding!==!1&&k.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&k.push("|")}m.push(t.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return m.join(`
|
|
17
|
-
`)}function wh(e){return e==null?"":String(e)}function Mr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Sh(e,n,t,r){const i=t.enter("blockquote"),a=t.createTracker(r);a.move("> "),a.shift(2);const l=t.indentLines(t.containerFlow(e,a.current()),Ch);return i(),l}function Ch(e,n,t){return">"+(t?"":" ")+e}function jh(e,n){return Fr(e,n.inConstruct,!0)&&!Fr(e,n.notInConstruct,!1)}function Fr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function _r(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
|
|
18
|
-
`&&jh(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
19
|
-
`}function vh(e,n){const t=String(e);let r=t.indexOf(n),i=r,a=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>l&&(l=a):a=1,i=r+n.length,r=t.indexOf(n,i);return l}function Eh(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Nh(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Ah(e,n,t,r){const i=Nh(t),a=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Eh(e,t)){const c=t.enter("codeIndented"),d=t.indentLines(a,Ih);return c(),d}const s=t.createTracker(r),o=i.repeat(Math.max(vh(a,i)+1,3)),u=t.enter("codeFenced");let f=s.move(o);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=s.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=s.move(" "),f+=s.move(t.safe(e.meta,{before:f,after:`
|
|
20
|
-
`,encode:["`"],...s.current()})),c()}return f+=s.move(`
|
|
21
|
-
`),a&&(f+=s.move(a+`
|
|
22
|
-
`)),f+=s.move(o),u(),f}function Ih(e,n,t){return(t?"":" ")+e}function Rn(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Th(e,n,t,r){const i=Rn(t),a=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let s=t.enter("label");const o=t.createTracker(r);let u=o.move("[");return u+=o.move(t.safe(t.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(t.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(s=t.enter("destinationRaw"),u+=o.move(t.safe(e.url,{before:u,after:e.title?" ":`
|
|
23
|
-
`,...o.current()}))),s(),e.title&&(s=t.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(t.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),s()),l(),u}function Ph(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function ot(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vt(e,n,t){const r=We(e),i=We(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ui.peek=zh;function Ui(e,n,t,r){const i=Ph(t),a=t.enter("emphasis"),l=t.createTracker(r),s=l.move(i);let o=l.move(t.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=o.charCodeAt(0),f=vt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(o=ot(u)+o.slice(1));const c=o.charCodeAt(o.length-1),d=vt(r.after.charCodeAt(0),c,i);d.inside&&(o=o.slice(0,-1)+ot(c));const p=l.move(i);return a(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},s+o+p}function zh(e,n,t){return t.options.emphasis||"*"}function Lh(e,n){let t=!1;return Fn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,pn}),!!((!e.depth||e.depth<3)&&In(e)&&(n.options.setext||t))}function Dh(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(Lh(e,t)){const f=t.enter("headingSetext"),c=t.enter("phrasing"),d=t.containerPhrasing(e,{...a.current(),before:`
|
|
24
|
-
`,after:`
|
|
25
|
-
`});return c(),f(),d+`
|
|
26
|
-
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
27
|
-
`))+1))}const l="#".repeat(i),s=t.enter("headingAtx"),o=t.enter("phrasing");a.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
|
|
28
|
-
`,...a.current()});return/^[\t ]/.test(u)&&(u=ot(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),o(),s(),u}Vi.peek=Mh;function Vi(e){return e.value||""}function Mh(){return"<"}qi.peek=Fh;function qi(e,n,t,r){const i=Rn(t),a=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let s=t.enter("label");const o=t.createTracker(r);let u=o.move("![");return u+=o.move(t.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(t.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(s=t.enter("destinationRaw"),u+=o.move(t.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=t.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(t.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),s()),u+=o.move(")"),l(),u}function Fh(){return"!"}Wi.peek=_h;function Wi(e,n,t,r){const i=e.referenceType,a=t.enter("imageReference");let l=t.enter("label");const s=t.createTracker(r);let o=s.move("![");const u=t.safe(e.alt,{before:o,after:"]",...s.current()});o+=s.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:o,after:"]",...s.current()});return l(),t.stack=f,a(),i==="full"||!u||u!==c?o+=s.move(c+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function _h(){return"!"}Ji.peek=Rh;function Ji(e,n,t){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<t.unsafe.length;){const l=t.unsafe[a],s=t.compilePattern(l);let o;if(l.atBreak)for(;o=s.exec(r);){let u=o.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(o.index+1)}}return i+r+i}function Rh(){return"`"}function Gi(e,n){const t=In(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ki.peek=Oh;function Ki(e,n,t,r){const i=Rn(t),a=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let s,o;if(Gi(e,t)){const f=t.stack;t.stack=[],s=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),s(),t.stack=f,c}s=t.enter("link"),o=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=t.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),s(),u}function Oh(e,n,t){return Gi(e,t)?"<":"["}Xi.peek=Bh;function Xi(e,n,t,r){const i=e.referenceType,a=t.enter("linkReference");let l=t.enter("label");const s=t.createTracker(r);let o=s.move("[");const u=t.containerPhrasing(e,{before:o,after:"]",...s.current()});o+=s.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:o,after:"]",...s.current()});return l(),t.stack=f,a(),i==="full"||!u||u!==c?o+=s.move(c+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function Bh(){return"["}function On(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function $h(e){const n=On(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Hh(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Yi(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Uh(e,n,t,r){const i=t.enter("list"),a=t.bulletCurrent;let l=e.ordered?Hh(t):On(t);const s=e.ordered?l==="."?")":".":$h(t);let o=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(o=!0),Yi(t)===l&&f){let c=-1;for(;++c<e.children.length;){const d=e.children[c];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(l=s),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=a,i(),u}function Vh(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function qh(e,n,t,r){const i=Vh(t);let a=t.bulletCurrent||On(t);n&&n.type==="list"&&n.ordered&&(a=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let l=a.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=t.createTracker(r);s.move(a+" ".repeat(l-a.length)),s.shift(l);const o=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,s.current()),f);return o(),u;function f(c,d,p){return d?(p?"":" ".repeat(l))+c:(p?a:a+" ".repeat(l-a.length))+c}}function Wh(e,n,t,r){const i=t.enter("paragraph"),a=t.enter("phrasing"),l=t.containerPhrasing(e,r);return a(),i(),l}const Jh=Mt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gh(e,n,t,r){return(e.children.some(function(l){return Jh(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Kh(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Qi.peek=Xh;function Qi(e,n,t,r){const i=Kh(t),a=t.enter("strong"),l=t.createTracker(r),s=l.move(i+i);let o=l.move(t.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=o.charCodeAt(0),f=vt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(o=ot(u)+o.slice(1));const c=o.charCodeAt(o.length-1),d=vt(r.after.charCodeAt(0),c,i);d.inside&&(o=o.slice(0,-1)+ot(c));const p=l.move(i+i);return a(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},s+o+p}function Xh(e,n,t){return t.options.strong||"*"}function Yh(e,n,t,r){return t.safe(e.value,r)}function Qh(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Zh(e,n,t){const r=(Yi(t)+(t.options.ruleSpaces?" ":"")).repeat(Qh(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Zi={blockquote:Sh,break:_r,code:Ah,definition:Th,emphasis:Ui,hardBreak:_r,heading:Dh,html:Vi,image:qi,imageReference:Wi,inlineCode:Ji,link:Ki,linkReference:Xi,list:Uh,listItem:qh,paragraph:Wh,root:Gh,strong:Qi,text:Yh,thematicBreak:Zh};function ep(){return{enter:{table:tp,tableData:Rr,tableHeader:Rr,tableRow:rp},exit:{codeText:ip,table:np,tableData:en,tableHeader:en,tableRow:en}}}function tp(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function np(e){this.exit(e),this.data.inTable=void 0}function rp(e){this.enter({type:"tableRow",children:[]},e)}function en(e){this.exit(e)}function Rr(e){this.enter({type:"tableCell",children:[]},e)}function ip(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,lp));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function lp(e,n){return n==="|"?n:e}function ap(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
29
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:l,tableCell:o,tableRow:s}};function l(p,m,w,S){return u(f(p,w,S),p.align)}function s(p,m,w,S){const k=c(p,w,S),E=u([k]);return E.slice(0,E.indexOf(`
|
|
30
|
-
`))}function o(p,m,w,S){const k=w.enter("tableCell"),E=w.enter("phrasing"),v=w.containerPhrasing(p,{...S,before:a,after:a});return E(),k(),v}function u(p,m){return kh(p,{align:m,alignDelimiters:r,padding:t,stringLength:i})}function f(p,m,w){const S=p.children;let k=-1;const E=[],v=m.enter("table");for(;++k<S.length;)E[k]=c(S[k],m,w);return v(),E}function c(p,m,w){const S=p.children;let k=-1;const E=[],v=m.enter("tableRow");for(;++k<S.length;)E[k]=o(S[k],p,m,w);return v(),E}function d(p,m,w){let S=Zi.inlineCode(p,m,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function sp(){return{exit:{taskListCheckValueChecked:Or,taskListCheckValueUnchecked:Or,paragraph:up}}}function op(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cp}}}function Or(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function up(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let a=-1,l;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){l=s;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cp(e,n,t,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);a&&s.move(l);let o=Zi.listItem(e,n,t,{...r,...s.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(f){return f+l}}function fp(){return[Uf(),ch(),dh(),ep(),sp()]}function hp(e){return{extensions:[Vf(),fh(e),mh(),ap(e),op()]}}const pp={tokenize:bp,partial:!0},el={tokenize:kp,partial:!0},tl={tokenize:wp,partial:!0},nl={tokenize:Sp,partial:!0},dp={tokenize:Cp,partial:!0},rl={name:"wwwAutolink",tokenize:xp,previous:ll},il={name:"protocolAutolink",tokenize:yp,previous:al},je={name:"emailAutolink",tokenize:gp,previous:sl},be={};function mp(){return{text:be}}let ze=48;for(;ze<123;)be[ze]=je,ze++,ze===58?ze=65:ze===91&&(ze=97);be[43]=je;be[45]=je;be[46]=je;be[95]=je;be[72]=[je,il];be[104]=[je,il];be[87]=[je,rl];be[119]=[je,rl];function gp(e,n,t){const r=this;let i,a;return l;function l(c){return!xn(c)||!sl.call(r,r.previous)||Bn(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return xn(c)?(e.consume(c),s):c===64?(e.consume(c),o):t(c)}function o(c){return c===46?e.check(dp,f,u)(c):c===45||c===95||te(c)?(a=!0,e.consume(c),o):f(c)}function u(c){return e.consume(c),i=!0,o}function f(c){return a&&i&&re(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function xp(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!ll.call(r,r.previous)||Bn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(pp,e.attempt(el,e.attempt(tl,a),t),t)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function yp(e,n,t){const r=this;let i="",a=!1;return l;function l(c){return(c===72||c===104)&&al.call(r,r.previous)&&!Bn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):t(c)}function s(c){if(re(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(c),o}return t(c)}function o(c){return c===47?(e.consume(c),a?u:(a=!0,o)):t(c)}function u(c){return c===null||St(c)||G(c)||Fe(c)||zt(c)?t(c):e.attempt(el,e.attempt(tl,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function bp(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),a):t(l)}function a(l){return l===null?t(l):n(l)}}function kp(e,n,t){let r,i,a;return l;function l(u){return u===46||u===95?e.check(nl,o,s)(u):u===null||G(u)||Fe(u)||u!==45&&zt(u)?o(u):(a=!0,e.consume(u),l)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function o(u){return i||r||!a?t(u):n(u)}}function wp(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(nl,n,a)(l):l===null||G(l)||Fe(l)?n(l):(e.consume(l),i)}function a(l){return l===41&&r++,e.consume(l),i}}function Sp(e,n,t){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||G(s)||Fe(s)?n(s):t(s)}function i(s){return s===null||s===40||s===91||G(s)||Fe(s)?n(s):r(s)}function a(s){return re(s)?l(s):t(s)}function l(s){return s===59?(e.consume(s),r):re(s)?(e.consume(s),l):t(s)}}function Cp(e,n,t){return r;function r(a){return e.consume(a),i}function i(a){return te(a)?t(a):n(a)}}function ll(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||G(e)}function al(e){return!re(e)}function sl(e){return!(e===47||xn(e))}function xn(e){return e===43||e===45||e===46||e===95||te(e)}function Bn(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const jp={tokenize:zp,partial:!0};function vp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ip,continuation:{tokenize:Tp},exit:Pp}},text:{91:{name:"gfmFootnoteCall",tokenize:Ap},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ep,resolveTo:Np}}}}function Ep(e,n,t){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){l=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return s;function s(o){if(!l||!l._balanced)return t(o);const u=me(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?t(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),n(o))}}function Np(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",a,n],["enter",l,n],["exit",l,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...s),e}function Ap(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),o}function o(c){return c!==94?t(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(a>999||c===93&&!l||c===null||c===91||G(c))return t(c);if(c===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(me(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return G(c)||(l=!0),a++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),a++,u):u(c)}}function Ip(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,s;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(m)}function f(m){if(l>999||m===93&&!s||m===null||m===91||G(m))return t(m);if(m===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=me(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return G(m)||(s=!0),l++,e.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),V(e,p,"gfmFootnoteDefinitionWhitespace")):t(m)}function p(m){return n(m)}}function Tp(e,n,t){return e.check(ft,n,e.attempt(jp,n,t))}function Pp(e){e.exit("gfmFootnoteDefinition")}function zp(e,n,t){const r=this;return V(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(a):t(a)}}function Lp(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,s){let o=-1;for(;++o<l.length;)if(l[o][0]==="enter"&&l[o][1].type==="strikethroughSequenceTemporary"&&l[o][1]._close){let u=o;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[o][1].end.offset-l[o][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[o][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[o][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[o][1].start)},d=[["enter",f,s],["enter",l[u][1],s],["exit",l[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ue(d,d.length,0,Lt(p,l.slice(u+1,o),s)),ue(d,d.length,0,[["exit",c,s],["enter",l[o][1],s],["exit",l[o][1],s],["exit",f,s]]),ue(l,u-1,o-u+3,d),o=u+d.length-2;break}}for(o=-1;++o<l.length;)l[o][1].type==="strikethroughSequenceTemporary"&&(l[o][1].type="data");return l}function a(l,s,o){const u=this.previous,f=this.events;let c=0;return d;function d(m){return u===126&&f[f.length-1][1].type!=="characterEscape"?o(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const w=We(u);if(m===126)return c>1?o(m):(l.consume(m),c++,p);if(c<2&&!t)return o(m);const S=l.exit("strikethroughSequenceTemporary"),k=We(m);return S._open=!k||k===2&&!!w,S._close=!w||w===2&&!!k,s(m)}}}class Dp{constructor(){this.map=[],this.index=new Map}add(n,t,r){Mp(this,n,t,r)}consume(n){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const a of i)n.push(a);i=r.pop()}this.map.length=0,this.index.clear()}}function Mp(e,n,t,r){if(t===0&&r.length===0)return;const i=e.index.get(n);if(i){i[1]+=t,i[2].push(...r);return}const a=[n,t,r];e.map.push(a),e.index.set(n,a)}function Fp(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function _p(){return{flow:{null:{name:"table",tokenize:Rp,resolveAll:Op}}}}function Rp(e,n,t){const r=this;let i=0,a=0,l;return s;function s(y){let T=r.events.length-1;for(;T>-1;){const{type:_}=r.events[T][1];if(_==="lineEnding"||_==="linePrefix")T--;else break}const z=T>-1?r.events[T][1].type:null,B=z==="tableHead"||z==="tableRow"?b:o;return B===b&&r.parser.lazy[r.now().line]?t(y):B(y)}function o(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,a+=1),f(y)}function f(y){return y===null?t(y):R(y)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):t(y):H(y)?V(e,f,"whitespace")(y):(a+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||G(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?d:c)}function d(y){return y===92||y===124?(e.consume(y),c):c(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(y):(e.enter("tableDelimiterRow"),l=!1,H(y)?V(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):m(y))}function m(y){return y===45||y===58?S(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),w):j(y)}function w(y){return H(y)?V(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),k):y===45?(a+=1,k(y)):y===null||R(y)?N(y):j(y)}function k(y){return y===45?(e.enter("tableDelimiterFiller"),E(y)):j(y)}function E(y){return y===45?(e.consume(y),E):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(y))}function v(y){return H(y)?V(e,N,"whitespace")(y):N(y)}function N(y){return y===124?m(y):y===null||R(y)?!l||i!==a?j(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(y)):j(y)}function j(y){return t(y)}function b(y){return e.enter("tableRow"),L(y)}function L(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),L):y===null||R(y)?(e.exit("tableRow"),n(y)):H(y)?V(e,L,"whitespace")(y):(e.enter("data"),M(y))}function M(y){return y===null||y===124||G(y)?(e.exit("data"),L(y)):(e.consume(y),y===92?F:M)}function F(y){return y===92||y===124?(e.consume(y),M):M(y)}}function Op(e,n){let t=-1,r=!0,i=0,a=[0,0,0,0],l=[0,0,0,0],s=!1,o=0,u,f,c;const d=new Dp;for(;++t<e.length;){const p=e[t],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,o!==0&&(Br(d,n,o,u,f),f=void 0,o=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(t,0,[["enter",u,n]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,a=[0,0,0,0],l=[0,t+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(t,0,[["enter",f,n]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],c=xt(d,n,a,i,void 0,c),a=[0,0,0,0]),l[2]=t)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],c=xt(d,n,a,i,void 0,c)),a=l,l=[a[1],t,0,0])):m.type==="tableHead"?(s=!0,o=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=t,a[1]!==0?(l[0]=l[1],c=xt(d,n,a,i,t,c)):l[1]!==0&&(c=xt(d,n,l,i,t,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=t)}for(o!==0&&Br(d,n,o,u,f),d.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Fp(n.events,t))}return e}function xt(e,n,t,r,i,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(a.end=Object.assign({},Ue(n.events,t[0])),e.add(t[0],0,[["exit",a,n]]));const o=Ue(n.events,t[1]);if(a={type:l,start:Object.assign({},o),end:Object.assign({},o)},e.add(t[1],0,[["enter",a,n]]),t[2]!==0){const u=Ue(n.events,t[2]),f=Ue(n.events,t[3]),c={type:s,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const d=n.events[t[2]],p=n.events[t[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",t[3]>t[2]+1){const m=t[2]+1,w=t[3]-t[2]-1;e.add(m,w,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(a.end=Object.assign({},Ue(n.events,i)),e.add(i,0,[["exit",a,n]]),a=void 0),a}function Br(e,n,t,r,i){const a=[],l=Ue(n.events,t);i&&(i.end=Object.assign({},l),a.push(["exit",i,n])),r.end=Object.assign({},l),a.push(["exit",r,n]),e.add(t+1,0,a)}function Ue(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Bp={name:"tasklistCheck",tokenize:Hp};function $p(){return{text:{91:Bp}}}function Hp(e,n,t){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return G(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),l):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),l):t(o)}function l(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(o)}function s(o){return R(o)?n(o):H(o)?e.check({tokenize:Up},n,t)(o):t(o)}}function Up(e,n,t){return V(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function Vp(e){return xi([mp(),vp(),Lp(e),_p(),$p()])}const qp={};function Wp(e){const n=this,t=e||qp,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Vp(t)),a.push(fp()),l.push(hp(t))}const Le=()=>`${window.routePrefix??""}/docs/api`,Jp=e=>`${window.routePrefix??""}/docs/${encodeURIComponent(e)}`,Et={list:async(e,n)=>{const{data:t}=await ee.getJson(`${Le()}/list`,{params:{locale:e},signal:n});return t.documents??[]},keywords:async(e,n)=>{const{data:t}=await ee.getJson(`${Le()}/keywords`,{params:{locale:e},signal:n});return t.keywords??{}},search:async(e,n)=>{const{data:t}=await ee.getJson(`${Le()}/search`,{params:{q:e.query||void 0,keywords:e.keywords?.length?e.keywords.join(","):void 0,url:e.url||void 0,model:e.model||void 0,locale:e.locale||void 0},signal:n});return t.results??[]},context:async(e,n,t,r)=>{const{data:i}=await ee.getJson(`${Le()}/context`,{params:{url:e,model:n,locale:t},signal:r});return i.documents??[]},doc:async(e,n,t)=>{const{data:r}=await ee.getJson(`${Le()}/doc/${encodeURIComponent(e)}`,{params:{locale:n},signal:t});return r},resolve:async(e,n,t)=>{if(n.length===0)return{};const{data:r}=await ee.getJson(`${Le()}/resolve`,{params:{from:e,refs:n.join(",")},signal:t});return r.resolved??{}},schema:async(e,n)=>{const{data:t}=await ee.getJson(`${Le()}/schema`,{params:{model:e},signal:n});return t}},bt=e=>e.trim().toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,""),wd=e=>{const n=[];let t=!1;for(const r of e.split(`
|
|
31
|
-
`)){if(/^\s*(```|~~~)/.test(r)){t=!t;continue}if(t)continue;const i=/^(#{2,3})\s+(.+?)\s*#*\s*$/.exec(r);if(!i)continue;const a=i[2].replace(/[*_`]/g,"").trim();n.push({depth:i[1].length,title:a,slug:bt(a)})}return n},Gp=e=>{const n=new Set,t=/\]\(\s*([^)\s]+)/g;let r;for(;(r=t.exec(e))!==null;){const i=r[1];!i||i.startsWith("#")||i.startsWith("/")||/^[a-z][a-z0-9+.-]*:/i.test(i)||i.startsWith("//")||n.add(i)}return[...n]},Ve=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Ve).join(""):A.isValidElement(e)?Ve(e.props.children):"",Kp=()=>typeof document<"u"&&document.documentElement.classList.contains("dark"),Xp=()=>{const[e,n]=A.useState(!1);return{isCopied:e,copy:r=>{!r||typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(r).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)},()=>{})}}},Yp=({code:e})=>{const[n,t]=A.useState(null),[r,i]=A.useState(!1),a=A.useId().replace(/[^a-zA-Z0-9]/g,"");return A.useEffect(()=>{let l=!1;return t(null),i(!1),va(()=>import("./mermaid.core-DxLHD4PF.js").then(s=>s.bI),__vite__mapDeps([0,1,2,3]),import.meta.url).then(async({default:s})=>{s.initialize({startOnLoad:!1,securityLevel:"strict",theme:Kp()?"dark":"default"});const o=await s.render(`mermaid-${a}`,e);l||t(o.svg)}).catch(()=>{l||i(!0)}),()=>{l=!0}},[e,a]),r?h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:e}):n?h.jsx("div",{className:"my-3 flex justify-center overflow-x-auto rounded-xl border p-3 [&_svg]:max-w-full",dangerouslySetInnerHTML:{__html:n}}):h.jsx("div",{className:"bg-muted/30 text-muted-foreground my-3 rounded-xl border p-4 text-sm",children:"…"})},Qp=({source:e})=>{const[n,t]=A.useState(null),[r,i]=A.useState(null),[a,l]=A.useState(!1),s=A.useMemo(()=>{try{const o=JSON.parse(e);return o&&typeof o=="object"?o:null}catch{return null}},[e]);return A.useEffect(()=>{if(!s){l(!0);return}if(s.fields){t(s.fields),i(s.title??null);return}if(!s.model){l(!0);return}const o=new AbortController;return Et.schema(s.model,o.signal).then(u=>{o.signal.aborted||(t(u.fields),i(s.title??u.title))}).catch(()=>{o.signal.aborted||l(!0)}),()=>o.abort()},[s]),a?h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:e}):h.jsx(ni,{className:"my-3",fields:n,title:r,loading:!n})},Zp=({language:e,code:n})=>{const{isCopied:t,copy:r}=Xp();return h.jsxs("div",{className:"my-3",children:[h.jsxs("div",{className:"border-border/50 bg-muted/50 flex items-center justify-between rounded-t-xl border border-b-0 px-3.5 py-1.5 text-xs",children:[h.jsx("span",{className:"text-muted-foreground font-medium lowercase",children:e}),h.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground transition-colors",onClick:()=>r(n),"aria-label":"Copy",children:t?h.jsx(Ea,{className:"size-3.5"}):h.jsx(Na,{className:"size-3.5"})})]}),h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-b-xl border border-t-0 p-3.5 text-[13px] leading-relaxed",children:h.jsx("code",{children:n})})]})};function ed({markdown:e,docLinks:n={},onDocLink:t,className:r}){const i=A.useMemo(()=>({h1:({className:a,children:l,...s})=>h.jsx("h1",{id:bt(Ve(l)),className:K("aui-md-h1 mt-6 mb-3 scroll-mt-20 text-2xl font-semibold first:mt-0",a),...s,children:l}),h2:({className:a,children:l,...s})=>h.jsx("h2",{id:bt(Ve(l)),className:K("aui-md-h2 mt-6 mb-2 scroll-mt-20 text-xl font-semibold first:mt-0",a),...s,children:l}),h3:({className:a,children:l,...s})=>h.jsx("h3",{id:bt(Ve(l)),className:K("aui-md-h3 mt-5 mb-2 scroll-mt-20 text-lg font-semibold first:mt-0",a),...s,children:l}),h4:({className:a,...l})=>h.jsx("h4",{className:K("aui-md-h4 mt-4 mb-1.5 text-base font-medium first:mt-0",a),...l}),p:({className:a,...l})=>h.jsx("p",{className:K("aui-md-p my-3 leading-relaxed first:mt-0 last:mb-0",a),...l}),a:({className:a,href:l,children:s,...o})=>{const u=(l??"").trim(),f=K("aui-md-a text-primary hover:text-primary/80 underline underline-offset-2",a);if(u.startsWith("#"))return h.jsx("a",{className:f,href:u,...o,children:s});if(/^[a-z][a-z0-9+.-]*:/i.test(u)||u.startsWith("//"))return h.jsx("a",{className:f,href:u,target:"_blank",rel:"noreferrer",...o,children:s});if(u.startsWith("/"))return h.jsx("a",{className:f,href:u,onClick:p=>{p.button!==0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),Tt.visit(u))},...o,children:s});const d=n[u]??n[u.replace(/#.*$/,"")];return!d||!t?h.jsx("span",{className:K("text-foreground",a),children:s}):h.jsx("a",{className:f,href:Jp(d),onClick:p=>{p.button!==0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),t(d))},...o,children:s})},blockquote:({className:a,...l})=>h.jsx("blockquote",{className:K("aui-md-blockquote border-muted-foreground/30 text-muted-foreground my-3 border-s-2 ps-4",a),...l}),ul:({className:a,...l})=>h.jsx("ul",{className:K("aui-md-ul marker:text-muted-foreground my-3 ms-5 list-disc [&>li]:mt-1",a),...l}),ol:({className:a,...l})=>h.jsx("ol",{className:K("aui-md-ol marker:text-muted-foreground my-3 ms-5 list-decimal [&>li]:mt-1",a),...l}),li:({className:a,...l})=>h.jsx("li",{className:K("aui-md-li leading-relaxed",a),...l}),hr:({className:a,...l})=>h.jsx("hr",{className:K("aui-md-hr border-muted-foreground/20 my-4",a),...l}),table:({className:a,...l})=>h.jsx("div",{className:"my-3 overflow-x-auto",children:h.jsx("table",{className:K("aui-md-table w-full border-separate border-spacing-0 text-sm",a),...l})}),th:({className:a,...l})=>h.jsx("th",{className:K("aui-md-th bg-muted px-3 py-1.5 text-start font-medium first:rounded-ss-lg last:rounded-se-lg",a),...l}),td:({className:a,...l})=>h.jsx("td",{className:K("aui-md-td border-muted-foreground/20 border-s border-b px-3 py-1.5 text-start last:border-e",a),...l}),tr:({className:a,...l})=>h.jsx("tr",{className:K("aui-md-tr m-0 border-b p-0 first:border-t",a),...l}),img:({className:a,...l})=>h.jsx("img",{className:K("my-3 max-w-full rounded-lg border",a),...l}),code:({className:a,...l})=>h.jsx("code",{className:K("aui-md-inline-code bg-muted rounded-md px-1.5 py-0.5 font-mono text-[0.85em]",a),...l}),pre:({children:a})=>{const l=Array.isArray(a)?a[0]:a;if(!A.isValidElement(l))return h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 my-3 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:a});const s=/language-([\w-]+)/.exec(l.props.className??"")?.[1]??"",o=Ve(l.props.children).replace(/\n$/,"");return s==="mermaid"?h.jsx(Yp,{code:o}):s==="schema"?h.jsx(Qp,{source:o}):h.jsx(Zp,{language:s||"text",code:o})}}),[n,t]);return h.jsx("div",{className:K("aui-md text-sm",r),children:h.jsx(Lf,{remarkPlugins:[Wp],components:i,children:e})})}function td(e,n){const[t,r]=A.useState(null),[i,a]=A.useState({}),[l,s]=A.useState(!1),[o,u]=A.useState(!1);return A.useEffect(()=>{if(!e){r(null),a({}),u(!1);return}const f=new AbortController;return s(!0),u(!1),Et.doc(e,n,f.signal).then(async c=>{if(f.signal.aborted)return;r(c);const d=Gp(c.markdown),p=d.length>0?await Et.resolve(c.meta.id,d,f.signal).catch(()=>({})):{};f.signal.aborted||a(p)}).catch(()=>{f.signal.aborted||(r(null),u(!0))}).finally(()=>{f.signal.aborted||s(!1)}),()=>f.abort()},[e,n]),{content:t,docLinks:i,loading:l,error:o}}const nd="adminizer:ai-attach-doc";function rd(e){window.__adminizerAttachDoc__=e,window.dispatchEvent(new CustomEvent(nd,{detail:e}))}const at="info",$r=()=>{if(typeof window>"u")return{open:!1,docId:null};const e=window.location.hash.replace(/^#/,"");return e===at?{open:!0,docId:null}:e.startsWith(`${at}=`)?{open:!0,docId:decodeURIComponent(e.slice(at.length+1))||null}:{open:!1,docId:null}},id=e=>{const{pathname:n,search:t}=window.location;window.history.pushState(null,"",`${n}${t}${e}`),window.dispatchEvent(new HashChangeEvent("hashchange"))},ld=()=>{const[e,n]=A.useState($r);return A.useEffect(()=>{const t=()=>n($r());window.addEventListener("hashchange",t),window.addEventListener("popstate",t);const r=Tt.on("navigate",t);return()=>{window.removeEventListener("hashchange",t),window.removeEventListener("popstate",t),r()}},[]),e},ad=()=>{const e=ge();return A.useMemo(()=>{const n=window.routePrefix??"",t=(e.url||window.location.pathname).split(/[?#]/)[0],r=n&&t.startsWith(n)?t.slice(n.length):t,i=/^\/model\/([^/]+)/.exec(r);return i?decodeURIComponent(i[1]):null},[e.url])};function sd({open:e,docId:n,items:t,model:r,onOpenDoc:i,onClose:a}){const{t:l,locale:s}=Je(),{isEnabled:o,openChat:u}=Pt(),[f,c]=A.useState(void 0),{content:d,docLinks:p,loading:m,error:w}=td(e?n:null,f??s),[S,k]=A.useState(null),[E,v]=A.useState(!1),[N,j]=A.useState("docs");A.useEffect(()=>c(void 0),[n]),A.useEffect(()=>{if(!e||!r)return;const F=new AbortController;return k(null),v(!1),Et.schema(r,F.signal).then(y=>{F.signal.aborted||k(y)}).catch(()=>{F.signal.aborted||v(!0)}),()=>F.abort()},[r,e]);const b=A.useMemo(()=>{const F=new Map;for(const y of t){const T=y.section??"";F.set(T,[...F.get(T)??[],y])}return[...F.entries()]},[t]),L=A.useRef(!1),M=()=>{d&&(L.current=!0,a(),u(),rd({id:d.meta.id,title:d.meta.title}))};return h.jsx(Ia,{open:e,onOpenChange:F=>!F&&a(),children:h.jsxs(Ta,{side:"right",className:"z-[1002] w-full gap-0 p-0 sm:max-w-xl",onCloseAutoFocus:F=>{L.current&&(L.current=!1,F.preventDefault())},children:[h.jsxs(Pa,{className:"border-b px-4 py-3",children:[h.jsxs("div",{className:"flex items-center gap-2 pe-8",children:[n&&h.jsx(ie,{variant:"ghost",size:"icon",className:"-ms-2 shrink-0",onClick:()=>i(null),"aria-label":l("Back to contents"),children:h.jsx(za,{className:"size-4"})}),h.jsx(La,{className:"truncate",children:n?d?.meta.title??l("Documentation"):l("Page documentation")})]}),h.jsx(Da,{className:"sr-only",children:l("Documentation")})]}),h.jsxs(Ma,{value:r?N:"docs",onValueChange:j,className:"flex min-h-0 flex-1 flex-col gap-0",children:[r&&h.jsxs(Fa,{className:"mx-4 mt-3 w-fit",children:[h.jsx(Kn,{value:"docs",children:l("Documentation")}),h.jsx(Kn,{value:"schema",children:l("Schema")})]}),h.jsx(Xn,{value:"docs",className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:n?m&&!d?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Loading...")}):w||!d?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Failed to load documentation")}):h.jsxs("div",{className:"flex flex-col gap-3",children:[(d.meta.locales?.length??0)>1&&h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"text-muted-foreground text-xs",children:l("Language")}),d.meta.locales?.map(F=>h.jsx("button",{type:"button",onClick:()=>c(F),className:K("rounded-full border px-2 py-0.5 text-xs uppercase transition-colors",F===d.locale?"bg-primary text-primary-foreground border-transparent":"hover:bg-accent"),children:F},F))]}),h.jsx(ed,{markdown:d.markdown,docLinks:p,onDocLink:i})]}):t.length===0?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Nothing found")}):h.jsx("div",{className:"flex flex-col gap-4",children:b.map(([F,y])=>h.jsxs("div",{className:"flex flex-col gap-1",children:[F&&h.jsx("div",{className:"text-muted-foreground px-1 text-xs font-medium uppercase",children:F}),y.map(T=>h.jsxs("button",{type:"button",onClick:()=>i(T.id),className:"hover:bg-accent flex items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm transition-colors",children:[h.jsx(_a,{className:"text-muted-foreground size-4 shrink-0"}),h.jsx("span",{className:"truncate",children:T.title})]},T.id))]},F))})}),r&&h.jsx(Xn,{value:"schema",className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:h.jsx(ni,{fields:S?.fields??(E?[]:null),title:S?.title??r,loading:!S&&!E})})]}),h.jsxs("div",{className:"flex items-center justify-between gap-2 border-t px-4 py-3",children:[h.jsx(ie,{variant:"ghost",size:"sm",asChild:!0,children:h.jsxs(ye,{href:`${window.routePrefix}/docs${n?`/${encodeURIComponent(n)}`:""}`,children:[h.jsx(Ra,{className:"size-4"}),l("Open in knowledge base")]})}),o&&d&&h.jsxs(ie,{variant:"outline",size:"sm",onClick:M,children:[h.jsx(Jr,{className:"size-4"}),l("Send to assistant")]})]})]})})}function od(){const n=ge().props.docs,{t}=Je(),{open:r,docId:i}=ld(),a=ad(),l=A.useCallback(f=>{id(f?`#${at}=${encodeURIComponent(f)}`:`#${at}`)},[]),s=A.useCallback(()=>{const{pathname:f,search:c}=window.location;window.history.pushState(null,"",`${f}${c}`),window.dispatchEvent(new HashChangeEvent("hashchange"))},[]);if(!n)return null;const o=n.items??[],u=o.length>0||!!a;return h.jsxs(h.Fragment,{children:[u&&h.jsxs(Nt,{children:[h.jsx(At,{asChild:!0,children:h.jsx(ie,{variant:"ghost",size:"icon",className:"shrink-0",onClick:()=>l(null),"aria-label":t("Page documentation"),children:h.jsx(Aa,{className:"size-4"})})}),h.jsx(It,{side:"bottom",className:"z-[1002]",children:h.jsx("span",{children:t("Page documentation")})})]}),h.jsx(sd,{open:r,docId:i,items:o,model:a,onOpenDoc:l,onClose:s})]})}function ud({breadcrumbs:e=[]}){const{tabs:n}=Zr(),t=ge();return h.jsx("header",{className:"border-sidebar-border/50 flex h-16 shrink-0 items-center gap-2 border-b px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4",children:h.jsxs("div",{className:"flex justify-between w-full",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Oa,{className:"-ml-1"}),h.jsx(ls,{breadcrumbs:e})]}),h.jsxs("div",{className:"flex gap-4 items-center",children:[h.jsx(ys,{}),h.jsx(gs,{}),h.jsx(od,{}),t.props.history&&h.jsx(ye,{href:`${window.routePrefix}/history/view-all`,children:h.jsx(ie,{variant:"ghost",size:"icon",className:"shrink-0",children:h.jsx(Ba,{})})}),h.jsx(cs,{}),t.props.notifications&&(n===null?h.jsx("div",{className:"w-[40px] flex-none flex justify-center",children:h.jsx(ut,{className:"size-4 animate-spin"})}):n.length?h.jsx(hs,{}):null),h.jsx(us,{})]})]})})}const cd=A.memo(({children:e,breadcrumbs:n=[],className:t})=>{const r=ge(),i=n.length?n:r.props.breadcrumbs??[];return h.jsxs(Ya,{variant:"sidebar",children:[h.jsx($a,{title:r.props.title}),h.jsx(is,{}),h.jsxs(Ha,{className:"overflow-hidden",children:[h.jsx(ud,{breadcrumbs:i}),h.jsx("div",{"data-scroll-region":"content",className:K("relative flex min-h-0 flex-1 overflow-y-auto overscroll-contain",t),children:h.jsx("div",{className:"flex min-h-full w-full flex-col",children:e})}),h.jsx(Ua,{position:"top-center",richColors:!0,closeButton:!0})]})]})}),fd=()=>`${window.routePrefix??""}/assets/ai-assistant/agent.es.js?v=${window.adminizerVersion??""}`;function hd({width:e="min(25vw, 420px)",isResizing:n=!1,onResizeStart:t}){const{isEnabled:r,isOpen:i,closeChat:a,models:l,activeModel:s,setActiveModel:o,loading:u,error:f}=Pt(),[c,d]=A.useState(null),[p,m]=A.useState(null);if(A.useEffect(()=>{if(!i||c||p)return;let E=!1;return import(fd()).then(v=>{E||d(()=>v.default)}).catch(v=>{console.error("Failed to load the AI assistant UI",v),E||m("Unable to load the AI assistant UI")}),()=>{E=!0}},[c,i,p]),!r)return null;const w=l.find(E=>E.id===s),S=h.jsx(ie,{variant:"ghost",size:"icon",onClick:a,"aria-label":"Close AI assistant",children:h.jsx(qr,{className:"size-4"})}),k=h.jsxs(h.Fragment,{children:[l.length>1&&h.jsxs(Va,{value:s,onValueChange:o,children:[h.jsx(qa,{className:"h-8 w-36 text-xs","aria-label":"Select assistant",children:h.jsx(Wa,{placeholder:"Assistant"})}),h.jsx(Ja,{className:"z-[70]",children:l.map(E=>h.jsx(Ga,{value:E.id,children:E.name},E.id))})]}),S]});return h.jsxs("aside",{id:"ai-assistant-panel","aria-label":"AI assistant chat","aria-hidden":!i,className:Gr("bg-card text-card-foreground fixed bottom-0 right-0 top-0 z-[60] flex h-full flex-col border-l shadow-xl transition-all duration-300 ease-in-out","md:w-auto w-full",i?"translate-x-0 opacity-100":"translate-x-full opacity-0 pointer-events-none",n&&"transition-none"),style:{width:"var(--ai-assistant-panel-actual-width, "+e+")"},children:[h.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize AI assistant panel",className:"absolute -left-2 top-0 z-10 hidden h-full w-4 cursor-col-resize touch-none md:block",onPointerDown:t}),s&&c&&!p?h.jsx(c,{routePrefix:window.routePrefix??"",modelId:s,title:w?.name,layout:"panel",headerActions:k},s):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[h.jsx("span",{className:"font-semibold leading-tight",children:"AI assistant"}),S]}),h.jsx("div",{className:"flex flex-1 items-center justify-center p-6 text-center text-sm text-muted-foreground",children:p||f?h.jsx("span",{className:"text-destructive",children:p??f}):!u&&l.length===0?h.jsx("span",{children:"No AI models are available for your account."}):h.jsx(ut,{className:"size-8 animate-spin"})})]})]})}const pd="25vw",Hr="margin-right 300ms ease-in-out",ol=.25,dd=.55,ul="adminizer.aiAssistant.panelWidth",yn=()=>({min:Math.round(window.innerWidth*ol),max:Math.round(window.innerWidth*dd)}),md=()=>window.innerWidth*ol,gd=()=>{try{const e=Number(window.localStorage.getItem(ul));if(!Number.isFinite(e))return null;const{min:n,max:t}=yn();return Math.min(t,Math.max(n,e))}catch{return null}};function xd({children:e,panelWidth:n=pd}){const{isEnabled:t,isOpen:r}=Pt(),[i,a]=A.useState(gd),[l,s]=A.useState(!1),o=i===null?n:`${i}px`,u=A.useCallback(f=>{if(window.innerWidth<768)return;f.preventDefault();const c=f.clientX,d=i??md(),p=document.body.style.userSelect;document.body.style.userSelect="none",s(!0);const m=S=>{const{min:k,max:E}=yn(),v=Math.min(E,Math.max(k,d+c-S.clientX));a(Math.round(v))},w=()=>{document.body.style.userSelect=p,s(!1),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",w),document.removeEventListener("pointercancel",w)};document.addEventListener("pointermove",m),document.addEventListener("pointerup",w),document.addEventListener("pointercancel",w)},[i]);return A.useEffect(()=>{if(i!==null)try{window.localStorage.setItem(ul,String(i))}catch{}},[i]),A.useEffect(()=>{const f=document.getElementById("app");if(!f)return;const c=f.style.transition,d=c?.includes("margin-right");return d||(f.style.transition=c?`${c}, ${Hr}`:Hr),f.classList.add("ai-assistant-host"),f.style.setProperty("--ai-assistant-panel-width",o),()=>{f.classList.remove("ai-assistant-host"),f.style.removeProperty("--ai-assistant-panel-width"),f.style.removeProperty("--ai-assistant-panel-actual-width"),f.style.removeProperty("margin-right"),delete f.dataset.aiAssistantOpen,d||(f.style.transition=c)}},[o]),A.useEffect(()=>{const f=document.getElementById("app");if(!f)return;const c=window.innerWidth<768,d=c?"100vw":o;f.style.setProperty("--ai-assistant-panel-actual-width",d),t&&r?(f.style.marginRight=c?"0":o,f.dataset.aiAssistantOpen="true"):(f.style.removeProperty("margin-right"),f.dataset.aiAssistantOpen="false");const p=()=>{const m=window.innerWidth<768,w=m?"100vw":o;if(f.style.setProperty("--ai-assistant-panel-actual-width",w),i!==null&&!m){const{min:S,max:k}=yn();a(E=>E===null?E:Math.min(k,Math.max(S,E)))}t&&r&&(f.style.marginRight=m?"0":o)};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[o,i,t,r]),h.jsxs(h.Fragment,{children:[e,h.jsx(hd,{width:o,isResizing:l,onResizeStart:u})]})}const yd=A.memo(({children:e,className:n,breadcrumbs:t,...r})=>h.jsx(fs,{children:h.jsx(ms,{children:h.jsxs(Ka,{children:[h.jsx(cd,{breadcrumbs:t,className:n,...r,children:e}),h.jsx(xd,{})]})})})),Sd=(e,n={})=>{const t=e;return t.layout=r=>h.jsx(yd,{...n,children:r}),t};export{ed as M,td as a,Jp as b,Q as c,Et as d,wd as e,Zr as f,rd as s,Pt as u,Sd as w};
|