@strands.gg/accui 2.17.40 → 2.17.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  "use strict";const a=require("vue"),de=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},fd={class:"accui-component-scope"},hd={class:"alert-content"},pd={class:"alert-icon-container"},md={class:"alert-main-icon",fill:"currentColor",viewBox:"0 0 20 20","aria-hidden":"true"},gd=["d"],yd={class:"alert-text-container"},kd={key:0,class:"alert-dismiss-container"},bd=a.defineComponent({__name:"UiAlert",props:{variant:{default:"info"},title:{},message:{},dismissible:{type:Boolean,default:!1}},emits:["dismiss"],setup(n){const e=n,t=a.computed(()=>({success:"alert alert-success",error:"alert alert-error",warning:"alert alert-warning",info:"alert alert-info"})[e.variant]),r=a.computed(()=>"alert-title"),i=a.computed(()=>"alert-message"),o=a.computed(()=>({success:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",error:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",warning:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",info:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"})[e.variant]);return(s,l)=>(a.openBlock(),a.createElementBlock("div",fd,[a.createElementVNode("div",{class:a.normalizeClass(t.value),role:"alert"},[a.createElementVNode("div",hd,[a.createElementVNode("div",pd,[(a.openBlock(),a.createElementBlock("svg",md,[a.createElementVNode("path",{"fill-rule":"evenodd",d:o.value,"clip-rule":"evenodd"},null,8,gd)]))]),a.createElementVNode("div",yd,[n.title?(a.openBlock(),a.createElementBlock("h3",{key:0,class:a.normalizeClass(r.value)},a.toDisplayString(n.title),3)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(i.value)},[a.renderSlot(s.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(n.message),1)],!0)],2)]),n.dismissible?(a.openBlock(),a.createElementBlock("div",kd,[a.createElementVNode("button",{type:"button",class:"alert-dismiss-button",onClick:l[0]||(l[0]=c=>s.$emit("dismiss"))},[...l[1]||(l[1]=[a.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),a.createElementVNode("svg",{class:"alert-dismiss-icon",fill:"currentColor",viewBox:"0 0 20 20"},[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])])])):a.createCommentVNode("",!0)])],2)]))}}),co=de(bd,[["__scopeId","data-v-68f69cce"]]),vd=`<svg width="302" height="438" viewBox="0 0 302 438" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M71.5001 96C71.5001 96 132 106 137 61.5C142 17 117.5 3.50005 94.5001 1.50003C71.5001 -0.499996 16.0001 8.5 2.00014 72.5C-6.5 130.5 71.5003 227.5 165 218C258.5 208.5 280.758 148.5 283.5 121C286.242 93.5 277.5 61.5 238.5 61.5C153 61.5 150.501 185 170.5 235C190.5 285 199 279 213 314C227.001 349 217.296 411.458 183 427C129.456 450.65 92 426 78.5 407.5C65 389 68.0003 357 94.5001 344.5C121 332 212.41 393.5 301.5 361" stroke="black"/>
3
3
  </svg>
4
- `,xd={key:0,class:"loader-icon"},wd=["width","height"],Cd=["d"],Sd=["stroke-width"],Md=["stroke-width"],Td=["width","height"],Ed={key:3,class:"loader-text"},Nd=a.defineComponent({__name:"UiLoader",props:{size:{default:"md"},color:{default:"primary"},variant:{default:"circle"},text:{},centered:{type:Boolean,default:!0},weight:{default:30},fullWidth:{type:Boolean,default:!1}},setup(n){const t=vd.replace(/<svg[^>]*>/,"").replace(/<\/svg>/,"").trim().match(/d="([^"]*)"/)?.[1]||"",r=n,i={sm:32,md:48,lg:64,xl:80},o=a.computed(()=>typeof r.size=="number"?r.size:i[r.size]||i.md);return(s,l)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["loader-container",[{"loader-centered":n.centered},`loader-color-${n.color}`]])},[n.variant==="spinner"?(a.openBlock(),a.createElementBlock("div",xd,[(a.openBlock(),a.createElementBlock("svg",{width:o.value,height:o.value,viewBox:"0 0 500 500"},[a.createElementVNode("defs",null,[a.createElementVNode("path",{id:"logo-path",d:a.unref(t),transform:"translate(81, 13) scale(1.0)"},null,8,Cd)]),a.createElementVNode("use",{href:"#logo-path",fill:"none",stroke:"var(--loader-semi-color)","stroke-width":n.weight,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Sd),a.createElementVNode("use",{href:"#logo-path",fill:"none",stroke:"var(--loader-solid-color)","stroke-width":n.weight,"stroke-linecap":"round","stroke-linejoin":"round",class:"loader-animated-path"},null,8,Md)],8,wd))])):n.variant==="circle"?(a.openBlock(),a.createElementBlock("div",{key:1,class:"loader-circle",style:a.normalizeStyle({width:`${o.value}px`,height:`${o.value}px`})},[(a.openBlock(),a.createElementBlock("svg",{width:o.value,height:o.value,viewBox:"0 0 50 50"},[...l[0]||(l[0]=[a.createElementVNode("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:"var(--loader-solid-color)","stroke-width":"4","stroke-linecap":"round",class:"loader-circle-path"},null,-1)])],8,Td))],4)):n.variant==="bar"?(a.openBlock(),a.createElementBlock("div",{key:2,class:"loader-bar",style:a.normalizeStyle({width:n.fullWidth?"100%":`${o.value*1.5}px`,height:`${Math.max(o.value*.1,4)}px`})},[...l[1]||(l[1]=[a.createElementVNode("div",{class:"loader-bar-track"},[a.createElementVNode("div",{class:"loader-bar-fill"})],-1)])],4)):a.createCommentVNode("",!0),n.text?(a.openBlock(),a.createElementBlock("p",Ed,a.toDisplayString(n.text),1)):a.createCommentVNode("",!0)],2))}}),zr=de(Nd,[["__scopeId","data-v-4b565c5d"]]),Ad={key:0,class:"button-loading-content"},Bd={key:0},Od={key:0,class:"leading-icon"},Dd={class:"button-text-content"},Id={key:1,class:"trailing-icon"},$d=a.defineComponent({__name:"UiButton.Content",props:{loading:{type:Boolean,default:!1},loadingText:{},icon:{type:Boolean,default:!1},size:{},textAlign:{default:"center"}},setup(n){const e=a.useSlots(),t=a.computed(()=>!!e["leading-icon"]),r=a.computed(()=>!!e["trailing-icon"]),i=n,o=a.computed(()=>{switch(i.size){case"xs":return 16;case"sm":return 18;case"md":return 20;case"lg":return 24;case"xl":return 28;default:return 20}}),s=a.computed(()=>i.size?`button-content-${i.size}`:"button-content-md");return(l,c)=>n.loading?(a.openBlock(),a.createElementBlock("span",Ad,[a.createVNode(zr,{variant:"circle",size:o.value,centered:!1,color:"white"},null,8,["size"]),n.icon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",Bd,a.toDisplayString(n.loadingText||"Loading..."),1))])):(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["button-content",s.value,`button-content-align-${n.textAlign}`])},[n.icon?a.renderSlot(l.$slots,"icon",{key:0},void 0,!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[t.value?(a.openBlock(),a.createElementBlock("span",Od,[a.renderSlot(l.$slots,"leading-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(l.$slots,"icon",{},void 0,!0),a.createElementVNode("span",Dd,[a.renderSlot(l.$slots,"default",{},void 0,!0)]),r.value?(a.openBlock(),a.createElementBlock("span",Id,[a.renderSlot(l.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0)],64))],2))}}),Wt=de($d,[["__scopeId","data-v-12d1d1fc"]]),Rd=["href","target","rel"],Oi=a.defineComponent({__name:"UiButton.Anchor",props:{to:{},href:{},external:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},icon:{type:Boolean,default:!1},buttonClasses:{},buttonStyles:{},textAlign:{default:"center"}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=a.computed(()=>{if(t.href)return t.href;if(t.to){if(typeof t.to=="string")return t.to;if(typeof t.to=="object"&&t.to)return"#route-object-not-supported"}return"#"}),o=s=>{if(t.disabled||t.loading){s.preventDefault();return}r("click",s)};return(s,l)=>(a.openBlock(),a.createElementBlock("a",{href:i.value,target:n.external?"_blank":void 0,rel:n.external?"noopener noreferrer":void 0,class:a.normalizeClass(n.buttonClasses),style:a.normalizeStyle(n.buttonStyles),onClick:o},[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"text-align":n.textAlign},{"leading-icon":a.withCtx(()=>[a.renderSlot(s.$slots,"leading-icon")]),icon:a.withCtx(()=>[a.renderSlot(s.$slots,"icon")]),default:a.withCtx(()=>[a.renderSlot(s.$slots,"default")]),"trailing-icon":a.withCtx(()=>[a.renderSlot(s.$slots,"trailing-icon")]),_:3},8,["loading","loading-text","icon","text-align"])],14,Rd))}}),Di=a.defineComponent({__name:"UiButton.Nuxt",props:{to:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},icon:{type:Boolean,default:!1},buttonClasses:{},buttonStyles:{},textAlign:{default:"center"}},emits:["click"],setup(n,{emit:e}){const t=a.getCurrentInstance(),r=a.computed(()=>t?.appContext.app.component("NuxtLink")?"NuxtLink":t?.appContext.app.component("RouterLink")?"RouterLink":"a"),i=n,o=e,s=l=>{if(i.disabled||i.loading){l.preventDefault();return}o("click",l)};return(l,c)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.value),{to:r.value!=="a"?n.to:void 0,href:r.value==="a"?typeof n.to=="string"?n.to:"/":void 0,class:a.normalizeClass(n.buttonClasses),style:a.normalizeStyle(n.buttonStyles),onClick:s},{default:a.withCtx(()=>[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"text-align":n.textAlign},{"leading-icon":a.withCtx(()=>[a.renderSlot(l.$slots,"leading-icon")]),icon:a.withCtx(()=>[a.renderSlot(l.$slots,"icon")]),default:a.withCtx(()=>[a.renderSlot(l.$slots,"default")]),"trailing-icon":a.withCtx(()=>[a.renderSlot(l.$slots,"trailing-icon")]),_:3},8,["loading","loading-text","icon","text-align"])]),_:3},8,["to","href","class","style"]))}}),Ii=a.defineComponent({__name:"UiButton.Vue",props:{to:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},icon:{type:Boolean,default:!1},buttonClasses:{},buttonStyles:{},textAlign:{default:"center"}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=o=>{if(t.disabled||t.loading){o.preventDefault();return}r("click",o)};return(o,s)=>{const l=a.resolveComponent("router-link");return a.openBlock(),a.createBlock(l,{to:n.to,class:a.normalizeClass(n.buttonClasses),style:a.normalizeStyle(n.buttonStyles),onClick:i},{default:a.withCtx(()=>[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"text-align":n.textAlign},{"leading-icon":a.withCtx(()=>[a.renderSlot(o.$slots,"leading-icon")]),icon:a.withCtx(()=>[a.renderSlot(o.$slots,"icon")]),default:a.withCtx(()=>[a.renderSlot(o.$slots,"default")]),"trailing-icon":a.withCtx(()=>[a.renderSlot(o.$slots,"trailing-icon")]),_:3},8,["loading","loading-text","icon","text-align"])]),_:3},8,["to","class","style"])}}}),Ld={class:"ui-tooltip-content"},zd=a.defineComponent({inheritAttrs:!1,__name:"UiTooltip",props:{content:{default:""},position:{default:"top"},delay:{default:500},disabled:{type:Boolean,default:!1},offset:{default:8},maxWidth:{default:250}},setup(n){const e=n,t=a.ref(),r=a.ref(),i=a.ref(!1),o=a.ref(!1);let s=null,l=null;const c=a.ref({}),d=async()=>{if(!t.value||!r.value||!o.value)return;await a.nextTick();const h=t.value.getBoundingClientRect();r.value.style.visibility="hidden",r.value.style.opacity="1";const p=r.value.getBoundingClientRect(),m=p.width,g=p.height;r.value.style.visibility="",r.value.style.opacity="";const y=window.innerWidth,k=window.innerHeight;let S=0,x=0;switch(e.position){case"top":S=h.top-g-e.offset,x=h.left+h.width/2-m/2;break;case"bottom":S=h.bottom+e.offset,x=h.left+h.width/2-m/2;break;case"left":S=h.top+h.height/2-g/2,x=h.left-m-e.offset;break;case"right":S=h.top+h.height/2-g/2,x=h.right+e.offset;break}const b=8;x<b?x=b:x+m>y-b&&(x=y-m-b),S<b?S=b:S+g>k-b&&(S=k-g-b),c.value={position:"fixed",top:`${S}px`,left:`${x}px`,zIndex:"9999"}},u=()=>{e.disabled||(l&&(clearTimeout(l),l=null),o.value=!0,a.nextTick(()=>{d()}),s=setTimeout(()=>{i.value=!0},e.delay))},f=()=>{s&&(clearTimeout(s),s=null),l=setTimeout(()=>{i.value=!1,setTimeout(()=>{o.value=!1},200)},100)};return a.onUnmounted(()=>{s&&clearTimeout(s),l&&clearTimeout(l)}),(h,p)=>(a.openBlock(),a.createElementBlock("div",a.mergeProps({ref_key:"tooltipContainer",ref:t,class:"ui-tooltip-container"},h.$attrs,{onMouseenter:u,onMouseleave:f}),[a.renderSlot(h.$slots,"default",{},void 0,!0),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[o.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:r,class:a.normalizeClass(["ui-tooltip",[`ui-tooltip--${n.position}`,{"ui-tooltip--visible":i.value}]]),style:a.normalizeStyle(c.value),role:"tooltip"},[a.createElementVNode("div",Ld,[a.renderSlot(h.$slots,"tooltip",{},()=>[a.createTextVNode(a.toDisplayString(n.content),1)],!0)]),a.createElementVNode("div",{class:a.normalizeClass(["ui-tooltip-arrow",`ui-tooltip-arrow--${n.position}`])},null,2)],6)):a.createCommentVNode("",!0)]))],16))}}),Tl=de(zd,[["__scopeId","data-v-ba66edda"]]),Pd=["type","disabled","tabindex"],Vd=["type","disabled","tabindex"],Fd=a.defineComponent({inheritAttrs:!1,__name:"UiButton",props:{variant:{default:"primary"},size:{default:"md"},type:{default:"button"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},fullWidth:{type:Boolean,default:!1},color:{default:"primary"},fontWeight:{default:600},icon:{type:Boolean,default:!1},squircle:{type:Boolean,default:!1},to:{},href:{},external:{type:Boolean,default:!1},tabindex:{},title:{},textAlign:{default:"center"}},emits:["click"],setup(n,{emit:e}){const t=n,r=a.computed(()=>t.title?typeof t.title=="string"?{content:t.title,position:"top",disabled:t.disabled||t.loading}:{...t.title,disabled:t.title.disabled??(t.disabled||t.loading)}:null),i=a.computed(()=>!!(typeof process<"u"&&process.client!==void 0||typeof window<"u"&&(window.__NUXT__||window.$nuxt))),o=a.computed(()=>{try{if(typeof window<"u"&&window.Vue?.Router)return!0}catch{}return!1}),s=a.computed(()=>["ui-button",`ui-button-${t.variant}`,`ui-button-${t.size}`,`ui-button-color-${t.color}`,t.loading?"ui-button-loading":"",t.disabled?"ui-button-disabled":"",t.fullWidth?"ui-button-full-width":"",t.icon?"ui-button-icon":"",t.squircle?"ui-button-squircle":""].filter(Boolean)),l=a.computed(()=>s.value.join(" ")),c=a.computed(()=>({fontWeight:t.fontWeight})),d=a.computed(()=>t.disabled||t.loading?-1:t.tabindex??void 0);return(u,f)=>n.title?(a.openBlock(),a.createBlock(Tl,a.normalizeProps(a.mergeProps({key:0},r.value)),{default:a.withCtx(()=>[n.to?i.value&&n.to?(a.openBlock(),a.createBlock(Di,{key:1,to:n.to,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[1]||(f[1]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):o.value&&n.to?(a.openBlock(),a.createBlock(Ii,{key:2,to:n.to,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[2]||(f[2]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):(a.openBlock(),a.createBlock(Oi,{key:3,to:n.to,href:n.href,external:n.external,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[3]||(f[3]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","href","external","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):(a.openBlock(),a.createElementBlock("button",a.mergeProps({key:0},u.$attrs,{type:n.type,disabled:n.disabled||n.loading,class:l.value,style:c.value,tabindex:d.value,onClick:f[0]||(f[0]=h=>u.$emit("click",h))}),[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,size:n.size,"text-align":n.textAlign},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["loading","loading-text","icon","size","text-align"])],16,Pd))]),_:3},16)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[n.to?i.value&&n.to?(a.openBlock(),a.createBlock(Di,{key:1,to:n.to,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[5]||(f[5]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):o.value&&n.to?(a.openBlock(),a.createBlock(Ii,{key:2,to:n.to,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[6]||(f[6]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):(a.openBlock(),a.createBlock(Oi,{key:3,to:n.to,href:n.href,external:n.external,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[7]||(f[7]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","href","external","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):(a.openBlock(),a.createElementBlock("button",a.mergeProps({key:0},u.$attrs,{type:n.type,disabled:n.disabled||n.loading,class:l.value,style:c.value,tabindex:d.value,onClick:f[4]||(f[4]=h=>u.$emit("click",h))}),[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,size:n.size,"text-align":n.textAlign},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["loading","loading-text","icon","size","text-align"])],16,Vd))],64))}}),W=de(Fd,[["__scopeId","data-v-0e5b129a"]]),Hd={key:0,class:"ui-card-header"},jd={key:0,class:"ui-card-title-wrapper"},Ud={key:0,class:"ui-card-title"},qd={key:0,class:"ui-card-subtitle"},Wd={key:1,class:"ui-card-content"},Kd={key:2,class:"ui-card-footer"},Jd=a.defineComponent({inheritAttrs:!1,__name:"UiCard",props:{variant:{default:"default"},padding:{default:"md"},shadow:{default:"sm"},color:{default:"default"},title:{},subtitle:{},to:{}},setup(n){const e=n,t=a.useAttrs(),r=a.getCurrentInstance(),i=a.computed(()=>e.to?r?.appContext.app.component("NuxtLink")?"NuxtLink":r?.appContext.app.component("RouterLink")?"RouterLink":"a":null),o=a.computed(()=>e.to?i.value||"a":"div"),s=a.computed(()=>{const d=o.value;return d==="NuxtLink"||d==="RouterLink"}),l=a.computed(()=>o.value==="a"&&!!e.to),c=a.computed(()=>[`ui-card-${e.variant}`,`ui-card-padding-${e.padding}`,`ui-card-shadow-${e.shadow}`,`ui-card-color-${e.color}`,t.class]);return(d,u)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.value),{to:s.value?n.to:void 0,href:l.value?typeof n.to=="string"?n.to:"":void 0,class:a.normalizeClass(["ui-card",[c.value,{"ui-card-linkable":!!n.to}]])},{default:a.withCtx(()=>[d.$slots.header||n.title||n.subtitle||d.$slots["leading-icon"]||d.$slots["trailing-icon"]?(a.openBlock(),a.createElementBlock("div",Hd,[a.renderSlot(d.$slots,"header",{},()=>[a.renderSlot(d.$slots,"leading-icon",{},void 0,!0),n.title||d.$slots.title||n.subtitle||d.$slots.subtitle?(a.openBlock(),a.createElementBlock("div",jd,[n.title||d.$slots.title?a.renderSlot(d.$slots,"title",{key:0},()=>[n.title?(a.openBlock(),a.createElementBlock("h2",Ud,a.toDisplayString(n.title),1)):a.createCommentVNode("",!0)],!0):a.createCommentVNode("",!0),n.subtitle||d.$slots.subtitle?a.renderSlot(d.$slots,"subtitle",{key:1},()=>[n.subtitle?(a.openBlock(),a.createElementBlock("p",qd,a.toDisplayString(n.subtitle),1)):a.createCommentVNode("",!0)],!0):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.renderSlot(d.$slots,"trailing-icon",{},void 0,!0),a.renderSlot(d.$slots,"actions",{},void 0,!0)],!0)])):a.createCommentVNode("",!0),d.$slots.default?(a.openBlock(),a.createElementBlock("div",Wd,[a.renderSlot(d.$slots,"default",{},void 0,!0)])):a.createCommentVNode("",!0),d.$slots.footer?(a.openBlock(),a.createElementBlock("div",Kd,[a.renderSlot(d.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)]),_:3},8,["to","href","class"]))}}),uo=de(Jd,[["__scopeId","data-v-bd90a041"]]);const es=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gd=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),Yd=n=>{const e=Gd(n);return e.charAt(0).toUpperCase()+e.slice(1)},Qd=(...n)=>n.filter((e,t,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===t).join(" ").trim(),ts=n=>n==="";var en={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Xd=({name:n,iconNode:e,absoluteStrokeWidth:t,"absolute-stroke-width":r,strokeWidth:i,"stroke-width":o,size:s=en.width,color:l=en.stroke,...c},{slots:d})=>a.h("svg",{...en,...c,width:s,height:s,stroke:l,"stroke-width":ts(t)||ts(r)||t===!0||r===!0?Number(i||o||en["stroke-width"])*24/Number(s):i||o||en["stroke-width"],class:Qd("lucide",c.class,...n?[`lucide-${es(Yd(n))}-icon`,`lucide-${es(n)}`]:["lucide-icon"])},[...e.map(u=>a.h(...u)),...d.default?[d.default()]:[]]);const J=(n,e)=>(t,{slots:r,attrs:i})=>a.h(Xd,{...i,...t,iconNode:e,name:n},r);const Zd=J("align-center",[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);const _d=J("align-left",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);const eu=J("align-right",[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);const tu=J("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);const nu=J("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);const ru=J("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const iu=J("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Pr=J("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ou=J("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const su=J("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const lu=J("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const au=J("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);const cu=J("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const du=J("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const uu=J("file-input",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);const fu=J("heading-1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);const hu=J("heading-2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);const pu=J("heading-3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);const mu=J("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);const gu=J("list-ordered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);const yu=J("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);const El=J("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const ku=J("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);const bu=J("redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);const vu=J("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const xu=J("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);const wu=J("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);const Cu=J("undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);const fo=J("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Su={key:0,class:"input-leading-icon"},Mu=["id","type","value","placeholder","disabled","readonly","required","min","max","step","autocomplete","spellcheck","tabindex"],Tu={key:1,class:"input-trailing-icon"},Eu={key:2,class:"input-trailing-icon"},Nu={key:3,class:"input-trailing-icon"},Au=a.defineComponent({__name:"UiInput.Text",props:{type:{default:"text"},min:{},max:{},step:{},autocomplete:{},spellcheck:{type:Boolean,default:!0},hasLeadingIcon:{type:Boolean,default:!1},hasTrailingIcon:{type:Boolean,default:!1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","blur","focus","keydown"],setup(n,{emit:e}){const t=n,r=e,i=a.ref(!1),o=a.computed(()=>t.type==="password"?i.value?"text":"password":t.type),s=a.computed(()=>t.hasTrailingIcon||t.type==="password"||t.type==="search"&&t.modelValue),l=a.computed(()=>{if(t.tabindex!==void 0)return t.tabindex+1}),c=a.computed(()=>{const y=[];return t.error&&y.push("input-error"),t.disabled&&y.push("input-disabled"),t.readonly&&y.push("input-readonly"),y.push(`input-size-${t.size}`),y}),d=a.computed(()=>{const y=[];return t.hasLeadingIcon?y.push("input-padding-left-icon"):y.push("input-padding-left"),s.value?y.push("input-padding-right-icon"):y.push("input-padding-right"),y}),u=y=>{let S=y.target.value;t.type==="number"&&S!==""&&(S=parseFloat(S)||0),r("update:modelValue",S)},f=y=>{r("blur",y)},h=y=>{r("focus",y)},p=y=>{r("keydown",y)},m=()=>{i.value=!i.value},g=()=>{r("update:modelValue","")};return(y,k)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["input-field-wrapper",c.value])},[a.renderSlot(y.$slots,"leading",{},void 0,!0),t.hasLeadingIcon?(a.openBlock(),a.createElementBlock("div",Su,[a.renderSlot(y.$slots,"leading-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.createElementVNode("input",{id:n.inputId,type:o.value,value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,min:n.min,max:n.max,step:n.step,autocomplete:n.autocomplete,spellcheck:n.spellcheck,tabindex:n.tabindex,class:a.normalizeClass(["input-base",d.value]),onInput:u,onBlur:f,onFocus:h,onKeydown:p},null,42,Mu),n.type==="password"?(a.openBlock(),a.createElementBlock("div",Tu,[a.createVNode(W,{color:i.value?"primary":"secondary",variant:i.value?"primary":"ghost",size:"sm",icon:"",squircle:"",tabindex:l.value,"aria-label":i.value?"Hide password":"Show password",onClick:m},{icon:a.withCtx(()=>[i.value?(a.openBlock(),a.createBlock(a.unref(cu),{key:0})):(a.openBlock(),a.createBlock(a.unref(du),{key:1}))]),_:1},8,["color","variant","tabindex","aria-label"])])):n.type==="search"&&n.modelValue&&!n.disabled&&!n.readonly?(a.openBlock(),a.createElementBlock("div",Eu,[a.createVNode(W,{color:"danger",variant:"ghost",size:"sm",icon:"",squircle:"",tabindex:l.value,"aria-label":"Clear search",onClick:g},{icon:a.withCtx(()=>[a.createVNode(a.unref(fo))]),_:1},8,["tabindex"])])):t.hasTrailingIcon?(a.openBlock(),a.createElementBlock("div",Nu,[a.renderSlot(y.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(y.$slots,"trailing",{},void 0,!0)],2))}}),Bu=de(Au,[["__scopeId","data-v-4807b700"]]),Ou={key:0,class:"input-leading-icon"},Du=["id","value","placeholder","disabled","readonly","required","rows","cols","maxlength","autocomplete","spellcheck"],Iu={key:1,class:"input-trailing-icon"},$u=a.defineComponent({__name:"UiInput.Textarea",props:{rows:{default:3},cols:{},maxlength:{},autocomplete:{},spellcheck:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},hasLeadingIcon:{type:Boolean,default:!1},hasTrailingIcon:{type:Boolean,default:!1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","blur","focus","keydown"],setup(n,{emit:e}){const t=n,r=e,i=a.useSlots(),o=a.computed(()=>!!i.default),s=a.ref(null);a.onMounted(()=>{(t.modelValue===void 0||t.modelValue==="")&&o.value&&setTimeout(()=>{if(s.value){const p=s.value.textContent?.trim()||"";p&&r("update:modelValue",p)}},0)});const l=a.computed(()=>{const p=[];return t.error&&p.push("input-error"),t.disabled&&p.push("input-disabled"),t.readonly&&p.push("input-readonly"),p.push(`input-size-${t.size}`),p}),c=a.computed(()=>{const p=[];return t.hasLeadingIcon?p.push("input-padding-left-icon"):p.push("input-padding-left"),t.hasTrailingIcon?p.push("input-padding-right-icon"):p.push("input-padding-right"),p}),d=p=>{const m=p.target;r("update:modelValue",m.value)},u=p=>{r("blur",p)},f=p=>{r("focus",p)},h=p=>{r("keydown",p)};return(p,m)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["input-field-wrapper input-textarea",l.value])},[a.renderSlot(p.$slots,"leading",{},void 0,!0),t.hasLeadingIcon?(a.openBlock(),a.createElementBlock("div",Ou,[a.renderSlot(p.$slots,"leading-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["textarea-wrapper",{"textarea-resizable":n.resizable}])},[a.createElementVNode("textarea",{id:n.inputId,value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,rows:n.rows,cols:n.cols,maxlength:n.maxlength,autocomplete:n.autocomplete,spellcheck:n.spellcheck,class:a.normalizeClass(["input-base",[{"input-textarea-resize":n.resizable},c.value]]),onInput:d,onBlur:u,onFocus:f,onKeydown:h},null,42,Du)],2),t.hasTrailingIcon?(a.openBlock(),a.createElementBlock("div",Iu,[a.renderSlot(p.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(p.$slots,"trailing",{},void 0,!0),o.value?(a.openBlock(),a.createElementBlock("span",{key:2,ref_key:"slotContentRef",ref:s,class:"sr-only","aria-hidden":"true"},[a.renderSlot(p.$slots,"default",{},void 0,!0)],512)):a.createCommentVNode("",!0)],2))}}),Ru=de($u,[["__scopeId","data-v-5728c58e"]]);function Vr(n){const{trigger:e,floating:t,placement:r="bottom-start",offset:i=8,flip:o=!0,shift:s=!0,sameWidth:l=!1,autoUpdate:c=!1,clickOutside:d}=n,u=a.ref({position:"fixed",top:"0px",left:"0px",zIndex:"9999"}),f=async()=>{if(await a.nextTick(),!e.value||!t.value||typeof e.value.getBoundingClientRect!="function"||typeof t.value.getBoundingClientRect!="function")return;const x=e.value.getBoundingClientRect(),b=t.value.getBoundingClientRect(),[v,C="start"]=r.split("-");let w=0,M=0;switch(v){case"bottom":w=x.left,M=x.bottom+i;break;case"top":w=x.left,M=x.top-b.height-i;break;case"right":w=x.right+i,M=x.top;break;case"left":w=x.left-b.width-i,M=x.top;break}if(v==="top"||v==="bottom")switch(C){case"center":w=x.left+(x.width-b.width)/2;break;case"end":w=x.right-b.width;break}else if(v==="left"||v==="right")switch(C){case"center":M=x.top+(x.height-b.height)/2;break;case"end":M=x.bottom-b.height;break}let A=l?x.width:void 0;const $=window.innerWidth,U=window.innerHeight,j=8;let K=!1,N=!1;if(o){if(v==="bottom"&&M+b.height>U-j){const R=x.top-b.height-i;R>=j&&(M=R,K=!0)}else if(v==="top"&&M<j){const R=x.bottom+i;R+b.height<=U-j&&(M=R,K=!1)}if(v==="right"&&w+b.width>$-j){const R=x.left-b.width-i;R>=j&&(w=R,N=!0)}else if(v==="left"&&w<j){const R=x.right+i;R+b.width<=$-j&&(w=R,N=!1)}}s&&(w<j?w=j:w+b.width>$-j&&(w=$-b.width-j),M<j?M=j:M+b.height>U-j&&(M=U-b.height-j));const D={position:"fixed",zIndex:"9999",...A?{width:`${A}px`}:{}};K?D.bottom=`${U-M-b.height}px`:D.top=`${M}px`,N?D.right=`${$-w-b.width}px`:D.left=`${w}px`,u.value=D},h=()=>{f()};let p=null;const m=()=>{h()},g=()=>{if(h(),d?.enabled&&d.handler&&e.value){if(typeof e.value.getBoundingClientRect!="function")return;const x=e.value.getBoundingClientRect(),b=window.innerHeight,v=window.innerWidth;(x.bottom<0||x.top>b||x.right<0||x.left>v)&&d.handler()}},y=x=>{if(!d?.enabled||!d.handler)return;const b=x.target;if(!b||!e.value||!t.value||typeof e.value.contains!="function"||typeof t.value.contains!="function")return;const v=e.value.contains(b),C=t.value.contains(b);!v&&!C&&d.handler()},k=()=>{c&&(window.addEventListener("resize",m),window.addEventListener("scroll",g,!0),typeof ResizeObserver<"u"&&(p=new ResizeObserver(()=>{h()}),a.nextTick(()=>{e.value&&p&&typeof e.value.getBoundingClientRect=="function"&&p.observe(e.value),t.value&&p&&typeof t.value.getBoundingClientRect=="function"&&p.observe(t.value)}))),d?.enabled&&document.addEventListener("click",y,!0)},S=()=>{c&&(window.removeEventListener("resize",m),window.removeEventListener("scroll",g,!0)),d?.enabled&&document.removeEventListener("click",y,!0),p&&(p.disconnect(),p=null)};return a.onMounted(()=>{k()}),a.onUnmounted(()=>{S()}),{floatingStyle:u,updatePosition:h,cleanup:S}}const Lu={key:0,class:"input-leading-icon"},zu=["tabindex","aria-expanded","aria-controls","aria-disabled"],Pu={class:"input-select-value"},Vu={key:0,class:"input-select-text"},Fu={key:1,class:"input-select-placeholder"},Hu={key:1,class:"input-trailing-icon"},ju=["id","aria-multiselectable"],Uu={key:0,class:"input-dropdown-search"},qu={key:0,class:"input-dropdown-no-options"},Wu=["onClick","onMouseenter","aria-selected"],Ku={class:"input-dropdown-option-content"},Ju={class:"input-dropdown-option-text"},Gu={key:0,class:"input-dropdown-option-description"},Yu={key:0,class:"input-dropdown-option-check"},Qu=a.defineComponent({__name:"UiInput.Select",props:{options:{default:()=>[]},multiple:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},allowInsert:{type:Boolean,default:!1},maxDropdownHeight:{default:400},noOptionsText:{default:"No options available"},searchPlaceholder:{default:""},hasLeadingIcon:{type:Boolean,default:!1},hasTrailingIcon:{type:Boolean,default:!1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean},required:{type:Boolean},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","blur","focus"],setup(n,{emit:e}){const t=n,r=e,i=a.ref(),o=a.ref(),s=a.ref(),l=a.computed(()=>`dropdown-${t.inputId||Math.random().toString(36).substr(2,9)}`),c=a.computed(()=>{if(i.value){const N=i.value.closest('[role="dialog"][aria-modal="true"]');if(N)return N}return"body"}),d=a.ref({isOpen:!1,searchQuery:"",highlightedIndex:-1}),{floatingStyle:u,updatePosition:f,cleanup:h}=Vr({trigger:i,floating:o,placement:"bottom-start",offset:10,shift:!0,flip:!0,sameWidth:!0,autoUpdate:!0,clickOutside:{enabled:!0,handler:()=>{C()}}}),p=a.computed(()=>t.multiple?Array.isArray(t.modelValue)?t.modelValue:[]:t.modelValue!==void 0?[t.modelValue]:[]),m=a.computed(()=>{if(t.multiple){const N=t.options.filter(D=>p.value.includes(D.value));return N.length>0?`${N.length} selected`:null}else return t.options.find(D=>D.value===t.modelValue)?.label||null}),g=a.computed(()=>{let N=t.options;if(t.searchable&&d.value.searchQuery){const D=d.value.searchQuery.toLowerCase();N=t.options.filter(R=>R.label.toLowerCase().includes(D)||R.description?.toLowerCase().includes(D)),t.allowInsert&&t.multiple&&d.value.searchQuery.trim()&&(t.options.some(ke=>ke.label.toLowerCase()===d.value.searchQuery.toLowerCase())||(N=[{value:`__insert__${d.value.searchQuery}`,label:`Add "${d.value.searchQuery}"`,description:"Add as new item",disabled:!1},...N]))}return N}),y=a.computed(()=>t.searchPlaceholder&&t.searchPlaceholder.trim()!==""?t.searchPlaceholder:t.allowInsert&&t.multiple?"Search or create...":"Search..."),k=a.computed(()=>t.disabled?-1:t.tabindex??0),S=a.computed(()=>{if(t.tabindex!==void 0)return t.tabindex+1}),x=a.computed(()=>{const N=[];return t.error&&N.push("input-error"),t.disabled&&N.push("input-disabled"),N.push(`input-size-${t.size}`),N}),b=a.computed(()=>{const N=[];return t.hasLeadingIcon?N.push("input-padding-left-icon"):N.push("input-padding-left"),t.hasTrailingIcon?N.push("input-padding-right-icon"):N.push("input-padding-right"),N}),v=async()=>{if(!t.disabled){if(d.value.isOpen=!0,d.value.searchQuery="",await a.nextTick(),f(),d.value.highlightedIndex===-1){const N=g.value.findIndex(D=>!D.disabled);d.value.highlightedIndex=N>=0?N:0}if(t.searchable&&s.value){const N=s.value.$el?.querySelector("input");N&&N.focus()}document.addEventListener("keydown",j),r("focus",new FocusEvent("focus"))}},C=()=>{d.value.isOpen&&(d.value.isOpen=!1,d.value.highlightedIndex=-1,d.value.searchQuery="",document.removeEventListener("keydown",j),r("blur",new FocusEvent("blur")))},w=()=>{d.value.isOpen?C():v()},M=N=>N.value&&typeof N.value=="string"&&N.value.startsWith("__insert__")?!1:p.value.includes(N.value),A=N=>{if(!N.disabled)if(t.multiple){const D=[...p.value];if(N.value&&typeof N.value=="string"&&N.value.startsWith("__insert__")){const R=N.value.replace("__insert__","");D.includes(R)||D.push(R),d.value.searchQuery=""}else{const R=D.indexOf(N.value);R>-1?D.splice(R,1):D.push(N.value)}r("update:modelValue",D)}else r("update:modelValue",N.value),C()},$=N=>{if(["Enter"," ","ArrowDown","ArrowUp","Escape"].includes(N.key)&&(N.preventDefault(),!(d.value.isOpen&&(N.key==="ArrowDown"||N.key==="ArrowUp"))))switch(N.key){case"Enter":case" ":w();break;case"ArrowDown":case"ArrowUp":v();break;case"Escape":C();break}},U=N=>{switch(N.key){case"ArrowDown":N.preventDefault(),K(1);break;case"ArrowUp":N.preventDefault(),K(-1);break;case"Enter":if(N.preventDefault(),d.value.highlightedIndex>=0){const D=g.value[d.value.highlightedIndex];D&&!D.disabled&&A(D)}break;case"Escape":C();break}},j=N=>{if(d.value.isOpen)switch(N.key){case"Escape":C();break;case"ArrowDown":N.preventDefault(),K(1);break;case"ArrowUp":N.preventDefault(),K(-1);break;case"Enter":if(N.preventDefault(),d.value.highlightedIndex>=0){const D=g.value[d.value.highlightedIndex];D&&!D.disabled&&A(D)}break}},K=N=>{const D=g.value;if(D.length===0)return;let R=d.value.highlightedIndex+N;R<0?R=D.length-1:R>=D.length&&(R=0);let ke=0;for(;D[R]?.disabled&&ke<D.length;)R+=N,R<0&&(R=D.length-1),R>=D.length&&(R=0),ke++;d.value.highlightedIndex=R};return a.onUnmounted(()=>{d.value.isOpen&&C(),document.removeEventListener("keydown",j),h()}),(N,D)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:a.normalizeClass(["input-field-wrapper",[x.value,b.value]])},[a.renderSlot(N.$slots,"leading",{},void 0,!0),t.hasLeadingIcon?(a.openBlock(),a.createElementBlock("div",Lu,[a.renderSlot(N.$slots,"leading-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{ref_key:"selectTriggerRef",ref:i,class:a.normalizeClass(["input-select-trigger",{"input-select-open":d.value.isOpen}]),onClick:w,onKeydown:$,tabindex:k.value,role:"combobox","aria-expanded":d.value.isOpen,"aria-haspopup":!0,"aria-controls":l.value,"aria-disabled":n.disabled},[a.createElementVNode("div",Pu,[m.value?(a.openBlock(),a.createElementBlock("span",Vu,a.toDisplayString(m.value),1)):(a.openBlock(),a.createElementBlock("span",Fu,a.toDisplayString(n.placeholder||"Select an option..."),1))]),a.createElementVNode("div",{class:a.normalizeClass(["input-select-arrow",{"input-select-arrow-open":d.value.isOpen}])},[a.createVNode(a.unref(Pr))],2)],42,zu),t.hasTrailingIcon?(a.openBlock(),a.createElementBlock("div",Hu,[a.renderSlot(N.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(N.$slots,"trailing",{},void 0,!0)],2),(a.openBlock(),a.createBlock(a.Teleport,{to:c.value},[d.value.isOpen?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:o,id:l.value,class:a.normalizeClass(["input-dropdown",{"input-dropdown--multiple":n.multiple}]),style:a.normalizeStyle(a.unref(u)),role:"listbox","aria-multiselectable":n.multiple,onMousedown:D[1]||(D[1]=a.withModifiers(()=>{},["prevent"]))},[n.searchable?(a.openBlock(),a.createElementBlock("div",Uu,[a.createVNode(ni,{ref_key:"searchInputRef",ref:s,modelValue:d.value.searchQuery,"onUpdate:modelValue":D[0]||(D[0]=R=>d.value.searchQuery=R),type:"search",placeholder:y.value,size:"sm",tabindex:S.value,onKeydown:U},{"leading-icon":a.withCtx(()=>[a.createVNode(a.unref(vu))]),_:1},8,["modelValue","placeholder","tabindex"])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"input-dropdown-options",style:a.normalizeStyle({maxHeight:`${n.maxDropdownHeight}px`})},[g.value.length===0?(a.openBlock(),a.createElementBlock("div",qu,[a.renderSlot(N.$slots,"zero-state",{},()=>[a.createTextVNode(a.toDisplayString(n.noOptionsText),1)],!0)])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(R,ke)=>(a.openBlock(),a.createElementBlock("div",{key:R.value,class:a.normalizeClass(["input-dropdown-option",{"input-dropdown-option--selected":M(R),"input-dropdown-option--highlighted":ke===d.value.highlightedIndex,"input-dropdown-option--disabled":R.disabled,"input-dropdown-option--insert":R.value&&typeof R.value=="string"&&R.value.startsWith("__insert__")}]),onClick:ri=>A(R),onMouseenter:ri=>d.value.highlightedIndex=ke,role:"option","aria-selected":M(R)},[a.createElementVNode("div",Ku,[a.createElementVNode("div",Ju,a.toDisplayString(R.label),1),R.description?(a.openBlock(),a.createElementBlock("div",Gu,a.toDisplayString(R.description),1)):a.createCommentVNode("",!0)]),n.multiple&&M(R)?(a.openBlock(),a.createElementBlock("div",Yu,[a.createVNode(a.unref(iu))])):a.createCommentVNode("",!0)],42,Wu))),128))],4)],46,ju)):a.createCommentVNode("",!0)],8,["to"]))],64))}}),Xu=de(Qu,[["__scopeId","data-v-e9ac7d68"]]),Zu={class:"input-leading-icon"},_u=["src"],ef=["id","accept","multiple","disabled","required"],tf={class:"input-file-content"},nf={key:0,class:"input-file-selected"},rf={class:"input-file-list"},of={class:"input-file-item"},sf={class:"input-file-name"},lf={key:1,class:"input-file-prompt"},af={class:"input-file-prompt-text"},cf={key:0,class:"input-file-accept-text"},df={key:2,class:"input-file-selected"},uf={class:"input-file-selected-text"},ff={class:"input-file-list"},hf={class:"input-file-name"},pf={class:"input-file-size"},mf={key:0,class:"input-trailing-icon"},gf={key:1,class:"input-trailing-icon"},yf=a.defineComponent({__name:"UiInput.File",props:{accept:{},multiple:{type:Boolean,default:!1},maxFileSize:{default:10*1024*1024},dragDropText:{},selectedText:{},preview:{},hasLeadingIcon:{type:Boolean,default:!1},hasTrailingIcon:{type:Boolean,default:!1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","file-error","clear-preview","blur","focus"],setup(n,{emit:e}){const t=n,r=e,i=a.ref(),o=a.ref(!1),s=a.ref(null),l=a.ref([]),c=a.computed(()=>t.preview?t.preview:s.value);a.computed(()=>!!t.preview);const d=a.computed(()=>t.preview?t.preview:null),u=a.computed(()=>{const M=[];return t.error&&M.push("input-error"),t.disabled&&M.push("input-disabled"),M.push(`input-size-${t.size}`),M}),f=a.computed(()=>{const M=[];return M.push("input-padding-left-icon"),l.value.length>0||d.value||t.disabled?M.push("input-padding-right-icon"):M.push("input-padding-right"),M}),h=M=>{if(t.maxFileSize&&M.size>t.maxFileSize)return`File "${M.name}" is too large. Maximum size is ${y(t.maxFileSize)}.`;if(t.accept){const A=t.accept.split(",").map(K=>K.trim().toLowerCase()),$=M.type.toLowerCase(),U="."+M.name.split(".").pop()?.toLowerCase();if(!A.some(K=>{if(K.startsWith("."))return U===K;if(K.includes("*")){const N=K.split("/")[0];return $.startsWith(N)}return $===K}))return`File "${M.name}" is not an accepted file type.`}return null},p=M=>{for(const A of M){const $=h(A);if($){r("file-error",$);return}}t.multiple?l.value=[...l.value,...M]:l.value=M.slice(0,1),t.multiple?r("update:modelValue",l.value):r("update:modelValue",l.value[0]||null),!t.multiple&&l.value.length>0&&l.value[0].type.startsWith("image/")&&m(l.value[0])},m=M=>{s.value&&URL.revokeObjectURL(s.value);const A=new FileReader;A.onload=$=>{s.value=$.target?.result},A.readAsDataURL(M)},g=()=>{l.value=[],r("update:modelValue",t.multiple?[]:null),s.value&&(URL.revokeObjectURL(s.value),s.value=null),i.value&&(i.value.value=""),t.preview&&r("clear-preview")},y=M=>{if(M===0)return"0 Bytes";const A=1024,$=["Bytes","KB","MB","GB"],U=Math.floor(Math.log(M)/Math.log(A));return parseFloat((M/Math.pow(A,U)).toFixed(2))+" "+$[U]},k=()=>{!t.disabled&&i.value&&i.value.click()},S=M=>{const A=M.target,$=Array.from(A.files||[]);$.length>0&&p($)},x=M=>{t.disabled||(o.value=!0)},b=M=>{o.value=!1},v=M=>{if(t.disabled)return;o.value=!1;const A=Array.from(M.dataTransfer?.files||[]);A.length>0&&p(A)},C=M=>{r("blur",M)},w=M=>{r("focus",M)};return a.watch(()=>t.modelValue,M=>{M?Array.isArray(M)?l.value=M:(l.value=[M],M.type.startsWith("image/")&&m(M)):(l.value=[],s.value&&(URL.revokeObjectURL(s.value),s.value=null))},{immediate:!0}),a.onUnmounted(()=>{s.value&&URL.revokeObjectURL(s.value)}),(M,A)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["input-field-wrapper",[u.value,f.value]])},[a.renderSlot(M.$slots,"leading",{},void 0,!0),a.createElementVNode("div",Zu,[c.value?(a.openBlock(),a.createElementBlock("img",{key:0,src:c.value,alt:"Preview",class:"input-file-preview"},null,8,_u)):t.hasLeadingIcon?a.renderSlot(M.$slots,"leading-icon",{key:1},void 0,!0):(a.openBlock(),a.createBlock(a.unref(uu),{key:2}))]),a.createElementVNode("div",{class:a.normalizeClass(["input-file-area",{"input-file-dragover":o.value,"input-file-disabled":n.disabled}]),onClick:k,onDragover:a.withModifiers(x,["prevent"]),onDragleave:a.withModifiers(b,["prevent"]),onDrop:a.withModifiers(v,["prevent"])},[a.createElementVNode("input",{ref_key:"fileInputRef",ref:i,id:n.inputId,type:"file",accept:n.accept,multiple:n.multiple,disabled:n.disabled,required:n.required,class:"input-file-hidden",onChange:S,onBlur:C,onFocus:w},null,40,ef),a.createElementVNode("div",tf,[d.value&&l.value.length===0?(a.openBlock(),a.createElementBlock("div",nf,[A[0]||(A[0]=a.createElementVNode("div",{class:"input-file-selected-text"}," File loaded ",-1)),a.createElementVNode("div",rf,[a.createElementVNode("div",of,[a.createElementVNode("span",sf,a.toDisplayString(d.value),1)])])])):l.value.length===0?(a.openBlock(),a.createElementBlock("div",lf,[a.createElementVNode("div",af,a.toDisplayString(n.dragDropText||"Click to select or drag and drop"),1),n.accept?(a.openBlock(),a.createElementBlock("div",cf,a.toDisplayString(n.accept),1)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",df,[a.createElementVNode("div",uf,a.toDisplayString(n.selectedText||`${l.value.length} file(s) selected`),1),a.createElementVNode("div",ff,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.value,($,U)=>(a.openBlock(),a.createElementBlock("div",{key:U,class:"input-file-item"},[a.createElementVNode("span",hf,a.toDisplayString($.name),1),a.createElementVNode("span",pf,"("+a.toDisplayString(y($.size))+")",1)]))),128))])]))])],34),(l.value.length>0||d.value)&&!n.disabled?(a.openBlock(),a.createElementBlock("div",mf,[a.createElementVNode("button",{type:"button",class:"input-file-clear",onClick:a.withModifiers(g,["stop"]),"aria-label":"Clear selected files"},[a.createVNode(a.unref(fo))])])):t.hasTrailingIcon?(a.openBlock(),a.createElementBlock("div",gf,[a.renderSlot(M.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(M.$slots,"trailing",{},void 0,!0)],2))}}),kf=de(yf,[["__scopeId","data-v-3c7bee41"]]),bf={class:"tabs-wrapper"},vf={key:0,class:"tabs-before"},xf=["aria-selected","id","onClick"],wf={key:1,class:"tabs-after"},Cf=["aria-labelledby"],Sf=a.defineComponent({__name:"UiTabs",props:{modelValue:{},tabs:{},underlineWidth:{default:"5rem"},orientation:{default:"horizontal"},size:{default:"md"},variant:{default:"default"},tabWidth:{default:"fill"},sticky:{default:null}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=a.useSlots(),o=a.computed(()=>!!i.content),s=a.computed(()=>t.tabs.find(x=>x.value===t.modelValue)),l=a.ref([]),c=a.ref(!1),d=a.ref({width:"0px",height:"0px",left:"0px",top:"0px",opacity:"0"}),u=a.ref({width:"0px",height:"0px",left:"0px",top:"0px",opacity:"0"});let f=-1,h=!1;const p=(x,b)=>{const v=x.getBoundingClientRect(),C=b.getBoundingClientRect(),w=getComputedStyle(b),M=parseFloat(w.getPropertyValue("--underline-thickness")||"5");let A=5;t.size==="sm"?A=4:t.size==="lg"&&(A=6);const $=C.height;if(t.orientation==="vertical"){const U=v.top-C.top;return{height:v.height-A*4,top:U+A*2,width:M,left:A-M/2}}else{const U=v.left-C.left,j=v.width;if(t.underlineWidth==="full")return{width:j-30,left:U+15,height:M,top:$-A-M/2};let K;if(t.underlineWidth.endsWith("%")){const D=parseFloat(t.underlineWidth)/100;K=j*D}else if(t.underlineWidth.endsWith("px"))K=parseFloat(t.underlineWidth);else if(t.underlineWidth.endsWith("rem")){const D=parseFloat(t.underlineWidth),R=parseFloat(getComputedStyle(document.documentElement).fontSize);K=D*R}else K=parseFloat(t.underlineWidth)||j;const N=(j-K)/2;return{width:K,left:U+N,height:M,top:$-A-M/2}}},m=async(x,b)=>{h||(r("update:modelValue",x),await a.nextTick(),g(b))},g=async x=>{if(!l.value[x]||x===f)return;h=!0;const b=l.value[x],v=b.parentElement;if(!v)return;const C=p(b,v),w=b.getBoundingClientRect(),M=v.getBoundingClientRect();let A,$;if(t.orientation==="vertical"?(A=w.top-M.top,$=w.height):(A=w.left-M.left,$=w.width),f===-1){t.orientation==="vertical"?(d.value={height:`${C.height}px`,top:`${C.top}px`,width:`${C.width}px`,left:`${C.left}px`,opacity:"1"},u.value={height:`${$}px`,top:`${A}px`,width:`${w.width}px`,left:"0",opacity:"1"}):(d.value={width:`${C.width}px`,left:`${C.left}px`,height:`${C.height}px`,top:`${C.top}px`,opacity:"1"},u.value={width:`${$}px`,left:`${A}px`,height:"100%",top:"0",opacity:"1"}),f=x,h=!1;return}const U=l.value[f];if(p(U,v),U.getBoundingClientRect(),window.matchMedia("(prefers-reduced-motion: reduce)").matches){d.value={width:`${C.width||0}px`,left:`${C.left||0}px`,height:`${C.height||7}px`,top:`${C.top}px`,opacity:"1"},t.orientation==="vertical"?u.value={height:`${$}px`,top:`${A}px`,width:"100%",left:"0",opacity:"1"}:u.value={width:`${$}px`,left:`${A}px`,height:"100%",top:"0",opacity:"1"},f=x,h=!1;return}requestAnimationFrame(()=>{t.orientation==="vertical"?(d.value={height:`${C.height}px`,top:`${C.top}px`,width:`${C.width||7}px`,left:`${C.left}px`,opacity:"1"},u.value={height:`${$}px`,top:`${A}px`,width:"100%",left:"0",opacity:"1"}):(d.value={width:`${C.width}px`,left:`${C.left}px`,height:`${C.height||7}px`,top:`${C.top}px`,opacity:"1"},u.value={width:`${$}px`,left:`${A}px`,height:"100%",top:"0",opacity:"1"}),f=x,setTimeout(()=>{h=!1},200)})};let y=null;const k=()=>{const x=t.tabs.findIndex(b=>b.value===t.modelValue);if(x!==-1&&l.value&&l.value[x]){const b=c.value;c.value=!1;const v=l.value[x],C=v.parentElement;if(C){const w=p(v,C),M=v.getBoundingClientRect(),A=C.getBoundingClientRect();let $,U;t.orientation==="vertical"?($=M.top-A.top,U=M.height,d.value={height:`${w.height}px`,top:`${w.top}px`,width:`${w.width}px`,left:`${w.left}px`,opacity:"1"},u.value={height:`${U}px`,top:`${$}px`,width:`${M.width}px`,left:"0",opacity:"1"}):($=M.left-A.left,U=M.width,d.value={width:`${w.width}px`,left:`${w.left}px`,height:`${w.height}px`,top:`${w.top}px`,opacity:"1"},u.value={width:`${U}px`,left:`${$}px`,height:"100%",top:"0",opacity:"1"})}f=x,h=!1,setTimeout(()=>{c.value=b},10)}y&&clearTimeout(y),y=setTimeout(()=>{y=null},50)};a.onMounted(async()=>{await a.nextTick();const x=t.tabs.findIndex(b=>b.value===t.modelValue);x!==-1&&(g(x),setTimeout(()=>{c.value=!0},50)),window.addEventListener("resize",k)}),a.onUnmounted(()=>{window.removeEventListener("resize",k),y&&(clearTimeout(y),y=null)});const{modelValue:S}=a.toRefs(t);return a.watch(S,async()=>{await a.nextTick();const x=t.tabs.findIndex(b=>b.value===t.modelValue);x!==-1&&g(x)}),(x,b)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["tabs-container",[`tabs-container--${n.orientation}`,`tabs-container--${n.size}`,`tabs-container--${n.variant}`,{"tabs-container--with-content":o.value}]])},[a.createElementVNode("div",bf,[a.createElementVNode("div",{class:a.normalizeClass(["tabs-list",[`tabs-list--${n.orientation}`,`tabs-list--${n.size}`,`tabs-list--${n.variant}`]]),style:a.normalizeStyle(n.sticky?{position:"sticky",[n.sticky.side]:`${n.sticky.offset}px`,zIndex:10}:{})},[x.$slots.before?(a.openBlock(),a.createElementBlock("div",vf,[a.renderSlot(x.$slots,"before",{},void 0,!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["tabs-buttons-wrapper",`tabs-buttons-wrapper--${n.tabWidth}`]),role:"tablist"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.tabs,(v,C)=>(a.openBlock(),a.createElementBlock("button",{key:v.value,ref_for:!0,ref_key:"tabButtons",ref:l,class:a.normalizeClass(["tab-button",[`tab-button--${n.size}`,`tab-button--${n.variant}`,`tab-button--${n.tabWidth}`,{"tab-button-active":a.unref(S)===v.value}]]),"aria-selected":a.unref(S)===v.value,"aria-controls":"tabpanel",id:`tab-${v.value}`,role:"tab",onClick:w=>m(v.value,C)},a.toDisplayString(v.label),11,xf))),128)),a.createElementVNode("div",{class:a.normalizeClass(["tab-background",{"no-transition":!c.value}]),style:a.normalizeStyle(u.value)},null,6),a.createElementVNode("div",{class:a.normalizeClass(["tab-underline",{"no-transition":!c.value}]),style:a.normalizeStyle(d.value)},null,6)],2),x.$slots.after?(a.openBlock(),a.createElementBlock("div",wf,[a.renderSlot(x.$slots,"after",{},void 0,!0)])):a.createCommentVNode("",!0)],6)]),o.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["tabs-content",`tabs-content--${n.orientation}`]),role:"tabpanel","aria-labelledby":`tab-${a.unref(S)}`,id:"tabpanel"},[a.renderSlot(x.$slots,"content",{activeTab:s.value},void 0,!0)],10,Cf)):a.createCommentVNode("",!0)],2))}}),Fr=de(Sf,[["__scopeId","data-v-901716e3"]]),Mf={key:0,class:"ui-divider-text"},Tf=a.defineComponent({__name:"UiDivider",props:{orientation:{default:"horizontal"},variant:{default:"solid"},text:{},textPosition:{default:"center"},color:{default:"var(--accui-divider-color)"},thickness:{default:"1px"},margin:{default:"1rem"},spacing:{default:"auto"}},setup(n){const e=n,t=a.useSlots(),r=a.computed(()=>!!(e.text||t.default)),i=a.computed(()=>{const o={};return e.orientation==="horizontal"?(o.width=e.spacing==="auto"?"100%":typeof e.spacing=="number"?`${e.spacing}px`:e.spacing,o.marginTop=typeof e.margin=="number"?`${e.margin}px`:e.margin,o.marginBottom=typeof e.margin=="number"?`${e.margin}px`:e.margin,r.value||(o.height=typeof e.thickness=="number"?`${e.thickness}px`:e.thickness),o["--divider-color"]=e.color==="#e5e7eb"?"var(--accui-divider-color)":e.color,o["--divider-thickness"]=typeof e.thickness=="number"?`${e.thickness}px`:e.thickness):(o.height=e.spacing==="auto"?"100%":typeof e.spacing=="number"?`${e.spacing}px`:e.spacing,o.marginLeft=typeof e.margin=="number"?`${e.margin}px`:e.margin,o.marginRight=typeof e.margin=="number"?`${e.margin}px`:e.margin,r.value||(o.width=typeof e.thickness=="number"?`${e.thickness}px`:e.thickness),o["--divider-color"]=e.color==="#e5e7eb"?"var(--accui-divider-color)":e.color,o["--divider-thickness"]=typeof e.thickness=="number"?`${e.thickness}px`:e.thickness),o});return(o,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["ui-divider",`ui-divider--${n.orientation}`,`ui-divider--${n.variant}`,{"ui-divider--with-text":r.value,[`ui-divider--text-${n.textPosition}`]:r.value}]),style:a.normalizeStyle(i.value)},[r.value?(a.openBlock(),a.createElementBlock("span",Mf,[a.renderSlot(o.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(n.text),1)],!0)])):a.createCommentVNode("",!0)],6))}}),tt=de(Tf,[["__scopeId","data-v-1c798024"]]),Ef={class:"datetime-picker-wrapper"},Nf={class:"datetime-picker-leading-icon"},Af={class:"datetime-picker-display"},Bf={key:0,class:"datetime-picker-value"},Of={key:1,class:"datetime-picker-placeholder"},Df={key:1,class:"datetime-picker-trailing-icon"},If={key:1,class:"datetime-picker-panel"},$f={class:"datetime-picker-header"},Rf={class:"datetime-picker-month-year"},Lf=["value"],zf=["value"],Pf={class:"datetime-picker-weekdays"},Vf={class:"datetime-picker-grid"},Ff={key:2,class:"datetime-picker-panel datetime-picker-time-panel"},Hf={class:"time-selector"},jf={class:"time-column"},Uf={class:"time-scroll"},qf={class:"time-column"},Wf={class:"time-scroll"},Kf={key:0,class:"time-column"},Jf={class:"time-scroll"},Gf={class:"datetime-picker-footer"},Yf=a.defineComponent({__name:"UiDateTimePicker",props:{modelValue:{},type:{default:"date"},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},min:{},max:{},error:{type:Boolean,default:!1},size:{default:"md"},format:{default:"iso"},is24Hour:{type:Boolean,default:!0},minuteStep:{default:1}},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n,r=e,i=a.ref(),o=a.ref(),s=a.ref(!1),{floatingStyle:l,updatePosition:c,cleanup:d}=Vr({trigger:i,floating:o,placement:"bottom-start",offset:8,shift:!0,flip:!0,autoUpdate:!0,clickOutside:{enabled:!0,handler:()=>{f()}}}),u=async()=>{t.disabled||t.readonly||(s.value=!0,await a.nextTick(),c())},f=()=>{s.value=!1},h=()=>{s.value?f():u()},p=a.ref(t.type==="time"?"time":"date"),m=a.ref(new Date().getMonth()),g=a.ref(new Date().getFullYear()),y=a.ref(new Date().getHours()),k=a.ref(new Date().getMinutes()),S=a.ref("AM"),x=["January","February","March","April","May","June","July","August","September","October","November","December"],b=["Su","Mo","Tu","We","Th","Fr","Sa"],v=a.computed(()=>t.min?t.min instanceof Date?t.min:new Date(t.min):null),C=a.computed(()=>t.max?t.max instanceof Date?t.max:new Date(t.max):null),w=a.computed(()=>{if(!t.modelValue)return null;if(t.modelValue instanceof Date)return t.modelValue;if(t.type==="time"&&typeof t.modelValue=="string"){const L=t.modelValue.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);if(L){const I=new Date;return I.setHours(parseInt(L[1]),parseInt(L[2]),parseInt(L[3]||"0"),0),I}}return new Date(t.modelValue)}),M=a.computed(()=>{if(!w.value||isNaN(w.value.getTime()))return"";const L=w.value;if(t.type==="time"){if(t.is24Hour)return`${String(L.getHours()).padStart(2,"0")}:${String(L.getMinutes()).padStart(2,"0")}`;{const pt=L.getHours()%12||12,se=L.getHours()>=12?"PM":"AM";return`${pt}:${String(L.getMinutes()).padStart(2,"0")} ${se}`}}const I=L.getDate(),O=L.getMonth()+1,q=L.getFullYear();let we="";switch(t.format){case"us":we=`${O}/${I}/${q}`;break;case"eu":we=`${I}/${O}/${q}`;break;default:we=`${q}-${String(O).padStart(2,"0")}-${String(I).padStart(2,"0")}`;break}if(t.type==="date")return we;let $t="";if(t.is24Hour)$t=`${String(L.getHours()).padStart(2,"0")}:${String(L.getMinutes()).padStart(2,"0")}`;else{const pt=L.getHours()%12||12,se=L.getHours()>=12?"PM":"AM";$t=`${pt}:${String(L.getMinutes()).padStart(2,"0")} ${se}`}return`${we} ${$t}`}),A=a.computed(()=>{const L=[];return t.error&&L.push("datetime-picker-error"),t.disabled&&L.push("datetime-picker-disabled"),t.readonly&&L.push("datetime-picker-readonly"),L.push(`datetime-picker-size-${t.size}`),L}),$=a.computed(()=>t.type==="date"||t.type==="datetime"&&p.value==="date"),U=a.computed(()=>t.type==="time"||t.type==="datetime"&&p.value==="time"),j=a.computed(()=>[{label:"Date",value:"date"},{label:"Time",value:"time"}]),K=a.computed(()=>{const L=[],I=t.is24Hour?23:12,O=t.is24Hour?0:1;for(let q=O;q<=I;q++)L.push(q);return L}),N=a.computed(()=>{const L=[];for(let I=0;I<60;I+=t.minuteStep)L.push(I);return L}),D=a.computed(()=>{const L=new Date().getFullYear(),I=v.value?.getFullYear()||L-100,O=C.value?.getFullYear()||L+100,q=[];for(let we=I;we<=O;we++)q.push(we);return q}),R=a.computed(()=>v.value?new Date(g.value,m.value,1)<=v.value:!1),ke=a.computed(()=>C.value?new Date(g.value,m.value+1,0)>=C.value:!1),ri=a.computed(()=>{const L=[],I=g.value,O=m.value,q=new Date(I,O,1),we=new Date(q);we.setDate(we.getDate()-q.getDay());const $t=new Date;$t.setHours(0,0,0,0);for(let pt=0;pt<42;pt++){const se=new Date(we);se.setDate(we.getDate()+pt);const ad=se.getMonth()!==O,cd=se.getTime()===$t.getTime(),dd=w.value&&se.getFullYear()===w.value.getFullYear()&&se.getMonth()===w.value.getMonth()&&se.getDate()===w.value.getDate(),ud=!!(v.value&&se<v.value||C.value&&se>C.value);L.push({key:`${se.getFullYear()}-${se.getMonth()}-${se.getDate()}`,date:se.getDate(),month:se.getMonth(),year:se.getFullYear(),otherMonth:ad,isToday:cd,isSelected:dd||!1,isDisabled:ud})}return L}),rd=()=>{switch(t.type){case"time":return"Select time";case"datetime":return"Select date and time";default:return"Select date"}},id=()=>{m.value===0?(m.value=11,g.value--):m.value--},od=()=>{m.value===11?(m.value=0,g.value++):m.value++},sd=L=>{if(L.isDisabled||L.otherMonth)return;const I=w.value||new Date,O=new Date(L.year,L.month,L.date,I.getHours(),I.getMinutes());r("update:modelValue",O),r("change",O),t.type==="datetime"?p.value="time":t.type==="date"&&f()},Dn=(L,I)=>{let O=w.value?new Date(w.value):new Date;if(!w.value){const q=new Date;O.setFullYear(q.getFullYear(),q.getMonth(),q.getDate())}if(L==="hour"){let q=I;t.is24Hour||(S.value==="PM"&&q!==12&&(q+=12),S.value==="AM"&&q===12&&(q=0)),y.value=I,O.setHours(q)}else if(L==="minute")k.value=I,O.setMinutes(I);else if(L==="period"){S.value=I;let q=y.value;I==="PM"&&q!==12&&(q+=12),I==="AM"&&q===12&&(q=0),O.setHours(q)}r("update:modelValue",O),r("change",O)},ld=()=>{const L=new Date;v.value&&L<v.value||C.value&&L>C.value||(r("update:modelValue",L),r("change",L),f())},_o=()=>{r("update:modelValue",null),r("change",null)};return a.watch(()=>t.modelValue,L=>{if(L){const I=L instanceof Date?L:new Date(L);if(!isNaN(I.getTime())){if(m.value=I.getMonth(),g.value=I.getFullYear(),t.is24Hour)y.value=I.getHours();else{const O=I.getHours();y.value=O%12||12,S.value=O>=12?"PM":"AM"}k.value=I.getMinutes()}}},{immediate:!0}),a.onUnmounted(()=>{d()}),(L,I)=>(a.openBlock(),a.createElementBlock("div",Ef,[a.createElementVNode("div",{ref_key:"triggerElement",ref:i,class:a.normalizeClass(["datetime-picker-trigger",[A.value,{"datetime-picker-open":s.value}]]),onClick:h},[a.createElementVNode("div",Nf,[n.type==="date"?(a.openBlock(),a.createBlock(a.unref(ru),{key:0})):n.type==="time"?(a.openBlock(),a.createBlock(a.unref(lu),{key:1})):(a.openBlock(),a.createBlock(a.unref(nu),{key:2}))]),a.createElementVNode("div",Af,[M.value?(a.openBlock(),a.createElementBlock("span",Bf,a.toDisplayString(M.value),1)):(a.openBlock(),a.createElementBlock("span",Of,a.toDisplayString(n.placeholder||rd()),1))]),n.modelValue&&!n.disabled&&!n.readonly?(a.openBlock(),a.createElementBlock("div",{key:0,class:"datetime-picker-trailing-icon",onClick:a.withModifiers(_o,["stop"])},[a.createVNode(a.unref(fo))])):(a.openBlock(),a.createElementBlock("div",Df,[a.createVNode(a.unref(Pr))]))],2),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[s.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"floatingElement",ref:o,class:"datetime-picker-dropdown",style:a.normalizeStyle(a.unref(l))},[n.type==="datetime"?(a.openBlock(),a.createBlock(Fr,{key:0,modelValue:p.value,"onUpdate:modelValue":I[0]||(I[0]=O=>p.value=O),tabs:j.value,variant:"default",size:"sm",style:{"margin-bottom":"1rem"}},null,8,["modelValue","tabs"])):a.createCommentVNode("",!0),$.value?(a.openBlock(),a.createElementBlock("div",If,[a.createElementVNode("div",$f,[a.createVNode(W,{onClick:id,disabled:R.value,color:"secondary",variant:"primary",icon:"",squircle:""},{icon:a.withCtx(()=>[a.createVNode(a.unref(ou))]),_:1},8,["disabled"]),a.createElementVNode("div",Rf,[a.withDirectives(a.createElementVNode("select",{"onUpdate:modelValue":I[1]||(I[1]=O=>m.value=O),class:"datetime-picker-select"},[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(x,(O,q)=>a.createElementVNode("option",{key:q,value:q},a.toDisplayString(O),9,Lf)),64))],512),[[a.vModelSelect,m.value]]),a.withDirectives(a.createElementVNode("select",{"onUpdate:modelValue":I[2]||(I[2]=O=>g.value=O),class:"datetime-picker-select"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D.value,O=>(a.openBlock(),a.createElementBlock("option",{key:O,value:O},a.toDisplayString(O),9,zf))),128))],512),[[a.vModelSelect,g.value]])]),a.createVNode(W,{onClick:od,disabled:ke.value,color:"secondary",variant:"primary",icon:"",squircle:""},{icon:a.withCtx(()=>[a.createVNode(a.unref(su))]),_:1},8,["disabled"])]),a.createElementVNode("div",Pf,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(b,O=>a.createElementVNode("div",{key:O,class:"datetime-picker-weekday"},a.toDisplayString(O),1)),64))]),a.createElementVNode("div",Vf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ri.value,O=>(a.openBlock(),a.createBlock(W,{key:O.key,color:O.isSelected||O.isToday?"primary":"secondary",variant:O.isSelected?"primary":O.isToday?"outline":"primary",disabled:O.isDisabled||O.otherMonth,class:a.normalizeClass(["datetime-picker-day",{"datetime-picker-day-other":O.otherMonth,"datetime-picker-day-disabled":O.isDisabled}]),icon:"",squircle:"",onClick:q=>sd(O)},{icon:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(O.date),1)]),_:2},1032,["color","variant","disabled","class","onClick"]))),128))])])):a.createCommentVNode("",!0),U.value?(a.openBlock(),a.createElementBlock("div",Ff,[a.createElementVNode("div",Hf,[a.createElementVNode("div",jf,[I[6]||(I[6]=a.createElementVNode("label",{class:"time-label"},"Hour",-1)),a.createElementVNode("div",Uf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(K.value,O=>(a.openBlock(),a.createBlock(W,{key:O,color:y.value===O?"primary":"secondary",variant:y.value===O?"primary":"ghost",size:"sm",squircle:"",onClick:q=>Dn("hour",O)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(String(O).padStart(2,"0")),1)]),_:2},1032,["color","variant","onClick"]))),128))])]),a.createElementVNode("div",qf,[I[7]||(I[7]=a.createElementVNode("label",{class:"time-label"},"Minute",-1)),a.createElementVNode("div",Wf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(N.value,O=>(a.openBlock(),a.createBlock(W,{key:O,color:k.value===O?"primary":"secondary",variant:k.value===O?"primary":"ghost",size:"sm",squircle:"",onClick:q=>Dn("minute",O)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(String(O).padStart(2,"0")),1)]),_:2},1032,["color","variant","onClick"]))),128))])]),n.is24Hour?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Kf,[I[10]||(I[10]=a.createElementVNode("label",{class:"time-label"},"Period",-1)),a.createElementVNode("div",Jf,[a.createVNode(W,{color:S.value==="AM"?"primary":"secondary",variant:S.value==="AM"?"primary":"ghost",size:"sm",squircle:"",class:"time-option",onClick:I[3]||(I[3]=O=>Dn("period","AM"))},{default:a.withCtx(()=>[...I[8]||(I[8]=[a.createTextVNode(" AM ",-1)])]),_:1},8,["color","variant"]),a.createVNode(W,{color:S.value==="PM"?"primary":"secondary",variant:S.value==="PM"?"primary":"ghost",size:"sm",squircle:"",class:"time-option",onClick:I[4]||(I[4]=O=>Dn("period","PM"))},{default:a.withCtx(()=>[...I[9]||(I[9]=[a.createTextVNode(" PM ",-1)])]),_:1},8,["color","variant"])])]))])])):a.createCommentVNode("",!0),a.createVNode(tt),a.createElementVNode("div",Gf,[a.createVNode(W,{onClick:ld,color:"primary",variant:"primary",squircle:"",style:{flex:"1"}},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.type==="time"?"Now":"Today"),1)]),_:1}),a.createVNode(W,{onClick:I[5]||(I[5]=O=>{_o(),f()}),color:"danger",variant:"primary",squircle:"",style:{flex:"1"}},{default:a.withCtx(()=>[...I[11]||(I[11]=[a.createTextVNode(" Clear ",-1)])]),_:1}),a.createVNode(W,{onClick:f,color:"secondary",variant:"primary",squircle:"",style:{flex:"1"}},{default:a.withCtx(()=>[...I[12]||(I[12]=[a.createTextVNode(" Close ",-1)])]),_:1})])],4)):a.createCommentVNode("",!0)]))]))}}),ho=de(Yf,[["__scopeId","data-v-f688c330"]]),Qf=a.defineComponent({__name:"UiInput.Date",props:{min:{},max:{},format:{default:"iso"},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","change","blur","focus","keydown"],setup(n,{emit:e}){const t=e,r=o=>{t("update:modelValue",o)},i=o=>{t("change",o)};return(o,s)=>(a.openBlock(),a.createBlock(ho,{"model-value":n.modelValue,type:"date",placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,min:n.min,max:n.max,error:!!n.error,size:n.size,format:n.format,"onUpdate:modelValue":r,onChange:i},null,8,["model-value","placeholder","disabled","readonly","required","min","max","error","size","format"]))}}),Xf=a.defineComponent({__name:"UiInput.Time",props:{is24Hour:{type:Boolean,default:!0},minuteStep:{default:1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","change","blur","focus","keydown"],setup(n,{emit:e}){const t=e,r=o=>{t("update:modelValue",o)},i=o=>{t("change",o)};return(o,s)=>(a.openBlock(),a.createBlock(ho,{"model-value":n.modelValue,type:"time",placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,error:!!n.error,size:n.size,is24Hour:n.is24Hour,minuteStep:n.minuteStep,"onUpdate:modelValue":r,onChange:i},null,8,["model-value","placeholder","disabled","readonly","required","error","size","is24Hour","minuteStep"]))}}),Zf=a.defineComponent({__name:"UiInput.DateTime",props:{min:{},max:{},format:{default:"iso"},is24Hour:{type:Boolean,default:!0},minuteStep:{default:1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","change","blur","focus","keydown"],setup(n,{emit:e}){const t=e,r=o=>{t("update:modelValue",o)},i=o=>{t("change",o)};return(o,s)=>(a.openBlock(),a.createBlock(ho,{"model-value":n.modelValue,type:"datetime",placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,min:n.min,max:n.max,error:!!n.error,size:n.size,format:n.format,is24Hour:n.is24Hour,minuteStep:n.minuteStep,"onUpdate:modelValue":r,onChange:i},null,8,["model-value","placeholder","disabled","readonly","required","min","max","error","size","format","is24Hour","minuteStep"]))}});function ue(n){this.content=n}ue.prototype={constructor:ue,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new ue(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ue(t)},addToStart:function(n,e){return new ue([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ue(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new ue(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ue.from(n),n.size?new ue(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ue.from(n),n.size?new ue(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ue.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ue.from=function(n){if(n instanceof ue)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ue(e)};function Nl(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),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=Nl(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function Al(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),l=e.child(--o),c=s.nodeSize;if(s==l){t-=c,r-=c;continue}if(!s.sameMarkup(l))return{a:t,b:r};if(s.isText&&s.text!=l.text){let d=0,u=Math.min(s.text.length,l.text.length);for(;d<u&&s.text[s.text.length-d-1]==l.text[l.text.length-d-1];)d++,t--,r--;return{a:t,b:r}}if(s.content.size||l.content.size){let d=Al(s.content,l.content,t-1,r-1);if(d)return d}t-=c,r-=c}}class T{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,l=0;l<t;s++){let c=this.content[s],d=l+c.nodeSize;if(d>e&&r(c,i+l,o||null,s)!==!1&&c.content.size){let u=l+1;c.nodesBetween(Math.max(0,e-u),Math.min(c.content.size,t-u),r,i+u)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(l,c)=>{let d=l.isText?l.text.slice(Math.max(e,c)-c,t-c):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=d},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new T(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let l=this.content[o],c=s+l.nodeSize;c>e&&((s<e||c>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),r.push(l),i+=l.nodeSize),s=c}return new T(r,i)}cutByIndex(e,t){return e==t?T.empty:e==0&&t==this.content.length?this:new T(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new T(i,o)}addToStart(e){return new T([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new T(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return Nl(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Al(this,e,t,r)}findIndex(e){if(e==0)return In(0,e);if(e==this.size)return In(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?In(t+1,o):In(t,r);r=o}}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 T.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new T(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return T.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new T(t||e,r)}static from(e){if(!e)return T.empty;if(e instanceof T)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new T([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}T.empty=new T([],0);const ii={index:0,offset:0};function In(n,e){return ii.index=n,ii.offset=e,ii}function Yn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Yn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Yn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Y=class $i{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Yn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return $i.none;if(e instanceof $i)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};Y.none=[];class Qn extends Error{}class B{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=Ol(this.content,e+this.openStart,t);return r&&new B(r,this.openStart,this.openEnd)}removeBetween(e,t){return new B(Bl(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 B.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 B(T.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new B(e,r,i)}}B.empty=new B(T.empty,0,0);function Bl(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(i==e||o.isText){if(l!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(Bl(o.content,e-i-1,t-i-1)))}function Ol(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Ol(s.content,e-o-1,t,s);return l&&n.replaceChild(i,s.copy(l))}function _f(n,e,t){if(t.openStart>n.depth)throw new Qn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Qn("Inconsistent open depths");return Dl(n,e,t,0)}function Dl(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=Dl(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,l=s.content;return wt(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=eh(t,n);return wt(o,$l(n,s,l,e,r))}else return wt(o,Xn(n,e,r))}function Il(n,e){if(!e.type.compatibleContent(n.type))throw new Qn("Cannot join "+e.type.name+" onto "+n.type.name)}function Ri(n,e,t){let r=n.node(t);return Il(r,e.node(t)),r}function xt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function an(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(xt(n.nodeAfter,r),o++));for(let l=o;l<s;l++)xt(i.child(l),r);e&&e.depth==t&&e.textOffset&&xt(e.nodeBefore,r)}function wt(n,e){return n.type.checkContent(e),n.copy(e)}function $l(n,e,t,r,i){let o=n.depth>i&&Ri(n,e,i+1),s=r.depth>i&&Ri(t,r,i+1),l=[];return an(null,n,i,l),o&&s&&e.index(i)==t.index(i)?(Il(o,s),xt(wt(o,$l(n,e,t,r,i+1)),l)):(o&&xt(wt(o,Xn(n,e,i+1)),l),an(e,t,i,l),s&&xt(wt(s,Xn(t,r,i+1)),l)),an(r,null,i,l),new T(l)}function Xn(n,e,t){let r=[];if(an(null,n,t,r),n.depth>t){let i=Ri(n,e,t+1);xt(wt(i,Xn(n,e,t+1)),r)}return an(e,null,t,r),new T(r)}function eh(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(T.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class kn{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 o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Y.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Zn(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<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:l,offset:c}=s.content.findIndex(o),d=o-c;if(r.push(s,l,i+c),!d||(s=s.child(l),s.isText))break;o=d-1,i+=c+1}return new kn(t,r,o)}static resolveCached(e,t){let r=ns.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else ns.set(e,r=new th);let i=r.elts[r.i]=kn.resolve(e,t);return r.i=(r.i+1)%nh,i}}class th{constructor(){this.elts=[],this.i=0}}const nh=12,ns=new WeakMap;class Zn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const rh=Object.create(null);class Re{constructor(e,t,r,i=Y.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||T.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Yn(this.attrs,t||e.defaultAttrs||rh)&&Y.sameSet(this.marks,r||Y.none)}copy(e=null){return e==this.content?this:new Re(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Re(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return B.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),l=i.start(s),d=i.node(s).content.cut(i.pos-l,o.pos-l);return new B(d,i.depth-s,o.depth-s)}replace(e,t,r){return _f(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return kn.resolveCached(this,e)}resolveNoCache(e){return kn.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.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()+")"),Rl(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=T.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let c=i;c<o;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Y.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Y.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.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=T.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}Re.prototype.text=void 0;class _n extends Re{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):Rl(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 _n(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new _n(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 Rl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Tt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new ih(e,t);if(r.next==null)return Tt.empty;let i=Ll(r);r.next&&r.err("Unexpected trailing text");let o=uh(dh(i));return fh(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,l){let c=s.matchFragment(e,r);if(c&&(!t||c.validEnd))return T.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:u,next:f}=s.next[d];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,l.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!i.type||c.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=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<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
4
+ `,xd={key:0,class:"loader-icon"},wd=["width","height"],Cd=["d"],Sd=["stroke-width"],Md=["stroke-width"],Td=["width","height"],Ed={key:3,class:"loader-text"},Nd=a.defineComponent({__name:"UiLoader",props:{size:{default:"md"},color:{default:"primary"},variant:{default:"circle"},text:{},centered:{type:Boolean,default:!0},weight:{default:30},fullWidth:{type:Boolean,default:!1}},setup(n){const t=vd.replace(/<svg[^>]*>/,"").replace(/<\/svg>/,"").trim().match(/d="([^"]*)"/)?.[1]||"",r=n,i={sm:32,md:48,lg:64,xl:80},o=a.computed(()=>typeof r.size=="number"?r.size:i[r.size]||i.md);return(s,l)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["loader-container",[{"loader-centered":n.centered},`loader-color-${n.color}`]])},[n.variant==="spinner"?(a.openBlock(),a.createElementBlock("div",xd,[(a.openBlock(),a.createElementBlock("svg",{width:o.value,height:o.value,viewBox:"0 0 500 500"},[a.createElementVNode("defs",null,[a.createElementVNode("path",{id:"logo-path",d:a.unref(t),transform:"translate(81, 13) scale(1.0)"},null,8,Cd)]),a.createElementVNode("use",{href:"#logo-path",fill:"none",stroke:"var(--loader-semi-color)","stroke-width":n.weight,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Sd),a.createElementVNode("use",{href:"#logo-path",fill:"none",stroke:"var(--loader-solid-color)","stroke-width":n.weight,"stroke-linecap":"round","stroke-linejoin":"round",class:"loader-animated-path"},null,8,Md)],8,wd))])):n.variant==="circle"?(a.openBlock(),a.createElementBlock("div",{key:1,class:"loader-circle",style:a.normalizeStyle({width:`${o.value}px`,height:`${o.value}px`})},[(a.openBlock(),a.createElementBlock("svg",{width:o.value,height:o.value,viewBox:"0 0 50 50"},[...l[0]||(l[0]=[a.createElementVNode("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:"var(--loader-solid-color)","stroke-width":"4","stroke-linecap":"round",class:"loader-circle-path"},null,-1)])],8,Td))],4)):n.variant==="bar"?(a.openBlock(),a.createElementBlock("div",{key:2,class:"loader-bar",style:a.normalizeStyle({width:n.fullWidth?"100%":`${o.value*1.5}px`,height:`${Math.max(o.value*.1,4)}px`})},[...l[1]||(l[1]=[a.createElementVNode("div",{class:"loader-bar-track"},[a.createElementVNode("div",{class:"loader-bar-fill"})],-1)])],4)):a.createCommentVNode("",!0),n.text?(a.openBlock(),a.createElementBlock("p",Ed,a.toDisplayString(n.text),1)):a.createCommentVNode("",!0)],2))}}),zr=de(Nd,[["__scopeId","data-v-4b565c5d"]]),Ad={key:0,class:"button-loading-content"},Bd={key:0},Od={key:0,class:"leading-icon"},Dd={class:"button-text-content"},Id={key:1,class:"trailing-icon"},$d=a.defineComponent({__name:"UiButton.Content",props:{loading:{type:Boolean,default:!1},loadingText:{},icon:{type:Boolean,default:!1},size:{},textAlign:{default:"center"}},setup(n){const e=a.useSlots(),t=a.computed(()=>!!e["leading-icon"]),r=a.computed(()=>!!e["trailing-icon"]),i=n,o=a.computed(()=>{switch(i.size){case"xs":return 16;case"sm":return 18;case"md":return 20;case"lg":return 24;case"xl":return 28;default:return 20}}),s=a.computed(()=>i.size?`button-content-${i.size}`:"button-content-md");return(l,c)=>n.loading?(a.openBlock(),a.createElementBlock("span",Ad,[a.createVNode(zr,{variant:"circle",size:o.value,centered:!1,color:"white"},null,8,["size"]),n.icon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",Bd,a.toDisplayString(n.loadingText||"Loading..."),1))])):(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["button-content",s.value,`button-content-align-${n.textAlign}`])},[n.icon?a.renderSlot(l.$slots,"icon",{key:0},void 0,!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[t.value?(a.openBlock(),a.createElementBlock("span",Od,[a.renderSlot(l.$slots,"leading-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(l.$slots,"icon",{},void 0,!0),a.createElementVNode("span",Dd,[a.renderSlot(l.$slots,"default",{},void 0,!0)]),r.value?(a.openBlock(),a.createElementBlock("span",Id,[a.renderSlot(l.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0)],64))],2))}}),Wt=de($d,[["__scopeId","data-v-12d1d1fc"]]),Rd=["href","target","rel"],Oi=a.defineComponent({__name:"UiButton.Anchor",props:{to:{},href:{},external:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},icon:{type:Boolean,default:!1},buttonClasses:{},buttonStyles:{},textAlign:{default:"center"}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=a.computed(()=>{if(t.href)return t.href;if(t.to){if(typeof t.to=="string")return t.to;if(typeof t.to=="object"&&t.to)return"#route-object-not-supported"}return"#"}),o=s=>{if(t.disabled||t.loading){s.preventDefault();return}r("click",s)};return(s,l)=>(a.openBlock(),a.createElementBlock("a",{href:i.value,target:n.external?"_blank":void 0,rel:n.external?"noopener noreferrer":void 0,class:a.normalizeClass(n.buttonClasses),style:a.normalizeStyle(n.buttonStyles),onClick:o},[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"text-align":n.textAlign},{"leading-icon":a.withCtx(()=>[a.renderSlot(s.$slots,"leading-icon")]),icon:a.withCtx(()=>[a.renderSlot(s.$slots,"icon")]),default:a.withCtx(()=>[a.renderSlot(s.$slots,"default")]),"trailing-icon":a.withCtx(()=>[a.renderSlot(s.$slots,"trailing-icon")]),_:3},8,["loading","loading-text","icon","text-align"])],14,Rd))}}),Di=a.defineComponent({__name:"UiButton.Nuxt",props:{to:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},icon:{type:Boolean,default:!1},buttonClasses:{},buttonStyles:{},textAlign:{default:"center"}},emits:["click"],setup(n,{emit:e}){const t=a.getCurrentInstance(),r=a.computed(()=>t?.appContext.app.component("NuxtLink")?"NuxtLink":t?.appContext.app.component("RouterLink")?"RouterLink":"a"),i=n,o=e,s=l=>{if(i.disabled||i.loading){l.preventDefault();return}o("click",l)};return(l,c)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.value),{to:r.value!=="a"?n.to:void 0,href:r.value==="a"?typeof n.to=="string"?n.to:"/":void 0,class:a.normalizeClass(n.buttonClasses),style:a.normalizeStyle(n.buttonStyles),onClick:s},{default:a.withCtx(()=>[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"text-align":n.textAlign},{"leading-icon":a.withCtx(()=>[a.renderSlot(l.$slots,"leading-icon")]),icon:a.withCtx(()=>[a.renderSlot(l.$slots,"icon")]),default:a.withCtx(()=>[a.renderSlot(l.$slots,"default")]),"trailing-icon":a.withCtx(()=>[a.renderSlot(l.$slots,"trailing-icon")]),_:3},8,["loading","loading-text","icon","text-align"])]),_:3},8,["to","href","class","style"]))}}),Ii=a.defineComponent({__name:"UiButton.Vue",props:{to:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},icon:{type:Boolean,default:!1},buttonClasses:{},buttonStyles:{},textAlign:{default:"center"}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=o=>{if(t.disabled||t.loading){o.preventDefault();return}r("click",o)};return(o,s)=>{const l=a.resolveComponent("router-link");return a.openBlock(),a.createBlock(l,{to:n.to,class:a.normalizeClass(n.buttonClasses),style:a.normalizeStyle(n.buttonStyles),onClick:i},{default:a.withCtx(()=>[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"text-align":n.textAlign},{"leading-icon":a.withCtx(()=>[a.renderSlot(o.$slots,"leading-icon")]),icon:a.withCtx(()=>[a.renderSlot(o.$slots,"icon")]),default:a.withCtx(()=>[a.renderSlot(o.$slots,"default")]),"trailing-icon":a.withCtx(()=>[a.renderSlot(o.$slots,"trailing-icon")]),_:3},8,["loading","loading-text","icon","text-align"])]),_:3},8,["to","class","style"])}}}),Ld={class:"ui-tooltip-content"},zd=a.defineComponent({inheritAttrs:!1,__name:"UiTooltip",props:{content:{default:""},position:{default:"top"},delay:{default:500},disabled:{type:Boolean,default:!1},offset:{default:8},maxWidth:{default:250}},setup(n){const e=n,t=a.ref(),r=a.ref(),i=a.ref(!1),o=a.ref(!1);let s=null,l=null;const c=a.ref({}),d=async()=>{if(!t.value||!r.value||!o.value)return;await a.nextTick();const h=t.value.getBoundingClientRect();r.value.style.visibility="hidden",r.value.style.opacity="1";const p=r.value.getBoundingClientRect(),m=p.width,g=p.height;r.value.style.visibility="",r.value.style.opacity="";const y=window.innerWidth,k=window.innerHeight;let S=0,x=0;switch(e.position){case"top":S=h.top-g-e.offset,x=h.left+h.width/2-m/2;break;case"bottom":S=h.bottom+e.offset,x=h.left+h.width/2-m/2;break;case"left":S=h.top+h.height/2-g/2,x=h.left-m-e.offset;break;case"right":S=h.top+h.height/2-g/2,x=h.right+e.offset;break}const b=8;x<b?x=b:x+m>y-b&&(x=y-m-b),S<b?S=b:S+g>k-b&&(S=k-g-b),c.value={position:"fixed",top:`${S}px`,left:`${x}px`,zIndex:"9999"}},u=()=>{e.disabled||(l&&(clearTimeout(l),l=null),o.value=!0,a.nextTick(()=>{d()}),s=setTimeout(()=>{i.value=!0},e.delay))},f=()=>{s&&(clearTimeout(s),s=null),l=setTimeout(()=>{i.value=!1,setTimeout(()=>{o.value=!1},200)},100)};return a.onUnmounted(()=>{s&&clearTimeout(s),l&&clearTimeout(l)}),(h,p)=>(a.openBlock(),a.createElementBlock("div",a.mergeProps({ref_key:"tooltipContainer",ref:t,class:"ui-tooltip-container"},h.$attrs,{onMouseenter:u,onMouseleave:f}),[a.renderSlot(h.$slots,"default",{},void 0,!0),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[o.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:r,class:a.normalizeClass(["ui-tooltip",[`ui-tooltip--${n.position}`,{"ui-tooltip--visible":i.value}]]),style:a.normalizeStyle(c.value),role:"tooltip"},[a.createElementVNode("div",Ld,[a.renderSlot(h.$slots,"tooltip",{},()=>[a.createTextVNode(a.toDisplayString(n.content),1)],!0)]),a.createElementVNode("div",{class:a.normalizeClass(["ui-tooltip-arrow",`ui-tooltip-arrow--${n.position}`])},null,2)],6)):a.createCommentVNode("",!0)]))],16))}}),Tl=de(zd,[["__scopeId","data-v-ba66edda"]]),Pd=["type","disabled","tabindex"],Vd=["type","disabled","tabindex"],Fd=a.defineComponent({inheritAttrs:!1,__name:"UiButton",props:{variant:{default:"primary"},size:{default:"md"},type:{default:"button"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},fullWidth:{type:Boolean,default:!1},color:{default:"primary"},fontWeight:{default:600},icon:{type:Boolean,default:!1},squircle:{type:Boolean,default:!1},to:{},href:{},external:{type:Boolean,default:!1},tabindex:{},title:{},textAlign:{default:"center"}},emits:["click"],setup(n,{emit:e}){const t=n,r=a.computed(()=>t.title?typeof t.title=="string"?{content:t.title,position:"top",disabled:t.disabled||t.loading}:{...t.title,disabled:t.title.disabled??(t.disabled||t.loading)}:null),i=a.computed(()=>!!(typeof process<"u"&&process.client!==void 0||typeof window<"u"&&(window.__NUXT__||window.$nuxt))),o=a.computed(()=>{try{if(typeof window<"u"&&window.Vue?.Router)return!0}catch{}return!1}),s=a.computed(()=>["ui-button",`ui-button-${t.variant}`,`ui-button-${t.size}`,`ui-button-color-${t.color}`,t.loading?"ui-button-loading":"",t.disabled?"ui-button-disabled":"",t.fullWidth?"ui-button-full-width":"",t.icon?"ui-button-icon":"",t.squircle?"ui-button-squircle":""].filter(Boolean)),l=a.computed(()=>s.value.join(" ")),c=a.computed(()=>({fontWeight:t.fontWeight})),d=a.computed(()=>t.disabled||t.loading?-1:t.tabindex??void 0);return(u,f)=>n.title?(a.openBlock(),a.createBlock(Tl,a.normalizeProps(a.mergeProps({key:0},r.value)),{default:a.withCtx(()=>[n.to?i.value&&n.to?(a.openBlock(),a.createBlock(Di,{key:1,to:n.to,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[1]||(f[1]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):o.value&&n.to?(a.openBlock(),a.createBlock(Ii,{key:2,to:n.to,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[2]||(f[2]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):(a.openBlock(),a.createBlock(Oi,{key:3,to:n.to,href:n.href,external:n.external,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[3]||(f[3]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","href","external","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):(a.openBlock(),a.createElementBlock("button",a.mergeProps({key:0},u.$attrs,{type:n.type,disabled:n.disabled||n.loading,class:l.value,style:c.value,tabindex:d.value,onClick:f[0]||(f[0]=h=>u.$emit("click",h))}),[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,size:n.size,"text-align":n.textAlign},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["loading","loading-text","icon","size","text-align"])],16,Pd))]),_:3},16)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[n.to?i.value&&n.to?(a.openBlock(),a.createBlock(Di,{key:1,to:n.to,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[5]||(f[5]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):o.value&&n.to?(a.openBlock(),a.createBlock(Ii,{key:2,to:n.to,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[6]||(f[6]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):(a.openBlock(),a.createBlock(Oi,{key:3,to:n.to,href:n.href,external:n.external,disabled:n.disabled,loading:n.loading,"loading-text":n.loadingText,icon:n.icon,"button-classes":s.value,"button-styles":c.value,tabindex:d.value,"text-align":n.textAlign,onClick:f[7]||(f[7]=h=>u.$emit("click",h))},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["to","href","external","disabled","loading","loading-text","icon","button-classes","button-styles","tabindex","text-align"])):(a.openBlock(),a.createElementBlock("button",a.mergeProps({key:0},u.$attrs,{type:n.type,disabled:n.disabled||n.loading,class:l.value,style:c.value,tabindex:d.value,onClick:f[4]||(f[4]=h=>u.$emit("click",h))}),[a.createVNode(Wt,{loading:n.loading,"loading-text":n.loadingText,icon:n.icon,size:n.size,"text-align":n.textAlign},a.createSlots({icon:a.withCtx(()=>[a.renderSlot(u.$slots,"icon",{},void 0,!0)]),default:a.withCtx(()=>[a.renderSlot(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots["leading-icon"]?{name:"leading-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0)]),key:"0"}:void 0,u.$slots["trailing-icon"]?{name:"trailing-icon",fn:a.withCtx(()=>[a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0)]),key:"1"}:void 0]),1032,["loading","loading-text","icon","size","text-align"])],16,Vd))],64))}}),W=de(Fd,[["__scopeId","data-v-0e5b129a"]]),Hd={key:0,class:"ui-card-header"},jd={key:0,class:"ui-card-title-wrapper"},Ud={key:0,class:"ui-card-title"},qd={key:0,class:"ui-card-subtitle"},Wd={key:1,class:"ui-card-content"},Kd={key:2,class:"ui-card-footer"},Jd=a.defineComponent({inheritAttrs:!1,__name:"UiCard",props:{variant:{default:"default"},padding:{default:"md"},shadow:{default:"sm"},color:{default:"default"},title:{},subtitle:{},to:{}},setup(n){const e=n,t=a.useAttrs(),r=a.getCurrentInstance(),i=a.computed(()=>e.to?r?.appContext.app.component("NuxtLink")?"NuxtLink":r?.appContext.app.component("RouterLink")?"RouterLink":"a":null),o=a.computed(()=>!e.to||typeof e.to!="string"?!1:/^(https?:\/\/|mailto:|tel:)/.test(e.to)),s=a.computed(()=>e.to?o.value?"a":i.value||"a":"div"),l=a.computed(()=>{const u=s.value;return u==="NuxtLink"||u==="RouterLink"}),c=a.computed(()=>s.value==="a"&&!!e.to),d=a.computed(()=>[`ui-card-${e.variant}`,`ui-card-padding-${e.padding}`,`ui-card-shadow-${e.shadow}`,`ui-card-color-${e.color}`,t.class]);return(u,f)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s.value),{to:l.value?n.to:void 0,href:c.value?typeof n.to=="string"?n.to:"":void 0,class:a.normalizeClass(["ui-card",[d.value,{"ui-card-linkable":!!n.to}]])},{default:a.withCtx(()=>[u.$slots.header||n.title||n.subtitle||u.$slots["leading-icon"]||u.$slots["trailing-icon"]?(a.openBlock(),a.createElementBlock("div",Hd,[a.renderSlot(u.$slots,"header",{},()=>[a.renderSlot(u.$slots,"leading-icon",{},void 0,!0),n.title||u.$slots.title||n.subtitle||u.$slots.subtitle?(a.openBlock(),a.createElementBlock("div",jd,[n.title||u.$slots.title?a.renderSlot(u.$slots,"title",{key:0},()=>[n.title?(a.openBlock(),a.createElementBlock("h2",Ud,a.toDisplayString(n.title),1)):a.createCommentVNode("",!0)],!0):a.createCommentVNode("",!0),n.subtitle||u.$slots.subtitle?a.renderSlot(u.$slots,"subtitle",{key:1},()=>[n.subtitle?(a.openBlock(),a.createElementBlock("p",qd,a.toDisplayString(n.subtitle),1)):a.createCommentVNode("",!0)],!0):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.renderSlot(u.$slots,"trailing-icon",{},void 0,!0),a.renderSlot(u.$slots,"actions",{},void 0,!0)],!0)])):a.createCommentVNode("",!0),u.$slots.default?(a.openBlock(),a.createElementBlock("div",Wd,[a.renderSlot(u.$slots,"default",{},void 0,!0)])):a.createCommentVNode("",!0),u.$slots.footer?(a.openBlock(),a.createElementBlock("div",Kd,[a.renderSlot(u.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)]),_:3},8,["to","href","class"]))}}),uo=de(Jd,[["__scopeId","data-v-59655c42"]]);const es=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gd=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),Yd=n=>{const e=Gd(n);return e.charAt(0).toUpperCase()+e.slice(1)},Qd=(...n)=>n.filter((e,t,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===t).join(" ").trim(),ts=n=>n==="";var en={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Xd=({name:n,iconNode:e,absoluteStrokeWidth:t,"absolute-stroke-width":r,strokeWidth:i,"stroke-width":o,size:s=en.width,color:l=en.stroke,...c},{slots:d})=>a.h("svg",{...en,...c,width:s,height:s,stroke:l,"stroke-width":ts(t)||ts(r)||t===!0||r===!0?Number(i||o||en["stroke-width"])*24/Number(s):i||o||en["stroke-width"],class:Qd("lucide",c.class,...n?[`lucide-${es(Yd(n))}-icon`,`lucide-${es(n)}`]:["lucide-icon"])},[...e.map(u=>a.h(...u)),...d.default?[d.default()]:[]]);const J=(n,e)=>(t,{slots:r,attrs:i})=>a.h(Xd,{...i,...t,iconNode:e,name:n},r);const Zd=J("align-center",[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);const _d=J("align-left",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);const eu=J("align-right",[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);const tu=J("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);const nu=J("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);const ru=J("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const iu=J("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Pr=J("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ou=J("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const su=J("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const lu=J("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const au=J("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);const cu=J("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const du=J("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const uu=J("file-input",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);const fu=J("heading-1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);const hu=J("heading-2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);const pu=J("heading-3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);const mu=J("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);const gu=J("list-ordered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);const yu=J("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);const El=J("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const ku=J("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);const bu=J("redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);const vu=J("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const xu=J("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);const wu=J("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);const Cu=J("undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);const fo=J("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Su={key:0,class:"input-leading-icon"},Mu=["id","type","value","placeholder","disabled","readonly","required","min","max","step","autocomplete","spellcheck","tabindex"],Tu={key:1,class:"input-trailing-icon"},Eu={key:2,class:"input-trailing-icon"},Nu={key:3,class:"input-trailing-icon"},Au=a.defineComponent({__name:"UiInput.Text",props:{type:{default:"text"},min:{},max:{},step:{},autocomplete:{},spellcheck:{type:Boolean,default:!0},hasLeadingIcon:{type:Boolean,default:!1},hasTrailingIcon:{type:Boolean,default:!1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","blur","focus","keydown"],setup(n,{emit:e}){const t=n,r=e,i=a.ref(!1),o=a.computed(()=>t.type==="password"?i.value?"text":"password":t.type),s=a.computed(()=>t.hasTrailingIcon||t.type==="password"||t.type==="search"&&t.modelValue),l=a.computed(()=>{if(t.tabindex!==void 0)return t.tabindex+1}),c=a.computed(()=>{const y=[];return t.error&&y.push("input-error"),t.disabled&&y.push("input-disabled"),t.readonly&&y.push("input-readonly"),y.push(`input-size-${t.size}`),y}),d=a.computed(()=>{const y=[];return t.hasLeadingIcon?y.push("input-padding-left-icon"):y.push("input-padding-left"),s.value?y.push("input-padding-right-icon"):y.push("input-padding-right"),y}),u=y=>{let S=y.target.value;t.type==="number"&&S!==""&&(S=parseFloat(S)||0),r("update:modelValue",S)},f=y=>{r("blur",y)},h=y=>{r("focus",y)},p=y=>{r("keydown",y)},m=()=>{i.value=!i.value},g=()=>{r("update:modelValue","")};return(y,k)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["input-field-wrapper",c.value])},[a.renderSlot(y.$slots,"leading",{},void 0,!0),t.hasLeadingIcon?(a.openBlock(),a.createElementBlock("div",Su,[a.renderSlot(y.$slots,"leading-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.createElementVNode("input",{id:n.inputId,type:o.value,value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,min:n.min,max:n.max,step:n.step,autocomplete:n.autocomplete,spellcheck:n.spellcheck,tabindex:n.tabindex,class:a.normalizeClass(["input-base",d.value]),onInput:u,onBlur:f,onFocus:h,onKeydown:p},null,42,Mu),n.type==="password"?(a.openBlock(),a.createElementBlock("div",Tu,[a.createVNode(W,{color:i.value?"primary":"secondary",variant:i.value?"primary":"ghost",size:"sm",icon:"",squircle:"",tabindex:l.value,"aria-label":i.value?"Hide password":"Show password",onClick:m},{icon:a.withCtx(()=>[i.value?(a.openBlock(),a.createBlock(a.unref(cu),{key:0})):(a.openBlock(),a.createBlock(a.unref(du),{key:1}))]),_:1},8,["color","variant","tabindex","aria-label"])])):n.type==="search"&&n.modelValue&&!n.disabled&&!n.readonly?(a.openBlock(),a.createElementBlock("div",Eu,[a.createVNode(W,{color:"danger",variant:"ghost",size:"sm",icon:"",squircle:"",tabindex:l.value,"aria-label":"Clear search",onClick:g},{icon:a.withCtx(()=>[a.createVNode(a.unref(fo))]),_:1},8,["tabindex"])])):t.hasTrailingIcon?(a.openBlock(),a.createElementBlock("div",Nu,[a.renderSlot(y.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(y.$slots,"trailing",{},void 0,!0)],2))}}),Bu=de(Au,[["__scopeId","data-v-4807b700"]]),Ou={key:0,class:"input-leading-icon"},Du=["id","value","placeholder","disabled","readonly","required","rows","cols","maxlength","autocomplete","spellcheck"],Iu={key:1,class:"input-trailing-icon"},$u=a.defineComponent({__name:"UiInput.Textarea",props:{rows:{default:3},cols:{},maxlength:{},autocomplete:{},spellcheck:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},hasLeadingIcon:{type:Boolean,default:!1},hasTrailingIcon:{type:Boolean,default:!1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","blur","focus","keydown"],setup(n,{emit:e}){const t=n,r=e,i=a.useSlots(),o=a.computed(()=>!!i.default),s=a.ref(null);a.onMounted(()=>{(t.modelValue===void 0||t.modelValue==="")&&o.value&&setTimeout(()=>{if(s.value){const p=s.value.textContent?.trim()||"";p&&r("update:modelValue",p)}},0)});const l=a.computed(()=>{const p=[];return t.error&&p.push("input-error"),t.disabled&&p.push("input-disabled"),t.readonly&&p.push("input-readonly"),p.push(`input-size-${t.size}`),p}),c=a.computed(()=>{const p=[];return t.hasLeadingIcon?p.push("input-padding-left-icon"):p.push("input-padding-left"),t.hasTrailingIcon?p.push("input-padding-right-icon"):p.push("input-padding-right"),p}),d=p=>{const m=p.target;r("update:modelValue",m.value)},u=p=>{r("blur",p)},f=p=>{r("focus",p)},h=p=>{r("keydown",p)};return(p,m)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["input-field-wrapper input-textarea",l.value])},[a.renderSlot(p.$slots,"leading",{},void 0,!0),t.hasLeadingIcon?(a.openBlock(),a.createElementBlock("div",Ou,[a.renderSlot(p.$slots,"leading-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["textarea-wrapper",{"textarea-resizable":n.resizable}])},[a.createElementVNode("textarea",{id:n.inputId,value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,rows:n.rows,cols:n.cols,maxlength:n.maxlength,autocomplete:n.autocomplete,spellcheck:n.spellcheck,class:a.normalizeClass(["input-base",[{"input-textarea-resize":n.resizable},c.value]]),onInput:d,onBlur:u,onFocus:f,onKeydown:h},null,42,Du)],2),t.hasTrailingIcon?(a.openBlock(),a.createElementBlock("div",Iu,[a.renderSlot(p.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(p.$slots,"trailing",{},void 0,!0),o.value?(a.openBlock(),a.createElementBlock("span",{key:2,ref_key:"slotContentRef",ref:s,class:"sr-only","aria-hidden":"true"},[a.renderSlot(p.$slots,"default",{},void 0,!0)],512)):a.createCommentVNode("",!0)],2))}}),Ru=de($u,[["__scopeId","data-v-5728c58e"]]);function Vr(n){const{trigger:e,floating:t,placement:r="bottom-start",offset:i=8,flip:o=!0,shift:s=!0,sameWidth:l=!1,autoUpdate:c=!1,clickOutside:d}=n,u=a.ref({position:"fixed",top:"0px",left:"0px",zIndex:"9999"}),f=async()=>{if(await a.nextTick(),!e.value||!t.value||typeof e.value.getBoundingClientRect!="function"||typeof t.value.getBoundingClientRect!="function")return;const x=e.value.getBoundingClientRect(),b=t.value.getBoundingClientRect(),[v,C="start"]=r.split("-");let w=0,M=0;switch(v){case"bottom":w=x.left,M=x.bottom+i;break;case"top":w=x.left,M=x.top-b.height-i;break;case"right":w=x.right+i,M=x.top;break;case"left":w=x.left-b.width-i,M=x.top;break}if(v==="top"||v==="bottom")switch(C){case"center":w=x.left+(x.width-b.width)/2;break;case"end":w=x.right-b.width;break}else if(v==="left"||v==="right")switch(C){case"center":M=x.top+(x.height-b.height)/2;break;case"end":M=x.bottom-b.height;break}let A=l?x.width:void 0;const $=window.innerWidth,U=window.innerHeight,j=8;let K=!1,N=!1;if(o){if(v==="bottom"&&M+b.height>U-j){const R=x.top-b.height-i;R>=j&&(M=R,K=!0)}else if(v==="top"&&M<j){const R=x.bottom+i;R+b.height<=U-j&&(M=R,K=!1)}if(v==="right"&&w+b.width>$-j){const R=x.left-b.width-i;R>=j&&(w=R,N=!0)}else if(v==="left"&&w<j){const R=x.right+i;R+b.width<=$-j&&(w=R,N=!1)}}s&&(w<j?w=j:w+b.width>$-j&&(w=$-b.width-j),M<j?M=j:M+b.height>U-j&&(M=U-b.height-j));const D={position:"fixed",zIndex:"9999",...A?{width:`${A}px`}:{}};K?D.bottom=`${U-M-b.height}px`:D.top=`${M}px`,N?D.right=`${$-w-b.width}px`:D.left=`${w}px`,u.value=D},h=()=>{f()};let p=null;const m=()=>{h()},g=()=>{if(h(),d?.enabled&&d.handler&&e.value){if(typeof e.value.getBoundingClientRect!="function")return;const x=e.value.getBoundingClientRect(),b=window.innerHeight,v=window.innerWidth;(x.bottom<0||x.top>b||x.right<0||x.left>v)&&d.handler()}},y=x=>{if(!d?.enabled||!d.handler)return;const b=x.target;if(!b||!e.value||!t.value||typeof e.value.contains!="function"||typeof t.value.contains!="function")return;const v=e.value.contains(b),C=t.value.contains(b);!v&&!C&&d.handler()},k=()=>{c&&(window.addEventListener("resize",m),window.addEventListener("scroll",g,!0),typeof ResizeObserver<"u"&&(p=new ResizeObserver(()=>{h()}),a.nextTick(()=>{e.value&&p&&typeof e.value.getBoundingClientRect=="function"&&p.observe(e.value),t.value&&p&&typeof t.value.getBoundingClientRect=="function"&&p.observe(t.value)}))),d?.enabled&&document.addEventListener("click",y,!0)},S=()=>{c&&(window.removeEventListener("resize",m),window.removeEventListener("scroll",g,!0)),d?.enabled&&document.removeEventListener("click",y,!0),p&&(p.disconnect(),p=null)};return a.onMounted(()=>{k()}),a.onUnmounted(()=>{S()}),{floatingStyle:u,updatePosition:h,cleanup:S}}const Lu={key:0,class:"input-leading-icon"},zu=["tabindex","aria-expanded","aria-controls","aria-disabled"],Pu={class:"input-select-value"},Vu={key:0,class:"input-select-text"},Fu={key:1,class:"input-select-placeholder"},Hu={key:1,class:"input-trailing-icon"},ju=["id","aria-multiselectable"],Uu={key:0,class:"input-dropdown-search"},qu={key:0,class:"input-dropdown-no-options"},Wu=["onClick","onMouseenter","aria-selected"],Ku={class:"input-dropdown-option-content"},Ju={class:"input-dropdown-option-text"},Gu={key:0,class:"input-dropdown-option-description"},Yu={key:0,class:"input-dropdown-option-check"},Qu=a.defineComponent({__name:"UiInput.Select",props:{options:{default:()=>[]},multiple:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},allowInsert:{type:Boolean,default:!1},maxDropdownHeight:{default:400},noOptionsText:{default:"No options available"},searchPlaceholder:{default:""},hasLeadingIcon:{type:Boolean,default:!1},hasTrailingIcon:{type:Boolean,default:!1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean},required:{type:Boolean},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","blur","focus"],setup(n,{emit:e}){const t=n,r=e,i=a.ref(),o=a.ref(),s=a.ref(),l=a.computed(()=>`dropdown-${t.inputId||Math.random().toString(36).substr(2,9)}`),c=a.computed(()=>{if(i.value){const N=i.value.closest('[role="dialog"][aria-modal="true"]');if(N)return N}return"body"}),d=a.ref({isOpen:!1,searchQuery:"",highlightedIndex:-1}),{floatingStyle:u,updatePosition:f,cleanup:h}=Vr({trigger:i,floating:o,placement:"bottom-start",offset:10,shift:!0,flip:!0,sameWidth:!0,autoUpdate:!0,clickOutside:{enabled:!0,handler:()=>{C()}}}),p=a.computed(()=>t.multiple?Array.isArray(t.modelValue)?t.modelValue:[]:t.modelValue!==void 0?[t.modelValue]:[]),m=a.computed(()=>{if(t.multiple){const N=t.options.filter(D=>p.value.includes(D.value));return N.length>0?`${N.length} selected`:null}else return t.options.find(D=>D.value===t.modelValue)?.label||null}),g=a.computed(()=>{let N=t.options;if(t.searchable&&d.value.searchQuery){const D=d.value.searchQuery.toLowerCase();N=t.options.filter(R=>R.label.toLowerCase().includes(D)||R.description?.toLowerCase().includes(D)),t.allowInsert&&t.multiple&&d.value.searchQuery.trim()&&(t.options.some(ke=>ke.label.toLowerCase()===d.value.searchQuery.toLowerCase())||(N=[{value:`__insert__${d.value.searchQuery}`,label:`Add "${d.value.searchQuery}"`,description:"Add as new item",disabled:!1},...N]))}return N}),y=a.computed(()=>t.searchPlaceholder&&t.searchPlaceholder.trim()!==""?t.searchPlaceholder:t.allowInsert&&t.multiple?"Search or create...":"Search..."),k=a.computed(()=>t.disabled?-1:t.tabindex??0),S=a.computed(()=>{if(t.tabindex!==void 0)return t.tabindex+1}),x=a.computed(()=>{const N=[];return t.error&&N.push("input-error"),t.disabled&&N.push("input-disabled"),N.push(`input-size-${t.size}`),N}),b=a.computed(()=>{const N=[];return t.hasLeadingIcon?N.push("input-padding-left-icon"):N.push("input-padding-left"),t.hasTrailingIcon?N.push("input-padding-right-icon"):N.push("input-padding-right"),N}),v=async()=>{if(!t.disabled){if(d.value.isOpen=!0,d.value.searchQuery="",await a.nextTick(),f(),d.value.highlightedIndex===-1){const N=g.value.findIndex(D=>!D.disabled);d.value.highlightedIndex=N>=0?N:0}if(t.searchable&&s.value){const N=s.value.$el?.querySelector("input");N&&N.focus()}document.addEventListener("keydown",j),r("focus",new FocusEvent("focus"))}},C=()=>{d.value.isOpen&&(d.value.isOpen=!1,d.value.highlightedIndex=-1,d.value.searchQuery="",document.removeEventListener("keydown",j),r("blur",new FocusEvent("blur")))},w=()=>{d.value.isOpen?C():v()},M=N=>N.value&&typeof N.value=="string"&&N.value.startsWith("__insert__")?!1:p.value.includes(N.value),A=N=>{if(!N.disabled)if(t.multiple){const D=[...p.value];if(N.value&&typeof N.value=="string"&&N.value.startsWith("__insert__")){const R=N.value.replace("__insert__","");D.includes(R)||D.push(R),d.value.searchQuery=""}else{const R=D.indexOf(N.value);R>-1?D.splice(R,1):D.push(N.value)}r("update:modelValue",D)}else r("update:modelValue",N.value),C()},$=N=>{if(["Enter"," ","ArrowDown","ArrowUp","Escape"].includes(N.key)&&(N.preventDefault(),!(d.value.isOpen&&(N.key==="ArrowDown"||N.key==="ArrowUp"))))switch(N.key){case"Enter":case" ":w();break;case"ArrowDown":case"ArrowUp":v();break;case"Escape":C();break}},U=N=>{switch(N.key){case"ArrowDown":N.preventDefault(),K(1);break;case"ArrowUp":N.preventDefault(),K(-1);break;case"Enter":if(N.preventDefault(),d.value.highlightedIndex>=0){const D=g.value[d.value.highlightedIndex];D&&!D.disabled&&A(D)}break;case"Escape":C();break}},j=N=>{if(d.value.isOpen)switch(N.key){case"Escape":C();break;case"ArrowDown":N.preventDefault(),K(1);break;case"ArrowUp":N.preventDefault(),K(-1);break;case"Enter":if(N.preventDefault(),d.value.highlightedIndex>=0){const D=g.value[d.value.highlightedIndex];D&&!D.disabled&&A(D)}break}},K=N=>{const D=g.value;if(D.length===0)return;let R=d.value.highlightedIndex+N;R<0?R=D.length-1:R>=D.length&&(R=0);let ke=0;for(;D[R]?.disabled&&ke<D.length;)R+=N,R<0&&(R=D.length-1),R>=D.length&&(R=0),ke++;d.value.highlightedIndex=R};return a.onUnmounted(()=>{d.value.isOpen&&C(),document.removeEventListener("keydown",j),h()}),(N,D)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:a.normalizeClass(["input-field-wrapper",[x.value,b.value]])},[a.renderSlot(N.$slots,"leading",{},void 0,!0),t.hasLeadingIcon?(a.openBlock(),a.createElementBlock("div",Lu,[a.renderSlot(N.$slots,"leading-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{ref_key:"selectTriggerRef",ref:i,class:a.normalizeClass(["input-select-trigger",{"input-select-open":d.value.isOpen}]),onClick:w,onKeydown:$,tabindex:k.value,role:"combobox","aria-expanded":d.value.isOpen,"aria-haspopup":!0,"aria-controls":l.value,"aria-disabled":n.disabled},[a.createElementVNode("div",Pu,[m.value?(a.openBlock(),a.createElementBlock("span",Vu,a.toDisplayString(m.value),1)):(a.openBlock(),a.createElementBlock("span",Fu,a.toDisplayString(n.placeholder||"Select an option..."),1))]),a.createElementVNode("div",{class:a.normalizeClass(["input-select-arrow",{"input-select-arrow-open":d.value.isOpen}])},[a.createVNode(a.unref(Pr))],2)],42,zu),t.hasTrailingIcon?(a.openBlock(),a.createElementBlock("div",Hu,[a.renderSlot(N.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(N.$slots,"trailing",{},void 0,!0)],2),(a.openBlock(),a.createBlock(a.Teleport,{to:c.value},[d.value.isOpen?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:o,id:l.value,class:a.normalizeClass(["input-dropdown",{"input-dropdown--multiple":n.multiple}]),style:a.normalizeStyle(a.unref(u)),role:"listbox","aria-multiselectable":n.multiple,onMousedown:D[1]||(D[1]=a.withModifiers(()=>{},["prevent"]))},[n.searchable?(a.openBlock(),a.createElementBlock("div",Uu,[a.createVNode(ni,{ref_key:"searchInputRef",ref:s,modelValue:d.value.searchQuery,"onUpdate:modelValue":D[0]||(D[0]=R=>d.value.searchQuery=R),type:"search",placeholder:y.value,size:"sm",tabindex:S.value,onKeydown:U},{"leading-icon":a.withCtx(()=>[a.createVNode(a.unref(vu))]),_:1},8,["modelValue","placeholder","tabindex"])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"input-dropdown-options",style:a.normalizeStyle({maxHeight:`${n.maxDropdownHeight}px`})},[g.value.length===0?(a.openBlock(),a.createElementBlock("div",qu,[a.renderSlot(N.$slots,"zero-state",{},()=>[a.createTextVNode(a.toDisplayString(n.noOptionsText),1)],!0)])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(R,ke)=>(a.openBlock(),a.createElementBlock("div",{key:R.value,class:a.normalizeClass(["input-dropdown-option",{"input-dropdown-option--selected":M(R),"input-dropdown-option--highlighted":ke===d.value.highlightedIndex,"input-dropdown-option--disabled":R.disabled,"input-dropdown-option--insert":R.value&&typeof R.value=="string"&&R.value.startsWith("__insert__")}]),onClick:ri=>A(R),onMouseenter:ri=>d.value.highlightedIndex=ke,role:"option","aria-selected":M(R)},[a.createElementVNode("div",Ku,[a.createElementVNode("div",Ju,a.toDisplayString(R.label),1),R.description?(a.openBlock(),a.createElementBlock("div",Gu,a.toDisplayString(R.description),1)):a.createCommentVNode("",!0)]),n.multiple&&M(R)?(a.openBlock(),a.createElementBlock("div",Yu,[a.createVNode(a.unref(iu))])):a.createCommentVNode("",!0)],42,Wu))),128))],4)],46,ju)):a.createCommentVNode("",!0)],8,["to"]))],64))}}),Xu=de(Qu,[["__scopeId","data-v-e9ac7d68"]]),Zu={class:"input-leading-icon"},_u=["src"],ef=["id","accept","multiple","disabled","required"],tf={class:"input-file-content"},nf={key:0,class:"input-file-selected"},rf={class:"input-file-list"},of={class:"input-file-item"},sf={class:"input-file-name"},lf={key:1,class:"input-file-prompt"},af={class:"input-file-prompt-text"},cf={key:0,class:"input-file-accept-text"},df={key:2,class:"input-file-selected"},uf={class:"input-file-selected-text"},ff={class:"input-file-list"},hf={class:"input-file-name"},pf={class:"input-file-size"},mf={key:0,class:"input-trailing-icon"},gf={key:1,class:"input-trailing-icon"},yf=a.defineComponent({__name:"UiInput.File",props:{accept:{},multiple:{type:Boolean,default:!1},maxFileSize:{default:10*1024*1024},dragDropText:{},selectedText:{},preview:{},hasLeadingIcon:{type:Boolean,default:!1},hasTrailingIcon:{type:Boolean,default:!1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","file-error","clear-preview","blur","focus"],setup(n,{emit:e}){const t=n,r=e,i=a.ref(),o=a.ref(!1),s=a.ref(null),l=a.ref([]),c=a.computed(()=>t.preview?t.preview:s.value);a.computed(()=>!!t.preview);const d=a.computed(()=>t.preview?t.preview:null),u=a.computed(()=>{const M=[];return t.error&&M.push("input-error"),t.disabled&&M.push("input-disabled"),M.push(`input-size-${t.size}`),M}),f=a.computed(()=>{const M=[];return M.push("input-padding-left-icon"),l.value.length>0||d.value||t.disabled?M.push("input-padding-right-icon"):M.push("input-padding-right"),M}),h=M=>{if(t.maxFileSize&&M.size>t.maxFileSize)return`File "${M.name}" is too large. Maximum size is ${y(t.maxFileSize)}.`;if(t.accept){const A=t.accept.split(",").map(K=>K.trim().toLowerCase()),$=M.type.toLowerCase(),U="."+M.name.split(".").pop()?.toLowerCase();if(!A.some(K=>{if(K.startsWith("."))return U===K;if(K.includes("*")){const N=K.split("/")[0];return $.startsWith(N)}return $===K}))return`File "${M.name}" is not an accepted file type.`}return null},p=M=>{for(const A of M){const $=h(A);if($){r("file-error",$);return}}t.multiple?l.value=[...l.value,...M]:l.value=M.slice(0,1),t.multiple?r("update:modelValue",l.value):r("update:modelValue",l.value[0]||null),!t.multiple&&l.value.length>0&&l.value[0].type.startsWith("image/")&&m(l.value[0])},m=M=>{s.value&&URL.revokeObjectURL(s.value);const A=new FileReader;A.onload=$=>{s.value=$.target?.result},A.readAsDataURL(M)},g=()=>{l.value=[],r("update:modelValue",t.multiple?[]:null),s.value&&(URL.revokeObjectURL(s.value),s.value=null),i.value&&(i.value.value=""),t.preview&&r("clear-preview")},y=M=>{if(M===0)return"0 Bytes";const A=1024,$=["Bytes","KB","MB","GB"],U=Math.floor(Math.log(M)/Math.log(A));return parseFloat((M/Math.pow(A,U)).toFixed(2))+" "+$[U]},k=()=>{!t.disabled&&i.value&&i.value.click()},S=M=>{const A=M.target,$=Array.from(A.files||[]);$.length>0&&p($)},x=M=>{t.disabled||(o.value=!0)},b=M=>{o.value=!1},v=M=>{if(t.disabled)return;o.value=!1;const A=Array.from(M.dataTransfer?.files||[]);A.length>0&&p(A)},C=M=>{r("blur",M)},w=M=>{r("focus",M)};return a.watch(()=>t.modelValue,M=>{M?Array.isArray(M)?l.value=M:(l.value=[M],M.type.startsWith("image/")&&m(M)):(l.value=[],s.value&&(URL.revokeObjectURL(s.value),s.value=null))},{immediate:!0}),a.onUnmounted(()=>{s.value&&URL.revokeObjectURL(s.value)}),(M,A)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["input-field-wrapper",[u.value,f.value]])},[a.renderSlot(M.$slots,"leading",{},void 0,!0),a.createElementVNode("div",Zu,[c.value?(a.openBlock(),a.createElementBlock("img",{key:0,src:c.value,alt:"Preview",class:"input-file-preview"},null,8,_u)):t.hasLeadingIcon?a.renderSlot(M.$slots,"leading-icon",{key:1},void 0,!0):(a.openBlock(),a.createBlock(a.unref(uu),{key:2}))]),a.createElementVNode("div",{class:a.normalizeClass(["input-file-area",{"input-file-dragover":o.value,"input-file-disabled":n.disabled}]),onClick:k,onDragover:a.withModifiers(x,["prevent"]),onDragleave:a.withModifiers(b,["prevent"]),onDrop:a.withModifiers(v,["prevent"])},[a.createElementVNode("input",{ref_key:"fileInputRef",ref:i,id:n.inputId,type:"file",accept:n.accept,multiple:n.multiple,disabled:n.disabled,required:n.required,class:"input-file-hidden",onChange:S,onBlur:C,onFocus:w},null,40,ef),a.createElementVNode("div",tf,[d.value&&l.value.length===0?(a.openBlock(),a.createElementBlock("div",nf,[A[0]||(A[0]=a.createElementVNode("div",{class:"input-file-selected-text"}," File loaded ",-1)),a.createElementVNode("div",rf,[a.createElementVNode("div",of,[a.createElementVNode("span",sf,a.toDisplayString(d.value),1)])])])):l.value.length===0?(a.openBlock(),a.createElementBlock("div",lf,[a.createElementVNode("div",af,a.toDisplayString(n.dragDropText||"Click to select or drag and drop"),1),n.accept?(a.openBlock(),a.createElementBlock("div",cf,a.toDisplayString(n.accept),1)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",df,[a.createElementVNode("div",uf,a.toDisplayString(n.selectedText||`${l.value.length} file(s) selected`),1),a.createElementVNode("div",ff,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.value,($,U)=>(a.openBlock(),a.createElementBlock("div",{key:U,class:"input-file-item"},[a.createElementVNode("span",hf,a.toDisplayString($.name),1),a.createElementVNode("span",pf,"("+a.toDisplayString(y($.size))+")",1)]))),128))])]))])],34),(l.value.length>0||d.value)&&!n.disabled?(a.openBlock(),a.createElementBlock("div",mf,[a.createElementVNode("button",{type:"button",class:"input-file-clear",onClick:a.withModifiers(g,["stop"]),"aria-label":"Clear selected files"},[a.createVNode(a.unref(fo))])])):t.hasTrailingIcon?(a.openBlock(),a.createElementBlock("div",gf,[a.renderSlot(M.$slots,"trailing-icon",{},void 0,!0)])):a.createCommentVNode("",!0),a.renderSlot(M.$slots,"trailing",{},void 0,!0)],2))}}),kf=de(yf,[["__scopeId","data-v-3c7bee41"]]),bf={class:"tabs-wrapper"},vf={key:0,class:"tabs-before"},xf=["aria-selected","id","onClick"],wf={key:1,class:"tabs-after"},Cf=["aria-labelledby"],Sf=a.defineComponent({__name:"UiTabs",props:{modelValue:{},tabs:{},underlineWidth:{default:"5rem"},orientation:{default:"horizontal"},size:{default:"md"},variant:{default:"default"},tabWidth:{default:"fill"},sticky:{default:null}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=a.useSlots(),o=a.computed(()=>!!i.content),s=a.computed(()=>t.tabs.find(x=>x.value===t.modelValue)),l=a.ref([]),c=a.ref(!1),d=a.ref({width:"0px",height:"0px",left:"0px",top:"0px",opacity:"0"}),u=a.ref({width:"0px",height:"0px",left:"0px",top:"0px",opacity:"0"});let f=-1,h=!1;const p=(x,b)=>{const v=x.getBoundingClientRect(),C=b.getBoundingClientRect(),w=getComputedStyle(b),M=parseFloat(w.getPropertyValue("--underline-thickness")||"5");let A=5;t.size==="sm"?A=4:t.size==="lg"&&(A=6);const $=C.height;if(t.orientation==="vertical"){const U=v.top-C.top;return{height:v.height-A*4,top:U+A*2,width:M,left:A-M/2}}else{const U=v.left-C.left,j=v.width;if(t.underlineWidth==="full")return{width:j-30,left:U+15,height:M,top:$-A-M/2};let K;if(t.underlineWidth.endsWith("%")){const D=parseFloat(t.underlineWidth)/100;K=j*D}else if(t.underlineWidth.endsWith("px"))K=parseFloat(t.underlineWidth);else if(t.underlineWidth.endsWith("rem")){const D=parseFloat(t.underlineWidth),R=parseFloat(getComputedStyle(document.documentElement).fontSize);K=D*R}else K=parseFloat(t.underlineWidth)||j;const N=(j-K)/2;return{width:K,left:U+N,height:M,top:$-A-M/2}}},m=async(x,b)=>{h||(r("update:modelValue",x),await a.nextTick(),g(b))},g=async x=>{if(!l.value[x]||x===f)return;h=!0;const b=l.value[x],v=b.parentElement;if(!v)return;const C=p(b,v),w=b.getBoundingClientRect(),M=v.getBoundingClientRect();let A,$;if(t.orientation==="vertical"?(A=w.top-M.top,$=w.height):(A=w.left-M.left,$=w.width),f===-1){t.orientation==="vertical"?(d.value={height:`${C.height}px`,top:`${C.top}px`,width:`${C.width}px`,left:`${C.left}px`,opacity:"1"},u.value={height:`${$}px`,top:`${A}px`,width:`${w.width}px`,left:"0",opacity:"1"}):(d.value={width:`${C.width}px`,left:`${C.left}px`,height:`${C.height}px`,top:`${C.top}px`,opacity:"1"},u.value={width:`${$}px`,left:`${A}px`,height:"100%",top:"0",opacity:"1"}),f=x,h=!1;return}const U=l.value[f];if(p(U,v),U.getBoundingClientRect(),window.matchMedia("(prefers-reduced-motion: reduce)").matches){d.value={width:`${C.width||0}px`,left:`${C.left||0}px`,height:`${C.height||7}px`,top:`${C.top}px`,opacity:"1"},t.orientation==="vertical"?u.value={height:`${$}px`,top:`${A}px`,width:"100%",left:"0",opacity:"1"}:u.value={width:`${$}px`,left:`${A}px`,height:"100%",top:"0",opacity:"1"},f=x,h=!1;return}requestAnimationFrame(()=>{t.orientation==="vertical"?(d.value={height:`${C.height}px`,top:`${C.top}px`,width:`${C.width||7}px`,left:`${C.left}px`,opacity:"1"},u.value={height:`${$}px`,top:`${A}px`,width:"100%",left:"0",opacity:"1"}):(d.value={width:`${C.width}px`,left:`${C.left}px`,height:`${C.height||7}px`,top:`${C.top}px`,opacity:"1"},u.value={width:`${$}px`,left:`${A}px`,height:"100%",top:"0",opacity:"1"}),f=x,setTimeout(()=>{h=!1},200)})};let y=null;const k=()=>{const x=t.tabs.findIndex(b=>b.value===t.modelValue);if(x!==-1&&l.value&&l.value[x]){const b=c.value;c.value=!1;const v=l.value[x],C=v.parentElement;if(C){const w=p(v,C),M=v.getBoundingClientRect(),A=C.getBoundingClientRect();let $,U;t.orientation==="vertical"?($=M.top-A.top,U=M.height,d.value={height:`${w.height}px`,top:`${w.top}px`,width:`${w.width}px`,left:`${w.left}px`,opacity:"1"},u.value={height:`${U}px`,top:`${$}px`,width:`${M.width}px`,left:"0",opacity:"1"}):($=M.left-A.left,U=M.width,d.value={width:`${w.width}px`,left:`${w.left}px`,height:`${w.height}px`,top:`${w.top}px`,opacity:"1"},u.value={width:`${U}px`,left:`${$}px`,height:"100%",top:"0",opacity:"1"})}f=x,h=!1,setTimeout(()=>{c.value=b},10)}y&&clearTimeout(y),y=setTimeout(()=>{y=null},50)};a.onMounted(async()=>{await a.nextTick();const x=t.tabs.findIndex(b=>b.value===t.modelValue);x!==-1&&(g(x),setTimeout(()=>{c.value=!0},50)),window.addEventListener("resize",k)}),a.onUnmounted(()=>{window.removeEventListener("resize",k),y&&(clearTimeout(y),y=null)});const{modelValue:S}=a.toRefs(t);return a.watch(S,async()=>{await a.nextTick();const x=t.tabs.findIndex(b=>b.value===t.modelValue);x!==-1&&g(x)}),(x,b)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["tabs-container",[`tabs-container--${n.orientation}`,`tabs-container--${n.size}`,`tabs-container--${n.variant}`,{"tabs-container--with-content":o.value}]])},[a.createElementVNode("div",bf,[a.createElementVNode("div",{class:a.normalizeClass(["tabs-list",[`tabs-list--${n.orientation}`,`tabs-list--${n.size}`,`tabs-list--${n.variant}`]]),style:a.normalizeStyle(n.sticky?{position:"sticky",[n.sticky.side]:`${n.sticky.offset}px`,zIndex:10}:{})},[x.$slots.before?(a.openBlock(),a.createElementBlock("div",vf,[a.renderSlot(x.$slots,"before",{},void 0,!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["tabs-buttons-wrapper",`tabs-buttons-wrapper--${n.tabWidth}`]),role:"tablist"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.tabs,(v,C)=>(a.openBlock(),a.createElementBlock("button",{key:v.value,ref_for:!0,ref_key:"tabButtons",ref:l,class:a.normalizeClass(["tab-button",[`tab-button--${n.size}`,`tab-button--${n.variant}`,`tab-button--${n.tabWidth}`,{"tab-button-active":a.unref(S)===v.value}]]),"aria-selected":a.unref(S)===v.value,"aria-controls":"tabpanel",id:`tab-${v.value}`,role:"tab",onClick:w=>m(v.value,C)},a.toDisplayString(v.label),11,xf))),128)),a.createElementVNode("div",{class:a.normalizeClass(["tab-background",{"no-transition":!c.value}]),style:a.normalizeStyle(u.value)},null,6),a.createElementVNode("div",{class:a.normalizeClass(["tab-underline",{"no-transition":!c.value}]),style:a.normalizeStyle(d.value)},null,6)],2),x.$slots.after?(a.openBlock(),a.createElementBlock("div",wf,[a.renderSlot(x.$slots,"after",{},void 0,!0)])):a.createCommentVNode("",!0)],6)]),o.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["tabs-content",`tabs-content--${n.orientation}`]),role:"tabpanel","aria-labelledby":`tab-${a.unref(S)}`,id:"tabpanel"},[a.renderSlot(x.$slots,"content",{activeTab:s.value},void 0,!0)],10,Cf)):a.createCommentVNode("",!0)],2))}}),Fr=de(Sf,[["__scopeId","data-v-901716e3"]]),Mf={key:0,class:"ui-divider-text"},Tf=a.defineComponent({__name:"UiDivider",props:{orientation:{default:"horizontal"},variant:{default:"solid"},text:{},textPosition:{default:"center"},color:{default:"var(--accui-divider-color)"},thickness:{default:"1px"},margin:{default:"1rem"},spacing:{default:"auto"}},setup(n){const e=n,t=a.useSlots(),r=a.computed(()=>!!(e.text||t.default)),i=a.computed(()=>{const o={};return e.orientation==="horizontal"?(o.width=e.spacing==="auto"?"100%":typeof e.spacing=="number"?`${e.spacing}px`:e.spacing,o.marginTop=typeof e.margin=="number"?`${e.margin}px`:e.margin,o.marginBottom=typeof e.margin=="number"?`${e.margin}px`:e.margin,r.value||(o.height=typeof e.thickness=="number"?`${e.thickness}px`:e.thickness),o["--divider-color"]=e.color==="#e5e7eb"?"var(--accui-divider-color)":e.color,o["--divider-thickness"]=typeof e.thickness=="number"?`${e.thickness}px`:e.thickness):(o.height=e.spacing==="auto"?"100%":typeof e.spacing=="number"?`${e.spacing}px`:e.spacing,o.marginLeft=typeof e.margin=="number"?`${e.margin}px`:e.margin,o.marginRight=typeof e.margin=="number"?`${e.margin}px`:e.margin,r.value||(o.width=typeof e.thickness=="number"?`${e.thickness}px`:e.thickness),o["--divider-color"]=e.color==="#e5e7eb"?"var(--accui-divider-color)":e.color,o["--divider-thickness"]=typeof e.thickness=="number"?`${e.thickness}px`:e.thickness),o});return(o,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["ui-divider",`ui-divider--${n.orientation}`,`ui-divider--${n.variant}`,{"ui-divider--with-text":r.value,[`ui-divider--text-${n.textPosition}`]:r.value}]),style:a.normalizeStyle(i.value)},[r.value?(a.openBlock(),a.createElementBlock("span",Mf,[a.renderSlot(o.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(n.text),1)],!0)])):a.createCommentVNode("",!0)],6))}}),tt=de(Tf,[["__scopeId","data-v-1c798024"]]),Ef={class:"datetime-picker-wrapper"},Nf={class:"datetime-picker-leading-icon"},Af={class:"datetime-picker-display"},Bf={key:0,class:"datetime-picker-value"},Of={key:1,class:"datetime-picker-placeholder"},Df={key:1,class:"datetime-picker-trailing-icon"},If={key:1,class:"datetime-picker-panel"},$f={class:"datetime-picker-header"},Rf={class:"datetime-picker-month-year"},Lf=["value"],zf=["value"],Pf={class:"datetime-picker-weekdays"},Vf={class:"datetime-picker-grid"},Ff={key:2,class:"datetime-picker-panel datetime-picker-time-panel"},Hf={class:"time-selector"},jf={class:"time-column"},Uf={class:"time-scroll"},qf={class:"time-column"},Wf={class:"time-scroll"},Kf={key:0,class:"time-column"},Jf={class:"time-scroll"},Gf={class:"datetime-picker-footer"},Yf=a.defineComponent({__name:"UiDateTimePicker",props:{modelValue:{},type:{default:"date"},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},min:{},max:{},error:{type:Boolean,default:!1},size:{default:"md"},format:{default:"iso"},is24Hour:{type:Boolean,default:!0},minuteStep:{default:1}},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n,r=e,i=a.ref(),o=a.ref(),s=a.ref(!1),{floatingStyle:l,updatePosition:c,cleanup:d}=Vr({trigger:i,floating:o,placement:"bottom-start",offset:8,shift:!0,flip:!0,autoUpdate:!0,clickOutside:{enabled:!0,handler:()=>{f()}}}),u=async()=>{t.disabled||t.readonly||(s.value=!0,await a.nextTick(),c())},f=()=>{s.value=!1},h=()=>{s.value?f():u()},p=a.ref(t.type==="time"?"time":"date"),m=a.ref(new Date().getMonth()),g=a.ref(new Date().getFullYear()),y=a.ref(new Date().getHours()),k=a.ref(new Date().getMinutes()),S=a.ref("AM"),x=["January","February","March","April","May","June","July","August","September","October","November","December"],b=["Su","Mo","Tu","We","Th","Fr","Sa"],v=a.computed(()=>t.min?t.min instanceof Date?t.min:new Date(t.min):null),C=a.computed(()=>t.max?t.max instanceof Date?t.max:new Date(t.max):null),w=a.computed(()=>{if(!t.modelValue)return null;if(t.modelValue instanceof Date)return t.modelValue;if(t.type==="time"&&typeof t.modelValue=="string"){const L=t.modelValue.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);if(L){const I=new Date;return I.setHours(parseInt(L[1]),parseInt(L[2]),parseInt(L[3]||"0"),0),I}}return new Date(t.modelValue)}),M=a.computed(()=>{if(!w.value||isNaN(w.value.getTime()))return"";const L=w.value;if(t.type==="time"){if(t.is24Hour)return`${String(L.getHours()).padStart(2,"0")}:${String(L.getMinutes()).padStart(2,"0")}`;{const pt=L.getHours()%12||12,se=L.getHours()>=12?"PM":"AM";return`${pt}:${String(L.getMinutes()).padStart(2,"0")} ${se}`}}const I=L.getDate(),O=L.getMonth()+1,q=L.getFullYear();let we="";switch(t.format){case"us":we=`${O}/${I}/${q}`;break;case"eu":we=`${I}/${O}/${q}`;break;default:we=`${q}-${String(O).padStart(2,"0")}-${String(I).padStart(2,"0")}`;break}if(t.type==="date")return we;let $t="";if(t.is24Hour)$t=`${String(L.getHours()).padStart(2,"0")}:${String(L.getMinutes()).padStart(2,"0")}`;else{const pt=L.getHours()%12||12,se=L.getHours()>=12?"PM":"AM";$t=`${pt}:${String(L.getMinutes()).padStart(2,"0")} ${se}`}return`${we} ${$t}`}),A=a.computed(()=>{const L=[];return t.error&&L.push("datetime-picker-error"),t.disabled&&L.push("datetime-picker-disabled"),t.readonly&&L.push("datetime-picker-readonly"),L.push(`datetime-picker-size-${t.size}`),L}),$=a.computed(()=>t.type==="date"||t.type==="datetime"&&p.value==="date"),U=a.computed(()=>t.type==="time"||t.type==="datetime"&&p.value==="time"),j=a.computed(()=>[{label:"Date",value:"date"},{label:"Time",value:"time"}]),K=a.computed(()=>{const L=[],I=t.is24Hour?23:12,O=t.is24Hour?0:1;for(let q=O;q<=I;q++)L.push(q);return L}),N=a.computed(()=>{const L=[];for(let I=0;I<60;I+=t.minuteStep)L.push(I);return L}),D=a.computed(()=>{const L=new Date().getFullYear(),I=v.value?.getFullYear()||L-100,O=C.value?.getFullYear()||L+100,q=[];for(let we=I;we<=O;we++)q.push(we);return q}),R=a.computed(()=>v.value?new Date(g.value,m.value,1)<=v.value:!1),ke=a.computed(()=>C.value?new Date(g.value,m.value+1,0)>=C.value:!1),ri=a.computed(()=>{const L=[],I=g.value,O=m.value,q=new Date(I,O,1),we=new Date(q);we.setDate(we.getDate()-q.getDay());const $t=new Date;$t.setHours(0,0,0,0);for(let pt=0;pt<42;pt++){const se=new Date(we);se.setDate(we.getDate()+pt);const ad=se.getMonth()!==O,cd=se.getTime()===$t.getTime(),dd=w.value&&se.getFullYear()===w.value.getFullYear()&&se.getMonth()===w.value.getMonth()&&se.getDate()===w.value.getDate(),ud=!!(v.value&&se<v.value||C.value&&se>C.value);L.push({key:`${se.getFullYear()}-${se.getMonth()}-${se.getDate()}`,date:se.getDate(),month:se.getMonth(),year:se.getFullYear(),otherMonth:ad,isToday:cd,isSelected:dd||!1,isDisabled:ud})}return L}),rd=()=>{switch(t.type){case"time":return"Select time";case"datetime":return"Select date and time";default:return"Select date"}},id=()=>{m.value===0?(m.value=11,g.value--):m.value--},od=()=>{m.value===11?(m.value=0,g.value++):m.value++},sd=L=>{if(L.isDisabled||L.otherMonth)return;const I=w.value||new Date,O=new Date(L.year,L.month,L.date,I.getHours(),I.getMinutes());r("update:modelValue",O),r("change",O),t.type==="datetime"?p.value="time":t.type==="date"&&f()},Dn=(L,I)=>{let O=w.value?new Date(w.value):new Date;if(!w.value){const q=new Date;O.setFullYear(q.getFullYear(),q.getMonth(),q.getDate())}if(L==="hour"){let q=I;t.is24Hour||(S.value==="PM"&&q!==12&&(q+=12),S.value==="AM"&&q===12&&(q=0)),y.value=I,O.setHours(q)}else if(L==="minute")k.value=I,O.setMinutes(I);else if(L==="period"){S.value=I;let q=y.value;I==="PM"&&q!==12&&(q+=12),I==="AM"&&q===12&&(q=0),O.setHours(q)}r("update:modelValue",O),r("change",O)},ld=()=>{const L=new Date;v.value&&L<v.value||C.value&&L>C.value||(r("update:modelValue",L),r("change",L),f())},_o=()=>{r("update:modelValue",null),r("change",null)};return a.watch(()=>t.modelValue,L=>{if(L){const I=L instanceof Date?L:new Date(L);if(!isNaN(I.getTime())){if(m.value=I.getMonth(),g.value=I.getFullYear(),t.is24Hour)y.value=I.getHours();else{const O=I.getHours();y.value=O%12||12,S.value=O>=12?"PM":"AM"}k.value=I.getMinutes()}}},{immediate:!0}),a.onUnmounted(()=>{d()}),(L,I)=>(a.openBlock(),a.createElementBlock("div",Ef,[a.createElementVNode("div",{ref_key:"triggerElement",ref:i,class:a.normalizeClass(["datetime-picker-trigger",[A.value,{"datetime-picker-open":s.value}]]),onClick:h},[a.createElementVNode("div",Nf,[n.type==="date"?(a.openBlock(),a.createBlock(a.unref(ru),{key:0})):n.type==="time"?(a.openBlock(),a.createBlock(a.unref(lu),{key:1})):(a.openBlock(),a.createBlock(a.unref(nu),{key:2}))]),a.createElementVNode("div",Af,[M.value?(a.openBlock(),a.createElementBlock("span",Bf,a.toDisplayString(M.value),1)):(a.openBlock(),a.createElementBlock("span",Of,a.toDisplayString(n.placeholder||rd()),1))]),n.modelValue&&!n.disabled&&!n.readonly?(a.openBlock(),a.createElementBlock("div",{key:0,class:"datetime-picker-trailing-icon",onClick:a.withModifiers(_o,["stop"])},[a.createVNode(a.unref(fo))])):(a.openBlock(),a.createElementBlock("div",Df,[a.createVNode(a.unref(Pr))]))],2),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[s.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"floatingElement",ref:o,class:"datetime-picker-dropdown",style:a.normalizeStyle(a.unref(l))},[n.type==="datetime"?(a.openBlock(),a.createBlock(Fr,{key:0,modelValue:p.value,"onUpdate:modelValue":I[0]||(I[0]=O=>p.value=O),tabs:j.value,variant:"default",size:"sm",style:{"margin-bottom":"1rem"}},null,8,["modelValue","tabs"])):a.createCommentVNode("",!0),$.value?(a.openBlock(),a.createElementBlock("div",If,[a.createElementVNode("div",$f,[a.createVNode(W,{onClick:id,disabled:R.value,color:"secondary",variant:"primary",icon:"",squircle:""},{icon:a.withCtx(()=>[a.createVNode(a.unref(ou))]),_:1},8,["disabled"]),a.createElementVNode("div",Rf,[a.withDirectives(a.createElementVNode("select",{"onUpdate:modelValue":I[1]||(I[1]=O=>m.value=O),class:"datetime-picker-select"},[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(x,(O,q)=>a.createElementVNode("option",{key:q,value:q},a.toDisplayString(O),9,Lf)),64))],512),[[a.vModelSelect,m.value]]),a.withDirectives(a.createElementVNode("select",{"onUpdate:modelValue":I[2]||(I[2]=O=>g.value=O),class:"datetime-picker-select"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D.value,O=>(a.openBlock(),a.createElementBlock("option",{key:O,value:O},a.toDisplayString(O),9,zf))),128))],512),[[a.vModelSelect,g.value]])]),a.createVNode(W,{onClick:od,disabled:ke.value,color:"secondary",variant:"primary",icon:"",squircle:""},{icon:a.withCtx(()=>[a.createVNode(a.unref(su))]),_:1},8,["disabled"])]),a.createElementVNode("div",Pf,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(b,O=>a.createElementVNode("div",{key:O,class:"datetime-picker-weekday"},a.toDisplayString(O),1)),64))]),a.createElementVNode("div",Vf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ri.value,O=>(a.openBlock(),a.createBlock(W,{key:O.key,color:O.isSelected||O.isToday?"primary":"secondary",variant:O.isSelected?"primary":O.isToday?"outline":"primary",disabled:O.isDisabled||O.otherMonth,class:a.normalizeClass(["datetime-picker-day",{"datetime-picker-day-other":O.otherMonth,"datetime-picker-day-disabled":O.isDisabled}]),icon:"",squircle:"",onClick:q=>sd(O)},{icon:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(O.date),1)]),_:2},1032,["color","variant","disabled","class","onClick"]))),128))])])):a.createCommentVNode("",!0),U.value?(a.openBlock(),a.createElementBlock("div",Ff,[a.createElementVNode("div",Hf,[a.createElementVNode("div",jf,[I[6]||(I[6]=a.createElementVNode("label",{class:"time-label"},"Hour",-1)),a.createElementVNode("div",Uf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(K.value,O=>(a.openBlock(),a.createBlock(W,{key:O,color:y.value===O?"primary":"secondary",variant:y.value===O?"primary":"ghost",size:"sm",squircle:"",onClick:q=>Dn("hour",O)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(String(O).padStart(2,"0")),1)]),_:2},1032,["color","variant","onClick"]))),128))])]),a.createElementVNode("div",qf,[I[7]||(I[7]=a.createElementVNode("label",{class:"time-label"},"Minute",-1)),a.createElementVNode("div",Wf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(N.value,O=>(a.openBlock(),a.createBlock(W,{key:O,color:k.value===O?"primary":"secondary",variant:k.value===O?"primary":"ghost",size:"sm",squircle:"",onClick:q=>Dn("minute",O)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(String(O).padStart(2,"0")),1)]),_:2},1032,["color","variant","onClick"]))),128))])]),n.is24Hour?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Kf,[I[10]||(I[10]=a.createElementVNode("label",{class:"time-label"},"Period",-1)),a.createElementVNode("div",Jf,[a.createVNode(W,{color:S.value==="AM"?"primary":"secondary",variant:S.value==="AM"?"primary":"ghost",size:"sm",squircle:"",class:"time-option",onClick:I[3]||(I[3]=O=>Dn("period","AM"))},{default:a.withCtx(()=>[...I[8]||(I[8]=[a.createTextVNode(" AM ",-1)])]),_:1},8,["color","variant"]),a.createVNode(W,{color:S.value==="PM"?"primary":"secondary",variant:S.value==="PM"?"primary":"ghost",size:"sm",squircle:"",class:"time-option",onClick:I[4]||(I[4]=O=>Dn("period","PM"))},{default:a.withCtx(()=>[...I[9]||(I[9]=[a.createTextVNode(" PM ",-1)])]),_:1},8,["color","variant"])])]))])])):a.createCommentVNode("",!0),a.createVNode(tt),a.createElementVNode("div",Gf,[a.createVNode(W,{onClick:ld,color:"primary",variant:"primary",squircle:"",style:{flex:"1"}},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.type==="time"?"Now":"Today"),1)]),_:1}),a.createVNode(W,{onClick:I[5]||(I[5]=O=>{_o(),f()}),color:"danger",variant:"primary",squircle:"",style:{flex:"1"}},{default:a.withCtx(()=>[...I[11]||(I[11]=[a.createTextVNode(" Clear ",-1)])]),_:1}),a.createVNode(W,{onClick:f,color:"secondary",variant:"primary",squircle:"",style:{flex:"1"}},{default:a.withCtx(()=>[...I[12]||(I[12]=[a.createTextVNode(" Close ",-1)])]),_:1})])],4)):a.createCommentVNode("",!0)]))]))}}),ho=de(Yf,[["__scopeId","data-v-f688c330"]]),Qf=a.defineComponent({__name:"UiInput.Date",props:{min:{},max:{},format:{default:"iso"},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","change","blur","focus","keydown"],setup(n,{emit:e}){const t=e,r=o=>{t("update:modelValue",o)},i=o=>{t("change",o)};return(o,s)=>(a.openBlock(),a.createBlock(ho,{"model-value":n.modelValue,type:"date",placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,min:n.min,max:n.max,error:!!n.error,size:n.size,format:n.format,"onUpdate:modelValue":r,onChange:i},null,8,["model-value","placeholder","disabled","readonly","required","min","max","error","size","format"]))}}),Xf=a.defineComponent({__name:"UiInput.Time",props:{is24Hour:{type:Boolean,default:!0},minuteStep:{default:1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","change","blur","focus","keydown"],setup(n,{emit:e}){const t=e,r=o=>{t("update:modelValue",o)},i=o=>{t("change",o)};return(o,s)=>(a.openBlock(),a.createBlock(ho,{"model-value":n.modelValue,type:"time",placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,error:!!n.error,size:n.size,is24Hour:n.is24Hour,minuteStep:n.minuteStep,"onUpdate:modelValue":r,onChange:i},null,8,["model-value","placeholder","disabled","readonly","required","error","size","is24Hour","minuteStep"]))}}),Zf=a.defineComponent({__name:"UiInput.DateTime",props:{min:{},max:{},format:{default:"iso"},is24Hour:{type:Boolean,default:!0},minuteStep:{default:1},label:{},helpText:{},modelValue:{},value:{},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},fullWidth:{type:Boolean},inputId:{},error:{type:[Boolean,String,Error],default:!1},size:{default:"md"},tabindex:{}},emits:["update:modelValue","change","blur","focus","keydown"],setup(n,{emit:e}){const t=e,r=o=>{t("update:modelValue",o)},i=o=>{t("change",o)};return(o,s)=>(a.openBlock(),a.createBlock(ho,{"model-value":n.modelValue,type:"datetime",placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,required:n.required,min:n.min,max:n.max,error:!!n.error,size:n.size,format:n.format,is24Hour:n.is24Hour,minuteStep:n.minuteStep,"onUpdate:modelValue":r,onChange:i},null,8,["model-value","placeholder","disabled","readonly","required","min","max","error","size","format","is24Hour","minuteStep"]))}});function ue(n){this.content=n}ue.prototype={constructor:ue,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new ue(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ue(t)},addToStart:function(n,e){return new ue([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ue(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new ue(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ue.from(n),n.size?new ue(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ue.from(n),n.size?new ue(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ue.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ue.from=function(n){if(n instanceof ue)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ue(e)};function Nl(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),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=Nl(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function Al(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),l=e.child(--o),c=s.nodeSize;if(s==l){t-=c,r-=c;continue}if(!s.sameMarkup(l))return{a:t,b:r};if(s.isText&&s.text!=l.text){let d=0,u=Math.min(s.text.length,l.text.length);for(;d<u&&s.text[s.text.length-d-1]==l.text[l.text.length-d-1];)d++,t--,r--;return{a:t,b:r}}if(s.content.size||l.content.size){let d=Al(s.content,l.content,t-1,r-1);if(d)return d}t-=c,r-=c}}class T{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,l=0;l<t;s++){let c=this.content[s],d=l+c.nodeSize;if(d>e&&r(c,i+l,o||null,s)!==!1&&c.content.size){let u=l+1;c.nodesBetween(Math.max(0,e-u),Math.min(c.content.size,t-u),r,i+u)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(l,c)=>{let d=l.isText?l.text.slice(Math.max(e,c)-c,t-c):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=d},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new T(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let l=this.content[o],c=s+l.nodeSize;c>e&&((s<e||c>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),r.push(l),i+=l.nodeSize),s=c}return new T(r,i)}cutByIndex(e,t){return e==t?T.empty:e==0&&t==this.content.length?this:new T(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new T(i,o)}addToStart(e){return new T([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new T(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return Nl(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Al(this,e,t,r)}findIndex(e){if(e==0)return In(0,e);if(e==this.size)return In(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?In(t+1,o):In(t,r);r=o}}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 T.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new T(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return T.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new T(t||e,r)}static from(e){if(!e)return T.empty;if(e instanceof T)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new T([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}T.empty=new T([],0);const ii={index:0,offset:0};function In(n,e){return ii.index=n,ii.offset=e,ii}function Yn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Yn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Yn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Y=class $i{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Yn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return $i.none;if(e instanceof $i)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};Y.none=[];class Qn extends Error{}class B{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=Ol(this.content,e+this.openStart,t);return r&&new B(r,this.openStart,this.openEnd)}removeBetween(e,t){return new B(Bl(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 B.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 B(T.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new B(e,r,i)}}B.empty=new B(T.empty,0,0);function Bl(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(i==e||o.isText){if(l!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(Bl(o.content,e-i-1,t-i-1)))}function Ol(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Ol(s.content,e-o-1,t,s);return l&&n.replaceChild(i,s.copy(l))}function _f(n,e,t){if(t.openStart>n.depth)throw new Qn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Qn("Inconsistent open depths");return Dl(n,e,t,0)}function Dl(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=Dl(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,l=s.content;return wt(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=eh(t,n);return wt(o,$l(n,s,l,e,r))}else return wt(o,Xn(n,e,r))}function Il(n,e){if(!e.type.compatibleContent(n.type))throw new Qn("Cannot join "+e.type.name+" onto "+n.type.name)}function Ri(n,e,t){let r=n.node(t);return Il(r,e.node(t)),r}function xt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function an(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(xt(n.nodeAfter,r),o++));for(let l=o;l<s;l++)xt(i.child(l),r);e&&e.depth==t&&e.textOffset&&xt(e.nodeBefore,r)}function wt(n,e){return n.type.checkContent(e),n.copy(e)}function $l(n,e,t,r,i){let o=n.depth>i&&Ri(n,e,i+1),s=r.depth>i&&Ri(t,r,i+1),l=[];return an(null,n,i,l),o&&s&&e.index(i)==t.index(i)?(Il(o,s),xt(wt(o,$l(n,e,t,r,i+1)),l)):(o&&xt(wt(o,Xn(n,e,i+1)),l),an(e,t,i,l),s&&xt(wt(s,Xn(t,r,i+1)),l)),an(r,null,i,l),new T(l)}function Xn(n,e,t){let r=[];if(an(null,n,t,r),n.depth>t){let i=Ri(n,e,t+1);xt(wt(i,Xn(n,e,t+1)),r)}return an(e,null,t,r),new T(r)}function eh(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(T.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class kn{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 o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Y.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Zn(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<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:l,offset:c}=s.content.findIndex(o),d=o-c;if(r.push(s,l,i+c),!d||(s=s.child(l),s.isText))break;o=d-1,i+=c+1}return new kn(t,r,o)}static resolveCached(e,t){let r=ns.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else ns.set(e,r=new th);let i=r.elts[r.i]=kn.resolve(e,t);return r.i=(r.i+1)%nh,i}}class th{constructor(){this.elts=[],this.i=0}}const nh=12,ns=new WeakMap;class Zn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const rh=Object.create(null);class Re{constructor(e,t,r,i=Y.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||T.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Yn(this.attrs,t||e.defaultAttrs||rh)&&Y.sameSet(this.marks,r||Y.none)}copy(e=null){return e==this.content?this:new Re(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Re(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return B.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),l=i.start(s),d=i.node(s).content.cut(i.pos-l,o.pos-l);return new B(d,i.depth-s,o.depth-s)}replace(e,t,r){return _f(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return kn.resolveCached(this,e)}resolveNoCache(e){return kn.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.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()+")"),Rl(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=T.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let c=i;c<o;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Y.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Y.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.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=T.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}Re.prototype.text=void 0;class _n extends Re{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):Rl(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 _n(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new _n(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 Rl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Tt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new ih(e,t);if(r.next==null)return Tt.empty;let i=Ll(r);r.next&&r.err("Unexpected trailing text");let o=uh(dh(i));return fh(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,l){let c=s.matchFragment(e,r);if(c&&(!t||c.validEnd))return T.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:u,next:f}=s.next[d];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,l.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!i.type||c.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=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<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
5
5
  `)}}Tt.empty=new Tt(!0);class ih{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 Ll(n){let e=[];do e.push(oh(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function oh(n){let e=[];do e.push(sh(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function sh(n){let e=ch(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=lh(n,e);else break;return e}function rs(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function lh(n,e){let t=rs(n),r=t;return n.eat(",")&&(n.next!="}"?r=rs(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function ah(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function ch(n){if(n.eat("(")){let e=Ll(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=ah(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 dh(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,l,c){let d={term:c,to:l};return e[s].push(d),d}function i(s,l){s.forEach(c=>c.to=l)}function o(s,l){if(s.type=="choice")return s.exprs.reduce((c,d)=>c.concat(o(d,l)),[]);if(s.type=="seq")for(let c=0;;c++){let d=o(s.exprs[c],l);if(c==s.exprs.length-1)return d;i(d,l=t())}else if(s.type=="star"){let c=t();return r(l,c),i(o(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=t();return i(o(s.expr,l),c),i(o(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(l)].concat(o(s.expr,l));if(s.type=="range"){let c=l;for(let d=0;d<s.min;d++){let u=t();i(o(s.expr,c),u),c=u}if(s.max==-1)i(o(s.expr,c),c);else for(let d=s.min;d<s.max;d++){let u=t();r(c,u),i(o(s.expr,c),u),c=u}return[r(c)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function zl(n,e){return e-n}function is(n,e){let t=[];return r(e),t.sort(zl);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:l,to:c}=o[s];!l&&t.indexOf(c)==-1&&r(c)}}}function uh(n){let e=Object.create(null);return t(is(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:l,to:c})=>{if(!l)return;let d;for(let u=0;u<i.length;u++)i[u][0]==l&&(d=i[u][1]);is(n,c).forEach(u=>{d||i.push([l,d=[]]),d.indexOf(u)==-1&&d.push(u)})})});let o=e[r.join(",")]=new Tt(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let l=i[s][1].sort(zl);o.next.push({type:i[s][0],next:e[l.join(",")]||t(l)})}return o}}function fh(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let l=0;l<i.next.length;l++){let{type:c,next:d}=i.next[l];s.push(c.name),o&&!(c.isText||c.hasRequiredAttrs())&&(o=!1),r.indexOf(d)==-1&&r.push(d)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Pl(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Vl(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function Fl(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in n){let o=n[i];o.validate&&o.validate(e[i])}}function Hl(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new ph(n,r,e[r]);return t}let ss=class jl{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Hl(e,r.attrs),this.defaultAttrs=Pl(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Tt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-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:Vl(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Re(this,this.computeAttrs(e),T.from(t),Y.setFrom(r))}createChecked(e=null,t,r){return t=T.from(t),this.checkContent(t),new Re(this,this.computeAttrs(e),t,Y.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=T.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(T.empty,!0);return o?new Re(this,e,t.append(o),Y.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Fl(this.attrs,e,"node")}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:Y.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new jl(o,t,s));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 o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function hh(n,e,t){let r=t.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class ph{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?hh(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Hr{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Hl(e,i.attrs),this.excluded=null;let o=Pl(this.attrs);this.instance=o?new Y(this,o):null}create(e=null){return!e&&this.instance?this.instance:new Y(this,Vl(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Hr(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Fl(this.attrs,e,"mark")}excludes(e){return this.excluded.indexOf(e)>-1}}class Ul{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=ue.from(e.nodes),t.marks=ue.from(e.marks||{}),this.nodes=ss.compile(this.spec.nodes,this),this.marks=Hr.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 o=this.nodes[i],s=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=Tt.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?ls(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:ls(this,s.split(" "))}this.nodeFromJSON=i=>Re.fromJSON(this,i),this.markFromJSON=i=>Y.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 ss){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 _n(r,r.defaultAttrs,e,Y.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 ls(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let l in n.marks){let c=n.marks[l];(i=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function mh(n){return n.tag!=null}function gh(n){return n.style!=null}class lt{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(mh(i))this.tags.push(i);else if(gh(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new cs(this,t,!1);return r.addAll(e,Y.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new cs(this,t,!0);return r.addAll(e,Y.none,t.from,t.to),B.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(bh(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(s.getAttrs){let c=s.getAttrs(t);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let l=t[s];if((l.priority==null?50:l.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=ds(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=ds(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new lt(e,lt.schemaRules(e)))}}const ql={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},yh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Wl={ol:!0,ul:!0},bn=1,Li=2,cn=4;function as(n,e,t){return e!=null?(e?bn:0)|(e==="full"?Li:0):n&&n.whitespace=="pre"?bn|Li:t&~cn}class $n{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=Y.none,this.match=o||(s&cn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(T.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&bn)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=T.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(T.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&&!ql.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class cs{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,o,s=as(null,t.preserveWhitespace,0)|(r?cn:0);i?o=new $n(i.type,i.attrs,Y.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new $n(null,null,Y.none,!0,null,s):o=new $n(e.schema.topNodeType,null,Y.none,!0,null,s),this.nodes=[o],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,o=i.options&Li?"full":this.localPreserveWS||(i.options&bn)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
6
6
  `);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let c=0;c<l.length;c++)c&&this.insertNode(s.linebreakReplacement.create(),t,!0),l[c]&&this.insertNode(s.text(l[c]),t,!/\S/.test(l[c]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=i.content[i.content.length-1],c=e.previousSibling;(!l||c&&c.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;Wl.hasOwnProperty(s)&&this.parser.normalizeLists&&kh(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(c?c.ignore:yh.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let d,u=this.needsBlock;if(ql.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),d=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let f=c&&c.skip?t:this.readStyles(e,t);f&&this.addAll(e,f),d&&this.sync(o),this.needsBlock=u}else{let d=this.readStyles(e,t);d&&this.addElementByRule(e,c,d,c.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
7
7
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let l=void 0;;){let c=this.parser.matchStyle(o,s,this,l);if(!c)break;if(c.ignore)return null;if(c.clearMark?t=t.filter(d=>!c.clearMark(d)):t=t.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)l=c;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let c=this.enter(s,t.attrs||null,r,t.preserveWhitespace);c&&(o=!0,r=c)}else{let c=this.parser.schema.marks[t.mark];r=r.concat(c.create(t.attrs))}let l=this.top;if(s&&s.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(c=>this.insertNode(c,r,!1));else{let c=e;typeof t.contentElement=="string"?c=e.querySelector(t.contentElement):typeof t.contentElement=="function"?c=t.contentElement(e):t.contentElement&&(c=t.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!1)}o&&this.sync(l)&&this.open--}addAll(e,t,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];s!=l;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t,r){let i,o;for(let s=this.open,l=0;s>=0;s--){let c=this.nodes[s],d=c.findWrapping(e);if(d&&(!i||i.length>d.length+l)&&(i=d,o=c,!d.length))break;if(c.solid){if(r)break;l+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)t=this.enterInner(i[s],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(t=this.enterInner(o,null,t))}let i=this.findPlace(e,t,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=Y.none;for(let l of i.concat(e.marks))(o.type?o.type.allowsMarkType(l.type):us(l.type,e.type))&&(s=l.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,t,r,i){let o=this.findPlace(e.create(t),r,!1);return o&&(o=this.enterInner(e,t,r,!0,i)),o}enterInner(e,t,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=as(e,o,s.options);s.options&cn&&s.content.length==0&&(l|=cn);let c=Y.none;return r=r.filter(d=>(s.type?s.type.allowsMarkType(d.type):us(d.type,e))?(c=d.addToSet(c),!1):!0),this.nodes.push(new $n(e,t,c,i,null,l)),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|=bn)}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<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-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),o=-(r?r.depth+1:0)+(i?0:1),s=(l,c)=>{for(;l>=0;l--){let d=t[l];if(d==""){if(l==t.length-1||l==0)continue;for(;c>=o;c--)if(s(l-1,c))return!0;return!1}else{let u=c>0||c==0&&i?this.nodes[c].type:r&&c>=o?r.node(c-o).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;c--}}return!0};return s(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 kh(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Wl.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function bh(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function ds(n){let e={};for(let t in n)e[t]=n[t];return e}function us(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=l=>{o.push(l);for(let c=0;c<l.edgeCount;c++){let{type:d,next:u}=l.edge(c);if(d==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class Ot{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=oi(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let l=0,c=0;for(;l<o.length&&c<s.marks.length;){let d=s.marks[c];if(!this.marks[d.type.name]){c++;continue}if(!d.eq(o[l][0])||d.type.spec.spanning===!1)break;l++,c++}for(;l<o.length;)i=o.pop()[1];for(;c<s.marks.length;){let d=s.marks[c++],u=this.serializeMark(d,s.isInline,t);u&&(o.push([d,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=qn(oi(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&qn(oi(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return qn(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ot(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=fs(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return fs(e.marks)}}function fs(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function oi(n){return n.document||window.document}const hs=new WeakMap;function vh(n){let e=hs.get(n);return e===void 0&&hs.set(n,e=xh(n)),e}function xh(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<r.length;i++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function qn(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=vh(r))&&o.indexOf(e)>-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 s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let l,c=t?n.createElementNS(t,i):n.createElement(i),d=e[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let h=f.indexOf(" ");h>0?c.setAttributeNS(f.slice(0,h),f.slice(h+1),d[f]):f=="style"&&c.style?c.style.cssText=d[f]:c.setAttribute(f,d[f])}}for(let f=u;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:p,contentDOM:m}=qn(n,h,t,r);if(c.appendChild(p),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:c,contentDOM:l}}const Kl=65535,Jl=Math.pow(2,16);function wh(n,e){return n+e*Jl}function ps(n){return n&Kl}function Ch(n){return(n-(n&Kl))/Jl}const Gl=1,Yl=2,Wn=4,Ql=8;class zi{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ql)>0}get deletedBefore(){return(this.delInfo&(Gl|Wn))>0}get deletedAfter(){return(this.delInfo&(Yl|Wn))>0}get deletedAcross(){return(this.delInfo&Wn)>0}}class Me{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Me.empty)return Me.empty}recover(e){let t=0,r=ps(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+Ch(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?i:0);if(c>e)break;let d=this.ranges[l+o],u=this.ranges[l+s],f=c+d;if(e<=f){let h=d?e==c?-1:e==f?1:t:t,p=c+i+(h<0?0:u);if(r)return p;let m=e==(t<0?c:f)?null:wh(l/3,e-c),g=e==c?Yl:e==f?Gl:Wn;return(t<0?e!=c:e!=f)&&(g|=Ql),new zi(p,g,m)}i+=u-d}return r?e+i:new zi(e+i,0,null)}touches(e,t){let r=0,i=ps(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let d=this.ranges[l+o],u=c+d;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+s]-d}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],l=s-(this.inverted?o:0),c=s+(this.inverted?0:o),d=this.ranges[i+t],u=this.ranges[i+r];e(l,l+d,c,c+u),o+=u-d}}invert(){return new Me(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Me.empty:new Me(e<0?[0,-e,0]:[0,0,e])}}Me.empty=new Me([]);class vn{constructor(e,t,r=0,i=e?e.length:0){this.mirror=t,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new vn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=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 vn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],l=s.mapResult(e,t);if(l.recover!=null){let c=this.getMirror(o);if(c!=null&&c>o&&c<this.to){o=c,e=this._maps[c].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new zi(e,i,null)}}const si=Object.create(null);class ye{getMap(){return Me.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=si[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in si)throw new RangeError("Duplicate use of step JSON ID "+e);return si[e]=t,t.prototype.jsonID=e,t}}class ne{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ne(e,null)}static fail(e){return new ne(null,e)}static fromReplace(e,t,r,i){try{return ne.ok(e.replace(t,r,i))}catch(o){if(o instanceof Qn)return ne.fail(o.message);throw o}}}function po(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(po(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return T.fromArray(r)}class it extends ye{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=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new B(po(t.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return ne.fromReplace(e,this.from,this.to,o)}invert(){return new $e(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 it(t.pos,r.pos,this.mark)}merge(e){return e instanceof it&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new it(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 it(t.from,t.to,e.markFromJSON(t.mark))}}ye.jsonID("addMark",it);class $e extends ye{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 B(po(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return ne.fromReplace(e,this.from,this.to,r)}invert(){return new it(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 $e(t.pos,r.pos,this.mark)}merge(e){return e instanceof $e&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new $e(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 $e(t.from,t.to,e.markFromJSON(t.mark))}}ye.jsonID("removeMark",$e);class ot extends ye{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ne.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ne.fromReplace(e,this.pos,this.pos+1,new B(T.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;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new ot(this.pos,t.marks[i]);return new ot(this.pos,this.mark)}}return new Et(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ot(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ot(t.pos,e.markFromJSON(t.mark))}}ye.jsonID("addNodeMark",ot);class Et extends ye{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ne.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return ne.fromReplace(e,this.pos,this.pos+1,new B(T.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ot(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Et(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Et(t.pos,e.markFromJSON(t.mark))}}ye.jsonID("removeNodeMark",Et);class le extends ye{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Pi(e,this.from,this.to)?ne.fail("Structure replace would overwrite content"):ne.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Me([this.from,this.to-this.from,this.slice.size])}invert(e){return new le(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new le(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof le)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?B.empty:new B(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new le(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?B.empty:new B(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new le(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};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")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new le(t.from,t.to,B.fromJSON(e,t.slice),!!t.structure)}}ye.jsonID("replace",le);class ce extends ye{constructor(e,t,r,i,o,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=l}apply(e){if(this.structure&&(Pi(e,this.from,this.gapFrom)||Pi(e,this.gapTo,this.to)))return ne.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ne.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?ne.fromReplace(e,this.from,this.to,r):ne.fail("Content does not fit in gap")}getMap(){return new Me([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ce(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new ce(t.pos,r.pos,i,o,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 ce(t.from,t.to,t.gapFrom,t.gapTo,B.fromJSON(e,t.slice),t.insert,!!t.structure)}}ye.jsonID("replaceAround",ce);function Pi(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function Sh(n,e,t,r){let i=[],o=[],s,l;n.doc.nodesBetween(e,t,(c,d,u)=>{if(!c.isInline)return;let f=c.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(d,e),p=Math.min(d+c.nodeSize,t),m=r.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(m)||(s&&s.to==h&&s.mark.eq(f[g])?s.to=p:i.push(s=new $e(h,p,f[g])));l&&l.to==h?l.to=p:o.push(l=new it(h,p,r))}}),i.forEach(c=>n.step(c)),o.forEach(c=>n.step(c))}function Mh(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;o++;let c=null;if(r instanceof Hr){let d=s.marks,u;for(;u=r.isInSet(d);)(c||(c=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let d=Math.min(l+s.nodeSize,t);for(let u=0;u<c.length;u++){let f=c[u],h;for(let p=0;p<i.length;p++){let m=i[p];m.step==o-1&&f.eq(i[p].style)&&(h=m)}h?(h.to=d,h.step=o):i.push({style:f,from:Math.max(l,e),to:d,step:o})}}}),i.forEach(s=>n.step(new $e(s.from,s.to,s.style)))}function mo(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],l=e+1;for(let c=0;c<o.childCount;c++){let d=o.child(c),u=l+d.nodeSize,f=r.matchType(d.type);if(!f)s.push(new le(l,u,B.empty));else{r=f;for(let h=0;h<d.marks.length;h++)t.allowsMarkType(d.marks[h].type)||n.step(new $e(l,u,d.marks[h]));if(i&&d.isText&&t.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(d.text);)m||(m=new B(T.from(t.schema.text(" ",t.allowedMarks(d.marks))),0,0)),s.push(new le(l+h.index,l+h.index+h[0].length,m))}}l=u}if(!r.validEnd){let c=r.fillBefore(T.empty,!0);n.replace(l,l,new B(c,0,0))}for(let c=s.length-1;c>=0;c--)n.step(s[c])}function Th(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function _t(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,o=0;;--r){let s=n.$from.node(r),l=n.$from.index(r)+i,c=n.$to.indexAfter(r)-o;if(r<n.depth&&s.canReplace(l,c,t))return r;if(r==0||s.type.spec.isolating||!Th(s,l,c))break;l&&(i=1),c<s.childCount&&(o=1)}return null}function Eh(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),l=i.after(o+1),c=s,d=l,u=T.empty,f=0;for(let m=o,g=!1;m>t;m--)g||r.index(m)>0?(g=!0,u=T.from(r.node(m).copy(u)),f++):c--;let h=T.empty,p=0;for(let m=o,g=!1;m>t;m--)g||i.after(m+1)<i.end(m)?(g=!0,h=T.from(i.node(m).copy(h)),p++):d++;n.step(new ce(c,d,s,l,new B(u.append(h),f,p),u.size-f,!0))}function go(n,e,t=null,r=n){let i=Nh(n,e),o=i&&Ah(r,e);return o?i.map(ms).concat({type:e,attrs:t}).concat(o.map(ms)):null}function ms(n){return{type:n,attrs:null}}function Nh(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function Ah(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let c=(s.length?s[s.length-1]:e).contentMatch;for(let d=r;c&&d<i;d++)c=c.matchType(t.child(d).type);return!c||!c.validEnd?null:s}function Bh(n,e,t){let r=T.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let l=t[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=T.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new ce(i,o,i,o,new B(r,0,0),t.length,!0))}function Oh(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,l)=>{let c=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,c)&&Dh(n.doc,n.mapping.slice(o).map(l),r)){let d=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?d=!1:!p&&m&&(d=!0)}d===!1&&Zl(n,s,l,o),mo(n,n.mapping.slice(o).map(l,1),r,void 0,d===null);let u=n.mapping.slice(o),f=u.map(l,1),h=u.map(l+s.nodeSize,1);return n.step(new ce(f,h,f+1,h-1,new B(T.from(r.create(c,null,s.marks)),0,0),1,!0)),d===!0&&Xl(n,s,l,o),!1}})}function Xl(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let c=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function Zl(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(`