1import{d as x,r as u,q as _,V as k,p as C,o as n,c as r,aU as m,X as E,v as B,e as f,x as v,b as L,F as D,C as P,z as V}from"./vendor-lxhXACKn.js";import{_ as F}from"./formkit.theme-DVbh0M_W.js";import"./globalBasic-DCViCoV8.js";const N={class:"min-h-64 !w-full max-h-[85vh] 2xl:max-h-[90vh]"},O=x({inheritAttrs:!1,__name:"Dialog",props:{open:{type:Boolean,default:!1},type:{default:"dialog"},closable:{type:Boolean,default:!0}},emits:["close"],setup(g,{emit:h}){const t=u(),o=g,w=e=>{e.target===t.value&&o.closable&&s()},i=e=>{o.closable?(e.preventDefault(),s()):e.preventDefault()},c=u(!1);let d=0;const p=()=>{var e;d=window.scrollY,(e=t.value)==null||e.showModal(),history.pushState({dialogOpen:!0},""),setTimeout(()=>{window.addEventListener("popstate",a)},300)},s=()=>{var e;window.removeEventListener("popstate",a),(e=t.value)==null||e.close(),window.scrollTo(0,d),y("close")},a=e=>{console.log("Pop Event"),e.state&&e.state.dialogOpen&&s()};_(()=>{var e;c.value=o.open,(e=t.value)==null||e.addEventListener("cancel",i),o.open&&p()}),k(()=>{var l;window.removeEventListener("popstate",a),(l=t.value)==null||l.removeEventListener("cancel",i);const e=document.body;e.style.overflow="auto"}),C(()=>o.open,e=>{c.value=e,e?setTimeout(()=>{p()},200):s()},{immediate:!1});const y=h,b=()=>{s()};return(e,l)=>(n(),r(D,{key:0},[m(e.$slots,"default",{},void 0,!0),o.open?(n(),r("dialog",E({key:0,ref_key:"dialog",ref:t},e.$attrs,{onClick:w,class:"max-h-[90vh] h-fit bg-surface-primary fixed bottom-0 right-0 mb-0 rounded-t-xl lg:mb-auto lg:rounded-xl lg lg:translate-y-1/2 max-w-full lg:max-w-[900px]"}),[o.closable?(n(),r("div",{key:0,onClick:b,class:"absolute w-6 h-6 text-sm cursor-pointer z-40 flex items-center justify-center bg-surface-primary right-4 top-4 roun
1ded-md border"},[B(f(V),{icon:f(P),class:"text-sm pl-0.3 font-light"},null,8,["icon"])])):v("",!0),L("div",N,[m(e.$slots,"content",{},void 0,!0)])],16)):v("",!0)],64))}}),z=F(O,[["__scopeId","data-v-c37648ed"]]);export{z as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.