const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/index-9Li44d4f.chunk.mjs'),window.OC.filePath('', '', 'dist/index-Bndk0DrU.chunk.mjs'),window.OC.filePath('', '', 'dist/NcAvatar-C9d7Wrc8-eVjVuCIX.chunk.mjs'),window.OC.filePath('', '', 'dist/index-BT4ljBnH.chunk.mjs'),window.OC.filePath('', '', 'dist/runtime-dom.esm-bundler-CU8rrbZA.chunk.mjs'),window.OC.filePath('', '', 'dist/string_decoder-BO00msnV.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_WKCRq3.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-Bni_xMHF.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/index-BrC2bLMO.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-CklyzrxW.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-R3us1MM8.chunk.css'),window.OC.filePath('', '', 'dist/mdi-Bm11w6Fn.chunk.mjs'),window.OC.filePath('', '', 'dist/mdi-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/index-CySLkPBX.chunk.css'),window.OC.filePath('', '', 'dist/colors-BHGKZFDI-BKHpzg2v.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DCpg1aui.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-XiwrgeCm-Bx6e8UaI.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-XiwrgeCm-Bq_6hmXG.chunk.css'),window.OC.filePath('', '', 'dist/PencilOutline-BR85Y6ME.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-DdQinVMt.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BhB8yA4U-BLfKZ80U.chunk.mjs'),window.OC.filePath('', '', 'dist/NcDateTime-DS-ziNw6.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-C9d7Wrc8-D_G6wUEW.chunk.css'),window.OC.filePath('', '', 'dist/NcNoteCard-Cok_4Fld-C71YD40i.chunk.mjs'),window.OC.filePath('', '', 'dist/NcNoteCard-Cok_4Fld-Jq77EThs.chunk.css'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-BMsPx74L-CrcuxmoM.chunk.mjs'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-BMsPx74L-CQwJiKOs.chunk.css'),window.OC.filePath('', '', 'dist/Plus-QzdZMNfM.chunk.mjs'),window.OC.filePath('', '', 'dist/Plus-DoZPzs7J.chunk.css'),window.OC.filePath('', '', 'dist/NcSelect-DLheQ2yp-CP6uPo1K.chunk.mjs'),window.OC.filePath('', '', 'dist/NcSelect-DLheQ2yp-B9mkBKAR.chunk.css'),window.OC.filePath('', '', 'dist/TrashCanOutline-B5FsJrKA.chunk.mjs'),window.OC.filePath('', '', 'dist/NcInputField-o5OFv3z6-DJtp_yB7.chunk.mjs'),window.OC.filePath('', '', 'dist/NcInputField-o5OFv3z6-BYlw6Xsd.chunk.css')])))=>i.map(i=>d[i]); import{c as So,e as Ut,f as oi,a as Eo}from"./index-Bndk0DrU.chunk.mjs";import{l as qt,g as zo,_ as Po}from"./index-DCpg1aui.chunk.mjs";import{J as Io,K as Do,u as Fn,L as _o,M as Ao}from"./index-BrC2bLMO.chunk.mjs";import{i as To,v as at,A as Nn,r as xe,Z as Gt,c as Ze,o as ne,J as li,I as Ve,am as Mo,j as we,p as X,m as Qe,M as ai,u as se,a6 as ee,L as st,ap as Ie,f as ut,l as De,t as Ue,F as Rn,n as $e,E as bn,H as si,G as wn,k as qe,e as We,w as Ne,b as Yt,N as Lo,g as Cn,ao as Oo,a2 as Fo,x as ar,z as No,C as Ro}from"./runtime-dom.esm-bundler-CU8rrbZA.chunk.mjs";import{l as Re,h as jo,N as Pt,c as Bo,y as Ho,r as Vo}from"./logger-D3RVzcfQ-CklyzrxW.chunk.mjs";import{r as je,E as Uo,_ as pt,N as jn,a as Be,F as qo,G as $o,H as Wo,j as Zo,I as Go,J as ui,K as Yo,L as Ko,M as Qo,O as Xo,d as Jo,P as el,c as nn,b as Ot}from"./createElementId-DhjFt1I9-C_WKCRq3.chunk.mjs";import{R as ci}from"./NcNoteCard-Cok_4Fld-C71YD40i.chunk.mjs";import{N as tl}from"./NcCheckboxRadioSwitch-BMsPx74L-CrcuxmoM.chunk.mjs";import{c as Ft}from"./index-BT4ljBnH.chunk.mjs";import"./Plus-QzdZMNfM.chunk.mjs";import"./NcSelect-DLheQ2yp-CP6uPo1K.chunk.mjs";import{g as fi,v as Ge,c as nl,a as rl,p as il,r as ol,U as sr,E as ll,u as ur,S as al}from"./NcAvatar-C9d7Wrc8-eVjVuCIX.chunk.mjs";import"./mdi-Bm11w6Fn.chunk.mjs";import"./TrashCanOutline-B5FsJrKA.chunk.mjs";const wo="nextcloud-ui",Co="1.0.0",sl={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(e,{emit:n}){const t=n,r=e,o=To(),i=xe([]),l=X(()=>i.value.reduce((w,E)=>(w[~~E.id]=E)&&w,{})),a=X(()=>i.value.length),s=xe(null),u=xe(!1),f=xe({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),c=xe({splitter:null,timeoutId:null}),h=X(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":f.value.dragging})),p=()=>{document.addEventListener("mousemove",k,{passive:!1}),document.addEventListener("mouseup",v),"ontouchstart"in window&&(document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",v))},m=()=>{document.removeEventListener("mousemove",k,{passive:!1}),document.removeEventListener("mouseup",v),"ontouchstart"in window&&(document.removeEventListener("touchmove",k,{passive:!1}),document.removeEventListener("touchend",v))},x=(w,E)=>{const _=w.target.closest(".splitpanes__splitter");if(_){const{left:I,top:A}=_.getBoundingClientRect(),{clientX:R,clientY:W}="ontouchstart"in window&&w.touches?w.touches[0]:w;f.value.cursorOffset=r.horizontal?W-A:R-I}p(),f.value.mouseDown=!0,f.value.activeSplitter=E},k=w=>{f.value.mouseDown&&(w.preventDefault(),f.value.dragging=!0,requestAnimationFrame(()=>{V(U(w)),ie("resize",{event:w},!0)}))},v=w=>{f.value.dragging&&(window.getSelection().removeAllRanges(),ie("resized",{event:w},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,m()},100)},S=(w,E)=>{"ontouchstart"in window&&(w.preventDefault(),c.value.splitter===E?(clearTimeout(c.value.timeoutId),c.value.timeoutId=null,P(w,E),c.value.splitter=null):(c.value.splitter=E,c.value.timeoutId=setTimeout(()=>c.value.splitter=null,500))),f.value.dragging||ie("splitter-click",{event:w,index:E},!0)},P=(w,E)=>{if(ie("splitter-dblclick",{event:w,index:E},!0),r.maximizePanes){let _=0;i.value=i.value.map((I,A)=>(I.size=A===E?I.max:I.min,A!==E&&(_+=I.min),I)),i.value[E].size-=_,ie("pane-maximize",{event:w,index:E,pane:i.value[E]}),ie("resized",{event:w,index:E},!0)}},M=(w,E)=>{ie("pane-click",{event:w,index:l.value[E].index,pane:l.value[E]})},U=w=>{const E=s.value.getBoundingClientRect(),{clientX:_,clientY:I}="ontouchstart"in window&&w.touches?w.touches[0]:w;return{x:_-(r.horizontal?0:f.value.cursorOffset)-E.left,y:I-(r.horizontal?f.value.cursorOffset:0)-E.top}},C=w=>{w=w[r.horizontal?"y":"x"];const E=s.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(w=E-w),w*100/E},V=w=>{const E=f.value.activeSplitter;let _={prevPanesSize:$(E),nextPanesSize:y(E),prevReachedMinPanes:0,nextReachedMinPanes:0};const I=0+(r.pushOtherPanes?0:_.prevPanesSize),A=100-(r.pushOtherPanes?0:_.nextPanesSize),R=Math.max(Math.min(C(w),A),I);let W=[E,E+1],le=i.value[W[0]]||null,ce=i.value[W[1]]||null;const gt=le.max<100&&R>=le.max+_.prevPanesSize,Mt=ce.max<100&&R<=100-(ce.max+y(E+1));if(gt||Mt){gt?(le.size=le.max,ce.size=Math.max(100-le.max-_.prevPanesSize-_.nextPanesSize,0)):(le.size=Math.max(100-ce.max-_.prevPanesSize-y(E+1),0),ce.size=ce.max);return}if(r.pushOtherPanes){const Lt=L(_,R);if(!Lt)return;({sums:_,panesToResize:W}=Lt),le=i.value[W[0]]||null,ce=i.value[W[1]]||null}le!==null&&(le.size=Math.min(Math.max(R-_.prevPanesSize-_.prevReachedMinPanes,le.min),le.max)),ce!==null&&(ce.size=Math.min(Math.max(100-R-_.nextPanesSize-_.nextReachedMinPanes,ce.min),ce.max))},L=(w,E)=>{const _=f.value.activeSplitter,I=[_,_+1];return E{R>I[0]&&R<=_&&(A.size=A.min,w.prevReachedMinPanes+=A.min)}),w.prevPanesSize=$(I[0]),I[0]===void 0)?(w.prevReachedMinPanes=0,i.value[0].size=i.value[0].min,i.value.forEach((A,R)=>{R>0&&R<=_&&(A.size=A.min,w.prevReachedMinPanes+=A.min)}),i.value[I[1]].size=100-w.prevReachedMinPanes-i.value[0].min-w.prevPanesSize-w.nextPanesSize,null):E>100-w.nextPanesSize-i.value[I[1]].min&&(I[1]=F(_).index,w.nextReachedMinPanes=0,I[1]>_+1&&i.value.forEach((A,R)=>{R>_&&R{R=_+1&&(A.size=A.min,w.nextReachedMinPanes+=A.min)}),i.value[I[0]].size=100-w.prevPanesSize-y(I[0]-1),null):{sums:w,panesToResize:I}},$=w=>i.value.reduce((E,_,I)=>E+(Ii.value.reduce((E,_,I)=>E+(I>w+1?_.size:0),0),O=w=>[...i.value].reverse().find(E=>E.indexE.min)||{},F=w=>i.value.find(E=>E.index>w+1&&E.size>E.min)||{},N=()=>{var w;const E=Array.from(((w=s.value)==null?void 0:w.children)||[]);for(const _ of E){const I=_.classList.contains("splitpanes__pane"),A=_.classList.contains("splitpanes__splitter");!I&&!A&&(_.remove(),console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed."))}},T=(w,E,_=!1)=>{const I=w-1,A=document.createElement("div");A.classList.add("splitpanes__splitter"),_||(A.onmousedown=R=>x(R,I),typeof window<"u"&&"ontouchstart"in window&&(A.ontouchstart=R=>x(R,I)),A.onclick=R=>S(R,I+1)),A.ondblclick=R=>P(R,I+1),E.parentNode.insertBefore(A,E)},j=w=>{w.onmousedown=void 0,w.onclick=void 0,w.ondblclick=void 0,w.remove()},J=()=>{var w;const E=Array.from(((w=s.value)==null?void 0:w.children)||[]);for(const I of E)I.className.includes("splitpanes__splitter")&&j(I);let _=0;for(const I of E)I.className.includes("splitpanes__pane")&&(!_&&r.firstSplitter?T(_,I,!0):_&&T(_,I),_++)},re=({uid:w,...E})=>{const _=l.value[w];for(const[I,A]of Object.entries(E))_[I]=A},ge=w=>{var E;let _=-1;Array.from(((E=s.value)==null?void 0:E.children)||[]).some(I=>(I.className.includes("splitpanes__pane")&&_++,I.isSameNode(w.el))),i.value.splice(_,0,{...w,index:_}),i.value.forEach((I,A)=>I.index=A),u.value&&st(()=>{J(),d({addedPane:i.value[_]}),ie("pane-add",{pane:i.value[_]})})},Ce=w=>{const E=i.value.findIndex(I=>I.id===w);i.value[E].el=null;const _=i.value.splice(E,1)[0];i.value.forEach((I,A)=>I.index=A),st(()=>{J(),ie("pane-remove",{pane:_}),d({removedPane:{..._}})})},d=(w={})=>{!w.addedPane&&!w.removedPane?Se():i.value.some(E=>E.givenSize!==null||E.min||E.max<100)?g(w):me(),u.value&&ie("resized")},me=()=>{const w=100/a.value;let E=0;const _=[],I=[];for(const A of i.value)A.size=Math.max(Math.min(w,A.max),A.min),E-=A.size,A.size>=A.max&&_.push(A.id),A.size<=A.min&&I.push(A.id);E>.1&&ue(E,_,I)},Se=()=>{let w=100;const E=[],_=[];let I=0;for(const R of i.value)w-=R.size,R.givenSize!==null&&I++,R.size>=R.max&&E.push(R.id),R.size<=R.min&&_.push(R.id);let A=100;if(w>.1){for(const R of i.value)R.givenSize===null&&(R.size=Math.max(Math.min(w/(a.value-I),R.max),R.min)),A-=R.size;A>.1&&ue(A,E,_)}},g=({addedPane:w,removedPane:E}={})=>{let _=100/a.value,I=0;const A=[],R=[];(w?.givenSize??null)!==null&&(_=(100-w.givenSize)/(a.value-1));for(const W of i.value)I-=W.size,W.size>=W.max&&A.push(W.id),W.size<=W.min&&R.push(W.id);if(!(Math.abs(I)<.1)){for(const W of i.value)w?.givenSize!==null&&w?.id===W.id||(W.size=Math.max(Math.min(_,W.max),W.min)),I-=W.size,W.size>=W.max&&A.push(W.id),W.size<=W.min&&R.push(W.id);I>.1&&ue(I,A,R)}},ue=(w,E,_)=>{let I;w>0?I=w/(a.value-E.length):I=w/(a.value-_.length),i.value.forEach((A,R)=>{if(w>0&&!E.includes(A.id)){const W=Math.max(Math.min(A.size+I,A.max),A.min),le=W-A.size;w-=le,A.size=W}else if(!_.includes(A.id)){const W=Math.max(Math.min(A.size+I,A.max),A.min),le=W-A.size;w-=le,A.size=W}}),Math.abs(w)>.1&&st(()=>{u.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},ie=(w,E=void 0,_=!1)=>{const I=E?.index??f.value.activeSplitter??null;t(w,{...E,...I!==null&&{index:I},..._&&I!==null&&{prevPane:i.value[I-(r.firstSplitter?1:0)],nextPane:i.value[I+(r.firstSplitter?0:1)]},panes:i.value.map(A=>({min:A.min,max:A.max,size:A.size}))})};at(()=>r.firstSplitter,()=>J()),Nn(()=>{N(),J(),d(),ie("ready"),u.value=!0}),Gt(()=>u.value=!1);const oe=()=>{var w;return ee("div",{ref:s,class:h.value},(w=o.default)==null?void 0:w.call(o))};return Ie("panes",i),Ie("indexedPanes",l),Ie("horizontal",X(()=>r.horizontal)),Ie("requestUpdate",re),Ie("onPaneAdd",ge),Ie("onPaneRemove",Ce),Ie("onPaneClick",M),(w,E)=>(ne(),Ze(li(oe)))}},ul={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){var n;const t=e,r=Ve("requestUpdate"),o=Ve("onPaneAdd"),i=Ve("horizontal"),l=Ve("onPaneRemove"),a=Ve("onPaneClick"),s=(n=Mo())==null?void 0:n.uid,u=Ve("indexedPanes"),f=X(()=>u.value[s]),c=xe(null),h=X(()=>{const k=isNaN(t.size)||t.size===void 0?0:parseFloat(t.size);return Math.max(Math.min(k,m.value),p.value)}),p=X(()=>{const k=parseFloat(t.minSize);return isNaN(k)?0:k}),m=X(()=>{const k=parseFloat(t.maxSize);return isNaN(k)?100:k}),x=X(()=>{var k;return`${i.value?"height":"width"}: ${(k=f.value)==null?void 0:k.size}%`});return at(()=>h.value,k=>r({uid:s,size:k})),at(()=>p.value,k=>r({uid:s,min:k})),at(()=>m.value,k=>r({uid:s,max:k})),Nn(()=>{o({id:s,el:c.value,min:p.value,max:m.value,givenSize:t.size===void 0?null:h.value,size:h.value})}),Gt(()=>l(s)),(k,v)=>(ne(),we("div",{ref_key:"paneEl",ref:c,class:"splitpanes__pane",onClick:v[0]||(v[0]=S=>se(a)(S,k._.uid)),style:ai(x.value)},[Qe(k.$slots,"default")],4))}};function cl(e){let n=!1,t;return(...r)=>(n||(n=!0,t=e(...r)),t)}let pi="missing-app-name";try{pi=wo}catch{Re.error("The `@nextcloud/vue` library was used without setting / replacing the `appName`.")}const fl=pi;let pl="";try{pl=Co}catch{Re.error("The `@nextcloud/vue` library was used without setting / replacing the `appVersion`.")}function hi(){return Ve("appName",fl)}const hl=cl(()=>{const e=qt("core","apps",[]),n=hi();return e.find(({id:t})=>t===n)?.name??n});je(Uo);const dl=Yt({__name:"NcAppContentDetailsToggle",setup(e){const n=Fn();at(n,t),Nn(()=>{t(n.value)}),Gt(()=>{n.value&&t(!1)});function t(r=!0){const o=document.querySelector(".app-navigation .app-navigation-toggle");o&&(o.style.display=r?"none":"",r===!0&&Ut("toggle-navigation",{open:!1}))}return(r,o)=>(ne(),Ze(se(Pt),{"aria-label":se(Be)("Go back to the list"),class:$e(["app-details-toggle",{"app-details-toggle--mobile":se(n)}]),title:se(Be)("Go back to the list"),variant:"tertiary"},{icon:Ne(()=>[We(se(jn),{directional:"",path:se(jo)},null,8,["path"])]),_:1},8,["aria-label","class","title"]))}}),gl=pt(dl,[["__scopeId","data-v-a28923a1"]]),cr=So("nextcloud").persist().build(),ml=zo().theming?.name??"Nextcloud",vl={name:"NcAppContent",components:{NcAppContentDetailsToggle:gl,Pane:ul,Splitpanes:sl},props:{disableSwipe:{type:Boolean,default:!1},listSize:{type:Number,default:20},listMinWidth:{type:Number,default:15},listMaxWidth:{type:Number,default:40},paneConfigKey:{type:String,default:""},showDetails:{type:Boolean,default:!0},layout:{type:String,default:"vertical-split",validator(e){return["no-split","vertical-split","horizontal-split"].includes(e)}},pageHeading:{type:String,default:null},pageTitle:{type:String,default:null}},emits:["update:showDetails","resizeList"],setup(){return{appName:hi(),localizedAppName:hl(),isMobile:Fn(),isRtl:Do}},data(){return{contentHeight:0,swiping:{},listPaneSize:this.restorePaneConfig()}},computed:{paneConfigID(){if(this.paneConfigKey!=="")return`pane-list-size-${this.paneConfigKey}`;try{return`pane-list-size-${this.appName}`}catch{return Re.info("[NcAppContent]: falling back to global nextcloud pane config"),"pane-list-size-nextcloud"}},detailsPaneSize(){return this.listPaneSize?100-this.listPaneSize:this.paneDefaults.details.size},paneDefaults(){return{list:{size:this.listSize,min:this.listMinWidth,max:this.listMaxWidth},details:{size:100-this.listSize,min:100-this.listMaxWidth,max:100-this.listMinWidth}}},realPageTitle(){const e=new Set;if(this.pageTitle)for(const n of this.pageTitle.split(" - "))e.add(n);else if(this.pageHeading){for(const n of this.pageHeading.split(" - "))e.add(n);e.size>0&&e.add(this.localizedAppName)}else return null;return e.add(ml),[...e.values()].join(" - ")}},watch:{realPageTitle:{immediate:!0,handler(){this.realPageTitle!==null&&(document.title=this.realPageTitle)}},paneConfigKey:{immediate:!0,handler(){this.restorePaneConfig()}}},mounted(){this.disableSwipe||(this.swiping=Io(this.$el,{onSwipeEnd:this.handleSwipe})),this.restorePaneConfig()},methods:{handleSwipe(e,n){Math.abs(this.swiping.lengthX)>70&&(this.swiping.coordsStart.x<300/2&&n==="right"?Ut("toggle-navigation",{open:!0}):this.swiping.coordsStart.x<300*1.5&&n==="left"&&Ut("toggle-navigation",{open:!1}))},handlePaneResize(e){const n=parseInt(e.panes[0].size,10);cr.setItem(this.paneConfigID,JSON.stringify(n)),this.listPaneSize=n,this.$emit("resizeList",{size:n}),Re.debug("[NcAppContent] pane config",{listPaneSize:n})},restorePaneConfig(){const e=parseInt(cr.getItem(this.paneConfigID),10);if(!isNaN(e)&&e!==this.listPaneSize)return Re.debug("[NcAppContent] pane config",{listPaneSize:e}),this.listPaneSize=e,e},hideDetails(){this.$emit("update:showDetails",!1)}}},yl={key:0,class:"hidden-visually"},xl={key:1,class:"app-content-wrapper"};function kl(e,n,t,r,o,i){const l=ut("NcAppContentDetailsToggle"),a=ut("Pane"),s=ut("Splitpanes");return ne(),we("main",{id:"app-content-vue",class:$e(["app-content no-snapper",{"app-content--has-list":!!e.$slots.list}])},[t.pageHeading?(ne(),we("h1",yl,Ue(t.pageHeading),1)):De("",!0),e.$slots.list?(ne(),we(Rn,{key:1},[r.isMobile||t.layout==="no-split"?(ne(),we("div",{key:0,class:$e(["app-content-wrapper app-content-wrapper--no-split",{"app-content-wrapper--show-details":t.showDetails,"app-content-wrapper--show-list":!t.showDetails,"app-content-wrapper--mobile":r.isMobile}])},[t.showDetails?(ne(),Ze(l,{key:0,onClick:si(i.hideDetails,["stop","prevent"])},null,8,["onClick"])):De("",!0),bn(qe("div",null,[Qe(e.$slots,"list",{},void 0,!0)],512),[[wn,!t.showDetails]]),t.showDetails?Qe(e.$slots,"default",{key:1},void 0,!0):De("",!0)],2)):t.layout==="vertical-split"||t.layout==="horizontal-split"?(ne(),we("div",xl,[We(s,{horizontal:t.layout==="horizontal-split",class:$e(["default-theme",{"splitpanes--horizontal":t.layout==="horizontal-split","splitpanes--vertical":t.layout==="vertical-split"}]),rtl:r.isRtl,onResized:i.handlePaneResize},{default:Ne(()=>[We(a,{class:"splitpanes__pane-list",size:o.listPaneSize||i.paneDefaults.list.size,minSize:i.paneDefaults.list.min,maxSize:i.paneDefaults.list.max},{default:Ne(()=>[Qe(e.$slots,"list",{},void 0,!0)]),_:3},8,["size","minSize","maxSize"]),We(a,{class:"splitpanes__pane-details",size:i.detailsPaneSize,minSize:i.paneDefaults.details.min,maxSize:i.paneDefaults.details.max},{default:Ne(()=>[Qe(e.$slots,"default",{},void 0,!0)]),_:3},8,["size","minSize","maxSize"])]),_:3},8,["horizontal","class","rtl","onResized"])])):De("",!0)],64)):De("",!0),e.$slots.list?De("",!0):Qe(e.$slots,"default",{key:2},void 0,!0)],2)}const vd=pt(vl,[["render",kl],["__scopeId","data-v-563c4ac4"]]),bl=Symbol.for("NcContent:setHasAppNavigation"),wl=Symbol.for("NcContent:selector");je(qo);const Cl=` `,Sl=` `,El={class:"vue-skip-actions__container"},zl={class:"vue-skip-actions__headline"},Pl={class:"vue-skip-actions__buttons"},Il=Yt({__name:"NcContent",props:{appName:{}},setup(e){const n=e;Ie(bl,a),Ie(wl,"#content-vue"),Ie("appName",X(()=>n.appName));const t=Fn(),r=xe(!1),o=xe(),i=X(()=>o.value==="navigation"?Sl:Cl);Lo(()=>{const s=document.getElementById("skip-actions");s&&(s.innerHTML="",s.classList.add("vue-skip-actions"))});function l(){Ut("toggle-navigation",{open:!0}),st(()=>{window.location.hash="app-navigation-vue",document.getElementById("app-navigation-vue").focus()})}function a(s){r.value=s,o.value||(o.value="navigation")}return(s,u)=>(ne(),we("div",{id:"content-vue",class:$e(["content",`app-${s.appName.toLowerCase()}`])},[(ne(),Ze(Oo,{to:"#skip-actions"},[qe("div",El,[qe("div",zl,Ue(se(Be)("Keyboard navigation help")),1),qe("div",Pl,[bn(We(Pt,{href:"#app-navigation-vue",variant:"tertiary",onClick:si(l,["prevent"]),onFocusin:u[0]||(u[0]=f=>o.value="navigation"),onMouseover:u[1]||(u[1]=f=>o.value="navigation")},{default:Ne(()=>[Cn(Ue(se(Be)("Skip to app navigation")),1)]),_:1},512),[[wn,r.value]]),We(Pt,{href:"#app-content-vue",variant:"tertiary",onFocusin:u[2]||(u[2]=f=>o.value="content"),onMouseover:u[3]||(u[3]=f=>o.value="content")},{default:Ne(()=>[Cn(Ue(se(Be)("Skip to main content")),1)]),_:1})]),bn(We(jn,{class:"vue-skip-actions__image",svg:i.value,size:"auto"},null,8,["svg"]),[[wn,!se(t)]])])])),Qe(s.$slots,"default",{},void 0,!0)],2))}}),yd=pt(Il,[["__scopeId","data-v-d9b0d7e8"]]);je($o);const Dl=2e3;function _l(e){const n=xe(!1),t=X(()=>n.value?Bo:Ho),r=X(()=>n.value?Be("Copied"):Be("Copy to clipboard"));async function o(){if(n.value)return;const i=Fo(e);try{await navigator.clipboard.writeText(i)}catch{prompt("",i)}n.value=!0,setTimeout(()=>{n.value=!1},Dl)}return{isCopied:n,copy:o,icon:t,altText:r}}function fr(){return qt("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}window._vue_richtext_widgets??={},window._registerWidget??=(e,n,t,r)=>{Al(e,n,t,r)};function Al(e,n,t=()=>{},r){const o={hasInteractiveView:!0,fullWidth:!1,...r};if(window._vue_richtext_widgets[e]){Re.error(`[ReferencePicker]: Widget for id ${e} already registered`);return}window._vue_richtext_widgets[e]={id:e,callback:n,onDestroy:t,...o}}function Tl(e,n){const{richObjectType:t,richObject:r,accessible:o,interactive:i}=n;if(t!=="open-graph"){if(!window._vue_richtext_widgets[t]){Re.error("Widget for rich object type "+t+" not registered");return}window._vue_richtext_widgets[t].callback(e,{richObjectType:t,richObject:r,accessible:o,interactive:i})}}function Ml(e,n){e!=="open-graph"&&window._vue_richtext_widgets[e]&&window._vue_richtext_widgets[e].onDestroy(n)}function Ll(e){return!!window._vue_richtext_widgets[e]}function Ol(e){return!!window._vue_richtext_widgets[e]?.hasInteractiveView}function Fl(e){return!!window._vue_richtext_widgets[e]?.fullWidth}window._vue_richtext_custom_picker_elements??={},window._registerCustomPickerElement??=Nl;function Nl(e,n,t=()=>{},r="large"){if(window._vue_richtext_custom_picker_elements[e]){Re.error(`Custom reference picker element for id ${e} already registered`);return}window._vue_richtext_custom_picker_elements[e]={id:e,callback:n,onDestroy:t,size:r}}je(Wo),Be("Any link"),Zo("core","filetypes/link.svg"),window._vue_richtext_reference_providers??=qt("core","reference-provider-list",[]),window._vue_richtext_reference_provider_timestamps??=qt("core","reference-provider-timestamps",{}),je(ui,Go),je(Yo);const Rl=["src"],jl={class:"widget-default--details"},Bl={class:"widget-default--name"},Hl={class:"widget-default--link"},Vl=180*1e3,Ul=Yt({__name:"NcReferenceWidget",props:{reference:{},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},setup(e){const n=e,t=Ve(Vo,null),r=xe(!1),o=ar("customWidget"),i=ar("widgetRoot"),{width:l}=_o(i);Ao(i,([L])=>{st(()=>{r.value=L.isIntersecting})});const a=xe(!1),s=xe(!1);let u=null;const f=X(()=>!n.interactiveOptIn&&n.interactive||a.value),c=X(()=>Fl(n.reference.richObjectType)),h=X(()=>Ll(n.reference.richObjectType)),p=X(()=>h.value&&Ol(n.reference.richObjectType)),m=X(()=>!n.reference.accessible),x=X(()=>[450,550,650,1/0].findIndex(L=>l.value{if(x.value===0)return{display:"none"};const L=x.value;return{lineClamp:L,webkitLineClamp:L}}),v=X(()=>{const L=n.reference.openGraphObject.link;return L?L.startsWith("https://")?L.substring(8):L.startsWith("http://")?L.substring(7):L:""}),S=X(()=>fi(t,n.reference.openGraphObject.link)),P=X(()=>S.value?ci:"a"),M=X(()=>S.value?{to:S.value}:{href:n.reference.openGraphObject.link,target:"_blank"});at(r,L=>{if(!L){u=setTimeout(()=>{r.value||V()},Vl);return}u&&(clearTimeout(u),u=null),s.value||C()},{immediate:!0}),Gt(()=>{V()});function U(){a.value=!0,C()}function C(){if(!o.value||n.reference.richObjectType==="open-graph")return;o.value.innerHTML="";const L=document.createElement("div");L.style.width="100%",o.value.appendChild(L),st(()=>{Tl(L,{...n.reference,interactive:f.value}),s.value=!0})}function V(){s.value&&i.value&&(Ml(n.reference.richObjectType,i.value),s.value=!1)}return(L,$)=>(ne(),we("div",{ref_key:"widgetRoot",ref:i,class:$e({"toggle-interactive":p.value&&!f.value})},[L.reference&&h.value?(ne(),we("div",{key:0,ref_key:"customWidget",ref:o,class:$e(["widget-custom",{"full-width":c.value}])},null,2)):!m.value&&L.reference&&L.reference.openGraphObject&&!h.value?(ne(),Ze(li(P.value),No({key:1},M.value,{rel:"noopener noreferrer",class:"widget-default"}),{default:Ne(()=>[L.reference.openGraphObject.thumb?(ne(),we("img",{key:0,class:"widget-default--image",src:L.reference.openGraphObject.thumb},null,8,Rl)):De("",!0),qe("div",jl,[qe("p",Bl,Ue(L.reference.openGraphObject.name),1),qe("p",{class:"widget-default--description",style:ai(k.value)},Ue(L.reference.openGraphObject.description),5),qe("p",Hl,Ue(v.value),1)])]),_:1},16)):De("",!0),L.interactiveOptIn&&p.value&&!f.value?(ne(),Ze(Pt,{key:2,class:"toggle-interactive--button",onClick:U},{default:Ne(()=>[Cn(Ue(se(Be)("Enable interactive view")),1)]),_:1})):De("",!0)],2))}}),ql=pt(Ul,[["__scopeId","data-v-8ce33442"]]);je(Ko),je(Xo,ui,Qo),je(el,Jo);const di=-1,Kt=0,Ct=1,$t=2,Bn=3,Hn=4,Vn=5,Un=6,gi=7,mi=8,pr=typeof self=="object"?self:globalThis,$l=(e,n)=>{const t=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,l]=n[o];switch(i){case Kt:case di:return t(l,o);case Ct:{const a=t([],o);for(const s of l)a.push(r(s));return a}case $t:{const a=t({},o);for(const[s,u]of l)a[r(s)]=r(u);return a}case Bn:return t(new Date(l),o);case Hn:{const{source:a,flags:s}=l;return t(new RegExp(a,s),o)}case Vn:{const a=t(new Map,o);for(const[s,u]of l)a.set(r(s),r(u));return a}case Un:{const a=t(new Set,o);for(const s of l)a.add(r(s));return a}case gi:{const{name:a,message:s}=l;return t(new pr[a](s),o)}case mi:return t(BigInt(l),o);case"BigInt":return t(Object(BigInt(l)),o);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(new pr[i](l),o)};return r},hr=e=>$l(new Map,e)(0),rt="",{toString:Wl}={},{keys:Zl}=Object,yt=e=>{const n=typeof e;if(n!=="object"||!e)return[Kt,n];const t=Wl.call(e).slice(8,-1);switch(t){case"Array":return[Ct,rt];case"Object":return[$t,rt];case"Date":return[Bn,rt];case"RegExp":return[Hn,rt];case"Map":return[Vn,rt];case"Set":return[Un,rt];case"DataView":return[Ct,t]}return t.includes("Array")?[Ct,t]:t.includes("Error")?[gi,t]:[$t,t]},Nt=([e,n])=>e===Kt&&(n==="function"||n==="symbol"),Gl=(e,n,t,r)=>{const o=(l,a)=>{const s=r.push(l)-1;return t.set(a,s),s},i=l=>{if(t.has(l))return t.get(l);let[a,s]=yt(l);switch(a){case Kt:{let f=l;switch(s){case"bigint":a=mi,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return o([di],l)}return o([a,f],l)}case Ct:{if(s){let h=l;return s==="DataView"?h=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(l)),o([s,[...h]],l)}const f=[],c=o([a,f],l);for(const h of l)f.push(i(h));return c}case $t:{if(s)switch(s){case"BigInt":return o([s,l.toString()],l);case"Boolean":case"Number":case"String":return o([s,l.valueOf()],l)}if(n&&"toJSON"in l)return i(l.toJSON());const f=[],c=o([a,f],l);for(const h of Zl(l))(e||!Nt(yt(l[h])))&&f.push([i(h),i(l[h])]);return c}case Bn:return o([a,l.toISOString()],l);case Hn:{const{source:f,flags:c}=l;return o([a,{source:f,flags:c}],l)}case Vn:{const f=[],c=o([a,f],l);for(const[h,p]of l)(e||!(Nt(yt(h))||Nt(yt(p))))&&f.push([i(h),i(p)]);return c}case Un:{const f=[],c=o([a,f],l);for(const h of l)(e||!Nt(yt(h)))&&f.push(i(h));return c}}const{message:u}=l;return o([a,{name:s,message:u}],l)};return i},dr=(e,{json:n,lossy:t}={})=>{const r=[];return Gl(!(n||t),!!n,new Map,r)(e),r},Xe=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?hr(dr(e,n)):structuredClone(e):(e,n)=>hr(dr(e,n)),vi=(function(e){if(e==null)return Ql;if(typeof e=="string")return Kl(e);if(typeof e=="object")return Yl(e);if(typeof e=="function")return qn(e);throw new Error("Expected function, string, or array as `test`")});function Yl(e){const n=[];let t=-1;for(;++t0&&(i.properties.rel=[...h]),p&&(i.properties.target=p),f){const x=xt(n.contentProperties,i)||{};i.children.push({type:"element",tagName:"span",properties:Xe(x),children:Xe(f)})}}}})}}function xt(e,n){return typeof e=="function"?e(n):e}function sa(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ua=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ca=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fa={};function gr(e,n){return(fa.jsx?ca:ua).test(e)}const pa=/[ \t\n\f\r]/g;function ha(e){return typeof e=="object"?e.type==="text"?mr(e.value):!1:mr(e)}function mr(e){return e.replace(pa,"")===""}class St{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}St.prototype.normal={},St.prototype.property={},St.prototype.space=void 0;function yi(e,n){const t={},r={};for(const o of e)Object.assign(t,o.property),Object.assign(r,o.normal);return new St(t,r,n)}function Sn(e){return e.toLowerCase()}class pe{constructor(n,t){this.attribute=t,this.property=n}}pe.prototype.attribute="",pe.prototype.booleanish=!1,pe.prototype.boolean=!1,pe.prototype.commaOrSpaceSeparated=!1,pe.prototype.commaSeparated=!1,pe.prototype.defined=!1,pe.prototype.mustUseProperty=!1,pe.prototype.number=!1,pe.prototype.overloadedBoolean=!1,pe.prototype.property="",pe.prototype.spaceSeparated=!1,pe.prototype.space=void 0;let da=0;const q=et(),te=et(),En=et(),z=et(),Y=et(),ct=et(),ye=et();function et(){return 2**++da}const zn=Object.freeze(Object.defineProperty({__proto__:null,boolean:q,booleanish:te,commaOrSpaceSeparated:ye,commaSeparated:ct,number:z,overloadedBoolean:En,spaceSeparated:Y},Symbol.toStringTag,{value:"Module"})),rn=Object.keys(zn);class $n extends pe{constructor(n,t,r,o){let i=-1;if(super(n,t),vr(this,"space",o),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&xa.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(yr,wa);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!yr.test(i)){let l=i.replace(ya,ba);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}o=$n}return new o(r,n)}function ba(e){return"-"+e.toLowerCase()}function wa(e){return e.charAt(1).toUpperCase()}const Ca=yi([xi,ga,wi,Ci,Si],"html"),Wn=yi([xi,ma,wi,Ci,Si],"svg");var it={},on,xr;function Sa(){if(xr)return on;xr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=` `,u="/",f="*",c="",h="comment",p="declaration";on=function(x,k){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];k=k||{};var v=1,S=1;function P(N){var T=N.match(n);T&&(v+=T.length);var j=N.lastIndexOf(s);S=~j?N.length-j:S+N.length}function M(){var N={line:v,column:S};return function(T){return T.position=new U(N),L(),T}}function U(N){this.start=N,this.end={line:v,column:S},this.source=k.source}U.prototype.content=x;function C(N){var T=new Error(k.source+":"+v+":"+S+": "+N);if(T.reason=N,T.filename=k.source,T.line=v,T.column=S,T.source=x,!k.silent)throw T}function V(N){var T=N.exec(x);if(T){var j=T[0];return P(j),x=x.slice(j.length),T}}function L(){V(t)}function $(N){var T;for(N=N||[];T=y();)T!==!1&&N.push(T);return N}function y(){var N=M();if(!(u!=x.charAt(0)||f!=x.charAt(1))){for(var T=2;c!=x.charAt(T)&&(f!=x.charAt(T)||u!=x.charAt(T+1));)++T;if(T+=2,c===x.charAt(T-1))return C("End of comment missing");var j=x.slice(2,T-2);return S+=2,P(j),x=x.slice(T),S+=2,N({type:h,comment:j})}}function O(){var N=M(),T=V(r);if(T){if(y(),!V(o))return C("property missing ':'");var j=V(i),J=N({type:p,property:m(T[0].replace(e,c)),value:j?m(j[0].replace(e,c)):c});return V(l),J}}function F(){var N=[];$(N);for(var T;T=O();)T!==!1&&(N.push(T),$(N));return N}return L(),F()};function m(x){return x?x.replace(a,c):c}return on}var kr;function Ea(){if(kr)return it;kr=1;var e=it&&it.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(it,"__esModule",{value:!0}),it.default=t;const n=e(Sa());function t(r,o){let i=null;if(!r||typeof r!="string")return i;const l=(0,n.default)(r),a=typeof o=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?o(u,f,s):f&&(i=i||{},i[u]=f)}),i}return it}var kt={},br;function za(){if(br)return kt;br=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(u){return!u||t.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),i(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(o,a):u=u.replace(r,a),u.replace(n,l))};return kt.camelCase=s,kt}var bt,wr;function Pa(){if(wr)return bt;wr=1;var e=bt&&bt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(Ea()),t=za();function r(o,i){var l={};return!o||typeof o!="string"||(0,n.default)(o,function(a,s){a&&s&&(l[(0,t.camelCase)(a,i)]=s)}),l}return r.default=r,bt=r,bt}var Ia=Pa();const Da=oi(Ia),Ei=zi("end"),Zn=zi("start");function zi(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 _a(e){const n=Zn(e),t=Ei(e);if(n&&t)return{start:n,end:t}}function Et(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cr(e.position):"start"in e||"end"in e?Cr(e):"line"in e||"column"in e?Pn(e):""}function Pn(e){return Sr(e&&e.line)+":"+Sr(e&&e.column)}function Cr(e){return Pn(e&&e.start)+"-"+Pn(e&&e.end)}function Sr(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let o="",i={},l=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?o=n:!i.cause&&n&&(l=!0,o=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?i.ruleId=r:(i.source=r.slice(0,s),i.ruleId=r.slice(s+1))}if(!i.place&&i.ancestors&&i.ancestors){const s=i.ancestors[i.ancestors.length-1];s&&(i.place=s.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=Et(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ae.prototype.file="",ae.prototype.name="",ae.prototype.reason="",ae.prototype.message="",ae.prototype.stack="",ae.prototype.column=void 0,ae.prototype.line=void 0,ae.prototype.ancestors=void 0,ae.prototype.cause=void 0,ae.prototype.fatal=void 0,ae.prototype.place=void 0,ae.prototype.ruleId=void 0,ae.prototype.source=void 0;const Gn={}.hasOwnProperty,Aa=new Map,Ta=/[A-Z]/g,Ma=new Set(["table","tbody","thead","tfoot","tr"]),La=new Set(["td","th"]),Pi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Oa(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=Ua(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=Va(t,n.jsx,n.jsxs)}const o={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"?Wn:Ca,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=Ii(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ii(e,n,t){if(n.type==="element")return Fa(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Na(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ja(e,n,t);if(n.type==="mdxjsEsm")return Ra(e,n);if(n.type==="root")return Ba(e,n,t);if(n.type==="text")return Ha(e,n)}function Fa(e,n,t){const r=e.schema;let o=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Wn,e.schema=o),e.ancestors.push(n);const i=_i(e,n.tagName,!1),l=qa(e,n);let a=Kn(e,n);return Ma.has(n.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!ha(s):!0})),Di(e,l,i,n),Yn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,i,l,t)}function Na(e,n){if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];return t.type,e.evaluater.evaluateExpression(t.expression)}It(e,n.position)}function Ra(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);It(e,n.position)}function ja(e,n,t){const r=e.schema;let o=r;n.name==="svg"&&r.space==="html"&&(o=Wn,e.schema=o),e.ancestors.push(n);const i=n.name===null?e.Fragment:_i(e,n.name,!0),l=$a(e,n),a=Kn(e,n);return Di(e,l,i,n),Yn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,i,l,t)}function Ba(e,n,t){const r={};return Yn(r,Kn(e,n)),e.create(n,e.Fragment,r,t)}function Ha(e,n){return n.value}function Di(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Yn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Va(e,n,t){return r;function r(o,i,l,a){const s=Array.isArray(l.children)?t:n;return a?s(i,l,a):s(i,l)}}function Ua(e,n){return t;function t(r,o,i,l){const a=Array.isArray(i.children),s=Zn(r);return n(o,i,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function qa(e,n){const t={};let r,o;for(o in n.properties)if(o!=="children"&&Gn.call(n.properties,o)){const i=Wa(e,o,n.properties[o]);if(i){const[l,a]=i;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&La.has(n.tagName)?r=a:t[l]=a}}if(r){const i=t.style||(t.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function $a(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const i=o.expression;i.type;const l=i.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else It(e,n.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else It(e,n.position);else i=r.value===null?!0:r.value;t[o]=i}return t}function Kn(e,n){const t=[];let r=-1;const o=e.passKeys?new Map:Aa;for(;++r0?{type:"text",value:M}:void 0),M===!1?c.lastIndex=S+1:(p!==S&&k.push({type:"text",value:s.value.slice(p,S)}),Array.isArray(M)?k.push(...M):M&&k.push(M),p=S+v[0].length,x=!0),!c.global)break;v=c.exec(s.value)}return x?(po?0:o+n:n=n>o?o: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);i0?(Ae(e,e.length,0,n),e):n}const Pr={}.hasOwnProperty;function us(e){const n={};let t=-1;for(;++t13&&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 ft(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const _e=Ye(/[A-Za-z]/),ke=Ye(/[\dA-Za-z]/),ps=Ye(/[#-'*+\--9=?A-Z^-~]/);function In(e){return e!==null&&(e<32||e===127)}const Dn=Ye(/\d/),hs=Ye(/[\dA-Fa-f]/),ds=Ye(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const gs=Ye(new RegExp("\\p{P}|\\p{S}","u")),ms=Ye(/\s/);function Ye(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function dt(e){const n=[];let t=-1,r=0,o=0;for(;++t55295&&i<57344){const a=e.charCodeAt(t+1);i<56320&&a>56319&&a<57344?(l=String.fromCharCode(i,a),o=1):l="�"}else l=String.fromCharCode(i);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+o+1,l=""),o&&(t+=o,o=0)}return n.join("")+e.slice(r)}function K(e,n,t,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(s){return Z(s)?(e.enter(t),a(s)):n(s)}function a(s){return Z(s)&&i++l))return;const V=n.events.length;let L=V,$,y;for(;L--;)if(n.events[L][0]==="exit"&&n.events[L][1].type==="chunkFlow"){if($){y=n.events[L][1].end;break}$=!0}for(v(r),C=V;CP;){const U=t[M];n.containerState=U[1],U[0].exit.call(n,e)}t.length=P}function S(){o.write([null]),i=void 0,o=void 0,n.containerState._closeFlow=void 0}}function bs(e,n,t){return K(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dr(e){if(e===null||he(e)||ms(e))return 1;if(gs(e))return 2}function Xn(e,n,t){const r=[];let o=-1;for(;++o1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[t][1].start};_r(c,-s),_r(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},i={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},o={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=be(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=be(u,[["enter",o,n],["enter",l,n],["exit",l,n],["enter",i,n]]),u=be(u,Xn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=be(u,[["exit",i,n],["enter",a,n],["exit",a,n],["exit",o,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=be(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,Ae(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t0&&Z(C)?K(e,S,"linePrefix",i+1)(C):S(C)}function S(C){return C===null||B(C)?e.check(Ar,x,M)(C):(e.enter("codeFlowValue"),P(C))}function P(C){return C===null||B(C)?(e.exit("codeFlowValue"),S(C)):(e.consume(C),P)}function M(C){return e.exit("codeFenced"),n(C)}function U(C,V,L){let $=0;return y;function y(j){return C.enter("lineEnding"),C.consume(j),C.exit("lineEnding"),O}function O(j){return C.enter("codeFencedFence"),Z(j)?K(C,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):F(j)}function F(j){return j===a?(C.enter("codeFencedFenceSequence"),N(j)):L(j)}function N(j){return j===a?($++,C.consume(j),N):$>=l?(C.exit("codeFencedFenceSequence"),Z(j)?K(C,T,"whitespace")(j):T(j)):L(j)}function T(j){return j===null||B(j)?(C.exit("codeFencedFence"),V(j)):L(j)}}}function Ms(e,n,t){const r=this;return o;function o(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i)}function i(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const ln={name:"codeIndented",tokenize:Os},Ls={partial:!0,tokenize:Fs};function Os(e,n,t){const r=this;return o;function o(u){return e.enter("codeIndented"),K(e,i,"linePrefix",5)(u)}function i(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):t(u)}function l(u){return u===null?s(u):B(u)?e.attempt(Ls,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||B(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),n(u)}}function Fs(e,n,t){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?t(l):B(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):K(e,i,"linePrefix",5)(l)}function i(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):B(l)?o(l):t(l)}}const Ns={name:"codeText",previous:js,resolve:Rs,tokenize:Bs};function Rs(e){let n=e.length-4,t=3,r,o;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=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 nthis.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 o=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&wt(this.left,r),i.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),wt(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),wt(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=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Ni(e,n,t,r,o,i,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(v){return v===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(v),e.exit(i),h):v===null||v===32||v===41||In(v)?t(v):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(v))}function h(v){return v===62?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(a),h(v)):v===null||v===60||B(v)?t(v):(e.consume(v),v===92?m:p)}function m(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function x(v){return!f&&(v===null||v===41||he(v))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(v)):f999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),n):B(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||B(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!Z(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function ji(e,n,t,r,o,i){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),l=h===40?41:h,s):t(h)}function s(h){return h===l?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),n):(e.enter(i),u(h))}function u(h){return h===l?(e.exit(i),s(l)):h===null?t(h):B(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),K(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===l||h===null||B(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===l||h===92?(e.consume(h),f):f(h)}}function zt(e,n){let t;return r;function r(o){return B(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t=!0,r):Z(o)?K(e,r,t?"linePrefix":"lineSuffix")(o):n(o)}}const Gs={name:"definition",tokenize:Ks},Ys={partial:!0,tokenize:Qs};function Ks(e,n,t){const r=this;let o;return i;function i(p){return e.enter("definition"),l(p)}function l(p){return Ri.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return o=ft(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):t(p)}function s(p){return he(p)?zt(e,u)(p):u(p)}function u(p){return Ni(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Ys,c,c)(p)}function c(p){return Z(p)?K(e,h,"whitespace")(p):h(p)}function h(p){return p===null||B(p)?(e.exit("definition"),r.parser.defined.push(o),n(p)):t(p)}}function Qs(e,n,t){return r;function r(a){return he(a)?zt(e,o)(a):t(a)}function o(a){return ji(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return Z(a)?K(e,l,"whitespace")(a):l(a)}function l(a){return a===null||B(a)?n(a):t(a)}}const Xs={name:"hardBreakEscape",tokenize:Js};function Js(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return B(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const eu={name:"headingAtx",resolve:tu,tokenize:nu};function tu(e,n){let t=e.length-2,r=3,o,i;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&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},i={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Ae(e,r,t-r+1,[["enter",o,n],["enter",i,n],["exit",i,n],["exit",o,n]])),e}function nu(e,n,t){let r=0;return o;function o(f){return e.enter("atxHeading"),i(f)}function i(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||he(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||B(f)?(e.exit("atxHeading"),n(f)):Z(f)?K(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||he(f)?(e.exit("atxHeadingText"),a(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:au,tokenize:su},ou={partial:!0,tokenize:cu},lu={partial:!0,tokenize:uu};function au(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 su(e,n,t){const r=this;let o,i,l,a,s;return u;function u(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),i=!0,x):g===63?(e.consume(g),o=3,r.interrupt?n:d):_e(g)?(e.consume(g),l=String.fromCharCode(g),k):t(g)}function h(g){return g===45?(e.consume(g),o=2,p):g===91?(e.consume(g),o=5,a=0,m):_e(g)?(e.consume(g),o=4,r.interrupt?n:d):t(g)}function p(g){return g===45?(e.consume(g),r.interrupt?n:d):t(g)}function m(g){const ue="CDATA[";return g===ue.charCodeAt(a++)?(e.consume(g),a===ue.length?r.interrupt?n:F:m):t(g)}function x(g){return _e(g)?(e.consume(g),l=String.fromCharCode(g),k):t(g)}function k(g){if(g===null||g===47||g===62||he(g)){const ue=g===47,ie=l.toLowerCase();return!ue&&!i&&Mr.includes(ie)?(o=1,r.interrupt?n(g):F(g)):ru.includes(l.toLowerCase())?(o=6,ue?(e.consume(g),v):r.interrupt?n(g):F(g)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(g):i?S(g):P(g))}return g===45||ke(g)?(e.consume(g),l+=String.fromCharCode(g),k):t(g)}function v(g){return g===62?(e.consume(g),r.interrupt?n:F):t(g)}function S(g){return Z(g)?(e.consume(g),S):y(g)}function P(g){return g===47?(e.consume(g),y):g===58||g===95||_e(g)?(e.consume(g),M):Z(g)?(e.consume(g),P):y(g)}function M(g){return g===45||g===46||g===58||g===95||ke(g)?(e.consume(g),M):U(g)}function U(g){return g===61?(e.consume(g),C):Z(g)?(e.consume(g),U):P(g)}function C(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),s=g,V):Z(g)?(e.consume(g),C):L(g)}function V(g){return g===s?(e.consume(g),s=null,$):g===null||B(g)?t(g):(e.consume(g),V)}function L(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||he(g)?U(g):(e.consume(g),L)}function $(g){return g===47||g===62||Z(g)?P(g):t(g)}function y(g){return g===62?(e.consume(g),O):t(g)}function O(g){return g===null||B(g)?F(g):Z(g)?(e.consume(g),O):t(g)}function F(g){return g===45&&o===2?(e.consume(g),J):g===60&&o===1?(e.consume(g),re):g===62&&o===4?(e.consume(g),me):g===63&&o===3?(e.consume(g),d):g===93&&o===5?(e.consume(g),Ce):B(g)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ou,Se,N)(g)):g===null||B(g)?(e.exit("htmlFlowData"),N(g)):(e.consume(g),F)}function N(g){return e.check(lu,T,Se)(g)}function T(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),j}function j(g){return g===null||B(g)?N(g):(e.enter("htmlFlowData"),F(g))}function J(g){return g===45?(e.consume(g),d):F(g)}function re(g){return g===47?(e.consume(g),l="",ge):F(g)}function ge(g){if(g===62){const ue=l.toLowerCase();return Mr.includes(ue)?(e.consume(g),me):F(g)}return _e(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),ge):F(g)}function Ce(g){return g===93?(e.consume(g),d):F(g)}function d(g){return g===62?(e.consume(g),me):g===45&&o===2?(e.consume(g),d):F(g)}function me(g){return g===null||B(g)?(e.exit("htmlFlowData"),Se(g)):(e.consume(g),me)}function Se(g){return e.exit("htmlFlow"),n(g)}}function uu(e,n,t){const r=this;return o;function o(l){return B(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):t(l)}function i(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function cu(e,n,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Qt,n,t)}}const fu={name:"htmlText",tokenize:pu};function pu(e,n,t){const r=this;let o,i,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),U):d===63?(e.consume(d),P):_e(d)?(e.consume(d),L):t(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),i=0,m):_e(d)?(e.consume(d),S):t(d)}function f(d){return d===45?(e.consume(d),p):t(d)}function c(d){return d===null?t(d):d===45?(e.consume(d),h):B(d)?(l=c,re(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?J(d):d===45?h(d):c(d)}function m(d){const me="CDATA[";return d===me.charCodeAt(i++)?(e.consume(d),i===me.length?x:m):t(d)}function x(d){return d===null?t(d):d===93?(e.consume(d),k):B(d)?(l=x,re(d)):(e.consume(d),x)}function k(d){return d===93?(e.consume(d),v):x(d)}function v(d){return d===62?J(d):d===93?(e.consume(d),v):x(d)}function S(d){return d===null||d===62?J(d):B(d)?(l=S,re(d)):(e.consume(d),S)}function P(d){return d===null?t(d):d===63?(e.consume(d),M):B(d)?(l=P,re(d)):(e.consume(d),P)}function M(d){return d===62?J(d):P(d)}function U(d){return _e(d)?(e.consume(d),C):t(d)}function C(d){return d===45||ke(d)?(e.consume(d),C):V(d)}function V(d){return B(d)?(l=V,re(d)):Z(d)?(e.consume(d),V):J(d)}function L(d){return d===45||ke(d)?(e.consume(d),L):d===47||d===62||he(d)?$(d):t(d)}function $(d){return d===47?(e.consume(d),J):d===58||d===95||_e(d)?(e.consume(d),y):B(d)?(l=$,re(d)):Z(d)?(e.consume(d),$):J(d)}function y(d){return d===45||d===46||d===58||d===95||ke(d)?(e.consume(d),y):O(d)}function O(d){return d===61?(e.consume(d),F):B(d)?(l=O,re(d)):Z(d)?(e.consume(d),O):$(d)}function F(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),o=d,N):B(d)?(l=F,re(d)):Z(d)?(e.consume(d),F):(e.consume(d),T)}function N(d){return d===o?(e.consume(d),o=void 0,j):d===null?t(d):B(d)?(l=N,re(d)):(e.consume(d),N)}function T(d){return d===null||d===34||d===39||d===60||d===61||d===96?t(d):d===47||d===62||he(d)?$(d):(e.consume(d),T)}function j(d){return d===47||d===62||he(d)?$(d):t(d)}function J(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),n):t(d)}function re(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ge}function ge(d){return Z(d)?K(e,Ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):Ce(d)}function Ce(d){return e.enter("htmlTextData"),l(d)}}const Jn={name:"labelEnd",resolveAll:mu,resolveTo:vu,tokenize:yu},hu={tokenize:xu},du={tokenize:ku},gu={tokenize:bu};function mu(e){let n=-1;const t=[];for(;++n=3&&(u===null||B(u))?(e.exit("thematicBreak"),n(u)):t(u)}function s(u){return u===o?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),Z(u)?K(e,a,"whitespace")(u):a(u))}}const fe={continuation:{tokenize:Au},exit:Mu,name:"list",tokenize:_u},Iu={partial:!0,tokenize:Lu},Du={partial:!0,tokenize:Tu};function _u(e,n,t){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Dn(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(Ht,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return t(p)}function s(p){return Dn(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qt,r.interrupt?t:f,e.attempt(Iu,h,c))}function f(p){return r.containerState.initialBlankLine=!0,i++,h(p)}function c(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):t(p)}function h(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Au(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Qt,o,i);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,K(e,n,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!Z(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Du,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,K(e,e.attempt(fe,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Tu(e,n,t){const r=this;return K(e,o,"listItemIndent",r.containerState.size+1);function o(i){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(i):t(i)}}function Mu(e){e.exit(this.containerState.type)}function Lu(e,n,t){const r=this;return K(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const l=r.events[r.events.length-1];return!Z(i)&&l&&l[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const Lr={name:"setextUnderline",resolveTo:Ou,tokenize:Fu};function Ou(e,n){let t=e.length,r,o,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(o=t)}else e[t][1].type==="content"&&e.splice(t,1),!i&&e[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",l,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function Fu(e,n,t){const r=this;let o;return i;function i(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"),o=u,l(u)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===o?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Z(u)?K(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||B(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const Nu={tokenize:Ru};function Ru(e){const n=this,t=e.attempt(Qt,r,e.attempt(this.parser.constructs.flowInitial,o,K(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Us,o)),"linePrefix")));return t;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ju={resolveAll:Hi()},Bu=Bi("string"),Hu=Bi("text");function Bi(e){return{resolveAll:Hi(e==="text"?Vu:void 0),tokenize:n};function n(t){const r=this,o=this.parser.constructs[e],i=t.attempt(o,l,a);return l;function l(f){return u(f)?i(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),s}function s(f){return u(f)?(t.exit("data"),i(f)):(t.consume(f),s)}function u(f){if(f===null)return!0;const c=o[f];let h=-1;if(c)for(;++h-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}function tc(e,n){let t=-1;const r=[];let o;for(;++t0){const Ee=H.tokenStack[H.tokenStack.length-1];(Ee[1]||Fr).call(H,void 0,Ee[0])}for(D.position={start:He(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:He(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},Q=-1;++Q0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function gc(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function mc(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function vc(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),o=dt(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+o,id:t+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,u),e.applyData(n,u)}function 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 xc(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function qi(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 o=e.all(n),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function kc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return qi(e,n);const o={src:dt(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,i),e.applyData(n,i)}function bc(e,n){const t={src:dt(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 wc(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 qi(e,n);const o={href:dt(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Sc(e,n){const t={href:dt(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 Ec(e,n,t){const r=e.all(n),o=t?zc(t):$i(n),i={},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:[]}),i.className=["task-list-item"]}let a=-1;for(;++a1}function Pc(e,n){const t={},r=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++o0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=Zn(n.children[1]),s=Ei(n.children[n.children.length-1]);a&&s&&(l.position={start:a,end:s}),o.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,i),e.applyData(n,i)}function Tc(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",i=t&&t.type==="table"?t.align:void 0,l=i?i.length:n.children.length;let a=-1;const s=[];for(;++a0,!0),r[0]),o=r.index+r[0].length,r=t.exec(n);return i.push(jr(n.slice(o),o>0,!1)),i.join("")}function jr(e,n,t){let r=0,o=e.length;if(n){let i=e.codePointAt(r);for(;i===Nr||i===Rr;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(o-1);for(;i===Nr||i===Rr;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Oc(e,n){const t={type:"text",value:Lc(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 Nc={blockquote:pc,break:hc,code:dc,delete:gc,emphasis:mc,footnoteReference:vc,heading:yc,html:xc,imageReference:kc,image:bc,inlineCode:wc,linkReference:Cc,link:Sc,listItem:Ec,list:Pc,paragraph:Ic,root:Dc,strong:_c,table:Ac,tableCell:Mc,tableRow:Tc,text:Oc,thematicBreak:Fc,toml:Rt,yaml:Rt,definition:Rt,footnoteDefinition:Rt};function Rt(){}function Rc(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 jc(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Bc(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Rc,r=e.options.footnoteBackLabel||jc,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s0&&m.push({type:"text",value:" "});let S=typeof t=="string"?t:t(s,p);typeof S=="string"&&(S={type:"text",value:S}),m.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const k=f[f.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const S=k.children[k.children.length-1];S&&S.type==="text"?S.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...m)}else f.push(...m);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,v),a.push(v)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Xe(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` `}]}}const An={}.hasOwnProperty,Hc={};function Vc(e,n){const t=n||Hc,r=new Map,o=new Map,i=new Map,l={...Nc,...t.handlers},a={all:u,applyData:qc,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:s,options:t,patch:Uc,wrap:Wc};return Ge(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:o,h=String(f.identifier).toUpperCase();c.has(h)||c.set(h,f)}}),a;function s(f,c){const h=f.type,p=a.handlers[h];if(An.call(a.handlers,h)&&p)return p(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in f){const{children:m,...x}=f,k=Xe(x);return k.children=a.all(f),k}return Xe(f)}return(a.options.unknownHandler||$c)(a,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p0&&t.push({type:"text",value:` `}),t}function Br(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Hr(e,n){const t=Vc(e,n),r=t.one(e,void 0),o=Bc(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:` `},o),i}function Zc(e,n){return e&&"run"in e?async function(t,r){const o=Hr(t,{file:r,...n});await e.run(o,r)}:function(t,r){return Hr(t,{file:r,...e||n})}}function Gc(e){Ge(e,function(n,t,r){if(t!==void 0&&r&&n.type==="paragraph"&&n.children.every(function(o){return o.type==="text"&&/^\s*$/.test(o.value)}))return r.children.splice(t,1),t})}function Yc(e={except:["http","https"]}){return function(n){const t=new Map;Ge(n,"definition",function(r,o,i){if(t.set(r.identifier,r.url),i&&typeof o=="number"){const l=r.url;if(l&&l.includes(":")&&!e.except.some(a=>l.startsWith(`${a}:`)))return i.children.splice(o,1),o}}),Ge(n,function(r,o,i){if(i&&typeof o=="number"&&(r.type==="link"||r.type==="linkReference")){const l=r.type==="link"?r.url:t.get(r.identifier);if(l&&l.includes(":")&&!e.except.some(a=>l.startsWith(`${a}:`)))return i.children.splice(o,1,...r.children),o}}),Gc(n)}}function Vr(e){if(e)throw e}var sn,Ur;function Kc(){if(Ur)return sn;Ur=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(s){return typeof Array.isArray=="function"?Array.isArray(s):n.call(s)==="[object Array]"},i=function(s){if(!s||n.call(s)!=="[object Object]")return!1;var u=e.call(s,"constructor"),f=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!u&&!f)return!1;var c;for(c in s);return typeof c>"u"||e.call(s,c)},l=function(s,u){t&&u.name==="__proto__"?t(s,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):s[u.name]=u.newValue},a=function(s,u){if(u==="__proto__")if(e.call(s,u)){if(r)return r(s,u).value}else return;return s[u]};return sn=function s(){var u,f,c,h,p,m,x=arguments[0],k=1,v=arguments.length,S=!1;for(typeof x=="boolean"&&(S=x,x=arguments[1]||{},k=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});kl.length;let s;a&&l.push(o);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&t)throw f;return o(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(i,o):s instanceof Error?o(s):i(s))}function o(l,...a){t||(t=!0,n(l,...a))}function i(l){o(null,l)}}const ze={basename:ef,dirname:tf,extname:nf,join:rf,sep:"/"};function ef(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');At(e);let t=0,r=-1,o=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){t=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){t=o+1;break}}else l<0&&(i=!0,l=o+1),a>-1&&(e.codePointAt(o)===n.codePointAt(a--)?a<0&&(r=o):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function tf(e){if(At(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 nf(e){At(e);let n=e.length,t=-1,r=0,o=-1,i=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?o<0?o=n:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||t<0||i===0||i===1&&o===t-1&&o===r+1?"":e.slice(o,t)}function rf(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function lf(e,n){let t="",r=0,o=-1,i=0,l=-1,a,s;for(;++l<=e.length;){if(l2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),o=l,i=0;continue}}else if(t.length>0){t="",r=0,o=l,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(o+1,l):t=e.slice(o+1,l),r=l-o-1;o=l,i=0}else a===46&&i>-1?i++:i=-1}return t}function At(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const af={cwd:sf};function sf(){return"/"}function Mn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uf(e){if(typeof e=="string")e=new URL(e);else if(!Mn(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 cf(e)}function cf(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(;++t0){let[p,...m]=f;const x=r[h][1];Tn(x)&&Tn(p)&&(p=un(!0,x,p)),r[h]=[u,p,...m]}}}}const gf=new er().freeze();function hn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function gn(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 $r(e){if(!Tn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Wr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function jt(e){return mf(e)?e:new ff(e)}function mf(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vf(e){return typeof e=="string"||yf(e)}function yf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xf={name:"NcReferenceList",components:{NcReferenceWidget:ql},props:{text:{type:String,default:""},referenceData:{type:Array,default:null},limit:{type:Number,default:1},displayFallback:{type:Boolean,default:!1},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},emits:["loaded"],data(){return{references:null,loading:!0}},computed:{isVisible(){return this.loading||this.displayedReferences.length!==0},values(){return this.referenceData?this.referenceData:this.displayFallback&&!this.loading&&!this.references?[this.fallbackReference]:this.references?Object.values(this.references):[]},firstReference(){return this.values[0]??null},displayedReferences(){return this.values.filter(Boolean).slice(0,this.limit)},fallbackReference(){return{accessible:!0,openGraphObject:{id:this.text,link:this.text,name:this.text},richObjectType:"open-graph"}}},watch:{text:"fetch"},mounted(){this.fetch()},methods:{fetch(){if(this.loading=!0,this.referenceData){this.references=null,this.loading=!1;return}if(!new RegExp(sr).exec(this.text)){this.references=null,this.loading=!1;return}this.resolve().then(e=>{this.references=e.data.ocs.data.references,this.loading=!1,this.$emit("loaded")}).catch(e=>{Re.error("[NcReferenceList] Failed to extract references",{error:e}),this.loading=!1,this.$emit("loaded")})},resolve(){const e=new RegExp(sr).exec(this.text.trim()),n=Eo()===null;return this.limit===1&&e?n?Ft.get(Ot("references/resolvePublic")+`?reference=${encodeURIComponent(e[0])}&sharingToken=${fr()}`):Ft.get(Ot("references/resolve")+`?reference=${encodeURIComponent(e[0])}`):n?Ft.post(Ot("references/extractPublic"),{text:this.text,resolve:!0,limit:this.limit,sharingToken:fr()}):Ft.post(Ot("references/extract"),{text:this.text,resolve:!0,limit:this.limit})}}};function kf(e,n,t,r,o,i){const l=ut("NcReferenceWidget");return i.isVisible?(ne(),we("div",{key:0,class:$e(["widgets--list",{"icon-loading":o.loading}])},[(ne(!0),we(Rn,null,Ro(i.displayedReferences,a=>(ne(),Ze(l,{key:a.openGraphObject?.id,reference:a,interactive:t.interactive,interactiveOptIn:t.interactiveOptIn},null,8,["reference","interactive","interactiveOptIn"]))),128))],2)):De("",!0)}const mn=pt(xf,[["render",kf],["__scopeId","data-v-9cde5a6a"]]);function Zr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,o=t.indexOf(n);for(;o!==-1;)r++,o=t.indexOf(n,o+n.length);return r}const Dt=Jt(/[A-Za-z]/),tr=Jt(/[\dA-Za-z]/);function bf(e){return e!==null&&(e<32||e===127)}function lt(e){return e!==null&&e<-2}function de(e){return e!==null&&(e<0||e===32)}function Oe(e){return e===-2||e===-1||e===32}const Xt=Jt(new RegExp("\\p{P}|\\p{S}","u")),Je=Jt(/\s/);function Jt(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function wf(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const en=(function(e){if(e==null)return zf;if(typeof e=="function")return tn(e);if(typeof e=="object")return Array.isArray(e)?Cf(e):Sf(e);if(typeof e=="string")return Ef(e);throw new Error("Expected function, string, or object as test")});function Cf(e){const n=[];let t=-1;for(;++t":""))+")"})}return h;function h(){let p=Wi,m,x,k;if(i(s,u,f[f.length-1]||void 0)&&(p=Af(t(s,f)),p[0]===Gr))return p;if("children"in s&&s.children){const v=s;if(v.children&&p[0]!==Df)for(x=-1+l,k=f.concat(v);x>-1&&x0?{type:"text",value:M}:void 0),M===!1?c.lastIndex=S+1:(p!==S&&k.push({type:"text",value:s.value.slice(p,S)}),Array.isArray(M)?k.push(...M):M&&k.push(M),p=S+v[0].length,x=!0),!c.global)break;v=c.exec(s.value)}return x?(p?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const o=Zr(e,"(");let i=Zr(e,")");for(;r!==-1&&o>i;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),i++;return[e,t]}function Zi(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Je(t)||Xt(t))&&(!n||t!==47)}function Tt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Gi.peek=np;function Gf(){this.buffer()}function Yf(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Kf(){this.buffer()}function Qf(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Xf(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Tt(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Jf(e){this.exit(e)}function ep(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Tt(this.sliceSerialize(e)).toLowerCase(),t.label=n}function tp(e){this.exit(e)}function np(){return"["}function Gi(e,n,t,r){const o=t.createTracker(r);let i=o.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return i+=o.move(t.safe(t.associationId(e),{after:"]",before:i})),a(),l(),i+=o.move("]"),i}function rp(){return{enter:{gfmFootnoteCallString:Gf,gfmFootnoteCall:Yf,gfmFootnoteDefinitionLabelString:Kf,gfmFootnoteDefinition:Qf},exit:{gfmFootnoteCallString:Xf,gfmFootnoteCall:Jf,gfmFootnoteDefinitionLabelString:ep,gfmFootnoteDefinition:tp}}}function ip(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Gi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,o,i,l){const a=i.createTracker(l);let s=a.move("[^");const u=i.enter("footnoteDefinition"),f=i.enter("label");return s+=a.move(i.safe(i.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((n?` `:" ")+i.indentLines(i.containerFlow(r,a.current()),n?Yi:op))),u(),s}}function op(e,n,t){return n===0?e:Yi(e,n,t)}function Yi(e,n,t){return(t?"":" ")+e}const lp=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ki.peek=fp;function ap(){return{canContainEols:["delete"],enter:{strikethrough:up},exit:{strikethrough:cp}}}function sp(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lp}],handlers:{delete:Ki}}}function up(e){this.enter({type:"delete",children:[]},e)}function cp(e){this.exit(e)}function Ki(e,n,t,r){const o=t.createTracker(r),i=t.enter("strikethrough");let l=o.move("~~");return l+=t.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function fp(){return"~"}function pp(e){return e.length}function hp(e,n){const t=n||{},r=(t.align||[]).concat(),o=t.stringLength||pp,i=[],l=[],a=[],s=[];let u=0,f=-1;for(;++fu&&(u=e[f].length);++vs[v])&&(s[v]=P)}x.push(S)}l[f]=x,a[f]=k}let c=-1;if(typeof r=="object"&&"length"in r)for(;++cs[c]&&(s[c]=S),p[c]=S),h[c]=P}l.splice(1,0,h),a.splice(1,0,p),f=-1;const m=[];for(;++f "),i.shift(2);const l=t.indentLines(t.containerFlow(e,i.current()),mp);return o(),l}function mp(e,n,t){return">"+(t?"":" ")+e}function vp(e,n){return Kr(e,n.inConstruct,!0)&&!Kr(e,n.notInConstruct,!1)}function Kr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++rl&&(l=i):i=1,o=r+n.length,r=t.indexOf(n,o);return l}function xp(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 kp(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 bp(e,n,t,r){const o=kp(t),i=e.value||"",l=o==="`"?"GraveAccent":"Tilde";if(xp(e,t)){const c=t.enter("codeIndented"),h=t.indentLines(i,wp);return c(),h}const a=t.createTracker(r),s=o.repeat(Math.max(yp(i,o)+1,3)),u=t.enter("codeFenced");let f=a.move(s);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(t.safe(e.meta,{before:f,after:` `,encode:["`"],...a.current()})),c()}return f+=a.move(` `),i&&(f+=a.move(i+` `)),f+=a.move(s),u(),f}function wp(e,n,t){return(t?"":" ")+e}function nr(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 Cp(e,n,t,r){const o=nr(t),i=o==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("[");return u+=s.move(t.safe(t.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":` `,...s.current()}))),a(),e.title&&(a=t.enter(`title${i}`),u+=s.move(" "+o),u+=s.move(t.safe(e.title,{before:u,after:o,...s.current()})),u+=s.move(o),a()),l(),u}function Sp(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 _t(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Wt(e){if(e===null||de(e)||Je(e))return 1;if(Xt(e))return 2}function Zt(e,n,t){const r=Wt(e),o=Wt(n);return r===void 0?o===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Qi.peek=Ep;function Qi(e,n,t,r){const o=Sp(t),i=t.enter("emphasis"),l=t.createTracker(r),a=l.move(o);let s=l.move(t.containerPhrasing(e,{after:o,before:a,...l.current()}));const u=s.charCodeAt(0),f=Zt(r.before.charCodeAt(r.before.length-1),u,o);f.inside&&(s=_t(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=Zt(r.after.charCodeAt(0),c,o);h.inside&&(s=s.slice(0,-1)+_t(c));const p=l.move(o);return i(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Ep(e,n,t){return t.options.emphasis||"*"}const zp={};function Xi(e,n){const t=zp,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,o=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ji(e,r,o)}function Ji(e,n,t){if(Pp(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 Xr(e.children,n,t)}return Array.isArray(e)?Xr(e,n,t):""}function Xr(e,n,t){const r=[];let o=-1;for(;++o",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=t.enter(`title${i}`),u+=s.move(" "+o),u+=s.move(t.safe(e.title,{before:u,after:o,...s.current()})),u+=s.move(o),a()),u+=s.move(")"),l(),u}function Ap(){return"!"}no.peek=Tp;function no(e,n,t,r){const o=e.referenceType,i=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("![");const u=t.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,i(),o==="full"||!u||u!==c?s+=a.move(c+"]"):o==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Tp(){return"!"}ro.peek=Mp;function ro(e,n,t){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i\u007F]/.test(e.url))}oo.peek=Lp;function oo(e,n,t,r){const o=nr(t),i=o==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,s;if(io(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),t.stack=f,c}a=t.enter("link"),s=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(t.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),u+=l.move(")"),a(),u}function Lp(e,n,t){return io(e,t)?"<":"["}lo.peek=Op;function lo(e,n,t,r){const o=e.referenceType,i=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("[");const u=t.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,i(),o==="full"||!u||u!==c?s+=a.move(c+"]"):o==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Op(){return"["}function rr(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 Fp(e){const n=rr(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 Np(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 ao(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 Rp(e,n,t,r){const o=t.enter("list"),i=t.bulletCurrent;let l=e.ordered?Np(t):rr(t);const a=e.ordered?l==="."?")":".":Fp(t);let s=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(s=!0),ao(t)===l&&f){let c=-1;for(;++c-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+i);let l=i.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(i+" ".repeat(l-i.length)),a.shift(l);const s=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),f);return s(),u;function f(c,h,p){return h?(p?"":" ".repeat(l))+c:(p?i:i+" ".repeat(l-i.length))+c}}function Hp(e,n,t,r){const o=t.enter("paragraph"),i=t.enter("phrasing"),l=t.containerPhrasing(e,r);return i(),o(),l}const Vp=en(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Up(e,n,t,r){return(e.children.some(function(o){return Vp(o)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function qp(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}so.peek=$p;function so(e,n,t,r){const o=qp(t),i=t.enter("strong"),l=t.createTracker(r),a=l.move(o+o);let s=l.move(t.containerPhrasing(e,{after:o,before:a,...l.current()}));const u=s.charCodeAt(0),f=Zt(r.before.charCodeAt(r.before.length-1),u,o);f.inside&&(s=_t(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=Zt(r.after.charCodeAt(0),c,o);h.inside&&(s=s.slice(0,-1)+_t(c));const p=l.move(o+o);return i(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function $p(e,n,t){return t.options.strong||"*"}function Wp(e,n,t,r){return t.safe(e.value,r)}function Zp(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 Gp(e,n,t){const r=(ao(t)+(t.options.ruleSpaces?" ":"")).repeat(Zp(t));return t.options.ruleSpaces?r.slice(0,-1):r}const uo={blockquote:gp,break:Qr,code:bp,definition:Cp,emphasis:Qi,hardBreak:Qr,heading:Dp,html:eo,image:to,imageReference:no,inlineCode:ro,link:oo,linkReference:lo,list:Rp,listItem:Bp,paragraph:Hp,root:Up,strong:so,text:Wp,thematicBreak:Gp};function Yp(){return{enter:{table:Kp,tableData:Jr,tableHeader:Jr,tableRow:Xp},exit:{codeText:Jp,table:Qp,tableData:kn,tableHeader:kn,tableRow:kn}}}function Kp(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 Qp(e){this.exit(e),this.data.inTable=void 0}function Xp(e){this.enter({type:"tableRow",children:[]},e)}function kn(e){this.exit(e)}function Jr(e){this.enter({type:"tableCell",children:[]},e)}function Jp(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,eh));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function eh(e,n){return n==="|"?n:e}function th(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,o=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:l,tableCell:s,tableRow:a}};function l(p,m,x,k){return u(f(p,x,k),p.align)}function a(p,m,x,k){const v=c(p,x,k),S=u([v]);return S.slice(0,S.indexOf(` `))}function s(p,m,x,k){const v=x.enter("tableCell"),S=x.enter("phrasing"),P=x.containerPhrasing(p,{...k,before:i,after:i});return S(),v(),P}function u(p,m){return hp(p,{align:m,alignDelimiters:r,padding:t,stringLength:o})}function f(p,m,x){const k=p.children;let v=-1;const S=[],P=m.enter("table");for(;++vo?0:o+n:n=n>o?o: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);i0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function wh(e,n,t){const r=[];let o=-1;for(;++o999||c===93&&!l||c===null||c===91||de(c))return t(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Tt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return de(c)||(l=!0),i++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),i++,u):u(c)}}function _h(e,n,t){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0,a;return s;function s(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&&!a||m===null||m===91||de(m))return t(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return i=Tt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return de(m)||(a=!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 h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(i)||o.push(i),Fe(e,p,"gfmFootnoteDefinitionWhitespace")):t(m)}function p(m){return n(m)}}function Ah(e,n,t){return e.check(Ch,n,e.attempt(Eh,n,t))}function Th(e){e.exit("gfmFootnoteDefinition")}function Mh(e,n,t){const r=this;return Fe(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(i):t(i)}}function Lh(e){let n=(e||{}).singleTilde;const t={name:"strikethrough",tokenize:o,resolveAll:r};return n==null&&(n=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function r(i,l){let a=-1;for(;++a1?a(p):(i.consume(p),f++,h);if(f<2&&!n)return a(p);const x=i.exit("strikethroughSequenceTemporary"),k=Wt(p);return x._open=!k||k===2&&!!m,x._close=!m||m===2&&!!k,l(p)}}}class Oh{constructor(){this.map=[]}add(n,t,r){Fh(this,n,t,r)}consume(n){if(this.map.sort(function(i,l){return i[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 o=r.pop();for(;o;){for(const i of o)n.push(i);o=r.pop()}this.map.length=0}}function Fh(e,n,t,r){let o=0;if(!(t===0&&r.length===0)){for(;o-1;){const T=r.events[O][1].type;if(T==="lineEnding"||T==="linePrefix")O--;else break}const F=O>-1?r.events[O][1].type:null,N=F==="tableHead"||F==="tableRow"?C:s;return N===C&&r.parser.lazy[r.now().line]?t(y):N(y)}function s(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,i+=1),f(y)}function f(y){return y===null?t(y):lt(y)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):t(y):Oe(y)?Fe(e,f,"whitespace")(y):(i+=1,l&&(l=!1,o+=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||de(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?h:c)}function h(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,Oe(y)?Fe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):m(y))}function m(y){return y===45||y===58?k(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),x):U(y)}function x(y){return Oe(y)?Fe(e,k,"whitespace")(y):k(y)}function k(y){return y===58?(i+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),v):y===45?(i+=1,v(y)):y===null||lt(y)?M(y):U(y)}function v(y){return y===45?(e.enter("tableDelimiterFiller"),S(y)):U(y)}function S(y){return y===45?(e.consume(y),S):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),P):(e.exit("tableDelimiterFiller"),P(y))}function P(y){return Oe(y)?Fe(e,M,"whitespace")(y):M(y)}function M(y){return y===124?m(y):y===null||lt(y)?!l||o!==i?U(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(y)):U(y)}function U(y){return t(y)}function C(y){return e.enter("tableRow"),V(y)}function V(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),V):y===null||lt(y)?(e.exit("tableRow"),n(y)):Oe(y)?Fe(e,V,"whitespace")(y):(e.enter("data"),L(y))}function L(y){return y===null||y===124||de(y)?(e.exit("data"),V(y)):(e.consume(y),y===92?$:L)}function $(y){return y===92||y===124?(e.consume(y),L):L(y)}}function Bh(e,n){let t=-1,r=!0,o=0,i=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const h=new Oh;for(;++tt[2]+1){const m=t[2]+1,x=t[3]-t[2]-1;e.add(m,x,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return o!==void 0&&(i.end=Object.assign({},ot(n.events,o)),e.add(o,0,[["exit",i,n]]),i=void 0),i}function ii(e,n,t,r,o){const i=[],l=ot(n.events,t);o&&(o.end=Object.assign({},l),i.push(["exit",o,n])),r.end=Object.assign({},l),i.push(["exit",r,n]),e.add(t+1,0,i)}function ot(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Hh={name:"tasklistCheck",tokenize:Uh};function Vh(){return{text:{91:Hh}}}function Uh(e,n,t){const r=this;return o;function o(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),i)}function i(s){return de(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):t(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(s)}function a(s){return lt(s)?n(s):Oe(s)?e.check({tokenize:qh},n,t)(s):t(s)}}function qh(e,n,t){return Fe(e,r,"whitespace");function r(o){return o===null?t(o):n(o)}}function $h(e){return sh([hh(),zh(),Lh(e),Rh(),Vh()])}const Wh={};function Zh(e){const n=this,t=e||Wh,r=n.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push($h(t)),i.push(lh()),l.push(ah(t))}const Gh=Yt({__name:"NcRichTextCopyButton",props:{contentId:{}},setup(e){const{copy:n,icon:t,altText:r}=_l(()=>document.getElementById(e.contentId).textContent);return(o,i)=>(ne(),Ze(Pt,{variant:"tertiary",size:"small","aria-label":se(r),title:se(r),onClick:se(n)},{icon:Ne(()=>[We(jn,{path:se(t),inline:""},null,8,["path"])]),_:1},8,["aria-label","title","onClick"]))}});function Yh(e){return e.type==="text"}const Kh=function(e){Ge(e,Yh,n);function n(t,r,o){const i=t.value.split(/(\{[a-z\-_.0-9]+\})/ig).map(l=>{const a=l.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!a)return ur("text",l);const[,s]=a;return ur("element",{tagName:`#${s}`,children:[]})});o.children.splice(r,1,...i)}},Qh=()=>Kh;function Xh(e){return["text","code","inlineCode"].includes(e.type)}const Jh=function(){return function(e){Ge(e,Xh,(n,t,r)=>(r.children.splice(t,1,{...n,value:n.value.replace(/</gmi,"<").replace(/>/gmi,">")}),[al,t+1]))}},ed=["http","https","mailto","tel"],On=xe(null);async function td(){const e=await Po(()=>import("./index-9Li44d4f.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]),import.meta.url);On.value=e.default}const nd={name:"NcRichText",components:{NcReferenceList:mn},props:{text:{type:String,default:""},arguments:{type:Object,default:()=>({})},referenceLimit:{type:Number,default:0},referenceInteractive:{type:Boolean,default:!0},referenceInteractiveOptIn:{type:Boolean,default:!1},references:{type:Array,default:null},useMarkdown:{type:Boolean,default:!1},useExtendedMarkdown:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1},autolink:{type:Boolean,default:!0}},emits:["interactTodo"],data(){return{parentId:nn()}},methods:{renderPlaintext(){const e=this.text.split(/(\{[a-z\-_.0-9]+\})/ig).map(n=>{const t=n.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!t)return this.prepareTextNode(n);const r=t[1],o=this.arguments[r];if(typeof o=="object"){const{component:i,props:l}=o;return ee(typeof i=="string"?ut(i):i,{...l,class:"rich-text--component"})}return o?ee("span",{class:"rich-text--fallback"},o):n});return ee("div",{class:"rich-text--wrapper"},[ee("div",{},e.flat()),this.referenceLimit>0?ee("div",{class:"rich-text--reference-widget"},[ee(mn,{text:this.text,referenceData:this.references,interactive:this.referenceInteractive,interactiveOptIn:this.referenceInteractiveOptIn})]):null])},renderMarkdown(){const e=gf().use(fc).use(ol,{autolink:this.autolink,useMarkdown:this.useMarkdown,useExtendedMarkdown:this.useExtendedMarkdown}).use(Jh).use(this.useExtendedMarkdown?Zh:void 0).use(os).use(Yc,{except:ed}).use(Zc,{handlers:{component(n,t){return n(t,t.component,{value:t.value})}}}).use(this.useExtendedMarkdown?On.value:void 0).use(Qh).use(aa,{target:"_blank",rel:["noopener noreferrer"]}).use(Qa,{Fragment:Rn,jsx:this.createElement,jsxs:this.createElement,elementAttributeNameCase:"html",prefix:!1}).processSync(this.text.replace(/<[^>]+>/g,n=>n.replace(/")).result;return ee("div",{class:"rich-text--wrapper rich-text--wrapper-markdown"},[e,this.referenceLimit>0?ee("div",{class:"rich-text--reference-widget"},[ee(mn,{text:this.text,referenceData:this.references,interactive:this.referenceInteractive,interactiveOptIn:this.referenceInteractiveOptIn})]):null])},prepareTextNode(e){return this.autolink&&(e=il(e)),Array.isArray(e)?e.map(n=>{if(typeof n=="string")return n;const{component:t,props:r}=n,o=t.name==="NcLink"?void 0:"rich-text--component";return ee(t,{...r,class:o})}):e},createElement(e,n,t){t&&(n.key=t);const r=n.children??[];if(delete n.children,!String(e).startsWith("#")){["h1","h2","h3","h4","h5","h6"].includes(String(e))&&(e=`h${Math.min(+String(e)[1]+3,6)}`);let i=null;if(this.useExtendedMarkdown){if(String(e)==="code"&&!On.value&&n?.class?.includes("language")&&td(),String(e)==="pre"&&r&&String(r.type)==="code"){const l=this.parentId+"-code-block-"+nn();return ee("p",{class:"rich-text__code-block"},[ee(e,{...n,id:l},r),ee(Gh,{class:"rich-text__code-block-button",contentId:l})])}if(String(e)==="li"&&Array.isArray(r)&&r.length!==0&&r[0].type==="input"&&r[0].props.type==="checkbox"){const[l,,...a]=r,s=a.findIndex(h=>["ul","ol","li","blockquote","pre"].includes(h.type));s!==-1&&(i=a[s],a.splice(s));const u=this.parentId+"-markdown-input-"+nn(),f={...l.props};delete f.checked;const c=ee(tl,{...f,modelValue:l.props.checked,id:u,disabled:!this.interactive,"onUpdate:modelValue":()=>{this.$emit("interactTodo",u)}},{default:()=>a});return ee(e,n,[c,i])}}if(String(e)==="a"){const l=fi(this.$router,n.href);if(l)return delete n.href,delete n.target,ee(ci,{...n,to:l},{default:()=>r})}return ee(e,n,r)}const o=this.arguments[e.slice(1)];return o?o.component?ee(typeof o.component=="string"?ut(o.component):o.component,{...n,...o.props,class:"rich-text--component"},{default:()=>r}):ee("span",{...n},[o]):ee("span",{...n,class:"rich-text--fallback"},[`{${e.slice(1)}}`])}},render(){return this.useMarkdown||this.useExtendedMarkdown?this.renderMarkdown():this.renderPlaintext()}},xd=pt(nd,[["__scopeId","data-v-a47e4ba7"]]);export{vd as N,xd as a,yd as b,vi as c}; //# sourceMappingURL=NcRichText-DJlaHs_Q-tqMkpCtc.chunk.mjs.map