diff --git a/dist/assets/Button-BgP1U8Po.js b/dist/assets/Button-BCQM6xXJ.js similarity index 80% rename from dist/assets/Button-BgP1U8Po.js rename to dist/assets/Button-BCQM6xXJ.js index 1deacc5..fb96df3 100644 --- a/dist/assets/Button-BgP1U8Po.js +++ b/dist/assets/Button-BCQM6xXJ.js @@ -1 +1 @@ -import{d as l,c as n,q as c,b as i,O as r,o}from"./index-BuR1WXAD.js";const u=["type","disabled"],f={key:0,class:"btn__spinner"},b=l({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"button"}},setup(e){return(t,a)=>(o(),n("button",{type:e.type,disabled:e.disabled||e.loading,class:c(["btn",`btn--${e.variant}`,`btn--${e.size}`])},[e.loading?(o(),n("span",f)):i("",!0),r(t.$slots,"default",{},void 0)],10,u))}}),m=(e,t)=>{const a=e.__vccOpts||e;for(const[s,d]of t)a[s]=d;return a},y=m(b,[["__scopeId","data-v-a1ef9cca"]]);export{y as B,m as _}; +import{d as l,c as n,q as c,b as i,Q as r,o}from"./index-Bwmlaq-e.js";const u=["type","disabled"],f={key:0,class:"btn__spinner"},b=l({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"button"}},setup(e){return(t,a)=>(o(),n("button",{type:e.type,disabled:e.disabled||e.loading,class:c(["btn",`btn--${e.variant}`,`btn--${e.size}`])},[e.loading?(o(),n("span",f)):i("",!0),r(t.$slots,"default",{},void 0)],10,u))}}),m=(e,t)=>{const a=e.__vccOpts||e;for(const[s,d]of t)a[s]=d;return a},y=m(b,[["__scopeId","data-v-a1ef9cca"]]);export{y as B,m as _}; diff --git a/dist/assets/Button-D-QrZfPJ.js b/dist/assets/Button-D-QrZfPJ.js deleted file mode 100644 index c65dc89..0000000 --- a/dist/assets/Button-D-QrZfPJ.js +++ /dev/null @@ -1 +0,0 @@ -import{d as l,c as n,q as c,b as i,Q as r,o}from"./index-D2fAAQJ2.js";const u=["type","disabled"],f={key:0,class:"btn__spinner"},b=l({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{default:"button"}},setup(e){return(t,a)=>(o(),n("button",{type:e.type,disabled:e.disabled||e.loading,class:c(["btn",`btn--${e.variant}`,`btn--${e.size}`])},[e.loading?(o(),n("span",f)):i("",!0),r(t.$slots,"default",{},void 0)],10,u))}}),m=(e,t)=>{const a=e.__vccOpts||e;for(const[s,d]of t)a[s]=d;return a},y=m(b,[["__scopeId","data-v-a1ef9cca"]]);export{y as B,m as _}; diff --git a/dist/assets/Dashboard-CHRmhfNp.js b/dist/assets/Dashboard-CHRmhfNp.js deleted file mode 100644 index 21448ca..0000000 --- a/dist/assets/Dashboard-CHRmhfNp.js +++ /dev/null @@ -1 +0,0 @@ -import{d as b,k as x,c as a,a as t,t as u,l as c,f as p,g as i,F as P,m as B,r as f,o as n,h as m,e as y,v as g,w as N,j as D,b as M}from"./index-D2fAAQJ2.js";import{u as V}from"./projects-CWhQXAJL.js";import{B as _,_ as S}from"./Button-D-QrZfPJ.js";import{M as $}from"./Modal-C7dh6Uqe.js";const F={class:"dashboard"},U={class:"dashboard__header"},z={class:"dashboard__subtitle"},L={key:0,class:"dashboard__loading"},H={key:1,class:"dashboard__empty"},R={key:2,class:"dashboard__grid"},T=["onClick"],E={class:"project-card__content"},I={class:"project-card__name"},Y={key:0,class:"project-card__desc"},q={class:"project-card__date"},A={class:"form__field"},G={class:"form__field"},J=b({__name:"Dashboard",setup(K){const k=D(),s=V(),l=f(!1),d=f(""),v=f(""),j=f(!1);x(async()=>{await s.fetchProjects()});function h(r){k.push(`/projects/${r}`)}async function w(){if(d.value.trim()){j.value=!0;try{const r=await s.createProject(d.value.trim(),v.value.trim());l.value=!1,d.value="",v.value="",h(r.id)}catch(r){console.error("Failed to create project:",r)}finally{j.value=!1}}}function C(r){return new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}return(r,e)=>(n(),a("div",F,[t("div",U,[t("div",null,[e[6]||(e[6]=t("h1",{class:"dashboard__title"},"Your Projects",-1)),t("p",z,u(c(s).projects.length)+" project"+u(c(s).projects.length!==1?"s":""),1)]),p(_,{variant:"primary",onClick:e[0]||(e[0]=o=>l.value=!0)},{default:i(()=>[...e[7]||(e[7]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),t("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1),m(" New Project ",-1)])]),_:1})]),c(s).loading?(n(),a("div",L,[...e[8]||(e[8]=[t("div",{class:"dashboard__spinner"},null,-1),t("p",null,"Loading projects...",-1)])])):c(s).projects.length===0?(n(),a("div",H,[e[10]||(e[10]=t("svg",{width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1)),e[11]||(e[11]=t("h2",null,"No projects yet",-1)),e[12]||(e[12]=t("p",null,"Create your first project to start organizing your documents",-1)),p(_,{variant:"primary",onClick:e[1]||(e[1]=o=>l.value=!0)},{default:i(()=>[...e[9]||(e[9]=[m(" Create First Project ",-1)])]),_:1})])):(n(),a("div",R,[(n(!0),a(P,null,B(c(s).projects,o=>(n(),a("article",{key:o.id,class:"project-card",onClick:O=>h(o.id)},[e[13]||(e[13]=t("div",{class:"project-card__icon"},[t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})])],-1)),t("div",E,[t("h3",I,u(o.name),1),o.description?(n(),a("p",Y,u(o.description),1)):M("",!0),t("p",q," Updated "+u(C(o.updated_at)),1)]),e[14]||(e[14]=t("svg",{class:"project-card__arrow",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m9 18 6-6-6-6"})],-1))],8,T))),128))])),p($,{show:l.value,title:"Create New Project",onClose:e[5]||(e[5]=o=>l.value=!1)},{footer:i(()=>[p(_,{variant:"secondary",onClick:e[4]||(e[4]=o=>l.value=!1)},{default:i(()=>[...e[17]||(e[17]=[m("Cancel",-1)])]),_:1}),p(_,{variant:"primary",loading:j.value,onClick:w},{default:i(()=>[...e[18]||(e[18]=[m("Create Project",-1)])]),_:1},8,["loading"])]),default:i(()=>[t("form",{onSubmit:N(w,["prevent"])},[t("div",A,[e[15]||(e[15]=t("label",{for:"project-name",class:"form__label"},"Project Name",-1)),y(t("input",{id:"project-name","onUpdate:modelValue":e[2]||(e[2]=o=>d.value=o),type:"text",class:"form__input",placeholder:"My Research Project",autofocus:""},null,512),[[g,d.value]])]),t("div",G,[e[16]||(e[16]=t("label",{for:"project-desc",class:"form__label"},"Description (optional)",-1)),y(t("textarea",{id:"project-desc","onUpdate:modelValue":e[3]||(e[3]=o=>v.value=o),class:"form__textarea",placeholder:"Brief description of your project...",rows:"3"},null,512),[[g,v.value]])])],32)]),_:1},8,["show"])]))}}),ee=S(J,[["__scopeId","data-v-a5d62dba"]]);export{ee as default}; diff --git a/dist/assets/Dashboard-BkdRGXZA.js b/dist/assets/Dashboard-DhaHJ2Mj.js similarity index 95% rename from dist/assets/Dashboard-BkdRGXZA.js rename to dist/assets/Dashboard-DhaHJ2Mj.js index 96f24c0..90694ff 100644 --- a/dist/assets/Dashboard-BkdRGXZA.js +++ b/dist/assets/Dashboard-DhaHJ2Mj.js @@ -1 +1 @@ -import{d as b,k as x,c as a,a as t,t as u,l as c,f as p,g as i,F as P,m as B,r as f,o as n,h as m,e as y,v as g,w as N,j as D,b as M}from"./index-BuR1WXAD.js";import{u as V}from"./projects-BPkECm1G.js";import{B as _,_ as S}from"./Button-BgP1U8Po.js";import{M as $}from"./Modal-WC6XeOBi.js";const F={class:"dashboard"},U={class:"dashboard__header"},z={class:"dashboard__subtitle"},L={key:0,class:"dashboard__loading"},H={key:1,class:"dashboard__empty"},R={key:2,class:"dashboard__grid"},T=["onClick"],E={class:"project-card__content"},I={class:"project-card__name"},Y={key:0,class:"project-card__desc"},q={class:"project-card__date"},A={class:"form__field"},G={class:"form__field"},J=b({__name:"Dashboard",setup(K){const k=D(),s=V(),l=f(!1),d=f(""),v=f(""),j=f(!1);x(async()=>{await s.fetchProjects()});function h(r){k.push(`/projects/${r}`)}async function w(){if(d.value.trim()){j.value=!0;try{const r=await s.createProject(d.value.trim(),v.value.trim());l.value=!1,d.value="",v.value="",h(r.id)}catch(r){console.error("Failed to create project:",r)}finally{j.value=!1}}}function C(r){return new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}return(r,e)=>(n(),a("div",F,[t("div",U,[t("div",null,[e[6]||(e[6]=t("h1",{class:"dashboard__title"},"Your Projects",-1)),t("p",z,u(c(s).projects.length)+" project"+u(c(s).projects.length!==1?"s":""),1)]),p(_,{variant:"primary",onClick:e[0]||(e[0]=o=>l.value=!0)},{default:i(()=>[...e[7]||(e[7]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),t("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1),m(" New Project ",-1)])]),_:1})]),c(s).loading?(n(),a("div",L,[...e[8]||(e[8]=[t("div",{class:"dashboard__spinner"},null,-1),t("p",null,"Loading projects...",-1)])])):c(s).projects.length===0?(n(),a("div",H,[e[10]||(e[10]=t("svg",{width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1)),e[11]||(e[11]=t("h2",null,"No projects yet",-1)),e[12]||(e[12]=t("p",null,"Create your first project to start organizing your documents",-1)),p(_,{variant:"primary",onClick:e[1]||(e[1]=o=>l.value=!0)},{default:i(()=>[...e[9]||(e[9]=[m(" Create First Project ",-1)])]),_:1})])):(n(),a("div",R,[(n(!0),a(P,null,B(c(s).projects,o=>(n(),a("article",{key:o.id,class:"project-card",onClick:O=>h(o.id)},[e[13]||(e[13]=t("div",{class:"project-card__icon"},[t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})])],-1)),t("div",E,[t("h3",I,u(o.name),1),o.description?(n(),a("p",Y,u(o.description),1)):M("",!0),t("p",q," Updated "+u(C(o.updated_at)),1)]),e[14]||(e[14]=t("svg",{class:"project-card__arrow",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m9 18 6-6-6-6"})],-1))],8,T))),128))])),p($,{show:l.value,title:"Create New Project",onClose:e[5]||(e[5]=o=>l.value=!1)},{footer:i(()=>[p(_,{variant:"secondary",onClick:e[4]||(e[4]=o=>l.value=!1)},{default:i(()=>[...e[17]||(e[17]=[m("Cancel",-1)])]),_:1}),p(_,{variant:"primary",loading:j.value,onClick:w},{default:i(()=>[...e[18]||(e[18]=[m("Create Project",-1)])]),_:1},8,["loading"])]),default:i(()=>[t("form",{onSubmit:N(w,["prevent"])},[t("div",A,[e[15]||(e[15]=t("label",{for:"project-name",class:"form__label"},"Project Name",-1)),y(t("input",{id:"project-name","onUpdate:modelValue":e[2]||(e[2]=o=>d.value=o),type:"text",class:"form__input",placeholder:"My Research Project",autofocus:""},null,512),[[g,d.value]])]),t("div",G,[e[16]||(e[16]=t("label",{for:"project-desc",class:"form__label"},"Description (optional)",-1)),y(t("textarea",{id:"project-desc","onUpdate:modelValue":e[3]||(e[3]=o=>v.value=o),class:"form__textarea",placeholder:"Brief description of your project...",rows:"3"},null,512),[[g,v.value]])])],32)]),_:1},8,["show"])]))}}),ee=S(J,[["__scopeId","data-v-a5d62dba"]]);export{ee as default}; +import{d as b,k as x,c as a,a as t,t as u,l as c,f as p,g as i,F as P,m as B,r as f,o as n,h as m,e as y,v as g,w as N,j as D,b as M}from"./index-Bwmlaq-e.js";import{u as V}from"./projects-DaKKWK6n.js";import{B as _,_ as S}from"./Button-BCQM6xXJ.js";import{M as $}from"./Modal-DyPCz1pc.js";const F={class:"dashboard"},U={class:"dashboard__header"},z={class:"dashboard__subtitle"},L={key:0,class:"dashboard__loading"},H={key:1,class:"dashboard__empty"},R={key:2,class:"dashboard__grid"},T=["onClick"],E={class:"project-card__content"},I={class:"project-card__name"},Y={key:0,class:"project-card__desc"},q={class:"project-card__date"},A={class:"form__field"},G={class:"form__field"},J=b({__name:"Dashboard",setup(K){const k=D(),s=V(),l=f(!1),d=f(""),v=f(""),j=f(!1);x(async()=>{await s.fetchProjects()});function h(r){k.push(`/projects/${r}`)}async function w(){if(d.value.trim()){j.value=!0;try{const r=await s.createProject(d.value.trim(),v.value.trim());l.value=!1,d.value="",v.value="",h(r.id)}catch(r){console.error("Failed to create project:",r)}finally{j.value=!1}}}function C(r){return new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}return(r,e)=>(n(),a("div",F,[t("div",U,[t("div",null,[e[6]||(e[6]=t("h1",{class:"dashboard__title"},"Your Projects",-1)),t("p",z,u(c(s).projects.length)+" project"+u(c(s).projects.length!==1?"s":""),1)]),p(_,{variant:"primary",onClick:e[0]||(e[0]=o=>l.value=!0)},{default:i(()=>[...e[7]||(e[7]=[t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),t("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1),m(" New Project ",-1)])]),_:1})]),c(s).loading?(n(),a("div",L,[...e[8]||(e[8]=[t("div",{class:"dashboard__spinner"},null,-1),t("p",null,"Loading projects...",-1)])])):c(s).projects.length===0?(n(),a("div",H,[e[10]||(e[10]=t("svg",{width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[t("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1)),e[11]||(e[11]=t("h2",null,"No projects yet",-1)),e[12]||(e[12]=t("p",null,"Create your first project to start organizing your documents",-1)),p(_,{variant:"primary",onClick:e[1]||(e[1]=o=>l.value=!0)},{default:i(()=>[...e[9]||(e[9]=[m(" Create First Project ",-1)])]),_:1})])):(n(),a("div",R,[(n(!0),a(P,null,B(c(s).projects,o=>(n(),a("article",{key:o.id,class:"project-card",onClick:O=>h(o.id)},[e[13]||(e[13]=t("div",{class:"project-card__icon"},[t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})])],-1)),t("div",E,[t("h3",I,u(o.name),1),o.description?(n(),a("p",Y,u(o.description),1)):M("",!0),t("p",q," Updated "+u(C(o.updated_at)),1)]),e[14]||(e[14]=t("svg",{class:"project-card__arrow",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"m9 18 6-6-6-6"})],-1))],8,T))),128))])),p($,{show:l.value,title:"Create New Project",onClose:e[5]||(e[5]=o=>l.value=!1)},{footer:i(()=>[p(_,{variant:"secondary",onClick:e[4]||(e[4]=o=>l.value=!1)},{default:i(()=>[...e[17]||(e[17]=[m("Cancel",-1)])]),_:1}),p(_,{variant:"primary",loading:j.value,onClick:w},{default:i(()=>[...e[18]||(e[18]=[m("Create Project",-1)])]),_:1},8,["loading"])]),default:i(()=>[t("form",{onSubmit:N(w,["prevent"])},[t("div",A,[e[15]||(e[15]=t("label",{for:"project-name",class:"form__label"},"Project Name",-1)),y(t("input",{id:"project-name","onUpdate:modelValue":e[2]||(e[2]=o=>d.value=o),type:"text",class:"form__input",placeholder:"My Research Project",autofocus:""},null,512),[[g,d.value]])]),t("div",G,[e[16]||(e[16]=t("label",{for:"project-desc",class:"form__label"},"Description (optional)",-1)),y(t("textarea",{id:"project-desc","onUpdate:modelValue":e[3]||(e[3]=o=>v.value=o),class:"form__textarea",placeholder:"Brief description of your project...",rows:"3"},null,512),[[g,v.value]])])],32)]),_:1},8,["show"])]))}}),ee=S(J,[["__scopeId","data-v-a5d62dba"]]);export{ee as default}; diff --git a/dist/assets/DocumentView-C0vMZPv-.js b/dist/assets/DocumentView-C0vMZPv-.js deleted file mode 100644 index 871cbe8..0000000 --- a/dist/assets/DocumentView-C0vMZPv-.js +++ /dev/null @@ -1,147 +0,0 @@ -import{k as Jl,A as mo,d as $i,B as lf,C as cf,r as Be,D as df,E as uf,G as ff,H as pf,l as Y,I as hf,n as Ur,c as Z,a as O,q as Ge,b as $e,f as ht,o as q,J as mf,g as mt,F as Hr,m as Kr,t as ft,K as Vr,s as Bs,w as gf,e as Wr,v as Gr,i as bf,h as qe,L as yf,x as Ef,j as kf}from"./index-BuR1WXAD.js";import{u as _f,H as Sf}from"./Header-De-cxVSd.js";import{B as Kt,_ as Yl}from"./Button-BgP1U8Po.js";import{M as vf}from"./Modal-WC6XeOBi.js";function _e(n){this.content=n}_e.prototype={constructor:_e,find:function(n){for(var e=0;e>1}};_e.from=function(n){if(n instanceof _e)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new _e(e)};function Zl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=Zl(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function jl(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){t-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:t,b:r};if(o.isText&&o.text!=a.text){let c=0,d=Math.min(o.text.length,a.text.length);for(;ce&&r(l,i+a,s||null,o)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,t-d),r,i+d)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),r.push(a),i+=a.nodeSize),o=l}return new w(r,i)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new w(i,s)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Er(t+1,s):Er(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};te.none=[];class Jr extends Error{}class R{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ql(this.content,e+this.openStart,t);return r&&new R(r,this.openStart,this.openEnd)}removeBetween(e,t){return new R(Xl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return R.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new R(w.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new R(e,r,i)}}R.empty=new R(w.empty,0,0);function Xl(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:a}=n.findIndex(t);if(i==e||s.isText){if(a!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Xl(s.content,e-i-1,t-i-1)))}function Ql(n,e,t,r){let{index:i,offset:s}=n.findIndex(e),o=n.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=Ql(o.content,e-s-1,t,o);return a&&n.replaceChild(i,o.copy(a))}function wf(n,e,t){if(t.openStart>n.depth)throw new Jr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Jr("Inconsistent open depths");return ec(n,e,t,0)}function ec(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Un(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(Jt(n.nodeAfter,r),s++));for(let a=s;ai&&zs(n,e,i+1),o=r.depth>i&&zs(t,r,i+1),a=[];return Un(null,n,i,a),s&&o&&e.index(i)==t.index(i)?(tc(s,o),Jt(Yt(s,nc(n,e,t,r,i+1)),a)):(s&&Jt(Yt(s,Yr(n,e,i+1)),a),Un(e,t,i,a),o&&Jt(Yt(o,Yr(t,r,i+1)),a)),Un(r,null,i,a),new w(a)}function Yr(n,e,t){let r=[];if(Un(null,n,t,r),n.depth>t){let i=zs(n,e,t+1);Jt(Yt(i,Yr(n,e,t+1)),r)}return Un(e,null,t,r),new w(r)}function Tf(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(w.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Xn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Zr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new Xn(t,r,s)}static resolveCached(e,t){let r=oa.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),rc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;lt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=w.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,r);return s.type.checkAttrs(s.attrs),s}}et.prototype.text=void 0;class jr extends et{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):rc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new jr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new jr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function rc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class en{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Mf(e,t);if(r.next==null)return en.empty;let i=ic(r);r.next&&r.err("Unexpected trailing text");let s=Pf(Lf(i));return Bf(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` -`)}}en.empty=new en(!0);class Mf{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ic(n){let e=[];do e.push(Af(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Af(n){let e=[];do e.push(Of(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Of(n){let e=Df(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Rf(n,e);else break;return e}function aa(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Rf(n,e){let t=aa(n),r=t;return n.eat(",")&&(n.next!="}"?r=aa(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function If(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Df(n){if(n.eat("(")){let e=ic(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=If(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Lf(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,a,l){let c={term:l,to:a};return e[o].push(c),c}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=s(o.exprs[l],a);if(l==o.exprs.length-1)return c;i(c,a=t())}else if(o.type=="star"){let l=t();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=t();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c{n[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let d=0;d{c||i.push([a,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let s=e[r.join(",")]=new en(r.indexOf(n.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ac(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new et(this,this.computeAttrs(e),w.from(t),te.setFrom(r))}createChecked(e=null,t,r){return t=w.from(t),this.checkContent(t),new et(this,this.computeAttrs(e),t,te.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=w.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(w.empty,!0);return s?new et(this,e,t.append(s),te.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[s]=new dc(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function $f(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}class zf{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?$f(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class zi{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=cc(e,i.attrs),this.excluded=null;let s=oc(this.attrs);this.instance=s?new te(this,s):null}create(e=null){return!e&&this.instance?this.instance:new te(this,ac(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new zi(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t-1}}class uc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=_e.from(e.nodes),t.marks=_e.from(e.marks||{}),this.nodes=ca.compile(this.spec.nodes,this),this.marks=zi.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=en.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?da(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:da(this,o.split(" "))}this.nodeFromJSON=i=>et.fromJSON(this,i),this.markFromJSON=i=>te.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ca){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new jr(r,r.defaultAttrs,e,te.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function da(n,e){let t=[];for(let r=0;r-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Ff(n){return n.tag!=null}function Uf(n){return n.style!=null}class Rt{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Ff(i))this.tags.push(i);else if(Uf(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new fa(this,t,!1);return r.addAll(e,te.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new fa(this,t,!0);return r.addAll(e,te.none,t.from,t.to),R.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=pa(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=pa(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Rt(e,Rt.schemaRules(e)))}}const fc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Hf={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},pc={ol:!0,ul:!0},Qn=1,Fs=2,Hn=4;function ua(n,e,t){return e!=null?(e?Qn:0)|(e==="full"?Fs:0):n&&n.whitespace=="pre"?Qn|Fs:t&~Hn}class kr{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=te.none,this.match=s||(o&Hn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(w.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Qn)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=w.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(w.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!fc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class fa{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=ua(null,t.preserveWhitespace,0)|(r?Hn:0);i?s=new kr(i.type,i.attrs,te.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new kr(null,null,te.none,!0,null,o):s=new kr(e.schema.topNodeType,null,te.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&Fs?"full":this.localPreserveWS||(i.options&Qn)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,` -`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(o,t.attrs||null,r,t.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}s&&this.sync(a)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+a)&&(i=c,s=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):ha(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new kr(e,t,l,i,null,a)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Qn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let c=t[a];if(c==""){if(a==t.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Kf(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&pc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Vf(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function pa(n){let e={};for(let t in n)e[t]=n[t];return e}function ha(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=a=>{s.push(a);for(let l=0;l{if(s.length||o.marks.length){let a=0,l=0;for(;a=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Pr(cs(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return Pr(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new on(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=ma(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return ma(e.marks)}}function ma(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function cs(n){return n.document||window.document}const ga=new WeakMap;function Wf(n){let e=ga.get(n);return e===void 0&&ga.set(n,e=Gf(n)),e}function Gf(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let a,l=t?n.createElementNS(t,i):n.createElement(i),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let u in c)if(c[u]!=null){let f=u.indexOf(" ");f>0?l.setAttributeNS(u.slice(0,f),u.slice(f+1),c[u]):u=="style"&&l.style?l.style.cssText=c[u]:l.setAttribute(u,c[u])}}for(let u=d;ud)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=Pr(n,f,t,r);if(l.appendChild(p),h){if(a)throw new RangeError("Multiple content holes");a=h}}}return{dom:l,contentDOM:a}}const hc=65535,mc=Math.pow(2,16);function qf(n,e){return n+e*mc}function ba(n){return n&hc}function Jf(n){return(n-(n&hc))/mc}const gc=1,bc=2,Br=4,yc=8;class Us{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&yc)>0}get deletedBefore(){return(this.delInfo&(gc|Br))>0}get deletedAfter(){return(this.delInfo&(bc|Br))>0}get deletedAcross(){return(this.delInfo&Br)>0}}class ze{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ze.empty)return ze.empty}recover(e){let t=0,r=ba(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[a+s],d=this.ranges[a+o],u=l+c;if(e<=u){let f=c?e==l?-1:e==u?1:t:t,p=l+i+(f<0?0:d);if(r)return p;let h=e==(t<0?l:u)?null:qf(a/3,e-l),m=e==l?bc:e==u?gc:Br;return(t<0?e!=l:e!=u)&&(m|=yc),new Us(p,m,h)}i+=d-c}return r?e+i:new Us(e+i,0,null)}touches(e,t){let r=0,i=ba(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;ae)break;let c=this.ranges[a+s],d=l+c;if(e<=d&&a==i*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new er;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rs&&l!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return he.fromReplace(e,this.from,this.to,s)}invert(){return new Qe(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ct(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ct&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ct(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ct(t.from,t.to,e.markFromJSON(t.mark))}}Me.jsonID("addMark",Ct);class Qe extends Me{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new R(go(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return he.fromReplace(e,this.from,this.to,r)}invert(){return new Ct(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Qe(t.pos,r.pos,this.mark)}merge(e){return e instanceof Qe&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Qe(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Qe(t.from,t.to,e.markFromJSON(t.mark))}}Me.jsonID("removeMark",Qe);class Mt extends Me{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return he.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return he.fromReplace(e,this.pos,this.pos+1,new R(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new ye(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ye(t.from,t.to,t.gapFrom,t.gapTo,R.fromJSON(e,t.slice),t.insert,!!t.structure)}}Me.jsonID("replaceAround",ye);function Hs(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Yf(n,e,t,r){let i=[],s=[],o,a;n.doc.nodesBetween(e,t,(l,c,d)=>{if(!l.isInline)return;let u=l.marks;if(!r.isInSet(u)&&d.type.allowsMarkType(r.type)){let f=Math.max(c,e),p=Math.min(c+l.nodeSize,t),h=r.addToSet(u);for(let m=0;mn.step(l)),s.forEach(l=>n.step(l))}function Zf(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(r instanceof zi){let c=o.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,t);for(let d=0;dn.step(new Qe(o.from,o.to,o.style)))}function bo(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l=0;l--)n.step(o[l])}function jf(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function An(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),a=n.$from.index(r)+i,l=n.$to.indexAfter(r)-s;if(rt;h--)m||r.index(h)>0?(m=!0,d=w.from(r.node(h).copy(d)),u++):l--;let f=w.empty,p=0;for(let h=s,m=!1;h>t;h--)m||i.after(h+1)=0;o--){if(r.size){let a=t[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=w.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new ye(i,s,i,s,new R(r,0,0),t.length,!0))}function np(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,l)&&rp(n.doc,n.mapping.slice(s).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?c=!1:!p&&h&&(c=!0)}c===!1&&kc(n,o,a,s),bo(n,n.mapping.slice(s).map(a,1),r,void 0,c===null);let d=n.mapping.slice(s),u=d.map(a,1),f=d.map(a+o.nodeSize,1);return n.step(new ye(u,f,u+1,f-1,new R(w.from(r.create(l,null,o.marks)),0,0),1,!0)),c===!0&&Ec(n,o,a,s),!1}})}function Ec(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function kc(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(` -`))}})}function rp(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function ip(n,e,t,r,i){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(r,null,i||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new ye(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new R(w.from(o),0,0),1,!0))}function bt(n,e,t=1,r){let i=n.resolve(e),s=i.depth-t,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,d=t-2;c>s;c--,d--){let u=i.node(c),f=i.index(c);if(u.type.spec.isolating)return!1;let p=u.content.cutByIndex(f,u.childCount),h=r&&r[d+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=r&&r[d]||u;if(!u.canReplace(f+1,u.childCount)||!m.type.validContent(p))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function sp(n,e,t=1,r){let i=n.doc.resolve(e),s=w.empty,o=w.empty;for(let a=i.depth,l=i.depth-t,c=t-1;a>l;a--,c--){s=w.from(i.node(a).copy(s));let d=r&&r[c];o=w.from(d?d.type.create(d.attrs,o):i.node(a).copy(o))}n.step(new pe(e,e,new R(s.append(o),t,t),!0))}function $t(n,e){let t=n.resolve(e),r=t.index();return _c(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function op(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let i=0;i0?(s=r.node(i+1),a++,o=r.node(i).maybeChild(a)):(s=r.node(i).maybeChild(a-1),o=r.node(i+1)),s&&!s.isTextblock&&_c(s,o)&&r.node(i).canReplace(a,a+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function ap(n,e,t){let r=null,{linebreakReplacement:i}=n.doc.type.schema,s=n.doc.resolve(e-t),o=s.node().type;if(i&&o.inlineContent){let d=o.whitespace=="pre",u=!!o.contentMatch.matchType(i);d&&!u?r=!1:!d&&u&&(r=!0)}let a=n.steps.length;if(r===!1){let d=n.doc.resolve(e+t);kc(n,d.node(),d.before(),a)}o.inlineContent&&bo(n,e+t-1,o,s.node().contentMatchAt(s.index()),r==null);let l=n.mapping.slice(a),c=l.map(e-t);if(n.step(new pe(c,l.map(e+t,-1),R.empty,!0)),r===!0){let d=n.doc.resolve(c);Ec(n,d.node(),d.before(),n.steps.length)}return n}function lp(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,t))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,t))return r.after(i+1);if(s=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),c=r.node(o),d=!1;if(s==1)d=c.canReplace(l,l,i);else{let u=c.contentMatchAt(l).findWrapping(i.firstChild.type);d=u&&c.canReplaceWith(l,l,u[0])}if(d)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function Ui(n,e,t=e,r=R.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),s=n.resolve(t);return vc(i,s,r)?new pe(e,t,r):new cp(i,s,r).fit()}function vc(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class cp{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=w.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=w.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new R(s,o,a);return e>-1?new ye(r.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||r.pos!=this.$to.pos?new pe(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=us(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],d,u=null;if(t==1&&(o?c.matchType(o.type)||(u=c.fillBefore(w.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:a,parent:s,inject:u};if(t==2&&o&&(d=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:s,wrap:d};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=us(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new R(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=us(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new R(Pn(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new R(Pn(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let m=0;m1||l==0||m.content.size)&&(u=g,d.push(wc(m.mark(f.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?p:-1)))}let h=c==a.childCount;h||(p=-1),this.placed=Bn(this.placed,t,w.from(d)),this.frontier[t].match=u,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=a;m1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],s=t=0;a--){let{match:l,type:c}=this.frontier[a],d=fs(e,a,c,l,!0);if(!d||d.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Bn(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Bn(this.placed,this.depth,w.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(w.empty,!0);t.childCount&&(this.placed=Bn(this.placed,this.frontier.length,t))}}function Pn(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Pn(n.firstChild.content,e-1,t)))}function Bn(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Bn(n.lastChild.content,e-1,t)))}function us(n,e){for(let t=0;t1&&(r=r.replaceChild(0,wc(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(w.empty,!0)))),n.copy(r)}function fs(n,e,t,r,i){let s=n.node(e),o=i?n.indexAfter(e):n.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!dp(t,s.content,o)?a:null}function dp(n,e,t){for(let r=t;r0;f--,p--){let h=i.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;o.indexOf(f)>-1?a=f:i.before(f)==p&&o.splice(1,0,-f)}let l=o.indexOf(a),c=[],d=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(c.push(h),p==r.openStart)break;f=h.content}for(let f=d-1;f>=0;f--){let p=c[f],h=up(p.type);if(h&&!p.sameMarkup(i.node(Math.abs(a)-1)))d=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+d+1)%(r.openStart+1),h=c[p];if(h)for(let m=0;m=0&&(n.replace(e,t,r),!(n.steps.length>u));f--){let p=o[f];p<0||(e=i.before(p),t=s.after(p))}}function Tc(n,e,t,r,i){if(er){let s=i.contentMatchAt(0),o=s.fillBefore(n).append(n);n=o.append(s.matchFragment(o).fillBefore(w.empty,!0))}return n}function pp(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=lp(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new R(w.from(r),0,0))}function hp(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let o=r.sharedDepth(t),a=!1;for(let l=r.depth;l>o;l--)r.node(l).type.spec.isolating&&(a=!0);for(let l=i.depth;l>o;l--)i.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=r.depth;l>0&&e==r.start(l);l--)e=r.before(l);for(let l=i.depth;l>0&&t==i.start(l);l--)t=i.before(l);r=n.doc.resolve(e),i=n.doc.resolve(t)}}let s=Nc(r,i);for(let o=0;o0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return n.delete(r.before(a),i.after(a))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&t>r.end(o)&&i.end(o)-t!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return n.delete(r.before(o),t);n.delete(e,t)}function Nc(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let s=n.start(i);if(se.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&t.push(i)}return t}class kn extends Me{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return he.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return he.fromReplace(e,this.pos,this.pos+1,new R(w.from(i),0,t.isLeaf?0:1))}getMap(){return ze.empty}invert(e){return new kn(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new kn(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new kn(t.pos,t.attr,t.value)}}Me.jsonID("attr",kn);class tr extends Me{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return he.ok(r)}getMap(){return ze.empty}invert(e){return new tr(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new tr(t.attr,t.value)}}Me.jsonID("docAttr",tr);let Sn=class extends Error{};Sn=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};Sn.prototype=Object.create(Error.prototype);Sn.prototype.constructor=Sn;Sn.prototype.name="TransformError";class xc{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new er}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Sn(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let r=0;r{e=Math.min(e,a),t=Math.max(t,l)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=R.empty){let i=Ui(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new R(w.from(r),0,0))}delete(e,t){return this.replace(e,t,R.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return fp(this,e,t,r),this}replaceRangeWith(e,t,r){return pp(this,e,t,r),this}deleteRange(e,t){return hp(this,e,t),this}lift(e,t){return Xf(this,e,t),this}join(e,t=1){return ap(this,e,t),this}wrap(e,t){return tp(this,e,t),this}setBlockType(e,t=e,r,i=null){return np(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return ip(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new kn(e,t,r)),this}setDocAttribute(e,t){return this.step(new tr(e,t)),this}addNodeMark(e,t){return this.step(new Mt(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t instanceof te)t.isInSet(r.marks)&&this.step(new tn(e,t));else{let i=r.marks,s,o=[];for(;s=t.isInSet(i);)o.push(new tn(e,s)),i=s.removeFromSet(i);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,t=1,r){return sp(this,e,t,r),this}addMark(e,t,r){return Yf(this,e,t,r),this}removeMark(e,t,r){return Zf(this,e,t,r),this}clearIncompatible(e,t,r){return bo(this,e,t,r),this}}const ps=Object.create(null);class H{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new mp(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;s--){let o=t<0?hn(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):hn(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Fe(e.node(0))}static atStart(e){return hn(e,e,0,0,1)||new Fe(e)}static atEnd(e){return hn(e,e,e.content.size,e.childCount,-1)||new Fe(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ps[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ps)throw new RangeError("Duplicate use of selection JSON ID "+e);return ps[e]=t,t.prototype.jsonID=e,t}getBookmark(){return z.between(this.$anchor,this.$head).getBookmark()}}H.prototype.visible=!0;class mp{constructor(e,t){this.$from=e,this.$to=t}}let Ea=!1;function ka(n){!Ea&&!n.parent.inlineContent&&(Ea=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class z extends H{constructor(e,t=e){ka(e),ka(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return H.near(r);let i=e.resolve(t.map(this.anchor));return new z(i.parent.inlineContent?i:r,r)}replace(e,t=R.empty){if(super.replace(e,t),t==R.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof z&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Hi(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new z(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let s=H.findFrom(t,r,!0)||H.findFrom(t,-r,!0);if(s)t=s.$head;else return H.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(H.findFrom(e,-r,!0)||H.findFrom(e,r,!0)).$anchor,e.pos0?0:1);i>0?o=0;o+=i){let a=e.child(o);if(a.isAtom){if(!s&&B.isSelectable(a))return B.create(n,t-(i<0?a.nodeSize:0))}else{let l=hn(n,a,t+i,i<0?a.childCount:0,i,s);if(l)return l}t+=a.nodeSize*i}return null}function _a(n,e,t){let r=n.steps.length-1;if(r{o==null&&(o=d)}),n.setSelection(H.near(n.doc.resolve(o),t))}const Sa=1,_r=2,va=4;class bp extends xc{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=_r,this}ensureMarks(e){return te.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&_r)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~_r,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||te.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=r==t?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,s)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(H.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=va,this}get scrolledIntoView(){return(this.updated&va)>0}}function wa(n,e){return!e||!n?n:n.bind(e)}class $n{constructor(e,t,r){this.name=e,this.init=wa(t.init,r),this.apply=wa(t.apply,r)}}const yp=[new $n("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new $n("selection",{init(n,e){return n.selection||H.atStart(e.doc)},apply(n){return n.selection}}),new $n("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new $n("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class hs{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=yp.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new $n(r.key,r.spec.state,r))})}}class En{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new hs(e.schema,e.plugins),s=new En(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=et.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=H.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,a)){s[o.name]=c.fromJSON.call(l,e,t[a],s);return}}s[o.name]=o.init(e,s)}}),s}}function Cc(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Cc(i,e,{})),t[r]=i}return t}class le{constructor(e){this.spec=e,this.props={},e.props&&Cc(e.props,this,this.props),this.key=e.key?e.key.key:Mc("plugin")}getState(e){return e[this.key]}}const ms=Object.create(null);function Mc(n){return n in ms?n+"$"+ ++ms[n]:(ms[n]=0,n+"$")}class be{constructor(e="key"){this.key=Mc(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ko=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function Ac(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const Oc=(n,e,t)=>{let r=Ac(n,t);if(!r)return!1;let i=_o(r);if(!i){let o=r.blockRange(),a=o&&An(o);return a==null?!1:(e&&e(n.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if(Fc(n,i,e,-1))return!0;if(r.parent.content.size==0&&(vn(s,"end")||B.isSelectable(s)))for(let o=r.depth;;o--){let a=Ui(n.doc,r.before(o),r.after(o),R.empty);if(a&&a.slice.size1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},Ep=(n,e,t)=>{let r=Ac(n,t);if(!r)return!1;let i=_o(r);return i?Rc(n,i,e):!1},kp=(n,e,t)=>{let r=Dc(n,t);if(!r)return!1;let i=So(r);return i?Rc(n,i,e):!1};function Rc(n,e,t){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let d=i.lastChild;if(!d)return!1;i=d}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let d=a.firstChild;if(!d)return!1;a=d}let c=Ui(n.doc,s,l,R.empty);if(!c||c.from!=s||c instanceof pe&&c.slice.size>=l-s)return!1;if(t){let d=n.tr.step(c);d.setSelection(z.create(d.doc,s)),t(d.scrollIntoView())}return!0}function vn(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const Ic=(n,e,t)=>{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;s=_o(r)}let o=s&&s.nodeBefore;return!o||!B.isSelectable(o)?!1:(e&&e(n.tr.setSelection(B.create(n.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function _o(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function Dc(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let r=Dc(n,t);if(!r)return!1;let i=So(r);if(!i)return!1;let s=i.nodeAfter;if(Fc(n,i,e,1))return!0;if(r.parent.content.size==0&&(vn(s,"start")||B.isSelectable(s))){let o=Ui(n.doc,r.before(),r.after(),R.empty);if(o&&o.slice.size{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let t=n.selection,r=t instanceof B,i;if(r){if(t.node.isTextblock||!$t(n.doc,t.from))return!1;i=t.from}else if(i=Fi(n.doc,t.from,-1),i==null)return!1;if(e){let s=n.tr.join(i);r&&s.setSelection(B.create(s.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Sp=(n,e)=>{let t=n.selection,r;if(t instanceof B){if(t.node.isTextblock||!$t(n.doc,t.to))return!1;r=t.to}else if(r=Fi(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},vp=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),s=i&&An(i);return s==null?!1:(e&&e(n.tr.lift(i,s).scrollIntoView()),!0)},Bc=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` -`).scrollIntoView()),!0)};function vo(n){for(let e=0;e{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),s=t.indexAfter(-1),o=vo(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let a=t.after(),l=n.tr.replaceWith(a,a,o.createAndFill());l.setSelection(H.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},$c=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof Fe||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=vo(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(bt(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),i=r&&An(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)};function Tp(n){return(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof B&&e.selection.node.isBlock)return!r.parentOffset||!bt(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],o,a,l=!1,c=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),c=r.start(p)==r.pos-(r.depth-p),a=vo(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),s.unshift(l&&a?{type:a}:null),o=p;break}else{if(p==1)return!1;s.unshift(null)}let d=e.tr;(e.selection instanceof z||e.selection instanceof Fe)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=bt(d.doc,u,s.length,s);if(f||(s[0]=a?{type:a}:null,f=bt(d.doc,u,s.length,s)),!f)return!1;if(d.split(u,s.length,s),!l&&c&&r.node(o).type!=a){let p=d.mapping.map(r.before(o)),h=d.doc.resolve(p);a&&r.node(o-1).canReplaceWith(h.index(),h.index()+1,a)&&d.setNodeMarkup(d.mapping.map(r.before(o)),a)}return t&&t(d.scrollIntoView()),!0}}const Np=Tp(),xp=(n,e)=>{let{$from:t,to:r}=n.selection,i,s=t.sharedDepth(r);return s==0?!1:(i=t.before(s),e&&e(n.tr.setSelection(B.create(n.doc,i))),!0)};function Cp(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||$t(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function Fc(n,e,t,r){let i=e.nodeBefore,s=e.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&Cp(n,e,t))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(t){let p=e.pos+s.nodeSize,h=w.empty;for(let b=o.length-1;b>=0;b--)h=w.from(o[b].create(null,h));h=w.from(i.copy(h));let m=n.tr.step(new ye(e.pos-1,p,e.pos,p,new R(h,1,0),o.length,!0)),g=m.doc.resolve(p+2*o.length);g.nodeAfter&&g.nodeAfter.type==i.type&&$t(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let d=s.type.spec.isolating||r>0&&l?null:H.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&An(u);if(f!=null&&f>=e.depth)return t&&t(n.tr.lift(u,f).scrollIntoView()),!0;if(c&&vn(s,"start",!0)&&vn(i,"end")){let p=i,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(t){let b=w.empty;for(let y=h.length-1;y>=0;y--)b=w.from(h[y].copy(b));let E=n.tr.step(new ye(e.pos-h.length,e.pos+s.nodeSize,e.pos+g,e.pos+s.nodeSize-g,new R(b,h.length,0),0,!0));t(E.scrollIntoView())}return!0}}return!1}function Uc(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(t&&t(e.tr.setSelection(z.create(e.doc,n<0?i.start(s):i.end(s)))),!0):!1}}const Mp=Uc(-1),Ap=Uc(1);function Op(n,e=null){return function(t,r){let{$from:i,$to:s}=t.selection,o=i.blockRange(s),a=o&&yo(o,n,e);return a?(r&&r(t.tr.wrap(o,a).scrollIntoView()),!0):!1}}function Ta(n,e=null){return function(t,r){let i=!1;for(let s=0;s{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(n,e)))if(l.type==n)i=!0;else{let d=t.doc.resolve(c),u=d.index();i=d.parent.canReplaceWith(u,u+1,n)}})}if(!i)return!1;if(r){let s=t.tr;for(let o=0;o=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);s=new Zr(l,l,e.depth),e.endIndex=0;d--)s=w.from(t[d].type.create(t[d].attrs,s));n.step(new ye(e.start-(r?2:0),e.end,e.start,e.end,new R(s,0,0),t.length,!0));let o=0;for(let d=0;do.childCount>0&&o.firstChild.type==n);return s?t?r.node(s.depth-1).type==n?Pp(e,t,n,s):Bp(e,t,s):!0:!1}}function Pp(n,e,t,r){let i=n.tr,s=r.end,o=r.$to.end(r.depth);sm;h--)p-=i.child(h).nodeSize,r.delete(p-1,p+1);let s=r.doc.resolve(t.start),o=s.nodeAfter;if(r.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let a=t.startIndex==0,l=t.endIndex==i.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(a?0:1),d+1,o.content.append(l?w.empty:w.from(i))))return!1;let u=s.pos,f=u+o.nodeSize;return r.step(new ye(u-(a?1:0),f+(l?1:0),u+1,f-1,new R((a?w.empty:w.from(i.copy(w.empty))).append(l?w.empty:w.from(i.copy(w.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function $p(n){return function(e,t){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==n);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=n)return!1;if(t){let c=l.lastChild&&l.lastChild.type==a.type,d=w.from(c?n.create():null),u=new R(w.from(n.create(null,w.from(a.type.create(null,d)))),c?3:1,0),f=s.start,p=s.end;t(e.tr.step(new ye(f-(c?3:1),p,f,p,u,1,!0)).scrollIntoView())}return!0}}const Se=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},wn=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let Ks=null;const pt=function(n,e,t){let r=Ks||(Ks=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},zp=function(){Ks=null},nn=function(n,e,t,r){return t&&(Na(n,e,t,r,-1)||Na(n,e,t,r,1))},Fp=/^(img|br|input|textarea|hr)$/i;function Na(n,e,t,r,i){for(var s;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Ye(n))){let o=n.parentNode;if(!o||o.nodeType!=1||ur(n)||Fp.test(n.nodeName)||n.contentEditable=="false")return!1;e=Se(n)+(i<0?0:1),n=o}else if(n.nodeType==1){let o=n.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else n=o,e=i<0?Ye(n):0}else return!1}}function Ye(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Up(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=Ye(n)}else if(n.parentNode&&!ur(n))e=Se(n),n=n.parentNode;else return null}}function Hp(n,e){for(;;){if(n.nodeType==3&&e2),Je=Tn||(st?/Mac/.test(st.platform):!1),Vc=st?/Win/.test(st.platform):!1,gt=/Android \d/.test(zt),fr=!!xa&&"webkitFontSmoothing"in xa.documentElement.style,Gp=fr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function qp(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function lt(n,e){return typeof n=="number"?n:n[e]}function Jp(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Ca(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let o=t||n.dom;o;){if(o.nodeType!=1){o=wn(o);continue}let a=o,l=a==s.body,c=l?qp(s):Jp(a),d=0,u=0;if(e.topc.bottom-lt(r,"bottom")&&(u=e.bottom-e.top>c.bottom-c.top?e.top+lt(i,"top")-c.top:e.bottom-c.bottom+lt(i,"bottom")),e.leftc.right-lt(r,"right")&&(d=e.right-c.right+lt(i,"right")),d||u)if(l)s.defaultView.scrollBy(d,u);else{let p=a.scrollLeft,h=a.scrollTop;u&&(a.scrollTop+=u),d&&(a.scrollLeft+=d);let m=a.scrollLeft-p,g=a.scrollTop-h;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let f=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(f))break;o=f=="absolute"?o.offsetParent:wn(o)}}function Yp(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=t+1;o=t-20){r=a,i=l.top;break}}return{refDOM:r,refTop:i,stack:Wc(n.dom)}}function Wc(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=wn(r));return e}function Zp({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Gc(t,r==0?0:r-e)}function Gc(n,e){for(let t=0;t=a){o=Math.max(h.bottom,o),a=Math.min(h.top,a);let m=h.left>e.left?h.left-e.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>e.top&&!l&&h.left<=e.left&&h.right>=e.left&&(l=d,c={left:Math.max(h.left,Math.min(h.right,e.left)),top:h.top});!t&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(s=u+1)}}return!t&&l&&(t=l,i=c,r=0),t&&t.nodeType==3?Xp(t,i):!t||r&&t.nodeType==1?{node:n,offset:s}:qc(t,i)}function Xp(n,e){let t=n.nodeValue.length,r=document.createRange(),i;for(let s=0;s=(o.left+o.right)/2?1:0)};break}}return r.detach(),i||{node:n,offset:0}}function To(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function Qp(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left(o.left+o.right)/2?1:-1}return n.docView.posFromDOM(r,i,s)}function th(n,e,t,r){let i=-1;for(let s=e,o=!1;s!=n.dom;){let a=n.docView.nearestDesc(s,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>r.left||l.top>r.top?i=a.posBefore:(!o&&l.right-1?i:n.docView.posFromDOM(e,t,-1)}function Jc(n,e,t){let r=n.childNodes.length;if(r&&t.tope.top&&i++}let c;fr&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=th(n,r,i,e))}a==null&&(a=eh(n,o,e));let l=n.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Ma(n){return n.top=0&&i==r.nodeValue.length?(l--,d=1):t<0?l--:c++,Rn(St(pt(r,l,c),d),d<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(t<0||i==Ye(r))){let l=r.childNodes[i-1];if(l.nodeType==1)return gs(l.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(t<0||i==Ye(r))){let l=r.childNodes[i-1],c=l.nodeType==3?pt(l,Ye(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Rn(St(c,1),!1)}if(s==null&&i=0)}function Rn(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function gs(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function Zc(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function ih(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return Zc(n,e,()=>{let{node:s}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let a=n.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=Yc(n,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=pt(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;cd.top+1&&(t=="up"?o.top-d.top>(d.bottom-o.top)*2:d.bottom-o.bottom>(o.bottom-d.top)*2))return!1}}return!0})}const sh=/[\u0590-\u08ac]/;function oh(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,a=n.domSelection();return a?!sh.test(r.parent.textContent)||!a.modify?t=="left"||t=="backward"?s:o:Zc(n,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:d,anchorOffset:u}=n.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",t,"character");let p=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:h,focusOffset:m}=n.domSelectionRange(),g=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&c==m;try{a.collapse(d,u),l&&(l!=d||c!=u)&&a.extend&&a.extend(l,c)}catch{}return f!=null&&(a.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let Aa=null,Oa=null,Ra=!1;function ah(n,e,t){return Aa==e&&Oa==t?Ra:(Aa=e,Oa=t,Ra=t=="up"||t=="down"?ih(n,e,t):oh(n,e,t))}const je=0,Ia=1,Vt=2,ot=3;class pr{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=je,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tSe(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!t||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;te||o instanceof Xc){i=e-s;break}s=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof jc&&s.side>=0;r--);if(t<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&t&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?Se(s.dom)+1:0}}else{let s,o=!0;for(;s=r=d&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,d);e=o;for(let u=a;u>0;u--){let f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Se(f.dom)+1;break}e-=f.size}i==-1&&(i=0)}if(i>-1&&(c>t||a==this.children.length-1)){t=c;for(let d=a+1;dh&&ot){let h=a;a=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i=r:er){let a=r+s.border,l=o-s.border;if(e>=a&&t<=l){this.dirty=e==r||t==o?Vt:Ia,e==a&&t==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=ot:s.markDirty(e-a,t-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Vt:ot}r=o}this.dirty=Vt}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?Vt:Ia;t.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==je&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class lh extends pr{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class rn extends pr{constructor(e,t,r,i,s){super(e,[],r,i),this.mark=t,this.spec=s}static create(e,t,r,i){let s=i.nodeViews[t.type.name],o=s&&s(t,i,r);return(!o||!o.dom)&&(o=on.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new rn(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&ot||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ot&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=je){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(s=Js(s,0,e,r));for(let a=0;a{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,i),d=c&&c.dom,u=c&&c.contentDOM;if(t.isText){if(!d)d=document.createTextNode(t.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:u}=on.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!u&&!t.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let f=d;return d=td(d,r,t),c?l=new ch(e,t,r,i,d,u||null,f,c,s,o+1):t.isText?new Vi(e,t,r,i,d,f,s):new Dt(e,t,r,i,d,u||null,f,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>w.empty)}return e}matchesNode(e,t,r){return this.dirty==je&&e.eq(this.node)&&Xr(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,s=e.composing?this.localCompositionInfo(e,t):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new uh(this,o&&o.node,e);hh(this.node,this.innerDeco,(c,d,u)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e,d):c.type.side>=0&&!u&&l.syncToMarks(d==this.node.childCount?te.none:this.node.child(d).marks,r,e,d),l.placeWidget(c,e,i)},(c,d,u,f)=>{l.syncToMarks(c.marks,r,e,f);let p;l.findNodeMatch(c,d,u,f)||a&&e.state.selection.from>i&&e.state.selection.to-1&&l.updateNodeAt(c,d,u,p,e)||l.updateNextNode(c,d,u,e,f,i)||l.addNode(c,d,u,e,i),i+=c.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Vt)&&(o&&this.protectLocalComposition(e,o),Qc(this.contentDOM,this.children,e),Tn&&mh(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof z)||rt+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=gh(this.node.content,o,r-t,i-t);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new lh(this,s,t,i);e.input.compositionNodes.push(o),this.children=Js(this.children,r,r+i.length,e,o)}update(e,t,r,i){return this.dirty==ot||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=je}updateOuterDeco(e){if(Xr(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=ed(this.dom,this.nodeDOM,qs(this.outerDeco,this.node,t),qs(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Da(n,e,t,r,i){td(r,e,n);let s=new Dt(void 0,n,e,t,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class Vi extends Dt{constructor(e,t,r,i,s,o,a){super(e,t,r,i,s,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return this.dirty==ot||this.dirty!=je&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=je||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=je,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),s=document.createTextNode(i.text);return new Vi(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=ot)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Xc extends pr{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==je&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class ch extends Dt{constructor(e,t,r,i,s,o,a,l,c,d){super(e,t,r,i,s,o,a,c,d),this.spec=l}update(e,t,r,i){if(this.dirty==ot)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,t,r);return s&&this.updateInner(e,t,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Qc(n,e,t){let r=n.firstChild,i=!1;for(let s=0;s>1,a=Math.min(o,e.length);for(;s-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let d=rn.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,d),this.top=d,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(r){let c=t.children[r-1];if(c instanceof rn)t=c,r=c.children.length;else{a=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let l=a.node;if(l){if(l!=n.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function ph(n,e){return n.type.side-e.type.side}function hh(n,e,t,r){let i=e.locals(n),s=0;if(i.length==0){for(let c=0;cs;)a.push(i[o++]);let h=s+f.nodeSize;if(f.isText){let g=h;o!g.inline):a.slice();r(f,m,e.forChild(s,f),p),s=h}}function mh(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function gh(n,e,t,r){for(let i=0,s=0;i=t){if(s>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a=0&&c+e.length+a>=t)return a+c;if(t==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function Js(n,e,t,r,i){let s=[];for(let o=0,a=0;o=t||d<=e?s.push(l):(ct&&s.push(l.slice(t-c,l.size,r)))}return s}function No(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),s=i&&i.size==0,o=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,c;if(Ki(t)){for(l=o;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&B.isSelectable(u)&&i.parent&&!(u.isInline&&Kp(t.focusNode,t.focusOffset,i.dom))){let f=i.posBefore;c=new B(o==f?a:r.resolve(f))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let u=o,f=o;for(let p=0;p{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!nd(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function yh(n){let e=n.domSelection();if(!e)return;let t=n.cursorWrapper.dom,r=t.nodeName=="IMG";r?e.collapse(t.parentNode,Se(t)+1):e.collapse(t,0),!r&&!n.state.selection.visible&&Le&&It<=11&&(t.disabled=!0,t.disabled=!1)}function rd(n,e){if(e instanceof B){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(za(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else za(n)}function za(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function xo(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||z.between(e,t,r)}function Fa(n){return n.editable&&!n.hasFocus()?!1:id(n)}function id(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Eh(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return nn(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Ys(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),s=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return s&&H.findFrom(s,e)}function vt(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Ua(n,e,t){let r=n.state.selection;if(r instanceof z)if(t.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=n.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return vt(n,new z(r.$anchor,o))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=Ys(n.state,e);return i&&i instanceof B?vt(n,i):!1}else if(!(Je&&t.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=n.docView.descAt(a))&&!o.contentDOM?B.isSelectable(s)?vt(n,new B(e<0?n.state.doc.resolve(i.pos-s.nodeSize):i)):fr?vt(n,new z(n.state.doc.resolve(e<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof B&&r.node.isInline)return vt(n,new z(e>0?r.$to:r.$from));{let i=Ys(n.state,e);return i?vt(n,i):!1}}}function Qr(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Vn(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function fn(n,e){return e<0?kh(n):_h(n)}function kh(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,s,o=!1;for(Ze&&t.nodeType==1&&r0){if(t.nodeType!=1)break;{let a=t.childNodes[r-1];if(Vn(a,-1))i=t,s=--r;else if(a.nodeType==3)t=a,r=t.nodeValue.length;else break}}else{if(sd(t))break;{let a=t.previousSibling;for(;a&&Vn(a,-1);)i=t.parentNode,s=Se(a),a=a.previousSibling;if(a)t=a,r=Qr(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}o?Zs(n,t,r):i&&Zs(n,i,s)}function _h(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=Qr(t),s,o;for(;;)if(r{n.state==i&&yt(n)},50)}function Ha(n,e){let t=n.state.doc.resolve(e);if(!(we||Vc)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Ka(n,e,t){let r=n.state.selection;if(r instanceof z&&!r.empty||t.indexOf("s")>-1||Je&&t.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let o=Ys(n.state,e);if(o&&o instanceof B)return vt(n,o)}if(!i.parent.inlineContent){let o=e<0?i:s,a=r instanceof Fe?H.near(o,e):H.findFrom(o,e);return a?vt(n,a):!1}return!1}function Va(n,e){if(!(n.state.selection instanceof z))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let o=n.state.tr;return e<0?o.delete(t.pos-s.nodeSize,t.pos):o.delete(t.pos,t.pos+s.nodeSize),n.dispatch(o),!0}return!1}function Wa(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function wh(n){if(!Ce||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Wa(n,r,"true"),setTimeout(()=>Wa(n,r,"false"),20)}return!1}function Th(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function Nh(n,e){let t=e.keyCode,r=Th(e);if(t==8||Je&&t==72&&r=="c")return Va(n,-1)||fn(n,-1);if(t==46&&!e.shiftKey||Je&&t==68&&r=="c")return Va(n,1)||fn(n,1);if(t==13||t==27)return!0;if(t==37||Je&&t==66&&r=="c"){let i=t==37?Ha(n,n.state.selection.from)=="ltr"?-1:1:-1;return Ua(n,i,r)||fn(n,i)}else if(t==39||Je&&t==70&&r=="c"){let i=t==39?Ha(n,n.state.selection.from)=="ltr"?1:-1:1;return Ua(n,i,r)||fn(n,i)}else{if(t==38||Je&&t==80&&r=="c")return Ka(n,-1,r)||fn(n,-1);if(t==40||Je&&t==78&&r=="c")return wh(n)||Ka(n,1,r)||fn(n,1);if(r==(Je?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Co(n,e){n.someProp("transformCopied",p=>{e=p(e,n)});let t=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let p=r.firstChild;t.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let o=n.someProp("clipboardSerializer")||on.fromSchema(n.state.schema),a=ud(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let c=l.firstChild,d,u=0;for(;c&&c.nodeType==1&&(d=dd[c.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let h=a.createElement(d[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),u++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${u?` -${u}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",p=>p(e,n))||e.content.textBetween(0,e.content.size,` - -`);return{dom:l,text:f,slice:e}}function od(n,e,t,r,i){let s=i.parent.type.spec.code,o,a;if(!t&&!e)return null;let l=!!e&&(r||s||!t);if(l){if(n.someProp("transformPastedText",f=>{e=f(e,s||r,n)}),s)return a=new R(w.from(n.state.schema.text(e.replace(/\r\n?/g,` -`))),0,0),n.someProp("transformPasted",f=>{a=f(a,n,!0)}),a;let u=n.someProp("clipboardTextParser",f=>f(e,i,r,n));if(u)a=u;else{let f=i.marks(),{schema:p}=n.state,h=on.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(h.serializeNode(p.text(m,f)))})}}else n.someProp("transformPastedHTML",u=>{t=u(t,n)}),o=Ah(t),fr&&Oh(o);let c=o&&o.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let u=+d[3];u>0;u--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||Rt.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||d),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!xh.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)a=Rh(Ga(a,+d[1],+d[2]),d[4]);else if(a=R.maxOpen(Ch(a.content,i),!0),a.openStart||a.openEnd){let u=0,f=0;for(let p=a.content.firstChild;u{a=u(a,n,l)}),a}const xh=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Ch(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),s,o=[];if(n.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),c;if(!l)return o=null;if(c=o.length&&s.length&&ld(l,s,a,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=cd(o[o.length-1],s.length));let d=ad(a,l);o.push(d),i=i.matchType(d.type),s=l}}),o)return w.from(o)}return n}function ad(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,w.from(n));return n}function ld(n,e,t,r,i){if(i1&&(s=0),i=t&&(a=e<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(w.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,o.copy(a))}function Ga(n,e,t){return et})),ys.createHTML(n)):n}function Ah(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=ud().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&dd[r[1].toLowerCase()])&&(n=i.map(s=>"<"+s+">").join("")+n+i.map(s=>"").reverse().join("")),t.innerHTML=Mh(n),i)for(let s=0;s=0;a-=2){let l=t.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=w.from(l.create(r[a+1],i)),s++,o++}return new R(i,s,o)}const Re={},Ie={},Ih={touchstart:!0,touchmove:!0};class Dh{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Lh(n){for(let e in Re){let t=Re[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{Bh(n,r)&&!Mo(n,r)&&(n.editable||!(r.type in Ie))&&t(n,r)},Ih[e]?{passive:!0}:void 0)}Ce&&n.dom.addEventListener("input",()=>null),Xs(n)}function At(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Ph(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Xs(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Mo(n,r))})}function Mo(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function Bh(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function $h(n,e){!Mo(n,e)&&Re[e.type]&&(n.editable||!(e.type in Ie))&&Re[e.type](n,e)}Ie.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!pd(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(gt&&we&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Tn&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,Ht(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||Nh(n,t)?t.preventDefault():At(n,"key")};Ie.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};Ie.keypress=(n,e)=>{let t=e;if(pd(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Je&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof z)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode),s=()=>n.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i,s))&&n.dispatch(s()),t.preventDefault()}};function Wi(n){return{left:n.clientX,top:n.clientY}}function zh(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Ao(n,e,t,r,i){if(r==-1)return!1;let s=n.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(n.someProp(e,a=>o>s.depth?a(n,t,s.nodeAfter,s.before(o),i,!0):a(n,t,s.node(o),s.before(o),i,!1)))return!0;return!1}function _n(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);r.setMeta("pointer",!0),n.dispatch(r)}function Fh(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&B.isSelectable(r)?(_n(n,new B(t)),!0):!1}function Uh(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof B&&(r=t.node);let s=n.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(B.isSelectable(a)){r&&t.$from.depth>0&&o>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?i=s.before(t.$from.depth):i=s.before(o);break}}return i!=null?(_n(n,B.create(n.state.doc,i)),!0):!1}function Hh(n,e,t,r,i){return Ao(n,"handleClickOn",e,t,r)||n.someProp("handleClick",s=>s(n,e,r))||(i?Uh(n,t):Fh(n,t))}function Kh(n,e,t,r){return Ao(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function Vh(n,e,t,r){return Ao(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||Wh(n,t,r)}function Wh(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(_n(n,z.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)_n(n,z.create(r,a+1,a+1+o.content.size));else if(B.isSelectable(o))_n(n,B.create(r,a));else continue;return!0}}function Oo(n){return ei(n)}const fd=Je?"metaKey":"ctrlKey";Re.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Oo(n),i=Date.now(),s="singleClick";i-n.input.lastClick.time<500&&zh(t,n.input.lastClick)&&!t[fd]&&n.input.lastClick.button==t.button&&(n.input.lastClick.type=="singleClick"?s="doubleClick":n.input.lastClick.type=="doubleClick"&&(s="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:s,button:t.button};let o=n.posAtCoords(Wi(t));o&&(s=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Gh(n,o,t,!!r)):(s=="doubleClick"?Kh:Vh)(n,o.pos,o.inside,t)?t.preventDefault():At(n,"pointer"))};class Gh{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[fd],this.allowDefault=r.shiftKey;let s,o;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),o=t.inside;else{let d=e.state.doc.resolve(t.pos);s=d.parent,o=d.depth?d.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof B&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ze&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),At(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>yt(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Wi(e))),this.updateAllowDefault(e),this.allowDefault||!t?At(this.view,"pointer"):Hh(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ce&&this.mightDrag&&!this.mightDrag.node.isAtom||we&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(_n(this.view,H.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):At(this.view,"pointer")}move(e){this.updateAllowDefault(e),At(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Re.touchstart=n=>{n.input.lastTouch=Date.now(),Oo(n),At(n,"pointer")};Re.touchmove=n=>{n.input.lastTouch=Date.now(),At(n,"pointer")};Re.contextmenu=n=>Oo(n);function pd(n,e){return n.composing?!0:Ce&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const qh=gt?5e3:-1;Ie.compositionstart=Ie.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof z&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||we&&Vc&&Jh(n)))n.markCursor=n.state.storedMarks||t.marks(),ei(n,!0),n.markCursor=null;else if(ei(n,!e.selection.empty),Ze&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=n.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}n.input.composing=!0}hd(n,qh)};function Jh(n){let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(!e||e.nodeType!=1||t>=e.childNodes.length)return!1;let r=e.childNodes[t];return r.nodeType==1&&r.contentEditable=="false"}Ie.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.badSafariComposition?n.domObserver.forceFlush():n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,hd(n,20))};function hd(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>ei(n),e))}function md(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=Zh());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function Yh(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=Up(e.focusNode,e.focusOffset),r=Hp(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,s=n.domObserver.lastChangedTextNode;if(t==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return r}}return t||r}function Zh(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function ei(n,e=!1){if(!(gt&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),md(n),e||n.docView&&n.docView.dirty){let t=No(n),r=n.state.selection;return t&&!t.eq(r)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function jh(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const nr=Le&&It<15||Tn&&Gp<604;Re.copy=Ie.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let s=nr?null:t.clipboardData,o=r.content(),{dom:a,text:l}=Co(n,o);s?(t.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):jh(n,a),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Xh(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function Qh(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?rr(n,r.value,null,i,e):rr(n,r.textContent,r.innerHTML,i,e)},50)}function rr(n,e,t,r,i){let s=od(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,i,s||R.empty)))return!0;if(!s)return!1;let o=Xh(s),a=o?n.state.tr.replaceSelectionWith(o,r):n.state.tr.replaceSelection(s);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function gd(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Ie.paste=(n,e)=>{let t=e;if(n.composing&&!gt)return;let r=nr?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&rr(n,gd(r),r.getData("text/html"),i,t)?t.preventDefault():Qh(n,t)};class bd{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const em=Je?"altKey":"ctrlKey";function yd(n,e){let t=n.someProp("dragCopies",r=>!r(e));return t??!e[em]}Re.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,s=i.empty?null:n.posAtCoords(Wi(t)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof B?i.to-1:i.to))){if(r&&r.mightDrag)o=B.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let u=n.docView.nearestDesc(t.target,!0);u&&u.node.type.spec.draggable&&u!=n.docView&&(o=B.create(n.state.doc,u.posBefore))}}let a=(o||n.state.selection).content(),{dom:l,text:c,slice:d}=Co(n,a);(!t.dataTransfer.files.length||!we||Kc>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(nr?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",nr||t.dataTransfer.setData("text/plain",c),n.dragging=new bd(d,yd(n,t),o)};Re.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};Ie.dragover=Ie.dragenter=(n,e)=>e.preventDefault();Ie.drop=(n,e)=>{try{tm(n,e,n.dragging)}finally{n.dragging=null}};function tm(n,e,t){if(!e.dataTransfer)return;let r=n.posAtCoords(Wi(e));if(!r)return;let i=n.state.doc.resolve(r.pos),s=t&&t.slice;s?n.someProp("transformPasted",p=>{s=p(s,n,!1)}):s=od(n,gd(e.dataTransfer),nr?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(t&&yd(n,e));if(n.someProp("handleDrop",p=>p(n,e,s||R.empty,o))){e.preventDefault();return}if(!s)return;e.preventDefault();let a=s?Sc(n.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let l=n.state.tr;if(o){let{node:p}=t;p?p.replace(l):l.deleteSelection()}let c=l.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,u=l.doc;if(d?l.replaceRangeWith(c,c,s.content.firstChild):l.replaceRange(c,c,s),l.doc.eq(u))return;let f=l.doc.resolve(c);if(d&&B.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))l.setSelection(new B(f));else{let p=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((h,m,g,b)=>p=b),l.setSelection(xo(n,f,l.doc.resolve(p)))}n.focus(),n.dispatch(l.setMeta("uiEvent","drop"))}Re.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&yt(n)},20))};Re.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};Re.beforeinput=(n,e)=>{if(we&>&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",s=>s(n,Ht(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in Ie)Re[n]=Ie[n];function ir(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class ti{constructor(e,t){this.toDOM=e,this.spec=t||Zt,this.side=this.spec.side||0}map(e,t,r,i){let{pos:s,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new xe(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof ti&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ir(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Lt{constructor(e,t){this.attrs=e,this.spec=t||Zt}map(e,t,r,i){let s=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new xe(s,o,this)}valid(e,t){return t.from=e&&(!s||s(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let o=0;oe){let a=this.children[o]+1;this.children[o+2].findInner(e-a,t-a,r,i+a,s)}}map(e,t,r){return this==Ne||e.maps.length==0?this:this.mapInner(e,t,0,0,r||Zt)}mapInner(e,t,r,i,s){let o;for(let a=0;a{let c=l+r,d;if(d=kd(t,a,c)){for(i||(i=this.children.slice());sa&&u.to=e){this.children[a]==e&&(r=this.children[a+2]);break}let s=e+1,o=s+t.content.size;for(let a=0;as&&l.type instanceof Lt){let c=Math.max(s,l.from)-s,d=Math.min(o,l.to)-s;ci.map(e,t,Zt));return Nt.from(r)}forChild(e,t){if(t.isLeaf)return ae.empty;let r=[];for(let i=0;it instanceof ae)?e:e.reduce((t,r)=>t.concat(r instanceof ae?r:r.members),[]))}}forEachSet(e){for(let t=0;t{let g=m-h-(p-f);for(let b=0;bE+d-u)continue;let y=a[b]+d-u;p>=y?a[b+1]=f<=y?-2:-1:f>=d&&g&&(a[b]+=g,a[b+1]+=g)}u+=g}),d=t.maps[c].map(d,-1)}let l=!1;for(let c=0;c=r.content.size){l=!0;continue}let f=t.map(n[c+1]+s,-1),p=f-i,{index:h,offset:m}=r.content.findIndex(u),g=r.maybeChild(h);if(g&&m==u&&m+g.nodeSize==p){let b=a[c+2].mapInner(t,g,d+1,n[c]+s+1,o);b!=Ne?(a[c]=u,a[c+1]=p,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=rm(a,n,e,t,i,s,o),d=ni(c,r,0,o);e=d.local;for(let u=0;ut&&o.to{let c=kd(n,a,l+t);if(c){s=!0;let d=ni(c,a,t+l+1,r);d!=Ne&&i.push(l,l+a.nodeSize,d)}});let o=Ed(s?_d(n):n,-t).sort(jt);for(let a=0;a0;)e++;n.splice(e,0,t)}function Es(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=Ne&&e.push(r)}),n.cursorWrapper&&e.push(ae.create(n.state.doc,[n.cursorWrapper.deco])),Nt.from(e)}const im={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},sm=Le&&It<=11;class om{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class am{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new om,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():Ce&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),sm&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,im)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Fa(this.view)){if(this.suppressingSelectionUpdates)return yt(this.view);if(Le&&It<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&nn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let s=e.focusNode;s;s=wn(s))t.add(s);for(let s=e.anchorNode;s;s=wn(s))if(t.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Fa(e)&&!this.ignoreSelectionChange(r),s=-1,o=-1,a=!1,l=[];if(e.editable)for(let d=0;dd.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let d of l)if(d.nodeName=="BR"&&d.parentNode){let u=d.nextSibling;for(;u&&u.nodeType==1;){if(u.contentEditable=="false"){d.parentNode.removeChild(d);break}u=u.firstChild}}}else if(Ze&&l.length){let d=l.filter(u=>u.nodeName=="BR");if(d.length==2){let[u,f]=d;u.parentNode&&u.parentNode.parentNode==f.parentNode?f.remove():u.remove()}else{let{focusNode:u}=this.currentSelection;for(let f of d){let p=f.parentNode;p&&p.nodeName=="LI"&&(!u||dm(e,u)!=p)&&f.remove()}}}let c=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||i)&&(s>-1&&(e.docView.markDirty(s,o),lm(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,um(e,l)),this.handleDOMChange(s,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||yt(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;di;g--){let b=r.childNodes[g-1],E=b.pmViewDesc;if(b.nodeName=="BR"&&!E){s=g;break}if(!E||E.size)break}let u=n.state.doc,f=n.someProp("domParser")||Rt.fromSchema(n.state.schema),p=u.resolve(o),h=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:pm,context:p});if(c&&c[0].pos!=null){let g=c[0].pos,b=c[1]&&c[1].pos;b==null&&(b=g),h={anchor:g+o,head:b+o}}return{doc:m,sel:h,from:o,to:a}}function pm(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(Ce&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||Ce&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const hm=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function mm(n,e,t,r,i){let s=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let C=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,T=No(n,C);if(T&&!n.state.selection.eq(T)){if(we&>&&n.input.lastKeyCode===13&&Date.now()-100I(n,Ht(13,"Enter"))))return;let _=n.state.tr.setSelection(T);C=="pointer"?_.setMeta("pointer",!0):C=="key"&&_.scrollIntoView(),s&&_.setMeta("composition",s),n.dispatch(_)}return}let o=n.state.doc.resolve(e),a=o.sharedDepth(t);e=o.before(a+1),t=n.state.doc.resolve(t).after(a+1);let l=n.state.selection,c=fm(n,e,t),d=n.state.doc,u=d.slice(c.from,c.to),f,p;n.input.lastKeyCode===8&&Date.now()-100Date.now()-225||gt)&&i.some(C=>C.nodeType==1&&!hm.test(C.nodeName))&&(!h||h.endA>=h.endB)&&n.someProp("handleKeyDown",C=>C(n,Ht(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!h)if(r&&l instanceof z&&!l.empty&&l.$head.sameParent(l.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let C=Xa(n,n.state.doc,c.sel);if(C&&!C.eq(n.state.selection)){let T=n.state.tr.setSelection(C);s&&T.setMeta("composition",s),n.dispatch(T)}}return}n.state.selection.fromn.state.selection.from&&h.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?h.start=n.state.selection.from:h.endA=n.state.selection.to-2&&n.state.selection.to<=c.to&&(h.endB+=n.state.selection.to-h.endA,h.endA=n.state.selection.to)),Le&&It<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let m=c.doc.resolveNoCache(h.start-c.from),g=c.doc.resolveNoCache(h.endB-c.from),b=d.resolve(h.start),E=m.sameParent(g)&&m.parent.inlineContent&&b.end()>=h.endA;if((Tn&&n.input.lastIOSEnter>Date.now()-225&&(!E||i.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!E&&m.posC(n,Ht(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>h.start&&bm(d,h.start,h.endA,m,g)&&n.someProp("handleKeyDown",C=>C(n,Ht(8,"Backspace")))){gt&&we&&n.domObserver.suppressSelectionUpdates();return}we&&h.endB==h.start&&(n.input.lastChromeDelete=Date.now()),gt&&!E&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,g=c.doc.resolveNoCache(h.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(C){return C(n,Ht(13,"Enter"))})},20));let y=h.start,S=h.endA,v=C=>{let T=C||n.state.tr.replace(y,S,c.doc.slice(h.start-c.from,h.endB-c.from));if(c.sel){let _=Xa(n,T.doc,c.sel);_&&!(we&&n.composing&&_.empty&&(h.start!=h.endB||n.input.lastChromeDeleteyt(n),20));let C=v(n.state.tr.delete(y,S)),T=d.resolve(h.start).marksAcross(d.resolve(h.endA));T&&C.ensureMarks(T),n.dispatch(C)}else if(h.endA==h.endB&&(x=gm(m.parent.content.cut(m.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,h.endA-b.start())))){let C=v(n.state.tr);x.type=="add"?C.addMark(y,S,x.mark):C.removeMark(y,S,x.mark),n.dispatch(C)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let C=m.parent.textBetween(m.parentOffset,g.parentOffset),T=()=>v(n.state.tr.insertText(C,y,S));n.someProp("handleTextInput",_=>_(n,y,S,C,T))||n.dispatch(T())}else n.dispatch(v());else n.dispatch(v())}function Xa(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:xo(n,e.resolve(t.anchor),e.resolve(t.head))}function gm(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,s=r,o,a,l;for(let d=0;dd.mark(a.addToSet(d.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=d=>d.mark(a.removeFromSet(d.marks));else return null;let c=[];for(let d=0;dt||ks(o,!0,!1)0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let s=n.node(r).maybeChild(n.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function ym(n,e,t,r,i){let s=n.findDiffStart(e,t);if(s==null)return null;let{a:o,b:a}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));r-=o+l-s}if(o=o?s-r:0;s-=l,s&&s=a?s-r:0;s-=l,s&&s=56320&&e<=57343&&t>=55296&&t<=56319}class Sd{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Dh,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(il),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=nl(this),tl(this),this.nodeViews=rl(this),this.docView=Da(this.state.doc,el(this),Es(this),this.dom,this),this.domObserver=new am(this,(r,i,s,o)=>mm(this,r,i,s,o)),this.domObserver.start(),Lh(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Xs(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(il),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(md(this),o=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let p=rl(this);km(p,this.nodeViews)&&(this.nodeViews=p,s=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&Xs(this),this.editable=nl(this),tl(this);let l=Es(this),c=el(this),d=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",u=s||!this.docView.matchesNode(e.doc,c,l);(u||!e.selection.eq(i.selection))&&(o=!0);let f=d=="preserve"&&o&&this.dom.style.overflowAnchor==null&&Yp(this);if(o){this.domObserver.stop();let p=u&&(Le||we)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Em(i.selection,e.selection);if(u){let h=we?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Yh(this)),(s||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Da(e.doc,c,l,this.dom,this)),h&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Eh(this))?yt(this,p):(rd(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():f&&Zp(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof B){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Ca(this,t.getBoundingClientRect(),e)}else Ca(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t0&&st.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return nh(this,e)}coordsAtPos(e,t=1){return Yc(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return ah(this,t||this.state,e)}pasteHTML(e,t){return rr(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return rr(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return Co(this,e)}destroy(){this.docView&&(Ph(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Es(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,zp())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return $h(this,e)}domSelectionRange(){let e=this.domSelection();return e?Ce&&this.root.nodeType===11&&Vp(this.dom.ownerDocument)==this.dom&&cm(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Sd.prototype.dispatch=function(n){let e=this._props.dispatchTransaction;e?e.call(this,n):this.updateState(this.state.apply(n))};function el(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[xe.node(0,n.state.doc.content.size,e)]}function tl(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:xe.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function nl(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Em(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function rl(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function km(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function il(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Pt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ri={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_m=typeof navigator<"u"&&/Mac/.test(navigator.platform),Sm=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ve=0;ve<10;ve++)Pt[48+ve]=Pt[96+ve]=String(ve);for(var ve=1;ve<=24;ve++)Pt[ve+111]="F"+ve;for(var ve=65;ve<=90;ve++)Pt[ve]=String.fromCharCode(ve+32),ri[ve]=String.fromCharCode(ve);for(var _s in Pt)ri.hasOwnProperty(_s)||(ri[_s]=Pt[_s]);function vm(n){var e=_m&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Sm&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?ri:Pt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const wm=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Tm=typeof navigator<"u"&&/Win/.test(navigator.platform);function Nm(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,s,o;for(let a=0;a{for(var t in e)Mm(n,t,{get:e[t],enumerable:!0})};function Gi(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:i}=t,{storedMarks:s}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,s=t.storedMarks,t}}}var qi=class{constructor(n){this.editor=n.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=n.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:n,editor:e,state:t}=this,{view:r}=e,{tr:i}=t,s=this.buildProps(i);return Object.fromEntries(Object.entries(n).map(([o,a])=>[o,(...c)=>{const d=a(...c)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(n,e=!0){const{rawCommands:t,editor:r,state:i}=this,{view:s}=r,o=[],a=!!n,l=n||i.tr,c=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(l),o.every(u=>u===!0)),d={...Object.fromEntries(Object.entries(t).map(([u,f])=>[u,(...h)=>{const m=this.buildProps(l,e),g=f(...h)(m);return o.push(g),d}])),run:c};return d}createCan(n){const{rawCommands:e,state:t}=this,r=!1,i=n||t.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>l(...c)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(n,e=!0){const{rawCommands:t,editor:r,state:i}=this,{view:s}=r,o={tr:n,editor:r,view:s,state:Gi({state:i,transaction:n}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(n,e),can:()=>this.createCan(n),get commands(){return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>l(...c)(o)]))}};return o}},wd={};Do(wd,{blur:()=>Am,clearContent:()=>Om,clearNodes:()=>Rm,command:()=>Im,createParagraphNear:()=>Dm,cut:()=>Lm,deleteCurrentNode:()=>Pm,deleteNode:()=>Bm,deleteRange:()=>$m,deleteSelection:()=>zm,enter:()=>Fm,exitCode:()=>Um,extendMarkRange:()=>Hm,first:()=>Km,focus:()=>Wm,forEach:()=>Gm,insertContent:()=>qm,insertContentAt:()=>Zm,joinBackward:()=>Qm,joinDown:()=>Xm,joinForward:()=>eg,joinItemBackward:()=>tg,joinItemForward:()=>ng,joinTextblockBackward:()=>rg,joinTextblockForward:()=>ig,joinUp:()=>jm,keyboardShortcut:()=>og,lift:()=>ag,liftEmptyBlock:()=>lg,liftListItem:()=>cg,newlineInCode:()=>dg,resetAttributes:()=>ug,scrollIntoView:()=>fg,selectAll:()=>pg,selectNodeBackward:()=>hg,selectNodeForward:()=>mg,selectParentNode:()=>gg,selectTextblockEnd:()=>bg,selectTextblockStart:()=>yg,setContent:()=>Eg,setMark:()=>Fg,setMeta:()=>Ug,setNode:()=>Hg,setNodeSelection:()=>Kg,setTextDirection:()=>Vg,setTextSelection:()=>Wg,sinkListItem:()=>Gg,splitBlock:()=>qg,splitListItem:()=>Jg,toggleList:()=>Yg,toggleMark:()=>Zg,toggleNode:()=>jg,toggleWrap:()=>Xg,undoInputRule:()=>Qg,unsetAllMarks:()=>eb,unsetMark:()=>tb,unsetTextDirection:()=>nb,updateAttributes:()=>rb,wrapIn:()=>ib,wrapInList:()=>sb});var Am=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())==null||t.removeAllRanges())}),!0),Om=(n=!0)=>({commands:e})=>e.setContent("",{emitUpdate:n}),Rm=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:s,$to:o})=>{n.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:d}=e,u=c.resolve(d.map(l)),f=c.resolve(d.map(l+a.nodeSize)),p=u.blockRange(f);if(!p)return;const h=An(p);if(a.type.isTextblock){const{defaultType:m}=u.parent.contentMatchAt(u.index());e.setNodeMarkup(p.start,m)}(h||h===0)&&e.lift(p,h)})}),!0},Im=n=>e=>n(e),Dm=()=>({state:n,dispatch:e})=>$c(n,e),Lm=(n,e)=>({editor:t,tr:r})=>{const{state:i}=t,s=i.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new z(r.doc.resolve(Math.max(o-1,0)))),!0},Pm=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const i=n.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){const a=i.before(s),l=i.after(s);n.delete(a,l).scrollIntoView()}return!0}return!1};function me(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}var Bm=n=>({tr:e,state:t,dispatch:r})=>{const i=me(n,t.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){const l=s.before(o),c=s.after(o);e.delete(l,c).scrollIntoView()}return!0}return!1},$m=n=>({tr:e,dispatch:t})=>{const{from:r,to:i}=n;return t&&e.delete(r,i),!0},zm=()=>({state:n,dispatch:e})=>ko(n,e),Fm=()=>({commands:n})=>n.keyboardShortcut("Enter"),Um=()=>({state:n,dispatch:e})=>wp(n,e);function Lo(n){return Object.prototype.toString.call(n)==="[object RegExp]"}function ii(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>t.strict?e[i]===n[i]:Lo(e[i])?e[i].test(n[i]):e[i]===n[i]):!0}function Td(n,e,t={}){return n.find(r=>r.type===e&&ii(Object.fromEntries(Object.keys(t).map(i=>[i,r.attrs[i]])),t))}function sl(n,e,t={}){return!!Td(n,e,t)}function Po(n,e,t){var r;if(!n||!e)return;let i=n.parent.childAfter(n.parentOffset);if((!i.node||!i.node.marks.some(d=>d.type===e))&&(i=n.parent.childBefore(n.parentOffset)),!i.node||!i.node.marks.some(d=>d.type===e)||(t=t||((r=i.node.marks[0])==null?void 0:r.attrs),!Td([...i.node.marks],e,t)))return;let o=i.index,a=n.start()+i.offset,l=o+1,c=a+i.node.nodeSize;for(;o>0&&sl([...n.parent.child(o-1).marks],e,t);)o-=1,a-=n.parent.child(o).nodeSize;for(;l({tr:t,state:r,dispatch:i})=>{const s=Et(n,r.schema),{doc:o,selection:a}=t,{$from:l,from:c,to:d}=a;if(i){const u=Po(l,s,e);if(u&&u.from<=c&&u.to>=d){const f=z.create(o,u.from,u.to);t.setSelection(f)}}return!0},Km=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r({editor:t,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};const o=()=>{(si()||ol())&&r.dom.focus(),Vm()&&!si()&&!ol()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};try{if(r.hasFocus()&&n===null||n===!1)return!0}catch{return!1}if(s&&n===null&&!Nd(t.state.selection))return o(),!0;const a=xd(i.doc,n)||t.state.selection,l=t.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},Gm=(n,e)=>t=>n.every((r,i)=>e(r,{...t,index:i})),qm=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),Cd=n=>{const e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){const r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&Cd(r)}return n};function Sr(n){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`${n}`,t=new window.DOMParser().parseFromString(e,"text/html").body;return Cd(t)}function sr(n,e,t){if(n instanceof et||n instanceof w)return n;t={slice:!0,parseOptions:{},...t};const r=typeof n=="object"&&n!==null,i=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return w.fromArray(n.map(a=>e.nodeFromJSON(a)));const o=e.nodeFromJSON(n);return t.errorOnInvalidContent&&o.check(),o}catch(s){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",s),sr("",e,t)}if(i){if(t.errorOnInvalidContent){let o=!1,a="";const l=new uc({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?Rt.fromSchema(l).parseSlice(Sr(n),t.parseOptions):Rt.fromSchema(l).parse(Sr(n),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=Rt.fromSchema(e);return t.slice?s.parseSlice(Sr(n),t.parseOptions).content:s.parse(Sr(n),t.parseOptions)}return sr("",e,t)}function Jm(n,e,t){const r=n.steps.length-1;if(r{o===0&&(o=d)}),n.setSelection(H.near(n.doc.resolve(o),t))}var Ym=n=>!("type"in n),Zm=(n,e,t)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){t={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let a;const l=g=>{s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...t.parseOptions};if(!t.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{sr(e,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(g){l(g)}try{a=sr(e,s.schema,{parseOptions:c,errorOnInvalidContent:(o=t.errorOnInvalidContent)!=null?o:s.options.enableContentCheck})}catch(g){return l(g),!1}let{from:d,to:u}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},f=!0,p=!0;if((Ym(a)?a:[a]).forEach(g=>{g.check(),f=f?g.isText&&g.marks.length===0:!1,p=p?g.isBlock:!1}),d===u&&p){const{parent:g}=r.doc.resolve(d);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(d-=1,u+=1)}let m;if(f){if(Array.isArray(e))m=e.map(g=>g.text||"").join("");else if(e instanceof w){let g="";e.forEach(b=>{b.text&&(g+=b.text)}),m=g}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,d,u)}else{m=a;const g=r.doc.resolve(d),b=g.node(),E=g.parentOffset===0,y=b.isText||b.isTextblock,S=b.content.size>0;E&&y&&S&&(d=Math.max(0,d-1)),r.replaceWith(d,u,m)}t.updateSelection&&Jm(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:d,text:m}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:d,text:m})}return!0},jm=()=>({state:n,dispatch:e})=>_p(n,e),Xm=()=>({state:n,dispatch:e})=>Sp(n,e),Qm=()=>({state:n,dispatch:e})=>Oc(n,e),eg=()=>({state:n,dispatch:e})=>Lc(n,e),tg=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Fi(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},ng=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Fi(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},rg=()=>({state:n,dispatch:e})=>Ep(n,e),ig=()=>({state:n,dispatch:e})=>kp(n,e);function Md(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function sg(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,i,s,o;for(let a=0;a({editor:e,view:t,tr:r,dispatch:i})=>{const s=sg(n).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,a))});return l==null||l.steps.forEach(c=>{const d=c.map(r.mapping);d&&i&&r.maybeStep(d)}),!0};function Bt(n,e,t={}){const{from:r,to:i,empty:s}=n.selection,o=e?me(e,n.schema):null,a=[];n.doc.nodesBetween(r,i,(u,f)=>{if(u.isText)return;const p=Math.max(r,f),h=Math.min(i,f+u.nodeSize);a.push({node:u,from:p,to:h})});const l=i-r,c=a.filter(u=>o?o.name===u.node.type.name:!0).filter(u=>ii(u.node.attrs,t,{strict:!1}));return s?!!c.length:c.reduce((u,f)=>u+f.to-f.from,0)>=l}var ag=(n,e={})=>({state:t,dispatch:r})=>{const i=me(n,t.schema);return Bt(t,i,e)?vp(t,r):!1},lg=()=>({state:n,dispatch:e})=>zc(n,e),cg=n=>({state:e,dispatch:t})=>{const r=me(n,e.schema);return Lp(r)(e,t)},dg=()=>({state:n,dispatch:e})=>Bc(n,e);function Ji(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function al(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}var ug=(n,e)=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null;const a=Ji(typeof n=="string"?n:n.name,r.schema);if(!a)return!1;a==="node"&&(s=me(n,r.schema)),a==="mark"&&(o=Et(n,r.schema));let l=!1;return t.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(d,u)=>{s&&s===d.type&&(l=!0,i&&t.setNodeMarkup(u,void 0,al(d.attrs,e))),o&&d.marks.length&&d.marks.forEach(f=>{o===f.type&&(l=!0,i&&t.addMark(u,u+d.nodeSize,o.create(al(f.attrs,e))))})})}),l},fg=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),pg=()=>({tr:n,dispatch:e})=>{if(e){const t=new Fe(n.doc);n.setSelection(t)}return!0},hg=()=>({state:n,dispatch:e})=>Ic(n,e),mg=()=>({state:n,dispatch:e})=>Pc(n,e),gg=()=>({state:n,dispatch:e})=>xp(n,e),bg=()=>({state:n,dispatch:e})=>Ap(n,e),yg=()=>({state:n,dispatch:e})=>Mp(n,e);function Qs(n,e,t={},r={}){return sr(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}var Eg=(n,{errorOnInvalidContent:e,emitUpdate:t=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{const{doc:l}=s;if(r.preserveWhitespace!=="full"){const c=Qs(n,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return o&&s.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!t),!0}return o&&s.setMeta("preventUpdate",!t),a.insertContentAt({from:0,to:l.content.size},n,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function Ad(n,e){const t=Et(e,n.schema),{from:r,to:i,empty:s}=n.selection,o=[];s?(n.storedMarks&&o.push(...n.storedMarks),o.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===t.name);return a?{...a.attrs}:{}}function Od(n,e){const t=new xc(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}function kg(n){for(let e=0;e{e(r)&&t.push({node:r,pos:i})}),t}function _g(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(i,s)=>{t(i)&&r.push({node:i,pos:s})}),r}function Sg(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function Yi(n){return e=>Sg(e.$from,n)}function P(n,e,t){return n.config[e]===void 0&&n.parent?P(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?P(n.parent,e,t):null}):n.config[e]}function Bo(n){return n.map(e=>{const t={name:e.name,options:e.options,storage:e.storage},r=P(e,"addExtensions",t);return r?[e,...Bo(r())]:e}).flat(10)}function $o(n,e){const t=on.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}function Rd(n){return typeof n=="function"}function X(n,e=void 0,...t){return Rd(n)?e?n.bind(e)(...t):n(...t):n}function vg(n={}){return Object.keys(n).length===0&&n.constructor===Object}function Nn(n){const e=n.filter(i=>i.type==="extension"),t=n.filter(i=>i.type==="node"),r=n.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function Id(n){const e=[],{nodeExtensions:t,markExtensions:r}=Nn(n),i=[...t,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=t.filter(c=>c.name!=="text").map(c=>c.name),a=r.map(c=>c.name),l=[...o,...a];return n.forEach(c=>{const d={name:c.name,options:c.options,storage:c.storage,extensions:i},u=P(c,"addGlobalAttributes",d);if(!u)return;u().forEach(p=>{let h;Array.isArray(p.types)?h=p.types:p.types==="*"?h=l:p.types==="nodes"?h=o:p.types==="marks"?h=a:h=[],h.forEach(m=>{Object.entries(p.attributes).forEach(([g,b])=>{e.push({type:m,name:g,attribute:{...s,...b}})})})})}),i.forEach(c=>{const d={name:c.name,options:c.options,storage:c.storage},u=P(c,"addAttributes",d);if(!u)return;const f=u();Object.entries(f).forEach(([p,h])=>{const m={...s,...h};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:c.name,name:p,attribute:m})})}),e}function wg(n){const e=[];let t="",r=!1,i=!1,s=0;const o=n.length;for(let a=0;a0){s-=1,t+=l;continue}if(l===";"&&s===0){e.push(t),t="";continue}}t+=l}return t&&e.push(t),e}function ll(n){const e=[],t=wg(n||""),r=t.length;for(let i=0;i!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const a=s?String(s).split(" "):[],l=r[i]?r[i].split(" "):[],c=a.filter(d=>!l.includes(d));r[i]=[...l,...c].join(" ")}else if(i==="style"){const a=new Map([...ll(r[i]),...ll(s)]);r[i]=Array.from(a.entries()).map(([l,c])=>`${l}: ${c}`).join("; ")}else r[i]=s}),r},{})}function or(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>ge(t,r),{})}function Tg(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function cl(n,e){return"style"in n?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const i=e.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(t):Tg(t.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...r,...i}}}}function dl(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&vg(t)?!1:t!=null))}function ul(n){var e,t;const r={};return!((e=n==null?void 0:n.attribute)!=null&&e.isRequired)&&"default"in((n==null?void 0:n.attribute)||{})&&(r.default=n.attribute.default),((t=n==null?void 0:n.attribute)==null?void 0:t.validate)!==void 0&&(r.validate=n.attribute.validate),[n.name,r]}function Ng(n,e){var t;const r=Id(n),{nodeExtensions:i,markExtensions:s}=Nn(n),o=(t=i.find(c=>P(c,"topNode")))==null?void 0:t.name,a=Object.fromEntries(i.map(c=>{const d=r.filter(b=>b.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((b,E)=>{const y=P(E,"extendNodeSchema",u);return{...b,...y?y(c):{}}},{}),p=dl({...f,content:X(P(c,"content",u)),marks:X(P(c,"marks",u)),group:X(P(c,"group",u)),inline:X(P(c,"inline",u)),atom:X(P(c,"atom",u)),selectable:X(P(c,"selectable",u)),draggable:X(P(c,"draggable",u)),code:X(P(c,"code",u)),whitespace:X(P(c,"whitespace",u)),linebreakReplacement:X(P(c,"linebreakReplacement",u)),defining:X(P(c,"defining",u)),isolating:X(P(c,"isolating",u)),attrs:Object.fromEntries(d.map(ul))}),h=X(P(c,"parseHTML",u));h&&(p.parseDOM=h.map(b=>cl(b,d)));const m=P(c,"renderHTML",u);m&&(p.toDOM=b=>m({node:b,HTMLAttributes:or(b,d)}));const g=P(c,"renderText",u);return g&&(p.toText=g),[c.name,p]})),l=Object.fromEntries(s.map(c=>{const d=r.filter(g=>g.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((g,b)=>{const E=P(b,"extendMarkSchema",u);return{...g,...E?E(c):{}}},{}),p=dl({...f,inclusive:X(P(c,"inclusive",u)),excludes:X(P(c,"excludes",u)),group:X(P(c,"group",u)),spanning:X(P(c,"spanning",u)),code:X(P(c,"code",u)),attrs:Object.fromEntries(d.map(ul))}),h=X(P(c,"parseHTML",u));h&&(p.parseDOM=h.map(g=>cl(g,d)));const m=P(c,"renderHTML",u);return m&&(p.toDOM=g=>m({mark:g,HTMLAttributes:or(g,d)})),[c.name,p]}));return new uc({topNode:o,nodes:a,marks:l})}function xg(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}function Wn(n){return n.sort((t,r)=>{const i=P(t,"priority")||100,s=P(r,"priority")||100;return i>s?-1:ir.name));return t.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${t.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function Ld(n,e,t){const{from:r,to:i}=e,{blockSeparator:s=` - -`,textSerializers:o={}}=t||{};let a="";return n.nodesBetween(r,i,(l,c,d,u)=>{var f;l.isBlock&&c>r&&(a+=s);const p=o==null?void 0:o[l.type.name];if(p)return d&&(a+=p({node:l,pos:c,parent:d,index:u,range:e})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)==null?void 0:f.slice(Math.max(r,c)-c,i-c))}),a}function Cg(n,e){const t={from:0,to:n.content.size};return Ld(n,t,e)}function Pd(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function Mg(n,e){const t=me(e,n.schema),{from:r,to:i}=n.selection,s=[];n.doc.nodesBetween(r,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===t.name);return o?{...o.attrs}:{}}function Bd(n,e){const t=Ji(typeof e=="string"?e:e.name,n.schema);return t==="node"?Mg(n,e):t==="mark"?Ad(n,e):{}}function Ag(n,e=JSON.stringify){const t={};return n.filter(r=>{const i=e(r);return Object.prototype.hasOwnProperty.call(t,i)?!1:t[i]=!0})}function Og(n){const e=Ag(n);return e.length===1?e:e.filter((t,r)=>!e.filter((s,o)=>o!==r).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function $d(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((i,s)=>{const o=[];if(i.ranges.length)i.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=t[s];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const c=e.slice(s).map(a,-1),d=e.slice(s).map(l),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),Og(r)}function zo(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(i=>{const s=t.resolve(n),o=Po(s,i.type);o&&r.push({mark:i,...o})}):t.nodesBetween(n,e,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}var Rg=(n,e,t,r=20)=>{const i=n.doc.resolve(t);let s=r,o=null;for(;s>0&&o===null;){const a=i.node(s);(a==null?void 0:a.type.name)===e?o=a:s-=1}return[o,s]};function In(n,e){return e.nodes[n]||e.marks[n]||null}function $r(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const i=n.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var Ig=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(i,s,o,a)=>{var l,c;const d=((c=(l=i.type.spec).toText)==null?void 0:c.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";t+=i.isAtom&&!i.isText?d:d.slice(0,Math.max(0,r-s))}),t};function to(n,e,t={}){const{empty:r,ranges:i}=n.selection,s=e?Et(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(u=>s?s.name===u.type.name:!0).find(u=>ii(u.attrs,t,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:u,$to:f})=>{const p=u.pos,h=f.pos;n.doc.nodesBetween(p,h,(m,g)=>{if(s&&m.inlineContent&&!m.type.allowsMarkType(s))return!1;if(!m.isText&&!m.marks.length)return;const b=Math.max(p,g),E=Math.min(h,g+m.nodeSize),y=E-b;o+=y,a.push(...m.marks.map(S=>({mark:S,from:b,to:E})))})}),o===0)return!1;const l=a.filter(u=>s?s.name===u.mark.type.name:!0).filter(u=>ii(u.mark.attrs,t,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=a.filter(u=>s?u.mark.type!==s&&u.mark.type.excludes(s):!0).reduce((u,f)=>u+f.to-f.from,0);return(l>0?l+c:l)>=o}function Dg(n,e,t={}){if(!e)return Bt(n,null,t)||to(n,null,t);const r=Ji(e,n.schema);return r==="node"?Bt(n,e,t):r==="mark"?to(n,e,t):!1}var Lg=(n,e)=>{const{$from:t,$to:r,$anchor:i}=n.selection;if(e){const s=Yi(a=>a.type.name===e)(n.selection);if(!s)return!1;const o=n.doc.resolve(s.pos+1);return i.pos+1===o.end()}return!(r.parentOffset{const{$from:e,$to:t}=n.selection;return!(e.parentOffset>0||e.pos!==t.pos)};function fl(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function pl(n,e){const{nodeExtensions:t}=Nn(e),r=t.find(o=>o.name===n);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=X(P(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function Zi(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return!/\S/.test((r=n.text)!=null?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let i=!0;return n.content.forEach(s=>{i!==!1&&(Zi(s,{ignoreWhitespace:t,checkChildren:e})||(i=!1))}),i}return!1}function zd(n){return n instanceof B}var Fd=class Ud{constructor(e){this.position=e}static fromJSON(e){return new Ud(e.position)}toJSON(){return{position:this.position}}};function Bg(n,e){const t=e.mapping.mapResult(n.position);return{position:new Fd(t.pos),mapResult:t}}function $g(n){return new Fd(n)}function zg(n,e,t){var r;const{selection:i}=e;let s=null;if(Nd(i)&&(s=i.$cursor),s){const a=(r=n.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(t)&&(!!t.isInSet(a)||!a.some(c=>c.type.excludes(t)))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(a.pos,l.pos,(d,u,f)=>{if(c)return!1;if(d.isInline){const p=!f||f.type.allowsMarkType(t),h=!!t.isInSet(d.marks)||!d.marks.some(m=>m.type.excludes(t));c=p&&h}return!c}),c})}var Fg=(n,e={})=>({tr:t,state:r,dispatch:i})=>{const{selection:s}=t,{empty:o,ranges:a}=s,l=Et(n,r.schema);if(i)if(o){const c=Ad(r,l);t.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const d=c.$from.pos,u=c.$to.pos;r.doc.nodesBetween(d,u,(f,p)=>{const h=Math.max(p,d),m=Math.min(p+f.nodeSize,u);f.marks.find(b=>b.type===l)?f.marks.forEach(b=>{l===b.type&&t.addMark(h,m,l.create({...b.attrs,...e}))}):t.addMark(h,m,l.create(e))})});return zg(r,t,l)},Ug=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),Hg=(n,e={})=>({state:t,dispatch:r,chain:i})=>{const s=me(n,t.schema);let o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:a})=>Ta(s,{...o,...e})(t)?!0:a.clearNodes()).command(({state:a})=>Ta(s,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Kg=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,i=Gt(n,0,r.content.size),s=B.create(r,i);e.setSelection(s)}return!0},Vg=(n,e)=>({tr:t,state:r,dispatch:i})=>{const{selection:s}=r;let o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=s.from,a=s.to),i&&t.doc.nodesBetween(o,a,(l,c)=>{l.isText||t.setNodeMarkup(c,void 0,{...l.attrs,dir:n})}),!0},Wg=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:i,to:s}=typeof n=="number"?{from:n,to:n}:n,o=z.atStart(r).from,a=z.atEnd(r).to,l=Gt(i,o,a),c=Gt(s,o,a),d=z.create(r,l,c);e.setSelection(d)}return!0},Gg=n=>({state:e,dispatch:t})=>{const r=me(n,e.schema);return $p(r)(e,t)};function hl(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(i=>e==null?void 0:e.includes(i.type.name));n.tr.ensureMarks(r)}}var qg=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{const{selection:s,doc:o}=e,{$from:a,$to:l}=s,c=i.extensionManager.attributes,d=$r(c,a.node().type.name,a.node().attrs);if(s instanceof B&&s.node.isBlock)return!a.parentOffset||!bt(o,a.pos)?!1:(r&&(n&&hl(t,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const u=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:kg(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=u&&f?[{type:f,attrs:d}]:void 0,h=bt(e.doc,e.mapping.map(a.pos),1,p);if(!p&&!h&&bt(e.doc,e.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:d}]:void 0),r){if(h&&(s instanceof z&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,p),f&&!u&&!a.parentOffset&&a.parent.type!==f)){const m=e.mapping.map(a.before()),g=e.doc.resolve(m);a.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&e.setNodeMarkup(e.mapping.map(a.before()),f)}n&&hl(t,i.extensionManager.splittableMarks),e.scrollIntoView()}return h},Jg=(n,e={})=>({tr:t,state:r,dispatch:i,editor:s})=>{var o;const a=me(n,r.schema),{$from:l,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;const u=l.node(-1);if(u.type!==a)return!1;const f=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let b=w.empty;const E=l.index(-1)?1:l.index(-2)?2:3;for(let T=l.depth-E;T>=l.depth-3;T-=1)b=w.from(l.node(T).copy(b));const y=l.indexAfter(-1){if(C>-1)return!1;T.isTextblock&&T.content.size===0&&(C=_+1)}),C>-1&&t.setSelection(z.near(t.doc.resolve(C))),t.scrollIntoView()}return!0}const p=c.pos===l.end()?u.contentMatchAt(0).defaultType:null,h={...$r(f,u.type.name,u.attrs),...e},m={...$r(f,l.node().type.name,l.node().attrs),...e};t.delete(l.pos,c.pos);const g=p?[{type:a,attrs:h},{type:p,attrs:m}]:[{type:a,attrs:h}];if(!bt(t.doc,l.pos,2))return!1;if(i){const{selection:b,storedMarks:E}=r,{splittableMarks:y}=s.extensionManager,S=E||b.$to.parentOffset&&b.$from.marks();if(t.split(l.pos,2,g).scrollIntoView(),!S||!i)return!0;const v=S.filter(x=>y.includes(x.type.name));t.ensureMarks(v)}return!0},vs=(n,e)=>{const t=Yi(o=>o.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const i=n.doc.nodeAt(r);return t.node.type===(i==null?void 0:i.type)&&$t(n.doc,t.pos)&&n.join(t.pos),!0},ws=(n,e)=>{const t=Yi(o=>o.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const i=n.doc.nodeAt(r);return t.node.type===(i==null?void 0:i.type)&&$t(n.doc,r)&&n.join(r),!0},Yg=(n,e,t,r={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:u,splittableMarks:f}=i.extensionManager,p=me(n,o.schema),h=me(e,o.schema),{selection:m,storedMarks:g}=o,{$from:b,$to:E}=m,y=b.blockRange(E),S=g||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;const v=Yi(x=>pl(x.type.name,u))(m);if(y.depth>=1&&v&&y.depth-v.depth<=1){if(v.node.type===p)return c.liftListItem(h);if(pl(v.node.type.name,u)&&p.validContent(v.node.content)&&a)return l().command(()=>(s.setNodeMarkup(v.pos,p),!0)).command(()=>vs(s,p)).command(()=>ws(s,p)).run()}return!t||!S||!a?l().command(()=>d().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>vs(s,p)).command(()=>ws(s,p)).run():l().command(()=>{const x=d().wrapInList(p,r),C=S.filter(T=>f.includes(T.type.name));return s.ensureMarks(C),x?!0:c.clearNodes()}).wrapInList(p,r).command(()=>vs(s,p)).command(()=>ws(s,p)).run()},Zg=(n,e={},t={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=t,o=Et(n,r.schema);return to(r,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},jg=(n,e,t={})=>({state:r,commands:i})=>{const s=me(n,r.schema),o=me(e,r.schema),a=Bt(r,s,t);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...t})},Xg=(n,e={})=>({state:t,commands:r})=>{const i=me(n,t.schema);return Bt(t,i,e)?r.lift(i):r.wrapIn(i,e)},Qg=()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,n.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},eb=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:i}=t;return r||e&&i.forEach(s=>{n.removeMark(s.$from.pos,s.$to.pos)}),!0},tb=(n,e={})=>({tr:t,state:r,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=t,l=Et(n,r.schema),{$from:c,empty:d,ranges:u}=a;if(!i)return!0;if(d&&o){let{from:f,to:p}=a;const h=(s=c.marks().find(g=>g.type===l))==null?void 0:s.attrs,m=Po(c,l,h);m&&(f=m.from,p=m.to),t.removeMark(f,p,l)}else u.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,l)});return t.removeStoredMark(l),!0},nb=n=>({tr:e,state:t,dispatch:r})=>{const{selection:i}=t;let s,o;return typeof n=="number"?(s=n,o=n):n&&"from"in n&&"to"in n?(s=n.from,o=n.to):(s=i.from,o=i.to),r&&e.doc.nodesBetween(s,o,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},rb=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null;const a=Ji(typeof n=="string"?n:n.name,r.schema);if(!a)return!1;a==="node"&&(s=me(n,r.schema)),a==="mark"&&(o=Et(n,r.schema));let l=!1;return t.selection.ranges.forEach(c=>{const d=c.$from.pos,u=c.$to.pos;let f,p,h,m;t.selection.empty?r.doc.nodesBetween(d,u,(g,b)=>{s&&s===g.type&&(l=!0,h=Math.max(b,d),m=Math.min(b+g.nodeSize,u),f=b,p=g)}):r.doc.nodesBetween(d,u,(g,b)=>{b=d&&b<=u&&(s&&s===g.type&&(l=!0,i&&t.setNodeMarkup(b,void 0,{...g.attrs,...e})),o&&g.marks.length&&g.marks.forEach(E=>{if(o===E.type&&(l=!0,i)){const y=Math.max(b,d),S=Math.min(b+g.nodeSize,u);t.addMark(y,S,o.create({...E.attrs,...e}))}}))}),p&&(f!==void 0&&i&&t.setNodeMarkup(f,void 0,{...p.attrs,...e}),o&&p.marks.length&&p.marks.forEach(g=>{o===g.type&&i&&t.addMark(h,m,o.create({...g.attrs,...e}))}))}),l},ib=(n,e={})=>({state:t,dispatch:r})=>{const i=me(n,t.schema);return Op(i,e)(t,r)},sb=(n,e={})=>({state:t,dispatch:r})=>{const i=me(n,t.schema);return Rp(i,e)(t,r)},ob=class{constructor(){this.callbacks={}}on(n,e){return this.callbacks[n]||(this.callbacks[n]=[]),this.callbacks[n].push(e),this}emit(n,...e){const t=this.callbacks[n];return t&&t.forEach(r=>r.apply(this,e)),this}off(n,e){const t=this.callbacks[n];return t&&(e?this.callbacks[n]=t.filter(r=>r!==e):delete this.callbacks[n]),this}once(n,e){const t=(...r)=>{this.off(n,t),e.apply(this,r)};return this.on(n,t)}removeAllListeners(){this.callbacks={}}},ji=class{constructor(n){var e;this.find=n.find,this.handler=n.handler,this.undoable=(e=n.undoable)!=null?e:!0}},ab=(n,e)=>{if(Lo(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function vr(n){var e;const{editor:t,from:r,to:i,text:s,rules:o,plugin:a}=n,{view:l}=t;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(f=>f.type.spec.code))return!1;let d=!1;const u=Ig(c)+s;return o.forEach(f=>{if(d)return;const p=ab(u,f.find);if(!p)return;const h=l.state.tr,m=Gi({state:l.state,transaction:h}),g={from:r-(p[0].length-s.length),to:i},{commands:b,chain:E,can:y}=new qi({editor:t,state:m});f.handler({state:m,range:g,match:p,commands:b,chain:E,can:y})===null||!h.steps.length||(f.undoable&&h.setMeta(a,{transform:h,from:r,to:i,text:s}),l.dispatch(h),d=!0)}),d}function lb(n){const{editor:e,rules:t}=n,r=new le({state:{init(){return null},apply(i,s,o){const a=i.getMeta(r);if(a)return a;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=$o(w.from(d),o.schema);const{from:u}=l,f=u+d.length;vr({editor:e,from:u,to:f,text:d,rules:t,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return vr({editor:e,from:s,to:o,text:a,rules:t,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&vr({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?vr({editor:e,from:o.pos,to:o.pos,text:` -`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function cb(n){return Object.prototype.toString.call(n).slice(8,-1)}function wr(n){return cb(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Hd(n,e){const t={...n};return wr(n)&&wr(e)&&Object.keys(e).forEach(r=>{wr(e[r])&&wr(n[r])?t[r]=Hd(n[r],e[r]):t[r]=e[r]}),t}var Fo=class{constructor(n={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...n},this.name=this.config.name}get options(){return{...X(P(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...X(P(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(n={}){const e=this.extend({...this.config,addOptions:()=>Hd(this.options,n)});return e.name=this.name,e.parent=this.parent,e}extend(n={}){const e=new this.constructor({...this.config,...n});return e.parent=this,this.child=e,e.name="name"in n?n.name:e.parent.name,e}},an=class Kd extends Fo{constructor(){super(...arguments),this.type="mark"}static create(e={}){const t=typeof e=="function"?e():e;return new Kd(t)}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(c=>(c==null?void 0:c.type.name)===t.name))return!1;const l=o.find(c=>(c==null?void 0:c.type.name)===t.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const t=typeof e=="function"?e():e;return super.extend(t)}};function db(n){return typeof n=="number"}var ub=class{constructor(n){this.find=n.find,this.handler=n.handler}},fb=(n,e,t)=>{if(Lo(e))return[...n.matchAll(e)];const r=e(n,t);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=n,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function pb(n){const{editor:e,state:t,from:r,to:i,rule:s,pasteEvent:o,dropEvent:a}=n,{commands:l,chain:c,can:d}=new qi({editor:e,state:t}),u=[];return t.doc.nodesBetween(r,i,(p,h)=>{var m,g,b,E,y;if((g=(m=p.type)==null?void 0:m.spec)!=null&&g.code||!(p.isText||p.isTextblock||p.isInline))return;const S=(y=(E=(b=p.content)==null?void 0:b.size)!=null?E:p.nodeSize)!=null?y:0,v=Math.max(r,h),x=Math.min(i,h+S);if(v>=x)return;const C=p.isText?p.text||"":p.textBetween(v-h,x-h,void 0,"");fb(C,s.find,o).forEach(_=>{if(_.index===void 0)return;const I=v+_.index+1,V=I+_[0].length,se={from:t.tr.mapping.map(I),to:t.tr.mapping.map(V)},ue=s.handler({state:t,range:se,match:_,commands:l,chain:c,can:d,pasteEvent:o,dropEvent:a});u.push(ue)})}),u.every(p=>p!==null)}var Tr=null,hb=n=>{var e;const t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)==null||e.setData("text/html",n),t};function mb(n){const{editor:e,rules:t}=n;let r=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:d,from:u,to:f,rule:p,pasteEvt:h})=>{const m=d.tr,g=Gi({state:d,transaction:m});if(!(!pb({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return t.map(d=>new le({view(u){const f=h=>{var m;r=(m=u.dom.parentElement)!=null&&m.contains(h.target)?u.dom.parentElement:null,r&&(Tr=e)},p=()=>{Tr&&(Tr=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(s=r===u.dom.parentElement,a=f,!s){const p=Tr;p!=null&&p.isEditable&&setTimeout(()=>{const h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(u,f)=>{var p;const h=(p=f.clipboardData)==null?void 0:p.getData("text/html");return o=f,i=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(u,f,p)=>{const h=u[0],m=h.getMeta("uiEvent")==="paste"&&!i,g=h.getMeta("uiEvent")==="drop"&&!s,b=h.getMeta("applyPasteRules"),E=!!b;if(!m&&!g&&!E)return;if(E){let{text:v}=b;typeof v=="string"?v=v:v=$o(w.from(v),p.schema);const{from:x}=b,C=x+v.length,T=hb(v);return l({rule:d,state:p,from:x,to:{b:C},pasteEvt:T})}const y=f.doc.content.findDiffStart(p.doc.content),S=f.doc.content.findDiffEnd(p.doc.content);if(!(!db(y)||!S||y===S.b))return l({rule:d,state:p,from:y,to:S,pasteEvt:o})}}))}var Xi=class{constructor(n,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=n,this.extensions=Dd(n),this.schema=Ng(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((n,e)=>{const t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:In(e.name,this.schema)},r=P(e,"addCommands",t);return r?{...n,...r()}:n},{})}get plugins(){const{editor:n}=this;return Wn([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:n,type:In(r.name,this.schema)},s=[],o=P(r,"addKeyboardShortcuts",i);let a={};if(r.type==="mark"&&P(r,"exitable",i)&&(a.ArrowRight=()=>an.handleExit({editor:n,mark:r})),o){const f=Object.fromEntries(Object.entries(o()).map(([p,h])=>[p,()=>h({editor:n})]));a={...a,...f}}const l=Cm(a);s.push(l);const c=P(r,"addInputRules",i);if(fl(r,n.options.enableInputRules)&&c){const f=c();if(f&&f.length){const p=lb({editor:n,rules:f}),h=Array.isArray(p)?p:[p];s.push(...h)}}const d=P(r,"addPasteRules",i);if(fl(r,n.options.enablePasteRules)&&d){const f=d();if(f&&f.length){const p=mb({editor:n,rules:f});s.push(...p)}}const u=P(r,"addProseMirrorPlugins",i);if(u){const f=u();s.push(...f)}return s})}get attributes(){return Id(this.extensions)}get nodeViews(){const{editor:n}=this,{nodeExtensions:e}=Nn(this.extensions);return Object.fromEntries(e.filter(t=>!!P(t,"addNodeView")).map(t=>{const r=this.attributes.filter(l=>l.type===t.name),i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:n,type:me(t.name,this.schema)},s=P(t,"addNodeView",i);if(!s)return[];const o=s();if(!o)return[];const a=(l,c,d,u,f)=>{const p=or(l,r);return o({node:l,view:c,getPos:d,decorations:u,innerDecorations:f,editor:n,extension:t,HTMLAttributes:p})};return[t.name,a]}))}dispatchTransaction(n){const{editor:e}=this;return Wn([...this.extensions].reverse()).reduceRight((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:In(i.name,this.schema)},o=P(i,"dispatchTransaction",s);return o?a=>{o.call(s,{transaction:a,next:r})}:r},n)}transformPastedHTML(n){const{editor:e}=this;return Wn([...this.extensions]).reduce((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:In(i.name,this.schema)},o=P(i,"transformPastedHTML",s);return o?(a,l)=>{const c=r(a,l);return o.call(s,c)}:r},n||(r=>r))}get markViews(){const{editor:n}=this,{markExtensions:e}=Nn(this.extensions);return Object.fromEntries(e.filter(t=>!!P(t,"addMarkView")).map(t=>{const r=this.attributes.filter(a=>a.type===t.name),i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:n,type:Et(t.name,this.schema)},s=P(t,"addMarkView",i);if(!s)return[];const o=(a,l,c)=>{const d=or(a,r);return s()({mark:a,view:l,inline:c,editor:n,extension:t,HTMLAttributes:d,updateAttributes:u=>{Mb(a,n,u)}})};return[t.name,o]}))}setupExtensions(){const n=this.extensions;this.editor.extensionStorage=Object.fromEntries(n.map(e=>[e.name,e.storage])),n.forEach(e=>{var t;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:In(e.name,this.schema)};e.type==="mark"&&((t=X(P(e,"keepOnSplit",r)))==null||t)&&this.splittableMarks.push(e.name);const i=P(e,"onBeforeCreate",r),s=P(e,"onCreate",r),o=P(e,"onUpdate",r),a=P(e,"onSelectionUpdate",r),l=P(e,"onTransaction",r),c=P(e,"onFocus",r),d=P(e,"onBlur",r),u=P(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),u&&this.editor.on("destroy",u)})}};Xi.resolve=Dd;Xi.sort=Wn;Xi.flatten=Bo;var gb={};Do(gb,{ClipboardTextSerializer:()=>Wd,Commands:()=>Gd,Delete:()=>qd,Drop:()=>Jd,Editable:()=>Yd,FocusEvents:()=>jd,Keymap:()=>Xd,Paste:()=>Qd,Tabindex:()=>eu,TextDirection:()=>tu,focusEventsPluginKey:()=>Zd});var fe=class Vd extends Fo{constructor(){super(...arguments),this.type="extension"}static create(e={}){const t=typeof e=="function"?e():e;return new Vd(t)}configure(e){return super.configure(e)}extend(e){const t=typeof e=="function"?e():e;return super.extend(t)}},Wd=fe.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new le({key:new be("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(d=>d.$from.pos)),a=Math.max(...s.map(d=>d.$to.pos)),l=Pd(t);return Ld(r,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),Gd=fe.create({name:"commands",addCommands(){return{...wd}}}),qd=fe.create({name:"delete",onUpdate({transaction:n,appendedTransactions:e}){var t,r,i;const s=()=>{var o,a,l,c;if((c=(l=(a=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,n))!=null?c:n.getMeta("y-sync$"))return;const d=Od(n.before,[n,...e]);$d(d).forEach(p=>{d.mapping.mapResult(p.oldRange.from).deletedAfter&&d.mapping.mapResult(p.oldRange.to).deletedBefore&&d.before.nodesBetween(p.oldRange.from,p.oldRange.to,(h,m)=>{const g=m+h.nodeSize-2,b=p.oldRange.from<=m&&g<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:h,from:m,to:g,newFrom:d.mapping.map(m),newTo:d.mapping.map(g),deletedRange:p.oldRange,newRange:p.newRange,partial:!b,editor:this.editor,transaction:n,combinedTransform:d})})});const f=d.mapping;d.steps.forEach((p,h)=>{var m,g;if(p instanceof Qe){const b=f.slice(h).map(p.from,-1),E=f.slice(h).map(p.to),y=f.invert().map(b,-1),S=f.invert().map(E),v=(m=d.doc.nodeAt(b-1))==null?void 0:m.marks.some(C=>C.eq(p.mark)),x=(g=d.doc.nodeAt(E))==null?void 0:g.marks.some(C=>C.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:y,to:S},newRange:{from:b,to:E},partial:!!(x||v),editor:this.editor,transaction:n,combinedTransform:d})}})};(i=(r=(t=this.editor.options.coreExtensionOptions)==null?void 0:t.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),Jd=fe.create({name:"drop",addProseMirrorPlugins(){return[new le({key:new be("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),Yd=fe.create({name:"editable",addProseMirrorPlugins(){return[new le({key:new be("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Zd=new be("focusEvents"),jd=fe.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new le({key:Zd,props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Xd=fe.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:d,$anchor:u}=l,{pos:f,parent:p}=u,h=u.parent.isTextblock&&f>0?a.doc.resolve(f-1):u,m=h.parent.type.spec.isolating,g=u.pos-u.parentOffset,b=m&&h.parent.childCount===1?g===u.pos:H.atStart(c).from===f;return!d||!p.type.isTextblock||p.textContent.length||!b||b&&u.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return si()||Md()?s:i},addProseMirrorPlugins(){return[new le({key:new be("clearDocument"),appendTransaction:(n,e,t)=>{if(n.some(m=>m.getMeta("composition")))return;const r=n.some(m=>m.docChanged)&&!e.doc.eq(t.doc),i=n.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;const{empty:s,from:o,to:a}=e.selection,l=H.atStart(e.doc).from,c=H.atEnd(e.doc).to;if(s||!(o===l&&a===c)||!Zi(t.doc))return;const f=t.tr,p=Gi({state:t,transaction:f}),{commands:h}=new qi({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),Qd=fe.create({name:"paste",addProseMirrorPlugins(){return[new le({key:new be("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),eu=fe.create({name:"tabindex",addProseMirrorPlugins(){return[new le({key:new be("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),tu=fe.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:n}=Nn(this.extensions);return[{types:n.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const t=e.getAttribute("dir");return t&&(t==="ltr"||t==="rtl"||t==="auto")?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new le({key:new be("textDirection"),props:{attributes:()=>{const n=this.options.direction;return n?{dir:n}:{}}}})]}}),bb=class zn{constructor(e,t,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new zn(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new zn(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new zn(e,this.editor)}get children(){const e=[];return this.node.content.forEach((t,r)=>{const i=t.isBlock&&!t.isTextblock,s=t.isAtom&&!t.isText,o=t.isInline,a=this.pos+r+(s?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!i&&!o&&l.depth<=this.depth)return;const c=new zn(l,this.editor,i,i||o?t:null);i&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(t).length>0){const s=i.node.attrs,o=Object.keys(t);for(let a=0;a{r&&i.length>0||(o.node.type.name===e&&s.every(l=>t[l]===o.node.attrs[l])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,t,r))))}),i}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},yb=`.ProseMirror { - position: relative; -} - -.ProseMirror { - word-wrap: break-word; - white-space: pre-wrap; - white-space: break-spaces; - -webkit-font-variant-ligatures: none; - font-variant-ligatures: none; - font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ -} - -.ProseMirror [contenteditable="false"] { - white-space: normal; -} - -.ProseMirror [contenteditable="false"] [contenteditable="true"] { - white-space: pre-wrap; -} - -.ProseMirror pre { - white-space: pre-wrap; -} - -img.ProseMirror-separator { - display: inline !important; - border: none !important; - margin: 0 !important; - width: 0 !important; - height: 0 !important; -} - -.ProseMirror-gapcursor { - display: none; - pointer-events: none; - position: absolute; - margin: 0; -} - -.ProseMirror-gapcursor:after { - content: ""; - display: block; - position: absolute; - top: -2px; - width: 20px; - border-top: 1px solid black; - animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; -} - -@keyframes ProseMirror-cursor-blink { - to { - visibility: hidden; - } -} - -.ProseMirror-hideselection *::selection { - background: transparent; -} - -.ProseMirror-hideselection *::-moz-selection { - background: transparent; -} - -.ProseMirror-hideselection * { - caret-color: transparent; -} - -.ProseMirror-focused .ProseMirror-gapcursor { - display: block; -}`;function Eb(n,e,t){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}var kb=class extends ob{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:i})=>{throw i},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Bg,createMappablePosition:$g},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:i,slice:s,moved:o})=>this.options.onDrop(i,s,o)),this.on("paste",({event:i,slice:s})=>this.options.onPaste(i,s)),this.on("delete",this.options.onDelete);const t=this.createDoc(),r=xd(t,this.options.autofocus);this.editorState=En.create({doc:t,schema:this.schema,selection:r||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const e=this.editorView.dom;e!=null&&e.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Eb(yb,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){const r=Rd(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let r=t;if([].concat(e).forEach(s=>{const o=typeof s=="string"?`${s}$`:s.key;r=r.filter(a=>!a.key.startsWith(o))}),t.length===r.length)return;const i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}createExtensionManager(){var e,t;const i=[...this.options.enableCoreExtensions?[Yd,Wd.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),Gd,jd,Xd,eu,Jd,Qd,qd,tu.configure({direction:this.options.textDirection})].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new Xi(i,this)}createCommandManager(){this.commandManager=new qi({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Qs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),e=Qs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){const{editorProps:t,enableExtensionDispatchTransaction:r}=this.options,i=t.dispatchTransaction||this.dispatchTransaction.bind(this),s=r?this.extensionManager.dispatchTransaction(i):i,o=t.transformPastedHTML,a=this.extensionManager.transformPastedHTML(o);this.editorView=new Sd(e,{...t,attributes:{role:"textbox",...t==null?void 0:t.attributes},dispatchTransaction:s,transformPastedHTML:a,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const l=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(l),this.prependClass(),this.injectCSS();const c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(d=>{var u;return(u=this.capturedTransaction)==null?void 0:u.step(d)});return}const{state:t,transactions:r}=this.state.applyTransaction(e),i=!this.state.selection.eq(t.selection),s=r.includes(e),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!s)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:r.slice(1)}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});const a=r.findLast(d=>d.getMeta("focus")||d.getMeta("blur")),l=a==null?void 0:a.getMeta("focus"),c=a==null?void 0:a.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:a}),c&&this.emit("blur",{editor:this,event:c.event,transaction:a}),!(e.getMeta("preventUpdate")||!r.some(d=>d.docChanged)||o.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:r.slice(1)})}getAttributes(e){return Bd(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,i=typeof e=="string"?t:e;return Dg(this.state,r,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return $o(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=` - -`,textSerializers:r={}}=e||{};return Cg(this.state.doc,{blockSeparator:t,textSerializers:{...Pd(this.schema),...r}})}get isEmpty(){return Zi(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var r;return((r=this.$doc)==null?void 0:r.querySelector(e,t))||null}$nodes(e,t){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new bb(t,this)}get $doc(){return this.$pos(0)}};function xn(n){return new ji({find:n.find,handler:({state:e,range:t,match:r})=>{const i=X(n.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=e,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),c=t.from+a.indexOf(o),d=c+o.length;if(zo(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(m=>m===n.type&&m!==p.mark.type)).filter(p=>p.to>c).length)return null;dt.from&&s.delete(t.from+l,c);const f=t.from+l+o.length;s.addMark(t.from+l,f,n.type.create(i||{})),s.removeStoredMark(n.type)}},undoable:n.undoable})}function _b(n){return new ji({find:n.find,handler:({state:e,range:t,match:r})=>{const i=X(n.getAttributes,void 0,r)||{},{tr:s}=e,o=t.from;let a=t.to;const l=n.type.create(i);if(r[1]){const c=r[0].lastIndexOf(r[1]);let d=o+c;d>a?d=a:a=d+r[1].length;const u=r[0][r[0].length-1];s.insertText(u,o+r[0].length-1),s.replaceWith(d,a,l)}else if(r[0]){const c=n.type.isInline?o:o-1;s.insert(c,n.type.create(i)).delete(s.mapping.map(o),s.mapping.map(a))}s.scrollIntoView()},undoable:n.undoable})}function no(n){return new ji({find:n.find,handler:({state:e,range:t,match:r})=>{const i=e.doc.resolve(t.from),s=X(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,s)},undoable:n.undoable})}function Cn(n){return new ji({find:n.find,handler:({state:e,range:t,match:r,chain:i})=>{const s=X(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),l=o.doc.resolve(t.from).blockRange(),c=l&&yo(l,n.type,s);if(!c)return null;if(o.wrap(l,c),n.keepMarks&&n.editor){const{selection:u,storedMarks:f}=e,{splittableMarks:p}=n.editor.extensionManager,h=f||u.$to.parentOffset&&u.$from.marks();if(h){const m=h.filter(g=>p.includes(g.type.name));o.ensureMarks(m)}}if(n.keepAttributes){const u=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(u,s).run()}const d=o.doc.resolve(t.from-1).nodeBefore;d&&d.type===n.type&&$t(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,d))&&o.join(t.from-1)},undoable:n.undoable})}function Sb(n,e){const{selection:t}=n,{$from:r}=t;if(t instanceof B){const s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){const s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}var vb={};Do(vb,{createAtomBlockMarkdownSpec:()=>wb,createBlockMarkdownSpec:()=>Tb,createInlineMarkdownSpec:()=>Cb,parseAttributes:()=>Uo,parseIndentedBlocks:()=>ro,renderNestedMarkdownContent:()=>Ko,serializeAttributes:()=>Ho});function Uo(n){if(!(n!=null&&n.trim()))return{};const e={},t=[],r=n.replace(/["']([^"']*)["']/g,c=>(t.push(c),`__QUOTED_${t.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){const c=i.map(d=>d.trim().slice(1));e.class=c.join(" ")}const s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);const o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,c,d])=>{var u;const f=parseInt(((u=d.match(/__QUOTED_(\d+)__/))==null?void 0:u[1])||"0",10),p=t[f];p&&(e[c]=p.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(d=>{d.match(/^[a-zA-Z][\w-]*$/)&&(e[d]=!0)}),e}function Ho(n){if(!n||Object.keys(n).length===0)return"";const e=[];return n.class&&String(n.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),n.id&&e.push(`#${n.id}`),Object.entries(n).forEach(([t,r])=>{t==="class"||t==="id"||(r===!0?e.push(t):r!==!1&&r!=null&&e.push(`${t}="${String(r)}"`))}),e.join(" ")}function wb(n){const{nodeName:e,name:t,parseAttributes:r=Uo,serializeAttributes:i=Ho,defaultAttributes:s={},requiredAttributes:o=[],allowedAttributes:a}=n,l=t||e,c=d=>{if(!a)return d;const u={};return a.forEach(f=>{f in d&&(u[f]=d[f])}),u};return{parseMarkdown:(d,u)=>{const f={...s,...d.attributes};return u.createNode(e,f,[])},markdownTokenizer:{name:e,level:"block",start(d){var u;const f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(u=d.match(f))==null?void 0:u.index;return p!==void 0?p:-1},tokenize(d,u,f){const p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),h=d.match(p);if(!h)return;const m=h[1]||"",g=r(m);if(!o.find(E=>!(E in g)))return{type:e,raw:h[0],attributes:g}}},renderMarkdown:d=>{const u=c(d.attrs||{}),f=i(u),p=f?` {${f}}`:"";return`:::${l}${p} :::`}}}function Tb(n){const{nodeName:e,name:t,getContent:r,parseAttributes:i=Uo,serializeAttributes:s=Ho,defaultAttributes:o={},content:a="block",allowedAttributes:l}=n,c=t||e,d=u=>{if(!l)return u;const f={};return l.forEach(p=>{p in u&&(f[p]=u[p])}),f};return{parseMarkdown:(u,f)=>{let p;if(r){const m=r(u);p=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?p=f.parseChildren(u.tokens||[]):p=f.parseInline(u.tokens||[]);const h={...o,...u.attributes};return f.createNode(e,h,p)},markdownTokenizer:{name:e,level:"block",start(u){var f;const p=new RegExp(`^:::${c}`,"m"),h=(f=u.match(p))==null?void 0:f.index;return h!==void 0?h:-1},tokenize(u,f,p){var h;const m=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=u.match(m);if(!g)return;const[b,E=""]=g,y=i(E);let S=1;const v=b.length;let x="";const C=/^:::([\w-]*)(\s.*)?/gm,T=u.slice(v);for(C.lastIndex=0;;){const _=C.exec(T);if(_===null)break;const I=_.index,V=_[1];if(!((h=_[2])!=null&&h.endsWith(":::"))){if(V)S+=1;else if(S-=1,S===0){const se=T.slice(0,I);x=se.trim();const ue=u.slice(0,v+I+_[0].length);let G=[];if(x)if(a==="block")for(G=p.blockTokens(se),G.forEach(W=>{W.text&&(!W.tokens||W.tokens.length===0)&&(W.tokens=p.inlineTokens(W.text))});G.length>0;){const W=G[G.length-1];if(W.type==="paragraph"&&(!W.text||W.text.trim()===""))G.pop();else break}else G=p.inlineTokens(x);return{type:e,raw:ue,attributes:y,content:x,tokens:G}}}}}},renderMarkdown:(u,f)=>{const p=d(u.attrs||{}),h=s(p),m=h?` {${h}}`:"",g=f.renderChildren(u.content||[],` - -`);return`:::${c}${m} - -${g} - -:::`}}}function Nb(n){if(!n.trim())return{};const e={},t=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=t.exec(n);for(;r!==null;){const[,i,s,o]=r;e[i]=s||o,r=t.exec(n)}return e}function xb(n){return Object.entries(n).filter(([,e])=>e!=null).map(([e,t])=>`${e}="${t}"`).join(" ")}function Cb(n){const{nodeName:e,name:t,getContent:r,parseAttributes:i=Nb,serializeAttributes:s=xb,defaultAttributes:o={},selfClosing:a=!1,allowedAttributes:l}=n,c=t||e,d=f=>{if(!l)return f;const p={};return l.forEach(h=>{const m=typeof h=="string"?h:h.name,g=typeof h=="string"?void 0:h.skipIfDefault;if(m in f){const b=f[m];if(g!==void 0&&b===g)return;p[m]=b}}),p},u=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{const h={...o,...f.attributes};if(a)return p.createNode(e,h);const m=r?r(f):f.content||"";return m?p.createNode(e,h,[p.createTextNode(m)]):p.createNode(e,h,[])},markdownTokenizer:{name:e,level:"inline",start(f){const p=a?new RegExp(`\\[${u}\\s*[^\\]]*\\]`):new RegExp(`\\[${u}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${u}\\]`),h=f.match(p),m=h==null?void 0:h.index;return m!==void 0?m:-1},tokenize(f,p,h){const m=a?new RegExp(`^\\[${u}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${u}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${u}\\]`),g=f.match(m);if(!g)return;let b="",E="";if(a){const[,S]=g;E=S}else{const[,S,v]=g;E=S,b=v||""}const y=i(E.trim());return{type:e,raw:g[0],content:b.trim(),attributes:y}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(b=>b.type==="text").map(b=>b.text).join(""));const h=d(f.attrs||{}),m=s(h),g=m?` ${m}`:"";return a?`[${c}${g}]`:`[${c}${g}]${p}[/${c}]`}}}function ro(n,e,t){var r,i,s,o;const a=n.split(` -`),l=[];let c="",d=0;const u=e.baseIndentSize||2;for(;d0)break;if(f.trim()===""){d+=1,c=`${c}${f} -`;continue}else return}const h=e.extractItemData(p),{indentLevel:m,mainContent:g}=h;c=`${c}${f} -`;const b=[g];for(d+=1;dI.trim()!=="");if(C===-1)break;if((((i=(r=a[d+1+C].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>m){b.push(v),c=`${c}${v} -`,d+=1;continue}else break}if((((o=(s=v.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:o.length)||0)>m)b.push(v),c=`${c}${v} -`,d+=1;else break}let E;const y=b.slice(1);if(y.length>0){const v=y.map(x=>x.slice(m+u)).join(` -`);v.trim()&&(e.customNestedParser?E=e.customNestedParser(v):E=t.blockTokens(v))}const S=e.createToken(h,E);l.push(S)}if(l.length!==0)return{items:l,raw:c}}function Ko(n,e,t,r){if(!n||!Array.isArray(n.content))return"";const i=typeof t=="function"?t(r):t,[s,...o]=n.content,a=e.renderChildren([s]);let l=`${i}${a}`;return o&&o.length>0&&o.forEach((c,d)=>{var u,f;const p=(f=(u=e.renderChild)==null?void 0:u.call(e,c,d+1))!=null?f:e.renderChildren([c]);if(p!=null){const h=p.split(` -`).map(m=>m?e.indent(m):e.indent("")).join(` -`);l+=c.type==="paragraph"?` - -${h}`:` -${h}`}}),l}function Mb(n,e,t={}){const{state:r}=e,{doc:i,tr:s}=r,o=n;i.descendants((a,l)=>{const c=s.mapping.map(l),d=s.mapping.map(l)+a.nodeSize;let u=null;if(a.marks.forEach(p=>{if(p!==o)return!1;u=p}),!u)return;let f=!1;if(Object.keys(t).forEach(p=>{t[p]!==u.attrs[p]&&(f=!0)}),f){const p=n.type.create({...n.attrs,...t});s.removeMark(c,d,n.type),s.addMark(c,d,p)}}),s.docChanged&&e.view.dispatch(s)}var Ue=class nu extends Fo{constructor(){super(...arguments),this.type="node"}static create(e={}){const t=typeof e=="function"?e():e;return new nu(t)}configure(e){return super.configure(e)}extend(e){const t=typeof e=="function"?e():e;return super.extend(t)}};function sn(n){return new ub({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{const s=X(n.getAttributes,void 0,r,i);if(s===!1||s===null)return null;const{tr:o}=e,a=r[r.length-1],l=r[0];let c=t.to;if(a){const d=l.search(/\S/),u=t.from+l.indexOf(a),f=u+a.length;if(zo(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;ft.from&&o.delete(t.from+d,u),c=t.from+d+a.length,o.addMark(t.from+d,c,n.type.create(s||{})),o.removeStoredMark(n.type)}}})}function ml(n){return ff((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}var Ab=class extends kb{constructor(n={}){return super(n),this.contentComponent=null,this.appContext=null,this.reactiveState=ml(this.view.state),this.reactiveExtensionStorage=ml(this.extensionStorage),this.on("beforeTransaction",({nextState:e})=>{this.reactiveState.value=e,this.reactiveExtensionStorage.value=this.extensionStorage}),df(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(n,e){const t=super.registerPlugin(n,e);return this.reactiveState&&(this.reactiveState.value=t),t}unregisterPlugin(n){const e=super.unregisterPlugin(n);return this.reactiveState&&e&&(this.reactiveState.value=e),e}},Ob=$i({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=Be(),t=hf();return cf(()=>{const r=n.editor;r&&r.options.element&&e.value&&pf(()=>{var i;if(!e.value||!((i=r.view.dom)!=null&&i.parentNode))return;const s=Y(e.value);e.value.append(...r.view.dom.parentNode.childNodes),r.contentComponent=t.ctx._,t&&(r.appContext={...t.appContext,provides:t.provides}),r.setOptions({element:s}),r.createNodeViews()})}),mo(()=>{const r=n.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return lf("div",{ref:n=>{this.rootEl=n}})}}),Rb=(n={})=>{const e=uf();return Jl(()=>{e.value=new Ab(n)}),mo(()=>{var t,r,i,s;const o=(r=(t=e.value)==null?void 0:t.view.dom)==null?void 0:r.parentNode,a=o==null?void 0:o.cloneNode(!0);(i=o==null?void 0:o.parentNode)==null||i.replaceChild(a,o),(s=e.value)==null||s.destroy()}),e},oi=(n,e)=>{if(n==="slot")return 0;if(n instanceof Function)return n(e);const{children:t,...r}=e??{};if(n==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[n,r,t]},Ib=/^\s*>\s$/,Db=Ue.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return oi("blockquote",{...ge(this.options.HTMLAttributes,n),children:oi("slot",{})})},parseMarkdown:(n,e)=>{var t;const r=(t=e.parseBlockChildren)!=null?t:e.parseChildren;return e.createNode("blockquote",void 0,r(n.tokens||[]))},renderMarkdown:(n,e)=>{if(!n.content)return"";const t=">",r=[];return n.content.forEach((i,s)=>{var o,a;const d=((a=(o=e.renderChild)==null?void 0:o.call(e,i,s))!=null?a:e.renderChildren([i])).split(` -`).map(u=>u.trim()===""?t:`${t} ${u}`);r.push(d.join(` -`))}),r.join(` -${t} -`)},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Cn({find:Ib,type:this.type})]}}),Lb=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Pb=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Bb=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,$b=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,zb=an.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:n=>n.type.name===this.name},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return oi("strong",{...ge(this.options.HTMLAttributes,n),children:oi("slot",{})})},markdownTokenName:"strong",parseMarkdown:(n,e)=>e.applyMark("bold",e.parseInline(n.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(n,e)=>`**${e.renderChildren(n)}**`,addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[xn({find:Lb,type:this.type}),xn({find:Bb,type:this.type})]},addPasteRules(){return[sn({find:Pb,type:this.type}),sn({find:$b,type:this.type})]}}),Fb=/(^|[^`])`([^`]+)`(?!`)$/,Ub=/(^|[^`])`([^`]+)`(?!`)/g,Hb=an.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:n}){return["code",ge(this.options.HTMLAttributes,n),0]},markdownTokenName:"codespan",parseMarkdown:(n,e)=>e.applyMark("code",[{type:"text",text:n.text||""}]),renderMarkdown:(n,e)=>n.content?`\`${e.renderChildren(n.content)}\``:"",addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[xn({find:Fb,type:this.type})]},addPasteRules(){return[sn({find:Ub,type:this.type})]}}),Ts=4,Kb=/^```([a-z]+)?[\s\n]$/,Vb=/^~~~([a-z]+)?[\s\n]$/,ru=Ue.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Ts,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:n=>{var e;const{languageClassPrefix:t}=this.options;if(!t)return null;const s=[...((e=n.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(t)).map(o=>o.replace(t,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:n,HTMLAttributes:e}){return["pre",ge(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(n,e)=>{var t,r;return((t=n.raw)==null?void 0:t.startsWith("```"))===!1&&((r=n.raw)==null?void 0:r.startsWith("~~~"))===!1&&n.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:n.lang||null},n.text?[e.createTextNode(n.text)]:[])},renderMarkdown:(n,e)=>{var t;let r="";const i=((t=n.attrs)==null?void 0:t.language)||"";return n.content?r=[`\`\`\`${i}`,e.renderChildren(n.content),"```"].join(` -`):r=`\`\`\`${i} - -\`\`\``,r},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!n||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:n})=>{var e;if(!this.options.enableTabIndentation)return!1;const t=(e=this.options.tabSize)!=null?e:Ts,{state:r}=n,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;const a=" ".repeat(t);return o?n.commands.insertContent(a):n.commands.command(({tr:l})=>{const{from:c,to:d}=i,p=r.doc.textBetween(c,d,` -`,` -`).split(` -`).map(h=>a+h).join(` -`);return l.replaceWith(c,d,r.schema.text(p)),!0})},"Shift-Tab":({editor:n})=>{var e;if(!this.options.enableTabIndentation)return!1;const t=(e=this.options.tabSize)!=null?e:Ts,{state:r}=n,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type!==this.type?!1:o?n.commands.command(({tr:a})=>{var l;const{pos:c}=s,d=s.start(),u=s.end(),p=r.doc.textBetween(d,u,` -`,` -`).split(` -`);let h=0,m=0;const g=c-d;for(let x=0;x=g){h=x;break}m+=p[x].length+1}const E=((l=p[h].match(/^ */))==null?void 0:l[0])||"",y=Math.min(E.length,t);if(y===0)return!0;let S=d;for(let x=0;x{const{from:l,to:c}=i,f=r.doc.textBetween(l,c,` -`,` -`).split(` -`).map(p=>{var h;const m=((h=p.match(/^ */))==null?void 0:h[0])||"",g=Math.min(m.length,t);return p.slice(g)}).join(` -`);return a.replaceWith(l,c,r.schema.text(f)),!0})},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=n,{selection:t}=e,{$from:r,empty:i}=t;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(` - -`);return!s||!o?!1:n.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:s}=t;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:r.nodeAt(a)?n.commands.command(({tr:c})=>(c.setSelection(H.near(r.resolve(a))),!0)):n.commands.exitCode()}}},addInputRules(){return[no({find:Kb,type:this.type,getAttributes:n=>({language:n[1]})}),no({find:Vb,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new le({key:new be("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!t||!s)return!1;const{tr:o,schema:a}=n.state,l=a.text(t.replace(/\r\n?/g,` -`));return o.replaceSelectionWith(this.type.create({language:s},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(z.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),n.dispatch(o),!0}}})]}}),Wb=Ue.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` - -`):""}),Gb=Ue.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",ge(this.options.HTMLAttributes,n)]},renderText(){return` -`},renderMarkdown:()=>` -`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:s}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&l&&o){const u=l.filter(f=>a.includes(f.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),qb=Ue.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,ge(this.options.HTMLAttributes,e),0]},parseMarkdown:(n,e)=>e.createNode("heading",{level:n.depth||1},e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>{var t;const r=(t=n.attrs)!=null&&t.level?parseInt(n.attrs.level,10):1,i="#".repeat(r);return n.content?`${i} ${e.renderChildren(n.content)}`:""},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>no({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}}),Jb=Ue.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",ge(this.options.HTMLAttributes,n)]},markdownTokenName:"hr",parseMarkdown:(n,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:n,state:e})=>{if(!Sb(e,e.schema.nodes[this.name]))return!1;const{selection:t}=e,{$to:r}=t,i=n();return zd(t)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,tr:o,dispatch:a})=>{if(a){const{$to:l}=o.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(z.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(B.create(o.doc,l.pos)):o.setSelection(z.create(o.doc,l.pos));else{const d=s.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,u=d==null?void 0:d.create();u&&(o.insert(c,u),o.setSelection(z.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[_b({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Yb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Zb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,jb=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Xb=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Qb=an.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:n=>n.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(n,e)=>e.applyMark("italic",e.parseInline(n.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(n,e)=>`*${e.renderChildren(n)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[xn({find:Yb,type:this.type}),xn({find:jb,type:this.type})]},addPasteRules(){return[sn({find:Zb,type:this.type}),sn({find:Xb,type:this.type})]}});const ey="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",ty="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",io="numeric",so="ascii",oo="alpha",Gn="asciinumeric",Fn="alphanumeric",ao="domain",iu="emoji",ny="scheme",ry="slashscheme",Ns="whitespace";function iy(n,e){return n in e||(e[n]=[]),e[n]}function qt(n,e,t){e[io]&&(e[Gn]=!0,e[Fn]=!0),e[so]&&(e[Gn]=!0,e[oo]=!0),e[Gn]&&(e[Fn]=!0),e[oo]&&(e[Fn]=!0),e[Fn]&&(e[ao]=!0),e[iu]&&(e[ao]=!0);for(const r in e){const i=iy(r,t);i.indexOf(n)<0&&i.push(n)}}function sy(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function De(n=null){this.j={},this.jr=[],this.jd=null,this.t=n}De.groups={};De.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;rn.ta(e,t,r,i),ce=(n,e,t,r,i)=>n.tr(e,t,r,i),gl=(n,e,t,r,i)=>n.ts(e,t,r,i),N=(n,e,t,r,i)=>n.tt(e,t,r,i),ut="WORD",lo="UWORD",su="ASCIINUMERICAL",ou="ALPHANUMERICAL",ar="LOCALHOST",co="TLD",uo="UTLD",zr="SCHEME",gn="SLASH_SCHEME",Vo="NUM",fo="WS",Wo="NL",qn="OPENBRACE",Jn="CLOSEBRACE",ai="OPENBRACKET",li="CLOSEBRACKET",ci="OPENPAREN",di="CLOSEPAREN",ui="OPENANGLEBRACKET",fi="CLOSEANGLEBRACKET",pi="FULLWIDTHLEFTPAREN",hi="FULLWIDTHRIGHTPAREN",mi="LEFTCORNERBRACKET",gi="RIGHTCORNERBRACKET",bi="LEFTWHITECORNERBRACKET",yi="RIGHTWHITECORNERBRACKET",Ei="FULLWIDTHLESSTHAN",ki="FULLWIDTHGREATERTHAN",_i="AMPERSAND",Si="APOSTROPHE",vi="ASTERISK",wt="AT",wi="BACKSLASH",Ti="BACKTICK",Ni="CARET",xt="COLON",Go="COMMA",xi="DOLLAR",nt="DOT",Ci="EQUALS",qo="EXCLAMATION",We="HYPHEN",Yn="PERCENT",Mi="PIPE",Ai="PLUS",Oi="POUND",Zn="QUERY",Jo="QUOTE",au="FULLWIDTHMIDDLEDOT",Yo="SEMI",rt="SLASH",jn="TILDE",Ri="UNDERSCORE",lu="EMOJI",Ii="SYM";var cu=Object.freeze({__proto__:null,ALPHANUMERICAL:ou,AMPERSAND:_i,APOSTROPHE:Si,ASCIINUMERICAL:su,ASTERISK:vi,AT:wt,BACKSLASH:wi,BACKTICK:Ti,CARET:Ni,CLOSEANGLEBRACKET:fi,CLOSEBRACE:Jn,CLOSEBRACKET:li,CLOSEPAREN:di,COLON:xt,COMMA:Go,DOLLAR:xi,DOT:nt,EMOJI:lu,EQUALS:Ci,EXCLAMATION:qo,FULLWIDTHGREATERTHAN:ki,FULLWIDTHLEFTPAREN:pi,FULLWIDTHLESSTHAN:Ei,FULLWIDTHMIDDLEDOT:au,FULLWIDTHRIGHTPAREN:hi,HYPHEN:We,LEFTCORNERBRACKET:mi,LEFTWHITECORNERBRACKET:bi,LOCALHOST:ar,NL:Wo,NUM:Vo,OPENANGLEBRACKET:ui,OPENBRACE:qn,OPENBRACKET:ai,OPENPAREN:ci,PERCENT:Yn,PIPE:Mi,PLUS:Ai,POUND:Oi,QUERY:Zn,QUOTE:Jo,RIGHTCORNERBRACKET:gi,RIGHTWHITECORNERBRACKET:yi,SCHEME:zr,SEMI:Yo,SLASH:rt,SLASH_SCHEME:gn,SYM:Ii,TILDE:jn,TLD:co,UNDERSCORE:Ri,UTLD:uo,UWORD:lo,WORD:ut,WS:fo});const ct=/[a-z]/,Dn=new RegExp("\\p{L}","u"),xs=new RegExp("\\p{Emoji}","u"),dt=/\d/,Cs=/\s/,bl="\r",Ms=` -`,oy="️",ay="‍",As="";let Nr=null,xr=null;function ly(n=[]){const e={};De.groups=e;const t=new De;Nr==null&&(Nr=yl(ey)),xr==null&&(xr=yl(ty)),N(t,"'",Si),N(t,"{",qn),N(t,"}",Jn),N(t,"[",ai),N(t,"]",li),N(t,"(",ci),N(t,")",di),N(t,"<",ui),N(t,">",fi),N(t,"(",pi),N(t,")",hi),N(t,"「",mi),N(t,"」",gi),N(t,"『",bi),N(t,"』",yi),N(t,"<",Ei),N(t,">",ki),N(t,"&",_i),N(t,"*",vi),N(t,"@",wt),N(t,"`",Ti),N(t,"^",Ni),N(t,":",xt),N(t,",",Go),N(t,"$",xi),N(t,".",nt),N(t,"=",Ci),N(t,"!",qo),N(t,"-",We),N(t,"%",Yn),N(t,"|",Mi),N(t,"+",Ai),N(t,"#",Oi),N(t,"?",Zn),N(t,'"',Jo),N(t,"/",rt),N(t,";",Yo),N(t,"~",jn),N(t,"_",Ri),N(t,"\\",wi),N(t,"・",au);const r=ce(t,dt,Vo,{[io]:!0});ce(r,dt,r);const i=ce(r,ct,su,{[Gn]:!0}),s=ce(r,Dn,ou,{[Fn]:!0}),o=ce(t,ct,ut,{[so]:!0});ce(o,dt,i),ce(o,ct,o),ce(i,dt,i),ce(i,ct,i);const a=ce(t,Dn,lo,{[oo]:!0});ce(a,ct),ce(a,dt,s),ce(a,Dn,a),ce(s,dt,s),ce(s,ct),ce(s,Dn,s);const l=N(t,Ms,Wo,{[Ns]:!0}),c=N(t,bl,fo,{[Ns]:!0}),d=ce(t,Cs,fo,{[Ns]:!0});N(t,As,d),N(c,Ms,l),N(c,As,d),ce(c,Cs,d),N(d,bl),N(d,Ms),ce(d,Cs,d),N(d,As,d);const u=ce(t,xs,lu,{[iu]:!0});N(u,"#"),ce(u,xs,u),N(u,oy,u);const f=N(u,ay);N(f,"#"),ce(f,xs,u);const p=[[ct,o],[dt,i]],h=[[ct,null],[Dn,a],[dt,s]];for(let m=0;mm[0]>g[0]?1:-1);for(let m=0;m=0?E[ao]=!0:ct.test(g)?dt.test(g)?E[Gn]=!0:E[so]=!0:E[io]=!0,gl(t,g,g,E)}return gl(t,"localhost",ar,{ascii:!0}),t.jd=new De(Ii),{start:t,tokens:Object.assign({groups:e},cu)}}function du(n,e){const t=cy(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=t.length,i=[];let s=0,o=0;for(;o=0&&(u+=t[o].length,f++),c+=t[o].length,s+=t[o].length,o++;s-=u,o-=f,c-=u,i.push({t:d.t,v:e.slice(s-c,s),s:s-c,e:s})}return i}function cy(n){const e=[],t=n.length;let r=0;for(;r56319||r+1===t||(s=n.charCodeAt(r+1))<56320||s>57343?n[r]:n.slice(r,r+2);e.push(o),r+=o.length}return e}function _t(n,e,t,r,i){let s;const o=e.length;for(let a=0;a=0;)s++;if(s>0){e.push(t.join(""));for(let o=parseInt(n.substring(r,r+s),10);o>0;o--)t.pop();r+=s}else t.push(n[r]),r++}return e}const lr={defaultProtocol:"http",events:null,format:El,formatHref:El,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Zo(n,e=null){let t=Object.assign({},lr);n&&(t=Object.assign(t,n instanceof Zo?n.o:n));const r=t.ignoreTags,i=[];for(let s=0;st?r.substring(0,t)+"…":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n=lr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),i=n.get("tagName",t,e),s=this.toFormattedString(n),o={},a=n.get("className",t,e),l=n.get("target",t,e),c=n.get("rel",t,e),d=n.getObj("attributes",t,e),u=n.getObj("events",t,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),d&&Object.assign(o,d),{tagName:i,attributes:o,content:s,eventListeners:u}}};function Qi(n,e){class t extends uu{constructor(i,s){super(i,s),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const kl=Qi("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),_l=Qi("text"),dy=Qi("nl"),Cr=Qi("url",{isLink:!0,toHref(n=lr.defaultProtocol){return this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==ar&&n[1].t===xt}}),Ve=n=>new De(n);function uy({groups:n}){const e=n.domain.concat([_i,vi,wt,wi,Ti,Ni,xi,Ci,We,Vo,Yn,Mi,Ai,Oi,rt,Ii,jn,Ri]),t=[Si,xt,Go,nt,qo,Yn,Zn,Jo,Yo,ui,fi,qn,Jn,li,ai,ci,di,pi,hi,mi,gi,bi,yi,Ei,ki],r=[_i,Si,vi,wi,Ti,Ni,xi,Ci,We,qn,Jn,Yn,Mi,Ai,Oi,Zn,rt,Ii,jn,Ri],i=Ve(),s=N(i,jn);U(s,r,s),U(s,n.domain,s);const o=Ve(),a=Ve(),l=Ve();U(i,n.domain,o),U(i,n.scheme,a),U(i,n.slashscheme,l),U(o,r,s),U(o,n.domain,o);const c=N(o,wt);N(s,wt,c),N(a,wt,c),N(l,wt,c);const d=N(s,nt);U(d,r,s),U(d,n.domain,s);const u=Ve();U(c,n.domain,u),U(u,n.domain,u);const f=N(u,nt);U(f,n.domain,u);const p=Ve(kl);U(f,n.tld,p),U(f,n.utld,p),N(c,ar,p);const h=N(u,We);N(h,We,h),U(h,n.domain,u),U(p,n.domain,u),N(p,nt,f),N(p,We,h);const m=N(p,xt);U(m,n.numeric,kl);const g=N(o,We),b=N(o,nt);N(g,We,g),U(g,n.domain,o),U(b,r,s),U(b,n.domain,o);const E=Ve(Cr);U(b,n.tld,E),U(b,n.utld,E),U(E,n.domain,o),U(E,r,s),N(E,nt,b),N(E,We,g),N(E,wt,c);const y=N(E,xt),S=Ve(Cr);U(y,n.numeric,S);const v=Ve(Cr),x=Ve();U(v,e,v),U(v,t,x),U(x,e,v),U(x,t,x),N(E,rt,v),N(S,rt,v);const C=N(a,xt),T=N(l,xt),_=N(T,rt),I=N(_,rt);U(a,n.domain,o),N(a,nt,b),N(a,We,g),U(l,n.domain,o),N(l,nt,b),N(l,We,g),U(C,n.domain,v),N(C,rt,v),N(C,Zn,v),U(I,n.domain,v),U(I,e,v),N(I,rt,v);const V=[[qn,Jn],[ai,li],[ci,di],[ui,fi],[pi,hi],[mi,gi],[bi,yi],[Ei,ki]];for(let se=0;se=0&&f++,i++,d++;if(f<0)i-=d,i0&&(s.push(Os(_l,e,o)),o=[]),i-=f,d-=f;const p=u.t,h=t.slice(i-d,i);s.push(Os(p,e,h))}}return o.length>0&&s.push(Os(_l,e,o)),s}function Os(n,e,t){const r=t[0].s,i=t[t.length-1].e,s=e.slice(r,i);return new n(s,t)}const py=typeof console<"u"&&console&&console.warn||(()=>{}),hy="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ie={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function my(){return De.groups={},ie.scanner=null,ie.parser=null,ie.tokenQueue=[],ie.pluginQueue=[],ie.customSchemes=[],ie.initialized=!1,ie}function Sl(n,e=!1){if(ie.initialized&&py(`linkifyjs: already initialized - will not register custom scheme "${n}" ${hy}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format. -1. Must only contain digits, lowercase ASCII letters or "-" -2. Cannot start or end with "-" -3. "-" cannot repeat`);ie.customSchemes.push([n,e])}function gy(){ie.scanner=ly(ie.customSchemes);for(let n=0;n{const i=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=r,a=Od(t.doc,[...e]);if($d(a).forEach(({newRange:c})=>{const d=_g(r.doc,c,p=>p.isTextblock);let u,f;if(d.length>1)u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(d.length){const p=r.doc.textBetween(c.from,c.to," "," ");if(!yy.test(p))return;u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")}if(u&&f){const p=f.split(by).filter(Boolean);if(p.length<=0)return!1;const h=p[p.length-1],m=u.pos+f.lastIndexOf(h);if(!h)return!1;const g=jo(h).map(b=>b.toObject(n.defaultProtocol));if(!ky(g))return!1;g.filter(b=>b.isLink).map(b=>({...b,from:m+b.start+1,to:m+b.end+1})).filter(b=>r.schema.marks.code?!r.doc.rangeHasMark(b.from,b.to,r.schema.marks.code):!0).filter(b=>n.validate(b.value)).filter(b=>n.shouldAutoLink(b.value)).forEach(b=>{zo(b.from,b.to,r.doc).some(E=>E.mark.type===n.type)||o.addMark(b.from,b.to,n.type.create({href:b.href}))})}}),!!o.steps.length)return o}})}function Sy(n){return new le({key:new be("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{const l=r.target;if(!l)return!1;const c=n.editor.view.dom;o=l.closest("a"),o&&!c.contains(o)&&(o=null)}if(!o)return!1;let a=!1;if(n.enableClickSelection&&(a=n.editor.commands.extendMarkRange(n.type.name)),n.openOnClick){const l=Bd(e.state,n.type.name),c=(i=o.href)!=null?i:l.href,d=(s=o.target)!=null?s:l.target;c&&(window.open(c,d),a=!0)}return a}}})}function vy(n){return new le({key:new be("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{shouldAutoLink:i}=n,{state:s}=e,{selection:o}=s,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});const c=fu(l,{defaultProtocol:n.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!c||i!==void 0&&!i(c.value)?!1:n.editor.commands.setMark(n.type,{href:c.href})}}})}function Ut(n,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&t.push(i)}),!n||n.replace(Ey,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var wy=an.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){Sl(n);return}Sl(n.scheme,n.optionalSlashes)})},onDestroy(){my()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!Ut(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(n),t=/^[a-z][a-z0-9+.-]*:/i.test(n);if(e||t&&!n.includes("@"))return!0;const i=(n.includes("@")?n.split("@").pop():n).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{const e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Ut(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!Ut(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",ge(this.options.HTMLAttributes,n),0]:["a",ge(this.options.HTMLAttributes,{...n,href:""}),0]},markdownTokenName:"link",parseMarkdown:(n,e)=>e.applyMark("link",e.parseInline(n.tokens||[]),{href:n.href,title:n.title||null}),renderMarkdown:(n,e)=>{var t,r,i,s;const o=(r=(t=n.attrs)==null?void 0:t.href)!=null?r:"",a=(s=(i=n.attrs)==null?void 0:i.title)!=null?s:"",l=e.renderChildren(n);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Ut(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{const{href:t}=n||{};return t&&!this.options.isAllowedUri(t,{defaultValidate:r=>!!Ut(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[sn({find:n=>{const e=[];if(n){const{protocols:t,defaultProtocol:r}=this.options,i=fu(n).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!Ut(o,t),protocols:t,defaultProtocol:r}));i.length&&i.forEach(s=>{this.options.shouldAutoLink(s.value)&&e.push({text:s.value,data:{href:s.href},index:s.start})})}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(_y({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!Ut(i,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),n.push(Sy({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&n.push(vy({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),n}}),Ty=Object.defineProperty,Ny=(n,e)=>{for(var t in e)Ty(n,t,{get:e[t],enumerable:!0})},xy="listItem",vl="textStyle",wl=/^\s*([-+*])\s$/,pu=Ue.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",ge(this.options.HTMLAttributes,n),0]},markdownTokenName:"list",parseMarkdown:(n,e)=>n.type!=="list"||n.ordered?[]:{type:"bulletList",content:n.items?e.parseChildren(n.items):[]},renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` -`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(xy,this.editor.getAttributes(vl)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Cn({find:wl,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Cn({find:wl,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(vl),editor:this.editor})),[n]}}),hu=Ue.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ge(this.options.HTMLAttributes,n),0]},markdownTokenName:"list_item",parseMarkdown:(n,e)=>{var t;if(n.type!=="list_item")return[];const r=(t=e.parseBlockChildren)!=null?t:e.parseChildren;let i=[];if(n.tokens&&n.tokens.length>0)if(n.tokens.some(o=>o.type==="paragraph"))i=r(n.tokens);else{const o=n.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(i=[{type:"paragraph",content:e.parseInline(o.tokens)}],n.tokens.length>1){const l=n.tokens.slice(1),c=r(l);i.push(...c)}}else i=r(n.tokens)}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(n,e,t)=>Ko(n,e,r=>{var i,s;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((s=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:s.start)||1)+r.index}. `:"- "},t),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Cy={};Ny(Cy,{findListItemPos:()=>hr,getNextListDepth:()=>Qo,handleBackspace:()=>po,handleDelete:()=>ho,hasListBefore:()=>mu,hasListItemAfter:()=>My,hasListItemBefore:()=>gu,listItemHasSubList:()=>bu,nextListIsDeeper:()=>yu,nextListIsHigher:()=>Eu});var hr=(n,e)=>{const{$from:t}=e.selection,r=me(n,e.schema);let i=null,s=t.depth,o=t.pos,a=null;for(;s>0&&a===null;)i=t.node(s),i.type===r?a=s:(s-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},Qo=(n,e)=>{const t=hr(n,e);if(!t)return!1;const[,r]=Rg(e,n,t.$pos.pos+4);return r},mu=(n,e,t)=>{const{$anchor:r}=n.selection,i=Math.max(0,r.pos-2),s=n.doc.resolve(i).node();return!(!s||!t.includes(s.type.name))},gu=(n,e)=>{var t;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((t=i.nodeBefore)==null?void 0:t.type.name)!==n)},bu=(n,e,t)=>{if(!t)return!1;const r=me(n,e.schema);let i=!1;return t.descendants(s=>{s.type===r&&(i=!0)}),i},po=(n,e,t)=>{if(n.commands.undoInputRule())return!0;if(n.state.selection.from!==n.state.selection.to)return!1;if(!Bt(n.state,e)&&mu(n.state,e,t)){const{$anchor:a}=n.state.selection,l=n.state.doc.resolve(a.before()-1),c=[];l.node().descendants((f,p)=>{f.type.name===e&&c.push({node:f,pos:p})});const d=c.at(-1);if(!d)return!1;const u=n.state.doc.resolve(l.start()+d.pos+1);return n.chain().cut({from:a.start()-1,to:a.end()+1},u.end()).joinForward().run()}if(!Bt(n.state,e)||!Pg(n.state))return!1;const r=hr(e,n.state);if(!r)return!1;const s=n.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=bu(e,n.state,s);return gu(e,n.state)&&!o?n.commands.joinItemBackward():n.chain().liftListItem(e).run()},yu=(n,e)=>{const t=Qo(n,e),r=hr(n,e);return!r||!t?!1:t>r.depth},Eu=(n,e)=>{const t=Qo(n,e),r=hr(n,e);return!r||!t?!1:t{if(!Bt(n.state,e)||!Lg(n.state,e))return!1;const{selection:t}=n.state,{$from:r,$to:i}=t;return!t.empty&&r.sameParent(i)?!1:yu(e,n.state)?n.chain().focus(n.state.selection.from+4).lift(e).joinBackward().run():Eu(e,n.state)?n.chain().joinForward().joinBackward().run():n.commands.joinItemForward()},My=(n,e)=>{var t;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((t=i.nodeAfter)==null?void 0:t.type.name)!==n)},ku=fe.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t})=>{n.state.schema.nodes[t]!==void 0&&ho(n,t)&&(e=!0)}),e},"Mod-Delete":({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t})=>{n.state.schema.nodes[t]!==void 0&&ho(n,t)&&(e=!0)}),e},Backspace:({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t,wrapperNames:r})=>{n.state.schema.nodes[t]!==void 0&&po(n,t,r)&&(e=!0)}),e},"Mod-Backspace":({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t,wrapperNames:r})=>{n.state.schema.nodes[t]!==void 0&&po(n,t,r)&&(e=!0)}),e}}}}),Tl=/^(\s*)(\d+)\.\s+(.*)$/,Ay=/^\s/;function Oy(n){const e=[];let t=0,r=0;for(;te;)f.push(n[u]),u+=1;if(f.length>0){const p=Math.min(...f.map(m=>m.indent)),h=_u(f,p,t);c.push({type:"list",ordered:!0,start:f[0].number,items:h,raw:f.map(m=>m.raw).join(` -`)})}i.push({type:"list_item",raw:o.raw,tokens:c}),s=u}else s+=1}return i}function Ry(n,e){return n.map(t=>{if(t.type!=="list_item")return e.parseChildren([t])[0];const r=[];return t.tokens&&t.tokens.length>0&&t.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){const s=e.parseChildren([i]);r.push({type:"paragraph",content:s})}else{const s=e.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var Iy="listItem",Nl="textStyle",xl=/^(\d+)\.\s$/,Su=Ue.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:null,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",ge(this.options.HTMLAttributes,t),0]:["ol",ge(this.options.HTMLAttributes,n),0]},markdownTokenName:"list",parseMarkdown:(n,e)=>{if(n.type!=="list"||!n.ordered)return[];const t=n.start||1,r=n.items?Ry(n.items,e):[];return t!==1?{type:"orderedList",attrs:{start:t},content:r}:{type:"orderedList",content:r}},renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` -`):"",markdownTokenizer:{name:"orderedList",level:"block",start:n=>{const e=n.match(/^(\s*)(\d+)\.\s+/),t=e==null?void 0:e.index;return t!==void 0?t:-1},tokenize:(n,e,t)=>{var r;const i=n.split(` -`),[s,o]=Oy(i);if(s.length===0)return;const a=_u(s,0,t);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=s[0])==null?void 0:r.number)||1,items:a,raw:i.slice(0,o).join(` -`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Iy,this.editor.getAttributes(Nl)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Cn({find:xl,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Cn({find:xl,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Nl)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),Dy=/^\s*(\[([( |x])?\])\s$/,Ly=Ue.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:n=>{const e=n.getAttribute("data-checked");return e===""||e==="true"},renderHTML:n=>({"data-checked":n.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:n,HTMLAttributes:e}){return["li",ge(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:n.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(n,e)=>{const t=[];if(n.tokens&&n.tokens.length>0?t.push(e.createNode("paragraph",{},e.parseInline(n.tokens))):n.text?t.push(e.createNode("paragraph",{},[e.createNode("text",{text:n.text})])):t.push(e.createNode("paragraph",{},[])),n.nestedTokens&&n.nestedTokens.length>0){const r=e.parseChildren(n.nestedTokens);t.push(...r)}return e.createNode("taskItem",{checked:n.checked||!1},t)},renderMarkdown:(n,e)=>{var t;const i=`- [${(t=n.attrs)!=null&&t.checked?"x":" "}] `;return Ko(n,e,i)},addKeyboardShortcuts(){const n={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...n,Tab:()=>this.editor.commands.sinkListItem(this.name)}:n},addNodeView(){return({node:n,HTMLAttributes:e,getPos:t,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=u=>{var f,p;a.ariaLabel=((p=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:p.call(f,u,a.checked))||`Task item checkbox for ${u.textContent||"empty task item"}`};c(n),s.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:f}=u.target;r.isEditable&&typeof t=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{const h=t();if(typeof h!="number")return!1;const m=p.doc.nodeAt(h);return p.setNodeMarkup(h,void 0,{...m==null?void 0:m.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(n,f)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,f])=>{i.setAttribute(u,f)}),i.dataset.checked=n.attrs.checked,a.checked=n.attrs.checked,s.append(a,o),i.append(s,l),Object.entries(e).forEach(([u,f])=>{i.setAttribute(u,f)});let d=new Set(Object.keys(e));return{dom:i,contentDOM:l,update:u=>{if(u.type!==this.type)return!1;i.dataset.checked=u.attrs.checked,a.checked=u.attrs.checked,c(u);const f=r.extensionManager.attributes,p=or(u,f),h=new Set(Object.keys(p)),m=this.options.HTMLAttributes;return d.forEach(g=>{h.has(g)||(g in m?i.setAttribute(g,m[g]):i.removeAttribute(g))}),Object.entries(p).forEach(([g,b])=>{b==null?g in m?i.setAttribute(g,m[g]):i.removeAttribute(g):i.setAttribute(g,b)}),d=h,!0}}}},addInputRules(){return[Cn({find:Dy,type:this.type,getAttributes:n=>({checked:n[n.length-1]==="x"})})]}}),Py=Ue.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:n}){return["ul",ge(this.options.HTMLAttributes,n,{"data-type":this.name}),0]},parseMarkdown:(n,e)=>e.createNode("taskList",{},e.parseChildren(n.items||[])),renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` -`):"",markdownTokenizer:{name:"taskList",level:"block",start(n){var e;const t=(e=n.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return t!==void 0?t:-1},tokenize(n,e,t){const r=s=>{const o=ro(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:t.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},t);return o?[{type:"taskList",raw:o.raw,items:o.items}]:t.blockTokens(s)},i=ro(n,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,o)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:t.inlineTokens(s.mainContent),nestedTokens:o}),customNestedParser:r},t);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});fe.create({name:"listKit",addExtensions(){const n=[];return this.options.bulletList!==!1&&n.push(pu.configure(this.options.bulletList)),this.options.listItem!==!1&&n.push(hu.configure(this.options.listItem)),this.options.listKeymap!==!1&&n.push(ku.configure(this.options.listKeymap)),this.options.orderedList!==!1&&n.push(Su.configure(this.options.orderedList)),this.options.taskItem!==!1&&n.push(Ly.configure(this.options.taskItem)),this.options.taskList!==!1&&n.push(Py.configure(this.options.taskList)),n}});var Cl=" ",By=" ",$y=Ue.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",ge(this.options.HTMLAttributes,n),0]},parseMarkdown:(n,e)=>{const t=n.tokens||[];if(t.length===1&&t[0].type==="image")return e.parseChildren([t[0]]);const r=e.parseInline(t);return r.length===1&&r[0].type==="text"&&(r[0].text===Cl||r[0].text===By)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(n,e,t)=>{var r,i;if(!n)return"";const s=Array.isArray(n.content)?n.content:[];if(s.length===0){const o=Array.isArray((r=t==null?void 0:t.previousNode)==null?void 0:r.content)?t.previousNode.content:[];return((i=t==null?void 0:t.previousNode)==null?void 0:i.type)==="paragraph"&&o.length===0?Cl:""}return e.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),zy=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Fy=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Uy=an.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",ge(this.options.HTMLAttributes,n),0]},markdownTokenName:"del",parseMarkdown:(n,e)=>e.applyMark("strike",e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>`~~${e.renderChildren(n)}~~`,addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[xn({find:zy,type:this.type})]},addPasteRules(){return[sn({find:Fy,type:this.type})]}}),Hy=Ue.create({name:"text",group:"inline",parseMarkdown:n=>({type:"text",text:n.text||""}),renderMarkdown:n=>n.text||""}),Ky=an.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",ge(this.options.HTMLAttributes,n),0]},parseMarkdown(n,e){return e.applyMark(this.name||"underline",e.parseInline(n.tokens||[]))},renderMarkdown(n,e){return`++${e.renderChildren(n)}++`},markdownTokenizer:{name:"underline",level:"inline",start(n){return n.indexOf("++")},tokenize(n,e,t){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(n);if(!i)return;const s=i[2].trim();return{type:"underline",raw:i[0],text:s,tokens:t.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Vy(n={}){return new le({view(e){return new Wy(e,n)}})}class Wy{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,a=s.height/i.offsetHeight;if(t){let u=e.nodeBefore,f=e.nodeAfter;if(u||f){let p=this.editorView.nodeDOM(this.cursorPos-(u?u.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=u?h.bottom:h.top;u&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*a;r={left:h.left,right:h.right,top:m-g,bottom:m+g}}}}if(!r){let u=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;r={left:u.left-f,right:u.left+f,top:u.top,bottom:u.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let c,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,d=-pageYOffset;else{let u=l.getBoundingClientRect(),f=u.width/l.offsetWidth,p=u.height/l.offsetHeight;c=u.left-l.scrollLeft*f,d=u.top-l.scrollTop*p}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-d)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!s){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Sc(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class de extends H{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return de.valid(r)?new de(r):H.near(r)}content(){return R.empty}eq(e){return e instanceof de&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new de(e.resolve(t.pos))}getBookmark(){return new ea(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Gy(e)||!qy(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&de.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(t>0?e.indexAfter(o)0){s=a.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=t;let l=e.doc.resolve(i);if(de.valid(l))return l}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!B.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*t),r=!1;continue e}break}s=o,i+=t;let a=e.doc.resolve(i);if(de.valid(a))return a}return null}}}de.prototype.visible=!1;de.findFrom=de.findGapCursorFrom;H.jsonID("gapcursor",de);class ea{constructor(e){this.pos=e}map(e){return new ea(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return de.valid(t)?new de(t):H.near(t)}}function vu(n){return n.isAtom||n.spec.isolating||n.spec.createGapCursor}function Gy(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||vu(i.type))return!0;if(i.inlineContent)return!1}}return!0}function qy(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||vu(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Jy(){return new le({props:{decorations:Xy,createSelectionBetween(n,e,t){return e.pos==t.pos&&de.valid(t)?new de(t):null},handleClick:Zy,handleKeyDown:Yy,handleDOMEvents:{beforeinput:jy}}})}const Yy=vd({ArrowLeft:Mr("horiz",-1),ArrowRight:Mr("horiz",1),ArrowUp:Mr("vert",-1),ArrowDown:Mr("vert",1)});function Mr(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof z){if(!s.endOfTextblock(t)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=de.findGapCursorFrom(a,e,l);return c?(i&&i(r.tr.setSelection(new de(c))),!0):!1}}function Zy(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!de.valid(r))return!1;let i=n.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&B.isSelectable(n.state.doc.nodeAt(i.inside))?!1:(n.dispatch(n.state.tr.setSelection(new de(r))),!0)}function jy(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof de))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let i=w.empty;for(let o=r.length-1;o>=0;o--)i=w.from(r[o].createAndFill(null,i));let s=n.state.tr.replace(t.pos,t.pos,new R(i,0,0));return s.setSelection(z.near(s.doc.resolve(t.pos+1))),n.dispatch(s),!1}function Xy(n){if(!(n.selection instanceof de))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ae.create(n.doc,[xe.widget(n.selection.head,e,{key:"gapcursor"})])}var Di=200,Ee=function(){};Ee.prototype.append=function(e){return e.length?(e=Ee.from(e),!this.length&&e||e.length=t?Ee.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};Ee.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Ee.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};Ee.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},t,r),i};Ee.from=function(e){return e instanceof Ee?e:e&&e.length?new wu(e):Ee.empty};var wu=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,a){for(var l=s;l=o;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Di)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Di)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Ee);Ee.empty=new wu([]);var Qy=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,s)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,o){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(s,a)-a,o+a)===!1||s=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Ee);const eE=500;class Xe{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;t&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=e.tr,a,l,c=[],d=[];return this.items.forEach((u,f)=>{if(!u.step){i||(i=this.remapping(r,f+1),s=i.maps.length),s--,d.push(u);return}if(i){d.push(new it(u.map));let p=u.step.map(i.slice(s)),h;p&&o.maybeStep(p).doc&&(h=o.mapping.maps[o.mapping.maps.length-1],c.push(new it(h,void 0,void 0,c.length+d.length))),s--,h&&i.appendMap(h,s)}else o.maybeStep(u.step);if(u.selection)return a=i?u.selection.map(i.slice(s)):u.selection,l=new Xe(this.items.slice(0,r).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,t,r,i){let s=[],o=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let d=0;dnE&&(a=tE(a,c),o-=c),new Xe(a.append(s),o)}remapping(e,t){let r=new er;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},e,t),r}addMaps(e){return this.eventCount==0?this:new Xe(this.items.append(e.map(t=>new it(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),s=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},i);let l=t;this.items.forEach(f=>{let p=s.getMirror(--l);if(p==null)return;o=Math.min(o,p);let h=s.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(s.slice(l+1,p));g&&a++,r.push(new it(h,m,g))}else r.push(new it(h))},i);let c=[];for(let f=t;feE&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],s=0;return this.items.forEach((o,a)=>{if(a>=e)i.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(t.slice(r)),c=l&&l.getMap();if(r--,c&&t.appendMap(c,r),l){let d=o.selection&&o.selection.map(t.slice(r));d&&s++;let u=new it(c.invert(),l,d),f,p=i.length-1;(f=i.length&&i[p].merge(u))?i[p]=f:i.push(u)}}else o.map&&r--},this.items.length,0),new Xe(Ee.from(i.reverse()),s)}}Xe.empty=new Xe(Ee.empty,0);function tE(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}class it{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new it(t.getMap().invert(),t,this.selection)}}}class Tt{constructor(e,t,r,i,s){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const nE=20;function rE(n,e,t,r){let i=t.getMeta(Xt),s;if(i)return i.historyState;t.getMeta(oE)&&(n=new Tt(n.done,n.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(o&&o.getMeta(Xt))return o.getMeta(Xt).redo?new Tt(n.done.addTransform(t,void 0,r,Fr(e)),n.undone,Ml(t.mapping.maps),n.prevTime,n.prevComposition):new Tt(n.done,n.undone.addTransform(t,void 0,r,Fr(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=t.getMeta("composition"),l=n.prevTime==0||!o&&n.prevComposition!=a&&(n.prevTime<(t.time||0)-r.newGroupDelay||!iE(t,n.prevRanges)),c=o?Rs(n.prevRanges,t.mapping):Ml(t.mapping.maps);return new Tt(n.done.addTransform(t,l?e.selection.getBookmark():void 0,r,Fr(e)),Xe.empty,c,t.time,a??n.prevComposition)}else return(s=t.getMeta("rebased"))?new Tt(n.done.rebased(t,s),n.undone.rebased(t,s),Rs(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Tt(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),Rs(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function iE(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let s=0;s=e[s]&&(t=!0)}),t}function Ml(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,s,o)=>e.push(s,o));return e}function Rs(n,e){if(!n)return null;let t=[];for(let r=0;r{let i=Xt.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let s=sE(i,t,n);s&&r(e?s.scrollIntoView():s)}return!0}}const Nu=Tu(!1,!0),xu=Tu(!0,!0);fe.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:n=>n.length,wordCounter:n=>n.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=n=>{const e=(n==null?void 0:n.node)||this.editor.state.doc;if(((n==null?void 0:n.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=n=>{const e=(n==null?void 0:n.node)||this.editor.state.doc,t=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(t)}},addProseMirrorPlugins(){let n=!1;return[new le({key:new be("characterCount"),appendTransaction:(e,t,r)=>{if(n)return;const i=this.options.limit;if(i==null||i===0){n=!0;return}const s=this.storage.characters({node:r.doc});if(s>i){const o=s-i,a=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return n=!0,c}n=!0},filterTransaction:(e,t)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=s-r,c=a-l,d=a;return e.deleteRange(c,d),!(this.storage.characters({node:e.doc})>r)}})]}});var lE=fe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Vy(this.options)]}});fe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new le({key:new be("focus"),props:{decorations:({doc:n,selection:e})=>{const{isEditable:t,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!t||!r)return ae.create(n,[]);let o=0;this.options.mode==="deepest"&&n.descendants((l,c)=>{if(l.isText)return;if(!(i>=c&&i<=c+l.nodeSize-1))return!1;o+=1});let a=0;return n.descendants((l,c)=>{if(l.isText||!(i>=c&&i<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";s.push(xe.node(c,c+l.nodeSize,{class:this.options.className}))}),ae.create(n,s)}}})]}});var cE=fe.create({name:"gapCursor",addProseMirrorPlugins(){return[Jy()]},extendNodeSchema(n){var e;const t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=X(P(n,"allowGapCursor",t)))!=null?e:null}}}),Ol="placeholder";function dE(n){return n.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}fe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:Ol,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const n=this.options.dataAttribute?`data-${dE(this.options.dataAttribute)}`:`data-${Ol}`;return[new le({key:new be("placeholder"),props:{decorations:({doc:e,selection:t})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,s=[];if(!r)return null;const o=this.editor.isEmpty;return e.descendants((a,l)=>{const c=i>=l&&i<=l+a.nodeSize,d=!a.isLeaf&&Zi(a);if(!a.type.isTextblock)return this.options.includeChildren;if((c||!this.options.showOnlyCurrent)&&d){const u=[this.options.emptyNodeClass];o&&u.push(this.options.emptyEditorClass);const f=xe.node(l,l+a.nodeSize,{class:u.join(" "),[n]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),ae.create(e,s)}}})]}});fe.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:n,options:e}=this;return[new le({key:new be("selection"),props:{decorations(t){return t.selection.empty||n.isFocused||!n.isEditable||zd(t.selection)||n.view.dragging?null:ae.create(t.doc,[xe.inline(t.selection.from,t.selection.to,{class:e.className})])}}})]}});var uE="skipTrailingNode";function Rl({types:n,node:e}){return e&&Array.isArray(n)&&n.includes(e.type)||(e==null?void 0:e.type)===n}var fE=fe.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var n;const e=new be(this.name),t=this.options.node||((n=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:n.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(t).includes(i.name));return[new le({key:e,appendTransaction:(i,s,o)=>{const{doc:a,tr:l,schema:c}=o,d=e.getState(o),u=a.content.size,f=c.nodes[t];if(!i.some(p=>p.getMeta(uE))&&d)return l.insert(u,f.create())},state:{init:(i,s)=>{const o=s.tr.doc.lastChild;return!Rl({node:o,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;const o=i.doc.lastChild;return!Rl({node:o,types:r})}}})]}}),pE=fe.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>Nu(n,e),redo:()=>({state:n,dispatch:e})=>xu(n,e)}},addProseMirrorPlugins(){return[aE(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),hE=fe.create({name:"starterKit",addExtensions(){var n,e,t,r;const i=[];return this.options.bold!==!1&&i.push(zb.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(Db.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(pu.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Hb.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(ru.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Wb.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(lE.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(cE.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(Gb.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(qb.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(pE.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(Jb.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(Qb.configure(this.options.italic)),this.options.listItem!==!1&&i.push(hu.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(ku.configure((n=this.options)==null?void 0:n.listKeymap)),this.options.link!==!1&&i.push(wy.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(Su.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push($y.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(Uy.configure(this.options.strike)),this.options.text!==!1&&i.push(Hy.configure(this.options.text)),this.options.underline!==!1&&i.push(Ky.configure((t=this.options)==null?void 0:t.underline)),this.options.trailingNode!==!1&&i.push(fE.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),mE=hE;function gE(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Cu(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(e=>{const t=n[e],r=typeof t;(r==="object"||r==="function")&&!Object.isFrozen(t)&&Cu(t)}),n}class Il{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Mu(n){return n.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Ot(n,...e){const t=Object.create(null);for(const r in n)t[r]=n[r];return e.forEach(function(r){for(const i in r)t[i]=r[i]}),t}const bE="",Dl=n=>!!n.scope,yE=(n,{prefix:e})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const t=n.split(".");return[`${e}${t.shift()}`,...t.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${e}${n}`};class EE{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Mu(e)}openNode(e){if(!Dl(e))return;const t=yE(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){Dl(e)&&(this.buffer+=bE)}value(){return this.buffer}span(e){this.buffer+=``}}const Ll=(n={})=>{const e={children:[]};return Object.assign(e,n),e};class ta{constructor(){this.rootNode=Ll(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Ll({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(r=>this._walk(e,r)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{ta._collapse(t)}))}}class kE extends ta{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const r=e.root;t&&(r.scope=`language:${t}`),this.add(r)}toHTML(){return new EE(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function cr(n){return n?typeof n=="string"?n:n.source:null}function Au(n){return ln("(?=",n,")")}function _E(n){return ln("(?:",n,")*")}function SE(n){return ln("(?:",n,")?")}function ln(...n){return n.map(t=>cr(t)).join("")}function vE(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function na(...n){return"("+(vE(n).capture?"":"?:")+n.map(r=>cr(r)).join("|")+")"}function Ou(n){return new RegExp(n.toString()+"|").exec("").length-1}function wE(n,e){const t=n&&n.exec(e);return t&&t.index===0}const TE=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ra(n,{joinWith:e}){let t=0;return n.map(r=>{t+=1;const i=t;let s=cr(r),o="";for(;s.length>0;){const a=TE.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&t++)}return o}).map(r=>`(${r})`).join(e)}const NE=/\b\B/,Ru="[a-zA-Z]\\w*",ia="[a-zA-Z_]\\w*",Iu="\\b\\d+(\\.\\d+)?",Du="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Lu="\\b(0b[01]+)",xE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",CE=(n={})=>{const e=/^#![ ]*\//;return n.binary&&(n.begin=ln(e,/.*\b/,n.binary,/\b.*/)),Ot({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,r)=>{t.index!==0&&r.ignoreMatch()}},n)},dr={begin:"\\\\[\\s\\S]",relevance:0},ME={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[dr]},AE={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[dr]},OE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},es=function(n,e,t={}){const r=Ot({scope:"comment",begin:n,end:e,contains:[]},t);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=na("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ln(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},RE=es("//","$"),IE=es("/\\*","\\*/"),DE=es("#","$"),LE={scope:"number",begin:Iu,relevance:0},PE={scope:"number",begin:Du,relevance:0},BE={scope:"number",begin:Lu,relevance:0},$E={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[dr,{begin:/\[/,end:/\]/,relevance:0,contains:[dr]}]},zE={scope:"title",begin:Ru,relevance:0},FE={scope:"title",begin:ia,relevance:0},UE={begin:"\\.\\s*"+ia,relevance:0},HE=function(n){return Object.assign(n,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var Ar=Object.freeze({__proto__:null,APOS_STRING_MODE:ME,BACKSLASH_ESCAPE:dr,BINARY_NUMBER_MODE:BE,BINARY_NUMBER_RE:Lu,COMMENT:es,C_BLOCK_COMMENT_MODE:IE,C_LINE_COMMENT_MODE:RE,C_NUMBER_MODE:PE,C_NUMBER_RE:Du,END_SAME_AS_BEGIN:HE,HASH_COMMENT_MODE:DE,IDENT_RE:Ru,MATCH_NOTHING_RE:NE,METHOD_GUARD:UE,NUMBER_MODE:LE,NUMBER_RE:Iu,PHRASAL_WORDS_MODE:OE,QUOTE_STRING_MODE:AE,REGEXP_MODE:$E,RE_STARTERS_RE:xE,SHEBANG:CE,TITLE_MODE:zE,UNDERSCORE_IDENT_RE:ia,UNDERSCORE_TITLE_MODE:FE});function KE(n,e){n.input[n.index-1]==="."&&e.ignoreMatch()}function VE(n,e){n.className!==void 0&&(n.scope=n.className,delete n.className)}function WE(n,e){e&&n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",n.__beforeBegin=KE,n.keywords=n.keywords||n.beginKeywords,delete n.beginKeywords,n.relevance===void 0&&(n.relevance=0))}function GE(n,e){Array.isArray(n.illegal)&&(n.illegal=na(...n.illegal))}function qE(n,e){if(n.match){if(n.begin||n.end)throw new Error("begin & end are not supported with match");n.begin=n.match,delete n.match}}function JE(n,e){n.relevance===void 0&&(n.relevance=1)}const YE=(n,e)=>{if(!n.beforeMatch)return;if(n.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},n);Object.keys(n).forEach(r=>{delete n[r]}),n.keywords=t.keywords,n.begin=ln(t.beforeMatch,Au(t.begin)),n.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},n.relevance=0,delete t.beforeMatch},ZE=["of","and","for","in","not","or","if","then","parent","list","value"],jE="keyword";function Pu(n,e,t=jE){const r=Object.create(null);return typeof n=="string"?i(t,n.split(" ")):Array.isArray(n)?i(t,n):Object.keys(n).forEach(function(s){Object.assign(r,Pu(n[s],e,s))}),r;function i(s,o){e&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,XE(l[0],l[1])]})}}function XE(n,e){return e?Number(e):QE(n)?0:1}function QE(n){return ZE.includes(n.toLowerCase())}const Pl={},Qt=n=>{console.error(n)},Bl=(n,...e)=>{console.log(`WARN: ${n}`,...e)},pn=(n,e)=>{Pl[`${n}/${e}`]||(console.log(`Deprecated as of ${n}. ${e}`),Pl[`${n}/${e}`]=!0)},Li=new Error;function Bu(n,e,{key:t}){let r=0;const i=n[t],s={},o={};for(let a=1;a<=e.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=Ou(e[a-1]);n[t]=o,n[t]._emit=s,n[t]._multi=!0}function e0(n){if(Array.isArray(n.begin)){if(n.skip||n.excludeBegin||n.returnBegin)throw Qt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Li;if(typeof n.beginScope!="object"||n.beginScope===null)throw Qt("beginScope must be object"),Li;Bu(n,n.begin,{key:"beginScope"}),n.begin=ra(n.begin,{joinWith:""})}}function t0(n){if(Array.isArray(n.end)){if(n.skip||n.excludeEnd||n.returnEnd)throw Qt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Li;if(typeof n.endScope!="object"||n.endScope===null)throw Qt("endScope must be object"),Li;Bu(n,n.end,{key:"endScope"}),n.end=ra(n.end,{joinWith:""})}}function n0(n){n.scope&&typeof n.scope=="object"&&n.scope!==null&&(n.beginScope=n.scope,delete n.scope)}function r0(n){n0(n),typeof n.beginScope=="string"&&(n.beginScope={_wrap:n.beginScope}),typeof n.endScope=="string"&&(n.endScope={_wrap:n.endScope}),e0(n),t0(n)}function i0(n){function e(o,a){return new RegExp(cr(o),"m"+(n.case_insensitive?"i":"")+(n.unicodeRegex?"u":"")+(a?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=Ou(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=e(ra(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((u,f)=>f>0&&u!==void 0),d=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,d)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new t;return this.rules.slice(a).forEach(([c,d])=>l.addRule(c,d)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[VE,qE,r0,YE].forEach(d=>d(o,a)),n.compilerExtensions.forEach(d=>d(o,a)),o.__beforeBegin=null,[WE,GE,JE].forEach(d=>d(o,a)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=Pu(o.keywords,n.case_insensitive)),l.keywordPatternRe=e(c,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=e(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=e(l.end)),l.terminatorEnd=cr(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=e(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(d){return s0(d==="self"?o:d)})),o.contains.forEach(function(d){s(d,l)}),o.starts&&s(o.starts,a),l.matcher=i(l),l}if(n.compilerExtensions||(n.compilerExtensions=[]),n.contains&&n.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return n.classNameAliases=Ot(n.classNameAliases||{}),s(n)}function $u(n){return n?n.endsWithParent||$u(n.starts):!1}function s0(n){return n.variants&&!n.cachedVariants&&(n.cachedVariants=n.variants.map(function(e){return Ot(n,{variants:null},e)})),n.cachedVariants?n.cachedVariants:$u(n)?Ot(n,{starts:n.starts?Ot(n.starts):null}):Object.isFrozen(n)?Ot(n):n}var o0="11.11.1";class a0 extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Ds=Mu,$l=Ot,zl=Symbol("nomatch"),l0=7,zu=function(n){const e=Object.create(null),t=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:kE};function l(k){return a.noHighlightRe.test(k)}function c(k){let M=k.className+" ";M+=k.parentNode?k.parentNode.className:"";const D=a.languageDetectRe.exec(M);if(D){const F=T(D[1]);return F||(Bl(s.replace("{}",D[1])),Bl("Falling back to no-highlight mode for this block.",k)),F?D[1]:"no-highlight"}return M.split(/\s+/).find(F=>l(F)||T(F))}function d(k,M,D){let F="",J="";typeof M=="object"?(F=k,D=M.ignoreIllegals,J=M.language):(pn("10.7.0","highlight(lang, code, ...args) has been deprecated."),pn("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),J=k,F=M),D===void 0&&(D=!0);const ne={code:F,language:J};G("before:highlight",ne);const oe=ne.result?ne.result:u(ne.language,ne.code,D);return oe.code=ne.code,G("after:highlight",oe),oe}function u(k,M,D,F){const J=Object.create(null);function ne(A,L){return A.keywords[L]}function oe(){if(!$.keywords){ke.addText(re);return}let A=0;$.keywordPatternRe.lastIndex=0;let L=$.keywordPatternRe.exec(re),K="";for(;L;){K+=re.substring(A,L.index);const j=Ke.case_insensitive?L[0].toLowerCase():L[0],Te=ne($,j);if(Te){const[at,of]=Te;if(ke.addText(K),K="",J[j]=(J[j]||0)+1,J[j]<=l0&&(yr+=of),at.startsWith("_"))K+=L[0];else{const af=Ke.classNameAliases[at]||at;Pe(L[0],af)}}else K+=L[0];A=$.keywordPatternRe.lastIndex,L=$.keywordPatternRe.exec(re)}K+=re.substring(A),ke.addText(K)}function He(){if(re==="")return;let A=null;if(typeof $.subLanguage=="string"){if(!e[$.subLanguage]){ke.addText(re);return}A=u($.subLanguage,re,!0,br[$.subLanguage]),br[$.subLanguage]=A._top}else A=p(re,$.subLanguage.length?$.subLanguage:null);$.relevance>0&&(yr+=A.relevance),ke.__addSublanguage(A._emitter,A.language)}function Ae(){$.subLanguage!=null?He():oe(),re=""}function Pe(A,L){A!==""&&(ke.startScope(L),ke.addText(A),ke.endScope())}function cn(A,L){let K=1;const j=L.length-1;for(;K<=j;){if(!A._emit[K]){K++;continue}const Te=Ke.classNameAliases[A[K]]||A[K],at=L[K];Te?Pe(at,Te):(re=at,oe(),re=""),K++}}function mr(A,L){return A.scope&&typeof A.scope=="string"&&ke.openNode(Ke.classNameAliases[A.scope]||A.scope),A.beginScope&&(A.beginScope._wrap?(Pe(re,Ke.classNameAliases[A.beginScope._wrap]||A.beginScope._wrap),re=""):A.beginScope._multi&&(cn(A.beginScope,L),re="")),$=Object.create(A,{parent:{value:$}}),$}function On(A,L,K){let j=wE(A.endRe,K);if(j){if(A["on:end"]){const Te=new Il(A);A["on:end"](L,Te),Te.isMatchIgnored&&(j=!1)}if(j){for(;A.endsParent&&A.parent;)A=A.parent;return A}}if(A.endsWithParent)return On(A.parent,L,K)}function ts(A){return $.matcher.regexIndex===0?(re+=A[0],1):(as=!0,0)}function ns(A){const L=A[0],K=A.rule,j=new Il(K),Te=[K.__beforeBegin,K["on:begin"]];for(const at of Te)if(at&&(at(A,j),j.isMatchIgnored))return ts(L);return K.skip?re+=L:(K.excludeBegin&&(re+=L),Ae(),!K.returnBegin&&!K.excludeBegin&&(re=L)),mr(K,A),K.returnBegin?0:L.length}function rs(A){const L=A[0],K=M.substring(A.index),j=On($,A,K);if(!j)return zl;const Te=$;$.endScope&&$.endScope._wrap?(Ae(),Pe(L,$.endScope._wrap)):$.endScope&&$.endScope._multi?(Ae(),cn($.endScope,A)):Te.skip?re+=L:(Te.returnEnd||Te.excludeEnd||(re+=L),Ae(),Te.excludeEnd&&(re=L));do $.scope&&ke.closeNode(),!$.skip&&!$.subLanguage&&(yr+=$.relevance),$=$.parent;while($!==j.parent);return j.starts&&mr(j.starts,A),Te.returnEnd?0:L.length}function is(){const A=[];for(let L=$;L!==Ke;L=L.parent)L.scope&&A.unshift(L.scope);A.forEach(L=>ke.openNode(L))}let dn={};function gr(A,L){const K=L&&L[0];if(re+=A,K==null)return Ae(),0;if(dn.type==="begin"&&L.type==="end"&&dn.index===L.index&&K===""){if(re+=M.slice(L.index,L.index+1),!i){const j=new Error(`0 width match regex (${k})`);throw j.languageName=k,j.badRule=dn.rule,j}return 1}if(dn=L,L.type==="begin")return ns(L);if(L.type==="illegal"&&!D){const j=new Error('Illegal lexeme "'+K+'" for mode "'+($.scope||"")+'"');throw j.mode=$,j}else if(L.type==="end"){const j=rs(L);if(j!==zl)return j}if(L.type==="illegal"&&K==="")return re+=` -`,1;if(ss>1e5&&ss>L.index*3)throw new Error("potential infinite loop, way more iterations than matches");return re+=K,K.length}const Ke=T(k);if(!Ke)throw Qt(s.replace("{}",k)),new Error('Unknown language: "'+k+'"');const Q=i0(Ke);let kt="",$=F||Q;const br={},ke=new a.__emitter(a);is();let re="",yr=0,Ft=0,ss=0,as=!1;try{if(Ke.__emitTokens)Ke.__emitTokens(M,ke);else{for($.matcher.considerAll();;){ss++,as?as=!1:$.matcher.considerAll(),$.matcher.lastIndex=Ft;const A=$.matcher.exec(M);if(!A)break;const L=M.substring(Ft,A.index),K=gr(L,A);Ft=A.index+K}gr(M.substring(Ft))}return ke.finalize(),kt=ke.toHTML(),{language:k,value:kt,relevance:yr,illegal:!1,_emitter:ke,_top:$}}catch(A){if(A.message&&A.message.includes("Illegal"))return{language:k,value:Ds(M),illegal:!0,relevance:0,_illegalBy:{message:A.message,index:Ft,context:M.slice(Ft-100,Ft+100),mode:A.mode,resultSoFar:kt},_emitter:ke};if(i)return{language:k,value:Ds(M),illegal:!1,relevance:0,errorRaised:A,_emitter:ke,_top:$};throw A}}function f(k){const M={value:Ds(k),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return M._emitter.addText(k),M}function p(k,M){M=M||a.languages||Object.keys(e);const D=f(k),F=M.filter(T).filter(I).map(Ae=>u(Ae,k,!1));F.unshift(D);const J=F.sort((Ae,Pe)=>{if(Ae.relevance!==Pe.relevance)return Pe.relevance-Ae.relevance;if(Ae.language&&Pe.language){if(T(Ae.language).supersetOf===Pe.language)return 1;if(T(Pe.language).supersetOf===Ae.language)return-1}return 0}),[ne,oe]=J,He=ne;return He.secondBest=oe,He}function h(k,M,D){const F=M&&t[M]||D;k.classList.add("hljs"),k.classList.add(`language-${F}`)}function m(k){let M=null;const D=c(k);if(l(D))return;if(G("before:highlightElement",{el:k,language:D}),k.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",k);return}if(k.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(k)),a.throwUnescapedHTML))throw new a0("One of your code blocks includes unescaped HTML.",k.innerHTML);M=k;const F=M.textContent,J=D?d(F,{language:D,ignoreIllegals:!0}):p(F);k.innerHTML=J.value,k.dataset.highlighted="yes",h(k,D,J.language),k.result={language:J.language,re:J.relevance,relevance:J.relevance},J.secondBest&&(k.secondBest={language:J.secondBest.language,relevance:J.secondBest.relevance}),G("after:highlightElement",{el:k,result:J,text:F})}function g(k){a=$l(a,k)}const b=()=>{S(),pn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function E(){S(),pn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let y=!1;function S(){function k(){S()}if(document.readyState==="loading"){y||window.addEventListener("DOMContentLoaded",k,!1),y=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function v(k,M){let D=null;try{D=M(n)}catch(F){if(Qt("Language definition for '{}' could not be registered.".replace("{}",k)),i)Qt(F);else throw F;D=o}D.name||(D.name=k),e[k]=D,D.rawDefinition=M.bind(null,n),D.aliases&&_(D.aliases,{languageName:k})}function x(k){delete e[k];for(const M of Object.keys(t))t[M]===k&&delete t[M]}function C(){return Object.keys(e)}function T(k){return k=(k||"").toLowerCase(),e[k]||e[t[k]]}function _(k,{languageName:M}){typeof k=="string"&&(k=[k]),k.forEach(D=>{t[D.toLowerCase()]=M})}function I(k){const M=T(k);return M&&!M.disableAutodetect}function V(k){k["before:highlightBlock"]&&!k["before:highlightElement"]&&(k["before:highlightElement"]=M=>{k["before:highlightBlock"](Object.assign({block:M.el},M))}),k["after:highlightBlock"]&&!k["after:highlightElement"]&&(k["after:highlightElement"]=M=>{k["after:highlightBlock"](Object.assign({block:M.el},M))})}function se(k){V(k),r.push(k)}function ue(k){const M=r.indexOf(k);M!==-1&&r.splice(M,1)}function G(k,M){const D=k;r.forEach(function(F){F[D]&&F[D](M)})}function W(k){return pn("10.7.0","highlightBlock will be removed entirely in v12.0"),pn("10.7.0","Please use highlightElement now."),m(k)}Object.assign(n,{highlight:d,highlightAuto:p,highlightAll:S,highlightElement:m,highlightBlock:W,configure:g,initHighlighting:b,initHighlightingOnLoad:E,registerLanguage:v,unregisterLanguage:x,listLanguages:C,getLanguage:T,registerAliases:_,autoDetection:I,inherit:$l,addPlugin:se,removePlugin:ue}),n.debugMode=function(){i=!1},n.safeMode=function(){i=!0},n.versionString=o0,n.regex={concat:ln,lookahead:Au,either:na,optional:SE,anyNumberOfTimes:_E};for(const k in Ar)typeof Ar[k]=="object"&&Cu(Ar[k]);return Object.assign(n,Ar),n},Mn=zu({});Mn.newInstance=()=>zu({});var c0=Mn;Mn.HighlightJS=Mn;Mn.default=Mn;const Fu=gE(c0);function Uu(n,e=[]){return n.flatMap(t=>{const r=[...e,...t.properties?t.properties.className:[]];return t.children?Uu(t.children,r):{text:t.value,classes:r}})}function Fl(n){return n.value||n.children||[]}function d0(n){return!!Fu.getLanguage(n)}function Ul({doc:n,name:e,lowlight:t,defaultLanguage:r}){const i=[];return eo(n,s=>s.type.name===e).forEach(s=>{var o;let a=s.pos+1;const l=s.node.attrs.language||r,c=t.listLanguages(),d=l&&(c.includes(l)||d0(l)||(o=t.registered)!=null&&o.call(t,l))?Fl(t.highlight(l,s.node.textContent)):Fl(t.highlightAuto(s.node.textContent));Uu(d).forEach(u=>{const f=a+u.text.length;if(u.classes.length){const p=xe.inline(a,f,{class:u.classes.join(" ")});i.push(p)}a=f})}),ae.create(n,i)}function u0(n){return typeof n=="function"}function f0({name:n,lowlight:e,defaultLanguage:t}){if(!["highlight","highlightAuto","listLanguages"].every(i=>u0(e[i])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new le({key:new be("lowlight"),state:{init:(i,{doc:s})=>Ul({doc:s,name:n,lowlight:e,defaultLanguage:t}),apply:(i,s,o,a)=>{const l=o.selection.$head.parent.type.name,c=a.selection.$head.parent.type.name,d=eo(o.doc,f=>f.type.name===n),u=eo(a.doc,f=>f.type.name===n);return i.docChanged&&([l,c].includes(n)||u.length!==d.length||i.steps.some(f=>f.from!==void 0&&f.to!==void 0&&d.some(p=>p.pos>=f.from&&p.pos+p.node.nodeSize<=f.to)))?Ul({doc:i.doc,name:n,lowlight:e,defaultLanguage:t}):s.map(i.mapping,i.doc)}},props:{decorations(i){return r.getState(i)}}});return r}var p0=ru.extend({addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var n;return[...((n=this.parent)==null?void 0:n.call(this))||[],f0({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),h0=p0;function m0(n){const e=n.regex,t=n.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[n.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},n.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},u={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},n.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},t,n.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+n.IDENT_RE,relevance:0},p=e.optional(i)+n.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],g=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],S={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:g},v={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,n.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},x=[v,u,a,t,n.C_BLOCK_COMMENT_MODE,d,c],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:x.concat([{begin:/\(/,end:/\)/,keywords:S,contains:x.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:S,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[t,n.C_BLOCK_COMMENT_MODE,c,d,a,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",t,n.C_BLOCK_COMMENT_MODE,c,d,a]}]},a,t,n.C_BLOCK_COMMENT_MODE,u]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:S,illegal:"",keywords:S,contains:["self",a]},{begin:n.IDENT_RE+"::",keywords:S},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function g0(n){const e={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},t=m0(n),r=t.keywords;return r.type=[...r.type,...e.type],r.literal=[...r.literal,...e.literal],r.built_in=[...r.built_in,...e.built_in],r._hints=e._hints,t.name="Arduino",t.aliases=["ino"],t.supersetOf="cpp",t}function b0(n){const e=n.regex,t={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{begin:e.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[n.BACKSLASH_ESCAPE]},s=n.inherit(n.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,t,i]};i.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},u={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},n.NUMBER_MODE,t]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=n.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[n.inherit(n.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],g=["true","false"],b={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],S=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],v=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:g,built_in:[...E,...y,"set","shopt",...S,...v]},contains:[p,n.SHEBANG(),h,u,s,o,b,a,l,c,d,t]}}function y0(n){const e=n.regex,t=n.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[n.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},n.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},u={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},n.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},t,n.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+n.IDENT_RE,relevance:0},p=e.optional(i)+n.IDENT_RE+"\\s*\\(",g={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},b=[u,a,t,n.C_BLOCK_COMMENT_MODE,d,c],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:g,contains:b.concat([{begin:/\(/,end:/\)/,keywords:g,contains:b.concat(["self"]),relevance:0}]),relevance:0},y={begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:g,relevance:0},{begin:p,returnBegin:!0,contains:[n.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[t,n.C_BLOCK_COMMENT_MODE,c,d,a,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:["self",t,n.C_BLOCK_COMMENT_MODE,c,d,a]}]},a,t,n.C_BLOCK_COMMENT_MODE,u]};return{name:"C",aliases:["h"],keywords:g,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},n.TITLE_MODE]}]),exports:{preprocessor:u,strings:c,keywords:g}}}function E0(n){const e=n.regex,t=n.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[n.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},n.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},u={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},n.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},t,n.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+n.IDENT_RE,relevance:0},p=e.optional(i)+n.IDENT_RE+"\\s*\\(",h=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],g=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],S={type:m,keyword:h,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:g},v={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,n.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},x=[v,u,a,t,n.C_BLOCK_COMMENT_MODE,d,c],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:x.concat([{begin:/\(/,end:/\)/,keywords:S,contains:x.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:S,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[t,n.C_BLOCK_COMMENT_MODE,c,d,a,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",t,n.C_BLOCK_COMMENT_MODE,c,d,a]}]},a,t,n.C_BLOCK_COMMENT_MODE,u]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:S,illegal:"",keywords:S,contains:["self",a]},{begin:n.IDENT_RE+"::",keywords:S},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function k0(n){const e=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],t=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:e,literal:r},a=n.inherit(n.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},u=n.inherit(d,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:o},p=n.inherit(f,{illegal:/\n/}),h={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},n.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},g=n.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,h,d,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,l,n.C_BLOCK_COMMENT_MODE],p.contains=[g,h,u,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,l,n.inherit(n.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const b={variants:[c,m,h,d,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},y=n.IDENT_RE+"(<"+n.IDENT_RE+"(\\s*,\\s*"+n.IDENT_RE+")*>)?(\\[\\])?",S={begin:"@"+n.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[n.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},b,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,E,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,E,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+y+"\\s+)+"+n.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:t.join(" "),relevance:0},{begin:n.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[n.TITLE_MODE,E],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[b,l,n.C_BLOCK_COMMENT_MODE]},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},S]}}const _0=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),S0=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],v0=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],w0=[...S0,...v0],T0=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),N0=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),x0=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),C0=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function M0(n){const e=n.regex,t=_0(n),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,r,t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+N0.join("|")+")"},{begin:":(:)?("+x0.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+C0.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:T0.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+w0.join("|")+")\\b"}]}}function A0(n){const e=n.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:e.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:e.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function O0(n){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"Hu(n,e,t-1))}function D0(n){const e=n.regex,t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=t+Hu("(?:<"+t+"~~~(?:\\s*,\\s*"+t+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+t,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[n.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[n.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[n.BACKSLASH_ESCAPE]},n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,t],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[e.concat(/(?!else)/,t),/\s+/,t,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,t],className:{1:"keyword",3:"title.class"},contains:[d,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",n.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,Hl,n.C_BLOCK_COMMENT_MODE]},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},Hl,c]}}const Kl="[A-Za-z$_][0-9A-Za-z$_]*",L0=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],P0=["true","false","null","undefined","NaN","Infinity"],Ku=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Vu=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Wu=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],B0=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],$0=[].concat(Wu,Ku,Vu);function z0(n){const e=n.regex,t=(D,{after:F})=>{const J="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(D,F)=>{const J=D[0].length+D.index,ne=D.input[J];if(ne==="<"||ne===","){F.ignoreMatch();return}ne===">"&&(t(D,{after:J})||F.ignoreMatch());let oe;const He=D.input.substring(J);if(oe=He.match(/^\s*=/)){F.ignoreMatch();return}if((oe=He.match(/^\s+extends\s+/))&&oe.index===0){F.ignoreMatch();return}}},a={$pattern:Kl,keyword:L0,literal:P0,built_in:$0,"variable.language":B0},l="[0-9](_?[0-9])*",c=`\\.(${l})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,f]},E={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},y=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,p,h,m,g,{match:/\$\d+/},u];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(y)});const S=[].concat(E,f.contains),v=S.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(S)}]),x={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:v},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,e.concat(r,"(",e.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ku,...Vu]}},_={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[x],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function se(D){return e.concat("(?!",D.join("|"),")")}const ue={match:e.concat(/\b/,se([...Wu,"super","import"].map(D=>`${D}\\s*\\(`)),r,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:e.concat(/\./,e.lookahead(e.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},W={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},x]},k="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(k)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[x]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),_,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,p,h,m,g,E,{match:/\$\d+/},u,T,{scope:"attr",match:r+e.lookahead(":"),relevance:0},M,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,n.REGEXP_MODE,{className:"function",begin:k,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[x,n.inherit(n.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[x]},ue,V,C,W,{match:/\$[(.]/}]}}function F0(n){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},t={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[e,t,n.QUOTE_STRING_MODE,i,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var yn="[0-9](_*[0-9])*",Ir=`\\.(${yn})`,Dr="[0-9a-fA-F](_*[0-9a-fA-F])*",U0={className:"number",variants:[{begin:`(\\b(${yn})((${Ir})|\\.)?|(${Ir}))[eE][+-]?(${yn})[fFdD]?\\b`},{begin:`\\b(${yn})((${Ir})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Ir})[fFdD]?\\b`},{begin:`\\b(${yn})[fFdD]\\b`},{begin:`\\b0[xX]((${Dr})\\.?|(${Dr})?\\.(${Dr}))[pP][+-]?(${yn})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Dr})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function H0(n){const e={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},t={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[n.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+n.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[n.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[n.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+n.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+n.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[n.inherit(o,{className:"string"}),"self"]}]},c=U0,d=n.COMMENT("/\\*","\\*/",{contains:[n.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:n.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=u;return f.variants[1].contains=[u],u.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:e,contains:[n.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),n.C_LINE_COMMENT_MODE,d,t,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:e,relevance:5,contains:[{begin:n.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[n.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,n.C_LINE_COMMENT_MODE,d],relevance:0},n.C_LINE_COMMENT_MODE,d,a,l,o,n.C_NUMBER_MODE]},d]},{begin:[/class|interface|trait/,/\s+/,n.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},n.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},c]}}const K0=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),V0=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],W0=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],G0=[...V0,...W0],q0=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Gu=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),qu=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),J0=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Y0=Gu.concat(qu).sort().reverse();function Z0(n){const e=K0(n),t=Y0,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],a=[],l=function(y){return{className:"string",begin:"~?"+y+".*?"+y}},c=function(y,S,v){return{className:y,begin:S,relevance:v}},d={$pattern:/[a-z-]+/,keyword:r,attribute:q0.join(" ")},u={begin:"\\(",end:"\\)",contains:a,keywords:d,relevance:0};a.push(n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,l("'"),l('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},e.HEXCOLOR,u,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},e.IMPORTANT,{beginKeywords:"and not"},e.FUNCTION_DISPATCH);const f=a.concat({begin:/\{/,end:/\}/,contains:o}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},h={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+J0.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:a,relevance:0}},g={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:f}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,p,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+G0.join("|")+")\\b",className:"selector-tag"},e.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Gu.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+qu.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},e.FUNCTION_DISPATCH]},E={begin:i+`:(:)?(${t.join("|")})`,returnBegin:!0,contains:[b]};return o.push(n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,m,g,E,h,b,p,e.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function j0(n){const e="\\[=*\\[",t="\\]=*\\]",r={begin:e,end:t,contains:["self"]},i=[n.COMMENT("--(?!"+e+")","$"),n.COMMENT("--"+e,t,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:n.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[n.inherit(n.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},n.C_NUMBER_MODE,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,{className:"string",begin:e,end:t,contains:[r],relevance:5}])}}function X0(n){const e={className:"variable",variants:[{begin:"\\$\\("+n.UNDERSCORE_IDENT_RE+"\\)",contains:[n.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=n.inherit(c,{contains:[]}),f=n.inherit(d,{contains:[]});c.contains.push(f),d.contains.push(u);let p=[t,l];return[c,d,u,f].forEach(b=>{b.contains=b.contains.concat(p)}),p=p.concat(c,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},t,s,c,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,r,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function ek(n){const e={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},t=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"/,end:/$/,illegal:"\\n"},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[n.UNDERSCORE_TITLE_MODE]},{begin:"\\."+n.UNDERSCORE_IDENT_RE,relevance:0}]}}function tk(n){const e=n.regex,t=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:t.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:e.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[n.BACKSLASH_ESCAPE,s,l],u=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,g,b="\\1")=>{const E=b==="\\1"?b:e.concat(b,g);return e.concat(e.concat("(?:",m,")"),g,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,b,r)},p=(m,g,b)=>e.concat(e.concat("(?:",m,")"),g,/(?:\\.|[^\\\/])*?/,b,r),h=[l,n.HASH_COMMENT_MODE,n.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[n.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+n.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[n.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",e.either(...u,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",e.either(...u,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[n.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[n.TITLE_MODE,a,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=h,o.contains=h,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:h}}function nk(n){const e=n.regex,t=/(?![A-Za-z0-9])(?![$])/,r=e.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,t),i=e.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,t),s=e.concat(/[A-Z]+/,t),o={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=n.inherit(n.APOS_STRING_MODE,{illegal:null}),d=n.inherit(n.QUOTE_STRING_MODE,{illegal:null,contains:n.QUOTE_STRING_MODE.contains.concat(l)}),u={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:n.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(G,W)=>{W.data._beginMatch=G[1]||G[2]},"on:end":(G,W)=>{W.data._beginMatch!==G[1]&&W.ignoreMatch()}},f=n.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ -]`,h={scope:"string",variants:[d,c,u,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},g=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],E=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],S={keyword:b,literal:(G=>{const W=[];return G.forEach(k=>{W.push(k),k.toLowerCase()===k?W.push(k.toUpperCase()):W.push(k.toLowerCase())}),W})(g),built_in:E},v=G=>G.map(W=>W.replace(/\|\d+$/,"")),x={variants:[{match:[/new/,e.concat(p,"+"),e.concat("(?!",v(E).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},C=e.concat(r,"\\b(?!\\()"),T={variants:[{match:[e.concat(/::/,e.lookahead(/(?!class\b)/)),C],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,e.concat(/::/,e.lookahead(/(?!class\b)/)),C],scope:{1:"title.class",3:"variable.constant"}},{match:[i,e.concat("::",e.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},_={scope:"attr",match:e.concat(r,e.lookahead(":"),e.lookahead(/(?!::)/))},I={relevance:0,begin:/\(/,end:/\)/,keywords:S,contains:[_,o,T,n.C_BLOCK_COMMENT_MODE,h,m,x]},V={relevance:0,match:[/\b/,e.concat("(?!fn\\b|function\\b|",v(b).join("\\b|"),"|",v(E).join("\\b|"),"\\b)"),r,e.concat(p,"*"),e.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[I]};I.contains.push(V);const se=[_,T,n.C_BLOCK_COMMENT_MODE,h,m,x],ue={begin:e.concat(/#\[\s*\\?/,e.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:g,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:["new","array"]},contains:["self",...se]},...se,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:S,contains:[ue,n.HASH_COMMENT_MODE,n.COMMENT("//","$"),n.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:n.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},o,V,T,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},x,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},n.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:S,contains:["self",ue,o,T,n.C_BLOCK_COMMENT_MODE,h,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},n.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[n.inherit(n.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},n.UNDERSCORE_TITLE_MODE]},h,m]}}function rk(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function ik(n){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function sk(n){const e=n.regex,t=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},d={begin:/\{\{/,relevance:0},u={className:"string",contains:[n.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,l,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,l,d,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[n.BACKSLASH_ESCAPE,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,d,c]},n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},g={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,u,n.HASH_COMMENT_MODE]}]};return c.contains=[u,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},u,g,n.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[b]},{variants:[{match:[/\bclass/,/\s+/,t,/\s*/,/\(\s*/,t,/\s*\)/]},{match:[/\bclass/,/\s+/,t]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,b,u]}]}}function ok(n){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function ak(n){const e=n.regex,t=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=e.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=e.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:t,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[n.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:e.lookahead(e.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:t},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),n.HASH_COMMENT_MODE,{scope:"string",contains:[n.BACKSLASH_ESCAPE],variants:[n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[t,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function lk(n){const e=n.regex,t="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=e.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=e.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[n.COMMENT("#","$",{contains:[a]}),n.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),n.COMMENT("^__END__",n.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[n.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:e.concat(/<<[-~]?'?/,e.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[n.BACKSLASH_ESCAPE,d]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},x=[u,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:n.IDENT_RE+"::"},{className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:t}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+n.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[n.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);d.contains=x,m.contains=x;const I=[{begin:/^\s*=>/,starts:{end:"$",contains:x}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:x}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[n.SHEBANG({binary:"ruby"})].concat(I).concat(c).concat(x)}}function ck(n){const e=n.regex,t=/(r#)?/,r=e.concat(t,n.UNDERSCORE_IDENT_RE),i=e.concat(t,n.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,e.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:n.IDENT_RE+"!?",type:d,keyword:a,literal:l,built_in:c},illegal:""},s]}}const dk=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),uk=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],fk=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],pk=[...uk,...fk],hk=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),mk=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),gk=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),bk=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function yk(n){const e=dk(n),t=gk,r=mk,i="@[a-z-]+",s="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,e.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+pk.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+t.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[e.CSS_NUMBER_MODE]},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+bk.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[e.BLOCK_COMMENT,a,e.HEXCOLOR,e.CSS_NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,e.IMPORTANT,e.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:hk.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,e.HEXCOLOR,e.CSS_NUMBER_MODE]},e.FUNCTION_DISPATCH]}}function Ek(n){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function kk(n){const e=n.regex,t=n.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],u=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=d,h=[...c,...l].filter(v=>!d.includes(v)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},g={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:e.concat(/\b/,e.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function E(v){return e.concat(/\b/,e.either(...v.map(x=>x.replace(/\s+/,"\\s+"))),/\b/)}const y={scope:"keyword",match:E(f),relevance:0};function S(v,{exceptions:x,when:C}={}){const T=C;return x=x||[],v.map(_=>_.match(/\|\d+$/)||x.includes(_)?_:T(_)?`${_}|0`:_)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:S(h,{when:v=>v.length<3}),literal:s,type:a,built_in:u},contains:[{scope:"type",match:E(o)},y,b,m,r,i,n.C_NUMBER_MODE,n.C_BLOCK_COMMENT_MODE,t,g]}}function Ju(n){return n?typeof n=="string"?n:n.source:null}function Ln(n){return ee("(?=",n,")")}function ee(...n){return n.map(t=>Ju(t)).join("")}function _k(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function Oe(...n){return"("+(_k(n).capture?"":"?:")+n.map(r=>Ju(r)).join("|")+")"}const sa=n=>ee(/\b/,n,/\w$/.test(n)?/\b/:/\B/),Sk=["Protocol","Type"].map(sa),Vl=["init","self"].map(sa),vk=["Any","Self"],Ls=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Wl=["false","nil","true"],wk=["assignment","associativity","higherThan","left","lowerThan","none","right"],Tk=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Gl=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Yu=Oe(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Zu=Oe(Yu,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Ps=ee(Yu,Zu,"*"),ju=Oe(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Pi=Oe(ju,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),tt=ee(ju,Pi,"*"),Lr=ee(/[A-Z]/,Pi,"*"),Nk=["attached","autoclosure",ee(/convention\(/,Oe("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ee(/objc\(/,tt,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],xk=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Ck(n){const e={match:/\s+/,relevance:0},t=n.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[n.C_LINE_COMMENT_MODE,t],i={match:[/\./,Oe(...Sk,...Vl)],className:{2:"keyword"}},s={match:ee(/\./,Oe(...Ls)),relevance:0},o=Ls.filter(Q=>typeof Q=="string").concat(["_|0"]),a=Ls.filter(Q=>typeof Q!="string").concat(vk).map(sa),l={variants:[{className:"keyword",match:Oe(...a,...Vl)}]},c={$pattern:Oe(/\b\w+/,/#\w+/),keyword:o.concat(Tk),literal:Wl},d=[i,s,l],u={match:ee(/\./,Oe(...Gl)),relevance:0},f={className:"built_in",match:ee(/\b/,Oe(...Gl),/(?=\()/)},p=[u,f],h={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:Ps},{match:`\\.(\\.|${Zu})+`}]},g=[h,m],b="([0-9]_*)+",E="([0-9a-fA-F]_*)+",y={className:"number",relevance:0,variants:[{match:`\\b(${b})(\\.(${b}))?([eE][+-]?(${b}))?\\b`},{match:`\\b0x(${E})(\\.(${E}))?([pP][+-]?(${b}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},S=(Q="")=>({className:"subst",variants:[{match:ee(/\\/,Q,/[0\\tnr"']/)},{match:ee(/\\/,Q,/u\{[0-9a-fA-F]{1,8}\}/)}]}),v=(Q="")=>({className:"subst",match:ee(/\\/,Q,/[\t ]*(?:[\r\n]|\r\n)/)}),x=(Q="")=>({className:"subst",label:"interpol",begin:ee(/\\/,Q,/\(/),end:/\)/}),C=(Q="")=>({begin:ee(Q,/"""/),end:ee(/"""/,Q),contains:[S(Q),v(Q),x(Q)]}),T=(Q="")=>({begin:ee(Q,/"/),end:ee(/"/,Q),contains:[S(Q),x(Q)]}),_={className:"string",variants:[C(),C("#"),C("##"),C("###"),T(),T("#"),T("##"),T("###")]},I=[n.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[n.BACKSLASH_ESCAPE]}],V={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:I},se=Q=>{const kt=ee(Q,/\//),$=ee(/\//,Q);return{begin:kt,end:$,contains:[...I,{scope:"comment",begin:`#(?!.*${$})`,end:/$/}]}},ue={scope:"regexp",variants:[se("###"),se("##"),se("#"),V]},G={match:ee(/`/,tt,/`/)},W={className:"variable",match:/\$\d+/},k={className:"variable",match:`\\$${Pi}+`},M=[G,W,k],D={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:xk,contains:[...g,y,_]}]}},F={scope:"keyword",match:ee(/@/,Oe(...Nk),Ln(Oe(/\(/,/\s+/)))},J={scope:"meta",match:ee(/@/,tt)},ne=[D,F,J],oe={match:Ln(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ee(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Pi,"+")},{className:"type",match:Lr,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ee(/\s+&\s+/,Ln(Lr)),relevance:0}]},He={begin://,keywords:c,contains:[...r,...d,...ne,h,oe]};oe.contains.push(He);const Ae={match:ee(tt,/\s*:/),keywords:"_|0",relevance:0},Pe={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",Ae,...r,ue,...d,...p,...g,y,_,...M,...ne,oe]},cn={begin://,keywords:"repeat each",contains:[...r,oe]},mr={begin:Oe(Ln(ee(tt,/\s*:/)),Ln(ee(tt,/\s+/,tt,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:tt}]},On={begin:/\(/,end:/\)/,keywords:c,contains:[mr,...r,...d,...g,y,_,...ne,oe,Pe],endsParent:!0,illegal:/["']/},ts={match:[/(func|macro)/,/\s+/,Oe(G.match,tt,Ps)],className:{1:"keyword",3:"title.function"},contains:[cn,On,e],illegal:[/\[/,/%/]},ns={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[cn,On,e],illegal:/\[|%/},rs={match:[/operator/,/\s+/,Ps],className:{1:"keyword",3:"title"}},is={begin:[/precedencegroup/,/\s+/,Lr],className:{1:"keyword",3:"title"},contains:[oe],keywords:[...wk,...Wl],end:/}/},dn={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},gr={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ke={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,tt,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[cn,...d,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:Lr},...d],relevance:0}]};for(const Q of _.variants){const kt=Q.contains.find(br=>br.label==="interpol");kt.keywords=c;const $=[...d,...p,...g,y,_,...M];kt.contains=[...$,{begin:/\(/,end:/\)/,contains:["self",...$]}]}return{name:"Swift",keywords:c,contains:[...r,ts,ns,dn,gr,Ke,rs,is,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},ue,...d,...p,...g,y,_,...M,...ne,oe,Pe]}}const Bi="[A-Za-z$_][0-9A-Za-z$_]*",Xu=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Qu=["true","false","null","undefined","NaN","Infinity"],ef=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],tf=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],nf=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],rf=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],sf=[].concat(nf,ef,tf);function Mk(n){const e=n.regex,t=(D,{after:F})=>{const J="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(D,F)=>{const J=D[0].length+D.index,ne=D.input[J];if(ne==="<"||ne===","){F.ignoreMatch();return}ne===">"&&(t(D,{after:J})||F.ignoreMatch());let oe;const He=D.input.substring(J);if(oe=He.match(/^\s*=/)){F.ignoreMatch();return}if((oe=He.match(/^\s+extends\s+/))&&oe.index===0){F.ignoreMatch();return}}},a={$pattern:Bi,keyword:Xu,literal:Qu,built_in:sf,"variable.language":rf},l="[0-9](_?[0-9])*",c=`\\.(${l})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,f]},E={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},y=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,p,h,m,g,{match:/\$\d+/},u];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(y)});const S=[].concat(E,f.contains),v=S.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(S)}]),x={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:v},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,e.concat(r,"(",e.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ef,...tf]}},_={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[x],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function se(D){return e.concat("(?!",D.join("|"),")")}const ue={match:e.concat(/\b/,se([...nf,"super","import"].map(D=>`${D}\\s*\\(`)),r,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:e.concat(/\./,e.lookahead(e.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},W={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},x]},k="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(k)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[x]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),_,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,p,h,m,g,E,{match:/\$\d+/},u,T,{scope:"attr",match:r+e.lookahead(":"),relevance:0},M,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,n.REGEXP_MODE,{className:"function",begin:k,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[x,n.inherit(n.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[x]},ue,V,C,W,{match:/\$[(.]/}]}}function Ak(n){const e=n.regex,t=Mk(n),r=Bi,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,n.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[t.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Bi,keyword:Xu.concat(l),literal:Qu,built_in:sf.concat(i),"variable.language":rf},d={className:"meta",begin:"@"+r},u=(m,g,b)=>{const E=m.contains.findIndex(y=>y.label===g);if(E===-1)throw new Error("can not find mode to replace");m.contains.splice(E,1,b)};Object.assign(t.keywords,c),t.exports.PARAMS_CONTAINS.push(d);const f=t.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:e.concat(r,e.lookahead(/\s*\?:/))});t.exports.PARAMS_CONTAINS.push([t.exports.CLASS_REFERENCE,f,p]),t.contains=t.contains.concat([d,s,o,p]),u(t,"shebang",n.SHEBANG()),u(t,"use_strict",a);const h=t.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t}function Ok(n){const e=n.regex,t={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:e.concat(/# */,e.either(s,i),/ *#/)},{begin:e.concat(/# */,a,/ *#/)},{begin:e.concat(/# */,o,/ *#/)},{begin:e.concat(/# */,e.either(s,i),/ +/,e.either(o,a),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},u=n.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=n.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[t,r,l,c,d,u,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function Rk(n){n.regex;const e=n.COMMENT(/\(;/,/;\)/);e.contains.push("self");const t=n.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[t,e,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,i,n.QUOTE_STRING_MODE,l,c,a]}}function Ik(n){const e=n.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=n.inherit(s,{begin:/\(/,end:/\)/}),a=n.inherit(n.APOS_STRING_MODE,{className:"string"}),l=n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[s,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[s,o,l,a]}]}]},n.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:c}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Dk(n){const e="true false yes no null",t="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[n.BACKSLASH_ESCAPE,i]},a=n.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},g=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+t},{className:"type",begin:"!<"+t+">"},{className:"type",begin:"!"+t},{className:"type",begin:"!!"+t},{className:"meta",begin:"&"+n.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+n.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},n.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},f,{className:"number",begin:n.C_NUMBER_RE+"\\b",relevance:0},h,m,s,o],b=[...g];return b.pop(),b.push(a),p.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:g}}const Lk={arduino:g0,bash:b0,c:y0,cpp:E0,csharp:k0,css:M0,diff:A0,go:O0,graphql:R0,ini:I0,java:D0,javascript:z0,json:F0,kotlin:H0,less:Z0,lua:j0,makefile:X0,markdown:Q0,objectivec:ek,perl:tk,php:nk,"php-template":rk,plaintext:ik,python:sk,"python-repl":ok,r:ak,ruby:lk,rust:ck,scss:yk,shell:Ek,sql:kk,swift:Ck,typescript:Ak,vbnet:Ok,wasm:Rk,xml:Ik,yaml:Dk},ql={},Pk="hljs-";function Bk(n){const e=Fu.newInstance();return n&&s(n),{highlight:t,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:a};function t(l,c,d){const u=d||ql,f=typeof u.prefix=="string"?u.prefix:Pk;if(!e.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");e.configure({__emitter:$k,classPrefix:f});const p=e.highlight(c,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});const h=p._emitter.root,m=h.data;return m.language=p.language,m.relevance=p.relevance,h}function r(l,c){const u=(c||ql).subset||i();let f=-1,p=0,h;for(;++fp&&(p=g.data.relevance,h=g)}return h||{type:"root",children:[],data:{language:void 0,relevance:p}}}function i(){return e.listLanguages()}function s(l,c){if(typeof l=="string")e.registerLanguage(l,c);else{let d;for(d in l)Object.hasOwn(l,d)&&e.registerLanguage(d,l[d])}}function o(l,c){if(typeof l=="string")e.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let d;for(d in l)if(Object.hasOwn(l,d)){const u=l[d];e.registerAliases(typeof u=="string"?u:[...u],{languageName:d})}}}function a(l){return!!e.getLanguage(l)}}class $k{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e==="")return;const t=this.stack[this.stack.length-1],r=t.children[t.children.length-1];r&&r.type==="text"?r.value+=e:t.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){const r=this.stack[this.stack.length-1],i=e.root.children;t?r.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):r.children.push(...i)}openNode(e){const t=this,r=e.split(".").map(function(o,a){return a?o+"_".repeat(a):t.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const zk={class:"tiptap-wrapper"},Fk={key:0,class:"tiptap-toolbar"},Uk=$i({__name:"TipTapEditor",props:{modelValue:{},placeholder:{}},emits:["update:modelValue","ready"],setup(n,{emit:e}){const t=Bk(Lk),r=n,i=e,s=Rb({extensions:[mE.configure({codeBlock:!1}),h0.configure({lowlight:t})],content:r.modelValue||"",editorProps:{attributes:{class:"tiptap-editor"}},onUpdate:({editor:o})=>{i("update:modelValue",o.getJSON())},onCreate:()=>{i("ready")}});return Ur(()=>r.modelValue,o=>{s.value&&JSON.stringify(s.value.getJSON())!==JSON.stringify(o)&&s.value.commands.setContent(o||"",{emitUpdate:!1})}),mo(()=>{var o;(o=s.value)==null||o.destroy()}),(o,a)=>(q(),Z("div",zk,[Y(s)?(q(),Z("div",Fk,[O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("bold")}]),onClick:a[0]||(a[0]=l=>Y(s).chain().focus().toggleBold().run()),title:"Bold"},[...a[9]||(a[9]=[O("strong",null,"B",-1)])],2),O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("italic")}]),onClick:a[1]||(a[1]=l=>Y(s).chain().focus().toggleItalic().run()),title:"Italic"},[...a[10]||(a[10]=[O("em",null,"I",-1)])],2),a[11]||(a[11]=O("span",{class:"tiptap-separator"},null,-1)),O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("heading",{level:1})}]),onClick:a[2]||(a[2]=l=>Y(s).chain().focus().toggleHeading({level:1}).run()),title:"Heading 1"}," H1 ",2),O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("heading",{level:2})}]),onClick:a[3]||(a[3]=l=>Y(s).chain().focus().toggleHeading({level:2}).run()),title:"Heading 2"}," H2 ",2),O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("heading",{level:3})}]),onClick:a[4]||(a[4]=l=>Y(s).chain().focus().toggleHeading({level:3}).run()),title:"Heading 3"}," H3 ",2),a[12]||(a[12]=O("span",{class:"tiptap-separator"},null,-1)),O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("bulletList")}]),onClick:a[5]||(a[5]=l=>Y(s).chain().focus().toggleBulletList().run()),title:"Bullet List"}," • ",2),O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("orderedList")}]),onClick:a[6]||(a[6]=l=>Y(s).chain().focus().toggleOrderedList().run()),title:"Ordered List"}," 1. ",2),O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("codeBlock")}]),onClick:a[7]||(a[7]=l=>Y(s).chain().focus().toggleCodeBlock().run()),title:"Code Block"}," ",2),O("button",{type:"button",class:Ge(["tiptap-btn",{active:Y(s).isActive("blockquote")}]),onClick:a[8]||(a[8]=l=>Y(s).chain().focus().toggleBlockquote().run()),title:"Blockquote"}," “ ",2)])):$e("",!0),ht(Y(Ob),{editor:Y(s)},null,8,["editor"])]))}}),Hk={class:"reasoning-panel"},Kk={key:0,class:"reasoning-panel__empty"},Vk={key:1,class:"reasoning-panel__content"},Wk={class:"reasoning-panel__field"},Gk=["value"],qk=["value"],Jk={key:1,class:"reasoning-panel__value"},Yk={class:"reasoning-panel__field"},Zk={class:"reasoning-panel__confidence"},jk=["value"],Xk={key:2,class:"reasoning-panel__confidence-bar"},Qk={key:0,class:"reasoning-panel__field"},e_={class:"reasoning-panel__value"},t_={class:"reasoning-panel__steps"},n_={class:"reasoning-panel__steps-header"},r_={class:"reasoning-panel__step-header"},i_={class:"reasoning-panel__step-number"},s_=["onClick"],o_={class:"reasoning-panel__step-body"},a_=["value","onInput"],l_={key:1,class:"reasoning-panel__step-text"},c_={key:2,class:"reasoning-panel__step-conclusion"},d_=["value","onInput"],u_={key:1,class:"reasoning-panel__step-text reasoning-panel__step-text--conclusion"},f_={key:0,class:"reasoning-panel__no-steps"},p_={class:"reasoning-panel__modal"},h_={class:"reasoning-panel__field"},m_={class:"reasoning-panel__field"},g_={class:"reasoning-panel__modal-actions"},b_=$i({__name:"ReasoningPanel",props:{documentId:{},reasoning:{},editable:{type:Boolean}},emits:["update","add-step","delete-step"],setup(n,{emit:e}){const t=n,r=e,i=[{value:"chain",label:"Chain"},{value:"idea",label:"Idea"},{value:"context",label:"Context"},{value:"reflection",label:"Reflection"}],s=Be(null),o=Be(!1),a=Be(""),l=Be("");Ur(()=>t.reasoning,E=>{s.value=E?JSON.parse(JSON.stringify(E)):null},{immediate:!0,deep:!0});const c=bf(()=>!!s.value&&s.value.reasoning_type!==null);function d(E){s.value&&(s.value.reasoning_type=E,p())}function u(E){if(!s.value)return;const y=parseFloat(E);!isNaN(y)&&y>=0&&y<=1&&(s.value.confidence=y,p())}function f(E,y,S){s.value&&(y==="conclusion"?s.value.reasoning_steps[E].conclusion=S||null:s.value.reasoning_steps[E].thought=S,p())}function p(){s.value&&r("update",{...s.value})}function h(){a.value="",l.value="",o.value=!0}function m(){a.value.trim()&&(r("add-step",a.value.trim(),l.value.trim()||null),o.value=!1)}function g(E){r("delete-step",E)}function b(E){return E===null?"var(--text-secondary)":E>=.8?"#22c55e":E>=.5?"#eab308":"#ef4444"}return(E,y)=>{var S,v,x,C,T,_,I,V,se,ue,G,W;return q(),Z("aside",Hk,[y[19]||(y[19]=mf('

Reasoning

',1)),c.value?(q(),Z("div",Vk,[O("div",Wk,[y[8]||(y[8]=O("label",{class:"reasoning-panel__label"},"Type",-1)),n.editable?(q(),Z("select",{key:0,value:(S=s.value)==null?void 0:S.reasoning_type,class:"reasoning-panel__select",onChange:y[0]||(y[0]=k=>d(k.target.value))},[(q(),Z(Hr,null,Kr(i,k=>O("option",{key:k.value,value:k.value},ft(k.label),9,qk)),64))],40,Gk)):(q(),Z("span",Jk,ft((v=i.find(k=>{var M;return k.value===((M=s.value)==null?void 0:M.reasoning_type)}))==null?void 0:v.label),1))]),O("div",Yk,[y[9]||(y[9]=O("label",{class:"reasoning-panel__label"},"Confidence",-1)),O("div",Zk,[n.editable?(q(),Z("input",{key:0,type:"number",min:"0",max:"1",step:"0.01",value:(x=s.value)==null?void 0:x.confidence,class:"reasoning-panel__input",onChange:y[1]||(y[1]=k=>u(k.target.value))},null,40,jk)):(q(),Z("span",{key:1,class:"reasoning-panel__value",style:Vr({color:b(((C=s.value)==null?void 0:C.confidence)??null)})},ft(((T=s.value)==null?void 0:T.confidence)!==null?(s.value.confidence*100).toFixed(0)+"%":"N/A"),5)),((_=s.value)==null?void 0:_.confidence)!==null?(q(),Z("div",Xk,[O("div",{class:"reasoning-panel__confidence-fill",style:Vr({width:(((I=s.value)==null?void 0:I.confidence)??0)*100+"%",backgroundColor:b(((V=s.value)==null?void 0:V.confidence)??null)})},null,4)])):$e("",!0)])]),(se=s.value)!=null&&se.model_source?(q(),Z("div",Qk,[y[10]||(y[10]=O("label",{class:"reasoning-panel__label"},"Model",-1)),O("span",e_,ft(s.value.model_source),1)])):$e("",!0),O("div",t_,[O("div",n_,[y[12]||(y[12]=O("label",{class:"reasoning-panel__label"},"Steps",-1)),n.editable?(q(),Bs(Kt,{key:0,variant:"secondary",size:"sm",onClick:h},{default:mt(()=>[...y[11]||(y[11]=[qe(" + Add ",-1)])]),_:1})):$e("",!0)]),(q(!0),Z(Hr,null,Kr((ue=s.value)==null?void 0:ue.reasoning_steps,(k,M)=>(q(),Z("div",{key:k.step,class:"reasoning-panel__step"},[O("div",r_,[O("span",i_,"Step "+ft(k.step),1),n.editable?(q(),Z("button",{key:0,class:"reasoning-panel__step-delete",onClick:D=>g(k.step),title:"Delete step"}," × ",8,s_)):$e("",!0)]),O("div",o_,[n.editable?(q(),Z("textarea",{key:0,value:k.thought,class:"reasoning-panel__textarea",placeholder:"Thought...",rows:"2",onInput:D=>f(M,"thought",D.target.value)},null,40,a_)):(q(),Z("p",l_,ft(k.thought),1)),k.conclusion!==void 0?(q(),Z("div",c_,[y[13]||(y[13]=O("label",{class:"reasoning-panel__sublabel"},"Conclusion",-1)),n.editable?(q(),Z("textarea",{key:0,value:k.conclusion??"",class:"reasoning-panel__textarea",placeholder:"Conclusion (optional)...",rows:"2",onInput:D=>f(M,"conclusion",D.target.value)},null,40,d_)):k.conclusion?(q(),Z("p",u_,ft(k.conclusion),1)):$e("",!0)])):$e("",!0)])]))),128)),(W=(G=s.value)==null?void 0:G.reasoning_steps)!=null&&W.length?$e("",!0):(q(),Z("p",f_," No steps yet. "))])])):(q(),Z("div",Kk,[y[7]||(y[7]=O("p",null,"No reasoning data for this document.",-1)),ht(Kt,{variant:"secondary",size:"sm",onClick:h},{default:mt(()=>[...y[6]||(y[6]=[qe(" Add Reasoning ",-1)])]),_:1})])),o.value?(q(),Z("div",{key:2,class:"reasoning-panel__modal-overlay",onClick:y[5]||(y[5]=gf(k=>o.value=!1,["self"]))},[O("div",p_,[y[18]||(y[18]=O("h4",{class:"reasoning-panel__modal-title"},"Add Reasoning Step",-1)),O("div",h_,[y[14]||(y[14]=O("label",{class:"reasoning-panel__label"},"Thought",-1)),Wr(O("textarea",{"onUpdate:modelValue":y[2]||(y[2]=k=>a.value=k),class:"reasoning-panel__textarea",placeholder:"Describe the reasoning thought...",rows:"3",autofocus:""},null,512),[[Gr,a.value]])]),O("div",m_,[y[15]||(y[15]=O("label",{class:"reasoning-panel__label"},"Conclusion (optional)",-1)),Wr(O("textarea",{"onUpdate:modelValue":y[3]||(y[3]=k=>l.value=k),class:"reasoning-panel__textarea",placeholder:"Optional conclusion reached...",rows:"2"},null,512),[[Gr,l.value]])]),O("div",g_,[ht(Kt,{variant:"secondary",size:"sm",onClick:y[4]||(y[4]=k=>o.value=!1)},{default:mt(()=>[...y[16]||(y[16]=[qe("Cancel",-1)])]),_:1}),ht(Kt,{variant:"primary",size:"sm",onClick:m},{default:mt(()=>[...y[17]||(y[17]=[qe("Add Step",-1)])]),_:1})])])])):$e("",!0)])}}}),y_=Yl(b_,[["__scopeId","data-v-be14ffe5"]]),E_={class:"layout"},k_={class:"layout__body"},__={key:0,class:"loading"},S_={key:1,class:"error"},v_={key:2,class:"doc-view"},w_={class:"doc-view__toolbar"},T_={class:"doc-view__toolbar-left"},N_={class:"doc-view__toolbar-right"},x_={key:0,class:"doc-view__saving"},C_={key:1,class:"doc-view__saved"},M_={class:"doc-view__header"},A_={class:"doc-view__tags"},O_=["onClick"],R_={class:"doc-view__editor"},I_={class:"form__field"},D_={class:"form__field"},L_={class:"color-picker"},P_=["onClick"],B_=$i({__name:"DocumentView",setup(n){const e=Ef(),t=kf(),r=_f(),i=Be(""),s=Be(null),o=Be(!1),a=Be(""),l=Be("#6366f1"),c=Be(!0),d=Be(null),u=Be(!1);Jl(async()=>{const T=e.params.id;if(await r.fetchDocument(T),await r.fetchTags(),r.currentDocument){i.value=r.currentDocument.title;const _=await r.fetchTipTapContent(T);_?s.value=_:r.currentDocument.content?s.value=f(r.currentDocument.content):s.value={type:"doc",content:[{type:"paragraph"}]}}}),Ur(()=>e.params.id,async T=>{if(T&&(u.value=!1,await r.fetchDocument(T),r.currentDocument)){i.value=r.currentDocument.title;const _=await r.fetchTipTapContent(T);_?s.value=_:s.value=f(r.currentDocument.content)}}),Ur(()=>r.currentDocument,T=>{T&&(i.value=T.title)});function f(T){if(!T)return{type:"doc",content:[{type:"paragraph"}]};const _=T.split(` -`),I=[];for(const V of _)V.startsWith("### ")?I.push({type:"heading",attrs:{level:3},content:[{type:"text",text:V.substring(4)}]}):V.startsWith("## ")?I.push({type:"heading",attrs:{level:2},content:[{type:"text",text:V.substring(3)}]}):V.startsWith("# ")?I.push({type:"heading",attrs:{level:1},content:[{type:"text",text:V.substring(2)}]}):V.startsWith("- ")||V.startsWith("* ")?I.push({type:"bulletList",content:[{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:V.substring(2)}]}]}]}):/^\d+\.\s/.test(V)?I.push({type:"orderedList",content:[{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:V.replace(/^\d+\.\s/,"")}]}]}]}):V.startsWith("```")?I.push({type:"paragraph",content:[{type:"text",text:V}]}):V.trim()?I.push({type:"paragraph",content:[{type:"text",text:V}]}):I.push({type:"paragraph"});return{type:"doc",content:I}}function p(T){s.value=T,d.value&&clearTimeout(d.value),d.value=setTimeout(()=>{m()},1500)}function h(){u.value=!0}async function m(){!r.currentDocument||!s.value||await r.updateDocumentTipTapContent(r.currentDocument.id,s.value)}async function g(){!r.currentDocument||!i.value.trim()||await r.updateDocument(r.currentDocument.id,i.value.trim())}async function b(T){r.currentDocument&&await r.removeTag(r.currentDocument.id,T)}async function E(){if(!a.value.trim()||!r.currentDocument)return;const T=await r.createTag(a.value.trim(),l.value),_=r.currentDocument.tags.map(I=>I.id);await r.assignTags(r.currentDocument.id,[..._,T.id]),o.value=!1,a.value="",l.value="#6366f1"}async function y(){r.currentDocument?t.push(`/projects/${r.currentDocument.project_id}`):t.push("/dashboard")}async function S(T){r.currentDocument&&await r.updateReasoning(r.currentDocument.id,T)}async function v(T,_){if(!r.currentDocument)return;const I=await r.addReasoningStep(r.currentDocument.id,T,_);I&&r.currentDocument.reasoning&&r.currentDocument.reasoning.reasoning_steps.push(I)}async function x(T){r.currentDocument&&(await r.deleteReasoningStep(r.currentDocument.id,T),r.currentDocument.reasoning&&(r.currentDocument.reasoning.reasoning_steps=r.currentDocument.reasoning.reasoning_steps.filter(_=>_.step!==T)))}const C=["#6366f1","#8b5cf6","#ec4899","#ef4444","#f97316","#eab308","#22c55e","#10b981","#14b8a6","#06b6d4"];return(T,_)=>(q(),Z("div",E_,[ht(Sf),O("div",k_,[O("main",{class:Ge(["layout__content",{"layout__content--with-panel":c.value}])},[Y(r).loading?(q(),Z("div",__,[..._[7]||(_[7]=[O("div",{class:"loading__spinner"},null,-1),O("p",null,"Loading document...",-1)])])):Y(r).error?(q(),Z("div",S_,[O("p",null,ft(Y(r).error),1),ht(Kt,{variant:"secondary",onClick:y},{default:mt(()=>[..._[8]||(_[8]=[qe("Go Back",-1)])]),_:1})])):Y(r).currentDocument?(q(),Z("div",v_,[O("div",w_,[O("div",T_,[O("button",{class:"doc-view__back",onClick:y},[..._[9]||(_[9]=[O("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[O("path",{d:"m15 18-6-6 6-6"})],-1),qe(" Back ",-1)])]),O("button",{class:Ge(["doc-view__panel-toggle",{active:c.value}]),onClick:_[0]||(_[0]=I=>c.value=!c.value),title:"Toggle Reasoning Panel"},[..._[10]||(_[10]=[O("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[O("path",{d:"M12 2a8 8 0 0 1 8 8c0 3.5-2 6-4 8l-2 2-2-2c-2-2-4-4.5-4-8a8 8 0 0 1 8-8z"}),O("circle",{cx:"12",cy:"10",r:"3"})],-1)])],2)]),O("div",N_,[Y(r).saving?(q(),Z("div",x_,[..._[11]||(_[11]=[O("div",{class:"doc-view__saving-dot"},null,-1),qe(" Saving... ",-1)])])):u.value?(q(),Z("div",C_,[..._[12]||(_[12]=[O("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[O("polyline",{points:"20 6 9 17 4 12"})],-1),qe(" Saved ",-1)])])):$e("",!0)])]),O("div",M_,[Wr(O("input",{"onUpdate:modelValue":_[1]||(_[1]=I=>i.value=I),type:"text",class:"doc-view__title",placeholder:"Untitled Document",onBlur:g,onKeyup:_[2]||(_[2]=yf(I=>I.target.blur(),["enter"]))},null,544),[[Gr,i.value]])]),O("div",A_,[(q(!0),Z(Hr,null,Kr(Y(r).currentDocument.tags,I=>(q(),Z("span",{key:I.id,class:"doc-view__tag",style:Vr({backgroundColor:I.color+"20",color:I.color,borderColor:I.color})},[qe(ft(I.name)+" ",1),O("button",{class:"doc-view__tag-remove",onClick:V=>b(I.id)},"×",8,O_)],4))),128)),O("button",{class:"doc-view__add-tag",onClick:_[3]||(_[3]=I=>o.value=!0)},[..._[13]||(_[13]=[O("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[O("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),O("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1),qe(" Add Tag ",-1)])])]),O("div",R_,[s.value?(q(),Bs(Uk,{key:0,"model-value":s.value,placeholder:"Start writing...","onUpdate:modelValue":p,onReady:h},null,8,["model-value"])):$e("",!0)])])):$e("",!0)],2),c.value&&Y(r).currentDocument?(q(),Bs(y_,{key:0,"document-id":Y(r).currentDocument.id,reasoning:Y(r).currentDocument.reasoning,editable:!0,onUpdate:S,onAddStep:v,onDeleteStep:x},null,8,["document-id","reasoning"])):$e("",!0)]),ht(vf,{show:o.value,title:"Add Tag",onClose:_[6]||(_[6]=I=>o.value=!1)},{footer:mt(()=>[ht(Kt,{variant:"secondary",onClick:_[5]||(_[5]=I=>o.value=!1)},{default:mt(()=>[..._[16]||(_[16]=[qe("Cancel",-1)])]),_:1}),ht(Kt,{variant:"primary",onClick:E},{default:mt(()=>[..._[17]||(_[17]=[qe("Add Tag",-1)])]),_:1})]),default:mt(()=>[O("div",I_,[_[14]||(_[14]=O("label",{for:"tag-name",class:"form__label"},"Tag Name",-1)),Wr(O("input",{id:"tag-name","onUpdate:modelValue":_[4]||(_[4]=I=>a.value=I),type:"text",class:"form__input",placeholder:"backend",autofocus:""},null,512),[[Gr,a.value]])]),O("div",D_,[_[15]||(_[15]=O("label",{class:"form__label"},"Color",-1)),O("div",L_,[(q(),Z(Hr,null,Kr(C,I=>O("button",{key:I,class:Ge(["color-picker__option",{"color-picker__option--selected":I===l.value}]),style:Vr({backgroundColor:I}),onClick:V=>l.value=I},null,14,P_)),64))])])]),_:1},8,["show"])]))}}),K_=Yl(B_,[["__scopeId","data-v-a42eb0e9"]]);export{K_ as default}; diff --git a/dist/assets/DocumentView-CG5E-1nF.css b/dist/assets/DocumentView-CG5E-1nF.css deleted file mode 100644 index e47962b..0000000 --- a/dist/assets/DocumentView-CG5E-1nF.css +++ /dev/null @@ -1 +0,0 @@ -.tiptap-wrapper{display:flex;flex-direction:column;height:100%}.tiptap-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;padding:.5rem;background:var(--bg-secondary);border:1px solid var(--border);border-bottom:none;border-radius:8px 8px 0 0}.tiptap-btn{display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 .5rem;background:none;border:1px solid transparent;border-radius:4px;font-size:.875rem;color:var(--text-secondary);cursor:pointer;transition:all .15s}.tiptap-btn:hover{background:var(--bg-primary);color:var(--text-primary)}.tiptap-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}.tiptap-separator{width:1px;height:20px;background:var(--border);margin:0 .25rem}.tiptap-editor{flex:1;padding:1rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:0 0 8px 8px;font-family:JetBrains Mono,Fira Code,monospace;font-size:.9375rem;line-height:1.7;color:var(--text-primary);outline:none;overflow-y:auto;min-height:400px}.tiptap-editor:focus{border-color:var(--accent)}.tiptap-editor p{margin:0 0 1rem}.tiptap-editor h1,.tiptap-editor h2,.tiptap-editor h3{font-weight:600;margin:1.5rem 0 .75rem}.tiptap-editor h1{font-size:1.75rem}.tiptap-editor h2{font-size:1.5rem}.tiptap-editor h3{font-size:1.25rem}.tiptap-editor ul,.tiptap-editor ol{padding-left:1.5rem;margin:0 0 1rem}.tiptap-editor li{margin:.25rem 0}.tiptap-editor code{background:var(--bg-primary);border:1px solid var(--border);border-radius:4px;padding:.125rem .375rem;font-family:inherit;font-size:.875em}.tiptap-editor pre{background:var(--bg-primary);border:1px solid var(--border);border-radius:6px;padding:1rem;margin:0 0 1rem;overflow-x:auto}.tiptap-editor pre code{background:none;border:none;padding:0}.tiptap-editor blockquote{border-left:3px solid var(--accent);padding-left:1rem;margin:0 0 1rem;color:var(--text-secondary)}.tiptap-editor p.is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:var(--text-secondary);pointer-events:none;height:0}.tiptap-editor .hljs-comment,.tiptap-editor .hljs-quote{color:#6a737d}.tiptap-editor .hljs-variable,.tiptap-editor .hljs-template-variable,.tiptap-editor .hljs-tag,.tiptap-editor .hljs-name,.tiptap-editor .hljs-selector-id,.tiptap-editor .hljs-selector-class,.tiptap-editor .hljs-regexp,.tiptap-editor .hljs-deletion{color:#d73a49}.tiptap-editor .hljs-number,.tiptap-editor .hljs-built_in,.tiptap-editor .hljs-literal,.tiptap-editor .hljs-type,.tiptap-editor .hljs-params,.tiptap-editor .hljs-meta,.tiptap-editor .hljs-link{color:#005cc5}.tiptap-editor .hljs-attribute{color:#e36209}.tiptap-editor .hljs-string,.tiptap-editor .hljs-symbol,.tiptap-editor .hljs-bullet,.tiptap-editor .hljs-addition{color:#22863a}.tiptap-editor .hljs-title,.tiptap-editor .hljs-section{color:#6f42c1}.tiptap-editor .hljs-keyword,.tiptap-editor .hljs-selector-tag{color:#d73a49}.reasoning-panel[data-v-be14ffe5]{width:320px;min-width:320px;height:100%;background:var(--bg-secondary);border-left:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}.reasoning-panel__header[data-v-be14ffe5]{padding:1rem;border-bottom:1px solid var(--border)}.reasoning-panel__title[data-v-be14ffe5]{display:flex;align-items:center;gap:.5rem;font-size:.9375rem;font-weight:600;color:var(--text-primary);margin:0}.reasoning-panel__empty[data-v-be14ffe5]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem;color:var(--text-secondary);text-align:center}.reasoning-panel__content[data-v-be14ffe5]{flex:1;overflow-y:auto;padding:1rem}.reasoning-panel__field[data-v-be14ffe5]{margin-bottom:1rem}.reasoning-panel__label[data-v-be14ffe5]{display:block;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:.375rem}.reasoning-panel__sublabel[data-v-be14ffe5]{display:block;font-size:.6875rem;font-weight:500;color:var(--text-secondary);margin-bottom:.25rem}.reasoning-panel__value[data-v-be14ffe5]{font-size:.875rem;color:var(--text-primary)}.reasoning-panel__select[data-v-be14ffe5]{width:100%;padding:.5rem .75rem;background:var(--bg-primary);border:1px solid var(--border);border-radius:6px;font-size:.875rem;color:var(--text-primary);cursor:pointer;outline:none}.reasoning-panel__select[data-v-be14ffe5]:focus{border-color:var(--accent)}.reasoning-panel__input[data-v-be14ffe5]{width:100%;padding:.5rem .75rem;background:var(--bg-primary);border:1px solid var(--border);border-radius:6px;font-size:.875rem;color:var(--text-primary);outline:none}.reasoning-panel__input[data-v-be14ffe5]:focus{border-color:var(--accent)}.reasoning-panel__confidence[data-v-be14ffe5]{display:flex;flex-direction:column;gap:.5rem}.reasoning-panel__confidence-bar[data-v-be14ffe5]{height:4px;background:var(--border);border-radius:2px;overflow:hidden}.reasoning-panel__confidence-fill[data-v-be14ffe5]{height:100%;border-radius:2px;transition:width .3s ease}.reasoning-panel__steps[data-v-be14ffe5]{margin-top:1.5rem}.reasoning-panel__steps-header[data-v-be14ffe5]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.reasoning-panel__step[data-v-be14ffe5]{background:var(--bg-primary);border:1px solid var(--border);border-radius:8px;margin-bottom:.75rem;overflow:hidden}.reasoning-panel__step-header[data-v-be14ffe5]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem;background:var(--bg-secondary);border-bottom:1px solid var(--border)}.reasoning-panel__step-number[data-v-be14ffe5]{font-size:.75rem;font-weight:600;color:var(--text-secondary)}.reasoning-panel__step-delete[data-v-be14ffe5]{display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;background:none;border:none;border-radius:4px;font-size:1.25rem;color:var(--text-secondary);cursor:pointer;transition:all .15s}.reasoning-panel__step-delete[data-v-be14ffe5]:hover{background:#ef444420;color:#ef4444}.reasoning-panel__step-body[data-v-be14ffe5]{padding:.75rem}.reasoning-panel__textarea[data-v-be14ffe5]{width:100%;padding:.5rem .625rem;background:var(--bg-primary);border:1px solid var(--border);border-radius:6px;font-size:.8125rem;font-family:inherit;color:var(--text-primary);resize:vertical;outline:none;box-sizing:border-box}.reasoning-panel__textarea[data-v-be14ffe5]:focus{border-color:var(--accent)}.reasoning-panel__step-text[data-v-be14ffe5]{font-size:.8125rem;line-height:1.5;color:var(--text-primary);margin:0}.reasoning-panel__step-text--conclusion[data-v-be14ffe5]{color:var(--text-secondary);font-style:italic}.reasoning-panel__step-conclusion[data-v-be14ffe5]{margin-top:.5rem;padding-top:.5rem;border-top:1px dashed var(--border)}.reasoning-panel__no-steps[data-v-be14ffe5]{font-size:.8125rem;color:var(--text-secondary);text-align:center;padding:1rem}.reasoning-panel__modal-overlay[data-v-be14ffe5]{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.reasoning-panel__modal[data-v-be14ffe5]{background:var(--bg-primary);border:1px solid var(--border);border-radius:12px;padding:1.25rem;width:90%;max-width:400px}.reasoning-panel__modal-title[data-v-be14ffe5]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0 0 1rem}.reasoning-panel__modal-actions[data-v-be14ffe5]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1rem}.layout[data-v-a42eb0e9]{display:flex;flex-direction:column;height:100vh}.layout__body[data-v-a42eb0e9]{flex:1;display:flex;overflow:hidden}.layout__content[data-v-a42eb0e9]{flex:1;overflow-y:auto;background:var(--bg-primary)}.loading[data-v-a42eb0e9],.error[data-v-a42eb0e9]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;height:100%;color:var(--text-secondary)}.loading__spinner[data-v-a42eb0e9]{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin-a42eb0e9 .8s linear infinite}@keyframes spin-a42eb0e9{to{transform:rotate(360deg)}}.doc-view[data-v-a42eb0e9]{max-width:900px;margin:0 auto;padding:2rem}.doc-view__toolbar[data-v-a42eb0e9]{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem}.doc-view__toolbar-left[data-v-a42eb0e9]{display:flex;align-items:center;gap:.5rem}.doc-view__toolbar-right[data-v-a42eb0e9]{display:flex;align-items:center}.doc-view__back[data-v-a42eb0e9]{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background:none;border:none;border-radius:6px;font-size:.875rem;color:var(--text-secondary);cursor:pointer;transition:all .15s}.doc-view__back[data-v-a42eb0e9]:hover{background:var(--bg-secondary);color:var(--text-primary)}.doc-view__panel-toggle[data-v-a42eb0e9]{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:none;border:1px solid var(--border);border-radius:6px;color:var(--text-secondary);cursor:pointer;transition:all .15s}.doc-view__panel-toggle[data-v-a42eb0e9]:hover{background:var(--bg-secondary);color:var(--text-primary)}.doc-view__panel-toggle.active[data-v-a42eb0e9]{background:var(--accent);border-color:var(--accent);color:#fff}.doc-view__saving[data-v-a42eb0e9]{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:var(--text-secondary)}.doc-view__saving-dot[data-v-a42eb0e9]{width:8px;height:8px;background:var(--accent);border-radius:50%;animation:pulse-a42eb0e9 1s ease-in-out infinite}@keyframes pulse-a42eb0e9{0%,to{opacity:1}50%{opacity:.4}}.doc-view__saved[data-v-a42eb0e9]{display:flex;align-items:center;gap:.375rem;font-size:.8125rem;color:#22c55e}.doc-view__header[data-v-a42eb0e9]{margin-bottom:1rem}.doc-view__title[data-v-a42eb0e9]{width:100%;padding:0;background:none;border:none;font-size:2rem;font-weight:600;color:var(--text-primary);outline:none}.doc-view__title[data-v-a42eb0e9]::placeholder{color:var(--text-secondary)}.doc-view__tags[data-v-a42eb0e9]{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.5rem;padding-bottom:1.5rem;border-bottom:1px solid var(--border)}.doc-view__tag[data-v-a42eb0e9]{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem .625rem;border:1px solid;border-radius:9999px;font-size:.8125rem;font-weight:500}.doc-view__tag-remove[data-v-a42eb0e9]{display:flex;align-items:center;justify-content:center;width:14px;height:14px;padding:0;background:none;border:none;border-radius:50%;font-size:1rem;line-height:1;cursor:pointer;opacity:.7}.doc-view__tag-remove[data-v-a42eb0e9]:hover{opacity:1}.doc-view__add-tag[data-v-a42eb0e9]{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem .625rem;background:var(--bg-secondary);border:1px dashed var(--border);border-radius:9999px;font-size:.8125rem;color:var(--text-secondary);cursor:pointer;transition:all .15s}.doc-view__add-tag[data-v-a42eb0e9]:hover{border-color:var(--accent);color:var(--accent)}.doc-view__editor[data-v-a42eb0e9]{flex:1;display:flex;flex-direction:column}.form__field[data-v-a42eb0e9]{margin-bottom:1.25rem}.form__field[data-v-a42eb0e9]:last-child{margin-bottom:0}.form__label[data-v-a42eb0e9]{display:block;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--text-primary)}.form__input[data-v-a42eb0e9]{width:100%;padding:.75rem 1rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;font-size:.9375rem;color:var(--text-primary);outline:none;transition:border-color .15s,box-shadow .15s;box-sizing:border-box}.form__input[data-v-a42eb0e9]::placeholder{color:var(--text-secondary)}.form__input[data-v-a42eb0e9]:focus{border-color:var(--accent);box-shadow:0 0 0 3px #6366f11a}.color-picker[data-v-a42eb0e9]{display:flex;flex-wrap:wrap;gap:.5rem}.color-picker__option[data-v-a42eb0e9]{width:32px;height:32px;border:2px solid transparent;border-radius:6px;cursor:pointer;transition:transform .1s,border-color .1s}.color-picker__option[data-v-a42eb0e9]:hover{transform:scale(1.1)}.color-picker__option--selected[data-v-a42eb0e9]{border-color:var(--text-primary)} diff --git a/dist/assets/DocumentView-BMqbfrMR.js b/dist/assets/DocumentView-DZfZNu6O.js similarity index 99% rename from dist/assets/DocumentView-BMqbfrMR.js rename to dist/assets/DocumentView-DZfZNu6O.js index de10531..d887083 100644 --- a/dist/assets/DocumentView-BMqbfrMR.js +++ b/dist/assets/DocumentView-DZfZNu6O.js @@ -1,4 +1,4 @@ -import{k as Yl,C as mo,d as $i,D as cf,E as df,r as ye,G as uf,H as ff,I as pf,J as hf,l as j,K as mf,n as Kr,c as J,a as v,q as Pe,b as Ae,f as je,o as H,L as gf,g as He,F as En,m as kn,t as Me,M as Vr,s as Bs,w as bf,e as Wr,v as Gr,i as yf,h as ve,N as Ef,y as kf,j as _f}from"./index-D2fAAQJ2.js";import{u as vf,H as Sf}from"./Header-BawqVjtJ.js";import{B as gt,_ as jl}from"./Button-D-QrZfPJ.js";import{M as oa}from"./Modal-C7dh6Uqe.js";function Se(n){this.content=n}Se.prototype={constructor:Se,find:function(n){for(var e=0;e>1}};Se.from=function(n){if(n instanceof Se)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Se(e)};function Zl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=Zl(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Xl(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){t-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:t,b:r};if(o.isText&&o.text!=a.text){let c=0,d=Math.min(o.text.length,a.text.length);for(;ce&&r(l,i+a,s||null,o)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,t-d),r,i+d)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),r.push(a),i+=a.nodeSize),o=l}return new x(r,i)}cutByIndex(e,t){return e==t?x.empty:e==0&&t==this.content.length?this:new x(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new x(i,s)}addToStart(e){return new x([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new x(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?_r(t+1,s):_r(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return x.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new x(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return x.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};te.none=[];class Jr extends Error{}class D{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ec(this.content,e+this.openStart,t);return r&&new D(r,this.openStart,this.openEnd)}removeBetween(e,t){return new D(Ql(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return D.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new D(x.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new D(e,r,i)}}D.empty=new D(x.empty,0,0);function Ql(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:a}=n.findIndex(t);if(i==e||s.isText){if(a!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Ql(s.content,e-i-1,t-i-1)))}function ec(n,e,t,r){let{index:i,offset:s}=n.findIndex(e),o=n.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=ec(o.content,e-s-1,t,o);return a&&n.replaceChild(i,o.copy(a))}function wf(n,e,t){if(t.openStart>n.depth)throw new Jr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Jr("Inconsistent open depths");return tc(n,e,t,0)}function tc(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Kn(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(Jt(n.nodeAfter,r),s++));for(let a=s;ai&&zs(n,e,i+1),o=r.depth>i&&zs(t,r,i+1),a=[];return Kn(null,n,i,a),s&&o&&e.index(i)==t.index(i)?(nc(s,o),Jt(Yt(s,rc(n,e,t,r,i+1)),a)):(s&&Jt(Yt(s,Yr(n,e,i+1)),a),Kn(e,t,i,a),o&&Jt(Yt(o,Yr(t,r,i+1)),a)),Kn(r,null,i,a),new x(a)}function Yr(n,e,t){let r=[];if(Kn(null,n,t,r),n.depth>t){let i=zs(n,e,t+1);Jt(Yt(i,Yr(n,e,t+1)),r)}return Kn(e,null,t,r),new x(r)}function Tf(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(x.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class er{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new er(t,r,s)}static resolveCached(e,t){let r=aa.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ic(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=x.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;lt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=x.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,r);return s.type.checkAttrs(s.attrs),s}}rt.prototype.text=void 0;class Zr extends rt{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ic(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Zr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Zr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ic(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class en{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Mf(e,t);if(r.next==null)return en.empty;let i=sc(r);r.next&&r.err("Unexpected trailing text");let s=Pf(Lf(i));return Bf(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` +import{k as Yl,D as mo,d as $i,E as cf,G as df,r as ye,H as uf,I as ff,J as pf,K as hf,l as j,L as mf,n as Kr,c as J,a as v,q as Pe,b as Ae,f as je,o as H,M as gf,g as He,F as En,m as kn,t as Me,z as Vr,s as Bs,w as bf,e as Wr,v as Gr,i as yf,h as ve,N as Ef,y as kf,j as _f}from"./index-Bwmlaq-e.js";import{u as vf,H as Sf}from"./Header-D3hVVxoP.js";import{B as gt,_ as jl}from"./Button-BCQM6xXJ.js";import{M as oa}from"./Modal-DyPCz1pc.js";function Se(n){this.content=n}Se.prototype={constructor:Se,find:function(n){for(var e=0;e>1}};Se.from=function(n){if(n instanceof Se)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Se(e)};function Zl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=Zl(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Xl(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){t-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:t,b:r};if(o.isText&&o.text!=a.text){let c=0,d=Math.min(o.text.length,a.text.length);for(;ce&&r(l,i+a,s||null,o)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,t-d),r,i+d)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),r.push(a),i+=a.nodeSize),o=l}return new x(r,i)}cutByIndex(e,t){return e==t?x.empty:e==0&&t==this.content.length?this:new x(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new x(i,s)}addToStart(e){return new x([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new x(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?_r(t+1,s):_r(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return x.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new x(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return x.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};te.none=[];class Jr extends Error{}class D{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ec(this.content,e+this.openStart,t);return r&&new D(r,this.openStart,this.openEnd)}removeBetween(e,t){return new D(Ql(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return D.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new D(x.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new D(e,r,i)}}D.empty=new D(x.empty,0,0);function Ql(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:a}=n.findIndex(t);if(i==e||s.isText){if(a!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Ql(s.content,e-i-1,t-i-1)))}function ec(n,e,t,r){let{index:i,offset:s}=n.findIndex(e),o=n.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=ec(o.content,e-s-1,t,o);return a&&n.replaceChild(i,o.copy(a))}function wf(n,e,t){if(t.openStart>n.depth)throw new Jr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Jr("Inconsistent open depths");return tc(n,e,t,0)}function tc(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Kn(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(Jt(n.nodeAfter,r),s++));for(let a=s;ai&&zs(n,e,i+1),o=r.depth>i&&zs(t,r,i+1),a=[];return Kn(null,n,i,a),s&&o&&e.index(i)==t.index(i)?(nc(s,o),Jt(Yt(s,rc(n,e,t,r,i+1)),a)):(s&&Jt(Yt(s,Yr(n,e,i+1)),a),Kn(e,t,i,a),o&&Jt(Yt(o,Yr(t,r,i+1)),a)),Kn(r,null,i,a),new x(a)}function Yr(n,e,t){let r=[];if(Kn(null,n,t,r),n.depth>t){let i=zs(n,e,t+1);Jt(Yt(i,Yr(n,e,t+1)),r)}return Kn(e,null,t,r),new x(r)}function Tf(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(x.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class er{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new er(t,r,s)}static resolveCached(e,t){let r=aa.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ic(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=x.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;lt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=x.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,r);return s.type.checkAttrs(s.attrs),s}}rt.prototype.text=void 0;class Zr extends rt{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ic(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Zr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Zr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ic(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class en{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Mf(e,t);if(r.next==null)return en.empty;let i=sc(r);r.next&&r.err("Unexpected trailing text");let s=Pf(Lf(i));return Bf(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` `)}}en.empty=new en(!0);class Mf{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function sc(n){let e=[];do e.push(Af(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Af(n){let e=[];do e.push(Of(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Of(n){let e=Df(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Rf(n,e);else break;return e}function la(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Rf(n,e){let t=la(n),r=t;return n.eat(",")&&(n.next!="}"?r=la(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function If(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Df(n){if(n.eat("(")){let e=sc(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=If(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Lf(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,a,l){let c={term:l,to:a};return e[o].push(c),c}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=s(o.exprs[l],a);if(l==o.exprs.length-1)return c;i(c,a=t())}else if(o.type=="star"){let l=t();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=t();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c{n[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let d=0;d{c||i.push([a,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let s=e[r.join(",")]=new en(r.indexOf(n.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:lc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new rt(this,this.computeAttrs(e),x.from(t),te.setFrom(r))}createChecked(e=null,t,r){return t=x.from(t),this.checkContent(t),new rt(this,this.computeAttrs(e),t,te.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=x.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(x.empty,!0);return s?new rt(this,e,t.append(s),te.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[s]=new uc(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function $f(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}class zf{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?$f(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class zi{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=dc(e,i.attrs),this.excluded=null;let s=ac(this.attrs);this.instance=s?new te(this,s):null}create(e=null){return!e&&this.instance?this.instance:new te(this,lc(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new zi(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t-1}}class fc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Se.from(e.nodes),t.marks=Se.from(e.marks||{}),this.nodes=da.compile(this.spec.nodes,this),this.marks=zi.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=en.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?ua(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:ua(this,o.split(" "))}this.nodeFromJSON=i=>rt.fromJSON(this,i),this.markFromJSON=i=>te.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof da){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new Zr(r,r.defaultAttrs,e,te.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function ua(n,e){let t=[];for(let r=0;r-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Ff(n){return n.tag!=null}function Uf(n){return n.style!=null}class It{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Ff(i))this.tags.push(i);else if(Uf(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new pa(this,t,!1);return r.addAll(e,te.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new pa(this,t,!0);return r.addAll(e,te.none,t.from,t.to),D.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=ha(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=ha(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new It(e,It.schemaRules(e)))}}const pc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Hf={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hc={ol:!0,ul:!0},tr=1,Fs=2,Vn=4;function fa(n,e,t){return e!=null?(e?tr:0)|(e==="full"?Fs:0):n&&n.whitespace=="pre"?tr|Fs:t&~Vn}class vr{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=te.none,this.match=s||(o&Vn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(x.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&tr)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=x.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(x.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!pc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class pa{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=fa(null,t.preserveWhitespace,0)|(r?Vn:0);i?s=new vr(i.type,i.attrs,te.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new vr(null,null,te.none,!0,null,o):s=new vr(e.schema.topNodeType,null,te.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&Fs?"full":this.localPreserveWS||(i.options&tr)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,` `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(o,t.attrs||null,r,t.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}s&&this.sync(a)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+a)&&(i=c,s=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):ma(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new vr(e,t,l,i,null,a)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=tr)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let c=t[a];if(c==""){if(a==t.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Kf(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&hc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Vf(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function ha(n){let e={};for(let t in n)e[t]=n[t];return e}function ma(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=a=>{s.push(a);for(let l=0;l{if(s.length||o.marks.length){let a=0,l=0;for(;a=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&$r(cs(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return $r(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new on(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=ga(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return ga(e.marks)}}function ga(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function cs(n){return n.document||window.document}const ba=new WeakMap;function Wf(n){let e=ba.get(n);return e===void 0&&ba.set(n,e=Gf(n)),e}function Gf(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let a,l=t?n.createElementNS(t,i):n.createElement(i),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let u in c)if(c[u]!=null){let f=u.indexOf(" ");f>0?l.setAttributeNS(u.slice(0,f),u.slice(f+1),c[u]):u=="style"&&l.style?l.style.cssText=c[u]:l.setAttribute(u,c[u])}}for(let u=d;ud)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=$r(n,f,t,r);if(l.appendChild(p),h){if(a)throw new RangeError("Multiple content holes");a=h}}}return{dom:l,contentDOM:a}}const mc=65535,gc=Math.pow(2,16);function qf(n,e){return n+e*gc}function ya(n){return n&mc}function Jf(n){return(n-(n&mc))/gc}const bc=1,yc=2,zr=4,Ec=8;class Us{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ec)>0}get deletedBefore(){return(this.delInfo&(bc|zr))>0}get deletedAfter(){return(this.delInfo&(yc|zr))>0}get deletedAcross(){return(this.delInfo&zr)>0}}class Ke{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Ke.empty)return Ke.empty}recover(e){let t=0,r=ya(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[a+s],d=this.ranges[a+o],u=l+c;if(e<=u){let f=c?e==l?-1:e==u?1:t:t,p=l+i+(f<0?0:d);if(r)return p;let h=e==(t<0?l:u)?null:qf(a/3,e-l),m=e==l?yc:e==u?bc:zr;return(t<0?e!=l:e!=u)&&(m|=Ec),new Us(p,m,h)}i+=d-c}return r?e+i:new Us(e+i,0,null)}touches(e,t){let r=0,i=ya(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;ae)break;let c=this.ranges[a+s],d=l+c;if(e<=d&&a==i*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new nr;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rs&&l!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return he.fromReplace(e,this.from,this.to,s)}invert(){return new nt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Mt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Mt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Mt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Mt(t.from,t.to,e.markFromJSON(t.mark))}}Ie.jsonID("addMark",Mt);class nt extends Ie{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new D(go(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return he.fromReplace(e,this.from,this.to,r)}invert(){return new Mt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new nt(t.pos,r.pos,this.mark)}merge(e){return e instanceof nt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new nt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new nt(t.from,t.to,e.markFromJSON(t.mark))}}Ie.jsonID("removeMark",nt);class At extends Ie{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return he.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return he.fromReplace(e,this.pos,this.pos+1,new D(x.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new Ee(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ee(t.from,t.to,t.gapFrom,t.gapTo,D.fromJSON(e,t.slice),t.insert,!!t.structure)}}Ie.jsonID("replaceAround",Ee);function Hs(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Yf(n,e,t,r){let i=[],s=[],o,a;n.doc.nodesBetween(e,t,(l,c,d)=>{if(!l.isInline)return;let u=l.marks;if(!r.isInSet(u)&&d.type.allowsMarkType(r.type)){let f=Math.max(c,e),p=Math.min(c+l.nodeSize,t),h=r.addToSet(u);for(let m=0;mn.step(l)),s.forEach(l=>n.step(l))}function jf(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(r instanceof zi){let c=o.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,t);for(let d=0;dn.step(new nt(o.from,o.to,o.style)))}function bo(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l=0;l--)n.step(o[l])}function Zf(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Rn(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),a=n.$from.index(r)+i,l=n.$to.indexAfter(r)-s;if(rt;h--)m||r.index(h)>0?(m=!0,d=x.from(r.node(h).copy(d)),u++):l--;let f=x.empty,p=0;for(let h=s,m=!1;h>t;h--)m||i.after(h+1)=0;o--){if(r.size){let a=t[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=x.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new Ee(i,s,i,s,new D(r,0,0),t.length,!0))}function np(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,l)&&rp(n.doc,n.mapping.slice(s).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?c=!1:!p&&h&&(c=!0)}c===!1&&_c(n,o,a,s),bo(n,n.mapping.slice(s).map(a,1),r,void 0,c===null);let d=n.mapping.slice(s),u=d.map(a,1),f=d.map(a+o.nodeSize,1);return n.step(new Ee(u,f,u+1,f-1,new D(x.from(r.create(l,null,o.marks)),0,0),1,!0)),c===!0&&kc(n,o,a,s),!1}})}function kc(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function _c(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(` diff --git a/dist/assets/Header-BGQ1nCqG.css b/dist/assets/Header-BGQ1nCqG.css deleted file mode 100644 index c5e2d8d..0000000 --- a/dist/assets/Header-BGQ1nCqG.css +++ /dev/null @@ -1 +0,0 @@ -.header[data-v-0d1f0999]{display:flex;align-items:center;justify-content:space-between;height:56px;padding:0 1.5rem;background:var(--bg-primary);border-bottom:1px solid var(--border)}.header__left[data-v-0d1f0999]{flex:1}.header__logo[data-v-0d1f0999]{display:flex;align-items:center;gap:.75rem;text-decoration:none}.header__title[data-v-0d1f0999]{font-size:1.125rem;font-weight:600;color:var(--text-primary)}.header__center[data-v-0d1f0999]{flex:2;max-width:480px}.header__search[data-v-0d1f0999]{position:relative;display:flex;align-items:center}.header__search-icon[data-v-0d1f0999]{position:absolute;left:.75rem;color:var(--text-secondary)}.header__search-input[data-v-0d1f0999]{width:100%;padding:.5rem 4rem .5rem 2.25rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;font-size:.875rem;color:var(--text-primary);outline:none;transition:border-color .15s,box-shadow .15s}.header__search-input[data-v-0d1f0999]::placeholder{color:var(--text-secondary)}.header__search-input[data-v-0d1f0999]:focus{border-color:var(--accent);box-shadow:0 0 0 3px #6366f11a}.header__kbd[data-v-0d1f0999]{position:absolute;right:.75rem;padding:.125rem .375rem;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:4px;font-size:.75rem;color:var(--text-secondary)}.header__right[data-v-0d1f0999]{flex:1;display:flex;justify-content:flex-end}.header__user[data-v-0d1f0999]{position:relative;display:flex;align-items:center;gap:.5rem;padding:.375rem .75rem .375rem .375rem;border-radius:8px;cursor:pointer;transition:background .15s}.header__user[data-v-0d1f0999]:hover{background:var(--bg-secondary)}.header__avatar[data-v-0d1f0999]{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--accent);border-radius:6px;color:#fff;font-weight:600;font-size:.875rem}.header__username[data-v-0d1f0999]{font-size:.875rem;color:var(--text-primary)}.header__dropdown[data-v-0d1f0999]{position:absolute;top:100%;right:0;margin-top:.5rem;min-width:180px;background:var(--bg-primary);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 30px #00000026;overflow:hidden;z-index:100}.header__dropdown-item[data-v-0d1f0999]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.75rem 1rem;background:none;border:none;font-size:.875rem;color:var(--text-primary);cursor:pointer;text-align:left;text-decoration:none}.header__dropdown-item[data-v-0d1f0999]:hover{background:var(--bg-secondary)}.header__dropdown-item--info[data-v-0d1f0999]{flex-direction:column;align-items:flex-start;gap:.125rem}.header__dropdown-item--info small[data-v-0d1f0999]{color:var(--text-secondary);font-size:.75rem}.header__dropdown-divider[data-v-0d1f0999]{margin:.25rem 0;border:none;border-top:1px solid var(--border)}.fade-enter-active[data-v-0d1f0999],.fade-leave-active[data-v-0d1f0999]{transition:opacity .15s,transform .15s}.fade-enter-from[data-v-0d1f0999],.fade-leave-to[data-v-0d1f0999]{opacity:0;transform:translateY(-4px)} diff --git a/dist/assets/Header-BawqVjtJ.js b/dist/assets/Header-D3hVVxoP.js similarity index 72% rename from dist/assets/Header-BawqVjtJ.js rename to dist/assets/Header-D3hVVxoP.js index e60862f..2199708 100644 --- a/dist/assets/Header-BawqVjtJ.js +++ b/dist/assets/Header-D3hVVxoP.js @@ -1 +1 @@ -import{z as Z,r as h,A as I,B as ee,d as K,j as z,n as j,o as v,s as te,f as R,T as F,g as V,c as _,w as Q,a as e,e as O,v as P,h as E,F as G,m as ne,q as se,t as C,b as N,O as ae,J as H,u as oe,P as ie,k as le,x as re,p as ue,l as b,L as ce}from"./index-D2fAAQJ2.js";import{_ as J}from"./Button-D-QrZfPJ.js";const de=Z("documents",()=>{const r=h(null),x=h([]),w=h(!1),k=h(null),m=h(!1),i=ee();async function y(t){w.value=!0,k.value=null;try{r.value=await i.get(`/documents/${t}`)}catch(n){throw k.value=n instanceof Error?n.message:"Failed to fetch document",n}finally{w.value=!1}}async function d(t,n,o="",u=null){const $={title:n,content:o};return u&&($.folder_id=u),await i.post(`/projects/${t}/documents`,$)}async function c(t,n,o){var A;const u={title:n};o!==void 0&&(u.folder_id=o);const $=await i.put(`/documents/${t}`,u);return((A=r.value)==null?void 0:A.id)===t&&(r.value=$),$}async function S(t,n){var o;m.value=!0;try{await i.put(`/documents/${t}/content`,{content:n}),((o=r.value)==null?void 0:o.id)===t&&(r.value.content=n)}finally{m.value=!1}}async function D(t){var n;await i.delete(`/documents/${t}`),((n=r.value)==null?void 0:n.id)===t&&(r.value=null)}async function g(){try{x.value=await i.get("/tags")}catch(t){console.error("Failed to fetch tags:",t)}}async function a(t,n){const o=await i.post("/tags",{name:t,color:n});return x.value.push(o),o}async function M(t,n){var o;await i.put(`/documents/${t}/tags`,{tag_ids:n}),((o=r.value)==null?void 0:o.id)===t&&(r.value.tags=x.value.filter(u=>n.includes(u.id)))}async function B(t,n){var o;await i.delete(`/documents/${t}/tags/${n}`),((o=r.value)==null?void 0:o.id)===t&&(r.value.tags=r.value.tags.filter(u=>u.id!==n))}async function T(t,n){var o;m.value=!0;try{await i.put(`/documents/${t}/content`,{content:n,format:"tiptap"}),((o=r.value)==null?void 0:o.id)===t&&(r.value.tiptap_content=n)}finally{m.value=!1}}async function q(t){try{return(await i.get(`/documents/${t}/content?format=tiptap`)).content}catch{return null}}async function p(t){try{return await i.get(`/documents/${t}/reasoning-panel`)}catch{return null}}async function s(t,n){var u;const o=await i.put(`/documents/${t}/reasoning`,n);return((u=r.value)==null?void 0:u.id)===t&&(r.value.reasoning=o),o}async function l(t,n,o){try{return await i.post(`/documents/${t}/reasoning-steps`,{thought:n,conclusion:o})}catch{return null}}async function f(t,n){await i.delete(`/documents/${t}/reasoning-steps/${n}`)}async function L(t){return await i.get(`/documents/${t}/backlinks`)}async function U(t){return await i.get(`/documents/${t}/outgoing-links`)}async function W(t){return await i.get(`/documents/${t}/links`)}async function X(t,n="documents",o=10,u){const $=new URLSearchParams({q:t,type:n,limit:String(o)});return u&&$.set("project_id",u),await i.get(`/search?${$}`)}async function Y(t,n){const u=await fetch(`http://localhost:8000/api/v1/documents/${t}/export?format=${n}`,{headers:{Authorization:`Bearer ${I()}`},credentials:"include"});if(!u.ok)throw new Error("Export failed");return await u.blob()}return{currentDocument:r,tags:x,loading:w,error:k,saving:m,fetchDocument:y,createDocument:d,updateDocument:c,updateDocumentContent:S,updateDocumentTipTapContent:T,fetchTipTapContent:q,fetchReasoningPanel:p,updateReasoning:s,addReasoningStep:l,deleteReasoningStep:f,deleteDocument:D,fetchTags:g,createTag:a,assignTags:M,removeTag:B,fetchBacklinks:L,fetchOutgoingLinks:U,fetchDocumentLinks:W,search:X,exportDocument:Y}}),he={class:"quick-switcher__dialog"},fe={class:"quick-switcher__input-wrap"},ve={key:0,class:"quick-switcher__loading"},pe=["onClick","onMouseenter"],_e={class:"quick-switcher__result-icon"},we={class:"quick-switcher__result-info"},me=["innerHTML"],ye={key:0,class:"quick-switcher__result-subtitle"},ke={class:"quick-switcher__result-type"},ge={key:2,class:"quick-switcher__empty"},xe={key:3,class:"quick-switcher__hint"},$e=K({__name:"QuickSwitcher",props:{show:{type:Boolean}},emits:["close"],setup(r,{emit:x}){const w=r,k=x,m=z(),i=de(),y=h(""),d=h([]),c=h(0),S=h(!1),D=h(null),g=h(null);let a=null;j(()=>w.show,async s=>{var l;s&&(y.value="",d.value=[],c.value=0,await H(),(l=D.value)==null||l.focus())}),j(y,s=>{if(a&&clearTimeout(a),!s.trim()){d.value=[];return}a=setTimeout(()=>{M(s)},150)});async function M(s){if(s.trim()){S.value=!0;try{const l=await i.search(s,"all",10);d.value=l.results,c.value=0}catch(l){console.error("Search failed:",l),d.value=[]}finally{S.value=!1}}}function B(s){s.key==="ArrowDown"?(s.preventDefault(),c.value=Math.min(c.value+1,d.value.length-1),T()):s.key==="ArrowUp"?(s.preventDefault(),c.value=Math.max(c.value-1,0),T()):s.key==="Enter"?(s.preventDefault(),d.value[c.value]&&q(d.value[c.value])):s.key==="Escape"&&k("close")}function T(){H(()=>{var l;const s=(l=g.value)==null?void 0:l.children[c.value];s==null||s.scrollIntoView({block:"nearest"})})}function q(s){s.type==="document"?m.push(`/documents/${s.id}`):s.type==="project"&&m.push(`/projects/${s.id}`),k("close")}function p(s){return s==="document"?"📄":s==="project"?"📁":"📄"}return(s,l)=>(v(),te(ae,{to:"body"},[R(F,{name:"quick-switcher"},{default:V(()=>[r.show?(v(),_("div",{key:0,class:"quick-switcher",onClick:l[1]||(l[1]=Q(f=>k("close"),["self"]))},[e("div",he,[e("div",fe,[l[2]||(l[2]=e("svg",{class:"quick-switcher__icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"m21 21-4.35-4.35"})],-1)),O(e("input",{ref_key:"inputRef",ref:D,"onUpdate:modelValue":l[0]||(l[0]=f=>y.value=f),type:"text",class:"quick-switcher__input",placeholder:"Search documents and projects...",onKeydown:B},null,544),[[P,y.value]]),l[3]||(l[3]=e("kbd",{class:"quick-switcher__kbd"},"Esc",-1))]),S.value?(v(),_("div",ve,[...l[4]||(l[4]=[e("div",{class:"quick-switcher__spinner"},null,-1),E(" Searching... ",-1)])])):d.value.length>0?(v(),_("ul",{key:1,ref_key:"listRef",ref:g,class:"quick-switcher__results"},[(v(!0),_(G,null,ne(d.value,(f,L)=>(v(),_("li",{key:f.id,class:se(["quick-switcher__result",{"quick-switcher__result--selected":L===c.value}]),onClick:U=>q(f),onMouseenter:U=>c.value=L},[e("span",_e,C(p(f.type)),1),e("div",we,[e("span",{class:"quick-switcher__result-title",innerHTML:f.highlight||f.title},null,8,me),f.subtitle?(v(),_("span",ye,C(f.subtitle),1)):N("",!0)]),e("span",ke,C(f.type),1)],42,pe))),128))],512)):y.value.trim()?(v(),_("div",ge," No results found ")):(v(),_("div",xe,[...l[5]||(l[5]=[e("p",null,"Start typing to search...",-1),e("div",{class:"quick-switcher__shortcuts"},[e("span",null,[e("kbd",null,"↑"),e("kbd",null,"↓"),E(" Navigate")]),e("span",null,[e("kbd",null,"Enter"),E(" Open")]),e("span",null,[e("kbd",null,"Esc"),E(" Close")])],-1)])]))])])):N("",!0)]),_:1})]))}}),be=J($e,[["__scopeId","data-v-992dcfce"]]),Se={class:"header"},Te={class:"header__left"},qe={class:"header__center"},Ce={class:"header__right"},De=["title"],Be={key:0,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Me={key:1,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ee={class:"header__avatar"},Le={class:"header__username"},Re={key:0,class:"header__dropdown"},Ue={class:"header__dropdown-item header__dropdown-item--info"},Ae=K({__name:"Header",setup(r){const x=z(),w=oe(),{resolvedTheme:k,toggleTheme:m}=ie(),i=h(""),y=h(!1),d=h(!1);function c(g){(g.metaKey||g.ctrlKey)&&g.key==="k"&&(g.preventDefault(),d.value=!0)}le(()=>{document.addEventListener("keydown",c)}),re(()=>{document.removeEventListener("keydown",c)});function S(){i.value.trim()&&x.push({name:"dashboard",query:{q:i.value}})}function D(){w.logout(),x.push("/login")}return(g,a)=>{var B,T,q;const M=ue("router-link");return v(),_(G,null,[e("header",Se,[e("div",Te,[R(M,{to:"/dashboard",class:"header__logo"},{default:V(()=>[...a[4]||(a[4]=[e("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none"},[e("rect",{width:"28",height:"28",rx:"6",fill:"var(--accent)"}),e("path",{d:"M8 10h12M8 14h8M8 18h10",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1),e("span",{class:"header__title"},"Claudia Docs",-1)])]),_:1})]),e("div",qe,[e("form",{class:"header__search",onSubmit:Q(S,["prevent"])},[a[5]||(a[5]=e("svg",{class:"header__search-icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"m21 21-4.35-4.35"})],-1)),O(e("input",{"onUpdate:modelValue":a[0]||(a[0]=p=>i.value=p),type:"text",placeholder:"Search documents...",class:"header__search-input"},null,512),[[P,i.value]]),a[6]||(a[6]=e("kbd",{class:"header__kbd"},"⌘K",-1))],32)]),e("div",Ce,[e("button",{class:"header__theme-toggle",onClick:a[1]||(a[1]=(...p)=>b(m)&&b(m)(...p)),title:b(k)==="dark"?"Switch to light mode":"Switch to dark mode"},[b(k)==="dark"?(v(),_("svg",Be,[...a[7]||(a[7]=[ce('',9)])])):(v(),_("svg",Me,[...a[8]||(a[8]=[e("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])]))],8,De),e("div",{class:"header__user",onClick:a[2]||(a[2]=p=>y.value=!y.value)},[e("div",Ee,C(((T=(B=b(w).user)==null?void 0:B.username)==null?void 0:T.charAt(0).toUpperCase())||"U"),1),e("span",Le,C(((q=b(w).user)==null?void 0:q.username)||"User"),1),a[11]||(a[11]=e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"m6 9 6 6 6-6"})],-1)),R(F,{name:"fade"},{default:V(()=>{var p,s;return[y.value?(v(),_("div",Re,[e("div",Ue,[e("span",null,C((p=b(w).user)==null?void 0:p.username),1),e("small",null,C((s=b(w).user)==null?void 0:s.role),1)]),a[10]||(a[10]=e("hr",{class:"header__dropdown-divider"},null,-1)),e("button",{class:"header__dropdown-item",onClick:D},[...a[9]||(a[9]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),e("polyline",{points:"16 17 21 12 16 7"}),e("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1),E(" Logout ",-1)])])])):N("",!0)]}),_:1})])])]),R(be,{show:d.value,onClose:a[3]||(a[3]=p=>d.value=!1)},null,8,["show"])],64)}}}),je=J(Ae,[["__scopeId","data-v-f3e028bf"]]);export{je as H,de as u}; +import{A as Z,r as h,B as I,C as ee,d as H,j as F,n as N,o as v,s as te,f as L,T as Q,g as V,c as _,w as z,a as e,e as O,v as P,h as E,F as G,m as ne,q as se,t as q,b as K,O as ae,K as j,u as oe,P as ie,k as le,x as re,p as ue,l as b,M as ce}from"./index-Bwmlaq-e.js";import{_ as J}from"./Button-BCQM6xXJ.js";const de=Z("documents",()=>{const r=h(null),x=h([]),w=h(!1),k=h(null),m=h(!1),i=ee();async function y(t){w.value=!0,k.value=null;try{r.value=await i.get(`/documents/${t}`)}catch(n){throw k.value=n instanceof Error?n.message:"Failed to fetch document",n}finally{w.value=!1}}async function d(t,n,o="",u=null){const $={title:n,content:o};return u&&($.folder_id=u),await i.post(`/projects/${t}/documents`,$)}async function c(t,n,o){var A;const u={title:n};o!==void 0&&(u.folder_id=o);const $=await i.put(`/documents/${t}`,u);return((A=r.value)==null?void 0:A.id)===t&&(r.value=$),$}async function S(t,n){var o;m.value=!0;try{await i.put(`/documents/${t}/content`,{content:n}),((o=r.value)==null?void 0:o.id)===t&&(r.value.content=n)}finally{m.value=!1}}async function D(t){var n;await i.delete(`/documents/${t}`),((n=r.value)==null?void 0:n.id)===t&&(r.value=null)}async function g(){try{x.value=await i.get("/tags")}catch(t){console.error("Failed to fetch tags:",t)}}async function a(t,n){const o=await i.post("/tags",{name:t,color:n});return x.value.push(o),o}async function M(t,n){var o;await i.put(`/documents/${t}/tags`,{tag_ids:n}),((o=r.value)==null?void 0:o.id)===t&&(r.value.tags=x.value.filter(u=>n.includes(u.id)))}async function B(t,n){var o;await i.delete(`/documents/${t}/tags/${n}`),((o=r.value)==null?void 0:o.id)===t&&(r.value.tags=r.value.tags.filter(u=>u.id!==n))}async function C(t,n){var o;m.value=!0;try{await i.put(`/documents/${t}/content`,{content:n,format:"tiptap"}),((o=r.value)==null?void 0:o.id)===t&&(r.value.tiptap_content=n)}finally{m.value=!1}}async function T(t){try{return(await i.get(`/documents/${t}/content?format=tiptap`)).content}catch{return null}}async function p(t){try{return await i.get(`/documents/${t}/reasoning-panel`)}catch{return null}}async function s(t,n){var u;const o=await i.put(`/documents/${t}/reasoning`,n);return((u=r.value)==null?void 0:u.id)===t&&(r.value.reasoning=o),o}async function l(t,n,o){try{return await i.post(`/documents/${t}/reasoning-steps`,{thought:n,conclusion:o})}catch{return null}}async function f(t,n){await i.delete(`/documents/${t}/reasoning-steps/${n}`)}async function R(t){return await i.get(`/documents/${t}/backlinks`)}async function U(t){return await i.get(`/documents/${t}/outgoing-links`)}async function W(t){return await i.get(`/documents/${t}/links`)}async function X(t,n="documents",o=10,u){const $=new URLSearchParams({q:t,type:n,limit:String(o)});return u&&$.set("project_id",u),await i.get(`/search?${$}`)}async function Y(t,n){const u=await fetch(`http://localhost:8000/api/v1/documents/${t}/export?format=${n}`,{headers:{Authorization:`Bearer ${I()}`},credentials:"include"});if(!u.ok)throw new Error("Export failed");return await u.blob()}return{currentDocument:r,tags:x,loading:w,error:k,saving:m,fetchDocument:y,createDocument:d,updateDocument:c,updateDocumentContent:S,updateDocumentTipTapContent:C,fetchTipTapContent:T,fetchReasoningPanel:p,updateReasoning:s,addReasoningStep:l,deleteReasoningStep:f,deleteDocument:D,fetchTags:g,createTag:a,assignTags:M,removeTag:B,fetchBacklinks:R,fetchOutgoingLinks:U,fetchDocumentLinks:W,search:X,exportDocument:Y}}),he={class:"quick-switcher__dialog"},fe={class:"quick-switcher__input-wrap"},ve={key:0,class:"quick-switcher__loading"},pe=["onClick","onMouseenter"],_e={class:"quick-switcher__result-icon"},we={class:"quick-switcher__result-info"},me=["innerHTML"],ye={key:0,class:"quick-switcher__result-subtitle"},ke={class:"quick-switcher__result-type"},ge={key:2,class:"quick-switcher__empty"},xe={key:3,class:"quick-switcher__hint"},$e=H({__name:"QuickSwitcher",props:{show:{type:Boolean}},emits:["close"],setup(r,{emit:x}){const w=r,k=x,m=F(),i=de(),y=h(""),d=h([]),c=h(0),S=h(!1),D=h(null),g=h(null);let a=null;N(()=>w.show,async s=>{var l;s&&(y.value="",d.value=[],c.value=0,await j(),(l=D.value)==null||l.focus())}),N(y,s=>{if(a&&clearTimeout(a),!s.trim()){d.value=[];return}a=setTimeout(()=>{M(s)},150)});async function M(s){if(s.trim()){S.value=!0;try{const l=await i.search(s,"all",10);d.value=l.results,c.value=0}catch(l){console.error("Search failed:",l),d.value=[]}finally{S.value=!1}}}function B(s){s.key==="ArrowDown"?(s.preventDefault(),c.value=Math.min(c.value+1,d.value.length-1),C()):s.key==="ArrowUp"?(s.preventDefault(),c.value=Math.max(c.value-1,0),C()):s.key==="Enter"?(s.preventDefault(),d.value[c.value]&&T(d.value[c.value])):s.key==="Escape"&&k("close")}function C(){j(()=>{var l;const s=(l=g.value)==null?void 0:l.children[c.value];s==null||s.scrollIntoView({block:"nearest"})})}function T(s){s.type==="document"?m.push(`/documents/${s.id}`):s.type==="project"&&m.push(`/projects/${s.id}`),k("close")}function p(s){return s==="document"?"📄":s==="project"?"📁":"📄"}return(s,l)=>(v(),te(ae,{to:"body"},[L(Q,{name:"quick-switcher"},{default:V(()=>[r.show?(v(),_("div",{key:0,class:"quick-switcher",onClick:l[1]||(l[1]=z(f=>k("close"),["self"]))},[e("div",he,[e("div",fe,[l[2]||(l[2]=e("svg",{class:"quick-switcher__icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"m21 21-4.35-4.35"})],-1)),O(e("input",{ref_key:"inputRef",ref:D,"onUpdate:modelValue":l[0]||(l[0]=f=>y.value=f),type:"text",class:"quick-switcher__input",placeholder:"Search documents and projects...",onKeydown:B},null,544),[[P,y.value]]),l[3]||(l[3]=e("kbd",{class:"quick-switcher__kbd"},"Esc",-1))]),S.value?(v(),_("div",ve,[...l[4]||(l[4]=[e("div",{class:"quick-switcher__spinner"},null,-1),E(" Searching... ",-1)])])):d.value.length>0?(v(),_("ul",{key:1,ref_key:"listRef",ref:g,class:"quick-switcher__results"},[(v(!0),_(G,null,ne(d.value,(f,R)=>(v(),_("li",{key:f.id,class:se(["quick-switcher__result",{"quick-switcher__result--selected":R===c.value}]),onClick:U=>T(f),onMouseenter:U=>c.value=R},[e("span",_e,q(p(f.type)),1),e("div",we,[e("span",{class:"quick-switcher__result-title",innerHTML:f.highlight||f.title},null,8,me),f.subtitle?(v(),_("span",ye,q(f.subtitle),1)):K("",!0)]),e("span",ke,q(f.type),1)],42,pe))),128))],512)):y.value.trim()?(v(),_("div",ge," No results found ")):(v(),_("div",xe,[...l[5]||(l[5]=[e("p",null,"Start typing to search...",-1),e("div",{class:"quick-switcher__shortcuts"},[e("span",null,[e("kbd",null,"↑"),e("kbd",null,"↓"),E(" Navigate")]),e("span",null,[e("kbd",null,"Enter"),E(" Open")]),e("span",null,[e("kbd",null,"Esc"),E(" Close")])],-1)])]))])])):K("",!0)]),_:1})]))}}),be=J($e,[["__scopeId","data-v-992dcfce"]]),Se={class:"header"},Ce={class:"header__left"},Te={class:"header__center"},qe={class:"header__right"},De=["title"],Be={key:0,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Me={key:1,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ee={class:"header__avatar"},Re={class:"header__username"},Le={key:0,class:"header__dropdown"},Ue={class:"header__dropdown-item header__dropdown-item--info"},Ae=H({__name:"Header",setup(r){const x=F(),w=oe(),{resolvedTheme:k,toggleTheme:m}=ie(),i=h(""),y=h(!1),d=h(!1);function c(g){(g.metaKey||g.ctrlKey)&&g.key==="k"&&(g.preventDefault(),d.value=!0)}le(()=>{document.addEventListener("keydown",c)}),re(()=>{document.removeEventListener("keydown",c)});function S(){i.value.trim()&&x.push({name:"dashboard",query:{q:i.value}})}function D(){w.logout(),x.push("/login")}return(g,a)=>{var B,C,T;const M=ue("router-link");return v(),_(G,null,[e("header",Se,[e("div",Ce,[L(M,{to:"/dashboard",class:"header__logo"},{default:V(()=>[...a[4]||(a[4]=[e("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none"},[e("rect",{width:"28",height:"28",rx:"6",fill:"var(--accent)"}),e("path",{d:"M8 10h12M8 14h8M8 18h10",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1),e("span",{class:"header__title"},"Claudia Docs",-1)])]),_:1})]),e("div",Te,[e("form",{class:"header__search",onSubmit:z(S,["prevent"])},[a[5]||(a[5]=e("svg",{class:"header__search-icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"m21 21-4.35-4.35"})],-1)),O(e("input",{"onUpdate:modelValue":a[0]||(a[0]=p=>i.value=p),type:"text",placeholder:"Search documents...",class:"header__search-input"},null,512),[[P,i.value]]),a[6]||(a[6]=e("kbd",{class:"header__kbd"},"⌘K",-1))],32)]),e("div",qe,[e("button",{class:"header__theme-toggle",onClick:a[1]||(a[1]=(...p)=>b(m)&&b(m)(...p)),title:b(k)==="dark"?"Switch to light mode":"Switch to dark mode"},[b(k)==="dark"?(v(),_("svg",Be,[...a[7]||(a[7]=[ce('',9)])])):(v(),_("svg",Me,[...a[8]||(a[8]=[e("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])]))],8,De),e("div",{class:"header__user",onClick:a[2]||(a[2]=p=>y.value=!y.value)},[e("div",Ee,q(((C=(B=b(w).user)==null?void 0:B.username)==null?void 0:C.charAt(0).toUpperCase())||"U"),1),e("span",Re,q(((T=b(w).user)==null?void 0:T.username)||"User"),1),a[11]||(a[11]=e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"m6 9 6 6 6-6"})],-1)),L(Q,{name:"fade"},{default:V(()=>{var p,s;return[y.value?(v(),_("div",Le,[e("div",Ue,[e("span",null,q((p=b(w).user)==null?void 0:p.username),1),e("small",null,q((s=b(w).user)==null?void 0:s.role),1)]),a[10]||(a[10]=e("hr",{class:"header__dropdown-divider"},null,-1)),e("button",{class:"header__dropdown-item",onClick:D},[...a[9]||(a[9]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),e("polyline",{points:"16 17 21 12 16 7"}),e("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1),E(" Logout ",-1)])])])):K("",!0)]}),_:1})])])]),L(be,{show:d.value,onClose:a[3]||(a[3]=p=>d.value=!1)},null,8,["show"])],64)}}}),Ne=J(Ae,[["__scopeId","data-v-f3e028bf"]]);export{Ne as H,de as u}; diff --git a/dist/assets/Header-De-cxVSd.js b/dist/assets/Header-De-cxVSd.js deleted file mode 100644 index 32e3a58..0000000 --- a/dist/assets/Header-De-cxVSd.js +++ /dev/null @@ -1 +0,0 @@ -import{y as N,r as p,z as A,d as j,j as q,u as E,p as F,o as T,c as D,a,f as S,g as b,w as z,e as K,v as L,t as w,l as y,T as P,h as Q,b as G}from"./index-BuR1WXAD.js";import{_ as J}from"./Button-BgP1U8Po.js";const oe=N("documents",()=>{const s=p(null),d=p([]),i=p(!1),c=p(null),l=p(!1),r=A();async function k(e){i.value=!0,c.value=null;try{s.value=await r.get(`/documents/${e}`)}catch(t){throw c.value=t instanceof Error?t.message:"Failed to fetch document",t}finally{i.value=!1}}async function C(e,t,n="",u=null){const f={title:t,content:n};return u&&(f.folder_id=u),await r.post(`/projects/${e}/documents`,f)}async function o(e,t,n){var x;const u={title:t};n!==void 0&&(u.folder_id=n);const f=await r.put(`/documents/${e}`,u);return((x=s.value)==null?void 0:x.id)===e&&(s.value=f),f}async function $(e,t){var n;l.value=!0;try{await r.put(`/documents/${e}/content`,{content:t}),((n=s.value)==null?void 0:n.id)===e&&(s.value.content=t)}finally{l.value=!1}}async function v(e){var t;await r.delete(`/documents/${e}`),((t=s.value)==null?void 0:t.id)===e&&(s.value=null)}async function _(){try{d.value=await r.get("/tags")}catch(e){console.error("Failed to fetch tags:",e)}}async function m(e,t){const n=await r.post("/tags",{name:e,color:t});return d.value.push(n),n}async function h(e,t){var n;await r.put(`/documents/${e}/tags`,{tag_ids:t}),((n=s.value)==null?void 0:n.id)===e&&(s.value.tags=d.value.filter(u=>t.includes(u.id)))}async function g(e,t){var n;await r.delete(`/documents/${e}/tags/${t}`),((n=s.value)==null?void 0:n.id)===e&&(s.value.tags=s.value.tags.filter(u=>u.id!==t))}async function B(e,t){var n;l.value=!0;try{await r.put(`/documents/${e}/content`,{content:t,format:"tiptap"}),((n=s.value)==null?void 0:n.id)===e&&(s.value.tiptap_content=t)}finally{l.value=!1}}async function M(e){try{return(await r.get(`/documents/${e}/content?format=tiptap`)).content}catch{return null}}async function V(e){try{return await r.get(`/documents/${e}/reasoning-panel`)}catch{return null}}async function R(e,t){var u;const n=await r.put(`/documents/${e}/reasoning`,t);return((u=s.value)==null?void 0:u.id)===e&&(s.value.reasoning=n),n}async function U(e,t,n){try{return await r.post(`/documents/${e}/reasoning-steps`,{thought:t,conclusion:n})}catch{return null}}async function H(e,t){await r.delete(`/documents/${e}/reasoning-steps/${t}`)}return{currentDocument:s,tags:d,loading:i,error:c,saving:l,fetchDocument:k,createDocument:C,updateDocument:o,updateDocumentContent:$,updateDocumentTipTapContent:B,fetchTipTapContent:M,fetchReasoningPanel:V,updateReasoning:R,addReasoningStep:U,deleteReasoningStep:H,deleteDocument:v,fetchTags:_,createTag:m,assignTags:h,removeTag:g}}),O={class:"header"},W={class:"header__left"},X={class:"header__center"},Y={class:"header__right"},Z={class:"header__avatar"},I={class:"header__username"},ee={key:0,class:"header__dropdown"},te={class:"header__dropdown-item header__dropdown-item--info"},ae=j({__name:"Header",setup(s){const d=q(),i=E(),c=p(""),l=p(!1);function r(){c.value.trim()&&d.push({name:"dashboard",query:{q:c.value}})}function k(){i.logout(),d.push("/login")}return(C,o)=>{var v,_,m;const $=F("router-link");return T(),D("header",O,[a("div",W,[S($,{to:"/dashboard",class:"header__logo"},{default:b(()=>[...o[2]||(o[2]=[a("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none"},[a("rect",{width:"28",height:"28",rx:"6",fill:"var(--accent)"}),a("path",{d:"M8 10h12M8 14h8M8 18h10",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1),a("span",{class:"header__title"},"Claudia Docs",-1)])]),_:1})]),a("div",X,[a("form",{class:"header__search",onSubmit:z(r,["prevent"])},[o[3]||(o[3]=a("svg",{class:"header__search-icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a("circle",{cx:"11",cy:"11",r:"8"}),a("path",{d:"m21 21-4.35-4.35"})],-1)),K(a("input",{"onUpdate:modelValue":o[0]||(o[0]=h=>c.value=h),type:"text",placeholder:"Search documents...",class:"header__search-input"},null,512),[[L,c.value]]),o[4]||(o[4]=a("kbd",{class:"header__kbd"},"⌘K",-1))],32)]),a("div",Y,[a("div",{class:"header__user",onClick:o[1]||(o[1]=h=>l.value=!l.value)},[a("div",Z,w(((_=(v=y(i).user)==null?void 0:v.username)==null?void 0:_.charAt(0).toUpperCase())||"U"),1),a("span",I,w(((m=y(i).user)==null?void 0:m.username)||"User"),1),o[7]||(o[7]=a("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a("path",{d:"m6 9 6 6 6-6"})],-1)),S(P,{name:"fade"},{default:b(()=>{var h,g;return[l.value?(T(),D("div",ee,[a("div",te,[a("span",null,w((h=y(i).user)==null?void 0:h.username),1),a("small",null,w((g=y(i).user)==null?void 0:g.role),1)]),o[6]||(o[6]=a("hr",{class:"header__dropdown-divider"},null,-1)),a("button",{class:"header__dropdown-item",onClick:k},[...o[5]||(o[5]=[a("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[a("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),a("polyline",{points:"16 17 21 12 16 7"}),a("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1),Q(" Logout ",-1)])])])):G("",!0)]}),_:1})])])])}}}),re=J(ae,[["__scopeId","data-v-0d1f0999"]]);export{re as H,oe as u}; diff --git a/dist/assets/Login-Cogrj-Ia.js b/dist/assets/Login-Cogrj-Ia.js deleted file mode 100644 index 8c84036..0000000 --- a/dist/assets/Login-Cogrj-Ia.js +++ /dev/null @@ -1 +0,0 @@ -import{d as C,u as k,c as _,a as e,t as n,w as S,b as A,e as v,v as g,f as B,g as M,h as p,r as i,i as m,j as V,o as f}from"./index-D2fAAQJ2.js";import{B as D,_ as E}from"./Button-D-QrZfPJ.js";const N={class:"login"},I={class:"login__card"},L={class:"login__header"},T={class:"login__title"},U={class:"login__subtitle"},P={key:0,class:"login__error"},R={class:"login__field"},j={class:"login__field"},z={class:"login__toggle"},W=C({__name:"Login",setup(q){const h=V(),r=k(),o=i(""),s=i(""),a=i(!1),u=i(!1),l=i(""),w=m(()=>a.value?"Create Account":"Welcome Back"),y=m(()=>a.value?"Create Account":"Sign In");async function b(){if(!o.value||!s.value){l.value="Please fill in all fields";return}u.value=!0,l.value="";try{a.value?(await r.register(o.value,s.value),await r.login(o.value,s.value)):await r.login(o.value,s.value),h.push("/dashboard")}catch(d){l.value=d instanceof Error?d.message:"Authentication failed"}finally{u.value=!1}}function x(){a.value=!a.value,l.value=""}return(d,t)=>(f(),_("div",N,[e("div",I,[e("div",L,[t[2]||(t[2]=e("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none"},[e("rect",{width:"28",height:"28",rx:"6",fill:"var(--accent)"}),e("path",{d:"M8 10h12M8 14h8M8 18h10",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1)),e("h1",T,n(w.value),1),e("p",U,n(a.value?"Create your account to get started":"Sign in to access your documents"),1)]),e("form",{class:"login__form",onSubmit:S(b,["prevent"])},[l.value?(f(),_("div",P,n(l.value),1)):A("",!0),e("div",R,[t[3]||(t[3]=e("label",{for:"username",class:"login__label"},"Username",-1)),v(e("input",{id:"username","onUpdate:modelValue":t[0]||(t[0]=c=>o.value=c),type:"text",class:"login__input",placeholder:"Enter your username",autocomplete:"username"},null,512),[[g,o.value]])]),e("div",j,[t[4]||(t[4]=e("label",{for:"password",class:"login__label"},"Password",-1)),v(e("input",{id:"password","onUpdate:modelValue":t[1]||(t[1]=c=>s.value=c),type:"password",class:"login__input",placeholder:"Enter your password",autocomplete:"current-password"},null,512),[[g,s.value]])]),B(D,{type:"submit",variant:"primary",size:"lg",loading:u.value,style:{width:"100%"}},{default:M(()=>[p(n(y.value),1)]),_:1},8,["loading"]),e("p",z,[p(n(a.value?"Already have an account?":"Don't have an account?")+" ",1),e("button",{type:"button",class:"login__toggle-btn",onClick:x},n(a.value?"Sign in":"Create one"),1)])],32)]),t[5]||(t[5]=e("p",{class:"login__footer"}," Claudia Docs — Document Management for AI Agents ",-1))]))}}),H=E(W,[["__scopeId","data-v-d1a9e623"]]);export{H as default}; diff --git a/dist/assets/Login-BlKP8Srx.js b/dist/assets/Login-DD_XU6SA.js similarity index 97% rename from dist/assets/Login-BlKP8Srx.js rename to dist/assets/Login-DD_XU6SA.js index 665a933..4fa0ecf 100644 --- a/dist/assets/Login-BlKP8Srx.js +++ b/dist/assets/Login-DD_XU6SA.js @@ -1 +1 @@ -import{d as C,u as k,c as _,a as e,t as n,w as S,b as A,e as v,v as g,f as B,g as M,h as p,r as i,i as m,j as V,o as f}from"./index-BuR1WXAD.js";import{B as D,_ as E}from"./Button-BgP1U8Po.js";const N={class:"login"},I={class:"login__card"},L={class:"login__header"},T={class:"login__title"},U={class:"login__subtitle"},P={key:0,class:"login__error"},R={class:"login__field"},j={class:"login__field"},z={class:"login__toggle"},W=C({__name:"Login",setup(q){const h=V(),r=k(),o=i(""),s=i(""),a=i(!1),u=i(!1),l=i(""),w=m(()=>a.value?"Create Account":"Welcome Back"),y=m(()=>a.value?"Create Account":"Sign In");async function b(){if(!o.value||!s.value){l.value="Please fill in all fields";return}u.value=!0,l.value="";try{a.value?(await r.register(o.value,s.value),await r.login(o.value,s.value)):await r.login(o.value,s.value),h.push("/dashboard")}catch(d){l.value=d instanceof Error?d.message:"Authentication failed"}finally{u.value=!1}}function x(){a.value=!a.value,l.value=""}return(d,t)=>(f(),_("div",N,[e("div",I,[e("div",L,[t[2]||(t[2]=e("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none"},[e("rect",{width:"28",height:"28",rx:"6",fill:"var(--accent)"}),e("path",{d:"M8 10h12M8 14h8M8 18h10",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1)),e("h1",T,n(w.value),1),e("p",U,n(a.value?"Create your account to get started":"Sign in to access your documents"),1)]),e("form",{class:"login__form",onSubmit:S(b,["prevent"])},[l.value?(f(),_("div",P,n(l.value),1)):A("",!0),e("div",R,[t[3]||(t[3]=e("label",{for:"username",class:"login__label"},"Username",-1)),v(e("input",{id:"username","onUpdate:modelValue":t[0]||(t[0]=c=>o.value=c),type:"text",class:"login__input",placeholder:"Enter your username",autocomplete:"username"},null,512),[[g,o.value]])]),e("div",j,[t[4]||(t[4]=e("label",{for:"password",class:"login__label"},"Password",-1)),v(e("input",{id:"password","onUpdate:modelValue":t[1]||(t[1]=c=>s.value=c),type:"password",class:"login__input",placeholder:"Enter your password",autocomplete:"current-password"},null,512),[[g,s.value]])]),B(D,{type:"submit",variant:"primary",size:"lg",loading:u.value,style:{width:"100%"}},{default:M(()=>[p(n(y.value),1)]),_:1},8,["loading"]),e("p",z,[p(n(a.value?"Already have an account?":"Don't have an account?")+" ",1),e("button",{type:"button",class:"login__toggle-btn",onClick:x},n(a.value?"Sign in":"Create one"),1)])],32)]),t[5]||(t[5]=e("p",{class:"login__footer"}," Claudia Docs — Document Management for AI Agents ",-1))]))}}),H=E(W,[["__scopeId","data-v-d1a9e623"]]);export{H as default}; +import{d as C,u as k,c as _,a as e,t as n,w as S,b as A,e as v,v as g,f as B,g as M,h as p,r as i,i as m,j as V,o as f}from"./index-Bwmlaq-e.js";import{B as D,_ as E}from"./Button-BCQM6xXJ.js";const N={class:"login"},I={class:"login__card"},L={class:"login__header"},T={class:"login__title"},U={class:"login__subtitle"},P={key:0,class:"login__error"},R={class:"login__field"},j={class:"login__field"},z={class:"login__toggle"},W=C({__name:"Login",setup(q){const h=V(),r=k(),o=i(""),s=i(""),a=i(!1),u=i(!1),l=i(""),w=m(()=>a.value?"Create Account":"Welcome Back"),y=m(()=>a.value?"Create Account":"Sign In");async function b(){if(!o.value||!s.value){l.value="Please fill in all fields";return}u.value=!0,l.value="";try{a.value?(await r.register(o.value,s.value),await r.login(o.value,s.value)):await r.login(o.value,s.value),h.push("/dashboard")}catch(d){l.value=d instanceof Error?d.message:"Authentication failed"}finally{u.value=!1}}function x(){a.value=!a.value,l.value=""}return(d,t)=>(f(),_("div",N,[e("div",I,[e("div",L,[t[2]||(t[2]=e("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none"},[e("rect",{width:"28",height:"28",rx:"6",fill:"var(--accent)"}),e("path",{d:"M8 10h12M8 14h8M8 18h10",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1)),e("h1",T,n(w.value),1),e("p",U,n(a.value?"Create your account to get started":"Sign in to access your documents"),1)]),e("form",{class:"login__form",onSubmit:S(b,["prevent"])},[l.value?(f(),_("div",P,n(l.value),1)):A("",!0),e("div",R,[t[3]||(t[3]=e("label",{for:"username",class:"login__label"},"Username",-1)),v(e("input",{id:"username","onUpdate:modelValue":t[0]||(t[0]=c=>o.value=c),type:"text",class:"login__input",placeholder:"Enter your username",autocomplete:"username"},null,512),[[g,o.value]])]),e("div",j,[t[4]||(t[4]=e("label",{for:"password",class:"login__label"},"Password",-1)),v(e("input",{id:"password","onUpdate:modelValue":t[1]||(t[1]=c=>s.value=c),type:"password",class:"login__input",placeholder:"Enter your password",autocomplete:"current-password"},null,512),[[g,s.value]])]),B(D,{type:"submit",variant:"primary",size:"lg",loading:u.value,style:{width:"100%"}},{default:M(()=>[p(n(y.value),1)]),_:1},8,["loading"]),e("p",z,[p(n(a.value?"Already have an account?":"Don't have an account?")+" ",1),e("button",{type:"button",class:"login__toggle-btn",onClick:x},n(a.value?"Sign in":"Create one"),1)])],32)]),t[5]||(t[5]=e("p",{class:"login__footer"}," Claudia Docs — Document Management for AI Agents ",-1))]))}}),H=E(W,[["__scopeId","data-v-d1a9e623"]]);export{H as default}; diff --git a/dist/assets/Modal-C7dh6Uqe.js b/dist/assets/Modal-DyPCz1pc.js similarity index 88% rename from dist/assets/Modal-C7dh6Uqe.js rename to dist/assets/Modal-DyPCz1pc.js index 4fd128a..631148f 100644 --- a/dist/assets/Modal-C7dh6Uqe.js +++ b/dist/assets/Modal-DyPCz1pc.js @@ -1 +1 @@ -import{d as _,n as f,x as u,s as k,f as h,T as v,g as p,O as y,o as s,c as l,a,t as C,b as n,Q as i,q as B}from"./index-D2fAAQJ2.js";import{_ as w}from"./Button-D-QrZfPJ.js";const $={key:0,class:"modal__header"},b={class:"modal__title"},E={class:"modal__body"},g={key:1,class:"modal__footer"},z=_({__name:"Modal",props:{show:{type:Boolean},title:{},size:{default:"md"}},emits:["close"],setup(o,{emit:c}){const t=c;function r(e){e.target.classList.contains("modal")&&t("close")}function m(e){e.key==="Escape"&&t("close")}return f(()=>t,()=>{},{immediate:!0}),u(()=>{document.removeEventListener("keydown",m)}),(e,d)=>(s(),k(y,{to:"body"},[h(v,{name:"modal"},{default:p(()=>[o.show?(s(),l("div",{key:0,class:"modal",onClick:r},[a("div",{class:B(["modal__content",`modal__content--${o.size}`])},[o.title?(s(),l("div",$,[a("h2",b,C(o.title),1),a("button",{class:"modal__close",onClick:d[0]||(d[0]=M=>t("close"))},"×")])):n("",!0),a("div",E,[i(e.$slots,"default",{},void 0,!0)]),e.$slots.footer?(s(),l("div",g,[i(e.$slots,"footer",{},void 0,!0)])):n("",!0)],2)])):n("",!0)]),_:3})]))}}),V=w(z,[["__scopeId","data-v-f5a1757e"]]);export{V as M}; +import{d as _,n as f,x as u,s as k,f as h,T as v,g as p,O as y,o as s,c as l,a,t as C,b as n,Q as i,q as B}from"./index-Bwmlaq-e.js";import{_ as w}from"./Button-BCQM6xXJ.js";const $={key:0,class:"modal__header"},b={class:"modal__title"},E={class:"modal__body"},g={key:1,class:"modal__footer"},z=_({__name:"Modal",props:{show:{type:Boolean},title:{},size:{default:"md"}},emits:["close"],setup(o,{emit:c}){const t=c;function r(e){e.target.classList.contains("modal")&&t("close")}function m(e){e.key==="Escape"&&t("close")}return f(()=>t,()=>{},{immediate:!0}),u(()=>{document.removeEventListener("keydown",m)}),(e,d)=>(s(),k(y,{to:"body"},[h(v,{name:"modal"},{default:p(()=>[o.show?(s(),l("div",{key:0,class:"modal",onClick:r},[a("div",{class:B(["modal__content",`modal__content--${o.size}`])},[o.title?(s(),l("div",$,[a("h2",b,C(o.title),1),a("button",{class:"modal__close",onClick:d[0]||(d[0]=M=>t("close"))},"×")])):n("",!0),a("div",E,[i(e.$slots,"default",{},void 0,!0)]),e.$slots.footer?(s(),l("div",g,[i(e.$slots,"footer",{},void 0,!0)])):n("",!0)],2)])):n("",!0)]),_:3})]))}}),V=w(z,[["__scopeId","data-v-f5a1757e"]]);export{V as M}; diff --git a/dist/assets/Modal-WC6XeOBi.js b/dist/assets/Modal-WC6XeOBi.js deleted file mode 100644 index d489a06..0000000 --- a/dist/assets/Modal-WC6XeOBi.js +++ /dev/null @@ -1 +0,0 @@ -import{d as _,n as f,M as u,s as k,f as h,T as v,g as p,N as y,o as s,c as l,a,t as C,b as n,O as i,q as B}from"./index-BuR1WXAD.js";import{_ as w}from"./Button-BgP1U8Po.js";const $={key:0,class:"modal__header"},b={class:"modal__title"},E={class:"modal__body"},M={key:1,class:"modal__footer"},N=_({__name:"Modal",props:{show:{type:Boolean},title:{},size:{default:"md"}},emits:["close"],setup(o,{emit:c}){const t=c;function r(e){e.target.classList.contains("modal")&&t("close")}function m(e){e.key==="Escape"&&t("close")}return f(()=>t,()=>{},{immediate:!0}),u(()=>{document.removeEventListener("keydown",m)}),(e,d)=>(s(),k(y,{to:"body"},[h(v,{name:"modal"},{default:p(()=>[o.show?(s(),l("div",{key:0,class:"modal",onClick:r},[a("div",{class:B(["modal__content",`modal__content--${o.size}`])},[o.title?(s(),l("div",$,[a("h2",b,C(o.title),1),a("button",{class:"modal__close",onClick:d[0]||(d[0]=g=>t("close"))},"×")])):n("",!0),a("div",E,[i(e.$slots,"default",{},void 0,!0)]),e.$slots.footer?(s(),l("div",M,[i(e.$slots,"footer",{},void 0,!0)])):n("",!0)],2)])):n("",!0)]),_:3})]))}}),V=w(N,[["__scopeId","data-v-f5a1757e"]]);export{V as M}; diff --git a/dist/assets/ProjectView-B4XGSAV_.js b/dist/assets/ProjectView-B4XGSAV_.js deleted file mode 100644 index fd72ccd..0000000 --- a/dist/assets/ProjectView-B4XGSAV_.js +++ /dev/null @@ -1 +0,0 @@ -import{d as P,n as z,p as E,o as a,c as l,F as L,m as R,a as e,q as V,t as j,f as d,T as q,g as u,s as A,b as x,r as y,j as H,h,l as c,k as G,x as J,e as B,v as S,w as M}from"./index-BuR1WXAD.js";import{u as I}from"./projects-BPkECm1G.js";import{u as K,H as O}from"./Header-De-cxVSd.js";import{_ as D,B as C}from"./Button-BgP1U8Po.js";import{M as T}from"./Modal-WC6XeOBi.js";const Q={class:"tree"},W=["onClick"],X=["onClick"],Y={key:1,class:"tree__icon"},Z={class:"tree__label"},ee=P({__name:"TreeView",props:{nodes:{}},emits:["node-click"],setup(b,{emit:g}){const w=b,s=g,_=y(new Set);z(()=>w.nodes,r=>{r.forEach(o=>{o.type==="folder"&&_.value.add(o.id)})},{immediate:!0});function m(r,o){o.stopPropagation(),_.value.has(r.id)?_.value.delete(r.id):_.value.add(r.id)}function p(r){s("node-click",r)}return(r,o)=>{const f=E("TreeView",!0);return a(),l("ul",Q,[(a(!0),l(L,null,R(b.nodes,n=>(a(),l("li",{key:n.id,class:"tree__item"},[e("div",{class:V(["tree__node",{"tree__node--folder":n.type==="folder"}]),onClick:k=>p(n)},[n.type==="folder"?(a(),l("button",{key:0,class:"tree__toggle",onClick:k=>m(n,k)},[(a(),l("svg",{class:V(["tree__arrow",{"tree__arrow--expanded":_.value.has(n.id)}]),width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[...o[1]||(o[1]=[e("path",{d:"m9 18 6-6-6-6"},null,-1)])],2))],8,X)):(a(),l("span",Y,[...o[2]||(o[2]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e("polyline",{points:"14 2 14 8 20 8"})],-1)])])),e("span",Z,j(n.name),1)],10,W),d(q,{name:"expand"},{default:u(()=>{var k;return[n.type==="folder"&&_.value.has(n.id)&&((k=n.children)!=null&&k.length)?(a(),A(f,{key:0,nodes:n.children,class:"tree__children",onNodeClick:o[0]||(o[0]=$=>s("node-click",$))},null,8,["nodes"])):x("",!0)]}),_:2},1024)]))),128))])}}}),te=D(ee,[["__scopeId","data-v-e9acf25c"]]),oe={class:"sidebar"},se={key:0,class:"sidebar__content"},re={class:"sidebar__project"},ne={class:"sidebar__project-name"},ae={key:0,class:"sidebar__project-desc"},le={class:"sidebar__actions"},ie={class:"sidebar__tree"},de={key:1,class:"sidebar__empty"},ce=P({__name:"Sidebar",emits:["create-folder","create-document"],setup(b,{emit:g}){const w=H(),s=I(),_=g;function m(r){r.type==="document"&&w.push(`/documents/${r.id}`)}function p(){w.push("/dashboard")}return(r,o)=>(a(),l("aside",oe,[e("div",{class:"sidebar__header"},[e("button",{class:"sidebar__back",onClick:p},[...o[2]||(o[2]=[e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"m15 18-6-6 6-6"})],-1),h(" All Projects ",-1)])])]),c(s).currentProject?(a(),l("div",se,[e("div",re,[e("h2",ne,j(c(s).currentProject.name),1),c(s).currentProject.description?(a(),l("p",ae,j(c(s).currentProject.description),1)):x("",!0)]),e("div",le,[d(C,{size:"sm",variant:"ghost",onClick:o[0]||(o[0]=f=>_("create-folder"))},{default:u(()=>[...o[3]||(o[3]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),e("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),e("line",{x1:"9",y1:"14",x2:"15",y2:"14"})],-1),h(" New Folder ",-1)])]),_:1}),d(C,{size:"sm",variant:"ghost",onClick:o[1]||(o[1]=f=>_("create-document"))},{default:u(()=>[...o[4]||(o[4]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e("polyline",{points:"14 2 14 8 20 8"}),e("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),e("line",{x1:"9",y1:"14",x2:"15",y2:"14"})],-1),h(" New Doc ",-1)])]),_:1})]),e("div",ie,[d(te,{nodes:c(s).treeNodes,onNodeClick:m},null,8,["nodes"])])])):(a(),l("div",de,[...o[5]||(o[5]=[e("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1),e("p",null,"Select a project to view its contents",-1)])]))]))}}),ue=D(ce,[["__scopeId","data-v-f979c4be"]]),_e={class:"layout"},me={class:"layout__body"},pe={class:"layout__content"},fe={key:0,class:"loading"},ve={key:1,class:"error"},he={key:2,class:"project"},we={class:"project__welcome"},ke={class:"project__title"},ye={key:0,class:"project__desc"},Ce={class:"form__field"},ge={class:"form__field"},je=P({__name:"ProjectView",setup(b){const g=J(),w=H(),s=I(),_=K(),m=y(!1),p=y(!1),r=y(""),o=y(""),f=y(null),n=y(!1);G(async()=>{const i=g.params.id;await s.fetchProject(i)}),z(()=>g.params.id,async i=>{i&&await s.fetchProject(i)});function k(i){w.push(`/documents/${i}`)}function $(){f.value=null,m.value=!0}function U(){f.value=null,p.value=!0}async function F(){if(!(!r.value.trim()||!s.currentProject)){n.value=!0;try{await s.createFolder(s.currentProject.id,r.value.trim(),f.value),m.value=!1,r.value=""}catch(i){console.error("Failed to create folder:",i)}finally{n.value=!1}}}async function N(){if(!(!o.value.trim()||!s.currentProject)){n.value=!0;try{const i=await _.createDocument(s.currentProject.id,o.value.trim(),"",f.value);p.value=!1,o.value="",await s.fetchProjectTree(s.currentProject.id),k(i.id)}catch(i){console.error("Failed to create document:",i)}finally{n.value=!1}}}return(i,t)=>(a(),l("div",_e,[d(O),e("div",me,[d(ue,{onCreateFolder:$,onCreateDocument:U}),e("main",pe,[c(s).loading?(a(),l("div",fe,[...t[7]||(t[7]=[e("div",{class:"loading__spinner"},null,-1),e("p",null,"Loading project...",-1)])])):c(s).error?(a(),l("div",ve,[e("p",null,j(c(s).error),1),d(C,{variant:"secondary",onClick:t[0]||(t[0]=v=>c(w).push("/dashboard"))},{default:u(()=>[...t[8]||(t[8]=[h(" Back to Dashboard ",-1)])]),_:1})])):c(s).currentProject?(a(),l("div",he,[e("div",we,[e("h1",ke,j(c(s).currentProject.name),1),c(s).currentProject.description?(a(),l("p",ye,j(c(s).currentProject.description),1)):x("",!0),t[9]||(t[9]=e("p",{class:"project__hint"}," Select a document from the sidebar or create a new one to get started. ",-1))])])):x("",!0)])]),d(T,{show:m.value,title:"Create New Folder",onClose:t[3]||(t[3]=v=>m.value=!1)},{footer:u(()=>[d(C,{variant:"secondary",onClick:t[2]||(t[2]=v=>m.value=!1)},{default:u(()=>[...t[11]||(t[11]=[h("Cancel",-1)])]),_:1}),d(C,{variant:"primary",loading:n.value,onClick:F},{default:u(()=>[...t[12]||(t[12]=[h("Create Folder",-1)])]),_:1},8,["loading"])]),default:u(()=>[e("form",{onSubmit:M(F,["prevent"])},[e("div",Ce,[t[10]||(t[10]=e("label",{for:"folder-name",class:"form__label"},"Folder Name",-1)),B(e("input",{id:"folder-name","onUpdate:modelValue":t[1]||(t[1]=v=>r.value=v),type:"text",class:"form__input",placeholder:"My Folder",autofocus:""},null,512),[[S,r.value]])])],32)]),_:1},8,["show"]),d(T,{show:p.value,title:"Create New Document",onClose:t[6]||(t[6]=v=>p.value=!1)},{footer:u(()=>[d(C,{variant:"secondary",onClick:t[5]||(t[5]=v=>p.value=!1)},{default:u(()=>[...t[14]||(t[14]=[h("Cancel",-1)])]),_:1}),d(C,{variant:"primary",loading:n.value,onClick:N},{default:u(()=>[...t[15]||(t[15]=[h("Create Document",-1)])]),_:1},8,["loading"])]),default:u(()=>[e("form",{onSubmit:M(N,["prevent"])},[e("div",ge,[t[13]||(t[13]=e("label",{for:"doc-name",class:"form__label"},"Document Title",-1)),B(e("input",{id:"doc-name","onUpdate:modelValue":t[4]||(t[4]=v=>o.value=v),type:"text",class:"form__input",placeholder:"Untitled Document",autofocus:""},null,512),[[S,o.value]])])],32)]),_:1},8,["show"])]))}}),Fe=D(je,[["__scopeId","data-v-333c564d"]]);export{Fe as default}; diff --git a/dist/assets/ProjectView-DvvnFh_a.css b/dist/assets/ProjectView-BQNBBYOe.css similarity index 55% rename from dist/assets/ProjectView-DvvnFh_a.css rename to dist/assets/ProjectView-BQNBBYOe.css index 69d8b79..1cc63f1 100644 --- a/dist/assets/ProjectView-DvvnFh_a.css +++ b/dist/assets/ProjectView-BQNBBYOe.css @@ -1 +1 @@ -.tree[data-v-e9acf25c]{list-style:none;margin:0;padding:0}.tree__item[data-v-e9acf25c]{margin:2px 0}.tree__node[data-v-e9acf25c]{display:flex;align-items:center;gap:.375rem;padding:.375rem .5rem;border-radius:6px;cursor:pointer;transition:background .1s}.tree__node[data-v-e9acf25c]:hover{background:var(--bg-tertiary)}.tree__toggle[data-v-e9acf25c]{display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;background:none;border:none;color:var(--text-secondary);cursor:pointer}.tree__icon[data-v-e9acf25c]{display:flex;align-items:center;justify-content:center;width:18px;color:var(--text-secondary)}.tree__arrow[data-v-e9acf25c]{transition:transform .15s}.tree__arrow--expanded[data-v-e9acf25c]{transform:rotate(90deg)}.tree__label[data-v-e9acf25c]{flex:1;font-size:.875rem;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree__children[data-v-e9acf25c]{margin-left:1rem}.expand-enter-active[data-v-e9acf25c],.expand-leave-active[data-v-e9acf25c]{transition:all .2s ease;overflow:hidden}.expand-enter-from[data-v-e9acf25c],.expand-leave-to[data-v-e9acf25c]{opacity:0;max-height:0}.expand-enter-to[data-v-e9acf25c],.expand-leave-from[data-v-e9acf25c]{max-height:500px}.sidebar[data-v-f979c4be]{width:280px;min-width:280px;height:100%;background:var(--bg-secondary);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}.sidebar__header[data-v-f979c4be]{padding:1rem;border-bottom:1px solid var(--border)}.sidebar__back[data-v-f979c4be]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem;background:none;border:none;border-radius:6px;font-size:.875rem;color:var(--text-secondary);cursor:pointer;text-align:left;transition:all .15s}.sidebar__back[data-v-f979c4be]:hover{background:var(--bg-tertiary);color:var(--text-primary)}.sidebar__content[data-v-f979c4be]{flex:1;display:flex;flex-direction:column;overflow:hidden}.sidebar__project[data-v-f979c4be]{padding:1rem;border-bottom:1px solid var(--border)}.sidebar__project-name[data-v-f979c4be]{margin:0;font-size:1rem;font-weight:600;color:var(--text-primary)}.sidebar__project-desc[data-v-f979c4be]{margin:.25rem 0 0;font-size:.8125rem;color:var(--text-secondary);line-height:1.4}.sidebar__actions[data-v-f979c4be]{display:flex;gap:.5rem;padding:.75rem 1rem;border-bottom:1px solid var(--border)}.sidebar__tree[data-v-f979c4be]{flex:1;overflow-y:auto;padding:.5rem}.sidebar__empty[data-v-f979c4be]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem;color:var(--text-secondary);text-align:center}.sidebar__empty p[data-v-f979c4be]{margin:0;font-size:.875rem}.graph-view[data-v-fc6c0833]{display:flex;flex-direction:column;height:100%;background:var(--bg-primary)}.graph-view__header[data-v-fc6c0833]{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--border);flex-shrink:0}.graph-view__title[data-v-fc6c0833]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0}.graph-view__controls[data-v-fc6c0833]{display:flex;align-items:center;gap:1rem}.graph-view__depth[data-v-fc6c0833]{display:flex;align-items:center;gap:.375rem}.graph-view__depth-label[data-v-fc6c0833]{font-size:.8125rem;color:var(--text-secondary);margin-right:.25rem}.graph-view__stats[data-v-fc6c0833]{display:flex;gap:1.5rem;padding:.625rem 1.5rem;background:var(--bg-secondary);border-bottom:1px solid var(--border);font-size:.8125rem;color:var(--text-secondary);flex-shrink:0}.graph-view__stat--warning[data-v-fc6c0833]{color:#f59e0b}.graph-view__canvas[data-v-fc6c0833]{flex:1;position:relative;overflow:hidden;min-height:300px}.graph-view__loading[data-v-fc6c0833],.graph-view__error[data-v-fc6c0833],.graph-view__empty[data-v-fc6c0833]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;color:var(--text-secondary);font-size:.875rem}.graph-view__spinner[data-v-fc6c0833]{width:24px;height:24px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin-fc6c0833 .6s linear infinite}@keyframes spin-fc6c0833{to{transform:rotate(360deg)}}.graph-view__svg[data-v-fc6c0833]{display:block;cursor:default}.graph-view__edge[data-v-fc6c0833]{stroke:var(--border);stroke-width:1.5;fill:none;transition:stroke .15s}.graph-view__node-circle[data-v-fc6c0833]{fill:var(--bg-secondary);stroke:var(--accent);stroke-width:2;cursor:pointer;transition:fill .15s,stroke .15s,transform .15s}.graph-view__node:hover .graph-view__node-circle[data-v-fc6c0833]{fill:var(--accent);stroke:var(--accent-hover);transform:scale(1.1)}.graph-view__node-icon[data-v-fc6c0833]{font-size:14px;pointer-events:none;-webkit-user-select:none;user-select:none}.graph-view__legend[data-v-fc6c0833]{padding:.5rem 1.5rem;border-top:1px solid var(--border);font-size:.75rem;color:var(--text-secondary);text-align:center;flex-shrink:0}.layout[data-v-ddea94bc]{display:flex;flex-direction:column;height:100vh}.layout__body[data-v-ddea94bc]{flex:1;display:flex;overflow:hidden}.layout__content[data-v-ddea94bc]{flex:1;overflow-y:auto;background:var(--bg-primary)}.loading[data-v-ddea94bc],.error[data-v-ddea94bc]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;height:100%;color:var(--text-secondary)}.loading__spinner[data-v-ddea94bc]{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin-ddea94bc .8s linear infinite}@keyframes spin-ddea94bc{to{transform:rotate(360deg)}}.project[data-v-ddea94bc]{padding:2rem}.project__welcome[data-v-ddea94bc]{max-width:600px;margin:0 auto;text-align:center;padding:4rem 2rem}.project__title[data-v-ddea94bc]{margin:0;font-size:1.75rem;font-weight:600;color:var(--text-primary)}.project__desc[data-v-ddea94bc]{margin:.75rem 0 0;font-size:1rem;color:var(--text-secondary);line-height:1.5}.project__hint[data-v-ddea94bc]{margin:1.5rem 0 0;font-size:.9375rem;color:var(--text-secondary)}.project__actions[data-v-ddea94bc]{display:flex;justify-content:center;gap:.75rem;margin-top:1.5rem}.form__field[data-v-ddea94bc]{margin-bottom:1.25rem}.form__field[data-v-ddea94bc]:last-child{margin-bottom:0}.form__label[data-v-ddea94bc]{display:block;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--text-primary)}.form__input[data-v-ddea94bc]{width:100%;padding:.75rem 1rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;font-size:.9375rem;color:var(--text-primary);outline:none;transition:border-color .15s,box-shadow .15s;box-sizing:border-box}.form__input[data-v-ddea94bc]::placeholder{color:var(--text-secondary)}.form__input[data-v-ddea94bc]:focus{border-color:var(--accent);box-shadow:0 0 0 3px #6366f11a}.export-formats[data-v-ddea94bc]{display:flex;gap:.75rem}.export-format[data-v-ddea94bc]{flex:1;display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:1.25rem 1rem;background:var(--bg-secondary);border:2px solid var(--border);border-radius:10px;cursor:pointer;transition:all .15s;color:var(--text-secondary)}.export-format[data-v-ddea94bc]:hover{border-color:var(--accent);color:var(--text-primary)}.export-format--selected[data-v-ddea94bc]{border-color:var(--accent);background:#6366f114;color:var(--accent)}.export-format span[data-v-ddea94bc]{font-size:.9375rem;font-weight:600;color:var(--text-primary)}.export-format small[data-v-ddea94bc]{font-size:.75rem;color:var(--text-secondary)} +.tree[data-v-e9acf25c]{list-style:none;margin:0;padding:0}.tree__item[data-v-e9acf25c]{margin:2px 0}.tree__node[data-v-e9acf25c]{display:flex;align-items:center;gap:.375rem;padding:.375rem .5rem;border-radius:6px;cursor:pointer;transition:background .1s}.tree__node[data-v-e9acf25c]:hover{background:var(--bg-tertiary)}.tree__toggle[data-v-e9acf25c]{display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;background:none;border:none;color:var(--text-secondary);cursor:pointer}.tree__icon[data-v-e9acf25c]{display:flex;align-items:center;justify-content:center;width:18px;color:var(--text-secondary)}.tree__arrow[data-v-e9acf25c]{transition:transform .15s}.tree__arrow--expanded[data-v-e9acf25c]{transform:rotate(90deg)}.tree__label[data-v-e9acf25c]{flex:1;font-size:.875rem;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree__children[data-v-e9acf25c]{margin-left:1rem}.expand-enter-active[data-v-e9acf25c],.expand-leave-active[data-v-e9acf25c]{transition:all .2s ease;overflow:hidden}.expand-enter-from[data-v-e9acf25c],.expand-leave-to[data-v-e9acf25c]{opacity:0;max-height:0}.expand-enter-to[data-v-e9acf25c],.expand-leave-from[data-v-e9acf25c]{max-height:500px}.sidebar[data-v-f979c4be]{width:280px;min-width:280px;height:100%;background:var(--bg-secondary);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}.sidebar__header[data-v-f979c4be]{padding:1rem;border-bottom:1px solid var(--border)}.sidebar__back[data-v-f979c4be]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem;background:none;border:none;border-radius:6px;font-size:.875rem;color:var(--text-secondary);cursor:pointer;text-align:left;transition:all .15s}.sidebar__back[data-v-f979c4be]:hover{background:var(--bg-tertiary);color:var(--text-primary)}.sidebar__content[data-v-f979c4be]{flex:1;display:flex;flex-direction:column;overflow:hidden}.sidebar__project[data-v-f979c4be]{padding:1rem;border-bottom:1px solid var(--border)}.sidebar__project-name[data-v-f979c4be]{margin:0;font-size:1rem;font-weight:600;color:var(--text-primary)}.sidebar__project-desc[data-v-f979c4be]{margin:.25rem 0 0;font-size:.8125rem;color:var(--text-secondary);line-height:1.4}.sidebar__actions[data-v-f979c4be]{display:flex;gap:.5rem;padding:.75rem 1rem;border-bottom:1px solid var(--border)}.sidebar__tree[data-v-f979c4be]{flex:1;overflow-y:auto;padding:.5rem}.sidebar__empty[data-v-f979c4be]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem;color:var(--text-secondary);text-align:center}.sidebar__empty p[data-v-f979c4be]{margin:0;font-size:.875rem}.graph-view[data-v-fc6c0833]{display:flex;flex-direction:column;height:100%;background:var(--bg-primary)}.graph-view__header[data-v-fc6c0833]{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--border);flex-shrink:0}.graph-view__title[data-v-fc6c0833]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0}.graph-view__controls[data-v-fc6c0833]{display:flex;align-items:center;gap:1rem}.graph-view__depth[data-v-fc6c0833]{display:flex;align-items:center;gap:.375rem}.graph-view__depth-label[data-v-fc6c0833]{font-size:.8125rem;color:var(--text-secondary);margin-right:.25rem}.graph-view__stats[data-v-fc6c0833]{display:flex;gap:1.5rem;padding:.625rem 1.5rem;background:var(--bg-secondary);border-bottom:1px solid var(--border);font-size:.8125rem;color:var(--text-secondary);flex-shrink:0}.graph-view__stat--warning[data-v-fc6c0833]{color:#f59e0b}.graph-view__canvas[data-v-fc6c0833]{flex:1;position:relative;overflow:hidden;min-height:300px}.graph-view__loading[data-v-fc6c0833],.graph-view__error[data-v-fc6c0833],.graph-view__empty[data-v-fc6c0833]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;color:var(--text-secondary);font-size:.875rem}.graph-view__spinner[data-v-fc6c0833]{width:24px;height:24px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin-fc6c0833 .6s linear infinite}@keyframes spin-fc6c0833{to{transform:rotate(360deg)}}.graph-view__svg[data-v-fc6c0833]{display:block;cursor:default}.graph-view__edge[data-v-fc6c0833]{stroke:var(--border);stroke-width:1.5;fill:none;transition:stroke .15s}.graph-view__node-circle[data-v-fc6c0833]{fill:var(--bg-secondary);stroke:var(--accent);stroke-width:2;cursor:pointer;transition:fill .15s,stroke .15s,transform .15s}.graph-view__node:hover .graph-view__node-circle[data-v-fc6c0833]{fill:var(--accent);stroke:var(--accent-hover);transform:scale(1.1)}.graph-view__node-icon[data-v-fc6c0833]{font-size:14px;pointer-events:none;-webkit-user-select:none;user-select:none}.graph-view__legend[data-v-fc6c0833]{padding:.5rem 1.5rem;border-top:1px solid var(--border);font-size:.75rem;color:var(--text-secondary);text-align:center;flex-shrink:0}.layout[data-v-2a45f457]{display:flex;flex-direction:column;height:100vh}.layout__body[data-v-2a45f457]{flex:1;display:flex;overflow:hidden}.layout__content[data-v-2a45f457]{flex:1;overflow-y:auto;background:var(--bg-primary)}.loading[data-v-2a45f457],.error[data-v-2a45f457]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;height:100%;color:var(--text-secondary)}.loading__spinner[data-v-2a45f457]{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin-2a45f457 .8s linear infinite}@keyframes spin-2a45f457{to{transform:rotate(360deg)}}.project[data-v-2a45f457]{padding:2rem}.project__welcome[data-v-2a45f457]{max-width:600px;margin:0 auto;text-align:center;padding:4rem 2rem}.project__title[data-v-2a45f457]{margin:0;font-size:1.75rem;font-weight:600;color:var(--text-primary)}.project__title-row[data-v-2a45f457]{display:flex;align-items:center;justify-content:center;gap:.75rem}.edit-icon-btn[data-v-2a45f457]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:none;border:1px solid var(--border);border-radius:6px;color:var(--text-secondary);cursor:pointer;transition:all .15s}.edit-icon-btn[data-v-2a45f457]:hover{background:var(--bg-secondary);color:var(--text-primary);border-color:var(--accent)}.project__desc[data-v-2a45f457]{margin:.75rem 0 0;font-size:1rem;color:var(--text-secondary);line-height:1.5}.project__hint[data-v-2a45f457]{margin:1.5rem 0 0;font-size:.9375rem;color:var(--text-secondary)}.project__actions[data-v-2a45f457]{display:flex;justify-content:center;gap:.75rem;margin-top:1.5rem}.form__field[data-v-2a45f457]{margin-bottom:1.25rem}.form__field[data-v-2a45f457]:last-child{margin-bottom:0}.form__label[data-v-2a45f457]{display:block;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--text-primary)}.form__input[data-v-2a45f457]{width:100%;padding:.75rem 1rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;font-size:.9375rem;color:var(--text-primary);outline:none;transition:border-color .15s,box-shadow .15s;box-sizing:border-box}.form__input[data-v-2a45f457]::placeholder{color:var(--text-secondary)}.form__input[data-v-2a45f457]:focus{border-color:var(--accent);box-shadow:0 0 0 3px #6366f11a}.form__textarea[data-v-2a45f457]{resize:vertical;min-height:80px;font-family:inherit;line-height:1.5}.folder-picker[data-v-2a45f457]{position:relative}.folder-picker__trigger[data-v-2a45f457]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.75rem 1rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;font-size:.9375rem;color:var(--text-primary);cursor:pointer;text-align:left;transition:border-color .15s}.folder-picker__trigger[data-v-2a45f457]:hover{border-color:var(--accent)}.folder-picker__trigger span[data-v-2a45f457]{flex:1}.folder-picker__chevron[data-v-2a45f457]{transition:transform .15s;color:var(--text-secondary)}.folder-picker__chevron--open[data-v-2a45f457]{transform:rotate(180deg)}.folder-picker__dropdown[data-v-2a45f457]{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;box-shadow:0 4px 12px #00000026;z-index:50;max-height:240px;overflow-y:auto}.folder-picker__option[data-v-2a45f457]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.625rem .75rem;background:none;border:none;font-size:.875rem;color:var(--text-primary);cursor:pointer;text-align:left;transition:background .1s}.folder-picker__option[data-v-2a45f457]:hover{background:var(--bg-tertiary)}.folder-picker__option--selected[data-v-2a45f457]{background:#6366f11a;color:var(--accent)}.export-formats[data-v-2a45f457]{display:flex;gap:.75rem}.export-format[data-v-2a45f457]{flex:1;display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:1.25rem 1rem;background:var(--bg-secondary);border:2px solid var(--border);border-radius:10px;cursor:pointer;transition:all .15s;color:var(--text-secondary)}.export-format[data-v-2a45f457]:hover{border-color:var(--accent);color:var(--text-primary)}.export-format--selected[data-v-2a45f457]{border-color:var(--accent);background:#6366f114;color:var(--accent)}.export-format span[data-v-2a45f457]{font-size:.9375rem;font-weight:600;color:var(--text-primary)}.export-format small[data-v-2a45f457]{font-size:.75rem;color:var(--text-secondary)} diff --git a/dist/assets/ProjectView-CxuyvBGN.js b/dist/assets/ProjectView-CxuyvBGN.js deleted file mode 100644 index 10c4a0e..0000000 --- a/dist/assets/ProjectView-CxuyvBGN.js +++ /dev/null @@ -1 +0,0 @@ -import{d as J,n as ee,p as ue,o as r,c as i,F as W,m as X,a as e,q as Y,t as j,f,T as ce,g as p,s as le,b as N,r as _,j as te,h as w,l as y,k as ie,x as ve,y as pe,e as ne,v as ae,w as re}from"./index-D2fAAQJ2.js";import{u as oe}from"./projects-CWhQXAJL.js";import{u as fe,H as he}from"./Header-BawqVjtJ.js";import{_ as Z,B as C}from"./Button-D-QrZfPJ.js";import{M as O}from"./Modal-C7dh6Uqe.js";const _e={class:"tree"},me=["onClick"],ge=["onClick"],ye={key:1,class:"tree__icon"},we={class:"tree__label"},ke=J({__name:"TreeView",props:{nodes:{}},emits:["node-click"],setup(E,{emit:D}){const P=E,n=D,a=_(new Set);ee(()=>P.nodes,v=>{v.forEach(o=>{o.type==="folder"&&a.value.add(o.id)})},{immediate:!0});function x(v,o){o.stopPropagation(),a.value.has(v.id)?a.value.delete(v.id):a.value.add(v.id)}function k(v){n("node-click",v)}return(v,o)=>{const m=ue("TreeView",!0);return r(),i("ul",_e,[(r(!0),i(W,null,X(E.nodes,d=>(r(),i("li",{key:d.id,class:"tree__item"},[e("div",{class:Y(["tree__node",{"tree__node--folder":d.type==="folder"}]),onClick:$=>k(d)},[d.type==="folder"?(r(),i("button",{key:0,class:"tree__toggle",onClick:$=>x(d,$)},[(r(),i("svg",{class:Y(["tree__arrow",{"tree__arrow--expanded":a.value.has(d.id)}]),width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[...o[1]||(o[1]=[e("path",{d:"m9 18 6-6-6-6"},null,-1)])],2))],8,ge)):(r(),i("span",ye,[...o[2]||(o[2]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e("polyline",{points:"14 2 14 8 20 8"})],-1)])])),e("span",we,j(d.name),1)],10,me),f(ce,{name:"expand"},{default:p(()=>{var $;return[d.type==="folder"&&a.value.has(d.id)&&(($=d.children)!=null&&$.length)?(r(),le(m,{key:0,nodes:d.children,class:"tree__children",onNodeClick:o[0]||(o[0]=g=>n("node-click",g))},null,8,["nodes"])):N("",!0)]}),_:2},1024)]))),128))])}}}),xe=Z(ke,[["__scopeId","data-v-e9acf25c"]]),Ce={class:"sidebar"},$e={key:0,class:"sidebar__content"},je={class:"sidebar__project"},be={class:"sidebar__project-name"},Me={key:0,class:"sidebar__project-desc"},Pe={class:"sidebar__actions"},Ve={class:"sidebar__tree"},De={key:1,class:"sidebar__empty"},Fe=J({__name:"Sidebar",emits:["create-folder","create-document"],setup(E,{emit:D}){const P=te(),n=oe(),a=D;function x(v){v.type==="document"&&P.push(`/documents/${v.id}`)}function k(){P.push("/dashboard")}return(v,o)=>(r(),i("aside",Ce,[e("div",{class:"sidebar__header"},[e("button",{class:"sidebar__back",onClick:k},[...o[2]||(o[2]=[e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"m15 18-6-6 6-6"})],-1),w(" All Projects ",-1)])])]),y(n).currentProject?(r(),i("div",$e,[e("div",je,[e("h2",be,j(y(n).currentProject.name),1),y(n).currentProject.description?(r(),i("p",Me,j(y(n).currentProject.description),1)):N("",!0)]),e("div",Pe,[f(C,{size:"sm",variant:"ghost",onClick:o[0]||(o[0]=m=>a("create-folder"))},{default:p(()=>[...o[3]||(o[3]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),e("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),e("line",{x1:"9",y1:"14",x2:"15",y2:"14"})],-1),w(" New Folder ",-1)])]),_:1}),f(C,{size:"sm",variant:"ghost",onClick:o[1]||(o[1]=m=>a("create-document"))},{default:p(()=>[...o[4]||(o[4]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e("polyline",{points:"14 2 14 8 20 8"}),e("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),e("line",{x1:"9",y1:"14",x2:"15",y2:"14"})],-1),w(" New Doc ",-1)])]),_:1})]),e("div",Ve,[f(xe,{nodes:y(n).treeNodes,onNodeClick:x},null,8,["nodes"])])])):(r(),i("div",De,[...o[5]||(o[5]=[e("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1),e("p",null,"Select a project to view its contents",-1)])]))]))}}),Ne=Z(Fe,[["__scopeId","data-v-f979c4be"]]),ze={class:"graph-view"},Be={class:"graph-view__header"},Se={class:"graph-view__controls"},Re={class:"graph-view__depth"},Ee={key:0,class:"graph-view__stats"},He={key:0,class:"graph-view__stat--warning"},Te={key:0,class:"graph-view__loading"},Ie={key:1,class:"graph-view__error"},Le=["width","height"],Ge={class:"graph-view__edges"},Ue=["d"],Ae={class:"graph-view__nodes"},qe=["transform","onClick"],Oe={key:3,class:"graph-view__empty"},We=J({__name:"GraphView",props:{projectId:{}},emits:["close"],setup(E){const D=E,P=te(),n=oe(),a=_(null),x=_(!1),k=_(null),v=_(2),o=_(new Map),m=_(800),d=_(600),$=_(null),g=_(null);async function b(){x.value=!0,k.value=null;try{a.value=await n.fetchProjectGraph(D.projectId,v.value),H(),G()}catch(h){k.value=h instanceof Error?h.message:"Failed to load graph"}finally{x.value=!1}}function H(){if(!a.value)return;const h=m.value/2,u=d.value/2,s=Math.min(m.value,d.value)*.35,t=new Map;a.value.nodes.forEach((l,T)=>{const q=2*Math.PI*T/a.value.nodes.length;t.set(l.id,{id:l.id,title:l.title,x:h+s*Math.cos(q),y:u+s*Math.sin(q),vx:0,vy:0})}),o.value=t}function G(h=150){if(a.value)for(let u=0;u{g.value&&(m.value=g.value.clientWidth,d.value=g.value.clientHeight,z=new ResizeObserver(A),z.observe(g.value)),await b()}),ve(()=>{z==null||z.disconnect()}),ee(v,()=>{b()}),(h,u)=>(r(),i("div",ze,[e("div",Be,[u[2]||(u[2]=e("h2",{class:"graph-view__title"},"Project Graph",-1)),e("div",Se,[e("div",Re,[u[0]||(u[0]=e("span",{class:"graph-view__depth-label"},"Depth:",-1)),(r(),i(W,null,X([1,2,3],s=>f(C,{key:s,variant:v.value===s?"primary":"ghost",size:"sm",onClick:t=>v.value=s},{default:p(()=>[w(j(s),1)]),_:2},1032,["variant","onClick"])),64))]),f(C,{variant:"ghost",size:"sm",onClick:b},{default:p(()=>[...u[1]||(u[1]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M23 4v6h-6"}),e("path",{d:"M1 20v-6h6"}),e("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})],-1),w(" Refresh ",-1)])]),_:1})])]),a.value?(r(),i("div",Ee,[e("span",null,j(a.value.stats.total_documents)+" documents",1),e("span",null,j(a.value.stats.total_references)+" references",1),a.value.stats.orphaned_documents>0?(r(),i("span",He,j(a.value.stats.orphaned_documents)+" orphaned ",1)):N("",!0)])):N("",!0),e("div",{ref_key:"containerRef",ref:g,class:"graph-view__canvas"},[x.value?(r(),i("div",Te,[...u[3]||(u[3]=[e("div",{class:"graph-view__spinner"},null,-1),w(" Loading graph... ",-1)])])):k.value?(r(),i("div",Ie,j(k.value),1)):a.value&&o.value.size>0?(r(),i("svg",{key:2,ref_key:"svgRef",ref:$,width:m.value,height:d.value,class:"graph-view__svg"},[e("g",Ge,[(r(!0),i(W,null,X(a.value.edges,s=>(r(),i("path",{key:`${s.source}-${s.target}`,d:Q(s.source,s.target),class:"graph-view__edge"},null,8,Ue))),128))]),e("g",Ae,[(r(!0),i(W,null,X(o.value,([s,t])=>(r(),i("g",{key:s,class:"graph-view__node",transform:`translate(${t.x}, ${t.y})`,onClick:l=>U(s)},[u[4]||(u[4]=e("circle",{r:"24",class:"graph-view__node-circle"},null,-1)),u[5]||(u[5]=e("text",{class:"graph-view__node-icon","text-anchor":"middle","dominant-baseline":"central",dy:"0.05em"},"📄",-1)),e("title",null,j(t.title),1)],8,qe))),128))])],8,Le)):a.value&&a.value.nodes.length===0?(r(),i("div",Oe," No documents in this project yet. ")):N("",!0)],512),u[6]||(u[6]=e("div",{class:"graph-view__legend"},[e("span",null,"Click a node to open the document")],-1))]))}}),Xe=Z(We,[["__scopeId","data-v-fc6c0833"]]),Ye={class:"layout"},Je={class:"layout__body"},Ze={class:"layout__content"},Ke={key:0,class:"loading"},Qe={key:1,class:"error"},et={key:2,class:"project"},tt={class:"project__welcome"},ot={class:"project__title"},st={key:0,class:"project__desc"},nt={class:"project__actions"},at={class:"form__field"},rt={class:"form__field"},lt={class:"form__field"},it={class:"export-formats"},dt=J({__name:"ProjectView",setup(E){const D=pe(),P=te(),n=oe(),a=fe(),x=_(!1),k=_(!1),v=_(""),o=_(""),m=_(null),d=_(!1),$=_(!1),g=_(!1),b=_("zip"),H=_(!1);ie(async()=>{const s=D.params.id;await n.fetchProject(s)}),ee(()=>D.params.id,async s=>{s&&await n.fetchProject(s)});function G(s){P.push(`/documents/${s}`)}function K(){m.value=null,x.value=!0}function Q(){m.value=null,k.value=!0}async function U(){if(!(!v.value.trim()||!n.currentProject)){d.value=!0;try{await n.createFolder(n.currentProject.id,v.value.trim(),m.value),x.value=!1,v.value=""}catch(s){console.error("Failed to create folder:",s)}finally{d.value=!1}}}async function A(){if(!(!o.value.trim()||!n.currentProject)){d.value=!0;try{const s=await a.createDocument(n.currentProject.id,o.value.trim(),"",m.value);k.value=!1,o.value="",await n.fetchProjectTree(n.currentProject.id),G(s.id)}catch(s){console.error("Failed to create document:",s)}finally{d.value=!1}}}function z(){$.value=!0}function h(){g.value=!0}async function u(){if(n.currentProject){H.value=!0;try{const s=await n.exportProject(n.currentProject.id,b.value),t=URL.createObjectURL(s),l=document.createElement("a"),T=n.currentProject.name.replace(/[^a-z0-9]/gi,"_");l.href=t,l.download=`${T}.${b.value}`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(t),g.value=!1}catch(s){console.error("Export failed:",s)}finally{H.value=!1}}}return(s,t)=>(r(),i("div",Ye,[f(he),e("div",Je,[f(Ne,{onCreateFolder:K,onCreateDocument:Q}),e("main",Ze,[y(n).loading?(r(),i("div",Ke,[...t[13]||(t[13]=[e("div",{class:"loading__spinner"},null,-1),e("p",null,"Loading project...",-1)])])):y(n).error?(r(),i("div",Qe,[e("p",null,j(y(n).error),1),f(C,{variant:"secondary",onClick:t[0]||(t[0]=l=>y(P).push("/dashboard"))},{default:p(()=>[...t[14]||(t[14]=[w(" Back to Dashboard ",-1)])]),_:1})])):y(n).currentProject?(r(),i("div",et,[e("div",tt,[e("h1",ot,j(y(n).currentProject.name),1),y(n).currentProject.description?(r(),i("p",st,j(y(n).currentProject.description),1)):N("",!0),t[17]||(t[17]=e("p",{class:"project__hint"}," Select a document from the sidebar or create a new one to get started. ",-1)),e("div",nt,[f(C,{variant:"secondary",onClick:z},{default:p(()=>[...t[15]||(t[15]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("circle",{cx:"18",cy:"5",r:"3"}),e("circle",{cx:"6",cy:"12",r:"3"}),e("circle",{cx:"18",cy:"19",r:"3"}),e("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),e("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})],-1),w(" View Graph ",-1)])]),_:1}),f(C,{variant:"secondary",onClick:h},{default:p(()=>[...t[16]||(t[16]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e("polyline",{points:"7 10 12 15 17 10"}),e("line",{x1:"12",y1:"15",x2:"12",y2:"3"})],-1),w(" Export ",-1)])]),_:1})])])])):N("",!0)])]),f(O,{show:x.value,title:"Create New Folder",onClose:t[3]||(t[3]=l=>x.value=!1)},{footer:p(()=>[f(C,{variant:"secondary",onClick:t[2]||(t[2]=l=>x.value=!1)},{default:p(()=>[...t[19]||(t[19]=[w("Cancel",-1)])]),_:1}),f(C,{variant:"primary",loading:d.value,onClick:U},{default:p(()=>[...t[20]||(t[20]=[w("Create Folder",-1)])]),_:1},8,["loading"])]),default:p(()=>[e("form",{onSubmit:re(U,["prevent"])},[e("div",at,[t[18]||(t[18]=e("label",{for:"folder-name",class:"form__label"},"Folder Name",-1)),ne(e("input",{id:"folder-name","onUpdate:modelValue":t[1]||(t[1]=l=>v.value=l),type:"text",class:"form__input",placeholder:"My Folder",autofocus:""},null,512),[[ae,v.value]])])],32)]),_:1},8,["show"]),f(O,{show:k.value,title:"Create New Document",onClose:t[6]||(t[6]=l=>k.value=!1)},{footer:p(()=>[f(C,{variant:"secondary",onClick:t[5]||(t[5]=l=>k.value=!1)},{default:p(()=>[...t[22]||(t[22]=[w("Cancel",-1)])]),_:1}),f(C,{variant:"primary",loading:d.value,onClick:A},{default:p(()=>[...t[23]||(t[23]=[w("Create Document",-1)])]),_:1},8,["loading"])]),default:p(()=>[e("form",{onSubmit:re(A,["prevent"])},[e("div",rt,[t[21]||(t[21]=e("label",{for:"doc-name",class:"form__label"},"Document Title",-1)),ne(e("input",{id:"doc-name","onUpdate:modelValue":t[4]||(t[4]=l=>o.value=l),type:"text",class:"form__input",placeholder:"Untitled Document",autofocus:""},null,512),[[ae,o.value]])])],32)]),_:1},8,["show"]),f(O,{show:$.value,title:"",size:"lg",onClose:t[8]||(t[8]=l=>$.value=!1)},{default:p(()=>[y(n).currentProject?(r(),le(Xe,{key:0,"project-id":y(n).currentProject.id,onClose:t[7]||(t[7]=l=>$.value=!1)},null,8,["project-id"])):N("",!0)]),_:1},8,["show"]),f(O,{show:g.value,title:"Export Project",onClose:t[12]||(t[12]=l=>g.value=!1)},{footer:p(()=>[f(C,{variant:"secondary",onClick:t[11]||(t[11]=l=>g.value=!1)},{default:p(()=>[...t[27]||(t[27]=[w("Cancel",-1)])]),_:1}),f(C,{variant:"primary",loading:H.value,onClick:u},{default:p(()=>[...t[28]||(t[28]=[w("Download",-1)])]),_:1},8,["loading"])]),default:p(()=>[e("div",lt,[t[26]||(t[26]=e("label",{class:"form__label"},"Format",-1)),e("div",it,[e("button",{class:Y(["export-format",{"export-format--selected":b.value==="zip"}]),onClick:t[9]||(t[9]=l=>b.value="zip")},[...t[24]||(t[24]=[e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1),e("span",null,"ZIP Archive",-1),e("small",null,"Documents as .md files",-1)])],2),e("button",{class:Y(["export-format",{"export-format--selected":b.value==="json"}]),onClick:t[10]||(t[10]=l=>b.value="json")},[...t[25]||(t[25]=[e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e("polyline",{points:"14 2 14 8 20 8"}),e("path",{d:"M8 13h2"}),e("path",{d:"M8 17h2"}),e("path",{d:"M14 13h2"}),e("path",{d:"M14 17h2"})],-1),e("span",null,"JSON",-1),e("small",null,"Full project with metadata",-1)])],2)])])]),_:1},8,["show"])]))}}),ht=Z(dt,[["__scopeId","data-v-ddea94bc"]]);export{ht as default}; diff --git a/dist/assets/ProjectView-DGH2EBfC.js b/dist/assets/ProjectView-DGH2EBfC.js new file mode 100644 index 0000000..d434d36 --- /dev/null +++ b/dist/assets/ProjectView-DGH2EBfC.js @@ -0,0 +1 @@ +import{d as se,n as ie,p as pe,o as s,c as a,F as ee,m as te,a as e,q as X,t as b,f,T as fe,g as p,s as ce,b as R,r as u,j as de,h as w,l as C,k as ve,x as he,y as _e,e as ne,v as le,w as ae,z as me,i as we}from"./index-Bwmlaq-e.js";import{u as ue}from"./projects-DaKKWK6n.js";import{u as ge,H as ye}from"./Header-D3hVVxoP.js";import{_ as re,B as j}from"./Button-BCQM6xXJ.js";import{M as Q}from"./Modal-DyPCz1pc.js";const ke={class:"tree"},xe=["onClick"],je=["onClick"],Ce={key:1,class:"tree__icon"},$e={class:"tree__label"},be=se({__name:"TreeView",props:{nodes:{}},emits:["node-click"],setup(Y,{emit:I}){const N=Y,o=I,i=u(new Set);ie(()=>N.nodes,h=>{h.forEach(n=>{n.type==="folder"&&i.value.add(n.id)})},{immediate:!0});function P(h,n){n.stopPropagation(),i.value.has(h.id)?i.value.delete(h.id):i.value.add(h.id)}function $(h){o("node-click",h)}return(h,n)=>{const k=pe("TreeView",!0);return s(),a("ul",ke,[(s(!0),a(ee,null,te(Y.nodes,c=>(s(),a("li",{key:c.id,class:"tree__item"},[e("div",{class:X(["tree__node",{"tree__node--folder":c.type==="folder"}]),onClick:M=>$(c)},[c.type==="folder"?(s(),a("button",{key:0,class:"tree__toggle",onClick:M=>P(c,M)},[(s(),a("svg",{class:X(["tree__arrow",{"tree__arrow--expanded":i.value.has(c.id)}]),width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[...n[1]||(n[1]=[e("path",{d:"m9 18 6-6-6-6"},null,-1)])],2))],8,je)):(s(),a("span",Ce,[...n[2]||(n[2]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e("polyline",{points:"14 2 14 8 20 8"})],-1)])])),e("span",$e,b(c.name),1)],10,xe),f(fe,{name:"expand"},{default:p(()=>{var M;return[c.type==="folder"&&i.value.has(c.id)&&((M=c.children)!=null&&M.length)?(s(),ce(k,{key:0,nodes:c.children,class:"tree__children",onNodeClick:n[0]||(n[0]=g=>o("node-click",g))},null,8,["nodes"])):R("",!0)]}),_:2},1024)]))),128))])}}}),Pe=re(be,[["__scopeId","data-v-e9acf25c"]]),Me={class:"sidebar"},Fe={key:0,class:"sidebar__content"},Ve={class:"sidebar__project"},ze={class:"sidebar__project-name"},Se={key:0,class:"sidebar__project-desc"},Ne={class:"sidebar__actions"},Be={class:"sidebar__tree"},De={key:1,class:"sidebar__empty"},Ee=se({__name:"Sidebar",emits:["create-folder","create-document"],setup(Y,{emit:I}){const N=de(),o=ue(),i=I;function P(h){h.type==="document"&&N.push(`/documents/${h.id}`)}function $(){N.push("/dashboard")}return(h,n)=>(s(),a("aside",Me,[e("div",{class:"sidebar__header"},[e("button",{class:"sidebar__back",onClick:$},[...n[2]||(n[2]=[e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"m15 18-6-6 6-6"})],-1),w(" All Projects ",-1)])])]),C(o).currentProject?(s(),a("div",Fe,[e("div",Ve,[e("h2",ze,b(C(o).currentProject.name),1),C(o).currentProject.description?(s(),a("p",Se,b(C(o).currentProject.description),1)):R("",!0)]),e("div",Ne,[f(j,{size:"sm",variant:"ghost",onClick:n[0]||(n[0]=k=>i("create-folder"))},{default:p(()=>[...n[3]||(n[3]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),e("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),e("line",{x1:"9",y1:"14",x2:"15",y2:"14"})],-1),w(" New Folder ",-1)])]),_:1}),f(j,{size:"sm",variant:"ghost",onClick:n[1]||(n[1]=k=>i("create-document"))},{default:p(()=>[...n[4]||(n[4]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e("polyline",{points:"14 2 14 8 20 8"}),e("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),e("line",{x1:"9",y1:"14",x2:"15",y2:"14"})],-1),w(" New Doc ",-1)])]),_:1})]),e("div",Be,[f(Pe,{nodes:C(o).treeNodes,onNodeClick:P},null,8,["nodes"])])])):(s(),a("div",De,[...n[5]||(n[5]=[e("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1),e("p",null,"Select a project to view its contents",-1)])]))]))}}),He=re(Ee,[["__scopeId","data-v-f979c4be"]]),Re={class:"graph-view"},Ie={class:"graph-view__header"},Le={class:"graph-view__controls"},Te={class:"graph-view__depth"},Ue={key:0,class:"graph-view__stats"},Ge={key:0,class:"graph-view__stat--warning"},Ae={key:0,class:"graph-view__loading"},Oe={key:1,class:"graph-view__error"},qe=["width","height"],We={class:"graph-view__edges"},Xe=["d"],Ye={class:"graph-view__nodes"},Je=["transform","onClick"],Ze={key:3,class:"graph-view__empty"},Ke=se({__name:"GraphView",props:{projectId:{}},emits:["close"],setup(Y){const I=Y,N=de(),o=ue(),i=u(null),P=u(!1),$=u(null),h=u(2),n=u(new Map),k=u(800),c=u(600),M=u(null),g=u(null);async function L(){P.value=!0,$.value=null;try{i.value=await o.fetchProjectGraph(I.projectId,h.value),J(),G()}catch(m){$.value=m instanceof Error?m.message:"Failed to load graph"}finally{P.value=!1}}function J(){if(!i.value)return;const m=k.value/2,v=c.value/2,_=Math.min(k.value,c.value)*.35,x=new Map;i.value.nodes.forEach((z,O)=>{const Z=2*Math.PI*O/i.value.nodes.length;x.set(z.id,{id:z.id,title:z.title,x:m+_*Math.cos(Z),y:v+_*Math.sin(Z),vx:0,vy:0})}),n.value=x}function G(m=150){if(i.value)for(let v=0;v{g.value&&(k.value=g.value.clientWidth,c.value=g.value.clientHeight,y=new ResizeObserver(B),y.observe(g.value)),await L()}),he(()=>{y==null||y.disconnect()}),ie(h,()=>{L()}),(m,v)=>(s(),a("div",Re,[e("div",Ie,[v[2]||(v[2]=e("h2",{class:"graph-view__title"},"Project Graph",-1)),e("div",Le,[e("div",Te,[v[0]||(v[0]=e("span",{class:"graph-view__depth-label"},"Depth:",-1)),(s(),a(ee,null,te([1,2,3],_=>f(j,{key:_,variant:h.value===_?"primary":"ghost",size:"sm",onClick:x=>h.value=_},{default:p(()=>[w(b(_),1)]),_:2},1032,["variant","onClick"])),64))]),f(j,{variant:"ghost",size:"sm",onClick:L},{default:p(()=>[...v[1]||(v[1]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M23 4v6h-6"}),e("path",{d:"M1 20v-6h6"}),e("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})],-1),w(" Refresh ",-1)])]),_:1})])]),i.value?(s(),a("div",Ue,[e("span",null,b(i.value.stats.total_documents)+" documents",1),e("span",null,b(i.value.stats.total_references)+" references",1),i.value.stats.orphaned_documents>0?(s(),a("span",Ge,b(i.value.stats.orphaned_documents)+" orphaned ",1)):R("",!0)])):R("",!0),e("div",{ref_key:"containerRef",ref:g,class:"graph-view__canvas"},[P.value?(s(),a("div",Ae,[...v[3]||(v[3]=[e("div",{class:"graph-view__spinner"},null,-1),w(" Loading graph... ",-1)])])):$.value?(s(),a("div",Oe,b($.value),1)):i.value&&n.value.size>0?(s(),a("svg",{key:2,ref_key:"svgRef",ref:M,width:k.value,height:c.value,class:"graph-view__svg"},[e("g",We,[(s(!0),a(ee,null,te(i.value.edges,_=>(s(),a("path",{key:`${_.source}-${_.target}`,d:T(_.source,_.target),class:"graph-view__edge"},null,8,Xe))),128))]),e("g",Ye,[(s(!0),a(ee,null,te(n.value,([_,x])=>(s(),a("g",{key:_,class:"graph-view__node",transform:`translate(${x.x}, ${x.y})`,onClick:z=>K(_)},[v[4]||(v[4]=e("circle",{r:"24",class:"graph-view__node-circle"},null,-1)),v[5]||(v[5]=e("text",{class:"graph-view__node-icon","text-anchor":"middle","dominant-baseline":"central",dy:"0.05em"},"📄",-1)),e("title",null,b(x.title),1)],8,Je))),128))])],8,qe)):i.value&&i.value.nodes.length===0?(s(),a("div",Ze," No documents in this project yet. ")):R("",!0)],512),v[6]||(v[6]=e("div",{class:"graph-view__legend"},[e("span",null,"Click a node to open the document")],-1))]))}}),Qe=re(Ke,[["__scopeId","data-v-fc6c0833"]]),et={class:"layout"},tt={class:"layout__body"},ot={class:"layout__content"},nt={key:0,class:"loading"},lt={key:1,class:"error"},st={key:2,class:"project"},rt={class:"project__welcome"},at={class:"project__title-row"},it={class:"project__title"},dt={key:0,class:"project__desc"},ut={class:"project__actions"},ct={class:"form__field"},vt={class:"form__field"},pt={class:"form__field"},ft={class:"folder-picker"},ht={key:0,class:"folder-picker__dropdown"},_t=["onClick"],mt={class:"form__field"},wt={class:"form__field"},gt={class:"form__field"},yt={class:"export-formats"},kt=se({__name:"ProjectView",setup(Y){const I=_e(),N=de(),o=ue(),i=ge(),P=u(!1),$=u(!1),h=u(""),n=u(""),k=u(null),c=u(!1),M=u(!1),g=u(""),L=u(""),J=u(!1),G=u(!1),A=u(!1),T=u("zip"),K=u(!1),B=u(!1),y=u(null),m=u(new Set);ve(async()=>{const r=I.params.id;await o.fetchProject(r)}),ie(()=>I.params.id,async r=>{r&&await o.fetchProject(r)});function v(r){N.push(`/documents/${r}`)}function _(){k.value=null,P.value=!0}function x(){k.value=null,$.value=!0,y.value=null,B.value=!1}async function z(){if(!(!h.value.trim()||!o.currentProject)){c.value=!0;try{await o.createFolder(o.currentProject.id,h.value.trim(),k.value),P.value=!1,h.value=""}catch(r){console.error("Failed to create folder:",r)}finally{c.value=!1}}}async function O(){if(!(!n.value.trim()||!o.currentProject)){c.value=!0;try{const r=await i.createDocument(o.currentProject.id,n.value.trim(),"",y.value);$.value=!1,n.value="",y.value=null,B.value=!1,await o.fetchProjectTree(o.currentProject.id),v(r.id)}catch(r){console.error("Failed to create document:",r)}finally{c.value=!1}}}function Z(){o.currentProject&&(g.value=o.currentProject.name,L.value=o.currentProject.description||"",M.value=!0)}async function oe(){if(!(!o.currentProject||!g.value.trim())){J.value=!0;try{await o.patchProject(o.currentProject.id,{name:g.value.trim(),description:L.value.trim()||void 0}),M.value=!1}catch(r){console.error("Failed to update project:",r)}finally{J.value=!1}}}const d=we(()=>F(o.treeNodes));function F(r,t=0){const l=[];for(const U of r)U.type==="folder"&&(l.push({id:U.id,name:U.name,depth:t}),U.children&&l.push(...F(U.children,t+1)));return l}function V(){if(B.value=!B.value,B.value){const r=o.folders.map(t=>t.id);m.value=new Set(r)}}function S(r){y.value=y.value===r?null:r}function D(){y.value=null}function E(){if(!y.value)return"Root (no folder)";const r=o.folders.find(t=>t.id===y.value);return r?r.name:"Root (no folder)"}function H(){G.value=!0}function q(){A.value=!0}async function W(){if(o.currentProject){K.value=!0;try{const r=await o.exportProject(o.currentProject.id,T.value),t=URL.createObjectURL(r),l=document.createElement("a"),U=o.currentProject.name.replace(/[^a-z0-9]/gi,"_");l.href=t,l.download=`${U}.${T.value}`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(t),A.value=!1}catch(r){console.error("Export failed:",r)}finally{K.value=!1}}}return(r,t)=>(s(),a("div",et,[f(ye),e("div",tt,[f(He,{onCreateFolder:_,onCreateDocument:x}),e("main",ot,[C(o).loading?(s(),a("div",nt,[...t[17]||(t[17]=[e("div",{class:"loading__spinner"},null,-1),e("p",null,"Loading project...",-1)])])):C(o).error?(s(),a("div",lt,[e("p",null,b(C(o).error),1),f(j,{variant:"secondary",onClick:t[0]||(t[0]=l=>C(N).push("/dashboard"))},{default:p(()=>[...t[18]||(t[18]=[w(" Back to Dashboard ",-1)])]),_:1})])):C(o).currentProject?(s(),a("div",st,[e("div",rt,[e("div",at,[e("h1",it,b(C(o).currentProject.name),1),e("button",{class:"edit-icon-btn",title:"Edit project",onClick:Z},[...t[19]||(t[19]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),e("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})],-1)])])]),C(o).currentProject.description?(s(),a("p",dt,b(C(o).currentProject.description),1)):R("",!0),t[22]||(t[22]=e("p",{class:"project__hint"}," Select a document from the sidebar or create a new one to get started. ",-1)),e("div",ut,[f(j,{variant:"secondary",onClick:H},{default:p(()=>[...t[20]||(t[20]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("circle",{cx:"18",cy:"5",r:"3"}),e("circle",{cx:"6",cy:"12",r:"3"}),e("circle",{cx:"18",cy:"19",r:"3"}),e("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),e("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})],-1),w(" View Graph ",-1)])]),_:1}),f(j,{variant:"secondary",onClick:q},{default:p(()=>[...t[21]||(t[21]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e("polyline",{points:"7 10 12 15 17 10"}),e("line",{x1:"12",y1:"15",x2:"12",y2:"3"})],-1),w(" Export ",-1)])]),_:1})])])])):R("",!0)])]),f(Q,{show:P.value,title:"Create New Folder",onClose:t[3]||(t[3]=l=>P.value=!1)},{footer:p(()=>[f(j,{variant:"secondary",onClick:t[2]||(t[2]=l=>P.value=!1)},{default:p(()=>[...t[24]||(t[24]=[w("Cancel",-1)])]),_:1}),f(j,{variant:"primary",loading:c.value,onClick:z},{default:p(()=>[...t[25]||(t[25]=[w("Create Folder",-1)])]),_:1},8,["loading"])]),default:p(()=>[e("form",{onSubmit:ae(z,["prevent"])},[e("div",ct,[t[23]||(t[23]=e("label",{for:"folder-name",class:"form__label"},"Folder Name",-1)),ne(e("input",{id:"folder-name","onUpdate:modelValue":t[1]||(t[1]=l=>h.value=l),type:"text",class:"form__input",placeholder:"My Folder",autofocus:""},null,512),[[le,h.value]])])],32)]),_:1},8,["show"]),f(Q,{show:$.value,title:"Create New Document",onClose:t[6]||(t[6]=l=>$.value=!1)},{footer:p(()=>[f(j,{variant:"secondary",onClick:t[5]||(t[5]=l=>$.value=!1)},{default:p(()=>[...t[32]||(t[32]=[w("Cancel",-1)])]),_:1}),f(j,{variant:"primary",loading:c.value,onClick:O},{default:p(()=>[...t[33]||(t[33]=[w("Create Document",-1)])]),_:1},8,["loading"])]),default:p(()=>[e("form",{onSubmit:ae(O,["prevent"])},[e("div",vt,[t[26]||(t[26]=e("label",{for:"doc-name",class:"form__label"},"Document Title",-1)),ne(e("input",{id:"doc-name","onUpdate:modelValue":t[4]||(t[4]=l=>n.value=l),type:"text",class:"form__input",placeholder:"Untitled Document",autofocus:""},null,512),[[le,n.value]])]),e("div",pt,[t[31]||(t[31]=e("label",{class:"form__label"},"Folder (optional)",-1)),e("div",ft,[e("button",{type:"button",class:"folder-picker__trigger",onClick:V},[t[28]||(t[28]=e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1)),e("span",null,b(E()),1),(s(),a("svg",{class:X(["folder-picker__chevron",{"folder-picker__chevron--open":B.value}]),width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[...t[27]||(t[27]=[e("path",{d:"m6 9 6 6 6-6"},null,-1)])],2))]),B.value?(s(),a("div",ht,[e("button",{type:"button",class:X(["folder-picker__option",{"folder-picker__option--selected":!y.value}]),onClick:D},[...t[29]||(t[29]=[e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"})],-1),w(" Root (no folder) ",-1)])],2),(s(!0),a(ee,null,te(d.value,l=>(s(),a("button",{key:l.id,type:"button",class:X(["folder-picker__option",{"folder-picker__option--selected":y.value===l.id}]),style:me({paddingLeft:`${.75+l.depth*1}rem`}),onClick:U=>S(l.id)},[t[30]||(t[30]=e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1)),w(" "+b(l.name),1)],14,_t))),128))])):R("",!0)])])],32)]),_:1},8,["show"]),f(Q,{show:M.value,title:"Edit Project",onClose:t[10]||(t[10]=l=>M.value=!1)},{footer:p(()=>[f(j,{variant:"secondary",onClick:t[9]||(t[9]=l=>M.value=!1)},{default:p(()=>[...t[36]||(t[36]=[w("Cancel",-1)])]),_:1}),f(j,{variant:"primary",loading:J.value,onClick:oe},{default:p(()=>[...t[37]||(t[37]=[w("Save",-1)])]),_:1},8,["loading"])]),default:p(()=>[e("form",{onSubmit:ae(oe,["prevent"])},[e("div",mt,[t[34]||(t[34]=e("label",{for:"edit-proj-name",class:"form__label"},"Project Name",-1)),ne(e("input",{id:"edit-proj-name","onUpdate:modelValue":t[7]||(t[7]=l=>g.value=l),type:"text",class:"form__input",placeholder:"Project name",autofocus:""},null,512),[[le,g.value]])]),e("div",wt,[t[35]||(t[35]=e("label",{for:"edit-proj-desc",class:"form__label"},"Description",-1)),ne(e("textarea",{id:"edit-proj-desc","onUpdate:modelValue":t[8]||(t[8]=l=>L.value=l),class:"form__input form__textarea",placeholder:"Add a description...",rows:"3"},null,512),[[le,L.value]])])],32)]),_:1},8,["show"]),f(Q,{show:G.value,title:"",size:"lg",onClose:t[12]||(t[12]=l=>G.value=!1)},{default:p(()=>[C(o).currentProject?(s(),ce(Qe,{key:0,"project-id":C(o).currentProject.id,onClose:t[11]||(t[11]=l=>G.value=!1)},null,8,["project-id"])):R("",!0)]),_:1},8,["show"]),f(Q,{show:A.value,title:"Export Project",onClose:t[16]||(t[16]=l=>A.value=!1)},{footer:p(()=>[f(j,{variant:"secondary",onClick:t[15]||(t[15]=l=>A.value=!1)},{default:p(()=>[...t[41]||(t[41]=[w("Cancel",-1)])]),_:1}),f(j,{variant:"primary",loading:K.value,onClick:W},{default:p(()=>[...t[42]||(t[42]=[w("Download",-1)])]),_:1},8,["loading"])]),default:p(()=>[e("div",gt,[t[40]||(t[40]=e("label",{class:"form__label"},"Format",-1)),e("div",yt,[e("button",{class:X(["export-format",{"export-format--selected":T.value==="zip"}]),onClick:t[13]||(t[13]=l=>T.value="zip")},[...t[38]||(t[38]=[e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})],-1),e("span",null,"ZIP Archive",-1),e("small",null,"Documents as .md files",-1)])],2),e("button",{class:X(["export-format",{"export-format--selected":T.value==="json"}]),onClick:t[14]||(t[14]=l=>T.value="json")},[...t[39]||(t[39]=[e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e("polyline",{points:"14 2 14 8 20 8"}),e("path",{d:"M8 13h2"}),e("path",{d:"M8 17h2"}),e("path",{d:"M14 13h2"}),e("path",{d:"M14 17h2"})],-1),e("span",null,"JSON",-1),e("small",null,"Full project with metadata",-1)])],2)])])]),_:1},8,["show"])]))}}),Pt=re(kt,[["__scopeId","data-v-2a45f457"]]);export{Pt as default}; diff --git a/dist/assets/ProjectView-DYVW7MC2.css b/dist/assets/ProjectView-DYVW7MC2.css deleted file mode 100644 index bf782a9..0000000 --- a/dist/assets/ProjectView-DYVW7MC2.css +++ /dev/null @@ -1 +0,0 @@ -.tree[data-v-e9acf25c]{list-style:none;margin:0;padding:0}.tree__item[data-v-e9acf25c]{margin:2px 0}.tree__node[data-v-e9acf25c]{display:flex;align-items:center;gap:.375rem;padding:.375rem .5rem;border-radius:6px;cursor:pointer;transition:background .1s}.tree__node[data-v-e9acf25c]:hover{background:var(--bg-tertiary)}.tree__toggle[data-v-e9acf25c]{display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;background:none;border:none;color:var(--text-secondary);cursor:pointer}.tree__icon[data-v-e9acf25c]{display:flex;align-items:center;justify-content:center;width:18px;color:var(--text-secondary)}.tree__arrow[data-v-e9acf25c]{transition:transform .15s}.tree__arrow--expanded[data-v-e9acf25c]{transform:rotate(90deg)}.tree__label[data-v-e9acf25c]{flex:1;font-size:.875rem;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree__children[data-v-e9acf25c]{margin-left:1rem}.expand-enter-active[data-v-e9acf25c],.expand-leave-active[data-v-e9acf25c]{transition:all .2s ease;overflow:hidden}.expand-enter-from[data-v-e9acf25c],.expand-leave-to[data-v-e9acf25c]{opacity:0;max-height:0}.expand-enter-to[data-v-e9acf25c],.expand-leave-from[data-v-e9acf25c]{max-height:500px}.sidebar[data-v-f979c4be]{width:280px;min-width:280px;height:100%;background:var(--bg-secondary);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}.sidebar__header[data-v-f979c4be]{padding:1rem;border-bottom:1px solid var(--border)}.sidebar__back[data-v-f979c4be]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem;background:none;border:none;border-radius:6px;font-size:.875rem;color:var(--text-secondary);cursor:pointer;text-align:left;transition:all .15s}.sidebar__back[data-v-f979c4be]:hover{background:var(--bg-tertiary);color:var(--text-primary)}.sidebar__content[data-v-f979c4be]{flex:1;display:flex;flex-direction:column;overflow:hidden}.sidebar__project[data-v-f979c4be]{padding:1rem;border-bottom:1px solid var(--border)}.sidebar__project-name[data-v-f979c4be]{margin:0;font-size:1rem;font-weight:600;color:var(--text-primary)}.sidebar__project-desc[data-v-f979c4be]{margin:.25rem 0 0;font-size:.8125rem;color:var(--text-secondary);line-height:1.4}.sidebar__actions[data-v-f979c4be]{display:flex;gap:.5rem;padding:.75rem 1rem;border-bottom:1px solid var(--border)}.sidebar__tree[data-v-f979c4be]{flex:1;overflow-y:auto;padding:.5rem}.sidebar__empty[data-v-f979c4be]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem;color:var(--text-secondary);text-align:center}.sidebar__empty p[data-v-f979c4be]{margin:0;font-size:.875rem}.layout[data-v-333c564d]{display:flex;flex-direction:column;height:100vh}.layout__body[data-v-333c564d]{flex:1;display:flex;overflow:hidden}.layout__content[data-v-333c564d]{flex:1;overflow-y:auto;background:var(--bg-primary)}.loading[data-v-333c564d],.error[data-v-333c564d]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;height:100%;color:var(--text-secondary)}.loading__spinner[data-v-333c564d]{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin-333c564d .8s linear infinite}@keyframes spin-333c564d{to{transform:rotate(360deg)}}.project[data-v-333c564d]{padding:2rem}.project__welcome[data-v-333c564d]{max-width:600px;margin:0 auto;text-align:center;padding:4rem 2rem}.project__title[data-v-333c564d]{margin:0;font-size:1.75rem;font-weight:600;color:var(--text-primary)}.project__desc[data-v-333c564d]{margin:.75rem 0 0;font-size:1rem;color:var(--text-secondary);line-height:1.5}.project__hint[data-v-333c564d]{margin:1.5rem 0 0;font-size:.9375rem;color:var(--text-secondary)}.form__field[data-v-333c564d]{margin-bottom:1.25rem}.form__field[data-v-333c564d]:last-child{margin-bottom:0}.form__label[data-v-333c564d]{display:block;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--text-primary)}.form__input[data-v-333c564d]{width:100%;padding:.75rem 1rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;font-size:.9375rem;color:var(--text-primary);outline:none;transition:border-color .15s,box-shadow .15s;box-sizing:border-box}.form__input[data-v-333c564d]::placeholder{color:var(--text-secondary)}.form__input[data-v-333c564d]:focus{border-color:var(--accent);box-shadow:0 0 0 3px #6366f11a} diff --git a/dist/assets/index-BuR1WXAD.js b/dist/assets/index-BuR1WXAD.js deleted file mode 100644 index 986fc5c..0000000 --- a/dist/assets/index-BuR1WXAD.js +++ /dev/null @@ -1,30 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-BlKP8Srx.js","assets/Button-BgP1U8Po.js","assets/Button-BnjR7XOq.css","assets/Login-B_rHAN5Z.css","assets/Dashboard-BkdRGXZA.js","assets/projects-BPkECm1G.js","assets/Modal-WC6XeOBi.js","assets/Modal-DqLHG8CN.css","assets/Dashboard-bZb0kvk2.css","assets/ProjectView-B4XGSAV_.js","assets/Header-De-cxVSd.js","assets/Header-BGQ1nCqG.css","assets/ProjectView-DYVW7MC2.css","assets/DocumentView-C0vMZPv-.js","assets/DocumentView-CG5E-1nF.css"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/** -* @vue/shared v3.5.31 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Ws(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ie={},Bt=[],Ze=()=>{},Oo=()=>!1,$n=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Wn=e=>e.startsWith("onUpdate:"),ge=Object.assign,qs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},fl=Object.prototype.hasOwnProperty,ne=(e,t)=>fl.call(e,t),H=Array.isArray,Ht=e=>yn(e)==="[object Map]",Po=e=>yn(e)==="[object Set]",Er=e=>yn(e)==="[object Date]",$=e=>typeof e=="function",ae=e=>typeof e=="string",Le=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",Io=e=>(se(e)||$(e))&&$(e.then)&&$(e.catch),No=Object.prototype.toString,yn=e=>No.call(e),al=e=>yn(e).slice(8,-1),Mo=e=>yn(e)==="[object Object]",qn=e=>ae(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Xt=Ws(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},hl=/-\w/g,Te=zn(e=>e.replace(hl,t=>t.slice(1).toUpperCase())),dl=/\B([A-Z])/g,Et=zn(e=>e.replace(dl,"-$1").toLowerCase()),Jn=zn(e=>e.charAt(0).toUpperCase()+e.slice(1)),us=zn(e=>e?`on${Jn(e)}`:""),Xe=(e,t)=>!Object.is(e,t),xn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},zs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},pl=e=>{const t=ae(e)?Number(e):NaN;return isNaN(t)?e:t};let Ar;const Qn=()=>Ar||(Ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Js(e){if(H(e)){const t={};for(let n=0;n{if(n){const s=n.split(ml);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Qs(e){let t="";if(ae(e))t=e;else if(H(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Al=e=>ae(e)?e:e==null?"":H(e)||se(e)&&(e.toString===No||!$(e.toString))?Fo(e)?Al(e.value):JSON.stringify(e,Vo,2):String(e),Vo=(e,t)=>Fo(t)?Vo(e,t.value):Ht(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[fs(s,o)+" =>"]=r,n),{})}:Po(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>fs(n))}:Le(t)?fs(t):se(t)&&!H(t)&&!Mo(t)?String(t):t,fs=(e,t="")=>{var n;return Le(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.31 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let ve;class jo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=ve,!t&&ve&&(this.index=(ve.scopes||(ve.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(ve=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(en){let t=en;for(en=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Zt;){let t=Zt;for(Zt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Go(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function $o(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),er(s),Cl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function xs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Wo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Wo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===un)||(e.globalVersion=un,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!xs(e))))return;e.flags|=2;const t=e.dep,n=ce,s=Be;ce=e,Be=!0;try{Go(e);const r=e.fn(e._value);(t.version===0||Xe(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ce=n,Be=s,$o(e),e.flags&=-3}}function er(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)er(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Cl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Be=!0;const qo=[];function ut(){qo.push(Be),Be=!1}function ft(){const e=qo.pop();Be=e===void 0?!0:e}function Sr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ce;ce=void 0;try{t()}finally{ce=n}}}let un=0;class wl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Yn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ce||!Be||ce===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ce)n=this.activeLink=new wl(ce,this),ce.deps?(n.prevDep=ce.depsTail,ce.depsTail.nextDep=n,ce.depsTail=n):ce.deps=ce.depsTail=n,zo(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ce.depsTail,n.nextDep=void 0,ce.depsTail.nextDep=n,ce.depsTail=n,ce.deps===n&&(ce.deps=s)}return n}trigger(t){this.version++,un++,this.notify(t)}notify(t){Xs();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Zs()}}}function zo(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)zo(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Mn=new WeakMap,Pt=Symbol(""),Ts=Symbol(""),fn=Symbol("");function be(e,t,n){if(Be&&ce){let s=Mn.get(e);s||Mn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Yn),r.map=s,r.key=n),r.track()}}function it(e,t,n,s,r,o){const i=Mn.get(e);if(!i){un++;return}const l=c=>{c&&c.trigger()};if(Xs(),t==="clear")i.forEach(l);else{const c=H(e),f=c&&qn(n);if(c&&n==="length"){const u=Number(s);i.forEach((a,p)=>{(p==="length"||p===fn||!Le(p)&&p>=u)&&l(a)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),f&&l(i.get(fn)),t){case"add":c?f&&l(i.get("length")):(l(i.get(Pt)),Ht(e)&&l(i.get(Ts)));break;case"delete":c||(l(i.get(Pt)),Ht(e)&&l(i.get(Ts)));break;case"set":Ht(e)&&l(i.get(Pt));break}}Zs()}function Rl(e,t){const n=Mn.get(e);return n&&n.get(t)}function Dt(e){const t=X(e);return t===e?t:(be(t,"iterate",fn),De(e)?t:t.map(He))}function Xn(e){return be(e=X(e),"iterate",fn),e}function Qe(e,t){return at(e)?Kt(ct(e)?He(t):t):He(t)}const xl={__proto__:null,[Symbol.iterator](){return hs(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Dt(this).concat(...e.map(t=>H(t)?Dt(t):t))},entries(){return hs(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return tt(this,"every",e,t,void 0,arguments)},filter(e,t){return tt(this,"filter",e,t,n=>n.map(s=>Qe(this,s)),arguments)},find(e,t){return tt(this,"find",e,t,n=>Qe(this,n),arguments)},findIndex(e,t){return tt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return tt(this,"findLast",e,t,n=>Qe(this,n),arguments)},findLastIndex(e,t){return tt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return tt(this,"forEach",e,t,void 0,arguments)},includes(...e){return ds(this,"includes",e)},indexOf(...e){return ds(this,"indexOf",e)},join(e){return Dt(this).join(e)},lastIndexOf(...e){return ds(this,"lastIndexOf",e)},map(e,t){return tt(this,"map",e,t,void 0,arguments)},pop(){return qt(this,"pop")},push(...e){return qt(this,"push",e)},reduce(e,...t){return Cr(this,"reduce",e,t)},reduceRight(e,...t){return Cr(this,"reduceRight",e,t)},shift(){return qt(this,"shift")},some(e,t){return tt(this,"some",e,t,void 0,arguments)},splice(...e){return qt(this,"splice",e)},toReversed(){return Dt(this).toReversed()},toSorted(e){return Dt(this).toSorted(e)},toSpliced(...e){return Dt(this).toSpliced(...e)},unshift(...e){return qt(this,"unshift",e)},values(){return hs(this,"values",e=>Qe(this,e))}};function hs(e,t,n){const s=Xn(e),r=s[t]();return s!==e&&!De(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Tl=Array.prototype;function tt(e,t,n,s,r,o){const i=Xn(e),l=i!==e&&!De(e),c=i[t];if(c!==Tl[t]){const a=c.apply(e,o);return l?He(a):a}let f=n;i!==e&&(l?f=function(a,p){return n.call(this,Qe(e,a),p,e)}:n.length>2&&(f=function(a,p){return n.call(this,a,p,e)}));const u=c.call(i,f,s);return l&&r?r(u):u}function Cr(e,t,n,s){const r=Xn(e),o=r!==e&&!De(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(f,u,a){return l&&(l=!1,f=Qe(e,f)),n.call(this,f,Qe(e,u),a,e)}):n.length>3&&(i=function(f,u,a){return n.call(this,f,u,a,e)}));const c=r[t](i,...s);return l?Qe(e,c):c}function ds(e,t,n){const s=X(e);be(s,"iterate",fn);const r=s[t](...n);return(r===-1||r===!1)&&Zn(n[0])?(n[0]=X(n[0]),s[t](...n)):r}function qt(e,t,n=[]){ut(),Xs();const s=X(e)[t].apply(e,n);return Zs(),ft(),s}const Ol=Ws("__proto__,__v_isRef,__isVue"),Jo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Le));function Pl(e){Le(e)||(e=String(e));const t=X(this);return be(t,"has",e),t.hasOwnProperty(e)}class Qo{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Hl:ei:o?Zo:Xo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=H(t);if(!r){let c;if(i&&(c=xl[n]))return c;if(n==="hasOwnProperty")return Pl}const l=Reflect.get(t,n,fe(t)?t:s);if((Le(n)?Jo.has(n):Ol(n))||(r||be(t,"get",n),o))return l;if(fe(l)){const c=i&&qn(n)?l:l.value;return r&&se(c)?Ps(c):c}return se(l)?r?Ps(l):vn(l):l}}class Yo extends Qo{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=H(t)&&qn(n);if(!this._isShallow){const f=at(o);if(!De(s)&&!at(s)&&(o=X(o),s=X(s)),!i&&fe(o)&&!fe(s))return f||(o.value=s),!0}const l=i?Number(n)e,An=e=>Reflect.getPrototypeOf(e);function Ll(e,t,n){return function(...s){const r=this.__v_raw,o=X(r),i=Ht(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,f=r[e](...s),u=n?Os:t?Kt:He;return!t&&be(o,"iterate",c?Ts:Pt),ge(Object.create(f),{next(){const{value:a,done:p}=f.next();return p?{value:a,done:p}:{value:l?[u(a[0]),u(a[1])]:u(a),done:p}}})}}function Sn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Fl(e,t){const n={get(r){const o=this.__v_raw,i=X(o),l=X(r);e||(Xe(r,l)&&be(i,"get",r),be(i,"get",l));const{has:c}=An(i),f=t?Os:e?Kt:He;if(c.call(i,r))return f(o.get(r));if(c.call(i,l))return f(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&be(X(r),"iterate",Pt),r.size},has(r){const o=this.__v_raw,i=X(o),l=X(r);return e||(Xe(r,l)&&be(i,"has",r),be(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,c=X(l),f=t?Os:e?Kt:He;return!e&&be(c,"iterate",Pt),l.forEach((u,a)=>r.call(o,f(u),f(a),i))}};return ge(n,e?{add:Sn("add"),set:Sn("set"),delete:Sn("delete"),clear:Sn("clear")}:{add(r){const o=X(this),i=An(o),l=X(r),c=!t&&!De(r)&&!at(r)?l:r;return i.has.call(o,c)||Xe(r,c)&&i.has.call(o,r)||Xe(l,c)&&i.has.call(o,l)||(o.add(c),it(o,"add",c,c)),this},set(r,o){!t&&!De(o)&&!at(o)&&(o=X(o));const i=X(this),{has:l,get:c}=An(i);let f=l.call(i,r);f||(r=X(r),f=l.call(i,r));const u=c.call(i,r);return i.set(r,o),f?Xe(o,u)&&it(i,"set",r,o):it(i,"add",r,o),this},delete(r){const o=X(this),{has:i,get:l}=An(o);let c=i.call(o,r);c||(r=X(r),c=i.call(o,r)),l&&l.call(o,r);const f=o.delete(r);return c&&it(o,"delete",r,void 0),f},clear(){const r=X(this),o=r.size!==0,i=r.clear();return o&&it(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Ll(r,e,t)}),n}function tr(e,t){const n=Fl(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(ne(n,r)&&r in s?n:s,r,o)}const Vl={get:tr(!1,!1)},jl={get:tr(!1,!0)},Bl={get:tr(!0,!1)};const Xo=new WeakMap,Zo=new WeakMap,ei=new WeakMap,Hl=new WeakMap;function kl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ul(e){return e.__v_skip||!Object.isExtensible(e)?0:kl(al(e))}function vn(e){return at(e)?e:nr(e,!1,Nl,Vl,Xo)}function ti(e){return nr(e,!1,Dl,jl,Zo)}function Ps(e){return nr(e,!0,Ml,Bl,ei)}function nr(e,t,n,s,r){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Ul(e);if(o===0)return e;const i=r.get(e);if(i)return i;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ct(e){return at(e)?ct(e.__v_raw):!!(e&&e.__v_isReactive)}function at(e){return!!(e&&e.__v_isReadonly)}function De(e){return!!(e&&e.__v_isShallow)}function Zn(e){return e?!!e.__v_raw:!1}function X(e){const t=e&&e.__v_raw;return t?X(t):e}function sr(e){return!ne(e,"__v_skip")&&Object.isExtensible(e)&&Do(e,"__v_skip",!0),e}const He=e=>se(e)?vn(e):e,Kt=e=>se(e)?Ps(e):e;function fe(e){return e?e.__v_isRef===!0:!1}function Dn(e){return ni(e,!1)}function Kl(e){return ni(e,!0)}function ni(e,t){return fe(e)?e:new Gl(e,t)}class Gl{constructor(t,n){this.dep=new Yn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:X(t),this._value=n?t:He(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||De(t)||at(t);t=s?t:X(t),Xe(t,n)&&(this._rawValue=t,this._value=s?t:He(t),this.dep.trigger())}}function vt(e){return fe(e)?e.value:e}const $l={get:(e,t,n)=>t==="__v_raw"?e:vt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return fe(r)&&!fe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function si(e){return ct(e)?e:new Proxy(e,$l)}class Wl{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Yn,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function aa(e){return new Wl(e)}function ql(e){const t=H(e)?new Array(e.length):{};for(const n in e)t[n]=Jl(e,n);return t}class zl{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=Le(n)?n:String(n),this._raw=X(t);let r=!0,o=t;if(!H(t)||Le(this._key)||!qn(this._key))do r=!Zn(o)||De(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=vt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&fe(this._raw[this._key])){const n=this._object[this._key];if(fe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Rl(this._raw,this._key)}}function Jl(e,t,n){return new zl(e,t,n)}class Ql{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Yn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=un-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ce!==this)return Ko(this,!0),!0}get value(){const t=this.dep.track();return Wo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Yl(e,t,n=!1){let s,r;return $(e)?s=e:(s=e.get,r=e.set),new Ql(s,r,n)}const Cn={},Ln=new WeakMap;let xt;function Xl(e,t=!1,n=xt){if(n){let s=Ln.get(n);s||Ln.set(n,s=[]),s.push(e)}}function Zl(e,t,n=ie){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:c}=n,f=N=>r?N:De(N)||r===!1||r===0?lt(N,1):lt(N);let u,a,p,m,A=!1,S=!1;if(fe(e)?(a=()=>e.value,A=De(e)):ct(e)?(a=()=>f(e),A=!0):H(e)?(S=!0,A=e.some(N=>ct(N)||De(N)),a=()=>e.map(N=>{if(fe(N))return N.value;if(ct(N))return f(N);if($(N))return c?c(N,2):N()})):$(e)?t?a=c?()=>c(e,2):e:a=()=>{if(p){ut();try{p()}finally{ft()}}const N=xt;xt=u;try{return c?c(e,3,[m]):e(m)}finally{xt=N}}:a=Ze,t&&r){const N=a,B=r===!0?1/0:r;a=()=>lt(N(),B)}const F=Ho(),M=()=>{u.stop(),F&&F.active&&qs(F.effects,u)};if(o&&t){const N=t;t=(...B)=>{N(...B),M()}}let C=S?new Array(e.length).fill(Cn):Cn;const L=N=>{if(!(!(u.flags&1)||!u.dirty&&!N))if(t){const B=u.run();if(r||A||(S?B.some((z,q)=>Xe(z,C[q])):Xe(B,C))){p&&p();const z=xt;xt=u;try{const q=[B,C===Cn?void 0:S&&C[0]===Cn?[]:C,m];C=B,c?c(t,3,q):t(...q)}finally{xt=z}}}else u.run()};return l&&l(L),u=new ko(a),u.scheduler=i?()=>i(L,!1):L,m=N=>Xl(N,!1,u),p=u.onStop=()=>{const N=Ln.get(u);if(N){if(c)c(N,4);else for(const B of N)B();Ln.delete(u)}},t?s?L(!0):C=u.run():i?i(L.bind(null,!0),!0):u.run(),M.pause=u.pause.bind(u),M.resume=u.resume.bind(u),M.stop=M,M}function lt(e,t=1/0,n){if(t<=0||!se(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,fe(e))lt(e.value,t,n);else if(H(e))for(let s=0;s{lt(s,t,n)});else if(Mo(e)){for(const s in e)lt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&<(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.31 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function bn(e,t,n,s){try{return s?e(...s):e()}catch(r){es(r,t,n)}}function ke(e,t,n,s){if($(e)){const r=bn(e,t,n,s);return r&&Io(r)&&r.catch(o=>{es(o,t,n)}),r}if(H(e)){const r=[];for(let o=0;o>>1,r=Re[s],o=an(r);o=an(n)?Re.push(e):Re.splice(tc(t),0,e),e.flags|=1,oi()}}function oi(){Fn||(Fn=ri.then(li))}function nc(e){H(e)?kt.push(...e):_t&&e.id===-1?_t.splice(Ft+1,0,e):e.flags&1||(kt.push(e),e.flags|=1),oi()}function wr(e,t,n=ze+1){for(;nan(n)-an(s));if(kt.length=0,_t){_t.push(...t);return}for(_t=t,Ft=0;Ft<_t.length;Ft++){const n=_t[Ft];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}_t=null,Ft=0}}const an=e=>e.id==null?e.flags&2?-1:1/0:e.id;function li(e){try{for(ze=0;ze{s._d&&kn(-1);const o=Vn(t);let i;try{i=e(...r)}finally{Vn(o),s._d&&kn(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function ha(e,t){if(_e===null)return e;const n=os(_e),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&$(t)?t.call(s&&s.proxy):t}}function rc(){return!!(hr()||It)}const oc=Symbol.for("v-scx"),ic=()=>je(oc);function da(e,t){return ir(e,null,t)}function tn(e,t,n){return ir(e,t,n)}function ir(e,t,n=ie){const{immediate:s,deep:r,flush:o,once:i}=n,l=ge({},n),c=t&&s||!t&&o!=="post";let f;if(gn){if(o==="sync"){const m=ic();f=m.__watcherHandles||(m.__watcherHandles=[])}else if(!c){const m=()=>{};return m.stop=Ze,m.resume=Ze,m.pause=Ze,m}}const u=Ae;l.call=(m,A,S)=>ke(m,u,A,S);let a=!1;o==="post"?l.scheduler=m=>{ye(m,u&&u.suspense)}:o!=="sync"&&(a=!0,l.scheduler=(m,A)=>{A?m():or(m)}),l.augmentJob=m=>{t&&(m.flags|=4),a&&(m.flags|=2,u&&(m.id=u.uid,m.i=u))};const p=Zl(e,t,l);return gn&&(f?f.push(p):c&&p()),p}function lc(e,t,n){const s=this.proxy,r=ae(e)?e.includes(".")?ui(s,e):()=>s[e]:e.bind(s,s);let o;$(t)?o=t:(o=t.handler,n=t);const i=En(this),l=ir(r,o.bind(s),n);return i(),l}function ui(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,nn=e=>e&&(e.disabled||e.disabled===""),cc=e=>e&&(e.defer||e.defer===""),Rr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,xr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Is=(e,t)=>{const n=e&&e.to;return ae(n)?t?t(n):null:n},hi={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,c,f){const{mc:u,pc:a,pbc:p,o:{insert:m,querySelector:A,createText:S,createComment:F}}=f,M=nn(t.props);let{shapeFlag:C,children:L,dynamicChildren:N}=t;if(e==null){const B=t.el=S(""),z=t.anchor=S("");m(B,n,s),m(z,n,s);const q=(w,U)=>{C&16&&u(L,w,U,r,o,i,l,c)},k=()=>{const w=t.target=Is(t.props,A),U=Ns(w,t,S,m);w&&(i!=="svg"&&Rr(w)?i="svg":i!=="mathml"&&xr(w)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(w),M||(q(w,U),On(t,!1)))};M&&(q(n,z),On(t,!0)),cc(t.props)||o&&o.pendingBranch?(t.el.__isMounted=!1,ye(()=>{t.el.__isMounted===!1&&(k(),delete t.el.__isMounted)},o)):k()}else{t.el=e.el,t.targetStart=e.targetStart;const B=t.anchor=e.anchor,z=t.target=e.target,q=t.targetAnchor=e.targetAnchor;if(e.el.__isMounted===!1){ye(()=>{hi.process(e,t,n,s,r,o,i,l,c,f)},o);return}const k=nn(e.props),w=k?n:z,U=k?B:q;if(i==="svg"||Rr(z)?i="svg":(i==="mathml"||xr(z))&&(i="mathml"),N?(p(e.dynamicChildren,N,w,r,o,i,l),fr(e,t,!0)):c||a(e,t,w,U,r,o,i,l,!1),M)k?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wn(t,n,B,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const J=t.target=Is(t.props,A);J&&wn(t,J,null,f,0)}else k&&wn(t,z,q,f,1);On(t,M)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:c,targetStart:f,targetAnchor:u,target:a,props:p}=e;if(a&&(r(f),r(u)),o&&r(c),i&16){const m=o||!nn(p);for(let A=0;A{e.isMounted=!0}),Ei(()=>{e.isUnmounting=!0}),e}const Ve=[Function,Array],di={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ve,onEnter:Ve,onAfterEnter:Ve,onEnterCancelled:Ve,onBeforeLeave:Ve,onLeave:Ve,onAfterLeave:Ve,onLeaveCancelled:Ve,onBeforeAppear:Ve,onAppear:Ve,onAfterAppear:Ve,onAppearCancelled:Ve},pi=e=>{const t=e.subTree;return t.component?pi(t.component):t},ac={name:"BaseTransition",props:di,setup(e,{slots:t}){const n=hr(),s=fc();return()=>{const r=t.default&&_i(t.default(),!0);if(!r||!r.length)return;const o=gi(r),i=X(e),{mode:l}=i;if(s.isLeaving)return ps(o);const c=Tr(o);if(!c)return ps(o);let f=Ms(c,i,s,n,a=>f=a);c.type!==Ee&&hn(c,f);let u=n.subTree&&Tr(n.subTree);if(u&&u.type!==Ee&&!Tt(u,c)&&pi(n).type!==Ee){let a=Ms(u,i,s,n);if(hn(u,a),l==="out-in"&&c.type!==Ee)return s.isLeaving=!0,a.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete a.afterLeave,u=void 0},ps(o);l==="in-out"&&c.type!==Ee?a.delayLeave=(p,m,A)=>{const S=mi(s,u);S[String(u.key)]=u,p[Je]=()=>{m(),p[Je]=void 0,delete f.delayedLeave,u=void 0},f.delayedLeave=()=>{A(),delete f.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function gi(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ee){t=n;break}}return t}const hc=ac;function mi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Ms(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:u,onEnterCancelled:a,onBeforeLeave:p,onLeave:m,onAfterLeave:A,onLeaveCancelled:S,onBeforeAppear:F,onAppear:M,onAfterAppear:C,onAppearCancelled:L}=t,N=String(e.key),B=mi(n,e),z=(w,U)=>{w&&ke(w,s,9,U)},q=(w,U)=>{const J=U[1];z(w,U),H(w)?w.every(P=>P.length<=1)&&J():w.length<=1&&J()},k={mode:i,persisted:l,beforeEnter(w){let U=c;if(!n.isMounted)if(o)U=F||c;else return;w[Je]&&w[Je](!0);const J=B[N];J&&Tt(e,J)&&J.el[Je]&&J.el[Je](),z(U,[w])},enter(w){if(B[N]===e)return;let U=f,J=u,P=a;if(!n.isMounted)if(o)U=M||f,J=C||u,P=L||a;else return;let Q=!1;w[zt]=Se=>{Q||(Q=!0,Se?z(P,[w]):z(J,[w]),k.delayedLeave&&k.delayedLeave(),w[zt]=void 0)};const he=w[zt].bind(null,!1);U?q(U,[w,he]):he()},leave(w,U){const J=String(e.key);if(w[zt]&&w[zt](!0),n.isUnmounting)return U();z(p,[w]);let P=!1;w[Je]=he=>{P||(P=!0,U(),he?z(S,[w]):z(A,[w]),w[Je]=void 0,B[J]===e&&delete B[J])};const Q=w[Je].bind(null,!1);B[J]=e,m?q(m,[w,Q]):Q()},clone(w){const U=Ms(w,t,n,s,r);return r&&r(U),U}};return k}function ps(e){if(ts(e))return e=bt(e),e.children=null,e}function Tr(e){if(!ts(e))return ai(e.type)&&e.children?gi(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&$(n.default))return n.default()}}function hn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,hn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function _i(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;osn(S,t&&(H(t)?t[F]:t),n,s,r));return}if(Ut(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&sn(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?os(s.component):s.el,i=r?null:o,{i:l,r:c}=e,f=t&&t.r,u=l.refs===ie?l.refs={}:l.refs,a=l.setupState,p=X(a),m=a===ie?Oo:S=>Or(u,S)?!1:ne(p,S),A=(S,F)=>!(F&&Or(u,F));if(f!=null&&f!==c){if(Pr(t),ae(f))u[f]=null,m(f)&&(a[f]=null);else if(fe(f)){const S=t;A(f,S.k)&&(f.value=null),S.k&&(u[S.k]=null)}}if($(c))bn(c,l,12,[i,u]);else{const S=ae(c),F=fe(c);if(S||F){const M=()=>{if(e.f){const C=S?m(c)?a[c]:u[c]:A()||!e.k?c.value:u[e.k];if(r)H(C)&&qs(C,o);else if(H(C))C.includes(o)||C.push(o);else if(S)u[c]=[o],m(c)&&(a[c]=u[c]);else{const L=[o];A(c,e.k)&&(c.value=L),e.k&&(u[e.k]=L)}}else S?(u[c]=i,m(c)&&(a[c]=i)):F&&(A(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const C=()=>{M(),jn.delete(e)};C.id=-1,jn.set(e,C),ye(C,n)}else Pr(e),M()}}}function Pr(e){const t=jn.get(e);t&&(t.flags|=8,jn.delete(e))}Qn().requestIdleCallback;Qn().cancelIdleCallback;const Ut=e=>!!e.type.__asyncLoader,ts=e=>e.type.__isKeepAlive;function dc(e,t){vi(e,"a",t)}function pc(e,t){vi(e,"da",t)}function vi(e,t,n=Ae){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ns(t,s,n),n){let r=n.parent;for(;r&&r.parent;)ts(r.parent.vnode)&&gc(s,t,n,r),r=r.parent}}function gc(e,t,n,s){const r=ns(t,e,s,!0);Ai(()=>{qs(s[t],r)},n)}function ns(e,t,n=Ae,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ut();const l=En(n),c=ke(t,n,e,i);return l(),ft(),c});return s?r.unshift(o):r.push(o),o}}const ht=e=>(t,n=Ae)=>{(!gn||e==="sp")&&ns(e,(...s)=>t(...s),n)},mc=ht("bm"),bi=ht("m"),_c=ht("bu"),yc=ht("u"),Ei=ht("bum"),Ai=ht("um"),vc=ht("sp"),bc=ht("rtg"),Ec=ht("rtc");function Ac(e,t=Ae){ns("ec",e,t)}const Sc="components";function ga(e,t){return wc(Sc,e,!0,t)||e}const Cc=Symbol.for("v-ndc");function wc(e,t,n=!0,s=!1){const r=_e||Ae;if(r){const o=r.type;{const l=fu(o,!1);if(l&&(l===t||l===Te(t)||l===Jn(Te(t))))return o}const i=Ir(r[e]||o[e],t)||Ir(r.appContext[e],t);return!i&&s?o:i}}function Ir(e,t){return e&&(e[t]||e[Te(t)]||e[Jn(Te(t))])}function ma(e,t,n,s){let r;const o=n,i=H(e);if(i||ae(e)){const l=i&&ct(e);let c=!1,f=!1;l&&(c=!De(e),f=at(e),e=Xn(e)),r=new Array(e.length);for(let u=0,a=e.length;ut(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,f=l.length;c0;return t!=="default"&&(n.name=t),Hn(),Un(Ie,null,[xe("slot",n,s)],f?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),Hn();const i=o&&Si(o(n)),l=n.key||i&&i.key,c=Un(Ie,{key:(l&&!Le(l)?l:`_${t}`)+(!i&&s?"_fb":"")},i||[],i&&e._===1?64:-2);return o&&o._c&&(o._d=!0),c}function Si(e){return e.some(t=>pn(t)?!(t.type===Ee||t.type===Ie&&!Si(t.children)):!0)?e:null}const Ds=e=>e?Ki(e)?os(e):Ds(e.parent):null,rn=ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ds(e.parent),$root:e=>Ds(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>wi(e),$forceUpdate:e=>e.f||(e.f=()=>{or(e.update)}),$nextTick:e=>e.n||(e.n=rr.bind(e.proxy)),$watch:e=>lc.bind(e)}),gs=(e,t)=>e!==ie&&!e.__isScriptSetup&&ne(e,t),Rc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(gs(s,t))return i[t]=1,s[t];if(r!==ie&&ne(r,t))return i[t]=2,r[t];if(ne(o,t))return i[t]=3,o[t];if(n!==ie&&ne(n,t))return i[t]=4,n[t];Ls&&(i[t]=0)}}const f=rn[t];let u,a;if(f)return t==="$attrs"&&be(e.attrs,"get",""),f(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ie&&ne(n,t))return i[t]=4,n[t];if(a=c.config.globalProperties,ne(a,t))return a[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return gs(r,t)?(r[t]=n,!0):s!==ie&&ne(s,t)?(s[t]=n,!0):ne(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let c;return!!(n[l]||e!==ie&&l[0]!=="$"&&ne(e,l)||gs(t,l)||ne(o,l)||ne(s,l)||ne(rn,l)||ne(r.config.globalProperties,l)||(c=i.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ne(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Nr(e){return H(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ls=!0;function xc(e){const t=wi(e),n=e.proxy,s=e.ctx;Ls=!1,t.beforeCreate&&Mr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:f,created:u,beforeMount:a,mounted:p,beforeUpdate:m,updated:A,activated:S,deactivated:F,beforeDestroy:M,beforeUnmount:C,destroyed:L,unmounted:N,render:B,renderTracked:z,renderTriggered:q,errorCaptured:k,serverPrefetch:w,expose:U,inheritAttrs:J,components:P,directives:Q,filters:he}=t;if(f&&Tc(f,s,null),i)for(const W in i){const ee=i[W];$(ee)&&(s[W]=ee.bind(n))}if(r){const W=r.call(n,n);se(W)&&(e.data=vn(W))}if(Ls=!0,o)for(const W in o){const ee=o[W],et=$(ee)?ee.bind(n,n):$(ee.get)?ee.get.bind(n,n):Ze,dt=!$(ee)&&$(ee.set)?ee.set.bind(n):Ze,Ke=Ne({get:et,set:dt});Object.defineProperty(s,W,{enumerable:!0,configurable:!0,get:()=>Ke.value,set:Oe=>Ke.value=Oe})}if(l)for(const W in l)Ci(l[W],s,n,W);if(c){const W=$(c)?c.call(n):c;Reflect.ownKeys(W).forEach(ee=>{Tn(ee,W[ee])})}u&&Mr(u,e,"c");function re(W,ee){H(ee)?ee.forEach(et=>W(et.bind(n))):ee&&W(ee.bind(n))}if(re(mc,a),re(bi,p),re(_c,m),re(yc,A),re(dc,S),re(pc,F),re(Ac,k),re(Ec,z),re(bc,q),re(Ei,C),re(Ai,N),re(vc,w),H(U))if(U.length){const W=e.exposed||(e.exposed={});U.forEach(ee=>{Object.defineProperty(W,ee,{get:()=>n[ee],set:et=>n[ee]=et,enumerable:!0})})}else e.exposed||(e.exposed={});B&&e.render===Ze&&(e.render=B),J!=null&&(e.inheritAttrs=J),P&&(e.components=P),Q&&(e.directives=Q),w&&yi(e)}function Tc(e,t,n=Ze){H(e)&&(e=Fs(e));for(const s in e){const r=e[s];let o;se(r)?"default"in r?o=je(r.from||s,r.default,!0):o=je(r.from||s):o=je(r),fe(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function Mr(e,t,n){ke(H(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ci(e,t,n,s){let r=s.includes(".")?ui(n,s):()=>n[s];if(ae(e)){const o=t[e];$(o)&&tn(r,o)}else if($(e))tn(r,e.bind(n));else if(se(e))if(H(e))e.forEach(o=>Ci(o,t,n,s));else{const o=$(e.handler)?e.handler.bind(n):t[e.handler];$(o)&&tn(r,o,e)}}function wi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>Bn(c,f,i,!0)),Bn(c,t,i)),se(t)&&o.set(t,c),c}function Bn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Bn(e,o,n,!0),r&&r.forEach(i=>Bn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Oc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Oc={data:Dr,props:Lr,emits:Lr,methods:Yt,computed:Yt,beforeCreate:Ce,created:Ce,beforeMount:Ce,mounted:Ce,beforeUpdate:Ce,updated:Ce,beforeDestroy:Ce,beforeUnmount:Ce,destroyed:Ce,unmounted:Ce,activated:Ce,deactivated:Ce,errorCaptured:Ce,serverPrefetch:Ce,components:Yt,directives:Yt,watch:Ic,provide:Dr,inject:Pc};function Dr(e,t){return t?e?function(){return ge($(e)?e.call(this,this):e,$(t)?t.call(this,this):t)}:t:e}function Pc(e,t){return Yt(Fs(e),Fs(t))}function Fs(e){if(H(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Te(t)}Modifiers`]||e[`${Et(t)}Modifiers`];function Lc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ie;let r=n;const o=t.startsWith("update:"),i=o&&Dc(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>ae(u)?u.trim():u)),i.number&&(r=n.map(zs)));let l,c=s[l=us(t)]||s[l=us(Te(t))];!c&&o&&(c=s[l=us(Et(t))]),c&&ke(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ke(f,e,6,r)}}const Fc=new WeakMap;function xi(e,t,n=!1){const s=n?Fc:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!$(e)){const c=f=>{const u=xi(f,t,!0);u&&(l=!0,ge(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(se(e)&&s.set(e,null),null):(H(o)?o.forEach(c=>i[c]=null):ge(i,o),se(e)&&s.set(e,i),i)}function ss(e,t){return!e||!$n(t)?!1:(t=t.slice(2).replace(/Once$/,""),ne(e,t[0].toLowerCase()+t.slice(1))||ne(e,Et(t))||ne(e,t))}function Fr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:f,renderCache:u,props:a,data:p,setupState:m,ctx:A,inheritAttrs:S}=e,F=Vn(e);let M,C;try{if(n.shapeFlag&4){const N=r||s,B=N;M=Ye(f.call(B,N,u,a,m,p,A)),C=l}else{const N=t;M=Ye(N.length>1?N(a,{attrs:l,slots:i,emit:c}):N(a,null)),C=t.props?l:Vc(l)}}catch(N){on.length=0,es(N,e,1),M=xe(Ee)}let L=M;if(C&&S!==!1){const N=Object.keys(C),{shapeFlag:B}=L;N.length&&B&7&&(o&&N.some(Wn)&&(C=jc(C,o)),L=bt(L,C,!1,!0))}return n.dirs&&(L=bt(L,null,!1,!0),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition&&hn(L,n.transition),M=L,Vn(F),M}const Vc=e=>{let t;for(const n in e)(n==="class"||n==="style"||$n(n))&&((t||(t={}))[n]=e[n]);return t},jc=(e,t)=>{const n={};for(const s in e)(!Wn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Bc(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,f=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Vr(s,i,f):!!i;if(c&8){const u=t.dynamicProps;for(let a=0;aObject.create(Oi),Ii=e=>Object.getPrototypeOf(e)===Oi;function kc(e,t,n,s=!1){const r={},o=Pi();e.propsDefaults=Object.create(null),Ni(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:ti(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Uc(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=X(r),[c]=e.propsOptions;let f=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let a=0;a{c=!0;const[p,m]=Mi(a,t,!0);ge(i,p),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return se(e)&&s.set(e,Bt),Bt;if(H(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",ur=e=>H(e)?e.map(Ye):[Ye(e)],Gc=(e,t,n)=>{if(t._n)return t;const s=sc((...r)=>ur(t(...r)),n);return s._c=!1,s},Di=(e,t,n)=>{const s=e._ctx;for(const r in e){if(cr(r))continue;const o=e[r];if($(o))t[r]=Gc(r,o,s);else if(o!=null){const i=ur(o);t[r]=()=>i}}},Li=(e,t)=>{const n=ur(t);e.slots.default=()=>n},Fi=(e,t,n)=>{for(const s in t)(n||!cr(s))&&(e[s]=t[s])},$c=(e,t,n)=>{const s=e.slots=Pi();if(e.vnode.shapeFlag&32){const r=t._;r?(Fi(s,t,n),n&&Do(s,"_",r,!0)):Di(t,s)}else t&&Li(e,t)},Wc=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=ie;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Fi(r,t,n):(o=!t.$stable,Di(t,r)),i=t}else t&&(Li(e,t),i={default:1});if(o)for(const l in r)!cr(l)&&i[l]==null&&delete r[l]},ye=Yc;function qc(e){return zc(e)}function zc(e,t){const n=Qn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:f,setElementText:u,parentNode:a,nextSibling:p,setScopeId:m=Ze,insertStaticContent:A}=e,S=(h,d,g,_=null,b=null,y=null,T=void 0,x=null,R=!!d.dynamicChildren)=>{if(h===d)return;h&&!Tt(h,d)&&(_=v(h),Oe(h,b,y,!0),h=null),d.patchFlag===-2&&(R=!1,d.dynamicChildren=null);const{type:E,ref:K,shapeFlag:I}=d;switch(E){case rs:F(h,d,g,_);break;case Ee:M(h,d,g,_);break;case Pn:h==null&&C(d,g,_,T);break;case Ie:P(h,d,g,_,b,y,T,x,R);break;default:I&1?B(h,d,g,_,b,y,T,x,R):I&6?Q(h,d,g,_,b,y,T,x,R):(I&64||I&128)&&E.process(h,d,g,_,b,y,T,x,R,V)}K!=null&&b?sn(K,h&&h.ref,y,d||h,!d):K==null&&h&&h.ref!=null&&sn(h.ref,null,y,h,!0)},F=(h,d,g,_)=>{if(h==null)s(d.el=l(d.children),g,_);else{const b=d.el=h.el;d.children!==h.children&&f(b,d.children)}},M=(h,d,g,_)=>{h==null?s(d.el=c(d.children||""),g,_):d.el=h.el},C=(h,d,g,_)=>{[h.el,h.anchor]=A(h.children,d,g,_,h.el,h.anchor)},L=({el:h,anchor:d},g,_)=>{let b;for(;h&&h!==d;)b=p(h),s(h,g,_),h=b;s(d,g,_)},N=({el:h,anchor:d})=>{let g;for(;h&&h!==d;)g=p(h),r(h),h=g;r(d)},B=(h,d,g,_,b,y,T,x,R)=>{if(d.type==="svg"?T="svg":d.type==="math"&&(T="mathml"),h==null)z(d,g,_,b,y,T,x,R);else{const E=h.el&&h.el._isVueCE?h.el:null;try{E&&E._beginPatch(),w(h,d,b,y,T,x,R)}finally{E&&E._endPatch()}}},z=(h,d,g,_,b,y,T,x)=>{let R,E;const{props:K,shapeFlag:I,transition:j,dirs:G}=h;if(R=h.el=i(h.type,y,K&&K.is,K),I&8?u(R,h.children):I&16&&k(h.children,R,null,_,b,ms(h,y),T,x),G&&St(h,null,_,"created"),q(R,h,h.scopeId,T,_),K){for(const oe in K)oe!=="value"&&!Xt(oe)&&o(R,oe,null,K[oe],y,_);"value"in K&&o(R,"value",null,K.value,y),(E=K.onVnodeBeforeMount)&&qe(E,_,h)}G&&St(h,null,_,"beforeMount");const Z=Jc(b,j);Z&&j.beforeEnter(R),s(R,d,g),((E=K&&K.onVnodeMounted)||Z||G)&&ye(()=>{try{E&&qe(E,_,h),Z&&j.enter(R),G&&St(h,null,_,"mounted")}finally{}},b)},q=(h,d,g,_,b)=>{if(g&&m(h,g),_)for(let y=0;y<_.length;y++)m(h,_[y]);if(b){let y=b.subTree;if(d===y||Bi(y.type)&&(y.ssContent===d||y.ssFallback===d)){const T=b.vnode;q(h,T,T.scopeId,T.slotScopeIds,b.parent)}}},k=(h,d,g,_,b,y,T,x,R=0)=>{for(let E=R;E{const x=d.el=h.el;let{patchFlag:R,dynamicChildren:E,dirs:K}=d;R|=h.patchFlag&16;const I=h.props||ie,j=d.props||ie;let G;if(g&&Ct(g,!1),(G=j.onVnodeBeforeUpdate)&&qe(G,g,d,h),K&&St(d,h,g,"beforeUpdate"),g&&Ct(g,!0),(I.innerHTML&&j.innerHTML==null||I.textContent&&j.textContent==null)&&u(x,""),E?U(h.dynamicChildren,E,x,g,_,ms(d,b),y):T||ee(h,d,x,null,g,_,ms(d,b),y,!1),R>0){if(R&16)J(x,I,j,g,b);else if(R&2&&I.class!==j.class&&o(x,"class",null,j.class,b),R&4&&o(x,"style",I.style,j.style,b),R&8){const Z=d.dynamicProps;for(let oe=0;oe{G&&qe(G,g,d,h),K&&St(d,h,g,"updated")},_)},U=(h,d,g,_,b,y,T)=>{for(let x=0;x{if(d!==g){if(d!==ie)for(const y in d)!Xt(y)&&!(y in g)&&o(h,y,d[y],null,b,_);for(const y in g){if(Xt(y))continue;const T=g[y],x=d[y];T!==x&&y!=="value"&&o(h,y,x,T,b,_)}"value"in g&&o(h,"value",d.value,g.value,b)}},P=(h,d,g,_,b,y,T,x,R)=>{const E=d.el=h?h.el:l(""),K=d.anchor=h?h.anchor:l("");let{patchFlag:I,dynamicChildren:j,slotScopeIds:G}=d;G&&(x=x?x.concat(G):G),h==null?(s(E,g,_),s(K,g,_),k(d.children||[],g,K,b,y,T,x,R)):I>0&&I&64&&j&&h.dynamicChildren&&h.dynamicChildren.length===j.length?(U(h.dynamicChildren,j,g,b,y,T,x),(d.key!=null||b&&d===b.subTree)&&fr(h,d,!0)):ee(h,d,g,K,b,y,T,x,R)},Q=(h,d,g,_,b,y,T,x,R)=>{d.slotScopeIds=x,h==null?d.shapeFlag&512?b.ctx.activate(d,g,_,T,R):he(d,g,_,b,y,T,R):Se(h,d,R)},he=(h,d,g,_,b,y,T)=>{const x=h.component=ou(h,_,b);if(ts(h)&&(x.ctx.renderer=V),iu(x,!1,T),x.asyncDep){if(b&&b.registerDep(x,re,T),!h.el){const R=x.subTree=xe(Ee);M(null,R,d,g),h.placeholder=R.el}}else re(x,h,d,g,b,y,T)},Se=(h,d,g)=>{const _=d.component=h.component;if(Bc(h,d,g))if(_.asyncDep&&!_.asyncResolved){W(_,d,g);return}else _.next=d,_.update();else d.el=h.el,_.vnode=d},re=(h,d,g,_,b,y,T)=>{const x=()=>{if(h.isMounted){let{next:I,bu:j,u:G,parent:Z,vnode:oe}=h;{const $e=Vi(h);if($e){I&&(I.el=oe.el,W(h,I,T)),$e.asyncDep.then(()=>{ye(()=>{h.isUnmounted||E()},b)});return}}let le=I,de;Ct(h,!1),I?(I.el=oe.el,W(h,I,T)):I=oe,j&&xn(j),(de=I.props&&I.props.onVnodeBeforeUpdate)&&qe(de,Z,I,oe),Ct(h,!0);const me=Fr(h),Ge=h.subTree;h.subTree=me,S(Ge,me,a(Ge.el),v(Ge),h,b,y),I.el=me.el,le===null&&Hc(h,me.el),G&&ye(G,b),(de=I.props&&I.props.onVnodeUpdated)&&ye(()=>qe(de,Z,I,oe),b)}else{let I;const{el:j,props:G}=d,{bm:Z,m:oe,parent:le,root:de,type:me}=h,Ge=Ut(d);Ct(h,!1),Z&&xn(Z),!Ge&&(I=G&&G.onVnodeBeforeMount)&&qe(I,le,d),Ct(h,!0);{de.ce&&de.ce._hasShadowRoot()&&de.ce._injectChildStyle(me,h.parent?h.parent.type:void 0);const $e=h.subTree=Fr(h);S(null,$e,g,_,h,b,y),d.el=$e.el}if(oe&&ye(oe,b),!Ge&&(I=G&&G.onVnodeMounted)){const $e=d;ye(()=>qe(I,le,$e),b)}(d.shapeFlag&256||le&&Ut(le.vnode)&&le.vnode.shapeFlag&256)&&h.a&&ye(h.a,b),h.isMounted=!0,d=g=_=null}};h.scope.on();const R=h.effect=new ko(x);h.scope.off();const E=h.update=R.run.bind(R),K=h.job=R.runIfDirty.bind(R);K.i=h,K.id=h.uid,R.scheduler=()=>or(K),Ct(h,!0),E()},W=(h,d,g)=>{d.component=h;const _=h.vnode.props;h.vnode=d,h.next=null,Uc(h,d.props,_,g),Wc(h,d.children,g),ut(),wr(h),ft()},ee=(h,d,g,_,b,y,T,x,R=!1)=>{const E=h&&h.children,K=h?h.shapeFlag:0,I=d.children,{patchFlag:j,shapeFlag:G}=d;if(j>0){if(j&128){dt(E,I,g,_,b,y,T,x,R);return}else if(j&256){et(E,I,g,_,b,y,T,x,R);return}}G&8?(K&16&&Fe(E,b,y),I!==E&&u(g,I)):K&16?G&16?dt(E,I,g,_,b,y,T,x,R):Fe(E,b,y,!0):(K&8&&u(g,""),G&16&&k(I,g,_,b,y,T,x,R))},et=(h,d,g,_,b,y,T,x,R)=>{h=h||Bt,d=d||Bt;const E=h.length,K=d.length,I=Math.min(E,K);let j;for(j=0;jK?Fe(h,b,y,!0,!1,I):k(d,g,_,b,y,T,x,R,I)},dt=(h,d,g,_,b,y,T,x,R)=>{let E=0;const K=d.length;let I=h.length-1,j=K-1;for(;E<=I&&E<=j;){const G=h[E],Z=d[E]=R?ot(d[E]):Ye(d[E]);if(Tt(G,Z))S(G,Z,g,null,b,y,T,x,R);else break;E++}for(;E<=I&&E<=j;){const G=h[I],Z=d[j]=R?ot(d[j]):Ye(d[j]);if(Tt(G,Z))S(G,Z,g,null,b,y,T,x,R);else break;I--,j--}if(E>I){if(E<=j){const G=j+1,Z=Gj)for(;E<=I;)Oe(h[E],b,y,!0),E++;else{const G=E,Z=E,oe=new Map;for(E=Z;E<=j;E++){const Pe=d[E]=R?ot(d[E]):Ye(d[E]);Pe.key!=null&&oe.set(Pe.key,E)}let le,de=0;const me=j-Z+1;let Ge=!1,$e=0;const Wt=new Array(me);for(E=0;E=me){Oe(Pe,b,y,!0);continue}let We;if(Pe.key!=null)We=oe.get(Pe.key);else for(le=Z;le<=j;le++)if(Wt[le-Z]===0&&Tt(Pe,d[le])){We=le;break}We===void 0?Oe(Pe,b,y,!0):(Wt[We-Z]=E+1,We>=$e?$e=We:Ge=!0,S(Pe,d[We],g,null,b,y,T,x,R),de++)}const yr=Ge?Qc(Wt):Bt;for(le=yr.length-1,E=me-1;E>=0;E--){const Pe=Z+E,We=d[Pe],vr=d[Pe+1],br=Pe+1{const{el:y,type:T,transition:x,children:R,shapeFlag:E}=h;if(E&6){Ke(h.component.subTree,d,g,_);return}if(E&128){h.suspense.move(d,g,_);return}if(E&64){T.move(h,d,g,V);return}if(T===Ie){s(y,d,g);for(let I=0;Ix.enter(y),b);else{const{leave:I,delayLeave:j,afterLeave:G}=x,Z=()=>{h.ctx.isUnmounted?r(y):s(y,d,g)},oe=()=>{y._isLeaving&&y[Je](!0),I(y,()=>{Z(),G&&G()})};j?j(y,Z,oe):oe()}else s(y,d,g)},Oe=(h,d,g,_=!1,b=!1)=>{const{type:y,props:T,ref:x,children:R,dynamicChildren:E,shapeFlag:K,patchFlag:I,dirs:j,cacheIndex:G,memo:Z}=h;if(I===-2&&(b=!1),x!=null&&(ut(),sn(x,null,g,h,!0),ft()),G!=null&&(d.renderCache[G]=void 0),K&256){d.ctx.deactivate(h);return}const oe=K&1&&j,le=!Ut(h);let de;if(le&&(de=T&&T.onVnodeBeforeUnmount)&&qe(de,d,h),K&6)At(h.component,g,_);else{if(K&128){h.suspense.unmount(g,_);return}oe&&St(h,null,d,"beforeUnmount"),K&64?h.type.remove(h,d,g,V,_):E&&!E.hasOnce&&(y!==Ie||I>0&&I&64)?Fe(E,d,g,!1,!0):(y===Ie&&I&384||!b&&K&16)&&Fe(R,d,g),_&&Nt(h)}const me=Z!=null&&G==null;(le&&(de=T&&T.onVnodeUnmounted)||oe||me)&&ye(()=>{de&&qe(de,d,h),oe&&St(h,null,d,"unmounted"),me&&(h.el=null)},g)},Nt=h=>{const{type:d,el:g,anchor:_,transition:b}=h;if(d===Ie){Mt(g,_);return}if(d===Pn){N(h);return}const y=()=>{r(g),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(h.shapeFlag&1&&b&&!b.persisted){const{leave:T,delayLeave:x}=b,R=()=>T(g,y);x?x(h.el,y,R):R()}else y()},Mt=(h,d)=>{let g;for(;h!==d;)g=p(h),r(h),h=g;r(d)},At=(h,d,g)=>{const{bum:_,scope:b,job:y,subTree:T,um:x,m:R,a:E}=h;Br(R),Br(E),_&&xn(_),b.stop(),y&&(y.flags|=8,Oe(T,h,d,g)),x&&ye(x,d),ye(()=>{h.isUnmounted=!0},d)},Fe=(h,d,g,_=!1,b=!1,y=0)=>{for(let T=y;T{if(h.shapeFlag&6)return v(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const d=p(h.anchor||h.el),g=d&&d[fi];return g?p(g):d};let D=!1;const O=(h,d,g)=>{let _;h==null?d._vnode&&(Oe(d._vnode,null,null,!0),_=d._vnode.component):S(d._vnode||null,h,d,null,null,null,g),d._vnode=h,D||(D=!0,wr(_),ii(),D=!1)},V={p:S,um:Oe,m:Ke,r:Nt,mt:he,mc:k,pc:ee,pbc:U,n:v,o:e};return{render:O,hydrate:void 0,createApp:Mc(O)}}function ms({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Jc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fr(e,t,n=!1){const s=e.children,r=t.children;if(H(s)&&H(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Vi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Vi(t)}function Br(e){if(e)for(let t=0;te.__isSuspense;function Yc(e,t){t&&t.pendingBranch?H(e)?t.effects.push(...e):t.effects.push(e):nc(e)}const Ie=Symbol.for("v-fgt"),rs=Symbol.for("v-txt"),Ee=Symbol.for("v-cmt"),Pn=Symbol.for("v-stc"),on=[];let Me=null;function Hn(e=!1){on.push(Me=e?null:[])}function Xc(){on.pop(),Me=on[on.length-1]||null}let dn=1;function kn(e,t=!1){dn+=e,e<0&&Me&&t&&(Me.hasOnce=!0)}function Hi(e){return e.dynamicChildren=dn>0?Me||Bt:null,Xc(),dn>0&&Me&&Me.push(e),e}function ya(e,t,n,s,r,o){return Hi(Ui(e,t,n,s,r,o,!0))}function Un(e,t,n,s,r){return Hi(xe(e,t,n,s,r,!0))}function pn(e){return e?e.__v_isVNode===!0:!1}function Tt(e,t){return e.type===t.type&&e.key===t.key}const ki=({key:e})=>e??null,In=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ae(e)||fe(e)||$(e)?{i:_e,r:e,k:t,f:!!n}:e:null);function Ui(e,t=null,n=null,s=0,r=null,o=e===Ie?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ki(t),ref:t&&In(t),scopeId:ci,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:_e};return l?(ar(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ae(n)?8:16),dn>0&&!i&&Me&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Me.push(c),c}const xe=Zc;function Zc(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Cc)&&(e=Ee),pn(e)){const l=bt(e,t,!0);return n&&ar(l,n),dn>0&&!o&&Me&&(l.shapeFlag&6?Me[Me.indexOf(e)]=l:Me.push(l)),l.patchFlag=-2,l}if(au(e)&&(e=e.__vccOpts),t){t=eu(t);let{class:l,style:c}=t;l&&!ae(l)&&(t.class=Qs(l)),se(c)&&(Zn(c)&&!H(c)&&(c=ge({},c)),t.style=Js(c))}const i=ae(e)?1:Bi(e)?128:ai(e)?64:se(e)?4:$(e)?2:0;return Ui(e,t,n,s,r,i,o,!0)}function eu(e){return e?Zn(e)||Ii(e)?ge({},e):e:null}function bt(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,f=t?nu(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&ki(f),ref:t&&t.ref?n&&o?H(o)?o.concat(In(t)):[o,In(t)]:In(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ie?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&bt(e.ssContent),ssFallback:e.ssFallback&&bt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&hn(u,c.clone(u)),u}function tu(e=" ",t=0){return xe(rs,null,e,t)}function va(e,t){const n=xe(Pn,null,e);return n.staticCount=t,n}function ba(e="",t=!1){return t?(Hn(),Un(Ee,null,e)):xe(Ee,null,e)}function Ye(e){return e==null||typeof e=="boolean"?xe(Ee):H(e)?xe(Ie,null,e.slice()):pn(e)?ot(e):xe(rs,null,String(e))}function ot(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:bt(e)}function ar(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(H(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),ar(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Ii(t)?t._ctx=_e:r===3&&_e&&(_e.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $(t)?(t={default:t,_ctx:_e},n=32):(t=String(t),s&64?(n=16,t=[tu(t)]):n=8);e.children=t,e.shapeFlag|=n}function nu(...e){const t={};for(let n=0;nAe||_e;let Kn,js;{const e=Qn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};Kn=t("__VUE_INSTANCE_SETTERS__",n=>Ae=n),js=t("__VUE_SSR_SETTERS__",n=>gn=n)}const En=e=>{const t=Ae;return Kn(e),e.scope.on(),()=>{e.scope.off(),Kn(t)}},Hr=()=>{Ae&&Ae.scope.off(),Kn(null)};function Ki(e){return e.vnode.shapeFlag&4}let gn=!1;function iu(e,t=!1,n=!1){t&&js(t);const{props:s,children:r}=e.vnode,o=Ki(e);kc(e,s,o,t),$c(e,r,n||t);const i=o?lu(e,t):void 0;return t&&js(!1),i}function lu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Rc);const{setup:s}=n;if(s){ut();const r=e.setupContext=s.length>1?uu(e):null,o=En(e),i=bn(s,e,0,[e.props,r]),l=Io(i);if(ft(),o(),(l||e.sp)&&!Ut(e)&&yi(e),l){if(i.then(Hr,Hr),t)return i.then(c=>{kr(e,c)}).catch(c=>{es(c,e,0)});e.asyncDep=i}else kr(e,i)}else Gi(e)}function kr(e,t,n){$(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=si(t)),Gi(e)}function Gi(e,t,n){const s=e.type;e.render||(e.render=s.render||Ze);{const r=En(e);ut();try{xc(e)}finally{ft(),r()}}}const cu={get(e,t){return be(e,"get",""),e[t]}};function uu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,cu),slots:e.slots,emit:e.emit,expose:t}}function os(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(si(sr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in rn)return rn[n](e)},has(t,n){return n in t||n in rn}})):e.proxy}function fu(e,t=!0){return $(e)?e.displayName||e.name:e.name||t&&e.__name}function au(e){return $(e)&&"__vccOpts"in e}const Ne=(e,t)=>Yl(e,t,gn);function dr(e,t,n){try{kn(-1);const s=arguments.length;return s===2?se(t)&&!H(t)?pn(t)?xe(e,null,[t]):xe(e,t):xe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&pn(n)&&(n=[n]),xe(e,t,n))}finally{kn(1)}}const hu="3.5.31";/** -* @vue/runtime-dom v3.5.31 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Bs;const Ur=typeof window<"u"&&window.trustedTypes;if(Ur)try{Bs=Ur.createPolicy("vue",{createHTML:e=>e})}catch{}const $i=Bs?e=>Bs.createHTML(e):e=>e,du="http://www.w3.org/2000/svg",pu="http://www.w3.org/1998/Math/MathML",rt=typeof document<"u"?document:null,Kr=rt&&rt.createElement("template"),gu={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?rt.createElementNS(du,e):t==="mathml"?rt.createElementNS(pu,e):n?rt.createElement(e,{is:n}):rt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>rt.createTextNode(e),createComment:e=>rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Kr.innerHTML=$i(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Kr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pt="transition",Jt="animation",mn=Symbol("_vtc"),Wi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},mu=ge({},di,Wi),_u=e=>(e.displayName="Transition",e.props=mu,e),Ea=_u((e,{slots:t})=>dr(hc,yu(e),t)),wt=(e,t=[])=>{H(e)?e.forEach(n=>n(...t)):e&&e(...t)},Gr=e=>e?H(e)?e.some(t=>t.length>1):e.length>1:!1;function yu(e){const t={};for(const P in e)P in Wi||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:f=i,appearToClass:u=l,leaveFromClass:a=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,A=vu(r),S=A&&A[0],F=A&&A[1],{onBeforeEnter:M,onEnter:C,onEnterCancelled:L,onLeave:N,onLeaveCancelled:B,onBeforeAppear:z=M,onAppear:q=C,onAppearCancelled:k=L}=t,w=(P,Q,he,Se)=>{P._enterCancelled=Se,Rt(P,Q?u:l),Rt(P,Q?f:i),he&&he()},U=(P,Q)=>{P._isLeaving=!1,Rt(P,a),Rt(P,m),Rt(P,p),Q&&Q()},J=P=>(Q,he)=>{const Se=P?q:C,re=()=>w(Q,P,he);wt(Se,[Q,re]),$r(()=>{Rt(Q,P?c:o),nt(Q,P?u:l),Gr(Se)||Wr(Q,s,S,re)})};return ge(t,{onBeforeEnter(P){wt(M,[P]),nt(P,o),nt(P,i)},onBeforeAppear(P){wt(z,[P]),nt(P,c),nt(P,f)},onEnter:J(!1),onAppear:J(!0),onLeave(P,Q){P._isLeaving=!0;const he=()=>U(P,Q);nt(P,a),P._enterCancelled?(nt(P,p),Jr(P)):(Jr(P),nt(P,p)),$r(()=>{P._isLeaving&&(Rt(P,a),nt(P,m),Gr(N)||Wr(P,s,F,he))}),wt(N,[P,he])},onEnterCancelled(P){w(P,!1,void 0,!0),wt(L,[P])},onAppearCancelled(P){w(P,!0,void 0,!0),wt(k,[P])},onLeaveCancelled(P){U(P),wt(B,[P])}})}function vu(e){if(e==null)return null;if(se(e))return[_s(e.enter),_s(e.leave)];{const t=_s(e);return[t,t]}}function _s(e){return pl(e)}function nt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[mn]||(e[mn]=new Set)).add(t)}function Rt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[mn];n&&(n.delete(t),n.size||(e[mn]=void 0))}function $r(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let bu=0;function Wr(e,t,n,s){const r=e._endId=++bu,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:c}=Eu(e,t);if(!i)return s();const f=i+"end";let u=0;const a=()=>{e.removeEventListener(f,p),o()},p=m=>{m.target===e&&++u>=c&&a()};setTimeout(()=>{u(n[A]||"").split(", "),r=s(`${pt}Delay`),o=s(`${pt}Duration`),i=qr(r,o),l=s(`${Jt}Delay`),c=s(`${Jt}Duration`),f=qr(l,c);let u=null,a=0,p=0;t===pt?i>0&&(u=pt,a=i,p=o.length):t===Jt?f>0&&(u=Jt,a=f,p=c.length):(a=Math.max(i,f),u=a>0?i>f?pt:Jt:null,p=u?u===pt?o.length:c.length:0);const m=u===pt&&/\b(?:transform|all)(?:,|$)/.test(s(`${pt}Property`).toString());return{type:u,timeout:a,propCount:p,hasTransform:m}}function qr(e,t){for(;e.lengthzr(n)+zr(e[s])))}function zr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Jr(e){return(e?e.ownerDocument:document).body.offsetHeight}function Au(e,t,n){const s=e[mn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Qr=Symbol("_vod"),Su=Symbol("_vsh"),Cu=Symbol(""),wu=/(?:^|;)\s*display\s*:/;function Ru(e,t,n){const s=e.style,r=ae(n);let o=!1;if(n&&!r){if(t)if(ae(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Nn(s,l,"")}else for(const i in t)n[i]==null&&Nn(s,i,"");for(const i in n)i==="display"&&(o=!0),Nn(s,i,n[i])}else if(r){if(t!==n){const i=s[Cu];i&&(n+=";"+i),s.cssText=n,o=wu.test(n)}}else t&&e.removeAttribute("style");Qr in e&&(e[Qr]=o?s.display:"",e[Su]&&(s.display="none"))}const Yr=/\s*!important$/;function Nn(e,t,n){if(H(n))n.forEach(s=>Nn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=xu(e,t);Yr.test(n)?e.setProperty(Et(s),n.replace(Yr,""),"important"):e[s]=n}}const Xr=["Webkit","Moz","ms"],ys={};function xu(e,t){const n=ys[t];if(n)return n;let s=Te(t);if(s!=="filter"&&s in e)return ys[t]=s;s=Jn(s);for(let r=0;rvs||(Iu.then(()=>vs=0),vs=Date.now());function Mu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;ke(Du(s,n.value),t,5,[s])};return n.value=e,n.attached=Nu(),n}function Du(e,t){if(H(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const ro=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Lu=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Au(e,s,i):t==="style"?Ru(e,n,s):$n(t)?Wn(t)||Ou(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Fu(e,t,s,i))?(to(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&eo(e,t,s,i,o,t!=="value")):e._isVueCE&&(Vu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ae(s)))?to(e,Te(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),eo(e,t,s,i))};function Fu(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&ro(t)&&$(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ro(t)&&ae(n)?!1:t in e}function Vu(e,t){const n=e._def.props;if(!n)return!1;const s=Te(t);return Array.isArray(n)?n.some(r=>Te(r)===s):Object.keys(n).some(r=>Te(r)===s)}const oo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return H(t)?n=>xn(t,n):t};function ju(e){e.target.composing=!0}function io(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const bs=Symbol("_assign");function lo(e,t,n){return t&&(e=e.trim()),n&&(e=zs(e)),e}const Aa={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[bs]=oo(r);const o=s||r.props&&r.props.type==="number";Vt(e,t?"change":"input",i=>{i.target.composing||e[bs](lo(e.value,n,o))}),(n||o)&&Vt(e,"change",()=>{e.value=lo(e.value,n,o)}),t||(Vt(e,"compositionstart",ju),Vt(e,"compositionend",io),Vt(e,"change",io))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[bs]=oo(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?zs(e.value):e.value,c=t??"";if(l===c)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Bu=["ctrl","shift","alt","meta"],Hu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Bu.some(n=>e[`${n}Key`]&&!t.includes(n))},Sa=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...o)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const o=Et(r.key);if(t.some(i=>i===o||ku[i]===o))return e(r)})},Uu=ge({patchProp:Lu},gu);let co;function Ku(){return co||(co=qc(Uu))}const Gu=(...e)=>{const t=Ku().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Wu(s);if(!r)return;const o=t._component;!$(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,$u(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function $u(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wu(e){return ae(e)?document.querySelector(e):e}/*! - * pinia v2.3.1 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let qi;const is=e=>qi=e,zi=Symbol();function Hs(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ln;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ln||(ln={}));function qu(){const e=Bo(!0),t=e.run(()=>Dn({}));let n=[],s=[];const r=sr({install(o){is(r),r._a=o,o.provide(zi,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Ji=()=>{};function uo(e,t,n,s=Ji){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Ho()&&Sl(r),r}function Lt(e,...t){e.slice().forEach(n=>{n(...t)})}const zu=e=>e(),fo=Symbol(),Es=Symbol();function ks(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];Hs(r)&&Hs(s)&&e.hasOwnProperty(n)&&!fe(s)&&!ct(s)?e[n]=ks(r,s):e[n]=s}return e}const Ju=Symbol();function Qu(e){return!Hs(e)||!e.hasOwnProperty(Ju)}const{assign:mt}=Object;function Yu(e){return!!(fe(e)&&e.effect)}function Xu(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let c;function f(){l||(n.state.value[e]=r?r():{});const u=ql(n.state.value[e]);return mt(u,o,Object.keys(i||{}).reduce((a,p)=>(a[p]=sr(Ne(()=>{is(n);const m=n._s.get(e);return i[p].call(m,m)})),a),{}))}return c=Qi(e,f,t,n,s,!0),c}function Qi(e,t,n={},s,r,o){let i;const l=mt({actions:{}},n),c={deep:!0};let f,u,a=[],p=[],m;const A=s.state.value[e];!o&&!A&&(s.state.value[e]={});let S;function F(k){let w;f=u=!1,typeof k=="function"?(k(s.state.value[e]),w={type:ln.patchFunction,storeId:e,events:m}):(ks(s.state.value[e],k),w={type:ln.patchObject,payload:k,storeId:e,events:m});const U=S=Symbol();rr().then(()=>{S===U&&(f=!0)}),u=!0,Lt(a,w,s.state.value[e])}const M=o?function(){const{state:w}=n,U=w?w():{};this.$patch(J=>{mt(J,U)})}:Ji;function C(){i.stop(),a=[],p=[],s._s.delete(e)}const L=(k,w="")=>{if(fo in k)return k[Es]=w,k;const U=function(){is(s);const J=Array.from(arguments),P=[],Q=[];function he(W){P.push(W)}function Se(W){Q.push(W)}Lt(p,{args:J,name:U[Es],store:B,after:he,onError:Se});let re;try{re=k.apply(this&&this.$id===e?this:B,J)}catch(W){throw Lt(Q,W),W}return re instanceof Promise?re.then(W=>(Lt(P,W),W)).catch(W=>(Lt(Q,W),Promise.reject(W))):(Lt(P,re),re)};return U[fo]=!0,U[Es]=w,U},N={_p:s,$id:e,$onAction:uo.bind(null,p),$patch:F,$reset:M,$subscribe(k,w={}){const U=uo(a,k,w.detached,()=>J()),J=i.run(()=>tn(()=>s.state.value[e],P=>{(w.flush==="sync"?u:f)&&k({storeId:e,type:ln.direct,events:m},P)},mt({},c,w)));return U},$dispose:C},B=vn(N);s._s.set(e,B);const q=(s._a&&s._a.runWithContext||zu)(()=>s._e.run(()=>(i=Bo()).run(()=>t({action:L}))));for(const k in q){const w=q[k];if(fe(w)&&!Yu(w)||ct(w))o||(A&&Qu(w)&&(fe(w)?w.value=A[k]:ks(w,A[k])),s.state.value[e][k]=w);else if(typeof w=="function"){const U=L(w,k);q[k]=U,l.actions[k]=w}}return mt(B,q),mt(X(B),q),Object.defineProperty(B,"$state",{get:()=>s.state.value[e],set:k=>{F(w=>{mt(w,k)})}}),s._p.forEach(k=>{mt(B,i.run(()=>k({store:B,app:s._a,pinia:s,options:l})))}),A&&o&&n.hydrate&&n.hydrate(B.$state,A),f=!0,u=!0,B}/*! #__NO_SIDE_EFFECTS__ */function Zu(e,t,n){let s,r;const o=typeof t=="function";typeof e=="string"?(s=e,r=o?n:t):(r=e,s=e.id);function i(l,c){const f=rc();return l=l||(f?je(zi,null):null),l&&is(l),l=qi,l._s.has(s)||(o?Qi(s,t,r,l):Xu(s,r,l)),l._s.get(s)}return i.$id=s,i}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */const jt=typeof document<"u";function Yi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ef(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Yi(e.default)}const te=Object.assign;function As(e,t){const n={};for(const s in t){const r=t[s];n[s]=Ue(r)?r.map(e):e(r)}return n}const cn=()=>{},Ue=Array.isArray;function ao(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Xi=/#/g,tf=/&/g,nf=/\//g,sf=/=/g,rf=/\?/g,Zi=/\+/g,of=/%5B/g,lf=/%5D/g,el=/%5E/g,cf=/%60/g,tl=/%7B/g,uf=/%7C/g,nl=/%7D/g,ff=/%20/g;function pr(e){return e==null?"":encodeURI(""+e).replace(uf,"|").replace(of,"[").replace(lf,"]")}function af(e){return pr(e).replace(tl,"{").replace(nl,"}").replace(el,"^")}function Us(e){return pr(e).replace(Zi,"%2B").replace(ff,"+").replace(Xi,"%23").replace(tf,"%26").replace(cf,"`").replace(tl,"{").replace(nl,"}").replace(el,"^")}function hf(e){return Us(e).replace(sf,"%3D")}function df(e){return pr(e).replace(Xi,"%23").replace(rf,"%3F")}function pf(e){return df(e).replace(nf,"%2F")}function _n(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const gf=/\/$/,mf=e=>e.replace(gf,"");function Ss(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),o=t.slice(c,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=bf(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:_n(i)}}function _f(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ho(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function yf(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Gt(t.matched[s],n.matched[r])&&sl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Gt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function sl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!vf(e[n],t[n]))return!1;return!0}function vf(e,t){return Ue(e)?po(e,t):Ue(t)?po(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function po(e,t){return Ue(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function bf(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ks=function(e){return e.pop="pop",e.push="push",e}({}),Cs=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function Ef(e){if(!e)if(jt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),mf(e)}const Af=/^[^#]+#/;function Sf(e,t){return e.replace(Af,"#")+t}function Cf(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const ls=()=>({left:window.scrollX,top:window.scrollY});function wf(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Cf(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function go(e,t){return(history.state?history.state.position-t:-1)+e}const Gs=new Map;function Rf(e,t){Gs.set(e,t)}function xf(e){const t=Gs.get(e);return Gs.delete(e),t}function Tf(e){return typeof e=="string"||e&&typeof e=="object"}function rl(e){return typeof e=="string"||typeof e=="symbol"}let ue=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const ol=Symbol("");ue.MATCHER_NOT_FOUND+"",ue.NAVIGATION_GUARD_REDIRECT+"",ue.NAVIGATION_ABORTED+"",ue.NAVIGATION_CANCELLED+"",ue.NAVIGATION_DUPLICATED+"";function $t(e,t){return te(new Error,{type:e,[ol]:!0},t)}function st(e,t){return e instanceof Error&&ol in e&&(t==null||!!(e.type&t))}const Of=["params","query","hash"];function Pf(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Of)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function If(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&Us(r)):[s&&Us(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Nf(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Ue(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Mf=Symbol(""),_o=Symbol(""),cs=Symbol(""),gr=Symbol(""),$s=Symbol("");function Qt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function yt(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const f=p=>{p===!1?c($t(ue.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?c(p):Tf(p)?c($t(ue.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(i&&s.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),l())},u=o(()=>e.call(s&&s.instances[r],t,n,f));let a=Promise.resolve(u);e.length<3&&(a=a.then(f)),a.catch(p=>c(p))})}function ws(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Yi(c)){const f=(c.__vccOpts||c)[t];f&&o.push(yt(f,n,s,i,l,r))}else{let f=c();o.push(()=>f.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const a=ef(u)?u.default:u;i.mods[l]=u,i.components[l]=a;const p=(a.__vccOpts||a)[t];return p&&yt(p,n,s,i,l,r)()}))}}return o}function Df(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iGt(f,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(f=>Gt(f,c))||r.push(c))}return[n,s,r]}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let Lf=()=>location.protocol+"//"+location.host;function il(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),ho(l,"")}return ho(n,e)+s+r}function Ff(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const m=il(e,location),A=n.value,S=t.value;let F=0;if(p){if(n.value=m,t.value=p,i&&i===A){i=null;return}F=S?p.position-S.position:0}else s(m);r.forEach(M=>{M(n.value,A,{delta:F,type:Ks.pop,direction:F?F>0?Cs.forward:Cs.back:Cs.unknown})})};function c(){i=n.value}function f(p){r.push(p);const m=()=>{const A=r.indexOf(p);A>-1&&r.splice(A,1)};return o.push(m),m}function u(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(te({},p.state,{scroll:ls()}),"")}}function a(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:f,destroy:a}}function yo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?ls():null}}function Vf(e){const{history:t,location:n}=window,s={value:il(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,f,u){const a=e.indexOf("#"),p=a>-1?(n.host&&document.querySelector("base")?e:e.slice(a))+c:Lf()+e+c;try{t[u?"replaceState":"pushState"](f,"",p),r.value=f}catch(m){console.error(m),n[u?"replace":"assign"](p)}}function i(c,f){o(c,te({},t.state,yo(r.value.back,c,r.value.forward,!0),f,{position:r.value.position}),!0),s.value=c}function l(c,f){const u=te({},r.value,t.state,{forward:c,scroll:ls()});o(u.current,u,!0),o(c,te({},yo(s.value,c,null),{position:u.position+1},f),!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function jf(e){e=Ef(e);const t=Vf(e),n=Ff(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=te({location:"",base:e,go:s,createHref:Sf.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Ot=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var pe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(pe||{});const Bf={type:Ot.Static,value:""},Hf=/[a-zA-Z0-9_]/;function kf(e){if(!e)return[[]];if(e==="/")return[[Bf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${f}": ${m}`)}let n=pe.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,f="",u="";function a(){f&&(n===pe.Static?o.push({type:Ot.Static,value:f}):n===pe.Param||n===pe.ParamRegExp||n===pe.ParamRegExpEnd?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),o.push({type:Ot.Param,value:f,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),f="")}function p(){f+=c}for(;lt.length?t.length===1&&t[0]===we.Static+we.Segment?1:-1:0}function ll(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Wf={strict:!1,end:!0,sensitive:!1};function qf(e,t,n){const s=Gf(kf(e.path),n),r=te(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function zf(e,t){const n=[],s=new Map;t=ao(Wf,t);function r(a){return s.get(a)}function o(a,p,m){const A=!m,S=Ao(a);S.aliasOf=m&&m.record;const F=ao(t,a),M=[S];if("alias"in a){const N=typeof a.alias=="string"?[a.alias]:a.alias;for(const B of N)M.push(Ao(te({},S,{components:m?m.record.components:S.components,path:B,aliasOf:m?m.record:S})))}let C,L;for(const N of M){const{path:B}=N;if(p&&B[0]!=="/"){const z=p.record.path,q=z[z.length-1]==="/"?"":"/";N.path=p.record.path+(B&&q+B)}if(C=qf(N,p,F),m?m.alias.push(C):(L=L||C,L!==C&&L.alias.push(C),A&&a.name&&!So(C)&&i(a.name)),cl(C)&&c(C),S.children){const z=S.children;for(let q=0;q{i(L)}:cn}function i(a){if(rl(a)){const p=s.get(a);p&&(s.delete(a),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(a);p>-1&&(n.splice(p,1),a.record.name&&s.delete(a.record.name),a.children.forEach(i),a.alias.forEach(i))}}function l(){return n}function c(a){const p=Yf(a,n);n.splice(p,0,a),a.record.name&&!So(a)&&s.set(a.record.name,a)}function f(a,p){let m,A={},S,F;if("name"in a&&a.name){if(m=s.get(a.name),!m)throw $t(ue.MATCHER_NOT_FOUND,{location:a});F=m.record.name,A=te(Eo(p.params,m.keys.filter(L=>!L.optional).concat(m.parent?m.parent.keys.filter(L=>L.optional):[]).map(L=>L.name)),a.params&&Eo(a.params,m.keys.map(L=>L.name))),S=m.stringify(A)}else if(a.path!=null)S=a.path,m=n.find(L=>L.re.test(S)),m&&(A=m.parse(S),F=m.record.name);else{if(m=p.name?s.get(p.name):n.find(L=>L.re.test(p.path)),!m)throw $t(ue.MATCHER_NOT_FOUND,{location:a,currentLocation:p});F=m.record.name,A=te({},p.params,a.params),S=m.stringify(A)}const M=[];let C=m;for(;C;)M.unshift(C.record),C=C.parent;return{name:F,path:S,params:A,matched:M,meta:Qf(M)}}e.forEach(a=>o(a));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:f,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function Eo(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Ao(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Jf(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Jf(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function So(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qf(e){return e.reduce((t,n)=>te(t,n.meta),{})}function Yf(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;ll(e,t[o])<0?s=o:n=o+1}const r=Xf(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Xf(e){let t=e;for(;t=t.parent;)if(cl(t)&&ll(e,t)===0)return t}function cl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Co(e){const t=je(cs),n=je(gr),s=Ne(()=>{const c=vt(e.to);return t.resolve(c)}),r=Ne(()=>{const{matched:c}=s.value,{length:f}=c,u=c[f-1],a=n.matched;if(!u||!a.length)return-1;const p=a.findIndex(Gt.bind(null,u));if(p>-1)return p;const m=wo(c[f-2]);return f>1&&wo(u)===m&&a[a.length-1].path!==m?a.findIndex(Gt.bind(null,c[f-2])):p}),o=Ne(()=>r.value>-1&&sa(n.params,s.value.params)),i=Ne(()=>r.value>-1&&r.value===n.matched.length-1&&sl(n.params,s.value.params));function l(c={}){if(na(c)){const f=t[vt(e.replace)?"replace":"push"](vt(e.to)).catch(cn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:s,href:Ne(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function Zf(e){return e.length===1?e[0]:e}const ea=lr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Co,setup(e,{slots:t}){const n=vn(Co(e)),{options:s}=je(cs),r=Ne(()=>({[Ro(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Ro(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Zf(t.default(n));return e.custom?o:dr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),ta=ea;function na(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function sa(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Ue(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function wo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ro=(e,t,n)=>e??t??n,ra=lr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=je($s),r=Ne(()=>e.route||s.value),o=je(_o,0),i=Ne(()=>{let f=vt(o);const{matched:u}=r.value;let a;for(;(a=u[f])&&!a.components;)f++;return f}),l=Ne(()=>r.value.matched[i.value]);Tn(_o,Ne(()=>i.value+1)),Tn(Mf,l),Tn($s,r);const c=Dn();return tn(()=>[c.value,l.value,e.name],([f,u,a],[p,m,A])=>{u&&(u.instances[a]=f,m&&m!==u&&f&&f===p&&(u.leaveGuards.size||(u.leaveGuards=m.leaveGuards),u.updateGuards.size||(u.updateGuards=m.updateGuards))),f&&u&&(!m||!Gt(u,m)||!p)&&(u.enterCallbacks[a]||[]).forEach(S=>S(f))},{flush:"post"}),()=>{const f=r.value,u=e.name,a=l.value,p=a&&a.components[u];if(!p)return xo(n.default,{Component:p,route:f});const m=a.props[u],A=m?m===!0?f.params:typeof m=="function"?m(f):m:null,F=dr(p,te({},A,t,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(a.instances[u]=null)},ref:c}));return xo(n.default,{Component:F,route:f})||F}}});function xo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const ul=ra;function oa(e){const t=zf(e.routes,e),n=e.parseQuery||If,s=e.stringifyQuery||mo,r=e.history,o=Qt(),i=Qt(),l=Qt(),c=Kl(gt);let f=gt;jt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=As.bind(null,v=>""+v),a=As.bind(null,pf),p=As.bind(null,_n);function m(v,D){let O,V;return rl(v)?(O=t.getRecordMatcher(v),V=D):V=v,t.addRoute(V,O)}function A(v){const D=t.getRecordMatcher(v);D&&t.removeRoute(D)}function S(){return t.getRoutes().map(v=>v.record)}function F(v){return!!t.getRecordMatcher(v)}function M(v,D){if(D=te({},D||c.value),typeof v=="string"){const g=Ss(n,v,D.path),_=t.resolve({path:g.path},D),b=r.createHref(g.fullPath);return te(g,_,{params:p(_.params),hash:_n(g.hash),redirectedFrom:void 0,href:b})}let O;if(v.path!=null)O=te({},v,{path:Ss(n,v.path,D.path).path});else{const g=te({},v.params);for(const _ in g)g[_]==null&&delete g[_];O=te({},v,{params:a(g)}),D.params=a(D.params)}const V=t.resolve(O,D),Y=v.hash||"";V.params=u(p(V.params));const h=_f(s,te({},v,{hash:af(Y),path:V.path})),d=r.createHref(h);return te({fullPath:h,hash:Y,query:s===mo?Nf(v.query):v.query||{}},V,{redirectedFrom:void 0,href:d})}function C(v){return typeof v=="string"?Ss(n,v,c.value.path):te({},v)}function L(v,D){if(f!==v)return $t(ue.NAVIGATION_CANCELLED,{from:D,to:v})}function N(v){return q(v)}function B(v){return N(te(C(v),{replace:!0}))}function z(v,D){const O=v.matched[v.matched.length-1];if(O&&O.redirect){const{redirect:V}=O;let Y=typeof V=="function"?V(v,D):V;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=C(Y):{path:Y},Y.params={}),te({query:v.query,hash:v.hash,params:Y.path!=null?{}:v.params},Y)}}function q(v,D){const O=f=M(v),V=c.value,Y=v.state,h=v.force,d=v.replace===!0,g=z(O,V);if(g)return q(te(C(g),{state:typeof g=="object"?te({},Y,g.state):Y,force:h,replace:d}),D||O);const _=O;_.redirectedFrom=D;let b;return!h&&yf(s,V,O)&&(b=$t(ue.NAVIGATION_DUPLICATED,{to:_,from:V}),Ke(V,V,!0,!1)),(b?Promise.resolve(b):U(_,V)).catch(y=>st(y)?st(y,ue.NAVIGATION_GUARD_REDIRECT)?y:dt(y):ee(y,_,V)).then(y=>{if(y){if(st(y,ue.NAVIGATION_GUARD_REDIRECT))return q(te({replace:d},C(y.to),{state:typeof y.to=="object"?te({},Y,y.to.state):Y,force:h}),D||_)}else y=P(_,V,!0,d,Y);return J(_,V,y),y})}function k(v,D){const O=L(v,D);return O?Promise.reject(O):Promise.resolve()}function w(v){const D=Mt.values().next().value;return D&&typeof D.runWithContext=="function"?D.runWithContext(v):v()}function U(v,D){let O;const[V,Y,h]=Df(v,D);O=ws(V.reverse(),"beforeRouteLeave",v,D);for(const g of V)g.leaveGuards.forEach(_=>{O.push(yt(_,v,D))});const d=k.bind(null,v,D);return O.push(d),Fe(O).then(()=>{O=[];for(const g of o.list())O.push(yt(g,v,D));return O.push(d),Fe(O)}).then(()=>{O=ws(Y,"beforeRouteUpdate",v,D);for(const g of Y)g.updateGuards.forEach(_=>{O.push(yt(_,v,D))});return O.push(d),Fe(O)}).then(()=>{O=[];for(const g of h)if(g.beforeEnter)if(Ue(g.beforeEnter))for(const _ of g.beforeEnter)O.push(yt(_,v,D));else O.push(yt(g.beforeEnter,v,D));return O.push(d),Fe(O)}).then(()=>(v.matched.forEach(g=>g.enterCallbacks={}),O=ws(h,"beforeRouteEnter",v,D,w),O.push(d),Fe(O))).then(()=>{O=[];for(const g of i.list())O.push(yt(g,v,D));return O.push(d),Fe(O)}).catch(g=>st(g,ue.NAVIGATION_CANCELLED)?g:Promise.reject(g))}function J(v,D,O){l.list().forEach(V=>w(()=>V(v,D,O)))}function P(v,D,O,V,Y){const h=L(v,D);if(h)return h;const d=D===gt,g=jt?history.state:{};O&&(V||d?r.replace(v.fullPath,te({scroll:d&&g&&g.scroll},Y)):r.push(v.fullPath,Y)),c.value=v,Ke(v,D,O,d),dt()}let Q;function he(){Q||(Q=r.listen((v,D,O)=>{if(!At.listening)return;const V=M(v),Y=z(V,At.currentRoute.value);if(Y){q(te(Y,{replace:!0,force:!0}),V).catch(cn);return}f=V;const h=c.value;jt&&Rf(go(h.fullPath,O.delta),ls()),U(V,h).catch(d=>st(d,ue.NAVIGATION_ABORTED|ue.NAVIGATION_CANCELLED)?d:st(d,ue.NAVIGATION_GUARD_REDIRECT)?(q(te(C(d.to),{force:!0}),V).then(g=>{st(g,ue.NAVIGATION_ABORTED|ue.NAVIGATION_DUPLICATED)&&!O.delta&&O.type===Ks.pop&&r.go(-1,!1)}).catch(cn),Promise.reject()):(O.delta&&r.go(-O.delta,!1),ee(d,V,h))).then(d=>{d=d||P(V,h,!1),d&&(O.delta&&!st(d,ue.NAVIGATION_CANCELLED)?r.go(-O.delta,!1):O.type===Ks.pop&&st(d,ue.NAVIGATION_ABORTED|ue.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),J(V,h,d)}).catch(cn)}))}let Se=Qt(),re=Qt(),W;function ee(v,D,O){dt(v);const V=re.list();return V.length?V.forEach(Y=>Y(v,D,O)):console.error(v),Promise.reject(v)}function et(){return W&&c.value!==gt?Promise.resolve():new Promise((v,D)=>{Se.add([v,D])})}function dt(v){return W||(W=!v,he(),Se.list().forEach(([D,O])=>v?O(v):D()),Se.reset()),v}function Ke(v,D,O,V){const{scrollBehavior:Y}=e;if(!jt||!Y)return Promise.resolve();const h=!O&&xf(go(v.fullPath,0))||(V||!O)&&history.state&&history.state.scroll||null;return rr().then(()=>Y(v,D,h)).then(d=>d&&wf(d)).catch(d=>ee(d,v,D))}const Oe=v=>r.go(v);let Nt;const Mt=new Set,At={currentRoute:c,listening:!0,addRoute:m,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:F,getRoutes:S,resolve:M,options:e,push:N,replace:B,go:Oe,back:()=>Oe(-1),forward:()=>Oe(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:re.add,isReady:et,install(v){v.component("RouterLink",ta),v.component("RouterView",ul),v.config.globalProperties.$router=At,Object.defineProperty(v.config.globalProperties,"$route",{enumerable:!0,get:()=>vt(c)}),jt&&!Nt&&c.value===gt&&(Nt=!0,N(r.location).catch(V=>{}));const D={};for(const V in gt)Object.defineProperty(D,V,{get:()=>c.value[V],enumerable:!0});v.provide(cs,At),v.provide(gr,ti(D)),v.provide($s,c);const O=v.unmount;Mt.add(v),v.unmount=function(){Mt.delete(v),Mt.size<1&&(f=gt,Q&&Q(),Q=null,c.value=gt,Nt=!1,W=!1),O()}}};function Fe(v){return v.reduce((D,O)=>D.then(()=>w(O)),Promise.resolve())}return At}function wa(){return je(cs)}function Ra(e){return je(gr)}const ia=lr({__name:"App",setup(e){return(t,n)=>(Hn(),Un(vt(ul)))}}),la="modulepreload",ca=function(e){return"/"+e},To={},Rn=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=ca(c),c in To)return;To[c]=!0;const f=c.endsWith(".css"),u=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const a=document.createElement("link");if(a.rel=f?"stylesheet":la,f||(a.as="script"),a.crossOrigin="",a.href=c,l&&a.setAttribute("nonce",l),document.head.appendChild(a),f)return new Promise((p,m)=>{a.addEventListener("load",p),a.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Rs="http://localhost:8000/api/v1";function ua(){try{const t=Gn().token;return t?t.value??t:null}catch{return null}}function fa(){async function e(){try{const n=await fetch(`${Rs}/auth/refresh`,{method:"POST",credentials:"include"});if(n.ok){const s=await n.json(),r=Gn();return r.token=s.access_token,localStorage.setItem("access_token",s.access_token),s.access_token}}catch{}return null}async function t(n,s,r,o=0){const i={"Content-Type":"application/json"},l=ua();console.log(`[useApi] ${n} ${s} - token: ${l?"present":"null"}`),l&&!s.includes("/auth/")?(i.Authorization=`Bearer ${l}`,console.log(`[useApi] Added Authorization header: Bearer ${l.substring(0,10)}...`)):console.log(`[useApi] NO Authorization header - token=${l}, isAuthEndpoint=${s.includes("/auth/")}`);const c=await fetch(`${Rs}${s}`,{method:n,headers:i,body:r?JSON.stringify(r):void 0,credentials:"include"});if(c.status===401){if(o===0&&!s.includes("/auth/")){const u=await e();if(u){i.Authorization=`Bearer ${u}`;const a=await fetch(`${Rs}${s}`,{method:n,headers:i,credentials:"include",body:r?JSON.stringify(r):void 0});if(a.ok)return a.status===204?{}:a.json()}}throw Gn().logout(),mr.push("/login"),new Error("Unauthorized")}if(!c.ok){const f=await c.json().catch(()=>({detail:"Request failed"}));throw new Error(f.detail||`HTTP ${c.status}`)}return c.status===204?{}:c.json()}return{get:n=>t("GET",n),post:(n,s)=>t("POST",n,s),put:(n,s)=>t("PUT",n,s),delete:n=>t("DELETE",n)}}const Gn=Zu("auth",()=>{const e=Dn(localStorage.getItem("access_token")),t=Dn(null),n=fa(),s=Ne(()=>!!e.value);async function r(c,f){const u=await n.post("/auth/login",{username:c,password:f});return e.value=u.access_token,localStorage.setItem("access_token",u.access_token),await i(),u}async function o(c,f){return await n.post("/auth/register",{username:c,password:f})}async function i(){if(!e.value)return null;try{return t.value=await n.get("/auth/me"),t.value}catch{return l(),null}}async function l(){try{await n.post("/auth/logout")}catch{}e.value=null,t.value=null,localStorage.removeItem("access_token")}return e.value&&i(),{token:e,user:t,isAuthenticated:s,login:r,register:o,fetchUser:i,logout:l}}),mr=oa({history:jf(),routes:[{path:"/login",name:"login",component:()=>Rn(()=>import("./Login-BlKP8Srx.js"),__vite__mapDeps([0,1,2,3])),meta:{requiresAuth:!1}},{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"dashboard",component:()=>Rn(()=>import("./Dashboard-BkdRGXZA.js"),__vite__mapDeps([4,5,1,2,6,7,8])),meta:{requiresAuth:!0}},{path:"/projects/:id",name:"project",component:()=>Rn(()=>import("./ProjectView-B4XGSAV_.js"),__vite__mapDeps([9,5,10,1,2,11,6,7,12])),meta:{requiresAuth:!0}},{path:"/documents/:id",name:"document",component:()=>Rn(()=>import("./DocumentView-C0vMZPv-.js"),__vite__mapDeps([13,10,1,2,11,6,7,14])),meta:{requiresAuth:!0}},{path:"/:pathMatch(.*)*",redirect:"/dashboard"}]});mr.beforeEach((e,t,n)=>{const s=Gn();e.meta.requiresAuth&&!s.isAuthenticated?n("/login"):e.name==="login"&&s.isAuthenticated?n("/dashboard"):n()});const _r=Gu(ia);_r.use(qu());_r.use(mr);_r.mount("#app");export{Ei as A,dr as B,da as C,sr as D,Kl as E,Ie as F,aa as G,rr as H,hr as I,va as J,Js as K,Ca as L,Ai as M,pa as N,_a as O,Ea as T,Ui as a,ba as b,ya as c,lr as d,ha as e,xe as f,sc as g,tu as h,Ne as i,wa as j,bi as k,vt as l,ma as m,tn as n,Hn as o,ga as p,Qs as q,Dn as r,Un as s,Al as t,Gn as u,Aa as v,Sa as w,Ra as x,Zu as y,fa as z}; diff --git a/dist/assets/index-D2fAAQJ2.js b/dist/assets/index-Bwmlaq-e.js similarity index 88% rename from dist/assets/index-D2fAAQJ2.js rename to dist/assets/index-Bwmlaq-e.js index 644afc7..2b190f4 100644 --- a/dist/assets/index-D2fAAQJ2.js +++ b/dist/assets/index-Bwmlaq-e.js @@ -1,30 +1,30 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-Cogrj-Ia.js","assets/Button-D-QrZfPJ.js","assets/Button-BnjR7XOq.css","assets/Login-B_rHAN5Z.css","assets/Dashboard-CHRmhfNp.js","assets/projects-CWhQXAJL.js","assets/Modal-C7dh6Uqe.js","assets/Modal-DqLHG8CN.css","assets/Dashboard-bZb0kvk2.css","assets/ProjectView-CxuyvBGN.js","assets/Header-BawqVjtJ.js","assets/Header-CUyR1Ji-.css","assets/ProjectView-DvvnFh_a.css","assets/DocumentView-BMqbfrMR.js","assets/DocumentView-ns_hp9-s.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-DD_XU6SA.js","assets/Button-BCQM6xXJ.js","assets/Button-BnjR7XOq.css","assets/Login-B_rHAN5Z.css","assets/Dashboard-DhaHJ2Mj.js","assets/projects-DaKKWK6n.js","assets/Modal-DyPCz1pc.js","assets/Modal-DqLHG8CN.css","assets/Dashboard-bZb0kvk2.css","assets/ProjectView-DGH2EBfC.js","assets/Header-D3hVVxoP.js","assets/Header-CUyR1Ji-.css","assets/ProjectView-BQNBBYOe.css","assets/DocumentView-DZfZNu6O.js","assets/DocumentView-ns_hp9-s.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/** * @vue/shared v3.5.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Ys(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ie={},kt=[],Ze=()=>{},Lo=()=>!1,zn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Jn=e=>e.startsWith("onUpdate:"),ge=Object.assign,Xs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},_l=Object.prototype.hasOwnProperty,ne=(e,t)=>_l.call(e,t),k=Array.isArray,Ht=e=>En(e)==="[object Map]",Fo=e=>En(e)==="[object Set]",Rr=e=>En(e)==="[object Date]",$=e=>typeof e=="function",fe=e=>typeof e=="string",Le=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",Vo=e=>(se(e)||$(e))&&$(e.then)&&$(e.catch),jo=Object.prototype.toString,En=e=>jo.call(e),yl=e=>En(e).slice(8,-1),Bo=e=>En(e)==="[object Object]",Qn=e=>fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,en=Ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Yn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},vl=/-\w/g,Te=Yn(e=>e.replace(vl,t=>t.slice(1).toUpperCase())),bl=/\B([A-Z])/g,At=Yn(e=>e.replace(bl,"-$1").toLowerCase()),Xn=Yn(e=>e.charAt(0).toUpperCase()+e.slice(1)),ds=Yn(e=>e?`on${Xn(e)}`:""),Xe=(e,t)=>!Object.is(e,t),Pn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Zs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},El=e=>{const t=fe(e)?Number(e):NaN;return isNaN(t)?e:t};let xr;const Zn=()=>xr||(xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function er(e){if(k(e)){const t={};for(let n=0;n{if(n){const s=n.split(Sl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function tr(e){let t="";if(fe(e))t=e;else if(k(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Ol=e=>fe(e)?e:e==null?"":k(e)||se(e)&&(e.toString===jo||!$(e.toString))?Uo(e)?Ol(e.value):JSON.stringify(e,Ko,2):String(e),Ko=(e,t)=>Uo(t)?Ko(e,t.value):Ht(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[ps(s,o)+" =>"]=r,n),{})}:Fo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ps(n))}:Le(t)?ps(t):se(t)&&!k(t)&&!Bo(t)?String(t):t,ps=(e,t="")=>{var n;return Le(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**/function Ys(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ie={},Ht=[],Ze=()=>{},Lo=()=>!1,zn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Jn=e=>e.startsWith("onUpdate:"),ge=Object.assign,Xs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},_l=Object.prototype.hasOwnProperty,ne=(e,t)=>_l.call(e,t),H=Array.isArray,kt=e=>En(e)==="[object Map]",Fo=e=>En(e)==="[object Set]",Rr=e=>En(e)==="[object Date]",$=e=>typeof e=="function",fe=e=>typeof e=="string",Le=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",Vo=e=>(se(e)||$(e))&&$(e.then)&&$(e.catch),jo=Object.prototype.toString,En=e=>jo.call(e),yl=e=>En(e).slice(8,-1),Bo=e=>En(e)==="[object Object]",Qn=e=>fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,en=Ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Yn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},vl=/-\w/g,Te=Yn(e=>e.replace(vl,t=>t.slice(1).toUpperCase())),bl=/\B([A-Z])/g,At=Yn(e=>e.replace(bl,"-$1").toLowerCase()),Xn=Yn(e=>e.charAt(0).toUpperCase()+e.slice(1)),ds=Yn(e=>e?`on${Xn(e)}`:""),Xe=(e,t)=>!Object.is(e,t),Pn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Zs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},El=e=>{const t=fe(e)?Number(e):NaN;return isNaN(t)?e:t};let xr;const Zn=()=>xr||(xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function er(e){if(H(e)){const t={};for(let n=0;n{if(n){const s=n.split(Sl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function tr(e){let t="";if(fe(e))t=e;else if(H(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Ol=e=>fe(e)?e:e==null?"":H(e)||se(e)&&(e.toString===jo||!$(e.toString))?Uo(e)?Ol(e.value):JSON.stringify(e,Ko,2):String(e),Ko=(e,t)=>Uo(t)?Ko(e,t.value):kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[ps(s,o)+" =>"]=r,n),{})}:Fo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ps(n))}:Le(t)?ps(t):se(t)&&!H(t)&&!Bo(t)?String(t):t,ps=(e,t="")=>{var n;return Le(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let ve;class Go{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=ve,!t&&ve&&(this.index=(ve.scopes||(ve.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(ve=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(nn){let t=nn;for(nn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;tn;){let t=tn;for(tn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Qo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Yo(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),or(s),Il(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Is(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Xo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Xo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===fn)||(e.globalVersion=fn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Is(e))))return;e.flags|=2;const t=e.dep,n=ce,s=Be;ce=e,Be=!0;try{Qo(e);const r=e.fn(e._value);(t.version===0||Xe(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ce=n,Be=s,Yo(e),e.flags&=-3}}function or(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)or(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Il(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Be=!0;const Zo=[];function ut(){Zo.push(Be),Be=!1}function at(){const e=Zo.pop();Be=e===void 0?!0:e}function Tr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ce;ce=void 0;try{t()}finally{ce=n}}}let fn=0;class Nl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class es{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ce||!Be||ce===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ce)n=this.activeLink=new Nl(ce,this),ce.deps?(n.prevDep=ce.depsTail,ce.depsTail.nextDep=n,ce.depsTail=n):ce.deps=ce.depsTail=n,ei(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ce.depsTail,n.nextDep=void 0,ce.depsTail.nextDep=n,ce.depsTail=n,ce.deps===n&&(ce.deps=s)}return n}trigger(t){this.version++,fn++,this.notify(t)}notify(t){sr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{rr()}}}function ei(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ei(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Fn=new WeakMap,It=Symbol(""),Ns=Symbol(""),hn=Symbol("");function be(e,t,n){if(Be&&ce){let s=Fn.get(e);s||Fn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new es),r.map=s,r.key=n),r.track()}}function it(e,t,n,s,r,o){const i=Fn.get(e);if(!i){fn++;return}const l=c=>{c&&c.trigger()};if(sr(),t==="clear")i.forEach(l);else{const c=k(e),a=c&&Qn(n);if(c&&n==="length"){const u=Number(s);i.forEach((f,p)=>{(p==="length"||p===hn||!Le(p)&&p>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),a&&l(i.get(hn)),t){case"add":c?a&&l(i.get("length")):(l(i.get(It)),Ht(e)&&l(i.get(Ns)));break;case"delete":c||(l(i.get(It)),Ht(e)&&l(i.get(Ns)));break;case"set":Ht(e)&&l(i.get(It));break}}rr()}function Ml(e,t){const n=Fn.get(e);return n&&n.get(t)}function Lt(e){const t=X(e);return t===e?t:(be(t,"iterate",hn),De(e)?t:t.map(ke))}function ts(e){return be(e=X(e),"iterate",hn),e}function Qe(e,t){return ft(e)?Gt(ct(e)?ke(t):t):ke(t)}const Dl={__proto__:null,[Symbol.iterator](){return ms(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Lt(this).concat(...e.map(t=>k(t)?Lt(t):t))},entries(){return ms(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return tt(this,"every",e,t,void 0,arguments)},filter(e,t){return tt(this,"filter",e,t,n=>n.map(s=>Qe(this,s)),arguments)},find(e,t){return tt(this,"find",e,t,n=>Qe(this,n),arguments)},findIndex(e,t){return tt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return tt(this,"findLast",e,t,n=>Qe(this,n),arguments)},findLastIndex(e,t){return tt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return tt(this,"forEach",e,t,void 0,arguments)},includes(...e){return _s(this,"includes",e)},indexOf(...e){return _s(this,"indexOf",e)},join(e){return Lt(this).join(e)},lastIndexOf(...e){return _s(this,"lastIndexOf",e)},map(e,t){return tt(this,"map",e,t,void 0,arguments)},pop(){return Jt(this,"pop")},push(...e){return Jt(this,"push",e)},reduce(e,...t){return Or(this,"reduce",e,t)},reduceRight(e,...t){return Or(this,"reduceRight",e,t)},shift(){return Jt(this,"shift")},some(e,t){return tt(this,"some",e,t,void 0,arguments)},splice(...e){return Jt(this,"splice",e)},toReversed(){return Lt(this).toReversed()},toSorted(e){return Lt(this).toSorted(e)},toSpliced(...e){return Lt(this).toSpliced(...e)},unshift(...e){return Jt(this,"unshift",e)},values(){return ms(this,"values",e=>Qe(this,e))}};function ms(e,t,n){const s=ts(e),r=s[t]();return s!==e&&!De(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Ll=Array.prototype;function tt(e,t,n,s,r,o){const i=ts(e),l=i!==e&&!De(e),c=i[t];if(c!==Ll[t]){const f=c.apply(e,o);return l?ke(f):f}let a=n;i!==e&&(l?a=function(f,p){return n.call(this,Qe(e,f),p,e)}:n.length>2&&(a=function(f,p){return n.call(this,f,p,e)}));const u=c.call(i,a,s);return l&&r?r(u):u}function Or(e,t,n,s){const r=ts(e),o=r!==e&&!De(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(a,u,f){return l&&(l=!1,a=Qe(e,a)),n.call(this,a,Qe(e,u),f,e)}):n.length>3&&(i=function(a,u,f){return n.call(this,a,u,f,e)}));const c=r[t](i,...s);return l?Qe(e,c):c}function _s(e,t,n){const s=X(e);be(s,"iterate",hn);const r=s[t](...n);return(r===-1||r===!1)&&ns(n[0])?(n[0]=X(n[0]),s[t](...n)):r}function Jt(e,t,n=[]){ut(),sr();const s=X(e)[t].apply(e,n);return rr(),at(),s}const Fl=Ys("__proto__,__v_isRef,__isVue"),ti=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Le));function Vl(e){Le(e)||(e=String(e));const t=X(this);return be(t,"has",e),t.hasOwnProperty(e)}class ni{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?ql:ii:o?oi:ri).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=k(t);if(!r){let c;if(i&&(c=Dl[n]))return c;if(n==="hasOwnProperty")return Vl}const l=Reflect.get(t,n,ae(t)?t:s);if((Le(n)?ti.has(n):Fl(n))||(r||be(t,"get",n),o))return l;if(ae(l)){const c=i&&Qn(n)?l:l.value;return r&&se(c)?Ds(c):c}return se(l)?r?Ds(l):An(l):l}}class si extends ni{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=k(t)&&Qn(n);if(!this._isShallow){const a=ft(o);if(!De(s)&&!ft(s)&&(o=X(o),s=X(s)),!i&&ae(o)&&!ae(s))return a||(o.value=s),!0}const l=i?Number(n)e,wn=e=>Reflect.getPrototypeOf(e);function Ul(e,t,n){return function(...s){const r=this.__v_raw,o=X(r),i=Ht(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,a=r[e](...s),u=n?Ms:t?Gt:ke;return!t&&be(o,"iterate",c?Ns:It),ge(Object.create(a),{next(){const{value:f,done:p}=a.next();return p?{value:f,done:p}:{value:l?[u(f[0]),u(f[1])]:u(f),done:p}}})}}function Rn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Kl(e,t){const n={get(r){const o=this.__v_raw,i=X(o),l=X(r);e||(Xe(r,l)&&be(i,"get",r),be(i,"get",l));const{has:c}=wn(i),a=t?Ms:e?Gt:ke;if(c.call(i,r))return a(o.get(r));if(c.call(i,l))return a(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&be(X(r),"iterate",It),r.size},has(r){const o=this.__v_raw,i=X(o),l=X(r);return e||(Xe(r,l)&&be(i,"has",r),be(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,c=X(l),a=t?Ms:e?Gt:ke;return!e&&be(c,"iterate",It),l.forEach((u,f)=>r.call(o,a(u),a(f),i))}};return ge(n,e?{add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear")}:{add(r){const o=X(this),i=wn(o),l=X(r),c=!t&&!De(r)&&!ft(r)?l:r;return i.has.call(o,c)||Xe(r,c)&&i.has.call(o,r)||Xe(l,c)&&i.has.call(o,l)||(o.add(c),it(o,"add",c,c)),this},set(r,o){!t&&!De(o)&&!ft(o)&&(o=X(o));const i=X(this),{has:l,get:c}=wn(i);let a=l.call(i,r);a||(r=X(r),a=l.call(i,r));const u=c.call(i,r);return i.set(r,o),a?Xe(o,u)&&it(i,"set",r,o):it(i,"add",r,o),this},delete(r){const o=X(this),{has:i,get:l}=wn(o);let c=i.call(o,r);c||(r=X(r),c=i.call(o,r)),l&&l.call(o,r);const a=o.delete(r);return c&&it(o,"delete",r,void 0),a},clear(){const r=X(this),o=r.size!==0,i=r.clear();return o&&it(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Ul(r,e,t)}),n}function ir(e,t){const n=Kl(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(ne(n,r)&&r in s?n:s,r,o)}const Gl={get:ir(!1,!1)},$l={get:ir(!1,!0)},Wl={get:ir(!0,!1)};const ri=new WeakMap,oi=new WeakMap,ii=new WeakMap,ql=new WeakMap;function zl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jl(e){return e.__v_skip||!Object.isExtensible(e)?0:zl(yl(e))}function An(e){return ft(e)?e:lr(e,!1,Bl,Gl,ri)}function li(e){return lr(e,!1,Hl,$l,oi)}function Ds(e){return lr(e,!0,kl,Wl,ii)}function lr(e,t,n,s,r){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Jl(e);if(o===0)return e;const i=r.get(e);if(i)return i;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ct(e){return ft(e)?ct(e.__v_raw):!!(e&&e.__v_isReactive)}function ft(e){return!!(e&&e.__v_isReadonly)}function De(e){return!!(e&&e.__v_isShallow)}function ns(e){return e?!!e.__v_raw:!1}function X(e){const t=e&&e.__v_raw;return t?X(t):e}function cr(e){return!ne(e,"__v_skip")&&Object.isExtensible(e)&&ko(e,"__v_skip",!0),e}const ke=e=>se(e)?An(e):e,Gt=e=>se(e)?Ds(e):e;function ae(e){return e?e.__v_isRef===!0:!1}function $t(e){return ci(e,!1)}function Ql(e){return ci(e,!0)}function ci(e,t){return ae(e)?e:new Yl(e,t)}class Yl{constructor(t,n){this.dep=new es,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:X(t),this._value=n?t:ke(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||De(t)||ft(t);t=s?t:X(t),Xe(t,n)&&(this._rawValue=t,this._value=s?t:ke(t),this.dep.trigger())}}function bt(e){return ae(e)?e.value:e}const Xl={get:(e,t,n)=>t==="__v_raw"?e:bt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ae(r)&&!ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function ui(e){return ct(e)?e:new Proxy(e,Xl)}class Zl{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new es,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Af(e){return new Zl(e)}function ec(e){const t=k(e)?new Array(e.length):{};for(const n in e)t[n]=nc(e,n);return t}class tc{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=Le(n)?n:String(n),this._raw=X(t);let r=!0,o=t;if(!k(t)||Le(this._key)||!Qn(this._key))do r=!ns(o)||De(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=bt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ae(this._raw[this._key])){const n=this._object[this._key];if(ae(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Ml(this._raw,this._key)}}function nc(e,t,n){return new tc(e,t,n)}class sc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new es(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=fn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ce!==this)return Jo(this,!0),!0}get value(){const t=this.dep.track();return Xo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function rc(e,t,n=!1){let s,r;return $(e)?s=e:(s=e.get,r=e.set),new sc(s,r,n)}const xn={},Vn=new WeakMap;let Tt;function oc(e,t=!1,n=Tt){if(n){let s=Vn.get(n);s||Vn.set(n,s=[]),s.push(e)}}function ic(e,t,n=ie){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:c}=n,a=N=>r?N:De(N)||r===!1||r===0?lt(N,1):lt(N);let u,f,p,m,A=!1,S=!1;if(ae(e)?(f=()=>e.value,A=De(e)):ct(e)?(f=()=>a(e),A=!0):k(e)?(S=!0,A=e.some(N=>ct(N)||De(N)),f=()=>e.map(N=>{if(ae(N))return N.value;if(ct(N))return a(N);if($(N))return c?c(N,2):N()})):$(e)?t?f=c?()=>c(e,2):e:f=()=>{if(p){ut();try{p()}finally{at()}}const N=Tt;Tt=u;try{return c?c(e,3,[m]):e(m)}finally{Tt=N}}:f=Ze,t&&r){const N=f,B=r===!0?1/0:r;f=()=>lt(N(),B)}const F=Wo(),M=()=>{u.stop(),F&&F.active&&Xs(F.effects,u)};if(o&&t){const N=t;t=(...B)=>{N(...B),M()}}let C=S?new Array(e.length).fill(xn):xn;const L=N=>{if(!(!(u.flags&1)||!u.dirty&&!N))if(t){const B=u.run();if(r||A||(S?B.some((z,q)=>Xe(z,C[q])):Xe(B,C))){p&&p();const z=Tt;Tt=u;try{const q=[B,C===xn?void 0:S&&C[0]===xn?[]:C,m];C=B,c?c(t,3,q):t(...q)}finally{Tt=z}}}else u.run()};return l&&l(L),u=new qo(f),u.scheduler=i?()=>i(L,!1):L,m=N=>oc(N,!1,u),p=u.onStop=()=>{const N=Vn.get(u);if(N){if(c)c(N,4);else for(const B of N)B();Vn.delete(u)}},t?s?L(!0):C=u.run():i?i(L.bind(null,!0),!0):u.run(),M.pause=u.pause.bind(u),M.resume=u.resume.bind(u),M.stop=M,M}function lt(e,t=1/0,n){if(t<=0||!se(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ae(e))lt(e.value,t,n);else if(k(e))for(let s=0;s{lt(s,t,n)});else if(Bo(e)){for(const s in e)lt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&<(e[s],t,n)}return e}/** +**/let ve;class Go{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=ve,!t&&ve&&(this.index=(ve.scopes||(ve.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(ve=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(nn){let t=nn;for(nn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;tn;){let t=tn;for(tn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Qo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Yo(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),or(s),Il(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Is(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Xo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Xo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===fn)||(e.globalVersion=fn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Is(e))))return;e.flags|=2;const t=e.dep,n=ce,s=Be;ce=e,Be=!0;try{Qo(e);const r=e.fn(e._value);(t.version===0||Xe(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ce=n,Be=s,Yo(e),e.flags&=-3}}function or(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)or(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Il(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Be=!0;const Zo=[];function ut(){Zo.push(Be),Be=!1}function at(){const e=Zo.pop();Be=e===void 0?!0:e}function Tr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ce;ce=void 0;try{t()}finally{ce=n}}}let fn=0;class Nl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class es{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ce||!Be||ce===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ce)n=this.activeLink=new Nl(ce,this),ce.deps?(n.prevDep=ce.depsTail,ce.depsTail.nextDep=n,ce.depsTail=n):ce.deps=ce.depsTail=n,ei(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ce.depsTail,n.nextDep=void 0,ce.depsTail.nextDep=n,ce.depsTail=n,ce.deps===n&&(ce.deps=s)}return n}trigger(t){this.version++,fn++,this.notify(t)}notify(t){sr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{rr()}}}function ei(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ei(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Fn=new WeakMap,It=Symbol(""),Ns=Symbol(""),hn=Symbol("");function be(e,t,n){if(Be&&ce){let s=Fn.get(e);s||Fn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new es),r.map=s,r.key=n),r.track()}}function it(e,t,n,s,r,o){const i=Fn.get(e);if(!i){fn++;return}const l=c=>{c&&c.trigger()};if(sr(),t==="clear")i.forEach(l);else{const c=H(e),a=c&&Qn(n);if(c&&n==="length"){const u=Number(s);i.forEach((f,p)=>{(p==="length"||p===hn||!Le(p)&&p>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),a&&l(i.get(hn)),t){case"add":c?a&&l(i.get("length")):(l(i.get(It)),kt(e)&&l(i.get(Ns)));break;case"delete":c||(l(i.get(It)),kt(e)&&l(i.get(Ns)));break;case"set":kt(e)&&l(i.get(It));break}}rr()}function Ml(e,t){const n=Fn.get(e);return n&&n.get(t)}function Lt(e){const t=X(e);return t===e?t:(be(t,"iterate",hn),De(e)?t:t.map(He))}function ts(e){return be(e=X(e),"iterate",hn),e}function Qe(e,t){return ft(e)?Gt(ct(e)?He(t):t):He(t)}const Dl={__proto__:null,[Symbol.iterator](){return ms(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Lt(this).concat(...e.map(t=>H(t)?Lt(t):t))},entries(){return ms(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return tt(this,"every",e,t,void 0,arguments)},filter(e,t){return tt(this,"filter",e,t,n=>n.map(s=>Qe(this,s)),arguments)},find(e,t){return tt(this,"find",e,t,n=>Qe(this,n),arguments)},findIndex(e,t){return tt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return tt(this,"findLast",e,t,n=>Qe(this,n),arguments)},findLastIndex(e,t){return tt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return tt(this,"forEach",e,t,void 0,arguments)},includes(...e){return _s(this,"includes",e)},indexOf(...e){return _s(this,"indexOf",e)},join(e){return Lt(this).join(e)},lastIndexOf(...e){return _s(this,"lastIndexOf",e)},map(e,t){return tt(this,"map",e,t,void 0,arguments)},pop(){return Jt(this,"pop")},push(...e){return Jt(this,"push",e)},reduce(e,...t){return Or(this,"reduce",e,t)},reduceRight(e,...t){return Or(this,"reduceRight",e,t)},shift(){return Jt(this,"shift")},some(e,t){return tt(this,"some",e,t,void 0,arguments)},splice(...e){return Jt(this,"splice",e)},toReversed(){return Lt(this).toReversed()},toSorted(e){return Lt(this).toSorted(e)},toSpliced(...e){return Lt(this).toSpliced(...e)},unshift(...e){return Jt(this,"unshift",e)},values(){return ms(this,"values",e=>Qe(this,e))}};function ms(e,t,n){const s=ts(e),r=s[t]();return s!==e&&!De(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Ll=Array.prototype;function tt(e,t,n,s,r,o){const i=ts(e),l=i!==e&&!De(e),c=i[t];if(c!==Ll[t]){const f=c.apply(e,o);return l?He(f):f}let a=n;i!==e&&(l?a=function(f,p){return n.call(this,Qe(e,f),p,e)}:n.length>2&&(a=function(f,p){return n.call(this,f,p,e)}));const u=c.call(i,a,s);return l&&r?r(u):u}function Or(e,t,n,s){const r=ts(e),o=r!==e&&!De(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(a,u,f){return l&&(l=!1,a=Qe(e,a)),n.call(this,a,Qe(e,u),f,e)}):n.length>3&&(i=function(a,u,f){return n.call(this,a,u,f,e)}));const c=r[t](i,...s);return l?Qe(e,c):c}function _s(e,t,n){const s=X(e);be(s,"iterate",hn);const r=s[t](...n);return(r===-1||r===!1)&&ns(n[0])?(n[0]=X(n[0]),s[t](...n)):r}function Jt(e,t,n=[]){ut(),sr();const s=X(e)[t].apply(e,n);return rr(),at(),s}const Fl=Ys("__proto__,__v_isRef,__isVue"),ti=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Le));function Vl(e){Le(e)||(e=String(e));const t=X(this);return be(t,"has",e),t.hasOwnProperty(e)}class ni{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?ql:ii:o?oi:ri).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=H(t);if(!r){let c;if(i&&(c=Dl[n]))return c;if(n==="hasOwnProperty")return Vl}const l=Reflect.get(t,n,ae(t)?t:s);if((Le(n)?ti.has(n):Fl(n))||(r||be(t,"get",n),o))return l;if(ae(l)){const c=i&&Qn(n)?l:l.value;return r&&se(c)?Ds(c):c}return se(l)?r?Ds(l):An(l):l}}class si extends ni{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=H(t)&&Qn(n);if(!this._isShallow){const a=ft(o);if(!De(s)&&!ft(s)&&(o=X(o),s=X(s)),!i&&ae(o)&&!ae(s))return a||(o.value=s),!0}const l=i?Number(n)e,wn=e=>Reflect.getPrototypeOf(e);function Ul(e,t,n){return function(...s){const r=this.__v_raw,o=X(r),i=kt(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,a=r[e](...s),u=n?Ms:t?Gt:He;return!t&&be(o,"iterate",c?Ns:It),ge(Object.create(a),{next(){const{value:f,done:p}=a.next();return p?{value:f,done:p}:{value:l?[u(f[0]),u(f[1])]:u(f),done:p}}})}}function Rn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Kl(e,t){const n={get(r){const o=this.__v_raw,i=X(o),l=X(r);e||(Xe(r,l)&&be(i,"get",r),be(i,"get",l));const{has:c}=wn(i),a=t?Ms:e?Gt:He;if(c.call(i,r))return a(o.get(r));if(c.call(i,l))return a(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&be(X(r),"iterate",It),r.size},has(r){const o=this.__v_raw,i=X(o),l=X(r);return e||(Xe(r,l)&&be(i,"has",r),be(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,c=X(l),a=t?Ms:e?Gt:He;return!e&&be(c,"iterate",It),l.forEach((u,f)=>r.call(o,a(u),a(f),i))}};return ge(n,e?{add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear")}:{add(r){const o=X(this),i=wn(o),l=X(r),c=!t&&!De(r)&&!ft(r)?l:r;return i.has.call(o,c)||Xe(r,c)&&i.has.call(o,r)||Xe(l,c)&&i.has.call(o,l)||(o.add(c),it(o,"add",c,c)),this},set(r,o){!t&&!De(o)&&!ft(o)&&(o=X(o));const i=X(this),{has:l,get:c}=wn(i);let a=l.call(i,r);a||(r=X(r),a=l.call(i,r));const u=c.call(i,r);return i.set(r,o),a?Xe(o,u)&&it(i,"set",r,o):it(i,"add",r,o),this},delete(r){const o=X(this),{has:i,get:l}=wn(o);let c=i.call(o,r);c||(r=X(r),c=i.call(o,r)),l&&l.call(o,r);const a=o.delete(r);return c&&it(o,"delete",r,void 0),a},clear(){const r=X(this),o=r.size!==0,i=r.clear();return o&&it(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Ul(r,e,t)}),n}function ir(e,t){const n=Kl(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(ne(n,r)&&r in s?n:s,r,o)}const Gl={get:ir(!1,!1)},$l={get:ir(!1,!0)},Wl={get:ir(!0,!1)};const ri=new WeakMap,oi=new WeakMap,ii=new WeakMap,ql=new WeakMap;function zl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jl(e){return e.__v_skip||!Object.isExtensible(e)?0:zl(yl(e))}function An(e){return ft(e)?e:lr(e,!1,Bl,Gl,ri)}function li(e){return lr(e,!1,kl,$l,oi)}function Ds(e){return lr(e,!0,Hl,Wl,ii)}function lr(e,t,n,s,r){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Jl(e);if(o===0)return e;const i=r.get(e);if(i)return i;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ct(e){return ft(e)?ct(e.__v_raw):!!(e&&e.__v_isReactive)}function ft(e){return!!(e&&e.__v_isReadonly)}function De(e){return!!(e&&e.__v_isShallow)}function ns(e){return e?!!e.__v_raw:!1}function X(e){const t=e&&e.__v_raw;return t?X(t):e}function cr(e){return!ne(e,"__v_skip")&&Object.isExtensible(e)&&Ho(e,"__v_skip",!0),e}const He=e=>se(e)?An(e):e,Gt=e=>se(e)?Ds(e):e;function ae(e){return e?e.__v_isRef===!0:!1}function $t(e){return ci(e,!1)}function Ql(e){return ci(e,!0)}function ci(e,t){return ae(e)?e:new Yl(e,t)}class Yl{constructor(t,n){this.dep=new es,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:X(t),this._value=n?t:He(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||De(t)||ft(t);t=s?t:X(t),Xe(t,n)&&(this._rawValue=t,this._value=s?t:He(t),this.dep.trigger())}}function bt(e){return ae(e)?e.value:e}const Xl={get:(e,t,n)=>t==="__v_raw"?e:bt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ae(r)&&!ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function ui(e){return ct(e)?e:new Proxy(e,Xl)}class Zl{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new es,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Af(e){return new Zl(e)}function ec(e){const t=H(e)?new Array(e.length):{};for(const n in e)t[n]=nc(e,n);return t}class tc{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=Le(n)?n:String(n),this._raw=X(t);let r=!0,o=t;if(!H(t)||Le(this._key)||!Qn(this._key))do r=!ns(o)||De(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=bt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ae(this._raw[this._key])){const n=this._object[this._key];if(ae(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Ml(this._raw,this._key)}}function nc(e,t,n){return new tc(e,t,n)}class sc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new es(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=fn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ce!==this)return Jo(this,!0),!0}get value(){const t=this.dep.track();return Xo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function rc(e,t,n=!1){let s,r;return $(e)?s=e:(s=e.get,r=e.set),new sc(s,r,n)}const xn={},Vn=new WeakMap;let Tt;function oc(e,t=!1,n=Tt){if(n){let s=Vn.get(n);s||Vn.set(n,s=[]),s.push(e)}}function ic(e,t,n=ie){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:c}=n,a=N=>r?N:De(N)||r===!1||r===0?lt(N,1):lt(N);let u,f,p,m,A=!1,S=!1;if(ae(e)?(f=()=>e.value,A=De(e)):ct(e)?(f=()=>a(e),A=!0):H(e)?(S=!0,A=e.some(N=>ct(N)||De(N)),f=()=>e.map(N=>{if(ae(N))return N.value;if(ct(N))return a(N);if($(N))return c?c(N,2):N()})):$(e)?t?f=c?()=>c(e,2):e:f=()=>{if(p){ut();try{p()}finally{at()}}const N=Tt;Tt=u;try{return c?c(e,3,[m]):e(m)}finally{Tt=N}}:f=Ze,t&&r){const N=f,B=r===!0?1/0:r;f=()=>lt(N(),B)}const F=Wo(),M=()=>{u.stop(),F&&F.active&&Xs(F.effects,u)};if(o&&t){const N=t;t=(...B)=>{N(...B),M()}}let C=S?new Array(e.length).fill(xn):xn;const L=N=>{if(!(!(u.flags&1)||!u.dirty&&!N))if(t){const B=u.run();if(r||A||(S?B.some((z,q)=>Xe(z,C[q])):Xe(B,C))){p&&p();const z=Tt;Tt=u;try{const q=[B,C===xn?void 0:S&&C[0]===xn?[]:C,m];C=B,c?c(t,3,q):t(...q)}finally{Tt=z}}}else u.run()};return l&&l(L),u=new qo(f),u.scheduler=i?()=>i(L,!1):L,m=N=>oc(N,!1,u),p=u.onStop=()=>{const N=Vn.get(u);if(N){if(c)c(N,4);else for(const B of N)B();Vn.delete(u)}},t?s?L(!0):C=u.run():i?i(L.bind(null,!0),!0):u.run(),M.pause=u.pause.bind(u),M.resume=u.resume.bind(u),M.stop=M,M}function lt(e,t=1/0,n){if(t<=0||!se(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ae(e))lt(e.value,t,n);else if(H(e))for(let s=0;s{lt(s,t,n)});else if(Bo(e)){for(const s in e)lt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&<(e[s],t,n)}return e}/** * @vue/runtime-core v3.5.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Sn(e,t,n,s){try{return s?e(...s):e()}catch(r){ss(r,t,n)}}function He(e,t,n,s){if($(e)){const r=Sn(e,t,n,s);return r&&Vo(r)&&r.catch(o=>{ss(o,t,n)}),r}if(k(e)){const r=[];for(let o=0;o>>1,r=Re[s],o=dn(r);o=dn(n)?Re.push(e):Re.splice(cc(t),0,e),e.flags|=1,fi()}}function fi(){jn||(jn=ai.then(di))}function uc(e){k(e)?Ut.push(...e):_t&&e.id===-1?_t.splice(Vt+1,0,e):e.flags&1||(Ut.push(e),e.flags|=1),fi()}function Pr(e,t,n=ze+1){for(;ndn(n)-dn(s));if(Ut.length=0,_t){_t.push(...t);return}for(_t=t,Vt=0;Vt<_t.length;Vt++){const n=_t[Vt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}_t=null,Vt=0}}const dn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function di(e){try{for(ze=0;ze{s._d&&Kn(-1);const o=Bn(t);let i;try{i=e(...r)}finally{Bn(o),s._d&&Kn(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function Sf(e,t){if(_e===null)return e;const n=us(_e),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&$(t)?t.call(s&&s.proxy):t}}function fc(){return!!(_r()||Nt)}const hc=Symbol.for("v-scx"),dc=()=>je(hc);function Cf(e,t){return fr(e,null,t)}function sn(e,t,n){return fr(e,t,n)}function fr(e,t,n=ie){const{immediate:s,deep:r,flush:o,once:i}=n,l=ge({},n),c=t&&s||!t&&o!=="post";let a;if(_n){if(o==="sync"){const m=dc();a=m.__watcherHandles||(m.__watcherHandles=[])}else if(!c){const m=()=>{};return m.stop=Ze,m.resume=Ze,m.pause=Ze,m}}const u=Ae;l.call=(m,A,S)=>He(m,u,A,S);let f=!1;o==="post"?l.scheduler=m=>{ye(m,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(m,A)=>{A?m():ar(m)}),l.augmentJob=m=>{t&&(m.flags|=4),f&&(m.flags|=2,u&&(m.id=u.uid,m.i=u))};const p=ic(e,t,l);return _n&&(a?a.push(p):c&&p()),p}function pc(e,t,n){const s=this.proxy,r=fe(e)?e.includes(".")?gi(s,e):()=>s[e]:e.bind(s,s);let o;$(t)?o=t:(o=t.handler,n=t);const i=Cn(this),l=fr(r,o.bind(s),n);return i(),l}function gi(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,rn=e=>e&&(e.disabled||e.disabled===""),gc=e=>e&&(e.defer||e.defer===""),Ir=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Nr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ls=(e,t)=>{const n=e&&e.to;return fe(n)?t?t(n):null:n},yi={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,c,a){const{mc:u,pc:f,pbc:p,o:{insert:m,querySelector:A,createText:S,createComment:F}}=a,M=rn(t.props);let{shapeFlag:C,children:L,dynamicChildren:N}=t;if(e==null){const B=t.el=S(""),z=t.anchor=S("");m(B,n,s),m(z,n,s);const q=(w,U)=>{C&16&&u(L,w,U,r,o,i,l,c)},H=()=>{const w=t.target=Ls(t.props,A),U=Fs(w,t,S,m);w&&(i!=="svg"&&Ir(w)?i="svg":i!=="mathml"&&Nr(w)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(w),M||(q(w,U),Nn(t,!1)))};M&&(q(n,z),Nn(t,!0)),gc(t.props)||o&&o.pendingBranch?(t.el.__isMounted=!1,ye(()=>{t.el.__isMounted===!1&&(H(),delete t.el.__isMounted)},o)):H()}else{t.el=e.el,t.targetStart=e.targetStart;const B=t.anchor=e.anchor,z=t.target=e.target,q=t.targetAnchor=e.targetAnchor;if(e.el.__isMounted===!1){ye(()=>{yi.process(e,t,n,s,r,o,i,l,c,a)},o);return}const H=rn(e.props),w=H?n:z,U=H?B:q;if(i==="svg"||Ir(z)?i="svg":(i==="mathml"||Nr(z))&&(i="mathml"),N?(p(e.dynamicChildren,N,w,r,o,i,l),gr(e,t,!0)):c||f(e,t,w,U,r,o,i,l,!1),M)H?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Tn(t,n,B,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const J=t.target=Ls(t.props,A);J&&Tn(t,J,null,a,0)}else H&&Tn(t,z,q,a,1);Nn(t,M)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:f,props:p}=e;if(f&&(r(a),r(u)),o&&r(c),i&16){const m=o||!rn(p);for(let A=0;A{e.isMounted=!0}),Ri(()=>{e.isUnmounting=!0}),e}const Ve=[Function,Array],vi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ve,onEnter:Ve,onAfterEnter:Ve,onEnterCancelled:Ve,onBeforeLeave:Ve,onLeave:Ve,onAfterLeave:Ve,onLeaveCancelled:Ve,onBeforeAppear:Ve,onAppear:Ve,onAfterAppear:Ve,onAppearCancelled:Ve},bi=e=>{const t=e.subTree;return t.component?bi(t.component):t},yc={name:"BaseTransition",props:vi,setup(e,{slots:t}){const n=_r(),s=_c();return()=>{const r=t.default&&Si(t.default(),!0);if(!r||!r.length)return;const o=Ei(r),i=X(e),{mode:l}=i;if(s.isLeaving)return ys(o);const c=Mr(o);if(!c)return ys(o);let a=Vs(c,i,s,n,f=>a=f);c.type!==Ee&&pn(c,a);let u=n.subTree&&Mr(n.subTree);if(u&&u.type!==Ee&&!Ot(u,c)&&bi(n).type!==Ee){let f=Vs(u,i,s,n);if(pn(u,f),l==="out-in"&&c.type!==Ee)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},ys(o);l==="in-out"&&c.type!==Ee?f.delayLeave=(p,m,A)=>{const S=Ai(s,u);S[String(u.key)]=u,p[Je]=()=>{m(),p[Je]=void 0,delete a.delayedLeave,u=void 0},a.delayedLeave=()=>{A(),delete a.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Ei(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ee){t=n;break}}return t}const vc=yc;function Ai(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Vs(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:m,onAfterLeave:A,onLeaveCancelled:S,onBeforeAppear:F,onAppear:M,onAfterAppear:C,onAppearCancelled:L}=t,N=String(e.key),B=Ai(n,e),z=(w,U)=>{w&&He(w,s,9,U)},q=(w,U)=>{const J=U[1];z(w,U),k(w)?w.every(P=>P.length<=1)&&J():w.length<=1&&J()},H={mode:i,persisted:l,beforeEnter(w){let U=c;if(!n.isMounted)if(o)U=F||c;else return;w[Je]&&w[Je](!0);const J=B[N];J&&Ot(e,J)&&J.el[Je]&&J.el[Je](),z(U,[w])},enter(w){if(B[N]===e)return;let U=a,J=u,P=f;if(!n.isMounted)if(o)U=M||a,J=C||u,P=L||f;else return;let Q=!1;w[Qt]=Se=>{Q||(Q=!0,Se?z(P,[w]):z(J,[w]),H.delayedLeave&&H.delayedLeave(),w[Qt]=void 0)};const he=w[Qt].bind(null,!1);U?q(U,[w,he]):he()},leave(w,U){const J=String(e.key);if(w[Qt]&&w[Qt](!0),n.isUnmounting)return U();z(p,[w]);let P=!1;w[Je]=he=>{P||(P=!0,U(),he?z(S,[w]):z(A,[w]),w[Je]=void 0,B[J]===e&&delete B[J])};const Q=w[Je].bind(null,!1);B[J]=e,m?q(m,[w,Q]):Q()},clone(w){const U=Vs(w,t,n,s,r);return r&&r(U),U}};return H}function ys(e){if(rs(e))return e=Et(e),e.children=null,e}function Mr(e){if(!rs(e))return _i(e.type)&&e.children?Ei(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&$(n.default))return n.default()}}function pn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,pn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Si(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;oon(S,t&&(k(t)?t[F]:t),n,s,r));return}if(Kt(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&on(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?us(s.component):s.el,i=r?null:o,{i:l,r:c}=e,a=t&&t.r,u=l.refs===ie?l.refs={}:l.refs,f=l.setupState,p=X(f),m=f===ie?Lo:S=>Dr(u,S)?!1:ne(p,S),A=(S,F)=>!(F&&Dr(u,F));if(a!=null&&a!==c){if(Lr(t),fe(a))u[a]=null,m(a)&&(f[a]=null);else if(ae(a)){const S=t;A(a,S.k)&&(a.value=null),S.k&&(u[S.k]=null)}}if($(c))Sn(c,l,12,[i,u]);else{const S=fe(c),F=ae(c);if(S||F){const M=()=>{if(e.f){const C=S?m(c)?f[c]:u[c]:A()||!e.k?c.value:u[e.k];if(r)k(C)&&Xs(C,o);else if(k(C))C.includes(o)||C.push(o);else if(S)u[c]=[o],m(c)&&(f[c]=u[c]);else{const L=[o];A(c,e.k)&&(c.value=L),e.k&&(u[e.k]=L)}}else S?(u[c]=i,m(c)&&(f[c]=i)):F&&(A(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const C=()=>{M(),kn.delete(e)};C.id=-1,kn.set(e,C),ye(C,n)}else Lr(e),M()}}}function Lr(e){const t=kn.get(e);t&&(t.flags|=8,kn.delete(e))}Zn().requestIdleCallback;Zn().cancelIdleCallback;const Kt=e=>!!e.type.__asyncLoader,rs=e=>e.type.__isKeepAlive;function bc(e,t){wi(e,"a",t)}function Ec(e,t){wi(e,"da",t)}function wi(e,t,n=Ae){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(os(t,s,n),n){let r=n.parent;for(;r&&r.parent;)rs(r.parent.vnode)&&Ac(s,t,n,r),r=r.parent}}function Ac(e,t,n,s){const r=os(t,e,s,!0);xi(()=>{Xs(s[t],r)},n)}function os(e,t,n=Ae,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ut();const l=Cn(n),c=He(t,n,e,i);return l(),at(),c});return s?r.unshift(o):r.push(o),o}}const ht=e=>(t,n=Ae)=>{(!_n||e==="sp")&&os(e,(...s)=>t(...s),n)},Sc=ht("bm"),is=ht("m"),Cc=ht("bu"),wc=ht("u"),Ri=ht("bum"),xi=ht("um"),Rc=ht("sp"),xc=ht("rtg"),Tc=ht("rtc");function Oc(e,t=Ae){os("ec",e,t)}const Pc="components";function Rf(e,t){return Nc(Pc,e,!0,t)||e}const Ic=Symbol.for("v-ndc");function Nc(e,t,n=!0,s=!1){const r=_e||Ae;if(r){const o=r.type;{const l=_u(o,!1);if(l&&(l===t||l===Te(t)||l===Xn(Te(t))))return o}const i=Fr(r[e]||o[e],t)||Fr(r.appContext[e],t);return!i&&s?o:i}}function Fr(e,t){return e&&(e[t]||e[Te(t)]||e[Xn(Te(t))])}function xf(e,t,n,s){let r;const o=n,i=k(e);if(i||fe(e)){const l=i&&ct(e);let c=!1,a=!1;l&&(c=!De(e),a=ft(e),e=ts(e)),r=new Array(e.length);for(let u=0,f=e.length;ut(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;c0;return t!=="default"&&(n.name=t),Un(),Gn(Ie,null,[xe("slot",n,s)],a?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),Un();const i=o&&Ti(o(n)),l=n.key||i&&i.key,c=Gn(Ie,{key:(l&&!Le(l)?l:`_${t}`)+(!i&&s?"_fb":"")},i||[],i&&e._===1?64:-2);return o&&o._c&&(o._d=!0),c}function Ti(e){return e.some(t=>mn(t)?!(t.type===Ee||t.type===Ie&&!Ti(t.children)):!0)?e:null}const js=e=>e?zi(e)?us(e):js(e.parent):null,ln=ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>js(e.parent),$root:e=>js(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Pi(e),$forceUpdate:e=>e.f||(e.f=()=>{ar(e.update)}),$nextTick:e=>e.n||(e.n=ur.bind(e.proxy)),$watch:e=>pc.bind(e)}),vs=(e,t)=>e!==ie&&!e.__isScriptSetup&&ne(e,t),Mc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(vs(s,t))return i[t]=1,s[t];if(r!==ie&&ne(r,t))return i[t]=2,r[t];if(ne(o,t))return i[t]=3,o[t];if(n!==ie&&ne(n,t))return i[t]=4,n[t];Bs&&(i[t]=0)}}const a=ln[t];let u,f;if(a)return t==="$attrs"&&be(e.attrs,"get",""),a(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ie&&ne(n,t))return i[t]=4,n[t];if(f=c.config.globalProperties,ne(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return vs(r,t)?(r[t]=n,!0):s!==ie&&ne(s,t)?(s[t]=n,!0):ne(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let c;return!!(n[l]||e!==ie&&l[0]!=="$"&&ne(e,l)||vs(t,l)||ne(o,l)||ne(s,l)||ne(ln,l)||ne(r.config.globalProperties,l)||(c=i.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ne(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Vr(e){return k(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Bs=!0;function Dc(e){const t=Pi(e),n=e.proxy,s=e.ctx;Bs=!1,t.beforeCreate&&jr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:f,mounted:p,beforeUpdate:m,updated:A,activated:S,deactivated:F,beforeDestroy:M,beforeUnmount:C,destroyed:L,unmounted:N,render:B,renderTracked:z,renderTriggered:q,errorCaptured:H,serverPrefetch:w,expose:U,inheritAttrs:J,components:P,directives:Q,filters:he}=t;if(a&&Lc(a,s,null),i)for(const W in i){const ee=i[W];$(ee)&&(s[W]=ee.bind(n))}if(r){const W=r.call(n,n);se(W)&&(e.data=An(W))}if(Bs=!0,o)for(const W in o){const ee=o[W],et=$(ee)?ee.bind(n,n):$(ee.get)?ee.get.bind(n,n):Ze,dt=!$(ee)&&$(ee.set)?ee.set.bind(n):Ze,Ke=Ne({get:et,set:dt});Object.defineProperty(s,W,{enumerable:!0,configurable:!0,get:()=>Ke.value,set:Oe=>Ke.value=Oe})}if(l)for(const W in l)Oi(l[W],s,n,W);if(c){const W=$(c)?c.call(n):c;Reflect.ownKeys(W).forEach(ee=>{In(ee,W[ee])})}u&&jr(u,e,"c");function re(W,ee){k(ee)?ee.forEach(et=>W(et.bind(n))):ee&&W(ee.bind(n))}if(re(Sc,f),re(is,p),re(Cc,m),re(wc,A),re(bc,S),re(Ec,F),re(Oc,H),re(Tc,z),re(xc,q),re(Ri,C),re(xi,N),re(Rc,w),k(U))if(U.length){const W=e.exposed||(e.exposed={});U.forEach(ee=>{Object.defineProperty(W,ee,{get:()=>n[ee],set:et=>n[ee]=et,enumerable:!0})})}else e.exposed||(e.exposed={});B&&e.render===Ze&&(e.render=B),J!=null&&(e.inheritAttrs=J),P&&(e.components=P),Q&&(e.directives=Q),w&&Ci(e)}function Lc(e,t,n=Ze){k(e)&&(e=ks(e));for(const s in e){const r=e[s];let o;se(r)?"default"in r?o=je(r.from||s,r.default,!0):o=je(r.from||s):o=je(r),ae(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function jr(e,t,n){He(k(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Oi(e,t,n,s){let r=s.includes(".")?gi(n,s):()=>n[s];if(fe(e)){const o=t[e];$(o)&&sn(r,o)}else if($(e))sn(r,e.bind(n));else if(se(e))if(k(e))e.forEach(o=>Oi(o,t,n,s));else{const o=$(e.handler)?e.handler.bind(n):t[e.handler];$(o)&&sn(r,o,e)}}function Pi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>Hn(c,a,i,!0)),Hn(c,t,i)),se(t)&&o.set(t,c),c}function Hn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Hn(e,o,n,!0),r&&r.forEach(i=>Hn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Fc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Fc={data:Br,props:kr,emits:kr,methods:Zt,computed:Zt,beforeCreate:Ce,created:Ce,beforeMount:Ce,mounted:Ce,beforeUpdate:Ce,updated:Ce,beforeDestroy:Ce,beforeUnmount:Ce,destroyed:Ce,unmounted:Ce,activated:Ce,deactivated:Ce,errorCaptured:Ce,serverPrefetch:Ce,components:Zt,directives:Zt,watch:jc,provide:Br,inject:Vc};function Br(e,t){return t?e?function(){return ge($(e)?e.call(this,this):e,$(t)?t.call(this,this):t)}:t:e}function Vc(e,t){return Zt(ks(e),ks(t))}function ks(e){if(k(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Te(t)}Modifiers`]||e[`${At(t)}Modifiers`];function Uc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ie;let r=n;const o=t.startsWith("update:"),i=o&&Hc(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>fe(u)?u.trim():u)),i.number&&(r=n.map(Zs)));let l,c=s[l=ds(t)]||s[l=ds(Te(t))];!c&&o&&(c=s[l=ds(At(t))]),c&&He(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,He(a,e,6,r)}}const Kc=new WeakMap;function Ni(e,t,n=!1){const s=n?Kc:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!$(e)){const c=a=>{const u=Ni(a,t,!0);u&&(l=!0,ge(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(se(e)&&s.set(e,null),null):(k(o)?o.forEach(c=>i[c]=null):ge(i,o),se(e)&&s.set(e,i),i)}function ls(e,t){return!e||!zn(t)?!1:(t=t.slice(2).replace(/Once$/,""),ne(e,t[0].toLowerCase()+t.slice(1))||ne(e,At(t))||ne(e,t))}function Hr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:a,renderCache:u,props:f,data:p,setupState:m,ctx:A,inheritAttrs:S}=e,F=Bn(e);let M,C;try{if(n.shapeFlag&4){const N=r||s,B=N;M=Ye(a.call(B,N,u,f,m,p,A)),C=l}else{const N=t;M=Ye(N.length>1?N(f,{attrs:l,slots:i,emit:c}):N(f,null)),C=t.props?l:Gc(l)}}catch(N){cn.length=0,ss(N,e,1),M=xe(Ee)}let L=M;if(C&&S!==!1){const N=Object.keys(C),{shapeFlag:B}=L;N.length&&B&7&&(o&&N.some(Jn)&&(C=$c(C,o)),L=Et(L,C,!1,!0))}return n.dirs&&(L=Et(L,null,!1,!0),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition&&pn(L,n.transition),M=L,Bn(F),M}const Gc=e=>{let t;for(const n in e)(n==="class"||n==="style"||zn(n))&&((t||(t={}))[n]=e[n]);return t},$c=(e,t)=>{const n={};for(const s in e)(!Jn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Wc(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Ur(s,i,a):!!i;if(c&8){const u=t.dynamicProps;for(let f=0;fObject.create(Di),Fi=e=>Object.getPrototypeOf(e)===Di;function zc(e,t,n,s=!1){const r={},o=Li();e.propsDefaults=Object.create(null),Vi(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:li(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Jc(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=X(r),[c]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[p,m]=ji(f,t,!0);ge(i,p),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return se(e)&&s.set(e,kt),kt;if(k(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",pr=e=>k(e)?e.map(Ye):[Ye(e)],Yc=(e,t,n)=>{if(t._n)return t;const s=ac((...r)=>pr(t(...r)),n);return s._c=!1,s},Bi=(e,t,n)=>{const s=e._ctx;for(const r in e){if(dr(r))continue;const o=e[r];if($(o))t[r]=Yc(r,o,s);else if(o!=null){const i=pr(o);t[r]=()=>i}}},ki=(e,t)=>{const n=pr(t);e.slots.default=()=>n},Hi=(e,t,n)=>{for(const s in t)(n||!dr(s))&&(e[s]=t[s])},Xc=(e,t,n)=>{const s=e.slots=Li();if(e.vnode.shapeFlag&32){const r=t._;r?(Hi(s,t,n),n&&ko(s,"_",r,!0)):Bi(t,s)}else t&&ki(e,t)},Zc=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=ie;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Hi(r,t,n):(o=!t.$stable,Bi(t,r)),i=t}else t&&(ki(e,t),i={default:1});if(o)for(const l in r)!dr(l)&&i[l]==null&&delete r[l]},ye=ru;function eu(e){return tu(e)}function tu(e,t){const n=Zn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:a,setElementText:u,parentNode:f,nextSibling:p,setScopeId:m=Ze,insertStaticContent:A}=e,S=(h,d,g,_=null,b=null,y=null,T=void 0,x=null,R=!!d.dynamicChildren)=>{if(h===d)return;h&&!Ot(h,d)&&(_=v(h),Oe(h,b,y,!0),h=null),d.patchFlag===-2&&(R=!1,d.dynamicChildren=null);const{type:E,ref:K,shapeFlag:I}=d;switch(E){case cs:F(h,d,g,_);break;case Ee:M(h,d,g,_);break;case Mn:h==null&&C(d,g,_,T);break;case Ie:P(h,d,g,_,b,y,T,x,R);break;default:I&1?B(h,d,g,_,b,y,T,x,R):I&6?Q(h,d,g,_,b,y,T,x,R):(I&64||I&128)&&E.process(h,d,g,_,b,y,T,x,R,V)}K!=null&&b?on(K,h&&h.ref,y,d||h,!d):K==null&&h&&h.ref!=null&&on(h.ref,null,y,h,!0)},F=(h,d,g,_)=>{if(h==null)s(d.el=l(d.children),g,_);else{const b=d.el=h.el;d.children!==h.children&&a(b,d.children)}},M=(h,d,g,_)=>{h==null?s(d.el=c(d.children||""),g,_):d.el=h.el},C=(h,d,g,_)=>{[h.el,h.anchor]=A(h.children,d,g,_,h.el,h.anchor)},L=({el:h,anchor:d},g,_)=>{let b;for(;h&&h!==d;)b=p(h),s(h,g,_),h=b;s(d,g,_)},N=({el:h,anchor:d})=>{let g;for(;h&&h!==d;)g=p(h),r(h),h=g;r(d)},B=(h,d,g,_,b,y,T,x,R)=>{if(d.type==="svg"?T="svg":d.type==="math"&&(T="mathml"),h==null)z(d,g,_,b,y,T,x,R);else{const E=h.el&&h.el._isVueCE?h.el:null;try{E&&E._beginPatch(),w(h,d,b,y,T,x,R)}finally{E&&E._endPatch()}}},z=(h,d,g,_,b,y,T,x)=>{let R,E;const{props:K,shapeFlag:I,transition:j,dirs:G}=h;if(R=h.el=i(h.type,y,K&&K.is,K),I&8?u(R,h.children):I&16&&H(h.children,R,null,_,b,bs(h,y),T,x),G&&Ct(h,null,_,"created"),q(R,h,h.scopeId,T,_),K){for(const oe in K)oe!=="value"&&!en(oe)&&o(R,oe,null,K[oe],y,_);"value"in K&&o(R,"value",null,K.value,y),(E=K.onVnodeBeforeMount)&&qe(E,_,h)}G&&Ct(h,null,_,"beforeMount");const Z=nu(b,j);Z&&j.beforeEnter(R),s(R,d,g),((E=K&&K.onVnodeMounted)||Z||G)&&ye(()=>{try{E&&qe(E,_,h),Z&&j.enter(R),G&&Ct(h,null,_,"mounted")}finally{}},b)},q=(h,d,g,_,b)=>{if(g&&m(h,g),_)for(let y=0;y<_.length;y++)m(h,_[y]);if(b){let y=b.subTree;if(d===y||Gi(y.type)&&(y.ssContent===d||y.ssFallback===d)){const T=b.vnode;q(h,T,T.scopeId,T.slotScopeIds,b.parent)}}},H=(h,d,g,_,b,y,T,x,R=0)=>{for(let E=R;E{const x=d.el=h.el;let{patchFlag:R,dynamicChildren:E,dirs:K}=d;R|=h.patchFlag&16;const I=h.props||ie,j=d.props||ie;let G;if(g&&wt(g,!1),(G=j.onVnodeBeforeUpdate)&&qe(G,g,d,h),K&&Ct(d,h,g,"beforeUpdate"),g&&wt(g,!0),(I.innerHTML&&j.innerHTML==null||I.textContent&&j.textContent==null)&&u(x,""),E?U(h.dynamicChildren,E,x,g,_,bs(d,b),y):T||ee(h,d,x,null,g,_,bs(d,b),y,!1),R>0){if(R&16)J(x,I,j,g,b);else if(R&2&&I.class!==j.class&&o(x,"class",null,j.class,b),R&4&&o(x,"style",I.style,j.style,b),R&8){const Z=d.dynamicProps;for(let oe=0;oe{G&&qe(G,g,d,h),K&&Ct(d,h,g,"updated")},_)},U=(h,d,g,_,b,y,T)=>{for(let x=0;x{if(d!==g){if(d!==ie)for(const y in d)!en(y)&&!(y in g)&&o(h,y,d[y],null,b,_);for(const y in g){if(en(y))continue;const T=g[y],x=d[y];T!==x&&y!=="value"&&o(h,y,x,T,b,_)}"value"in g&&o(h,"value",d.value,g.value,b)}},P=(h,d,g,_,b,y,T,x,R)=>{const E=d.el=h?h.el:l(""),K=d.anchor=h?h.anchor:l("");let{patchFlag:I,dynamicChildren:j,slotScopeIds:G}=d;G&&(x=x?x.concat(G):G),h==null?(s(E,g,_),s(K,g,_),H(d.children||[],g,K,b,y,T,x,R)):I>0&&I&64&&j&&h.dynamicChildren&&h.dynamicChildren.length===j.length?(U(h.dynamicChildren,j,g,b,y,T,x),(d.key!=null||b&&d===b.subTree)&&gr(h,d,!0)):ee(h,d,g,K,b,y,T,x,R)},Q=(h,d,g,_,b,y,T,x,R)=>{d.slotScopeIds=x,h==null?d.shapeFlag&512?b.ctx.activate(d,g,_,T,R):he(d,g,_,b,y,T,R):Se(h,d,R)},he=(h,d,g,_,b,y,T)=>{const x=h.component=hu(h,_,b);if(rs(h)&&(x.ctx.renderer=V),du(x,!1,T),x.asyncDep){if(b&&b.registerDep(x,re,T),!h.el){const R=x.subTree=xe(Ee);M(null,R,d,g),h.placeholder=R.el}}else re(x,h,d,g,b,y,T)},Se=(h,d,g)=>{const _=d.component=h.component;if(Wc(h,d,g))if(_.asyncDep&&!_.asyncResolved){W(_,d,g);return}else _.next=d,_.update();else d.el=h.el,_.vnode=d},re=(h,d,g,_,b,y,T)=>{const x=()=>{if(h.isMounted){let{next:I,bu:j,u:G,parent:Z,vnode:oe}=h;{const $e=Ui(h);if($e){I&&(I.el=oe.el,W(h,I,T)),$e.asyncDep.then(()=>{ye(()=>{h.isUnmounted||E()},b)});return}}let le=I,de;wt(h,!1),I?(I.el=oe.el,W(h,I,T)):I=oe,j&&Pn(j),(de=I.props&&I.props.onVnodeBeforeUpdate)&&qe(de,Z,I,oe),wt(h,!0);const me=Hr(h),Ge=h.subTree;h.subTree=me,S(Ge,me,f(Ge.el),v(Ge),h,b,y),I.el=me.el,le===null&&qc(h,me.el),G&&ye(G,b),(de=I.props&&I.props.onVnodeUpdated)&&ye(()=>qe(de,Z,I,oe),b)}else{let I;const{el:j,props:G}=d,{bm:Z,m:oe,parent:le,root:de,type:me}=h,Ge=Kt(d);wt(h,!1),Z&&Pn(Z),!Ge&&(I=G&&G.onVnodeBeforeMount)&&qe(I,le,d),wt(h,!0);{de.ce&&de.ce._hasShadowRoot()&&de.ce._injectChildStyle(me,h.parent?h.parent.type:void 0);const $e=h.subTree=Hr(h);S(null,$e,g,_,h,b,y),d.el=$e.el}if(oe&&ye(oe,b),!Ge&&(I=G&&G.onVnodeMounted)){const $e=d;ye(()=>qe(I,le,$e),b)}(d.shapeFlag&256||le&&Kt(le.vnode)&&le.vnode.shapeFlag&256)&&h.a&&ye(h.a,b),h.isMounted=!0,d=g=_=null}};h.scope.on();const R=h.effect=new qo(x);h.scope.off();const E=h.update=R.run.bind(R),K=h.job=R.runIfDirty.bind(R);K.i=h,K.id=h.uid,R.scheduler=()=>ar(K),wt(h,!0),E()},W=(h,d,g)=>{d.component=h;const _=h.vnode.props;h.vnode=d,h.next=null,Jc(h,d.props,_,g),Zc(h,d.children,g),ut(),Pr(h),at()},ee=(h,d,g,_,b,y,T,x,R=!1)=>{const E=h&&h.children,K=h?h.shapeFlag:0,I=d.children,{patchFlag:j,shapeFlag:G}=d;if(j>0){if(j&128){dt(E,I,g,_,b,y,T,x,R);return}else if(j&256){et(E,I,g,_,b,y,T,x,R);return}}G&8?(K&16&&Fe(E,b,y),I!==E&&u(g,I)):K&16?G&16?dt(E,I,g,_,b,y,T,x,R):Fe(E,b,y,!0):(K&8&&u(g,""),G&16&&H(I,g,_,b,y,T,x,R))},et=(h,d,g,_,b,y,T,x,R)=>{h=h||kt,d=d||kt;const E=h.length,K=d.length,I=Math.min(E,K);let j;for(j=0;jK?Fe(h,b,y,!0,!1,I):H(d,g,_,b,y,T,x,R,I)},dt=(h,d,g,_,b,y,T,x,R)=>{let E=0;const K=d.length;let I=h.length-1,j=K-1;for(;E<=I&&E<=j;){const G=h[E],Z=d[E]=R?ot(d[E]):Ye(d[E]);if(Ot(G,Z))S(G,Z,g,null,b,y,T,x,R);else break;E++}for(;E<=I&&E<=j;){const G=h[I],Z=d[j]=R?ot(d[j]):Ye(d[j]);if(Ot(G,Z))S(G,Z,g,null,b,y,T,x,R);else break;I--,j--}if(E>I){if(E<=j){const G=j+1,Z=Gj)for(;E<=I;)Oe(h[E],b,y,!0),E++;else{const G=E,Z=E,oe=new Map;for(E=Z;E<=j;E++){const Pe=d[E]=R?ot(d[E]):Ye(d[E]);Pe.key!=null&&oe.set(Pe.key,E)}let le,de=0;const me=j-Z+1;let Ge=!1,$e=0;const zt=new Array(me);for(E=0;E=me){Oe(Pe,b,y,!0);continue}let We;if(Pe.key!=null)We=oe.get(Pe.key);else for(le=Z;le<=j;le++)if(zt[le-Z]===0&&Ot(Pe,d[le])){We=le;break}We===void 0?Oe(Pe,b,y,!0):(zt[We-Z]=E+1,We>=$e?$e=We:Ge=!0,S(Pe,d[We],g,null,b,y,T,x,R),de++)}const Sr=Ge?su(zt):kt;for(le=Sr.length-1,E=me-1;E>=0;E--){const Pe=Z+E,We=d[Pe],Cr=d[Pe+1],wr=Pe+1{const{el:y,type:T,transition:x,children:R,shapeFlag:E}=h;if(E&6){Ke(h.component.subTree,d,g,_);return}if(E&128){h.suspense.move(d,g,_);return}if(E&64){T.move(h,d,g,V);return}if(T===Ie){s(y,d,g);for(let I=0;Ix.enter(y),b);else{const{leave:I,delayLeave:j,afterLeave:G}=x,Z=()=>{h.ctx.isUnmounted?r(y):s(y,d,g)},oe=()=>{y._isLeaving&&y[Je](!0),I(y,()=>{Z(),G&&G()})};j?j(y,Z,oe):oe()}else s(y,d,g)},Oe=(h,d,g,_=!1,b=!1)=>{const{type:y,props:T,ref:x,children:R,dynamicChildren:E,shapeFlag:K,patchFlag:I,dirs:j,cacheIndex:G,memo:Z}=h;if(I===-2&&(b=!1),x!=null&&(ut(),on(x,null,g,h,!0),at()),G!=null&&(d.renderCache[G]=void 0),K&256){d.ctx.deactivate(h);return}const oe=K&1&&j,le=!Kt(h);let de;if(le&&(de=T&&T.onVnodeBeforeUnmount)&&qe(de,d,h),K&6)St(h.component,g,_);else{if(K&128){h.suspense.unmount(g,_);return}oe&&Ct(h,null,d,"beforeUnmount"),K&64?h.type.remove(h,d,g,V,_):E&&!E.hasOnce&&(y!==Ie||I>0&&I&64)?Fe(E,d,g,!1,!0):(y===Ie&&I&384||!b&&K&16)&&Fe(R,d,g),_&&Mt(h)}const me=Z!=null&&G==null;(le&&(de=T&&T.onVnodeUnmounted)||oe||me)&&ye(()=>{de&&qe(de,d,h),oe&&Ct(h,null,d,"unmounted"),me&&(h.el=null)},g)},Mt=h=>{const{type:d,el:g,anchor:_,transition:b}=h;if(d===Ie){Dt(g,_);return}if(d===Mn){N(h);return}const y=()=>{r(g),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(h.shapeFlag&1&&b&&!b.persisted){const{leave:T,delayLeave:x}=b,R=()=>T(g,y);x?x(h.el,y,R):R()}else y()},Dt=(h,d)=>{let g;for(;h!==d;)g=p(h),r(h),h=g;r(d)},St=(h,d,g)=>{const{bum:_,scope:b,job:y,subTree:T,um:x,m:R,a:E}=h;Gr(R),Gr(E),_&&Pn(_),b.stop(),y&&(y.flags|=8,Oe(T,h,d,g)),x&&ye(x,d),ye(()=>{h.isUnmounted=!0},d)},Fe=(h,d,g,_=!1,b=!1,y=0)=>{for(let T=y;T{if(h.shapeFlag&6)return v(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const d=p(h.anchor||h.el),g=d&&d[mi];return g?p(g):d};let D=!1;const O=(h,d,g)=>{let _;h==null?d._vnode&&(Oe(d._vnode,null,null,!0),_=d._vnode.component):S(d._vnode||null,h,d,null,null,null,g),d._vnode=h,D||(D=!0,Pr(_),hi(),D=!1)},V={p:S,um:Oe,m:Ke,r:Mt,mt:he,mc:H,pc:ee,pbc:U,n:v,o:e};return{render:O,hydrate:void 0,createApp:kc(O)}}function bs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function wt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function nu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function gr(e,t,n=!1){const s=e.children,r=t.children;if(k(s)&&k(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ui(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ui(t)}function Gr(e){if(e)for(let t=0;te.__isSuspense;function ru(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):uc(e)}const Ie=Symbol.for("v-fgt"),cs=Symbol.for("v-txt"),Ee=Symbol.for("v-cmt"),Mn=Symbol.for("v-stc"),cn=[];let Me=null;function Un(e=!1){cn.push(Me=e?null:[])}function ou(){cn.pop(),Me=cn[cn.length-1]||null}let gn=1;function Kn(e,t=!1){gn+=e,e<0&&Me&&t&&(Me.hasOnce=!0)}function $i(e){return e.dynamicChildren=gn>0?Me||kt:null,ou(),gn>0&&Me&&Me.push(e),e}function Of(e,t,n,s,r,o){return $i(qi(e,t,n,s,r,o,!0))}function Gn(e,t,n,s,r){return $i(xe(e,t,n,s,r,!0))}function mn(e){return e?e.__v_isVNode===!0:!1}function Ot(e,t){return e.type===t.type&&e.key===t.key}const Wi=({key:e})=>e??null,Dn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?fe(e)||ae(e)||$(e)?{i:_e,r:e,k:t,f:!!n}:e:null);function qi(e,t=null,n=null,s=0,r=null,o=e===Ie?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wi(t),ref:t&&Dn(t),scopeId:pi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:_e};return l?(mr(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=fe(n)?8:16),gn>0&&!i&&Me&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Me.push(c),c}const xe=iu;function iu(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Ic)&&(e=Ee),mn(e)){const l=Et(e,t,!0);return n&&mr(l,n),gn>0&&!o&&Me&&(l.shapeFlag&6?Me[Me.indexOf(e)]=l:Me.push(l)),l.patchFlag=-2,l}if(yu(e)&&(e=e.__vccOpts),t){t=lu(t);let{class:l,style:c}=t;l&&!fe(l)&&(t.class=tr(l)),se(c)&&(ns(c)&&!k(c)&&(c=ge({},c)),t.style=er(c))}const i=fe(e)?1:Gi(e)?128:_i(e)?64:se(e)?4:$(e)?2:0;return qi(e,t,n,s,r,i,o,!0)}function lu(e){return e?ns(e)||Fi(e)?ge({},e):e:null}function Et(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,a=t?uu(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Wi(a),ref:t&&t.ref?n&&o?k(o)?o.concat(Dn(t)):[o,Dn(t)]:Dn(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ie?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Et(e.ssContent),ssFallback:e.ssFallback&&Et(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&pn(u,c.clone(u)),u}function cu(e=" ",t=0){return xe(cs,null,e,t)}function Pf(e,t){const n=xe(Mn,null,e);return n.staticCount=t,n}function If(e="",t=!1){return t?(Un(),Gn(Ee,null,e)):xe(Ee,null,e)}function Ye(e){return e==null||typeof e=="boolean"?xe(Ee):k(e)?xe(Ie,null,e.slice()):mn(e)?ot(e):xe(cs,null,String(e))}function ot(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Et(e)}function mr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(k(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),mr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Fi(t)?t._ctx=_e:r===3&&_e&&(_e.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $(t)?(t={default:t,_ctx:_e},n=32):(t=String(t),s&64?(n=16,t=[cu(t)]):n=8);e.children=t,e.shapeFlag|=n}function uu(...e){const t={};for(let n=0;nAe||_e;let $n,Us;{const e=Zn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};$n=t("__VUE_INSTANCE_SETTERS__",n=>Ae=n),Us=t("__VUE_SSR_SETTERS__",n=>_n=n)}const Cn=e=>{const t=Ae;return $n(e),e.scope.on(),()=>{e.scope.off(),$n(t)}},$r=()=>{Ae&&Ae.scope.off(),$n(null)};function zi(e){return e.vnode.shapeFlag&4}let _n=!1;function du(e,t=!1,n=!1){t&&Us(t);const{props:s,children:r}=e.vnode,o=zi(e);zc(e,s,o,t),Xc(e,r,n||t);const i=o?pu(e,t):void 0;return t&&Us(!1),i}function pu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Mc);const{setup:s}=n;if(s){ut();const r=e.setupContext=s.length>1?mu(e):null,o=Cn(e),i=Sn(s,e,0,[e.props,r]),l=Vo(i);if(at(),o(),(l||e.sp)&&!Kt(e)&&Ci(e),l){if(i.then($r,$r),t)return i.then(c=>{Wr(e,c)}).catch(c=>{ss(c,e,0)});e.asyncDep=i}else Wr(e,i)}else Ji(e)}function Wr(e,t,n){$(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=ui(t)),Ji(e)}function Ji(e,t,n){const s=e.type;e.render||(e.render=s.render||Ze);{const r=Cn(e);ut();try{Dc(e)}finally{at(),r()}}}const gu={get(e,t){return be(e,"get",""),e[t]}};function mu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,gu),slots:e.slots,emit:e.emit,expose:t}}function us(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ui(cr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ln)return ln[n](e)},has(t,n){return n in t||n in ln}})):e.proxy}function _u(e,t=!0){return $(e)?e.displayName||e.name:e.name||t&&e.__name}function yu(e){return $(e)&&"__vccOpts"in e}const Ne=(e,t)=>rc(e,t,_n);function yr(e,t,n){try{Kn(-1);const s=arguments.length;return s===2?se(t)&&!k(t)?mn(t)?xe(e,null,[t]):xe(e,t):xe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&mn(n)&&(n=[n]),xe(e,t,n))}finally{Kn(1)}}const vu="3.5.31";/** +**/function Sn(e,t,n,s){try{return s?e(...s):e()}catch(r){ss(r,t,n)}}function ke(e,t,n,s){if($(e)){const r=Sn(e,t,n,s);return r&&Vo(r)&&r.catch(o=>{ss(o,t,n)}),r}if(H(e)){const r=[];for(let o=0;o>>1,r=Re[s],o=dn(r);o=dn(n)?Re.push(e):Re.splice(cc(t),0,e),e.flags|=1,fi()}}function fi(){jn||(jn=ai.then(di))}function uc(e){H(e)?Ut.push(...e):_t&&e.id===-1?_t.splice(Vt+1,0,e):e.flags&1||(Ut.push(e),e.flags|=1),fi()}function Pr(e,t,n=ze+1){for(;ndn(n)-dn(s));if(Ut.length=0,_t){_t.push(...t);return}for(_t=t,Vt=0;Vt<_t.length;Vt++){const n=_t[Vt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}_t=null,Vt=0}}const dn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function di(e){try{for(ze=0;ze{s._d&&Kn(-1);const o=Bn(t);let i;try{i=e(...r)}finally{Bn(o),s._d&&Kn(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function Sf(e,t){if(_e===null)return e;const n=us(_e),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&$(t)?t.call(s&&s.proxy):t}}function fc(){return!!(_r()||Nt)}const hc=Symbol.for("v-scx"),dc=()=>je(hc);function Cf(e,t){return fr(e,null,t)}function sn(e,t,n){return fr(e,t,n)}function fr(e,t,n=ie){const{immediate:s,deep:r,flush:o,once:i}=n,l=ge({},n),c=t&&s||!t&&o!=="post";let a;if(_n){if(o==="sync"){const m=dc();a=m.__watcherHandles||(m.__watcherHandles=[])}else if(!c){const m=()=>{};return m.stop=Ze,m.resume=Ze,m.pause=Ze,m}}const u=Ae;l.call=(m,A,S)=>ke(m,u,A,S);let f=!1;o==="post"?l.scheduler=m=>{ye(m,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(m,A)=>{A?m():ar(m)}),l.augmentJob=m=>{t&&(m.flags|=4),f&&(m.flags|=2,u&&(m.id=u.uid,m.i=u))};const p=ic(e,t,l);return _n&&(a?a.push(p):c&&p()),p}function pc(e,t,n){const s=this.proxy,r=fe(e)?e.includes(".")?gi(s,e):()=>s[e]:e.bind(s,s);let o;$(t)?o=t:(o=t.handler,n=t);const i=Cn(this),l=fr(r,o.bind(s),n);return i(),l}function gi(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,rn=e=>e&&(e.disabled||e.disabled===""),gc=e=>e&&(e.defer||e.defer===""),Ir=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Nr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ls=(e,t)=>{const n=e&&e.to;return fe(n)?t?t(n):null:n},yi={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,c,a){const{mc:u,pc:f,pbc:p,o:{insert:m,querySelector:A,createText:S,createComment:F}}=a,M=rn(t.props);let{shapeFlag:C,children:L,dynamicChildren:N}=t;if(e==null){const B=t.el=S(""),z=t.anchor=S("");m(B,n,s),m(z,n,s);const q=(w,U)=>{C&16&&u(L,w,U,r,o,i,l,c)},k=()=>{const w=t.target=Ls(t.props,A),U=Fs(w,t,S,m);w&&(i!=="svg"&&Ir(w)?i="svg":i!=="mathml"&&Nr(w)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(w),M||(q(w,U),Nn(t,!1)))};M&&(q(n,z),Nn(t,!0)),gc(t.props)||o&&o.pendingBranch?(t.el.__isMounted=!1,ye(()=>{t.el.__isMounted===!1&&(k(),delete t.el.__isMounted)},o)):k()}else{t.el=e.el,t.targetStart=e.targetStart;const B=t.anchor=e.anchor,z=t.target=e.target,q=t.targetAnchor=e.targetAnchor;if(e.el.__isMounted===!1){ye(()=>{yi.process(e,t,n,s,r,o,i,l,c,a)},o);return}const k=rn(e.props),w=k?n:z,U=k?B:q;if(i==="svg"||Ir(z)?i="svg":(i==="mathml"||Nr(z))&&(i="mathml"),N?(p(e.dynamicChildren,N,w,r,o,i,l),gr(e,t,!0)):c||f(e,t,w,U,r,o,i,l,!1),M)k?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Tn(t,n,B,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const J=t.target=Ls(t.props,A);J&&Tn(t,J,null,a,0)}else k&&Tn(t,z,q,a,1);Nn(t,M)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:f,props:p}=e;if(f&&(r(a),r(u)),o&&r(c),i&16){const m=o||!rn(p);for(let A=0;A{e.isMounted=!0}),Ri(()=>{e.isUnmounting=!0}),e}const Ve=[Function,Array],vi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ve,onEnter:Ve,onAfterEnter:Ve,onEnterCancelled:Ve,onBeforeLeave:Ve,onLeave:Ve,onAfterLeave:Ve,onLeaveCancelled:Ve,onBeforeAppear:Ve,onAppear:Ve,onAfterAppear:Ve,onAppearCancelled:Ve},bi=e=>{const t=e.subTree;return t.component?bi(t.component):t},yc={name:"BaseTransition",props:vi,setup(e,{slots:t}){const n=_r(),s=_c();return()=>{const r=t.default&&Si(t.default(),!0);if(!r||!r.length)return;const o=Ei(r),i=X(e),{mode:l}=i;if(s.isLeaving)return ys(o);const c=Mr(o);if(!c)return ys(o);let a=Vs(c,i,s,n,f=>a=f);c.type!==Ee&&pn(c,a);let u=n.subTree&&Mr(n.subTree);if(u&&u.type!==Ee&&!Ot(u,c)&&bi(n).type!==Ee){let f=Vs(u,i,s,n);if(pn(u,f),l==="out-in"&&c.type!==Ee)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},ys(o);l==="in-out"&&c.type!==Ee?f.delayLeave=(p,m,A)=>{const S=Ai(s,u);S[String(u.key)]=u,p[Je]=()=>{m(),p[Je]=void 0,delete a.delayedLeave,u=void 0},a.delayedLeave=()=>{A(),delete a.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Ei(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ee){t=n;break}}return t}const vc=yc;function Ai(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Vs(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:m,onAfterLeave:A,onLeaveCancelled:S,onBeforeAppear:F,onAppear:M,onAfterAppear:C,onAppearCancelled:L}=t,N=String(e.key),B=Ai(n,e),z=(w,U)=>{w&&ke(w,s,9,U)},q=(w,U)=>{const J=U[1];z(w,U),H(w)?w.every(P=>P.length<=1)&&J():w.length<=1&&J()},k={mode:i,persisted:l,beforeEnter(w){let U=c;if(!n.isMounted)if(o)U=F||c;else return;w[Je]&&w[Je](!0);const J=B[N];J&&Ot(e,J)&&J.el[Je]&&J.el[Je](),z(U,[w])},enter(w){if(B[N]===e)return;let U=a,J=u,P=f;if(!n.isMounted)if(o)U=M||a,J=C||u,P=L||f;else return;let Q=!1;w[Qt]=Se=>{Q||(Q=!0,Se?z(P,[w]):z(J,[w]),k.delayedLeave&&k.delayedLeave(),w[Qt]=void 0)};const he=w[Qt].bind(null,!1);U?q(U,[w,he]):he()},leave(w,U){const J=String(e.key);if(w[Qt]&&w[Qt](!0),n.isUnmounting)return U();z(p,[w]);let P=!1;w[Je]=he=>{P||(P=!0,U(),he?z(S,[w]):z(A,[w]),w[Je]=void 0,B[J]===e&&delete B[J])};const Q=w[Je].bind(null,!1);B[J]=e,m?q(m,[w,Q]):Q()},clone(w){const U=Vs(w,t,n,s,r);return r&&r(U),U}};return k}function ys(e){if(rs(e))return e=Et(e),e.children=null,e}function Mr(e){if(!rs(e))return _i(e.type)&&e.children?Ei(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&$(n.default))return n.default()}}function pn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,pn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Si(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;oon(S,t&&(H(t)?t[F]:t),n,s,r));return}if(Kt(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&on(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?us(s.component):s.el,i=r?null:o,{i:l,r:c}=e,a=t&&t.r,u=l.refs===ie?l.refs={}:l.refs,f=l.setupState,p=X(f),m=f===ie?Lo:S=>Dr(u,S)?!1:ne(p,S),A=(S,F)=>!(F&&Dr(u,F));if(a!=null&&a!==c){if(Lr(t),fe(a))u[a]=null,m(a)&&(f[a]=null);else if(ae(a)){const S=t;A(a,S.k)&&(a.value=null),S.k&&(u[S.k]=null)}}if($(c))Sn(c,l,12,[i,u]);else{const S=fe(c),F=ae(c);if(S||F){const M=()=>{if(e.f){const C=S?m(c)?f[c]:u[c]:A()||!e.k?c.value:u[e.k];if(r)H(C)&&Xs(C,o);else if(H(C))C.includes(o)||C.push(o);else if(S)u[c]=[o],m(c)&&(f[c]=u[c]);else{const L=[o];A(c,e.k)&&(c.value=L),e.k&&(u[e.k]=L)}}else S?(u[c]=i,m(c)&&(f[c]=i)):F&&(A(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const C=()=>{M(),Hn.delete(e)};C.id=-1,Hn.set(e,C),ye(C,n)}else Lr(e),M()}}}function Lr(e){const t=Hn.get(e);t&&(t.flags|=8,Hn.delete(e))}Zn().requestIdleCallback;Zn().cancelIdleCallback;const Kt=e=>!!e.type.__asyncLoader,rs=e=>e.type.__isKeepAlive;function bc(e,t){wi(e,"a",t)}function Ec(e,t){wi(e,"da",t)}function wi(e,t,n=Ae){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(os(t,s,n),n){let r=n.parent;for(;r&&r.parent;)rs(r.parent.vnode)&&Ac(s,t,n,r),r=r.parent}}function Ac(e,t,n,s){const r=os(t,e,s,!0);xi(()=>{Xs(s[t],r)},n)}function os(e,t,n=Ae,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ut();const l=Cn(n),c=ke(t,n,e,i);return l(),at(),c});return s?r.unshift(o):r.push(o),o}}const ht=e=>(t,n=Ae)=>{(!_n||e==="sp")&&os(e,(...s)=>t(...s),n)},Sc=ht("bm"),is=ht("m"),Cc=ht("bu"),wc=ht("u"),Ri=ht("bum"),xi=ht("um"),Rc=ht("sp"),xc=ht("rtg"),Tc=ht("rtc");function Oc(e,t=Ae){os("ec",e,t)}const Pc="components";function Rf(e,t){return Nc(Pc,e,!0,t)||e}const Ic=Symbol.for("v-ndc");function Nc(e,t,n=!0,s=!1){const r=_e||Ae;if(r){const o=r.type;{const l=_u(o,!1);if(l&&(l===t||l===Te(t)||l===Xn(Te(t))))return o}const i=Fr(r[e]||o[e],t)||Fr(r.appContext[e],t);return!i&&s?o:i}}function Fr(e,t){return e&&(e[t]||e[Te(t)]||e[Xn(Te(t))])}function xf(e,t,n,s){let r;const o=n,i=H(e);if(i||fe(e)){const l=i&&ct(e);let c=!1,a=!1;l&&(c=!De(e),a=ft(e),e=ts(e)),r=new Array(e.length);for(let u=0,f=e.length;ut(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;c0;return t!=="default"&&(n.name=t),Un(),Gn(Ie,null,[xe("slot",n,s)],a?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),Un();const i=o&&Ti(o(n)),l=n.key||i&&i.key,c=Gn(Ie,{key:(l&&!Le(l)?l:`_${t}`)+(!i&&s?"_fb":"")},i||[],i&&e._===1?64:-2);return o&&o._c&&(o._d=!0),c}function Ti(e){return e.some(t=>mn(t)?!(t.type===Ee||t.type===Ie&&!Ti(t.children)):!0)?e:null}const js=e=>e?zi(e)?us(e):js(e.parent):null,ln=ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>js(e.parent),$root:e=>js(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Pi(e),$forceUpdate:e=>e.f||(e.f=()=>{ar(e.update)}),$nextTick:e=>e.n||(e.n=ur.bind(e.proxy)),$watch:e=>pc.bind(e)}),vs=(e,t)=>e!==ie&&!e.__isScriptSetup&&ne(e,t),Mc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(vs(s,t))return i[t]=1,s[t];if(r!==ie&&ne(r,t))return i[t]=2,r[t];if(ne(o,t))return i[t]=3,o[t];if(n!==ie&&ne(n,t))return i[t]=4,n[t];Bs&&(i[t]=0)}}const a=ln[t];let u,f;if(a)return t==="$attrs"&&be(e.attrs,"get",""),a(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ie&&ne(n,t))return i[t]=4,n[t];if(f=c.config.globalProperties,ne(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return vs(r,t)?(r[t]=n,!0):s!==ie&&ne(s,t)?(s[t]=n,!0):ne(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let c;return!!(n[l]||e!==ie&&l[0]!=="$"&&ne(e,l)||vs(t,l)||ne(o,l)||ne(s,l)||ne(ln,l)||ne(r.config.globalProperties,l)||(c=i.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ne(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Vr(e){return H(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Bs=!0;function Dc(e){const t=Pi(e),n=e.proxy,s=e.ctx;Bs=!1,t.beforeCreate&&jr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:f,mounted:p,beforeUpdate:m,updated:A,activated:S,deactivated:F,beforeDestroy:M,beforeUnmount:C,destroyed:L,unmounted:N,render:B,renderTracked:z,renderTriggered:q,errorCaptured:k,serverPrefetch:w,expose:U,inheritAttrs:J,components:P,directives:Q,filters:he}=t;if(a&&Lc(a,s,null),i)for(const W in i){const ee=i[W];$(ee)&&(s[W]=ee.bind(n))}if(r){const W=r.call(n,n);se(W)&&(e.data=An(W))}if(Bs=!0,o)for(const W in o){const ee=o[W],et=$(ee)?ee.bind(n,n):$(ee.get)?ee.get.bind(n,n):Ze,dt=!$(ee)&&$(ee.set)?ee.set.bind(n):Ze,Ke=Ne({get:et,set:dt});Object.defineProperty(s,W,{enumerable:!0,configurable:!0,get:()=>Ke.value,set:Oe=>Ke.value=Oe})}if(l)for(const W in l)Oi(l[W],s,n,W);if(c){const W=$(c)?c.call(n):c;Reflect.ownKeys(W).forEach(ee=>{In(ee,W[ee])})}u&&jr(u,e,"c");function re(W,ee){H(ee)?ee.forEach(et=>W(et.bind(n))):ee&&W(ee.bind(n))}if(re(Sc,f),re(is,p),re(Cc,m),re(wc,A),re(bc,S),re(Ec,F),re(Oc,k),re(Tc,z),re(xc,q),re(Ri,C),re(xi,N),re(Rc,w),H(U))if(U.length){const W=e.exposed||(e.exposed={});U.forEach(ee=>{Object.defineProperty(W,ee,{get:()=>n[ee],set:et=>n[ee]=et,enumerable:!0})})}else e.exposed||(e.exposed={});B&&e.render===Ze&&(e.render=B),J!=null&&(e.inheritAttrs=J),P&&(e.components=P),Q&&(e.directives=Q),w&&Ci(e)}function Lc(e,t,n=Ze){H(e)&&(e=Hs(e));for(const s in e){const r=e[s];let o;se(r)?"default"in r?o=je(r.from||s,r.default,!0):o=je(r.from||s):o=je(r),ae(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function jr(e,t,n){ke(H(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Oi(e,t,n,s){let r=s.includes(".")?gi(n,s):()=>n[s];if(fe(e)){const o=t[e];$(o)&&sn(r,o)}else if($(e))sn(r,e.bind(n));else if(se(e))if(H(e))e.forEach(o=>Oi(o,t,n,s));else{const o=$(e.handler)?e.handler.bind(n):t[e.handler];$(o)&&sn(r,o,e)}}function Pi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>kn(c,a,i,!0)),kn(c,t,i)),se(t)&&o.set(t,c),c}function kn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&kn(e,o,n,!0),r&&r.forEach(i=>kn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Fc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Fc={data:Br,props:Hr,emits:Hr,methods:Zt,computed:Zt,beforeCreate:Ce,created:Ce,beforeMount:Ce,mounted:Ce,beforeUpdate:Ce,updated:Ce,beforeDestroy:Ce,beforeUnmount:Ce,destroyed:Ce,unmounted:Ce,activated:Ce,deactivated:Ce,errorCaptured:Ce,serverPrefetch:Ce,components:Zt,directives:Zt,watch:jc,provide:Br,inject:Vc};function Br(e,t){return t?e?function(){return ge($(e)?e.call(this,this):e,$(t)?t.call(this,this):t)}:t:e}function Vc(e,t){return Zt(Hs(e),Hs(t))}function Hs(e){if(H(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Te(t)}Modifiers`]||e[`${At(t)}Modifiers`];function Uc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ie;let r=n;const o=t.startsWith("update:"),i=o&&kc(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>fe(u)?u.trim():u)),i.number&&(r=n.map(Zs)));let l,c=s[l=ds(t)]||s[l=ds(Te(t))];!c&&o&&(c=s[l=ds(At(t))]),c&&ke(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ke(a,e,6,r)}}const Kc=new WeakMap;function Ni(e,t,n=!1){const s=n?Kc:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!$(e)){const c=a=>{const u=Ni(a,t,!0);u&&(l=!0,ge(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(se(e)&&s.set(e,null),null):(H(o)?o.forEach(c=>i[c]=null):ge(i,o),se(e)&&s.set(e,i),i)}function ls(e,t){return!e||!zn(t)?!1:(t=t.slice(2).replace(/Once$/,""),ne(e,t[0].toLowerCase()+t.slice(1))||ne(e,At(t))||ne(e,t))}function kr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:a,renderCache:u,props:f,data:p,setupState:m,ctx:A,inheritAttrs:S}=e,F=Bn(e);let M,C;try{if(n.shapeFlag&4){const N=r||s,B=N;M=Ye(a.call(B,N,u,f,m,p,A)),C=l}else{const N=t;M=Ye(N.length>1?N(f,{attrs:l,slots:i,emit:c}):N(f,null)),C=t.props?l:Gc(l)}}catch(N){cn.length=0,ss(N,e,1),M=xe(Ee)}let L=M;if(C&&S!==!1){const N=Object.keys(C),{shapeFlag:B}=L;N.length&&B&7&&(o&&N.some(Jn)&&(C=$c(C,o)),L=Et(L,C,!1,!0))}return n.dirs&&(L=Et(L,null,!1,!0),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition&&pn(L,n.transition),M=L,Bn(F),M}const Gc=e=>{let t;for(const n in e)(n==="class"||n==="style"||zn(n))&&((t||(t={}))[n]=e[n]);return t},$c=(e,t)=>{const n={};for(const s in e)(!Jn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Wc(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Ur(s,i,a):!!i;if(c&8){const u=t.dynamicProps;for(let f=0;fObject.create(Di),Fi=e=>Object.getPrototypeOf(e)===Di;function zc(e,t,n,s=!1){const r={},o=Li();e.propsDefaults=Object.create(null),Vi(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:li(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Jc(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=X(r),[c]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[p,m]=ji(f,t,!0);ge(i,p),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return se(e)&&s.set(e,Ht),Ht;if(H(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",pr=e=>H(e)?e.map(Ye):[Ye(e)],Yc=(e,t,n)=>{if(t._n)return t;const s=ac((...r)=>pr(t(...r)),n);return s._c=!1,s},Bi=(e,t,n)=>{const s=e._ctx;for(const r in e){if(dr(r))continue;const o=e[r];if($(o))t[r]=Yc(r,o,s);else if(o!=null){const i=pr(o);t[r]=()=>i}}},Hi=(e,t)=>{const n=pr(t);e.slots.default=()=>n},ki=(e,t,n)=>{for(const s in t)(n||!dr(s))&&(e[s]=t[s])},Xc=(e,t,n)=>{const s=e.slots=Li();if(e.vnode.shapeFlag&32){const r=t._;r?(ki(s,t,n),n&&Ho(s,"_",r,!0)):Bi(t,s)}else t&&Hi(e,t)},Zc=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=ie;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:ki(r,t,n):(o=!t.$stable,Bi(t,r)),i=t}else t&&(Hi(e,t),i={default:1});if(o)for(const l in r)!dr(l)&&i[l]==null&&delete r[l]},ye=ru;function eu(e){return tu(e)}function tu(e,t){const n=Zn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:a,setElementText:u,parentNode:f,nextSibling:p,setScopeId:m=Ze,insertStaticContent:A}=e,S=(h,d,g,_=null,b=null,y=null,T=void 0,x=null,R=!!d.dynamicChildren)=>{if(h===d)return;h&&!Ot(h,d)&&(_=v(h),Oe(h,b,y,!0),h=null),d.patchFlag===-2&&(R=!1,d.dynamicChildren=null);const{type:E,ref:K,shapeFlag:I}=d;switch(E){case cs:F(h,d,g,_);break;case Ee:M(h,d,g,_);break;case Mn:h==null&&C(d,g,_,T);break;case Ie:P(h,d,g,_,b,y,T,x,R);break;default:I&1?B(h,d,g,_,b,y,T,x,R):I&6?Q(h,d,g,_,b,y,T,x,R):(I&64||I&128)&&E.process(h,d,g,_,b,y,T,x,R,V)}K!=null&&b?on(K,h&&h.ref,y,d||h,!d):K==null&&h&&h.ref!=null&&on(h.ref,null,y,h,!0)},F=(h,d,g,_)=>{if(h==null)s(d.el=l(d.children),g,_);else{const b=d.el=h.el;d.children!==h.children&&a(b,d.children)}},M=(h,d,g,_)=>{h==null?s(d.el=c(d.children||""),g,_):d.el=h.el},C=(h,d,g,_)=>{[h.el,h.anchor]=A(h.children,d,g,_,h.el,h.anchor)},L=({el:h,anchor:d},g,_)=>{let b;for(;h&&h!==d;)b=p(h),s(h,g,_),h=b;s(d,g,_)},N=({el:h,anchor:d})=>{let g;for(;h&&h!==d;)g=p(h),r(h),h=g;r(d)},B=(h,d,g,_,b,y,T,x,R)=>{if(d.type==="svg"?T="svg":d.type==="math"&&(T="mathml"),h==null)z(d,g,_,b,y,T,x,R);else{const E=h.el&&h.el._isVueCE?h.el:null;try{E&&E._beginPatch(),w(h,d,b,y,T,x,R)}finally{E&&E._endPatch()}}},z=(h,d,g,_,b,y,T,x)=>{let R,E;const{props:K,shapeFlag:I,transition:j,dirs:G}=h;if(R=h.el=i(h.type,y,K&&K.is,K),I&8?u(R,h.children):I&16&&k(h.children,R,null,_,b,bs(h,y),T,x),G&&Ct(h,null,_,"created"),q(R,h,h.scopeId,T,_),K){for(const oe in K)oe!=="value"&&!en(oe)&&o(R,oe,null,K[oe],y,_);"value"in K&&o(R,"value",null,K.value,y),(E=K.onVnodeBeforeMount)&&qe(E,_,h)}G&&Ct(h,null,_,"beforeMount");const Z=nu(b,j);Z&&j.beforeEnter(R),s(R,d,g),((E=K&&K.onVnodeMounted)||Z||G)&&ye(()=>{try{E&&qe(E,_,h),Z&&j.enter(R),G&&Ct(h,null,_,"mounted")}finally{}},b)},q=(h,d,g,_,b)=>{if(g&&m(h,g),_)for(let y=0;y<_.length;y++)m(h,_[y]);if(b){let y=b.subTree;if(d===y||Gi(y.type)&&(y.ssContent===d||y.ssFallback===d)){const T=b.vnode;q(h,T,T.scopeId,T.slotScopeIds,b.parent)}}},k=(h,d,g,_,b,y,T,x,R=0)=>{for(let E=R;E{const x=d.el=h.el;let{patchFlag:R,dynamicChildren:E,dirs:K}=d;R|=h.patchFlag&16;const I=h.props||ie,j=d.props||ie;let G;if(g&&wt(g,!1),(G=j.onVnodeBeforeUpdate)&&qe(G,g,d,h),K&&Ct(d,h,g,"beforeUpdate"),g&&wt(g,!0),(I.innerHTML&&j.innerHTML==null||I.textContent&&j.textContent==null)&&u(x,""),E?U(h.dynamicChildren,E,x,g,_,bs(d,b),y):T||ee(h,d,x,null,g,_,bs(d,b),y,!1),R>0){if(R&16)J(x,I,j,g,b);else if(R&2&&I.class!==j.class&&o(x,"class",null,j.class,b),R&4&&o(x,"style",I.style,j.style,b),R&8){const Z=d.dynamicProps;for(let oe=0;oe{G&&qe(G,g,d,h),K&&Ct(d,h,g,"updated")},_)},U=(h,d,g,_,b,y,T)=>{for(let x=0;x{if(d!==g){if(d!==ie)for(const y in d)!en(y)&&!(y in g)&&o(h,y,d[y],null,b,_);for(const y in g){if(en(y))continue;const T=g[y],x=d[y];T!==x&&y!=="value"&&o(h,y,x,T,b,_)}"value"in g&&o(h,"value",d.value,g.value,b)}},P=(h,d,g,_,b,y,T,x,R)=>{const E=d.el=h?h.el:l(""),K=d.anchor=h?h.anchor:l("");let{patchFlag:I,dynamicChildren:j,slotScopeIds:G}=d;G&&(x=x?x.concat(G):G),h==null?(s(E,g,_),s(K,g,_),k(d.children||[],g,K,b,y,T,x,R)):I>0&&I&64&&j&&h.dynamicChildren&&h.dynamicChildren.length===j.length?(U(h.dynamicChildren,j,g,b,y,T,x),(d.key!=null||b&&d===b.subTree)&&gr(h,d,!0)):ee(h,d,g,K,b,y,T,x,R)},Q=(h,d,g,_,b,y,T,x,R)=>{d.slotScopeIds=x,h==null?d.shapeFlag&512?b.ctx.activate(d,g,_,T,R):he(d,g,_,b,y,T,R):Se(h,d,R)},he=(h,d,g,_,b,y,T)=>{const x=h.component=hu(h,_,b);if(rs(h)&&(x.ctx.renderer=V),du(x,!1,T),x.asyncDep){if(b&&b.registerDep(x,re,T),!h.el){const R=x.subTree=xe(Ee);M(null,R,d,g),h.placeholder=R.el}}else re(x,h,d,g,b,y,T)},Se=(h,d,g)=>{const _=d.component=h.component;if(Wc(h,d,g))if(_.asyncDep&&!_.asyncResolved){W(_,d,g);return}else _.next=d,_.update();else d.el=h.el,_.vnode=d},re=(h,d,g,_,b,y,T)=>{const x=()=>{if(h.isMounted){let{next:I,bu:j,u:G,parent:Z,vnode:oe}=h;{const $e=Ui(h);if($e){I&&(I.el=oe.el,W(h,I,T)),$e.asyncDep.then(()=>{ye(()=>{h.isUnmounted||E()},b)});return}}let le=I,de;wt(h,!1),I?(I.el=oe.el,W(h,I,T)):I=oe,j&&Pn(j),(de=I.props&&I.props.onVnodeBeforeUpdate)&&qe(de,Z,I,oe),wt(h,!0);const me=kr(h),Ge=h.subTree;h.subTree=me,S(Ge,me,f(Ge.el),v(Ge),h,b,y),I.el=me.el,le===null&&qc(h,me.el),G&&ye(G,b),(de=I.props&&I.props.onVnodeUpdated)&&ye(()=>qe(de,Z,I,oe),b)}else{let I;const{el:j,props:G}=d,{bm:Z,m:oe,parent:le,root:de,type:me}=h,Ge=Kt(d);wt(h,!1),Z&&Pn(Z),!Ge&&(I=G&&G.onVnodeBeforeMount)&&qe(I,le,d),wt(h,!0);{de.ce&&de.ce._hasShadowRoot()&&de.ce._injectChildStyle(me,h.parent?h.parent.type:void 0);const $e=h.subTree=kr(h);S(null,$e,g,_,h,b,y),d.el=$e.el}if(oe&&ye(oe,b),!Ge&&(I=G&&G.onVnodeMounted)){const $e=d;ye(()=>qe(I,le,$e),b)}(d.shapeFlag&256||le&&Kt(le.vnode)&&le.vnode.shapeFlag&256)&&h.a&&ye(h.a,b),h.isMounted=!0,d=g=_=null}};h.scope.on();const R=h.effect=new qo(x);h.scope.off();const E=h.update=R.run.bind(R),K=h.job=R.runIfDirty.bind(R);K.i=h,K.id=h.uid,R.scheduler=()=>ar(K),wt(h,!0),E()},W=(h,d,g)=>{d.component=h;const _=h.vnode.props;h.vnode=d,h.next=null,Jc(h,d.props,_,g),Zc(h,d.children,g),ut(),Pr(h),at()},ee=(h,d,g,_,b,y,T,x,R=!1)=>{const E=h&&h.children,K=h?h.shapeFlag:0,I=d.children,{patchFlag:j,shapeFlag:G}=d;if(j>0){if(j&128){dt(E,I,g,_,b,y,T,x,R);return}else if(j&256){et(E,I,g,_,b,y,T,x,R);return}}G&8?(K&16&&Fe(E,b,y),I!==E&&u(g,I)):K&16?G&16?dt(E,I,g,_,b,y,T,x,R):Fe(E,b,y,!0):(K&8&&u(g,""),G&16&&k(I,g,_,b,y,T,x,R))},et=(h,d,g,_,b,y,T,x,R)=>{h=h||Ht,d=d||Ht;const E=h.length,K=d.length,I=Math.min(E,K);let j;for(j=0;jK?Fe(h,b,y,!0,!1,I):k(d,g,_,b,y,T,x,R,I)},dt=(h,d,g,_,b,y,T,x,R)=>{let E=0;const K=d.length;let I=h.length-1,j=K-1;for(;E<=I&&E<=j;){const G=h[E],Z=d[E]=R?ot(d[E]):Ye(d[E]);if(Ot(G,Z))S(G,Z,g,null,b,y,T,x,R);else break;E++}for(;E<=I&&E<=j;){const G=h[I],Z=d[j]=R?ot(d[j]):Ye(d[j]);if(Ot(G,Z))S(G,Z,g,null,b,y,T,x,R);else break;I--,j--}if(E>I){if(E<=j){const G=j+1,Z=Gj)for(;E<=I;)Oe(h[E],b,y,!0),E++;else{const G=E,Z=E,oe=new Map;for(E=Z;E<=j;E++){const Pe=d[E]=R?ot(d[E]):Ye(d[E]);Pe.key!=null&&oe.set(Pe.key,E)}let le,de=0;const me=j-Z+1;let Ge=!1,$e=0;const zt=new Array(me);for(E=0;E=me){Oe(Pe,b,y,!0);continue}let We;if(Pe.key!=null)We=oe.get(Pe.key);else for(le=Z;le<=j;le++)if(zt[le-Z]===0&&Ot(Pe,d[le])){We=le;break}We===void 0?Oe(Pe,b,y,!0):(zt[We-Z]=E+1,We>=$e?$e=We:Ge=!0,S(Pe,d[We],g,null,b,y,T,x,R),de++)}const Sr=Ge?su(zt):Ht;for(le=Sr.length-1,E=me-1;E>=0;E--){const Pe=Z+E,We=d[Pe],Cr=d[Pe+1],wr=Pe+1{const{el:y,type:T,transition:x,children:R,shapeFlag:E}=h;if(E&6){Ke(h.component.subTree,d,g,_);return}if(E&128){h.suspense.move(d,g,_);return}if(E&64){T.move(h,d,g,V);return}if(T===Ie){s(y,d,g);for(let I=0;Ix.enter(y),b);else{const{leave:I,delayLeave:j,afterLeave:G}=x,Z=()=>{h.ctx.isUnmounted?r(y):s(y,d,g)},oe=()=>{y._isLeaving&&y[Je](!0),I(y,()=>{Z(),G&&G()})};j?j(y,Z,oe):oe()}else s(y,d,g)},Oe=(h,d,g,_=!1,b=!1)=>{const{type:y,props:T,ref:x,children:R,dynamicChildren:E,shapeFlag:K,patchFlag:I,dirs:j,cacheIndex:G,memo:Z}=h;if(I===-2&&(b=!1),x!=null&&(ut(),on(x,null,g,h,!0),at()),G!=null&&(d.renderCache[G]=void 0),K&256){d.ctx.deactivate(h);return}const oe=K&1&&j,le=!Kt(h);let de;if(le&&(de=T&&T.onVnodeBeforeUnmount)&&qe(de,d,h),K&6)St(h.component,g,_);else{if(K&128){h.suspense.unmount(g,_);return}oe&&Ct(h,null,d,"beforeUnmount"),K&64?h.type.remove(h,d,g,V,_):E&&!E.hasOnce&&(y!==Ie||I>0&&I&64)?Fe(E,d,g,!1,!0):(y===Ie&&I&384||!b&&K&16)&&Fe(R,d,g),_&&Mt(h)}const me=Z!=null&&G==null;(le&&(de=T&&T.onVnodeUnmounted)||oe||me)&&ye(()=>{de&&qe(de,d,h),oe&&Ct(h,null,d,"unmounted"),me&&(h.el=null)},g)},Mt=h=>{const{type:d,el:g,anchor:_,transition:b}=h;if(d===Ie){Dt(g,_);return}if(d===Mn){N(h);return}const y=()=>{r(g),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(h.shapeFlag&1&&b&&!b.persisted){const{leave:T,delayLeave:x}=b,R=()=>T(g,y);x?x(h.el,y,R):R()}else y()},Dt=(h,d)=>{let g;for(;h!==d;)g=p(h),r(h),h=g;r(d)},St=(h,d,g)=>{const{bum:_,scope:b,job:y,subTree:T,um:x,m:R,a:E}=h;Gr(R),Gr(E),_&&Pn(_),b.stop(),y&&(y.flags|=8,Oe(T,h,d,g)),x&&ye(x,d),ye(()=>{h.isUnmounted=!0},d)},Fe=(h,d,g,_=!1,b=!1,y=0)=>{for(let T=y;T{if(h.shapeFlag&6)return v(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const d=p(h.anchor||h.el),g=d&&d[mi];return g?p(g):d};let D=!1;const O=(h,d,g)=>{let _;h==null?d._vnode&&(Oe(d._vnode,null,null,!0),_=d._vnode.component):S(d._vnode||null,h,d,null,null,null,g),d._vnode=h,D||(D=!0,Pr(_),hi(),D=!1)},V={p:S,um:Oe,m:Ke,r:Mt,mt:he,mc:k,pc:ee,pbc:U,n:v,o:e};return{render:O,hydrate:void 0,createApp:Hc(O)}}function bs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function wt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function nu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function gr(e,t,n=!1){const s=e.children,r=t.children;if(H(s)&&H(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ui(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ui(t)}function Gr(e){if(e)for(let t=0;te.__isSuspense;function ru(e,t){t&&t.pendingBranch?H(e)?t.effects.push(...e):t.effects.push(e):uc(e)}const Ie=Symbol.for("v-fgt"),cs=Symbol.for("v-txt"),Ee=Symbol.for("v-cmt"),Mn=Symbol.for("v-stc"),cn=[];let Me=null;function Un(e=!1){cn.push(Me=e?null:[])}function ou(){cn.pop(),Me=cn[cn.length-1]||null}let gn=1;function Kn(e,t=!1){gn+=e,e<0&&Me&&t&&(Me.hasOnce=!0)}function $i(e){return e.dynamicChildren=gn>0?Me||Ht:null,ou(),gn>0&&Me&&Me.push(e),e}function Of(e,t,n,s,r,o){return $i(qi(e,t,n,s,r,o,!0))}function Gn(e,t,n,s,r){return $i(xe(e,t,n,s,r,!0))}function mn(e){return e?e.__v_isVNode===!0:!1}function Ot(e,t){return e.type===t.type&&e.key===t.key}const Wi=({key:e})=>e??null,Dn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?fe(e)||ae(e)||$(e)?{i:_e,r:e,k:t,f:!!n}:e:null);function qi(e,t=null,n=null,s=0,r=null,o=e===Ie?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wi(t),ref:t&&Dn(t),scopeId:pi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:_e};return l?(mr(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=fe(n)?8:16),gn>0&&!i&&Me&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Me.push(c),c}const xe=iu;function iu(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Ic)&&(e=Ee),mn(e)){const l=Et(e,t,!0);return n&&mr(l,n),gn>0&&!o&&Me&&(l.shapeFlag&6?Me[Me.indexOf(e)]=l:Me.push(l)),l.patchFlag=-2,l}if(yu(e)&&(e=e.__vccOpts),t){t=lu(t);let{class:l,style:c}=t;l&&!fe(l)&&(t.class=tr(l)),se(c)&&(ns(c)&&!H(c)&&(c=ge({},c)),t.style=er(c))}const i=fe(e)?1:Gi(e)?128:_i(e)?64:se(e)?4:$(e)?2:0;return qi(e,t,n,s,r,i,o,!0)}function lu(e){return e?ns(e)||Fi(e)?ge({},e):e:null}function Et(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,a=t?uu(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Wi(a),ref:t&&t.ref?n&&o?H(o)?o.concat(Dn(t)):[o,Dn(t)]:Dn(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ie?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Et(e.ssContent),ssFallback:e.ssFallback&&Et(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&pn(u,c.clone(u)),u}function cu(e=" ",t=0){return xe(cs,null,e,t)}function Pf(e,t){const n=xe(Mn,null,e);return n.staticCount=t,n}function If(e="",t=!1){return t?(Un(),Gn(Ee,null,e)):xe(Ee,null,e)}function Ye(e){return e==null||typeof e=="boolean"?xe(Ee):H(e)?xe(Ie,null,e.slice()):mn(e)?ot(e):xe(cs,null,String(e))}function ot(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Et(e)}function mr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(H(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),mr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Fi(t)?t._ctx=_e:r===3&&_e&&(_e.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $(t)?(t={default:t,_ctx:_e},n=32):(t=String(t),s&64?(n=16,t=[cu(t)]):n=8);e.children=t,e.shapeFlag|=n}function uu(...e){const t={};for(let n=0;nAe||_e;let $n,Us;{const e=Zn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};$n=t("__VUE_INSTANCE_SETTERS__",n=>Ae=n),Us=t("__VUE_SSR_SETTERS__",n=>_n=n)}const Cn=e=>{const t=Ae;return $n(e),e.scope.on(),()=>{e.scope.off(),$n(t)}},$r=()=>{Ae&&Ae.scope.off(),$n(null)};function zi(e){return e.vnode.shapeFlag&4}let _n=!1;function du(e,t=!1,n=!1){t&&Us(t);const{props:s,children:r}=e.vnode,o=zi(e);zc(e,s,o,t),Xc(e,r,n||t);const i=o?pu(e,t):void 0;return t&&Us(!1),i}function pu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Mc);const{setup:s}=n;if(s){ut();const r=e.setupContext=s.length>1?mu(e):null,o=Cn(e),i=Sn(s,e,0,[e.props,r]),l=Vo(i);if(at(),o(),(l||e.sp)&&!Kt(e)&&Ci(e),l){if(i.then($r,$r),t)return i.then(c=>{Wr(e,c)}).catch(c=>{ss(c,e,0)});e.asyncDep=i}else Wr(e,i)}else Ji(e)}function Wr(e,t,n){$(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=ui(t)),Ji(e)}function Ji(e,t,n){const s=e.type;e.render||(e.render=s.render||Ze);{const r=Cn(e);ut();try{Dc(e)}finally{at(),r()}}}const gu={get(e,t){return be(e,"get",""),e[t]}};function mu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,gu),slots:e.slots,emit:e.emit,expose:t}}function us(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ui(cr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ln)return ln[n](e)},has(t,n){return n in t||n in ln}})):e.proxy}function _u(e,t=!0){return $(e)?e.displayName||e.name:e.name||t&&e.__name}function yu(e){return $(e)&&"__vccOpts"in e}const Ne=(e,t)=>rc(e,t,_n);function yr(e,t,n){try{Kn(-1);const s=arguments.length;return s===2?se(t)&&!H(t)?mn(t)?xe(e,null,[t]):xe(e,t):xe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&mn(n)&&(n=[n]),xe(e,t,n))}finally{Kn(1)}}const vu="3.5.31";/** * @vue/runtime-dom v3.5.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Ks;const qr=typeof window<"u"&&window.trustedTypes;if(qr)try{Ks=qr.createPolicy("vue",{createHTML:e=>e})}catch{}const Qi=Ks?e=>Ks.createHTML(e):e=>e,bu="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1998/Math/MathML",rt=typeof document<"u"?document:null,zr=rt&&rt.createElement("template"),Au={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?rt.createElementNS(bu,e):t==="mathml"?rt.createElementNS(Eu,e):n?rt.createElement(e,{is:n}):rt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>rt.createTextNode(e),createComment:e=>rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{zr.innerHTML=Qi(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=zr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pt="transition",Yt="animation",yn=Symbol("_vtc"),Yi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Su=ge({},vi,Yi),Cu=e=>(e.displayName="Transition",e.props=Su,e),Nf=Cu((e,{slots:t})=>yr(vc,wu(e),t)),Rt=(e,t=[])=>{k(e)?e.forEach(n=>n(...t)):e&&e(...t)},Jr=e=>e?k(e)?e.some(t=>t.length>1):e.length>1:!1;function wu(e){const t={};for(const P in e)P in Yi||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:a=i,appearToClass:u=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,A=Ru(r),S=A&&A[0],F=A&&A[1],{onBeforeEnter:M,onEnter:C,onEnterCancelled:L,onLeave:N,onLeaveCancelled:B,onBeforeAppear:z=M,onAppear:q=C,onAppearCancelled:H=L}=t,w=(P,Q,he,Se)=>{P._enterCancelled=Se,xt(P,Q?u:l),xt(P,Q?a:i),he&&he()},U=(P,Q)=>{P._isLeaving=!1,xt(P,f),xt(P,m),xt(P,p),Q&&Q()},J=P=>(Q,he)=>{const Se=P?q:C,re=()=>w(Q,P,he);Rt(Se,[Q,re]),Qr(()=>{xt(Q,P?c:o),nt(Q,P?u:l),Jr(Se)||Yr(Q,s,S,re)})};return ge(t,{onBeforeEnter(P){Rt(M,[P]),nt(P,o),nt(P,i)},onBeforeAppear(P){Rt(z,[P]),nt(P,c),nt(P,a)},onEnter:J(!1),onAppear:J(!0),onLeave(P,Q){P._isLeaving=!0;const he=()=>U(P,Q);nt(P,f),P._enterCancelled?(nt(P,p),eo(P)):(eo(P),nt(P,p)),Qr(()=>{P._isLeaving&&(xt(P,f),nt(P,m),Jr(N)||Yr(P,s,F,he))}),Rt(N,[P,he])},onEnterCancelled(P){w(P,!1,void 0,!0),Rt(L,[P])},onAppearCancelled(P){w(P,!0,void 0,!0),Rt(H,[P])},onLeaveCancelled(P){U(P),Rt(B,[P])}})}function Ru(e){if(e==null)return null;if(se(e))return[Es(e.enter),Es(e.leave)];{const t=Es(e);return[t,t]}}function Es(e){return El(e)}function nt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[yn]||(e[yn]=new Set)).add(t)}function xt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[yn];n&&(n.delete(t),n.size||(e[yn]=void 0))}function Qr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let xu=0;function Yr(e,t,n,s){const r=e._endId=++xu,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:c}=Tu(e,t);if(!i)return s();const a=i+"end";let u=0;const f=()=>{e.removeEventListener(a,p),o()},p=m=>{m.target===e&&++u>=c&&f()};setTimeout(()=>{u(n[A]||"").split(", "),r=s(`${pt}Delay`),o=s(`${pt}Duration`),i=Xr(r,o),l=s(`${Yt}Delay`),c=s(`${Yt}Duration`),a=Xr(l,c);let u=null,f=0,p=0;t===pt?i>0&&(u=pt,f=i,p=o.length):t===Yt?a>0&&(u=Yt,f=a,p=c.length):(f=Math.max(i,a),u=f>0?i>a?pt:Yt:null,p=u?u===pt?o.length:c.length:0);const m=u===pt&&/\b(?:transform|all)(?:,|$)/.test(s(`${pt}Property`).toString());return{type:u,timeout:f,propCount:p,hasTransform:m}}function Xr(e,t){for(;e.lengthZr(n)+Zr(e[s])))}function Zr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function eo(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ou(e,t,n){const s=e[yn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const to=Symbol("_vod"),Pu=Symbol("_vsh"),Iu=Symbol(""),Nu=/(?:^|;)\s*display\s*:/;function Mu(e,t,n){const s=e.style,r=fe(n);let o=!1;if(n&&!r){if(t)if(fe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Ln(s,l,"")}else for(const i in t)n[i]==null&&Ln(s,i,"");for(const i in n)i==="display"&&(o=!0),Ln(s,i,n[i])}else if(r){if(t!==n){const i=s[Iu];i&&(n+=";"+i),s.cssText=n,o=Nu.test(n)}}else t&&e.removeAttribute("style");to in e&&(e[to]=o?s.display:"",e[Pu]&&(s.display="none"))}const no=/\s*!important$/;function Ln(e,t,n){if(k(n))n.forEach(s=>Ln(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Du(e,t);no.test(n)?e.setProperty(At(s),n.replace(no,""),"important"):e[s]=n}}const so=["Webkit","Moz","ms"],As={};function Du(e,t){const n=As[t];if(n)return n;let s=Te(t);if(s!=="filter"&&s in e)return As[t]=s;s=Xn(s);for(let r=0;rSs||(ju.then(()=>Ss=0),Ss=Date.now());function ku(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;He(Hu(s,n.value),t,5,[s])};return n.value=e,n.attached=Bu(),n}function Hu(e,t){if(k(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const uo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Uu=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Ou(e,s,i):t==="style"?Mu(e,n,s):zn(t)?Jn(t)||Fu(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ku(e,t,s,i))?(io(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&oo(e,t,s,i,o,t!=="value")):e._isVueCE&&(Gu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!fe(s)))?io(e,Te(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),oo(e,t,s,i))};function Ku(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&uo(t)&&$(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return uo(t)&&fe(n)?!1:t in e}function Gu(e,t){const n=e._def.props;if(!n)return!1;const s=Te(t);return Array.isArray(n)?n.some(r=>Te(r)===s):Object.keys(n).some(r=>Te(r)===s)}const ao=e=>{const t=e.props["onUpdate:modelValue"]||!1;return k(t)?n=>Pn(t,n):t};function $u(e){e.target.composing=!0}function fo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Cs=Symbol("_assign");function ho(e,t,n){return t&&(e=e.trim()),n&&(e=Zs(e)),e}const Mf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Cs]=ao(r);const o=s||r.props&&r.props.type==="number";jt(e,t?"change":"input",i=>{i.target.composing||e[Cs](ho(e.value,n,o))}),(n||o)&&jt(e,"change",()=>{e.value=ho(e.value,n,o)}),t||(jt(e,"compositionstart",$u),jt(e,"compositionend",fo),jt(e,"change",fo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Cs]=ao(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Zs(e.value):e.value,c=t??"";if(l===c)return;const a=e.getRootNode();(a instanceof Document||a instanceof ShadowRoot)&&a.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Wu=["ctrl","shift","alt","meta"],qu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Wu.some(n=>e[`${n}Key`]&&!t.includes(n))},Df=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...o)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const o=At(r.key);if(t.some(i=>i===o||zu[i]===o))return e(r)})},Ju=ge({patchProp:Uu},Au);let po;function Qu(){return po||(po=eu(Ju))}const Yu=(...e)=>{const t=Qu().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Zu(s);if(!r)return;const o=t._component;!$(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,Xu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function Xu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Zu(e){return fe(e)?document.querySelector(e):e}/*! +**/let Ks;const qr=typeof window<"u"&&window.trustedTypes;if(qr)try{Ks=qr.createPolicy("vue",{createHTML:e=>e})}catch{}const Qi=Ks?e=>Ks.createHTML(e):e=>e,bu="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1998/Math/MathML",rt=typeof document<"u"?document:null,zr=rt&&rt.createElement("template"),Au={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?rt.createElementNS(bu,e):t==="mathml"?rt.createElementNS(Eu,e):n?rt.createElement(e,{is:n}):rt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>rt.createTextNode(e),createComment:e=>rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{zr.innerHTML=Qi(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=zr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pt="transition",Yt="animation",yn=Symbol("_vtc"),Yi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Su=ge({},vi,Yi),Cu=e=>(e.displayName="Transition",e.props=Su,e),Nf=Cu((e,{slots:t})=>yr(vc,wu(e),t)),Rt=(e,t=[])=>{H(e)?e.forEach(n=>n(...t)):e&&e(...t)},Jr=e=>e?H(e)?e.some(t=>t.length>1):e.length>1:!1;function wu(e){const t={};for(const P in e)P in Yi||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:a=i,appearToClass:u=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,A=Ru(r),S=A&&A[0],F=A&&A[1],{onBeforeEnter:M,onEnter:C,onEnterCancelled:L,onLeave:N,onLeaveCancelled:B,onBeforeAppear:z=M,onAppear:q=C,onAppearCancelled:k=L}=t,w=(P,Q,he,Se)=>{P._enterCancelled=Se,xt(P,Q?u:l),xt(P,Q?a:i),he&&he()},U=(P,Q)=>{P._isLeaving=!1,xt(P,f),xt(P,m),xt(P,p),Q&&Q()},J=P=>(Q,he)=>{const Se=P?q:C,re=()=>w(Q,P,he);Rt(Se,[Q,re]),Qr(()=>{xt(Q,P?c:o),nt(Q,P?u:l),Jr(Se)||Yr(Q,s,S,re)})};return ge(t,{onBeforeEnter(P){Rt(M,[P]),nt(P,o),nt(P,i)},onBeforeAppear(P){Rt(z,[P]),nt(P,c),nt(P,a)},onEnter:J(!1),onAppear:J(!0),onLeave(P,Q){P._isLeaving=!0;const he=()=>U(P,Q);nt(P,f),P._enterCancelled?(nt(P,p),eo(P)):(eo(P),nt(P,p)),Qr(()=>{P._isLeaving&&(xt(P,f),nt(P,m),Jr(N)||Yr(P,s,F,he))}),Rt(N,[P,he])},onEnterCancelled(P){w(P,!1,void 0,!0),Rt(L,[P])},onAppearCancelled(P){w(P,!0,void 0,!0),Rt(k,[P])},onLeaveCancelled(P){U(P),Rt(B,[P])}})}function Ru(e){if(e==null)return null;if(se(e))return[Es(e.enter),Es(e.leave)];{const t=Es(e);return[t,t]}}function Es(e){return El(e)}function nt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[yn]||(e[yn]=new Set)).add(t)}function xt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[yn];n&&(n.delete(t),n.size||(e[yn]=void 0))}function Qr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let xu=0;function Yr(e,t,n,s){const r=e._endId=++xu,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:c}=Tu(e,t);if(!i)return s();const a=i+"end";let u=0;const f=()=>{e.removeEventListener(a,p),o()},p=m=>{m.target===e&&++u>=c&&f()};setTimeout(()=>{u(n[A]||"").split(", "),r=s(`${pt}Delay`),o=s(`${pt}Duration`),i=Xr(r,o),l=s(`${Yt}Delay`),c=s(`${Yt}Duration`),a=Xr(l,c);let u=null,f=0,p=0;t===pt?i>0&&(u=pt,f=i,p=o.length):t===Yt?a>0&&(u=Yt,f=a,p=c.length):(f=Math.max(i,a),u=f>0?i>a?pt:Yt:null,p=u?u===pt?o.length:c.length:0);const m=u===pt&&/\b(?:transform|all)(?:,|$)/.test(s(`${pt}Property`).toString());return{type:u,timeout:f,propCount:p,hasTransform:m}}function Xr(e,t){for(;e.lengthZr(n)+Zr(e[s])))}function Zr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function eo(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ou(e,t,n){const s=e[yn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const to=Symbol("_vod"),Pu=Symbol("_vsh"),Iu=Symbol(""),Nu=/(?:^|;)\s*display\s*:/;function Mu(e,t,n){const s=e.style,r=fe(n);let o=!1;if(n&&!r){if(t)if(fe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Ln(s,l,"")}else for(const i in t)n[i]==null&&Ln(s,i,"");for(const i in n)i==="display"&&(o=!0),Ln(s,i,n[i])}else if(r){if(t!==n){const i=s[Iu];i&&(n+=";"+i),s.cssText=n,o=Nu.test(n)}}else t&&e.removeAttribute("style");to in e&&(e[to]=o?s.display:"",e[Pu]&&(s.display="none"))}const no=/\s*!important$/;function Ln(e,t,n){if(H(n))n.forEach(s=>Ln(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Du(e,t);no.test(n)?e.setProperty(At(s),n.replace(no,""),"important"):e[s]=n}}const so=["Webkit","Moz","ms"],As={};function Du(e,t){const n=As[t];if(n)return n;let s=Te(t);if(s!=="filter"&&s in e)return As[t]=s;s=Xn(s);for(let r=0;rSs||(ju.then(()=>Ss=0),Ss=Date.now());function Hu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;ke(ku(s,n.value),t,5,[s])};return n.value=e,n.attached=Bu(),n}function ku(e,t){if(H(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const uo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Uu=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Ou(e,s,i):t==="style"?Mu(e,n,s):zn(t)?Jn(t)||Fu(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ku(e,t,s,i))?(io(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&oo(e,t,s,i,o,t!=="value")):e._isVueCE&&(Gu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!fe(s)))?io(e,Te(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),oo(e,t,s,i))};function Ku(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&uo(t)&&$(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return uo(t)&&fe(n)?!1:t in e}function Gu(e,t){const n=e._def.props;if(!n)return!1;const s=Te(t);return Array.isArray(n)?n.some(r=>Te(r)===s):Object.keys(n).some(r=>Te(r)===s)}const ao=e=>{const t=e.props["onUpdate:modelValue"]||!1;return H(t)?n=>Pn(t,n):t};function $u(e){e.target.composing=!0}function fo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Cs=Symbol("_assign");function ho(e,t,n){return t&&(e=e.trim()),n&&(e=Zs(e)),e}const Mf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Cs]=ao(r);const o=s||r.props&&r.props.type==="number";jt(e,t?"change":"input",i=>{i.target.composing||e[Cs](ho(e.value,n,o))}),(n||o)&&jt(e,"change",()=>{e.value=ho(e.value,n,o)}),t||(jt(e,"compositionstart",$u),jt(e,"compositionend",fo),jt(e,"change",fo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Cs]=ao(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Zs(e.value):e.value,c=t??"";if(l===c)return;const a=e.getRootNode();(a instanceof Document||a instanceof ShadowRoot)&&a.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Wu=["ctrl","shift","alt","meta"],qu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Wu.some(n=>e[`${n}Key`]&&!t.includes(n))},Df=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...o)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const o=At(r.key);if(t.some(i=>i===o||zu[i]===o))return e(r)})},Ju=ge({patchProp:Uu},Au);let po;function Qu(){return po||(po=eu(Ju))}const Yu=(...e)=>{const t=Qu().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Zu(s);if(!r)return;const o=t._component;!$(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,Xu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function Xu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Zu(e){return fe(e)?document.querySelector(e):e}/*! * pinia v2.3.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Xi;const as=e=>Xi=e,Zi=Symbol();function Gs(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var un;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(un||(un={}));function ea(){const e=$o(!0),t=e.run(()=>$t({}));let n=[],s=[];const r=cr({install(o){as(r),r._a=o,o.provide(Zi,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const el=()=>{};function go(e,t,n,s=el){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Wo()&&Pl(r),r}function Ft(e,...t){e.slice().forEach(n=>{n(...t)})}const ta=e=>e(),mo=Symbol(),ws=Symbol();function $s(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];Gs(r)&&Gs(s)&&e.hasOwnProperty(n)&&!ae(s)&&!ct(s)?e[n]=$s(r,s):e[n]=s}return e}const na=Symbol();function sa(e){return!Gs(e)||!e.hasOwnProperty(na)}const{assign:mt}=Object;function ra(e){return!!(ae(e)&&e.effect)}function oa(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let c;function a(){l||(n.state.value[e]=r?r():{});const u=ec(n.state.value[e]);return mt(u,o,Object.keys(i||{}).reduce((f,p)=>(f[p]=cr(Ne(()=>{as(n);const m=n._s.get(e);return i[p].call(m,m)})),f),{}))}return c=tl(e,a,t,n,s,!0),c}function tl(e,t,n={},s,r,o){let i;const l=mt({actions:{}},n),c={deep:!0};let a,u,f=[],p=[],m;const A=s.state.value[e];!o&&!A&&(s.state.value[e]={});let S;function F(H){let w;a=u=!1,typeof H=="function"?(H(s.state.value[e]),w={type:un.patchFunction,storeId:e,events:m}):($s(s.state.value[e],H),w={type:un.patchObject,payload:H,storeId:e,events:m});const U=S=Symbol();ur().then(()=>{S===U&&(a=!0)}),u=!0,Ft(f,w,s.state.value[e])}const M=o?function(){const{state:w}=n,U=w?w():{};this.$patch(J=>{mt(J,U)})}:el;function C(){i.stop(),f=[],p=[],s._s.delete(e)}const L=(H,w="")=>{if(mo in H)return H[ws]=w,H;const U=function(){as(s);const J=Array.from(arguments),P=[],Q=[];function he(W){P.push(W)}function Se(W){Q.push(W)}Ft(p,{args:J,name:U[ws],store:B,after:he,onError:Se});let re;try{re=H.apply(this&&this.$id===e?this:B,J)}catch(W){throw Ft(Q,W),W}return re instanceof Promise?re.then(W=>(Ft(P,W),W)).catch(W=>(Ft(Q,W),Promise.reject(W))):(Ft(P,re),re)};return U[mo]=!0,U[ws]=w,U},N={_p:s,$id:e,$onAction:go.bind(null,p),$patch:F,$reset:M,$subscribe(H,w={}){const U=go(f,H,w.detached,()=>J()),J=i.run(()=>sn(()=>s.state.value[e],P=>{(w.flush==="sync"?u:a)&&H({storeId:e,type:un.direct,events:m},P)},mt({},c,w)));return U},$dispose:C},B=An(N);s._s.set(e,B);const q=(s._a&&s._a.runWithContext||ta)(()=>s._e.run(()=>(i=$o()).run(()=>t({action:L}))));for(const H in q){const w=q[H];if(ae(w)&&!ra(w)||ct(w))o||(A&&sa(w)&&(ae(w)?w.value=A[H]:$s(w,A[H])),s.state.value[e][H]=w);else if(typeof w=="function"){const U=L(w,H);q[H]=U,l.actions[H]=w}}return mt(B,q),mt(X(B),q),Object.defineProperty(B,"$state",{get:()=>s.state.value[e],set:H=>{F(w=>{mt(w,H)})}}),s._p.forEach(H=>{mt(B,i.run(()=>H({store:B,app:s._a,pinia:s,options:l})))}),A&&o&&n.hydrate&&n.hydrate(B.$state,A),a=!0,u=!0,B}/*! #__NO_SIDE_EFFECTS__ */function ia(e,t,n){let s,r;const o=typeof t=="function";typeof e=="string"?(s=e,r=o?n:t):(r=e,s=e.id);function i(l,c){const a=fc();return l=l||(a?je(Zi,null):null),l&&as(l),l=Xi,l._s.has(s)||(o?tl(s,t,r,l):oa(s,r,l)),l._s.get(s)}return i.$id=s,i}/*! + */let Xi;const as=e=>Xi=e,Zi=Symbol();function Gs(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var un;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(un||(un={}));function ea(){const e=$o(!0),t=e.run(()=>$t({}));let n=[],s=[];const r=cr({install(o){as(r),r._a=o,o.provide(Zi,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const el=()=>{};function go(e,t,n,s=el){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Wo()&&Pl(r),r}function Ft(e,...t){e.slice().forEach(n=>{n(...t)})}const ta=e=>e(),mo=Symbol(),ws=Symbol();function $s(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];Gs(r)&&Gs(s)&&e.hasOwnProperty(n)&&!ae(s)&&!ct(s)?e[n]=$s(r,s):e[n]=s}return e}const na=Symbol();function sa(e){return!Gs(e)||!e.hasOwnProperty(na)}const{assign:mt}=Object;function ra(e){return!!(ae(e)&&e.effect)}function oa(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let c;function a(){l||(n.state.value[e]=r?r():{});const u=ec(n.state.value[e]);return mt(u,o,Object.keys(i||{}).reduce((f,p)=>(f[p]=cr(Ne(()=>{as(n);const m=n._s.get(e);return i[p].call(m,m)})),f),{}))}return c=tl(e,a,t,n,s,!0),c}function tl(e,t,n={},s,r,o){let i;const l=mt({actions:{}},n),c={deep:!0};let a,u,f=[],p=[],m;const A=s.state.value[e];!o&&!A&&(s.state.value[e]={});let S;function F(k){let w;a=u=!1,typeof k=="function"?(k(s.state.value[e]),w={type:un.patchFunction,storeId:e,events:m}):($s(s.state.value[e],k),w={type:un.patchObject,payload:k,storeId:e,events:m});const U=S=Symbol();ur().then(()=>{S===U&&(a=!0)}),u=!0,Ft(f,w,s.state.value[e])}const M=o?function(){const{state:w}=n,U=w?w():{};this.$patch(J=>{mt(J,U)})}:el;function C(){i.stop(),f=[],p=[],s._s.delete(e)}const L=(k,w="")=>{if(mo in k)return k[ws]=w,k;const U=function(){as(s);const J=Array.from(arguments),P=[],Q=[];function he(W){P.push(W)}function Se(W){Q.push(W)}Ft(p,{args:J,name:U[ws],store:B,after:he,onError:Se});let re;try{re=k.apply(this&&this.$id===e?this:B,J)}catch(W){throw Ft(Q,W),W}return re instanceof Promise?re.then(W=>(Ft(P,W),W)).catch(W=>(Ft(Q,W),Promise.reject(W))):(Ft(P,re),re)};return U[mo]=!0,U[ws]=w,U},N={_p:s,$id:e,$onAction:go.bind(null,p),$patch:F,$reset:M,$subscribe(k,w={}){const U=go(f,k,w.detached,()=>J()),J=i.run(()=>sn(()=>s.state.value[e],P=>{(w.flush==="sync"?u:a)&&k({storeId:e,type:un.direct,events:m},P)},mt({},c,w)));return U},$dispose:C},B=An(N);s._s.set(e,B);const q=(s._a&&s._a.runWithContext||ta)(()=>s._e.run(()=>(i=$o()).run(()=>t({action:L}))));for(const k in q){const w=q[k];if(ae(w)&&!ra(w)||ct(w))o||(A&&sa(w)&&(ae(w)?w.value=A[k]:$s(w,A[k])),s.state.value[e][k]=w);else if(typeof w=="function"){const U=L(w,k);q[k]=U,l.actions[k]=w}}return mt(B,q),mt(X(B),q),Object.defineProperty(B,"$state",{get:()=>s.state.value[e],set:k=>{F(w=>{mt(w,k)})}}),s._p.forEach(k=>{mt(B,i.run(()=>k({store:B,app:s._a,pinia:s,options:l})))}),A&&o&&n.hydrate&&n.hydrate(B.$state,A),a=!0,u=!0,B}/*! #__NO_SIDE_EFFECTS__ */function ia(e,t,n){let s,r;const o=typeof t=="function";typeof e=="string"?(s=e,r=o?n:t):(r=e,s=e.id);function i(l,c){const a=fc();return l=l||(a?je(Zi,null):null),l&&as(l),l=Xi,l._s.has(s)||(o?tl(s,t,r,l):oa(s,r,l)),l._s.get(s)}return i.$id=s,i}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Bt=typeof document<"u";function nl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function la(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&nl(e.default)}const te=Object.assign;function Rs(e,t){const n={};for(const s in t){const r=t[s];n[s]=Ue(r)?r.map(e):e(r)}return n}const an=()=>{},Ue=Array.isArray;function _o(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const sl=/#/g,ca=/&/g,ua=/\//g,aa=/=/g,fa=/\?/g,rl=/\+/g,ha=/%5B/g,da=/%5D/g,ol=/%5E/g,pa=/%60/g,il=/%7B/g,ga=/%7C/g,ll=/%7D/g,ma=/%20/g;function vr(e){return e==null?"":encodeURI(""+e).replace(ga,"|").replace(ha,"[").replace(da,"]")}function _a(e){return vr(e).replace(il,"{").replace(ll,"}").replace(ol,"^")}function Ws(e){return vr(e).replace(rl,"%2B").replace(ma,"+").replace(sl,"%23").replace(ca,"%26").replace(pa,"`").replace(il,"{").replace(ll,"}").replace(ol,"^")}function ya(e){return Ws(e).replace(aa,"%3D")}function va(e){return vr(e).replace(sl,"%23").replace(fa,"%3F")}function ba(e){return va(e).replace(ua,"%2F")}function vn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ea=/\/$/,Aa=e=>e.replace(Ea,"");function xs(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),o=t.slice(c,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Ra(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:vn(i)}}function Sa(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function yo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ca(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Wt(t.matched[s],n.matched[r])&&cl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Wt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!wa(e[n],t[n]))return!1;return!0}function wa(e,t){return Ue(e)?vo(e,t):Ue(t)?vo(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function vo(e,t){return Ue(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Ra(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let qs=function(e){return e.pop="pop",e.push="push",e}({}),Ts=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function xa(e){if(!e)if(Bt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Aa(e)}const Ta=/^[^#]+#/;function Oa(e,t){return e.replace(Ta,"#")+t}function Pa(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const fs=()=>({left:window.scrollX,top:window.scrollY});function Ia(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Pa(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function bo(e,t){return(history.state?history.state.position-t:-1)+e}const zs=new Map;function Na(e,t){zs.set(e,t)}function Ma(e){const t=zs.get(e);return zs.delete(e),t}function Da(e){return typeof e=="string"||e&&typeof e=="object"}function ul(e){return typeof e=="string"||typeof e=="symbol"}let ue=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const al=Symbol("");ue.MATCHER_NOT_FOUND+"",ue.NAVIGATION_GUARD_REDIRECT+"",ue.NAVIGATION_ABORTED+"",ue.NAVIGATION_CANCELLED+"",ue.NAVIGATION_DUPLICATED+"";function qt(e,t){return te(new Error,{type:e,[al]:!0},t)}function st(e,t){return e instanceof Error&&al in e&&(t==null||!!(e.type&t))}const La=["params","query","hash"];function Fa(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of La)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Va(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&Ws(r)):[s&&Ws(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function ja(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Ue(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Ba=Symbol(""),Ao=Symbol(""),hs=Symbol(""),br=Symbol(""),Js=Symbol("");function Xt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function yt(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const a=p=>{p===!1?c(qt(ue.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?c(p):Da(p)?c(qt(ue.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(i&&s.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),l())},u=o(()=>e.call(s&&s.instances[r],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(p=>c(p))})}function Os(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(nl(c)){const a=(c.__vccOpts||c)[t];a&&o.push(yt(a,n,s,i,l,r))}else{let a=c();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=la(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const p=(f.__vccOpts||f)[t];return p&&yt(p,n,s,i,l,r)()}))}}return o}function ka(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iWt(a,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(a=>Wt(a,c))||r.push(c))}return[n,s,r]}/*! + */const Bt=typeof document<"u";function nl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function la(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&nl(e.default)}const te=Object.assign;function Rs(e,t){const n={};for(const s in t){const r=t[s];n[s]=Ue(r)?r.map(e):e(r)}return n}const an=()=>{},Ue=Array.isArray;function _o(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const sl=/#/g,ca=/&/g,ua=/\//g,aa=/=/g,fa=/\?/g,rl=/\+/g,ha=/%5B/g,da=/%5D/g,ol=/%5E/g,pa=/%60/g,il=/%7B/g,ga=/%7C/g,ll=/%7D/g,ma=/%20/g;function vr(e){return e==null?"":encodeURI(""+e).replace(ga,"|").replace(ha,"[").replace(da,"]")}function _a(e){return vr(e).replace(il,"{").replace(ll,"}").replace(ol,"^")}function Ws(e){return vr(e).replace(rl,"%2B").replace(ma,"+").replace(sl,"%23").replace(ca,"%26").replace(pa,"`").replace(il,"{").replace(ll,"}").replace(ol,"^")}function ya(e){return Ws(e).replace(aa,"%3D")}function va(e){return vr(e).replace(sl,"%23").replace(fa,"%3F")}function ba(e){return va(e).replace(ua,"%2F")}function vn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ea=/\/$/,Aa=e=>e.replace(Ea,"");function xs(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),o=t.slice(c,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Ra(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:vn(i)}}function Sa(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function yo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ca(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Wt(t.matched[s],n.matched[r])&&cl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Wt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!wa(e[n],t[n]))return!1;return!0}function wa(e,t){return Ue(e)?vo(e,t):Ue(t)?vo(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function vo(e,t){return Ue(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Ra(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let qs=function(e){return e.pop="pop",e.push="push",e}({}),Ts=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function xa(e){if(!e)if(Bt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Aa(e)}const Ta=/^[^#]+#/;function Oa(e,t){return e.replace(Ta,"#")+t}function Pa(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const fs=()=>({left:window.scrollX,top:window.scrollY});function Ia(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Pa(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function bo(e,t){return(history.state?history.state.position-t:-1)+e}const zs=new Map;function Na(e,t){zs.set(e,t)}function Ma(e){const t=zs.get(e);return zs.delete(e),t}function Da(e){return typeof e=="string"||e&&typeof e=="object"}function ul(e){return typeof e=="string"||typeof e=="symbol"}let ue=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const al=Symbol("");ue.MATCHER_NOT_FOUND+"",ue.NAVIGATION_GUARD_REDIRECT+"",ue.NAVIGATION_ABORTED+"",ue.NAVIGATION_CANCELLED+"",ue.NAVIGATION_DUPLICATED+"";function qt(e,t){return te(new Error,{type:e,[al]:!0},t)}function st(e,t){return e instanceof Error&&al in e&&(t==null||!!(e.type&t))}const La=["params","query","hash"];function Fa(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of La)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Va(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&Ws(r)):[s&&Ws(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function ja(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Ue(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Ba=Symbol(""),Ao=Symbol(""),hs=Symbol(""),br=Symbol(""),Js=Symbol("");function Xt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function yt(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const a=p=>{p===!1?c(qt(ue.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?c(p):Da(p)?c(qt(ue.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(i&&s.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),l())},u=o(()=>e.call(s&&s.instances[r],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(p=>c(p))})}function Os(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(nl(c)){const a=(c.__vccOpts||c)[t];a&&o.push(yt(a,n,s,i,l,r))}else{let a=c();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=la(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const p=(f.__vccOpts||f)[t];return p&&yt(p,n,s,i,l,r)()}))}}return o}function Ha(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iWt(a,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(a=>Wt(a,c))||r.push(c))}return[n,s,r]}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Ha=()=>location.protocol+"//"+location.host;function fl(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),yo(l,"")}return yo(n,e)+s+r}function Ua(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const m=fl(e,location),A=n.value,S=t.value;let F=0;if(p){if(n.value=m,t.value=p,i&&i===A){i=null;return}F=S?p.position-S.position:0}else s(m);r.forEach(M=>{M(n.value,A,{delta:F,type:qs.pop,direction:F?F>0?Ts.forward:Ts.back:Ts.unknown})})};function c(){i=n.value}function a(p){r.push(p);const m=()=>{const A=r.indexOf(p);A>-1&&r.splice(A,1)};return o.push(m),m}function u(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(te({},p.state,{scroll:fs()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:a,destroy:f}}function So(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?fs():null}}function Ka(e){const{history:t,location:n}=window,s={value:fl(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,a,u){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:Ha()+e+c;try{t[u?"replaceState":"pushState"](a,"",p),r.value=a}catch(m){console.error(m),n[u?"replace":"assign"](p)}}function i(c,a){o(c,te({},t.state,So(r.value.back,c,r.value.forward,!0),a,{position:r.value.position}),!0),s.value=c}function l(c,a){const u=te({},r.value,t.state,{forward:c,scroll:fs()});o(u.current,u,!0),o(c,te({},So(s.value,c,null),{position:u.position+1},a),!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Ga(e){e=xa(e);const t=Ka(e),n=Ua(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=te({location:"",base:e,go:s,createHref:Oa.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Pt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var pe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(pe||{});const $a={type:Pt.Static,value:""},Wa=/[a-zA-Z0-9_]/;function qa(e){if(!e)return[[]];if(e==="/")return[[$a]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${a}": ${m}`)}let n=pe.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,a="",u="";function f(){a&&(n===pe.Static?o.push({type:Pt.Static,value:a}):n===pe.Param||n===pe.ParamRegExp||n===pe.ParamRegExpEnd?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:Pt.Param,value:a,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function p(){a+=c}for(;lt.length?t.length===1&&t[0]===we.Static+we.Segment?1:-1:0}function hl(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Xa={strict:!1,end:!0,sensitive:!1};function Za(e,t,n){const s=Qa(qa(e.path),n),r=te(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function ef(e,t){const n=[],s=new Map;t=_o(Xa,t);function r(f){return s.get(f)}function o(f,p,m){const A=!m,S=xo(f);S.aliasOf=m&&m.record;const F=_o(t,f),M=[S];if("alias"in f){const N=typeof f.alias=="string"?[f.alias]:f.alias;for(const B of N)M.push(xo(te({},S,{components:m?m.record.components:S.components,path:B,aliasOf:m?m.record:S})))}let C,L;for(const N of M){const{path:B}=N;if(p&&B[0]!=="/"){const z=p.record.path,q=z[z.length-1]==="/"?"":"/";N.path=p.record.path+(B&&q+B)}if(C=Za(N,p,F),m?m.alias.push(C):(L=L||C,L!==C&&L.alias.push(C),A&&f.name&&!To(C)&&i(f.name)),dl(C)&&c(C),S.children){const z=S.children;for(let q=0;q{i(L)}:an}function i(f){if(ul(f)){const p=s.get(f);p&&(s.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function c(f){const p=sf(f,n);n.splice(p,0,f),f.record.name&&!To(f)&&s.set(f.record.name,f)}function a(f,p){let m,A={},S,F;if("name"in f&&f.name){if(m=s.get(f.name),!m)throw qt(ue.MATCHER_NOT_FOUND,{location:f});F=m.record.name,A=te(Ro(p.params,m.keys.filter(L=>!L.optional).concat(m.parent?m.parent.keys.filter(L=>L.optional):[]).map(L=>L.name)),f.params&&Ro(f.params,m.keys.map(L=>L.name))),S=m.stringify(A)}else if(f.path!=null)S=f.path,m=n.find(L=>L.re.test(S)),m&&(A=m.parse(S),F=m.record.name);else{if(m=p.name?s.get(p.name):n.find(L=>L.re.test(p.path)),!m)throw qt(ue.MATCHER_NOT_FOUND,{location:f,currentLocation:p});F=m.record.name,A=te({},p.params,f.params),S=m.stringify(A)}const M=[];let C=m;for(;C;)M.unshift(C.record),C=C.parent;return{name:F,path:S,params:A,matched:M,meta:nf(M)}}e.forEach(f=>o(f));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function Ro(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function xo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:tf(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function tf(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function To(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function nf(e){return e.reduce((t,n)=>te(t,n.meta),{})}function sf(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;hl(e,t[o])<0?s=o:n=o+1}const r=rf(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function rf(e){let t=e;for(;t=t.parent;)if(dl(t)&&hl(e,t)===0)return t}function dl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Oo(e){const t=je(hs),n=je(br),s=Ne(()=>{const c=bt(e.to);return t.resolve(c)}),r=Ne(()=>{const{matched:c}=s.value,{length:a}=c,u=c[a-1],f=n.matched;if(!u||!f.length)return-1;const p=f.findIndex(Wt.bind(null,u));if(p>-1)return p;const m=Po(c[a-2]);return a>1&&Po(u)===m&&f[f.length-1].path!==m?f.findIndex(Wt.bind(null,c[a-2])):p}),o=Ne(()=>r.value>-1&&af(n.params,s.value.params)),i=Ne(()=>r.value>-1&&r.value===n.matched.length-1&&cl(n.params,s.value.params));function l(c={}){if(uf(c)){const a=t[bt(e.replace)?"replace":"push"](bt(e.to)).catch(an);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:Ne(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function of(e){return e.length===1?e[0]:e}const lf=hr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Oo,setup(e,{slots:t}){const n=An(Oo(e)),{options:s}=je(hs),r=Ne(()=>({[Io(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Io(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&of(t.default(n));return e.custom?o:yr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),cf=lf;function uf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function af(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Ue(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function Po(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Io=(e,t,n)=>e??t??n,ff=hr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=je(Js),r=Ne(()=>e.route||s.value),o=je(Ao,0),i=Ne(()=>{let a=bt(o);const{matched:u}=r.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),l=Ne(()=>r.value.matched[i.value]);In(Ao,Ne(()=>i.value+1)),In(Ba,l),In(Js,r);const c=$t();return sn(()=>[c.value,l.value,e.name],([a,u,f],[p,m,A])=>{u&&(u.instances[f]=a,m&&m!==u&&a&&a===p&&(u.leaveGuards.size||(u.leaveGuards=m.leaveGuards),u.updateGuards.size||(u.updateGuards=m.updateGuards))),a&&u&&(!m||!Wt(u,m)||!p)&&(u.enterCallbacks[f]||[]).forEach(S=>S(a))},{flush:"post"}),()=>{const a=r.value,u=e.name,f=l.value,p=f&&f.components[u];if(!p)return No(n.default,{Component:p,route:a});const m=f.props[u],A=m?m===!0?a.params:typeof m=="function"?m(a):m:null,F=yr(p,te({},A,t,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return No(n.default,{Component:F,route:a})||F}}});function No(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const pl=ff;function hf(e){const t=ef(e.routes,e),n=e.parseQuery||Va,s=e.stringifyQuery||Eo,r=e.history,o=Xt(),i=Xt(),l=Xt(),c=Ql(gt);let a=gt;Bt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Rs.bind(null,v=>""+v),f=Rs.bind(null,ba),p=Rs.bind(null,vn);function m(v,D){let O,V;return ul(v)?(O=t.getRecordMatcher(v),V=D):V=v,t.addRoute(V,O)}function A(v){const D=t.getRecordMatcher(v);D&&t.removeRoute(D)}function S(){return t.getRoutes().map(v=>v.record)}function F(v){return!!t.getRecordMatcher(v)}function M(v,D){if(D=te({},D||c.value),typeof v=="string"){const g=xs(n,v,D.path),_=t.resolve({path:g.path},D),b=r.createHref(g.fullPath);return te(g,_,{params:p(_.params),hash:vn(g.hash),redirectedFrom:void 0,href:b})}let O;if(v.path!=null)O=te({},v,{path:xs(n,v.path,D.path).path});else{const g=te({},v.params);for(const _ in g)g[_]==null&&delete g[_];O=te({},v,{params:f(g)}),D.params=f(D.params)}const V=t.resolve(O,D),Y=v.hash||"";V.params=u(p(V.params));const h=Sa(s,te({},v,{hash:_a(Y),path:V.path})),d=r.createHref(h);return te({fullPath:h,hash:Y,query:s===Eo?ja(v.query):v.query||{}},V,{redirectedFrom:void 0,href:d})}function C(v){return typeof v=="string"?xs(n,v,c.value.path):te({},v)}function L(v,D){if(a!==v)return qt(ue.NAVIGATION_CANCELLED,{from:D,to:v})}function N(v){return q(v)}function B(v){return N(te(C(v),{replace:!0}))}function z(v,D){const O=v.matched[v.matched.length-1];if(O&&O.redirect){const{redirect:V}=O;let Y=typeof V=="function"?V(v,D):V;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=C(Y):{path:Y},Y.params={}),te({query:v.query,hash:v.hash,params:Y.path!=null?{}:v.params},Y)}}function q(v,D){const O=a=M(v),V=c.value,Y=v.state,h=v.force,d=v.replace===!0,g=z(O,V);if(g)return q(te(C(g),{state:typeof g=="object"?te({},Y,g.state):Y,force:h,replace:d}),D||O);const _=O;_.redirectedFrom=D;let b;return!h&&Ca(s,V,O)&&(b=qt(ue.NAVIGATION_DUPLICATED,{to:_,from:V}),Ke(V,V,!0,!1)),(b?Promise.resolve(b):U(_,V)).catch(y=>st(y)?st(y,ue.NAVIGATION_GUARD_REDIRECT)?y:dt(y):ee(y,_,V)).then(y=>{if(y){if(st(y,ue.NAVIGATION_GUARD_REDIRECT))return q(te({replace:d},C(y.to),{state:typeof y.to=="object"?te({},Y,y.to.state):Y,force:h}),D||_)}else y=P(_,V,!0,d,Y);return J(_,V,y),y})}function H(v,D){const O=L(v,D);return O?Promise.reject(O):Promise.resolve()}function w(v){const D=Dt.values().next().value;return D&&typeof D.runWithContext=="function"?D.runWithContext(v):v()}function U(v,D){let O;const[V,Y,h]=ka(v,D);O=Os(V.reverse(),"beforeRouteLeave",v,D);for(const g of V)g.leaveGuards.forEach(_=>{O.push(yt(_,v,D))});const d=H.bind(null,v,D);return O.push(d),Fe(O).then(()=>{O=[];for(const g of o.list())O.push(yt(g,v,D));return O.push(d),Fe(O)}).then(()=>{O=Os(Y,"beforeRouteUpdate",v,D);for(const g of Y)g.updateGuards.forEach(_=>{O.push(yt(_,v,D))});return O.push(d),Fe(O)}).then(()=>{O=[];for(const g of h)if(g.beforeEnter)if(Ue(g.beforeEnter))for(const _ of g.beforeEnter)O.push(yt(_,v,D));else O.push(yt(g.beforeEnter,v,D));return O.push(d),Fe(O)}).then(()=>(v.matched.forEach(g=>g.enterCallbacks={}),O=Os(h,"beforeRouteEnter",v,D,w),O.push(d),Fe(O))).then(()=>{O=[];for(const g of i.list())O.push(yt(g,v,D));return O.push(d),Fe(O)}).catch(g=>st(g,ue.NAVIGATION_CANCELLED)?g:Promise.reject(g))}function J(v,D,O){l.list().forEach(V=>w(()=>V(v,D,O)))}function P(v,D,O,V,Y){const h=L(v,D);if(h)return h;const d=D===gt,g=Bt?history.state:{};O&&(V||d?r.replace(v.fullPath,te({scroll:d&&g&&g.scroll},Y)):r.push(v.fullPath,Y)),c.value=v,Ke(v,D,O,d),dt()}let Q;function he(){Q||(Q=r.listen((v,D,O)=>{if(!St.listening)return;const V=M(v),Y=z(V,St.currentRoute.value);if(Y){q(te(Y,{replace:!0,force:!0}),V).catch(an);return}a=V;const h=c.value;Bt&&Na(bo(h.fullPath,O.delta),fs()),U(V,h).catch(d=>st(d,ue.NAVIGATION_ABORTED|ue.NAVIGATION_CANCELLED)?d:st(d,ue.NAVIGATION_GUARD_REDIRECT)?(q(te(C(d.to),{force:!0}),V).then(g=>{st(g,ue.NAVIGATION_ABORTED|ue.NAVIGATION_DUPLICATED)&&!O.delta&&O.type===qs.pop&&r.go(-1,!1)}).catch(an),Promise.reject()):(O.delta&&r.go(-O.delta,!1),ee(d,V,h))).then(d=>{d=d||P(V,h,!1),d&&(O.delta&&!st(d,ue.NAVIGATION_CANCELLED)?r.go(-O.delta,!1):O.type===qs.pop&&st(d,ue.NAVIGATION_ABORTED|ue.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),J(V,h,d)}).catch(an)}))}let Se=Xt(),re=Xt(),W;function ee(v,D,O){dt(v);const V=re.list();return V.length?V.forEach(Y=>Y(v,D,O)):console.error(v),Promise.reject(v)}function et(){return W&&c.value!==gt?Promise.resolve():new Promise((v,D)=>{Se.add([v,D])})}function dt(v){return W||(W=!v,he(),Se.list().forEach(([D,O])=>v?O(v):D()),Se.reset()),v}function Ke(v,D,O,V){const{scrollBehavior:Y}=e;if(!Bt||!Y)return Promise.resolve();const h=!O&&Ma(bo(v.fullPath,0))||(V||!O)&&history.state&&history.state.scroll||null;return ur().then(()=>Y(v,D,h)).then(d=>d&&Ia(d)).catch(d=>ee(d,v,D))}const Oe=v=>r.go(v);let Mt;const Dt=new Set,St={currentRoute:c,listening:!0,addRoute:m,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:F,getRoutes:S,resolve:M,options:e,push:N,replace:B,go:Oe,back:()=>Oe(-1),forward:()=>Oe(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:re.add,isReady:et,install(v){v.component("RouterLink",cf),v.component("RouterView",pl),v.config.globalProperties.$router=St,Object.defineProperty(v.config.globalProperties,"$route",{enumerable:!0,get:()=>bt(c)}),Bt&&!Mt&&c.value===gt&&(Mt=!0,N(r.location).catch(V=>{}));const D={};for(const V in gt)Object.defineProperty(D,V,{get:()=>c.value[V],enumerable:!0});v.provide(hs,St),v.provide(br,li(D)),v.provide(Js,c);const O=v.unmount;Dt.add(v),v.unmount=function(){Dt.delete(v),Dt.size<1&&(a=gt,Q&&Q(),Q=null,c.value=gt,Mt=!1,W=!1),O()}}};function Fe(v){return v.reduce((D,O)=>D.then(()=>w(O)),Promise.resolve())}return St}function Ff(){return je(hs)}function Vf(e){return je(br)}const gl="claudia-theme";function df(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function pf(){const e=localStorage.getItem(gl);return e==="light"||e==="dark"||e==="system"?e:"system"}function Wn(e){return e==="system"?df()?"dark":"light":e}const bn=$t(pf()),vt=$t(Wn(bn.value));function Qs(e){const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark")}function ml(e){bn.value=e,localStorage.setItem(gl,e),vt.value=Wn(e),Qs(vt.value)}function gf(){const e=vt.value;ml(e==="dark"?"light":"dark")}function Mo(){vt.value=Wn(bn.value),Qs(vt.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{bn.value==="system"&&(vt.value=Wn("system"),Qs(vt.value))})}function mf(){return is(()=>{Mo()}),{theme:bn,resolvedTheme:vt,setTheme:ml,toggleTheme:gf,initTheme:Mo}}const _f=hr({__name:"App",setup(e){const{initTheme:t}=mf();return is(()=>{t()}),(n,s)=>(Un(),Gn(bt(pl)))}}),yf="modulepreload",vf=function(e){return"/"+e},Do={},On=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=vf(c),c in Do)return;Do[c]=!0;const a=c.endsWith(".css"),u=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const f=document.createElement("link");if(f.rel=a?"stylesheet":yf,a||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),a)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Ps="http://localhost:8000/api/v1";function bf(){try{const t=qn().token;return t?t.value??t:null}catch{return null}}function Ef(){async function e(){try{const n=await fetch(`${Ps}/auth/refresh`,{method:"POST",credentials:"include"});if(n.ok){const s=await n.json(),r=qn();return r.token=s.access_token,localStorage.setItem("access_token",s.access_token),s.access_token}}catch{}return null}async function t(n,s,r,o=0){const i={"Content-Type":"application/json"},l=bf();console.log(`[useApi] ${n} ${s} - token: ${l?"present":"null"}`),l&&!s.includes("/auth/")?(i.Authorization=`Bearer ${l}`,console.log(`[useApi] Added Authorization header: Bearer ${l.substring(0,10)}...`)):console.log(`[useApi] NO Authorization header - token=${l}, isAuthEndpoint=${s.includes("/auth/")}`);const c=await fetch(`${Ps}${s}`,{method:n,headers:i,body:r?JSON.stringify(r):void 0,credentials:"include"});if(c.status===401){if(o===0&&!s.includes("/auth/")){const u=await e();if(u){i.Authorization=`Bearer ${u}`;const f=await fetch(`${Ps}${s}`,{method:n,headers:i,credentials:"include",body:r?JSON.stringify(r):void 0});if(f.ok)return f.status===204?{}:f.json()}}throw qn().logout(),Er.push("/login"),new Error("Unauthorized")}if(!c.ok){const a=await c.json().catch(()=>({detail:"Request failed"}));throw new Error(a.detail||`HTTP ${c.status}`)}return c.status===204?{}:c.json()}return{get:n=>t("GET",n),post:(n,s)=>t("POST",n,s),put:(n,s)=>t("PUT",n,s),delete:n=>t("DELETE",n)}}const qn=ia("auth",()=>{const e=$t(localStorage.getItem("access_token")),t=$t(null),n=Ef(),s=Ne(()=>!!e.value);async function r(c,a){const u=await n.post("/auth/login",{username:c,password:a});return e.value=u.access_token,localStorage.setItem("access_token",u.access_token),await i(),u}async function o(c,a){return await n.post("/auth/register",{username:c,password:a})}async function i(){if(!e.value)return null;try{return t.value=await n.get("/auth/me"),t.value}catch{return l(),null}}async function l(){try{await n.post("/auth/logout")}catch{}e.value=null,t.value=null,localStorage.removeItem("access_token")}return e.value&&i(),{token:e,user:t,isAuthenticated:s,login:r,register:o,fetchUser:i,logout:l}}),Er=hf({history:Ga(),routes:[{path:"/login",name:"login",component:()=>On(()=>import("./Login-Cogrj-Ia.js"),__vite__mapDeps([0,1,2,3])),meta:{requiresAuth:!1}},{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"dashboard",component:()=>On(()=>import("./Dashboard-CHRmhfNp.js"),__vite__mapDeps([4,5,1,2,6,7,8])),meta:{requiresAuth:!0}},{path:"/projects/:id",name:"project",component:()=>On(()=>import("./ProjectView-CxuyvBGN.js"),__vite__mapDeps([9,5,10,1,2,11,6,7,12])),meta:{requiresAuth:!0}},{path:"/documents/:id",name:"document",component:()=>On(()=>import("./DocumentView-BMqbfrMR.js"),__vite__mapDeps([13,10,1,2,11,6,7,14])),meta:{requiresAuth:!0}},{path:"/:pathMatch(.*)*",redirect:"/dashboard"}]});Er.beforeEach((e,t,n)=>{const s=qn();e.meta.requiresAuth&&!s.isAuthenticated?n("/login"):e.name==="login"&&s.isAuthenticated?n("/dashboard"):n()});const Ar=Yu(_f);Ar.use(ea());Ar.use(Er);Ar.mount("#app");export{bf as A,Ef as B,Ri as C,yr as D,Cf as E,Ie as F,cr as G,Ql as H,Af as I,ur as J,_r as K,Pf as L,er as M,Lf as N,wf as O,mf as P,Tf as Q,Nf as T,qi as a,If as b,Of as c,hr as d,Sf as e,xe as f,ac as g,cu as h,Ne as i,Ff as j,is as k,bt as l,xf as m,sn as n,Un as o,Rf as p,tr as q,$t as r,Gn as s,Ol as t,qn as u,Mf as v,Df as w,xi as x,Vf as y,ia as z}; + */let ka=()=>location.protocol+"//"+location.host;function fl(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),yo(l,"")}return yo(n,e)+s+r}function Ua(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const m=fl(e,location),A=n.value,S=t.value;let F=0;if(p){if(n.value=m,t.value=p,i&&i===A){i=null;return}F=S?p.position-S.position:0}else s(m);r.forEach(M=>{M(n.value,A,{delta:F,type:qs.pop,direction:F?F>0?Ts.forward:Ts.back:Ts.unknown})})};function c(){i=n.value}function a(p){r.push(p);const m=()=>{const A=r.indexOf(p);A>-1&&r.splice(A,1)};return o.push(m),m}function u(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(te({},p.state,{scroll:fs()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:a,destroy:f}}function So(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?fs():null}}function Ka(e){const{history:t,location:n}=window,s={value:fl(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,a,u){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:ka()+e+c;try{t[u?"replaceState":"pushState"](a,"",p),r.value=a}catch(m){console.error(m),n[u?"replace":"assign"](p)}}function i(c,a){o(c,te({},t.state,So(r.value.back,c,r.value.forward,!0),a,{position:r.value.position}),!0),s.value=c}function l(c,a){const u=te({},r.value,t.state,{forward:c,scroll:fs()});o(u.current,u,!0),o(c,te({},So(s.value,c,null),{position:u.position+1},a),!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Ga(e){e=xa(e);const t=Ka(e),n=Ua(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=te({location:"",base:e,go:s,createHref:Oa.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Pt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var pe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(pe||{});const $a={type:Pt.Static,value:""},Wa=/[a-zA-Z0-9_]/;function qa(e){if(!e)return[[]];if(e==="/")return[[$a]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${a}": ${m}`)}let n=pe.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,a="",u="";function f(){a&&(n===pe.Static?o.push({type:Pt.Static,value:a}):n===pe.Param||n===pe.ParamRegExp||n===pe.ParamRegExpEnd?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:Pt.Param,value:a,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function p(){a+=c}for(;lt.length?t.length===1&&t[0]===we.Static+we.Segment?1:-1:0}function hl(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Xa={strict:!1,end:!0,sensitive:!1};function Za(e,t,n){const s=Qa(qa(e.path),n),r=te(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function ef(e,t){const n=[],s=new Map;t=_o(Xa,t);function r(f){return s.get(f)}function o(f,p,m){const A=!m,S=xo(f);S.aliasOf=m&&m.record;const F=_o(t,f),M=[S];if("alias"in f){const N=typeof f.alias=="string"?[f.alias]:f.alias;for(const B of N)M.push(xo(te({},S,{components:m?m.record.components:S.components,path:B,aliasOf:m?m.record:S})))}let C,L;for(const N of M){const{path:B}=N;if(p&&B[0]!=="/"){const z=p.record.path,q=z[z.length-1]==="/"?"":"/";N.path=p.record.path+(B&&q+B)}if(C=Za(N,p,F),m?m.alias.push(C):(L=L||C,L!==C&&L.alias.push(C),A&&f.name&&!To(C)&&i(f.name)),dl(C)&&c(C),S.children){const z=S.children;for(let q=0;q{i(L)}:an}function i(f){if(ul(f)){const p=s.get(f);p&&(s.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function c(f){const p=sf(f,n);n.splice(p,0,f),f.record.name&&!To(f)&&s.set(f.record.name,f)}function a(f,p){let m,A={},S,F;if("name"in f&&f.name){if(m=s.get(f.name),!m)throw qt(ue.MATCHER_NOT_FOUND,{location:f});F=m.record.name,A=te(Ro(p.params,m.keys.filter(L=>!L.optional).concat(m.parent?m.parent.keys.filter(L=>L.optional):[]).map(L=>L.name)),f.params&&Ro(f.params,m.keys.map(L=>L.name))),S=m.stringify(A)}else if(f.path!=null)S=f.path,m=n.find(L=>L.re.test(S)),m&&(A=m.parse(S),F=m.record.name);else{if(m=p.name?s.get(p.name):n.find(L=>L.re.test(p.path)),!m)throw qt(ue.MATCHER_NOT_FOUND,{location:f,currentLocation:p});F=m.record.name,A=te({},p.params,f.params),S=m.stringify(A)}const M=[];let C=m;for(;C;)M.unshift(C.record),C=C.parent;return{name:F,path:S,params:A,matched:M,meta:nf(M)}}e.forEach(f=>o(f));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function Ro(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function xo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:tf(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function tf(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function To(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function nf(e){return e.reduce((t,n)=>te(t,n.meta),{})}function sf(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;hl(e,t[o])<0?s=o:n=o+1}const r=rf(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function rf(e){let t=e;for(;t=t.parent;)if(dl(t)&&hl(e,t)===0)return t}function dl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Oo(e){const t=je(hs),n=je(br),s=Ne(()=>{const c=bt(e.to);return t.resolve(c)}),r=Ne(()=>{const{matched:c}=s.value,{length:a}=c,u=c[a-1],f=n.matched;if(!u||!f.length)return-1;const p=f.findIndex(Wt.bind(null,u));if(p>-1)return p;const m=Po(c[a-2]);return a>1&&Po(u)===m&&f[f.length-1].path!==m?f.findIndex(Wt.bind(null,c[a-2])):p}),o=Ne(()=>r.value>-1&&af(n.params,s.value.params)),i=Ne(()=>r.value>-1&&r.value===n.matched.length-1&&cl(n.params,s.value.params));function l(c={}){if(uf(c)){const a=t[bt(e.replace)?"replace":"push"](bt(e.to)).catch(an);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:Ne(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function of(e){return e.length===1?e[0]:e}const lf=hr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Oo,setup(e,{slots:t}){const n=An(Oo(e)),{options:s}=je(hs),r=Ne(()=>({[Io(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Io(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&of(t.default(n));return e.custom?o:yr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),cf=lf;function uf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function af(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Ue(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function Po(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Io=(e,t,n)=>e??t??n,ff=hr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=je(Js),r=Ne(()=>e.route||s.value),o=je(Ao,0),i=Ne(()=>{let a=bt(o);const{matched:u}=r.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),l=Ne(()=>r.value.matched[i.value]);In(Ao,Ne(()=>i.value+1)),In(Ba,l),In(Js,r);const c=$t();return sn(()=>[c.value,l.value,e.name],([a,u,f],[p,m,A])=>{u&&(u.instances[f]=a,m&&m!==u&&a&&a===p&&(u.leaveGuards.size||(u.leaveGuards=m.leaveGuards),u.updateGuards.size||(u.updateGuards=m.updateGuards))),a&&u&&(!m||!Wt(u,m)||!p)&&(u.enterCallbacks[f]||[]).forEach(S=>S(a))},{flush:"post"}),()=>{const a=r.value,u=e.name,f=l.value,p=f&&f.components[u];if(!p)return No(n.default,{Component:p,route:a});const m=f.props[u],A=m?m===!0?a.params:typeof m=="function"?m(a):m:null,F=yr(p,te({},A,t,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return No(n.default,{Component:F,route:a})||F}}});function No(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const pl=ff;function hf(e){const t=ef(e.routes,e),n=e.parseQuery||Va,s=e.stringifyQuery||Eo,r=e.history,o=Xt(),i=Xt(),l=Xt(),c=Ql(gt);let a=gt;Bt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Rs.bind(null,v=>""+v),f=Rs.bind(null,ba),p=Rs.bind(null,vn);function m(v,D){let O,V;return ul(v)?(O=t.getRecordMatcher(v),V=D):V=v,t.addRoute(V,O)}function A(v){const D=t.getRecordMatcher(v);D&&t.removeRoute(D)}function S(){return t.getRoutes().map(v=>v.record)}function F(v){return!!t.getRecordMatcher(v)}function M(v,D){if(D=te({},D||c.value),typeof v=="string"){const g=xs(n,v,D.path),_=t.resolve({path:g.path},D),b=r.createHref(g.fullPath);return te(g,_,{params:p(_.params),hash:vn(g.hash),redirectedFrom:void 0,href:b})}let O;if(v.path!=null)O=te({},v,{path:xs(n,v.path,D.path).path});else{const g=te({},v.params);for(const _ in g)g[_]==null&&delete g[_];O=te({},v,{params:f(g)}),D.params=f(D.params)}const V=t.resolve(O,D),Y=v.hash||"";V.params=u(p(V.params));const h=Sa(s,te({},v,{hash:_a(Y),path:V.path})),d=r.createHref(h);return te({fullPath:h,hash:Y,query:s===Eo?ja(v.query):v.query||{}},V,{redirectedFrom:void 0,href:d})}function C(v){return typeof v=="string"?xs(n,v,c.value.path):te({},v)}function L(v,D){if(a!==v)return qt(ue.NAVIGATION_CANCELLED,{from:D,to:v})}function N(v){return q(v)}function B(v){return N(te(C(v),{replace:!0}))}function z(v,D){const O=v.matched[v.matched.length-1];if(O&&O.redirect){const{redirect:V}=O;let Y=typeof V=="function"?V(v,D):V;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=C(Y):{path:Y},Y.params={}),te({query:v.query,hash:v.hash,params:Y.path!=null?{}:v.params},Y)}}function q(v,D){const O=a=M(v),V=c.value,Y=v.state,h=v.force,d=v.replace===!0,g=z(O,V);if(g)return q(te(C(g),{state:typeof g=="object"?te({},Y,g.state):Y,force:h,replace:d}),D||O);const _=O;_.redirectedFrom=D;let b;return!h&&Ca(s,V,O)&&(b=qt(ue.NAVIGATION_DUPLICATED,{to:_,from:V}),Ke(V,V,!0,!1)),(b?Promise.resolve(b):U(_,V)).catch(y=>st(y)?st(y,ue.NAVIGATION_GUARD_REDIRECT)?y:dt(y):ee(y,_,V)).then(y=>{if(y){if(st(y,ue.NAVIGATION_GUARD_REDIRECT))return q(te({replace:d},C(y.to),{state:typeof y.to=="object"?te({},Y,y.to.state):Y,force:h}),D||_)}else y=P(_,V,!0,d,Y);return J(_,V,y),y})}function k(v,D){const O=L(v,D);return O?Promise.reject(O):Promise.resolve()}function w(v){const D=Dt.values().next().value;return D&&typeof D.runWithContext=="function"?D.runWithContext(v):v()}function U(v,D){let O;const[V,Y,h]=Ha(v,D);O=Os(V.reverse(),"beforeRouteLeave",v,D);for(const g of V)g.leaveGuards.forEach(_=>{O.push(yt(_,v,D))});const d=k.bind(null,v,D);return O.push(d),Fe(O).then(()=>{O=[];for(const g of o.list())O.push(yt(g,v,D));return O.push(d),Fe(O)}).then(()=>{O=Os(Y,"beforeRouteUpdate",v,D);for(const g of Y)g.updateGuards.forEach(_=>{O.push(yt(_,v,D))});return O.push(d),Fe(O)}).then(()=>{O=[];for(const g of h)if(g.beforeEnter)if(Ue(g.beforeEnter))for(const _ of g.beforeEnter)O.push(yt(_,v,D));else O.push(yt(g.beforeEnter,v,D));return O.push(d),Fe(O)}).then(()=>(v.matched.forEach(g=>g.enterCallbacks={}),O=Os(h,"beforeRouteEnter",v,D,w),O.push(d),Fe(O))).then(()=>{O=[];for(const g of i.list())O.push(yt(g,v,D));return O.push(d),Fe(O)}).catch(g=>st(g,ue.NAVIGATION_CANCELLED)?g:Promise.reject(g))}function J(v,D,O){l.list().forEach(V=>w(()=>V(v,D,O)))}function P(v,D,O,V,Y){const h=L(v,D);if(h)return h;const d=D===gt,g=Bt?history.state:{};O&&(V||d?r.replace(v.fullPath,te({scroll:d&&g&&g.scroll},Y)):r.push(v.fullPath,Y)),c.value=v,Ke(v,D,O,d),dt()}let Q;function he(){Q||(Q=r.listen((v,D,O)=>{if(!St.listening)return;const V=M(v),Y=z(V,St.currentRoute.value);if(Y){q(te(Y,{replace:!0,force:!0}),V).catch(an);return}a=V;const h=c.value;Bt&&Na(bo(h.fullPath,O.delta),fs()),U(V,h).catch(d=>st(d,ue.NAVIGATION_ABORTED|ue.NAVIGATION_CANCELLED)?d:st(d,ue.NAVIGATION_GUARD_REDIRECT)?(q(te(C(d.to),{force:!0}),V).then(g=>{st(g,ue.NAVIGATION_ABORTED|ue.NAVIGATION_DUPLICATED)&&!O.delta&&O.type===qs.pop&&r.go(-1,!1)}).catch(an),Promise.reject()):(O.delta&&r.go(-O.delta,!1),ee(d,V,h))).then(d=>{d=d||P(V,h,!1),d&&(O.delta&&!st(d,ue.NAVIGATION_CANCELLED)?r.go(-O.delta,!1):O.type===qs.pop&&st(d,ue.NAVIGATION_ABORTED|ue.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),J(V,h,d)}).catch(an)}))}let Se=Xt(),re=Xt(),W;function ee(v,D,O){dt(v);const V=re.list();return V.length?V.forEach(Y=>Y(v,D,O)):console.error(v),Promise.reject(v)}function et(){return W&&c.value!==gt?Promise.resolve():new Promise((v,D)=>{Se.add([v,D])})}function dt(v){return W||(W=!v,he(),Se.list().forEach(([D,O])=>v?O(v):D()),Se.reset()),v}function Ke(v,D,O,V){const{scrollBehavior:Y}=e;if(!Bt||!Y)return Promise.resolve();const h=!O&&Ma(bo(v.fullPath,0))||(V||!O)&&history.state&&history.state.scroll||null;return ur().then(()=>Y(v,D,h)).then(d=>d&&Ia(d)).catch(d=>ee(d,v,D))}const Oe=v=>r.go(v);let Mt;const Dt=new Set,St={currentRoute:c,listening:!0,addRoute:m,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:F,getRoutes:S,resolve:M,options:e,push:N,replace:B,go:Oe,back:()=>Oe(-1),forward:()=>Oe(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:re.add,isReady:et,install(v){v.component("RouterLink",cf),v.component("RouterView",pl),v.config.globalProperties.$router=St,Object.defineProperty(v.config.globalProperties,"$route",{enumerable:!0,get:()=>bt(c)}),Bt&&!Mt&&c.value===gt&&(Mt=!0,N(r.location).catch(V=>{}));const D={};for(const V in gt)Object.defineProperty(D,V,{get:()=>c.value[V],enumerable:!0});v.provide(hs,St),v.provide(br,li(D)),v.provide(Js,c);const O=v.unmount;Dt.add(v),v.unmount=function(){Dt.delete(v),Dt.size<1&&(a=gt,Q&&Q(),Q=null,c.value=gt,Mt=!1,W=!1),O()}}};function Fe(v){return v.reduce((D,O)=>D.then(()=>w(O)),Promise.resolve())}return St}function Ff(){return je(hs)}function Vf(e){return je(br)}const gl="claudia-theme";function df(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function pf(){const e=localStorage.getItem(gl);return e==="light"||e==="dark"||e==="system"?e:"system"}function Wn(e){return e==="system"?df()?"dark":"light":e}const bn=$t(pf()),vt=$t(Wn(bn.value));function Qs(e){const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark")}function ml(e){bn.value=e,localStorage.setItem(gl,e),vt.value=Wn(e),Qs(vt.value)}function gf(){const e=vt.value;ml(e==="dark"?"light":"dark")}function Mo(){vt.value=Wn(bn.value),Qs(vt.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{bn.value==="system"&&(vt.value=Wn("system"),Qs(vt.value))})}function mf(){return is(()=>{Mo()}),{theme:bn,resolvedTheme:vt,setTheme:ml,toggleTheme:gf,initTheme:Mo}}const _f=hr({__name:"App",setup(e){const{initTheme:t}=mf();return is(()=>{t()}),(n,s)=>(Un(),Gn(bt(pl)))}}),yf="modulepreload",vf=function(e){return"/"+e},Do={},On=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=vf(c),c in Do)return;Do[c]=!0;const a=c.endsWith(".css"),u=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const f=document.createElement("link");if(f.rel=a?"stylesheet":yf,a||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),a)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Ps="http://localhost:8000/api/v1";function bf(){try{const t=qn().token;return t?t.value??t:null}catch{return null}}function Ef(){async function e(){try{const n=await fetch(`${Ps}/auth/refresh`,{method:"POST",credentials:"include"});if(n.ok){const s=await n.json(),r=qn();return r.token=s.access_token,localStorage.setItem("access_token",s.access_token),s.access_token}}catch{}return null}async function t(n,s,r,o=0){const i={"Content-Type":"application/json"},l=bf();console.log(`[useApi] ${n} ${s} - token: ${l?"present":"null"}`),l&&!["/auth/login","/auth/register","/auth/logout","/auth/refresh"].includes(s)?(i.Authorization=`Bearer ${l}`,console.log(`[useApi] Added Authorization header: Bearer ${l.substring(0,10)}...`)):console.log(`[useApi] NO Authorization header - token=${l?"present":"null"}, endpoint=${s}`);const a=await fetch(`${Ps}${s}`,{method:n,headers:i,body:r?JSON.stringify(r):void 0,credentials:"include"});if(a.status===401){if(o===0&&!s.includes("/auth/")){const f=await e();if(f){i.Authorization=`Bearer ${f}`;const p=await fetch(`${Ps}${s}`,{method:n,headers:i,credentials:"include",body:r?JSON.stringify(r):void 0});if(p.ok)return p.status===204?{}:p.json()}}throw qn().logout(),Er.push("/login"),new Error("Unauthorized")}if(!a.ok){const u=await a.json().catch(()=>({detail:"Request failed"}));throw new Error(u.detail||`HTTP ${a.status}`)}return a.status===204?{}:a.json()}return{get:n=>t("GET",n),post:(n,s)=>t("POST",n,s),put:(n,s)=>t("PUT",n,s),patch:(n,s)=>t("PATCH",n,s),delete:n=>t("DELETE",n)}}const qn=ia("auth",()=>{const e=$t(localStorage.getItem("access_token")),t=$t(null),n=Ef(),s=Ne(()=>!!e.value);async function r(c,a){const u=await n.post("/auth/login",{username:c,password:a});return e.value=u.access_token,localStorage.setItem("access_token",u.access_token),await i(),u}async function o(c,a){return await n.post("/auth/register",{username:c,password:a})}async function i(){if(!e.value)return null;try{return t.value=await n.get("/auth/me"),t.value}catch{return l(),null}}async function l(){try{await n.post("/auth/logout")}catch{}e.value=null,t.value=null,localStorage.removeItem("access_token")}return e.value&&i(),{token:e,user:t,isAuthenticated:s,login:r,register:o,fetchUser:i,logout:l}}),Er=hf({history:Ga(),routes:[{path:"/login",name:"login",component:()=>On(()=>import("./Login-DD_XU6SA.js"),__vite__mapDeps([0,1,2,3])),meta:{requiresAuth:!1}},{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"dashboard",component:()=>On(()=>import("./Dashboard-DhaHJ2Mj.js"),__vite__mapDeps([4,5,1,2,6,7,8])),meta:{requiresAuth:!0}},{path:"/projects/:id",name:"project",component:()=>On(()=>import("./ProjectView-DGH2EBfC.js"),__vite__mapDeps([9,5,10,1,2,11,6,7,12])),meta:{requiresAuth:!0}},{path:"/documents/:id",name:"document",component:()=>On(()=>import("./DocumentView-DZfZNu6O.js"),__vite__mapDeps([13,10,1,2,11,6,7,14])),meta:{requiresAuth:!0}},{path:"/:pathMatch(.*)*",redirect:"/dashboard"}]});Er.beforeEach((e,t,n)=>{const s=qn();e.meta.requiresAuth&&!s.isAuthenticated?n("/login"):e.name==="login"&&s.isAuthenticated?n("/dashboard"):n()});const Ar=Yu(_f);Ar.use(ea());Ar.use(Er);Ar.mount("#app");export{ia as A,bf as B,Ef as C,Ri as D,yr as E,Ie as F,Cf as G,cr as H,Ql as I,Af as J,ur as K,_r as L,Pf as M,Lf as N,wf as O,mf as P,Tf as Q,Nf as T,qi as a,If as b,Of as c,hr as d,Sf as e,xe as f,ac as g,cu as h,Ne as i,Ff as j,is as k,bt as l,xf as m,sn as n,Un as o,Rf as p,tr as q,$t as r,Gn as s,Ol as t,qn as u,Mf as v,Df as w,xi as x,Vf as y,er as z}; diff --git a/dist/assets/projects-BPkECm1G.js b/dist/assets/projects-BPkECm1G.js deleted file mode 100644 index 585bb1e..0000000 --- a/dist/assets/projects-BPkECm1G.js +++ /dev/null @@ -1 +0,0 @@ -import{y as x,r as s,z as E}from"./index-BuR1WXAD.js";const M=x("projects",()=>{const c=s([]),a=s(null),u=s([]),d=s([]),p=s([]),i=s(!1),l=s(null),r=E();async function j(){i.value=!0,l.value=null;try{const e=await r.get("/projects");c.value=e.projects}catch(e){throw l.value=e instanceof Error?e.message:"Failed to fetch projects",e}finally{i.value=!1}}async function y(e){i.value=!0,l.value=null;try{a.value=await r.get(`/projects/${e}`),await f(e)}catch(o){throw l.value=o instanceof Error?o.message:"Failed to fetch project",o}finally{i.value=!1}}async function f(e){try{const[o,t]=await Promise.all([r.get(`/projects/${e}/folders`),r.get(`/projects/${e}/documents`)]);u.value=o.folders,d.value=t.documents,m()}catch(o){throw l.value=o instanceof Error?o.message:"Failed to fetch project tree",o}}function m(){const e=new Map,o=[];for(const t of u.value){const n={id:t.id,name:t.name,type:"folder",children:[],parent_id:t.parent_id};e.set(t.id,n)}for(const t of d.value)if(!t.folder_id){const n={id:t.id,name:t.title,type:"document",parent_id:null};e.set(t.id,n)}for(const t of d.value)if(t.folder_id){const n=e.get(t.folder_id);n&&n.children&&n.children.push({id:t.id,name:t.title,type:"document",parent_id:t.folder_id})}for(const t of e.values())if(t.parent_id===null)o.push(t);else{const n=e.get(t.parent_id);n&&n.children&&n.children.push(t)}p.value=o}async function w(e,o){const t=await r.post("/projects",{name:e,description:o});return c.value.push(t),t}async function _(e,o,t){var h;const n=await r.put(`/projects/${e}`,{name:o,description:t}),v=c.value.findIndex(F=>F.id===e);return v!==-1&&(c.value[v]=n),((h=a.value)==null?void 0:h.id)===e&&(a.value=n),n}async function g(e){var o;await r.delete(`/projects/${e}`),c.value=c.value.filter(t=>t.id!==e),((o=a.value)==null?void 0:o.id)===e&&(a.value=null)}async function P(e,o,t=null){const n=await r.post(`/projects/${e}/folders`,{name:o,parent_id:t});return u.value.push(n),await f(e),n}async function $(e){await r.delete(`/folders/${e}`),a.value&&await f(a.value.id)}return{projects:c,currentProject:a,folders:u,documents:d,treeNodes:p,loading:i,error:l,fetchProjects:j,fetchProject:y,fetchProjectTree:f,createProject:w,updateProject:_,deleteProject:g,createFolder:P,deleteFolder:$}});export{M as u}; diff --git a/dist/assets/projects-CWhQXAJL.js b/dist/assets/projects-CWhQXAJL.js deleted file mode 100644 index a3338eb..0000000 --- a/dist/assets/projects-CWhQXAJL.js +++ /dev/null @@ -1 +0,0 @@ -import{z as F,r as s,A as B,B as R}from"./index-D2fAAQJ2.js";const b=F("projects",()=>{const c=s([]),n=s(null),d=s([]),f=s([]),h=s([]),i=s(!1),l=s(null),a=R();async function j(){i.value=!0,l.value=null;try{const e=await a.get("/projects");c.value=e.projects}catch(e){throw l.value=e instanceof Error?e.message:"Failed to fetch projects",e}finally{i.value=!1}}async function w(e){i.value=!0,l.value=null;try{n.value=await a.get(`/projects/${e}`),await p(e)}catch(o){throw l.value=o instanceof Error?o.message:"Failed to fetch project",o}finally{i.value=!1}}async function p(e){try{const[o,t]=await Promise.all([a.get(`/projects/${e}/folders`),a.get(`/projects/${e}/documents`)]);d.value=o.folders,f.value=t.documents,y()}catch(o){throw l.value=o instanceof Error?o.message:"Failed to fetch project tree",o}}function y(){const e=new Map,o=[];for(const t of d.value){const r={id:t.id,name:t.name,type:"folder",children:[],parent_id:t.parent_id};e.set(t.id,r)}for(const t of f.value)if(!t.folder_id){const r={id:t.id,name:t.title,type:"document",parent_id:null};e.set(t.id,r)}for(const t of f.value)if(t.folder_id){const r=e.get(t.folder_id);r&&r.children&&r.children.push({id:t.id,name:t.title,type:"document",parent_id:t.folder_id})}for(const t of e.values())if(t.parent_id===null)o.push(t);else{const r=e.get(t.parent_id);r&&r.children&&r.children.push(t)}h.value=o}async function m(e,o){const t=await a.post("/projects",{name:e,description:o});return c.value.push(t),t}async function _(e,o,t){var v;const r=await a.put(`/projects/${e}`,{name:o,description:t}),u=c.value.findIndex(A=>A.id===e);return u!==-1&&(c.value[u]=r),((v=n.value)==null?void 0:v.id)===e&&(n.value=r),r}async function $(e){var o;await a.delete(`/projects/${e}`),c.value=c.value.filter(t=>t.id!==e),((o=n.value)==null?void 0:o.id)===e&&(n.value=null)}async function g(e,o,t=null){const r=await a.post(`/projects/${e}/folders`,{name:o,parent_id:t});return d.value.push(r),await p(e),r}async function P(e){await a.delete(`/folders/${e}`),n.value&&await p(n.value.id)}async function E(e,o=2){return await a.get(`/projects/${e}/graph?depth=${o}`)}async function x(e,o,t=!0){const u=await fetch(`http://localhost:8000/api/v1/projects/${e}/export?format=${o}&include_metadata=${t}`,{headers:{Authorization:`Bearer ${B()}`},credentials:"include"});if(!u.ok)throw new Error("Export failed");return await u.blob()}return{projects:c,currentProject:n,folders:d,documents:f,treeNodes:h,loading:i,error:l,fetchProjects:j,fetchProject:w,fetchProjectTree:p,createProject:m,updateProject:_,deleteProject:$,createFolder:g,deleteFolder:P,fetchProjectGraph:E,exportProject:x}});export{b as u}; diff --git a/dist/assets/projects-DaKKWK6n.js b/dist/assets/projects-DaKKWK6n.js new file mode 100644 index 0000000..34317d7 --- /dev/null +++ b/dist/assets/projects-DaKKWK6n.js @@ -0,0 +1 @@ +import{A as B,r as l,B as R,C as S}from"./index-Bwmlaq-e.js";const N=B("projects",()=>{const c=l([]),n=l(null),d=l([]),f=l([]),h=l([]),u=l(!1),i=l(null),a=S();async function j(){u.value=!0,i.value=null;try{const e=await a.get("/projects");c.value=e.projects}catch(e){throw i.value=e instanceof Error?e.message:"Failed to fetch projects",e}finally{u.value=!1}}async function w(e){u.value=!0,i.value=null;try{n.value=await a.get(`/projects/${e}`),await p(e)}catch(o){throw i.value=o instanceof Error?o.message:"Failed to fetch project",o}finally{u.value=!1}}async function p(e){try{const[o,t]=await Promise.all([a.get(`/projects/${e}/folders`),a.get(`/projects/${e}/documents`)]);d.value=o.folders,f.value=t.documents,y()}catch(o){throw i.value=o instanceof Error?o.message:"Failed to fetch project tree",o}}function y(){const e=new Map,o=[];for(const t of d.value){const r={id:t.id,name:t.name,type:"folder",children:[],parent_id:t.parent_id};e.set(t.id,r)}for(const t of f.value)if(!t.folder_id){const r={id:t.id,name:t.title,type:"document",parent_id:null};e.set(t.id,r)}for(const t of f.value)if(t.folder_id){const r=e.get(t.folder_id);r&&r.children&&r.children.push({id:t.id,name:t.title,type:"document",parent_id:t.folder_id})}for(const t of e.values())if(t.parent_id===null)o.push(t);else{const r=e.get(t.parent_id);r&&r.children&&r.children.push(t)}h.value=o}async function m(e,o){const t=await a.post("/projects",{name:e,description:o});return c.value.push(t),t}async function $(e,o,t){var v;const r=await a.put(`/projects/${e}`,{name:o,description:t}),s=c.value.findIndex(F=>F.id===e);return s!==-1&&(c.value[s]=r),((v=n.value)==null?void 0:v.id)===e&&(n.value=r),r}async function _(e,o){var s;const t=await a.patch(`/projects/${e}`,o),r=c.value.findIndex(v=>v.id===e);return r!==-1&&(c.value[r]=t),((s=n.value)==null?void 0:s.id)===e&&(n.value=t),t}async function g(e){var o;await a.delete(`/projects/${e}`),c.value=c.value.filter(t=>t.id!==e),((o=n.value)==null?void 0:o.id)===e&&(n.value=null)}async function P(e,o,t=null){const r=await a.post(`/projects/${e}/folders`,{name:o,parent_id:t});return d.value.push(r),await p(e),r}async function x(e){await a.delete(`/folders/${e}`),n.value&&await p(n.value.id)}async function E(e,o=2){return await a.get(`/projects/${e}/graph?depth=${o}`)}async function A(e,o,t=!0){const s=await fetch(`http://localhost:8000/api/v1/projects/${e}/export?format=${o}&include_metadata=${t}`,{headers:{Authorization:`Bearer ${R()}`},credentials:"include"});if(!s.ok)throw new Error("Export failed");return await s.blob()}return{projects:c,currentProject:n,folders:d,documents:f,treeNodes:h,loading:u,error:i,fetchProjects:j,fetchProject:w,fetchProjectTree:p,createProject:m,updateProject:$,patchProject:_,deleteProject:g,createFolder:P,deleteFolder:x,fetchProjectGraph:E,exportProject:A}});export{N as u}; diff --git a/dist/index.html b/dist/index.html index 6294778..613422a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ Claudia Docs - + diff --git a/src/composables/useApi.ts b/src/composables/useApi.ts index f3f65aa..41f33cd 100644 --- a/src/composables/useApi.ts +++ b/src/composables/useApi.ts @@ -107,6 +107,8 @@ export function useApi() { post: (endpoint: string, body?: any) => request('POST', endpoint, body), // eslint-disable-next-line @typescript-eslint/no-explicit-any put: (endpoint: string, body?: any) => request('PUT', endpoint, body), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + patch: (endpoint: string, body?: any) => request('PATCH', endpoint, body), delete: (endpoint: string) => request('DELETE', endpoint) } } diff --git a/src/stores/projects.ts b/src/stores/projects.ts index 5aaa653..38e05e1 100644 --- a/src/stores/projects.ts +++ b/src/stores/projects.ts @@ -135,6 +135,18 @@ export const useProjectsStore = defineStore('projects', () => { return project } + async function patchProject(id: string, data: { name?: string; description?: string }) { + const project = await api.patch(`/projects/${id}`, data) + const index = projects.value.findIndex(p => p.id === id) + if (index !== -1) { + projects.value[index] = project + } + if (currentProject.value?.id === id) { + currentProject.value = project + } + return project + } + async function deleteProject(id: string) { await api.delete(`/projects/${id}`) projects.value = projects.value.filter(p => p.id !== id) @@ -188,6 +200,7 @@ export const useProjectsStore = defineStore('projects', () => { fetchProjectTree, createProject, updateProject, + patchProject, deleteProject, createFolder, deleteFolder, diff --git a/src/views/ProjectView.vue b/src/views/ProjectView.vue index ea45a0d..b033a86 100644 --- a/src/views/ProjectView.vue +++ b/src/views/ProjectView.vue @@ -1,5 +1,5 @@