orcaq 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BJCrbji-.js → 5oARMrld.js} +1 -1
- package/.output/public/_nuxt/{kvtnkChG.js → 9sDqz0uT.js} +1 -1
- package/.output/public/_nuxt/{Bmgr9uz4.js → B-4cXhNx.js} +1 -1
- package/.output/public/_nuxt/{DpT8FO1Q.js → BC6CdfCG.js} +1 -1
- package/.output/public/_nuxt/{Ca0KO9Xq.js → BCAMWuzu.js} +1 -1
- package/.output/public/_nuxt/{Bq47tjcm.js → BG-rJefG.js} +1 -1
- package/.output/public/_nuxt/{BpvGVfME.js → BKFPmrcv.js} +1 -1
- package/.output/public/_nuxt/{COHOh4Oe.js → BMLhg7hE.js} +1 -1
- package/.output/public/_nuxt/{atdCACH-.js → BYOPXIhP.js} +1 -1
- package/.output/public/_nuxt/{B46blMXm.js → BYxQJ0gE.js} +1 -1
- package/.output/public/_nuxt/{BrNfge84.js → BZ4ThSRp.js} +1 -1
- package/.output/public/_nuxt/{Dq1JM9WZ.js → BZmDBfmV.js} +1 -1
- package/.output/public/_nuxt/{DHAL8jJG.js → B_ERKujF.js} +4 -4
- package/.output/public/_nuxt/{CycELG5y.js → BccuQbKA.js} +1 -1
- package/.output/public/_nuxt/{B6MkNyZd.js → BcyZ-eCi.js} +1 -1
- package/.output/public/_nuxt/{63YtjFEq.js → BdZsZgcB.js} +1 -1
- package/.output/public/_nuxt/{S1qa1a4x.js → BigePTMZ.js} +1 -1
- package/.output/public/_nuxt/{BL__uYa3.js → BkN-uAef.js} +1 -1
- package/.output/public/_nuxt/{BWZ7atse.js → BmAp-sfn.js} +1 -1
- package/.output/public/_nuxt/{BogEzQi9.js → BqHKqsJ5.js} +3 -3
- package/.output/public/_nuxt/{DpEV6S2O.js → BseVuOZ1.js} +1 -1
- package/.output/public/_nuxt/{B2IKcIj2.js → BtuY54_l.js} +1 -1
- package/.output/public/_nuxt/{B8TrrBEb.js → Buh0pI3n.js} +1 -1
- package/.output/public/_nuxt/{CAnr3OhD.js → BzVvHKKC.js} +1 -1
- package/.output/public/_nuxt/{DuCDilAk.js → BzywwPw6.js} +1 -1
- package/.output/public/_nuxt/BzzgEvr9.js +7 -0
- package/.output/public/_nuxt/{AymhMj9v.js → C-I81xfB.js} +1 -1
- package/.output/public/_nuxt/{DAr5YiBT.js → C-Pa1rIR.js} +1 -1
- package/.output/public/_nuxt/{CMkzSwnO.js → C-pX1zRI.js} +1 -1
- package/.output/public/_nuxt/{ioXB9E2w.js → C0vscAQB.js} +1 -1
- package/.output/public/_nuxt/C4FrpL8k.js +1 -0
- package/.output/public/_nuxt/{Cq-MDPLE.js → C4zYnWdF.js} +1 -1
- package/.output/public/_nuxt/{C_7gtl40.js → C9kgALYc.js} +1 -1
- package/.output/public/_nuxt/{Oe2GG0Lt.js → CCmd8DpQ.js} +1 -1
- package/.output/public/_nuxt/{DsmBazLf.js → CGq9Twnj.js} +1 -1
- package/.output/public/_nuxt/{BEyCol50.js → CHMlsxJw.js} +1 -1
- package/.output/public/_nuxt/{Y1gXUmjt.js → CLQzuV82.js} +1 -1
- package/.output/public/_nuxt/{BJVPtt2X.js → CL_1HDtg.js} +1 -1
- package/.output/public/_nuxt/{DVnDb6ua.js → CRqiHVA4.js} +1 -1
- package/.output/public/_nuxt/{ByibjLZn.js → CS4EJV3B.js} +1 -1
- package/.output/public/_nuxt/{Bf6Q3Zl5.js → CSExCj8O.js} +1 -1
- package/.output/public/_nuxt/{MeLWmO7R.js → CY_CG0AU.js} +1 -1
- package/.output/public/_nuxt/{D-9vaM6z.js → CbHZwHBV.js} +1 -1
- package/.output/public/_nuxt/{MW5K_zef.js → Cbo6GmdE.js} +1 -1
- package/.output/public/_nuxt/{dWu56FdP.js → Cf460dGA.js} +1 -1
- package/.output/public/_nuxt/{DcCF9IZB.js → CfseWBL0.js} +1 -1
- package/.output/public/_nuxt/{qzrMNYut.js → Ch0I4juX.js} +1 -1
- package/.output/public/_nuxt/Chvs1m1n.js +1 -0
- package/.output/public/_nuxt/{CHEpbbGc.js → Chx1IK9D.js} +1 -1
- package/.output/public/_nuxt/{ByiJDSw8.js → CjpXgncp.js} +1 -1
- package/.output/public/_nuxt/{BpUSbMUb.js → CkjXKCQH.js} +1 -1
- package/.output/public/_nuxt/{C3ZBsVV_.js → Ckry8tuC.js} +2 -2
- package/.output/public/_nuxt/{CsRSZpa6.js → CmOZ0DCP.js} +1 -1
- package/.output/public/_nuxt/{Bq7OeLM1.js → CmjR7OTc.js} +1 -1
- package/.output/public/_nuxt/{CDJKw_ak.js → Co7e2XML.js} +1 -1
- package/.output/public/_nuxt/{BzvSm28k.js → CqkctA6I.js} +1 -1
- package/.output/public/_nuxt/{DEZMnZ2r.js → CtB2-SFY.js} +1 -1
- package/.output/public/_nuxt/{dNPwafbq.js → CtCx-4nJ.js} +1 -1
- package/.output/public/_nuxt/{xOD4Ev56.js → CtkhwZY7.js} +1 -1
- package/.output/public/_nuxt/Cty7uMrC.js +1 -0
- package/.output/public/_nuxt/{C2XHqDOf.js → CvFjsYJZ.js} +1 -1
- package/.output/public/_nuxt/{D4pAW_0T.js → Czr647QE.js} +1 -1
- package/.output/public/_nuxt/{BcsKoAPU.js → D0lW43G8.js} +28 -28
- package/.output/public/_nuxt/{DDebxXP-.js → D28ykMUi.js} +1 -1
- package/.output/public/_nuxt/{Ci5B19-c.js → DA4Xn6lm.js} +1 -1
- package/.output/public/_nuxt/{BWebIWit.js → DChDHsIe.js} +1 -1
- package/.output/public/_nuxt/{DSaBCmOg.js → DJBO_9pO.js} +1 -1
- package/.output/public/_nuxt/{DPIEiNwW.js → DJXB1Li8.js} +1 -1
- package/.output/public/_nuxt/{DJH-4SVI.js → DKLk0T0H.js} +1 -1
- package/.output/public/_nuxt/{C6dIAdHr.js → DLBsdU7G.js} +1 -1
- package/.output/public/_nuxt/{BtyzMl9p.js → DOAixkpJ.js} +1 -1
- package/.output/public/_nuxt/{BoMjapT5.js → DPq8O9CC.js} +1 -1
- package/.output/public/_nuxt/{Bmx1kTaZ.js → DQdA5Twt.js} +1 -1
- package/.output/public/_nuxt/{DGvAu532.js → DRh-06Hb.js} +1 -1
- package/.output/public/_nuxt/{JOg_XIAv.js → DTvJImVU.js} +1 -1
- package/.output/public/_nuxt/{C7BQpy74.js → DVkCRFXi.js} +1 -1
- package/.output/public/_nuxt/{BjqbQLK3.js → DX8ecA59.js} +1 -1
- package/.output/public/_nuxt/DakKehZj.js +1 -0
- package/.output/public/_nuxt/{BoIj4dtd.js → Db3rTgnd.js} +1 -1
- package/.output/public/_nuxt/{BRFPdiIh.js → DfyynWBR.js} +1 -1
- package/.output/public/_nuxt/{B5WGo5x7.js → DgJOougY.js} +1 -1
- package/.output/public/_nuxt/DkQCknMw.js +1 -0
- package/.output/public/_nuxt/{Sf02B6Pt.js → DpBeiFQV.js} +1 -1
- package/.output/public/_nuxt/{sk7V7xQl.js → DrdbRRXx.js} +1 -1
- package/.output/public/_nuxt/{CS9hqyP3.js → Dtl3qje7.js} +1 -1
- package/.output/public/_nuxt/{DNoTlUiY.js → Du5Ka6uI.js} +1 -1
- package/.output/public/_nuxt/{B73IHAoF.js → Dunt8-TF.js} +1 -1
- package/.output/public/_nuxt/{CrNLwdoE.js → DvWEWtFg.js} +1 -1
- package/.output/public/_nuxt/{DkD29_YA.js → KynNdNgX.js} +1 -1
- package/.output/public/_nuxt/{BqU89KuH.js → MWrJVKEf.js} +2 -2
- package/.output/public/_nuxt/{DMmjWR_K.js → NYpsF1lW.js} +1 -1
- package/.output/public/_nuxt/{L2I3LmpB.js → Nof0nVJ6.js} +1 -1
- package/.output/public/_nuxt/{BTYBVtfa.js → Ohrg3hU7.js} +1 -1
- package/.output/public/_nuxt/{CerLmMsC.js → Rrce0BXL.js} +3 -3
- package/.output/public/_nuxt/{xp7rFxcm.js → VNOocds9.js} +1 -1
- package/.output/public/_nuxt/Y-MEKhtd.js +1 -0
- package/.output/public/_nuxt/{CSQ0xnqv.js → YdOCcCRS.js} +1 -1
- package/.output/public/_nuxt/bYQCSC5-.js +1 -0
- package/.output/public/_nuxt/{vhkvHdfO.js → bkzIFcLw.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/ad11b978-8fdd-4bb2-9b38-1d6fe93f994e.json +1 -0
- package/.output/public/_nuxt/{FDw04QOj.js → eOeO5uM0.js} +1 -1
- package/.output/public/_nuxt/{BPACuoI0.js → g9ZMnTLJ.js} +1 -1
- package/.output/public/_nuxt/{Cnfx1zWl.js → hIbRoJ89.js} +1 -1
- package/.output/public/_nuxt/{8tyEaimf.js → j23gQsG7.js} +1 -1
- package/.output/public/_nuxt/klVlxnpt.js +1 -0
- package/.output/public/_nuxt/{DWqOZJe7.js → qRiDKEr7.js} +1 -1
- package/.output/public/_nuxt/{iNy-Nl0_.js → syq5mCJi.js} +1 -1
- package/.output/public/_nuxt/{COq7mAG7.js → v41yYOa9.js} +1 -1
- package/.output/public/_nuxt/{B9uki8o2.js → vaJvtND9.js} +1 -1
- package/.output/public/_nuxt/{wRAs0MDn.js → wodl4bLW.js} +1 -1
- package/.output/server/chunks/build/client.manifest.mjs +675 -675
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +635 -635
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/BS-LtKx4.js +0 -1
- package/.output/public/_nuxt/BTheloyh.js +0 -1
- package/.output/public/_nuxt/Bj7ctTfH.js +0 -1
- package/.output/public/_nuxt/BpLDGvqy.js +0 -1
- package/.output/public/_nuxt/CtWq1MER.js +0 -7
- package/.output/public/_nuxt/Cww9dXBK.js +0 -1
- package/.output/public/_nuxt/DfNTLojg.js +0 -1
- package/.output/public/_nuxt/M6bBaUHa.js +0 -1
- package/.output/public/_nuxt/_qKPTuua.js +0 -1
- package/.output/public/_nuxt/builds/meta/7c171291-8bbd-4c4c-8904-0afae065b82e.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as h,a3 as v,al as S,am as b,c as n,G as w,e as C,o as g,f as i,g as o,P as y}from"./
|
|
1
|
+
import{d as h,a3 as v,al as S,am as b,c as n,G as w,e as C,o as g,f as i,g as o,P as y}from"./D0lW43G8.js";import{b as E,a as I}from"./BVmBXPoG.js";import{u as O}from"./C0vscAQB.js";import{_ as x}from"./Dtl3qje7.js";import"./Cf460dGA.js";import"./CS5akSNT.js";const B={class:"h-full relative p-1"},L=h({__name:"TableOverview",props:{connectionId:{}},setup(m){const l=["name","schema","kind","owner","estimated_row","total_size","data_size","index_size","comment"],t=m,s=v(),d=S(),{schemaId:a}=b(d),u=n(()=>t.connectionId?s.connections.find(e=>e.id===t.connectionId):s.selectedConnection),c=n(()=>({...w(u.value),schema:a.value})),{data:r,status:p}=O("/api/tables/overview",{method:"POST",body:c,watch:[a,c]},"$x2_S2ch44V"),_=n(()=>{const e=r.value||[];return e.length>0?E(e):I(l)});return(e,M)=>{const f=y;return g(),C("div",B,[i(f,{visible:o(p)==="pending"},null,8,["visible"]),i(o(x),{columns:o(_),data:o(r)||[],class:"h-full border rounded-md",columnKeyBy:"field"},null,8,["columns","data"])])}}});export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as ie,aP as be,r as _,c as g,au as M,aQ as fe,e as c,f as d,m as s,w as m,F as N,s as O,g as a,l as L,i as D,z as b,J as ue,L as ge,bm as G,k as I,aq as xe,a0 as he,bn as ye,bo as _e,o as i,A as we,t as x,bp as ke,P as Ie,n as Se,bq as Re,br as Te,ap as me,a8 as Ce,a2 as Ve,a3 as Pe,am as Ke}from"./BcsKoAPU.js";import{_ as ze}from"./C_7gtl40.js";import{_ as Ee,u as Le}from"./xp7rFxcm.js";import{_ as Ne,a as Oe}from"./dNPwafbq.js";import{i as Ue}from"./dWu56FdP.js";import{g as Ae,a as Be}from"./DPIEiNwW.js";const je={class:"flex h-full flex-col gap-4 overflow-hidden p-4"},Me={class:"flex flex-wrap items-center gap-2"},De={class:"grid min-h-0 flex-1 gap-4 grid-cols-5"},Fe={class:"flex min-h-0 flex-col gap-4 col-span-2"},Je={class:"rounded-lg border bg-background p-4 space-y-4"},qe={class:"space-y-3"},He={class:"space-y-2"},We={class:"flex flex-wrap gap-2"},Qe={key:0,class:"space-y-2"},Ge={class:"space-y-2"},Xe={class:"min-w-0"},Ye={class:"truncate text-sm font-medium"},Ze={class:"text-xs text-muted-foreground"},et={class:"rounded-lg border bg-background p-4 space-y-4"},tt={class:"space-y-2"},st={class:"space-y-2"},at={class:"flex justify-end"},nt={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border bg-background col-span-3"},lt={class:"border-b px-4 py-3"},ot={class:"flex flex-wrap items-center gap-2"},it={class:"min-h-0 flex-1 overflow-auto p-4"},dt={key:1,class:"space-y-3"},rt={class:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground"},ut={class:"mt-2 overflow-auto rounded-md border bg-background p-3 text-xs"},ct=ie({__name:"RedisPubSubPanel",props:{connection:{},databaseIndex:{},databases:{}},emits:["update:databaseIndex"],setup(F,{emit:T}){const t=F,P=T,f=be(null),h=_([]),y=_(""),r=_(""),w=_(""),p=_(null),k=_(!1),U=_(!1),S=_(!1);let $=null;const J=g(()=>{var o;return((o=f.value)==null?void 0:o.subscription)??{sessionId:p.value,target:null,mode:null,targets:[]}}),K=g(()=>J.value.targets??[]),q=g(()=>{var o,n;return[{label:`${((o=f.value)==null?void 0:o.channels.length)??0} channels`},{label:`${((n=f.value)==null?void 0:n.patternCount)??0} patterns`},{label:K.value.length?`${K.value.length} active target${K.value.length===1?"":"s"}`:"Not subscribed"}]}),A=g(()=>h.value.slice().reverse()),X=o=>({method:o.method,stringConnection:o.connectionString,host:o.host,port:o.port,username:o.username,password:o.password,database:o.database,ssl:o.ssl,ssh:o.ssh}),H=async()=>{if(!t.connection){f.value=null;return}k.value=!0;try{f.value=await $fetch("/api/redis/pubsub/overview",{method:"POST",body:{...X(t.connection),databaseIndex:t.databaseIndex,sessionId:p.value}})}finally{k.value=!1}},de=async()=>{if(!p.value){h.value=[];return}const o=await $fetch("/api/redis/pubsub/messages",{method:"POST",body:{sessionId:p.value}});h.value=o.messages,f.value&&(f.value={...f.value,subscription:o.subscription})},B=async()=>{await Promise.all([H(),de()])},z=()=>{$&&(clearInterval($),$=null)},ae=()=>{z(),$=ke(()=>{B()},2e3)},re=async()=>{if(!(!t.connection||!y.value.trim())){U.value=!0;try{const o=await $fetch("/api/redis/pubsub/subscribe",{method:"POST",body:{...X(t.connection),databaseIndex:t.databaseIndex,target:y.value.trim(),sessionId:p.value}});p.value=o.subscription.sessionId,h.value=o.messages,y.value="";const n=o.subscription.targets.find(C=>C.mode==="channel");!r.value&&n&&(r.value=n.target),await H(),ae()}finally{U.value=!1}}},Y=async o=>{var V;if(!p.value)return;const n=p.value,C=await $fetch("/api/redis/pubsub/unsubscribe",{method:"POST",body:{sessionId:n,target:o??null}});if(!o||C.closed){p.value=null,h.value=[],z(),await H();return}await B(),(((V=f.value)==null?void 0:V.subscription.targets.length)??0)===0&&(p.value=null,h.value=[],z())},ne=async()=>{if(!(!t.connection||!r.value.trim())){S.value=!0;try{await $fetch("/api/redis/pubsub/publish",{method:"POST",body:{...X(t.connection),databaseIndex:t.databaseIndex,channel:r.value.trim(),payload:w.value}}),w.value="",await B()}finally{S.value=!1}}};return M(()=>{var o;return(o=f.value)==null?void 0:o.subscription.sessionId},o=>{p.value=o??null}),M(K,o=>{if(o.length===0){p.value&&z();return}if(!r.value){const n=o.find(C=>C.mode==="channel");n&&(r.value=n.target)}},{immediate:!0}),M(p,o=>{if(o){ae();return}z()}),M(()=>{var o;return[(o=t.connection)==null?void 0:o.id,t.databaseIndex]},async()=>{if(z(),p.value){await Y();return}h.value=[],await H()},{immediate:!0}),fe(()=>{z(),p.value&&$fetch("/api/redis/pubsub/unsubscribe",{method:"POST",body:{sessionId:p.value,target:null}}).catch(()=>{})}),(o,n)=>{const C=we,V=he,le=ze,Z=ye,j=_e,ee=xe;return i(),c("div",je,[d(le,{icon:"hugeicons:radio",title:"Pub/Sub",description:"Subscribe to a channel or pattern, publish test events, and watch live messages without leaving the detail flow."},{context:m(()=>n[5]||(n[5]=[])),actions:m(()=>[d(Ee,{compact:"","trigger-id":"redis-pubsub-db-index","trigger-class":"bg-background",databases:o.databases,"database-index":o.databaseIndex,"onUpdate:databaseIndex":n[0]||(n[0]=v=>P("update:databaseIndex",v))},null,8,["databases","database-index"]),d(V,{variant:"outline",size:"xxs",disabled:a(k),onClick:B},{default:m(()=>[d(C,{name:"hugeicons:redo",class:"size-3.5! min-w-3.5"}),n[6]||(n[6]=b(" Refresh "))]),_:1},8,["disabled"])]),_:1}),s("div",Me,[(i(!0),c(N,null,O(a(q),v=>(i(),I(a(G),{key:v.label,variant:"outline",class:"h-6 px-2 text-[11px] font-normal"},{default:m(()=>[b(x(v.label),1)]),_:2},1024))),128))]),s("div",De,[s("div",Fe,[s("div",Je,[s("div",qe,[n[12]||(n[12]=s("div",null,[s("div",null,[s("div",{class:"text-sm font-medium"},"Subscription"),s("p",{class:"text-xs text-muted-foreground"}," Add channels or wildcard patterns to the same live session. Pattern detection is automatic. ")])],-1)),s("div",He,[d(Z,{for:"redis-pubsub-target"},{default:m(()=>n[7]||(n[7]=[b("Target")])),_:1}),d(j,{size:"sm",id:"redis-pubsub-target",modelValue:a(y),"onUpdate:modelValue":n[1]||(n[1]=v=>D(y)?y.value=v:null),placeholder:"orders.events or orders.*"},null,8,["modelValue"]),n[8]||(n[8]=s("p",{class:"text-xs text-muted-foreground"},[b(" Use a plain channel name or include wildcard characters like "),s("span",{class:"font-mono"},"*"),b(" and "),s("span",{class:"font-mono"},"?"),b(" for patterns. ")],-1))]),s("div",We,[d(V,{size:"xs",disabled:a(U),onClick:re},{default:m(()=>n[9]||(n[9]=[b(" Add target ")])),_:1},8,["disabled"]),d(V,{size:"xs",variant:"outline",disabled:!a(p),onClick:n[2]||(n[2]=v=>Y(void 0))},{default:m(()=>n[10]||(n[10]=[b(" Clear all ")])),_:1},8,["disabled"])]),a(K).length?(i(),c("div",Qe,[n[11]||(n[11]=s("div",{class:"text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground"}," Active targets ",-1)),s("div",Ge,[(i(!0),c(N,null,O(a(K),v=>(i(),c("div",{key:v.target,class:"flex items-center justify-between gap-3 rounded-lg border bg-muted/10 px-3 py-2"},[s("div",Xe,[s("div",Ye,x(v.target),1),s("div",Ze,x(v.mode==="pattern"?"Pattern detected automatically":"Channel detected automatically"),1)]),d(V,{size:"iconSm",variant:"ghost","aria-label":`Remove ${v.target}`,onClick:e=>Y(v.target)},{default:m(()=>[d(C,{name:"hugeicons:cancel-01",class:"size-4! min-w-4"})]),_:2},1032,["aria-label","onClick"])]))),128))])])):L("",!0)])]),s("div",et,[n[16]||(n[16]=s("div",null,[s("div",{class:"text-sm font-medium"},"Publish"),s("p",{class:"text-xs text-muted-foreground"}," Send a quick payload to a channel and inspect the response stream on the right. ")],-1)),s("div",tt,[d(Z,{for:"redis-pubsub-channel"},{default:m(()=>n[13]||(n[13]=[b("Channel")])),_:1}),d(j,{size:"sm",id:"redis-pubsub-channel",modelValue:a(r),"onUpdate:modelValue":n[3]||(n[3]=v=>D(r)?r.value=v:null),placeholder:"orders.events"},null,8,["modelValue"])]),s("div",st,[d(Z,{for:"redis-pubsub-payload"},{default:m(()=>n[14]||(n[14]=[b("Payload")])),_:1}),ue(s("textarea",{id:"redis-pubsub-payload","onUpdate:modelValue":n[4]||(n[4]=v=>D(w)?w.value=v:null),class:"min-h-[140px] w-full rounded-lg border bg-background px-3 py-2 text-sm font-mono",placeholder:'{"event":"order.created"}'},null,512),[[ge,a(w)]])]),s("div",at,[d(V,{size:"sm",disabled:a(S),onClick:ne},{default:m(()=>n[15]||(n[15]=[b(" Publish ")])),_:1},8,["disabled"])])])]),s("div",nt,[s("div",lt,[s("div",ot,[n[18]||(n[18]=s("div",{class:"text-sm font-medium"},"Live Messages",-1)),d(a(G),{variant:"outline",class:"h-5 px-1.5 text-xxs font-normal"},{default:m(()=>[b(x(a(A).length)+" messages ",1)]),_:1}),d(a(G),{variant:"outline",class:"h-5 px-1.5 text-xxs font-normal"},{default:m(()=>n[17]||(n[17]=[b(" Polling 2s ")])),_:1})]),n[19]||(n[19]=s("div",{class:"mt-1 text-xs text-muted-foreground"}," Message polling stays active while the current subscription session is connected. ",-1))]),s("div",it,[a(A).length===0?(i(),I(ee,{key:0,title:"No Pub/Sub messages yet",desc:"Subscribe to a channel or pattern, then publish an event to watch it appear here."})):(i(),c("div",dt,[(i(!0),c(N,null,O(a(A),v=>(i(),c("div",{key:v.id,class:"rounded-lg border bg-muted/10 p-3"},[s("div",rt,[d(a(G),{variant:"outline",class:"h-5 px-1.5 text-xxs font-normal text-foreground"},{default:m(()=>[b(x(v.channel),1)]),_:2},1024),v.pattern?(i(),I(a(G),{key:0,variant:"outline",class:"h-5 px-1.5 text-xxs font-normal"},{default:m(()=>[b(" Pattern "+x(v.pattern),1)]),_:2},1024)):L("",!0),s("span",null,x(new Date(v.receivedAt).toLocaleTimeString()),1)]),s("pre",ut,[s("code",null,x(v.payload),1)])]))),128))]))])])])])}}}),pt={class:"h-full flex flex-col gap-3 p-4 overflow-auto"},vt={key:0,class:"relative min-h-[240px] overflow-hidden rounded-lg border bg-background"},mt={key:3,class:"space-y-4"},bt={class:"flex flex-col gap-1"},ft={class:"flex items-start gap-2"},gt={class:"text-sm font-semibold break-all"},xt={class:"text-xs text-muted-foreground"},ht={class:"flex flex-wrap items-center gap-2"},yt={class:"ml-auto flex items-center gap-2"},_t=["value"],wt={class:"grid gap-3 md:grid-cols-[220px_1fr] items-start"},kt={class:"space-y-1"},$t={class:"flex items-center gap-2"},It={class:"text-xs text-muted-foreground"},St={key:0,class:"text-xs text-destructive"},Rt={key:1,class:"space-y-3"},Tt=["readonly"],Ct={key:2,class:"min-h-[360px] overflow-hidden rounded-lg border"},Vt={key:3,class:"space-y-3"},Pt={class:"flex justify-end"},Kt={class:"overflow-hidden rounded-lg border"},zt={class:"w-full text-sm"},Et={class:"bg-muted/30 text-left"},Lt={key:1},Nt={class:"px-3 py-2 text-right"},Ot={key:0},Ut=["colspan"],At={key:4,class:"min-h-[320px] overflow-auto rounded-lg border bg-muted/20 p-3 text-xs"},Bt={class:"flex justify-end"},jt=ie({__name:"RedisValueEditor",props:{detail:{},loading:{type:Boolean},saving:{type:Boolean},canEdit:{type:Boolean},unavailableReason:{}},emits:["save","refresh"],setup(F,{emit:T}){const t=F,P=T,f=_(""),h=be(null),y=_("tree"),r=_([]),w=_(""),p=_(!1),k=_(5),U=[5,10,30],S=e=>e==null?e:JSON.parse(JSON.stringify(e)),$=(e,l)=>JSON.stringify(e)===JSON.stringify(l);M(()=>t.detail,e=>{f.value=(e==null?void 0:e.previewKind)==="text"?String(e.value??""):"",h.value=(e==null?void 0:e.previewKind)==="json"?S(e.value):null,r.value=e!=null&&e.tableRows?S(e.tableRows):[],w.value=(e==null?void 0:e.ttl)!==void 0&&e.ttl>=0?`${e.ttl}`:""},{immediate:!0});const J=g(()=>t.detail?typeof t.detail.value=="string"?t.detail.value:JSON.stringify(t.detail.value,null,2):""),K=g(()=>{var e;return t.unavailableReason?t.unavailableReason:((e=t.detail)==null?void 0:e.previewKind)==="readonly"?"Value editing is unavailable for this Redis type. TTL changes can still be saved.":""}),q=g(()=>{const e=w.value.trim();if(!e)return"";const l=Number.parseInt(e,10);return!Number.isFinite(l)||l<0?"TTL must be empty or a non-negative integer.":""}),A=g(()=>{if(!t.detail)return;const e=w.value.trim(),l=t.detail.ttl>=0?`${t.detail.ttl}`:"";if(e===l)return;if(!e)return null;const R=Number.parseInt(e,10);return Number.isFinite(R)&&R>=0?R:void 0}),X=g(()=>t.detail?[{label:`DB ${t.detail.databaseIndex}`},{label:t.detail.type},{label:`TTL ${t.detail.ttlLabel}`},{label:`Size ${t.detail.memoryUsageHuman??"n/a"}`},{label:t.detail.length!==null&&t.detail.length!==void 0?`Length ${t.detail.length}`:"Length n/a"},{label:`Encoding ${t.detail.encoding??"n/a"}`}]:[]),H=g(()=>!t.detail||t.detail.type==="none"?"hugeicons:database-02":Ae(t.detail.type)),de=g(()=>!t.detail||t.detail.type==="none"?"text-primary":Be(t.detail.type)),B=g(()=>!t.detail||!t.canEdit||q.value||t.saving?!1:A.value!==void 0),z=g(()=>"Update TTL"),ae=g(()=>{var e;return t.canEdit&&((e=t.detail)==null?void 0:e.previewKind)==="table"}),re=g(()=>{if(!t.detail)return!1;switch(t.detail.previewKind){case"text":return f.value!==String(t.detail.value??"");case"json":return!$(h.value,t.detail.value);case"table":return!$(r.value,t.detail.tableRows??[]);default:return!1}}),Y=g(()=>re.value||A.value!==void 0),ne=g(()=>!t.detail||!t.canEdit||q.value?!1:Y.value),o=(e,l,R)=>{var E,oe;const te=r.value.find(se=>se.id===e);if(!te)return;const W=(oe=(E=t.detail)==null?void 0:E.tableColumns)==null?void 0:oe.find(se=>se.key===l);te[l]=(W==null?void 0:W.type)==="number"?Number(R||0):R},n=()=>{var e;((e=t.detail)==null?void 0:e.tableKind)==="list"&&(r.value=r.value.map((l,R)=>({...l,index:R})))},C=()=>{var l;if(!((l=t.detail)!=null&&l.tableKind))return;const e=`row-${Date.now()}-${r.value.length}`;switch(t.detail.tableKind){case"hash":r.value.push({id:e,field:"",value:""});break;case"list":r.value.push({id:e,index:r.value.length,value:""});break;case"set":r.value.push({id:e,value:""});break;case"zset":r.value.push({id:e,value:"",score:0});break}},V=e=>{r.value=r.value.filter(l=>l.id!==e),n()},le=()=>{if(!t.detail||!ne.value)return;const e={previewKind:t.detail.previewKind,stringFormat:t.detail.stringFormat,tableKind:t.detail.tableKind,ttlSeconds:A.value,value:t.detail.value};t.detail.previewKind==="text"&&(e.value=f.value),t.detail.previewKind==="json"&&(e.value=h.value),t.detail.previewKind==="table"&&(e.value=S(r.value)),P("save",e)},Z=()=>{B.value&&le()};let j=null;const ee=()=>{j!==null&&(clearInterval(j),j=null)};return M([p,k,()=>{var e;return(e=t.detail)==null?void 0:e.key}],()=>{ee(),!(!p.value||!t.detail)&&(j=ke(()=>{!t.detail||t.loading||t.saving||P("refresh")},k.value*1e3))},{immediate:!0}),M(()=>t.detail,e=>{e||ee()}),fe(()=>{ee()}),(e,l)=>{var pe,ve;const R=xe,te=we,W=ye,E=he,oe=Oe,se=Ne,ce=_e;return i(),c("div",pt,[e.loading&&!e.detail?(i(),c("div",vt,[l[7]||(l[7]=s("div",{class:"flex h-full min-h-[240px] items-center justify-center px-4 text-sm text-muted-foreground"}," Loading Redis key detail... ",-1)),d(a(Ie),{visible:!0})])):!e.detail&&!e.loading?(i(),I(R,{key:1,title:"Select a Redis key",desc:"Choose a key from the Redis browser to inspect its value and metadata."})):((pe=e.detail)==null?void 0:pe.type)==="none"?(i(),I(R,{key:2,icon:"icons:404",title:"Key not found",desc:"This key no longer exists. It may have expired or been deleted."})):e.detail?(i(),c("div",mt,[s("div",bt,[s("div",ft,[d(te,{name:a(H),class:Se(["mt-0.5 size-4 min-w-4",a(de)])},null,8,["name","class"]),s("div",gt,x(e.detail.key),1)]),s("div",xt,x(e.detail.type)+" key preview ",1)]),s("div",ht,[(i(!0),c(N,null,O(a(X),u=>(i(),I(a(G),{key:u.label,variant:"outline",class:"h-6 px-2 text-[11px] font-normal"},{default:m(()=>[b(x(u.label),1)]),_:2},1024))),128)),s("div",yt,[d(a(Re),{id:"redis-auto-refresh",checked:a(p),"onUpdate:checked":l[0]||(l[0]=u=>D(p)?p.value=u:null)},null,8,["checked"]),d(W,{for:"redis-auto-refresh",class:"text-xs font-medium"},{default:m(()=>l[8]||(l[8]=[b(" Auto refresh ")])),_:1}),d(E,{variant:"ghost",size:"sm",class:"h-7 px-2 text-xs","aria-label":"Refresh key detail",disabled:e.loading||e.saving,onClick:l[1]||(l[1]=u=>P("refresh"))},{default:m(()=>[d(te,{name:"hugeicons:redo",class:"size-3.5! min-w-3.5"}),l[9]||(l[9]=b(" Refresh "))]),_:1},8,["disabled"]),a(p)?ue((i(),c("select",{key:0,"onUpdate:modelValue":l[2]||(l[2]=u=>D(k)?k.value=u:null),class:"h-7 rounded-md border bg-background px-2 text-xs","aria-label":"Auto refresh interval"},[(i(),c(N,null,O(U,u=>s("option",{key:u,value:u},x(u)+"s ",9,_t)),64))],512)),[[Te,a(k)]]):L("",!0)])]),a(K)?(i(),I(se,{key:0,class:"border-border bg-muted/20"},{default:m(()=>[d(oe,{class:"text-muted-foreground"},{default:m(()=>[b(x(a(K)),1)]),_:1})]),_:1})):L("",!0),s("div",wt,[s("div",kt,[d(W,{for:"redis-ttl-input"},{default:m(()=>l[10]||(l[10]=[b("TTL (seconds)")])),_:1}),s("div",$t,[d(ce,{id:"redis-ttl-input",size:"sm","model-value":a(w),disabled:!e.canEdit,placeholder:"Leave empty to persist","onUpdate:modelValue":l[3]||(l[3]=u=>w.value=String(u||""))},null,8,["model-value","disabled"]),d(E,{variant:"outline",size:"xs",disabled:!a(B),onClick:Z},{default:m(()=>[b(x(a(z)),1)]),_:1},8,["disabled"])]),s("p",It," Current: "+x(e.detail.ttlLabel),1),a(q)?(i(),c("p",St,x(a(q)),1)):L("",!0)])]),e.detail.previewKind==="text"?(i(),c("div",Rt,[ue(s("textarea",{"onUpdate:modelValue":l[4]||(l[4]=u=>D(f)?f.value=u:null),readonly:!e.canEdit,class:"min-h-[320px] w-full rounded-lg border bg-background px-3 py-2 text-sm font-mono"},null,8,Tt),[[ge,a(f)]])])):e.detail.previewKind==="json"?(i(),c("div",Ct,[d(a(Ue),{modelValue:a(h),"onUpdate:modelValue":l[5]||(l[5]=u=>D(h)?h.value=u:null),class:"h-[360px]",mode:a(y),navigationBar:!1,readOnly:!e.canEdit,onModeChange:l[6]||(l[6]=u=>y.value=u)},null,8,["modelValue","mode","readOnly"])])):e.detail.previewKind==="table"?(i(),c("div",Vt,[s("div",Pt,[a(ae)?(i(),I(E,{key:0,variant:"outline",size:"sm",onClick:C},{default:m(()=>l[11]||(l[11]=[b(" Add Row ")])),_:1})):L("",!0)]),s("div",Kt,[s("table",zt,[s("thead",Et,[s("tr",null,[(i(!0),c(N,null,O(e.detail.tableColumns,u=>(i(),c("th",{key:u.key,class:"px-3 py-2 font-medium"},x(u.label),1))),128)),l[12]||(l[12]=s("th",{class:"w-16 px-3 py-2 font-medium"},null,-1))])]),s("tbody",null,[(i(!0),c(N,null,O(a(r),u=>(i(),c("tr",{key:u.id,class:"border-t align-top"},[(i(!0),c(N,null,O(e.detail.tableColumns,Q=>(i(),c("td",{key:Q.key,class:"px-3 py-2"},[Q.editable?(i(),I(ce,{key:0,size:"sm","model-value":`${u[Q.key]??""}`,disabled:!e.canEdit,"onUpdate:modelValue":$e=>o(u.id,Q.key,String($e||""))},null,8,["model-value","disabled","onUpdate:modelValue"])):(i(),c("span",Lt,x(u[Q.key]),1))]))),128)),s("td",Nt,[d(E,{variant:"ghost",size:"sm",disabled:!e.canEdit,onClick:Q=>V(u.id)},{default:m(()=>l[13]||(l[13]=[b(" Remove ")])),_:2},1032,["disabled","onClick"])])]))),128)),a(r).length===0?(i(),c("tr",Ot,[s("td",{colspan:(((ve=e.detail.tableColumns)==null?void 0:ve.length)||0)+1,class:"px-3 py-6 text-center text-sm text-muted-foreground"}," No rows available. ",8,Ut)])):L("",!0)])])])])):(i(),c("pre",At,[s("code",null,x(a(J)),1)])),s("div",Bt,[d(E,{size:"sm",disabled:e.saving||!a(ne),onClick:le},{default:m(()=>l[14]||(l[14]=[b(" Save Changes ")])),_:1},8,["disabled"])])])):L("",!0)])}}}),Mt=ie({__name:"RedisWorkspace",props:{connection:{},tabInfo:{}},setup(F){const T=F,t=Le({connection:()=>T.connection,tabInfo:()=>T.tabInfo}),{canEditSelectedValue:P,databases:f,editUnavailableReason:h,loadingKeys:y,loadingSelectedKeyDetail:r,savingValue:w,selectedDatabaseIndex:p,selectedKeyDetail:k}=t,U=g(()=>{var S;return((S=T.tabInfo)==null?void 0:S.type)||me.RedisBrowser});return(S,$)=>a(U)===a(me).RedisPubSub?(i(),I(ct,{key:0,connection:T.connection,"database-index":a(p),databases:a(f),"onUpdate:databaseIndex":$[0]||($[0]=J=>a(t).selectedDatabaseIndex.value=J)},null,8,["connection","database-index","databases"])):(i(),I(jt,{key:1,detail:a(k),loading:a(y)||a(r),saving:a(w),"can-edit":a(P),"unavailable-reason":a(h),onSave:a(t).saveSelectedValue,onRefresh:$[1]||($[1]=J=>a(k)&&a(t).focusKey(a(k).key))},null,8,["detail","loading","saving","can-edit","unavailable-reason","onSave"]))}}),Qt=ie({__name:"[tabViewId]",setup(F){const T=Ce(),t=Ve(),P=Pe(),{tabViews:f}=Ke(t),h=g(()=>f.value.find(y=>y.id===T.params.tabViewId));return(y,r)=>(i(),I(Mt,{connection:a(P).selectedConnection,"tab-info":a(h)},null,8,["connection","tab-info"]))}});export{Qt as default};
|
|
1
|
+
import{d as ie,aP as be,r as _,c as g,au as M,aQ as fe,e as c,f as d,m as s,w as m,F as N,s as O,g as a,l as L,i as D,z as b,J as ue,L as ge,bm as G,k as I,aq as xe,a0 as he,bn as ye,bo as _e,o as i,A as we,t as x,bp as ke,P as Ie,n as Se,bq as Re,br as Te,ap as me,a8 as Ce,a2 as Ve,a3 as Pe,am as Ke}from"./D0lW43G8.js";import{_ as ze}from"./C9kgALYc.js";import{_ as Ee,u as Le}from"./VNOocds9.js";import{_ as Ne,a as Oe}from"./CtCx-4nJ.js";import{i as Ue}from"./Cf460dGA.js";import{g as Ae,a as Be}from"./DJXB1Li8.js";const je={class:"flex h-full flex-col gap-4 overflow-hidden p-4"},Me={class:"flex flex-wrap items-center gap-2"},De={class:"grid min-h-0 flex-1 gap-4 grid-cols-5"},Fe={class:"flex min-h-0 flex-col gap-4 col-span-2"},Je={class:"rounded-lg border bg-background p-4 space-y-4"},qe={class:"space-y-3"},He={class:"space-y-2"},We={class:"flex flex-wrap gap-2"},Qe={key:0,class:"space-y-2"},Ge={class:"space-y-2"},Xe={class:"min-w-0"},Ye={class:"truncate text-sm font-medium"},Ze={class:"text-xs text-muted-foreground"},et={class:"rounded-lg border bg-background p-4 space-y-4"},tt={class:"space-y-2"},st={class:"space-y-2"},at={class:"flex justify-end"},nt={class:"flex min-h-0 flex-col overflow-hidden rounded-lg border bg-background col-span-3"},lt={class:"border-b px-4 py-3"},ot={class:"flex flex-wrap items-center gap-2"},it={class:"min-h-0 flex-1 overflow-auto p-4"},dt={key:1,class:"space-y-3"},rt={class:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground"},ut={class:"mt-2 overflow-auto rounded-md border bg-background p-3 text-xs"},ct=ie({__name:"RedisPubSubPanel",props:{connection:{},databaseIndex:{},databases:{}},emits:["update:databaseIndex"],setup(F,{emit:T}){const t=F,P=T,f=be(null),h=_([]),y=_(""),r=_(""),w=_(""),p=_(null),k=_(!1),U=_(!1),S=_(!1);let $=null;const J=g(()=>{var o;return((o=f.value)==null?void 0:o.subscription)??{sessionId:p.value,target:null,mode:null,targets:[]}}),K=g(()=>J.value.targets??[]),q=g(()=>{var o,n;return[{label:`${((o=f.value)==null?void 0:o.channels.length)??0} channels`},{label:`${((n=f.value)==null?void 0:n.patternCount)??0} patterns`},{label:K.value.length?`${K.value.length} active target${K.value.length===1?"":"s"}`:"Not subscribed"}]}),A=g(()=>h.value.slice().reverse()),X=o=>({method:o.method,stringConnection:o.connectionString,host:o.host,port:o.port,username:o.username,password:o.password,database:o.database,ssl:o.ssl,ssh:o.ssh}),H=async()=>{if(!t.connection){f.value=null;return}k.value=!0;try{f.value=await $fetch("/api/redis/pubsub/overview",{method:"POST",body:{...X(t.connection),databaseIndex:t.databaseIndex,sessionId:p.value}})}finally{k.value=!1}},de=async()=>{if(!p.value){h.value=[];return}const o=await $fetch("/api/redis/pubsub/messages",{method:"POST",body:{sessionId:p.value}});h.value=o.messages,f.value&&(f.value={...f.value,subscription:o.subscription})},B=async()=>{await Promise.all([H(),de()])},z=()=>{$&&(clearInterval($),$=null)},ae=()=>{z(),$=ke(()=>{B()},2e3)},re=async()=>{if(!(!t.connection||!y.value.trim())){U.value=!0;try{const o=await $fetch("/api/redis/pubsub/subscribe",{method:"POST",body:{...X(t.connection),databaseIndex:t.databaseIndex,target:y.value.trim(),sessionId:p.value}});p.value=o.subscription.sessionId,h.value=o.messages,y.value="";const n=o.subscription.targets.find(C=>C.mode==="channel");!r.value&&n&&(r.value=n.target),await H(),ae()}finally{U.value=!1}}},Y=async o=>{var V;if(!p.value)return;const n=p.value,C=await $fetch("/api/redis/pubsub/unsubscribe",{method:"POST",body:{sessionId:n,target:o??null}});if(!o||C.closed){p.value=null,h.value=[],z(),await H();return}await B(),(((V=f.value)==null?void 0:V.subscription.targets.length)??0)===0&&(p.value=null,h.value=[],z())},ne=async()=>{if(!(!t.connection||!r.value.trim())){S.value=!0;try{await $fetch("/api/redis/pubsub/publish",{method:"POST",body:{...X(t.connection),databaseIndex:t.databaseIndex,channel:r.value.trim(),payload:w.value}}),w.value="",await B()}finally{S.value=!1}}};return M(()=>{var o;return(o=f.value)==null?void 0:o.subscription.sessionId},o=>{p.value=o??null}),M(K,o=>{if(o.length===0){p.value&&z();return}if(!r.value){const n=o.find(C=>C.mode==="channel");n&&(r.value=n.target)}},{immediate:!0}),M(p,o=>{if(o){ae();return}z()}),M(()=>{var o;return[(o=t.connection)==null?void 0:o.id,t.databaseIndex]},async()=>{if(z(),p.value){await Y();return}h.value=[],await H()},{immediate:!0}),fe(()=>{z(),p.value&&$fetch("/api/redis/pubsub/unsubscribe",{method:"POST",body:{sessionId:p.value,target:null}}).catch(()=>{})}),(o,n)=>{const C=we,V=he,le=ze,Z=ye,j=_e,ee=xe;return i(),c("div",je,[d(le,{icon:"hugeicons:radio",title:"Pub/Sub",description:"Subscribe to a channel or pattern, publish test events, and watch live messages without leaving the detail flow."},{context:m(()=>n[5]||(n[5]=[])),actions:m(()=>[d(Ee,{compact:"","trigger-id":"redis-pubsub-db-index","trigger-class":"bg-background",databases:o.databases,"database-index":o.databaseIndex,"onUpdate:databaseIndex":n[0]||(n[0]=v=>P("update:databaseIndex",v))},null,8,["databases","database-index"]),d(V,{variant:"outline",size:"xxs",disabled:a(k),onClick:B},{default:m(()=>[d(C,{name:"hugeicons:redo",class:"size-3.5! min-w-3.5"}),n[6]||(n[6]=b(" Refresh "))]),_:1},8,["disabled"])]),_:1}),s("div",Me,[(i(!0),c(N,null,O(a(q),v=>(i(),I(a(G),{key:v.label,variant:"outline",class:"h-6 px-2 text-[11px] font-normal"},{default:m(()=>[b(x(v.label),1)]),_:2},1024))),128))]),s("div",De,[s("div",Fe,[s("div",Je,[s("div",qe,[n[12]||(n[12]=s("div",null,[s("div",null,[s("div",{class:"text-sm font-medium"},"Subscription"),s("p",{class:"text-xs text-muted-foreground"}," Add channels or wildcard patterns to the same live session. Pattern detection is automatic. ")])],-1)),s("div",He,[d(Z,{for:"redis-pubsub-target"},{default:m(()=>n[7]||(n[7]=[b("Target")])),_:1}),d(j,{size:"sm",id:"redis-pubsub-target",modelValue:a(y),"onUpdate:modelValue":n[1]||(n[1]=v=>D(y)?y.value=v:null),placeholder:"orders.events or orders.*"},null,8,["modelValue"]),n[8]||(n[8]=s("p",{class:"text-xs text-muted-foreground"},[b(" Use a plain channel name or include wildcard characters like "),s("span",{class:"font-mono"},"*"),b(" and "),s("span",{class:"font-mono"},"?"),b(" for patterns. ")],-1))]),s("div",We,[d(V,{size:"xs",disabled:a(U),onClick:re},{default:m(()=>n[9]||(n[9]=[b(" Add target ")])),_:1},8,["disabled"]),d(V,{size:"xs",variant:"outline",disabled:!a(p),onClick:n[2]||(n[2]=v=>Y(void 0))},{default:m(()=>n[10]||(n[10]=[b(" Clear all ")])),_:1},8,["disabled"])]),a(K).length?(i(),c("div",Qe,[n[11]||(n[11]=s("div",{class:"text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground"}," Active targets ",-1)),s("div",Ge,[(i(!0),c(N,null,O(a(K),v=>(i(),c("div",{key:v.target,class:"flex items-center justify-between gap-3 rounded-lg border bg-muted/10 px-3 py-2"},[s("div",Xe,[s("div",Ye,x(v.target),1),s("div",Ze,x(v.mode==="pattern"?"Pattern detected automatically":"Channel detected automatically"),1)]),d(V,{size:"iconSm",variant:"ghost","aria-label":`Remove ${v.target}`,onClick:e=>Y(v.target)},{default:m(()=>[d(C,{name:"hugeicons:cancel-01",class:"size-4! min-w-4"})]),_:2},1032,["aria-label","onClick"])]))),128))])])):L("",!0)])]),s("div",et,[n[16]||(n[16]=s("div",null,[s("div",{class:"text-sm font-medium"},"Publish"),s("p",{class:"text-xs text-muted-foreground"}," Send a quick payload to a channel and inspect the response stream on the right. ")],-1)),s("div",tt,[d(Z,{for:"redis-pubsub-channel"},{default:m(()=>n[13]||(n[13]=[b("Channel")])),_:1}),d(j,{size:"sm",id:"redis-pubsub-channel",modelValue:a(r),"onUpdate:modelValue":n[3]||(n[3]=v=>D(r)?r.value=v:null),placeholder:"orders.events"},null,8,["modelValue"])]),s("div",st,[d(Z,{for:"redis-pubsub-payload"},{default:m(()=>n[14]||(n[14]=[b("Payload")])),_:1}),ue(s("textarea",{id:"redis-pubsub-payload","onUpdate:modelValue":n[4]||(n[4]=v=>D(w)?w.value=v:null),class:"min-h-[140px] w-full rounded-lg border bg-background px-3 py-2 text-sm font-mono",placeholder:'{"event":"order.created"}'},null,512),[[ge,a(w)]])]),s("div",at,[d(V,{size:"sm",disabled:a(S),onClick:ne},{default:m(()=>n[15]||(n[15]=[b(" Publish ")])),_:1},8,["disabled"])])])]),s("div",nt,[s("div",lt,[s("div",ot,[n[18]||(n[18]=s("div",{class:"text-sm font-medium"},"Live Messages",-1)),d(a(G),{variant:"outline",class:"h-5 px-1.5 text-xxs font-normal"},{default:m(()=>[b(x(a(A).length)+" messages ",1)]),_:1}),d(a(G),{variant:"outline",class:"h-5 px-1.5 text-xxs font-normal"},{default:m(()=>n[17]||(n[17]=[b(" Polling 2s ")])),_:1})]),n[19]||(n[19]=s("div",{class:"mt-1 text-xs text-muted-foreground"}," Message polling stays active while the current subscription session is connected. ",-1))]),s("div",it,[a(A).length===0?(i(),I(ee,{key:0,title:"No Pub/Sub messages yet",desc:"Subscribe to a channel or pattern, then publish an event to watch it appear here."})):(i(),c("div",dt,[(i(!0),c(N,null,O(a(A),v=>(i(),c("div",{key:v.id,class:"rounded-lg border bg-muted/10 p-3"},[s("div",rt,[d(a(G),{variant:"outline",class:"h-5 px-1.5 text-xxs font-normal text-foreground"},{default:m(()=>[b(x(v.channel),1)]),_:2},1024),v.pattern?(i(),I(a(G),{key:0,variant:"outline",class:"h-5 px-1.5 text-xxs font-normal"},{default:m(()=>[b(" Pattern "+x(v.pattern),1)]),_:2},1024)):L("",!0),s("span",null,x(new Date(v.receivedAt).toLocaleTimeString()),1)]),s("pre",ut,[s("code",null,x(v.payload),1)])]))),128))]))])])])])}}}),pt={class:"h-full flex flex-col gap-3 p-4 overflow-auto"},vt={key:0,class:"relative min-h-[240px] overflow-hidden rounded-lg border bg-background"},mt={key:3,class:"space-y-4"},bt={class:"flex flex-col gap-1"},ft={class:"flex items-start gap-2"},gt={class:"text-sm font-semibold break-all"},xt={class:"text-xs text-muted-foreground"},ht={class:"flex flex-wrap items-center gap-2"},yt={class:"ml-auto flex items-center gap-2"},_t=["value"],wt={class:"grid gap-3 md:grid-cols-[220px_1fr] items-start"},kt={class:"space-y-1"},$t={class:"flex items-center gap-2"},It={class:"text-xs text-muted-foreground"},St={key:0,class:"text-xs text-destructive"},Rt={key:1,class:"space-y-3"},Tt=["readonly"],Ct={key:2,class:"min-h-[360px] overflow-hidden rounded-lg border"},Vt={key:3,class:"space-y-3"},Pt={class:"flex justify-end"},Kt={class:"overflow-hidden rounded-lg border"},zt={class:"w-full text-sm"},Et={class:"bg-muted/30 text-left"},Lt={key:1},Nt={class:"px-3 py-2 text-right"},Ot={key:0},Ut=["colspan"],At={key:4,class:"min-h-[320px] overflow-auto rounded-lg border bg-muted/20 p-3 text-xs"},Bt={class:"flex justify-end"},jt=ie({__name:"RedisValueEditor",props:{detail:{},loading:{type:Boolean},saving:{type:Boolean},canEdit:{type:Boolean},unavailableReason:{}},emits:["save","refresh"],setup(F,{emit:T}){const t=F,P=T,f=_(""),h=be(null),y=_("tree"),r=_([]),w=_(""),p=_(!1),k=_(5),U=[5,10,30],S=e=>e==null?e:JSON.parse(JSON.stringify(e)),$=(e,l)=>JSON.stringify(e)===JSON.stringify(l);M(()=>t.detail,e=>{f.value=(e==null?void 0:e.previewKind)==="text"?String(e.value??""):"",h.value=(e==null?void 0:e.previewKind)==="json"?S(e.value):null,r.value=e!=null&&e.tableRows?S(e.tableRows):[],w.value=(e==null?void 0:e.ttl)!==void 0&&e.ttl>=0?`${e.ttl}`:""},{immediate:!0});const J=g(()=>t.detail?typeof t.detail.value=="string"?t.detail.value:JSON.stringify(t.detail.value,null,2):""),K=g(()=>{var e;return t.unavailableReason?t.unavailableReason:((e=t.detail)==null?void 0:e.previewKind)==="readonly"?"Value editing is unavailable for this Redis type. TTL changes can still be saved.":""}),q=g(()=>{const e=w.value.trim();if(!e)return"";const l=Number.parseInt(e,10);return!Number.isFinite(l)||l<0?"TTL must be empty or a non-negative integer.":""}),A=g(()=>{if(!t.detail)return;const e=w.value.trim(),l=t.detail.ttl>=0?`${t.detail.ttl}`:"";if(e===l)return;if(!e)return null;const R=Number.parseInt(e,10);return Number.isFinite(R)&&R>=0?R:void 0}),X=g(()=>t.detail?[{label:`DB ${t.detail.databaseIndex}`},{label:t.detail.type},{label:`TTL ${t.detail.ttlLabel}`},{label:`Size ${t.detail.memoryUsageHuman??"n/a"}`},{label:t.detail.length!==null&&t.detail.length!==void 0?`Length ${t.detail.length}`:"Length n/a"},{label:`Encoding ${t.detail.encoding??"n/a"}`}]:[]),H=g(()=>!t.detail||t.detail.type==="none"?"hugeicons:database-02":Ae(t.detail.type)),de=g(()=>!t.detail||t.detail.type==="none"?"text-primary":Be(t.detail.type)),B=g(()=>!t.detail||!t.canEdit||q.value||t.saving?!1:A.value!==void 0),z=g(()=>"Update TTL"),ae=g(()=>{var e;return t.canEdit&&((e=t.detail)==null?void 0:e.previewKind)==="table"}),re=g(()=>{if(!t.detail)return!1;switch(t.detail.previewKind){case"text":return f.value!==String(t.detail.value??"");case"json":return!$(h.value,t.detail.value);case"table":return!$(r.value,t.detail.tableRows??[]);default:return!1}}),Y=g(()=>re.value||A.value!==void 0),ne=g(()=>!t.detail||!t.canEdit||q.value?!1:Y.value),o=(e,l,R)=>{var E,oe;const te=r.value.find(se=>se.id===e);if(!te)return;const W=(oe=(E=t.detail)==null?void 0:E.tableColumns)==null?void 0:oe.find(se=>se.key===l);te[l]=(W==null?void 0:W.type)==="number"?Number(R||0):R},n=()=>{var e;((e=t.detail)==null?void 0:e.tableKind)==="list"&&(r.value=r.value.map((l,R)=>({...l,index:R})))},C=()=>{var l;if(!((l=t.detail)!=null&&l.tableKind))return;const e=`row-${Date.now()}-${r.value.length}`;switch(t.detail.tableKind){case"hash":r.value.push({id:e,field:"",value:""});break;case"list":r.value.push({id:e,index:r.value.length,value:""});break;case"set":r.value.push({id:e,value:""});break;case"zset":r.value.push({id:e,value:"",score:0});break}},V=e=>{r.value=r.value.filter(l=>l.id!==e),n()},le=()=>{if(!t.detail||!ne.value)return;const e={previewKind:t.detail.previewKind,stringFormat:t.detail.stringFormat,tableKind:t.detail.tableKind,ttlSeconds:A.value,value:t.detail.value};t.detail.previewKind==="text"&&(e.value=f.value),t.detail.previewKind==="json"&&(e.value=h.value),t.detail.previewKind==="table"&&(e.value=S(r.value)),P("save",e)},Z=()=>{B.value&&le()};let j=null;const ee=()=>{j!==null&&(clearInterval(j),j=null)};return M([p,k,()=>{var e;return(e=t.detail)==null?void 0:e.key}],()=>{ee(),!(!p.value||!t.detail)&&(j=ke(()=>{!t.detail||t.loading||t.saving||P("refresh")},k.value*1e3))},{immediate:!0}),M(()=>t.detail,e=>{e||ee()}),fe(()=>{ee()}),(e,l)=>{var pe,ve;const R=xe,te=we,W=ye,E=he,oe=Oe,se=Ne,ce=_e;return i(),c("div",pt,[e.loading&&!e.detail?(i(),c("div",vt,[l[7]||(l[7]=s("div",{class:"flex h-full min-h-[240px] items-center justify-center px-4 text-sm text-muted-foreground"}," Loading Redis key detail... ",-1)),d(a(Ie),{visible:!0})])):!e.detail&&!e.loading?(i(),I(R,{key:1,title:"Select a Redis key",desc:"Choose a key from the Redis browser to inspect its value and metadata."})):((pe=e.detail)==null?void 0:pe.type)==="none"?(i(),I(R,{key:2,icon:"icons:404",title:"Key not found",desc:"This key no longer exists. It may have expired or been deleted."})):e.detail?(i(),c("div",mt,[s("div",bt,[s("div",ft,[d(te,{name:a(H),class:Se(["mt-0.5 size-4 min-w-4",a(de)])},null,8,["name","class"]),s("div",gt,x(e.detail.key),1)]),s("div",xt,x(e.detail.type)+" key preview ",1)]),s("div",ht,[(i(!0),c(N,null,O(a(X),u=>(i(),I(a(G),{key:u.label,variant:"outline",class:"h-6 px-2 text-[11px] font-normal"},{default:m(()=>[b(x(u.label),1)]),_:2},1024))),128)),s("div",yt,[d(a(Re),{id:"redis-auto-refresh",checked:a(p),"onUpdate:checked":l[0]||(l[0]=u=>D(p)?p.value=u:null)},null,8,["checked"]),d(W,{for:"redis-auto-refresh",class:"text-xs font-medium"},{default:m(()=>l[8]||(l[8]=[b(" Auto refresh ")])),_:1}),d(E,{variant:"ghost",size:"sm",class:"h-7 px-2 text-xs","aria-label":"Refresh key detail",disabled:e.loading||e.saving,onClick:l[1]||(l[1]=u=>P("refresh"))},{default:m(()=>[d(te,{name:"hugeicons:redo",class:"size-3.5! min-w-3.5"}),l[9]||(l[9]=b(" Refresh "))]),_:1},8,["disabled"]),a(p)?ue((i(),c("select",{key:0,"onUpdate:modelValue":l[2]||(l[2]=u=>D(k)?k.value=u:null),class:"h-7 rounded-md border bg-background px-2 text-xs","aria-label":"Auto refresh interval"},[(i(),c(N,null,O(U,u=>s("option",{key:u,value:u},x(u)+"s ",9,_t)),64))],512)),[[Te,a(k)]]):L("",!0)])]),a(K)?(i(),I(se,{key:0,class:"border-border bg-muted/20"},{default:m(()=>[d(oe,{class:"text-muted-foreground"},{default:m(()=>[b(x(a(K)),1)]),_:1})]),_:1})):L("",!0),s("div",wt,[s("div",kt,[d(W,{for:"redis-ttl-input"},{default:m(()=>l[10]||(l[10]=[b("TTL (seconds)")])),_:1}),s("div",$t,[d(ce,{id:"redis-ttl-input",size:"sm","model-value":a(w),disabled:!e.canEdit,placeholder:"Leave empty to persist","onUpdate:modelValue":l[3]||(l[3]=u=>w.value=String(u||""))},null,8,["model-value","disabled"]),d(E,{variant:"outline",size:"xs",disabled:!a(B),onClick:Z},{default:m(()=>[b(x(a(z)),1)]),_:1},8,["disabled"])]),s("p",It," Current: "+x(e.detail.ttlLabel),1),a(q)?(i(),c("p",St,x(a(q)),1)):L("",!0)])]),e.detail.previewKind==="text"?(i(),c("div",Rt,[ue(s("textarea",{"onUpdate:modelValue":l[4]||(l[4]=u=>D(f)?f.value=u:null),readonly:!e.canEdit,class:"min-h-[320px] w-full rounded-lg border bg-background px-3 py-2 text-sm font-mono"},null,8,Tt),[[ge,a(f)]])])):e.detail.previewKind==="json"?(i(),c("div",Ct,[d(a(Ue),{modelValue:a(h),"onUpdate:modelValue":l[5]||(l[5]=u=>D(h)?h.value=u:null),class:"h-[360px]",mode:a(y),navigationBar:!1,readOnly:!e.canEdit,onModeChange:l[6]||(l[6]=u=>y.value=u)},null,8,["modelValue","mode","readOnly"])])):e.detail.previewKind==="table"?(i(),c("div",Vt,[s("div",Pt,[a(ae)?(i(),I(E,{key:0,variant:"outline",size:"sm",onClick:C},{default:m(()=>l[11]||(l[11]=[b(" Add Row ")])),_:1})):L("",!0)]),s("div",Kt,[s("table",zt,[s("thead",Et,[s("tr",null,[(i(!0),c(N,null,O(e.detail.tableColumns,u=>(i(),c("th",{key:u.key,class:"px-3 py-2 font-medium"},x(u.label),1))),128)),l[12]||(l[12]=s("th",{class:"w-16 px-3 py-2 font-medium"},null,-1))])]),s("tbody",null,[(i(!0),c(N,null,O(a(r),u=>(i(),c("tr",{key:u.id,class:"border-t align-top"},[(i(!0),c(N,null,O(e.detail.tableColumns,Q=>(i(),c("td",{key:Q.key,class:"px-3 py-2"},[Q.editable?(i(),I(ce,{key:0,size:"sm","model-value":`${u[Q.key]??""}`,disabled:!e.canEdit,"onUpdate:modelValue":$e=>o(u.id,Q.key,String($e||""))},null,8,["model-value","disabled","onUpdate:modelValue"])):(i(),c("span",Lt,x(u[Q.key]),1))]))),128)),s("td",Nt,[d(E,{variant:"ghost",size:"sm",disabled:!e.canEdit,onClick:Q=>V(u.id)},{default:m(()=>l[13]||(l[13]=[b(" Remove ")])),_:2},1032,["disabled","onClick"])])]))),128)),a(r).length===0?(i(),c("tr",Ot,[s("td",{colspan:(((ve=e.detail.tableColumns)==null?void 0:ve.length)||0)+1,class:"px-3 py-6 text-center text-sm text-muted-foreground"}," No rows available. ",8,Ut)])):L("",!0)])])])])):(i(),c("pre",At,[s("code",null,x(a(J)),1)])),s("div",Bt,[d(E,{size:"sm",disabled:e.saving||!a(ne),onClick:le},{default:m(()=>l[14]||(l[14]=[b(" Save Changes ")])),_:1},8,["disabled"])])])):L("",!0)])}}}),Mt=ie({__name:"RedisWorkspace",props:{connection:{},tabInfo:{}},setup(F){const T=F,t=Le({connection:()=>T.connection,tabInfo:()=>T.tabInfo}),{canEditSelectedValue:P,databases:f,editUnavailableReason:h,loadingKeys:y,loadingSelectedKeyDetail:r,savingValue:w,selectedDatabaseIndex:p,selectedKeyDetail:k}=t,U=g(()=>{var S;return((S=T.tabInfo)==null?void 0:S.type)||me.RedisBrowser});return(S,$)=>a(U)===a(me).RedisPubSub?(i(),I(ct,{key:0,connection:T.connection,"database-index":a(p),databases:a(f),"onUpdate:databaseIndex":$[0]||($[0]=J=>a(t).selectedDatabaseIndex.value=J)},null,8,["connection","database-index","databases"])):(i(),I(jt,{key:1,detail:a(k),loading:a(y)||a(r),saving:a(w),"can-edit":a(P),"unavailable-reason":a(h),onSave:a(t).saveSelectedValue,onRefresh:$[1]||($[1]=J=>a(k)&&a(t).focusKey(a(k).key))},null,8,["detail","loading","saving","can-edit","unavailable-reason","onSave"]))}}),Qt=ie({__name:"[tabViewId]",setup(F){const T=Ce(),t=Ve(),P=Pe(),{tabViews:f}=Ke(t),h=g(()=>f.value.find(y=>y.id===T.params.tabViewId));return(y,r)=>(i(),I(Mt,{connection:a(P).selectedConnection,"tab-info":a(h)},null,8,["connection","tab-info"]))}});export{Qt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as et}from"./Ci5B19-c.js";import{c as tt}from"./Bq47tjcm.js";import{g as st}from"./kvtnkChG.js";import{s as it}from"./DGvAu532.js";import{_ as A,l as Oe,c as F,p as at,r as rt,u as we,d as de,z as nt,b as ut,a as lt,s as ct,g as ot,q as ht,t as dt,k as v,A as pt,y as At,i as ft,a8 as G}from"./DHAL8jJG.js";var Ve=function(){var s=A(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],u=[1,20],l=[1,41],r=[1,42],c=[1,26],f=[1,24],C=[1,25],k=[1,32],B=[1,33],Ae=[1,34],m=[1,45],fe=[1,35],ge=[1,36],Ce=[1,37],me=[1,38],be=[1,27],Ee=[1,28],ye=[1,29],ke=[1,30],Te=[1,31],b=[1,44],E=[1,46],y=[1,43],T=[1,47],De=[1,9],d=[1,8,9],ee=[1,58],te=[1,59],se=[1,60],ie=[1,61],ae=[1,62],Fe=[1,63],Be=[1,64],I=[1,8,9,41],Me=[1,76],P=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],re=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ne=[13,60,86,100,102,103],Y=[13,60,73,74,86,100,102,103],Pe=[13,60,68,69,70,71,72,86,100,102,103],_e=[1,101],K=[1,118],Q=[1,114],W=[1,110],j=[1,116],X=[1,111],q=[1,112],H=[1,113],J=[1,115],Z=[1,117],Re=[22,48,60,61,82,86,87,88,89,90],Se=[1,8,9,39,41,44],ue=[1,8,9,22],Ge=[1,147],Ue=[1,8,9,61],L=[1,8,9,22,48,60,61,82,86,87,88,89,90],Ne={trace:A(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:A(function(o,h,p,n,g,e,$){var t=e.length-1;switch(g){case 8:this.$=e[t-1];break;case 9:case 10:case 13:case 15:this.$=e[t];break;case 11:case 14:this.$=e[t-2]+"."+e[t];break;case 12:case 16:this.$=e[t-1]+e[t];break;case 17:case 18:this.$=e[t-1]+"~"+e[t]+"~";break;case 19:n.addRelation(e[t]);break;case 20:e[t-1].title=n.cleanupLabel(e[t]),n.addRelation(e[t-1]);break;case 31:this.$=e[t].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=e[t].trim(),n.setAccDescription(this.$);break;case 34:n.addClassesToNamespace(e[t-3],e[t-1][0],e[t-1][1]);break;case 35:n.addClassesToNamespace(e[t-4],e[t-1][0],e[t-1][1]);break;case 36:this.$=e[t],n.addNamespace(e[t]);break;case 37:this.$=[[e[t]],[]];break;case 38:this.$=[[e[t-1]],[]];break;case 39:e[t][0].unshift(e[t-2]),this.$=e[t];break;case 40:this.$=[[],[e[t]]];break;case 41:this.$=[[],[e[t-1]]];break;case 42:e[t][1].unshift(e[t-2]),this.$=e[t];break;case 44:n.setCssClass(e[t-2],e[t]);break;case 45:n.addMembers(e[t-3],e[t-1]);break;case 47:n.setCssClass(e[t-5],e[t-3]),n.addMembers(e[t-5],e[t-1]);break;case 48:this.$=e[t],n.addClass(e[t]);break;case 49:this.$=e[t-1],n.addClass(e[t-1]),n.setClassLabel(e[t-1],e[t]);break;case 53:n.addAnnotation(e[t],e[t-2]);break;case 54:case 67:this.$=[e[t]];break;case 55:e[t].push(e[t-1]),this.$=e[t];break;case 56:break;case 57:n.addMember(e[t-1],n.cleanupLabel(e[t]));break;case 58:break;case 59:break;case 60:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 61:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 62:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 63:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 64:this.$=n.addNote(e[t],e[t-1]);break;case 65:this.$=n.addNote(e[t]);break;case 66:this.$=e[t-2],n.defineClass(e[t-1],e[t]);break;case 68:this.$=e[t-2].concat([e[t]]);break;case 69:n.setDirection("TB");break;case 70:n.setDirection("BT");break;case 71:n.setDirection("RL");break;case 72:n.setDirection("LR");break;case 73:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 74:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 75:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 76:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 77:this.$=n.relationType.AGGREGATION;break;case 78:this.$=n.relationType.EXTENSION;break;case 79:this.$=n.relationType.COMPOSITION;break;case 80:this.$=n.relationType.DEPENDENCY;break;case 81:this.$=n.relationType.LOLLIPOP;break;case 82:this.$=n.lineType.LINE;break;case 83:this.$=n.lineType.DOTTED_LINE;break;case 84:case 90:this.$=e[t-2],n.setClickEvent(e[t-1],e[t]);break;case 85:case 91:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 86:this.$=e[t-2],n.setLink(e[t-1],e[t]);break;case 87:this.$=e[t-3],n.setLink(e[t-2],e[t-1],e[t]);break;case 88:this.$=e[t-3],n.setLink(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 89:this.$=e[t-4],n.setLink(e[t-3],e[t-2],e[t]),n.setTooltip(e[t-3],e[t-1]);break;case 92:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1],e[t]);break;case 93:this.$=e[t-4],n.setClickEvent(e[t-3],e[t-2],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 94:this.$=e[t-3],n.setLink(e[t-2],e[t]);break;case 95:this.$=e[t-4],n.setLink(e[t-3],e[t-1],e[t]);break;case 96:this.$=e[t-4],n.setLink(e[t-3],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 97:this.$=e[t-5],n.setLink(e[t-4],e[t-2],e[t]),n.setTooltip(e[t-4],e[t-1]);break;case 98:this.$=e[t-2],n.setCssStyle(e[t-1],e[t]);break;case 99:n.setCssClass(e[t-1],e[t]);break;case 100:this.$=[e[t]];break;case 101:e[t-2].push(e[t]),this.$=e[t-2];break;case 103:this.$=e[t-1]+e[t];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,49:c,51:f,52:C,54:k,56:B,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:ke,83:Te,86:b,100:E,102:y,103:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(De,[2,5],{8:[1,48]}),{8:[1,49]},s(d,[2,19],{22:[1,50]}),s(d,[2,21]),s(d,[2,22]),s(d,[2,23]),s(d,[2,24]),s(d,[2,25]),s(d,[2,26]),s(d,[2,27]),s(d,[2,28]),s(d,[2,29]),s(d,[2,30]),{34:[1,51]},{36:[1,52]},s(d,[2,33]),s(d,[2,56],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:ee,69:te,70:se,71:ie,72:ae,73:Fe,74:Be}),{39:[1,65]},s(I,[2,43],{39:[1,67],44:[1,66]}),s(d,[2,58]),s(d,[2,59]),{16:68,60:m,86:b,100:E,102:y},{16:39,17:40,19:69,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:70,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:71,60:m,86:b,100:E,102:y,103:T},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:m,86:b,100:E,102:y,103:T},{13:Me,55:75},{58:77,60:[1,78]},s(d,[2,69]),s(d,[2,70]),s(d,[2,71]),s(d,[2,72]),s(P,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:m,86:b,100:E,102:y,103:T}),s(P,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:86,60:m,86:b,100:E,102:y,103:T},s(re,[2,126]),s(re,[2,127]),s(re,[2,128]),s(re,[2,129]),s([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,130]),s(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:i,35:a,37:u,42:l,46:r,49:c,51:f,52:C,54:k,56:B,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:ke,83:Te,86:b,100:E,102:y,103:T}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,49:c,51:f,52:C,54:k,56:B,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:ke,83:Te,86:b,100:E,102:y,103:T},s(d,[2,20]),s(d,[2,31]),s(d,[2,32]),{13:[1,90],16:39,17:40,19:89,60:m,86:b,100:E,102:y,103:T},{53:91,66:56,67:57,68:ee,69:te,70:se,71:ie,72:ae,73:Fe,74:Be},s(d,[2,57]),{67:92,73:Fe,74:Be},s(ne,[2,76],{66:93,68:ee,69:te,70:se,71:ie,72:ae}),s(Y,[2,77]),s(Y,[2,78]),s(Y,[2,79]),s(Y,[2,80]),s(Y,[2,81]),s(Pe,[2,82]),s(Pe,[2,83]),{8:[1,95],24:96,30:97,40:94,43:23,46:r,54:k,56:B},{16:98,60:m,86:b,100:E,102:y},{41:[1,100],45:99,51:_e},{50:[1,102]},{13:[1,103]},{13:[1,104]},{79:[1,105],81:[1,106]},{22:K,48:Q,59:107,60:W,82:j,84:108,85:109,86:X,87:q,88:H,89:J,90:Z},{60:[1,119]},{13:Me,55:120},s(I,[2,65]),s(I,[2,131]),{22:K,48:Q,59:121,60:W,61:[1,122],82:j,84:108,85:109,86:X,87:q,88:H,89:J,90:Z},s(Re,[2,67]),{16:39,17:40,19:123,60:m,86:b,100:E,102:y,103:T},s(P,[2,16]),s(P,[2,17]),s(P,[2,18]),{39:[2,36]},{15:125,16:84,17:85,18:[1,124],39:[2,9],60:m,86:b,100:E,102:y,103:T},{39:[2,10]},s(Se,[2,48],{11:126,12:[1,127]}),s(De,[2,7]),{9:[1,128]},s(ue,[2,60]),{16:39,17:40,19:129,60:m,86:b,100:E,102:y,103:T},{13:[1,131],16:39,17:40,19:130,60:m,86:b,100:E,102:y,103:T},s(ne,[2,75],{66:132,68:ee,69:te,70:se,71:ie,72:ae}),s(ne,[2,74]),{41:[1,133]},{24:96,30:97,40:134,43:23,46:r,54:k,56:B},{8:[1,135],41:[2,37]},{8:[1,136],41:[2,40]},s(I,[2,44],{39:[1,137]}),{41:[1,138]},s(I,[2,46]),{41:[2,54],45:139,51:_e},{16:39,17:40,19:140,60:m,86:b,100:E,102:y,103:T},s(d,[2,84],{13:[1,141]}),s(d,[2,86],{13:[1,143],77:[1,142]}),s(d,[2,90],{13:[1,144],80:[1,145]}),{13:[1,146]},s(d,[2,98],{61:Ge}),s(Ue,[2,100],{85:148,22:K,48:Q,60:W,82:j,86:X,87:q,88:H,89:J,90:Z}),s(L,[2,102]),s(L,[2,104]),s(L,[2,105]),s(L,[2,106]),s(L,[2,107]),s(L,[2,108]),s(L,[2,109]),s(L,[2,110]),s(L,[2,111]),s(L,[2,112]),s(d,[2,99]),s(I,[2,64]),s(d,[2,66],{61:Ge}),{60:[1,149]},s(P,[2,14]),{15:150,16:84,17:85,60:m,86:b,100:E,102:y,103:T},{39:[2,12]},s(Se,[2,49]),{13:[1,151]},{1:[2,4]},s(ue,[2,62]),s(ue,[2,61]),{16:39,17:40,19:152,60:m,86:b,100:E,102:y,103:T},s(ne,[2,73]),s(d,[2,34]),{41:[1,153]},{24:96,30:97,40:154,41:[2,38],43:23,46:r,54:k,56:B},{24:96,30:97,40:155,41:[2,41],43:23,46:r,54:k,56:B},{45:156,51:_e},s(I,[2,45]),{41:[2,55]},s(d,[2,53]),s(d,[2,85]),s(d,[2,87]),s(d,[2,88],{77:[1,157]}),s(d,[2,91]),s(d,[2,92],{13:[1,158]}),s(d,[2,94],{13:[1,160],77:[1,159]}),{22:K,48:Q,60:W,82:j,84:161,85:109,86:X,87:q,88:H,89:J,90:Z},s(L,[2,103]),s(Re,[2,68]),{39:[2,11]},{14:[1,162]},s(ue,[2,63]),s(d,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,163]},s(d,[2,89]),s(d,[2,93]),s(d,[2,95]),s(d,[2,96],{77:[1,164]}),s(Ue,[2,101],{85:148,22:K,48:Q,60:W,82:j,86:X,87:q,88:H,89:J,90:Z}),s(Se,[2,8]),s(I,[2,47]),s(d,[2,97])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],125:[2,12],128:[2,4],139:[2,55],150:[2,11],154:[2,39],155:[2,42]},parseError:A(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:A(function(o){var h=this,p=[0],n=[],g=[null],e=[],$=this.table,t="",ce=0,ze=0,He=2,Ye=1,Je=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(w.yy[Le]=this.yy[Le]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var xe=D.yylloc;e.push(xe);var Ze=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(S){p.length=p.length-2*S,g.length=g.length-S,e.length=e.length-S}A($e,"popStack");function Ke(){var S;return S=n.pop()||D.lex()||Ye,typeof S!="number"&&(S instanceof Array&&(n=S,S=n.pop()),S=h.symbols_[S]||S),S}A(Ke,"lex");for(var _,V,N,ve,R={},oe,x,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?N=this.defaultActions[V]:((_===null||typeof _>"u")&&(_=Ke()),N=$[V]&&$[V][_]),typeof N>"u"||!N.length||!N[0]){var Ie="";he=[];for(oe in $[V])this.terminals_[oe]&&oe>He&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?Ie="Parse error on line "+(ce+1)+`:
|
|
1
|
+
import{g as et}from"./DA4Xn6lm.js";import{c as tt}from"./BG-rJefG.js";import{g as st}from"./9sDqz0uT.js";import{s as it}from"./DRh-06Hb.js";import{_ as A,l as Oe,c as F,p as at,r as rt,u as we,d as de,z as nt,b as ut,a as lt,s as ct,g as ot,q as ht,t as dt,k as v,A as pt,y as At,i as ft,a8 as G}from"./B_ERKujF.js";var Ve=function(){var s=A(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],u=[1,20],l=[1,41],r=[1,42],c=[1,26],f=[1,24],C=[1,25],k=[1,32],B=[1,33],Ae=[1,34],m=[1,45],fe=[1,35],ge=[1,36],Ce=[1,37],me=[1,38],be=[1,27],Ee=[1,28],ye=[1,29],ke=[1,30],Te=[1,31],b=[1,44],E=[1,46],y=[1,43],T=[1,47],De=[1,9],d=[1,8,9],ee=[1,58],te=[1,59],se=[1,60],ie=[1,61],ae=[1,62],Fe=[1,63],Be=[1,64],I=[1,8,9,41],Me=[1,76],P=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],re=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ne=[13,60,86,100,102,103],Y=[13,60,73,74,86,100,102,103],Pe=[13,60,68,69,70,71,72,86,100,102,103],_e=[1,101],K=[1,118],Q=[1,114],W=[1,110],j=[1,116],X=[1,111],q=[1,112],H=[1,113],J=[1,115],Z=[1,117],Re=[22,48,60,61,82,86,87,88,89,90],Se=[1,8,9,39,41,44],ue=[1,8,9,22],Ge=[1,147],Ue=[1,8,9,61],L=[1,8,9,22,48,60,61,82,86,87,88,89,90],Ne={trace:A(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:A(function(o,h,p,n,g,e,$){var t=e.length-1;switch(g){case 8:this.$=e[t-1];break;case 9:case 10:case 13:case 15:this.$=e[t];break;case 11:case 14:this.$=e[t-2]+"."+e[t];break;case 12:case 16:this.$=e[t-1]+e[t];break;case 17:case 18:this.$=e[t-1]+"~"+e[t]+"~";break;case 19:n.addRelation(e[t]);break;case 20:e[t-1].title=n.cleanupLabel(e[t]),n.addRelation(e[t-1]);break;case 31:this.$=e[t].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=e[t].trim(),n.setAccDescription(this.$);break;case 34:n.addClassesToNamespace(e[t-3],e[t-1][0],e[t-1][1]);break;case 35:n.addClassesToNamespace(e[t-4],e[t-1][0],e[t-1][1]);break;case 36:this.$=e[t],n.addNamespace(e[t]);break;case 37:this.$=[[e[t]],[]];break;case 38:this.$=[[e[t-1]],[]];break;case 39:e[t][0].unshift(e[t-2]),this.$=e[t];break;case 40:this.$=[[],[e[t]]];break;case 41:this.$=[[],[e[t-1]]];break;case 42:e[t][1].unshift(e[t-2]),this.$=e[t];break;case 44:n.setCssClass(e[t-2],e[t]);break;case 45:n.addMembers(e[t-3],e[t-1]);break;case 47:n.setCssClass(e[t-5],e[t-3]),n.addMembers(e[t-5],e[t-1]);break;case 48:this.$=e[t],n.addClass(e[t]);break;case 49:this.$=e[t-1],n.addClass(e[t-1]),n.setClassLabel(e[t-1],e[t]);break;case 53:n.addAnnotation(e[t],e[t-2]);break;case 54:case 67:this.$=[e[t]];break;case 55:e[t].push(e[t-1]),this.$=e[t];break;case 56:break;case 57:n.addMember(e[t-1],n.cleanupLabel(e[t]));break;case 58:break;case 59:break;case 60:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 61:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 62:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 63:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 64:this.$=n.addNote(e[t],e[t-1]);break;case 65:this.$=n.addNote(e[t]);break;case 66:this.$=e[t-2],n.defineClass(e[t-1],e[t]);break;case 68:this.$=e[t-2].concat([e[t]]);break;case 69:n.setDirection("TB");break;case 70:n.setDirection("BT");break;case 71:n.setDirection("RL");break;case 72:n.setDirection("LR");break;case 73:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 74:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 75:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 76:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 77:this.$=n.relationType.AGGREGATION;break;case 78:this.$=n.relationType.EXTENSION;break;case 79:this.$=n.relationType.COMPOSITION;break;case 80:this.$=n.relationType.DEPENDENCY;break;case 81:this.$=n.relationType.LOLLIPOP;break;case 82:this.$=n.lineType.LINE;break;case 83:this.$=n.lineType.DOTTED_LINE;break;case 84:case 90:this.$=e[t-2],n.setClickEvent(e[t-1],e[t]);break;case 85:case 91:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 86:this.$=e[t-2],n.setLink(e[t-1],e[t]);break;case 87:this.$=e[t-3],n.setLink(e[t-2],e[t-1],e[t]);break;case 88:this.$=e[t-3],n.setLink(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 89:this.$=e[t-4],n.setLink(e[t-3],e[t-2],e[t]),n.setTooltip(e[t-3],e[t-1]);break;case 92:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1],e[t]);break;case 93:this.$=e[t-4],n.setClickEvent(e[t-3],e[t-2],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 94:this.$=e[t-3],n.setLink(e[t-2],e[t]);break;case 95:this.$=e[t-4],n.setLink(e[t-3],e[t-1],e[t]);break;case 96:this.$=e[t-4],n.setLink(e[t-3],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 97:this.$=e[t-5],n.setLink(e[t-4],e[t-2],e[t]),n.setTooltip(e[t-4],e[t-1]);break;case 98:this.$=e[t-2],n.setCssStyle(e[t-1],e[t]);break;case 99:n.setCssClass(e[t-1],e[t]);break;case 100:this.$=[e[t]];break;case 101:e[t-2].push(e[t]),this.$=e[t-2];break;case 103:this.$=e[t-1]+e[t];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,49:c,51:f,52:C,54:k,56:B,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:ke,83:Te,86:b,100:E,102:y,103:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(De,[2,5],{8:[1,48]}),{8:[1,49]},s(d,[2,19],{22:[1,50]}),s(d,[2,21]),s(d,[2,22]),s(d,[2,23]),s(d,[2,24]),s(d,[2,25]),s(d,[2,26]),s(d,[2,27]),s(d,[2,28]),s(d,[2,29]),s(d,[2,30]),{34:[1,51]},{36:[1,52]},s(d,[2,33]),s(d,[2,56],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:ee,69:te,70:se,71:ie,72:ae,73:Fe,74:Be}),{39:[1,65]},s(I,[2,43],{39:[1,67],44:[1,66]}),s(d,[2,58]),s(d,[2,59]),{16:68,60:m,86:b,100:E,102:y},{16:39,17:40,19:69,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:70,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:71,60:m,86:b,100:E,102:y,103:T},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:m,86:b,100:E,102:y,103:T},{13:Me,55:75},{58:77,60:[1,78]},s(d,[2,69]),s(d,[2,70]),s(d,[2,71]),s(d,[2,72]),s(P,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:m,86:b,100:E,102:y,103:T}),s(P,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:m,86:b,100:E,102:y,103:T},{16:39,17:40,19:86,60:m,86:b,100:E,102:y,103:T},s(re,[2,126]),s(re,[2,127]),s(re,[2,128]),s(re,[2,129]),s([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,130]),s(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:i,35:a,37:u,42:l,46:r,49:c,51:f,52:C,54:k,56:B,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:ke,83:Te,86:b,100:E,102:y,103:T}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,49:c,51:f,52:C,54:k,56:B,57:Ae,60:m,62:fe,63:ge,64:Ce,65:me,75:be,76:Ee,78:ye,82:ke,83:Te,86:b,100:E,102:y,103:T},s(d,[2,20]),s(d,[2,31]),s(d,[2,32]),{13:[1,90],16:39,17:40,19:89,60:m,86:b,100:E,102:y,103:T},{53:91,66:56,67:57,68:ee,69:te,70:se,71:ie,72:ae,73:Fe,74:Be},s(d,[2,57]),{67:92,73:Fe,74:Be},s(ne,[2,76],{66:93,68:ee,69:te,70:se,71:ie,72:ae}),s(Y,[2,77]),s(Y,[2,78]),s(Y,[2,79]),s(Y,[2,80]),s(Y,[2,81]),s(Pe,[2,82]),s(Pe,[2,83]),{8:[1,95],24:96,30:97,40:94,43:23,46:r,54:k,56:B},{16:98,60:m,86:b,100:E,102:y},{41:[1,100],45:99,51:_e},{50:[1,102]},{13:[1,103]},{13:[1,104]},{79:[1,105],81:[1,106]},{22:K,48:Q,59:107,60:W,82:j,84:108,85:109,86:X,87:q,88:H,89:J,90:Z},{60:[1,119]},{13:Me,55:120},s(I,[2,65]),s(I,[2,131]),{22:K,48:Q,59:121,60:W,61:[1,122],82:j,84:108,85:109,86:X,87:q,88:H,89:J,90:Z},s(Re,[2,67]),{16:39,17:40,19:123,60:m,86:b,100:E,102:y,103:T},s(P,[2,16]),s(P,[2,17]),s(P,[2,18]),{39:[2,36]},{15:125,16:84,17:85,18:[1,124],39:[2,9],60:m,86:b,100:E,102:y,103:T},{39:[2,10]},s(Se,[2,48],{11:126,12:[1,127]}),s(De,[2,7]),{9:[1,128]},s(ue,[2,60]),{16:39,17:40,19:129,60:m,86:b,100:E,102:y,103:T},{13:[1,131],16:39,17:40,19:130,60:m,86:b,100:E,102:y,103:T},s(ne,[2,75],{66:132,68:ee,69:te,70:se,71:ie,72:ae}),s(ne,[2,74]),{41:[1,133]},{24:96,30:97,40:134,43:23,46:r,54:k,56:B},{8:[1,135],41:[2,37]},{8:[1,136],41:[2,40]},s(I,[2,44],{39:[1,137]}),{41:[1,138]},s(I,[2,46]),{41:[2,54],45:139,51:_e},{16:39,17:40,19:140,60:m,86:b,100:E,102:y,103:T},s(d,[2,84],{13:[1,141]}),s(d,[2,86],{13:[1,143],77:[1,142]}),s(d,[2,90],{13:[1,144],80:[1,145]}),{13:[1,146]},s(d,[2,98],{61:Ge}),s(Ue,[2,100],{85:148,22:K,48:Q,60:W,82:j,86:X,87:q,88:H,89:J,90:Z}),s(L,[2,102]),s(L,[2,104]),s(L,[2,105]),s(L,[2,106]),s(L,[2,107]),s(L,[2,108]),s(L,[2,109]),s(L,[2,110]),s(L,[2,111]),s(L,[2,112]),s(d,[2,99]),s(I,[2,64]),s(d,[2,66],{61:Ge}),{60:[1,149]},s(P,[2,14]),{15:150,16:84,17:85,60:m,86:b,100:E,102:y,103:T},{39:[2,12]},s(Se,[2,49]),{13:[1,151]},{1:[2,4]},s(ue,[2,62]),s(ue,[2,61]),{16:39,17:40,19:152,60:m,86:b,100:E,102:y,103:T},s(ne,[2,73]),s(d,[2,34]),{41:[1,153]},{24:96,30:97,40:154,41:[2,38],43:23,46:r,54:k,56:B},{24:96,30:97,40:155,41:[2,41],43:23,46:r,54:k,56:B},{45:156,51:_e},s(I,[2,45]),{41:[2,55]},s(d,[2,53]),s(d,[2,85]),s(d,[2,87]),s(d,[2,88],{77:[1,157]}),s(d,[2,91]),s(d,[2,92],{13:[1,158]}),s(d,[2,94],{13:[1,160],77:[1,159]}),{22:K,48:Q,60:W,82:j,84:161,85:109,86:X,87:q,88:H,89:J,90:Z},s(L,[2,103]),s(Re,[2,68]),{39:[2,11]},{14:[1,162]},s(ue,[2,63]),s(d,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,163]},s(d,[2,89]),s(d,[2,93]),s(d,[2,95]),s(d,[2,96],{77:[1,164]}),s(Ue,[2,101],{85:148,22:K,48:Q,60:W,82:j,86:X,87:q,88:H,89:J,90:Z}),s(Se,[2,8]),s(I,[2,47]),s(d,[2,97])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],125:[2,12],128:[2,4],139:[2,55],150:[2,11],154:[2,39],155:[2,42]},parseError:A(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:A(function(o){var h=this,p=[0],n=[],g=[null],e=[],$=this.table,t="",ce=0,ze=0,He=2,Ye=1,Je=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(w.yy[Le]=this.yy[Le]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var xe=D.yylloc;e.push(xe);var Ze=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(S){p.length=p.length-2*S,g.length=g.length-S,e.length=e.length-S}A($e,"popStack");function Ke(){var S;return S=n.pop()||D.lex()||Ye,typeof S!="number"&&(S instanceof Array&&(n=S,S=n.pop()),S=h.symbols_[S]||S),S}A(Ke,"lex");for(var _,V,N,ve,R={},oe,x,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?N=this.defaultActions[V]:((_===null||typeof _>"u")&&(_=Ke()),N=$[V]&&$[V][_]),typeof N>"u"||!N.length||!N[0]){var Ie="";he=[];for(oe in $[V])this.terminals_[oe]&&oe>He&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?Ie="Parse error on line "+(ce+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+he.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Ie="Parse error on line "+(ce+1)+": Unexpected "+(_==Ye?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Ie,{text:D.match,token:this.terminals_[_]||_,line:D.yylineno,loc:xe,expected:he})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+_);switch(N[0]){case 1:p.push(_),g.push(D.yytext),e.push(D.yylloc),p.push(N[1]),_=null,ze=D.yyleng,t=D.yytext,ce=D.yylineno,xe=D.yylloc;break;case 2:if(x=this.productions_[N[1]][1],R.$=g[g.length-x],R._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},Ze&&(R._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),ve=this.performAction.apply(R,[t,ze,ce,w.yy,N[1],g,e].concat(Je)),typeof ve<"u")return ve;x&&(p=p.slice(0,-1*x*2),g=g.slice(0,-1*x),e=e.slice(0,-1*x)),p.push(this.productions_[N[1]][0]),g.push(R.$),e.push(R._$),Qe=$[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},qe=function(){var O={EOF:1,parseError:A(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:A(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:A(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:A(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===n.length?this.yylloc.first_column:0)+n[n.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:A(function(){return this._more=!0,this},"more"),reject:A(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:A(function(o){this.unput(this.match.slice(o))},"less"),pastInput:A(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:A(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:A(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as d}from"./
|
|
1
|
+
import{_ as d}from"./BdZsZgcB.js";import{_ as f}from"./CtkhwZY7.js";import{d as u,e as p,f as t,m as n,w as a,z as s,g as i,o as g,A as _}from"./D0lW43G8.js";import{_ as r}from"./C-I81xfB.js";const x={class:"p-2 flex flex-col items-center justify-center h-full gap-2"},c={class:"text-muted-foreground mt-4"},v={class:"flex items-center pt-3 text-muted-foreground gap-0.5 text-sm"},b={class:"flex items-center pt-1 text-muted-foreground gap-0.5 text-sm"},B={class:"flex items-center pt-1 text-muted-foreground gap-0.5 text-sm"},C={class:"flex items-center pt-1 text-muted-foreground gap-0.5 text-sm"},V=u({__name:"index",setup(k){return(w,e)=>{const l=f,m=d,o=_;return g(),p("div",x,[t(m,{class:"rounded-2xl size-40"},{default:a(()=>[t(l,{src:"/logo.png",alt:"@unovue"})]),_:1}),n("div",c,[e[0]||(e[0]=s(" Click on a database table from the sidebar to begin ")),t(o,{name:"hugeicons:artificial-intelligence-08",class:"size-4 min-w-4"})]),n("div",v,[t(o,{name:"hugeicons:settings-01"}),e[2]||(e[2]=s(" Open setting ")),t(i(r),{class:"pl-2"},{default:a(()=>e[1]||(e[1]=[s("(⌘,)")])),_:1})]),n("div",b,[t(o,{name:"hugeicons:command"}),e[4]||(e[4]=s(" Command Palette ")),t(i(r),{class:"pl-2"},{default:a(()=>e[3]||(e[3]=[s("(⌘K or ⌘P)")])),_:1})]),n("div",B,[t(o,{name:"hugeicons:sidebar-left"}),e[6]||(e[6]=s(" Toggle left sidebar ")),t(i(r),{class:"pl-2"},{default:a(()=>e[5]||(e[5]=[s("(⌘B)")])),_:1})]),n("div",C,[t(o,{name:"hugeicons:sidebar-right"}),e[8]||(e[8]=s(" Toggle right sidebar ")),t(i(r),{class:"pl-2"},{default:a(()=>e[7]||(e[7]=[s("(⇧⌘B)")])),_:1})])])}}});export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as R,a as W,S as N}from"./BoMjapT5.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a9 as _,aa as U,a6 as C,u as F}from"./DHAL8jJG.js";import{G as O}from"./qsFoMdT2.js";import{l as J}from"./CQb_mUBo.js";import"./kvtnkChG.js";import"./DGvAu532.js";import"./BcsKoAPU.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();G(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},lt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{lt as diagram};
|
|
1
|
+
import{s as R,a as W,S as N}from"./DPq8O9CC.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a9 as _,aa as U,a6 as C,u as F}from"./B_ERKujF.js";import{G as O}from"./qsFoMdT2.js";import{l as J}from"./CQb_mUBo.js";import"./9sDqz0uT.js";import"./DRh-06Hb.js";import"./D0lW43G8.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();G(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},lt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{lt as diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{_ as He}from"./C9kgALYc.js";import{d as j,e as B,m as t,t as m,F as P,s as J,o as g,k as T,w as a,z as _,bm as ae,f as o,A as W,l as M,r as F,c as v,au as le,g as e,bn as H,_ as We,i as Y,a0 as Q,n as re,h as Ge,bS as Ke,x as Xe,B as Ze,bk as Ye,bW as Qe,bq as et,a1 as tt,X as st,Y as ot,Z as nt,bo as at,bL as lt,$ as rt,W as it,aZ as ut,bX as ct,by as dt,G as we,a3 as mt,ba as pt,J as ve,aM as be,bE as ft,bF as gt,bG as _t}from"./D0lW43G8.js";import{_ as $e,a as Ce}from"./CtCx-4nJ.js";import{_ as Se,g as xe,a as ie,b as Be,c as vt,d as Fe,i as bt,e as xt,f as yt}from"./BmAp-sfn.js";import{_ as ht}from"./BCAMWuzu.js";import{u as kt}from"./Ch0I4juX.js";const wt={class:"rounded-lg border bg-muted/20 p-4"},$t={class:"space-y-4"},Ct={class:"text-sm font-medium"},St={class:"mt-1 text-xs text-muted-foreground"},Bt={class:"text-xs text-muted-foreground"},Ft={class:"mt-2 flex flex-wrap gap-2"},Tt={class:"mt-1 text-sm text-muted-foreground"},Dt={class:"mt-1 text-sm font-medium"},ye=j({__name:"BackupProfileCard",props:{title:{},description:{},formats:{},toolHint:{},targetName:{},formatsLabel:{default:"Supported Files"}},setup(p){return(s,n)=>{const f=ae;return g(),B("div",wt,[t("div",$t,[t("div",null,[t("p",Ct,m(s.title),1),t("p",St,m(s.description),1)]),t("div",null,[t("p",Bt,m(s.formatsLabel),1),t("div",Ft,[(g(!0),B(P,null,J(s.formats,c=>(g(),T(f,{key:c.format,variant:"outline",class:"font-normal"},{default:a(()=>[_(m(c.extension),1)]),_:2},1024))),128))])]),t("div",null,[n[0]||(n[0]=t("p",{class:"text-xs text-muted-foreground"},"Runtime Tools",-1)),t("p",Tt,m(s.toolHint),1)]),t("div",null,[n[1]||(n[1]=t("p",{class:"text-xs text-muted-foreground"},"Target",-1)),t("p",Dt,m(s.targetName),1)])])])}}}),Et={class:"text-muted-foreground"},It={class:"space-y-2 text-xs"},Rt=`brew install postgresql # macOS
|
|
2
|
+
apt-get install postgresql-client # Linux
|
|
3
|
+
# Windows: Download from https://www.postgresql.org/download/windows/`,zt=`brew install mysql # macOS
|
|
4
|
+
apt-get install mysql-client # Linux
|
|
5
|
+
# Windows: Download from https://dev.mysql.com/downloads/`,Ot=`brew install sqlite # macOS
|
|
6
|
+
apt-get install sqlite3 # Linux
|
|
7
|
+
# Windows: Download from https://www.sqlite.org/download.html`,Nt=j({__name:"BackupRestoreUnsupportedAlert",props:{supportMessage:{},connectionType:{}},setup(p){return(s,n)=>{const f=W,c=Se,r=ht,d=Ce,b=$e;return g(),T(b,null,{default:a(()=>[o(c,{class:"flex items-center font-medium gap-1"},{default:a(()=>[o(f,{name:"hugeicons:alert-circle",class:"size-4"}),n[0]||(n[0]=_(" Native Tools Required"))]),_:1}),o(d,{class:"space-y-3"},{default:a(()=>[t("p",Et,m(s.supportMessage),1),t("div",It,[n[1]||(n[1]=t("p",{class:"font-medium"},"Installation instructions:",-1)),s.connectionType==="postgres"?(g(),T(r,{key:0,code:Rt,language:"bash"})):s.connectionType==="mysql"||s.connectionType==="mariadb"?(g(),T(r,{key:1,code:zt,language:"bash"})):s.connectionType==="sqlite3"?(g(),T(r,{key:2,code:Ot,language:"bash"})):M("",!0)])]),_:1})]),_:1})}}}),Vt={class:"space-y-4"},qt={class:"space-y-2"},Mt={class:"grid gap-2 sm:grid-cols-2"},jt=["onClick"],Lt={class:"flex items-center justify-between gap-2"},Pt={class:"text-sm font-medium"},At={class:"mt-1 text-xs text-muted-foreground"},Ut={class:"space-y-2"},Jt={key:0,class:"space-y-2"},Ht={class:"flex flex-wrap gap-2 max-h-32 overflow-y-auto p-2 border rounded-md"},Wt={class:"text-xs text-muted-foreground"},Gt=j({__name:"ExportOptionsForm",props:{schemas:{},loading:{type:Boolean},connectionType:{}},emits:["submit"],setup(p,{emit:s}){const n=p,f=s,c=F("full"),r=F(xe(n.connectionType)),d=F([]),b=v(()=>ie(n.connectionType));le(b,h=>{var w;h.some(D=>D.format===r.value)||(r.value=((w=h[0])==null?void 0:w.format)||xe(n.connectionType))},{immediate:!0});const i=[{value:"full",label:"Full (schema + data)"},{value:"schema-only",label:"Schema only (no data)"},{value:"data-only",label:"Data only (no schema)"}],C=()=>{const h={format:r.value,scope:c.value};h.schemas=d.value.length>0?d.value:n.schemas,f("submit",h)};return(h,w)=>{const D=Ke,z=Ge,l=Ze,x=Xe,S=We,E=W,I=Q;return g(),B("div",Vt,[t("div",qt,[o(e(H),null,{default:a(()=>w[1]||(w[1]=[_("Backup Format")])),_:1}),t("div",Mt,[(g(!0),B(P,null,J(e(b),u=>(g(),B("button",{key:u.format,type:"button",class:re(["rounded-lg border p-3 text-left transition-colors",e(r)===u.format?"border-primary bg-primary/5":"hover:border-primary/40 hover:bg-muted/20"]),onClick:k=>r.value=u.format},[t("div",Lt,[t("p",Pt,m(u.label),1),o(e(ae),{variant:"secondary",class:"font-normal"},{default:a(()=>[_(m(u.extension),1)]),_:2},1024)]),t("p",At," Runtime uses "+m(e(Be)(n.connectionType))+". ",1)],10,jt))),128))])]),t("div",Ut,[o(e(H),null,{default:a(()=>w[2]||(w[2]=[_("Export Scope")])),_:1}),o(S,{modelValue:e(c),"onUpdate:modelValue":w[0]||(w[0]=u=>Y(c)?c.value=u:null)},{default:a(()=>[o(z,{size:"sm",class:"h-7!"},{default:a(()=>[o(D,{placeholder:"Select scope"})]),_:1}),o(x,null,{default:a(()=>[(g(),B(P,null,J(i,u=>o(l,{key:u.value,value:u.value},{default:a(()=>[_(m(u.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["modelValue"])]),h.schemas.length>0?(g(),B("div",Jt,[o(e(H),null,{default:a(()=>w[3]||(w[3]=[_("Schemas (optional)")])),_:1}),t("div",Ht,[(g(!0),B(P,null,J(h.schemas,u=>(g(),T(e(ae),{key:u,variant:e(d).includes(u)?"default":"outline",class:"cursor-pointer",onClick:()=>e(d).includes(u)?d.value=e(d).filter(k=>k!==u):e(d).push(u)},{default:a(()=>[_(m(u),1)]),_:2},1032,["variant","onClick"]))),128))]),t("p",Wt,m(e(d).length?`${e(d).length} selected`:"All visible schemas"),1)])):M("",!0),o(I,{class:"w-full",disabled:h.loading,onClick:C},{default:a(()=>[h.loading?(g(),T(E,{key:0,name:"hugeicons:loading-03",class:"size-4 mr-2 animate-spin"})):(g(),T(E,{key:1,name:"lucide:download",class:"size-4 mr-2"})),_(" "+m(h.loading?"Creating Backup...":"Create Backup"),1)]),_:1},8,["disabled"])])}}}),Kt={class:"relative mt-2 cursor-pointer rounded-lg border-2 border-dashed p-6 text-center transition-colors hover:border-primary/50"},Xt=["accept"],Zt={key:0,class:"text-muted-foreground pointer-events-none"},Yt={class:"text-xs mt-1"},Qt={key:1,class:"flex items-center justify-center gap-3"},es={class:"text-left"},ts={class:"text-sm font-medium"},ss={class:"text-xs text-muted-foreground"},os=j({__name:"ImportFileDropzone",props:{selectedFile:{},accept:{},extensionSummary:{}},emits:["change","clear"],setup(p){const s=n=>n<1024?`${n} B`:n<1048576?`${(n/1024).toFixed(1)} KB`:`${(n/1048576).toFixed(1)} MB`;return(n,f)=>{const c=H,r=W,d=Q;return g(),B("div",null,[o(c,{class:"text-sm font-medium"},{default:a(()=>f[2]||(f[2]=[_("Backup File")])),_:1}),t("div",Kt,[t("input",{type:"file",accept:n.accept,class:"absolute inset-0 w-full h-full opacity-0 cursor-pointer",onChange:f[0]||(f[0]=b=>n.$emit("change",b))},null,40,Xt),n.selectedFile?(g(),B("div",Qt,[o(r,{name:"hugeicons:file-01",class:"size-8 text-primary"}),t("div",es,[t("p",ts,m(n.selectedFile.name),1),t("p",ss,m(s(n.selectedFile.size)),1)]),o(d,{variant:"ghost",size:"icon",class:"ml-2 relative z-10",type:"button",onClick:f[1]||(f[1]=Ye(b=>n.$emit("clear"),["stop"]))},{default:a(()=>[o(r,{name:"hugeicons:x-close",class:"size-4"})]),_:1})])):(g(),B("div",Zt,[o(r,{name:"hugeicons:upload-cloud-01",class:"size-10 mx-auto mb-2 opacity-50"}),f[3]||(f[3]=t("p",{class:"text-sm font-medium"},"Click to select a file",-1)),t("p",Yt,"Supports "+m(n.extensionSummary)+" backups",1)]))])])}}}),ns={class:"space-y-3"},as={class:"grid grid-cols-2 gap-4"},ls=j({__name:"ImportOptionsForm",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(p){const s=Qe(p,"modelValue"),n=(c,r)=>{s.value[c]=r},f=[{key:"clean",label:"Drop Objects First",id:"import-clean"},{key:"dataOnly",label:"Data Only",id:"import-data-only"},{key:"schemaOnly",label:"Schema Only",id:"import-schema-only"},{key:"exitOnError",label:"Exit on Error",id:"import-exit-on-error"}];return(c,r)=>{const d=H,b=et;return g(),B("div",ns,[o(d,{class:"text-sm font-medium"},{default:a(()=>r[0]||(r[0]=[_("Options")])),_:1}),t("div",as,[(g(),B(P,null,J(f,i=>t("div",{key:i.key,class:"flex items-center space-x-2"},[o(b,{id:i.id,"model-value":s.value[i.key],"onUpdate:modelValue":C=>n(i.key,C)},null,8,["id","model-value","onUpdate:modelValue"]),o(d,{for:i.id,class:"text-sm"},{default:a(()=>[_(m(i.label),1)]),_:2},1032,["for"])])),64))])])}}}),rs={class:"space-y-3 py-1"},ne="restore backup",is=j({__name:"RestoreConfirmDialog",props:{open:{type:Boolean}},emits:["confirm","cancel"],setup(p,{emit:s}){const n=p,f=s,c=F("");le(()=>n.open,b=>{b&&(c.value="")});const r=v(()=>c.value===ne),d=()=>{r.value&&f("confirm")};return(b,i)=>{const C=W,h=ot,w=nt,D=st,z=H,l=at,x=Q,S=rt,E=it,I=tt;return g(),T(I,{open:b.open,"onUpdate:open":i[2]||(i[2]=u=>!u&&b.$emit("cancel"))},{default:a(()=>[o(E,{class:"max-w-sm"},{default:a(()=>[o(D,null,{default:a(()=>[o(h,{class:"flex items-center gap-2 text-destructive"},{default:a(()=>[o(C,{name:"hugeicons:alert-02",class:"size-5"}),i[3]||(i[3]=_(" Confirm Restore "))]),_:1}),o(w,null,{default:a(()=>i[4]||(i[4]=[_(" This will overwrite existing data in the target database. This action cannot be undone. ")])),_:1})]),_:1}),t("div",rs,[o(z,{for:"restore-confirm-input"},{default:a(()=>[i[5]||(i[5]=_(" Type ")),t("code",{class:"rounded bg-muted px-1 py-0.5 text-xs font-mono"},m(ne)),i[6]||(i[6]=_(" to continue: "))]),_:1}),o(l,{id:"restore-confirm-input",modelValue:e(c),"onUpdate:modelValue":i[0]||(i[0]=u=>Y(c)?c.value=u:null),placeholder:ne,autocomplete:"off",onKeydown:lt(d,["enter"])},null,8,["modelValue"])]),o(S,null,{default:a(()=>[o(x,{variant:"outline",onClick:i[1]||(i[1]=u=>b.$emit("cancel"))},{default:a(()=>i[7]||(i[7]=[_("Cancel")])),_:1}),o(x,{variant:"destructive",disabled:!e(r),onClick:d},{default:a(()=>i[8]||(i[8]=[_(" Restore ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])}}}),us={class:"rounded-lg border bg-muted/30 p-4"},cs={class:"flex items-center justify-between gap-4"},ds={class:"text-sm font-medium"},ms={class:"text-xs text-muted-foreground"},ps={class:"text-sm font-medium"},fs={class:"mt-3 h-2 overflow-hidden rounded-full bg-border/60"},he=j({__name:"TransferProgressCard",props:{tool:{},stage:{},statusMessage:{},progress:{},isRunning:{type:Boolean},progressClass:{default:"bg-primary"}},setup(p){return(s,n)=>(g(),B("div",us,[t("div",cs,[t("div",null,[t("p",ds,m(s.tool)+" · "+m(s.stage),1),t("p",ms,m(s.statusMessage||"Preparing job..."),1)]),t("span",ps,m(s.progress)+"%",1)]),t("div",fs,[t("div",{class:re(["h-full rounded-full transition-all duration-300",s.progressClass]),style:ut({width:`${Math.max(s.progress,s.isRunning?8:0)}%`})},null,6)])]))}});function ke(p){return!!(p&&(p.status==="completed"||p.status==="error"))}const Te=()=>{const p=F(null),s=F(null),n=F(null),f=F(!1);let c=null,r=null;const d=l=>{c==null||c(l),c=null,r=null},b=l=>{r==null||r(l),c=null,r=null},i=async()=>{if(!n.value)throw new Error("Backup job status URL is missing.");if(f.value){if(p.value)return p.value;throw new Error("Backup job refresh is already in progress.")}f.value=!0;try{const l=await $fetch(n.value);return p.value=l,l.status==="error"&&(s.value=l.error||l.message),ke(l)&&(C(),d(l)),l}catch(l){const x=l instanceof Error?l:new Error("Failed to refresh backup job status.");throw s.value=x.message,C(),b(x),x}finally{f.value=!1}},{pause:C,resume:h,isActive:w}=ct(()=>{i()},1e3,{immediate:!1,immediateCallback:!1}),D=async l=>{n.value=l,s.value=null;const x=await i();return ke(x)?x:(h(),await new Promise((S,E)=>{c=S,r=E}))},z=()=>{C(),n.value=null,p.value=null,s.value=null,f.value=!1,c=null,r=null};return dt(()=>{C()}),{job:p,error:s,isRefreshing:f,isPolling:w,progress:v(()=>{var l;return((l=p.value)==null?void 0:l.progress)??0}),message:v(()=>{var l;return((l=p.value)==null?void 0:l.message)??null}),stage:v(()=>{var l;return((l=p.value)==null?void 0:l.stage)??"queued"}),status:v(()=>{var l;return((l=p.value)==null?void 0:l.status)??"queued"}),isRunning:v(()=>{var l,x;return((l=p.value)==null?void 0:l.status)==="queued"||((x=p.value)==null?void 0:x.status)==="running"}),monitorJob:D,refresh:i,reset:z}},gs=p=>{const s=F(null),n=F(null),f=Te(),{downloadStream:c,isDownloading:r,downloadedBytes:d}=kt(),b=v(()=>f.isRunning.value||r.value),i=v(()=>r.value?100:f.progress.value),C=v(()=>r.value?`Downloading backup artifact (${d.value} bytes)...`:f.message.value),h=v(()=>f.job.value),w=async(l,x)=>{var S,E;if(!p.value)return s.value="No database connection provided",!1;s.value=null,n.value=null;try{const I=await $fetch("/api/database-export/export-database",{method:"POST",body:{...we(p.value),databaseName:l,options:x}}),u=await f.monitorJob(I.statusUrl);if(u.status==="error")return s.value=u.error||u.message,!1;if(!u.downloadUrl||!u.downloadFileName)return s.value="Export finished but no download artifact was returned.",!1;const k=await c({url:u.downloadUrl,method:"GET",filename:u.downloadFileName||`${l}_backup${D((S=p.value)==null?void 0:S.type,x.format)}`});return k.success?(n.value={fileName:u.downloadFileName,duration:u.duration||0},!0):(s.value=((E=k.error)==null?void 0:E.message)||"Download failed.",!1)}catch(I){return s.value=I instanceof Error?I.message:"Export failed. Check the connection and backup configuration.",console.error("Export error:",I),!1}},D=(l,x)=>vt(l,x);return{isExporting:b,progress:i,error:s,lastExport:n,currentJob:h,statusMessage:C,exportDatabase:w,reset:()=>{f.reset(),s.value=null,n.value=null}}},_s=p=>{const s=Te(),n=v(()=>s.isRunning.value),f=v(()=>s.progress.value),c=v(()=>s.message.value),r=v(()=>s.job.value),d=F(null),b=F(null),i=F(null),C=F(null),h=F({clean:!1,dataOnly:!1,schemaOnly:!1,exitOnError:!0}),w=v(()=>{var k;return(k=p.value)==null?void 0:k.type}),D=v(()=>ie(w.value)),z=v(()=>Fe(w.value)),l=v(()=>D.value.map(k=>k.extension).join(" / ")),x=()=>{i.value=null,C.value&&(C.value.value="")};return{isImporting:n,progress:f,statusMessage:c,currentJob:r,error:d,success:b,selectedFile:i,fileInputRef:C,options:h,extensionSummary:l,clearSelectedFile:x,openFilePicker:()=>{var k;(k=C.value)==null||k.click()},onFileSelect:k=>{var A;const N=k.target;if(!((A=N.files)!=null&&A.length))return;const V=N.files[0];if(!D.value.some(q=>V.name.toLowerCase().endsWith(q.extension.toLowerCase()))){x(),d.value=`Unsupported file type. Use ${l.value} for ${z.value}.`,b.value=null;return}i.value=V,d.value=null,b.value=null},importDatabase:async()=>{if(!(!i.value||!p.value)){d.value=null,b.value=null;try{const k=new FormData;k.append("file",i.value);const N=we(p.value);Object.entries(N).forEach(([A,q])=>{q!==void 0&&k.append(A,typeof q=="object"?JSON.stringify(q):String(q))}),k.append("options",JSON.stringify(h.value));const V=await $fetch("/api/database-import/import-database",{method:"POST",body:k}),O=await s.monitorJob(V.statusUrl);if(O.status==="completed"){b.value=O.message||"Database imported successfully",x();return}d.value=O.error||O.message||"Import failed"}catch(k){d.value=k instanceof Error?k.message:"Import failed. Check the backup file and connection compatibility.",console.error("Import error:",k)}}},reset:()=>{s.reset(),d.value=null,b.value=null,x()}}},vs={class:"flex flex-col h-full gap-3 overflow-hidden p-3"},bs={class:"font-medium text-foreground"},xs={class:"text-muted-foreground/60"},ys={class:"flex items-center justify-between gap-2"},hs={class:"text-xs text-muted-foreground"},ks={class:"flex-1 overflow-y-auto rounded-lg border bg-background p-4"},ws={class:"space-y-4"},$s={class:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between"},Cs={class:"mt-1 text-sm text-muted-foreground"},Ss={class:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]"},Bs={class:"rounded-lg border p-4"},Fs={class:"space-y-4"},Ts={class:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between"},Ds={class:"mt-1 text-sm text-muted-foreground"},Es={class:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]"},Is={class:"rounded-lg border p-4 space-y-4"},Rs={class:"text-muted-foreground text-xs inline-flex items-center gap-0.5"},zs={class:"text-destructive gap-0.5 items-center inline-flex"},Ls=j({__name:"BackupRestoreContainer",props:{connectionId:{},initialTab:{}},setup(p){const s=p,n=mt(),f=pt(),c=v(()=>{if(s.connectionId)return n.connections.find($=>$.id===s.connectionId)}),r=v(()=>{var $;return($=c.value)==null?void 0:$.type}),d=v(()=>{var $,y;return(($=c.value)==null?void 0:$.database)||((y=c.value)==null?void 0:y.name)||"database"}),b=v(()=>Fe(r.value)),i=v(()=>bt(r.value)),C=v(()=>xt(r.value)),h=v(()=>Be(r.value)),w=v(()=>ie(r.value)),D=v(()=>yt(r.value)),z=v(()=>w.value.map($=>$.extension).join(" / ")),l=v(()=>s.connectionId?(f.schemas[s.connectionId]||[]).filter($=>$.connectionId===s.connectionId).map($=>$.name):[]),x=[{id:"export",tabLabel:"Create Backup",subtitle:"Generate native backup artifacts for the current connection.",icon:"hugeicons:download-01"},{id:"import",tabLabel:"Restore Backup",subtitle:"Apply a native backup artifact back into this connection.",icon:"hugeicons:upload-01"}],S=F(s.initialTab),E=v(()=>x.find($=>$.id===S.value));le(()=>s.initialTab,$=>{S.value=$});const I=$=>{S.value=$},{isExporting:u,progress:k,error:N,lastExport:V,currentJob:O,statusMessage:A,exportDatabase:q,reset:De}=gs(c),Ee=async $=>{await q(d.value,$)},{isImporting:U,progress:Ie,statusMessage:Re,currentJob:ee,error:ue,success:ce,selectedFile:de,options:te,extensionSummary:ze,onFileSelect:Oe,clearSelectedFile:Ne,importDatabase:Ve,reset:qe}=_s(c),G=F(!1),Me=()=>{G.value=!0},je=async()=>{G.value=!1,await Ve()},Le=()=>{G.value=!1};return($,y)=>{var me,pe,fe,ge,_e;const Pe=He,L=W,Ae=_t,Ue=gt,Je=ft,K=Se,X=Ce,se=Q,Z=$e;return g(),B("div",vs,[o(is,{open:e(G),onConfirm:je,onCancel:Le},null,8,["open"]),o(Pe,{icon:"hugeicons:database-import",title:"Backup & Restore"},{context:a(()=>[t("span",bs,m(e(d)),1),t("span",xs,"· "+m(e(b)),1)]),_:1}),t("div",ys,[o(Je,{modelValue:e(S),"onUpdate:modelValue":y[0]||(y[0]=R=>Y(S)?S.value=R:null),class:"min-w-0 flex-1 gap-0"},{default:a(()=>[o(Ue,{class:"h-8 max-w-full justify-start! overflow-x-auto"},{default:a(()=>[(g(),B(P,null,J(x,R=>o(Ae,{key:R.id,value:R.id,class:"min-w-fit shrink-0 cursor-pointer rounded-sm px-1.5 text-xs",disabled:!e(i),onClick:oe=>I(R.id)},{default:a(()=>[o(L,{name:R.icon,class:"shrink-0 size-3.5"},null,8,["name"]),_(" "+m(R.tabLabel),1)]),_:2},1032,["value","disabled","onClick"])),64))]),_:1})]),_:1},8,["modelValue"]),t("div",hs,m((me=e(E))==null?void 0:me.subtitle),1)]),t("div",ks,[e(i)?(g(),B(P,{key:1},[ve(t("div",ws,[t("div",$s,[t("div",null,[y[2]||(y[2]=t("h3",{class:"text-base font-medium"},"Create Backup",-1)),t("p",Cs," Export "+m(e(d))+" using "+m(e(h))+". ",1)])]),e(N)?(g(),T(Z,{key:0,variant:"destructive"},{default:a(()=>[o(L,{name:"hugeicons:alert-circle",class:"size-4"}),o(K,null,{default:a(()=>y[3]||(y[3]=[_("Backup Failed")])),_:1}),o(X,null,{default:a(()=>[_(m(e(N)),1)]),_:1}),o(se,{size:"sm",variant:"outline",class:"mt-2",onClick:e(De)},{default:a(()=>y[4]||(y[4]=[_(" Try Again ")])),_:1},8,["onClick"])]),_:1})):M("",!0),e(V)&&!e(u)&&!e(N)?(g(),T(Z,{key:1},{default:a(()=>[o(L,{name:"hugeicons:checkmark-circle-02",class:"size-4 text-green-500"}),o(K,null,{default:a(()=>y[5]||(y[5]=[_("Backup Complete")])),_:1}),o(X,null,{default:a(()=>{var R,oe;return[_(m((R=e(V))==null?void 0:R.fileName)+" downloaded in "+m(((((oe=e(V))==null?void 0:oe.duration)||0)/1e3).toFixed(1))+"s ",1)]}),_:1})]),_:1})):M("",!0),e(u)||e(O)?(g(),T(he,{key:2,tool:((pe=e(O))==null?void 0:pe.tool)||e(h),stage:((fe=e(O))==null?void 0:fe.stage)||"queued","status-message":e(A)||"",progress:e(k),"is-running":e(u)},null,8,["tool","stage","status-message","progress","is-running"])):M("",!0),t("div",Ss,[t("div",Bs,[o(Gt,{schemas:e(l),loading:e(u),"connection-type":e(r),onSubmit:Ee},null,8,["schemas","loading","connection-type"])]),o(ye,{title:"Backup Profile",description:"Exports run on the local runtime host and stream the artifact directly into a downloadable file.",formats:e(w),"tool-hint":e(h),"target-name":e(d),"formats-label":"Supported Files"},null,8,["formats","tool-hint","target-name"])])],512),[[be,e(S)==="export"]]),ve(t("div",Fs,[t("div",Ts,[t("div",null,[y[6]||(y[6]=t("h3",{class:"text-base font-medium"},"Restore Backup",-1)),t("p",Ds," Restore a "+m(e(z))+" backup into "+m(e(d))+". ",1)])]),e(ue)?(g(),T(Z,{key:0,variant:"destructive"},{default:a(()=>[o(L,{name:"hugeicons:alert-circle",class:"size-4"}),o(K,null,{default:a(()=>y[7]||(y[7]=[_("Import Failed")])),_:1}),o(X,null,{default:a(()=>[_(m(e(ue)),1)]),_:1}),o(se,{size:"sm",variant:"outline",class:"mt-2",onClick:e(qe)},{default:a(()=>y[8]||(y[8]=[_(" Try Again ")])),_:1},8,["onClick"])]),_:1})):M("",!0),e(ce)?(g(),T(Z,{key:1},{default:a(()=>[o(L,{name:"hugeicons:checkmark-circle-02",class:"size-4 text-green-500"}),o(K,null,{default:a(()=>y[9]||(y[9]=[_("Import Complete")])),_:1}),o(X,null,{default:a(()=>[_(m(e(ce)),1)]),_:1})]),_:1})):M("",!0),e(U)||e(ee)?(g(),T(he,{key:2,tool:((ge=e(ee))==null?void 0:ge.tool)||e(h),stage:((_e=e(ee))==null?void 0:_e.stage)||"queued","status-message":e(Re)||"",progress:e(Ie),"is-running":e(U),"progress-class":"bg-emerald-500"},null,8,["tool","stage","status-message","progress","is-running"])):M("",!0),t("div",Es,[t("div",Is,[o(os,{"selected-file":e(de),accept:e(D),"extension-summary":e(ze),onChange:e(Oe),onClear:e(Ne)},null,8,["selected-file","accept","extension-summary","onChange","onClear"]),o(ls,{modelValue:e(te),"onUpdate:modelValue":y[1]||(y[1]=R=>Y(te)?te.value=R:null)},null,8,["modelValue"]),o(se,{class:"w-full",size:"lg",disabled:!e(de)||e(U),onClick:Me},{default:a(()=>[o(L,{name:e(U)?"hugeicons:loading-03":"hugeicons:upload-01",class:re(["size-4 mr-2",e(U)&&"animate-spin"])},null,8,["name","class"]),_(" "+m(e(U)?"Restoring...":"Restore Backup"),1)]),_:1},8,["disabled"]),t("p",Rs,[t("polyline",zs,[o(L,{name:"hugeicons:alert-circle",class:"size-4 text-destructive"}),y[10]||(y[10]=_(" Warning: "))]),y[11]||(y[11]=_(" Importing a database can overwrite existing data. Make sure you have a backup before proceeding. "))])]),o(ye,{title:"Restore Profile",description:"Use a backup file produced for the same database family and runtime toolchain.",formats:e(w),"tool-hint":e(h),"target-name":e(d),"formats-label":"Accepted Files"},null,8,["formats","tool-hint","target-name"])])],512),[[be,e(S)==="import"]])],64)):(g(),T(Nt,{key:0,"support-message":e(C),"connection-type":e(r)},null,8,["support-message","connection-type"]))])])}}});export{Ls as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o,e as a,n,g as r,j as c,D as l,o as u}from"./
|
|
1
|
+
import{d as o,e as a,n,g as r,j as c,D as l,o as u}from"./D0lW43G8.js";const d=o({__name:"ContextMenuShortcut",props:{class:{}},setup(t){const e=t;return(s,m)=>(u(),a("span",{"data-slot":"context-menu-shortcut",class:n(r(c)("text-muted-foreground ml-auto text-xs tracking-widest",e.class))},[l(s.$slots,"default")],2))}});export{d as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as b,ar as N,as as T,aj as D,aa as C,k as h,o as y,w as v,D as g,g as e,ak as k,at as $,r as u,c as w,au as A,av as F,aw as I,f as M,p as H,l as P,ax as V,ay as E}from"./
|
|
1
|
+
import{d as b,ar as N,as as T,aj as D,aa as C,k as h,o as y,w as v,D as g,g as e,ak as k,at as $,r as u,c as w,au as A,av as F,aw as I,f as M,p as H,l as P,ax as V,ay as E}from"./D0lW43G8.js";const[O,j]=D("CollapsibleRoot");var S=b({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(i,{expose:d,emit:s}){const o=i,n=N(o,"open",s,{defaultValue:o.defaultOpen,passive:o.open===void 0}),{disabled:l,unmountOnHide:p}=T(o);return j({contentId:"",disabled:l,open:n,unmountOnHide:p,onOpenToggle:()=>{l.value||(n.value=!n.value)}}),d({open:n}),C(),(r,f)=>(y(),h(e(k),{as:r.as,"as-child":o.asChild,"data-state":e(n)?"open":"closed","data-disabled":e(l)?"":void 0},{default:v(()=>[g(r.$slots,"default",{open:e(n)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),J=S,L=b({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(i,{emit:d}){const s=i,o=d,t=O();t.contentId||(t.contentId=$(void 0,"reka-collapsible-content"));const n=u(),{forwardRef:l,currentElement:p}=C(),r=u(0),f=u(0),q=w(()=>t.open.value),m=u(q.value),c=u();A(()=>{var a;return[q.value,(a=n.value)==null?void 0:a.present]},async()=>{await E();const a=p.value;if(!a)return;c.value=c.value||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const _=a.getBoundingClientRect();f.value=_.height,r.value=_.width,m.value||(a.style.transitionDuration=c.value.transitionDuration,a.style.animationName=c.value.animationName)},{immediate:!0});const x=w(()=>m.value&&t.open.value);return F(()=>{requestAnimationFrame(()=>{m.value=!1})}),I(p,"beforematch",a=>{requestAnimationFrame(()=>{t.onOpenToggle(),o("contentFound")})}),(a,_)=>(y(),h(e(V),{ref_key:"presentRef",ref:n,present:a.forceMount||e(t).open.value,"force-mount":!0},{default:v(({present:B})=>{var R;return[M(e(k),H(a.$attrs,{id:e(t).contentId,ref:e(l),"as-child":s.asChild,as:a.as,hidden:B?void 0:e(t).unmountOnHide.value?"":"until-found","data-state":x.value?void 0:e(t).open.value?"open":"closed","data-disabled":(R=e(t).disabled)!=null&&R.value?"":void 0,style:{"--reka-collapsible-content-height":`${f.value}px`,"--reka-collapsible-content-width":`${r.value}px`}}),{default:v(()=>[!e(t).unmountOnHide.value||B?g(a.$slots,"default",{key:0}):P("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]}),_:3},8,["present"]))}}),K=L,z=b({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const d=i;C();const s=O();return(o,t)=>{var n,l;return y(),h(e(k),{type:o.as==="button"?"button":void 0,as:o.as,"as-child":d.asChild,"aria-controls":e(s).contentId,"aria-expanded":e(s).open.value,"data-state":e(s).open.value?"open":"closed","data-disabled":(n=e(s).disabled)!=null&&n.value?"":void 0,disabled:(l=e(s).disabled)==null?void 0:l.value,onClick:e(s).onOpenToggle},{default:v(()=>[g(o.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"])}}}),Q=z;export{J as C,K as a,Q as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as s,c as xt,l as E,d as q,ac as kt,ad as vt,ae as _t,af as bt,E as wt,ag as St,A as Et}from"./
|
|
1
|
+
import{_ as s,c as xt,l as E,d as q,ac as kt,ad as vt,ae as _t,af as bt,E as wt,ag as St,A as Et}from"./B_ERKujF.js";import{d as nt}from"./DLBsdU7G.js";import"./D0lW43G8.js";var X=function(){var n=s(function(f,r,a,h){for(a=a||{},h=f.length;h--;a[f[h]]=r);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(r,a,h,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=a,h}},"parseError"),parse:s(function(r){var a=this,h=[0],u=[],y=[null],o=[],S=this.table,k="",M=0,C=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),N={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(N.yy[L]=this.yy[L]);v.setInput(r,N.yy),N.yy.lexer=v,N.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var b=v.yylloc;o.push(b);var $=v.options&&v.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(T){h.length=h.length-2*T,y.length=y.length-T,o.length=o.length-T}s(R,"popStack");function P(){var T;return T=u.pop()||v.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=a.symbols_[T]||T),T}s(P,"lex");for(var w,A,I,K,z={},j,H,et,G;;){if(A=h[h.length-1],this.defaultActions[A]?I=this.defaultActions[A]:((w===null||typeof w>"u")&&(w=P()),I=S[A]&&S[A][w]),typeof I>"u"||!I.length||!I[0]){var Q="";G=[];for(j in S[A])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+(M+1)+`:
|
|
2
2
|
`+v.showPosition()+`
|
|
3
3
|
Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Q="Parse error on line "+(M+1)+": Unexpected "+(w==J?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Q,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:b,expected:G})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+w);switch(I[0]){case 1:h.push(w),y.push(v.yytext),o.push(v.yylloc),h.push(I[1]),w=null,C=v.yyleng,k=v.yytext,M=v.yylineno,b=v.yylloc;break;case 2:if(H=this.productions_[I[1]][1],z.$=y[y.length-H],z._$={first_line:o[o.length-(H||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(H||1)].first_column,last_column:o[o.length-1].last_column},$&&(z._$.range=[o[o.length-(H||1)].range[0],o[o.length-1].range[1]]),K=this.performAction.apply(z,[k,C,M,N.yy,I[1],y,o].concat(O)),typeof K<"u")return K;H&&(h=h.slice(0,-1*H*2),y=y.slice(0,-1*H),o=o.slice(0,-1*H)),h.push(this.productions_[I[1]][0]),y.push(z.$),o.push(z._$),et=S[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0},"parse")},x=function(){var f={EOF:1,parseError:s(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:s(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var a=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var U=Object.defineProperty;var j=(n,a,e)=>a in n?U(n,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[a]=e;var p=(n,a,e)=>j(n,typeof a!="symbol"?a+"":a,e);import{bu as q,bv as T,bw as C,r as R,aP as F,aB as H,aR as L,bx as N,aL as V,au as $,by as S,bz as k,bA as I,bB as K,g as A,c as G,aN as B,aC as J,bC as Q}from"./
|
|
1
|
+
var U=Object.defineProperty;var j=(n,a,e)=>a in n?U(n,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[a]=e;var p=(n,a,e)=>j(n,typeof a!="symbol"?a+"":a,e);import{bu as q,bv as T,bw as C,r as R,aP as F,aB as H,aR as L,bx as N,aL as V,au as $,by as S,bz as k,bA as I,bB as K,g as A,c as G,aN as B,aC as J,bC as Q}from"./D0lW43G8.js";const W=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],X=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",v=[];class Z{constructor(){p(this,"_data",new O);p(this,"_hash",new O([...W]));p(this,"_nDataBytes",0);p(this,"_minBufferSize",0)}finalize(a){a&&this._append(a);const e=this._nDataBytes*8,s=this._data.sigBytes*8;return this._data.words[s>>>5]|=128<<24-s%32,this._data.words[(s+64>>>9<<4)+14]=Math.floor(e/4294967296),this._data.words[(s+64>>>9<<4)+15]=e,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(a,e){const s=this._hash.words;let t=s[0],r=s[1],c=s[2],y=s[3],f=s[4],m=s[5],g=s[6],i=s[7];for(let u=0;u<64;u++){if(u<16)v[u]=a[e+u]|0;else{const o=v[u-15],D=(o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3,h=v[u-2],E=(h<<15|h>>>17)^(h<<13|h>>>19)^h>>>10;v[u]=D+v[u-7]+E+v[u-16]}const w=f&m^~f&g,b=t&r^t&c^r&c,P=(t<<30|t>>>2)^(t<<19|t>>>13)^(t<<10|t>>>22),l=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),_=i+l+w+X[u]+v[u],d=P+b;i=g,g=m,m=f,f=y+_|0,y=c,c=r,r=t,t=_+d|0}s[0]=s[0]+t|0,s[1]=s[1]+r|0,s[2]=s[2]+c|0,s[3]=s[3]+y|0,s[4]=s[4]+f|0,s[5]=s[5]+m|0,s[6]=s[6]+g|0,s[7]=s[7]+i|0}_append(a){typeof a=="string"&&(a=O.fromUtf8(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes}_process(a){let e,s=this._data.sigBytes/64;a?s=Math.ceil(s):s=Math.max((s|0)-this._minBufferSize,0);const t=s*16,r=Math.min(t*4,this._data.sigBytes);if(t){for(let c=0;c<t;c+=16)this._doProcessBlock(this._data.words,c);e=this._data.words.splice(0,t),this._data.sigBytes-=r}return new O(e,r)}}class O{constructor(a,e){p(this,"words");p(this,"sigBytes");a=this.words=a||[],this.sigBytes=e===void 0?a.length*4:e}static fromUtf8(a){const e=unescape(encodeURIComponent(a)),s=e.length,t=[];for(let r=0;r<s;r++)t[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new O(t,s)}toBase64(){const a=[];for(let e=0;e<this.sigBytes;e+=3){const s=this.words[e>>>2]>>>24-e%4*8&255,t=this.words[e+1>>>2]>>>24-(e+1)%4*8&255,r=this.words[e+2>>>2]>>>24-(e+2)%4*8&255,c=s<<16|t<<8|r;for(let y=0;y<4&&e*8+y*6<this.sigBytes*8;y++)a.push(Y.charAt(c>>>6*(3-y)&63))}return a.join("")}concat(a){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let e=0;e<a.sigBytes;e++){const s=a.words[e>>>2]>>>24-e%4*8&255;this.words[this.sigBytes+e>>>2]|=s<<24-(this.sigBytes+e)%4*8}else for(let e=0;e<a.sigBytes;e+=4)this.words[this.sigBytes+e>>>2]=a.words[e>>>2];this.sigBytes+=a.sigBytes}}function ee(n){return new Z().finalize(n).toBase64()}function te(n){return ee(q(n))}function ae(n){return Array.isArray(n)?n:[n]}const se=n=>n==="defer"||n===!1;function re(...n){var P;const a=typeof n[n.length-1]=="string"?n.pop():void 0;typeof n[0]!="string"&&n.unshift(a);let[e,s,t={}]=n;if(typeof e!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof s!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const r=T(),c=s,y=()=>C.value,f=()=>r.isHydrating?r.payload.data[e]:r.static.data[e];t.server??(t.server=!0),t.default??(t.default=y),t.getCachedData??(t.getCachedData=f),t.lazy??(t.lazy=!1),t.immediate??(t.immediate=!0),t.deep??(t.deep=C.deep),t.dedupe??(t.dedupe="cancel");const m=t.getCachedData(e,r),g=m!=null;if(!r._asyncData[e]||!t.immediate){(P=r.payload._errors)[e]??(P[e]=C.errorValue);const l=t.deep?R:F;r._asyncData[e]={data:l(g?m:t.default()),pending:R(!g),error:H(r.payload._errors,e),status:R("idle"),_default:t.default}}const i={...r._asyncData[e]};delete i._default,i.refresh=i.execute=(l={})=>{if(r._asyncDataPromises[e]){if(se(l.dedupe??t.dedupe))return r._asyncDataPromises[e];r._asyncDataPromises[e].cancelled=!0}if(l._initial||r.isHydrating&&l._initial!==!1){const d=l._initial?m:t.getCachedData(e,r);if(d!=null)return Promise.resolve(d)}i.pending.value=!0,i.status.value="pending";const _=new Promise((d,o)=>{try{d(c(r))}catch(D){o(D)}}).then(async d=>{if(_.cancelled)return r._asyncDataPromises[e];let o=d;t.transform&&(o=await t.transform(d)),t.pick&&(o=ie(o,t.pick)),r.payload.data[e]=o,i.data.value=o,i.error.value=C.errorValue,i.status.value="success"}).catch(d=>{if(_.cancelled)return r._asyncDataPromises[e];i.error.value=K(d),i.data.value=A(t.default()),i.status.value="error"}).finally(()=>{_.cancelled||(i.pending.value=!1,delete r._asyncDataPromises[e])});return r._asyncDataPromises[e]=_,r._asyncDataPromises[e]},i.clear=()=>ne(r,e);const u=()=>i.refresh({_initial:!0}),w=t.server!==!1&&r.payload.serverRendered;{const l=L();if(l&&w&&t.immediate&&!l.sp&&(l.sp=[]),l&&!l._nuxtOnBeforeMountCbs){l._nuxtOnBeforeMountCbs=[];const o=l._nuxtOnBeforeMountCbs;N(()=>{o.forEach(D=>{D()}),o.splice(0,o.length)}),V(()=>o.splice(0,o.length))}w&&r.isHydrating&&(i.error.value||m!=null)?(i.pending.value=!1,i.status.value=i.error.value?"error":"success"):l&&(r.payload.serverRendered&&r.isHydrating||t.lazy)&&t.immediate?l._nuxtOnBeforeMountCbs.push(u):t.immediate&&u();const _=I();if(t.watch){const o=$(t.watch,()=>i.refresh());_&&S(o)}const d=r.hook("app:data:refresh",async o=>{(!o||o.includes(e))&&await i.refresh()});_&&S(d)}const b=Promise.resolve(r._asyncDataPromises[e]).then(()=>i);return Object.assign(b,i),b}async function fe(n){await new Promise(e=>k(e));const a=n?ae(n):void 0;await T().hooks.callHookParallel("app:data:refresh",a)}function ne(n,a){a in n.payload.data&&(n.payload.data[a]=void 0),a in n.payload._errors&&(n.payload._errors[a]=C.errorValue),n._asyncData[a]&&(n._asyncData[a].data.value=void 0,n._asyncData[a].error.value=C.errorValue,n._asyncData[a].pending.value=!1,n._asyncData[a].status.value="idle"),a in n._asyncDataPromises&&(n._asyncDataPromises[a]&&(n._asyncDataPromises[a].cancelled=!0),n._asyncDataPromises[a]=void 0)}function ie(n,a){const e={};for(const s of a)e[s]=n[s];return e}function de(n,a,e){const[s={},t]=typeof a=="string"?[{},a]:[a,e],r=G(()=>B(n)),c=s.key||te([t,typeof r.value=="string"?r.value:"",...oe(s)]);if(!c||typeof c!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+c);if(!n)throw new Error("[nuxt] [useFetch] request is missing.");const y=c===t?"$f"+c:c;if(!s.baseURL&&typeof r.value=="string"&&r.value[0]==="/"&&r.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:f,lazy:m,default:g,transform:i,pick:u,watch:w,immediate:b,getCachedData:P,deep:l,dedupe:_,...d}=s,o=J({...Q,...d,cache:typeof s.cache=="boolean"?void 0:s.cache}),D={server:f,lazy:m,default:g,transform:i,pick:u,immediate:b,getCachedData:P,deep:l,dedupe:_,watch:w===!1?[]:[o,r,...w||[]]};let h;return re(y,()=>{var x;(x=h==null?void 0:h.abort)==null||x.call(h,new DOMException("Request aborted as another request to the same endpoint was initiated.","AbortError")),h=typeof AbortController<"u"?new AbortController:{};const z=B(s.timeout);let M;return z&&(M=setTimeout(()=>h.abort(new DOMException("Request aborted due to timeout.","AbortError")),z),h.signal.onabort=()=>clearTimeout(M)),(s.$fetch||globalThis.$fetch)(r.value,{signal:h.signal,...o}).finally(()=>{clearTimeout(M)})},D)}function oe(n){var e;const a=[((e=B(n.method))==null?void 0:e.toUpperCase())||"GET",B(n.baseURL)];for(const s of[n.params||n.query]){const t=B(s);if(!t)continue;const r={};for(const[c,y]of Object.entries(t))r[B(c)]=B(y);a.push(r)}return a}export{fe as r,de as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as a,c as s,a as e,C as t}from"./Buh0pI3n.js";import{_ as i}from"./B_ERKujF.js";import"./DA4Xn6lm.js";import"./BG-rJefG.js";import"./9sDqz0uT.js";import"./DRh-06Hb.js";import"./D0lW43G8.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Jy,az as jy,aP as rs,as as tm,c as vi,aR as em,au as Pa,aK as md,av as rm,aQ as im,ay as nm,i as am,g as om,aS as Ra}from"./
|
|
1
|
+
import{d as Jy,az as jy,aP as rs,as as tm,c as vi,aR as em,au as Pa,aK as md,av as rm,aQ as im,ay as nm,i as am,g as om,aS as Ra}from"./D0lW43G8.js";/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,e as s,o as t,m as n,l as o,f as c,A as d,t as r,D as a}from"./
|
|
1
|
+
import{d as i,e as s,o as t,m as n,l as o,f as c,A as d,t as r,D as a}from"./D0lW43G8.js";const m={class:"flex flex-col gap-3 rounded-lg border bg-background p-3 lg:flex-row lg:items-start lg:justify-between"},p={class:"min-w-0 space-y-1"},_={class:"flex items-center gap-2"},f={class:"text-base font-medium"},u={key:0,class:"text-sm text-muted-foreground"},g={key:1,class:"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground"},x={key:2,class:"mt-0.5 flex flex-wrap items-center gap-1.5"},h={key:0,class:"flex flex-wrap items-center gap-2"},v=i({__name:"ToolPageHeader",props:{icon:{},title:{},description:{default:""}},setup(y){return(e,b)=>{const l=d;return t(),s("div",m,[n("div",p,[n("div",_,[c(l,{name:e.icon,class:"size-5 text-primary"},null,8,["name"]),n("h2",f,r(e.title),1)]),e.description?(t(),s("p",u,r(e.description),1)):o("",!0),e.$slots.context?(t(),s("div",g,[a(e.$slots,"context")])):o("",!0),e.$slots.badges?(t(),s("div",x,[a(e.$slots,"badges")])):o("",!0)]),e.$slots.actions?(t(),s("div",h,[a(e.$slots,"actions")])):o("",!0)])}}});export{v as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Cn,r as ne,aC as we,c as S,aN as m,g as C,av as Mn,i as Ne,au as ye,aO as rt,aB as Se,q as wn,az as en,aK as it,ay as ue,aP as lt,aQ as at,aR as Re,aS as De,aT as nn,aU as mn,aV as ut}from"./
|
|
1
|
+
import{d as Cn,r as ne,aC as we,c as S,aN as m,g as C,av as Mn,i as Ne,au as ye,aO as rt,aB as Se,q as wn,az as en,aK as it,ay as ue,aP as lt,aQ as at,aR as Re,aS as De,aT as nn,aU as mn,aV as ut}from"./D0lW43G8.js";var Te;Te||(Te={});/**
|
|
2
2
|
* vee-validate v4.15.0
|
|
3
3
|
* (c) 2024 Abdelrahman Awad
|
|
4
4
|
* @license MIT
|